agentdeps 0.1.1 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jeroen Gordijn
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -122,9 +122,50 @@ custom_agents:
122
122
  global_agents: ~/.my-agent/agents
123
123
  ```
124
124
 
125
- ### Global dependencies
125
+ ### Global Skills & Agents
126
126
 
127
- Personal dependencies go in `~/.config/agentdeps/agents.yaml` same format as the project file. They're installed to global agent directories automatically.
127
+ Personal dependencies that should be available in **every project** go in a global `agents.yaml` alongside your config:
128
+
129
+ ```
130
+ ~/.config/agentdeps/agents.yaml # Linux / macOS
131
+ %APPDATA%\agentdeps\agents.yaml # Windows
132
+ ```
133
+
134
+ Same format as the project file:
135
+
136
+ ```yaml
137
+ dependencies:
138
+ - repo: my-org/my-skills-repo
139
+
140
+ - repo: my-org/another-repo
141
+ skills:
142
+ - kotlin-conventions
143
+ agents: false
144
+ ```
145
+
146
+ When you run `agentdeps install`, both global and project dependencies are processed:
147
+
148
+ 1. **Global deps** → installed to each agent's **global** directories (e.g., `~/.pi/agent/skills/`, `~/.claude/skills/`)
149
+ 2. **Project deps** → installed to each agent's **project** directories (e.g., `.pi/skills/`, `.claude/skills/`)
150
+
151
+ Global skills are available everywhere — no need to add the same dependency to every project.
152
+
153
+ #### Global paths per agent
154
+
155
+ | Agent | Global Skills | Global Agents |
156
+ |---|---|---|
157
+ | Pi | `~/.pi/agent/skills` | `~/.pi/agent/agents` |
158
+ | Claude Code | `~/.claude/skills` | `~/.claude/agents` |
159
+ | Cursor | `~/.cursor/skills` | `~/.cursor/agents` |
160
+ | Roo | `~/.roo/skills` | `~/.roo/agents` |
161
+ | Cline | `~/.cline/skills` | `~/.cline/agents` |
162
+ | Windsurf | `~/.windsurf/skills` | `~/.windsurf/agents` |
163
+ | OpenCode | `~/.config/opencode/skills` | `~/.config/opencode/agents` |
164
+ | Codex | `~/.config/codex/skills` | `~/.config/codex/agents` |
165
+ | Amp | `~/.config/amp/skills` | `~/.config/amp/agents` |
166
+ | Gemini CLI | `~/.config/gemini-cli/skills` | `~/.config/gemini-cli/agents` |
167
+ | GitHub Copilot | `~/.config/github-copilot/skills` | `~/.config/github-copilot/agents` |
168
+ | Kimi CLI | `~/.config/kimi-cli/skills` | `~/.config/kimi-cli/agents` |
128
169
 
129
170
  ## Repo Layout Convention
130
171
 
package/dist/index.js CHANGED
@@ -24,8 +24,8 @@ Expecting one of '${X.join("', '")}'`);if(this._lifeCycleHooks[q])this._lifeCycl
24
24
  `),this.outputHelp({error:!0});let X=Z||{},J=X.exitCode||1,$=X.code||"commander.error";this._exit(J,$,q)}_parseOptionsEnv(){this.options.forEach((q)=>{if(q.envVar&&q.envVar in b.env){let Z=q.attributeName();if(this.getOptionValue(Z)===void 0||["default","config","env"].includes(this.getOptionValueSource(Z)))if(q.required||q.optional)this.emit(`optionEnv:${q.name()}`,b.env[q.envVar]);else this.emit(`optionEnv:${q.name()}`)}})}_parseOptionsImplied(){let q=new o6(this.options),Z=(X)=>{return this.getOptionValue(X)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(X))};this.options.filter((X)=>X.implied!==void 0&&Z(X.attributeName())&&q.valueFromOption(this.getOptionValue(X.attributeName()),X)).forEach((X)=>{Object.keys(X.implied).filter((J)=>!Z(J)).forEach((J)=>{this.setOptionValueWithSource(J,X.implied[J],"implied")})})}missingArgument(q){let Z=`error: missing required argument '${q}'`;this.error(Z,{code:"commander.missingArgument"})}optionMissingArgument(q){let Z=`error: option '${q.flags}' argument missing`;this.error(Z,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(q){let Z=`error: required option '${q.flags}' not specified`;this.error(Z,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(q,Z){let X=(Q)=>{let z=Q.attributeName(),H=this.getOptionValue(z),U=this.options.find((Y)=>Y.negate&&z===Y.attributeName()),G=this.options.find((Y)=>!Y.negate&&z===Y.attributeName());if(U&&(U.presetArg===void 0&&H===!1||U.presetArg!==void 0&&H===U.presetArg))return U;return G||Q},J=(Q)=>{let z=X(Q),H=z.attributeName();if(this.getOptionValueSource(H)==="env")return`environment variable '${z.envVar}'`;return`option '${z.flags}'`},$=`error: ${J(q)} cannot be used with ${J(Z)}`;this.error($,{code:"commander.conflictingOption"})}unknownOption(q){if(this._allowUnknownOption)return;let Z="";if(q.startsWith("--")&&this._showSuggestionAfterError){let J=[],$=this;do{let Q=$.createHelp().visibleOptions($).filter((z)=>z.long).map((z)=>z.long);J=J.concat(Q),$=$.parent}while($&&!$._enablePositionalOptions);Z=s4(q,J)}let X=`error: unknown option '${q}'${Z}`;this.error(X,{code:"commander.unknownOption"})}_excessArguments(q){if(this._allowExcessArguments)return;let Z=this.registeredArguments.length,X=Z===1?"":"s",$=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${Z} argument${X} but got ${q.length}.`;this.error($,{code:"commander.excessArguments"})}unknownCommand(){let q=this.args[0],Z="";if(this._showSuggestionAfterError){let J=[];this.createHelp().visibleCommands(this).forEach(($)=>{if(J.push($.name()),$.alias())J.push($.alias())}),Z=s4(q,J)}let X=`error: unknown command '${q}'${Z}`;this.error(X,{code:"commander.unknownCommand"})}version(q,Z,X){if(q===void 0)return this._version;this._version=q,Z=Z||"-V, --version",X=X||"output the version number";let J=this.createOption(Z,X);return this._versionOptionName=J.attributeName(),this._registerOption(J),this.on("option:"+J.name(),()=>{this._outputConfiguration.writeOut(`${q}
25
25
  `),this._exit(0,"commander.version",q)}),this}description(q,Z){if(q===void 0&&Z===void 0)return this._description;if(this._description=q,Z)this._argsDescription=Z;return this}summary(q){if(q===void 0)return this._summary;return this._summary=q,this}alias(q){if(q===void 0)return this._aliases[0];let Z=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler)Z=this.commands[this.commands.length-1];if(q===Z._name)throw Error("Command alias can't be the same as its name");let X=this.parent?._findCommand(q);if(X){let J=[X.name()].concat(X.aliases()).join("|");throw Error(`cannot add alias '${q}' to command '${this.name()}' as already have command '${J}'`)}return Z._aliases.push(q),this}aliases(q){if(q===void 0)return this._aliases;return q.forEach((Z)=>this.alias(Z)),this}usage(q){if(q===void 0){if(this._usage)return this._usage;let Z=this.registeredArguments.map((X)=>{return s6(X)});return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?Z:[]).join(" ")}return this._usage=q,this}name(q){if(q===void 0)return this._name;return this._name=q,this}helpGroup(q){if(q===void 0)return this._helpGroupHeading??"";return this._helpGroupHeading=q,this}commandsGroup(q){if(q===void 0)return this._defaultCommandGroup??"";return this._defaultCommandGroup=q,this}optionsGroup(q){if(q===void 0)return this._defaultOptionGroup??"";return this._defaultOptionGroup=q,this}_initOptionGroup(q){if(this._defaultOptionGroup&&!q.helpGroupHeading)q.helpGroup(this._defaultOptionGroup)}_initCommandGroup(q){if(this._defaultCommandGroup&&!q.helpGroup())q.helpGroup(this._defaultCommandGroup)}nameFromFilename(q){return this._name=n.basename(q,n.extname(q)),this}executableDir(q){if(q===void 0)return this._executableDir;return this._executableDir=q,this}helpInformation(q){let Z=this.createHelp(),X=this._getOutputContext(q);Z.prepareContext({error:X.error,helpWidth:X.helpWidth,outputHasColors:X.hasColors});let J=Z.formatHelp(this,Z);if(X.hasColors)return J;return this._outputConfiguration.stripColor(J)}_getOutputContext(q){q=q||{};let Z=!!q.error,X,J,$;if(Z)X=(z)=>this._outputConfiguration.writeErr(z),J=this._outputConfiguration.getErrHasColors(),$=this._outputConfiguration.getErrHelpWidth();else X=(z)=>this._outputConfiguration.writeOut(z),J=this._outputConfiguration.getOutHasColors(),$=this._outputConfiguration.getOutHelpWidth();return{error:Z,write:(z)=>{if(!J)z=this._outputConfiguration.stripColor(z);return X(z)},hasColors:J,helpWidth:$}}outputHelp(q){let Z;if(typeof q==="function")Z=q,q=void 0;let X=this._getOutputContext(q),J={error:X.error,write:X.write,command:this};this._getCommandAndAncestors().reverse().forEach((Q)=>Q.emit("beforeAllHelp",J)),this.emit("beforeHelp",J);let $=this.helpInformation({error:X.error});if(Z){if($=Z($),typeof $!=="string"&&!Buffer.isBuffer($))throw Error("outputHelp callback must return a string or a Buffer")}if(X.write($),this._getHelpOption()?.long)this.emit(this._getHelpOption().long);this.emit("afterHelp",J),this._getCommandAndAncestors().forEach((Q)=>Q.emit("afterAllHelp",J))}helpOption(q,Z){if(typeof q==="boolean"){if(q){if(this._helpOption===null)this._helpOption=void 0;if(this._defaultOptionGroup)this._initOptionGroup(this._getHelpOption())}else this._helpOption=null;return this}if(this._helpOption=this.createOption(q??"-h, --help",Z??"display help for command"),q||Z)this._initOptionGroup(this._helpOption);return this}_getHelpOption(){if(this._helpOption===void 0)this.helpOption(void 0,void 0);return this._helpOption}addHelpOption(q){return this._helpOption=q,this._initOptionGroup(q),this}help(q){this.outputHelp(q);let Z=Number(b.exitCode??0);if(Z===0&&q&&typeof q!=="function"&&q.error)Z=1;this._exit(Z,"commander.help","(outputHelp)")}addHelpText(q,Z){let X=["beforeAll","before","after","afterAll"];if(!X.includes(q))throw Error(`Unexpected value for position to addHelpText.
26
26
  Expecting one of '${X.join("', '")}'`);let J=`${q}Help`;return this.on(J,($)=>{let Q;if(typeof Z==="function")Q=Z({error:$.error,command:$.command});else Q=Z;if(Q)$.write(`${Q}
27
- `)}),this}_outputHelpIfRequested(q){let Z=this._getHelpOption();if(Z&&q.find((J)=>Z.is(J)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function r4(q){return q.map((Z)=>{if(!Z.startsWith("--inspect"))return Z;let X,J="127.0.0.1",$="9229",Q;if((Q=Z.match(/^(--inspect(-brk)?)$/))!==null)X=Q[1];else if((Q=Z.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(X=Q[1],/^\d+$/.test(Q[3]))$=Q[3];else J=Q[3];else if((Q=Z.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)X=Q[1],J=Q[3],$=Q[4];if(X&&$!=="0")return`${X}=${J}:${parseInt($)+1}`;return Z})}function pq(){if(b.env.NO_COLOR||b.env.FORCE_COLOR==="0"||b.env.FORCE_COLOR==="false")return!1;if(b.env.FORCE_COLOR||b.env.CLICOLOR_FORCE!==void 0)return!0;return}t6.Command=cq;t6.useColor=pq});var q2=D((J7)=>{var{Argument:o4}=F0(),{Command:iq}=n4(),{CommanderError:Z7,InvalidArgumentError:t4}=u1(),{Help:X7}=uq(),{Option:e4}=mq();J7.program=new iq;J7.createCommand=(q)=>new iq(q);J7.createOption=(q,Z)=>new e4(q,Z);J7.createArgument=(q,Z)=>new o4(q,Z);J7.Command=iq;J7.Option=e4;J7.Argument=o4;J7.Help=X7;J7.CommanderError=Z7;J7.InvalidArgumentError=t4;J7.InvalidOptionArgumentError=t4});var S=D((x7)=>{var rq=Symbol.for("yaml.alias"),G2=Symbol.for("yaml.document"),w0=Symbol.for("yaml.map"),Y2=Symbol.for("yaml.pair"),nq=Symbol.for("yaml.scalar"),b0=Symbol.for("yaml.seq"),t=Symbol.for("yaml.node.type"),w7=(q)=>!!q&&typeof q==="object"&&q[t]===rq,b7=(q)=>!!q&&typeof q==="object"&&q[t]===G2,j7=(q)=>!!q&&typeof q==="object"&&q[t]===w0,E7=(q)=>!!q&&typeof q==="object"&&q[t]===Y2,B2=(q)=>!!q&&typeof q==="object"&&q[t]===nq,C7=(q)=>!!q&&typeof q==="object"&&q[t]===b0;function T2(q){if(q&&typeof q==="object")switch(q[t]){case w0:case b0:return!0}return!1}function f7(q){if(q&&typeof q==="object")switch(q[t]){case rq:case w0:case nq:case b0:return!0}return!1}var y7=(q)=>(B2(q)||T2(q))&&!!q.anchor;x7.ALIAS=rq;x7.DOC=G2;x7.MAP=w0;x7.NODE_TYPE=t;x7.PAIR=Y2;x7.SCALAR=nq;x7.SEQ=b0;x7.hasAnchor=y7;x7.isAlias=w7;x7.isCollection=T2;x7.isDocument=b7;x7.isMap=j7;x7.isNode=f7;x7.isPair=E7;x7.isScalar=B2;x7.isSeq=C7});var m1=D((t7)=>{var k=S(),v=Symbol("break visit"),_2=Symbol("skip children"),a=Symbol("remove node");function j0(q,Z){let X=L2(Z);if(k.isDocument(q)){if(S1(null,q.contents,X,Object.freeze([q]))===a)q.contents=null}else S1(null,q,X,Object.freeze([]))}j0.BREAK=v;j0.SKIP=_2;j0.REMOVE=a;function S1(q,Z,X,J){let $=W2(q,Z,X,J);if(k.isNode($)||k.isPair($))return R2(q,J,$),S1(q,$,X,J);if(typeof $!=="symbol"){if(k.isCollection(Z)){J=Object.freeze(J.concat(Z));for(let Q=0;Q<Z.items.length;++Q){let z=S1(Q,Z.items[Q],X,J);if(typeof z==="number")Q=z-1;else if(z===v)return v;else if(z===a)Z.items.splice(Q,1),Q-=1}}else if(k.isPair(Z)){J=Object.freeze(J.concat(Z));let Q=S1("key",Z.key,X,J);if(Q===v)return v;else if(Q===a)Z.key=null;let z=S1("value",Z.value,X,J);if(z===v)return v;else if(z===a)Z.value=null}}return $}async function E0(q,Z){let X=L2(Z);if(k.isDocument(q)){if(await w1(null,q.contents,X,Object.freeze([q]))===a)q.contents=null}else await w1(null,q,X,Object.freeze([]))}E0.BREAK=v;E0.SKIP=_2;E0.REMOVE=a;async function w1(q,Z,X,J){let $=await W2(q,Z,X,J);if(k.isNode($)||k.isPair($))return R2(q,J,$),w1(q,$,X,J);if(typeof $!=="symbol"){if(k.isCollection(Z)){J=Object.freeze(J.concat(Z));for(let Q=0;Q<Z.items.length;++Q){let z=await w1(Q,Z.items[Q],X,J);if(typeof z==="number")Q=z-1;else if(z===v)return v;else if(z===a)Z.items.splice(Q,1),Q-=1}}else if(k.isPair(Z)){J=Object.freeze(J.concat(Z));let Q=await w1("key",Z.key,X,J);if(Q===v)return v;else if(Q===a)Z.key=null;let z=await w1("value",Z.value,X,J);if(z===v)return v;else if(z===a)Z.value=null}}return $}function L2(q){if(typeof q==="object"&&(q.Collection||q.Node||q.Value))return Object.assign({Alias:q.Node,Map:q.Node,Scalar:q.Node,Seq:q.Node},q.Value&&{Map:q.Value,Scalar:q.Value,Seq:q.Value},q.Collection&&{Map:q.Collection,Seq:q.Collection},q);return q}function W2(q,Z,X,J){if(typeof X==="function")return X(q,Z,J);if(k.isMap(Z))return X.Map?.(q,Z,J);if(k.isSeq(Z))return X.Seq?.(q,Z,J);if(k.isPair(Z))return X.Pair?.(q,Z,J);if(k.isScalar(Z))return X.Scalar?.(q,Z,J);if(k.isAlias(Z))return X.Alias?.(q,Z,J);return}function R2(q,Z,X){let J=Z[Z.length-1];if(k.isCollection(J))J.items[q]=X;else if(k.isPair(J))if(q==="key")J.key=X;else J.value=X;else if(k.isDocument(J))J.contents=X;else{let $=k.isAlias(J)?"alias":"scalar";throw Error(`Cannot replace node with ${$} parent`)}}t7.visit=j0;t7.visitAsync=E0});var oq=D(($8)=>{var V2=S(),Z8=m1(),X8={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},J8=(q)=>q.replace(/[!,[\]{}]/g,(Z)=>X8[Z]);class h{constructor(q,Z){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},h.defaultYaml,q),this.tags=Object.assign({},h.defaultTags,Z)}clone(){let q=new h(this.yaml,this.tags);return q.docStart=this.docStart,q}atDocument(){let q=new h(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:h.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},h.defaultTags);break}return q}add(q,Z){if(this.atNextDocument)this.yaml={explicit:h.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},h.defaultTags),this.atNextDocument=!1;let X=q.trim().split(/[ \t]+/),J=X.shift();switch(J){case"%TAG":{if(X.length!==2){if(Z(0,"%TAG directive should contain exactly two parts"),X.length<2)return!1}let[$,Q]=X;return this.tags[$]=Q,!0}case"%YAML":{if(this.yaml.explicit=!0,X.length!==1)return Z(0,"%YAML directive should contain exactly one part"),!1;let[$]=X;if($==="1.1"||$==="1.2")return this.yaml.version=$,!0;else{let Q=/^\d+\.\d+$/.test($);return Z(6,`Unsupported YAML version ${$}`,Q),!1}}default:return Z(0,`Unknown directive ${J}`,!0),!1}}tagName(q,Z){if(q==="!")return"!";if(q[0]!=="!")return Z(`Not a valid tag: ${q}`),null;if(q[1]==="<"){let Q=q.slice(2,-1);if(Q==="!"||Q==="!!")return Z(`Verbatim tags aren't resolved, so ${q} is invalid.`),null;if(q[q.length-1]!==">")Z("Verbatim tags must end with a >");return Q}let[,X,J]=q.match(/^(.*!)([^!]*)$/s);if(!J)Z(`The ${q} tag has no suffix`);let $=this.tags[X];if($)try{return $+decodeURIComponent(J)}catch(Q){return Z(String(Q)),null}if(X==="!")return q;return Z(`Could not resolve tag: ${q}`),null}tagString(q){for(let[Z,X]of Object.entries(this.tags))if(q.startsWith(X))return Z+J8(q.substring(X.length));return q[0]==="!"?q:`!<${q}>`}toString(q){let Z=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],X=Object.entries(this.tags),J;if(q&&X.length>0&&V2.isNode(q.contents)){let $={};Z8.visit(q.contents,(Q,z)=>{if(V2.isNode(z)&&z.tag)$[z.tag]=!0}),J=Object.keys($)}else J=[];for(let[$,Q]of X){if($==="!!"&&Q==="tag:yaml.org,2002:")continue;if(!q||J.some((z)=>z.startsWith(Q)))Z.push(`%TAG ${$} ${Q}`)}return Z.join(`
28
- `)}}h.defaultYaml={explicit:!1,version:"1.2"};h.defaultTags={"!!":"tag:yaml.org,2002:"};$8.Directives=h});var C0=D((G8)=>{var I2=S(),z8=m1();function H8(q){if(/[\x00-\x19\s,[\]{}]/.test(q)){let X=`Anchor must not contain whitespace or control characters: ${JSON.stringify(q)}`;throw Error(X)}return!0}function M2(q){let Z=new Set;return z8.visit(q,{Value(X,J){if(J.anchor)Z.add(J.anchor)}}),Z}function K2(q,Z){for(let X=1;;++X){let J=`${q}${X}`;if(!Z.has(J))return J}}function U8(q,Z){let X=[],J=new Map,$=null;return{onAnchor:(Q)=>{X.push(Q),$??($=M2(q));let z=K2(Z,$);return $.add(z),z},setAnchors:()=>{for(let Q of X){let z=J.get(Q);if(typeof z==="object"&&z.anchor&&(I2.isScalar(z.node)||I2.isCollection(z.node)))z.node.anchor=z.anchor;else{let H=Error("Failed to resolve repeated object (this should not happen)");throw H.source=Q,H}}},sourceObjects:J}}G8.anchorIsValid=H8;G8.anchorNames=M2;G8.createNodeAnchors=U8;G8.findNewAnchor=K2});var tq=D((L8)=>{function d1(q,Z,X,J){if(J&&typeof J==="object")if(Array.isArray(J))for(let $=0,Q=J.length;$<Q;++$){let z=J[$],H=d1(q,J,String($),z);if(H===void 0)delete J[$];else if(H!==z)J[$]=H}else if(J instanceof Map)for(let $ of Array.from(J.keys())){let Q=J.get($),z=d1(q,J,$,Q);if(z===void 0)J.delete($);else if(z!==Q)J.set($,z)}else if(J instanceof Set)for(let $ of Array.from(J)){let Q=d1(q,J,$,$);if(Q===void 0)J.delete($);else if(Q!==$)J.delete($),J.add(Q)}else for(let[$,Q]of Object.entries(J)){let z=d1(q,J,$,Q);if(z===void 0)delete J[$];else if(z!==Q)J[$]=z}return q.call(Z,X,J)}L8.applyReviver=d1});var Z1=D((V8)=>{var R8=S();function P2(q,Z,X){if(Array.isArray(q))return q.map((J,$)=>P2(J,String($),X));if(q&&typeof q.toJSON==="function"){if(!X||!R8.hasAnchor(q))return q.toJSON(Z,X);let J={aliasCount:0,count:1,res:void 0};X.anchors.set(q,J),X.onCreate=(Q)=>{J.res=Q,delete X.onCreate};let $=q.toJSON(Z,X);if(X.onCreate)X.onCreate($);return $}if(typeof q==="bigint"&&!X?.keep)return Number(q);return q}V8.toJS=P2});var f0=D((P8)=>{var M8=tq(),D2=S(),K8=Z1();class F2{constructor(q){Object.defineProperty(this,D2.NODE_TYPE,{value:q})}clone(){let q=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)q.range=this.range.slice();return q}toJS(q,{mapAsMap:Z,maxAliasCount:X,onAnchor:J,reviver:$}={}){if(!D2.isDocument(q))throw TypeError("A document argument is required");let Q={anchors:new Map,doc:q,keep:!0,mapAsMap:Z===!0,mapKeyWarned:!1,maxAliasCount:typeof X==="number"?X:100},z=K8.toJS(this,"",Q);if(typeof J==="function")for(let{count:H,res:U}of Q.anchors.values())J(U,H);return typeof $==="function"?M8.applyReviver($,{"":z},"",z):z}}P8.NodeBase=F2});var l1=D((S8)=>{var F8=C0(),O8=m1(),b1=S(),N8=f0(),A8=Z1();class O2 extends N8.NodeBase{constructor(q){super(b1.ALIAS);this.source=q,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve(q,Z){let X;if(Z?.aliasResolveCache)X=Z.aliasResolveCache;else if(X=[],O8.visit(q,{Node:($,Q)=>{if(b1.isAlias(Q)||b1.hasAnchor(Q))X.push(Q)}}),Z)Z.aliasResolveCache=X;let J=void 0;for(let $ of X){if($===this)break;if($.anchor===this.source)J=$}return J}toJSON(q,Z){if(!Z)return{source:this.source};let{anchors:X,doc:J,maxAliasCount:$}=Z,Q=this.resolve(J,Z);if(!Q){let H=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(H)}let z=X.get(Q);if(!z)A8.toJS(Q,null,Z),z=X.get(Q);if(z?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if($>=0){if(z.count+=1,z.aliasCount===0)z.aliasCount=y0(J,Q,X);if(z.count*z.aliasCount>$)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return z.res}toString(q,Z,X){let J=`*${this.source}`;if(q){if(F8.anchorIsValid(this.source),q.options.verifyAliasOrder&&!q.anchors.has(this.source)){let $=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error($)}if(q.implicitKey)return`${J} `}return J}}function y0(q,Z,X){if(b1.isAlias(Z)){let J=Z.resolve(q),$=X&&J&&X.get(J);return $?$.count*$.aliasCount:0}else if(b1.isCollection(Z)){let J=0;for(let $ of Z.items){let Q=y0(q,$,X);if(Q>J)J=Q}return J}else if(b1.isPair(Z)){let J=y0(q,Z.key,X),$=y0(q,Z.value,X);return Math.max(J,$)}return 1}S8.Alias=O2});var C=D((f8)=>{var b8=S(),j8=f0(),E8=Z1(),C8=(q)=>!q||typeof q!=="function"&&typeof q!=="object";class R1 extends j8.NodeBase{constructor(q){super(b8.SCALAR);this.value=q}toJSON(q,Z){return Z?.keep?this.value:E8.toJS(this.value,q,Z)}toString(){return String(this.value)}}R1.BLOCK_FOLDED="BLOCK_FOLDED";R1.BLOCK_LITERAL="BLOCK_LITERAL";R1.PLAIN="PLAIN";R1.QUOTE_DOUBLE="QUOTE_DOUBLE";R1.QUOTE_SINGLE="QUOTE_SINGLE";f8.Scalar=R1;f8.isScalarValue=C8});var p1=D((u8)=>{var k8=l1(),V1=S(),N2=C(),v8="tag:yaml.org,2002:";function g8(q,Z,X){if(Z){let J=X.filter((Q)=>Q.tag===Z),$=J.find((Q)=>!Q.format)??J[0];if(!$)throw Error(`Tag ${Z} not found`);return $}return X.find((J)=>J.identify?.(q)&&!J.format)}function h8(q,Z,X){if(V1.isDocument(q))q=q.contents;if(V1.isNode(q))return q;if(V1.isPair(q)){let B=X.schema[V1.MAP].createNode?.(X.schema,null,X);return B.items.push(q),B}if(q instanceof String||q instanceof Number||q instanceof Boolean||typeof BigInt<"u"&&q instanceof BigInt)q=q.valueOf();let{aliasDuplicateObjects:J,onAnchor:$,onTagObj:Q,schema:z,sourceObjects:H}=X,U=void 0;if(J&&q&&typeof q==="object")if(U=H.get(q),U)return U.anchor??(U.anchor=$(q)),new k8.Alias(U.anchor);else U={anchor:null,node:null},H.set(q,U);if(Z?.startsWith("!!"))Z=v8+Z.slice(2);let G=g8(q,Z,z.tags);if(!G){if(q&&typeof q.toJSON==="function")q=q.toJSON();if(!q||typeof q!=="object"){let B=new N2.Scalar(q);if(U)U.node=B;return B}G=q instanceof Map?z[V1.MAP]:(Symbol.iterator in Object(q))?z[V1.SEQ]:z[V1.MAP]}if(Q)Q(G),delete X.onTagObj;let Y=G?.createNode?G.createNode(X.schema,q,X):typeof G?.nodeClass?.from==="function"?G.nodeClass.from(X.schema,q,X):new N2.Scalar(q);if(Z)Y.tag=Z;else if(!G.default)Y.tag=G.tag;if(U)U.node=Y;return Y}u8.createNode=h8});var x0=D((p8)=>{var d8=p1(),s=S(),l8=f0();function eq(q,Z,X){let J=X;for(let $=Z.length-1;$>=0;--$){let Q=Z[$];if(typeof Q==="number"&&Number.isInteger(Q)&&Q>=0){let z=[];z[Q]=J,J=z}else J=new Map([[Q,J]])}return d8.createNode(J,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:q,sourceObjects:new Map})}var A2=(q)=>q==null||typeof q==="object"&&!!q[Symbol.iterator]().next().done;class S2 extends l8.NodeBase{constructor(q,Z){super(q);Object.defineProperty(this,"schema",{value:Z,configurable:!0,enumerable:!1,writable:!0})}clone(q){let Z=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(q)Z.schema=q;if(Z.items=Z.items.map((X)=>s.isNode(X)||s.isPair(X)?X.clone(q):X),this.range)Z.range=this.range.slice();return Z}addIn(q,Z){if(A2(q))this.add(Z);else{let[X,...J]=q,$=this.get(X,!0);if(s.isCollection($))$.addIn(J,Z);else if($===void 0&&this.schema)this.set(X,eq(this.schema,J,Z));else throw Error(`Expected YAML collection at ${X}. Remaining path: ${J}`)}}deleteIn(q){let[Z,...X]=q;if(X.length===0)return this.delete(Z);let J=this.get(Z,!0);if(s.isCollection(J))return J.deleteIn(X);else throw Error(`Expected YAML collection at ${Z}. Remaining path: ${X}`)}getIn(q,Z){let[X,...J]=q,$=this.get(X,!0);if(J.length===0)return!Z&&s.isScalar($)?$.value:$;else return s.isCollection($)?$.getIn(J,Z):void 0}hasAllNullValues(q){return this.items.every((Z)=>{if(!s.isPair(Z))return!1;let X=Z.value;return X==null||q&&s.isScalar(X)&&X.value==null&&!X.commentBefore&&!X.comment&&!X.tag})}hasIn(q){let[Z,...X]=q;if(X.length===0)return this.has(Z);let J=this.get(Z,!0);return s.isCollection(J)?J.hasIn(X):!1}setIn(q,Z){let[X,...J]=q;if(J.length===0)this.set(X,Z);else{let $=this.get(X,!0);if(s.isCollection($))$.setIn(J,Z);else if($===void 0&&this.schema)this.set(X,eq(this.schema,J,Z));else throw Error(`Expected YAML collection at ${X}. Remaining path: ${J}`)}}}p8.Collection=S2;p8.collectionFromPath=eq;p8.isEmptyPath=A2});var c1=D((n8)=>{var s8=(q)=>q.replace(/^(?!$)(?: $)?/gm,"#");function q9(q,Z){if(/^\n+$/.test(q))return q.substring(1);return Z?q.replace(/^(?! *$)/gm,Z):q}var r8=(q,Z,X)=>q.endsWith(`
27
+ `)}),this}_outputHelpIfRequested(q){let Z=this._getHelpOption();if(Z&&q.find((J)=>Z.is(J)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function r4(q){return q.map((Z)=>{if(!Z.startsWith("--inspect"))return Z;let X,J="127.0.0.1",$="9229",Q;if((Q=Z.match(/^(--inspect(-brk)?)$/))!==null)X=Q[1];else if((Q=Z.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(X=Q[1],/^\d+$/.test(Q[3]))$=Q[3];else J=Q[3];else if((Q=Z.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)X=Q[1],J=Q[3],$=Q[4];if(X&&$!=="0")return`${X}=${J}:${parseInt($)+1}`;return Z})}function pq(){if(b.env.NO_COLOR||b.env.FORCE_COLOR==="0"||b.env.FORCE_COLOR==="false")return!1;if(b.env.FORCE_COLOR||b.env.CLICOLOR_FORCE!==void 0)return!0;return}t6.Command=cq;t6.useColor=pq});var q2=D((J7)=>{var{Argument:o4}=F0(),{Command:iq}=n4(),{CommanderError:Z7,InvalidArgumentError:t4}=u1(),{Help:X7}=uq(),{Option:e4}=mq();J7.program=new iq;J7.createCommand=(q)=>new iq(q);J7.createOption=(q,Z)=>new e4(q,Z);J7.createArgument=(q,Z)=>new o4(q,Z);J7.Command=iq;J7.Option=e4;J7.Argument=o4;J7.Help=X7;J7.CommanderError=Z7;J7.InvalidArgumentError=t4;J7.InvalidOptionArgumentError=t4});var S=D((x7)=>{var rq=Symbol.for("yaml.alias"),G2=Symbol.for("yaml.document"),w0=Symbol.for("yaml.map"),Y2=Symbol.for("yaml.pair"),nq=Symbol.for("yaml.scalar"),b0=Symbol.for("yaml.seq"),t=Symbol.for("yaml.node.type"),w7=(q)=>!!q&&typeof q==="object"&&q[t]===rq,b7=(q)=>!!q&&typeof q==="object"&&q[t]===G2,j7=(q)=>!!q&&typeof q==="object"&&q[t]===w0,E7=(q)=>!!q&&typeof q==="object"&&q[t]===Y2,B2=(q)=>!!q&&typeof q==="object"&&q[t]===nq,C7=(q)=>!!q&&typeof q==="object"&&q[t]===b0;function T2(q){if(q&&typeof q==="object")switch(q[t]){case w0:case b0:return!0}return!1}function f7(q){if(q&&typeof q==="object")switch(q[t]){case rq:case w0:case nq:case b0:return!0}return!1}var y7=(q)=>(B2(q)||T2(q))&&!!q.anchor;x7.ALIAS=rq;x7.DOC=G2;x7.MAP=w0;x7.NODE_TYPE=t;x7.PAIR=Y2;x7.SCALAR=nq;x7.SEQ=b0;x7.hasAnchor=y7;x7.isAlias=w7;x7.isCollection=T2;x7.isDocument=b7;x7.isMap=j7;x7.isNode=f7;x7.isPair=E7;x7.isScalar=B2;x7.isSeq=C7});var m1=D((t7)=>{var k=S(),v=Symbol("break visit"),_2=Symbol("skip children"),a=Symbol("remove node");function j0(q,Z){let X=L2(Z);if(k.isDocument(q)){if(A1(null,q.contents,X,Object.freeze([q]))===a)q.contents=null}else A1(null,q,X,Object.freeze([]))}j0.BREAK=v;j0.SKIP=_2;j0.REMOVE=a;function A1(q,Z,X,J){let $=W2(q,Z,X,J);if(k.isNode($)||k.isPair($))return R2(q,J,$),A1(q,$,X,J);if(typeof $!=="symbol"){if(k.isCollection(Z)){J=Object.freeze(J.concat(Z));for(let Q=0;Q<Z.items.length;++Q){let z=A1(Q,Z.items[Q],X,J);if(typeof z==="number")Q=z-1;else if(z===v)return v;else if(z===a)Z.items.splice(Q,1),Q-=1}}else if(k.isPair(Z)){J=Object.freeze(J.concat(Z));let Q=A1("key",Z.key,X,J);if(Q===v)return v;else if(Q===a)Z.key=null;let z=A1("value",Z.value,X,J);if(z===v)return v;else if(z===a)Z.value=null}}return $}async function E0(q,Z){let X=L2(Z);if(k.isDocument(q)){if(await S1(null,q.contents,X,Object.freeze([q]))===a)q.contents=null}else await S1(null,q,X,Object.freeze([]))}E0.BREAK=v;E0.SKIP=_2;E0.REMOVE=a;async function S1(q,Z,X,J){let $=await W2(q,Z,X,J);if(k.isNode($)||k.isPair($))return R2(q,J,$),S1(q,$,X,J);if(typeof $!=="symbol"){if(k.isCollection(Z)){J=Object.freeze(J.concat(Z));for(let Q=0;Q<Z.items.length;++Q){let z=await S1(Q,Z.items[Q],X,J);if(typeof z==="number")Q=z-1;else if(z===v)return v;else if(z===a)Z.items.splice(Q,1),Q-=1}}else if(k.isPair(Z)){J=Object.freeze(J.concat(Z));let Q=await S1("key",Z.key,X,J);if(Q===v)return v;else if(Q===a)Z.key=null;let z=await S1("value",Z.value,X,J);if(z===v)return v;else if(z===a)Z.value=null}}return $}function L2(q){if(typeof q==="object"&&(q.Collection||q.Node||q.Value))return Object.assign({Alias:q.Node,Map:q.Node,Scalar:q.Node,Seq:q.Node},q.Value&&{Map:q.Value,Scalar:q.Value,Seq:q.Value},q.Collection&&{Map:q.Collection,Seq:q.Collection},q);return q}function W2(q,Z,X,J){if(typeof X==="function")return X(q,Z,J);if(k.isMap(Z))return X.Map?.(q,Z,J);if(k.isSeq(Z))return X.Seq?.(q,Z,J);if(k.isPair(Z))return X.Pair?.(q,Z,J);if(k.isScalar(Z))return X.Scalar?.(q,Z,J);if(k.isAlias(Z))return X.Alias?.(q,Z,J);return}function R2(q,Z,X){let J=Z[Z.length-1];if(k.isCollection(J))J.items[q]=X;else if(k.isPair(J))if(q==="key")J.key=X;else J.value=X;else if(k.isDocument(J))J.contents=X;else{let $=k.isAlias(J)?"alias":"scalar";throw Error(`Cannot replace node with ${$} parent`)}}t7.visit=j0;t7.visitAsync=E0});var oq=D(($8)=>{var V2=S(),Z8=m1(),X8={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},J8=(q)=>q.replace(/[!,[\]{}]/g,(Z)=>X8[Z]);class h{constructor(q,Z){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},h.defaultYaml,q),this.tags=Object.assign({},h.defaultTags,Z)}clone(){let q=new h(this.yaml,this.tags);return q.docStart=this.docStart,q}atDocument(){let q=new h(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:h.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},h.defaultTags);break}return q}add(q,Z){if(this.atNextDocument)this.yaml={explicit:h.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},h.defaultTags),this.atNextDocument=!1;let X=q.trim().split(/[ \t]+/),J=X.shift();switch(J){case"%TAG":{if(X.length!==2){if(Z(0,"%TAG directive should contain exactly two parts"),X.length<2)return!1}let[$,Q]=X;return this.tags[$]=Q,!0}case"%YAML":{if(this.yaml.explicit=!0,X.length!==1)return Z(0,"%YAML directive should contain exactly one part"),!1;let[$]=X;if($==="1.1"||$==="1.2")return this.yaml.version=$,!0;else{let Q=/^\d+\.\d+$/.test($);return Z(6,`Unsupported YAML version ${$}`,Q),!1}}default:return Z(0,`Unknown directive ${J}`,!0),!1}}tagName(q,Z){if(q==="!")return"!";if(q[0]!=="!")return Z(`Not a valid tag: ${q}`),null;if(q[1]==="<"){let Q=q.slice(2,-1);if(Q==="!"||Q==="!!")return Z(`Verbatim tags aren't resolved, so ${q} is invalid.`),null;if(q[q.length-1]!==">")Z("Verbatim tags must end with a >");return Q}let[,X,J]=q.match(/^(.*!)([^!]*)$/s);if(!J)Z(`The ${q} tag has no suffix`);let $=this.tags[X];if($)try{return $+decodeURIComponent(J)}catch(Q){return Z(String(Q)),null}if(X==="!")return q;return Z(`Could not resolve tag: ${q}`),null}tagString(q){for(let[Z,X]of Object.entries(this.tags))if(q.startsWith(X))return Z+J8(q.substring(X.length));return q[0]==="!"?q:`!<${q}>`}toString(q){let Z=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],X=Object.entries(this.tags),J;if(q&&X.length>0&&V2.isNode(q.contents)){let $={};Z8.visit(q.contents,(Q,z)=>{if(V2.isNode(z)&&z.tag)$[z.tag]=!0}),J=Object.keys($)}else J=[];for(let[$,Q]of X){if($==="!!"&&Q==="tag:yaml.org,2002:")continue;if(!q||J.some((z)=>z.startsWith(Q)))Z.push(`%TAG ${$} ${Q}`)}return Z.join(`
28
+ `)}}h.defaultYaml={explicit:!1,version:"1.2"};h.defaultTags={"!!":"tag:yaml.org,2002:"};$8.Directives=h});var C0=D((G8)=>{var I2=S(),z8=m1();function H8(q){if(/[\x00-\x19\s,[\]{}]/.test(q)){let X=`Anchor must not contain whitespace or control characters: ${JSON.stringify(q)}`;throw Error(X)}return!0}function M2(q){let Z=new Set;return z8.visit(q,{Value(X,J){if(J.anchor)Z.add(J.anchor)}}),Z}function K2(q,Z){for(let X=1;;++X){let J=`${q}${X}`;if(!Z.has(J))return J}}function U8(q,Z){let X=[],J=new Map,$=null;return{onAnchor:(Q)=>{X.push(Q),$??($=M2(q));let z=K2(Z,$);return $.add(z),z},setAnchors:()=>{for(let Q of X){let z=J.get(Q);if(typeof z==="object"&&z.anchor&&(I2.isScalar(z.node)||I2.isCollection(z.node)))z.node.anchor=z.anchor;else{let H=Error("Failed to resolve repeated object (this should not happen)");throw H.source=Q,H}}},sourceObjects:J}}G8.anchorIsValid=H8;G8.anchorNames=M2;G8.createNodeAnchors=U8;G8.findNewAnchor=K2});var tq=D((L8)=>{function d1(q,Z,X,J){if(J&&typeof J==="object")if(Array.isArray(J))for(let $=0,Q=J.length;$<Q;++$){let z=J[$],H=d1(q,J,String($),z);if(H===void 0)delete J[$];else if(H!==z)J[$]=H}else if(J instanceof Map)for(let $ of Array.from(J.keys())){let Q=J.get($),z=d1(q,J,$,Q);if(z===void 0)J.delete($);else if(z!==Q)J.set($,z)}else if(J instanceof Set)for(let $ of Array.from(J)){let Q=d1(q,J,$,$);if(Q===void 0)J.delete($);else if(Q!==$)J.delete($),J.add(Q)}else for(let[$,Q]of Object.entries(J)){let z=d1(q,J,$,Q);if(z===void 0)delete J[$];else if(z!==Q)J[$]=z}return q.call(Z,X,J)}L8.applyReviver=d1});var Z1=D((V8)=>{var R8=S();function P2(q,Z,X){if(Array.isArray(q))return q.map((J,$)=>P2(J,String($),X));if(q&&typeof q.toJSON==="function"){if(!X||!R8.hasAnchor(q))return q.toJSON(Z,X);let J={aliasCount:0,count:1,res:void 0};X.anchors.set(q,J),X.onCreate=(Q)=>{J.res=Q,delete X.onCreate};let $=q.toJSON(Z,X);if(X.onCreate)X.onCreate($);return $}if(typeof q==="bigint"&&!X?.keep)return Number(q);return q}V8.toJS=P2});var f0=D((P8)=>{var M8=tq(),D2=S(),K8=Z1();class F2{constructor(q){Object.defineProperty(this,D2.NODE_TYPE,{value:q})}clone(){let q=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)q.range=this.range.slice();return q}toJS(q,{mapAsMap:Z,maxAliasCount:X,onAnchor:J,reviver:$}={}){if(!D2.isDocument(q))throw TypeError("A document argument is required");let Q={anchors:new Map,doc:q,keep:!0,mapAsMap:Z===!0,mapKeyWarned:!1,maxAliasCount:typeof X==="number"?X:100},z=K8.toJS(this,"",Q);if(typeof J==="function")for(let{count:H,res:U}of Q.anchors.values())J(U,H);return typeof $==="function"?M8.applyReviver($,{"":z},"",z):z}}P8.NodeBase=F2});var l1=D((S8)=>{var F8=C0(),O8=m1(),w1=S(),N8=f0(),A8=Z1();class O2 extends N8.NodeBase{constructor(q){super(w1.ALIAS);this.source=q,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve(q,Z){let X;if(Z?.aliasResolveCache)X=Z.aliasResolveCache;else if(X=[],O8.visit(q,{Node:($,Q)=>{if(w1.isAlias(Q)||w1.hasAnchor(Q))X.push(Q)}}),Z)Z.aliasResolveCache=X;let J=void 0;for(let $ of X){if($===this)break;if($.anchor===this.source)J=$}return J}toJSON(q,Z){if(!Z)return{source:this.source};let{anchors:X,doc:J,maxAliasCount:$}=Z,Q=this.resolve(J,Z);if(!Q){let H=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(H)}let z=X.get(Q);if(!z)A8.toJS(Q,null,Z),z=X.get(Q);if(z?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if($>=0){if(z.count+=1,z.aliasCount===0)z.aliasCount=y0(J,Q,X);if(z.count*z.aliasCount>$)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return z.res}toString(q,Z,X){let J=`*${this.source}`;if(q){if(F8.anchorIsValid(this.source),q.options.verifyAliasOrder&&!q.anchors.has(this.source)){let $=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error($)}if(q.implicitKey)return`${J} `}return J}}function y0(q,Z,X){if(w1.isAlias(Z)){let J=Z.resolve(q),$=X&&J&&X.get(J);return $?$.count*$.aliasCount:0}else if(w1.isCollection(Z)){let J=0;for(let $ of Z.items){let Q=y0(q,$,X);if(Q>J)J=Q}return J}else if(w1.isPair(Z)){let J=y0(q,Z.key,X),$=y0(q,Z.value,X);return Math.max(J,$)}return 1}S8.Alias=O2});var C=D((f8)=>{var b8=S(),j8=f0(),E8=Z1(),C8=(q)=>!q||typeof q!=="function"&&typeof q!=="object";class R1 extends j8.NodeBase{constructor(q){super(b8.SCALAR);this.value=q}toJSON(q,Z){return Z?.keep?this.value:E8.toJS(this.value,q,Z)}toString(){return String(this.value)}}R1.BLOCK_FOLDED="BLOCK_FOLDED";R1.BLOCK_LITERAL="BLOCK_LITERAL";R1.PLAIN="PLAIN";R1.QUOTE_DOUBLE="QUOTE_DOUBLE";R1.QUOTE_SINGLE="QUOTE_SINGLE";f8.Scalar=R1;f8.isScalarValue=C8});var p1=D((u8)=>{var k8=l1(),V1=S(),N2=C(),v8="tag:yaml.org,2002:";function g8(q,Z,X){if(Z){let J=X.filter((Q)=>Q.tag===Z),$=J.find((Q)=>!Q.format)??J[0];if(!$)throw Error(`Tag ${Z} not found`);return $}return X.find((J)=>J.identify?.(q)&&!J.format)}function h8(q,Z,X){if(V1.isDocument(q))q=q.contents;if(V1.isNode(q))return q;if(V1.isPair(q)){let B=X.schema[V1.MAP].createNode?.(X.schema,null,X);return B.items.push(q),B}if(q instanceof String||q instanceof Number||q instanceof Boolean||typeof BigInt<"u"&&q instanceof BigInt)q=q.valueOf();let{aliasDuplicateObjects:J,onAnchor:$,onTagObj:Q,schema:z,sourceObjects:H}=X,U=void 0;if(J&&q&&typeof q==="object")if(U=H.get(q),U)return U.anchor??(U.anchor=$(q)),new k8.Alias(U.anchor);else U={anchor:null,node:null},H.set(q,U);if(Z?.startsWith("!!"))Z=v8+Z.slice(2);let G=g8(q,Z,z.tags);if(!G){if(q&&typeof q.toJSON==="function")q=q.toJSON();if(!q||typeof q!=="object"){let B=new N2.Scalar(q);if(U)U.node=B;return B}G=q instanceof Map?z[V1.MAP]:(Symbol.iterator in Object(q))?z[V1.SEQ]:z[V1.MAP]}if(Q)Q(G),delete X.onTagObj;let Y=G?.createNode?G.createNode(X.schema,q,X):typeof G?.nodeClass?.from==="function"?G.nodeClass.from(X.schema,q,X):new N2.Scalar(q);if(Z)Y.tag=Z;else if(!G.default)Y.tag=G.tag;if(U)U.node=Y;return Y}u8.createNode=h8});var x0=D((p8)=>{var d8=p1(),s=S(),l8=f0();function eq(q,Z,X){let J=X;for(let $=Z.length-1;$>=0;--$){let Q=Z[$];if(typeof Q==="number"&&Number.isInteger(Q)&&Q>=0){let z=[];z[Q]=J,J=z}else J=new Map([[Q,J]])}return d8.createNode(J,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:q,sourceObjects:new Map})}var A2=(q)=>q==null||typeof q==="object"&&!!q[Symbol.iterator]().next().done;class S2 extends l8.NodeBase{constructor(q,Z){super(q);Object.defineProperty(this,"schema",{value:Z,configurable:!0,enumerable:!1,writable:!0})}clone(q){let Z=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(q)Z.schema=q;if(Z.items=Z.items.map((X)=>s.isNode(X)||s.isPair(X)?X.clone(q):X),this.range)Z.range=this.range.slice();return Z}addIn(q,Z){if(A2(q))this.add(Z);else{let[X,...J]=q,$=this.get(X,!0);if(s.isCollection($))$.addIn(J,Z);else if($===void 0&&this.schema)this.set(X,eq(this.schema,J,Z));else throw Error(`Expected YAML collection at ${X}. Remaining path: ${J}`)}}deleteIn(q){let[Z,...X]=q;if(X.length===0)return this.delete(Z);let J=this.get(Z,!0);if(s.isCollection(J))return J.deleteIn(X);else throw Error(`Expected YAML collection at ${Z}. Remaining path: ${X}`)}getIn(q,Z){let[X,...J]=q,$=this.get(X,!0);if(J.length===0)return!Z&&s.isScalar($)?$.value:$;else return s.isCollection($)?$.getIn(J,Z):void 0}hasAllNullValues(q){return this.items.every((Z)=>{if(!s.isPair(Z))return!1;let X=Z.value;return X==null||q&&s.isScalar(X)&&X.value==null&&!X.commentBefore&&!X.comment&&!X.tag})}hasIn(q){let[Z,...X]=q;if(X.length===0)return this.has(Z);let J=this.get(Z,!0);return s.isCollection(J)?J.hasIn(X):!1}setIn(q,Z){let[X,...J]=q;if(J.length===0)this.set(X,Z);else{let $=this.get(X,!0);if(s.isCollection($))$.setIn(J,Z);else if($===void 0&&this.schema)this.set(X,eq(this.schema,J,Z));else throw Error(`Expected YAML collection at ${X}. Remaining path: ${J}`)}}}p8.Collection=S2;p8.collectionFromPath=eq;p8.isEmptyPath=A2});var c1=D((n8)=>{var s8=(q)=>q.replace(/^(?!$)(?: $)?/gm,"#");function q9(q,Z){if(/^\n+$/.test(q))return q.substring(1);return Z?q.replace(/^(?! *$)/gm,Z):q}var r8=(q,Z,X)=>q.endsWith(`
29
29
  `)?q9(X,Z):X.includes(`
30
30
  `)?`
31
31
  `+q9(X,Z):(q.endsWith(" ")?"":" ")+X;n8.indentComment=q9;n8.lineComment=r8;n8.stringifyComment=s8});var b2=D((ZZ)=>{function qZ(q,Z,X="flow",{indentAtStart:J,lineWidth:$=80,minContentWidth:Q=20,onFold:z,onOverflow:H}={}){if(!$||$<0)return q;if($<Q)Q=0;let U=Math.max(1+Q,1+$-Z.length);if(q.length<=U)return q;let G=[],Y={},B=$-Z.length;if(typeof J==="number")if(J>$-Math.max(2,Q))G.push(0);else B=$-J;let _=void 0,R=void 0,W=!1,T=-1,L=-1,I=-1;if(X==="block"){if(T=w2(q,T,Z.length),T!==-1)B=T+U}for(let P;P=q[T+=1];){if(X==="quoted"&&P==="\\"){switch(L=T,q[T+1]){case"x":T+=3;break;case"u":T+=5;break;case"U":T+=9;break;default:T+=1}I=T}if(P===`
@@ -40,10 +40,10 @@ ${Z}${q.slice(O+1,N)}`}}return M}function w2(q,Z,X){let J=Z,$=Z+1,Q=q[$];while(Q
40
40
  `;while(X[U+2]==="\\"&&X[U+3]==="n"&&X[U+4]!=='"')z+=`
41
41
  `,U+=2;if(z+=Q,X[U+2]===" ")z+="\\";U+=1,H=U+1}break;default:U+=1}}return z=H?z+X.slice(H):X,J?z:X1.foldFlowLines(z,Q,X1.FOLD_QUOTED,v0(Z,!1))}function Z9(q,Z){if(Z.options.singleQuote===!1||Z.implicitKey&&q.includes(`
42
42
  `)||/[ \t]\n|\n[ \t]/.test(q))return i1(q,Z);let X=Z.indent||(g0(q)?" ":""),J="'"+q.replace(/'/g,"''").replace(/\n+/g,`$&
43
- ${X}`)+"'";return Z.implicitKey?J:X1.foldFlowLines(J,X,X1.FOLD_FLOW,v0(Z,!1))}function j1(q,Z){let{singleQuote:X}=Z.options,J;if(X===!1)J=i1;else{let $=q.includes('"'),Q=q.includes("'");if($&&!Q)J=Z9;else if(Q&&!$)J=i1;else J=X?Z9:i1}return J(q,Z)}var X9;try{X9=new RegExp(`(^|(?<!
43
+ ${X}`)+"'";return Z.implicitKey?J:X1.foldFlowLines(J,X,X1.FOLD_FLOW,v0(Z,!1))}function b1(q,Z){let{singleQuote:X}=Z.options,J;if(X===!1)J=i1;else{let $=q.includes('"'),Q=q.includes("'");if($&&!Q)J=Z9;else if(Q&&!$)J=i1;else J=X?Z9:i1}return J(q,Z)}var X9;try{X9=new RegExp(`(^|(?<!
44
44
  ))
45
45
  +(?!
46
- |$)`,"g")}catch{X9=/\n+(?!\n|$)/g}function k0({comment:q,type:Z,value:X},J,$,Q){let{blockQuote:z,commentString:H,lineWidth:U}=J.options;if(!z||/\n[\t ]+$/.test(X))return j1(X,J);let G=J.indent||(J.forceBlockIndent||g0(X)?" ":""),Y=z==="literal"?!0:z==="folded"||Z===d.Scalar.BLOCK_FOLDED?!1:Z===d.Scalar.BLOCK_LITERAL?!0:!zZ(X,U,G.length);if(!X)return Y?`|
46
+ |$)`,"g")}catch{X9=/\n+(?!\n|$)/g}function k0({comment:q,type:Z,value:X},J,$,Q){let{blockQuote:z,commentString:H,lineWidth:U}=J.options;if(!z||/\n[\t ]+$/.test(X))return b1(X,J);let G=J.indent||(J.forceBlockIndent||g0(X)?" ":""),Y=z==="literal"?!0:z==="folded"||Z===d.Scalar.BLOCK_FOLDED?!1:Z===d.Scalar.BLOCK_LITERAL?!0:!zZ(X,U,G.length);if(!X)return Y?`|
47
47
  `:`>
48
48
  `;let B,_;for(_=X.length;_>0;--_){let N=X[_-1];if(N!==`
49
49
  `&&N!=="\t"&&N!==" ")break}let R=X.substring(_),W=R.indexOf(`
@@ -53,10 +53,10 @@ ${X}`)+"'";return Z.implicitKey?J:X1.foldFlowLines(J,X,X1.FOLD_FLOW,v0(Z,!1))}fu
53
53
  $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${G}`),A=!1,K=v0(J,!0);if(z!=="folded"&&Z!==d.Scalar.BLOCK_FOLDED)K.onOverflow=()=>{A=!0};let V=X1.foldFlowLines(`${M}${N}${R}`,G,X1.FOLD_BLOCK,K);if(!A)return`>${O}
54
54
  ${G}${V}`}return X=X.replace(/\n+/g,`$&${G}`),`|${O}
55
55
  ${G}${M}${X}${R}`}function HZ(q,Z,X,J){let{type:$,value:Q}=q,{actualString:z,implicitKey:H,indent:U,indentStep:G,inFlow:Y}=Z;if(H&&Q.includes(`
56
- `)||Y&&/[[\]{},]/.test(Q))return j1(Q,Z);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(Q))return H||Y||!Q.includes(`
57
- `)?j1(Q,Z):k0(q,Z,X,J);if(!H&&!Y&&$!==d.Scalar.PLAIN&&Q.includes(`
58
- `))return k0(q,Z,X,J);if(g0(Q)){if(U==="")return Z.forceBlockIndent=!0,k0(q,Z,X,J);else if(H&&U===G)return j1(Q,Z)}let B=Q.replace(/\n+/g,`$&
59
- ${U}`);if(z){let _=(T)=>T.default&&T.tag!=="tag:yaml.org,2002:str"&&T.test?.test(B),{compat:R,tags:W}=Z.doc.schema;if(W.some(_)||R?.some(_))return j1(Q,Z)}return H?B:X1.foldFlowLines(B,U,X1.FOLD_FLOW,v0(Z,!1))}function UZ(q,Z,X,J){let{implicitKey:$,inFlow:Q}=Z,z=typeof q.value==="string"?q:Object.assign({},q,{value:String(q.value)}),{type:H}=q;if(H!==d.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(z.value))H=d.Scalar.QUOTE_DOUBLE}let U=(Y)=>{switch(Y){case d.Scalar.BLOCK_FOLDED:case d.Scalar.BLOCK_LITERAL:return $||Q?j1(z.value,Z):k0(z,Z,X,J);case d.Scalar.QUOTE_DOUBLE:return i1(z.value,Z);case d.Scalar.QUOTE_SINGLE:return Z9(z.value,Z);case d.Scalar.PLAIN:return HZ(z,Z,X,J);default:return null}},G=U(H);if(G===null){let{defaultKeyType:Y,defaultStringType:B}=Z.options,_=$&&Y||B;if(G=U(_),G===null)throw Error(`Unsupported default string type ${_}`)}return G}GZ.stringifyString=UZ});var s1=D((IZ)=>{var BZ=C0(),J1=S(),TZ=c1(),_Z=a1();function LZ(q,Z){let X=Object.assign({blockQuote:!0,commentString:TZ.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},q.schema.toStringOptions,Z),J;switch(X.collectionStyle){case"block":J=!1;break;case"flow":J=!0;break;default:J=null}return{anchors:new Set,doc:q,flowCollectionPadding:X.flowCollectionPadding?" ":"",indent:"",indentStep:typeof X.indent==="number"?" ".repeat(X.indent):" ",inFlow:J,options:X}}function WZ(q,Z){if(Z.tag){let $=q.filter((Q)=>Q.tag===Z.tag);if($.length>0)return $.find((Q)=>Q.format===Z.format)??$[0]}let X=void 0,J;if(J1.isScalar(Z)){J=Z.value;let $=q.filter((Q)=>Q.identify?.(J));if($.length>1){let Q=$.filter((z)=>z.test);if(Q.length>0)$=Q}X=$.find((Q)=>Q.format===Z.format)??$.find((Q)=>!Q.format)}else J=Z,X=q.find(($)=>$.nodeClass&&J instanceof $.nodeClass);if(!X){let $=J?.constructor?.name??(J===null?"null":typeof J);throw Error(`Tag not resolved for ${$} value`)}return X}function RZ(q,Z,{anchors:X,doc:J}){if(!J.directives)return"";let $=[],Q=(J1.isScalar(q)||J1.isCollection(q))&&q.anchor;if(Q&&BZ.anchorIsValid(Q))X.add(Q),$.push(`&${Q}`);let z=q.tag??(Z.default?null:Z.tag);if(z)$.push(J.directives.tagString(z));return $.join(" ")}function VZ(q,Z,X,J){if(J1.isPair(q))return q.toString(Z,X,J);if(J1.isAlias(q)){if(Z.doc.directives)return q.toString(Z);if(Z.resolvedAliases?.has(q))throw TypeError("Cannot stringify circular structure without alias nodes");else{if(Z.resolvedAliases)Z.resolvedAliases.add(q);else Z.resolvedAliases=new Set([q]);q=q.resolve(Z.doc)}}let $=void 0,Q=J1.isNode(q)?q:Z.doc.createNode(q,{onTagObj:(U)=>$=U});$??($=WZ(Z.doc.schema.tags,Q));let z=RZ(Q,$,Z);if(z.length>0)Z.indentAtStart=(Z.indentAtStart??0)+z.length+1;let H=typeof $.stringify==="function"?$.stringify(Q,Z,X,J):J1.isScalar(Q)?_Z.stringifyString(Q,Z,X,J):Q.toString(Z,X,J);if(!z)return H;return J1.isScalar(Q)||H[0]==="{"||H[0]==="["?`${z} ${H}`:`${z}
56
+ `)||Y&&/[[\]{},]/.test(Q))return b1(Q,Z);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(Q))return H||Y||!Q.includes(`
57
+ `)?b1(Q,Z):k0(q,Z,X,J);if(!H&&!Y&&$!==d.Scalar.PLAIN&&Q.includes(`
58
+ `))return k0(q,Z,X,J);if(g0(Q)){if(U==="")return Z.forceBlockIndent=!0,k0(q,Z,X,J);else if(H&&U===G)return b1(Q,Z)}let B=Q.replace(/\n+/g,`$&
59
+ ${U}`);if(z){let _=(T)=>T.default&&T.tag!=="tag:yaml.org,2002:str"&&T.test?.test(B),{compat:R,tags:W}=Z.doc.schema;if(W.some(_)||R?.some(_))return b1(Q,Z)}return H?B:X1.foldFlowLines(B,U,X1.FOLD_FLOW,v0(Z,!1))}function UZ(q,Z,X,J){let{implicitKey:$,inFlow:Q}=Z,z=typeof q.value==="string"?q:Object.assign({},q,{value:String(q.value)}),{type:H}=q;if(H!==d.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(z.value))H=d.Scalar.QUOTE_DOUBLE}let U=(Y)=>{switch(Y){case d.Scalar.BLOCK_FOLDED:case d.Scalar.BLOCK_LITERAL:return $||Q?b1(z.value,Z):k0(z,Z,X,J);case d.Scalar.QUOTE_DOUBLE:return i1(z.value,Z);case d.Scalar.QUOTE_SINGLE:return Z9(z.value,Z);case d.Scalar.PLAIN:return HZ(z,Z,X,J);default:return null}},G=U(H);if(G===null){let{defaultKeyType:Y,defaultStringType:B}=Z.options,_=$&&Y||B;if(G=U(_),G===null)throw Error(`Unsupported default string type ${_}`)}return G}GZ.stringifyString=UZ});var s1=D((IZ)=>{var BZ=C0(),J1=S(),TZ=c1(),_Z=a1();function LZ(q,Z){let X=Object.assign({blockQuote:!0,commentString:TZ.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},q.schema.toStringOptions,Z),J;switch(X.collectionStyle){case"block":J=!1;break;case"flow":J=!0;break;default:J=null}return{anchors:new Set,doc:q,flowCollectionPadding:X.flowCollectionPadding?" ":"",indent:"",indentStep:typeof X.indent==="number"?" ".repeat(X.indent):" ",inFlow:J,options:X}}function WZ(q,Z){if(Z.tag){let $=q.filter((Q)=>Q.tag===Z.tag);if($.length>0)return $.find((Q)=>Q.format===Z.format)??$[0]}let X=void 0,J;if(J1.isScalar(Z)){J=Z.value;let $=q.filter((Q)=>Q.identify?.(J));if($.length>1){let Q=$.filter((z)=>z.test);if(Q.length>0)$=Q}X=$.find((Q)=>Q.format===Z.format)??$.find((Q)=>!Q.format)}else J=Z,X=q.find(($)=>$.nodeClass&&J instanceof $.nodeClass);if(!X){let $=J?.constructor?.name??(J===null?"null":typeof J);throw Error(`Tag not resolved for ${$} value`)}return X}function RZ(q,Z,{anchors:X,doc:J}){if(!J.directives)return"";let $=[],Q=(J1.isScalar(q)||J1.isCollection(q))&&q.anchor;if(Q&&BZ.anchorIsValid(Q))X.add(Q),$.push(`&${Q}`);let z=q.tag??(Z.default?null:Z.tag);if(z)$.push(J.directives.tagString(z));return $.join(" ")}function VZ(q,Z,X,J){if(J1.isPair(q))return q.toString(Z,X,J);if(J1.isAlias(q)){if(Z.doc.directives)return q.toString(Z);if(Z.resolvedAliases?.has(q))throw TypeError("Cannot stringify circular structure without alias nodes");else{if(Z.resolvedAliases)Z.resolvedAliases.add(q);else Z.resolvedAliases=new Set([q]);q=q.resolve(Z.doc)}}let $=void 0,Q=J1.isNode(q)?q:Z.doc.createNode(q,{onTagObj:(U)=>$=U});$??($=WZ(Z.doc.schema.tags,Q));let z=RZ(Q,$,Z);if(z.length>0)Z.indentAtStart=(Z.indentAtStart??0)+z.length+1;let H=typeof $.stringify==="function"?$.stringify(Q,Z,X,J):J1.isScalar(Q)?_Z.stringifyString(Q,Z,X,J):Q.toString(Z,X,J);if(!z)return H;return J1.isScalar(Q)||H[0]==="{"||H[0]==="["?`${z} ${H}`:`${z}
60
60
  ${Z.indent}${H}`}IZ.createStringifyContext=LZ;IZ.stringify=VZ});var C2=D((DZ)=>{var e=S(),j2=C(),E2=s1(),r1=c1();function PZ({key:q,value:Z},X,J,$){let{allNullValues:Q,doc:z,indent:H,indentStep:U,options:{commentString:G,indentSeq:Y,simpleKeys:B}}=X,_=e.isNode(q)&&q.comment||null;if(B){if(_)throw Error("With simple keys, key nodes cannot have comments");if(e.isCollection(q)||!e.isNode(q)&&typeof q==="object")throw Error("With simple keys, collection cannot be used as a key value")}let R=!B&&(!q||_&&Z==null&&!X.inFlow||e.isCollection(q)||(e.isScalar(q)?q.type===j2.Scalar.BLOCK_FOLDED||q.type===j2.Scalar.BLOCK_LITERAL:typeof q==="object"));X=Object.assign({},X,{allNullValues:!1,implicitKey:!R&&(B||!Q),indent:H+U});let W=!1,T=!1,L=E2.stringify(q,X,()=>W=!0,()=>T=!0);if(!R&&!X.inFlow&&L.length>1024){if(B)throw Error("With simple keys, single line scalar must not span more than 1024 characters");R=!0}if(X.inFlow){if(Q||Z==null){if(W&&J)J();return L===""?"?":R?`? ${L}`:L}}else if(Q&&!B||Z==null&&R){if(L=`? ${L}`,_&&!W)L+=r1.lineComment(L,X.indent,G(_));else if(T&&$)$();return L}if(W)_=null;if(R){if(_)L+=r1.lineComment(L,X.indent,G(_));L=`? ${L}
61
61
  ${H}:`}else if(L=`${L}:`,_)L+=r1.lineComment(L,X.indent,G(_));let I,M,P;if(e.isNode(Z))I=!!Z.spaceBefore,M=Z.commentBefore,P=Z.comment;else if(I=!1,M=null,P=null,Z&&typeof Z==="object")Z=z.createNode(Z);if(X.implicitKey=!1,!R&&!_&&e.isScalar(Z))X.indentAtStart=L.length+1;if(T=!1,!Y&&U.length>=2&&!X.inFlow&&!R&&e.isSeq(Z)&&!Z.flow&&!Z.tag&&!Z.anchor)X.indent=X.indent.substring(2);let O=!1,N=E2.stringify(Z,X,()=>O=!0,()=>T=!0),A=" ";if(_||I||M){if(A=I?`
62
62
  `:"",M){let K=G(M);A+=`
@@ -74,13 +74,13 @@ ${U}${T}`:`
74
74
  `)))G=!0;B.push(I),Y=B.length}let{start:_,end:R}=X;if(B.length===0)return _+R;else{if(!G){let W=B.reduce((T,L)=>T+L.length+2,2);G=Z.options.lineWidth>0&&W>Z.options.lineWidth}if(G){let W=_;for(let T of B)W+=T?`
75
75
  ${Q}${$}${T}`:`
76
76
  `;return`${W}
77
- ${$}${R}`}else return`${_}${z}${B.join(" ")}${z}${R}`}}function c0({indent:q,options:{commentString:Z}},X,J,$){if(J&&$)J=J.replace(/^\n+/,"");if(J){let Q=p0.indentComment(Z(J),q);X.push(Q.trimStart())}}rZ.stringifyCollection=iZ});var z1=D((ZX)=>{var oZ=H9(),tZ=z9(),eZ=x0(),Q1=S(),i0=$1(),qX=C();function o1(q,Z){let X=Q1.isScalar(Z)?Z.value:Z;for(let J of q)if(Q1.isPair(J)){if(J.key===Z||J.key===X)return J;if(Q1.isScalar(J.key)&&J.key.value===X)return J}return}class u2 extends eZ.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(q){super(Q1.MAP,q);this.items=[]}static from(q,Z,X){let{keepUndefined:J,replacer:$}=X,Q=new this(q),z=(H,U)=>{if(typeof $==="function")U=$.call(Z,H,U);else if(Array.isArray($)&&!$.includes(H))return;if(U!==void 0||J)Q.items.push(i0.createPair(H,U,X))};if(Z instanceof Map)for(let[H,U]of Z)z(H,U);else if(Z&&typeof Z==="object")for(let H of Object.keys(Z))z(H,Z[H]);if(typeof q.sortMapEntries==="function")Q.items.sort(q.sortMapEntries);return Q}add(q,Z){let X;if(Q1.isPair(q))X=q;else if(!q||typeof q!=="object"||!("key"in q))X=new i0.Pair(q,q?.value);else X=new i0.Pair(q.key,q.value);let J=o1(this.items,X.key),$=this.schema?.sortMapEntries;if(J){if(!Z)throw Error(`Key ${X.key} already set`);if(Q1.isScalar(J.value)&&qX.isScalarValue(X.value))J.value.value=X.value;else J.value=X.value}else if($){let Q=this.items.findIndex((z)=>$(X,z)<0);if(Q===-1)this.items.push(X);else this.items.splice(Q,0,X)}else this.items.push(X)}delete(q){let Z=o1(this.items,q);if(!Z)return!1;return this.items.splice(this.items.indexOf(Z),1).length>0}get(q,Z){let J=o1(this.items,q)?.value;return(!Z&&Q1.isScalar(J)?J.value:J)??void 0}has(q){return!!o1(this.items,q)}set(q,Z){this.add(new i0.Pair(q,Z),!0)}toJSON(q,Z,X){let J=X?new X:Z?.mapAsMap?new Map:{};if(Z?.onCreate)Z.onCreate(J);for(let $ of this.items)tZ.addPairToJSMap(Z,J,$);return J}toString(q,Z,X){if(!q)return JSON.stringify(this);for(let J of this.items)if(!Q1.isPair(J))throw Error(`Map items must all be pairs; found ${JSON.stringify(J)} instead`);if(!q.allNullValues&&this.hasAllNullValues(!1))q=Object.assign({},q,{allNullValues:!0});return oZ.stringifyCollection(this,q,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:q.indent||"",onChompKeep:X,onComment:Z})}}ZX.YAMLMap=u2;ZX.findPair=o1});var E1=D((zX)=>{var $X=S(),m2=z1(),QX={collection:"map",default:!0,nodeClass:m2.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(q,Z){if(!$X.isMap(q))Z("Expected a mapping for this tag");return q},createNode:(q,Z,X)=>m2.YAMLMap.from(q,Z,X)};zX.map=QX});var H1=D((_X)=>{var UX=p1(),GX=H9(),YX=x0(),s0=S(),BX=C(),TX=Z1();class d2 extends YX.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(q){super(s0.SEQ,q);this.items=[]}add(q){this.items.push(q)}delete(q){let Z=a0(q);if(typeof Z!=="number")return!1;return this.items.splice(Z,1).length>0}get(q,Z){let X=a0(q);if(typeof X!=="number")return;let J=this.items[X];return!Z&&s0.isScalar(J)?J.value:J}has(q){let Z=a0(q);return typeof Z==="number"&&Z<this.items.length}set(q,Z){let X=a0(q);if(typeof X!=="number")throw Error(`Expected a valid index, not ${q}.`);let J=this.items[X];if(s0.isScalar(J)&&BX.isScalarValue(Z))J.value=Z;else this.items[X]=Z}toJSON(q,Z){let X=[];if(Z?.onCreate)Z.onCreate(X);let J=0;for(let $ of this.items)X.push(TX.toJS($,String(J++),Z));return X}toString(q,Z,X){if(!q)return JSON.stringify(this);return GX.stringifyCollection(this,q,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(q.indent||"")+" ",onChompKeep:X,onComment:Z})}static from(q,Z,X){let{replacer:J}=X,$=new this(q);if(Z&&Symbol.iterator in Object(Z)){let Q=0;for(let z of Z){if(typeof J==="function"){let H=Z instanceof Set?z:String(Q++);z=J.call(Z,H,z)}$.items.push(UX.createNode(z,void 0,X))}}return $}}function a0(q){let Z=s0.isScalar(q)?q.value:q;if(Z&&typeof Z==="string")Z=Number(Z);return typeof Z==="number"&&Number.isInteger(Z)&&Z>=0?Z:null}_X.YAMLSeq=d2});var C1=D((VX)=>{var WX=S(),l2=H1(),RX={collection:"seq",default:!0,nodeClass:l2.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(q,Z){if(!WX.isSeq(q))Z("Expected a sequence for this tag");return q},createNode:(q,Z,X)=>l2.YAMLSeq.from(q,Z,X)};VX.seq=RX});var t1=D((PX)=>{var MX=a1(),KX={identify:(q)=>typeof q==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(q)=>q,stringify(q,Z,X,J){return Z=Object.assign({actualString:!0},Z),MX.stringifyString(q,Z,X,J)}};PX.string=KX});var r0=D((FX)=>{var p2=C(),c2={identify:(q)=>q==null,createNode:()=>new p2.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new p2.Scalar(null),stringify:({source:q},Z)=>typeof q==="string"&&c2.test.test(q)?q:Z.options.nullStr};FX.nullTag=c2});var U9=D((AX)=>{var NX=C(),i2={identify:(q)=>typeof q==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:(q)=>new NX.Scalar(q[0]==="t"||q[0]==="T"),stringify({source:q,value:Z},X){if(q&&i2.test.test(q)){let J=q[0]==="t"||q[0]==="T";if(Z===J)return q}return Z?X.options.trueStr:X.options.falseStr}};AX.boolTag=i2});var f1=D((bX)=>{function wX({format:q,minFractionDigits:Z,tag:X,value:J}){if(typeof J==="bigint")return String(J);let $=typeof J==="number"?J:Number(J);if(!isFinite($))return isNaN($)?".nan":$<0?"-.inf":".inf";let Q=Object.is(J,-0)?"-0":JSON.stringify(J);if(!q&&Z&&(!X||X==="tag:yaml.org,2002:float")&&/^\d/.test(Q)){let z=Q.indexOf(".");if(z<0)z=Q.length,Q+=".";let H=Z-(Q.length-z-1);while(H-- >0)Q+="0"}return Q}bX.stringifyNumber=wX});var Y9=D((xX)=>{var EX=C(),G9=f1(),CX={identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(q)=>q.slice(-3).toLowerCase()==="nan"?NaN:q[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:G9.stringifyNumber},fX={identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:(q)=>parseFloat(q),stringify(q){let Z=Number(q.value);return isFinite(Z)?Z.toExponential():G9.stringifyNumber(q)}},yX={identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(q){let Z=new EX.Scalar(parseFloat(q)),X=q.indexOf(".");if(X!==-1&&q[q.length-1]==="0")Z.minFractionDigits=q.length-X-1;return Z},stringify:G9.stringifyNumber};xX.float=yX;xX.floatExp=fX;xX.floatNaN=CX});var T9=D((dX)=>{var a2=f1(),n0=(q)=>typeof q==="bigint"||Number.isInteger(q),B9=(q,Z,X,{intAsBigInt:J})=>J?BigInt(q):parseInt(q.substring(Z),X);function s2(q,Z,X){let{value:J}=q;if(n0(J)&&J>=0)return X+J.toString(Z);return a2.stringifyNumber(q)}var hX={identify:(q)=>n0(q)&&q>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(q,Z,X)=>B9(q,2,8,X),stringify:(q)=>s2(q,8,"0o")},uX={identify:n0,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(q,Z,X)=>B9(q,0,10,X),stringify:a2.stringifyNumber},mX={identify:(q)=>n0(q)&&q>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(q,Z,X)=>B9(q,2,16,X),stringify:(q)=>s2(q,16,"0x")};dX.int=uX;dX.intHex=mX;dX.intOct=hX});var r2=D((tX)=>{var iX=E1(),aX=r0(),sX=C1(),rX=t1(),nX=U9(),_9=Y9(),L9=T9(),oX=[iX.map,sX.seq,rX.string,aX.nullTag,nX.boolTag,L9.intOct,L9.int,L9.intHex,_9.floatNaN,_9.floatExp,_9.float];tX.schema=oX});var o2=D((zJ)=>{var qJ=C(),ZJ=E1(),XJ=C1();function n2(q){return typeof q==="bigint"||Number.isInteger(q)}var o0=({value:q})=>JSON.stringify(q),JJ=[{identify:(q)=>typeof q==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(q)=>q,stringify:o0},{identify:(q)=>q==null,createNode:()=>new qJ.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:o0},{identify:(q)=>typeof q==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:(q)=>q==="true",stringify:o0},{identify:n2,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(q,Z,{intAsBigInt:X})=>X?BigInt(q):parseInt(q,10),stringify:({value:q})=>n2(q)?q.toString():JSON.stringify(q)},{identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:(q)=>parseFloat(q),stringify:o0}],$J={default:!0,tag:"",test:/^/,resolve(q,Z){return Z(`Unresolved plain scalar ${JSON.stringify(q)}`),q}},QJ=[ZJ.map,XJ.seq].concat(JJ,$J);zJ.schema=QJ});var R9=D((YJ)=>{var e1=r("buffer"),W9=C(),UJ=a1(),GJ={identify:(q)=>q instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(q,Z){if(typeof e1.Buffer==="function")return e1.Buffer.from(q,"base64");else if(typeof atob==="function"){let X=atob(q.replace(/[\n\r]/g,"")),J=new Uint8Array(X.length);for(let $=0;$<X.length;++$)J[$]=X.charCodeAt($);return J}else return Z("This environment does not support reading binary tags; either Buffer or atob is required"),q},stringify({comment:q,type:Z,value:X},J,$,Q){if(!X)return"";let z=X,H;if(typeof e1.Buffer==="function")H=z instanceof e1.Buffer?z.toString("base64"):e1.Buffer.from(z.buffer).toString("base64");else if(typeof btoa==="function"){let U="";for(let G=0;G<z.length;++G)U+=String.fromCharCode(z[G]);H=btoa(U)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(Z??(Z=W9.Scalar.BLOCK_LITERAL),Z!==W9.Scalar.QUOTE_DOUBLE){let U=Math.max(J.options.lineWidth-J.indent.length,J.options.minContentWidth),G=Math.ceil(H.length/U),Y=Array(G);for(let B=0,_=0;B<G;++B,_+=U)Y[B]=H.substr(_,U);H=Y.join(Z===W9.Scalar.BLOCK_LITERAL?`
77
+ ${$}${R}`}else return`${_}${z}${B.join(" ")}${z}${R}`}}function c0({indent:q,options:{commentString:Z}},X,J,$){if(J&&$)J=J.replace(/^\n+/,"");if(J){let Q=p0.indentComment(Z(J),q);X.push(Q.trimStart())}}rZ.stringifyCollection=iZ});var z1=D((ZX)=>{var oZ=H9(),tZ=z9(),eZ=x0(),Q1=S(),i0=$1(),qX=C();function o1(q,Z){let X=Q1.isScalar(Z)?Z.value:Z;for(let J of q)if(Q1.isPair(J)){if(J.key===Z||J.key===X)return J;if(Q1.isScalar(J.key)&&J.key.value===X)return J}return}class u2 extends eZ.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(q){super(Q1.MAP,q);this.items=[]}static from(q,Z,X){let{keepUndefined:J,replacer:$}=X,Q=new this(q),z=(H,U)=>{if(typeof $==="function")U=$.call(Z,H,U);else if(Array.isArray($)&&!$.includes(H))return;if(U!==void 0||J)Q.items.push(i0.createPair(H,U,X))};if(Z instanceof Map)for(let[H,U]of Z)z(H,U);else if(Z&&typeof Z==="object")for(let H of Object.keys(Z))z(H,Z[H]);if(typeof q.sortMapEntries==="function")Q.items.sort(q.sortMapEntries);return Q}add(q,Z){let X;if(Q1.isPair(q))X=q;else if(!q||typeof q!=="object"||!("key"in q))X=new i0.Pair(q,q?.value);else X=new i0.Pair(q.key,q.value);let J=o1(this.items,X.key),$=this.schema?.sortMapEntries;if(J){if(!Z)throw Error(`Key ${X.key} already set`);if(Q1.isScalar(J.value)&&qX.isScalarValue(X.value))J.value.value=X.value;else J.value=X.value}else if($){let Q=this.items.findIndex((z)=>$(X,z)<0);if(Q===-1)this.items.push(X);else this.items.splice(Q,0,X)}else this.items.push(X)}delete(q){let Z=o1(this.items,q);if(!Z)return!1;return this.items.splice(this.items.indexOf(Z),1).length>0}get(q,Z){let J=o1(this.items,q)?.value;return(!Z&&Q1.isScalar(J)?J.value:J)??void 0}has(q){return!!o1(this.items,q)}set(q,Z){this.add(new i0.Pair(q,Z),!0)}toJSON(q,Z,X){let J=X?new X:Z?.mapAsMap?new Map:{};if(Z?.onCreate)Z.onCreate(J);for(let $ of this.items)tZ.addPairToJSMap(Z,J,$);return J}toString(q,Z,X){if(!q)return JSON.stringify(this);for(let J of this.items)if(!Q1.isPair(J))throw Error(`Map items must all be pairs; found ${JSON.stringify(J)} instead`);if(!q.allNullValues&&this.hasAllNullValues(!1))q=Object.assign({},q,{allNullValues:!0});return oZ.stringifyCollection(this,q,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:q.indent||"",onChompKeep:X,onComment:Z})}}ZX.YAMLMap=u2;ZX.findPair=o1});var j1=D((zX)=>{var $X=S(),m2=z1(),QX={collection:"map",default:!0,nodeClass:m2.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(q,Z){if(!$X.isMap(q))Z("Expected a mapping for this tag");return q},createNode:(q,Z,X)=>m2.YAMLMap.from(q,Z,X)};zX.map=QX});var H1=D((_X)=>{var UX=p1(),GX=H9(),YX=x0(),s0=S(),BX=C(),TX=Z1();class d2 extends YX.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(q){super(s0.SEQ,q);this.items=[]}add(q){this.items.push(q)}delete(q){let Z=a0(q);if(typeof Z!=="number")return!1;return this.items.splice(Z,1).length>0}get(q,Z){let X=a0(q);if(typeof X!=="number")return;let J=this.items[X];return!Z&&s0.isScalar(J)?J.value:J}has(q){let Z=a0(q);return typeof Z==="number"&&Z<this.items.length}set(q,Z){let X=a0(q);if(typeof X!=="number")throw Error(`Expected a valid index, not ${q}.`);let J=this.items[X];if(s0.isScalar(J)&&BX.isScalarValue(Z))J.value=Z;else this.items[X]=Z}toJSON(q,Z){let X=[];if(Z?.onCreate)Z.onCreate(X);let J=0;for(let $ of this.items)X.push(TX.toJS($,String(J++),Z));return X}toString(q,Z,X){if(!q)return JSON.stringify(this);return GX.stringifyCollection(this,q,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(q.indent||"")+" ",onChompKeep:X,onComment:Z})}static from(q,Z,X){let{replacer:J}=X,$=new this(q);if(Z&&Symbol.iterator in Object(Z)){let Q=0;for(let z of Z){if(typeof J==="function"){let H=Z instanceof Set?z:String(Q++);z=J.call(Z,H,z)}$.items.push(UX.createNode(z,void 0,X))}}return $}}function a0(q){let Z=s0.isScalar(q)?q.value:q;if(Z&&typeof Z==="string")Z=Number(Z);return typeof Z==="number"&&Number.isInteger(Z)&&Z>=0?Z:null}_X.YAMLSeq=d2});var E1=D((VX)=>{var WX=S(),l2=H1(),RX={collection:"seq",default:!0,nodeClass:l2.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(q,Z){if(!WX.isSeq(q))Z("Expected a sequence for this tag");return q},createNode:(q,Z,X)=>l2.YAMLSeq.from(q,Z,X)};VX.seq=RX});var t1=D((PX)=>{var MX=a1(),KX={identify:(q)=>typeof q==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(q)=>q,stringify(q,Z,X,J){return Z=Object.assign({actualString:!0},Z),MX.stringifyString(q,Z,X,J)}};PX.string=KX});var r0=D((FX)=>{var p2=C(),c2={identify:(q)=>q==null,createNode:()=>new p2.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new p2.Scalar(null),stringify:({source:q},Z)=>typeof q==="string"&&c2.test.test(q)?q:Z.options.nullStr};FX.nullTag=c2});var U9=D((AX)=>{var NX=C(),i2={identify:(q)=>typeof q==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:(q)=>new NX.Scalar(q[0]==="t"||q[0]==="T"),stringify({source:q,value:Z},X){if(q&&i2.test.test(q)){let J=q[0]==="t"||q[0]==="T";if(Z===J)return q}return Z?X.options.trueStr:X.options.falseStr}};AX.boolTag=i2});var C1=D((bX)=>{function wX({format:q,minFractionDigits:Z,tag:X,value:J}){if(typeof J==="bigint")return String(J);let $=typeof J==="number"?J:Number(J);if(!isFinite($))return isNaN($)?".nan":$<0?"-.inf":".inf";let Q=Object.is(J,-0)?"-0":JSON.stringify(J);if(!q&&Z&&(!X||X==="tag:yaml.org,2002:float")&&/^\d/.test(Q)){let z=Q.indexOf(".");if(z<0)z=Q.length,Q+=".";let H=Z-(Q.length-z-1);while(H-- >0)Q+="0"}return Q}bX.stringifyNumber=wX});var Y9=D((xX)=>{var EX=C(),G9=C1(),CX={identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(q)=>q.slice(-3).toLowerCase()==="nan"?NaN:q[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:G9.stringifyNumber},fX={identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:(q)=>parseFloat(q),stringify(q){let Z=Number(q.value);return isFinite(Z)?Z.toExponential():G9.stringifyNumber(q)}},yX={identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(q){let Z=new EX.Scalar(parseFloat(q)),X=q.indexOf(".");if(X!==-1&&q[q.length-1]==="0")Z.minFractionDigits=q.length-X-1;return Z},stringify:G9.stringifyNumber};xX.float=yX;xX.floatExp=fX;xX.floatNaN=CX});var T9=D((dX)=>{var a2=C1(),n0=(q)=>typeof q==="bigint"||Number.isInteger(q),B9=(q,Z,X,{intAsBigInt:J})=>J?BigInt(q):parseInt(q.substring(Z),X);function s2(q,Z,X){let{value:J}=q;if(n0(J)&&J>=0)return X+J.toString(Z);return a2.stringifyNumber(q)}var hX={identify:(q)=>n0(q)&&q>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(q,Z,X)=>B9(q,2,8,X),stringify:(q)=>s2(q,8,"0o")},uX={identify:n0,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(q,Z,X)=>B9(q,0,10,X),stringify:a2.stringifyNumber},mX={identify:(q)=>n0(q)&&q>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(q,Z,X)=>B9(q,2,16,X),stringify:(q)=>s2(q,16,"0x")};dX.int=uX;dX.intHex=mX;dX.intOct=hX});var r2=D((tX)=>{var iX=j1(),aX=r0(),sX=E1(),rX=t1(),nX=U9(),_9=Y9(),L9=T9(),oX=[iX.map,sX.seq,rX.string,aX.nullTag,nX.boolTag,L9.intOct,L9.int,L9.intHex,_9.floatNaN,_9.floatExp,_9.float];tX.schema=oX});var o2=D((zJ)=>{var qJ=C(),ZJ=j1(),XJ=E1();function n2(q){return typeof q==="bigint"||Number.isInteger(q)}var o0=({value:q})=>JSON.stringify(q),JJ=[{identify:(q)=>typeof q==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(q)=>q,stringify:o0},{identify:(q)=>q==null,createNode:()=>new qJ.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:o0},{identify:(q)=>typeof q==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:(q)=>q==="true",stringify:o0},{identify:n2,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(q,Z,{intAsBigInt:X})=>X?BigInt(q):parseInt(q,10),stringify:({value:q})=>n2(q)?q.toString():JSON.stringify(q)},{identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:(q)=>parseFloat(q),stringify:o0}],$J={default:!0,tag:"",test:/^/,resolve(q,Z){return Z(`Unresolved plain scalar ${JSON.stringify(q)}`),q}},QJ=[ZJ.map,XJ.seq].concat(JJ,$J);zJ.schema=QJ});var R9=D((YJ)=>{var e1=r("buffer"),W9=C(),UJ=a1(),GJ={identify:(q)=>q instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(q,Z){if(typeof e1.Buffer==="function")return e1.Buffer.from(q,"base64");else if(typeof atob==="function"){let X=atob(q.replace(/[\n\r]/g,"")),J=new Uint8Array(X.length);for(let $=0;$<X.length;++$)J[$]=X.charCodeAt($);return J}else return Z("This environment does not support reading binary tags; either Buffer or atob is required"),q},stringify({comment:q,type:Z,value:X},J,$,Q){if(!X)return"";let z=X,H;if(typeof e1.Buffer==="function")H=z instanceof e1.Buffer?z.toString("base64"):e1.Buffer.from(z.buffer).toString("base64");else if(typeof btoa==="function"){let U="";for(let G=0;G<z.length;++G)U+=String.fromCharCode(z[G]);H=btoa(U)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(Z??(Z=W9.Scalar.BLOCK_LITERAL),Z!==W9.Scalar.QUOTE_DOUBLE){let U=Math.max(J.options.lineWidth-J.indent.length,J.options.minContentWidth),G=Math.ceil(H.length/U),Y=Array(G);for(let B=0,_=0;B<G;++B,_+=U)Y[B]=H.substr(_,U);H=Y.join(Z===W9.Scalar.BLOCK_LITERAL?`
78
78
  `:" ")}return UJ.stringifyString({comment:q,type:Z,value:H},J,$,Q)}};YJ.binary=GJ});var e0=D((WJ)=>{var t0=S(),V9=$1(),TJ=C(),_J=H1();function t2(q,Z){if(t0.isSeq(q))for(let X=0;X<q.items.length;++X){let J=q.items[X];if(t0.isPair(J))continue;else if(t0.isMap(J)){if(J.items.length>1)Z("Each pair must have its own sequence indicator");let $=J.items[0]||new V9.Pair(new TJ.Scalar(null));if(J.commentBefore)$.key.commentBefore=$.key.commentBefore?`${J.commentBefore}
79
79
  ${$.key.commentBefore}`:J.commentBefore;if(J.comment){let Q=$.value??$.key;Q.comment=Q.comment?`${J.comment}
80
- ${Q.comment}`:J.comment}J=$}q.items[X]=t0.isPair(J)?J:new V9.Pair(J)}else Z("Expected a sequence for this tag");return q}function e2(q,Z,X){let{replacer:J}=X,$=new _J.YAMLSeq(q);$.tag="tag:yaml.org,2002:pairs";let Q=0;if(Z&&Symbol.iterator in Object(Z))for(let z of Z){if(typeof J==="function")z=J.call(Z,String(Q++),z);let H,U;if(Array.isArray(z))if(z.length===2)H=z[0],U=z[1];else throw TypeError(`Expected [key, value] tuple: ${z}`);else if(z&&z instanceof Object){let G=Object.keys(z);if(G.length===1)H=G[0],U=z[H];else throw TypeError(`Expected tuple with one key, not ${G.length} keys`)}else H=z;$.items.push(V9.createPair(H,U,X))}return $}var LJ={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:t2,createNode:e2};WJ.createPairs=e2;WJ.pairs=LJ;WJ.resolvePairs=t2});var M9=D((PJ)=>{var q3=S(),I9=Z1(),q0=z1(),MJ=H1(),Z3=e0();class M1 extends MJ.YAMLSeq{constructor(){super();this.add=q0.YAMLMap.prototype.add.bind(this),this.delete=q0.YAMLMap.prototype.delete.bind(this),this.get=q0.YAMLMap.prototype.get.bind(this),this.has=q0.YAMLMap.prototype.has.bind(this),this.set=q0.YAMLMap.prototype.set.bind(this),this.tag=M1.tag}toJSON(q,Z){if(!Z)return super.toJSON(q);let X=new Map;if(Z?.onCreate)Z.onCreate(X);for(let J of this.items){let $,Q;if(q3.isPair(J))$=I9.toJS(J.key,"",Z),Q=I9.toJS(J.value,$,Z);else $=I9.toJS(J,"",Z);if(X.has($))throw Error("Ordered maps must not include duplicate keys");X.set($,Q)}return X}static from(q,Z,X){let J=Z3.createPairs(q,Z,X),$=new this;return $.items=J.items,$}}M1.tag="tag:yaml.org,2002:omap";var KJ={collection:"seq",identify:(q)=>q instanceof Map,nodeClass:M1,default:!1,tag:"tag:yaml.org,2002:omap",resolve(q,Z){let X=Z3.resolvePairs(q,Z),J=[];for(let{key:$}of X.items)if(q3.isScalar($))if(J.includes($.value))Z(`Ordered maps must not include duplicate keys: ${$.value}`);else J.push($.value);return Object.assign(new M1,X)},createNode:(q,Z,X)=>M1.from(q,Z,X)};PJ.YAMLOMap=M1;PJ.omap=KJ});var z3=D((OJ)=>{var X3=C();function J3({value:q,source:Z},X){if(Z&&(q?$3:Q3).test.test(Z))return Z;return q?X.options.trueStr:X.options.falseStr}var $3={identify:(q)=>q===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new X3.Scalar(!0),stringify:J3},Q3={identify:(q)=>q===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new X3.Scalar(!1),stringify:J3};OJ.falseTag=Q3;OJ.trueTag=$3});var H3=D((EJ)=>{var SJ=C(),K9=f1(),wJ={identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(q)=>q.slice(-3).toLowerCase()==="nan"?NaN:q[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:K9.stringifyNumber},bJ={identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:(q)=>parseFloat(q.replace(/_/g,"")),stringify(q){let Z=Number(q.value);return isFinite(Z)?Z.toExponential():K9.stringifyNumber(q)}},jJ={identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(q){let Z=new SJ.Scalar(parseFloat(q.replace(/_/g,""))),X=q.indexOf(".");if(X!==-1){let J=q.substring(X+1).replace(/_/g,"");if(J[J.length-1]==="0")Z.minFractionDigits=J.length}return Z},stringify:K9.stringifyNumber};EJ.float=jJ;EJ.floatExp=bJ;EJ.floatNaN=wJ});var G3=D((hJ)=>{var U3=f1(),Z0=(q)=>typeof q==="bigint"||Number.isInteger(q);function qq(q,Z,X,{intAsBigInt:J}){let $=q[0];if($==="-"||$==="+")Z+=1;if(q=q.substring(Z).replace(/_/g,""),J){switch(X){case 2:q=`0b${q}`;break;case 8:q=`0o${q}`;break;case 16:q=`0x${q}`;break}let z=BigInt(q);return $==="-"?BigInt(-1)*z:z}let Q=parseInt(q,X);return $==="-"?-1*Q:Q}function P9(q,Z,X){let{value:J}=q;if(Z0(J)){let $=J.toString(Z);return J<0?"-"+X+$.substr(1):X+$}return U3.stringifyNumber(q)}var xJ={identify:Z0,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(q,Z,X)=>qq(q,2,2,X),stringify:(q)=>P9(q,2,"0b")},kJ={identify:Z0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(q,Z,X)=>qq(q,1,8,X),stringify:(q)=>P9(q,8,"0")},vJ={identify:Z0,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(q,Z,X)=>qq(q,0,10,X),stringify:U3.stringifyNumber},gJ={identify:Z0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(q,Z,X)=>qq(q,2,16,X),stringify:(q)=>P9(q,16,"0x")};hJ.int=vJ;hJ.intBin=xJ;hJ.intHex=gJ;hJ.intOct=kJ});var D9=D((cJ)=>{var Jq=S(),Zq=$1(),Xq=z1();class K1 extends Xq.YAMLMap{constructor(q){super(q);this.tag=K1.tag}add(q){let Z;if(Jq.isPair(q))Z=q;else if(q&&typeof q==="object"&&"key"in q&&"value"in q&&q.value===null)Z=new Zq.Pair(q.key,null);else Z=new Zq.Pair(q,null);if(!Xq.findPair(this.items,Z.key))this.items.push(Z)}get(q,Z){let X=Xq.findPair(this.items,q);return!Z&&Jq.isPair(X)?Jq.isScalar(X.key)?X.key.value:X.key:X}set(q,Z){if(typeof Z!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof Z}`);let X=Xq.findPair(this.items,q);if(X&&!Z)this.items.splice(this.items.indexOf(X),1);else if(!X&&Z)this.items.push(new Zq.Pair(q))}toJSON(q,Z){return super.toJSON(q,Z,Set)}toString(q,Z,X){if(!q)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},q,{allNullValues:!0}),Z,X);else throw Error("Set items must all have null values")}static from(q,Z,X){let{replacer:J}=X,$=new this(q);if(Z&&Symbol.iterator in Object(Z))for(let Q of Z){if(typeof J==="function")Q=J.call(Z,Q,Q);$.items.push(Zq.createPair(Q,null,X))}return $}}K1.tag="tag:yaml.org,2002:set";var pJ={collection:"map",identify:(q)=>q instanceof Set,nodeClass:K1,default:!1,tag:"tag:yaml.org,2002:set",createNode:(q,Z,X)=>K1.from(q,Z,X),resolve(q,Z){if(Jq.isMap(q))if(q.hasAllNullValues(!0))return Object.assign(new K1,q);else Z("Set items must all have null values");else Z("Expected a mapping for this tag");return q}};cJ.YAMLSet=K1;cJ.set=pJ});var O9=D((oJ)=>{var sJ=f1();function F9(q,Z){let X=q[0],J=X==="-"||X==="+"?q.substring(1):q,$=(z)=>Z?BigInt(z):Number(z),Q=J.replace(/_/g,"").split(":").reduce((z,H)=>z*$(60)+$(H),$(0));return X==="-"?$(-1)*Q:Q}function Y3(q){let{value:Z}=q,X=(z)=>z;if(typeof Z==="bigint")X=(z)=>BigInt(z);else if(isNaN(Z)||!isFinite(Z))return sJ.stringifyNumber(q);let J="";if(Z<0)J="-",Z*=X(-1);let $=X(60),Q=[Z%$];if(Z<60)Q.unshift(0);else if(Z=(Z-Q[0])/$,Q.unshift(Z%$),Z>=60)Z=(Z-Q[0])/$,Q.unshift(Z);return J+Q.map((z)=>String(z).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var rJ={identify:(q)=>typeof q==="bigint"||Number.isInteger(q),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(q,Z,{intAsBigInt:X})=>F9(q,X),stringify:Y3},nJ={identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:(q)=>F9(q,!1),stringify:Y3},B3={identify:(q)=>q instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(q){let Z=q.match(B3.test);if(!Z)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,X,J,$,Q,z,H]=Z.map(Number),U=Z[7]?Number((Z[7]+"00").substr(1,3)):0,G=Date.UTC(X,J-1,$,Q||0,z||0,H||0,U),Y=Z[8];if(Y&&Y!=="Z"){let B=F9(Y,!1);if(Math.abs(B)<30)B*=60;G-=60000*B}return new Date(G)},stringify:({value:q})=>q?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};oJ.floatTime=nJ;oJ.intTime=rJ;oJ.timestamp=B3});var _3=D((B$)=>{var Z$=E1(),X$=r0(),J$=C1(),$$=t1(),Q$=R9(),T3=z3(),N9=H3(),$q=G3(),z$=m0(),H$=M9(),U$=e0(),G$=D9(),A9=O9(),Y$=[Z$.map,J$.seq,$$.string,X$.nullTag,T3.trueTag,T3.falseTag,$q.intBin,$q.intOct,$q.int,$q.intHex,N9.floatNaN,N9.floatExp,N9.float,Q$.binary,z$.merge,H$.omap,U$.pairs,G$.set,A9.intTime,A9.floatTime,A9.timestamp];B$.schema=Y$});var F3=D((K$)=>{var V3=E1(),_$=r0(),I3=C1(),L$=t1(),W$=U9(),S9=Y9(),w9=T9(),R$=r2(),V$=o2(),M3=R9(),X0=m0(),K3=M9(),P3=e0(),L3=_3(),D3=D9(),Qq=O9(),W3=new Map([["core",R$.schema],["failsafe",[V3.map,I3.seq,L$.string]],["json",V$.schema],["yaml11",L3.schema],["yaml-1.1",L3.schema]]),R3={binary:M3.binary,bool:W$.boolTag,float:S9.float,floatExp:S9.floatExp,floatNaN:S9.floatNaN,floatTime:Qq.floatTime,int:w9.int,intHex:w9.intHex,intOct:w9.intOct,intTime:Qq.intTime,map:V3.map,merge:X0.merge,null:_$.nullTag,omap:K3.omap,pairs:P3.pairs,seq:I3.seq,set:D3.set,timestamp:Qq.timestamp},I$={"tag:yaml.org,2002:binary":M3.binary,"tag:yaml.org,2002:merge":X0.merge,"tag:yaml.org,2002:omap":K3.omap,"tag:yaml.org,2002:pairs":P3.pairs,"tag:yaml.org,2002:set":D3.set,"tag:yaml.org,2002:timestamp":Qq.timestamp};function M$(q,Z,X){let J=W3.get(Z);if(J&&!q)return X&&!J.includes(X0.merge)?J.concat(X0.merge):J.slice();let $=J;if(!$)if(Array.isArray(q))$=[];else{let Q=Array.from(W3.keys()).filter((z)=>z!=="yaml11").map((z)=>JSON.stringify(z)).join(", ");throw Error(`Unknown schema "${Z}"; use one of ${Q} or define customTags array`)}if(Array.isArray(q))for(let Q of q)$=$.concat(Q);else if(typeof q==="function")$=q($.slice());if(X)$=$.concat(X0.merge);return $.reduce((Q,z)=>{let H=typeof z==="string"?R3[z]:z;if(!H){let U=JSON.stringify(z),G=Object.keys(R3).map((Y)=>JSON.stringify(Y)).join(", ");throw Error(`Unknown custom tag ${U}; use one of ${G}`)}if(!Q.includes(H))Q.push(H);return Q},[])}K$.coreKnownTags=I$;K$.getTags=M$});var E9=D((S$)=>{var b9=S(),F$=E1(),O$=C1(),N$=t1(),zq=F3(),A$=(q,Z)=>q.key<Z.key?-1:q.key>Z.key?1:0;class j9{constructor({compat:q,customTags:Z,merge:X,resolveKnownTags:J,schema:$,sortMapEntries:Q,toStringDefaults:z}){this.compat=Array.isArray(q)?zq.getTags(q,"compat"):q?zq.getTags(null,q):null,this.name=typeof $==="string"&&$||"core",this.knownTags=J?zq.coreKnownTags:{},this.tags=zq.getTags(Z,this.name,X),this.toStringOptions=z??null,Object.defineProperty(this,b9.MAP,{value:F$.map}),Object.defineProperty(this,b9.SCALAR,{value:N$.string}),Object.defineProperty(this,b9.SEQ,{value:O$.seq}),this.sortMapEntries=typeof Q==="function"?Q:Q===!0?A$:null}clone(){let q=Object.create(j9.prototype,Object.getOwnPropertyDescriptors(this));return q.tags=this.tags.slice(),q}}S$.Schema=j9});var O3=D((E$)=>{var b$=S(),C9=s1(),J0=c1();function j$(q,Z){let X=[],J=Z.directives===!0;if(Z.directives!==!1&&q.directives){let U=q.directives.toString(q);if(U)X.push(U),J=!0;else if(q.directives.docStart)J=!0}if(J)X.push("---");let $=C9.createStringifyContext(q,Z),{commentString:Q}=$.options;if(q.commentBefore){if(X.length!==1)X.unshift("");let U=Q(q.commentBefore);X.unshift(J0.indentComment(U,""))}let z=!1,H=null;if(q.contents){if(b$.isNode(q.contents)){if(q.contents.spaceBefore&&J)X.push("");if(q.contents.commentBefore){let Y=Q(q.contents.commentBefore);X.push(J0.indentComment(Y,""))}$.forceBlockIndent=!!q.comment,H=q.contents.comment}let U=H?void 0:()=>z=!0,G=C9.stringify(q.contents,$,()=>H=null,U);if(H)G+=J0.lineComment(G,"",Q(H));if((G[0]==="|"||G[0]===">")&&X[X.length-1]==="---")X[X.length-1]=`--- ${G}`;else X.push(G)}else X.push(C9.stringify(q.contents,$));if(q.directives?.docEnd)if(q.comment){let U=Q(q.comment);if(U.includes(`
80
+ ${Q.comment}`:J.comment}J=$}q.items[X]=t0.isPair(J)?J:new V9.Pair(J)}else Z("Expected a sequence for this tag");return q}function e2(q,Z,X){let{replacer:J}=X,$=new _J.YAMLSeq(q);$.tag="tag:yaml.org,2002:pairs";let Q=0;if(Z&&Symbol.iterator in Object(Z))for(let z of Z){if(typeof J==="function")z=J.call(Z,String(Q++),z);let H,U;if(Array.isArray(z))if(z.length===2)H=z[0],U=z[1];else throw TypeError(`Expected [key, value] tuple: ${z}`);else if(z&&z instanceof Object){let G=Object.keys(z);if(G.length===1)H=G[0],U=z[H];else throw TypeError(`Expected tuple with one key, not ${G.length} keys`)}else H=z;$.items.push(V9.createPair(H,U,X))}return $}var LJ={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:t2,createNode:e2};WJ.createPairs=e2;WJ.pairs=LJ;WJ.resolvePairs=t2});var M9=D((PJ)=>{var q3=S(),I9=Z1(),q0=z1(),MJ=H1(),Z3=e0();class M1 extends MJ.YAMLSeq{constructor(){super();this.add=q0.YAMLMap.prototype.add.bind(this),this.delete=q0.YAMLMap.prototype.delete.bind(this),this.get=q0.YAMLMap.prototype.get.bind(this),this.has=q0.YAMLMap.prototype.has.bind(this),this.set=q0.YAMLMap.prototype.set.bind(this),this.tag=M1.tag}toJSON(q,Z){if(!Z)return super.toJSON(q);let X=new Map;if(Z?.onCreate)Z.onCreate(X);for(let J of this.items){let $,Q;if(q3.isPair(J))$=I9.toJS(J.key,"",Z),Q=I9.toJS(J.value,$,Z);else $=I9.toJS(J,"",Z);if(X.has($))throw Error("Ordered maps must not include duplicate keys");X.set($,Q)}return X}static from(q,Z,X){let J=Z3.createPairs(q,Z,X),$=new this;return $.items=J.items,$}}M1.tag="tag:yaml.org,2002:omap";var KJ={collection:"seq",identify:(q)=>q instanceof Map,nodeClass:M1,default:!1,tag:"tag:yaml.org,2002:omap",resolve(q,Z){let X=Z3.resolvePairs(q,Z),J=[];for(let{key:$}of X.items)if(q3.isScalar($))if(J.includes($.value))Z(`Ordered maps must not include duplicate keys: ${$.value}`);else J.push($.value);return Object.assign(new M1,X)},createNode:(q,Z,X)=>M1.from(q,Z,X)};PJ.YAMLOMap=M1;PJ.omap=KJ});var z3=D((OJ)=>{var X3=C();function J3({value:q,source:Z},X){if(Z&&(q?$3:Q3).test.test(Z))return Z;return q?X.options.trueStr:X.options.falseStr}var $3={identify:(q)=>q===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new X3.Scalar(!0),stringify:J3},Q3={identify:(q)=>q===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new X3.Scalar(!1),stringify:J3};OJ.falseTag=Q3;OJ.trueTag=$3});var H3=D((EJ)=>{var SJ=C(),K9=C1(),wJ={identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(q)=>q.slice(-3).toLowerCase()==="nan"?NaN:q[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:K9.stringifyNumber},bJ={identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:(q)=>parseFloat(q.replace(/_/g,"")),stringify(q){let Z=Number(q.value);return isFinite(Z)?Z.toExponential():K9.stringifyNumber(q)}},jJ={identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(q){let Z=new SJ.Scalar(parseFloat(q.replace(/_/g,""))),X=q.indexOf(".");if(X!==-1){let J=q.substring(X+1).replace(/_/g,"");if(J[J.length-1]==="0")Z.minFractionDigits=J.length}return Z},stringify:K9.stringifyNumber};EJ.float=jJ;EJ.floatExp=bJ;EJ.floatNaN=wJ});var G3=D((hJ)=>{var U3=C1(),Z0=(q)=>typeof q==="bigint"||Number.isInteger(q);function qq(q,Z,X,{intAsBigInt:J}){let $=q[0];if($==="-"||$==="+")Z+=1;if(q=q.substring(Z).replace(/_/g,""),J){switch(X){case 2:q=`0b${q}`;break;case 8:q=`0o${q}`;break;case 16:q=`0x${q}`;break}let z=BigInt(q);return $==="-"?BigInt(-1)*z:z}let Q=parseInt(q,X);return $==="-"?-1*Q:Q}function P9(q,Z,X){let{value:J}=q;if(Z0(J)){let $=J.toString(Z);return J<0?"-"+X+$.substr(1):X+$}return U3.stringifyNumber(q)}var xJ={identify:Z0,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(q,Z,X)=>qq(q,2,2,X),stringify:(q)=>P9(q,2,"0b")},kJ={identify:Z0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(q,Z,X)=>qq(q,1,8,X),stringify:(q)=>P9(q,8,"0")},vJ={identify:Z0,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(q,Z,X)=>qq(q,0,10,X),stringify:U3.stringifyNumber},gJ={identify:Z0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(q,Z,X)=>qq(q,2,16,X),stringify:(q)=>P9(q,16,"0x")};hJ.int=vJ;hJ.intBin=xJ;hJ.intHex=gJ;hJ.intOct=kJ});var D9=D((cJ)=>{var Jq=S(),Zq=$1(),Xq=z1();class K1 extends Xq.YAMLMap{constructor(q){super(q);this.tag=K1.tag}add(q){let Z;if(Jq.isPair(q))Z=q;else if(q&&typeof q==="object"&&"key"in q&&"value"in q&&q.value===null)Z=new Zq.Pair(q.key,null);else Z=new Zq.Pair(q,null);if(!Xq.findPair(this.items,Z.key))this.items.push(Z)}get(q,Z){let X=Xq.findPair(this.items,q);return!Z&&Jq.isPair(X)?Jq.isScalar(X.key)?X.key.value:X.key:X}set(q,Z){if(typeof Z!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof Z}`);let X=Xq.findPair(this.items,q);if(X&&!Z)this.items.splice(this.items.indexOf(X),1);else if(!X&&Z)this.items.push(new Zq.Pair(q))}toJSON(q,Z){return super.toJSON(q,Z,Set)}toString(q,Z,X){if(!q)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},q,{allNullValues:!0}),Z,X);else throw Error("Set items must all have null values")}static from(q,Z,X){let{replacer:J}=X,$=new this(q);if(Z&&Symbol.iterator in Object(Z))for(let Q of Z){if(typeof J==="function")Q=J.call(Z,Q,Q);$.items.push(Zq.createPair(Q,null,X))}return $}}K1.tag="tag:yaml.org,2002:set";var pJ={collection:"map",identify:(q)=>q instanceof Set,nodeClass:K1,default:!1,tag:"tag:yaml.org,2002:set",createNode:(q,Z,X)=>K1.from(q,Z,X),resolve(q,Z){if(Jq.isMap(q))if(q.hasAllNullValues(!0))return Object.assign(new K1,q);else Z("Set items must all have null values");else Z("Expected a mapping for this tag");return q}};cJ.YAMLSet=K1;cJ.set=pJ});var O9=D((oJ)=>{var sJ=C1();function F9(q,Z){let X=q[0],J=X==="-"||X==="+"?q.substring(1):q,$=(z)=>Z?BigInt(z):Number(z),Q=J.replace(/_/g,"").split(":").reduce((z,H)=>z*$(60)+$(H),$(0));return X==="-"?$(-1)*Q:Q}function Y3(q){let{value:Z}=q,X=(z)=>z;if(typeof Z==="bigint")X=(z)=>BigInt(z);else if(isNaN(Z)||!isFinite(Z))return sJ.stringifyNumber(q);let J="";if(Z<0)J="-",Z*=X(-1);let $=X(60),Q=[Z%$];if(Z<60)Q.unshift(0);else if(Z=(Z-Q[0])/$,Q.unshift(Z%$),Z>=60)Z=(Z-Q[0])/$,Q.unshift(Z);return J+Q.map((z)=>String(z).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var rJ={identify:(q)=>typeof q==="bigint"||Number.isInteger(q),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(q,Z,{intAsBigInt:X})=>F9(q,X),stringify:Y3},nJ={identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:(q)=>F9(q,!1),stringify:Y3},B3={identify:(q)=>q instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(q){let Z=q.match(B3.test);if(!Z)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,X,J,$,Q,z,H]=Z.map(Number),U=Z[7]?Number((Z[7]+"00").substr(1,3)):0,G=Date.UTC(X,J-1,$,Q||0,z||0,H||0,U),Y=Z[8];if(Y&&Y!=="Z"){let B=F9(Y,!1);if(Math.abs(B)<30)B*=60;G-=60000*B}return new Date(G)},stringify:({value:q})=>q?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};oJ.floatTime=nJ;oJ.intTime=rJ;oJ.timestamp=B3});var _3=D((B$)=>{var Z$=j1(),X$=r0(),J$=E1(),$$=t1(),Q$=R9(),T3=z3(),N9=H3(),$q=G3(),z$=m0(),H$=M9(),U$=e0(),G$=D9(),A9=O9(),Y$=[Z$.map,J$.seq,$$.string,X$.nullTag,T3.trueTag,T3.falseTag,$q.intBin,$q.intOct,$q.int,$q.intHex,N9.floatNaN,N9.floatExp,N9.float,Q$.binary,z$.merge,H$.omap,U$.pairs,G$.set,A9.intTime,A9.floatTime,A9.timestamp];B$.schema=Y$});var F3=D((K$)=>{var V3=j1(),_$=r0(),I3=E1(),L$=t1(),W$=U9(),S9=Y9(),w9=T9(),R$=r2(),V$=o2(),M3=R9(),X0=m0(),K3=M9(),P3=e0(),L3=_3(),D3=D9(),Qq=O9(),W3=new Map([["core",R$.schema],["failsafe",[V3.map,I3.seq,L$.string]],["json",V$.schema],["yaml11",L3.schema],["yaml-1.1",L3.schema]]),R3={binary:M3.binary,bool:W$.boolTag,float:S9.float,floatExp:S9.floatExp,floatNaN:S9.floatNaN,floatTime:Qq.floatTime,int:w9.int,intHex:w9.intHex,intOct:w9.intOct,intTime:Qq.intTime,map:V3.map,merge:X0.merge,null:_$.nullTag,omap:K3.omap,pairs:P3.pairs,seq:I3.seq,set:D3.set,timestamp:Qq.timestamp},I$={"tag:yaml.org,2002:binary":M3.binary,"tag:yaml.org,2002:merge":X0.merge,"tag:yaml.org,2002:omap":K3.omap,"tag:yaml.org,2002:pairs":P3.pairs,"tag:yaml.org,2002:set":D3.set,"tag:yaml.org,2002:timestamp":Qq.timestamp};function M$(q,Z,X){let J=W3.get(Z);if(J&&!q)return X&&!J.includes(X0.merge)?J.concat(X0.merge):J.slice();let $=J;if(!$)if(Array.isArray(q))$=[];else{let Q=Array.from(W3.keys()).filter((z)=>z!=="yaml11").map((z)=>JSON.stringify(z)).join(", ");throw Error(`Unknown schema "${Z}"; use one of ${Q} or define customTags array`)}if(Array.isArray(q))for(let Q of q)$=$.concat(Q);else if(typeof q==="function")$=q($.slice());if(X)$=$.concat(X0.merge);return $.reduce((Q,z)=>{let H=typeof z==="string"?R3[z]:z;if(!H){let U=JSON.stringify(z),G=Object.keys(R3).map((Y)=>JSON.stringify(Y)).join(", ");throw Error(`Unknown custom tag ${U}; use one of ${G}`)}if(!Q.includes(H))Q.push(H);return Q},[])}K$.coreKnownTags=I$;K$.getTags=M$});var E9=D((S$)=>{var b9=S(),F$=j1(),O$=E1(),N$=t1(),zq=F3(),A$=(q,Z)=>q.key<Z.key?-1:q.key>Z.key?1:0;class j9{constructor({compat:q,customTags:Z,merge:X,resolveKnownTags:J,schema:$,sortMapEntries:Q,toStringDefaults:z}){this.compat=Array.isArray(q)?zq.getTags(q,"compat"):q?zq.getTags(null,q):null,this.name=typeof $==="string"&&$||"core",this.knownTags=J?zq.coreKnownTags:{},this.tags=zq.getTags(Z,this.name,X),this.toStringOptions=z??null,Object.defineProperty(this,b9.MAP,{value:F$.map}),Object.defineProperty(this,b9.SCALAR,{value:N$.string}),Object.defineProperty(this,b9.SEQ,{value:O$.seq}),this.sortMapEntries=typeof Q==="function"?Q:Q===!0?A$:null}clone(){let q=Object.create(j9.prototype,Object.getOwnPropertyDescriptors(this));return q.tags=this.tags.slice(),q}}S$.Schema=j9});var O3=D((E$)=>{var b$=S(),C9=s1(),J0=c1();function j$(q,Z){let X=[],J=Z.directives===!0;if(Z.directives!==!1&&q.directives){let U=q.directives.toString(q);if(U)X.push(U),J=!0;else if(q.directives.docStart)J=!0}if(J)X.push("---");let $=C9.createStringifyContext(q,Z),{commentString:Q}=$.options;if(q.commentBefore){if(X.length!==1)X.unshift("");let U=Q(q.commentBefore);X.unshift(J0.indentComment(U,""))}let z=!1,H=null;if(q.contents){if(b$.isNode(q.contents)){if(q.contents.spaceBefore&&J)X.push("");if(q.contents.commentBefore){let Y=Q(q.contents.commentBefore);X.push(J0.indentComment(Y,""))}$.forceBlockIndent=!!q.comment,H=q.contents.comment}let U=H?void 0:()=>z=!0,G=C9.stringify(q.contents,$,()=>H=null,U);if(H)G+=J0.lineComment(G,"",Q(H));if((G[0]==="|"||G[0]===">")&&X[X.length-1]==="---")X[X.length-1]=`--- ${G}`;else X.push(G)}else X.push(C9.stringify(q.contents,$));if(q.directives?.docEnd)if(q.comment){let U=Q(q.comment);if(U.includes(`
81
81
  `))X.push("..."),X.push(J0.indentComment(U,""));else X.push(`... ${U}`)}else X.push("...");else{let U=q.comment;if(U&&z)U=U.replace(/^\n+/,"");if(U){if((!z||H)&&X[X.length-1]!=="")X.push("");X.push(J0.indentComment(Q(U),""))}}return X.join(`
82
82
  `)+`
83
- `}E$.stringifyDocument=j$});var $0=D((u$)=>{var f$=l1(),y1=x0(),u=S(),y$=$1(),x$=Z1(),k$=E9(),v$=O3(),f9=C0(),g$=tq(),h$=p1(),y9=oq();class x9{constructor(q,Z,X){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,u.NODE_TYPE,{value:u.DOC});let J=null;if(typeof Z==="function"||Array.isArray(Z))J=Z;else if(X===void 0&&Z)X=Z,Z=void 0;let $=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},X);this.options=$;let{version:Q}=$;if(X?._directives){if(this.directives=X._directives.atDocument(),this.directives.yaml.explicit)Q=this.directives.yaml.version}else this.directives=new y9.Directives({version:Q});this.setSchema(Q,X),this.contents=q===void 0?null:this.createNode(q,J,X)}clone(){let q=Object.create(x9.prototype,{[u.NODE_TYPE]:{value:u.DOC}});if(q.commentBefore=this.commentBefore,q.comment=this.comment,q.errors=this.errors.slice(),q.warnings=this.warnings.slice(),q.options=Object.assign({},this.options),this.directives)q.directives=this.directives.clone();if(q.schema=this.schema.clone(),q.contents=u.isNode(this.contents)?this.contents.clone(q.schema):this.contents,this.range)q.range=this.range.slice();return q}add(q){if(x1(this.contents))this.contents.add(q)}addIn(q,Z){if(x1(this.contents))this.contents.addIn(q,Z)}createAlias(q,Z){if(!q.anchor){let X=f9.anchorNames(this);q.anchor=!Z||X.has(Z)?f9.findNewAnchor(Z||"a",X):Z}return new f$.Alias(q.anchor)}createNode(q,Z,X){let J=void 0;if(typeof Z==="function")q=Z.call({"":q},"",q),J=Z;else if(Array.isArray(Z)){let T=(I)=>typeof I==="number"||I instanceof String||I instanceof Number,L=Z.filter(T).map(String);if(L.length>0)Z=Z.concat(L);J=Z}else if(X===void 0&&Z)X=Z,Z=void 0;let{aliasDuplicateObjects:$,anchorPrefix:Q,flow:z,keepUndefined:H,onTagObj:U,tag:G}=X??{},{onAnchor:Y,setAnchors:B,sourceObjects:_}=f9.createNodeAnchors(this,Q||"a"),R={aliasDuplicateObjects:$??!0,keepUndefined:H??!1,onAnchor:Y,onTagObj:U,replacer:J,schema:this.schema,sourceObjects:_},W=h$.createNode(q,G,R);if(z&&u.isCollection(W))W.flow=!0;return B(),W}createPair(q,Z,X={}){let J=this.createNode(q,null,X),$=this.createNode(Z,null,X);return new y$.Pair(J,$)}delete(q){return x1(this.contents)?this.contents.delete(q):!1}deleteIn(q){if(y1.isEmptyPath(q)){if(this.contents==null)return!1;return this.contents=null,!0}return x1(this.contents)?this.contents.deleteIn(q):!1}get(q,Z){return u.isCollection(this.contents)?this.contents.get(q,Z):void 0}getIn(q,Z){if(y1.isEmptyPath(q))return!Z&&u.isScalar(this.contents)?this.contents.value:this.contents;return u.isCollection(this.contents)?this.contents.getIn(q,Z):void 0}has(q){return u.isCollection(this.contents)?this.contents.has(q):!1}hasIn(q){if(y1.isEmptyPath(q))return this.contents!==void 0;return u.isCollection(this.contents)?this.contents.hasIn(q):!1}set(q,Z){if(this.contents==null)this.contents=y1.collectionFromPath(this.schema,[q],Z);else if(x1(this.contents))this.contents.set(q,Z)}setIn(q,Z){if(y1.isEmptyPath(q))this.contents=Z;else if(this.contents==null)this.contents=y1.collectionFromPath(this.schema,Array.from(q),Z);else if(x1(this.contents))this.contents.setIn(q,Z)}setSchema(q,Z={}){if(typeof q==="number")q=String(q);let X;switch(q){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new y9.Directives({version:"1.1"});X={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=q;else this.directives=new y9.Directives({version:q});X={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;X=null;break;default:{let J=JSON.stringify(q);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${J}`)}}if(Z.schema instanceof Object)this.schema=Z.schema;else if(X)this.schema=new k$.Schema(Object.assign(X,Z));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:q,jsonArg:Z,mapAsMap:X,maxAliasCount:J,onAnchor:$,reviver:Q}={}){let z={anchors:new Map,doc:this,keep:!q,mapAsMap:X===!0,mapKeyWarned:!1,maxAliasCount:typeof J==="number"?J:100},H=x$.toJS(this.contents,Z??"",z);if(typeof $==="function")for(let{count:U,res:G}of z.anchors.values())$(G,U);return typeof Q==="function"?g$.applyReviver(Q,{"":H},"",H):H}toJSON(q,Z){return this.toJS({json:!0,jsonArg:q,mapAsMap:!1,onAnchor:Z})}toString(q={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in q&&(!Number.isInteger(q.indent)||Number(q.indent)<=0)){let Z=JSON.stringify(q.indent);throw Error(`"indent" option must be a positive integer, not ${Z}`)}return v$.stringifyDocument(this,q)}}function x1(q){if(u.isCollection(q))return!0;throw Error("Expected a YAML collection as document contents")}u$.Document=x9});var Q0=D((l$)=>{class Hq extends Error{constructor(q,Z,X,J){super();this.name=q,this.code=X,this.message=J,this.pos=Z}}class N3 extends Hq{constructor(q,Z,X){super("YAMLParseError",q,Z,X)}}class A3 extends Hq{constructor(q,Z,X){super("YAMLWarning",q,Z,X)}}var d$=(q,Z)=>(X)=>{if(X.pos[0]===-1)return;X.linePos=X.pos.map((H)=>Z.linePos(H));let{line:J,col:$}=X.linePos[0];X.message+=` at line ${J}, column ${$}`;let Q=$-1,z=q.substring(Z.lineStarts[J-1],Z.lineStarts[J]).replace(/[\n\r]+$/,"");if(Q>=60&&z.length>80){let H=Math.min(Q-39,z.length-79);z="…"+z.substring(H),Q-=H-1}if(z.length>80)z=z.substring(0,79)+"…";if(J>1&&/^ *$/.test(z.substring(0,Q))){let H=q.substring(Z.lineStarts[J-2],Z.lineStarts[J-1]);if(H.length>80)H=H.substring(0,79)+`…
83
+ `}E$.stringifyDocument=j$});var $0=D((u$)=>{var f$=l1(),f1=x0(),u=S(),y$=$1(),x$=Z1(),k$=E9(),v$=O3(),f9=C0(),g$=tq(),h$=p1(),y9=oq();class x9{constructor(q,Z,X){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,u.NODE_TYPE,{value:u.DOC});let J=null;if(typeof Z==="function"||Array.isArray(Z))J=Z;else if(X===void 0&&Z)X=Z,Z=void 0;let $=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},X);this.options=$;let{version:Q}=$;if(X?._directives){if(this.directives=X._directives.atDocument(),this.directives.yaml.explicit)Q=this.directives.yaml.version}else this.directives=new y9.Directives({version:Q});this.setSchema(Q,X),this.contents=q===void 0?null:this.createNode(q,J,X)}clone(){let q=Object.create(x9.prototype,{[u.NODE_TYPE]:{value:u.DOC}});if(q.commentBefore=this.commentBefore,q.comment=this.comment,q.errors=this.errors.slice(),q.warnings=this.warnings.slice(),q.options=Object.assign({},this.options),this.directives)q.directives=this.directives.clone();if(q.schema=this.schema.clone(),q.contents=u.isNode(this.contents)?this.contents.clone(q.schema):this.contents,this.range)q.range=this.range.slice();return q}add(q){if(y1(this.contents))this.contents.add(q)}addIn(q,Z){if(y1(this.contents))this.contents.addIn(q,Z)}createAlias(q,Z){if(!q.anchor){let X=f9.anchorNames(this);q.anchor=!Z||X.has(Z)?f9.findNewAnchor(Z||"a",X):Z}return new f$.Alias(q.anchor)}createNode(q,Z,X){let J=void 0;if(typeof Z==="function")q=Z.call({"":q},"",q),J=Z;else if(Array.isArray(Z)){let T=(I)=>typeof I==="number"||I instanceof String||I instanceof Number,L=Z.filter(T).map(String);if(L.length>0)Z=Z.concat(L);J=Z}else if(X===void 0&&Z)X=Z,Z=void 0;let{aliasDuplicateObjects:$,anchorPrefix:Q,flow:z,keepUndefined:H,onTagObj:U,tag:G}=X??{},{onAnchor:Y,setAnchors:B,sourceObjects:_}=f9.createNodeAnchors(this,Q||"a"),R={aliasDuplicateObjects:$??!0,keepUndefined:H??!1,onAnchor:Y,onTagObj:U,replacer:J,schema:this.schema,sourceObjects:_},W=h$.createNode(q,G,R);if(z&&u.isCollection(W))W.flow=!0;return B(),W}createPair(q,Z,X={}){let J=this.createNode(q,null,X),$=this.createNode(Z,null,X);return new y$.Pair(J,$)}delete(q){return y1(this.contents)?this.contents.delete(q):!1}deleteIn(q){if(f1.isEmptyPath(q)){if(this.contents==null)return!1;return this.contents=null,!0}return y1(this.contents)?this.contents.deleteIn(q):!1}get(q,Z){return u.isCollection(this.contents)?this.contents.get(q,Z):void 0}getIn(q,Z){if(f1.isEmptyPath(q))return!Z&&u.isScalar(this.contents)?this.contents.value:this.contents;return u.isCollection(this.contents)?this.contents.getIn(q,Z):void 0}has(q){return u.isCollection(this.contents)?this.contents.has(q):!1}hasIn(q){if(f1.isEmptyPath(q))return this.contents!==void 0;return u.isCollection(this.contents)?this.contents.hasIn(q):!1}set(q,Z){if(this.contents==null)this.contents=f1.collectionFromPath(this.schema,[q],Z);else if(y1(this.contents))this.contents.set(q,Z)}setIn(q,Z){if(f1.isEmptyPath(q))this.contents=Z;else if(this.contents==null)this.contents=f1.collectionFromPath(this.schema,Array.from(q),Z);else if(y1(this.contents))this.contents.setIn(q,Z)}setSchema(q,Z={}){if(typeof q==="number")q=String(q);let X;switch(q){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new y9.Directives({version:"1.1"});X={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=q;else this.directives=new y9.Directives({version:q});X={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;X=null;break;default:{let J=JSON.stringify(q);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${J}`)}}if(Z.schema instanceof Object)this.schema=Z.schema;else if(X)this.schema=new k$.Schema(Object.assign(X,Z));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:q,jsonArg:Z,mapAsMap:X,maxAliasCount:J,onAnchor:$,reviver:Q}={}){let z={anchors:new Map,doc:this,keep:!q,mapAsMap:X===!0,mapKeyWarned:!1,maxAliasCount:typeof J==="number"?J:100},H=x$.toJS(this.contents,Z??"",z);if(typeof $==="function")for(let{count:U,res:G}of z.anchors.values())$(G,U);return typeof Q==="function"?g$.applyReviver(Q,{"":H},"",H):H}toJSON(q,Z){return this.toJS({json:!0,jsonArg:q,mapAsMap:!1,onAnchor:Z})}toString(q={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in q&&(!Number.isInteger(q.indent)||Number(q.indent)<=0)){let Z=JSON.stringify(q.indent);throw Error(`"indent" option must be a positive integer, not ${Z}`)}return v$.stringifyDocument(this,q)}}function y1(q){if(u.isCollection(q))return!0;throw Error("Expected a YAML collection as document contents")}u$.Document=x9});var Q0=D((l$)=>{class Hq extends Error{constructor(q,Z,X,J){super();this.name=q,this.code=X,this.message=J,this.pos=Z}}class N3 extends Hq{constructor(q,Z,X){super("YAMLParseError",q,Z,X)}}class A3 extends Hq{constructor(q,Z,X){super("YAMLWarning",q,Z,X)}}var d$=(q,Z)=>(X)=>{if(X.pos[0]===-1)return;X.linePos=X.pos.map((H)=>Z.linePos(H));let{line:J,col:$}=X.linePos[0];X.message+=` at line ${J}, column ${$}`;let Q=$-1,z=q.substring(Z.lineStarts[J-1],Z.lineStarts[J]).replace(/[\n\r]+$/,"");if(Q>=60&&z.length>80){let H=Math.min(Q-39,z.length-79);z="…"+z.substring(H),Q-=H-1}if(z.length>80)z=z.substring(0,79)+"…";if(J>1&&/^ *$/.test(z.substring(0,Q))){let H=q.substring(Z.lineStarts[J-2],Z.lineStarts[J-1]);if(H.length>80)H=H.substring(0,79)+`…
84
84
  `;z=H+z}if(/[^ ]/.test(z)){let H=1,U=X.linePos[1];if(U?.line===J&&U.col>$)H=Math.max(1,Math.min(U.col-$,80-Q));let G=" ".repeat(Q)+"^".repeat(H);X.message+=`:
85
85
 
86
86
  ${z}
@@ -88,7 +88,7 @@ ${G}
88
88
  `}};l$.YAMLError=Hq;l$.YAMLParseError=N3;l$.YAMLWarning=A3;l$.prettifyError=d$});var z0=D((r$)=>{function s$(q,{flow:Z,indicator:X,next:J,offset:$,onError:Q,parentIndent:z,startOnNewline:H}){let U=!1,G=H,Y=H,B="",_="",R=!1,W=!1,T=null,L=null,I=null,M=null,P=null,O=null,N=null;for(let V of q){if(W){if(V.type!=="space"&&V.type!=="newline"&&V.type!=="comma")Q(V.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");W=!1}if(T){if(G&&V.type!=="comment"&&V.type!=="newline")Q(T,"TAB_AS_INDENT","Tabs are not allowed as indentation");T=null}switch(V.type){case"space":if(!Z&&(X!=="doc-start"||J?.type!=="flow-collection")&&V.source.includes("\t"))T=V;Y=!0;break;case"comment":{if(!Y)Q(V,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let w=V.source.substring(1)||" ";if(!B)B=w;else B+=_+w;_="",G=!1;break}case"newline":if(G){if(B)B+=V.source;else if(!O||X!=="seq-item-ind")U=!0}else _+=V.source;if(G=!0,R=!0,L||I)M=V;Y=!0;break;case"anchor":if(L)Q(V,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(V.source.endsWith(":"))Q(V.offset+V.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);L=V,N??(N=V.offset),G=!1,Y=!1,W=!0;break;case"tag":{if(I)Q(V,"MULTIPLE_TAGS","A node can have at most one tag");I=V,N??(N=V.offset),G=!1,Y=!1,W=!0;break}case X:if(L||I)Q(V,"BAD_PROP_ORDER",`Anchors and tags must be after the ${V.source} indicator`);if(O)Q(V,"UNEXPECTED_TOKEN",`Unexpected ${V.source} in ${Z??"collection"}`);O=V,G=X==="seq-item-ind"||X==="explicit-key-ind",Y=!1;break;case"comma":if(Z){if(P)Q(V,"UNEXPECTED_TOKEN",`Unexpected , in ${Z}`);P=V,G=!1,Y=!1;break}default:Q(V,"UNEXPECTED_TOKEN",`Unexpected ${V.type} token`),G=!1,Y=!1}}let A=q[q.length-1],K=A?A.offset+A.source.length:$;if(W&&J&&J.type!=="space"&&J.type!=="newline"&&J.type!=="comma"&&(J.type!=="scalar"||J.source!==""))Q(J.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(T&&(G&&T.indent<=z||J?.type==="block-map"||J?.type==="block-seq"))Q(T,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:P,found:O,spaceBefore:U,comment:B,hasNewline:R,anchor:L,tag:I,newlineAfterProp:M,end:K,start:N??K}}r$.resolveProps=s$});var Uq=D((o$)=>{function k9(q){if(!q)return null;switch(q.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(q.source.includes(`
89
89
  `))return!0;if(q.end){for(let Z of q.end)if(Z.type==="newline")return!0}return!1;case"flow-collection":for(let Z of q.items){for(let X of Z.start)if(X.type==="newline")return!0;if(Z.sep){for(let X of Z.sep)if(X.type==="newline")return!0}if(k9(Z.key)||k9(Z.value))return!0}return!1;default:return!0}}o$.containsNewline=k9});var v9=D((ZQ)=>{var e$=Uq();function qQ(q,Z,X){if(Z?.type==="flow-collection"){let J=Z.end[0];if(J.indent===q&&(J.source==="]"||J.source==="}")&&e$.containsNewline(Z))X(J,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}ZQ.flowIndentCheck=qQ});var g9=D(($Q)=>{var S3=S();function JQ(q,Z,X){let{uniqueKeys:J}=q.options;if(J===!1)return!1;let $=typeof J==="function"?J:(Q,z)=>Q===z||S3.isScalar(Q)&&S3.isScalar(z)&&Q.value===z.value;return Z.some((Q)=>$(Q.key,X))}$Q.mapIncludes=JQ});var C3=D((YQ)=>{var w3=$1(),zQ=z1(),b3=z0(),HQ=Uq(),j3=v9(),UQ=g9(),E3="All mapping items must start at the same column";function GQ({composeNode:q,composeEmptyNode:Z},X,J,$,Q){let H=new(Q?.nodeClass??zQ.YAMLMap)(X.schema);if(X.atRoot)X.atRoot=!1;let U=J.offset,G=null;for(let Y of J.items){let{start:B,key:_,sep:R,value:W}=Y,T=b3.resolveProps(B,{indicator:"explicit-key-ind",next:_??R?.[0],offset:U,onError:$,parentIndent:J.indent,startOnNewline:!0}),L=!T.found;if(L){if(_){if(_.type==="block-seq")$(U,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in _&&_.indent!==J.indent)$(U,"BAD_INDENT",E3)}if(!T.anchor&&!T.tag&&!R){if(G=T.end,T.comment)if(H.comment)H.comment+=`
90
90
  `+T.comment;else H.comment=T.comment;continue}if(T.newlineAfterProp||HQ.containsNewline(_))$(_??B[B.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(T.found?.indent!==J.indent)$(U,"BAD_INDENT",E3);X.atKey=!0;let I=T.end,M=_?q(X,_,T,$):Z(X,I,B,null,T,$);if(X.schema.compat)j3.flowIndentCheck(J.indent,_,$);if(X.atKey=!1,UQ.mapIncludes(X,H.items,M))$(I,"DUPLICATE_KEY","Map keys must be unique");let P=b3.resolveProps(R??[],{indicator:"map-value-ind",next:W,offset:M.range[2],onError:$,parentIndent:J.indent,startOnNewline:!_||_.type==="block-scalar"});if(U=P.end,P.found){if(L){if(W?.type==="block-map"&&!P.hasNewline)$(U,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(X.options.strict&&T.start<P.found.offset-1024)$(M.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let O=W?q(X,W,P,$):Z(X,U,R,null,P,$);if(X.schema.compat)j3.flowIndentCheck(J.indent,W,$);U=O.range[2];let N=new w3.Pair(M,O);if(X.options.keepSourceTokens)N.srcToken=Y;H.items.push(N)}else{if(L)$(M.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(P.comment)if(M.comment)M.comment+=`
91
- `+P.comment;else M.comment=P.comment;let O=new w3.Pair(M);if(X.options.keepSourceTokens)O.srcToken=Y;H.items.push(O)}}if(G&&G<U)$(G,"IMPOSSIBLE","Map comment with trailing content");return H.range=[J.offset,U,G??U],H}YQ.resolveBlockMap=GQ});var f3=D((RQ)=>{var TQ=H1(),_Q=z0(),LQ=v9();function WQ({composeNode:q,composeEmptyNode:Z},X,J,$,Q){let H=new(Q?.nodeClass??TQ.YAMLSeq)(X.schema);if(X.atRoot)X.atRoot=!1;if(X.atKey)X.atKey=!1;let U=J.offset,G=null;for(let{start:Y,value:B}of J.items){let _=_Q.resolveProps(Y,{indicator:"seq-item-ind",next:B,offset:U,onError:$,parentIndent:J.indent,startOnNewline:!0});if(!_.found)if(_.anchor||_.tag||B)if(B?.type==="block-seq")$(_.end,"BAD_INDENT","All sequence items must start at the same column");else $(U,"MISSING_CHAR","Sequence item without - indicator");else{if(G=_.end,_.comment)H.comment=_.comment;continue}let R=B?q(X,B,_,$):Z(X,_.end,Y,null,_,$);if(X.schema.compat)LQ.flowIndentCheck(J.indent,B,$);U=R.range[2],H.items.push(R)}return H.range=[J.offset,U,G??U],H}RQ.resolveBlockSeq=WQ});var k1=D((MQ)=>{function IQ(q,Z,X,J){let $="";if(q){let Q=!1,z="";for(let H of q){let{source:U,type:G}=H;switch(G){case"space":Q=!0;break;case"comment":{if(X&&!Q)J(H,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let Y=U.substring(1)||" ";if(!$)$=Y;else $+=z+Y;z="";break}case"newline":if($)z+=U;Q=!0;break;default:J(H,"UNEXPECTED_TOKEN",`Unexpected ${G} at node end`)}Z+=U.length}}return{comment:$,offset:Z}}MQ.resolveEnd=IQ});var k3=D((wQ)=>{var PQ=S(),DQ=$1(),y3=z1(),FQ=H1(),OQ=k1(),x3=z0(),NQ=Uq(),AQ=g9(),h9="Block collections are not allowed within flow collections",u9=(q)=>q&&(q.type==="block-map"||q.type==="block-seq");function SQ({composeNode:q,composeEmptyNode:Z},X,J,$,Q){let z=J.start.source==="{",H=z?"flow map":"flow sequence",G=new(Q?.nodeClass??(z?y3.YAMLMap:FQ.YAMLSeq))(X.schema);G.flow=!0;let Y=X.atRoot;if(Y)X.atRoot=!1;if(X.atKey)X.atKey=!1;let B=J.offset+J.start.source.length;for(let L=0;L<J.items.length;++L){let I=J.items[L],{start:M,key:P,sep:O,value:N}=I,A=x3.resolveProps(M,{flow:H,indicator:"explicit-key-ind",next:P??O?.[0],offset:B,onError:$,parentIndent:J.indent,startOnNewline:!1});if(!A.found){if(!A.anchor&&!A.tag&&!O&&!N){if(L===0&&A.comma)$(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${H}`);else if(L<J.items.length-1)$(A.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${H}`);if(A.comment)if(G.comment)G.comment+=`
91
+ `+P.comment;else M.comment=P.comment;let O=new w3.Pair(M);if(X.options.keepSourceTokens)O.srcToken=Y;H.items.push(O)}}if(G&&G<U)$(G,"IMPOSSIBLE","Map comment with trailing content");return H.range=[J.offset,U,G??U],H}YQ.resolveBlockMap=GQ});var f3=D((RQ)=>{var TQ=H1(),_Q=z0(),LQ=v9();function WQ({composeNode:q,composeEmptyNode:Z},X,J,$,Q){let H=new(Q?.nodeClass??TQ.YAMLSeq)(X.schema);if(X.atRoot)X.atRoot=!1;if(X.atKey)X.atKey=!1;let U=J.offset,G=null;for(let{start:Y,value:B}of J.items){let _=_Q.resolveProps(Y,{indicator:"seq-item-ind",next:B,offset:U,onError:$,parentIndent:J.indent,startOnNewline:!0});if(!_.found)if(_.anchor||_.tag||B)if(B?.type==="block-seq")$(_.end,"BAD_INDENT","All sequence items must start at the same column");else $(U,"MISSING_CHAR","Sequence item without - indicator");else{if(G=_.end,_.comment)H.comment=_.comment;continue}let R=B?q(X,B,_,$):Z(X,_.end,Y,null,_,$);if(X.schema.compat)LQ.flowIndentCheck(J.indent,B,$);U=R.range[2],H.items.push(R)}return H.range=[J.offset,U,G??U],H}RQ.resolveBlockSeq=WQ});var x1=D((MQ)=>{function IQ(q,Z,X,J){let $="";if(q){let Q=!1,z="";for(let H of q){let{source:U,type:G}=H;switch(G){case"space":Q=!0;break;case"comment":{if(X&&!Q)J(H,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let Y=U.substring(1)||" ";if(!$)$=Y;else $+=z+Y;z="";break}case"newline":if($)z+=U;Q=!0;break;default:J(H,"UNEXPECTED_TOKEN",`Unexpected ${G} at node end`)}Z+=U.length}}return{comment:$,offset:Z}}MQ.resolveEnd=IQ});var k3=D((wQ)=>{var PQ=S(),DQ=$1(),y3=z1(),FQ=H1(),OQ=x1(),x3=z0(),NQ=Uq(),AQ=g9(),h9="Block collections are not allowed within flow collections",u9=(q)=>q&&(q.type==="block-map"||q.type==="block-seq");function SQ({composeNode:q,composeEmptyNode:Z},X,J,$,Q){let z=J.start.source==="{",H=z?"flow map":"flow sequence",G=new(Q?.nodeClass??(z?y3.YAMLMap:FQ.YAMLSeq))(X.schema);G.flow=!0;let Y=X.atRoot;if(Y)X.atRoot=!1;if(X.atKey)X.atKey=!1;let B=J.offset+J.start.source.length;for(let L=0;L<J.items.length;++L){let I=J.items[L],{start:M,key:P,sep:O,value:N}=I,A=x3.resolveProps(M,{flow:H,indicator:"explicit-key-ind",next:P??O?.[0],offset:B,onError:$,parentIndent:J.indent,startOnNewline:!1});if(!A.found){if(!A.anchor&&!A.tag&&!O&&!N){if(L===0&&A.comma)$(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${H}`);else if(L<J.items.length-1)$(A.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${H}`);if(A.comment)if(G.comment)G.comment+=`
92
92
  `+A.comment;else G.comment=A.comment;B=A.end;continue}if(!z&&X.options.strict&&NQ.containsNewline(P))$(P,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(L===0){if(A.comma)$(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${H}`)}else{if(!A.comma)$(A.start,"MISSING_CHAR",`Missing , between ${H} items`);if(A.comment){let K="";q:for(let V of M)switch(V.type){case"comma":case"space":break;case"comment":K=V.source.substring(1);break q;default:break q}if(K){let V=G.items[G.items.length-1];if(PQ.isPair(V))V=V.value??V.key;if(V.comment)V.comment+=`
93
93
  `+K;else V.comment=K;A.comment=A.comment.substring(K.length+1)}}}if(!z&&!O&&!A.found){let K=N?q(X,N,A,$):Z(X,A.end,O,null,A,$);if(G.items.push(K),B=K.range[2],u9(N))$(K.range,"BLOCK_IN_FLOW",h9)}else{X.atKey=!0;let K=A.end,V=P?q(X,P,A,$):Z(X,K,M,null,A,$);if(u9(P))$(V.range,"BLOCK_IN_FLOW",h9);X.atKey=!1;let w=x3.resolveProps(O??[],{flow:H,indicator:"map-value-ind",next:N,offset:V.range[2],onError:$,parentIndent:J.indent,startOnNewline:!1});if(w.found){if(!z&&!A.found&&X.options.strict){if(O)for(let E of O){if(E===w.found)break;if(E.type==="newline"){$(E,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(A.start<w.found.offset-1024)$(w.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(N)if("source"in N&&N.source?.[0]===":")$(N,"MISSING_CHAR",`Missing space after : in ${H}`);else $(w.start,"MISSING_CHAR",`Missing , or : between ${H} items`);let y=N?q(X,N,w,$):w.found?Z(X,w.end,O,null,w,$):null;if(y){if(u9(N))$(y.range,"BLOCK_IN_FLOW",h9)}else if(w.comment)if(V.comment)V.comment+=`
94
94
  `+w.comment;else V.comment=w.comment;let x=new DQ.Pair(V,y);if(X.options.keepSourceTokens)x.srcToken=I;if(z){let E=G;if(AQ.mapIncludes(X,E.items,V))$(K,"DUPLICATE_KEY","Map keys must be unique");E.items.push(x)}else{let E=new y3.YAMLMap(X.schema);E.flow=!0,E.items.push(x);let D0=(y??V).range;E.range=[V.range[0],D0[1],D0[2]],G.items.push(E)}B=y?y.range[2]:w.end}}let _=z?"}":"]",[R,...W]=J.end,T=B;if(R?.source===_)T=R.offset+R.source.length;else{let L=H[0].toUpperCase()+H.substring(1),I=Y?`${L} must end with a ${_}`:`${L} in block collection must be sufficiently indented and end with a ${_}`;if($(B,Y?"MISSING_CHAR":"BAD_INDENT",I),R&&R.source.length!==1)W.unshift(R)}if(W.length>0){let L=OQ.resolveEnd(W,T,X.options.strict,$);if(L.comment)if(G.comment)G.comment+=`
@@ -107,7 +107,7 @@ ${G}
107
107
  `+z[T][0].slice(U);if(B[B.length-1]!==`
108
108
  `)B+=`
109
109
  `;break;default:B+=`
110
- `}let W=J+$.length+Z.source.length;return{value:B,type:Q,comment:$.comment,range:[J,W,W]}}function mQ({offset:q,props:Z},X,J){if(Z[0].type!=="block-scalar-header")return J(Z[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:$}=Z[0],Q=$[0],z=0,H="",U=-1;for(let _=1;_<$.length;++_){let R=$[_];if(!H&&(R==="-"||R==="+"))H=R;else{let W=Number(R);if(!z&&W)z=W;else if(U===-1)U=q+_}}if(U!==-1)J(U,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${$}`);let G=!1,Y="",B=$.length;for(let _=1;_<Z.length;++_){let R=Z[_];switch(R.type){case"space":G=!0;case"newline":B+=R.source.length;break;case"comment":if(X&&!G)J(R,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");B+=R.source.length,Y=R.source.substring(1);break;case"error":J(R,"UNEXPECTED_TOKEN",R.message),B+=R.source.length;break;default:{let W=`Unexpected token in block scalar header: ${R.type}`;J(R,"UNEXPECTED_TOKEN",W);let T=R.source;if(T&&typeof T==="string")B+=T.length}}}return{mode:Q,indent:z,chomp:H,comment:Y,length:B}}function dQ(q){let Z=q.split(/\n( *)/),X=Z[0],J=X.match(/^( *)/),Q=[J?.[1]?[J[1],X.slice(J[1].length)]:["",X]];for(let z=1;z<Z.length;z+=2)Q.push([Z[z],Z[z+1]]);return Q}lQ.resolveBlockScalar=uQ});var c9=D((eQ)=>{var p9=C(),cQ=k1();function iQ(q,Z,X){let{offset:J,type:$,source:Q,end:z}=q,H,U,G=(_,R,W)=>X(J+_,R,W);switch($){case"scalar":H=p9.Scalar.PLAIN,U=aQ(Q,G);break;case"single-quoted-scalar":H=p9.Scalar.QUOTE_SINGLE,U=sQ(Q,G);break;case"double-quoted-scalar":H=p9.Scalar.QUOTE_DOUBLE,U=rQ(Q,G);break;default:return X(q,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${$}`),{value:"",type:null,comment:"",range:[J,J+Q.length,J+Q.length]}}let Y=J+Q.length,B=cQ.resolveEnd(z,Y,Z,X);return{value:U,type:H,comment:B.comment,range:[J,Y,B.offset]}}function aQ(q,Z){let X="";switch(q[0]){case"\t":X="a tab character";break;case",":X="flow indicator character ,";break;case"%":X="directive indicator character %";break;case"|":case">":{X=`block scalar indicator ${q[0]}`;break}case"@":case"`":{X=`reserved character ${q[0]}`;break}}if(X)Z(0,"BAD_SCALAR_START",`Plain value cannot start with ${X}`);return g3(q)}function sQ(q,Z){if(q[q.length-1]!=="'"||q.length===1)Z(q.length,"MISSING_CHAR","Missing closing 'quote");return g3(q.slice(1,-1)).replace(/''/g,"'")}function g3(q){let Z,X;try{Z=new RegExp(`(.*?)(?<![ ])[ ]*\r?
110
+ `}let W=J+$.length+Z.source.length;return{value:B,type:Q,comment:$.comment,range:[J,W,W]}}function mQ({offset:q,props:Z},X,J){if(Z[0].type!=="block-scalar-header")return J(Z[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:$}=Z[0],Q=$[0],z=0,H="",U=-1;for(let _=1;_<$.length;++_){let R=$[_];if(!H&&(R==="-"||R==="+"))H=R;else{let W=Number(R);if(!z&&W)z=W;else if(U===-1)U=q+_}}if(U!==-1)J(U,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${$}`);let G=!1,Y="",B=$.length;for(let _=1;_<Z.length;++_){let R=Z[_];switch(R.type){case"space":G=!0;case"newline":B+=R.source.length;break;case"comment":if(X&&!G)J(R,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");B+=R.source.length,Y=R.source.substring(1);break;case"error":J(R,"UNEXPECTED_TOKEN",R.message),B+=R.source.length;break;default:{let W=`Unexpected token in block scalar header: ${R.type}`;J(R,"UNEXPECTED_TOKEN",W);let T=R.source;if(T&&typeof T==="string")B+=T.length}}}return{mode:Q,indent:z,chomp:H,comment:Y,length:B}}function dQ(q){let Z=q.split(/\n( *)/),X=Z[0],J=X.match(/^( *)/),Q=[J?.[1]?[J[1],X.slice(J[1].length)]:["",X]];for(let z=1;z<Z.length;z+=2)Q.push([Z[z],Z[z+1]]);return Q}lQ.resolveBlockScalar=uQ});var c9=D((eQ)=>{var p9=C(),cQ=x1();function iQ(q,Z,X){let{offset:J,type:$,source:Q,end:z}=q,H,U,G=(_,R,W)=>X(J+_,R,W);switch($){case"scalar":H=p9.Scalar.PLAIN,U=aQ(Q,G);break;case"single-quoted-scalar":H=p9.Scalar.QUOTE_SINGLE,U=sQ(Q,G);break;case"double-quoted-scalar":H=p9.Scalar.QUOTE_DOUBLE,U=rQ(Q,G);break;default:return X(q,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${$}`),{value:"",type:null,comment:"",range:[J,J+Q.length,J+Q.length]}}let Y=J+Q.length,B=cQ.resolveEnd(z,Y,Z,X);return{value:U,type:H,comment:B.comment,range:[J,Y,B.offset]}}function aQ(q,Z){let X="";switch(q[0]){case"\t":X="a tab character";break;case",":X="flow indicator character ,";break;case"%":X="directive indicator character %";break;case"|":case">":{X=`block scalar indicator ${q[0]}`;break}case"@":case"`":{X=`reserved character ${q[0]}`;break}}if(X)Z(0,"BAD_SCALAR_START",`Plain value cannot start with ${X}`);return g3(q)}function sQ(q,Z){if(q[q.length-1]!=="'"||q.length===1)Z(q.length,"MISSING_CHAR","Missing closing 'quote");return g3(q.slice(1,-1)).replace(/''/g,"'")}function g3(q){let Z,X;try{Z=new RegExp(`(.*?)(?<![ ])[ ]*\r?
111
111
  `,"sy"),X=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
112
112
  `,"sy")}catch{Z=/(.*?)[ \t]*\r?\n/sy,X=/[ \t]*(.*?)[ \t]*\r?\n/sy}let J=Z.exec(q);if(!J)return q;let $=J[1],Q=" ",z=Z.lastIndex;X.lastIndex=z;while(J=X.exec(q)){if(J[1]==="")if(Q===`
113
113
  `)$+=Q;else Q=`
@@ -122,7 +122,7 @@ ${G}
122
122
  `)break;if(J===`
123
123
  `)X+=`
124
124
  `;Z+=1,J=q[Z+1]}if(!X)X=" ";return{fold:X,offset:Z}}var oQ={"0":"\x00",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
125
- `,r:"\r",t:"\t",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function tQ(q,Z,X,J){let $=q.substr(Z,X),z=$.length===X&&/^[0-9a-fA-F]+$/.test($)?parseInt($,16):NaN;if(isNaN(z)){let H=q.substr(Z-2,X+2);return J(Z-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${H}`),H}return String.fromCodePoint(z)}eQ.resolveFlowScalar=iQ});var u3=D((zz)=>{var P1=S(),h3=C(),Zz=l9(),Xz=c9();function Jz(q,Z,X,J){let{value:$,type:Q,comment:z,range:H}=Z.type==="block-scalar"?Zz.resolveBlockScalar(q,Z,J):Xz.resolveFlowScalar(Z,q.options.strict,J),U=X?q.directives.tagName(X.source,(B)=>J(X,"TAG_RESOLVE_FAILED",B)):null,G;if(q.options.stringKeys&&q.atKey)G=q.schema[P1.SCALAR];else if(U)G=$z(q.schema,$,U,X,J);else if(Z.type==="scalar")G=Qz(q,$,Z,J);else G=q.schema[P1.SCALAR];let Y;try{let B=G.resolve($,(_)=>J(X??Z,"TAG_RESOLVE_FAILED",_),q.options);Y=P1.isScalar(B)?B:new h3.Scalar(B)}catch(B){let _=B instanceof Error?B.message:String(B);J(X??Z,"TAG_RESOLVE_FAILED",_),Y=new h3.Scalar($)}if(Y.range=H,Y.source=$,Q)Y.type=Q;if(U)Y.tag=U;if(G.format)Y.format=G.format;if(z)Y.comment=z;return Y}function $z(q,Z,X,J,$){if(X==="!")return q[P1.SCALAR];let Q=[];for(let H of q.tags)if(!H.collection&&H.tag===X)if(H.default&&H.test)Q.push(H);else return H;for(let H of Q)if(H.test?.test(Z))return H;let z=q.knownTags[X];if(z&&!z.collection)return q.tags.push(Object.assign({},z,{default:!1,test:void 0})),z;return $(J,"TAG_RESOLVE_FAILED",`Unresolved tag: ${X}`,X!=="tag:yaml.org,2002:str"),q[P1.SCALAR]}function Qz({atKey:q,directives:Z,schema:X},J,$,Q){let z=X.tags.find((H)=>(H.default===!0||q&&H.default==="key")&&H.test?.test(J))||X[P1.SCALAR];if(X.compat){let H=X.compat.find((U)=>U.default&&U.test?.test(J))??X[P1.SCALAR];if(z.tag!==H.tag){let U=Z.tagString(z.tag),G=Z.tagString(H.tag),Y=`Value may be parsed as either ${U} or ${G}`;Q($,"TAG_RESOLVE_FAILED",Y,!0)}}return z}zz.composeScalar=Jz});var m3=D((Gz)=>{function Uz(q,Z,X){if(Z){X??(X=Z.length);for(let J=X-1;J>=0;--J){let $=Z[J];switch($.type){case"space":case"comment":case"newline":q-=$.source.length;continue}$=Z[++J];while($?.type==="space")q+=$.source.length,$=Z[++J];break}}return q}Gz.emptyScalarPosition=Uz});var p3=D((Iz)=>{var Bz=l1(),Tz=S(),_z=v3(),d3=u3(),Lz=k1(),Wz=m3(),Rz={composeNode:l3,composeEmptyNode:i9};function l3(q,Z,X,J){let $=q.atKey,{spaceBefore:Q,comment:z,anchor:H,tag:U}=X,G,Y=!0;switch(Z.type){case"alias":if(G=Vz(q,Z,J),H||U)J(Z,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":if(G=d3.composeScalar(q,Z,U,J),H)G.anchor=H.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":if(G=_z.composeCollection(Rz,q,Z,X,J),H)G.anchor=H.source.substring(1);break;default:{let B=Z.type==="error"?Z.message:`Unsupported token (type: ${Z.type})`;J(Z,"UNEXPECTED_TOKEN",B),G=i9(q,Z.offset,void 0,null,X,J),Y=!1}}if(H&&G.anchor==="")J(H,"BAD_ALIAS","Anchor cannot be an empty string");if($&&q.options.stringKeys&&(!Tz.isScalar(G)||typeof G.value!=="string"||G.tag&&G.tag!=="tag:yaml.org,2002:str"))J(U??Z,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(Q)G.spaceBefore=!0;if(z)if(Z.type==="scalar"&&Z.source==="")G.comment=z;else G.commentBefore=z;if(q.options.keepSourceTokens&&Y)G.srcToken=Z;return G}function i9(q,Z,X,J,{spaceBefore:$,comment:Q,anchor:z,tag:H,end:U},G){let Y={type:"scalar",offset:Wz.emptyScalarPosition(Z,X,J),indent:-1,source:""},B=d3.composeScalar(q,Y,H,G);if(z){if(B.anchor=z.source.substring(1),B.anchor==="")G(z,"BAD_ALIAS","Anchor cannot be an empty string")}if($)B.spaceBefore=!0;if(Q)B.comment=Q,B.range[2]=U;return B}function Vz({options:q},{offset:Z,source:X,end:J},$){let Q=new Bz.Alias(X.substring(1));if(Q.source==="")$(Z,"BAD_ALIAS","Alias cannot be an empty string");if(Q.source.endsWith(":"))$(Z+X.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let z=Z+X.length,H=Lz.resolveEnd(J,z,q.strict,$);if(Q.range=[Z,z,H.offset],H.comment)Q.comment=H.comment;return Q}Iz.composeEmptyNode=i9;Iz.composeNode=l3});var i3=D((Nz)=>{var Pz=$0(),c3=p3(),Dz=k1(),Fz=z0();function Oz(q,Z,{offset:X,start:J,value:$,end:Q},z){let H=Object.assign({_directives:Z},q),U=new Pz.Document(void 0,H),G={atKey:!1,atRoot:!0,directives:U.directives,options:U.options,schema:U.schema},Y=Fz.resolveProps(J,{indicator:"doc-start",next:$??Q?.[0],offset:X,onError:z,parentIndent:0,startOnNewline:!0});if(Y.found){if(U.directives.docStart=!0,$&&($.type==="block-map"||$.type==="block-seq")&&!Y.hasNewline)z(Y.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}U.contents=$?c3.composeNode(G,$,Y,z):c3.composeEmptyNode(G,Y.end,J,null,Y,z);let B=U.contents.range[2],_=Dz.resolveEnd(Q,B,!1,z);if(_.comment)U.comment=_.comment;return U.range=[X,B,_.offset],U}Nz.composeDoc=Oz});var a9=D((Cz)=>{var Sz=r("process"),wz=oq(),bz=$0(),H0=Q0(),a3=S(),jz=i3(),Ez=k1();function U0(q){if(typeof q==="number")return[q,q+1];if(Array.isArray(q))return q.length===2?q:[q[0],q[1]];let{offset:Z,source:X}=q;return[Z,Z+(typeof X==="string"?X.length:1)]}function s3(q){let Z="",X=!1,J=!1;for(let $=0;$<q.length;++$){let Q=q[$];switch(Q[0]){case"#":Z+=(Z===""?"":J?`
125
+ `,r:"\r",t:"\t",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function tQ(q,Z,X,J){let $=q.substr(Z,X),z=$.length===X&&/^[0-9a-fA-F]+$/.test($)?parseInt($,16):NaN;if(isNaN(z)){let H=q.substr(Z-2,X+2);return J(Z-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${H}`),H}return String.fromCodePoint(z)}eQ.resolveFlowScalar=iQ});var u3=D((zz)=>{var P1=S(),h3=C(),Zz=l9(),Xz=c9();function Jz(q,Z,X,J){let{value:$,type:Q,comment:z,range:H}=Z.type==="block-scalar"?Zz.resolveBlockScalar(q,Z,J):Xz.resolveFlowScalar(Z,q.options.strict,J),U=X?q.directives.tagName(X.source,(B)=>J(X,"TAG_RESOLVE_FAILED",B)):null,G;if(q.options.stringKeys&&q.atKey)G=q.schema[P1.SCALAR];else if(U)G=$z(q.schema,$,U,X,J);else if(Z.type==="scalar")G=Qz(q,$,Z,J);else G=q.schema[P1.SCALAR];let Y;try{let B=G.resolve($,(_)=>J(X??Z,"TAG_RESOLVE_FAILED",_),q.options);Y=P1.isScalar(B)?B:new h3.Scalar(B)}catch(B){let _=B instanceof Error?B.message:String(B);J(X??Z,"TAG_RESOLVE_FAILED",_),Y=new h3.Scalar($)}if(Y.range=H,Y.source=$,Q)Y.type=Q;if(U)Y.tag=U;if(G.format)Y.format=G.format;if(z)Y.comment=z;return Y}function $z(q,Z,X,J,$){if(X==="!")return q[P1.SCALAR];let Q=[];for(let H of q.tags)if(!H.collection&&H.tag===X)if(H.default&&H.test)Q.push(H);else return H;for(let H of Q)if(H.test?.test(Z))return H;let z=q.knownTags[X];if(z&&!z.collection)return q.tags.push(Object.assign({},z,{default:!1,test:void 0})),z;return $(J,"TAG_RESOLVE_FAILED",`Unresolved tag: ${X}`,X!=="tag:yaml.org,2002:str"),q[P1.SCALAR]}function Qz({atKey:q,directives:Z,schema:X},J,$,Q){let z=X.tags.find((H)=>(H.default===!0||q&&H.default==="key")&&H.test?.test(J))||X[P1.SCALAR];if(X.compat){let H=X.compat.find((U)=>U.default&&U.test?.test(J))??X[P1.SCALAR];if(z.tag!==H.tag){let U=Z.tagString(z.tag),G=Z.tagString(H.tag),Y=`Value may be parsed as either ${U} or ${G}`;Q($,"TAG_RESOLVE_FAILED",Y,!0)}}return z}zz.composeScalar=Jz});var m3=D((Gz)=>{function Uz(q,Z,X){if(Z){X??(X=Z.length);for(let J=X-1;J>=0;--J){let $=Z[J];switch($.type){case"space":case"comment":case"newline":q-=$.source.length;continue}$=Z[++J];while($?.type==="space")q+=$.source.length,$=Z[++J];break}}return q}Gz.emptyScalarPosition=Uz});var p3=D((Iz)=>{var Bz=l1(),Tz=S(),_z=v3(),d3=u3(),Lz=x1(),Wz=m3(),Rz={composeNode:l3,composeEmptyNode:i9};function l3(q,Z,X,J){let $=q.atKey,{spaceBefore:Q,comment:z,anchor:H,tag:U}=X,G,Y=!0;switch(Z.type){case"alias":if(G=Vz(q,Z,J),H||U)J(Z,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":if(G=d3.composeScalar(q,Z,U,J),H)G.anchor=H.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":if(G=_z.composeCollection(Rz,q,Z,X,J),H)G.anchor=H.source.substring(1);break;default:{let B=Z.type==="error"?Z.message:`Unsupported token (type: ${Z.type})`;J(Z,"UNEXPECTED_TOKEN",B),G=i9(q,Z.offset,void 0,null,X,J),Y=!1}}if(H&&G.anchor==="")J(H,"BAD_ALIAS","Anchor cannot be an empty string");if($&&q.options.stringKeys&&(!Tz.isScalar(G)||typeof G.value!=="string"||G.tag&&G.tag!=="tag:yaml.org,2002:str"))J(U??Z,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(Q)G.spaceBefore=!0;if(z)if(Z.type==="scalar"&&Z.source==="")G.comment=z;else G.commentBefore=z;if(q.options.keepSourceTokens&&Y)G.srcToken=Z;return G}function i9(q,Z,X,J,{spaceBefore:$,comment:Q,anchor:z,tag:H,end:U},G){let Y={type:"scalar",offset:Wz.emptyScalarPosition(Z,X,J),indent:-1,source:""},B=d3.composeScalar(q,Y,H,G);if(z){if(B.anchor=z.source.substring(1),B.anchor==="")G(z,"BAD_ALIAS","Anchor cannot be an empty string")}if($)B.spaceBefore=!0;if(Q)B.comment=Q,B.range[2]=U;return B}function Vz({options:q},{offset:Z,source:X,end:J},$){let Q=new Bz.Alias(X.substring(1));if(Q.source==="")$(Z,"BAD_ALIAS","Alias cannot be an empty string");if(Q.source.endsWith(":"))$(Z+X.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let z=Z+X.length,H=Lz.resolveEnd(J,z,q.strict,$);if(Q.range=[Z,z,H.offset],H.comment)Q.comment=H.comment;return Q}Iz.composeEmptyNode=i9;Iz.composeNode=l3});var i3=D((Nz)=>{var Pz=$0(),c3=p3(),Dz=x1(),Fz=z0();function Oz(q,Z,{offset:X,start:J,value:$,end:Q},z){let H=Object.assign({_directives:Z},q),U=new Pz.Document(void 0,H),G={atKey:!1,atRoot:!0,directives:U.directives,options:U.options,schema:U.schema},Y=Fz.resolveProps(J,{indicator:"doc-start",next:$??Q?.[0],offset:X,onError:z,parentIndent:0,startOnNewline:!0});if(Y.found){if(U.directives.docStart=!0,$&&($.type==="block-map"||$.type==="block-seq")&&!Y.hasNewline)z(Y.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}U.contents=$?c3.composeNode(G,$,Y,z):c3.composeEmptyNode(G,Y.end,J,null,Y,z);let B=U.contents.range[2],_=Dz.resolveEnd(Q,B,!1,z);if(_.comment)U.comment=_.comment;return U.range=[X,B,_.offset],U}Nz.composeDoc=Oz});var a9=D((Cz)=>{var Sz=r("process"),wz=oq(),bz=$0(),H0=Q0(),a3=S(),jz=i3(),Ez=x1();function U0(q){if(typeof q==="number")return[q,q+1];if(Array.isArray(q))return q.length===2?q:[q[0],q[1]];let{offset:Z,source:X}=q;return[Z,Z+(typeof X==="string"?X.length:1)]}function s3(q){let Z="",X=!1,J=!1;for(let $=0;$<q.length;++$){let Q=q[$];switch(Q[0]){case"#":Z+=(Z===""?"":J?`
126
126
 
127
127
  `:`
128
128
  `)+(Q.substring(1)||" "),X=!0,J=!1;break;case"%":if(q[$+1]?.[0]!=="#")$+=1;X=!1;break;default:if(!X)J=!0;X=!1}}return{comment:Z,afterEmptyLine:J}}class r3{constructor(q={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(Z,X,J,$)=>{let Q=U0(Z);if($)this.warnings.push(new H0.YAMLWarning(Q,X,J));else this.errors.push(new H0.YAMLParseError(Q,X,J))},this.directives=new wz.Directives({version:q.version||"1.2"}),this.options=q}decorate(q,Z){let{comment:X,afterEmptyLine:J}=s3(this.prelude);if(X){let $=q.contents;if(Z)q.comment=q.comment?`${q.comment}
@@ -158,33 +158,33 @@ ${Z.comment}`:Z.comment}this.doc.range[2]=Z.offset;break}default:this.errors.pus
158
158
  `,$=this.buffer[X+1];else Z=X;if($==="#"||q&&Tq.has($))break;if(J===`
159
159
  `){let Q=this.continueScalar(X+1);if(Q===-1)break;X=Math.max(X,Q-2)}}else{if(q&&Tq.has(J))break;Z=X}if(!J&&!this.atEnd)return this.setNext("plain-scalar");return yield G0.SCALAR,yield*this.pushToIndex(Z+1,!0),q?"flow":"doc"}*pushCount(q){if(q>0)return yield this.buffer.substr(this.pos,q),this.pos+=q,q;return 0}*pushToIndex(q,Z){let X=this.buffer.slice(this.pos,q);if(X)return yield X,this.pos+=X.length,X.length;else if(Z)yield"";return 0}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Z4))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let q=this.flowLevel>0,Z=this.charAt(1);if(l(Z)||q&&Tq.has(Z)){if(!q)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=!1;return(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}}return 0}*pushTag(){if(this.charAt(1)==="<"){let q=this.pos+2,Z=this.buffer[q];while(!l(Z)&&Z!==">")Z=this.buffer[++q];return yield*this.pushToIndex(Z===">"?q+1:q,!1)}else{let q=this.pos+1,Z=this.buffer[q];while(Z)if(VH.has(Z))Z=this.buffer[++q];else if(Z==="%"&&J5.has(this.buffer[q+1])&&J5.has(this.buffer[q+2]))Z=this.buffer[q+=3];else break;return yield*this.pushToIndex(q,!1)}}*pushNewline(){let q=this.buffer[this.pos];if(q===`
160
160
  `)return yield*this.pushCount(1);else if(q==="\r"&&this.charAt(1)===`
161
- `)return yield*this.pushCount(2);else return 0}*pushSpaces(q){let Z=this.pos-1,X;do X=this.buffer[++Z];while(X===" "||q&&X==="\t");let J=Z-this.pos;if(J>0)yield this.buffer.substr(this.pos,J),this.pos=Z;return J}*pushUntil(q){let Z=this.pos,X=this.buffer[Z];while(!q(X))X=this.buffer[++Z];return yield*this.pushToIndex(Z,!1)}}MH.Lexer=$5});var J4=D((PH)=>{class Q5{constructor(){this.lineStarts=[],this.addNewLine=(q)=>this.lineStarts.push(q),this.linePos=(q)=>{let Z=0,X=this.lineStarts.length;while(Z<X){let $=Z+X>>1;if(this.lineStarts[$]<q)Z=$+1;else X=$}if(this.lineStarts[Z]===q)return{line:Z+1,col:1};if(Z===0)return{line:0,col:q};let J=this.lineStarts[Z-1];return{line:Z,col:q-J+1}}}}PH.LineCounter=Q5});var $4=D((NH)=>{var FH=r("process"),z5=Bq(),OH=X4();function U1(q,Z){for(let X=0;X<q.length;++X)if(q[X].type===Z)return!0;return!1}function H5(q){for(let Z=0;Z<q.length;++Z)switch(q[Z].type){case"space":case"comment":case"newline":break;default:return Z}return-1}function G5(q){switch(q?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function _q(q){switch(q.type){case"document":return q.start;case"block-map":{let Z=q.items[q.items.length-1];return Z.sep??Z.start}case"block-seq":return q.items[q.items.length-1].start;default:return[]}}function v1(q){if(q.length===0)return[];let Z=q.length;q:while(--Z>=0)switch(q[Z].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break q}while(q[++Z]?.type==="space");return q.splice(Z,q.length)}function U5(q){if(q.start.type==="flow-seq-start"){for(let Z of q.items)if(Z.sep&&!Z.value&&!U1(Z.start,"explicit-key-ind")&&!U1(Z.sep,"map-value-ind")){if(Z.key)Z.value=Z.key;if(delete Z.key,G5(Z.value))if(Z.value.end)Array.prototype.push.apply(Z.value.end,Z.sep);else Z.value.end=Z.sep;else Array.prototype.push.apply(Z.start,Z.sep);delete Z.sep}}}class Y5{constructor(q){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new OH.Lexer,this.onNewLine=q}*parse(q,Z=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let X of this.lexer.lex(q,Z))yield*this.next(X);if(!Z)yield*this.end()}*next(q){if(this.source=q,FH.env.LOG_TOKENS)console.log("|",z5.prettyToken(q));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=q.length;return}let Z=z5.tokenType(q);if(!Z){let X=`Not a YAML token: ${q}`;yield*this.pop({type:"error",offset:this.offset,message:X,source:q}),this.offset+=q.length}else if(Z==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=Z,yield*this.step(),Z){case"newline":if(this.atNewLine=!0,this.indent=0,this.onNewLine)this.onNewLine(this.offset+q.length);break;case"space":if(this.atNewLine&&q[0]===" ")this.indent+=q.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=q.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=q.length}}*end(){while(this.stack.length>0)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let q=this.peek(1);if(this.type==="doc-end"&&q?.type!=="doc-end"){while(this.stack.length>0)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!q)return yield*this.stream();switch(q.type){case"document":return yield*this.document(q);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(q);case"block-scalar":return yield*this.blockScalar(q);case"block-map":return yield*this.blockMap(q);case"block-seq":return yield*this.blockSequence(q);case"flow-collection":return yield*this.flowCollection(q);case"doc-end":return yield*this.documentEnd(q)}yield*this.pop()}peek(q){return this.stack[this.stack.length-q]}*pop(q){let Z=q??this.stack.pop();if(!Z)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield Z;else{let X=this.peek(1);if(Z.type==="block-scalar")Z.indent="indent"in X?X.indent:0;else if(Z.type==="flow-collection"&&X.type==="document")Z.indent=0;if(Z.type==="flow-collection")U5(Z);switch(X.type){case"document":X.value=Z;break;case"block-scalar":X.props.push(Z);break;case"block-map":{let J=X.items[X.items.length-1];if(J.value){X.items.push({start:[],key:Z,sep:[]}),this.onKeyLine=!0;return}else if(J.sep)J.value=Z;else{Object.assign(J,{key:Z,sep:[]}),this.onKeyLine=!J.explicitKey;return}break}case"block-seq":{let J=X.items[X.items.length-1];if(J.value)X.items.push({start:[],value:Z});else J.value=Z;break}case"flow-collection":{let J=X.items[X.items.length-1];if(!J||J.value)X.items.push({start:[],key:Z,sep:[]});else if(J.sep)J.value=Z;else Object.assign(J,{key:Z,sep:[]});return}default:yield*this.pop(),yield*this.pop(Z)}if((X.type==="document"||X.type==="block-map"||X.type==="block-seq")&&(Z.type==="block-map"||Z.type==="block-seq")){let J=Z.items[Z.items.length-1];if(J&&!J.sep&&!J.value&&J.start.length>0&&H5(J.start)===-1&&(Z.indent===0||J.start.every(($)=>$.type!=="comment"||$.indent<Z.indent))){if(X.type==="document")X.end=J.start;else X.items.push({start:J.start});Z.items.splice(-1,1)}}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let q={type:"document",offset:this.offset,start:[]};if(this.type==="doc-start")q.start.push(this.sourceToken);this.stack.push(q);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(q){if(q.value)return yield*this.lineEnd(q);switch(this.type){case"doc-start":{if(H5(q.start)!==-1)yield*this.pop(),yield*this.step();else q.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":q.start.push(this.sourceToken);return}let Z=this.startBlockValue(q);if(Z)this.stack.push(Z);else yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(q){if(this.type==="map-value-ind"){let Z=_q(this.peek(2)),X=v1(Z),J;if(q.end)J=q.end,J.push(this.sourceToken),delete q.end;else J=[this.sourceToken];let $={type:"block-map",offset:q.offset,indent:q.indent,items:[{start:X,key:q,sep:J}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=$}else yield*this.lineEnd(q)}*blockScalar(q){switch(this.type){case"space":case"comment":case"newline":q.props.push(this.sourceToken);return;case"scalar":if(q.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let Z=this.source.indexOf(`
161
+ `)return yield*this.pushCount(2);else return 0}*pushSpaces(q){let Z=this.pos-1,X;do X=this.buffer[++Z];while(X===" "||q&&X==="\t");let J=Z-this.pos;if(J>0)yield this.buffer.substr(this.pos,J),this.pos=Z;return J}*pushUntil(q){let Z=this.pos,X=this.buffer[Z];while(!q(X))X=this.buffer[++Z];return yield*this.pushToIndex(Z,!1)}}MH.Lexer=$5});var J4=D((PH)=>{class Q5{constructor(){this.lineStarts=[],this.addNewLine=(q)=>this.lineStarts.push(q),this.linePos=(q)=>{let Z=0,X=this.lineStarts.length;while(Z<X){let $=Z+X>>1;if(this.lineStarts[$]<q)Z=$+1;else X=$}if(this.lineStarts[Z]===q)return{line:Z+1,col:1};if(Z===0)return{line:0,col:q};let J=this.lineStarts[Z-1];return{line:Z,col:q-J+1}}}}PH.LineCounter=Q5});var $4=D((NH)=>{var FH=r("process"),z5=Bq(),OH=X4();function U1(q,Z){for(let X=0;X<q.length;++X)if(q[X].type===Z)return!0;return!1}function H5(q){for(let Z=0;Z<q.length;++Z)switch(q[Z].type){case"space":case"comment":case"newline":break;default:return Z}return-1}function G5(q){switch(q?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function _q(q){switch(q.type){case"document":return q.start;case"block-map":{let Z=q.items[q.items.length-1];return Z.sep??Z.start}case"block-seq":return q.items[q.items.length-1].start;default:return[]}}function k1(q){if(q.length===0)return[];let Z=q.length;q:while(--Z>=0)switch(q[Z].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break q}while(q[++Z]?.type==="space");return q.splice(Z,q.length)}function U5(q){if(q.start.type==="flow-seq-start"){for(let Z of q.items)if(Z.sep&&!Z.value&&!U1(Z.start,"explicit-key-ind")&&!U1(Z.sep,"map-value-ind")){if(Z.key)Z.value=Z.key;if(delete Z.key,G5(Z.value))if(Z.value.end)Array.prototype.push.apply(Z.value.end,Z.sep);else Z.value.end=Z.sep;else Array.prototype.push.apply(Z.start,Z.sep);delete Z.sep}}}class Y5{constructor(q){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new OH.Lexer,this.onNewLine=q}*parse(q,Z=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let X of this.lexer.lex(q,Z))yield*this.next(X);if(!Z)yield*this.end()}*next(q){if(this.source=q,FH.env.LOG_TOKENS)console.log("|",z5.prettyToken(q));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=q.length;return}let Z=z5.tokenType(q);if(!Z){let X=`Not a YAML token: ${q}`;yield*this.pop({type:"error",offset:this.offset,message:X,source:q}),this.offset+=q.length}else if(Z==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=Z,yield*this.step(),Z){case"newline":if(this.atNewLine=!0,this.indent=0,this.onNewLine)this.onNewLine(this.offset+q.length);break;case"space":if(this.atNewLine&&q[0]===" ")this.indent+=q.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=q.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=q.length}}*end(){while(this.stack.length>0)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let q=this.peek(1);if(this.type==="doc-end"&&q?.type!=="doc-end"){while(this.stack.length>0)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!q)return yield*this.stream();switch(q.type){case"document":return yield*this.document(q);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(q);case"block-scalar":return yield*this.blockScalar(q);case"block-map":return yield*this.blockMap(q);case"block-seq":return yield*this.blockSequence(q);case"flow-collection":return yield*this.flowCollection(q);case"doc-end":return yield*this.documentEnd(q)}yield*this.pop()}peek(q){return this.stack[this.stack.length-q]}*pop(q){let Z=q??this.stack.pop();if(!Z)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield Z;else{let X=this.peek(1);if(Z.type==="block-scalar")Z.indent="indent"in X?X.indent:0;else if(Z.type==="flow-collection"&&X.type==="document")Z.indent=0;if(Z.type==="flow-collection")U5(Z);switch(X.type){case"document":X.value=Z;break;case"block-scalar":X.props.push(Z);break;case"block-map":{let J=X.items[X.items.length-1];if(J.value){X.items.push({start:[],key:Z,sep:[]}),this.onKeyLine=!0;return}else if(J.sep)J.value=Z;else{Object.assign(J,{key:Z,sep:[]}),this.onKeyLine=!J.explicitKey;return}break}case"block-seq":{let J=X.items[X.items.length-1];if(J.value)X.items.push({start:[],value:Z});else J.value=Z;break}case"flow-collection":{let J=X.items[X.items.length-1];if(!J||J.value)X.items.push({start:[],key:Z,sep:[]});else if(J.sep)J.value=Z;else Object.assign(J,{key:Z,sep:[]});return}default:yield*this.pop(),yield*this.pop(Z)}if((X.type==="document"||X.type==="block-map"||X.type==="block-seq")&&(Z.type==="block-map"||Z.type==="block-seq")){let J=Z.items[Z.items.length-1];if(J&&!J.sep&&!J.value&&J.start.length>0&&H5(J.start)===-1&&(Z.indent===0||J.start.every(($)=>$.type!=="comment"||$.indent<Z.indent))){if(X.type==="document")X.end=J.start;else X.items.push({start:J.start});Z.items.splice(-1,1)}}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let q={type:"document",offset:this.offset,start:[]};if(this.type==="doc-start")q.start.push(this.sourceToken);this.stack.push(q);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(q){if(q.value)return yield*this.lineEnd(q);switch(this.type){case"doc-start":{if(H5(q.start)!==-1)yield*this.pop(),yield*this.step();else q.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":q.start.push(this.sourceToken);return}let Z=this.startBlockValue(q);if(Z)this.stack.push(Z);else yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(q){if(this.type==="map-value-ind"){let Z=_q(this.peek(2)),X=k1(Z),J;if(q.end)J=q.end,J.push(this.sourceToken),delete q.end;else J=[this.sourceToken];let $={type:"block-map",offset:q.offset,indent:q.indent,items:[{start:X,key:q,sep:J}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=$}else yield*this.lineEnd(q)}*blockScalar(q){switch(this.type){case"space":case"comment":case"newline":q.props.push(this.sourceToken);return;case"scalar":if(q.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let Z=this.source.indexOf(`
162
162
  `)+1;while(Z!==0)this.onNewLine(this.offset+Z),Z=this.source.indexOf(`
163
- `,Z)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(q){let Z=q.items[q.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,Z.value){let X="end"in Z.value?Z.value.end:void 0;if((Array.isArray(X)?X[X.length-1]:void 0)?.type==="comment")X?.push(this.sourceToken);else q.items.push({start:[this.sourceToken]})}else if(Z.sep)Z.sep.push(this.sourceToken);else Z.start.push(this.sourceToken);return;case"space":case"comment":if(Z.value)q.items.push({start:[this.sourceToken]});else if(Z.sep)Z.sep.push(this.sourceToken);else{if(this.atIndentedComment(Z.start,q.indent)){let J=q.items[q.items.length-2]?.value?.end;if(Array.isArray(J)){Array.prototype.push.apply(J,Z.start),J.push(this.sourceToken),q.items.pop();return}}Z.start.push(this.sourceToken)}return}if(this.indent>=q.indent){let X=!this.onKeyLine&&this.indent===q.indent,J=X&&(Z.sep||Z.explicitKey)&&this.type!=="seq-item-ind",$=[];if(J&&Z.sep&&!Z.value){let Q=[];for(let z=0;z<Z.sep.length;++z){let H=Z.sep[z];switch(H.type){case"newline":Q.push(z);break;case"space":break;case"comment":if(H.indent>q.indent)Q.length=0;break;default:Q.length=0}}if(Q.length>=2)$=Z.sep.splice(Q[1])}switch(this.type){case"anchor":case"tag":if(J||Z.value)$.push(this.sourceToken),q.items.push({start:$}),this.onKeyLine=!0;else if(Z.sep)Z.sep.push(this.sourceToken);else Z.start.push(this.sourceToken);return;case"explicit-key-ind":if(!Z.sep&&!Z.explicitKey)Z.start.push(this.sourceToken),Z.explicitKey=!0;else if(J||Z.value)$.push(this.sourceToken),q.items.push({start:$,explicitKey:!0});else this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]});this.onKeyLine=!0;return;case"map-value-ind":if(Z.explicitKey)if(!Z.sep)if(U1(Z.start,"newline"))Object.assign(Z,{key:null,sep:[this.sourceToken]});else{let Q=v1(Z.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:Q,key:null,sep:[this.sourceToken]}]})}else if(Z.value)q.items.push({start:[],key:null,sep:[this.sourceToken]});else if(U1(Z.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:$,key:null,sep:[this.sourceToken]}]});else if(G5(Z.key)&&!U1(Z.sep,"newline")){let Q=v1(Z.start),z=Z.key,H=Z.sep;H.push(this.sourceToken),delete Z.key,delete Z.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:Q,key:z,sep:H}]})}else if($.length>0)Z.sep=Z.sep.concat($,this.sourceToken);else Z.sep.push(this.sourceToken);else if(!Z.sep)Object.assign(Z,{key:null,sep:[this.sourceToken]});else if(Z.value||J)q.items.push({start:$,key:null,sep:[this.sourceToken]});else if(U1(Z.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else Z.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let Q=this.flowScalar(this.type);if(J||Z.value)q.items.push({start:$,key:Q,sep:[]}),this.onKeyLine=!0;else if(Z.sep)this.stack.push(Q);else Object.assign(Z,{key:Q,sep:[]}),this.onKeyLine=!0;return}default:{let Q=this.startBlockValue(q);if(Q){if(Q.type==="block-seq"){if(!Z.explicitKey&&Z.sep&&!U1(Z.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else if(X)q.items.push({start:$});this.stack.push(Q);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(q){let Z=q.items[q.items.length-1];switch(this.type){case"newline":if(Z.value){let X="end"in Z.value?Z.value.end:void 0;if((Array.isArray(X)?X[X.length-1]:void 0)?.type==="comment")X?.push(this.sourceToken);else q.items.push({start:[this.sourceToken]})}else Z.start.push(this.sourceToken);return;case"space":case"comment":if(Z.value)q.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(Z.start,q.indent)){let J=q.items[q.items.length-2]?.value?.end;if(Array.isArray(J)){Array.prototype.push.apply(J,Z.start),J.push(this.sourceToken),q.items.pop();return}}Z.start.push(this.sourceToken)}return;case"anchor":case"tag":if(Z.value||this.indent<=q.indent)break;Z.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==q.indent)break;if(Z.value||U1(Z.start,"seq-item-ind"))q.items.push({start:[this.sourceToken]});else Z.start.push(this.sourceToken);return}if(this.indent>q.indent){let X=this.startBlockValue(q);if(X){this.stack.push(X);return}}yield*this.pop(),yield*this.step()}*flowCollection(q){let Z=q.items[q.items.length-1];if(this.type==="flow-error-end"){let X;do yield*this.pop(),X=this.peek(1);while(X?.type==="flow-collection")}else if(q.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!Z||Z.sep)q.items.push({start:[this.sourceToken]});else Z.start.push(this.sourceToken);return;case"map-value-ind":if(!Z||Z.value)q.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Z.sep)Z.sep.push(this.sourceToken);else Object.assign(Z,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!Z||Z.value)q.items.push({start:[this.sourceToken]});else if(Z.sep)Z.sep.push(this.sourceToken);else Z.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let J=this.flowScalar(this.type);if(!Z||Z.value)q.items.push({start:[],key:J,sep:[]});else if(Z.sep)this.stack.push(J);else Object.assign(Z,{key:J,sep:[]});return}case"flow-map-end":case"flow-seq-end":q.end.push(this.sourceToken);return}let X=this.startBlockValue(q);if(X)this.stack.push(X);else yield*this.pop(),yield*this.step()}else{let X=this.peek(2);if(X.type==="block-map"&&(this.type==="map-value-ind"&&X.indent===q.indent||this.type==="newline"&&!X.items[X.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&X.type!=="flow-collection"){let J=_q(X),$=v1(J);U5(q);let Q=q.end.splice(1,q.end.length);Q.push(this.sourceToken);let z={type:"block-map",offset:q.offset,indent:q.indent,items:[{start:$,key:q,sep:Q}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=z}else yield*this.lineEnd(q)}}flowScalar(q){if(this.onNewLine){let Z=this.source.indexOf(`
163
+ `,Z)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(q){let Z=q.items[q.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,Z.value){let X="end"in Z.value?Z.value.end:void 0;if((Array.isArray(X)?X[X.length-1]:void 0)?.type==="comment")X?.push(this.sourceToken);else q.items.push({start:[this.sourceToken]})}else if(Z.sep)Z.sep.push(this.sourceToken);else Z.start.push(this.sourceToken);return;case"space":case"comment":if(Z.value)q.items.push({start:[this.sourceToken]});else if(Z.sep)Z.sep.push(this.sourceToken);else{if(this.atIndentedComment(Z.start,q.indent)){let J=q.items[q.items.length-2]?.value?.end;if(Array.isArray(J)){Array.prototype.push.apply(J,Z.start),J.push(this.sourceToken),q.items.pop();return}}Z.start.push(this.sourceToken)}return}if(this.indent>=q.indent){let X=!this.onKeyLine&&this.indent===q.indent,J=X&&(Z.sep||Z.explicitKey)&&this.type!=="seq-item-ind",$=[];if(J&&Z.sep&&!Z.value){let Q=[];for(let z=0;z<Z.sep.length;++z){let H=Z.sep[z];switch(H.type){case"newline":Q.push(z);break;case"space":break;case"comment":if(H.indent>q.indent)Q.length=0;break;default:Q.length=0}}if(Q.length>=2)$=Z.sep.splice(Q[1])}switch(this.type){case"anchor":case"tag":if(J||Z.value)$.push(this.sourceToken),q.items.push({start:$}),this.onKeyLine=!0;else if(Z.sep)Z.sep.push(this.sourceToken);else Z.start.push(this.sourceToken);return;case"explicit-key-ind":if(!Z.sep&&!Z.explicitKey)Z.start.push(this.sourceToken),Z.explicitKey=!0;else if(J||Z.value)$.push(this.sourceToken),q.items.push({start:$,explicitKey:!0});else this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]});this.onKeyLine=!0;return;case"map-value-ind":if(Z.explicitKey)if(!Z.sep)if(U1(Z.start,"newline"))Object.assign(Z,{key:null,sep:[this.sourceToken]});else{let Q=k1(Z.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:Q,key:null,sep:[this.sourceToken]}]})}else if(Z.value)q.items.push({start:[],key:null,sep:[this.sourceToken]});else if(U1(Z.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:$,key:null,sep:[this.sourceToken]}]});else if(G5(Z.key)&&!U1(Z.sep,"newline")){let Q=k1(Z.start),z=Z.key,H=Z.sep;H.push(this.sourceToken),delete Z.key,delete Z.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:Q,key:z,sep:H}]})}else if($.length>0)Z.sep=Z.sep.concat($,this.sourceToken);else Z.sep.push(this.sourceToken);else if(!Z.sep)Object.assign(Z,{key:null,sep:[this.sourceToken]});else if(Z.value||J)q.items.push({start:$,key:null,sep:[this.sourceToken]});else if(U1(Z.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else Z.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let Q=this.flowScalar(this.type);if(J||Z.value)q.items.push({start:$,key:Q,sep:[]}),this.onKeyLine=!0;else if(Z.sep)this.stack.push(Q);else Object.assign(Z,{key:Q,sep:[]}),this.onKeyLine=!0;return}default:{let Q=this.startBlockValue(q);if(Q){if(Q.type==="block-seq"){if(!Z.explicitKey&&Z.sep&&!U1(Z.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else if(X)q.items.push({start:$});this.stack.push(Q);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(q){let Z=q.items[q.items.length-1];switch(this.type){case"newline":if(Z.value){let X="end"in Z.value?Z.value.end:void 0;if((Array.isArray(X)?X[X.length-1]:void 0)?.type==="comment")X?.push(this.sourceToken);else q.items.push({start:[this.sourceToken]})}else Z.start.push(this.sourceToken);return;case"space":case"comment":if(Z.value)q.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(Z.start,q.indent)){let J=q.items[q.items.length-2]?.value?.end;if(Array.isArray(J)){Array.prototype.push.apply(J,Z.start),J.push(this.sourceToken),q.items.pop();return}}Z.start.push(this.sourceToken)}return;case"anchor":case"tag":if(Z.value||this.indent<=q.indent)break;Z.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==q.indent)break;if(Z.value||U1(Z.start,"seq-item-ind"))q.items.push({start:[this.sourceToken]});else Z.start.push(this.sourceToken);return}if(this.indent>q.indent){let X=this.startBlockValue(q);if(X){this.stack.push(X);return}}yield*this.pop(),yield*this.step()}*flowCollection(q){let Z=q.items[q.items.length-1];if(this.type==="flow-error-end"){let X;do yield*this.pop(),X=this.peek(1);while(X?.type==="flow-collection")}else if(q.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!Z||Z.sep)q.items.push({start:[this.sourceToken]});else Z.start.push(this.sourceToken);return;case"map-value-ind":if(!Z||Z.value)q.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Z.sep)Z.sep.push(this.sourceToken);else Object.assign(Z,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!Z||Z.value)q.items.push({start:[this.sourceToken]});else if(Z.sep)Z.sep.push(this.sourceToken);else Z.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let J=this.flowScalar(this.type);if(!Z||Z.value)q.items.push({start:[],key:J,sep:[]});else if(Z.sep)this.stack.push(J);else Object.assign(Z,{key:J,sep:[]});return}case"flow-map-end":case"flow-seq-end":q.end.push(this.sourceToken);return}let X=this.startBlockValue(q);if(X)this.stack.push(X);else yield*this.pop(),yield*this.step()}else{let X=this.peek(2);if(X.type==="block-map"&&(this.type==="map-value-ind"&&X.indent===q.indent||this.type==="newline"&&!X.items[X.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&X.type!=="flow-collection"){let J=_q(X),$=k1(J);U5(q);let Q=q.end.splice(1,q.end.length);Q.push(this.sourceToken);let z={type:"block-map",offset:q.offset,indent:q.indent,items:[{start:$,key:q,sep:Q}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=z}else yield*this.lineEnd(q)}}flowScalar(q){if(this.onNewLine){let Z=this.source.indexOf(`
164
164
  `)+1;while(Z!==0)this.onNewLine(this.offset+Z),Z=this.source.indexOf(`
165
- `,Z)+1}return{type:q,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(q){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let Z=_q(q),X=v1(Z);return X.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:X,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let Z=_q(q),X=v1(Z);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:X,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(q,Z){if(this.type!=="comment")return!1;if(this.indent<=Z)return!1;return q.every((X)=>X.type==="newline"||X.type==="space")}*documentEnd(q){if(this.type!=="doc-mode"){if(q.end)q.end.push(this.sourceToken);else q.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd(q){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:if(q.end)q.end.push(this.sourceToken);else q.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}NH.Parser=Y5});var W5=D((yH)=>{var B5=a9(),SH=$0(),Y0=Q0(),wH=J9(),bH=S(),jH=J4(),T5=$4();function _5(q){let Z=q.prettyErrors!==!1;return{lineCounter:q.lineCounter||Z&&new jH.LineCounter||null,prettyErrors:Z}}function EH(q,Z={}){let{lineCounter:X,prettyErrors:J}=_5(Z),$=new T5.Parser(X?.addNewLine),Q=new B5.Composer(Z),z=Array.from(Q.compose($.parse(q)));if(J&&X)for(let H of z)H.errors.forEach(Y0.prettifyError(q,X)),H.warnings.forEach(Y0.prettifyError(q,X));if(z.length>0)return z;return Object.assign([],{empty:!0},Q.streamInfo())}function L5(q,Z={}){let{lineCounter:X,prettyErrors:J}=_5(Z),$=new T5.Parser(X?.addNewLine),Q=new B5.Composer(Z),z=null;for(let H of Q.compose($.parse(q),!0,q.length))if(!z)z=H;else if(z.options.logLevel!=="silent"){z.errors.push(new Y0.YAMLParseError(H.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(J&&X)z.errors.forEach(Y0.prettifyError(q,X)),z.warnings.forEach(Y0.prettifyError(q,X));return z}function CH(q,Z,X){let J=void 0;if(typeof Z==="function")J=Z;else if(X===void 0&&Z&&typeof Z==="object")X=Z;let $=L5(q,X);if(!$)return null;if($.warnings.forEach((Q)=>wH.warn($.options.logLevel,Q)),$.errors.length>0)if($.options.logLevel!=="silent")throw $.errors[0];else $.errors=[];return $.toJS(Object.assign({reviver:J},X))}function fH(q,Z,X){let J=null;if(typeof Z==="function"||Array.isArray(Z))J=Z;else if(X===void 0&&Z)X=Z;if(typeof X==="string")X=X.length;if(typeof X==="number"){let $=Math.round(X);X=$<1?void 0:$>8?{indent:8}:{indent:$}}if(q===void 0){let{keepUndefined:$}=X??Z??{};if(!$)return}if(bH.isDocument(q)&&!J)return q.toString(X);return new SH.Document(q,J,X).toString(X)}yH.parse=CH;yH.parseAllDocuments=EH;yH.parseDocument=L5;yH.stringify=fH});var G4=D((ZT,U4)=>{var Mq=process||{},M5=Mq.argv||[],Iq=Mq.env||{},SU=!(!!Iq.NO_COLOR||M5.includes("--no-color"))&&(!!Iq.FORCE_COLOR||M5.includes("--color")||Mq.platform==="win32"||(Mq.stdout||{}).isTTY&&Iq.TERM!=="dumb"||!!Iq.CI),wU=(q,Z,X=q)=>(J)=>{let $=""+J,Q=$.indexOf(Z,q.length);return~Q?q+bU($,Z,X,Q)+Z:q+$+Z},bU=(q,Z,X,J)=>{let $="",Q=0;do $+=q.substring(Q,J)+X,Q=J+Z.length,J=q.indexOf(Z,Q);while(~J);return $+q.substring(Q)},K5=(q=SU)=>{let Z=q?wU:()=>String;return{isColorSupported:q,reset:Z("\x1B[0m","\x1B[0m"),bold:Z("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:Z("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:Z("\x1B[3m","\x1B[23m"),underline:Z("\x1B[4m","\x1B[24m"),inverse:Z("\x1B[7m","\x1B[27m"),hidden:Z("\x1B[8m","\x1B[28m"),strikethrough:Z("\x1B[9m","\x1B[29m"),black:Z("\x1B[30m","\x1B[39m"),red:Z("\x1B[31m","\x1B[39m"),green:Z("\x1B[32m","\x1B[39m"),yellow:Z("\x1B[33m","\x1B[39m"),blue:Z("\x1B[34m","\x1B[39m"),magenta:Z("\x1B[35m","\x1B[39m"),cyan:Z("\x1B[36m","\x1B[39m"),white:Z("\x1B[37m","\x1B[39m"),gray:Z("\x1B[90m","\x1B[39m"),bgBlack:Z("\x1B[40m","\x1B[49m"),bgRed:Z("\x1B[41m","\x1B[49m"),bgGreen:Z("\x1B[42m","\x1B[49m"),bgYellow:Z("\x1B[43m","\x1B[49m"),bgBlue:Z("\x1B[44m","\x1B[49m"),bgMagenta:Z("\x1B[45m","\x1B[49m"),bgCyan:Z("\x1B[46m","\x1B[49m"),bgWhite:Z("\x1B[47m","\x1B[49m"),blackBright:Z("\x1B[90m","\x1B[39m"),redBright:Z("\x1B[91m","\x1B[39m"),greenBright:Z("\x1B[92m","\x1B[39m"),yellowBright:Z("\x1B[93m","\x1B[39m"),blueBright:Z("\x1B[94m","\x1B[39m"),magentaBright:Z("\x1B[95m","\x1B[39m"),cyanBright:Z("\x1B[96m","\x1B[39m"),whiteBright:Z("\x1B[97m","\x1B[39m"),bgBlackBright:Z("\x1B[100m","\x1B[49m"),bgRedBright:Z("\x1B[101m","\x1B[49m"),bgGreenBright:Z("\x1B[102m","\x1B[49m"),bgYellowBright:Z("\x1B[103m","\x1B[49m"),bgBlueBright:Z("\x1B[104m","\x1B[49m"),bgMagentaBright:Z("\x1B[105m","\x1B[49m"),bgCyanBright:Z("\x1B[106m","\x1B[49m"),bgWhiteBright:Z("\x1B[107m","\x1B[49m")}};U4.exports=K5();U4.exports.createColors=K5});var B4=D((XT,P5)=>{var Y4={to(q,Z){if(!Z)return`\x1B[${q+1}G`;return`\x1B[${Z+1};${q+1}H`},move(q,Z){let X="";if(q<0)X+=`\x1B[${-q}D`;else if(q>0)X+=`\x1B[${q}C`;if(Z<0)X+=`\x1B[${-Z}A`;else if(Z>0)X+=`\x1B[${Z}B`;return X},up:(q=1)=>`\x1B[${q}A`,down:(q=1)=>`\x1B[${q}B`,forward:(q=1)=>`\x1B[${q}C`,backward:(q=1)=>`\x1B[${q}D`,nextLine:(q=1)=>"\x1B[E".repeat(q),prevLine:(q=1)=>"\x1B[F".repeat(q),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},jU={up:(q=1)=>"\x1B[S".repeat(q),down:(q=1)=>"\x1B[T".repeat(q)},EU={screen:"\x1B[2J",up:(q=1)=>"\x1B[1J".repeat(q),down:(q=1)=>"\x1B[J".repeat(q),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(q){let Z="";for(let X=0;X<q;X++)Z+=this.line+(X<q-1?Y4.up():"");if(q)Z+=Y4.left;return Z}};P5.exports={cursor:Y4,scroll:jU,erase:EU,beep:"\x07"}});var Z2=h1(q2(),1),{program:GY,createCommand:YY,createArgument:BY,createOption:TY,CommanderError:_Y,InvalidArgumentError:LY,InvalidOptionArgumentError:WY,Command:g,Argument:RY,Option:VY,Help:IY}=Z2.default;import{join as L1}from"node:path";import{homedir as K7,platform as P7}from"node:os";import{mkdir as D7,stat as F7}from"node:fs/promises";import{spawn as O7}from"node:child_process";import{join as _1}from"node:path";import{homedir as W7,platform as R7}from"node:os";import{appendFileSync as J2,mkdirSync as V7}from"node:fs";function $2(){let q=W7(),Z=R7();if(Z==="darwin")return _1(q,"Library","Logs","agentdeps");if(Z==="win32"){let $=process.env.LOCALAPPDATA??_1(q,"AppData","Local");return _1($,"agentdeps","logs")}let X=process.env.XDG_STATE_HOME;if(X)return _1(X,"agentdeps","logs");let J=process.env.XDG_CACHE_HOME;return _1(J??_1(q,".cache"),"agentdeps","logs")}function aq(){return _1($2(),"agentdeps.log")}var N0=0,I7=0,X2=!1;function Q2(){if(X2)return!0;try{return V7($2(),{recursive:!0}),X2=!0,!0}catch{return!1}}function M7(q){if(q instanceof Error)return q.stack??`${q.name}: ${q.message}`;if(typeof q==="object"&&q!==null)return JSON.stringify(q,null,2);return String(q)}function z2(){return new Date().toISOString()}function o(q,Z){if(!Q2())return;let X=`[${z2()}] ERROR [${q}]
165
+ `,Z)+1}return{type:q,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(q){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let Z=_q(q),X=k1(Z);return X.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:X,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let Z=_q(q),X=k1(Z);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:X,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(q,Z){if(this.type!=="comment")return!1;if(this.indent<=Z)return!1;return q.every((X)=>X.type==="newline"||X.type==="space")}*documentEnd(q){if(this.type!=="doc-mode"){if(q.end)q.end.push(this.sourceToken);else q.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd(q){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:if(q.end)q.end.push(this.sourceToken);else q.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}NH.Parser=Y5});var W5=D((yH)=>{var B5=a9(),SH=$0(),Y0=Q0(),wH=J9(),bH=S(),jH=J4(),T5=$4();function _5(q){let Z=q.prettyErrors!==!1;return{lineCounter:q.lineCounter||Z&&new jH.LineCounter||null,prettyErrors:Z}}function EH(q,Z={}){let{lineCounter:X,prettyErrors:J}=_5(Z),$=new T5.Parser(X?.addNewLine),Q=new B5.Composer(Z),z=Array.from(Q.compose($.parse(q)));if(J&&X)for(let H of z)H.errors.forEach(Y0.prettifyError(q,X)),H.warnings.forEach(Y0.prettifyError(q,X));if(z.length>0)return z;return Object.assign([],{empty:!0},Q.streamInfo())}function L5(q,Z={}){let{lineCounter:X,prettyErrors:J}=_5(Z),$=new T5.Parser(X?.addNewLine),Q=new B5.Composer(Z),z=null;for(let H of Q.compose($.parse(q),!0,q.length))if(!z)z=H;else if(z.options.logLevel!=="silent"){z.errors.push(new Y0.YAMLParseError(H.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(J&&X)z.errors.forEach(Y0.prettifyError(q,X)),z.warnings.forEach(Y0.prettifyError(q,X));return z}function CH(q,Z,X){let J=void 0;if(typeof Z==="function")J=Z;else if(X===void 0&&Z&&typeof Z==="object")X=Z;let $=L5(q,X);if(!$)return null;if($.warnings.forEach((Q)=>wH.warn($.options.logLevel,Q)),$.errors.length>0)if($.options.logLevel!=="silent")throw $.errors[0];else $.errors=[];return $.toJS(Object.assign({reviver:J},X))}function fH(q,Z,X){let J=null;if(typeof Z==="function"||Array.isArray(Z))J=Z;else if(X===void 0&&Z)X=Z;if(typeof X==="string")X=X.length;if(typeof X==="number"){let $=Math.round(X);X=$<1?void 0:$>8?{indent:8}:{indent:$}}if(q===void 0){let{keepUndefined:$}=X??Z??{};if(!$)return}if(bH.isDocument(q)&&!J)return q.toString(X);return new SH.Document(q,J,X).toString(X)}yH.parse=CH;yH.parseAllDocuments=EH;yH.parseDocument=L5;yH.stringify=fH});var G4=D((ZT,U4)=>{var Mq=process||{},M5=Mq.argv||[],Iq=Mq.env||{},SU=!(!!Iq.NO_COLOR||M5.includes("--no-color"))&&(!!Iq.FORCE_COLOR||M5.includes("--color")||Mq.platform==="win32"||(Mq.stdout||{}).isTTY&&Iq.TERM!=="dumb"||!!Iq.CI),wU=(q,Z,X=q)=>(J)=>{let $=""+J,Q=$.indexOf(Z,q.length);return~Q?q+bU($,Z,X,Q)+Z:q+$+Z},bU=(q,Z,X,J)=>{let $="",Q=0;do $+=q.substring(Q,J)+X,Q=J+Z.length,J=q.indexOf(Z,Q);while(~J);return $+q.substring(Q)},K5=(q=SU)=>{let Z=q?wU:()=>String;return{isColorSupported:q,reset:Z("\x1B[0m","\x1B[0m"),bold:Z("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:Z("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:Z("\x1B[3m","\x1B[23m"),underline:Z("\x1B[4m","\x1B[24m"),inverse:Z("\x1B[7m","\x1B[27m"),hidden:Z("\x1B[8m","\x1B[28m"),strikethrough:Z("\x1B[9m","\x1B[29m"),black:Z("\x1B[30m","\x1B[39m"),red:Z("\x1B[31m","\x1B[39m"),green:Z("\x1B[32m","\x1B[39m"),yellow:Z("\x1B[33m","\x1B[39m"),blue:Z("\x1B[34m","\x1B[39m"),magenta:Z("\x1B[35m","\x1B[39m"),cyan:Z("\x1B[36m","\x1B[39m"),white:Z("\x1B[37m","\x1B[39m"),gray:Z("\x1B[90m","\x1B[39m"),bgBlack:Z("\x1B[40m","\x1B[49m"),bgRed:Z("\x1B[41m","\x1B[49m"),bgGreen:Z("\x1B[42m","\x1B[49m"),bgYellow:Z("\x1B[43m","\x1B[49m"),bgBlue:Z("\x1B[44m","\x1B[49m"),bgMagenta:Z("\x1B[45m","\x1B[49m"),bgCyan:Z("\x1B[46m","\x1B[49m"),bgWhite:Z("\x1B[47m","\x1B[49m"),blackBright:Z("\x1B[90m","\x1B[39m"),redBright:Z("\x1B[91m","\x1B[39m"),greenBright:Z("\x1B[92m","\x1B[39m"),yellowBright:Z("\x1B[93m","\x1B[39m"),blueBright:Z("\x1B[94m","\x1B[39m"),magentaBright:Z("\x1B[95m","\x1B[39m"),cyanBright:Z("\x1B[96m","\x1B[39m"),whiteBright:Z("\x1B[97m","\x1B[39m"),bgBlackBright:Z("\x1B[100m","\x1B[49m"),bgRedBright:Z("\x1B[101m","\x1B[49m"),bgGreenBright:Z("\x1B[102m","\x1B[49m"),bgYellowBright:Z("\x1B[103m","\x1B[49m"),bgBlueBright:Z("\x1B[104m","\x1B[49m"),bgMagentaBright:Z("\x1B[105m","\x1B[49m"),bgCyanBright:Z("\x1B[106m","\x1B[49m"),bgWhiteBright:Z("\x1B[107m","\x1B[49m")}};U4.exports=K5();U4.exports.createColors=K5});var B4=D((XT,P5)=>{var Y4={to(q,Z){if(!Z)return`\x1B[${q+1}G`;return`\x1B[${Z+1};${q+1}H`},move(q,Z){let X="";if(q<0)X+=`\x1B[${-q}D`;else if(q>0)X+=`\x1B[${q}C`;if(Z<0)X+=`\x1B[${-Z}A`;else if(Z>0)X+=`\x1B[${Z}B`;return X},up:(q=1)=>`\x1B[${q}A`,down:(q=1)=>`\x1B[${q}B`,forward:(q=1)=>`\x1B[${q}C`,backward:(q=1)=>`\x1B[${q}D`,nextLine:(q=1)=>"\x1B[E".repeat(q),prevLine:(q=1)=>"\x1B[F".repeat(q),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},jU={up:(q=1)=>"\x1B[S".repeat(q),down:(q=1)=>"\x1B[T".repeat(q)},EU={screen:"\x1B[2J",up:(q=1)=>"\x1B[1J".repeat(q),down:(q=1)=>"\x1B[J".repeat(q),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(q){let Z="";for(let X=0;X<q;X++)Z+=this.line+(X<q-1?Y4.up():"");if(q)Z+=Y4.left;return Z}};P5.exports={cursor:Y4,scroll:jU,erase:EU,beep:"\x07"}});var Z2=h1(q2(),1),{program:GY,createCommand:YY,createArgument:BY,createOption:TY,CommanderError:_Y,InvalidArgumentError:LY,InvalidOptionArgumentError:WY,Command:g,Argument:RY,Option:VY,Help:IY}=Z2.default;import{join as L1}from"node:path";import{homedir as K7,platform as P7}from"node:os";import{mkdir as D7,stat as F7}from"node:fs/promises";import{spawn as O7}from"node:child_process";import{join as _1}from"node:path";import{homedir as W7,platform as R7}from"node:os";import{appendFileSync as J2,mkdirSync as V7}from"node:fs";function $2(){let q=W7(),Z=R7();if(Z==="darwin")return _1(q,"Library","Logs","agentdeps");if(Z==="win32"){let $=process.env.LOCALAPPDATA??_1(q,"AppData","Local");return _1($,"agentdeps","logs")}let X=process.env.XDG_STATE_HOME;if(X)return _1(X,"agentdeps","logs");let J=process.env.XDG_CACHE_HOME;return _1(J??_1(q,".cache"),"agentdeps","logs")}function aq(){return _1($2(),"agentdeps.log")}var N0=0,I7=0,X2=!1;function Q2(){if(X2)return!0;try{return V7($2(),{recursive:!0}),X2=!0,!0}catch{return!1}}function M7(q){if(q instanceof Error)return q.stack??`${q.name}: ${q.message}`;if(typeof q==="object"&&q!==null)return JSON.stringify(q,null,2);return String(q)}function z2(){return new Date().toISOString()}function o(q,Z){if(!Q2())return;let X=`[${z2()}] ERROR [${q}]
166
166
  ${M7(Z)}
167
167
 
168
168
  `;try{J2(aq(),X)}catch{}N0++}function sq(q,Z){if(!Q2())return;let X=`[${z2()}] WARN [${q}] ${Z}
169
169
  `;try{J2(aq(),X)}catch{}I7++}function A0(){if(N0===0)return;console.error(`
170
170
  ⚠ ${N0} error${N0===1?"":"s"} occurred. See log for details:
171
- ${aq()}`)}function H2(){let q=K7(),Z=P7();if(Z==="darwin")return L1(q,"Library","Caches","agentdeps","repos");if(Z==="win32"){let J=process.env.LOCALAPPDATA??L1(q,"AppData","Local");return L1(J,"agentdeps","repos")}let X=process.env.XDG_CACHE_HOME;return L1(X??L1(q,".cache"),"agentdeps","repos")}async function W1(q,Z){return new Promise((X)=>{let J=O7("git",q,{cwd:Z,stdio:["ignore","pipe","pipe"]}),$=[],Q=[];J.stdout.on("data",(z)=>$.push(z)),J.stderr.on("data",(z)=>Q.push(z)),J.on("close",(z)=>{X({success:z===0,stdout:Buffer.concat($).toString().trim(),stderr:Buffer.concat(Q).toString().trim()})}),J.on("error",()=>{X({success:!1,stdout:"",stderr:"Failed to spawn git process"})})})}async function U2(){try{return(await W1(["--version"])).success}catch{return!1}}async function N7(q){try{return(await F7(q)).isDirectory()}catch{return!1}}async function A7(q,Z,X){let J=H2();await D7(J,{recursive:!0});let $=L1(J,X),Q=await W1(["clone","--branch",Z,"--single-branch",q,$]);if(!Q.success){if((await W1(["clone",q,$])).success){let H=await W1(["checkout",Z],$);if(!H.success)return{success:!1,path:$,error:H.stderr};return{success:!0,path:$}}return{success:!1,path:$,error:Q.stderr}}return{success:!0,path:$}}async function S7(q,Z){let X=await W1(["fetch","origin"],q);if(!X.success)return{success:!1,error:X.stderr};if((await W1(["reset","--hard",`origin/${Z}`],q)).success)return{success:!0};let $=await W1(["checkout",Z],q);if(!$.success)return{success:!1,error:$.stderr};return{success:!0}}async function S0(q,Z,X){let J=H2(),$=L1(J,X);if(await N7($)){let z=await S7($,Z);if(!z.success)o("cache.update",Error(`Failed to update ${X}: ${z.error}`)),console.warn(`⚠ Failed to update ${X} (using cached version)`);return{success:!0,path:$}}let Q=await A7(q,Z,X);if(!Q.success)o("cache.clone",Error(`Failed to clone ${q}: ${Q.error}`)),console.warn(`⚠ Failed to clone ${q}`);return Q}var hH=a9(),uH=$0(),mH=E9(),Q4=Q0(),dH=l1(),G1=S(),lH=$1(),pH=C(),cH=z1(),iH=H1(),aB=Bq(),aH=X4(),sH=J4(),rH=$4(),Lq=W5(),R5=m1();var nH=hH.Composer,oH=uH.Document,tH=mH.Schema,eH=Q4.YAMLError,qU=Q4.YAMLParseError,ZU=Q4.YAMLWarning,XU=dH.Alias,JU=G1.isAlias,$U=G1.isCollection,QU=G1.isDocument,zU=G1.isMap,HU=G1.isNode,UU=G1.isPair,GU=G1.isScalar,YU=G1.isSeq,BU=lH.Pair,TU=pH.Scalar,_U=cH.YAMLMap,LU=iH.YAMLSeq;var WU=aH.Lexer,RU=sH.LineCounter,VU=rH.Parser,B0=Lq.parse,IU=Lq.parseAllDocuments,MU=Lq.parseDocument,T0=Lq.stringify,KU=R5.visit,PU=R5.visitAsync;import{mkdir as DU,readFile as FU,writeFile as OU,access as V5}from"node:fs/promises";import{join as F1}from"node:path";import{homedir as NU,platform as AU}from"node:os";function z4(){let q=NU(),Z=AU();if(Z==="darwin")return F1(q,"Library","Application Support","agentdeps");if(Z==="win32"){let J=process.env.APPDATA??F1(q,"AppData","Roaming");return F1(J,"agentdeps")}let X=process.env.XDG_CONFIG_HOME;return F1(X??F1(q,".config"),"agentdeps")}function Wq(){return F1(z4(),"config.yaml")}function Rq(){return F1(z4(),"agents.yaml")}async function I5(){try{return await V5(Wq()),!0}catch{return!1}}async function H4(){let q=Wq();try{await V5(q)}catch{return}let Z=await FU(q,"utf-8"),X=B0(Z),J=X.clone_method??"ssh";if(J!=="ssh"&&J!=="https")throw Error(`Invalid clone_method: "${J}". Must be "ssh" or "https".`);let $=X.install_method??"link";if($!=="link"&&$!=="copy")throw Error(`Invalid install_method: "${$}". Must be "link" or "copy".`);let Q=X.agents??[];if(!Array.isArray(Q))throw Error(`Invalid agents: expected an array, got ${typeof Q}.`);return{clone_method:J,agents:Q,install_method:$,custom_agents:X.custom_agents}}async function Y1(){try{let q=await H4();if(!q)console.error("✗ No global config found. Run `agentdeps config` first."),process.exit(1);return q}catch(q){o("config",q);let Z=q instanceof Error?q.message:String(q);console.error(`✗ Invalid config at ${Wq()}: ${Z}`),console.error(" Run `agentdeps config` to fix it."),A0(),process.exit(1)}}async function Vq(q){let Z=z4();await DU(Z,{recursive:!0});let X=T0(q,{lineWidth:0});await OU(Wq(),X,"utf-8")}var Oq=h1(G4(),1);import{stdout as N5,stdin as CU}from"node:process";var m=h1(B4(),1);import fU from"node:readline";var yU=(q)=>q===161||q===164||q===167||q===168||q===170||q===173||q===174||q>=176&&q<=180||q>=182&&q<=186||q>=188&&q<=191||q===198||q===208||q===215||q===216||q>=222&&q<=225||q===230||q>=232&&q<=234||q===236||q===237||q===240||q===242||q===243||q>=247&&q<=250||q===252||q===254||q===257||q===273||q===275||q===283||q===294||q===295||q===299||q>=305&&q<=307||q===312||q>=319&&q<=322||q===324||q>=328&&q<=331||q===333||q===338||q===339||q===358||q===359||q===363||q===462||q===464||q===466||q===468||q===470||q===472||q===474||q===476||q===593||q===609||q===708||q===711||q>=713&&q<=715||q===717||q===720||q>=728&&q<=731||q===733||q===735||q>=768&&q<=879||q>=913&&q<=929||q>=931&&q<=937||q>=945&&q<=961||q>=963&&q<=969||q===1025||q>=1040&&q<=1103||q===1105||q===8208||q>=8211&&q<=8214||q===8216||q===8217||q===8220||q===8221||q>=8224&&q<=8226||q>=8228&&q<=8231||q===8240||q===8242||q===8243||q===8245||q===8251||q===8254||q===8308||q===8319||q>=8321&&q<=8324||q===8364||q===8451||q===8453||q===8457||q===8467||q===8470||q===8481||q===8482||q===8486||q===8491||q===8531||q===8532||q>=8539&&q<=8542||q>=8544&&q<=8555||q>=8560&&q<=8569||q===8585||q>=8592&&q<=8601||q===8632||q===8633||q===8658||q===8660||q===8679||q===8704||q===8706||q===8707||q===8711||q===8712||q===8715||q===8719||q===8721||q===8725||q===8730||q>=8733&&q<=8736||q===8739||q===8741||q>=8743&&q<=8748||q===8750||q>=8756&&q<=8759||q===8764||q===8765||q===8776||q===8780||q===8786||q===8800||q===8801||q>=8804&&q<=8807||q===8810||q===8811||q===8814||q===8815||q===8834||q===8835||q===8838||q===8839||q===8853||q===8857||q===8869||q===8895||q===8978||q>=9312&&q<=9449||q>=9451&&q<=9547||q>=9552&&q<=9587||q>=9600&&q<=9615||q>=9618&&q<=9621||q===9632||q===9633||q>=9635&&q<=9641||q===9650||q===9651||q===9654||q===9655||q===9660||q===9661||q===9664||q===9665||q>=9670&&q<=9672||q===9675||q>=9678&&q<=9681||q>=9698&&q<=9701||q===9711||q===9733||q===9734||q===9737||q===9742||q===9743||q===9756||q===9758||q===9792||q===9794||q===9824||q===9825||q>=9827&&q<=9829||q>=9831&&q<=9834||q===9836||q===9837||q===9839||q===9886||q===9887||q===9919||q>=9926&&q<=9933||q>=9935&&q<=9939||q>=9941&&q<=9953||q===9955||q===9960||q===9961||q>=9963&&q<=9969||q===9972||q>=9974&&q<=9977||q===9979||q===9980||q===9982||q===9983||q===10045||q>=10102&&q<=10111||q>=11094&&q<=11097||q>=12872&&q<=12879||q>=57344&&q<=63743||q>=65024&&q<=65039||q===65533||q>=127232&&q<=127242||q>=127248&&q<=127277||q>=127280&&q<=127337||q>=127344&&q<=127373||q===127375||q===127376||q>=127387&&q<=127404||q>=917760&&q<=917999||q>=983040&&q<=1048573||q>=1048576&&q<=1114109,xU=(q)=>q===12288||q>=65281&&q<=65376||q>=65504&&q<=65510,kU=(q)=>q>=4352&&q<=4447||q===8986||q===8987||q===9001||q===9002||q>=9193&&q<=9196||q===9200||q===9203||q===9725||q===9726||q===9748||q===9749||q>=9800&&q<=9811||q===9855||q===9875||q===9889||q===9898||q===9899||q===9917||q===9918||q===9924||q===9925||q===9934||q===9940||q===9962||q===9970||q===9971||q===9973||q===9978||q===9981||q===9989||q===9994||q===9995||q===10024||q===10060||q===10062||q>=10067&&q<=10069||q===10071||q>=10133&&q<=10135||q===10160||q===10175||q===11035||q===11036||q===11088||q===11093||q>=11904&&q<=11929||q>=11931&&q<=12019||q>=12032&&q<=12245||q>=12272&&q<=12287||q>=12289&&q<=12350||q>=12353&&q<=12438||q>=12441&&q<=12543||q>=12549&&q<=12591||q>=12593&&q<=12686||q>=12688&&q<=12771||q>=12783&&q<=12830||q>=12832&&q<=12871||q>=12880&&q<=19903||q>=19968&&q<=42124||q>=42128&&q<=42182||q>=43360&&q<=43388||q>=44032&&q<=55203||q>=63744&&q<=64255||q>=65040&&q<=65049||q>=65072&&q<=65106||q>=65108&&q<=65126||q>=65128&&q<=65131||q>=94176&&q<=94180||q===94192||q===94193||q>=94208&&q<=100343||q>=100352&&q<=101589||q>=101632&&q<=101640||q>=110576&&q<=110579||q>=110581&&q<=110587||q===110589||q===110590||q>=110592&&q<=110882||q===110898||q>=110928&&q<=110930||q===110933||q>=110948&&q<=110951||q>=110960&&q<=111355||q===126980||q===127183||q===127374||q>=127377&&q<=127386||q>=127488&&q<=127490||q>=127504&&q<=127547||q>=127552&&q<=127560||q===127568||q===127569||q>=127584&&q<=127589||q>=127744&&q<=127776||q>=127789&&q<=127797||q>=127799&&q<=127868||q>=127870&&q<=127891||q>=127904&&q<=127946||q>=127951&&q<=127955||q>=127968&&q<=127984||q===127988||q>=127992&&q<=128062||q===128064||q>=128066&&q<=128252||q>=128255&&q<=128317||q>=128331&&q<=128334||q>=128336&&q<=128359||q===128378||q===128405||q===128406||q===128420||q>=128507&&q<=128591||q>=128640&&q<=128709||q===128716||q>=128720&&q<=128722||q>=128725&&q<=128727||q>=128732&&q<=128735||q===128747||q===128748||q>=128756&&q<=128764||q>=128992&&q<=129003||q===129008||q>=129292&&q<=129338||q>=129340&&q<=129349||q>=129351&&q<=129535||q>=129648&&q<=129660||q>=129664&&q<=129672||q>=129680&&q<=129725||q>=129727&&q<=129733||q>=129742&&q<=129755||q>=129760&&q<=129768||q>=129776&&q<=129784||q>=131072&&q<=196605||q>=196608&&q<=262141,T4=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,Kq=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,Pq=/\t{1,1000}/y,_4=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,Dq=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,vU=/\p{M}+/gu,gU={limit:1/0,ellipsis:""},A5=(q,Z={},X={})=>{let J=Z.limit??1/0,$=Z.ellipsis??"",Q=Z?.ellipsisWidth??($?A5($,gU,X).width:0),z=X.ansiWidth??0,H=X.controlWidth??0,U=X.tabWidth??8,G=X.ambiguousWidth??1,Y=X.emojiWidth??2,B=X.fullWidthWidth??2,_=X.regularWidth??1,R=X.wideWidth??2,W=0,T=0,L=q.length,I=0,M=!1,P=L,O=Math.max(0,J-Q),N=0,A=0,K=0,V=0;q:for(;;){if(A>N||T>=L&&T>W){let w=q.slice(N,A)||q.slice(W,T);I=0;for(let y of w.replaceAll(vU,"")){let x=y.codePointAt(0)||0;if(xU(x)?V=B:kU(x)?V=R:G!==_&&yU(x)?V=G:V=_,K+V>O&&(P=Math.min(P,Math.max(N,W)+I)),K+V>J){M=!0;break q}I+=y.length,K+=V}N=A=0}if(T>=L)break;if(Dq.lastIndex=T,Dq.test(q)){if(I=Dq.lastIndex-T,V=I*_,K+V>O&&(P=Math.min(P,T+Math.floor((O-K)/_))),K+V>J){M=!0;break}K+=V,N=W,A=T,T=W=Dq.lastIndex;continue}if(T4.lastIndex=T,T4.test(q)){if(K+z>O&&(P=Math.min(P,T)),K+z>J){M=!0;break}K+=z,N=W,A=T,T=W=T4.lastIndex;continue}if(Kq.lastIndex=T,Kq.test(q)){if(I=Kq.lastIndex-T,V=I*H,K+V>O&&(P=Math.min(P,T+Math.floor((O-K)/H))),K+V>J){M=!0;break}K+=V,N=W,A=T,T=W=Kq.lastIndex;continue}if(Pq.lastIndex=T,Pq.test(q)){if(I=Pq.lastIndex-T,V=I*U,K+V>O&&(P=Math.min(P,T+Math.floor((O-K)/U))),K+V>J){M=!0;break}K+=V,N=W,A=T,T=W=Pq.lastIndex;continue}if(_4.lastIndex=T,_4.test(q)){if(K+Y>O&&(P=Math.min(P,T)),K+Y>J){M=!0;break}K+=Y,N=W,A=T,T=W=_4.lastIndex;continue}T+=1}return{width:M?O:K,index:M?P:L,truncated:M,ellipsed:M&&J>=Q}},hU={limit:1/0,ellipsis:"",ellipsisWidth:0},_0=(q,Z={})=>A5(q,hU,Z).width,Nq="\x1B",S5="›",uU=39,V4="\x07",w5="[",mU="]",b5="m",I4=`${mU}8;;`,D5=new RegExp(`(?:\\${w5}(?<code>\\d+)m|\\${I4}(?<uri>.*)${V4})`,"y"),dU=(q)=>{if(q>=30&&q<=37||q>=90&&q<=97)return 39;if(q>=40&&q<=47||q>=100&&q<=107)return 49;if(q===1||q===2)return 22;if(q===3)return 23;if(q===4)return 24;if(q===7)return 27;if(q===8)return 28;if(q===9)return 29;if(q===0)return 0},F5=(q)=>`${Nq}${w5}${q}${b5}`,O5=(q)=>`${Nq}${I4}${q}${V4}`,lU=(q)=>q.map((Z)=>_0(Z)),L4=(q,Z,X)=>{let J=Z[Symbol.iterator](),$=!1,Q=!1,z=q.at(-1),H=z===void 0?0:_0(z),U=J.next(),G=J.next(),Y=0;for(;!U.done;){let B=U.value,_=_0(B);H+_<=X?q[q.length-1]+=B:(q.push(B),H=0),(B===Nq||B===S5)&&($=!0,Q=Z.startsWith(I4,Y+1)),$?Q?B===V4&&($=!1,Q=!1):B===b5&&($=!1):(H+=_,H===X&&!G.done&&(q.push(""),H=0)),U=G,G=J.next(),Y+=B.length}z=q.at(-1),!H&&z!==void 0&&z.length>0&&q.length>1&&(q[q.length-2]+=q.pop())},pU=(q)=>{let Z=q.split(" "),X=Z.length;for(;X>0&&!(_0(Z[X-1])>0);)X--;return X===Z.length?q:Z.slice(0,X).join(" ")+Z.slice(X).join("")},cU=(q,Z,X={})=>{if(X.trim!==!1&&q.trim()==="")return"";let J="",$,Q,z=q.split(" "),H=lU(z),U=[""];for(let[W,T]of z.entries()){X.trim!==!1&&(U[U.length-1]=(U.at(-1)??"").trimStart());let L=_0(U.at(-1)??"");if(W!==0&&(L>=Z&&(X.wordWrap===!1||X.trim===!1)&&(U.push(""),L=0),(L>0||X.trim===!1)&&(U[U.length-1]+=" ",L++)),X.hard&&H[W]>Z){let I=Z-L,M=1+Math.floor((H[W]-I-1)/Z);Math.floor((H[W]-1)/Z)<M&&U.push(""),L4(U,T,Z);continue}if(L+H[W]>Z&&L>0&&H[W]>0){if(X.wordWrap===!1&&L<Z){L4(U,T,Z);continue}U.push("")}if(L+H[W]>Z&&X.wordWrap===!1){L4(U,T,Z);continue}U[U.length-1]+=T}X.trim!==!1&&(U=U.map((W)=>pU(W)));let G=U.join(`
171
+ ${aq()}`)}function H2(){let q=K7(),Z=P7();if(Z==="darwin")return L1(q,"Library","Caches","agentdeps","repos");if(Z==="win32"){let J=process.env.LOCALAPPDATA??L1(q,"AppData","Local");return L1(J,"agentdeps","repos")}let X=process.env.XDG_CACHE_HOME;return L1(X??L1(q,".cache"),"agentdeps","repos")}async function W1(q,Z){return new Promise((X)=>{let J=O7("git",q,{cwd:Z,stdio:["ignore","pipe","pipe"]}),$=[],Q=[];J.stdout.on("data",(z)=>$.push(z)),J.stderr.on("data",(z)=>Q.push(z)),J.on("close",(z)=>{X({success:z===0,stdout:Buffer.concat($).toString().trim(),stderr:Buffer.concat(Q).toString().trim()})}),J.on("error",()=>{X({success:!1,stdout:"",stderr:"Failed to spawn git process"})})})}async function U2(){try{return(await W1(["--version"])).success}catch{return!1}}async function N7(q){try{return(await F7(q)).isDirectory()}catch{return!1}}async function A7(q,Z,X){let J=H2();await D7(J,{recursive:!0});let $=L1(J,X),Q=await W1(["clone","--branch",Z,"--single-branch",q,$]);if(!Q.success){if((await W1(["clone",q,$])).success){let H=await W1(["checkout",Z],$);if(!H.success)return{success:!1,path:$,error:H.stderr};return{success:!0,path:$}}return{success:!1,path:$,error:Q.stderr}}return{success:!0,path:$}}async function S7(q,Z){let X=await W1(["fetch","origin"],q);if(!X.success)return{success:!1,error:X.stderr};if((await W1(["reset","--hard",`origin/${Z}`],q)).success)return{success:!0};let $=await W1(["checkout",Z],q);if(!$.success)return{success:!1,error:$.stderr};return{success:!0}}async function S0(q,Z,X){let J=H2(),$=L1(J,X);if(await N7($)){let z=await S7($,Z);if(!z.success)o("cache.update",Error(`Failed to update ${X}: ${z.error}`)),console.warn(`⚠ Failed to update ${X} (using cached version)`);return{success:!0,path:$}}let Q=await A7(q,Z,X);if(!Q.success)o("cache.clone",Error(`Failed to clone ${q}: ${Q.error}`)),console.warn(`⚠ Failed to clone ${q}`);return Q}var hH=a9(),uH=$0(),mH=E9(),Q4=Q0(),dH=l1(),G1=S(),lH=$1(),pH=C(),cH=z1(),iH=H1(),aB=Bq(),aH=X4(),sH=J4(),rH=$4(),Lq=W5(),R5=m1();var nH=hH.Composer,oH=uH.Document,tH=mH.Schema,eH=Q4.YAMLError,qU=Q4.YAMLParseError,ZU=Q4.YAMLWarning,XU=dH.Alias,JU=G1.isAlias,$U=G1.isCollection,QU=G1.isDocument,zU=G1.isMap,HU=G1.isNode,UU=G1.isPair,GU=G1.isScalar,YU=G1.isSeq,BU=lH.Pair,TU=pH.Scalar,_U=cH.YAMLMap,LU=iH.YAMLSeq;var WU=aH.Lexer,RU=sH.LineCounter,VU=rH.Parser,B0=Lq.parse,IU=Lq.parseAllDocuments,MU=Lq.parseDocument,T0=Lq.stringify,KU=R5.visit,PU=R5.visitAsync;import{mkdir as DU,readFile as FU,writeFile as OU,access as V5}from"node:fs/promises";import{join as v1}from"node:path";import{homedir as NU,platform as AU}from"node:os";function z4(){let q=NU();if(AU()==="win32"){let J=process.env.APPDATA??v1(q,"AppData","Roaming");return v1(J,"agentdeps")}let X=process.env.XDG_CONFIG_HOME;return v1(X??v1(q,".config"),"agentdeps")}function Wq(){return v1(z4(),"config.yaml")}function Rq(){return v1(z4(),"agents.yaml")}async function I5(){try{return await V5(Wq()),!0}catch{return!1}}async function H4(){let q=Wq();try{await V5(q)}catch{return}let Z=await FU(q,"utf-8"),X=B0(Z),J=X.clone_method??"ssh";if(J!=="ssh"&&J!=="https")throw Error(`Invalid clone_method: "${J}". Must be "ssh" or "https".`);let $=X.install_method??"link";if($!=="link"&&$!=="copy")throw Error(`Invalid install_method: "${$}". Must be "link" or "copy".`);let Q=X.agents??[];if(!Array.isArray(Q))throw Error(`Invalid agents: expected an array, got ${typeof Q}.`);return{clone_method:J,agents:Q,install_method:$,custom_agents:X.custom_agents}}async function Y1(){try{let q=await H4();if(!q)console.error("✗ No global config found. Run `agentdeps config` first."),process.exit(1);return q}catch(q){o("config",q);let Z=q instanceof Error?q.message:String(q);console.error(`✗ Invalid config at ${Wq()}: ${Z}`),console.error(" Run `agentdeps config` to fix it."),A0(),process.exit(1)}}async function Vq(q){let Z=z4();await DU(Z,{recursive:!0});let X=T0(q,{lineWidth:0});await OU(Wq(),X,"utf-8")}var Oq=h1(G4(),1);import{stdout as N5,stdin as CU}from"node:process";var m=h1(B4(),1);import fU from"node:readline";var yU=(q)=>q===161||q===164||q===167||q===168||q===170||q===173||q===174||q>=176&&q<=180||q>=182&&q<=186||q>=188&&q<=191||q===198||q===208||q===215||q===216||q>=222&&q<=225||q===230||q>=232&&q<=234||q===236||q===237||q===240||q===242||q===243||q>=247&&q<=250||q===252||q===254||q===257||q===273||q===275||q===283||q===294||q===295||q===299||q>=305&&q<=307||q===312||q>=319&&q<=322||q===324||q>=328&&q<=331||q===333||q===338||q===339||q===358||q===359||q===363||q===462||q===464||q===466||q===468||q===470||q===472||q===474||q===476||q===593||q===609||q===708||q===711||q>=713&&q<=715||q===717||q===720||q>=728&&q<=731||q===733||q===735||q>=768&&q<=879||q>=913&&q<=929||q>=931&&q<=937||q>=945&&q<=961||q>=963&&q<=969||q===1025||q>=1040&&q<=1103||q===1105||q===8208||q>=8211&&q<=8214||q===8216||q===8217||q===8220||q===8221||q>=8224&&q<=8226||q>=8228&&q<=8231||q===8240||q===8242||q===8243||q===8245||q===8251||q===8254||q===8308||q===8319||q>=8321&&q<=8324||q===8364||q===8451||q===8453||q===8457||q===8467||q===8470||q===8481||q===8482||q===8486||q===8491||q===8531||q===8532||q>=8539&&q<=8542||q>=8544&&q<=8555||q>=8560&&q<=8569||q===8585||q>=8592&&q<=8601||q===8632||q===8633||q===8658||q===8660||q===8679||q===8704||q===8706||q===8707||q===8711||q===8712||q===8715||q===8719||q===8721||q===8725||q===8730||q>=8733&&q<=8736||q===8739||q===8741||q>=8743&&q<=8748||q===8750||q>=8756&&q<=8759||q===8764||q===8765||q===8776||q===8780||q===8786||q===8800||q===8801||q>=8804&&q<=8807||q===8810||q===8811||q===8814||q===8815||q===8834||q===8835||q===8838||q===8839||q===8853||q===8857||q===8869||q===8895||q===8978||q>=9312&&q<=9449||q>=9451&&q<=9547||q>=9552&&q<=9587||q>=9600&&q<=9615||q>=9618&&q<=9621||q===9632||q===9633||q>=9635&&q<=9641||q===9650||q===9651||q===9654||q===9655||q===9660||q===9661||q===9664||q===9665||q>=9670&&q<=9672||q===9675||q>=9678&&q<=9681||q>=9698&&q<=9701||q===9711||q===9733||q===9734||q===9737||q===9742||q===9743||q===9756||q===9758||q===9792||q===9794||q===9824||q===9825||q>=9827&&q<=9829||q>=9831&&q<=9834||q===9836||q===9837||q===9839||q===9886||q===9887||q===9919||q>=9926&&q<=9933||q>=9935&&q<=9939||q>=9941&&q<=9953||q===9955||q===9960||q===9961||q>=9963&&q<=9969||q===9972||q>=9974&&q<=9977||q===9979||q===9980||q===9982||q===9983||q===10045||q>=10102&&q<=10111||q>=11094&&q<=11097||q>=12872&&q<=12879||q>=57344&&q<=63743||q>=65024&&q<=65039||q===65533||q>=127232&&q<=127242||q>=127248&&q<=127277||q>=127280&&q<=127337||q>=127344&&q<=127373||q===127375||q===127376||q>=127387&&q<=127404||q>=917760&&q<=917999||q>=983040&&q<=1048573||q>=1048576&&q<=1114109,xU=(q)=>q===12288||q>=65281&&q<=65376||q>=65504&&q<=65510,kU=(q)=>q>=4352&&q<=4447||q===8986||q===8987||q===9001||q===9002||q>=9193&&q<=9196||q===9200||q===9203||q===9725||q===9726||q===9748||q===9749||q>=9800&&q<=9811||q===9855||q===9875||q===9889||q===9898||q===9899||q===9917||q===9918||q===9924||q===9925||q===9934||q===9940||q===9962||q===9970||q===9971||q===9973||q===9978||q===9981||q===9989||q===9994||q===9995||q===10024||q===10060||q===10062||q>=10067&&q<=10069||q===10071||q>=10133&&q<=10135||q===10160||q===10175||q===11035||q===11036||q===11088||q===11093||q>=11904&&q<=11929||q>=11931&&q<=12019||q>=12032&&q<=12245||q>=12272&&q<=12287||q>=12289&&q<=12350||q>=12353&&q<=12438||q>=12441&&q<=12543||q>=12549&&q<=12591||q>=12593&&q<=12686||q>=12688&&q<=12771||q>=12783&&q<=12830||q>=12832&&q<=12871||q>=12880&&q<=19903||q>=19968&&q<=42124||q>=42128&&q<=42182||q>=43360&&q<=43388||q>=44032&&q<=55203||q>=63744&&q<=64255||q>=65040&&q<=65049||q>=65072&&q<=65106||q>=65108&&q<=65126||q>=65128&&q<=65131||q>=94176&&q<=94180||q===94192||q===94193||q>=94208&&q<=100343||q>=100352&&q<=101589||q>=101632&&q<=101640||q>=110576&&q<=110579||q>=110581&&q<=110587||q===110589||q===110590||q>=110592&&q<=110882||q===110898||q>=110928&&q<=110930||q===110933||q>=110948&&q<=110951||q>=110960&&q<=111355||q===126980||q===127183||q===127374||q>=127377&&q<=127386||q>=127488&&q<=127490||q>=127504&&q<=127547||q>=127552&&q<=127560||q===127568||q===127569||q>=127584&&q<=127589||q>=127744&&q<=127776||q>=127789&&q<=127797||q>=127799&&q<=127868||q>=127870&&q<=127891||q>=127904&&q<=127946||q>=127951&&q<=127955||q>=127968&&q<=127984||q===127988||q>=127992&&q<=128062||q===128064||q>=128066&&q<=128252||q>=128255&&q<=128317||q>=128331&&q<=128334||q>=128336&&q<=128359||q===128378||q===128405||q===128406||q===128420||q>=128507&&q<=128591||q>=128640&&q<=128709||q===128716||q>=128720&&q<=128722||q>=128725&&q<=128727||q>=128732&&q<=128735||q===128747||q===128748||q>=128756&&q<=128764||q>=128992&&q<=129003||q===129008||q>=129292&&q<=129338||q>=129340&&q<=129349||q>=129351&&q<=129535||q>=129648&&q<=129660||q>=129664&&q<=129672||q>=129680&&q<=129725||q>=129727&&q<=129733||q>=129742&&q<=129755||q>=129760&&q<=129768||q>=129776&&q<=129784||q>=131072&&q<=196605||q>=196608&&q<=262141,T4=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,Kq=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,Pq=/\t{1,1000}/y,_4=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,Dq=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,vU=/\p{M}+/gu,gU={limit:1/0,ellipsis:""},A5=(q,Z={},X={})=>{let J=Z.limit??1/0,$=Z.ellipsis??"",Q=Z?.ellipsisWidth??($?A5($,gU,X).width:0),z=X.ansiWidth??0,H=X.controlWidth??0,U=X.tabWidth??8,G=X.ambiguousWidth??1,Y=X.emojiWidth??2,B=X.fullWidthWidth??2,_=X.regularWidth??1,R=X.wideWidth??2,W=0,T=0,L=q.length,I=0,M=!1,P=L,O=Math.max(0,J-Q),N=0,A=0,K=0,V=0;q:for(;;){if(A>N||T>=L&&T>W){let w=q.slice(N,A)||q.slice(W,T);I=0;for(let y of w.replaceAll(vU,"")){let x=y.codePointAt(0)||0;if(xU(x)?V=B:kU(x)?V=R:G!==_&&yU(x)?V=G:V=_,K+V>O&&(P=Math.min(P,Math.max(N,W)+I)),K+V>J){M=!0;break q}I+=y.length,K+=V}N=A=0}if(T>=L)break;if(Dq.lastIndex=T,Dq.test(q)){if(I=Dq.lastIndex-T,V=I*_,K+V>O&&(P=Math.min(P,T+Math.floor((O-K)/_))),K+V>J){M=!0;break}K+=V,N=W,A=T,T=W=Dq.lastIndex;continue}if(T4.lastIndex=T,T4.test(q)){if(K+z>O&&(P=Math.min(P,T)),K+z>J){M=!0;break}K+=z,N=W,A=T,T=W=T4.lastIndex;continue}if(Kq.lastIndex=T,Kq.test(q)){if(I=Kq.lastIndex-T,V=I*H,K+V>O&&(P=Math.min(P,T+Math.floor((O-K)/H))),K+V>J){M=!0;break}K+=V,N=W,A=T,T=W=Kq.lastIndex;continue}if(Pq.lastIndex=T,Pq.test(q)){if(I=Pq.lastIndex-T,V=I*U,K+V>O&&(P=Math.min(P,T+Math.floor((O-K)/U))),K+V>J){M=!0;break}K+=V,N=W,A=T,T=W=Pq.lastIndex;continue}if(_4.lastIndex=T,_4.test(q)){if(K+Y>O&&(P=Math.min(P,T)),K+Y>J){M=!0;break}K+=Y,N=W,A=T,T=W=_4.lastIndex;continue}T+=1}return{width:M?O:K,index:M?P:L,truncated:M,ellipsed:M&&J>=Q}},hU={limit:1/0,ellipsis:"",ellipsisWidth:0},_0=(q,Z={})=>A5(q,hU,Z).width,Nq="\x1B",S5="›",uU=39,V4="\x07",w5="[",mU="]",b5="m",I4=`${mU}8;;`,D5=new RegExp(`(?:\\${w5}(?<code>\\d+)m|\\${I4}(?<uri>.*)${V4})`,"y"),dU=(q)=>{if(q>=30&&q<=37||q>=90&&q<=97)return 39;if(q>=40&&q<=47||q>=100&&q<=107)return 49;if(q===1||q===2)return 22;if(q===3)return 23;if(q===4)return 24;if(q===7)return 27;if(q===8)return 28;if(q===9)return 29;if(q===0)return 0},F5=(q)=>`${Nq}${w5}${q}${b5}`,O5=(q)=>`${Nq}${I4}${q}${V4}`,lU=(q)=>q.map((Z)=>_0(Z)),L4=(q,Z,X)=>{let J=Z[Symbol.iterator](),$=!1,Q=!1,z=q.at(-1),H=z===void 0?0:_0(z),U=J.next(),G=J.next(),Y=0;for(;!U.done;){let B=U.value,_=_0(B);H+_<=X?q[q.length-1]+=B:(q.push(B),H=0),(B===Nq||B===S5)&&($=!0,Q=Z.startsWith(I4,Y+1)),$?Q?B===V4&&($=!1,Q=!1):B===b5&&($=!1):(H+=_,H===X&&!G.done&&(q.push(""),H=0)),U=G,G=J.next(),Y+=B.length}z=q.at(-1),!H&&z!==void 0&&z.length>0&&q.length>1&&(q[q.length-2]+=q.pop())},pU=(q)=>{let Z=q.split(" "),X=Z.length;for(;X>0&&!(_0(Z[X-1])>0);)X--;return X===Z.length?q:Z.slice(0,X).join(" ")+Z.slice(X).join("")},cU=(q,Z,X={})=>{if(X.trim!==!1&&q.trim()==="")return"";let J="",$,Q,z=q.split(" "),H=lU(z),U=[""];for(let[W,T]of z.entries()){X.trim!==!1&&(U[U.length-1]=(U.at(-1)??"").trimStart());let L=_0(U.at(-1)??"");if(W!==0&&(L>=Z&&(X.wordWrap===!1||X.trim===!1)&&(U.push(""),L=0),(L>0||X.trim===!1)&&(U[U.length-1]+=" ",L++)),X.hard&&H[W]>Z){let I=Z-L,M=1+Math.floor((H[W]-I-1)/Z);Math.floor((H[W]-1)/Z)<M&&U.push(""),L4(U,T,Z);continue}if(L+H[W]>Z&&L>0&&H[W]>0){if(X.wordWrap===!1&&L<Z){L4(U,T,Z);continue}U.push("")}if(L+H[W]>Z&&X.wordWrap===!1){L4(U,T,Z);continue}U[U.length-1]+=T}X.trim!==!1&&(U=U.map((W)=>pU(W)));let G=U.join(`
172
172
  `),Y=G[Symbol.iterator](),B=Y.next(),_=Y.next(),R=0;for(;!B.done;){let W=B.value,T=_.value;if(J+=W,W===Nq||W===S5){D5.lastIndex=R+1;let I=D5.exec(G)?.groups;if(I?.code!==void 0){let M=Number.parseFloat(I.code);$=M===uU?void 0:M}else I?.uri!==void 0&&(Q=I.uri.length===0?void 0:I.uri)}let L=$?dU($):void 0;T===`
173
173
  `?(Q&&(J+=O5("")),$&&L&&(J+=F5(L))):W===`
174
174
  `&&($&&L&&(J+=F5($)),Q&&(J+=O5(Q))),R+=W.length,B=_,_=Y.next()}return J};function W4(q,Z,X){return String(q).normalize().replaceAll(`\r
175
175
  `,`
176
176
  `).split(`
177
177
  `).map((J)=>cU(J,Z,X)).join(`
178
- `)}var iU=["up","down","left","right","space","enter","cancel"],O1={actions:new Set(iU),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["\x03","cancel"],["escape","cancel"]]),messages:{cancel:"Canceled",error:"Something went wrong"},withGuide:!0};function j5(q,Z){if(typeof q=="string")return O1.aliases.get(q)===Z;for(let X of q)if(X!==void 0&&j5(X,Z))return!0;return!1}function aU(q,Z){if(q===Z)return;let X=q.split(`
178
+ `)}var iU=["up","down","left","right","space","enter","cancel"],F1={actions:new Set(iU),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["\x03","cancel"],["escape","cancel"]]),messages:{cancel:"Canceled",error:"Something went wrong"},withGuide:!0};function j5(q,Z){if(typeof q=="string")return F1.aliases.get(q)===Z;for(let X of q)if(X!==void 0&&j5(X,Z))return!0;return!1}function aU(q,Z){if(q===Z)return;let X=q.split(`
179
179
  `),J=Z.split(`
180
- `),$=Math.max(X.length,J.length),Q=[];for(let z=0;z<$;z++)X[z]!==J[z]&&Q.push(z);return{lines:Q,numLinesBefore:X.length,numLinesAfter:J.length,numLines:$}}var QT=globalThis.process.platform.startsWith("win"),R4=Symbol("clack:cancel");function q1(q){return q===R4}function Fq(q,Z){let X=q;X.isTTY&&X.setRawMode(Z)}var M4=(q)=>("columns"in q)&&typeof q.columns=="number"?q.columns:80,K4=(q)=>("rows"in q)&&typeof q.rows=="number"?q.rows:20;function A1(q,Z,X,J=X){let $=M4(q??N5);return W4(Z,$-X.length,{hard:!0,trim:!1}).split(`
180
+ `),$=Math.max(X.length,J.length),Q=[];for(let z=0;z<$;z++)X[z]!==J[z]&&Q.push(z);return{lines:Q,numLinesBefore:X.length,numLinesAfter:J.length,numLines:$}}var QT=globalThis.process.platform.startsWith("win"),R4=Symbol("clack:cancel");function q1(q){return q===R4}function Fq(q,Z){let X=q;X.isTTY&&X.setRawMode(Z)}var M4=(q)=>("columns"in q)&&typeof q.columns=="number"?q.columns:80,K4=(q)=>("rows"in q)&&typeof q.rows=="number"?q.rows:20;function N1(q,Z,X,J=X){let $=M4(q??N5);return W4(Z,$-X.length,{hard:!0,trim:!1}).split(`
181
181
  `).map((Q,z)=>`${z===0?J:X}${Q}`).join(`
182
- `)}class L0{input;output;_abortSignal;rl;opts;_render;_track=!1;_prevFrame="";_subscribers=new Map;_cursor=0;state="initial";error="";value;userInput="";constructor(q,Z=!0){let{input:X=CU,output:J=N5,render:$,signal:Q,...z}=q;this.opts=z,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=$.bind(this),this._track=Z,this._abortSignal=Q,this.input=X,this.output=J}unsubscribe(){this._subscribers.clear()}setSubscriber(q,Z){let X=this._subscribers.get(q)??[];X.push(Z),this._subscribers.set(q,X)}on(q,Z){this.setSubscriber(q,{cb:Z})}once(q,Z){this.setSubscriber(q,{cb:Z,once:!0})}emit(q,...Z){let X=this._subscribers.get(q)??[],J=[];for(let $ of X)$.cb(...Z),$.once&&J.push(()=>X.splice(X.indexOf($),1));for(let $ of J)$()}prompt(){return new Promise((q)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),q(R4);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}this.rl=fU.createInterface({input:this.input,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),this.rl.prompt(),this.opts.initialUserInput!==void 0&&this._setUserInput(this.opts.initialUserInput,!0),this.input.on("keypress",this.onKeypress),Fq(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(m.cursor.show),this.output.off("resize",this.render),Fq(this.input,!1),q(this.value)}),this.once("cancel",()=>{this.output.write(m.cursor.show),this.output.off("resize",this.render),Fq(this.input,!1),q(R4)})})}_isActionKey(q,Z){return q==="\t"}_setValue(q){this.value=q,this.emit("value",this.value)}_setUserInput(q,Z){this.userInput=q??"",this.emit("userInput",this.userInput),Z&&this._track&&this.rl&&(this.rl.write(this.userInput),this._cursor=this.rl.cursor)}_clearUserInput(){this.rl?.write(null,{ctrl:!0,name:"u"}),this._setUserInput("")}onKeypress(q,Z){if(this._track&&Z.name!=="return"&&(Z.name&&this._isActionKey(q,Z)&&this.rl?.write(null,{ctrl:!0,name:"h"}),this._cursor=this.rl?.cursor??0,this._setUserInput(this.rl?.line)),this.state==="error"&&(this.state="active"),Z?.name&&(!this._track&&O1.aliases.has(Z.name)&&this.emit("cursor",O1.aliases.get(Z.name)),O1.actions.has(Z.name)&&this.emit("cursor",Z.name)),q&&(q.toLowerCase()==="y"||q.toLowerCase()==="n")&&this.emit("confirm",q.toLowerCase()==="y"),this.emit("key",q?.toLowerCase(),Z),Z?.name==="return"){if(this.opts.validate){let X=this.opts.validate(this.value);X&&(this.error=X instanceof Error?X.message:X,this.state="error",this.rl?.write(this.userInput))}this.state!=="error"&&(this.state="submit")}j5([q,Z?.name,Z?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
182
+ `)}class L0{input;output;_abortSignal;rl;opts;_render;_track=!1;_prevFrame="";_subscribers=new Map;_cursor=0;state="initial";error="";value;userInput="";constructor(q,Z=!0){let{input:X=CU,output:J=N5,render:$,signal:Q,...z}=q;this.opts=z,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=$.bind(this),this._track=Z,this._abortSignal=Q,this.input=X,this.output=J}unsubscribe(){this._subscribers.clear()}setSubscriber(q,Z){let X=this._subscribers.get(q)??[];X.push(Z),this._subscribers.set(q,X)}on(q,Z){this.setSubscriber(q,{cb:Z})}once(q,Z){this.setSubscriber(q,{cb:Z,once:!0})}emit(q,...Z){let X=this._subscribers.get(q)??[],J=[];for(let $ of X)$.cb(...Z),$.once&&J.push(()=>X.splice(X.indexOf($),1));for(let $ of J)$()}prompt(){return new Promise((q)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),q(R4);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}this.rl=fU.createInterface({input:this.input,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),this.rl.prompt(),this.opts.initialUserInput!==void 0&&this._setUserInput(this.opts.initialUserInput,!0),this.input.on("keypress",this.onKeypress),Fq(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(m.cursor.show),this.output.off("resize",this.render),Fq(this.input,!1),q(this.value)}),this.once("cancel",()=>{this.output.write(m.cursor.show),this.output.off("resize",this.render),Fq(this.input,!1),q(R4)})})}_isActionKey(q,Z){return q==="\t"}_setValue(q){this.value=q,this.emit("value",this.value)}_setUserInput(q,Z){this.userInput=q??"",this.emit("userInput",this.userInput),Z&&this._track&&this.rl&&(this.rl.write(this.userInput),this._cursor=this.rl.cursor)}_clearUserInput(){this.rl?.write(null,{ctrl:!0,name:"u"}),this._setUserInput("")}onKeypress(q,Z){if(this._track&&Z.name!=="return"&&(Z.name&&this._isActionKey(q,Z)&&this.rl?.write(null,{ctrl:!0,name:"h"}),this._cursor=this.rl?.cursor??0,this._setUserInput(this.rl?.line)),this.state==="error"&&(this.state="active"),Z?.name&&(!this._track&&F1.aliases.has(Z.name)&&this.emit("cursor",F1.aliases.get(Z.name)),F1.actions.has(Z.name)&&this.emit("cursor",Z.name)),q&&(q.toLowerCase()==="y"||q.toLowerCase()==="n")&&this.emit("confirm",q.toLowerCase()==="y"),this.emit("key",q?.toLowerCase(),Z),Z?.name==="return"){if(this.opts.validate){let X=this.opts.validate(this.value);X&&(this.error=X instanceof Error?X.message:X,this.state="error",this.rl?.write(this.userInput))}this.state!=="error"&&(this.state="submit")}j5([q,Z?.name,Z?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
183
183
  `),Fq(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let q=W4(this._prevFrame,process.stdout.columns,{hard:!0,trim:!1}).split(`
184
184
  `).length-1;this.output.write(m.cursor.move(-999,q*-1))}render(){let q=W4(this._render(this)??"",process.stdout.columns,{hard:!0,trim:!1});if(q!==this._prevFrame){if(this.state==="initial")this.output.write(m.cursor.hide);else{let Z=aU(this._prevFrame,q),X=K4(this.output);if(this.restoreCursor(),Z){let J=Math.max(0,Z.numLinesAfter-X),$=Math.max(0,Z.numLinesBefore-X),Q=Z.lines.find((z)=>z>=J);if(Q===void 0){this._prevFrame=q;return}if(Z.lines.length===1){this.output.write(m.cursor.move(0,Q-$)),this.output.write(m.erase.lines(1));let z=q.split(`
185
185
  `);this.output.write(z[Q]),this._prevFrame=q,this.output.write(m.cursor.move(0,z.length-Q-1));return}else if(Z.lines.length>1){if(J<$)Q=J;else{let H=Q-$;H>0&&this.output.write(m.cursor.move(0,H))}this.output.write(m.erase.down());let z=q.split(`
186
186
  `).slice(Q);this.output.write(z.join(`
187
- `)),this._prevFrame=q;return}}this.output.write(m.erase.down())}this.output.write(q),this.state==="initial"&&(this.state="active"),this._prevFrame=q}}}function sU(q,Z){if(q===void 0||Z.length===0)return 0;let X=Z.findIndex((J)=>J.value===q);return X!==-1?X:0}function rU(q,Z){return(Z.label??String(Z.value)).toLowerCase().includes(q.toLowerCase())}function nU(q,Z){if(Z)return q?Z:Z[0]}class E5 extends L0{filteredOptions;multiple;isNavigating=!1;selectedValues=[];focusedValue;#q=0;#X="";#J;#Z;get cursor(){return this.#q}get userInputWithCursor(){if(!this.userInput)return Oq.default.inverse(Oq.default.hidden("_"));if(this._cursor>=this.userInput.length)return`${this.userInput}█`;let q=this.userInput.slice(0,this._cursor),[Z,...X]=this.userInput.slice(this._cursor);return`${q}${Oq.default.inverse(Z)}${X.join("")}`}get options(){return typeof this.#Z=="function"?this.#Z():this.#Z}constructor(q){super(q),this.#Z=q.options;let Z=this.options;this.filteredOptions=[...Z],this.multiple=q.multiple===!0,this.#J=q.filter??rU;let X;if(q.initialValue&&Array.isArray(q.initialValue)?this.multiple?X=q.initialValue:X=q.initialValue.slice(0,1):!this.multiple&&this.options.length>0&&(X=[this.options[0].value]),X)for(let J of X){let $=Z.findIndex((Q)=>Q.value===J);$!==-1&&(this.toggleSelected(J),this.#q=$)}this.focusedValue=this.options[this.#q]?.value,this.on("key",(J,$)=>this.#$(J,$)),this.on("userInput",(J)=>this.#Q(J))}_isActionKey(q,Z){return q==="\t"||this.multiple&&this.isNavigating&&Z.name==="space"&&q!==void 0&&q!==""}#$(q,Z){let X=Z.name==="up",J=Z.name==="down",$=Z.name==="return";X||J?(this.#q=Math.max(0,Math.min(this.#q+(X?-1:1),this.filteredOptions.length-1)),this.focusedValue=this.filteredOptions[this.#q]?.value,this.multiple||(this.selectedValues=[this.focusedValue]),this.isNavigating=!0):$?this.value=nU(this.multiple,this.selectedValues):this.multiple?this.focusedValue!==void 0&&(Z.name==="tab"||this.isNavigating&&Z.name==="space")?this.toggleSelected(this.focusedValue):this.isNavigating=!1:(this.focusedValue&&(this.selectedValues=[this.focusedValue]),this.isNavigating=!1)}deselectAll(){this.selectedValues=[]}toggleSelected(q){this.filteredOptions.length!==0&&(this.multiple?this.selectedValues.includes(q)?this.selectedValues=this.selectedValues.filter((Z)=>Z!==q):this.selectedValues=[...this.selectedValues,q]:this.selectedValues=[q])}#Q(q){if(q!==this.#X){this.#X=q;let Z=this.options;q?this.filteredOptions=Z.filter((X)=>this.#J(q,X)):this.filteredOptions=[...Z],this.#q=sU(this.focusedValue,this.filteredOptions),this.focusedValue=this.filteredOptions[this.#q]?.value,this.multiple||(this.focusedValue!==void 0?this.toggleSelected(this.focusedValue):this.deselectAll())}}}class C5 extends L0{options;cursor=0;#q;getGroupItems(q){return this.options.filter((Z)=>Z.group===q)}isGroupSelected(q){let Z=this.getGroupItems(q),X=this.value;return X===void 0?!1:Z.every((J)=>X.includes(J.value))}toggleValue(){let q=this.options[this.cursor];if(this.value===void 0&&(this.value=[]),q.group===!0){let Z=q.value,X=this.getGroupItems(Z);this.isGroupSelected(Z)?this.value=this.value.filter((J)=>X.findIndex(($)=>$.value===J)===-1):this.value=[...this.value,...X.map((J)=>J.value)],this.value=Array.from(new Set(this.value))}else{let Z=this.value.includes(q.value);this.value=Z?this.value.filter((X)=>X!==q.value):[...this.value,q.value]}}constructor(q){super(q,!1);let{options:Z}=q;this.#q=q.selectableGroups!==!1,this.options=Object.entries(Z).flatMap(([X,J])=>[{value:X,group:!0,label:X},...J.map(($)=>({...$,group:X}))]),this.value=[...q.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:X})=>X===q.cursorAt),this.#q?0:1),this.on("cursor",(X)=>{switch(X){case"left":case"up":{this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;let J=this.options[this.cursor]?.group===!0;!this.#q&&J&&(this.cursor=this.cursor===0?this.options.length-1:this.cursor-1);break}case"down":case"right":{this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;let J=this.options[this.cursor]?.group===!0;!this.#q&&J&&(this.cursor=this.cursor===this.options.length-1?0:this.cursor+1);break}case"space":this.toggleValue();break}})}}function N1(q,Z,X){let J=q+Z,$=Math.max(X.length-1,0),Q=J<0?$:J>$?0:J;return X[Q].disabled?N1(Q,Z<0?-1:1,X):Q}class P4 extends L0{options;cursor=0;get _value(){return this.options[this.cursor].value}get _enabledOptions(){return this.options.filter((q)=>q.disabled!==!0)}toggleAll(){let q=this._enabledOptions,Z=this.value!==void 0&&this.value.length===q.length;this.value=Z?[]:q.map((X)=>X.value)}toggleInvert(){let q=this.value;if(!q)return;let Z=this._enabledOptions.filter((X)=>!q.includes(X.value));this.value=Z.map((X)=>X.value)}toggleValue(){this.value===void 0&&(this.value=[]);let q=this.value.includes(this._value);this.value=q?this.value.filter((Z)=>Z!==this._value):[...this.value,this._value]}constructor(q){super(q,!1),this.options=q.options,this.value=[...q.initialValues??[]];let Z=Math.max(this.options.findIndex(({value:X})=>X===q.cursorAt),0);this.cursor=this.options[Z].disabled?N1(Z,1,this.options):Z,this.on("key",(X)=>{X==="a"&&this.toggleAll(),X==="i"&&this.toggleInvert()}),this.on("cursor",(X)=>{switch(X){case"left":case"up":this.cursor=N1(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=N1(this.cursor,1,this.options);break;case"space":this.toggleValue();break}})}}class D4 extends L0{options;cursor=0;get _selectedValue(){return this.options[this.cursor]}changeValue(){this.value=this._selectedValue.value}constructor(q){super(q,!1),this.options=q.options;let Z=this.options.findIndex(({value:J})=>J===q.initialValue),X=Z===-1?0:Z;this.cursor=this.options[X].disabled?N1(X,1,this.options):X,this.changeValue(),this.on("cursor",(J)=>{switch(J){case"left":case"up":this.cursor=N1(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=N1(this.cursor,1,this.options);break}this.changeValue()})}}var F=h1(G4(),1);import p from"node:process";var h5=h1(B4(),1);function oU(){return p.platform!=="win32"?p.env.TERM!=="linux":!!p.env.CI||!!p.env.WT_SESSION||!!p.env.TERMINUS_SUBLIME||p.env.ConEmuTask==="{cmd::Cmder}"||p.env.TERM_PROGRAM==="Terminus-Sublime"||p.env.TERM_PROGRAM==="vscode"||p.env.TERM==="xterm-256color"||p.env.TERM==="alacritty"||p.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var tU=oU();var j=(q,Z)=>tU?q:Z,eU=j("◆","*"),qG=j("■","x"),ZG=j("▲","x"),u5=j("◇","o"),XG=j("┌","T"),f=j("│","|"),R0=j("└","—"),WT=j("┐","T"),RT=j("┘","—"),JG=j("●",">"),f5=j("○"," "),$G=j("◻","[•]"),y5=j("◼","[+]"),x5=j("◻","[ ]"),VT=j("▪","•"),IT=j("─","-"),MT=j("╮","+"),KT=j("├","+"),PT=j("╯","+"),DT=j("╰","+"),FT=j("╭","+"),QG=j("●","•"),zG=j("◆","*"),HG=j("▲","!"),UG=j("■","x"),m5=(q)=>{switch(q){case"initial":case"active":return F.default.cyan(eU);case"cancel":return F.default.red(qG);case"error":return F.default.yellow(ZG);case"submit":return F.default.green(u5)}},d5=(q)=>{switch(q){case"initial":case"active":return F.default.cyan(f);case"cancel":return F.default.red(f);case"error":return F.default.yellow(f);case"submit":return F.default.green(f)}},GG=(q)=>q===161||q===164||q===167||q===168||q===170||q===173||q===174||q>=176&&q<=180||q>=182&&q<=186||q>=188&&q<=191||q===198||q===208||q===215||q===216||q>=222&&q<=225||q===230||q>=232&&q<=234||q===236||q===237||q===240||q===242||q===243||q>=247&&q<=250||q===252||q===254||q===257||q===273||q===275||q===283||q===294||q===295||q===299||q>=305&&q<=307||q===312||q>=319&&q<=322||q===324||q>=328&&q<=331||q===333||q===338||q===339||q===358||q===359||q===363||q===462||q===464||q===466||q===468||q===470||q===472||q===474||q===476||q===593||q===609||q===708||q===711||q>=713&&q<=715||q===717||q===720||q>=728&&q<=731||q===733||q===735||q>=768&&q<=879||q>=913&&q<=929||q>=931&&q<=937||q>=945&&q<=961||q>=963&&q<=969||q===1025||q>=1040&&q<=1103||q===1105||q===8208||q>=8211&&q<=8214||q===8216||q===8217||q===8220||q===8221||q>=8224&&q<=8226||q>=8228&&q<=8231||q===8240||q===8242||q===8243||q===8245||q===8251||q===8254||q===8308||q===8319||q>=8321&&q<=8324||q===8364||q===8451||q===8453||q===8457||q===8467||q===8470||q===8481||q===8482||q===8486||q===8491||q===8531||q===8532||q>=8539&&q<=8542||q>=8544&&q<=8555||q>=8560&&q<=8569||q===8585||q>=8592&&q<=8601||q===8632||q===8633||q===8658||q===8660||q===8679||q===8704||q===8706||q===8707||q===8711||q===8712||q===8715||q===8719||q===8721||q===8725||q===8730||q>=8733&&q<=8736||q===8739||q===8741||q>=8743&&q<=8748||q===8750||q>=8756&&q<=8759||q===8764||q===8765||q===8776||q===8780||q===8786||q===8800||q===8801||q>=8804&&q<=8807||q===8810||q===8811||q===8814||q===8815||q===8834||q===8835||q===8838||q===8839||q===8853||q===8857||q===8869||q===8895||q===8978||q>=9312&&q<=9449||q>=9451&&q<=9547||q>=9552&&q<=9587||q>=9600&&q<=9615||q>=9618&&q<=9621||q===9632||q===9633||q>=9635&&q<=9641||q===9650||q===9651||q===9654||q===9655||q===9660||q===9661||q===9664||q===9665||q>=9670&&q<=9672||q===9675||q>=9678&&q<=9681||q>=9698&&q<=9701||q===9711||q===9733||q===9734||q===9737||q===9742||q===9743||q===9756||q===9758||q===9792||q===9794||q===9824||q===9825||q>=9827&&q<=9829||q>=9831&&q<=9834||q===9836||q===9837||q===9839||q===9886||q===9887||q===9919||q>=9926&&q<=9933||q>=9935&&q<=9939||q>=9941&&q<=9953||q===9955||q===9960||q===9961||q>=9963&&q<=9969||q===9972||q>=9974&&q<=9977||q===9979||q===9980||q===9982||q===9983||q===10045||q>=10102&&q<=10111||q>=11094&&q<=11097||q>=12872&&q<=12879||q>=57344&&q<=63743||q>=65024&&q<=65039||q===65533||q>=127232&&q<=127242||q>=127248&&q<=127277||q>=127280&&q<=127337||q>=127344&&q<=127373||q===127375||q===127376||q>=127387&&q<=127404||q>=917760&&q<=917999||q>=983040&&q<=1048573||q>=1048576&&q<=1114109,YG=(q)=>q===12288||q>=65281&&q<=65376||q>=65504&&q<=65510,BG=(q)=>q>=4352&&q<=4447||q===8986||q===8987||q===9001||q===9002||q>=9193&&q<=9196||q===9200||q===9203||q===9725||q===9726||q===9748||q===9749||q>=9800&&q<=9811||q===9855||q===9875||q===9889||q===9898||q===9899||q===9917||q===9918||q===9924||q===9925||q===9934||q===9940||q===9962||q===9970||q===9971||q===9973||q===9978||q===9981||q===9989||q===9994||q===9995||q===10024||q===10060||q===10062||q>=10067&&q<=10069||q===10071||q>=10133&&q<=10135||q===10160||q===10175||q===11035||q===11036||q===11088||q===11093||q>=11904&&q<=11929||q>=11931&&q<=12019||q>=12032&&q<=12245||q>=12272&&q<=12287||q>=12289&&q<=12350||q>=12353&&q<=12438||q>=12441&&q<=12543||q>=12549&&q<=12591||q>=12593&&q<=12686||q>=12688&&q<=12771||q>=12783&&q<=12830||q>=12832&&q<=12871||q>=12880&&q<=19903||q>=19968&&q<=42124||q>=42128&&q<=42182||q>=43360&&q<=43388||q>=44032&&q<=55203||q>=63744&&q<=64255||q>=65040&&q<=65049||q>=65072&&q<=65106||q>=65108&&q<=65126||q>=65128&&q<=65131||q>=94176&&q<=94180||q===94192||q===94193||q>=94208&&q<=100343||q>=100352&&q<=101589||q>=101632&&q<=101640||q>=110576&&q<=110579||q>=110581&&q<=110587||q===110589||q===110590||q>=110592&&q<=110882||q===110898||q>=110928&&q<=110930||q===110933||q>=110948&&q<=110951||q>=110960&&q<=111355||q===126980||q===127183||q===127374||q>=127377&&q<=127386||q>=127488&&q<=127490||q>=127504&&q<=127547||q>=127552&&q<=127560||q===127568||q===127569||q>=127584&&q<=127589||q>=127744&&q<=127776||q>=127789&&q<=127797||q>=127799&&q<=127868||q>=127870&&q<=127891||q>=127904&&q<=127946||q>=127951&&q<=127955||q>=127968&&q<=127984||q===127988||q>=127992&&q<=128062||q===128064||q>=128066&&q<=128252||q>=128255&&q<=128317||q>=128331&&q<=128334||q>=128336&&q<=128359||q===128378||q===128405||q===128406||q===128420||q>=128507&&q<=128591||q>=128640&&q<=128709||q===128716||q>=128720&&q<=128722||q>=128725&&q<=128727||q>=128732&&q<=128735||q===128747||q===128748||q>=128756&&q<=128764||q>=128992&&q<=129003||q===129008||q>=129292&&q<=129338||q>=129340&&q<=129349||q>=129351&&q<=129535||q>=129648&&q<=129660||q>=129664&&q<=129672||q>=129680&&q<=129725||q>=129727&&q<=129733||q>=129742&&q<=129755||q>=129760&&q<=129768||q>=129776&&q<=129784||q>=131072&&q<=196605||q>=196608&&q<=262141,F4=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,Aq=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,Sq=/\t{1,1000}/y,O4=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,wq=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,TG=/\p{M}+/gu,_G={limit:1/0,ellipsis:""},l5=(q,Z={},X={})=>{let J=Z.limit??1/0,$=Z.ellipsis??"",Q=Z?.ellipsisWidth??($?l5($,_G,X).width:0),z=X.ansiWidth??0,H=X.controlWidth??0,U=X.tabWidth??8,G=X.ambiguousWidth??1,Y=X.emojiWidth??2,B=X.fullWidthWidth??2,_=X.regularWidth??1,R=X.wideWidth??2,W=0,T=0,L=q.length,I=0,M=!1,P=L,O=Math.max(0,J-Q),N=0,A=0,K=0,V=0;q:for(;;){if(A>N||T>=L&&T>W){let w=q.slice(N,A)||q.slice(W,T);I=0;for(let y of w.replaceAll(TG,"")){let x=y.codePointAt(0)||0;if(YG(x)?V=B:BG(x)?V=R:G!==_&&GG(x)?V=G:V=_,K+V>O&&(P=Math.min(P,Math.max(N,W)+I)),K+V>J){M=!0;break q}I+=y.length,K+=V}N=A=0}if(T>=L)break;if(wq.lastIndex=T,wq.test(q)){if(I=wq.lastIndex-T,V=I*_,K+V>O&&(P=Math.min(P,T+Math.floor((O-K)/_))),K+V>J){M=!0;break}K+=V,N=W,A=T,T=W=wq.lastIndex;continue}if(F4.lastIndex=T,F4.test(q)){if(K+z>O&&(P=Math.min(P,T)),K+z>J){M=!0;break}K+=z,N=W,A=T,T=W=F4.lastIndex;continue}if(Aq.lastIndex=T,Aq.test(q)){if(I=Aq.lastIndex-T,V=I*H,K+V>O&&(P=Math.min(P,T+Math.floor((O-K)/H))),K+V>J){M=!0;break}K+=V,N=W,A=T,T=W=Aq.lastIndex;continue}if(Sq.lastIndex=T,Sq.test(q)){if(I=Sq.lastIndex-T,V=I*U,K+V>O&&(P=Math.min(P,T+Math.floor((O-K)/U))),K+V>J){M=!0;break}K+=V,N=W,A=T,T=W=Sq.lastIndex;continue}if(O4.lastIndex=T,O4.test(q)){if(K+Y>O&&(P=Math.min(P,T)),K+Y>J){M=!0;break}K+=Y,N=W,A=T,T=W=O4.lastIndex;continue}T+=1}return{width:M?O:K,index:M?P:L,truncated:M,ellipsed:M&&J>=Q}},LG={limit:1/0,ellipsis:"",ellipsisWidth:0},V0=(q,Z={})=>l5(q,LG,Z).width,jq="\x1B",p5="›",WG=39,S4="\x07",c5="[",RG="]",i5="m",w4=`${RG}8;;`,k5=new RegExp(`(?:\\${c5}(?<code>\\d+)m|\\${w4}(?<uri>.*)${S4})`,"y"),VG=(q)=>{if(q>=30&&q<=37||q>=90&&q<=97)return 39;if(q>=40&&q<=47||q>=100&&q<=107)return 49;if(q===1||q===2)return 22;if(q===3)return 23;if(q===4)return 24;if(q===7)return 27;if(q===8)return 28;if(q===9)return 29;if(q===0)return 0},v5=(q)=>`${jq}${c5}${q}${i5}`,g5=(q)=>`${jq}${w4}${q}${S4}`,IG=(q)=>q.map((Z)=>V0(Z)),N4=(q,Z,X)=>{let J=Z[Symbol.iterator](),$=!1,Q=!1,z=q.at(-1),H=z===void 0?0:V0(z),U=J.next(),G=J.next(),Y=0;for(;!U.done;){let B=U.value,_=V0(B);H+_<=X?q[q.length-1]+=B:(q.push(B),H=0),(B===jq||B===p5)&&($=!0,Q=Z.startsWith(w4,Y+1)),$?Q?B===S4&&($=!1,Q=!1):B===i5&&($=!1):(H+=_,H===X&&!G.done&&(q.push(""),H=0)),U=G,G=J.next(),Y+=B.length}z=q.at(-1),!H&&z!==void 0&&z.length>0&&q.length>1&&(q[q.length-2]+=q.pop())},MG=(q)=>{let Z=q.split(" "),X=Z.length;for(;X>0&&!(V0(Z[X-1])>0);)X--;return X===Z.length?q:Z.slice(0,X).join(" ")+Z.slice(X).join("")},KG=(q,Z,X={})=>{if(X.trim!==!1&&q.trim()==="")return"";let J="",$,Q,z=q.split(" "),H=IG(z),U=[""];for(let[W,T]of z.entries()){X.trim!==!1&&(U[U.length-1]=(U.at(-1)??"").trimStart());let L=V0(U.at(-1)??"");if(W!==0&&(L>=Z&&(X.wordWrap===!1||X.trim===!1)&&(U.push(""),L=0),(L>0||X.trim===!1)&&(U[U.length-1]+=" ",L++)),X.hard&&H[W]>Z){let I=Z-L,M=1+Math.floor((H[W]-I-1)/Z);Math.floor((H[W]-1)/Z)<M&&U.push(""),N4(U,T,Z);continue}if(L+H[W]>Z&&L>0&&H[W]>0){if(X.wordWrap===!1&&L<Z){N4(U,T,Z);continue}U.push("")}if(L+H[W]>Z&&X.wordWrap===!1){N4(U,T,Z);continue}U[U.length-1]+=T}X.trim!==!1&&(U=U.map((W)=>MG(W)));let G=U.join(`
187
+ `)),this._prevFrame=q;return}}this.output.write(m.erase.down())}this.output.write(q),this.state==="initial"&&(this.state="active"),this._prevFrame=q}}}function sU(q,Z){if(q===void 0||Z.length===0)return 0;let X=Z.findIndex((J)=>J.value===q);return X!==-1?X:0}function rU(q,Z){return(Z.label??String(Z.value)).toLowerCase().includes(q.toLowerCase())}function nU(q,Z){if(Z)return q?Z:Z[0]}class E5 extends L0{filteredOptions;multiple;isNavigating=!1;selectedValues=[];focusedValue;#q=0;#X="";#J;#Z;get cursor(){return this.#q}get userInputWithCursor(){if(!this.userInput)return Oq.default.inverse(Oq.default.hidden("_"));if(this._cursor>=this.userInput.length)return`${this.userInput}█`;let q=this.userInput.slice(0,this._cursor),[Z,...X]=this.userInput.slice(this._cursor);return`${q}${Oq.default.inverse(Z)}${X.join("")}`}get options(){return typeof this.#Z=="function"?this.#Z():this.#Z}constructor(q){super(q),this.#Z=q.options;let Z=this.options;this.filteredOptions=[...Z],this.multiple=q.multiple===!0,this.#J=q.filter??rU;let X;if(q.initialValue&&Array.isArray(q.initialValue)?this.multiple?X=q.initialValue:X=q.initialValue.slice(0,1):!this.multiple&&this.options.length>0&&(X=[this.options[0].value]),X)for(let J of X){let $=Z.findIndex((Q)=>Q.value===J);$!==-1&&(this.toggleSelected(J),this.#q=$)}this.focusedValue=this.options[this.#q]?.value,this.on("key",(J,$)=>this.#$(J,$)),this.on("userInput",(J)=>this.#Q(J))}_isActionKey(q,Z){return q==="\t"||this.multiple&&this.isNavigating&&Z.name==="space"&&q!==void 0&&q!==""}#$(q,Z){let X=Z.name==="up",J=Z.name==="down",$=Z.name==="return";X||J?(this.#q=Math.max(0,Math.min(this.#q+(X?-1:1),this.filteredOptions.length-1)),this.focusedValue=this.filteredOptions[this.#q]?.value,this.multiple||(this.selectedValues=[this.focusedValue]),this.isNavigating=!0):$?this.value=nU(this.multiple,this.selectedValues):this.multiple?this.focusedValue!==void 0&&(Z.name==="tab"||this.isNavigating&&Z.name==="space")?this.toggleSelected(this.focusedValue):this.isNavigating=!1:(this.focusedValue&&(this.selectedValues=[this.focusedValue]),this.isNavigating=!1)}deselectAll(){this.selectedValues=[]}toggleSelected(q){this.filteredOptions.length!==0&&(this.multiple?this.selectedValues.includes(q)?this.selectedValues=this.selectedValues.filter((Z)=>Z!==q):this.selectedValues=[...this.selectedValues,q]:this.selectedValues=[q])}#Q(q){if(q!==this.#X){this.#X=q;let Z=this.options;q?this.filteredOptions=Z.filter((X)=>this.#J(q,X)):this.filteredOptions=[...Z],this.#q=sU(this.focusedValue,this.filteredOptions),this.focusedValue=this.filteredOptions[this.#q]?.value,this.multiple||(this.focusedValue!==void 0?this.toggleSelected(this.focusedValue):this.deselectAll())}}}class C5 extends L0{options;cursor=0;#q;getGroupItems(q){return this.options.filter((Z)=>Z.group===q)}isGroupSelected(q){let Z=this.getGroupItems(q),X=this.value;return X===void 0?!1:Z.every((J)=>X.includes(J.value))}toggleValue(){let q=this.options[this.cursor];if(this.value===void 0&&(this.value=[]),q.group===!0){let Z=q.value,X=this.getGroupItems(Z);this.isGroupSelected(Z)?this.value=this.value.filter((J)=>X.findIndex(($)=>$.value===J)===-1):this.value=[...this.value,...X.map((J)=>J.value)],this.value=Array.from(new Set(this.value))}else{let Z=this.value.includes(q.value);this.value=Z?this.value.filter((X)=>X!==q.value):[...this.value,q.value]}}constructor(q){super(q,!1);let{options:Z}=q;this.#q=q.selectableGroups!==!1,this.options=Object.entries(Z).flatMap(([X,J])=>[{value:X,group:!0,label:X},...J.map(($)=>({...$,group:X}))]),this.value=[...q.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:X})=>X===q.cursorAt),this.#q?0:1),this.on("cursor",(X)=>{switch(X){case"left":case"up":{this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;let J=this.options[this.cursor]?.group===!0;!this.#q&&J&&(this.cursor=this.cursor===0?this.options.length-1:this.cursor-1);break}case"down":case"right":{this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;let J=this.options[this.cursor]?.group===!0;!this.#q&&J&&(this.cursor=this.cursor===this.options.length-1?0:this.cursor+1);break}case"space":this.toggleValue();break}})}}function O1(q,Z,X){let J=q+Z,$=Math.max(X.length-1,0),Q=J<0?$:J>$?0:J;return X[Q].disabled?O1(Q,Z<0?-1:1,X):Q}class P4 extends L0{options;cursor=0;get _value(){return this.options[this.cursor].value}get _enabledOptions(){return this.options.filter((q)=>q.disabled!==!0)}toggleAll(){let q=this._enabledOptions,Z=this.value!==void 0&&this.value.length===q.length;this.value=Z?[]:q.map((X)=>X.value)}toggleInvert(){let q=this.value;if(!q)return;let Z=this._enabledOptions.filter((X)=>!q.includes(X.value));this.value=Z.map((X)=>X.value)}toggleValue(){this.value===void 0&&(this.value=[]);let q=this.value.includes(this._value);this.value=q?this.value.filter((Z)=>Z!==this._value):[...this.value,this._value]}constructor(q){super(q,!1),this.options=q.options,this.value=[...q.initialValues??[]];let Z=Math.max(this.options.findIndex(({value:X})=>X===q.cursorAt),0);this.cursor=this.options[Z].disabled?O1(Z,1,this.options):Z,this.on("key",(X)=>{X==="a"&&this.toggleAll(),X==="i"&&this.toggleInvert()}),this.on("cursor",(X)=>{switch(X){case"left":case"up":this.cursor=O1(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=O1(this.cursor,1,this.options);break;case"space":this.toggleValue();break}})}}class D4 extends L0{options;cursor=0;get _selectedValue(){return this.options[this.cursor]}changeValue(){this.value=this._selectedValue.value}constructor(q){super(q,!1),this.options=q.options;let Z=this.options.findIndex(({value:J})=>J===q.initialValue),X=Z===-1?0:Z;this.cursor=this.options[X].disabled?O1(X,1,this.options):X,this.changeValue(),this.on("cursor",(J)=>{switch(J){case"left":case"up":this.cursor=O1(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=O1(this.cursor,1,this.options);break}this.changeValue()})}}var F=h1(G4(),1);import p from"node:process";var h5=h1(B4(),1);function oU(){return p.platform!=="win32"?p.env.TERM!=="linux":!!p.env.CI||!!p.env.WT_SESSION||!!p.env.TERMINUS_SUBLIME||p.env.ConEmuTask==="{cmd::Cmder}"||p.env.TERM_PROGRAM==="Terminus-Sublime"||p.env.TERM_PROGRAM==="vscode"||p.env.TERM==="xterm-256color"||p.env.TERM==="alacritty"||p.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var tU=oU();var j=(q,Z)=>tU?q:Z,eU=j("◆","*"),qG=j("■","x"),ZG=j("▲","x"),u5=j("◇","o"),XG=j("┌","T"),f=j("│","|"),R0=j("└","—"),WT=j("┐","T"),RT=j("┘","—"),JG=j("●",">"),f5=j("○"," "),$G=j("◻","[•]"),y5=j("◼","[+]"),x5=j("◻","[ ]"),VT=j("▪","•"),IT=j("─","-"),MT=j("╮","+"),KT=j("├","+"),PT=j("╯","+"),DT=j("╰","+"),FT=j("╭","+"),QG=j("●","•"),zG=j("◆","*"),HG=j("▲","!"),UG=j("■","x"),m5=(q)=>{switch(q){case"initial":case"active":return F.default.cyan(eU);case"cancel":return F.default.red(qG);case"error":return F.default.yellow(ZG);case"submit":return F.default.green(u5)}},d5=(q)=>{switch(q){case"initial":case"active":return F.default.cyan(f);case"cancel":return F.default.red(f);case"error":return F.default.yellow(f);case"submit":return F.default.green(f)}},GG=(q)=>q===161||q===164||q===167||q===168||q===170||q===173||q===174||q>=176&&q<=180||q>=182&&q<=186||q>=188&&q<=191||q===198||q===208||q===215||q===216||q>=222&&q<=225||q===230||q>=232&&q<=234||q===236||q===237||q===240||q===242||q===243||q>=247&&q<=250||q===252||q===254||q===257||q===273||q===275||q===283||q===294||q===295||q===299||q>=305&&q<=307||q===312||q>=319&&q<=322||q===324||q>=328&&q<=331||q===333||q===338||q===339||q===358||q===359||q===363||q===462||q===464||q===466||q===468||q===470||q===472||q===474||q===476||q===593||q===609||q===708||q===711||q>=713&&q<=715||q===717||q===720||q>=728&&q<=731||q===733||q===735||q>=768&&q<=879||q>=913&&q<=929||q>=931&&q<=937||q>=945&&q<=961||q>=963&&q<=969||q===1025||q>=1040&&q<=1103||q===1105||q===8208||q>=8211&&q<=8214||q===8216||q===8217||q===8220||q===8221||q>=8224&&q<=8226||q>=8228&&q<=8231||q===8240||q===8242||q===8243||q===8245||q===8251||q===8254||q===8308||q===8319||q>=8321&&q<=8324||q===8364||q===8451||q===8453||q===8457||q===8467||q===8470||q===8481||q===8482||q===8486||q===8491||q===8531||q===8532||q>=8539&&q<=8542||q>=8544&&q<=8555||q>=8560&&q<=8569||q===8585||q>=8592&&q<=8601||q===8632||q===8633||q===8658||q===8660||q===8679||q===8704||q===8706||q===8707||q===8711||q===8712||q===8715||q===8719||q===8721||q===8725||q===8730||q>=8733&&q<=8736||q===8739||q===8741||q>=8743&&q<=8748||q===8750||q>=8756&&q<=8759||q===8764||q===8765||q===8776||q===8780||q===8786||q===8800||q===8801||q>=8804&&q<=8807||q===8810||q===8811||q===8814||q===8815||q===8834||q===8835||q===8838||q===8839||q===8853||q===8857||q===8869||q===8895||q===8978||q>=9312&&q<=9449||q>=9451&&q<=9547||q>=9552&&q<=9587||q>=9600&&q<=9615||q>=9618&&q<=9621||q===9632||q===9633||q>=9635&&q<=9641||q===9650||q===9651||q===9654||q===9655||q===9660||q===9661||q===9664||q===9665||q>=9670&&q<=9672||q===9675||q>=9678&&q<=9681||q>=9698&&q<=9701||q===9711||q===9733||q===9734||q===9737||q===9742||q===9743||q===9756||q===9758||q===9792||q===9794||q===9824||q===9825||q>=9827&&q<=9829||q>=9831&&q<=9834||q===9836||q===9837||q===9839||q===9886||q===9887||q===9919||q>=9926&&q<=9933||q>=9935&&q<=9939||q>=9941&&q<=9953||q===9955||q===9960||q===9961||q>=9963&&q<=9969||q===9972||q>=9974&&q<=9977||q===9979||q===9980||q===9982||q===9983||q===10045||q>=10102&&q<=10111||q>=11094&&q<=11097||q>=12872&&q<=12879||q>=57344&&q<=63743||q>=65024&&q<=65039||q===65533||q>=127232&&q<=127242||q>=127248&&q<=127277||q>=127280&&q<=127337||q>=127344&&q<=127373||q===127375||q===127376||q>=127387&&q<=127404||q>=917760&&q<=917999||q>=983040&&q<=1048573||q>=1048576&&q<=1114109,YG=(q)=>q===12288||q>=65281&&q<=65376||q>=65504&&q<=65510,BG=(q)=>q>=4352&&q<=4447||q===8986||q===8987||q===9001||q===9002||q>=9193&&q<=9196||q===9200||q===9203||q===9725||q===9726||q===9748||q===9749||q>=9800&&q<=9811||q===9855||q===9875||q===9889||q===9898||q===9899||q===9917||q===9918||q===9924||q===9925||q===9934||q===9940||q===9962||q===9970||q===9971||q===9973||q===9978||q===9981||q===9989||q===9994||q===9995||q===10024||q===10060||q===10062||q>=10067&&q<=10069||q===10071||q>=10133&&q<=10135||q===10160||q===10175||q===11035||q===11036||q===11088||q===11093||q>=11904&&q<=11929||q>=11931&&q<=12019||q>=12032&&q<=12245||q>=12272&&q<=12287||q>=12289&&q<=12350||q>=12353&&q<=12438||q>=12441&&q<=12543||q>=12549&&q<=12591||q>=12593&&q<=12686||q>=12688&&q<=12771||q>=12783&&q<=12830||q>=12832&&q<=12871||q>=12880&&q<=19903||q>=19968&&q<=42124||q>=42128&&q<=42182||q>=43360&&q<=43388||q>=44032&&q<=55203||q>=63744&&q<=64255||q>=65040&&q<=65049||q>=65072&&q<=65106||q>=65108&&q<=65126||q>=65128&&q<=65131||q>=94176&&q<=94180||q===94192||q===94193||q>=94208&&q<=100343||q>=100352&&q<=101589||q>=101632&&q<=101640||q>=110576&&q<=110579||q>=110581&&q<=110587||q===110589||q===110590||q>=110592&&q<=110882||q===110898||q>=110928&&q<=110930||q===110933||q>=110948&&q<=110951||q>=110960&&q<=111355||q===126980||q===127183||q===127374||q>=127377&&q<=127386||q>=127488&&q<=127490||q>=127504&&q<=127547||q>=127552&&q<=127560||q===127568||q===127569||q>=127584&&q<=127589||q>=127744&&q<=127776||q>=127789&&q<=127797||q>=127799&&q<=127868||q>=127870&&q<=127891||q>=127904&&q<=127946||q>=127951&&q<=127955||q>=127968&&q<=127984||q===127988||q>=127992&&q<=128062||q===128064||q>=128066&&q<=128252||q>=128255&&q<=128317||q>=128331&&q<=128334||q>=128336&&q<=128359||q===128378||q===128405||q===128406||q===128420||q>=128507&&q<=128591||q>=128640&&q<=128709||q===128716||q>=128720&&q<=128722||q>=128725&&q<=128727||q>=128732&&q<=128735||q===128747||q===128748||q>=128756&&q<=128764||q>=128992&&q<=129003||q===129008||q>=129292&&q<=129338||q>=129340&&q<=129349||q>=129351&&q<=129535||q>=129648&&q<=129660||q>=129664&&q<=129672||q>=129680&&q<=129725||q>=129727&&q<=129733||q>=129742&&q<=129755||q>=129760&&q<=129768||q>=129776&&q<=129784||q>=131072&&q<=196605||q>=196608&&q<=262141,F4=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,Aq=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,Sq=/\t{1,1000}/y,O4=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,wq=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,TG=/\p{M}+/gu,_G={limit:1/0,ellipsis:""},l5=(q,Z={},X={})=>{let J=Z.limit??1/0,$=Z.ellipsis??"",Q=Z?.ellipsisWidth??($?l5($,_G,X).width:0),z=X.ansiWidth??0,H=X.controlWidth??0,U=X.tabWidth??8,G=X.ambiguousWidth??1,Y=X.emojiWidth??2,B=X.fullWidthWidth??2,_=X.regularWidth??1,R=X.wideWidth??2,W=0,T=0,L=q.length,I=0,M=!1,P=L,O=Math.max(0,J-Q),N=0,A=0,K=0,V=0;q:for(;;){if(A>N||T>=L&&T>W){let w=q.slice(N,A)||q.slice(W,T);I=0;for(let y of w.replaceAll(TG,"")){let x=y.codePointAt(0)||0;if(YG(x)?V=B:BG(x)?V=R:G!==_&&GG(x)?V=G:V=_,K+V>O&&(P=Math.min(P,Math.max(N,W)+I)),K+V>J){M=!0;break q}I+=y.length,K+=V}N=A=0}if(T>=L)break;if(wq.lastIndex=T,wq.test(q)){if(I=wq.lastIndex-T,V=I*_,K+V>O&&(P=Math.min(P,T+Math.floor((O-K)/_))),K+V>J){M=!0;break}K+=V,N=W,A=T,T=W=wq.lastIndex;continue}if(F4.lastIndex=T,F4.test(q)){if(K+z>O&&(P=Math.min(P,T)),K+z>J){M=!0;break}K+=z,N=W,A=T,T=W=F4.lastIndex;continue}if(Aq.lastIndex=T,Aq.test(q)){if(I=Aq.lastIndex-T,V=I*H,K+V>O&&(P=Math.min(P,T+Math.floor((O-K)/H))),K+V>J){M=!0;break}K+=V,N=W,A=T,T=W=Aq.lastIndex;continue}if(Sq.lastIndex=T,Sq.test(q)){if(I=Sq.lastIndex-T,V=I*U,K+V>O&&(P=Math.min(P,T+Math.floor((O-K)/U))),K+V>J){M=!0;break}K+=V,N=W,A=T,T=W=Sq.lastIndex;continue}if(O4.lastIndex=T,O4.test(q)){if(K+Y>O&&(P=Math.min(P,T)),K+Y>J){M=!0;break}K+=Y,N=W,A=T,T=W=O4.lastIndex;continue}T+=1}return{width:M?O:K,index:M?P:L,truncated:M,ellipsed:M&&J>=Q}},LG={limit:1/0,ellipsis:"",ellipsisWidth:0},V0=(q,Z={})=>l5(q,LG,Z).width,jq="\x1B",p5="›",WG=39,S4="\x07",c5="[",RG="]",i5="m",w4=`${RG}8;;`,k5=new RegExp(`(?:\\${c5}(?<code>\\d+)m|\\${w4}(?<uri>.*)${S4})`,"y"),VG=(q)=>{if(q>=30&&q<=37||q>=90&&q<=97)return 39;if(q>=40&&q<=47||q>=100&&q<=107)return 49;if(q===1||q===2)return 22;if(q===3)return 23;if(q===4)return 24;if(q===7)return 27;if(q===8)return 28;if(q===9)return 29;if(q===0)return 0},v5=(q)=>`${jq}${c5}${q}${i5}`,g5=(q)=>`${jq}${w4}${q}${S4}`,IG=(q)=>q.map((Z)=>V0(Z)),N4=(q,Z,X)=>{let J=Z[Symbol.iterator](),$=!1,Q=!1,z=q.at(-1),H=z===void 0?0:V0(z),U=J.next(),G=J.next(),Y=0;for(;!U.done;){let B=U.value,_=V0(B);H+_<=X?q[q.length-1]+=B:(q.push(B),H=0),(B===jq||B===p5)&&($=!0,Q=Z.startsWith(w4,Y+1)),$?Q?B===S4&&($=!1,Q=!1):B===i5&&($=!1):(H+=_,H===X&&!G.done&&(q.push(""),H=0)),U=G,G=J.next(),Y+=B.length}z=q.at(-1),!H&&z!==void 0&&z.length>0&&q.length>1&&(q[q.length-2]+=q.pop())},MG=(q)=>{let Z=q.split(" "),X=Z.length;for(;X>0&&!(V0(Z[X-1])>0);)X--;return X===Z.length?q:Z.slice(0,X).join(" ")+Z.slice(X).join("")},KG=(q,Z,X={})=>{if(X.trim!==!1&&q.trim()==="")return"";let J="",$,Q,z=q.split(" "),H=IG(z),U=[""];for(let[W,T]of z.entries()){X.trim!==!1&&(U[U.length-1]=(U.at(-1)??"").trimStart());let L=V0(U.at(-1)??"");if(W!==0&&(L>=Z&&(X.wordWrap===!1||X.trim===!1)&&(U.push(""),L=0),(L>0||X.trim===!1)&&(U[U.length-1]+=" ",L++)),X.hard&&H[W]>Z){let I=Z-L,M=1+Math.floor((H[W]-I-1)/Z);Math.floor((H[W]-1)/Z)<M&&U.push(""),N4(U,T,Z);continue}if(L+H[W]>Z&&L>0&&H[W]>0){if(X.wordWrap===!1&&L<Z){N4(U,T,Z);continue}U.push("")}if(L+H[W]>Z&&X.wordWrap===!1){N4(U,T,Z);continue}U[U.length-1]+=T}X.trim!==!1&&(U=U.map((W)=>MG(W)));let G=U.join(`
188
188
  `),Y=G[Symbol.iterator](),B=Y.next(),_=Y.next(),R=0;for(;!B.done;){let W=B.value,T=_.value;if(J+=W,W===jq||W===p5){k5.lastIndex=R+1;let I=k5.exec(G)?.groups;if(I?.code!==void 0){let M=Number.parseFloat(I.code);$=M===WG?void 0:M}else I?.uri!==void 0&&(Q=I.uri.length===0?void 0:I.uri)}let L=$?VG($):void 0;T===`
189
189
  `?(Q&&(J+=g5("")),$&&L&&(J+=v5(L))):W===`
190
190
  `&&($&&L&&(J+=v5($)),Q&&(J+=g5(Q))),R+=W.length,B=_,_=Y.next()}return J};function PG(q,Z,X){return String(q).normalize().replaceAll(`\r
@@ -192,7 +192,7 @@ ${M7(Z)}
192
192
  `).split(`
193
193
  `).map((J)=>KG(J,Z,X)).join(`
194
194
  `)}var DG=(q,Z,X,J,$)=>{let Q=Z,z=0;for(let H=X;H<J;H++){let U=q[H];if(Q=Q-U.length,z++,Q<=$)break}return{lineCount:Q,removals:z}},A4=(q)=>{let{cursor:Z,options:X,style:J}=q,$=q.output??process.stdout,Q=M4($),z=q.columnPadding??0,H=q.rowPadding??4,U=Q-z,G=K4($),Y=F.default.dim("..."),B=q.maxItems??Number.POSITIVE_INFINITY,_=Math.max(G-H,0),R=Math.max(Math.min(B,_),5),W=0;Z>=R-3&&(W=Math.max(Math.min(Z-R+3,X.length-R),0));let T=R<X.length&&W>0,L=R<X.length&&W+R<X.length,I=Math.min(W+R,X.length),M=[],P=0;T&&P++,L&&P++;let O=W+(T?1:0),N=I-(L?1:0);for(let K=O;K<N;K++){let V=PG(J(X[K],K===Z),U,{hard:!0,trim:!1}).split(`
195
- `);M.push(V),P+=V.length}if(P>_){let K=0,V=0,w=P,y=Z-O,x=(E,D0)=>DG(M,w,E,D0,_);T?({lineCount:w,removals:K}=x(0,y),w>_&&({lineCount:w,removals:V}=x(y+1,M.length))):({lineCount:w,removals:V}=x(y+1,M.length),w>_&&({lineCount:w,removals:K}=x(0,y))),K>0&&(T=!0,M.splice(0,K)),V>0&&(L=!0,M.splice(M.length-V,V))}let A=[];T&&A.push(Y);for(let K of M)for(let V of K)A.push(V);return L&&A.push(Y),A};var B1={message:(q=[],{symbol:Z=F.default.gray(f),secondarySymbol:X=F.default.gray(f),output:J=process.stdout,spacing:$=1,withGuide:Q}={})=>{let z=[],H=(Q??O1.withGuide)!==!1,U=H?X:"",G=H?`${Z} `:"",Y=H?`${X} `:"";for(let _=0;_<$;_++)z.push(U);let B=Array.isArray(q)?q:q.split(`
195
+ `);M.push(V),P+=V.length}if(P>_){let K=0,V=0,w=P,y=Z-O,x=(E,D0)=>DG(M,w,E,D0,_);T?({lineCount:w,removals:K}=x(0,y),w>_&&({lineCount:w,removals:V}=x(y+1,M.length))):({lineCount:w,removals:V}=x(y+1,M.length),w>_&&({lineCount:w,removals:K}=x(0,y))),K>0&&(T=!0,M.splice(0,K)),V>0&&(L=!0,M.splice(M.length-V,V))}let A=[];T&&A.push(Y);for(let K of M)for(let V of K)A.push(V);return L&&A.push(Y),A};var B1={message:(q=[],{symbol:Z=F.default.gray(f),secondarySymbol:X=F.default.gray(f),output:J=process.stdout,spacing:$=1,withGuide:Q}={})=>{let z=[],H=(Q??F1.withGuide)!==!1,U=H?X:"",G=H?`${Z} `:"",Y=H?`${X} `:"";for(let _=0;_<$;_++)z.push(U);let B=Array.isArray(q)?q:q.split(`
196
196
  `);if(B.length>0){let[_,...R]=B;_.length>0?z.push(`${G}${_}`):z.push(H?Z:"");for(let W of R)W.length>0?z.push(`${Y}${W}`):z.push(H?X:"")}J.write(`${z.join(`
197
197
  `)}
198
198
  `)},info:(q,Z)=>{B1.message(q,{...Z,symbol:F.default.blue(QG)})},success:(q,Z)=>{B1.message(q,{...Z,symbol:F.default.green(zG)})},step:(q,Z)=>{B1.message(q,{...Z,symbol:F.default.green(u5)})},warn:(q,Z)=>{B1.message(q,{...Z,symbol:F.default.yellow(HG)})},warning:(q,Z)=>{B1.warn(q,Z)},error:(q,Z)=>{B1.message(q,{...Z,symbol:F.default.red(UG)})}},Eq=(q="",Z)=>{(Z?.output??process.stdout).write(`${F.default.gray(R0)} ${F.default.red(q)}
@@ -204,9 +204,9 @@ ${F.default.gray(R0)} ${q}
204
204
  `)},W0=(q,Z)=>q.split(`
205
205
  `).map((X)=>Z(X)).join(`
206
206
  `),I0=(q)=>{let Z=(J,$)=>{let Q=J.label??String(J.value);return $==="disabled"?`${F.default.gray(x5)} ${W0(Q,(z)=>F.default.strikethrough(F.default.gray(z)))}${J.hint?` ${F.default.dim(`(${J.hint??"disabled"})`)}`:""}`:$==="active"?`${F.default.cyan($G)} ${Q}${J.hint?` ${F.default.dim(`(${J.hint})`)}`:""}`:$==="selected"?`${F.default.green(y5)} ${W0(Q,F.default.dim)}${J.hint?` ${F.default.dim(`(${J.hint})`)}`:""}`:$==="cancelled"?`${W0(Q,(z)=>F.default.strikethrough(F.default.dim(z)))}`:$==="active-selected"?`${F.default.green(y5)} ${Q}${J.hint?` ${F.default.dim(`(${J.hint})`)}`:""}`:$==="submitted"?`${W0(Q,F.default.dim)}`:`${F.default.dim(x5)} ${W0(Q,F.default.dim)}`},X=q.required??!0;return new P4({options:q.options,signal:q.signal,input:q.input,output:q.output,initialValues:q.initialValues,required:X,cursorAt:q.cursorAt,validate(J){if(X&&(J===void 0||J.length===0))return`Please select at least one option.
207
- ${F.default.reset(F.default.dim(`Press ${F.default.gray(F.default.bgWhite(F.default.inverse(" space ")))} to select, ${F.default.gray(F.default.bgWhite(F.default.inverse(" enter ")))} to submit`))}`},render(){let J=A1(q.output,q.message,`${d5(this.state)} `,`${m5(this.state)} `),$=`${F.default.gray(f)}
207
+ ${F.default.reset(F.default.dim(`Press ${F.default.gray(F.default.bgWhite(F.default.inverse(" space ")))} to select, ${F.default.gray(F.default.bgWhite(F.default.inverse(" enter ")))} to submit`))}`},render(){let J=N1(q.output,q.message,`${d5(this.state)} `,`${m5(this.state)} `),$=`${F.default.gray(f)}
208
208
  ${J}
209
- `,Q=this.value??[],z=(H,U)=>{if(H.disabled)return Z(H,"disabled");let G=Q.includes(H.value);return U&&G?Z(H,"active-selected"):G?Z(H,"selected"):Z(H,U?"active":"inactive")};switch(this.state){case"submit":{let H=this.options.filter(({value:G})=>Q.includes(G)).map((G)=>Z(G,"submitted")).join(F.default.dim(", "))||F.default.dim("none"),U=A1(q.output,H,`${F.default.gray(f)} `);return`${$}${U}`}case"cancel":{let H=this.options.filter(({value:G})=>Q.includes(G)).map((G)=>Z(G,"cancelled")).join(F.default.dim(", "));if(H.trim()==="")return`${$}${F.default.gray(f)}`;let U=A1(q.output,H,`${F.default.gray(f)} `);return`${$}${U}
209
+ `,Q=this.value??[],z=(H,U)=>{if(H.disabled)return Z(H,"disabled");let G=Q.includes(H.value);return U&&G?Z(H,"active-selected"):G?Z(H,"selected"):Z(H,U?"active":"inactive")};switch(this.state){case"submit":{let H=this.options.filter(({value:G})=>Q.includes(G)).map((G)=>Z(G,"submitted")).join(F.default.dim(", "))||F.default.dim("none"),U=N1(q.output,H,`${F.default.gray(f)} `);return`${$}${U}`}case"cancel":{let H=this.options.filter(({value:G})=>Q.includes(G)).map((G)=>Z(G,"cancelled")).join(F.default.dim(", "));if(H.trim()==="")return`${$}${F.default.gray(f)}`;let U=N1(q.output,H,`${F.default.gray(f)} `);return`${$}${U}
210
210
  ${F.default.gray(f)}`}case"error":{let H=`${F.default.yellow(f)} `,U=this.error.split(`
211
211
  `).map((B,_)=>_===0?`${F.default.yellow(R0)} ${F.default.yellow(B)}`:` ${B}`).join(`
212
212
  `),G=$.split(`
@@ -221,9 +221,9 @@ ${F.default.cyan(R0)}
221
221
  `}}}}).prompt()};var OT=F.default.magenta;var NT={light:j("─","-"),heavy:j("━","="),block:j("█","#")};var bq=(q,Z)=>q.includes(`
222
222
  `)?q.split(`
223
223
  `).map((X)=>Z(X)).join(`
224
- `):Z(q),b4=(q)=>{let Z=(X,J)=>{let $=X.label??String(X.value);switch(J){case"disabled":return`${F.default.gray(f5)} ${bq($,F.default.gray)}${X.hint?` ${F.default.dim(`(${X.hint??"disabled"})`)}`:""}`;case"selected":return`${bq($,F.default.dim)}`;case"active":return`${F.default.green(JG)} ${$}${X.hint?` ${F.default.dim(`(${X.hint})`)}`:""}`;case"cancelled":return`${bq($,(Q)=>F.default.strikethrough(F.default.dim(Q)))}`;default:return`${F.default.dim(f5)} ${bq($,F.default.dim)}`}};return new D4({options:q.options,signal:q.signal,input:q.input,output:q.output,initialValue:q.initialValue,render(){let X=`${m5(this.state)} `,J=`${d5(this.state)} `,$=A1(q.output,q.message,J,X),Q=`${F.default.gray(f)}
224
+ `):Z(q),b4=(q)=>{let Z=(X,J)=>{let $=X.label??String(X.value);switch(J){case"disabled":return`${F.default.gray(f5)} ${bq($,F.default.gray)}${X.hint?` ${F.default.dim(`(${X.hint??"disabled"})`)}`:""}`;case"selected":return`${bq($,F.default.dim)}`;case"active":return`${F.default.green(JG)} ${$}${X.hint?` ${F.default.dim(`(${X.hint})`)}`:""}`;case"cancelled":return`${bq($,(Q)=>F.default.strikethrough(F.default.dim(Q)))}`;default:return`${F.default.dim(f5)} ${bq($,F.default.dim)}`}};return new D4({options:q.options,signal:q.signal,input:q.input,output:q.output,initialValue:q.initialValue,render(){let X=`${m5(this.state)} `,J=`${d5(this.state)} `,$=N1(q.output,q.message,J,X),Q=`${F.default.gray(f)}
225
225
  ${$}
226
- `;switch(this.state){case"submit":{let z=`${F.default.gray(f)} `,H=A1(q.output,Z(this.options[this.cursor],"selected"),z);return`${Q}${H}`}case"cancel":{let z=`${F.default.gray(f)} `,H=A1(q.output,Z(this.options[this.cursor],"cancelled"),z);return`${Q}${H}
226
+ `;switch(this.state){case"submit":{let z=`${F.default.gray(f)} `,H=N1(q.output,Z(this.options[this.cursor],"selected"),z);return`${Q}${H}`}case"cancel":{let z=`${F.default.gray(f)} `,H=N1(q.output,Z(this.options[this.cursor],"cancelled"),z);return`${Q}${H}
227
227
  ${F.default.gray(f)}`}default:{let z=`${F.default.cyan(f)} `,H=Q.split(`
228
228
  `).length;return`${Q}${z}${A4({output:q.output,cursor:this.cursor,options:this.options,maxItems:q.maxItems,columnPadding:z.length,rowPadding:H+2,style:(U,G)=>Z(U,U.disabled?"disabled":G?"active":"inactive")}).join(`
229
229
  ${z}`)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentdeps",
3
- "version": "0.1.1",
3
+ "version": "0.1.7",
4
4
  "description": "Declarative dependency manager for AI coding agent skills and subagents",
5
5
  "module": "src/index.ts",
6
6
  "type": "module",