"use strict";exports.id=4884,exports.ids=[4884],exports.modules={"./src/utils/labels-file-parser.ts"(e,r,t){t.r(r),t.d(r,{parseJsonLabelsFile:()=>o,parseTomlLabelsFile:()=>s});var a=t("../../../../../../../../../../private/tmp/buildkite-job-01a03ad4-00a6-421e-aa5c-b979ebad7f5d/agent-cli-mac-macos-arm64-01a03ad4-00a6-421e-aa5c-b979ebad7f5d.PXWOM82j/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 a of t){if("object"!=typeof a||null===a||!("key"in a)||!("value"in a)||"string"!=typeof a.key||"string"!=typeof a.value)throw new Error(`Invalid label entry in ${r}: expected {key: string, value: string}`);e.push({key:a.key,value:a.value})}return e}if("object"==typeof t&&null!==t){const e=[];for(const[a,o]of Object.entries(t))if("string"==typeof o)e.push({key:a,value:o});else{if(!Array.isArray(o))throw new Error(`Invalid label value for key "${a}" 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 "${a}" in ${r}: array values must be strings`);e.push({key:a,value:t})}}return e}throw new Error(`Invalid labels file format in ${r}: expected array or object`)}function s(e,r){const t=(0,a.qg)(e),o=[];for(const[e,a]of Object.entries(t))if("string"==typeof a)o.push({key:e,value:a});else{if(!Array.isArray(a))throw new Error(`Invalid label value for key "${e}" in ${r}: expected string or array of strings`);for(const t of a){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}}};