"use strict";exports.id=5274,exports.ids=[5274],exports.modules={"./src/utils/labels-file-parser.ts"(e,r,o){o.r(r),o.d(r,{parseJsonLabelsFile:()=>t,parseTomlLabelsFile:()=>n});var s=o("../../node_modules/.pnpm/smol-toml@1.6.1/node_modules/smol-toml/dist/index.js");function t(e,r){const o=JSON.parse(e);if(Array.isArray(o)){const e=[];for(const s of o){if("object"!=typeof s||null===s||!("key"in s)||!("value"in s)||"string"!=typeof s.key||"string"!=typeof s.value)throw new Error(`Invalid label entry in ${r}: expected {key: string, value: string}`);e.push({key:s.key,value:s.value})}return e}if("object"==typeof o&&null!==o){const e=[];for(const[s,t]of Object.entries(o))if("string"==typeof t)e.push({key:s,value:t});else{if(!Array.isArray(t))throw new Error(`Invalid label value for key "${s}" in ${r}: expected string or array of strings`);for(const o of t){if("string"!=typeof o)throw new Error(`Invalid label value for key "${s}" in ${r}: array values must be strings`);e.push({key:s,value:o})}}return e}throw new Error(`Invalid labels file format in ${r}: expected array or object`)}function n(e,r){const o=(0,s.qg)(e),t=[];for(const[e,s]of Object.entries(o))if("string"==typeof s)t.push({key:e,value:s});else{if(!Array.isArray(s))throw new Error(`Invalid label value for key "${e}" in ${r}: expected string or array of strings`);for(const o of s){if("string"!=typeof o)throw new Error(`Invalid label value for key "${e}" in ${r}: array values must be strings`);t.push({key:e,value:o})}}return t}}};