"use strict";exports.id=9039,exports.ids=[9039],exports.modules={"./src/utils/labels-file-parser.ts"(e,r,t){t.r(r),t.d(r,{parseJsonLabelsFile:()=>o,parseTomlLabelsFile:()=>a});var s=t("../../../../../../../../../../private/tmp/buildkite-job-01a03ad4-00a2-4e4f-9a4f-0e1ec809f684/agent-cli-mac-macos-x64-01a03ad4-00a2-4e4f-9a4f-0e1ec809f684.LshlV881/pnpm-virtual-store/smol-toml@1.6.1/node_modules/smol-toml/dist/index.js");function o(e,r){const t=JSON.parse(e);if(Array.isArray(t)){const e=[];for(const s of t){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 t&&null!==t){const e=[];for(const[s,o]of Object.entries(t))if("string"==typeof o)e.push({key:s,value:o});else{if(!Array.isArray(o))throw new Error(`Invalid label value for key "${s}" in ${r}: expected string or array of strings`);for(const t of o){if("string"!=typeof t)throw new Error(`Invalid label value for key "${s}" in ${r}: array values must be strings`);e.push({key:s,value:t})}}return e}throw new Error(`Invalid labels file format in ${r}: expected array or object`)}function a(e,r){const t=(0,s.qg)(e),o=[];for(const[e,s]of Object.entries(t))if("string"==typeof s)o.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 t of s){if("string"!=typeof t)throw new Error(`Invalid label value for key "${e}" in ${r}: array values must be strings`);o.push({key:e,value:t})}}return o}}};