oh-my-agent 4.20.1 → 4.21.0

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.
Files changed (2) hide show
  1. package/bin/cli.js +299 -299
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -1,438 +1,438 @@
1
1
  #!/usr/bin/env node
2
- import{createRequire as cO}from"node:module";var xO=Object.create;var{getPrototypeOf:kO,defineProperty:x2,getOwnPropertyNames:yO}=Object;var iO=Object.prototype.hasOwnProperty;function nO($){return this[$]}var rO,lO,q$=($,I,U)=>{var _=$!=null&&typeof $==="object";if(_){var u=I?rO??=new WeakMap:lO??=new WeakMap,g=u.get($);if(g)return g}U=$!=null?xO(kO($)):{};let z=I||!$||!$.__esModule?x2(U,"default",{value:$,enumerable:!0}):U;for(let v of yO($))if(!iO.call(z,v))x2(z,v,{get:nO.bind($,v),enumerable:!0});if(_)u.set($,z);return z};var E=($,I)=>()=>(I||$((I={exports:{}}).exports,I),I.exports);var mO=($)=>$;function hO($,I){this[$]=mO.bind(null,I)}var B4=($,I)=>{for(var U in I)x2($,U,{get:I[U],enumerable:!0,configurable:!0,set:hO.bind(I,U)})};var U4=($,I)=>()=>($&&(I=$($=0)),I);var g$=cO(import.meta.url);var WI=E((dO)=>{class k2 extends Error{constructor($,I,U){super(U);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=I,this.exitCode=$,this.nestedError=void 0}}class o9 extends k2{constructor($){super(1,"commander.invalidArgument",$);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}dO.CommanderError=k2;dO.InvalidArgumentError=o9});var gu=E((eO)=>{var{InvalidArgumentError:tO}=WI();class t9{constructor($,I){switch(this.description=I||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,$[0]){case"<":this.required=!0,this._name=$.slice(1,-1);break;case"[":this.required=!1,this._name=$.slice(1,-1);break;default:this.required=!0,this._name=$;break}if(this._name.endsWith("..."))this.variadic=!0,this._name=this._name.slice(0,-3)}name(){return this._name}_collectValue($,I){if(I===this.defaultValue||!Array.isArray(I))return[$];return I.push($),I}default($,I){return this.defaultValue=$,this.defaultValueDescription=I,this}argParser($){return this.parseArg=$,this}choices($){return this.argChoices=$.slice(),this.parseArg=(I,U)=>{if(!this.argChoices.includes(I))throw new tO(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._collectValue(I,U);return I},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}}function aO($){let I=$.name()+($.variadic===!0?"...":"");return $.required?"<"+I+">":"["+I+"]"}eO.Argument=t9;eO.humanReadableArgName=aO});var y2=E((uV)=>{var{humanReadableArgName:IV}=gu();class a9{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext($){this.helpWidth=this.helpWidth??$.helpWidth??80}visibleCommands($){let I=$.commands.filter((_)=>!_._hidden),U=$._getHelpCommand();if(U&&!U._hidden)I.push(U);if(this.sortSubcommands)I.sort((_,u)=>{return _.name().localeCompare(u.name())});return I}compareOptions($,I){let U=(_)=>{return _.short?_.short.replace(/^-/,""):_.long.replace(/^--/,"")};return U($).localeCompare(U(I))}visibleOptions($){let I=$.options.filter((_)=>!_.hidden),U=$._getHelpOption();if(U&&!U.hidden){let _=U.short&&$._findOption(U.short),u=U.long&&$._findOption(U.long);if(!_&&!u)I.push(U);else if(U.long&&!u)I.push($.createOption(U.long,U.description));else if(U.short&&!_)I.push($.createOption(U.short,U.description))}if(this.sortOptions)I.sort(this.compareOptions);return I}visibleGlobalOptions($){if(!this.showGlobalOptions)return[];let I=[];for(let U=$.parent;U;U=U.parent){let _=U.options.filter((u)=>!u.hidden);I.push(..._)}if(this.sortOptions)I.sort(this.compareOptions);return I}visibleArguments($){if($._argsDescription)$.registeredArguments.forEach((I)=>{I.description=I.description||$._argsDescription[I.name()]||""});if($.registeredArguments.find((I)=>I.description))return $.registeredArguments;return[]}subcommandTerm($){let I=$.registeredArguments.map((U)=>IV(U)).join(" ");return $._name+($._aliases[0]?"|"+$._aliases[0]:"")+($.options.length?" [options]":"")+(I?" "+I:"")}optionTerm($){return $.flags}argumentTerm($){return $.name()}longestSubcommandTermLength($,I){return I.visibleCommands($).reduce((U,_)=>{return Math.max(U,this.displayWidth(I.styleSubcommandTerm(I.subcommandTerm(_))))},0)}longestOptionTermLength($,I){return I.visibleOptions($).reduce((U,_)=>{return Math.max(U,this.displayWidth(I.styleOptionTerm(I.optionTerm(_))))},0)}longestGlobalOptionTermLength($,I){return I.visibleGlobalOptions($).reduce((U,_)=>{return Math.max(U,this.displayWidth(I.styleOptionTerm(I.optionTerm(_))))},0)}longestArgumentTermLength($,I){return I.visibleArguments($).reduce((U,_)=>{return Math.max(U,this.displayWidth(I.styleArgumentTerm(I.argumentTerm(_))))},0)}commandUsage($){let I=$._name;if($._aliases[0])I=I+"|"+$._aliases[0];let U="";for(let _=$.parent;_;_=_.parent)U=_.name()+" "+U;return U+I+" "+$.usage()}commandDescription($){return $.description()}subcommandDescription($){return $.summary()||$.description()}optionDescription($){let I=[];if($.argChoices)I.push(`choices: ${$.argChoices.map((U)=>JSON.stringify(U)).join(", ")}`);if($.defaultValue!==void 0){if($.required||$.optional||$.isBoolean()&&typeof $.defaultValue==="boolean")I.push(`default: ${$.defaultValueDescription||JSON.stringify($.defaultValue)}`)}if($.presetArg!==void 0&&$.optional)I.push(`preset: ${JSON.stringify($.presetArg)}`);if($.envVar!==void 0)I.push(`env: ${$.envVar}`);if(I.length>0){let U=`(${I.join(", ")})`;if($.description)return`${$.description} ${U}`;return U}return $.description}argumentDescription($){let I=[];if($.argChoices)I.push(`choices: ${$.argChoices.map((U)=>JSON.stringify(U)).join(", ")}`);if($.defaultValue!==void 0)I.push(`default: ${$.defaultValueDescription||JSON.stringify($.defaultValue)}`);if(I.length>0){let U=`(${I.join(", ")})`;if($.description)return`${$.description} ${U}`;return U}return $.description}formatItemList($,I,U){if(I.length===0)return[];return[U.styleTitle($),...I,""]}groupItems($,I,U){let _=new Map;return $.forEach((u)=>{let g=U(u);if(!_.has(g))_.set(g,[])}),I.forEach((u)=>{let g=U(u);if(!_.has(g))_.set(g,[]);_.get(g).push(u)}),_}formatHelp($,I){let U=I.padWidth($,I),_=I.helpWidth??80;function u(X,G){return I.formatItem(X,U,G,I)}let g=[`${I.styleTitle("Usage:")} ${I.styleUsage(I.commandUsage($))}`,""],z=I.commandDescription($);if(z.length>0)g=g.concat([I.boxWrap(I.styleCommandDescription(z),_),""]);let v=I.visibleArguments($).map((X)=>{return u(I.styleArgumentTerm(I.argumentTerm(X)),I.styleArgumentDescription(I.argumentDescription(X)))});if(g=g.concat(this.formatItemList("Arguments:",v,I)),this.groupItems($.options,I.visibleOptions($),(X)=>X.helpGroupHeading??"Options:").forEach((X,G)=>{let q=X.map((T)=>{return u(I.styleOptionTerm(I.optionTerm(T)),I.styleOptionDescription(I.optionDescription(T)))});g=g.concat(this.formatItemList(G,q,I))}),I.showGlobalOptions){let X=I.visibleGlobalOptions($).map((G)=>{return u(I.styleOptionTerm(I.optionTerm(G)),I.styleOptionDescription(I.optionDescription(G)))});g=g.concat(this.formatItemList("Global Options:",X,I))}return this.groupItems($.commands,I.visibleCommands($),(X)=>X.helpGroup()||"Commands:").forEach((X,G)=>{let q=X.map((T)=>{return u(I.styleSubcommandTerm(I.subcommandTerm(T)),I.styleSubcommandDescription(I.subcommandDescription(T)))});g=g.concat(this.formatItemList(G,q,I))}),g.join(`
3
- `)}displayWidth($){return e9($).length}styleTitle($){return $}styleUsage($){return $.split(" ").map((I)=>{if(I==="[options]")return this.styleOptionText(I);if(I==="[command]")return this.styleSubcommandText(I);if(I[0]==="["||I[0]==="<")return this.styleArgumentText(I);return this.styleCommandText(I)}).join(" ")}styleCommandDescription($){return this.styleDescriptionText($)}styleOptionDescription($){return this.styleDescriptionText($)}styleSubcommandDescription($){return this.styleDescriptionText($)}styleArgumentDescription($){return this.styleDescriptionText($)}styleDescriptionText($){return $}styleOptionTerm($){return this.styleOptionText($)}styleSubcommandTerm($){return $.split(" ").map((I)=>{if(I==="[options]")return this.styleOptionText(I);if(I[0]==="["||I[0]==="<")return this.styleArgumentText(I);return this.styleSubcommandText(I)}).join(" ")}styleArgumentTerm($){return this.styleArgumentText($)}styleOptionText($){return $}styleArgumentText($){return $}styleSubcommandText($){return $}styleCommandText($){return $}padWidth($,I){return Math.max(I.longestOptionTermLength($,I),I.longestGlobalOptionTermLength($,I),I.longestSubcommandTermLength($,I),I.longestArgumentTermLength($,I))}preformatted($){return/\n[^\S\r\n]/.test($)}formatItem($,I,U,_){let g=" ".repeat(2);if(!U)return g+$;let z=$.padEnd(I+$.length-_.displayWidth($)),v=2,N=(this.helpWidth??80)-I-v-2,X;if(N<this.minWidthToWrap||_.preformatted(U))X=U;else X=_.boxWrap(U,N).replace(/\n/g,`
4
- `+" ".repeat(I+v));return g+z+" ".repeat(v)+X.replace(/\n/g,`
5
- ${g}`)}boxWrap($,I){if(I<this.minWidthToWrap)return $;let U=$.split(/\r\n|\n/),_=/[\s]*[^\s]+/g,u=[];return U.forEach((g)=>{let z=g.match(_);if(z===null){u.push("");return}let v=[z.shift()],J=this.displayWidth(v[0]);z.forEach((N)=>{let X=this.displayWidth(N);if(J+X<=I){v.push(N),J+=X;return}u.push(v.join(""));let G=N.trimStart();v=[G],J=this.displayWidth(G)}),u.push(v.join(""))}),u.join(`
6
- `)}}function e9($){let I=/\x1b\[\d*(;\d*)*m/g;return $.replace(I,"")}uV.Help=a9;uV.stripColor=e9});var i2=E((vV)=>{var{InvalidArgumentError:gV}=WI();class $X{constructor($,I){this.flags=$,this.description=I||"",this.required=$.includes("<"),this.optional=$.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test($),this.mandatory=!1;let U=zV($);if(this.short=U.shortFlag,this.long=U.longFlag,this.negate=!1,this.long)this.negate=this.long.startsWith("--no-");this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default($,I){return this.defaultValue=$,this.defaultValueDescription=I,this}preset($){return this.presetArg=$,this}conflicts($){return this.conflictsWith=this.conflictsWith.concat($),this}implies($){let I=$;if(typeof $==="string")I={[$]:!0};return this.implied=Object.assign(this.implied||{},I),this}env($){return this.envVar=$,this}argParser($){return this.parseArg=$,this}makeOptionMandatory($=!0){return this.mandatory=!!$,this}hideHelp($=!0){return this.hidden=!!$,this}_collectValue($,I){if(I===this.defaultValue||!Array.isArray(I))return[$];return I.push($),I}choices($){return this.argChoices=$.slice(),this.parseArg=(I,U)=>{if(!this.argChoices.includes(I))throw new gV(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._collectValue(I,U);return I},this}name(){if(this.long)return this.long.replace(/^--/,"");return this.short.replace(/^-/,"")}attributeName(){if(this.negate)return s9(this.name().replace(/^no-/,""));return s9(this.name())}helpGroup($){return this.helpGroupHeading=$,this}is($){return this.short===$||this.long===$}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class IX{constructor($){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,$.forEach((I)=>{if(I.negate)this.negativeOptions.set(I.attributeName(),I);else this.positiveOptions.set(I.attributeName(),I)}),this.negativeOptions.forEach((I,U)=>{if(this.positiveOptions.has(U))this.dualOptions.add(U)})}valueFromOption($,I){let U=I.attributeName();if(!this.dualOptions.has(U))return!0;let _=this.negativeOptions.get(U).presetArg,u=_!==void 0?_:!1;return I.negate===(u===$)}}function s9($){return $.split("-").reduce((I,U)=>{return I+U[0].toUpperCase()+U.slice(1)})}function zV($){let I,U,_=/^-[^-]$/,u=/^--[^-]/,g=$.split(/[ |,]+/).concat("guard");if(_.test(g[0]))I=g.shift();if(u.test(g[0]))U=g.shift();if(!I&&_.test(g[0]))I=g.shift();if(!I&&u.test(g[0]))I=U,U=g.shift();if(g[0].startsWith("-")){let z=g[0],v=`option creation failed due to '${z}' in option flags '${$}'`;if(/^-[^-][^-]/.test(z))throw Error(`${v}
2
+ import{createRequire as pO}from"node:module";var yO=Object.create;var{getPrototypeOf:iO,defineProperty:y2,getOwnPropertyNames:nO}=Object;var rO=Object.prototype.hasOwnProperty;function lO($){return this[$]}var mO,hO,q$=($,I,U)=>{var _=$!=null&&typeof $==="object";if(_){var u=I?mO??=new WeakMap:hO??=new WeakMap,z=u.get($);if(z)return z}U=$!=null?yO(iO($)):{};let g=I||!$||!$.__esModule?y2(U,"default",{value:$,enumerable:!0}):U;for(let v of nO($))if(!rO.call(g,v))y2(g,v,{get:lO.bind($,v),enumerable:!0});if(_)u.set($,g);return g};var E=($,I)=>()=>(I||$((I={exports:{}}).exports,I),I.exports);var cO=($)=>$;function dO($,I){this[$]=cO.bind(null,I)}var B4=($,I)=>{for(var U in I)y2($,U,{get:I[U],enumerable:!0,configurable:!0,set:dO.bind(I,U)})};var _4=($,I)=>()=>($&&(I=$($=0)),I);var z$=pO(import.meta.url);var ZI=E((oO)=>{class i2 extends Error{constructor($,I,U){super(U);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=I,this.exitCode=$,this.nestedError=void 0}}class o9 extends i2{constructor($){super(1,"commander.invalidArgument",$);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}oO.CommanderError=i2;oO.InvalidArgumentError=o9});var gu=E(($V)=>{var{InvalidArgumentError:eO}=ZI();class t9{constructor($,I){switch(this.description=I||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,$[0]){case"<":this.required=!0,this._name=$.slice(1,-1);break;case"[":this.required=!1,this._name=$.slice(1,-1);break;default:this.required=!0,this._name=$;break}if(this._name.endsWith("..."))this.variadic=!0,this._name=this._name.slice(0,-3)}name(){return this._name}_collectValue($,I){if(I===this.defaultValue||!Array.isArray(I))return[$];return I.push($),I}default($,I){return this.defaultValue=$,this.defaultValueDescription=I,this}argParser($){return this.parseArg=$,this}choices($){return this.argChoices=$.slice(),this.parseArg=(I,U)=>{if(!this.argChoices.includes(I))throw new eO(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._collectValue(I,U);return I},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}}function sO($){let I=$.name()+($.variadic===!0?"...":"");return $.required?"<"+I+">":"["+I+"]"}$V.Argument=t9;$V.humanReadableArgName=sO});var n2=E((_V)=>{var{humanReadableArgName:UV}=gu();class a9{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext($){this.helpWidth=this.helpWidth??$.helpWidth??80}visibleCommands($){let I=$.commands.filter((_)=>!_._hidden),U=$._getHelpCommand();if(U&&!U._hidden)I.push(U);if(this.sortSubcommands)I.sort((_,u)=>{return _.name().localeCompare(u.name())});return I}compareOptions($,I){let U=(_)=>{return _.short?_.short.replace(/^-/,""):_.long.replace(/^--/,"")};return U($).localeCompare(U(I))}visibleOptions($){let I=$.options.filter((_)=>!_.hidden),U=$._getHelpOption();if(U&&!U.hidden){let _=U.short&&$._findOption(U.short),u=U.long&&$._findOption(U.long);if(!_&&!u)I.push(U);else if(U.long&&!u)I.push($.createOption(U.long,U.description));else if(U.short&&!_)I.push($.createOption(U.short,U.description))}if(this.sortOptions)I.sort(this.compareOptions);return I}visibleGlobalOptions($){if(!this.showGlobalOptions)return[];let I=[];for(let U=$.parent;U;U=U.parent){let _=U.options.filter((u)=>!u.hidden);I.push(..._)}if(this.sortOptions)I.sort(this.compareOptions);return I}visibleArguments($){if($._argsDescription)$.registeredArguments.forEach((I)=>{I.description=I.description||$._argsDescription[I.name()]||""});if($.registeredArguments.find((I)=>I.description))return $.registeredArguments;return[]}subcommandTerm($){let I=$.registeredArguments.map((U)=>UV(U)).join(" ");return $._name+($._aliases[0]?"|"+$._aliases[0]:"")+($.options.length?" [options]":"")+(I?" "+I:"")}optionTerm($){return $.flags}argumentTerm($){return $.name()}longestSubcommandTermLength($,I){return I.visibleCommands($).reduce((U,_)=>{return Math.max(U,this.displayWidth(I.styleSubcommandTerm(I.subcommandTerm(_))))},0)}longestOptionTermLength($,I){return I.visibleOptions($).reduce((U,_)=>{return Math.max(U,this.displayWidth(I.styleOptionTerm(I.optionTerm(_))))},0)}longestGlobalOptionTermLength($,I){return I.visibleGlobalOptions($).reduce((U,_)=>{return Math.max(U,this.displayWidth(I.styleOptionTerm(I.optionTerm(_))))},0)}longestArgumentTermLength($,I){return I.visibleArguments($).reduce((U,_)=>{return Math.max(U,this.displayWidth(I.styleArgumentTerm(I.argumentTerm(_))))},0)}commandUsage($){let I=$._name;if($._aliases[0])I=I+"|"+$._aliases[0];let U="";for(let _=$.parent;_;_=_.parent)U=_.name()+" "+U;return U+I+" "+$.usage()}commandDescription($){return $.description()}subcommandDescription($){return $.summary()||$.description()}optionDescription($){let I=[];if($.argChoices)I.push(`choices: ${$.argChoices.map((U)=>JSON.stringify(U)).join(", ")}`);if($.defaultValue!==void 0){if($.required||$.optional||$.isBoolean()&&typeof $.defaultValue==="boolean")I.push(`default: ${$.defaultValueDescription||JSON.stringify($.defaultValue)}`)}if($.presetArg!==void 0&&$.optional)I.push(`preset: ${JSON.stringify($.presetArg)}`);if($.envVar!==void 0)I.push(`env: ${$.envVar}`);if(I.length>0){let U=`(${I.join(", ")})`;if($.description)return`${$.description} ${U}`;return U}return $.description}argumentDescription($){let I=[];if($.argChoices)I.push(`choices: ${$.argChoices.map((U)=>JSON.stringify(U)).join(", ")}`);if($.defaultValue!==void 0)I.push(`default: ${$.defaultValueDescription||JSON.stringify($.defaultValue)}`);if(I.length>0){let U=`(${I.join(", ")})`;if($.description)return`${$.description} ${U}`;return U}return $.description}formatItemList($,I,U){if(I.length===0)return[];return[U.styleTitle($),...I,""]}groupItems($,I,U){let _=new Map;return $.forEach((u)=>{let z=U(u);if(!_.has(z))_.set(z,[])}),I.forEach((u)=>{let z=U(u);if(!_.has(z))_.set(z,[]);_.get(z).push(u)}),_}formatHelp($,I){let U=I.padWidth($,I),_=I.helpWidth??80;function u(X,G){return I.formatItem(X,U,G,I)}let z=[`${I.styleTitle("Usage:")} ${I.styleUsage(I.commandUsage($))}`,""],g=I.commandDescription($);if(g.length>0)z=z.concat([I.boxWrap(I.styleCommandDescription(g),_),""]);let v=I.visibleArguments($).map((X)=>{return u(I.styleArgumentTerm(I.argumentTerm(X)),I.styleArgumentDescription(I.argumentDescription(X)))});if(z=z.concat(this.formatItemList("Arguments:",v,I)),this.groupItems($.options,I.visibleOptions($),(X)=>X.helpGroupHeading??"Options:").forEach((X,G)=>{let q=X.map((T)=>{return u(I.styleOptionTerm(I.optionTerm(T)),I.styleOptionDescription(I.optionDescription(T)))});z=z.concat(this.formatItemList(G,q,I))}),I.showGlobalOptions){let X=I.visibleGlobalOptions($).map((G)=>{return u(I.styleOptionTerm(I.optionTerm(G)),I.styleOptionDescription(I.optionDescription(G)))});z=z.concat(this.formatItemList("Global Options:",X,I))}return this.groupItems($.commands,I.visibleCommands($),(X)=>X.helpGroup()||"Commands:").forEach((X,G)=>{let q=X.map((T)=>{return u(I.styleSubcommandTerm(I.subcommandTerm(T)),I.styleSubcommandDescription(I.subcommandDescription(T)))});z=z.concat(this.formatItemList(G,q,I))}),z.join(`
3
+ `)}displayWidth($){return e9($).length}styleTitle($){return $}styleUsage($){return $.split(" ").map((I)=>{if(I==="[options]")return this.styleOptionText(I);if(I==="[command]")return this.styleSubcommandText(I);if(I[0]==="["||I[0]==="<")return this.styleArgumentText(I);return this.styleCommandText(I)}).join(" ")}styleCommandDescription($){return this.styleDescriptionText($)}styleOptionDescription($){return this.styleDescriptionText($)}styleSubcommandDescription($){return this.styleDescriptionText($)}styleArgumentDescription($){return this.styleDescriptionText($)}styleDescriptionText($){return $}styleOptionTerm($){return this.styleOptionText($)}styleSubcommandTerm($){return $.split(" ").map((I)=>{if(I==="[options]")return this.styleOptionText(I);if(I[0]==="["||I[0]==="<")return this.styleArgumentText(I);return this.styleSubcommandText(I)}).join(" ")}styleArgumentTerm($){return this.styleArgumentText($)}styleOptionText($){return $}styleArgumentText($){return $}styleSubcommandText($){return $}styleCommandText($){return $}padWidth($,I){return Math.max(I.longestOptionTermLength($,I),I.longestGlobalOptionTermLength($,I),I.longestSubcommandTermLength($,I),I.longestArgumentTermLength($,I))}preformatted($){return/\n[^\S\r\n]/.test($)}formatItem($,I,U,_){let z=" ".repeat(2);if(!U)return z+$;let g=$.padEnd(I+$.length-_.displayWidth($)),v=2,N=(this.helpWidth??80)-I-v-2,X;if(N<this.minWidthToWrap||_.preformatted(U))X=U;else X=_.boxWrap(U,N).replace(/\n/g,`
4
+ `+" ".repeat(I+v));return z+g+" ".repeat(v)+X.replace(/\n/g,`
5
+ ${z}`)}boxWrap($,I){if(I<this.minWidthToWrap)return $;let U=$.split(/\r\n|\n/),_=/[\s]*[^\s]+/g,u=[];return U.forEach((z)=>{let g=z.match(_);if(g===null){u.push("");return}let v=[g.shift()],J=this.displayWidth(v[0]);g.forEach((N)=>{let X=this.displayWidth(N);if(J+X<=I){v.push(N),J+=X;return}u.push(v.join(""));let G=N.trimStart();v=[G],J=this.displayWidth(G)}),u.push(v.join(""))}),u.join(`
6
+ `)}}function e9($){let I=/\x1b\[\d*(;\d*)*m/g;return $.replace(I,"")}_V.Help=a9;_V.stripColor=e9});var r2=E((NV)=>{var{InvalidArgumentError:vV}=ZI();class $X{constructor($,I){this.flags=$,this.description=I||"",this.required=$.includes("<"),this.optional=$.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test($),this.mandatory=!1;let U=JV($);if(this.short=U.shortFlag,this.long=U.longFlag,this.negate=!1,this.long)this.negate=this.long.startsWith("--no-");this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default($,I){return this.defaultValue=$,this.defaultValueDescription=I,this}preset($){return this.presetArg=$,this}conflicts($){return this.conflictsWith=this.conflictsWith.concat($),this}implies($){let I=$;if(typeof $==="string")I={[$]:!0};return this.implied=Object.assign(this.implied||{},I),this}env($){return this.envVar=$,this}argParser($){return this.parseArg=$,this}makeOptionMandatory($=!0){return this.mandatory=!!$,this}hideHelp($=!0){return this.hidden=!!$,this}_collectValue($,I){if(I===this.defaultValue||!Array.isArray(I))return[$];return I.push($),I}choices($){return this.argChoices=$.slice(),this.parseArg=(I,U)=>{if(!this.argChoices.includes(I))throw new vV(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._collectValue(I,U);return I},this}name(){if(this.long)return this.long.replace(/^--/,"");return this.short.replace(/^-/,"")}attributeName(){if(this.negate)return s9(this.name().replace(/^no-/,""));return s9(this.name())}helpGroup($){return this.helpGroupHeading=$,this}is($){return this.short===$||this.long===$}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class IX{constructor($){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,$.forEach((I)=>{if(I.negate)this.negativeOptions.set(I.attributeName(),I);else this.positiveOptions.set(I.attributeName(),I)}),this.negativeOptions.forEach((I,U)=>{if(this.positiveOptions.has(U))this.dualOptions.add(U)})}valueFromOption($,I){let U=I.attributeName();if(!this.dualOptions.has(U))return!0;let _=this.negativeOptions.get(U).presetArg,u=_!==void 0?_:!1;return I.negate===(u===$)}}function s9($){return $.split("-").reduce((I,U)=>{return I+U[0].toUpperCase()+U.slice(1)})}function JV($){let I,U,_=/^-[^-]$/,u=/^--[^-]/,z=$.split(/[ |,]+/).concat("guard");if(_.test(z[0]))I=z.shift();if(u.test(z[0]))U=z.shift();if(!I&&_.test(z[0]))I=z.shift();if(!I&&u.test(z[0]))I=U,U=z.shift();if(z[0].startsWith("-")){let g=z[0],v=`option creation failed due to '${g}' in option flags '${$}'`;if(/^-[^-][^-]/.test(g))throw Error(`${v}
7
7
  - a short flag is a single dash and a single character
8
8
  - either use a single dash and a single character (for a short flag)
9
- - or use a double dash for a long option (and can have two, like '--ws, --workspace')`);if(_.test(z))throw Error(`${v}
10
- - too many short flags`);if(u.test(z))throw Error(`${v}
9
+ - or use a double dash for a long option (and can have two, like '--ws, --workspace')`);if(_.test(g))throw Error(`${v}
10
+ - too many short flags`);if(u.test(g))throw Error(`${v}
11
11
  - too many long flags`);throw Error(`${v}
12
- - unrecognised flag format`)}if(I===void 0&&U===void 0)throw Error(`option creation failed due to no flags found in '${$}'.`);return{shortFlag:I,longFlag:U}}vV.Option=$X;vV.DualOptions=IX});var uX=E((qV)=>{function GV($,I){if(Math.abs($.length-I.length)>3)return Math.max($.length,I.length);let U=[];for(let _=0;_<=$.length;_++)U[_]=[_];for(let _=0;_<=I.length;_++)U[0][_]=_;for(let _=1;_<=I.length;_++)for(let u=1;u<=$.length;u++){let g=1;if($[u-1]===I[_-1])g=0;else g=1;if(U[u][_]=Math.min(U[u-1][_]+1,U[u][_-1]+1,U[u-1][_-1]+g),u>1&&_>1&&$[u-1]===I[_-2]&&$[u-2]===I[_-1])U[u][_]=Math.min(U[u][_],U[u-2][_-2]+1)}return U[$.length][I.length]}function XV($,I){if(!I||I.length===0)return"";I=Array.from(new Set(I));let U=$.startsWith("--");if(U)$=$.slice(2),I=I.map((z)=>z.slice(2));let _=[],u=3,g=0.4;if(I.forEach((z)=>{if(z.length<=1)return;let v=GV($,z),J=Math.max($.length,z.length);if((J-v)/J>g){if(v<u)u=v,_=[z];else if(v===u)_.push(z)}}),_.sort((z,v)=>z.localeCompare(v)),U)_=_.map((z)=>`--${z}`);if(_.length>1)return`
12
+ - unrecognised flag format`)}if(I===void 0&&U===void 0)throw Error(`option creation failed due to no flags found in '${$}'.`);return{shortFlag:I,longFlag:U}}NV.Option=$X;NV.DualOptions=IX});var uX=E((TV)=>{function qV($,I){if(Math.abs($.length-I.length)>3)return Math.max($.length,I.length);let U=[];for(let _=0;_<=$.length;_++)U[_]=[_];for(let _=0;_<=I.length;_++)U[0][_]=_;for(let _=1;_<=I.length;_++)for(let u=1;u<=$.length;u++){let z=1;if($[u-1]===I[_-1])z=0;else z=1;if(U[u][_]=Math.min(U[u-1][_]+1,U[u][_-1]+1,U[u-1][_-1]+z),u>1&&_>1&&$[u-1]===I[_-2]&&$[u-2]===I[_-1])U[u][_]=Math.min(U[u][_],U[u-2][_-2]+1)}return U[$.length][I.length]}function QV($,I){if(!I||I.length===0)return"";I=Array.from(new Set(I));let U=$.startsWith("--");if(U)$=$.slice(2),I=I.map((g)=>g.slice(2));let _=[],u=3,z=0.4;if(I.forEach((g)=>{if(g.length<=1)return;let v=qV($,g),J=Math.max($.length,g.length);if((J-v)/J>z){if(v<u)u=v,_=[g];else if(v===u)_.push(g)}}),_.sort((g,v)=>g.localeCompare(v)),U)_=_.map((g)=>`--${g}`);if(_.length>1)return`
13
13
  (Did you mean one of ${_.join(", ")}?)`;if(_.length===1)return`
14
- (Did you mean ${_[0]}?)`;return""}qV.suggestSimilar=XV});var zX=E((DV)=>{var TV=g$("node:events").EventEmitter,n2=g$("node:child_process"),c4=g$("node:path"),zu=g$("node:fs"),U$=g$("node:process"),{Argument:HV,humanReadableArgName:YV}=gu(),{CommanderError:r2}=WI(),{Help:OV,stripColor:VV}=y2(),{Option:UX,DualOptions:BV}=i2(),{suggestSimilar:_X}=uX();class m2 extends TV{constructor($){super();this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=$||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:(I)=>U$.stdout.write(I),writeErr:(I)=>U$.stderr.write(I),outputError:(I,U)=>U(I),getOutHelpWidth:()=>U$.stdout.isTTY?U$.stdout.columns:void 0,getErrHelpWidth:()=>U$.stderr.isTTY?U$.stderr.columns:void 0,getOutHasColors:()=>l2()??(U$.stdout.isTTY&&U$.stdout.hasColors?.()),getErrHasColors:()=>l2()??(U$.stderr.isTTY&&U$.stderr.hasColors?.()),stripColor:(I)=>VV(I)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings($){return this._outputConfiguration=$._outputConfiguration,this._helpOption=$._helpOption,this._helpCommand=$._helpCommand,this._helpConfiguration=$._helpConfiguration,this._exitCallback=$._exitCallback,this._storeOptionsAsProperties=$._storeOptionsAsProperties,this._combineFlagAndOptionalValue=$._combineFlagAndOptionalValue,this._allowExcessArguments=$._allowExcessArguments,this._enablePositionalOptions=$._enablePositionalOptions,this._showHelpAfterError=$._showHelpAfterError,this._showSuggestionAfterError=$._showSuggestionAfterError,this}_getCommandAndAncestors(){let $=[];for(let I=this;I;I=I.parent)$.push(I);return $}command($,I,U){let _=I,u=U;if(typeof _==="object"&&_!==null)u=_,_=null;u=u||{};let[,g,z]=$.match(/([^ ]+) *(.*)/),v=this.createCommand(g);if(_)v.description(_),v._executableHandler=!0;if(u.isDefault)this._defaultCommandName=v._name;if(v._hidden=!!(u.noHelp||u.hidden),v._executableFile=u.executableFile||null,z)v.arguments(z);if(this._registerCommand(v),v.parent=this,v.copyInheritedSettings(this),_)return this;return v}createCommand($){return new m2($)}createHelp(){return Object.assign(new OV,this.configureHelp())}configureHelp($){if($===void 0)return this._helpConfiguration;return this._helpConfiguration=$,this}configureOutput($){if($===void 0)return this._outputConfiguration;return this._outputConfiguration={...this._outputConfiguration,...$},this}showHelpAfterError($=!0){if(typeof $!=="string")$=!!$;return this._showHelpAfterError=$,this}showSuggestionAfterError($=!0){return this._showSuggestionAfterError=!!$,this}addCommand($,I){if(!$._name)throw Error(`Command passed to .addCommand() must have a name
15
- - specify the name in Command constructor or using .name()`);if(I=I||{},I.isDefault)this._defaultCommandName=$._name;if(I.noHelp||I.hidden)$._hidden=!0;return this._registerCommand($),$.parent=this,$._checkForBrokenPassThrough(),this}createArgument($,I){return new HV($,I)}argument($,I,U,_){let u=this.createArgument($,I);if(typeof U==="function")u.default(_).argParser(U);else u.default(U);return this.addArgument(u),this}arguments($){return $.trim().split(/ +/).forEach((I)=>{this.argument(I)}),this}addArgument($){let I=this.registeredArguments.slice(-1)[0];if(I?.variadic)throw Error(`only the last argument can be variadic '${I.name()}'`);if($.required&&$.defaultValue!==void 0&&$.parseArg===void 0)throw Error(`a default value for a required argument is never used: '${$.name()}'`);return this.registeredArguments.push($),this}helpCommand($,I){if(typeof $==="boolean"){if(this._addImplicitHelpCommand=$,$&&this._defaultCommandGroup)this._initCommandGroup(this._getHelpCommand());return this}let U=$??"help [command]",[,_,u]=U.match(/([^ ]+) *(.*)/),g=I??"display help for command",z=this.createCommand(_);if(z.helpOption(!1),u)z.arguments(u);if(g)z.description(g);if(this._addImplicitHelpCommand=!0,this._helpCommand=z,$||I)this._initCommandGroup(z);return this}addHelpCommand($,I){if(typeof $!=="object")return this.helpCommand($,I),this;return this._addImplicitHelpCommand=!0,this._helpCommand=$,this._initCommandGroup($),this}_getHelpCommand(){if(this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))){if(this._helpCommand===void 0)this.helpCommand(void 0,void 0);return this._helpCommand}return null}hook($,I){let U=["preSubcommand","preAction","postAction"];if(!U.includes($))throw Error(`Unexpected value for event passed to hook : '${$}'.
16
- Expecting one of '${U.join("', '")}'`);if(this._lifeCycleHooks[$])this._lifeCycleHooks[$].push(I);else this._lifeCycleHooks[$]=[I];return this}exitOverride($){if($)this._exitCallback=$;else this._exitCallback=(I)=>{if(I.code!=="commander.executeSubCommandAsync")throw I};return this}_exit($,I,U){if(this._exitCallback)this._exitCallback(new r2($,I,U));U$.exit($)}action($){let I=(U)=>{let _=this.registeredArguments.length,u=U.slice(0,_);if(this._storeOptionsAsProperties)u[_]=this;else u[_]=this.opts();return u.push(this),$.apply(this,u)};return this._actionHandler=I,this}createOption($,I){return new UX($,I)}_callParseArg($,I,U,_){try{return $.parseArg(I,U)}catch(u){if(u.code==="commander.invalidArgument"){let g=`${_} ${u.message}`;this.error(g,{exitCode:u.exitCode,code:u.code})}throw u}}_registerOption($){let I=$.short&&this._findOption($.short)||$.long&&this._findOption($.long);if(I){let U=$.long&&this._findOption($.long)?$.long:$.short;throw Error(`Cannot add option '${$.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${U}'
17
- - already used by option '${I.flags}'`)}this._initOptionGroup($),this.options.push($)}_registerCommand($){let I=(_)=>{return[_.name()].concat(_.aliases())},U=I($).find((_)=>this._findCommand(_));if(U){let _=I(this._findCommand(U)).join("|"),u=I($).join("|");throw Error(`cannot add command '${u}' as already have command '${_}'`)}this._initCommandGroup($),this.commands.push($)}addOption($){this._registerOption($);let I=$.name(),U=$.attributeName();if($.negate){let u=$.long.replace(/^--no-/,"--");if(!this._findOption(u))this.setOptionValueWithSource(U,$.defaultValue===void 0?!0:$.defaultValue,"default")}else if($.defaultValue!==void 0)this.setOptionValueWithSource(U,$.defaultValue,"default");let _=(u,g,z)=>{if(u==null&&$.presetArg!==void 0)u=$.presetArg;let v=this.getOptionValue(U);if(u!==null&&$.parseArg)u=this._callParseArg($,u,v,g);else if(u!==null&&$.variadic)u=$._collectValue(u,v);if(u==null)if($.negate)u=!1;else if($.isBoolean()||$.optional)u=!0;else u="";this.setOptionValueWithSource(U,u,z)};if(this.on("option:"+I,(u)=>{let g=`error: option '${$.flags}' argument '${u}' is invalid.`;_(u,g,"cli")}),$.envVar)this.on("optionEnv:"+I,(u)=>{let g=`error: option '${$.flags}' value '${u}' from env '${$.envVar}' is invalid.`;_(u,g,"env")});return this}_optionEx($,I,U,_,u){if(typeof I==="object"&&I instanceof UX)throw Error("To add an Option object use addOption() instead of option() or requiredOption()");let g=this.createOption(I,U);if(g.makeOptionMandatory(!!$.mandatory),typeof _==="function")g.default(u).argParser(_);else if(_ instanceof RegExp){let z=_;_=(v,J)=>{let N=z.exec(v);return N?N[0]:J},g.default(u).argParser(_)}else g.default(_);return this.addOption(g)}option($,I,U,_){return this._optionEx({},$,I,U,_)}requiredOption($,I,U,_){return this._optionEx({mandatory:!0},$,I,U,_)}combineFlagAndOptionalValue($=!0){return this._combineFlagAndOptionalValue=!!$,this}allowUnknownOption($=!0){return this._allowUnknownOption=!!$,this}allowExcessArguments($=!0){return this._allowExcessArguments=!!$,this}enablePositionalOptions($=!0){return this._enablePositionalOptions=!!$,this}passThroughOptions($=!0){return this._passThroughOptions=!!$,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties($=!0){if(this.options.length)throw Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!$,this}getOptionValue($){if(this._storeOptionsAsProperties)return this[$];return this._optionValues[$]}setOptionValue($,I){return this.setOptionValueWithSource($,I,void 0)}setOptionValueWithSource($,I,U){if(this._storeOptionsAsProperties)this[$]=I;else this._optionValues[$]=I;return this._optionValueSources[$]=U,this}getOptionValueSource($){return this._optionValueSources[$]}getOptionValueSourceWithGlobals($){let I;return this._getCommandAndAncestors().forEach((U)=>{if(U.getOptionValueSource($)!==void 0)I=U.getOptionValueSource($)}),I}_prepareUserArgs($,I){if($!==void 0&&!Array.isArray($))throw Error("first parameter to parse must be array or undefined");if(I=I||{},$===void 0&&I.from===void 0){if(U$.versions?.electron)I.from="electron";let _=U$.execArgv??[];if(_.includes("-e")||_.includes("--eval")||_.includes("-p")||_.includes("--print"))I.from="eval"}if($===void 0)$=U$.argv;this.rawArgs=$.slice();let U;switch(I.from){case void 0:case"node":this._scriptPath=$[1],U=$.slice(2);break;case"electron":if(U$.defaultApp)this._scriptPath=$[1],U=$.slice(2);else U=$.slice(1);break;case"user":U=$.slice(0);break;case"eval":U=$.slice(1);break;default:throw Error(`unexpected parse option { from: '${I.from}' }`)}if(!this._name&&this._scriptPath)this.nameFromFilename(this._scriptPath);return this._name=this._name||"program",U}parse($,I){this._prepareForParse();let U=this._prepareUserArgs($,I);return this._parseCommand([],U),this}async parseAsync($,I){this._prepareForParse();let U=this._prepareUserArgs($,I);return await this._parseCommand([],U),this}_prepareForParse(){if(this._savedState===null)this.saveStateBeforeParse();else this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw Error(`Can not call parse again when storeOptionsAsProperties is true.
18
- - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable($,I,U){if(zu.existsSync($))return;let _=I?`searched for local subcommand relative to directory '${I}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",u=`'${$}' does not exist
14
+ (Did you mean ${_[0]}?)`;return""}TV.suggestSimilar=QV});var gX=E((KV)=>{var YV=z$("node:events").EventEmitter,l2=z$("node:child_process"),c4=z$("node:path"),vu=z$("node:fs"),U$=z$("node:process"),{Argument:OV,humanReadableArgName:VV}=gu(),{CommanderError:m2}=ZI(),{Help:BV,stripColor:DV}=n2(),{Option:UX,DualOptions:MV}=r2(),{suggestSimilar:_X}=uX();class c2 extends YV{constructor($){super();this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=$||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:(I)=>U$.stdout.write(I),writeErr:(I)=>U$.stderr.write(I),outputError:(I,U)=>U(I),getOutHelpWidth:()=>U$.stdout.isTTY?U$.stdout.columns:void 0,getErrHelpWidth:()=>U$.stderr.isTTY?U$.stderr.columns:void 0,getOutHasColors:()=>h2()??(U$.stdout.isTTY&&U$.stdout.hasColors?.()),getErrHasColors:()=>h2()??(U$.stderr.isTTY&&U$.stderr.hasColors?.()),stripColor:(I)=>DV(I)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings($){return this._outputConfiguration=$._outputConfiguration,this._helpOption=$._helpOption,this._helpCommand=$._helpCommand,this._helpConfiguration=$._helpConfiguration,this._exitCallback=$._exitCallback,this._storeOptionsAsProperties=$._storeOptionsAsProperties,this._combineFlagAndOptionalValue=$._combineFlagAndOptionalValue,this._allowExcessArguments=$._allowExcessArguments,this._enablePositionalOptions=$._enablePositionalOptions,this._showHelpAfterError=$._showHelpAfterError,this._showSuggestionAfterError=$._showSuggestionAfterError,this}_getCommandAndAncestors(){let $=[];for(let I=this;I;I=I.parent)$.push(I);return $}command($,I,U){let _=I,u=U;if(typeof _==="object"&&_!==null)u=_,_=null;u=u||{};let[,z,g]=$.match(/([^ ]+) *(.*)/),v=this.createCommand(z);if(_)v.description(_),v._executableHandler=!0;if(u.isDefault)this._defaultCommandName=v._name;if(v._hidden=!!(u.noHelp||u.hidden),v._executableFile=u.executableFile||null,g)v.arguments(g);if(this._registerCommand(v),v.parent=this,v.copyInheritedSettings(this),_)return this;return v}createCommand($){return new c2($)}createHelp(){return Object.assign(new BV,this.configureHelp())}configureHelp($){if($===void 0)return this._helpConfiguration;return this._helpConfiguration=$,this}configureOutput($){if($===void 0)return this._outputConfiguration;return this._outputConfiguration={...this._outputConfiguration,...$},this}showHelpAfterError($=!0){if(typeof $!=="string")$=!!$;return this._showHelpAfterError=$,this}showSuggestionAfterError($=!0){return this._showSuggestionAfterError=!!$,this}addCommand($,I){if(!$._name)throw Error(`Command passed to .addCommand() must have a name
15
+ - specify the name in Command constructor or using .name()`);if(I=I||{},I.isDefault)this._defaultCommandName=$._name;if(I.noHelp||I.hidden)$._hidden=!0;return this._registerCommand($),$.parent=this,$._checkForBrokenPassThrough(),this}createArgument($,I){return new OV($,I)}argument($,I,U,_){let u=this.createArgument($,I);if(typeof U==="function")u.default(_).argParser(U);else u.default(U);return this.addArgument(u),this}arguments($){return $.trim().split(/ +/).forEach((I)=>{this.argument(I)}),this}addArgument($){let I=this.registeredArguments.slice(-1)[0];if(I?.variadic)throw Error(`only the last argument can be variadic '${I.name()}'`);if($.required&&$.defaultValue!==void 0&&$.parseArg===void 0)throw Error(`a default value for a required argument is never used: '${$.name()}'`);return this.registeredArguments.push($),this}helpCommand($,I){if(typeof $==="boolean"){if(this._addImplicitHelpCommand=$,$&&this._defaultCommandGroup)this._initCommandGroup(this._getHelpCommand());return this}let U=$??"help [command]",[,_,u]=U.match(/([^ ]+) *(.*)/),z=I??"display help for command",g=this.createCommand(_);if(g.helpOption(!1),u)g.arguments(u);if(z)g.description(z);if(this._addImplicitHelpCommand=!0,this._helpCommand=g,$||I)this._initCommandGroup(g);return this}addHelpCommand($,I){if(typeof $!=="object")return this.helpCommand($,I),this;return this._addImplicitHelpCommand=!0,this._helpCommand=$,this._initCommandGroup($),this}_getHelpCommand(){if(this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))){if(this._helpCommand===void 0)this.helpCommand(void 0,void 0);return this._helpCommand}return null}hook($,I){let U=["preSubcommand","preAction","postAction"];if(!U.includes($))throw Error(`Unexpected value for event passed to hook : '${$}'.
16
+ Expecting one of '${U.join("', '")}'`);if(this._lifeCycleHooks[$])this._lifeCycleHooks[$].push(I);else this._lifeCycleHooks[$]=[I];return this}exitOverride($){if($)this._exitCallback=$;else this._exitCallback=(I)=>{if(I.code!=="commander.executeSubCommandAsync")throw I};return this}_exit($,I,U){if(this._exitCallback)this._exitCallback(new m2($,I,U));U$.exit($)}action($){let I=(U)=>{let _=this.registeredArguments.length,u=U.slice(0,_);if(this._storeOptionsAsProperties)u[_]=this;else u[_]=this.opts();return u.push(this),$.apply(this,u)};return this._actionHandler=I,this}createOption($,I){return new UX($,I)}_callParseArg($,I,U,_){try{return $.parseArg(I,U)}catch(u){if(u.code==="commander.invalidArgument"){let z=`${_} ${u.message}`;this.error(z,{exitCode:u.exitCode,code:u.code})}throw u}}_registerOption($){let I=$.short&&this._findOption($.short)||$.long&&this._findOption($.long);if(I){let U=$.long&&this._findOption($.long)?$.long:$.short;throw Error(`Cannot add option '${$.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${U}'
17
+ - already used by option '${I.flags}'`)}this._initOptionGroup($),this.options.push($)}_registerCommand($){let I=(_)=>{return[_.name()].concat(_.aliases())},U=I($).find((_)=>this._findCommand(_));if(U){let _=I(this._findCommand(U)).join("|"),u=I($).join("|");throw Error(`cannot add command '${u}' as already have command '${_}'`)}this._initCommandGroup($),this.commands.push($)}addOption($){this._registerOption($);let I=$.name(),U=$.attributeName();if($.negate){let u=$.long.replace(/^--no-/,"--");if(!this._findOption(u))this.setOptionValueWithSource(U,$.defaultValue===void 0?!0:$.defaultValue,"default")}else if($.defaultValue!==void 0)this.setOptionValueWithSource(U,$.defaultValue,"default");let _=(u,z,g)=>{if(u==null&&$.presetArg!==void 0)u=$.presetArg;let v=this.getOptionValue(U);if(u!==null&&$.parseArg)u=this._callParseArg($,u,v,z);else if(u!==null&&$.variadic)u=$._collectValue(u,v);if(u==null)if($.negate)u=!1;else if($.isBoolean()||$.optional)u=!0;else u="";this.setOptionValueWithSource(U,u,g)};if(this.on("option:"+I,(u)=>{let z=`error: option '${$.flags}' argument '${u}' is invalid.`;_(u,z,"cli")}),$.envVar)this.on("optionEnv:"+I,(u)=>{let z=`error: option '${$.flags}' value '${u}' from env '${$.envVar}' is invalid.`;_(u,z,"env")});return this}_optionEx($,I,U,_,u){if(typeof I==="object"&&I instanceof UX)throw Error("To add an Option object use addOption() instead of option() or requiredOption()");let z=this.createOption(I,U);if(z.makeOptionMandatory(!!$.mandatory),typeof _==="function")z.default(u).argParser(_);else if(_ instanceof RegExp){let g=_;_=(v,J)=>{let N=g.exec(v);return N?N[0]:J},z.default(u).argParser(_)}else z.default(_);return this.addOption(z)}option($,I,U,_){return this._optionEx({},$,I,U,_)}requiredOption($,I,U,_){return this._optionEx({mandatory:!0},$,I,U,_)}combineFlagAndOptionalValue($=!0){return this._combineFlagAndOptionalValue=!!$,this}allowUnknownOption($=!0){return this._allowUnknownOption=!!$,this}allowExcessArguments($=!0){return this._allowExcessArguments=!!$,this}enablePositionalOptions($=!0){return this._enablePositionalOptions=!!$,this}passThroughOptions($=!0){return this._passThroughOptions=!!$,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties($=!0){if(this.options.length)throw Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!$,this}getOptionValue($){if(this._storeOptionsAsProperties)return this[$];return this._optionValues[$]}setOptionValue($,I){return this.setOptionValueWithSource($,I,void 0)}setOptionValueWithSource($,I,U){if(this._storeOptionsAsProperties)this[$]=I;else this._optionValues[$]=I;return this._optionValueSources[$]=U,this}getOptionValueSource($){return this._optionValueSources[$]}getOptionValueSourceWithGlobals($){let I;return this._getCommandAndAncestors().forEach((U)=>{if(U.getOptionValueSource($)!==void 0)I=U.getOptionValueSource($)}),I}_prepareUserArgs($,I){if($!==void 0&&!Array.isArray($))throw Error("first parameter to parse must be array or undefined");if(I=I||{},$===void 0&&I.from===void 0){if(U$.versions?.electron)I.from="electron";let _=U$.execArgv??[];if(_.includes("-e")||_.includes("--eval")||_.includes("-p")||_.includes("--print"))I.from="eval"}if($===void 0)$=U$.argv;this.rawArgs=$.slice();let U;switch(I.from){case void 0:case"node":this._scriptPath=$[1],U=$.slice(2);break;case"electron":if(U$.defaultApp)this._scriptPath=$[1],U=$.slice(2);else U=$.slice(1);break;case"user":U=$.slice(0);break;case"eval":U=$.slice(1);break;default:throw Error(`unexpected parse option { from: '${I.from}' }`)}if(!this._name&&this._scriptPath)this.nameFromFilename(this._scriptPath);return this._name=this._name||"program",U}parse($,I){this._prepareForParse();let U=this._prepareUserArgs($,I);return this._parseCommand([],U),this}async parseAsync($,I){this._prepareForParse();let U=this._prepareUserArgs($,I);return await this._parseCommand([],U),this}_prepareForParse(){if(this._savedState===null)this.saveStateBeforeParse();else this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw Error(`Can not call parse again when storeOptionsAsProperties is true.
18
+ - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable($,I,U){if(vu.existsSync($))return;let _=I?`searched for local subcommand relative to directory '${I}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",u=`'${$}' does not exist
19
19
  - if '${U}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
20
20
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
21
- - ${_}`;throw Error(u)}_executeSubCommand($,I){I=I.slice();let U=!1,_=[".js",".ts",".tsx",".mjs",".cjs"];function u(N,X){let G=c4.resolve(N,X);if(zu.existsSync(G))return G;if(_.includes(c4.extname(X)))return;let q=_.find((T)=>zu.existsSync(`${G}${T}`));if(q)return`${G}${q}`;return}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let g=$._executableFile||`${this._name}-${$._name}`,z=this._executableDir||"";if(this._scriptPath){let N;try{N=zu.realpathSync(this._scriptPath)}catch{N=this._scriptPath}z=c4.resolve(c4.dirname(N),z)}if(z){let N=u(z,g);if(!N&&!$._executableFile&&this._scriptPath){let X=c4.basename(this._scriptPath,c4.extname(this._scriptPath));if(X!==this._name)N=u(z,`${X}-${$._name}`)}g=N||g}U=_.includes(c4.extname(g));let v;if(U$.platform!=="win32")if(U)I.unshift(g),I=gX(U$.execArgv).concat(I),v=n2.spawn(U$.argv[0],I,{stdio:"inherit"});else v=n2.spawn(g,I,{stdio:"inherit"});else this._checkForMissingExecutable(g,z,$._name),I.unshift(g),I=gX(U$.execArgv).concat(I),v=n2.spawn(U$.execPath,I,{stdio:"inherit"});if(!v.killed)["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((X)=>{U$.on(X,()=>{if(v.killed===!1&&v.exitCode===null)v.kill(X)})});let J=this._exitCallback;v.on("close",(N)=>{if(N=N??1,!J)U$.exit(N);else J(new r2(N,"commander.executeSubCommandAsync","(close)"))}),v.on("error",(N)=>{if(N.code==="ENOENT")this._checkForMissingExecutable(g,z,$._name);else if(N.code==="EACCES")throw Error(`'${g}' not executable`);if(!J)U$.exit(1);else{let X=new r2(1,"commander.executeSubCommandAsync","(error)");X.nestedError=N,J(X)}}),this.runningCommand=v}_dispatchSubcommand($,I,U){let _=this._findCommand($);if(!_)this.help({error:!0});_._prepareForParse();let u;return u=this._chainOrCallSubCommandHook(u,_,"preSubcommand"),u=this._chainOrCall(u,()=>{if(_._executableHandler)this._executeSubCommand(_,I.concat(U));else return _._parseCommand(I,U)}),u}_dispatchHelpCommand($){if(!$)this.help();let I=this._findCommand($);if(I&&!I._executableHandler)I.help();return this._dispatchSubcommand($,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){if(this.registeredArguments.forEach(($,I)=>{if($.required&&this.args[I]==null)this.missingArgument($.name())}),this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)return;if(this.args.length>this.registeredArguments.length)this._excessArguments(this.args)}_processArguments(){let $=(U,_,u)=>{let g=_;if(_!==null&&U.parseArg){let z=`error: command-argument value '${_}' is invalid for argument '${U.name()}'.`;g=this._callParseArg(U,_,u,z)}return g};this._checkNumberOfArguments();let I=[];this.registeredArguments.forEach((U,_)=>{let u=U.defaultValue;if(U.variadic){if(_<this.args.length){if(u=this.args.slice(_),U.parseArg)u=u.reduce((g,z)=>{return $(U,z,g)},U.defaultValue)}else if(u===void 0)u=[]}else if(_<this.args.length){if(u=this.args[_],U.parseArg)u=$(U,u,U.defaultValue)}I[_]=u}),this.processedArgs=I}_chainOrCall($,I){if($?.then&&typeof $.then==="function")return $.then(()=>I());return I()}_chainOrCallHooks($,I){let U=$,_=[];if(this._getCommandAndAncestors().reverse().filter((u)=>u._lifeCycleHooks[I]!==void 0).forEach((u)=>{u._lifeCycleHooks[I].forEach((g)=>{_.push({hookedCommand:u,callback:g})})}),I==="postAction")_.reverse();return _.forEach((u)=>{U=this._chainOrCall(U,()=>{return u.callback(u.hookedCommand,this)})}),U}_chainOrCallSubCommandHook($,I,U){let _=$;if(this._lifeCycleHooks[U]!==void 0)this._lifeCycleHooks[U].forEach((u)=>{_=this._chainOrCall(_,()=>{return u(this,I)})});return _}_parseCommand($,I){let U=this.parseOptions(I);if(this._parseOptionsEnv(),this._parseOptionsImplied(),$=$.concat(U.operands),I=U.unknown,this.args=$.concat(I),$&&this._findCommand($[0]))return this._dispatchSubcommand($[0],$.slice(1),I);if(this._getHelpCommand()&&$[0]===this._getHelpCommand().name())return this._dispatchHelpCommand($[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(I),this._dispatchSubcommand(this._defaultCommandName,$,I);if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName)this.help({error:!0});this._outputHelpIfRequested(U.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let _=()=>{if(U.unknown.length>0)this.unknownOption(U.unknown[0])},u=`command:${this.name()}`;if(this._actionHandler){_(),this._processArguments();let g;if(g=this._chainOrCallHooks(g,"preAction"),g=this._chainOrCall(g,()=>this._actionHandler(this.processedArgs)),this.parent)g=this._chainOrCall(g,()=>{this.parent.emit(u,$,I)});return g=this._chainOrCallHooks(g,"postAction"),g}if(this.parent?.listenerCount(u))_(),this._processArguments(),this.parent.emit(u,$,I);else if($.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",$,I);if(this.listenerCount("command:*"))this.emit("command:*",$,I);else if(this.commands.length)this.unknownCommand();else _(),this._processArguments()}else if(this.commands.length)_(),this.help({error:!0});else _(),this._processArguments()}_findCommand($){if(!$)return;return this.commands.find((I)=>I._name===$||I._aliases.includes($))}_findOption($){return this.options.find((I)=>I.is($))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(($)=>{$.options.forEach((I)=>{if(I.mandatory&&$.getOptionValue(I.attributeName())===void 0)$.missingMandatoryOptionValue(I)})})}_checkForConflictingLocalOptions(){let $=this.options.filter((U)=>{let _=U.attributeName();if(this.getOptionValue(_)===void 0)return!1;return this.getOptionValueSource(_)!=="default"});$.filter((U)=>U.conflictsWith.length>0).forEach((U)=>{let _=$.find((u)=>U.conflictsWith.includes(u.attributeName()));if(_)this._conflictingOption(U,_)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(($)=>{$._checkForConflictingLocalOptions()})}parseOptions($){let I=[],U=[],_=I;function u(N){return N.length>1&&N[0]==="-"}let g=(N)=>{if(!/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(N))return!1;return!this._getCommandAndAncestors().some((X)=>X.options.map((G)=>G.short).some((G)=>/^-\d$/.test(G)))},z=null,v=null,J=0;while(J<$.length||v){let N=v??$[J++];if(v=null,N==="--"){if(_===U)_.push(N);_.push(...$.slice(J));break}if(z&&(!u(N)||g(N))){this.emit(`option:${z.name()}`,N);continue}if(z=null,u(N)){let X=this._findOption(N);if(X){if(X.required){let G=$[J++];if(G===void 0)this.optionMissingArgument(X);this.emit(`option:${X.name()}`,G)}else if(X.optional){let G=null;if(J<$.length&&(!u($[J])||g($[J])))G=$[J++];this.emit(`option:${X.name()}`,G)}else this.emit(`option:${X.name()}`);z=X.variadic?X:null;continue}}if(N.length>2&&N[0]==="-"&&N[1]!=="-"){let X=this._findOption(`-${N[1]}`);if(X){if(X.required||X.optional&&this._combineFlagAndOptionalValue)this.emit(`option:${X.name()}`,N.slice(2));else this.emit(`option:${X.name()}`),v=`-${N.slice(2)}`;continue}}if(/^--[^=]+=/.test(N)){let X=N.indexOf("="),G=this._findOption(N.slice(0,X));if(G&&(G.required||G.optional)){this.emit(`option:${G.name()}`,N.slice(X+1));continue}}if(_===I&&u(N)&&!(this.commands.length===0&&g(N)))_=U;if((this._enablePositionalOptions||this._passThroughOptions)&&I.length===0&&U.length===0){if(this._findCommand(N)){I.push(N),U.push(...$.slice(J));break}else if(this._getHelpCommand()&&N===this._getHelpCommand().name()){I.push(N,...$.slice(J));break}else if(this._defaultCommandName){U.push(N,...$.slice(J));break}}if(this._passThroughOptions){_.push(N,...$.slice(J));break}_.push(N)}return{operands:I,unknown:U}}opts(){if(this._storeOptionsAsProperties){let $={},I=this.options.length;for(let U=0;U<I;U++){let _=this.options[U].attributeName();$[_]=_===this._versionOptionName?this._version:this[_]}return $}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce(($,I)=>Object.assign($,I.opts()),{})}error($,I){if(this._outputConfiguration.outputError(`${$}
21
+ - ${_}`;throw Error(u)}_executeSubCommand($,I){I=I.slice();let U=!1,_=[".js",".ts",".tsx",".mjs",".cjs"];function u(N,X){let G=c4.resolve(N,X);if(vu.existsSync(G))return G;if(_.includes(c4.extname(X)))return;let q=_.find((T)=>vu.existsSync(`${G}${T}`));if(q)return`${G}${q}`;return}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let z=$._executableFile||`${this._name}-${$._name}`,g=this._executableDir||"";if(this._scriptPath){let N;try{N=vu.realpathSync(this._scriptPath)}catch{N=this._scriptPath}g=c4.resolve(c4.dirname(N),g)}if(g){let N=u(g,z);if(!N&&!$._executableFile&&this._scriptPath){let X=c4.basename(this._scriptPath,c4.extname(this._scriptPath));if(X!==this._name)N=u(g,`${X}-${$._name}`)}z=N||z}U=_.includes(c4.extname(z));let v;if(U$.platform!=="win32")if(U)I.unshift(z),I=zX(U$.execArgv).concat(I),v=l2.spawn(U$.argv[0],I,{stdio:"inherit"});else v=l2.spawn(z,I,{stdio:"inherit"});else this._checkForMissingExecutable(z,g,$._name),I.unshift(z),I=zX(U$.execArgv).concat(I),v=l2.spawn(U$.execPath,I,{stdio:"inherit"});if(!v.killed)["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((X)=>{U$.on(X,()=>{if(v.killed===!1&&v.exitCode===null)v.kill(X)})});let J=this._exitCallback;v.on("close",(N)=>{if(N=N??1,!J)U$.exit(N);else J(new m2(N,"commander.executeSubCommandAsync","(close)"))}),v.on("error",(N)=>{if(N.code==="ENOENT")this._checkForMissingExecutable(z,g,$._name);else if(N.code==="EACCES")throw Error(`'${z}' not executable`);if(!J)U$.exit(1);else{let X=new m2(1,"commander.executeSubCommandAsync","(error)");X.nestedError=N,J(X)}}),this.runningCommand=v}_dispatchSubcommand($,I,U){let _=this._findCommand($);if(!_)this.help({error:!0});_._prepareForParse();let u;return u=this._chainOrCallSubCommandHook(u,_,"preSubcommand"),u=this._chainOrCall(u,()=>{if(_._executableHandler)this._executeSubCommand(_,I.concat(U));else return _._parseCommand(I,U)}),u}_dispatchHelpCommand($){if(!$)this.help();let I=this._findCommand($);if(I&&!I._executableHandler)I.help();return this._dispatchSubcommand($,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){if(this.registeredArguments.forEach(($,I)=>{if($.required&&this.args[I]==null)this.missingArgument($.name())}),this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)return;if(this.args.length>this.registeredArguments.length)this._excessArguments(this.args)}_processArguments(){let $=(U,_,u)=>{let z=_;if(_!==null&&U.parseArg){let g=`error: command-argument value '${_}' is invalid for argument '${U.name()}'.`;z=this._callParseArg(U,_,u,g)}return z};this._checkNumberOfArguments();let I=[];this.registeredArguments.forEach((U,_)=>{let u=U.defaultValue;if(U.variadic){if(_<this.args.length){if(u=this.args.slice(_),U.parseArg)u=u.reduce((z,g)=>{return $(U,g,z)},U.defaultValue)}else if(u===void 0)u=[]}else if(_<this.args.length){if(u=this.args[_],U.parseArg)u=$(U,u,U.defaultValue)}I[_]=u}),this.processedArgs=I}_chainOrCall($,I){if($?.then&&typeof $.then==="function")return $.then(()=>I());return I()}_chainOrCallHooks($,I){let U=$,_=[];if(this._getCommandAndAncestors().reverse().filter((u)=>u._lifeCycleHooks[I]!==void 0).forEach((u)=>{u._lifeCycleHooks[I].forEach((z)=>{_.push({hookedCommand:u,callback:z})})}),I==="postAction")_.reverse();return _.forEach((u)=>{U=this._chainOrCall(U,()=>{return u.callback(u.hookedCommand,this)})}),U}_chainOrCallSubCommandHook($,I,U){let _=$;if(this._lifeCycleHooks[U]!==void 0)this._lifeCycleHooks[U].forEach((u)=>{_=this._chainOrCall(_,()=>{return u(this,I)})});return _}_parseCommand($,I){let U=this.parseOptions(I);if(this._parseOptionsEnv(),this._parseOptionsImplied(),$=$.concat(U.operands),I=U.unknown,this.args=$.concat(I),$&&this._findCommand($[0]))return this._dispatchSubcommand($[0],$.slice(1),I);if(this._getHelpCommand()&&$[0]===this._getHelpCommand().name())return this._dispatchHelpCommand($[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(I),this._dispatchSubcommand(this._defaultCommandName,$,I);if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName)this.help({error:!0});this._outputHelpIfRequested(U.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let _=()=>{if(U.unknown.length>0)this.unknownOption(U.unknown[0])},u=`command:${this.name()}`;if(this._actionHandler){_(),this._processArguments();let z;if(z=this._chainOrCallHooks(z,"preAction"),z=this._chainOrCall(z,()=>this._actionHandler(this.processedArgs)),this.parent)z=this._chainOrCall(z,()=>{this.parent.emit(u,$,I)});return z=this._chainOrCallHooks(z,"postAction"),z}if(this.parent?.listenerCount(u))_(),this._processArguments(),this.parent.emit(u,$,I);else if($.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",$,I);if(this.listenerCount("command:*"))this.emit("command:*",$,I);else if(this.commands.length)this.unknownCommand();else _(),this._processArguments()}else if(this.commands.length)_(),this.help({error:!0});else _(),this._processArguments()}_findCommand($){if(!$)return;return this.commands.find((I)=>I._name===$||I._aliases.includes($))}_findOption($){return this.options.find((I)=>I.is($))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(($)=>{$.options.forEach((I)=>{if(I.mandatory&&$.getOptionValue(I.attributeName())===void 0)$.missingMandatoryOptionValue(I)})})}_checkForConflictingLocalOptions(){let $=this.options.filter((U)=>{let _=U.attributeName();if(this.getOptionValue(_)===void 0)return!1;return this.getOptionValueSource(_)!=="default"});$.filter((U)=>U.conflictsWith.length>0).forEach((U)=>{let _=$.find((u)=>U.conflictsWith.includes(u.attributeName()));if(_)this._conflictingOption(U,_)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(($)=>{$._checkForConflictingLocalOptions()})}parseOptions($){let I=[],U=[],_=I;function u(N){return N.length>1&&N[0]==="-"}let z=(N)=>{if(!/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(N))return!1;return!this._getCommandAndAncestors().some((X)=>X.options.map((G)=>G.short).some((G)=>/^-\d$/.test(G)))},g=null,v=null,J=0;while(J<$.length||v){let N=v??$[J++];if(v=null,N==="--"){if(_===U)_.push(N);_.push(...$.slice(J));break}if(g&&(!u(N)||z(N))){this.emit(`option:${g.name()}`,N);continue}if(g=null,u(N)){let X=this._findOption(N);if(X){if(X.required){let G=$[J++];if(G===void 0)this.optionMissingArgument(X);this.emit(`option:${X.name()}`,G)}else if(X.optional){let G=null;if(J<$.length&&(!u($[J])||z($[J])))G=$[J++];this.emit(`option:${X.name()}`,G)}else this.emit(`option:${X.name()}`);g=X.variadic?X:null;continue}}if(N.length>2&&N[0]==="-"&&N[1]!=="-"){let X=this._findOption(`-${N[1]}`);if(X){if(X.required||X.optional&&this._combineFlagAndOptionalValue)this.emit(`option:${X.name()}`,N.slice(2));else this.emit(`option:${X.name()}`),v=`-${N.slice(2)}`;continue}}if(/^--[^=]+=/.test(N)){let X=N.indexOf("="),G=this._findOption(N.slice(0,X));if(G&&(G.required||G.optional)){this.emit(`option:${G.name()}`,N.slice(X+1));continue}}if(_===I&&u(N)&&!(this.commands.length===0&&z(N)))_=U;if((this._enablePositionalOptions||this._passThroughOptions)&&I.length===0&&U.length===0){if(this._findCommand(N)){I.push(N),U.push(...$.slice(J));break}else if(this._getHelpCommand()&&N===this._getHelpCommand().name()){I.push(N,...$.slice(J));break}else if(this._defaultCommandName){U.push(N,...$.slice(J));break}}if(this._passThroughOptions){_.push(N,...$.slice(J));break}_.push(N)}return{operands:I,unknown:U}}opts(){if(this._storeOptionsAsProperties){let $={},I=this.options.length;for(let U=0;U<I;U++){let _=this.options[U].attributeName();$[_]=_===this._versionOptionName?this._version:this[_]}return $}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce(($,I)=>Object.assign($,I.opts()),{})}error($,I){if(this._outputConfiguration.outputError(`${$}
22
22
  `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError==="string")this._outputConfiguration.writeErr(`${this._showHelpAfterError}
23
23
  `);else if(this._showHelpAfterError)this._outputConfiguration.writeErr(`
24
- `),this.outputHelp({error:!0});let U=I||{},_=U.exitCode||1,u=U.code||"commander.error";this._exit(_,u,$)}_parseOptionsEnv(){this.options.forEach(($)=>{if($.envVar&&$.envVar in U$.env){let I=$.attributeName();if(this.getOptionValue(I)===void 0||["default","config","env"].includes(this.getOptionValueSource(I)))if($.required||$.optional)this.emit(`optionEnv:${$.name()}`,U$.env[$.envVar]);else this.emit(`optionEnv:${$.name()}`)}})}_parseOptionsImplied(){let $=new BV(this.options),I=(U)=>{return this.getOptionValue(U)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(U))};this.options.filter((U)=>U.implied!==void 0&&I(U.attributeName())&&$.valueFromOption(this.getOptionValue(U.attributeName()),U)).forEach((U)=>{Object.keys(U.implied).filter((_)=>!I(_)).forEach((_)=>{this.setOptionValueWithSource(_,U.implied[_],"implied")})})}missingArgument($){let I=`error: missing required argument '${$}'`;this.error(I,{code:"commander.missingArgument"})}optionMissingArgument($){let I=`error: option '${$.flags}' argument missing`;this.error(I,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue($){let I=`error: required option '${$.flags}' not specified`;this.error(I,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption($,I){let U=(g)=>{let z=g.attributeName(),v=this.getOptionValue(z),J=this.options.find((X)=>X.negate&&z===X.attributeName()),N=this.options.find((X)=>!X.negate&&z===X.attributeName());if(J&&(J.presetArg===void 0&&v===!1||J.presetArg!==void 0&&v===J.presetArg))return J;return N||g},_=(g)=>{let z=U(g),v=z.attributeName();if(this.getOptionValueSource(v)==="env")return`environment variable '${z.envVar}'`;return`option '${z.flags}'`},u=`error: ${_($)} cannot be used with ${_(I)}`;this.error(u,{code:"commander.conflictingOption"})}unknownOption($){if(this._allowUnknownOption)return;let I="";if($.startsWith("--")&&this._showSuggestionAfterError){let _=[],u=this;do{let g=u.createHelp().visibleOptions(u).filter((z)=>z.long).map((z)=>z.long);_=_.concat(g),u=u.parent}while(u&&!u._enablePositionalOptions);I=_X($,_)}let U=`error: unknown option '${$}'${I}`;this.error(U,{code:"commander.unknownOption"})}_excessArguments($){if(this._allowExcessArguments)return;let I=this.registeredArguments.length,U=I===1?"":"s",u=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${I} argument${U} but got ${$.length}.`;this.error(u,{code:"commander.excessArguments"})}unknownCommand(){let $=this.args[0],I="";if(this._showSuggestionAfterError){let _=[];this.createHelp().visibleCommands(this).forEach((u)=>{if(_.push(u.name()),u.alias())_.push(u.alias())}),I=_X($,_)}let U=`error: unknown command '${$}'${I}`;this.error(U,{code:"commander.unknownCommand"})}version($,I,U){if($===void 0)return this._version;this._version=$,I=I||"-V, --version",U=U||"output the version number";let _=this.createOption(I,U);return this._versionOptionName=_.attributeName(),this._registerOption(_),this.on("option:"+_.name(),()=>{this._outputConfiguration.writeOut(`${$}
25
- `),this._exit(0,"commander.version",$)}),this}description($,I){if($===void 0&&I===void 0)return this._description;if(this._description=$,I)this._argsDescription=I;return this}summary($){if($===void 0)return this._summary;return this._summary=$,this}alias($){if($===void 0)return this._aliases[0];let I=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler)I=this.commands[this.commands.length-1];if($===I._name)throw Error("Command alias can't be the same as its name");let U=this.parent?._findCommand($);if(U){let _=[U.name()].concat(U.aliases()).join("|");throw Error(`cannot add alias '${$}' to command '${this.name()}' as already have command '${_}'`)}return I._aliases.push($),this}aliases($){if($===void 0)return this._aliases;return $.forEach((I)=>this.alias(I)),this}usage($){if($===void 0){if(this._usage)return this._usage;let I=this.registeredArguments.map((U)=>{return YV(U)});return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?I:[]).join(" ")}return this._usage=$,this}name($){if($===void 0)return this._name;return this._name=$,this}helpGroup($){if($===void 0)return this._helpGroupHeading??"";return this._helpGroupHeading=$,this}commandsGroup($){if($===void 0)return this._defaultCommandGroup??"";return this._defaultCommandGroup=$,this}optionsGroup($){if($===void 0)return this._defaultOptionGroup??"";return this._defaultOptionGroup=$,this}_initOptionGroup($){if(this._defaultOptionGroup&&!$.helpGroupHeading)$.helpGroup(this._defaultOptionGroup)}_initCommandGroup($){if(this._defaultCommandGroup&&!$.helpGroup())$.helpGroup(this._defaultCommandGroup)}nameFromFilename($){return this._name=c4.basename($,c4.extname($)),this}executableDir($){if($===void 0)return this._executableDir;return this._executableDir=$,this}helpInformation($){let I=this.createHelp(),U=this._getOutputContext($);I.prepareContext({error:U.error,helpWidth:U.helpWidth,outputHasColors:U.hasColors});let _=I.formatHelp(this,I);if(U.hasColors)return _;return this._outputConfiguration.stripColor(_)}_getOutputContext($){$=$||{};let I=!!$.error,U,_,u;if(I)U=(z)=>this._outputConfiguration.writeErr(z),_=this._outputConfiguration.getErrHasColors(),u=this._outputConfiguration.getErrHelpWidth();else U=(z)=>this._outputConfiguration.writeOut(z),_=this._outputConfiguration.getOutHasColors(),u=this._outputConfiguration.getOutHelpWidth();return{error:I,write:(z)=>{if(!_)z=this._outputConfiguration.stripColor(z);return U(z)},hasColors:_,helpWidth:u}}outputHelp($){let I;if(typeof $==="function")I=$,$=void 0;let U=this._getOutputContext($),_={error:U.error,write:U.write,command:this};this._getCommandAndAncestors().reverse().forEach((g)=>g.emit("beforeAllHelp",_)),this.emit("beforeHelp",_);let u=this.helpInformation({error:U.error});if(I){if(u=I(u),typeof u!=="string"&&!Buffer.isBuffer(u))throw Error("outputHelp callback must return a string or a Buffer")}if(U.write(u),this._getHelpOption()?.long)this.emit(this._getHelpOption().long);this.emit("afterHelp",_),this._getCommandAndAncestors().forEach((g)=>g.emit("afterAllHelp",_))}helpOption($,I){if(typeof $==="boolean"){if($){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($??"-h, --help",I??"display help for command"),$||I)this._initOptionGroup(this._helpOption);return this}_getHelpOption(){if(this._helpOption===void 0)this.helpOption(void 0,void 0);return this._helpOption}addHelpOption($){return this._helpOption=$,this._initOptionGroup($),this}help($){this.outputHelp($);let I=Number(U$.exitCode??0);if(I===0&&$&&typeof $!=="function"&&$.error)I=1;this._exit(I,"commander.help","(outputHelp)")}addHelpText($,I){let U=["beforeAll","before","after","afterAll"];if(!U.includes($))throw Error(`Unexpected value for position to addHelpText.
26
- Expecting one of '${U.join("', '")}'`);let _=`${$}Help`;return this.on(_,(u)=>{let g;if(typeof I==="function")g=I({error:u.error,command:u.command});else g=I;if(g)u.write(`${g}
27
- `)}),this}_outputHelpIfRequested($){let I=this._getHelpOption();if(I&&$.find((_)=>I.is(_)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function gX($){return $.map((I)=>{if(!I.startsWith("--inspect"))return I;let U,_="127.0.0.1",u="9229",g;if((g=I.match(/^(--inspect(-brk)?)$/))!==null)U=g[1];else if((g=I.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(U=g[1],/^\d+$/.test(g[3]))u=g[3];else _=g[3];else if((g=I.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)U=g[1],_=g[3],u=g[4];if(U&&u!=="0")return`${U}=${_}:${parseInt(u)+1}`;return I})}function l2(){if(U$.env.NO_COLOR||U$.env.FORCE_COLOR==="0"||U$.env.FORCE_COLOR==="false")return!1;if(U$.env.FORCE_COLOR||U$.env.CLICOLOR_FORCE!==void 0)return!0;return}DV.Command=m2;DV.useColor=l2});var GX=E((WV)=>{var{Argument:vX}=gu(),{Command:h2}=zX(),{CommanderError:LV,InvalidArgumentError:JX}=WI(),{Help:RV}=y2(),{Option:NX}=i2();WV.program=new h2;WV.createCommand=($)=>new h2($);WV.createOption=($,I)=>new NX($,I);WV.createArgument=($,I)=>new vX($,I);WV.Command=h2;WV.Option=NX;WV.Argument=vX;WV.Help=RV;WV.CommanderError=LV;WV.InvalidArgumentError=JX;WV.InvalidOptionArgumentError=JX});var b$=E((Tx,d2)=>{var Ju=process||{},qX=Ju.argv||[],vu=Ju.env||{},xV=!(!!vu.NO_COLOR||qX.includes("--no-color"))&&(!!vu.FORCE_COLOR||qX.includes("--color")||Ju.platform==="win32"||(Ju.stdout||{}).isTTY&&vu.TERM!=="dumb"||!!vu.CI),kV=($,I,U=$)=>(_)=>{let u=""+_,g=u.indexOf(I,$.length);return~g?$+yV(u,I,U,g)+I:$+u+I},yV=($,I,U,_)=>{let u="",g=0;do u+=$.substring(g,_)+U,g=_+I.length,_=$.indexOf(I,g);while(~_);return u+$.substring(g)},QX=($=xV)=>{let I=$?kV:()=>String;return{isColorSupported:$,reset:I("\x1B[0m","\x1B[0m"),bold:I("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:I("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:I("\x1B[3m","\x1B[23m"),underline:I("\x1B[4m","\x1B[24m"),inverse:I("\x1B[7m","\x1B[27m"),hidden:I("\x1B[8m","\x1B[28m"),strikethrough:I("\x1B[9m","\x1B[29m"),black:I("\x1B[30m","\x1B[39m"),red:I("\x1B[31m","\x1B[39m"),green:I("\x1B[32m","\x1B[39m"),yellow:I("\x1B[33m","\x1B[39m"),blue:I("\x1B[34m","\x1B[39m"),magenta:I("\x1B[35m","\x1B[39m"),cyan:I("\x1B[36m","\x1B[39m"),white:I("\x1B[37m","\x1B[39m"),gray:I("\x1B[90m","\x1B[39m"),bgBlack:I("\x1B[40m","\x1B[49m"),bgRed:I("\x1B[41m","\x1B[49m"),bgGreen:I("\x1B[42m","\x1B[49m"),bgYellow:I("\x1B[43m","\x1B[49m"),bgBlue:I("\x1B[44m","\x1B[49m"),bgMagenta:I("\x1B[45m","\x1B[49m"),bgCyan:I("\x1B[46m","\x1B[49m"),bgWhite:I("\x1B[47m","\x1B[49m"),blackBright:I("\x1B[90m","\x1B[39m"),redBright:I("\x1B[91m","\x1B[39m"),greenBright:I("\x1B[92m","\x1B[39m"),yellowBright:I("\x1B[93m","\x1B[39m"),blueBright:I("\x1B[94m","\x1B[39m"),magentaBright:I("\x1B[95m","\x1B[39m"),cyanBright:I("\x1B[96m","\x1B[39m"),whiteBright:I("\x1B[97m","\x1B[39m"),bgBlackBright:I("\x1B[100m","\x1B[49m"),bgRedBright:I("\x1B[101m","\x1B[49m"),bgGreenBright:I("\x1B[102m","\x1B[49m"),bgYellowBright:I("\x1B[103m","\x1B[49m"),bgBlueBright:I("\x1B[104m","\x1B[49m"),bgMagentaBright:I("\x1B[105m","\x1B[49m"),bgCyanBright:I("\x1B[106m","\x1B[49m"),bgWhiteBright:I("\x1B[107m","\x1B[49m")}};d2.exports=QX();d2.exports.createColors=QX});var $$=E((dV)=>{var p2=Symbol.for("yaml.alias"),TX=Symbol.for("yaml.document"),Nu=Symbol.for("yaml.map"),HX=Symbol.for("yaml.pair"),o2=Symbol.for("yaml.scalar"),Gu=Symbol.for("yaml.seq"),d4=Symbol.for("yaml.node.type"),iV=($)=>!!$&&typeof $==="object"&&$[d4]===p2,nV=($)=>!!$&&typeof $==="object"&&$[d4]===TX,rV=($)=>!!$&&typeof $==="object"&&$[d4]===Nu,lV=($)=>!!$&&typeof $==="object"&&$[d4]===HX,YX=($)=>!!$&&typeof $==="object"&&$[d4]===o2,mV=($)=>!!$&&typeof $==="object"&&$[d4]===Gu;function OX($){if($&&typeof $==="object")switch($[d4]){case Nu:case Gu:return!0}return!1}function hV($){if($&&typeof $==="object")switch($[d4]){case p2:case Nu:case o2:case Gu:return!0}return!1}var cV=($)=>(YX($)||OX($))&&!!$.anchor;dV.ALIAS=p2;dV.DOC=TX;dV.MAP=Nu;dV.NODE_TYPE=d4;dV.PAIR=HX;dV.SCALAR=o2;dV.SEQ=Gu;dV.hasAnchor=cV;dV.isAlias=iV;dV.isCollection=OX;dV.isDocument=nV;dV.isMap=rV;dV.isNode=hV;dV.isPair=lV;dV.isScalar=YX;dV.isSeq=mV});var PI=E((GB)=>{var Z$=$$(),a$=Symbol("break visit"),VX=Symbol("skip children"),w4=Symbol("remove node");function Xu($,I){let U=BX(I);if(Z$.isDocument($)){if(K1(null,$.contents,U,Object.freeze([$]))===w4)$.contents=null}else K1(null,$,U,Object.freeze([]))}Xu.BREAK=a$;Xu.SKIP=VX;Xu.REMOVE=w4;function K1($,I,U,_){let u=DX($,I,U,_);if(Z$.isNode(u)||Z$.isPair(u))return MX($,_,u),K1($,u,U,_);if(typeof u!=="symbol"){if(Z$.isCollection(I)){_=Object.freeze(_.concat(I));for(let g=0;g<I.items.length;++g){let z=K1(g,I.items[g],U,_);if(typeof z==="number")g=z-1;else if(z===a$)return a$;else if(z===w4)I.items.splice(g,1),g-=1}}else if(Z$.isPair(I)){_=Object.freeze(_.concat(I));let g=K1("key",I.key,U,_);if(g===a$)return a$;else if(g===w4)I.key=null;let z=K1("value",I.value,U,_);if(z===a$)return a$;else if(z===w4)I.value=null}}return u}async function qu($,I){let U=BX(I);if(Z$.isDocument($)){if(await L1(null,$.contents,U,Object.freeze([$]))===w4)$.contents=null}else await L1(null,$,U,Object.freeze([]))}qu.BREAK=a$;qu.SKIP=VX;qu.REMOVE=w4;async function L1($,I,U,_){let u=await DX($,I,U,_);if(Z$.isNode(u)||Z$.isPair(u))return MX($,_,u),L1($,u,U,_);if(typeof u!=="symbol"){if(Z$.isCollection(I)){_=Object.freeze(_.concat(I));for(let g=0;g<I.items.length;++g){let z=await L1(g,I.items[g],U,_);if(typeof z==="number")g=z-1;else if(z===a$)return a$;else if(z===w4)I.items.splice(g,1),g-=1}}else if(Z$.isPair(I)){_=Object.freeze(_.concat(I));let g=await L1("key",I.key,U,_);if(g===a$)return a$;else if(g===w4)I.key=null;let z=await L1("value",I.value,U,_);if(z===a$)return a$;else if(z===w4)I.value=null}}return u}function BX($){if(typeof $==="object"&&($.Collection||$.Node||$.Value))return Object.assign({Alias:$.Node,Map:$.Node,Scalar:$.Node,Seq:$.Node},$.Value&&{Map:$.Value,Scalar:$.Value,Seq:$.Value},$.Collection&&{Map:$.Collection,Seq:$.Collection},$);return $}function DX($,I,U,_){if(typeof U==="function")return U($,I,_);if(Z$.isMap(I))return U.Map?.($,I,_);if(Z$.isSeq(I))return U.Seq?.($,I,_);if(Z$.isPair(I))return U.Pair?.($,I,_);if(Z$.isScalar(I))return U.Scalar?.($,I,_);if(Z$.isAlias(I))return U.Alias?.($,I,_);return}function MX($,I,U){let _=I[I.length-1];if(Z$.isCollection(_))_.items[$]=U;else if(Z$.isPair(_))if($==="key")_.key=U;else _.value=U;else if(Z$.isDocument(_))_.contents=U;else{let u=Z$.isAlias(_)?"alias":"scalar";throw Error(`Cannot replace node with ${u} parent`)}}GB.visit=Xu;GB.visitAsync=qu});var t2=E((YB)=>{var KX=$$(),QB=PI(),TB={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},HB=($)=>$.replace(/[!,[\]{}]/g,(I)=>TB[I]);class q4{constructor($,I){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},q4.defaultYaml,$),this.tags=Object.assign({},q4.defaultTags,I)}clone(){let $=new q4(this.yaml,this.tags);return $.docStart=this.docStart,$}atDocument(){let $=new q4(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:q4.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},q4.defaultTags);break}return $}add($,I){if(this.atNextDocument)this.yaml={explicit:q4.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},q4.defaultTags),this.atNextDocument=!1;let U=$.trim().split(/[ \t]+/),_=U.shift();switch(_){case"%TAG":{if(U.length!==2){if(I(0,"%TAG directive should contain exactly two parts"),U.length<2)return!1}let[u,g]=U;return this.tags[u]=g,!0}case"%YAML":{if(this.yaml.explicit=!0,U.length!==1)return I(0,"%YAML directive should contain exactly one part"),!1;let[u]=U;if(u==="1.1"||u==="1.2")return this.yaml.version=u,!0;else{let g=/^\d+\.\d+$/.test(u);return I(6,`Unsupported YAML version ${u}`,g),!1}}default:return I(0,`Unknown directive ${_}`,!0),!1}}tagName($,I){if($==="!")return"!";if($[0]!=="!")return I(`Not a valid tag: ${$}`),null;if($[1]==="<"){let g=$.slice(2,-1);if(g==="!"||g==="!!")return I(`Verbatim tags aren't resolved, so ${$} is invalid.`),null;if($[$.length-1]!==">")I("Verbatim tags must end with a >");return g}let[,U,_]=$.match(/^(.*!)([^!]*)$/s);if(!_)I(`The ${$} tag has no suffix`);let u=this.tags[U];if(u)try{return u+decodeURIComponent(_)}catch(g){return I(String(g)),null}if(U==="!")return $;return I(`Could not resolve tag: ${$}`),null}tagString($){for(let[I,U]of Object.entries(this.tags))if($.startsWith(U))return I+HB($.substring(U.length));return $[0]==="!"?$:`!<${$}>`}toString($){let I=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],U=Object.entries(this.tags),_;if($&&U.length>0&&KX.isNode($.contents)){let u={};QB.visit($.contents,(g,z)=>{if(KX.isNode(z)&&z.tag)u[z.tag]=!0}),_=Object.keys(u)}else _=[];for(let[u,g]of U){if(u==="!!"&&g==="tag:yaml.org,2002:")continue;if(!$||_.some((z)=>z.startsWith(g)))I.push(`%TAG ${u} ${g}`)}return I.join(`
28
- `)}}q4.defaultYaml={explicit:!1,version:"1.2"};q4.defaultTags={"!!":"tag:yaml.org,2002:"};YB.Directives=q4});var Qu=E((MB)=>{var LX=$$(),VB=PI();function BB($){if(/[\x00-\x19\s,[\]{}]/.test($)){let U=`Anchor must not contain whitespace or control characters: ${JSON.stringify($)}`;throw Error(U)}return!0}function RX($){let I=new Set;return VB.visit($,{Value(U,_){if(_.anchor)I.add(_.anchor)}}),I}function WX($,I){for(let U=1;;++U){let _=`${$}${U}`;if(!I.has(_))return _}}function DB($,I){let U=[],_=new Map,u=null;return{onAnchor:(g)=>{U.push(g),u??(u=RX($));let z=WX(I,u);return u.add(z),z},setAnchors:()=>{for(let g of U){let z=_.get(g);if(typeof z==="object"&&z.anchor&&(LX.isScalar(z.node)||LX.isCollection(z.node)))z.node.anchor=z.anchor;else{let v=Error("Failed to resolve repeated object (this should not happen)");throw v.source=g,v}}},sourceObjects:_}}MB.anchorIsValid=BB;MB.anchorNames=RX;MB.createNodeAnchors=DB;MB.findNewAnchor=WX});var a2=E((PB)=>{function ZI($,I,U,_){if(_&&typeof _==="object")if(Array.isArray(_))for(let u=0,g=_.length;u<g;++u){let z=_[u],v=ZI($,_,String(u),z);if(v===void 0)delete _[u];else if(v!==z)_[u]=v}else if(_ instanceof Map)for(let u of Array.from(_.keys())){let g=_.get(u),z=ZI($,_,u,g);if(z===void 0)_.delete(u);else if(z!==g)_.set(u,z)}else if(_ instanceof Set)for(let u of Array.from(_)){let g=ZI($,_,u,u);if(g===void 0)_.delete(u);else if(g!==u)_.delete(u),_.add(g)}else for(let[u,g]of Object.entries(_)){let z=ZI($,_,u,g);if(z===void 0)delete _[u];else if(z!==g)_[u]=z}return $.call(I,U,_)}PB.applyReviver=ZI});var N6=E((bB)=>{var AB=$$();function PX($,I,U){if(Array.isArray($))return $.map((_,u)=>PX(_,String(u),U));if($&&typeof $.toJSON==="function"){if(!U||!AB.hasAnchor($))return $.toJSON(I,U);let _={aliasCount:0,count:1,res:void 0};U.anchors.set($,_),U.onCreate=(g)=>{_.res=g,delete U.onCreate};let u=$.toJSON(I,U);if(U.onCreate)U.onCreate(u);return u}if(typeof $==="bigint"&&!U?.keep)return Number($);return $}bB.toJS=PX});var Tu=E((wB)=>{var FB=a2(),ZX=$$(),SB=N6();class AX{constructor($){Object.defineProperty(this,ZX.NODE_TYPE,{value:$})}clone(){let $=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)$.range=this.range.slice();return $}toJS($,{mapAsMap:I,maxAliasCount:U,onAnchor:_,reviver:u}={}){if(!ZX.isDocument($))throw TypeError("A document argument is required");let g={anchors:new Map,doc:$,keep:!0,mapAsMap:I===!0,mapKeyWarned:!1,maxAliasCount:typeof U==="number"?U:100},z=SB.toJS(this,"",g);if(typeof _==="function")for(let{count:v,res:J}of g.anchors.values())_(J,v);return typeof u==="function"?FB.applyReviver(u,{"":z},"",z):z}}wB.NodeBase=AX});var AI=E((yB)=>{var CB=Qu(),fB=PI(),R1=$$(),xB=Tu(),kB=N6();class bX extends xB.NodeBase{constructor($){super(R1.ALIAS);this.source=$,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve($,I){let U;if(I?.aliasResolveCache)U=I.aliasResolveCache;else if(U=[],fB.visit($,{Node:(u,g)=>{if(R1.isAlias(g)||R1.hasAnchor(g))U.push(g)}}),I)I.aliasResolveCache=U;let _=void 0;for(let u of U){if(u===this)break;if(u.anchor===this.source)_=u}return _}toJSON($,I){if(!I)return{source:this.source};let{anchors:U,doc:_,maxAliasCount:u}=I,g=this.resolve(_,I);if(!g){let v=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(v)}let z=U.get(g);if(!z)kB.toJS(g,null,I),z=U.get(g);if(z?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(u>=0){if(z.count+=1,z.aliasCount===0)z.aliasCount=Hu(_,g,U);if(z.count*z.aliasCount>u)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return z.res}toString($,I,U){let _=`*${this.source}`;if($){if(CB.anchorIsValid(this.source),$.options.verifyAliasOrder&&!$.anchors.has(this.source)){let u=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(u)}if($.implicitKey)return`${_} `}return _}}function Hu($,I,U){if(R1.isAlias(I)){let _=I.resolve($),u=U&&_&&U.get(_);return u?u.count*u.aliasCount:0}else if(R1.isCollection(I)){let _=0;for(let u of I.items){let g=Hu($,u,U);if(g>_)_=g}return _}else if(R1.isPair(I)){let _=Hu($,I.key,U),u=Hu($,I.value,U);return Math.max(_,u)}return 1}yB.Alias=bX});var W$=E((hB)=>{var nB=$$(),rB=Tu(),lB=N6(),mB=($)=>!$||typeof $!=="function"&&typeof $!=="object";class y6 extends rB.NodeBase{constructor($){super(nB.SCALAR);this.value=$}toJSON($,I){return I?.keep?this.value:lB.toJS(this.value,$,I)}toString(){return String(this.value)}}y6.BLOCK_FOLDED="BLOCK_FOLDED";y6.BLOCK_LITERAL="BLOCK_LITERAL";y6.PLAIN="PLAIN";y6.QUOTE_DOUBLE="QUOTE_DOUBLE";y6.QUOTE_SINGLE="QUOTE_SINGLE";hB.Scalar=y6;hB.isScalarValue=mB});var bI=E((eB)=>{var pB=AI(),i6=$$(),jX=W$(),oB="tag:yaml.org,2002:";function tB($,I,U){if(I){let _=U.filter((g)=>g.tag===I),u=_.find((g)=>!g.format)??_[0];if(!u)throw Error(`Tag ${I} not found`);return u}return U.find((_)=>_.identify?.($)&&!_.format)}function aB($,I,U){if(i6.isDocument($))$=$.contents;if(i6.isNode($))return $;if(i6.isPair($)){let G=U.schema[i6.MAP].createNode?.(U.schema,null,U);return G.items.push($),G}if($ instanceof String||$ instanceof Number||$ instanceof Boolean||typeof BigInt<"u"&&$ instanceof BigInt)$=$.valueOf();let{aliasDuplicateObjects:_,onAnchor:u,onTagObj:g,schema:z,sourceObjects:v}=U,J=void 0;if(_&&$&&typeof $==="object")if(J=v.get($),J)return J.anchor??(J.anchor=u($)),new pB.Alias(J.anchor);else J={anchor:null,node:null},v.set($,J);if(I?.startsWith("!!"))I=oB+I.slice(2);let N=tB($,I,z.tags);if(!N){if($&&typeof $.toJSON==="function")$=$.toJSON();if(!$||typeof $!=="object"){let G=new jX.Scalar($);if(J)J.node=G;return G}N=$ instanceof Map?z[i6.MAP]:(Symbol.iterator in Object($))?z[i6.SEQ]:z[i6.MAP]}if(g)g(N),delete U.onTagObj;let X=N?.createNode?N.createNode(U.schema,$,U):typeof N?.nodeClass?.from==="function"?N.nodeClass.from(U.schema,$,U):new jX.Scalar($);if(I)X.tag=I;else if(!N.default)X.tag=N.tag;if(J)J.node=X;return X}eB.createNode=aB});var Yu=E((uD)=>{var $D=bI(),E4=$$(),ID=Tu();function e2($,I,U){let _=U;for(let u=I.length-1;u>=0;--u){let g=I[u];if(typeof g==="number"&&Number.isInteger(g)&&g>=0){let z=[];z[g]=_,_=z}else _=new Map([[g,_]])}return $D.createNode(_,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:$,sourceObjects:new Map})}var FX=($)=>$==null||typeof $==="object"&&!!$[Symbol.iterator]().next().done;class SX extends ID.NodeBase{constructor($,I){super($);Object.defineProperty(this,"schema",{value:I,configurable:!0,enumerable:!1,writable:!0})}clone($){let I=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if($)I.schema=$;if(I.items=I.items.map((U)=>E4.isNode(U)||E4.isPair(U)?U.clone($):U),this.range)I.range=this.range.slice();return I}addIn($,I){if(FX($))this.add(I);else{let[U,..._]=$,u=this.get(U,!0);if(E4.isCollection(u))u.addIn(_,I);else if(u===void 0&&this.schema)this.set(U,e2(this.schema,_,I));else throw Error(`Expected YAML collection at ${U}. Remaining path: ${_}`)}}deleteIn($){let[I,...U]=$;if(U.length===0)return this.delete(I);let _=this.get(I,!0);if(E4.isCollection(_))return _.deleteIn(U);else throw Error(`Expected YAML collection at ${I}. Remaining path: ${U}`)}getIn($,I){let[U,..._]=$,u=this.get(U,!0);if(_.length===0)return!I&&E4.isScalar(u)?u.value:u;else return E4.isCollection(u)?u.getIn(_,I):void 0}hasAllNullValues($){return this.items.every((I)=>{if(!E4.isPair(I))return!1;let U=I.value;return U==null||$&&E4.isScalar(U)&&U.value==null&&!U.commentBefore&&!U.comment&&!U.tag})}hasIn($){let[I,...U]=$;if(U.length===0)return this.has(I);let _=this.get(I,!0);return E4.isCollection(_)?_.hasIn(U):!1}setIn($,I){let[U,..._]=$;if(_.length===0)this.set(U,I);else{let u=this.get(U,!0);if(E4.isCollection(u))u.setIn(_,I);else if(u===void 0&&this.schema)this.set(U,e2(this.schema,_,I));else throw Error(`Expected YAML collection at ${U}. Remaining path: ${_}`)}}}uD.Collection=SX;uD.collectionFromPath=e2;uD.isEmptyPath=FX});var jI=E((JD)=>{var zD=($)=>$.replace(/^(?!$)(?: $)?/gm,"#");function s2($,I){if(/^\n+$/.test($))return $.substring(1);return I?$.replace(/^(?! *$)/gm,I):$}var vD=($,I,U)=>$.endsWith(`
29
- `)?s2(U,I):U.includes(`
24
+ `),this.outputHelp({error:!0});let U=I||{},_=U.exitCode||1,u=U.code||"commander.error";this._exit(_,u,$)}_parseOptionsEnv(){this.options.forEach(($)=>{if($.envVar&&$.envVar in U$.env){let I=$.attributeName();if(this.getOptionValue(I)===void 0||["default","config","env"].includes(this.getOptionValueSource(I)))if($.required||$.optional)this.emit(`optionEnv:${$.name()}`,U$.env[$.envVar]);else this.emit(`optionEnv:${$.name()}`)}})}_parseOptionsImplied(){let $=new MV(this.options),I=(U)=>{return this.getOptionValue(U)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(U))};this.options.filter((U)=>U.implied!==void 0&&I(U.attributeName())&&$.valueFromOption(this.getOptionValue(U.attributeName()),U)).forEach((U)=>{Object.keys(U.implied).filter((_)=>!I(_)).forEach((_)=>{this.setOptionValueWithSource(_,U.implied[_],"implied")})})}missingArgument($){let I=`error: missing required argument '${$}'`;this.error(I,{code:"commander.missingArgument"})}optionMissingArgument($){let I=`error: option '${$.flags}' argument missing`;this.error(I,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue($){let I=`error: required option '${$.flags}' not specified`;this.error(I,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption($,I){let U=(z)=>{let g=z.attributeName(),v=this.getOptionValue(g),J=this.options.find((X)=>X.negate&&g===X.attributeName()),N=this.options.find((X)=>!X.negate&&g===X.attributeName());if(J&&(J.presetArg===void 0&&v===!1||J.presetArg!==void 0&&v===J.presetArg))return J;return N||z},_=(z)=>{let g=U(z),v=g.attributeName();if(this.getOptionValueSource(v)==="env")return`environment variable '${g.envVar}'`;return`option '${g.flags}'`},u=`error: ${_($)} cannot be used with ${_(I)}`;this.error(u,{code:"commander.conflictingOption"})}unknownOption($){if(this._allowUnknownOption)return;let I="";if($.startsWith("--")&&this._showSuggestionAfterError){let _=[],u=this;do{let z=u.createHelp().visibleOptions(u).filter((g)=>g.long).map((g)=>g.long);_=_.concat(z),u=u.parent}while(u&&!u._enablePositionalOptions);I=_X($,_)}let U=`error: unknown option '${$}'${I}`;this.error(U,{code:"commander.unknownOption"})}_excessArguments($){if(this._allowExcessArguments)return;let I=this.registeredArguments.length,U=I===1?"":"s",u=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${I} argument${U} but got ${$.length}.`;this.error(u,{code:"commander.excessArguments"})}unknownCommand(){let $=this.args[0],I="";if(this._showSuggestionAfterError){let _=[];this.createHelp().visibleCommands(this).forEach((u)=>{if(_.push(u.name()),u.alias())_.push(u.alias())}),I=_X($,_)}let U=`error: unknown command '${$}'${I}`;this.error(U,{code:"commander.unknownCommand"})}version($,I,U){if($===void 0)return this._version;this._version=$,I=I||"-V, --version",U=U||"output the version number";let _=this.createOption(I,U);return this._versionOptionName=_.attributeName(),this._registerOption(_),this.on("option:"+_.name(),()=>{this._outputConfiguration.writeOut(`${$}
25
+ `),this._exit(0,"commander.version",$)}),this}description($,I){if($===void 0&&I===void 0)return this._description;if(this._description=$,I)this._argsDescription=I;return this}summary($){if($===void 0)return this._summary;return this._summary=$,this}alias($){if($===void 0)return this._aliases[0];let I=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler)I=this.commands[this.commands.length-1];if($===I._name)throw Error("Command alias can't be the same as its name");let U=this.parent?._findCommand($);if(U){let _=[U.name()].concat(U.aliases()).join("|");throw Error(`cannot add alias '${$}' to command '${this.name()}' as already have command '${_}'`)}return I._aliases.push($),this}aliases($){if($===void 0)return this._aliases;return $.forEach((I)=>this.alias(I)),this}usage($){if($===void 0){if(this._usage)return this._usage;let I=this.registeredArguments.map((U)=>{return VV(U)});return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?I:[]).join(" ")}return this._usage=$,this}name($){if($===void 0)return this._name;return this._name=$,this}helpGroup($){if($===void 0)return this._helpGroupHeading??"";return this._helpGroupHeading=$,this}commandsGroup($){if($===void 0)return this._defaultCommandGroup??"";return this._defaultCommandGroup=$,this}optionsGroup($){if($===void 0)return this._defaultOptionGroup??"";return this._defaultOptionGroup=$,this}_initOptionGroup($){if(this._defaultOptionGroup&&!$.helpGroupHeading)$.helpGroup(this._defaultOptionGroup)}_initCommandGroup($){if(this._defaultCommandGroup&&!$.helpGroup())$.helpGroup(this._defaultCommandGroup)}nameFromFilename($){return this._name=c4.basename($,c4.extname($)),this}executableDir($){if($===void 0)return this._executableDir;return this._executableDir=$,this}helpInformation($){let I=this.createHelp(),U=this._getOutputContext($);I.prepareContext({error:U.error,helpWidth:U.helpWidth,outputHasColors:U.hasColors});let _=I.formatHelp(this,I);if(U.hasColors)return _;return this._outputConfiguration.stripColor(_)}_getOutputContext($){$=$||{};let I=!!$.error,U,_,u;if(I)U=(g)=>this._outputConfiguration.writeErr(g),_=this._outputConfiguration.getErrHasColors(),u=this._outputConfiguration.getErrHelpWidth();else U=(g)=>this._outputConfiguration.writeOut(g),_=this._outputConfiguration.getOutHasColors(),u=this._outputConfiguration.getOutHelpWidth();return{error:I,write:(g)=>{if(!_)g=this._outputConfiguration.stripColor(g);return U(g)},hasColors:_,helpWidth:u}}outputHelp($){let I;if(typeof $==="function")I=$,$=void 0;let U=this._getOutputContext($),_={error:U.error,write:U.write,command:this};this._getCommandAndAncestors().reverse().forEach((z)=>z.emit("beforeAllHelp",_)),this.emit("beforeHelp",_);let u=this.helpInformation({error:U.error});if(I){if(u=I(u),typeof u!=="string"&&!Buffer.isBuffer(u))throw Error("outputHelp callback must return a string or a Buffer")}if(U.write(u),this._getHelpOption()?.long)this.emit(this._getHelpOption().long);this.emit("afterHelp",_),this._getCommandAndAncestors().forEach((z)=>z.emit("afterAllHelp",_))}helpOption($,I){if(typeof $==="boolean"){if($){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($??"-h, --help",I??"display help for command"),$||I)this._initOptionGroup(this._helpOption);return this}_getHelpOption(){if(this._helpOption===void 0)this.helpOption(void 0,void 0);return this._helpOption}addHelpOption($){return this._helpOption=$,this._initOptionGroup($),this}help($){this.outputHelp($);let I=Number(U$.exitCode??0);if(I===0&&$&&typeof $!=="function"&&$.error)I=1;this._exit(I,"commander.help","(outputHelp)")}addHelpText($,I){let U=["beforeAll","before","after","afterAll"];if(!U.includes($))throw Error(`Unexpected value for position to addHelpText.
26
+ Expecting one of '${U.join("', '")}'`);let _=`${$}Help`;return this.on(_,(u)=>{let z;if(typeof I==="function")z=I({error:u.error,command:u.command});else z=I;if(z)u.write(`${z}
27
+ `)}),this}_outputHelpIfRequested($){let I=this._getHelpOption();if(I&&$.find((_)=>I.is(_)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function zX($){return $.map((I)=>{if(!I.startsWith("--inspect"))return I;let U,_="127.0.0.1",u="9229",z;if((z=I.match(/^(--inspect(-brk)?)$/))!==null)U=z[1];else if((z=I.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(U=z[1],/^\d+$/.test(z[3]))u=z[3];else _=z[3];else if((z=I.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)U=z[1],_=z[3],u=z[4];if(U&&u!=="0")return`${U}=${_}:${parseInt(u)+1}`;return I})}function h2(){if(U$.env.NO_COLOR||U$.env.FORCE_COLOR==="0"||U$.env.FORCE_COLOR==="false")return!1;if(U$.env.FORCE_COLOR||U$.env.CLICOLOR_FORCE!==void 0)return!0;return}KV.Command=c2;KV.useColor=h2});var GX=E((ZV)=>{var{Argument:vX}=gu(),{Command:d2}=gX(),{CommanderError:WV,InvalidArgumentError:JX}=ZI(),{Help:PV}=n2(),{Option:NX}=r2();ZV.program=new d2;ZV.createCommand=($)=>new d2($);ZV.createOption=($,I)=>new NX($,I);ZV.createArgument=($,I)=>new vX($,I);ZV.Command=d2;ZV.Option=NX;ZV.Argument=vX;ZV.Help=PV;ZV.CommanderError=WV;ZV.InvalidArgumentError=JX;ZV.InvalidOptionArgumentError=JX});var b$=E((Vx,o2)=>{var Nu=process||{},qX=Nu.argv||[],Ju=Nu.env||{},yV=!(!!Ju.NO_COLOR||qX.includes("--no-color"))&&(!!Ju.FORCE_COLOR||qX.includes("--color")||Nu.platform==="win32"||(Nu.stdout||{}).isTTY&&Ju.TERM!=="dumb"||!!Ju.CI),iV=($,I,U=$)=>(_)=>{let u=""+_,z=u.indexOf(I,$.length);return~z?$+nV(u,I,U,z)+I:$+u+I},nV=($,I,U,_)=>{let u="",z=0;do u+=$.substring(z,_)+U,z=_+I.length,_=$.indexOf(I,z);while(~_);return u+$.substring(z)},QX=($=yV)=>{let I=$?iV:()=>String;return{isColorSupported:$,reset:I("\x1B[0m","\x1B[0m"),bold:I("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:I("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:I("\x1B[3m","\x1B[23m"),underline:I("\x1B[4m","\x1B[24m"),inverse:I("\x1B[7m","\x1B[27m"),hidden:I("\x1B[8m","\x1B[28m"),strikethrough:I("\x1B[9m","\x1B[29m"),black:I("\x1B[30m","\x1B[39m"),red:I("\x1B[31m","\x1B[39m"),green:I("\x1B[32m","\x1B[39m"),yellow:I("\x1B[33m","\x1B[39m"),blue:I("\x1B[34m","\x1B[39m"),magenta:I("\x1B[35m","\x1B[39m"),cyan:I("\x1B[36m","\x1B[39m"),white:I("\x1B[37m","\x1B[39m"),gray:I("\x1B[90m","\x1B[39m"),bgBlack:I("\x1B[40m","\x1B[49m"),bgRed:I("\x1B[41m","\x1B[49m"),bgGreen:I("\x1B[42m","\x1B[49m"),bgYellow:I("\x1B[43m","\x1B[49m"),bgBlue:I("\x1B[44m","\x1B[49m"),bgMagenta:I("\x1B[45m","\x1B[49m"),bgCyan:I("\x1B[46m","\x1B[49m"),bgWhite:I("\x1B[47m","\x1B[49m"),blackBright:I("\x1B[90m","\x1B[39m"),redBright:I("\x1B[91m","\x1B[39m"),greenBright:I("\x1B[92m","\x1B[39m"),yellowBright:I("\x1B[93m","\x1B[39m"),blueBright:I("\x1B[94m","\x1B[39m"),magentaBright:I("\x1B[95m","\x1B[39m"),cyanBright:I("\x1B[96m","\x1B[39m"),whiteBright:I("\x1B[97m","\x1B[39m"),bgBlackBright:I("\x1B[100m","\x1B[49m"),bgRedBright:I("\x1B[101m","\x1B[49m"),bgGreenBright:I("\x1B[102m","\x1B[49m"),bgYellowBright:I("\x1B[103m","\x1B[49m"),bgBlueBright:I("\x1B[104m","\x1B[49m"),bgMagentaBright:I("\x1B[105m","\x1B[49m"),bgCyanBright:I("\x1B[106m","\x1B[49m"),bgWhiteBright:I("\x1B[107m","\x1B[49m")}};o2.exports=QX();o2.exports.createColors=QX});var $$=E((oV)=>{var t2=Symbol.for("yaml.alias"),TX=Symbol.for("yaml.document"),Gu=Symbol.for("yaml.map"),HX=Symbol.for("yaml.pair"),a2=Symbol.for("yaml.scalar"),Xu=Symbol.for("yaml.seq"),d4=Symbol.for("yaml.node.type"),rV=($)=>!!$&&typeof $==="object"&&$[d4]===t2,lV=($)=>!!$&&typeof $==="object"&&$[d4]===TX,mV=($)=>!!$&&typeof $==="object"&&$[d4]===Gu,hV=($)=>!!$&&typeof $==="object"&&$[d4]===HX,YX=($)=>!!$&&typeof $==="object"&&$[d4]===a2,cV=($)=>!!$&&typeof $==="object"&&$[d4]===Xu;function OX($){if($&&typeof $==="object")switch($[d4]){case Gu:case Xu:return!0}return!1}function dV($){if($&&typeof $==="object")switch($[d4]){case t2:case Gu:case a2:case Xu:return!0}return!1}var pV=($)=>(YX($)||OX($))&&!!$.anchor;oV.ALIAS=t2;oV.DOC=TX;oV.MAP=Gu;oV.NODE_TYPE=d4;oV.PAIR=HX;oV.SCALAR=a2;oV.SEQ=Xu;oV.hasAnchor=pV;oV.isAlias=rV;oV.isCollection=OX;oV.isDocument=lV;oV.isMap=mV;oV.isNode=dV;oV.isPair=hV;oV.isScalar=YX;oV.isSeq=cV});var AI=E((qB)=>{var Z$=$$(),a$=Symbol("break visit"),VX=Symbol("skip children"),w4=Symbol("remove node");function qu($,I){let U=BX(I);if(Z$.isDocument($)){if(R1(null,$.contents,U,Object.freeze([$]))===w4)$.contents=null}else R1(null,$,U,Object.freeze([]))}qu.BREAK=a$;qu.SKIP=VX;qu.REMOVE=w4;function R1($,I,U,_){let u=DX($,I,U,_);if(Z$.isNode(u)||Z$.isPair(u))return MX($,_,u),R1($,u,U,_);if(typeof u!=="symbol"){if(Z$.isCollection(I)){_=Object.freeze(_.concat(I));for(let z=0;z<I.items.length;++z){let g=R1(z,I.items[z],U,_);if(typeof g==="number")z=g-1;else if(g===a$)return a$;else if(g===w4)I.items.splice(z,1),z-=1}}else if(Z$.isPair(I)){_=Object.freeze(_.concat(I));let z=R1("key",I.key,U,_);if(z===a$)return a$;else if(z===w4)I.key=null;let g=R1("value",I.value,U,_);if(g===a$)return a$;else if(g===w4)I.value=null}}return u}async function Qu($,I){let U=BX(I);if(Z$.isDocument($)){if(await L1(null,$.contents,U,Object.freeze([$]))===w4)$.contents=null}else await L1(null,$,U,Object.freeze([]))}Qu.BREAK=a$;Qu.SKIP=VX;Qu.REMOVE=w4;async function L1($,I,U,_){let u=await DX($,I,U,_);if(Z$.isNode(u)||Z$.isPair(u))return MX($,_,u),L1($,u,U,_);if(typeof u!=="symbol"){if(Z$.isCollection(I)){_=Object.freeze(_.concat(I));for(let z=0;z<I.items.length;++z){let g=await L1(z,I.items[z],U,_);if(typeof g==="number")z=g-1;else if(g===a$)return a$;else if(g===w4)I.items.splice(z,1),z-=1}}else if(Z$.isPair(I)){_=Object.freeze(_.concat(I));let z=await L1("key",I.key,U,_);if(z===a$)return a$;else if(z===w4)I.key=null;let g=await L1("value",I.value,U,_);if(g===a$)return a$;else if(g===w4)I.value=null}}return u}function BX($){if(typeof $==="object"&&($.Collection||$.Node||$.Value))return Object.assign({Alias:$.Node,Map:$.Node,Scalar:$.Node,Seq:$.Node},$.Value&&{Map:$.Value,Scalar:$.Value,Seq:$.Value},$.Collection&&{Map:$.Collection,Seq:$.Collection},$);return $}function DX($,I,U,_){if(typeof U==="function")return U($,I,_);if(Z$.isMap(I))return U.Map?.($,I,_);if(Z$.isSeq(I))return U.Seq?.($,I,_);if(Z$.isPair(I))return U.Pair?.($,I,_);if(Z$.isScalar(I))return U.Scalar?.($,I,_);if(Z$.isAlias(I))return U.Alias?.($,I,_);return}function MX($,I,U){let _=I[I.length-1];if(Z$.isCollection(_))_.items[$]=U;else if(Z$.isPair(_))if($==="key")_.key=U;else _.value=U;else if(Z$.isDocument(_))_.contents=U;else{let u=Z$.isAlias(_)?"alias":"scalar";throw Error(`Cannot replace node with ${u} parent`)}}qB.visit=qu;qB.visitAsync=Qu});var e2=E((VB)=>{var KX=$$(),HB=AI(),YB={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},OB=($)=>$.replace(/[!,[\]{}]/g,(I)=>YB[I]);class q4{constructor($,I){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},q4.defaultYaml,$),this.tags=Object.assign({},q4.defaultTags,I)}clone(){let $=new q4(this.yaml,this.tags);return $.docStart=this.docStart,$}atDocument(){let $=new q4(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:q4.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},q4.defaultTags);break}return $}add($,I){if(this.atNextDocument)this.yaml={explicit:q4.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},q4.defaultTags),this.atNextDocument=!1;let U=$.trim().split(/[ \t]+/),_=U.shift();switch(_){case"%TAG":{if(U.length!==2){if(I(0,"%TAG directive should contain exactly two parts"),U.length<2)return!1}let[u,z]=U;return this.tags[u]=z,!0}case"%YAML":{if(this.yaml.explicit=!0,U.length!==1)return I(0,"%YAML directive should contain exactly one part"),!1;let[u]=U;if(u==="1.1"||u==="1.2")return this.yaml.version=u,!0;else{let z=/^\d+\.\d+$/.test(u);return I(6,`Unsupported YAML version ${u}`,z),!1}}default:return I(0,`Unknown directive ${_}`,!0),!1}}tagName($,I){if($==="!")return"!";if($[0]!=="!")return I(`Not a valid tag: ${$}`),null;if($[1]==="<"){let z=$.slice(2,-1);if(z==="!"||z==="!!")return I(`Verbatim tags aren't resolved, so ${$} is invalid.`),null;if($[$.length-1]!==">")I("Verbatim tags must end with a >");return z}let[,U,_]=$.match(/^(.*!)([^!]*)$/s);if(!_)I(`The ${$} tag has no suffix`);let u=this.tags[U];if(u)try{return u+decodeURIComponent(_)}catch(z){return I(String(z)),null}if(U==="!")return $;return I(`Could not resolve tag: ${$}`),null}tagString($){for(let[I,U]of Object.entries(this.tags))if($.startsWith(U))return I+OB($.substring(U.length));return $[0]==="!"?$:`!<${$}>`}toString($){let I=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],U=Object.entries(this.tags),_;if($&&U.length>0&&KX.isNode($.contents)){let u={};HB.visit($.contents,(z,g)=>{if(KX.isNode(g)&&g.tag)u[g.tag]=!0}),_=Object.keys(u)}else _=[];for(let[u,z]of U){if(u==="!!"&&z==="tag:yaml.org,2002:")continue;if(!$||_.some((g)=>g.startsWith(z)))I.push(`%TAG ${u} ${z}`)}return I.join(`
28
+ `)}}q4.defaultYaml={explicit:!1,version:"1.2"};q4.defaultTags={"!!":"tag:yaml.org,2002:"};VB.Directives=q4});var Tu=E((RB)=>{var RX=$$(),DB=AI();function MB($){if(/[\x00-\x19\s,[\]{}]/.test($)){let U=`Anchor must not contain whitespace or control characters: ${JSON.stringify($)}`;throw Error(U)}return!0}function LX($){let I=new Set;return DB.visit($,{Value(U,_){if(_.anchor)I.add(_.anchor)}}),I}function WX($,I){for(let U=1;;++U){let _=`${$}${U}`;if(!I.has(_))return _}}function KB($,I){let U=[],_=new Map,u=null;return{onAnchor:(z)=>{U.push(z),u??(u=LX($));let g=WX(I,u);return u.add(g),g},setAnchors:()=>{for(let z of U){let g=_.get(z);if(typeof g==="object"&&g.anchor&&(RX.isScalar(g.node)||RX.isCollection(g.node)))g.node.anchor=g.anchor;else{let v=Error("Failed to resolve repeated object (this should not happen)");throw v.source=z,v}}},sourceObjects:_}}RB.anchorIsValid=MB;RB.anchorNames=LX;RB.createNodeAnchors=KB;RB.findNewAnchor=WX});var s2=E((AB)=>{function bI($,I,U,_){if(_&&typeof _==="object")if(Array.isArray(_))for(let u=0,z=_.length;u<z;++u){let g=_[u],v=bI($,_,String(u),g);if(v===void 0)delete _[u];else if(v!==g)_[u]=v}else if(_ instanceof Map)for(let u of Array.from(_.keys())){let z=_.get(u),g=bI($,_,u,z);if(g===void 0)_.delete(u);else if(g!==z)_.set(u,g)}else if(_ instanceof Set)for(let u of Array.from(_)){let z=bI($,_,u,u);if(z===void 0)_.delete(u);else if(z!==u)_.delete(u),_.add(z)}else for(let[u,z]of Object.entries(_)){let g=bI($,_,u,z);if(g===void 0)delete _[u];else if(g!==z)_[u]=g}return $.call(I,U,_)}AB.applyReviver=bI});var N6=E((FB)=>{var jB=$$();function PX($,I,U){if(Array.isArray($))return $.map((_,u)=>PX(_,String(u),U));if($&&typeof $.toJSON==="function"){if(!U||!jB.hasAnchor($))return $.toJSON(I,U);let _={aliasCount:0,count:1,res:void 0};U.anchors.set($,_),U.onCreate=(z)=>{_.res=z,delete U.onCreate};let u=$.toJSON(I,U);if(U.onCreate)U.onCreate(u);return u}if(typeof $==="bigint"&&!U?.keep)return Number($);return $}FB.toJS=PX});var Hu=E((CB)=>{var wB=s2(),ZX=$$(),EB=N6();class AX{constructor($){Object.defineProperty(this,ZX.NODE_TYPE,{value:$})}clone(){let $=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)$.range=this.range.slice();return $}toJS($,{mapAsMap:I,maxAliasCount:U,onAnchor:_,reviver:u}={}){if(!ZX.isDocument($))throw TypeError("A document argument is required");let z={anchors:new Map,doc:$,keep:!0,mapAsMap:I===!0,mapKeyWarned:!1,maxAliasCount:typeof U==="number"?U:100},g=EB.toJS(this,"",z);if(typeof _==="function")for(let{count:v,res:J}of z.anchors.values())_(J,v);return typeof u==="function"?wB.applyReviver(u,{"":g},"",g):g}}CB.NodeBase=AX});var jI=E((nB)=>{var xB=Tu(),kB=AI(),W1=$$(),yB=Hu(),iB=N6();class bX extends yB.NodeBase{constructor($){super(W1.ALIAS);this.source=$,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve($,I){let U;if(I?.aliasResolveCache)U=I.aliasResolveCache;else if(U=[],kB.visit($,{Node:(u,z)=>{if(W1.isAlias(z)||W1.hasAnchor(z))U.push(z)}}),I)I.aliasResolveCache=U;let _=void 0;for(let u of U){if(u===this)break;if(u.anchor===this.source)_=u}return _}toJSON($,I){if(!I)return{source:this.source};let{anchors:U,doc:_,maxAliasCount:u}=I,z=this.resolve(_,I);if(!z){let v=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(v)}let g=U.get(z);if(!g)iB.toJS(z,null,I),g=U.get(z);if(g?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(u>=0){if(g.count+=1,g.aliasCount===0)g.aliasCount=Yu(_,z,U);if(g.count*g.aliasCount>u)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return g.res}toString($,I,U){let _=`*${this.source}`;if($){if(xB.anchorIsValid(this.source),$.options.verifyAliasOrder&&!$.anchors.has(this.source)){let u=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(u)}if($.implicitKey)return`${_} `}return _}}function Yu($,I,U){if(W1.isAlias(I)){let _=I.resolve($),u=U&&_&&U.get(_);return u?u.count*u.aliasCount:0}else if(W1.isCollection(I)){let _=0;for(let u of I.items){let z=Yu($,u,U);if(z>_)_=z}return _}else if(W1.isPair(I)){let _=Yu($,I.key,U),u=Yu($,I.value,U);return Math.max(_,u)}return 1}nB.Alias=bX});var W$=E((dB)=>{var lB=$$(),mB=Hu(),hB=N6(),cB=($)=>!$||typeof $!=="function"&&typeof $!=="object";class n6 extends mB.NodeBase{constructor($){super(lB.SCALAR);this.value=$}toJSON($,I){return I?.keep?this.value:hB.toJS(this.value,$,I)}toString(){return String(this.value)}}n6.BLOCK_FOLDED="BLOCK_FOLDED";n6.BLOCK_LITERAL="BLOCK_LITERAL";n6.PLAIN="PLAIN";n6.QUOTE_DOUBLE="QUOTE_DOUBLE";n6.QUOTE_SINGLE="QUOTE_SINGLE";dB.Scalar=n6;dB.isScalarValue=cB});var FI=E(($D)=>{var tB=jI(),r6=$$(),jX=W$(),aB="tag:yaml.org,2002:";function eB($,I,U){if(I){let _=U.filter((z)=>z.tag===I),u=_.find((z)=>!z.format)??_[0];if(!u)throw Error(`Tag ${I} not found`);return u}return U.find((_)=>_.identify?.($)&&!_.format)}function sB($,I,U){if(r6.isDocument($))$=$.contents;if(r6.isNode($))return $;if(r6.isPair($)){let G=U.schema[r6.MAP].createNode?.(U.schema,null,U);return G.items.push($),G}if($ instanceof String||$ instanceof Number||$ instanceof Boolean||typeof BigInt<"u"&&$ instanceof BigInt)$=$.valueOf();let{aliasDuplicateObjects:_,onAnchor:u,onTagObj:z,schema:g,sourceObjects:v}=U,J=void 0;if(_&&$&&typeof $==="object")if(J=v.get($),J)return J.anchor??(J.anchor=u($)),new tB.Alias(J.anchor);else J={anchor:null,node:null},v.set($,J);if(I?.startsWith("!!"))I=aB+I.slice(2);let N=eB($,I,g.tags);if(!N){if($&&typeof $.toJSON==="function")$=$.toJSON();if(!$||typeof $!=="object"){let G=new jX.Scalar($);if(J)J.node=G;return G}N=$ instanceof Map?g[r6.MAP]:(Symbol.iterator in Object($))?g[r6.SEQ]:g[r6.MAP]}if(z)z(N),delete U.onTagObj;let X=N?.createNode?N.createNode(U.schema,$,U):typeof N?.nodeClass?.from==="function"?N.nodeClass.from(U.schema,$,U):new jX.Scalar($);if(I)X.tag=I;else if(!N.default)X.tag=N.tag;if(J)J.node=X;return X}$D.createNode=sB});var Ou=E((_D)=>{var uD=FI(),E4=$$(),UD=Hu();function $z($,I,U){let _=U;for(let u=I.length-1;u>=0;--u){let z=I[u];if(typeof z==="number"&&Number.isInteger(z)&&z>=0){let g=[];g[z]=_,_=g}else _=new Map([[z,_]])}return uD.createNode(_,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:$,sourceObjects:new Map})}var FX=($)=>$==null||typeof $==="object"&&!!$[Symbol.iterator]().next().done;class SX extends UD.NodeBase{constructor($,I){super($);Object.defineProperty(this,"schema",{value:I,configurable:!0,enumerable:!1,writable:!0})}clone($){let I=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if($)I.schema=$;if(I.items=I.items.map((U)=>E4.isNode(U)||E4.isPair(U)?U.clone($):U),this.range)I.range=this.range.slice();return I}addIn($,I){if(FX($))this.add(I);else{let[U,..._]=$,u=this.get(U,!0);if(E4.isCollection(u))u.addIn(_,I);else if(u===void 0&&this.schema)this.set(U,$z(this.schema,_,I));else throw Error(`Expected YAML collection at ${U}. Remaining path: ${_}`)}}deleteIn($){let[I,...U]=$;if(U.length===0)return this.delete(I);let _=this.get(I,!0);if(E4.isCollection(_))return _.deleteIn(U);else throw Error(`Expected YAML collection at ${I}. Remaining path: ${U}`)}getIn($,I){let[U,..._]=$,u=this.get(U,!0);if(_.length===0)return!I&&E4.isScalar(u)?u.value:u;else return E4.isCollection(u)?u.getIn(_,I):void 0}hasAllNullValues($){return this.items.every((I)=>{if(!E4.isPair(I))return!1;let U=I.value;return U==null||$&&E4.isScalar(U)&&U.value==null&&!U.commentBefore&&!U.comment&&!U.tag})}hasIn($){let[I,...U]=$;if(U.length===0)return this.has(I);let _=this.get(I,!0);return E4.isCollection(_)?_.hasIn(U):!1}setIn($,I){let[U,..._]=$;if(_.length===0)this.set(U,I);else{let u=this.get(U,!0);if(E4.isCollection(u))u.setIn(_,I);else if(u===void 0&&this.schema)this.set(U,$z(this.schema,_,I));else throw Error(`Expected YAML collection at ${U}. Remaining path: ${_}`)}}}_D.Collection=SX;_D.collectionFromPath=$z;_D.isEmptyPath=FX});var SI=E((GD)=>{var JD=($)=>$.replace(/^(?!$)(?: $)?/gm,"#");function Iz($,I){if(/^\n+$/.test($))return $.substring(1);return I?$.replace(/^(?! *$)/gm,I):$}var ND=($,I,U)=>$.endsWith(`
29
+ `)?Iz(U,I):U.includes(`
30
30
  `)?`
31
- `+s2(U,I):($.endsWith(" ")?"":" ")+U;JD.indentComment=s2;JD.lineComment=vD;JD.stringifyComment=zD});var EX=E((QD)=>{function qD($,I,U="flow",{indentAtStart:_,lineWidth:u=80,minContentWidth:g=20,onFold:z,onOverflow:v}={}){if(!u||u<0)return $;if(u<g)g=0;let J=Math.max(1+g,1+u-I.length);if($.length<=J)return $;let N=[],X={},G=u-I.length;if(typeof _==="number")if(_>u-Math.max(2,g))N.push(0);else G=u-_;let q=void 0,T=void 0,H=!1,Q=-1,Y=-1,K=-1;if(U==="block"){if(Q=wX($,Q,I.length),Q!==-1)G=Q+J}for(let P;P=$[Q+=1];){if(U==="quoted"&&P==="\\"){switch(Y=Q,$[Q+1]){case"x":Q+=3;break;case"u":Q+=5;break;case"U":Q+=9;break;default:Q+=1}K=Q}if(P===`
31
+ `+Iz(U,I):($.endsWith(" ")?"":" ")+U;GD.indentComment=Iz;GD.lineComment=ND;GD.stringifyComment=JD});var EX=E((HD)=>{function TD($,I,U="flow",{indentAtStart:_,lineWidth:u=80,minContentWidth:z=20,onFold:g,onOverflow:v}={}){if(!u||u<0)return $;if(u<z)z=0;let J=Math.max(1+z,1+u-I.length);if($.length<=J)return $;let N=[],X={},G=u-I.length;if(typeof _==="number")if(_>u-Math.max(2,z))N.push(0);else G=u-_;let q=void 0,T=void 0,H=!1,Q=-1,Y=-1,M=-1;if(U==="block"){if(Q=wX($,Q,I.length),Q!==-1)G=Q+J}for(let P;P=$[Q+=1];){if(U==="quoted"&&P==="\\"){switch(Y=Q,$[Q+1]){case"x":Q+=3;break;case"u":Q+=5;break;case"U":Q+=9;break;default:Q+=1}M=Q}if(P===`
32
32
  `){if(U==="block")Q=wX($,Q,I.length);G=Q+I.length+J,q=void 0}else{if(P===" "&&T&&T!==" "&&T!==`
33
- `&&T!=="\t"){let O=$[Q+1];if(O&&O!==" "&&O!==`
34
- `&&O!=="\t")q=Q}if(Q>=G)if(q)N.push(q),G=q+J,q=void 0;else if(U==="quoted"){while(T===" "||T==="\t")T=P,P=$[Q+=1],H=!0;let O=Q>K+1?Q-2:Y-1;if(X[O])return $;N.push(O),X[O]=!0,G=O+J,q=void 0}else H=!0}T=P}if(H&&v)v();if(N.length===0)return $;if(z)z();let L=$.slice(0,N[0]);for(let P=0;P<N.length;++P){let O=N[P],B=N[P+1]||$.length;if(O===0)L=`
35
- ${I}${$.slice(0,B)}`;else{if(U==="quoted"&&X[O])L+=`${$[O]}\\`;L+=`
36
- ${I}${$.slice(O+1,B)}`}}return L}function wX($,I,U){let _=I,u=I+1,g=$[u];while(g===" "||g==="\t")if(I<u+U)g=$[++I];else{do g=$[++I];while(g&&g!==`
37
- `);_=I,u=I+1,g=$[u]}return _}QD.FOLD_BLOCK="block";QD.FOLD_FLOW="flow";QD.FOLD_QUOTED="quoted";QD.foldFlowLines=qD});var SI=E((MD)=>{var D4=W$(),G6=EX(),Vu=($,I)=>({indentAtStart:I?$.indent.length:$.indentAtStart,lineWidth:$.options.lineWidth,minContentWidth:$.options.minContentWidth}),Bu=($)=>/^(%|---|\.\.\.)/m.test($);function VD($,I,U){if(!I||I<0)return!1;let _=I-U,u=$.length;if(u<=_)return!1;for(let g=0,z=0;g<u;++g)if($[g]===`
38
- `){if(g-z>_)return!0;if(z=g+1,u-z<=_)return!1}return!0}function FI($,I){let U=JSON.stringify($);if(I.options.doubleQuotedAsJSON)return U;let{implicitKey:_}=I,u=I.options.doubleQuotedMinMultiLineLength,g=I.indent||(Bu($)?" ":""),z="",v=0;for(let J=0,N=U[J];N;N=U[++J]){if(N===" "&&U[J+1]==="\\"&&U[J+2]==="n")z+=U.slice(v,J)+"\\ ",J+=1,v=J,N="\\";if(N==="\\")switch(U[J+1]){case"u":{z+=U.slice(v,J);let X=U.substr(J+2,4);switch(X){case"0000":z+="\\0";break;case"0007":z+="\\a";break;case"000b":z+="\\v";break;case"001b":z+="\\e";break;case"0085":z+="\\N";break;case"00a0":z+="\\_";break;case"2028":z+="\\L";break;case"2029":z+="\\P";break;default:if(X.substr(0,2)==="00")z+="\\x"+X.substr(2);else z+=U.substr(J,6)}J+=5,v=J+1}break;case"n":if(_||U[J+2]==='"'||U.length<u)J+=1;else{z+=U.slice(v,J)+`
33
+ `&&T!=="\t"){let R=$[Q+1];if(R&&R!==" "&&R!==`
34
+ `&&R!=="\t")q=Q}if(Q>=G)if(q)N.push(q),G=q+J,q=void 0;else if(U==="quoted"){while(T===" "||T==="\t")T=P,P=$[Q+=1],H=!0;let R=Q>M+1?Q-2:Y-1;if(X[R])return $;N.push(R),X[R]=!0,G=R+J,q=void 0}else H=!0}T=P}if(H&&v)v();if(N.length===0)return $;if(g)g();let L=$.slice(0,N[0]);for(let P=0;P<N.length;++P){let R=N[P],K=N[P+1]||$.length;if(R===0)L=`
35
+ ${I}${$.slice(0,K)}`;else{if(U==="quoted"&&X[R])L+=`${$[R]}\\`;L+=`
36
+ ${I}${$.slice(R+1,K)}`}}return L}function wX($,I,U){let _=I,u=I+1,z=$[u];while(z===" "||z==="\t")if(I<u+U)z=$[++I];else{do z=$[++I];while(z&&z!==`
37
+ `);_=I,u=I+1,z=$[u]}return _}HD.FOLD_BLOCK="block";HD.FOLD_FLOW="flow";HD.FOLD_QUOTED="quoted";HD.foldFlowLines=TD});var EI=E((RD)=>{var D4=W$(),G6=EX(),Bu=($,I)=>({indentAtStart:I?$.indent.length:$.indentAtStart,lineWidth:$.options.lineWidth,minContentWidth:$.options.minContentWidth}),Du=($)=>/^(%|---|\.\.\.)/m.test($);function DD($,I,U){if(!I||I<0)return!1;let _=I-U,u=$.length;if(u<=_)return!1;for(let z=0,g=0;z<u;++z)if($[z]===`
38
+ `){if(z-g>_)return!0;if(g=z+1,u-g<=_)return!1}return!0}function wI($,I){let U=JSON.stringify($);if(I.options.doubleQuotedAsJSON)return U;let{implicitKey:_}=I,u=I.options.doubleQuotedMinMultiLineLength,z=I.indent||(Du($)?" ":""),g="",v=0;for(let J=0,N=U[J];N;N=U[++J]){if(N===" "&&U[J+1]==="\\"&&U[J+2]==="n")g+=U.slice(v,J)+"\\ ",J+=1,v=J,N="\\";if(N==="\\")switch(U[J+1]){case"u":{g+=U.slice(v,J);let X=U.substr(J+2,4);switch(X){case"0000":g+="\\0";break;case"0007":g+="\\a";break;case"000b":g+="\\v";break;case"001b":g+="\\e";break;case"0085":g+="\\N";break;case"00a0":g+="\\_";break;case"2028":g+="\\L";break;case"2029":g+="\\P";break;default:if(X.substr(0,2)==="00")g+="\\x"+X.substr(2);else g+=U.substr(J,6)}J+=5,v=J+1}break;case"n":if(_||U[J+2]==='"'||U.length<u)J+=1;else{g+=U.slice(v,J)+`
39
39
 
40
- `;while(U[J+2]==="\\"&&U[J+3]==="n"&&U[J+4]!=='"')z+=`
41
- `,J+=2;if(z+=g,U[J+2]===" ")z+="\\";J+=1,v=J+1}break;default:J+=1}}return z=v?z+U.slice(v):U,_?z:G6.foldFlowLines(z,g,G6.FOLD_QUOTED,Vu(I,!1))}function $g($,I){if(I.options.singleQuote===!1||I.implicitKey&&$.includes(`
42
- `)||/[ \t]\n|\n[ \t]/.test($))return FI($,I);let U=I.indent||(Bu($)?" ":""),_="'"+$.replace(/'/g,"''").replace(/\n+/g,`$&
43
- ${U}`)+"'";return I.implicitKey?_:G6.foldFlowLines(_,U,G6.FOLD_FLOW,Vu(I,!1))}function W1($,I){let{singleQuote:U}=I.options,_;if(U===!1)_=FI;else{let u=$.includes('"'),g=$.includes("'");if(u&&!g)_=$g;else if(g&&!u)_=FI;else _=U?$g:FI}return _($,I)}var Ig;try{Ig=new RegExp(`(^|(?<!
40
+ `;while(U[J+2]==="\\"&&U[J+3]==="n"&&U[J+4]!=='"')g+=`
41
+ `,J+=2;if(g+=z,U[J+2]===" ")g+="\\";J+=1,v=J+1}break;default:J+=1}}return g=v?g+U.slice(v):U,_?g:G6.foldFlowLines(g,z,G6.FOLD_QUOTED,Bu(I,!1))}function uz($,I){if(I.options.singleQuote===!1||I.implicitKey&&$.includes(`
42
+ `)||/[ \t]\n|\n[ \t]/.test($))return wI($,I);let U=I.indent||(Du($)?" ":""),_="'"+$.replace(/'/g,"''").replace(/\n+/g,`$&
43
+ ${U}`)+"'";return I.implicitKey?_:G6.foldFlowLines(_,U,G6.FOLD_FLOW,Bu(I,!1))}function P1($,I){let{singleQuote:U}=I.options,_;if(U===!1)_=wI;else{let u=$.includes('"'),z=$.includes("'");if(u&&!z)_=uz;else if(z&&!u)_=wI;else _=U?uz:wI}return _($,I)}var Uz;try{Uz=new RegExp(`(^|(?<!
44
44
  ))
45
45
  +(?!
46
- |$)`,"g")}catch{Ig=/\n+(?!\n|$)/g}function Ou({comment:$,type:I,value:U},_,u,g){let{blockQuote:z,commentString:v,lineWidth:J}=_.options;if(!z||/\n[\t ]+$/.test(U))return W1(U,_);let N=_.indent||(_.forceBlockIndent||Bu(U)?" ":""),X=z==="literal"?!0:z==="folded"||I===D4.Scalar.BLOCK_FOLDED?!1:I===D4.Scalar.BLOCK_LITERAL?!0:!VD(U,J,N.length);if(!U)return X?`|
46
+ |$)`,"g")}catch{Uz=/\n+(?!\n|$)/g}function Vu({comment:$,type:I,value:U},_,u,z){let{blockQuote:g,commentString:v,lineWidth:J}=_.options;if(!g||/\n[\t ]+$/.test(U))return P1(U,_);let N=_.indent||(_.forceBlockIndent||Du(U)?" ":""),X=g==="literal"?!0:g==="folded"||I===D4.Scalar.BLOCK_FOLDED?!1:I===D4.Scalar.BLOCK_LITERAL?!0:!DD(U,J,N.length);if(!U)return X?`|
47
47
  `:`>
48
- `;let G,q;for(q=U.length;q>0;--q){let B=U[q-1];if(B!==`
49
- `&&B!=="\t"&&B!==" ")break}let T=U.substring(q),H=T.indexOf(`
50
- `);if(H===-1)G="-";else if(U===T||H!==T.length-1){if(G="+",g)g()}else G="";if(T){if(U=U.slice(0,-T.length),T[T.length-1]===`
51
- `)T=T.slice(0,-1);T=T.replace(Ig,`$&${N}`)}let Q=!1,Y,K=-1;for(Y=0;Y<U.length;++Y){let B=U[Y];if(B===" ")Q=!0;else if(B===`
52
- `)K=Y;else break}let L=U.substring(0,K<Y?K+1:Y);if(L)U=U.substring(L.length),L=L.replace(/\n+/g,`$&${N}`);let O=(Q?N?"2":"1":"")+G;if($){if(O+=" "+v($.replace(/ ?[\r\n]+/g," ")),u)u()}if(!X){let B=U.replace(/\n+/g,`
53
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${N}`),R=!1,D=Vu(_,!0);if(z!=="folded"&&I!==D4.Scalar.BLOCK_FOLDED)D.onOverflow=()=>{R=!0};let M=G6.foldFlowLines(`${L}${B}${T}`,N,G6.FOLD_BLOCK,D);if(!R)return`>${O}
54
- ${N}${M}`}return U=U.replace(/\n+/g,`$&${N}`),`|${O}
55
- ${N}${L}${U}${T}`}function BD($,I,U,_){let{type:u,value:g}=$,{actualString:z,implicitKey:v,indent:J,indentStep:N,inFlow:X}=I;if(v&&g.includes(`
56
- `)||X&&/[[\]{},]/.test(g))return W1(g,I);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(g))return v||X||!g.includes(`
57
- `)?W1(g,I):Ou($,I,U,_);if(!v&&!X&&u!==D4.Scalar.PLAIN&&g.includes(`
58
- `))return Ou($,I,U,_);if(Bu(g)){if(J==="")return I.forceBlockIndent=!0,Ou($,I,U,_);else if(v&&J===N)return W1(g,I)}let G=g.replace(/\n+/g,`$&
59
- ${J}`);if(z){let q=(Q)=>Q.default&&Q.tag!=="tag:yaml.org,2002:str"&&Q.test?.test(G),{compat:T,tags:H}=I.doc.schema;if(H.some(q)||T?.some(q))return W1(g,I)}return v?G:G6.foldFlowLines(G,J,G6.FOLD_FLOW,Vu(I,!1))}function DD($,I,U,_){let{implicitKey:u,inFlow:g}=I,z=typeof $.value==="string"?$:Object.assign({},$,{value:String($.value)}),{type:v}=$;if(v!==D4.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(z.value))v=D4.Scalar.QUOTE_DOUBLE}let J=(X)=>{switch(X){case D4.Scalar.BLOCK_FOLDED:case D4.Scalar.BLOCK_LITERAL:return u||g?W1(z.value,I):Ou(z,I,U,_);case D4.Scalar.QUOTE_DOUBLE:return FI(z.value,I);case D4.Scalar.QUOTE_SINGLE:return $g(z.value,I);case D4.Scalar.PLAIN:return BD(z,I,U,_);default:return null}},N=J(v);if(N===null){let{defaultKeyType:X,defaultStringType:G}=I.options,q=u&&X||G;if(N=J(q),N===null)throw Error(`Unsupported default string type ${q}`)}return N}MD.stringifyString=DD});var wI=E((jD)=>{var LD=Qu(),X6=$$(),RD=jI(),WD=SI();function PD($,I){let U=Object.assign({blockQuote:!0,commentString:RD.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},$.schema.toStringOptions,I),_;switch(U.collectionStyle){case"block":_=!1;break;case"flow":_=!0;break;default:_=null}return{anchors:new Set,doc:$,flowCollectionPadding:U.flowCollectionPadding?" ":"",indent:"",indentStep:typeof U.indent==="number"?" ".repeat(U.indent):" ",inFlow:_,options:U}}function ZD($,I){if(I.tag){let u=$.filter((g)=>g.tag===I.tag);if(u.length>0)return u.find((g)=>g.format===I.format)??u[0]}let U=void 0,_;if(X6.isScalar(I)){_=I.value;let u=$.filter((g)=>g.identify?.(_));if(u.length>1){let g=u.filter((z)=>z.test);if(g.length>0)u=g}U=u.find((g)=>g.format===I.format)??u.find((g)=>!g.format)}else _=I,U=$.find((u)=>u.nodeClass&&_ instanceof u.nodeClass);if(!U){let u=_?.constructor?.name??(_===null?"null":typeof _);throw Error(`Tag not resolved for ${u} value`)}return U}function AD($,I,{anchors:U,doc:_}){if(!_.directives)return"";let u=[],g=(X6.isScalar($)||X6.isCollection($))&&$.anchor;if(g&&LD.anchorIsValid(g))U.add(g),u.push(`&${g}`);let z=$.tag??(I.default?null:I.tag);if(z)u.push(_.directives.tagString(z));return u.join(" ")}function bD($,I,U,_){if(X6.isPair($))return $.toString(I,U,_);if(X6.isAlias($)){if(I.doc.directives)return $.toString(I);if(I.resolvedAliases?.has($))throw TypeError("Cannot stringify circular structure without alias nodes");else{if(I.resolvedAliases)I.resolvedAliases.add($);else I.resolvedAliases=new Set([$]);$=$.resolve(I.doc)}}let u=void 0,g=X6.isNode($)?$:I.doc.createNode($,{onTagObj:(J)=>u=J});u??(u=ZD(I.doc.schema.tags,g));let z=AD(g,u,I);if(z.length>0)I.indentAtStart=(I.indentAtStart??0)+z.length+1;let v=typeof u.stringify==="function"?u.stringify(g,I,U,_):X6.isScalar(g)?WD.stringifyString(g,I,U,_):g.toString(I,U,_);if(!z)return v;return X6.isScalar(g)||v[0]==="{"||v[0]==="["?`${z} ${v}`:`${z}
60
- ${I.indent}${v}`}jD.createStringifyContext=PD;jD.stringify=bD});var xX=E((ED)=>{var p4=$$(),CX=W$(),fX=wI(),EI=jI();function wD({key:$,value:I},U,_,u){let{allNullValues:g,doc:z,indent:v,indentStep:J,options:{commentString:N,indentSeq:X,simpleKeys:G}}=U,q=p4.isNode($)&&$.comment||null;if(G){if(q)throw Error("With simple keys, key nodes cannot have comments");if(p4.isCollection($)||!p4.isNode($)&&typeof $==="object")throw Error("With simple keys, collection cannot be used as a key value")}let T=!G&&(!$||q&&I==null&&!U.inFlow||p4.isCollection($)||(p4.isScalar($)?$.type===CX.Scalar.BLOCK_FOLDED||$.type===CX.Scalar.BLOCK_LITERAL:typeof $==="object"));U=Object.assign({},U,{allNullValues:!1,implicitKey:!T&&(G||!g),indent:v+J});let H=!1,Q=!1,Y=fX.stringify($,U,()=>H=!0,()=>Q=!0);if(!T&&!U.inFlow&&Y.length>1024){if(G)throw Error("With simple keys, single line scalar must not span more than 1024 characters");T=!0}if(U.inFlow){if(g||I==null){if(H&&_)_();return Y===""?"?":T?`? ${Y}`:Y}}else if(g&&!G||I==null&&T){if(Y=`? ${Y}`,q&&!H)Y+=EI.lineComment(Y,U.indent,N(q));else if(Q&&u)u();return Y}if(H)q=null;if(T){if(q)Y+=EI.lineComment(Y,U.indent,N(q));Y=`? ${Y}
61
- ${v}:`}else if(Y=`${Y}:`,q)Y+=EI.lineComment(Y,U.indent,N(q));let K,L,P;if(p4.isNode(I))K=!!I.spaceBefore,L=I.commentBefore,P=I.comment;else if(K=!1,L=null,P=null,I&&typeof I==="object")I=z.createNode(I);if(U.implicitKey=!1,!T&&!q&&p4.isScalar(I))U.indentAtStart=Y.length+1;if(Q=!1,!X&&J.length>=2&&!U.inFlow&&!T&&p4.isSeq(I)&&!I.flow&&!I.tag&&!I.anchor)U.indent=U.indent.substring(2);let O=!1,B=fX.stringify(I,U,()=>O=!0,()=>Q=!0),R=" ";if(q||K||L){if(R=K?`
62
- `:"",L){let D=N(L);R+=`
63
- ${EI.indentComment(D,U.indent)}`}if(B===""&&!U.inFlow){if(R===`
64
- `&&P)R=`
48
+ `;let G,q;for(q=U.length;q>0;--q){let K=U[q-1];if(K!==`
49
+ `&&K!=="\t"&&K!==" ")break}let T=U.substring(q),H=T.indexOf(`
50
+ `);if(H===-1)G="-";else if(U===T||H!==T.length-1){if(G="+",z)z()}else G="";if(T){if(U=U.slice(0,-T.length),T[T.length-1]===`
51
+ `)T=T.slice(0,-1);T=T.replace(Uz,`$&${N}`)}let Q=!1,Y,M=-1;for(Y=0;Y<U.length;++Y){let K=U[Y];if(K===" ")Q=!0;else if(K===`
52
+ `)M=Y;else break}let L=U.substring(0,M<Y?M+1:Y);if(L)U=U.substring(L.length),L=L.replace(/\n+/g,`$&${N}`);let R=(Q?N?"2":"1":"")+G;if($){if(R+=" "+v($.replace(/ ?[\r\n]+/g," ")),u)u()}if(!X){let K=U.replace(/\n+/g,`
53
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${N}`),V=!1,B=Bu(_,!0);if(g!=="folded"&&I!==D4.Scalar.BLOCK_FOLDED)B.onOverflow=()=>{V=!0};let O=G6.foldFlowLines(`${L}${K}${T}`,N,G6.FOLD_BLOCK,B);if(!V)return`>${R}
54
+ ${N}${O}`}return U=U.replace(/\n+/g,`$&${N}`),`|${R}
55
+ ${N}${L}${U}${T}`}function MD($,I,U,_){let{type:u,value:z}=$,{actualString:g,implicitKey:v,indent:J,indentStep:N,inFlow:X}=I;if(v&&z.includes(`
56
+ `)||X&&/[[\]{},]/.test(z))return P1(z,I);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(z))return v||X||!z.includes(`
57
+ `)?P1(z,I):Vu($,I,U,_);if(!v&&!X&&u!==D4.Scalar.PLAIN&&z.includes(`
58
+ `))return Vu($,I,U,_);if(Du(z)){if(J==="")return I.forceBlockIndent=!0,Vu($,I,U,_);else if(v&&J===N)return P1(z,I)}let G=z.replace(/\n+/g,`$&
59
+ ${J}`);if(g){let q=(Q)=>Q.default&&Q.tag!=="tag:yaml.org,2002:str"&&Q.test?.test(G),{compat:T,tags:H}=I.doc.schema;if(H.some(q)||T?.some(q))return P1(z,I)}return v?G:G6.foldFlowLines(G,J,G6.FOLD_FLOW,Bu(I,!1))}function KD($,I,U,_){let{implicitKey:u,inFlow:z}=I,g=typeof $.value==="string"?$:Object.assign({},$,{value:String($.value)}),{type:v}=$;if(v!==D4.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(g.value))v=D4.Scalar.QUOTE_DOUBLE}let J=(X)=>{switch(X){case D4.Scalar.BLOCK_FOLDED:case D4.Scalar.BLOCK_LITERAL:return u||z?P1(g.value,I):Vu(g,I,U,_);case D4.Scalar.QUOTE_DOUBLE:return wI(g.value,I);case D4.Scalar.QUOTE_SINGLE:return uz(g.value,I);case D4.Scalar.PLAIN:return MD(g,I,U,_);default:return null}},N=J(v);if(N===null){let{defaultKeyType:X,defaultStringType:G}=I.options,q=u&&X||G;if(N=J(q),N===null)throw Error(`Unsupported default string type ${q}`)}return N}RD.stringifyString=KD});var CI=E((SD)=>{var WD=Tu(),X6=$$(),PD=SI(),ZD=EI();function AD($,I){let U=Object.assign({blockQuote:!0,commentString:PD.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},$.schema.toStringOptions,I),_;switch(U.collectionStyle){case"block":_=!1;break;case"flow":_=!0;break;default:_=null}return{anchors:new Set,doc:$,flowCollectionPadding:U.flowCollectionPadding?" ":"",indent:"",indentStep:typeof U.indent==="number"?" ".repeat(U.indent):" ",inFlow:_,options:U}}function bD($,I){if(I.tag){let u=$.filter((z)=>z.tag===I.tag);if(u.length>0)return u.find((z)=>z.format===I.format)??u[0]}let U=void 0,_;if(X6.isScalar(I)){_=I.value;let u=$.filter((z)=>z.identify?.(_));if(u.length>1){let z=u.filter((g)=>g.test);if(z.length>0)u=z}U=u.find((z)=>z.format===I.format)??u.find((z)=>!z.format)}else _=I,U=$.find((u)=>u.nodeClass&&_ instanceof u.nodeClass);if(!U){let u=_?.constructor?.name??(_===null?"null":typeof _);throw Error(`Tag not resolved for ${u} value`)}return U}function jD($,I,{anchors:U,doc:_}){if(!_.directives)return"";let u=[],z=(X6.isScalar($)||X6.isCollection($))&&$.anchor;if(z&&WD.anchorIsValid(z))U.add(z),u.push(`&${z}`);let g=$.tag??(I.default?null:I.tag);if(g)u.push(_.directives.tagString(g));return u.join(" ")}function FD($,I,U,_){if(X6.isPair($))return $.toString(I,U,_);if(X6.isAlias($)){if(I.doc.directives)return $.toString(I);if(I.resolvedAliases?.has($))throw TypeError("Cannot stringify circular structure without alias nodes");else{if(I.resolvedAliases)I.resolvedAliases.add($);else I.resolvedAliases=new Set([$]);$=$.resolve(I.doc)}}let u=void 0,z=X6.isNode($)?$:I.doc.createNode($,{onTagObj:(J)=>u=J});u??(u=bD(I.doc.schema.tags,z));let g=jD(z,u,I);if(g.length>0)I.indentAtStart=(I.indentAtStart??0)+g.length+1;let v=typeof u.stringify==="function"?u.stringify(z,I,U,_):X6.isScalar(z)?ZD.stringifyString(z,I,U,_):z.toString(I,U,_);if(!g)return v;return X6.isScalar(z)||v[0]==="{"||v[0]==="["?`${g} ${v}`:`${g}
60
+ ${I.indent}${v}`}SD.createStringifyContext=AD;SD.stringify=FD});var xX=E((fD)=>{var p4=$$(),CX=W$(),fX=CI(),fI=SI();function CD({key:$,value:I},U,_,u){let{allNullValues:z,doc:g,indent:v,indentStep:J,options:{commentString:N,indentSeq:X,simpleKeys:G}}=U,q=p4.isNode($)&&$.comment||null;if(G){if(q)throw Error("With simple keys, key nodes cannot have comments");if(p4.isCollection($)||!p4.isNode($)&&typeof $==="object")throw Error("With simple keys, collection cannot be used as a key value")}let T=!G&&(!$||q&&I==null&&!U.inFlow||p4.isCollection($)||(p4.isScalar($)?$.type===CX.Scalar.BLOCK_FOLDED||$.type===CX.Scalar.BLOCK_LITERAL:typeof $==="object"));U=Object.assign({},U,{allNullValues:!1,implicitKey:!T&&(G||!z),indent:v+J});let H=!1,Q=!1,Y=fX.stringify($,U,()=>H=!0,()=>Q=!0);if(!T&&!U.inFlow&&Y.length>1024){if(G)throw Error("With simple keys, single line scalar must not span more than 1024 characters");T=!0}if(U.inFlow){if(z||I==null){if(H&&_)_();return Y===""?"?":T?`? ${Y}`:Y}}else if(z&&!G||I==null&&T){if(Y=`? ${Y}`,q&&!H)Y+=fI.lineComment(Y,U.indent,N(q));else if(Q&&u)u();return Y}if(H)q=null;if(T){if(q)Y+=fI.lineComment(Y,U.indent,N(q));Y=`? ${Y}
61
+ ${v}:`}else if(Y=`${Y}:`,q)Y+=fI.lineComment(Y,U.indent,N(q));let M,L,P;if(p4.isNode(I))M=!!I.spaceBefore,L=I.commentBefore,P=I.comment;else if(M=!1,L=null,P=null,I&&typeof I==="object")I=g.createNode(I);if(U.implicitKey=!1,!T&&!q&&p4.isScalar(I))U.indentAtStart=Y.length+1;if(Q=!1,!X&&J.length>=2&&!U.inFlow&&!T&&p4.isSeq(I)&&!I.flow&&!I.tag&&!I.anchor)U.indent=U.indent.substring(2);let R=!1,K=fX.stringify(I,U,()=>R=!0,()=>Q=!0),V=" ";if(q||M||L){if(V=M?`
62
+ `:"",L){let B=N(L);V+=`
63
+ ${fI.indentComment(B,U.indent)}`}if(K===""&&!U.inFlow){if(V===`
64
+ `&&P)V=`
65
65
 
66
- `}else R+=`
67
- ${U.indent}`}else if(!T&&p4.isCollection(I)){let D=B[0],M=B.indexOf(`
68
- `),F=M!==-1,A=U.inFlow??I.flow??I.items.length===0;if(F||!A){let f=!1;if(F&&(D==="&"||D==="!")){let b=B.indexOf(" ");if(D==="&"&&b!==-1&&b<M&&B[b+1]==="!")b=B.indexOf(" ",b+1);if(b===-1||M<b)f=!0}if(!f)R=`
69
- ${U.indent}`}}else if(B===""||B[0]===`
70
- `)R="";if(Y+=R+B,U.inFlow){if(O&&_)_()}else if(P&&!O)Y+=EI.lineComment(Y,U.indent,N(P));else if(Q&&u)u();return Y}ED.stringifyPair=wD});var ug=E((kD)=>{var kX=g$("process");function fD($,...I){if($==="debug")console.log(...I)}function xD($,I){if($==="debug"||$==="warn")if(typeof kX.emitWarning==="function")kX.emitWarning(I);else console.warn(I)}kD.debug=fD;kD.warn=xD});var Ku=E((rD)=>{var CI=$$(),yX=W$(),Du="<<",Mu={identify:($)=>$===Du||typeof $==="symbol"&&$.description===Du,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new yX.Scalar(Symbol(Du)),{addToJSMap:iX}),stringify:()=>Du},nD=($,I)=>(Mu.identify(I)||CI.isScalar(I)&&(!I.type||I.type===yX.Scalar.PLAIN)&&Mu.identify(I.value))&&$?.doc.schema.tags.some((U)=>U.tag===Mu.tag&&U.default);function iX($,I,U){if(U=$&&CI.isAlias(U)?U.resolve($.doc):U,CI.isSeq(U))for(let _ of U.items)Ug($,I,_);else if(Array.isArray(U))for(let _ of U)Ug($,I,_);else Ug($,I,U)}function Ug($,I,U){let _=$&&CI.isAlias(U)?U.resolve($.doc):U;if(!CI.isMap(_))throw Error("Merge sources must be maps or map aliases");let u=_.toJSON(null,$,Map);for(let[g,z]of u)if(I instanceof Map){if(!I.has(g))I.set(g,z)}else if(I instanceof Set)I.add(g);else if(!Object.prototype.hasOwnProperty.call(I,g))Object.defineProperty(I,g,{value:z,writable:!0,enumerable:!0,configurable:!0});return I}rD.addMergeToJSMap=iX;rD.isMergeKey=nD;rD.merge=Mu});var gg=E((tD)=>{var cD=ug(),nX=Ku(),dD=wI(),rX=$$(),_g=N6();function pD($,I,{key:U,value:_}){if(rX.isNode(U)&&U.addToJSMap)U.addToJSMap($,I,_);else if(nX.isMergeKey($,U))nX.addMergeToJSMap($,I,_);else{let u=_g.toJS(U,"",$);if(I instanceof Map)I.set(u,_g.toJS(_,u,$));else if(I instanceof Set)I.add(u);else{let g=oD(U,u,$),z=_g.toJS(_,g,$);if(g in I)Object.defineProperty(I,g,{value:z,writable:!0,enumerable:!0,configurable:!0});else I[g]=z}}return I}function oD($,I,U){if(I===null)return"";if(typeof I!=="object")return String(I);if(rX.isNode($)&&U?.doc){let _=dD.createStringifyContext(U.doc,{});_.anchors=new Set;for(let g of U.anchors.keys())_.anchors.add(g.anchor);_.inFlow=!0,_.inStringifyKey=!0;let u=$.toString(_);if(!U.mapKeyWarned){let g=JSON.stringify(u);if(g.length>40)g=g.substring(0,36)+'..."';cD.warn(U.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${g}. Set mapAsMap: true to use object keys.`),U.mapKeyWarned=!0}return u}return JSON.stringify(I)}tD.addPairToJSMap=pD});var q6=E((IM)=>{var lX=bI(),eD=xX(),sD=gg(),Lu=$$();function $M($,I,U){let _=lX.createNode($,void 0,U),u=lX.createNode(I,void 0,U);return new Ru(_,u)}class Ru{constructor($,I=null){Object.defineProperty(this,Lu.NODE_TYPE,{value:Lu.PAIR}),this.key=$,this.value=I}clone($){let{key:I,value:U}=this;if(Lu.isNode(I))I=I.clone($);if(Lu.isNode(U))U=U.clone($);return new Ru(I,U)}toJSON($,I){let U=I?.mapAsMap?new Map:{};return sD.addPairToJSMap(I,U,this)}toString($,I,U){return $?.doc?eD.stringifyPair(this,$,I,U):JSON.stringify(this)}}IM.Pair=Ru;IM.createPair=$M});var zg=E((vM)=>{var n6=$$(),mX=wI(),Wu=jI();function _M($,I,U){return(I.inFlow??$.flow?zM:gM)($,I,U)}function gM({comment:$,items:I},U,{blockItemPrefix:_,flowChars:u,itemIndent:g,onChompKeep:z,onComment:v}){let{indent:J,options:{commentString:N}}=U,X=Object.assign({},U,{indent:g,type:null}),G=!1,q=[];for(let H=0;H<I.length;++H){let Q=I[H],Y=null;if(n6.isNode(Q)){if(!G&&Q.spaceBefore)q.push("");if(Pu(U,q,Q.commentBefore,G),Q.comment)Y=Q.comment}else if(n6.isPair(Q)){let L=n6.isNode(Q.key)?Q.key:null;if(L){if(!G&&L.spaceBefore)q.push("");Pu(U,q,L.commentBefore,G)}}G=!1;let K=mX.stringify(Q,X,()=>Y=null,()=>G=!0);if(Y)K+=Wu.lineComment(K,g,N(Y));if(G&&Y)G=!1;q.push(_+K)}let T;if(q.length===0)T=u.start+u.end;else{T=q[0];for(let H=1;H<q.length;++H){let Q=q[H];T+=Q?`
66
+ `}else V+=`
67
+ ${U.indent}`}else if(!T&&p4.isCollection(I)){let B=K[0],O=K.indexOf(`
68
+ `),b=O!==-1,A=U.inFlow??I.flow??I.items.length===0;if(b||!A){let f=!1;if(b&&(B==="&"||B==="!")){let j=K.indexOf(" ");if(B==="&"&&j!==-1&&j<O&&K[j+1]==="!")j=K.indexOf(" ",j+1);if(j===-1||O<j)f=!0}if(!f)V=`
69
+ ${U.indent}`}}else if(K===""||K[0]===`
70
+ `)V="";if(Y+=V+K,U.inFlow){if(R&&_)_()}else if(P&&!R)Y+=fI.lineComment(Y,U.indent,N(P));else if(Q&&u)u();return Y}fD.stringifyPair=CD});var _z=E((iD)=>{var kX=z$("process");function kD($,...I){if($==="debug")console.log(...I)}function yD($,I){if($==="debug"||$==="warn")if(typeof kX.emitWarning==="function")kX.emitWarning(I);else console.warn(I)}iD.debug=kD;iD.warn=yD});var Ru=E((mD)=>{var xI=$$(),yX=W$(),Mu="<<",Ku={identify:($)=>$===Mu||typeof $==="symbol"&&$.description===Mu,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new yX.Scalar(Symbol(Mu)),{addToJSMap:iX}),stringify:()=>Mu},lD=($,I)=>(Ku.identify(I)||xI.isScalar(I)&&(!I.type||I.type===yX.Scalar.PLAIN)&&Ku.identify(I.value))&&$?.doc.schema.tags.some((U)=>U.tag===Ku.tag&&U.default);function iX($,I,U){if(U=$&&xI.isAlias(U)?U.resolve($.doc):U,xI.isSeq(U))for(let _ of U.items)zz($,I,_);else if(Array.isArray(U))for(let _ of U)zz($,I,_);else zz($,I,U)}function zz($,I,U){let _=$&&xI.isAlias(U)?U.resolve($.doc):U;if(!xI.isMap(_))throw Error("Merge sources must be maps or map aliases");let u=_.toJSON(null,$,Map);for(let[z,g]of u)if(I instanceof Map){if(!I.has(z))I.set(z,g)}else if(I instanceof Set)I.add(z);else if(!Object.prototype.hasOwnProperty.call(I,z))Object.defineProperty(I,z,{value:g,writable:!0,enumerable:!0,configurable:!0});return I}mD.addMergeToJSMap=iX;mD.isMergeKey=lD;mD.merge=Ku});var vz=E((eD)=>{var pD=_z(),nX=Ru(),oD=CI(),rX=$$(),gz=N6();function tD($,I,{key:U,value:_}){if(rX.isNode(U)&&U.addToJSMap)U.addToJSMap($,I,_);else if(nX.isMergeKey($,U))nX.addMergeToJSMap($,I,_);else{let u=gz.toJS(U,"",$);if(I instanceof Map)I.set(u,gz.toJS(_,u,$));else if(I instanceof Set)I.add(u);else{let z=aD(U,u,$),g=gz.toJS(_,z,$);if(z in I)Object.defineProperty(I,z,{value:g,writable:!0,enumerable:!0,configurable:!0});else I[z]=g}}return I}function aD($,I,U){if(I===null)return"";if(typeof I!=="object")return String(I);if(rX.isNode($)&&U?.doc){let _=oD.createStringifyContext(U.doc,{});_.anchors=new Set;for(let z of U.anchors.keys())_.anchors.add(z.anchor);_.inFlow=!0,_.inStringifyKey=!0;let u=$.toString(_);if(!U.mapKeyWarned){let z=JSON.stringify(u);if(z.length>40)z=z.substring(0,36)+'..."';pD.warn(U.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${z}. Set mapAsMap: true to use object keys.`),U.mapKeyWarned=!0}return u}return JSON.stringify(I)}eD.addPairToJSMap=tD});var q6=E((UM)=>{var lX=FI(),$M=xX(),IM=vz(),Lu=$$();function uM($,I,U){let _=lX.createNode($,void 0,U),u=lX.createNode(I,void 0,U);return new Wu(_,u)}class Wu{constructor($,I=null){Object.defineProperty(this,Lu.NODE_TYPE,{value:Lu.PAIR}),this.key=$,this.value=I}clone($){let{key:I,value:U}=this;if(Lu.isNode(I))I=I.clone($);if(Lu.isNode(U))U=U.clone($);return new Wu(I,U)}toJSON($,I){let U=I?.mapAsMap?new Map:{};return IM.addPairToJSMap(I,U,this)}toString($,I,U){return $?.doc?$M.stringifyPair(this,$,I,U):JSON.stringify(this)}}UM.Pair=Wu;UM.createPair=uM});var Jz=E((NM)=>{var l6=$$(),mX=CI(),Pu=SI();function gM($,I,U){return(I.inFlow??$.flow?JM:vM)($,I,U)}function vM({comment:$,items:I},U,{blockItemPrefix:_,flowChars:u,itemIndent:z,onChompKeep:g,onComment:v}){let{indent:J,options:{commentString:N}}=U,X=Object.assign({},U,{indent:z,type:null}),G=!1,q=[];for(let H=0;H<I.length;++H){let Q=I[H],Y=null;if(l6.isNode(Q)){if(!G&&Q.spaceBefore)q.push("");if(Zu(U,q,Q.commentBefore,G),Q.comment)Y=Q.comment}else if(l6.isPair(Q)){let L=l6.isNode(Q.key)?Q.key:null;if(L){if(!G&&L.spaceBefore)q.push("");Zu(U,q,L.commentBefore,G)}}G=!1;let M=mX.stringify(Q,X,()=>Y=null,()=>G=!0);if(Y)M+=Pu.lineComment(M,z,N(Y));if(G&&Y)G=!1;q.push(_+M)}let T;if(q.length===0)T=u.start+u.end;else{T=q[0];for(let H=1;H<q.length;++H){let Q=q[H];T+=Q?`
71
71
  ${J}${Q}`:`
72
72
  `}}if($){if(T+=`
73
- `+Wu.indentComment(N($),J),v)v()}else if(G&&z)z();return T}function zM({items:$},I,{flowChars:U,itemIndent:_}){let{indent:u,indentStep:g,flowCollectionPadding:z,options:{commentString:v}}=I;_+=g;let J=Object.assign({},I,{indent:_,inFlow:!0,type:null}),N=!1,X=0,G=[];for(let H=0;H<$.length;++H){let Q=$[H],Y=null;if(n6.isNode(Q)){if(Q.spaceBefore)G.push("");if(Pu(I,G,Q.commentBefore,!1),Q.comment)Y=Q.comment}else if(n6.isPair(Q)){let L=n6.isNode(Q.key)?Q.key:null;if(L){if(L.spaceBefore)G.push("");if(Pu(I,G,L.commentBefore,!1),L.comment)N=!0}let P=n6.isNode(Q.value)?Q.value:null;if(P){if(P.comment)Y=P.comment;if(P.commentBefore)N=!0}else if(Q.value==null&&L?.comment)Y=L.comment}if(Y)N=!0;let K=mX.stringify(Q,J,()=>Y=null);if(H<$.length-1)K+=",";if(Y)K+=Wu.lineComment(K,_,v(Y));if(!N&&(G.length>X||K.includes(`
74
- `)))N=!0;G.push(K),X=G.length}let{start:q,end:T}=U;if(G.length===0)return q+T;else{if(!N){let H=G.reduce((Q,Y)=>Q+Y.length+2,2);N=I.options.lineWidth>0&&H>I.options.lineWidth}if(N){let H=q;for(let Q of G)H+=Q?`
75
- ${g}${u}${Q}`:`
73
+ `+Pu.indentComment(N($),J),v)v()}else if(G&&g)g();return T}function JM({items:$},I,{flowChars:U,itemIndent:_}){let{indent:u,indentStep:z,flowCollectionPadding:g,options:{commentString:v}}=I;_+=z;let J=Object.assign({},I,{indent:_,inFlow:!0,type:null}),N=!1,X=0,G=[];for(let H=0;H<$.length;++H){let Q=$[H],Y=null;if(l6.isNode(Q)){if(Q.spaceBefore)G.push("");if(Zu(I,G,Q.commentBefore,!1),Q.comment)Y=Q.comment}else if(l6.isPair(Q)){let L=l6.isNode(Q.key)?Q.key:null;if(L){if(L.spaceBefore)G.push("");if(Zu(I,G,L.commentBefore,!1),L.comment)N=!0}let P=l6.isNode(Q.value)?Q.value:null;if(P){if(P.comment)Y=P.comment;if(P.commentBefore)N=!0}else if(Q.value==null&&L?.comment)Y=L.comment}if(Y)N=!0;let M=mX.stringify(Q,J,()=>Y=null);if(H<$.length-1)M+=",";if(Y)M+=Pu.lineComment(M,_,v(Y));if(!N&&(G.length>X||M.includes(`
74
+ `)))N=!0;G.push(M),X=G.length}let{start:q,end:T}=U;if(G.length===0)return q+T;else{if(!N){let H=G.reduce((Q,Y)=>Q+Y.length+2,2);N=I.options.lineWidth>0&&H>I.options.lineWidth}if(N){let H=q;for(let Q of G)H+=Q?`
75
+ ${z}${u}${Q}`:`
76
76
  `;return`${H}
77
- ${u}${T}`}else return`${q}${z}${G.join(" ")}${z}${T}`}}function Pu({indent:$,options:{commentString:I}},U,_,u){if(_&&u)_=_.replace(/^\n+/,"");if(_){let g=Wu.indentComment(I(_),$);U.push(g.trimStart())}}vM.stringifyCollection=_M});var T6=E((QM)=>{var NM=zg(),GM=gg(),XM=Yu(),Q6=$$(),Zu=q6(),qM=W$();function fI($,I){let U=Q6.isScalar(I)?I.value:I;for(let _ of $)if(Q6.isPair(_)){if(_.key===I||_.key===U)return _;if(Q6.isScalar(_.key)&&_.key.value===U)return _}return}class hX extends XM.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor($){super(Q6.MAP,$);this.items=[]}static from($,I,U){let{keepUndefined:_,replacer:u}=U,g=new this($),z=(v,J)=>{if(typeof u==="function")J=u.call(I,v,J);else if(Array.isArray(u)&&!u.includes(v))return;if(J!==void 0||_)g.items.push(Zu.createPair(v,J,U))};if(I instanceof Map)for(let[v,J]of I)z(v,J);else if(I&&typeof I==="object")for(let v of Object.keys(I))z(v,I[v]);if(typeof $.sortMapEntries==="function")g.items.sort($.sortMapEntries);return g}add($,I){let U;if(Q6.isPair($))U=$;else if(!$||typeof $!=="object"||!("key"in $))U=new Zu.Pair($,$?.value);else U=new Zu.Pair($.key,$.value);let _=fI(this.items,U.key),u=this.schema?.sortMapEntries;if(_){if(!I)throw Error(`Key ${U.key} already set`);if(Q6.isScalar(_.value)&&qM.isScalarValue(U.value))_.value.value=U.value;else _.value=U.value}else if(u){let g=this.items.findIndex((z)=>u(U,z)<0);if(g===-1)this.items.push(U);else this.items.splice(g,0,U)}else this.items.push(U)}delete($){let I=fI(this.items,$);if(!I)return!1;return this.items.splice(this.items.indexOf(I),1).length>0}get($,I){let _=fI(this.items,$)?.value;return(!I&&Q6.isScalar(_)?_.value:_)??void 0}has($){return!!fI(this.items,$)}set($,I){this.add(new Zu.Pair($,I),!0)}toJSON($,I,U){let _=U?new U:I?.mapAsMap?new Map:{};if(I?.onCreate)I.onCreate(_);for(let u of this.items)GM.addPairToJSMap(I,_,u);return _}toString($,I,U){if(!$)return JSON.stringify(this);for(let _ of this.items)if(!Q6.isPair(_))throw Error(`Map items must all be pairs; found ${JSON.stringify(_)} instead`);if(!$.allNullValues&&this.hasAllNullValues(!1))$=Object.assign({},$,{allNullValues:!0});return NM.stringifyCollection(this,$,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:$.indent||"",onChompKeep:U,onComment:I})}}QM.YAMLMap=hX;QM.findPair=fI});var P1=E((VM)=>{var YM=$$(),cX=T6(),OM={collection:"map",default:!0,nodeClass:cX.YAMLMap,tag:"tag:yaml.org,2002:map",resolve($,I){if(!YM.isMap($))I("Expected a mapping for this tag");return $},createNode:($,I,U)=>cX.YAMLMap.from($,I,U)};VM.map=OM});var H6=E((WM)=>{var DM=bI(),MM=zg(),KM=Yu(),bu=$$(),LM=W$(),RM=N6();class dX extends KM.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor($){super(bu.SEQ,$);this.items=[]}add($){this.items.push($)}delete($){let I=Au($);if(typeof I!=="number")return!1;return this.items.splice(I,1).length>0}get($,I){let U=Au($);if(typeof U!=="number")return;let _=this.items[U];return!I&&bu.isScalar(_)?_.value:_}has($){let I=Au($);return typeof I==="number"&&I<this.items.length}set($,I){let U=Au($);if(typeof U!=="number")throw Error(`Expected a valid index, not ${$}.`);let _=this.items[U];if(bu.isScalar(_)&&LM.isScalarValue(I))_.value=I;else this.items[U]=I}toJSON($,I){let U=[];if(I?.onCreate)I.onCreate(U);let _=0;for(let u of this.items)U.push(RM.toJS(u,String(_++),I));return U}toString($,I,U){if(!$)return JSON.stringify(this);return MM.stringifyCollection(this,$,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:($.indent||"")+" ",onChompKeep:U,onComment:I})}static from($,I,U){let{replacer:_}=U,u=new this($);if(I&&Symbol.iterator in Object(I)){let g=0;for(let z of I){if(typeof _==="function"){let v=I instanceof Set?z:String(g++);z=_.call(I,v,z)}u.items.push(DM.createNode(z,void 0,U))}}return u}}function Au($){let I=bu.isScalar($)?$.value:$;if(I&&typeof I==="string")I=Number(I);return typeof I==="number"&&Number.isInteger(I)&&I>=0?I:null}WM.YAMLSeq=dX});var Z1=E((bM)=>{var ZM=$$(),pX=H6(),AM={collection:"seq",default:!0,nodeClass:pX.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve($,I){if(!ZM.isSeq($))I("Expected a sequence for this tag");return $},createNode:($,I,U)=>pX.YAMLSeq.from($,I,U)};bM.seq=AM});var xI=E((wM)=>{var FM=SI(),SM={identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify($,I,U,_){return I=Object.assign({actualString:!0},I),FM.stringifyString($,I,U,_)}};wM.string=SM});var ju=E((CM)=>{var oX=W$(),tX={identify:($)=>$==null,createNode:()=>new oX.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new oX.Scalar(null),stringify:({source:$},I)=>typeof $==="string"&&tX.test.test($)?$:I.options.nullStr};CM.nullTag=tX});var vg=E((kM)=>{var xM=W$(),aX={identify:($)=>typeof $==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:($)=>new xM.Scalar($[0]==="t"||$[0]==="T"),stringify({source:$,value:I},U){if($&&aX.test.test($)){let _=$[0]==="t"||$[0]==="T";if(I===_)return $}return I?U.options.trueStr:U.options.falseStr}};kM.boolTag=aX});var A1=E((nM)=>{function iM({format:$,minFractionDigits:I,tag:U,value:_}){if(typeof _==="bigint")return String(_);let u=typeof _==="number"?_:Number(_);if(!isFinite(u))return isNaN(u)?".nan":u<0?"-.inf":".inf";let g=Object.is(_,-0)?"-0":JSON.stringify(_);if(!$&&I&&(!U||U==="tag:yaml.org,2002:float")&&/^\d/.test(g)){let z=g.indexOf(".");if(z<0)z=g.length,g+=".";let v=I-(g.length-z-1);while(v-- >0)g+="0"}return g}nM.stringifyNumber=iM});var Ng=E((dM)=>{var lM=W$(),Jg=A1(),mM={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:($)=>$.slice(-3).toLowerCase()==="nan"?NaN:$[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Jg.stringifyNumber},hM={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:($)=>parseFloat($),stringify($){let I=Number($.value);return isFinite(I)?I.toExponential():Jg.stringifyNumber($)}},cM={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve($){let I=new lM.Scalar(parseFloat($)),U=$.indexOf(".");if(U!==-1&&$[$.length-1]==="0")I.minFractionDigits=$.length-U-1;return I},stringify:Jg.stringifyNumber};dM.float=cM;dM.floatExp=hM;dM.floatNaN=mM});var Xg=E(($K)=>{var eX=A1(),Fu=($)=>typeof $==="bigint"||Number.isInteger($),Gg=($,I,U,{intAsBigInt:_})=>_?BigInt($):parseInt($.substring(I),U);function sX($,I,U){let{value:_}=$;if(Fu(_)&&_>=0)return U+_.toString(I);return eX.stringifyNumber($)}var aM={identify:($)=>Fu($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:($,I,U)=>Gg($,2,8,U),stringify:($)=>sX($,8,"0o")},eM={identify:Fu,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:($,I,U)=>Gg($,0,10,U),stringify:eX.stringifyNumber},sM={identify:($)=>Fu($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:($,I,U)=>Gg($,2,16,U),stringify:($)=>sX($,16,"0x")};$K.int=eM;$K.intHex=sM;$K.intOct=aM});var $q=E((GK)=>{var _K=P1(),gK=ju(),zK=Z1(),vK=xI(),JK=vg(),qg=Ng(),Qg=Xg(),NK=[_K.map,zK.seq,vK.string,gK.nullTag,JK.boolTag,Qg.intOct,Qg.int,Qg.intHex,qg.floatNaN,qg.floatExp,qg.float];GK.schema=NK});var uq=E((VK)=>{var qK=W$(),QK=P1(),TK=Z1();function Iq($){return typeof $==="bigint"||Number.isInteger($)}var Su=({value:$})=>JSON.stringify($),HK=[{identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify:Su},{identify:($)=>$==null,createNode:()=>new qK.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Su},{identify:($)=>typeof $==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:($)=>$==="true",stringify:Su},{identify:Iq,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:($,I,{intAsBigInt:U})=>U?BigInt($):parseInt($,10),stringify:({value:$})=>Iq($)?$.toString():JSON.stringify($)},{identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:($)=>parseFloat($),stringify:Su}],YK={default:!0,tag:"",test:/^/,resolve($,I){return I(`Unresolved plain scalar ${JSON.stringify($)}`),$}},OK=[QK.map,TK.seq].concat(HK,YK);VK.schema=OK});var Hg=E((KK)=>{var kI=g$("buffer"),Tg=W$(),DK=SI(),MK={identify:($)=>$ instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve($,I){if(typeof kI.Buffer==="function")return kI.Buffer.from($,"base64");else if(typeof atob==="function"){let U=atob($.replace(/[\n\r]/g,"")),_=new Uint8Array(U.length);for(let u=0;u<U.length;++u)_[u]=U.charCodeAt(u);return _}else return I("This environment does not support reading binary tags; either Buffer or atob is required"),$},stringify({comment:$,type:I,value:U},_,u,g){if(!U)return"";let z=U,v;if(typeof kI.Buffer==="function")v=z instanceof kI.Buffer?z.toString("base64"):kI.Buffer.from(z.buffer).toString("base64");else if(typeof btoa==="function"){let J="";for(let N=0;N<z.length;++N)J+=String.fromCharCode(z[N]);v=btoa(J)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(I??(I=Tg.Scalar.BLOCK_LITERAL),I!==Tg.Scalar.QUOTE_DOUBLE){let J=Math.max(_.options.lineWidth-_.indent.length,_.options.minContentWidth),N=Math.ceil(v.length/J),X=Array(N);for(let G=0,q=0;G<N;++G,q+=J)X[G]=v.substr(q,J);v=X.join(I===Tg.Scalar.BLOCK_LITERAL?`
78
- `:" ")}return DK.stringifyString({comment:$,type:I,value:v},_,u,g)}};KK.binary=MK});var Eu=E((ZK)=>{var wu=$$(),Yg=q6(),RK=W$(),WK=H6();function Uq($,I){if(wu.isSeq($))for(let U=0;U<$.items.length;++U){let _=$.items[U];if(wu.isPair(_))continue;else if(wu.isMap(_)){if(_.items.length>1)I("Each pair must have its own sequence indicator");let u=_.items[0]||new Yg.Pair(new RK.Scalar(null));if(_.commentBefore)u.key.commentBefore=u.key.commentBefore?`${_.commentBefore}
79
- ${u.key.commentBefore}`:_.commentBefore;if(_.comment){let g=u.value??u.key;g.comment=g.comment?`${_.comment}
80
- ${g.comment}`:_.comment}_=u}$.items[U]=wu.isPair(_)?_:new Yg.Pair(_)}else I("Expected a sequence for this tag");return $}function _q($,I,U){let{replacer:_}=U,u=new WK.YAMLSeq($);u.tag="tag:yaml.org,2002:pairs";let g=0;if(I&&Symbol.iterator in Object(I))for(let z of I){if(typeof _==="function")z=_.call(I,String(g++),z);let v,J;if(Array.isArray(z))if(z.length===2)v=z[0],J=z[1];else throw TypeError(`Expected [key, value] tuple: ${z}`);else if(z&&z instanceof Object){let N=Object.keys(z);if(N.length===1)v=N[0],J=z[v];else throw TypeError(`Expected tuple with one key, not ${N.length} keys`)}else v=z;u.items.push(Yg.createPair(v,J,U))}return u}var PK={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Uq,createNode:_q};ZK.createPairs=_q;ZK.pairs=PK;ZK.resolvePairs=Uq});var Vg=E((wK)=>{var gq=$$(),Og=N6(),yI=T6(),FK=H6(),zq=Eu();class r6 extends FK.YAMLSeq{constructor(){super();this.add=yI.YAMLMap.prototype.add.bind(this),this.delete=yI.YAMLMap.prototype.delete.bind(this),this.get=yI.YAMLMap.prototype.get.bind(this),this.has=yI.YAMLMap.prototype.has.bind(this),this.set=yI.YAMLMap.prototype.set.bind(this),this.tag=r6.tag}toJSON($,I){if(!I)return super.toJSON($);let U=new Map;if(I?.onCreate)I.onCreate(U);for(let _ of this.items){let u,g;if(gq.isPair(_))u=Og.toJS(_.key,"",I),g=Og.toJS(_.value,u,I);else u=Og.toJS(_,"",I);if(U.has(u))throw Error("Ordered maps must not include duplicate keys");U.set(u,g)}return U}static from($,I,U){let _=zq.createPairs($,I,U),u=new this;return u.items=_.items,u}}r6.tag="tag:yaml.org,2002:omap";var SK={collection:"seq",identify:($)=>$ instanceof Map,nodeClass:r6,default:!1,tag:"tag:yaml.org,2002:omap",resolve($,I){let U=zq.resolvePairs($,I),_=[];for(let{key:u}of U.items)if(gq.isScalar(u))if(_.includes(u.value))I(`Ordered maps must not include duplicate keys: ${u.value}`);else _.push(u.value);return Object.assign(new r6,U)},createNode:($,I,U)=>r6.from($,I,U)};wK.YAMLOMap=r6;wK.omap=SK});var Xq=E((fK)=>{var vq=W$();function Jq({value:$,source:I},U){if(I&&($?Nq:Gq).test.test(I))return I;return $?U.options.trueStr:U.options.falseStr}var Nq={identify:($)=>$===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new vq.Scalar(!0),stringify:Jq},Gq={identify:($)=>$===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new vq.Scalar(!1),stringify:Jq};fK.falseTag=Gq;fK.trueTag=Nq});var qq=E((lK)=>{var yK=W$(),Bg=A1(),iK={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:($)=>$.slice(-3).toLowerCase()==="nan"?NaN:$[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Bg.stringifyNumber},nK={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:($)=>parseFloat($.replace(/_/g,"")),stringify($){let I=Number($.value);return isFinite(I)?I.toExponential():Bg.stringifyNumber($)}},rK={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve($){let I=new yK.Scalar(parseFloat($.replace(/_/g,""))),U=$.indexOf(".");if(U!==-1){let _=$.substring(U+1).replace(/_/g,"");if(_[_.length-1]==="0")I.minFractionDigits=_.length}return I},stringify:Bg.stringifyNumber};lK.float=rK;lK.floatExp=nK;lK.floatNaN=iK});var Tq=E((aK)=>{var Qq=A1(),iI=($)=>typeof $==="bigint"||Number.isInteger($);function Cu($,I,U,{intAsBigInt:_}){let u=$[0];if(u==="-"||u==="+")I+=1;if($=$.substring(I).replace(/_/g,""),_){switch(U){case 2:$=`0b${$}`;break;case 8:$=`0o${$}`;break;case 16:$=`0x${$}`;break}let z=BigInt($);return u==="-"?BigInt(-1)*z:z}let g=parseInt($,U);return u==="-"?-1*g:g}function Dg($,I,U){let{value:_}=$;if(iI(_)){let u=_.toString(I);return _<0?"-"+U+u.substr(1):U+u}return Qq.stringifyNumber($)}var dK={identify:iI,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:($,I,U)=>Cu($,2,2,U),stringify:($)=>Dg($,2,"0b")},pK={identify:iI,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:($,I,U)=>Cu($,1,8,U),stringify:($)=>Dg($,8,"0")},oK={identify:iI,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:($,I,U)=>Cu($,0,10,U),stringify:Qq.stringifyNumber},tK={identify:iI,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:($,I,U)=>Cu($,2,16,U),stringify:($)=>Dg($,16,"0x")};aK.int=oK;aK.intBin=dK;aK.intHex=tK;aK.intOct=pK});var Mg=E((UL)=>{var ku=$$(),fu=q6(),xu=T6();class l6 extends xu.YAMLMap{constructor($){super($);this.tag=l6.tag}add($){let I;if(ku.isPair($))I=$;else if($&&typeof $==="object"&&"key"in $&&"value"in $&&$.value===null)I=new fu.Pair($.key,null);else I=new fu.Pair($,null);if(!xu.findPair(this.items,I.key))this.items.push(I)}get($,I){let U=xu.findPair(this.items,$);return!I&&ku.isPair(U)?ku.isScalar(U.key)?U.key.value:U.key:U}set($,I){if(typeof I!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof I}`);let U=xu.findPair(this.items,$);if(U&&!I)this.items.splice(this.items.indexOf(U),1);else if(!U&&I)this.items.push(new fu.Pair($))}toJSON($,I){return super.toJSON($,I,Set)}toString($,I,U){if(!$)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},$,{allNullValues:!0}),I,U);else throw Error("Set items must all have null values")}static from($,I,U){let{replacer:_}=U,u=new this($);if(I&&Symbol.iterator in Object(I))for(let g of I){if(typeof _==="function")g=_.call(I,g,g);u.items.push(fu.createPair(g,null,U))}return u}}l6.tag="tag:yaml.org,2002:set";var uL={collection:"map",identify:($)=>$ instanceof Set,nodeClass:l6,default:!1,tag:"tag:yaml.org,2002:set",createNode:($,I,U)=>l6.from($,I,U),resolve($,I){if(ku.isMap($))if($.hasAllNullValues(!0))return Object.assign(new l6,$);else I("Set items must all have null values");else I("Expected a mapping for this tag");return $}};UL.YAMLSet=l6;UL.set=uL});var Lg=E((NL)=>{var zL=A1();function Kg($,I){let U=$[0],_=U==="-"||U==="+"?$.substring(1):$,u=(z)=>I?BigInt(z):Number(z),g=_.replace(/_/g,"").split(":").reduce((z,v)=>z*u(60)+u(v),u(0));return U==="-"?u(-1)*g:g}function Hq($){let{value:I}=$,U=(z)=>z;if(typeof I==="bigint")U=(z)=>BigInt(z);else if(isNaN(I)||!isFinite(I))return zL.stringifyNumber($);let _="";if(I<0)_="-",I*=U(-1);let u=U(60),g=[I%u];if(I<60)g.unshift(0);else if(I=(I-g[0])/u,g.unshift(I%u),I>=60)I=(I-g[0])/u,g.unshift(I);return _+g.map((z)=>String(z).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var vL={identify:($)=>typeof $==="bigint"||Number.isInteger($),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:($,I,{intAsBigInt:U})=>Kg($,U),stringify:Hq},JL={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:($)=>Kg($,!1),stringify:Hq},Yq={identify:($)=>$ 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($){let I=$.match(Yq.test);if(!I)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,U,_,u,g,z,v]=I.map(Number),J=I[7]?Number((I[7]+"00").substr(1,3)):0,N=Date.UTC(U,_-1,u,g||0,z||0,v||0,J),X=I[8];if(X&&X!=="Z"){let G=Kg(X,!1);if(Math.abs(G)<30)G*=60;N-=60000*G}return new Date(N)},stringify:({value:$})=>$?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};NL.floatTime=JL;NL.intTime=vL;NL.timestamp=Yq});var Vq=E((LL)=>{var QL=P1(),TL=ju(),HL=Z1(),YL=xI(),OL=Hg(),Oq=Xq(),Rg=qq(),yu=Tq(),VL=Ku(),BL=Vg(),DL=Eu(),ML=Mg(),Wg=Lg(),KL=[QL.map,HL.seq,YL.string,TL.nullTag,Oq.trueTag,Oq.falseTag,yu.intBin,yu.intOct,yu.int,yu.intHex,Rg.floatNaN,Rg.floatExp,Rg.float,OL.binary,VL.merge,BL.omap,DL.pairs,ML.set,Wg.intTime,Wg.floatTime,Wg.timestamp];LL.schema=KL});var Aq=E((SL)=>{var Kq=P1(),WL=ju(),Lq=Z1(),PL=xI(),ZL=vg(),Pg=Ng(),Zg=Xg(),AL=$q(),bL=uq(),Rq=Hg(),nI=Ku(),Wq=Vg(),Pq=Eu(),Bq=Vq(),Zq=Mg(),iu=Lg(),Dq=new Map([["core",AL.schema],["failsafe",[Kq.map,Lq.seq,PL.string]],["json",bL.schema],["yaml11",Bq.schema],["yaml-1.1",Bq.schema]]),Mq={binary:Rq.binary,bool:ZL.boolTag,float:Pg.float,floatExp:Pg.floatExp,floatNaN:Pg.floatNaN,floatTime:iu.floatTime,int:Zg.int,intHex:Zg.intHex,intOct:Zg.intOct,intTime:iu.intTime,map:Kq.map,merge:nI.merge,null:WL.nullTag,omap:Wq.omap,pairs:Pq.pairs,seq:Lq.seq,set:Zq.set,timestamp:iu.timestamp},jL={"tag:yaml.org,2002:binary":Rq.binary,"tag:yaml.org,2002:merge":nI.merge,"tag:yaml.org,2002:omap":Wq.omap,"tag:yaml.org,2002:pairs":Pq.pairs,"tag:yaml.org,2002:set":Zq.set,"tag:yaml.org,2002:timestamp":iu.timestamp};function FL($,I,U){let _=Dq.get(I);if(_&&!$)return U&&!_.includes(nI.merge)?_.concat(nI.merge):_.slice();let u=_;if(!u)if(Array.isArray($))u=[];else{let g=Array.from(Dq.keys()).filter((z)=>z!=="yaml11").map((z)=>JSON.stringify(z)).join(", ");throw Error(`Unknown schema "${I}"; use one of ${g} or define customTags array`)}if(Array.isArray($))for(let g of $)u=u.concat(g);else if(typeof $==="function")u=$(u.slice());if(U)u=u.concat(nI.merge);return u.reduce((g,z)=>{let v=typeof z==="string"?Mq[z]:z;if(!v){let J=JSON.stringify(z),N=Object.keys(Mq).map((X)=>JSON.stringify(X)).join(", ");throw Error(`Unknown custom tag ${J}; use one of ${N}`)}if(!g.includes(v))g.push(v);return g},[])}SL.coreKnownTags=jL;SL.getTags=FL});var jg=E((yL)=>{var Ag=$$(),CL=P1(),fL=Z1(),xL=xI(),nu=Aq(),kL=($,I)=>$.key<I.key?-1:$.key>I.key?1:0;class bg{constructor({compat:$,customTags:I,merge:U,resolveKnownTags:_,schema:u,sortMapEntries:g,toStringDefaults:z}){this.compat=Array.isArray($)?nu.getTags($,"compat"):$?nu.getTags(null,$):null,this.name=typeof u==="string"&&u||"core",this.knownTags=_?nu.coreKnownTags:{},this.tags=nu.getTags(I,this.name,U),this.toStringOptions=z??null,Object.defineProperty(this,Ag.MAP,{value:CL.map}),Object.defineProperty(this,Ag.SCALAR,{value:xL.string}),Object.defineProperty(this,Ag.SEQ,{value:fL.seq}),this.sortMapEntries=typeof g==="function"?g:g===!0?kL:null}clone(){let $=Object.create(bg.prototype,Object.getOwnPropertyDescriptors(this));return $.tags=this.tags.slice(),$}}yL.Schema=bg});var bq=E((lL)=>{var nL=$$(),Fg=wI(),rI=jI();function rL($,I){let U=[],_=I.directives===!0;if(I.directives!==!1&&$.directives){let J=$.directives.toString($);if(J)U.push(J),_=!0;else if($.directives.docStart)_=!0}if(_)U.push("---");let u=Fg.createStringifyContext($,I),{commentString:g}=u.options;if($.commentBefore){if(U.length!==1)U.unshift("");let J=g($.commentBefore);U.unshift(rI.indentComment(J,""))}let z=!1,v=null;if($.contents){if(nL.isNode($.contents)){if($.contents.spaceBefore&&_)U.push("");if($.contents.commentBefore){let X=g($.contents.commentBefore);U.push(rI.indentComment(X,""))}u.forceBlockIndent=!!$.comment,v=$.contents.comment}let J=v?void 0:()=>z=!0,N=Fg.stringify($.contents,u,()=>v=null,J);if(v)N+=rI.lineComment(N,"",g(v));if((N[0]==="|"||N[0]===">")&&U[U.length-1]==="---")U[U.length-1]=`--- ${N}`;else U.push(N)}else U.push(Fg.stringify($.contents,u));if($.directives?.docEnd)if($.comment){let J=g($.comment);if(J.includes(`
81
- `))U.push("..."),U.push(rI.indentComment(J,""));else U.push(`... ${J}`)}else U.push("...");else{let J=$.comment;if(J&&z)J=J.replace(/^\n+/,"");if(J){if((!z||v)&&U[U.length-1]!=="")U.push("");U.push(rI.indentComment(g(J),""))}}return U.join(`
77
+ ${u}${T}`}else return`${q}${g}${G.join(" ")}${g}${T}`}}function Zu({indent:$,options:{commentString:I}},U,_,u){if(_&&u)_=_.replace(/^\n+/,"");if(_){let z=Pu.indentComment(I(_),$);U.push(z.trimStart())}}NM.stringifyCollection=gM});var T6=E((HM)=>{var XM=Jz(),qM=vz(),QM=Ou(),Q6=$$(),Au=q6(),TM=W$();function kI($,I){let U=Q6.isScalar(I)?I.value:I;for(let _ of $)if(Q6.isPair(_)){if(_.key===I||_.key===U)return _;if(Q6.isScalar(_.key)&&_.key.value===U)return _}return}class hX extends QM.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor($){super(Q6.MAP,$);this.items=[]}static from($,I,U){let{keepUndefined:_,replacer:u}=U,z=new this($),g=(v,J)=>{if(typeof u==="function")J=u.call(I,v,J);else if(Array.isArray(u)&&!u.includes(v))return;if(J!==void 0||_)z.items.push(Au.createPair(v,J,U))};if(I instanceof Map)for(let[v,J]of I)g(v,J);else if(I&&typeof I==="object")for(let v of Object.keys(I))g(v,I[v]);if(typeof $.sortMapEntries==="function")z.items.sort($.sortMapEntries);return z}add($,I){let U;if(Q6.isPair($))U=$;else if(!$||typeof $!=="object"||!("key"in $))U=new Au.Pair($,$?.value);else U=new Au.Pair($.key,$.value);let _=kI(this.items,U.key),u=this.schema?.sortMapEntries;if(_){if(!I)throw Error(`Key ${U.key} already set`);if(Q6.isScalar(_.value)&&TM.isScalarValue(U.value))_.value.value=U.value;else _.value=U.value}else if(u){let z=this.items.findIndex((g)=>u(U,g)<0);if(z===-1)this.items.push(U);else this.items.splice(z,0,U)}else this.items.push(U)}delete($){let I=kI(this.items,$);if(!I)return!1;return this.items.splice(this.items.indexOf(I),1).length>0}get($,I){let _=kI(this.items,$)?.value;return(!I&&Q6.isScalar(_)?_.value:_)??void 0}has($){return!!kI(this.items,$)}set($,I){this.add(new Au.Pair($,I),!0)}toJSON($,I,U){let _=U?new U:I?.mapAsMap?new Map:{};if(I?.onCreate)I.onCreate(_);for(let u of this.items)qM.addPairToJSMap(I,_,u);return _}toString($,I,U){if(!$)return JSON.stringify(this);for(let _ of this.items)if(!Q6.isPair(_))throw Error(`Map items must all be pairs; found ${JSON.stringify(_)} instead`);if(!$.allNullValues&&this.hasAllNullValues(!1))$=Object.assign({},$,{allNullValues:!0});return XM.stringifyCollection(this,$,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:$.indent||"",onChompKeep:U,onComment:I})}}HM.YAMLMap=hX;HM.findPair=kI});var Z1=E((DM)=>{var VM=$$(),cX=T6(),BM={collection:"map",default:!0,nodeClass:cX.YAMLMap,tag:"tag:yaml.org,2002:map",resolve($,I){if(!VM.isMap($))I("Expected a mapping for this tag");return $},createNode:($,I,U)=>cX.YAMLMap.from($,I,U)};DM.map=BM});var H6=E((ZM)=>{var KM=FI(),RM=Jz(),LM=Ou(),ju=$$(),WM=W$(),PM=N6();class dX extends LM.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor($){super(ju.SEQ,$);this.items=[]}add($){this.items.push($)}delete($){let I=bu($);if(typeof I!=="number")return!1;return this.items.splice(I,1).length>0}get($,I){let U=bu($);if(typeof U!=="number")return;let _=this.items[U];return!I&&ju.isScalar(_)?_.value:_}has($){let I=bu($);return typeof I==="number"&&I<this.items.length}set($,I){let U=bu($);if(typeof U!=="number")throw Error(`Expected a valid index, not ${$}.`);let _=this.items[U];if(ju.isScalar(_)&&WM.isScalarValue(I))_.value=I;else this.items[U]=I}toJSON($,I){let U=[];if(I?.onCreate)I.onCreate(U);let _=0;for(let u of this.items)U.push(PM.toJS(u,String(_++),I));return U}toString($,I,U){if(!$)return JSON.stringify(this);return RM.stringifyCollection(this,$,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:($.indent||"")+" ",onChompKeep:U,onComment:I})}static from($,I,U){let{replacer:_}=U,u=new this($);if(I&&Symbol.iterator in Object(I)){let z=0;for(let g of I){if(typeof _==="function"){let v=I instanceof Set?g:String(z++);g=_.call(I,v,g)}u.items.push(KM.createNode(g,void 0,U))}}return u}}function bu($){let I=ju.isScalar($)?$.value:$;if(I&&typeof I==="string")I=Number(I);return typeof I==="number"&&Number.isInteger(I)&&I>=0?I:null}ZM.YAMLSeq=dX});var A1=E((FM)=>{var bM=$$(),pX=H6(),jM={collection:"seq",default:!0,nodeClass:pX.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve($,I){if(!bM.isSeq($))I("Expected a sequence for this tag");return $},createNode:($,I,U)=>pX.YAMLSeq.from($,I,U)};FM.seq=jM});var yI=E((CM)=>{var wM=EI(),EM={identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify($,I,U,_){return I=Object.assign({actualString:!0},I),wM.stringifyString($,I,U,_)}};CM.string=EM});var Fu=E((xM)=>{var oX=W$(),tX={identify:($)=>$==null,createNode:()=>new oX.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new oX.Scalar(null),stringify:({source:$},I)=>typeof $==="string"&&tX.test.test($)?$:I.options.nullStr};xM.nullTag=tX});var Nz=E((iM)=>{var yM=W$(),aX={identify:($)=>typeof $==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:($)=>new yM.Scalar($[0]==="t"||$[0]==="T"),stringify({source:$,value:I},U){if($&&aX.test.test($)){let _=$[0]==="t"||$[0]==="T";if(I===_)return $}return I?U.options.trueStr:U.options.falseStr}};iM.boolTag=aX});var b1=E((lM)=>{function rM({format:$,minFractionDigits:I,tag:U,value:_}){if(typeof _==="bigint")return String(_);let u=typeof _==="number"?_:Number(_);if(!isFinite(u))return isNaN(u)?".nan":u<0?"-.inf":".inf";let z=Object.is(_,-0)?"-0":JSON.stringify(_);if(!$&&I&&(!U||U==="tag:yaml.org,2002:float")&&/^\d/.test(z)){let g=z.indexOf(".");if(g<0)g=z.length,z+=".";let v=I-(z.length-g-1);while(v-- >0)z+="0"}return z}lM.stringifyNumber=rM});var Xz=E((oM)=>{var hM=W$(),Gz=b1(),cM={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:($)=>$.slice(-3).toLowerCase()==="nan"?NaN:$[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Gz.stringifyNumber},dM={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:($)=>parseFloat($),stringify($){let I=Number($.value);return isFinite(I)?I.toExponential():Gz.stringifyNumber($)}},pM={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve($){let I=new hM.Scalar(parseFloat($)),U=$.indexOf(".");if(U!==-1&&$[$.length-1]==="0")I.minFractionDigits=$.length-U-1;return I},stringify:Gz.stringifyNumber};oM.float=pM;oM.floatExp=dM;oM.floatNaN=cM});var Qz=E((uK)=>{var eX=b1(),Su=($)=>typeof $==="bigint"||Number.isInteger($),qz=($,I,U,{intAsBigInt:_})=>_?BigInt($):parseInt($.substring(I),U);function sX($,I,U){let{value:_}=$;if(Su(_)&&_>=0)return U+_.toString(I);return eX.stringifyNumber($)}var sM={identify:($)=>Su($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:($,I,U)=>qz($,2,8,U),stringify:($)=>sX($,8,"0o")},$K={identify:Su,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:($,I,U)=>qz($,0,10,U),stringify:eX.stringifyNumber},IK={identify:($)=>Su($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:($,I,U)=>qz($,2,16,U),stringify:($)=>sX($,16,"0x")};uK.int=$K;uK.intHex=IK;uK.intOct=sM});var $q=E((qK)=>{var gK=Z1(),vK=Fu(),JK=A1(),NK=yI(),GK=Nz(),Tz=Xz(),Hz=Qz(),XK=[gK.map,JK.seq,NK.string,vK.nullTag,GK.boolTag,Hz.intOct,Hz.int,Hz.intHex,Tz.floatNaN,Tz.floatExp,Tz.float];qK.schema=XK});var uq=E((DK)=>{var TK=W$(),HK=Z1(),YK=A1();function Iq($){return typeof $==="bigint"||Number.isInteger($)}var wu=({value:$})=>JSON.stringify($),OK=[{identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify:wu},{identify:($)=>$==null,createNode:()=>new TK.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:wu},{identify:($)=>typeof $==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:($)=>$==="true",stringify:wu},{identify:Iq,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:($,I,{intAsBigInt:U})=>U?BigInt($):parseInt($,10),stringify:({value:$})=>Iq($)?$.toString():JSON.stringify($)},{identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:($)=>parseFloat($),stringify:wu}],VK={default:!0,tag:"",test:/^/,resolve($,I){return I(`Unresolved plain scalar ${JSON.stringify($)}`),$}},BK=[HK.map,YK.seq].concat(OK,VK);DK.schema=BK});var Oz=E((LK)=>{var iI=z$("buffer"),Yz=W$(),KK=EI(),RK={identify:($)=>$ instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve($,I){if(typeof iI.Buffer==="function")return iI.Buffer.from($,"base64");else if(typeof atob==="function"){let U=atob($.replace(/[\n\r]/g,"")),_=new Uint8Array(U.length);for(let u=0;u<U.length;++u)_[u]=U.charCodeAt(u);return _}else return I("This environment does not support reading binary tags; either Buffer or atob is required"),$},stringify({comment:$,type:I,value:U},_,u,z){if(!U)return"";let g=U,v;if(typeof iI.Buffer==="function")v=g instanceof iI.Buffer?g.toString("base64"):iI.Buffer.from(g.buffer).toString("base64");else if(typeof btoa==="function"){let J="";for(let N=0;N<g.length;++N)J+=String.fromCharCode(g[N]);v=btoa(J)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(I??(I=Yz.Scalar.BLOCK_LITERAL),I!==Yz.Scalar.QUOTE_DOUBLE){let J=Math.max(_.options.lineWidth-_.indent.length,_.options.minContentWidth),N=Math.ceil(v.length/J),X=Array(N);for(let G=0,q=0;G<N;++G,q+=J)X[G]=v.substr(q,J);v=X.join(I===Yz.Scalar.BLOCK_LITERAL?`
78
+ `:" ")}return KK.stringifyString({comment:$,type:I,value:v},_,u,z)}};LK.binary=RK});var Cu=E((bK)=>{var Eu=$$(),Vz=q6(),PK=W$(),ZK=H6();function Uq($,I){if(Eu.isSeq($))for(let U=0;U<$.items.length;++U){let _=$.items[U];if(Eu.isPair(_))continue;else if(Eu.isMap(_)){if(_.items.length>1)I("Each pair must have its own sequence indicator");let u=_.items[0]||new Vz.Pair(new PK.Scalar(null));if(_.commentBefore)u.key.commentBefore=u.key.commentBefore?`${_.commentBefore}
79
+ ${u.key.commentBefore}`:_.commentBefore;if(_.comment){let z=u.value??u.key;z.comment=z.comment?`${_.comment}
80
+ ${z.comment}`:_.comment}_=u}$.items[U]=Eu.isPair(_)?_:new Vz.Pair(_)}else I("Expected a sequence for this tag");return $}function _q($,I,U){let{replacer:_}=U,u=new ZK.YAMLSeq($);u.tag="tag:yaml.org,2002:pairs";let z=0;if(I&&Symbol.iterator in Object(I))for(let g of I){if(typeof _==="function")g=_.call(I,String(z++),g);let v,J;if(Array.isArray(g))if(g.length===2)v=g[0],J=g[1];else throw TypeError(`Expected [key, value] tuple: ${g}`);else if(g&&g instanceof Object){let N=Object.keys(g);if(N.length===1)v=N[0],J=g[v];else throw TypeError(`Expected tuple with one key, not ${N.length} keys`)}else v=g;u.items.push(Vz.createPair(v,J,U))}return u}var AK={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Uq,createNode:_q};bK.createPairs=_q;bK.pairs=AK;bK.resolvePairs=Uq});var Dz=E((CK)=>{var zq=$$(),Bz=N6(),nI=T6(),wK=H6(),gq=Cu();class m6 extends wK.YAMLSeq{constructor(){super();this.add=nI.YAMLMap.prototype.add.bind(this),this.delete=nI.YAMLMap.prototype.delete.bind(this),this.get=nI.YAMLMap.prototype.get.bind(this),this.has=nI.YAMLMap.prototype.has.bind(this),this.set=nI.YAMLMap.prototype.set.bind(this),this.tag=m6.tag}toJSON($,I){if(!I)return super.toJSON($);let U=new Map;if(I?.onCreate)I.onCreate(U);for(let _ of this.items){let u,z;if(zq.isPair(_))u=Bz.toJS(_.key,"",I),z=Bz.toJS(_.value,u,I);else u=Bz.toJS(_,"",I);if(U.has(u))throw Error("Ordered maps must not include duplicate keys");U.set(u,z)}return U}static from($,I,U){let _=gq.createPairs($,I,U),u=new this;return u.items=_.items,u}}m6.tag="tag:yaml.org,2002:omap";var EK={collection:"seq",identify:($)=>$ instanceof Map,nodeClass:m6,default:!1,tag:"tag:yaml.org,2002:omap",resolve($,I){let U=gq.resolvePairs($,I),_=[];for(let{key:u}of U.items)if(zq.isScalar(u))if(_.includes(u.value))I(`Ordered maps must not include duplicate keys: ${u.value}`);else _.push(u.value);return Object.assign(new m6,U)},createNode:($,I,U)=>m6.from($,I,U)};CK.YAMLOMap=m6;CK.omap=EK});var Xq=E((kK)=>{var vq=W$();function Jq({value:$,source:I},U){if(I&&($?Nq:Gq).test.test(I))return I;return $?U.options.trueStr:U.options.falseStr}var Nq={identify:($)=>$===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new vq.Scalar(!0),stringify:Jq},Gq={identify:($)=>$===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new vq.Scalar(!1),stringify:Jq};kK.falseTag=Gq;kK.trueTag=Nq});var qq=E((hK)=>{var nK=W$(),Mz=b1(),rK={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:($)=>$.slice(-3).toLowerCase()==="nan"?NaN:$[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Mz.stringifyNumber},lK={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:($)=>parseFloat($.replace(/_/g,"")),stringify($){let I=Number($.value);return isFinite(I)?I.toExponential():Mz.stringifyNumber($)}},mK={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve($){let I=new nK.Scalar(parseFloat($.replace(/_/g,""))),U=$.indexOf(".");if(U!==-1){let _=$.substring(U+1).replace(/_/g,"");if(_[_.length-1]==="0")I.minFractionDigits=_.length}return I},stringify:Mz.stringifyNumber};hK.float=mK;hK.floatExp=lK;hK.floatNaN=rK});var Tq=E((sK)=>{var Qq=b1(),rI=($)=>typeof $==="bigint"||Number.isInteger($);function fu($,I,U,{intAsBigInt:_}){let u=$[0];if(u==="-"||u==="+")I+=1;if($=$.substring(I).replace(/_/g,""),_){switch(U){case 2:$=`0b${$}`;break;case 8:$=`0o${$}`;break;case 16:$=`0x${$}`;break}let g=BigInt($);return u==="-"?BigInt(-1)*g:g}let z=parseInt($,U);return u==="-"?-1*z:z}function Kz($,I,U){let{value:_}=$;if(rI(_)){let u=_.toString(I);return _<0?"-"+U+u.substr(1):U+u}return Qq.stringifyNumber($)}var oK={identify:rI,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:($,I,U)=>fu($,2,2,U),stringify:($)=>Kz($,2,"0b")},tK={identify:rI,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:($,I,U)=>fu($,1,8,U),stringify:($)=>Kz($,8,"0")},aK={identify:rI,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:($,I,U)=>fu($,0,10,U),stringify:Qq.stringifyNumber},eK={identify:rI,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:($,I,U)=>fu($,2,16,U),stringify:($)=>Kz($,16,"0x")};sK.int=aK;sK.intBin=oK;sK.intHex=eK;sK.intOct=tK});var Rz=E((zR)=>{var yu=$$(),xu=q6(),ku=T6();class h6 extends ku.YAMLMap{constructor($){super($);this.tag=h6.tag}add($){let I;if(yu.isPair($))I=$;else if($&&typeof $==="object"&&"key"in $&&"value"in $&&$.value===null)I=new xu.Pair($.key,null);else I=new xu.Pair($,null);if(!ku.findPair(this.items,I.key))this.items.push(I)}get($,I){let U=ku.findPair(this.items,$);return!I&&yu.isPair(U)?yu.isScalar(U.key)?U.key.value:U.key:U}set($,I){if(typeof I!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof I}`);let U=ku.findPair(this.items,$);if(U&&!I)this.items.splice(this.items.indexOf(U),1);else if(!U&&I)this.items.push(new xu.Pair($))}toJSON($,I){return super.toJSON($,I,Set)}toString($,I,U){if(!$)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},$,{allNullValues:!0}),I,U);else throw Error("Set items must all have null values")}static from($,I,U){let{replacer:_}=U,u=new this($);if(I&&Symbol.iterator in Object(I))for(let z of I){if(typeof _==="function")z=_.call(I,z,z);u.items.push(xu.createPair(z,null,U))}return u}}h6.tag="tag:yaml.org,2002:set";var _R={collection:"map",identify:($)=>$ instanceof Set,nodeClass:h6,default:!1,tag:"tag:yaml.org,2002:set",createNode:($,I,U)=>h6.from($,I,U),resolve($,I){if(yu.isMap($))if($.hasAllNullValues(!0))return Object.assign(new h6,$);else I("Set items must all have null values");else I("Expected a mapping for this tag");return $}};zR.YAMLSet=h6;zR.set=_R});var Wz=E((XR)=>{var JR=b1();function Lz($,I){let U=$[0],_=U==="-"||U==="+"?$.substring(1):$,u=(g)=>I?BigInt(g):Number(g),z=_.replace(/_/g,"").split(":").reduce((g,v)=>g*u(60)+u(v),u(0));return U==="-"?u(-1)*z:z}function Hq($){let{value:I}=$,U=(g)=>g;if(typeof I==="bigint")U=(g)=>BigInt(g);else if(isNaN(I)||!isFinite(I))return JR.stringifyNumber($);let _="";if(I<0)_="-",I*=U(-1);let u=U(60),z=[I%u];if(I<60)z.unshift(0);else if(I=(I-z[0])/u,z.unshift(I%u),I>=60)I=(I-z[0])/u,z.unshift(I);return _+z.map((g)=>String(g).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var NR={identify:($)=>typeof $==="bigint"||Number.isInteger($),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:($,I,{intAsBigInt:U})=>Lz($,U),stringify:Hq},GR={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:($)=>Lz($,!1),stringify:Hq},Yq={identify:($)=>$ 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($){let I=$.match(Yq.test);if(!I)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,U,_,u,z,g,v]=I.map(Number),J=I[7]?Number((I[7]+"00").substr(1,3)):0,N=Date.UTC(U,_-1,u,z||0,g||0,v||0,J),X=I[8];if(X&&X!=="Z"){let G=Lz(X,!1);if(Math.abs(G)<30)G*=60;N-=60000*G}return new Date(N)},stringify:({value:$})=>$?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};XR.floatTime=GR;XR.intTime=NR;XR.timestamp=Yq});var Vq=E((WR)=>{var HR=Z1(),YR=Fu(),OR=A1(),VR=yI(),BR=Oz(),Oq=Xq(),Pz=qq(),iu=Tq(),DR=Ru(),MR=Dz(),KR=Cu(),RR=Rz(),Zz=Wz(),LR=[HR.map,OR.seq,VR.string,YR.nullTag,Oq.trueTag,Oq.falseTag,iu.intBin,iu.intOct,iu.int,iu.intHex,Pz.floatNaN,Pz.floatExp,Pz.float,BR.binary,DR.merge,MR.omap,KR.pairs,RR.set,Zz.intTime,Zz.floatTime,Zz.timestamp];WR.schema=LR});var Aq=E((ER)=>{var Kq=Z1(),ZR=Fu(),Rq=A1(),AR=yI(),bR=Nz(),Az=Xz(),bz=Qz(),jR=$q(),FR=uq(),Lq=Oz(),lI=Ru(),Wq=Dz(),Pq=Cu(),Bq=Vq(),Zq=Rz(),nu=Wz(),Dq=new Map([["core",jR.schema],["failsafe",[Kq.map,Rq.seq,AR.string]],["json",FR.schema],["yaml11",Bq.schema],["yaml-1.1",Bq.schema]]),Mq={binary:Lq.binary,bool:bR.boolTag,float:Az.float,floatExp:Az.floatExp,floatNaN:Az.floatNaN,floatTime:nu.floatTime,int:bz.int,intHex:bz.intHex,intOct:bz.intOct,intTime:nu.intTime,map:Kq.map,merge:lI.merge,null:ZR.nullTag,omap:Wq.omap,pairs:Pq.pairs,seq:Rq.seq,set:Zq.set,timestamp:nu.timestamp},SR={"tag:yaml.org,2002:binary":Lq.binary,"tag:yaml.org,2002:merge":lI.merge,"tag:yaml.org,2002:omap":Wq.omap,"tag:yaml.org,2002:pairs":Pq.pairs,"tag:yaml.org,2002:set":Zq.set,"tag:yaml.org,2002:timestamp":nu.timestamp};function wR($,I,U){let _=Dq.get(I);if(_&&!$)return U&&!_.includes(lI.merge)?_.concat(lI.merge):_.slice();let u=_;if(!u)if(Array.isArray($))u=[];else{let z=Array.from(Dq.keys()).filter((g)=>g!=="yaml11").map((g)=>JSON.stringify(g)).join(", ");throw Error(`Unknown schema "${I}"; use one of ${z} or define customTags array`)}if(Array.isArray($))for(let z of $)u=u.concat(z);else if(typeof $==="function")u=$(u.slice());if(U)u=u.concat(lI.merge);return u.reduce((z,g)=>{let v=typeof g==="string"?Mq[g]:g;if(!v){let J=JSON.stringify(g),N=Object.keys(Mq).map((X)=>JSON.stringify(X)).join(", ");throw Error(`Unknown custom tag ${J}; use one of ${N}`)}if(!z.includes(v))z.push(v);return z},[])}ER.coreKnownTags=SR;ER.getTags=wR});var Sz=E((nR)=>{var jz=$$(),xR=Z1(),kR=A1(),yR=yI(),ru=Aq(),iR=($,I)=>$.key<I.key?-1:$.key>I.key?1:0;class Fz{constructor({compat:$,customTags:I,merge:U,resolveKnownTags:_,schema:u,sortMapEntries:z,toStringDefaults:g}){this.compat=Array.isArray($)?ru.getTags($,"compat"):$?ru.getTags(null,$):null,this.name=typeof u==="string"&&u||"core",this.knownTags=_?ru.coreKnownTags:{},this.tags=ru.getTags(I,this.name,U),this.toStringOptions=g??null,Object.defineProperty(this,jz.MAP,{value:xR.map}),Object.defineProperty(this,jz.SCALAR,{value:yR.string}),Object.defineProperty(this,jz.SEQ,{value:kR.seq}),this.sortMapEntries=typeof z==="function"?z:z===!0?iR:null}clone(){let $=Object.create(Fz.prototype,Object.getOwnPropertyDescriptors(this));return $.tags=this.tags.slice(),$}}nR.Schema=Fz});var bq=E((hR)=>{var lR=$$(),wz=CI(),mI=SI();function mR($,I){let U=[],_=I.directives===!0;if(I.directives!==!1&&$.directives){let J=$.directives.toString($);if(J)U.push(J),_=!0;else if($.directives.docStart)_=!0}if(_)U.push("---");let u=wz.createStringifyContext($,I),{commentString:z}=u.options;if($.commentBefore){if(U.length!==1)U.unshift("");let J=z($.commentBefore);U.unshift(mI.indentComment(J,""))}let g=!1,v=null;if($.contents){if(lR.isNode($.contents)){if($.contents.spaceBefore&&_)U.push("");if($.contents.commentBefore){let X=z($.contents.commentBefore);U.push(mI.indentComment(X,""))}u.forceBlockIndent=!!$.comment,v=$.contents.comment}let J=v?void 0:()=>g=!0,N=wz.stringify($.contents,u,()=>v=null,J);if(v)N+=mI.lineComment(N,"",z(v));if((N[0]==="|"||N[0]===">")&&U[U.length-1]==="---")U[U.length-1]=`--- ${N}`;else U.push(N)}else U.push(wz.stringify($.contents,u));if($.directives?.docEnd)if($.comment){let J=z($.comment);if(J.includes(`
81
+ `))U.push("..."),U.push(mI.indentComment(J,""));else U.push(`... ${J}`)}else U.push("...");else{let J=$.comment;if(J&&g)J=J.replace(/^\n+/,"");if(J){if((!g||v)&&U[U.length-1]!=="")U.push("");U.push(mI.indentComment(z(J),""))}}return U.join(`
82
82
  `)+`
83
- `}lL.stringifyDocument=rL});var lI=E((eL)=>{var hL=AI(),b1=Yu(),Q4=$$(),cL=q6(),dL=N6(),pL=jg(),oL=bq(),Sg=Qu(),tL=a2(),aL=bI(),wg=t2();class Eg{constructor($,I,U){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Q4.NODE_TYPE,{value:Q4.DOC});let _=null;if(typeof I==="function"||Array.isArray(I))_=I;else if(U===void 0&&I)U=I,I=void 0;let u=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},U);this.options=u;let{version:g}=u;if(U?._directives){if(this.directives=U._directives.atDocument(),this.directives.yaml.explicit)g=this.directives.yaml.version}else this.directives=new wg.Directives({version:g});this.setSchema(g,U),this.contents=$===void 0?null:this.createNode($,_,U)}clone(){let $=Object.create(Eg.prototype,{[Q4.NODE_TYPE]:{value:Q4.DOC}});if($.commentBefore=this.commentBefore,$.comment=this.comment,$.errors=this.errors.slice(),$.warnings=this.warnings.slice(),$.options=Object.assign({},this.options),this.directives)$.directives=this.directives.clone();if($.schema=this.schema.clone(),$.contents=Q4.isNode(this.contents)?this.contents.clone($.schema):this.contents,this.range)$.range=this.range.slice();return $}add($){if(j1(this.contents))this.contents.add($)}addIn($,I){if(j1(this.contents))this.contents.addIn($,I)}createAlias($,I){if(!$.anchor){let U=Sg.anchorNames(this);$.anchor=!I||U.has(I)?Sg.findNewAnchor(I||"a",U):I}return new hL.Alias($.anchor)}createNode($,I,U){let _=void 0;if(typeof I==="function")$=I.call({"":$},"",$),_=I;else if(Array.isArray(I)){let Q=(K)=>typeof K==="number"||K instanceof String||K instanceof Number,Y=I.filter(Q).map(String);if(Y.length>0)I=I.concat(Y);_=I}else if(U===void 0&&I)U=I,I=void 0;let{aliasDuplicateObjects:u,anchorPrefix:g,flow:z,keepUndefined:v,onTagObj:J,tag:N}=U??{},{onAnchor:X,setAnchors:G,sourceObjects:q}=Sg.createNodeAnchors(this,g||"a"),T={aliasDuplicateObjects:u??!0,keepUndefined:v??!1,onAnchor:X,onTagObj:J,replacer:_,schema:this.schema,sourceObjects:q},H=aL.createNode($,N,T);if(z&&Q4.isCollection(H))H.flow=!0;return G(),H}createPair($,I,U={}){let _=this.createNode($,null,U),u=this.createNode(I,null,U);return new cL.Pair(_,u)}delete($){return j1(this.contents)?this.contents.delete($):!1}deleteIn($){if(b1.isEmptyPath($)){if(this.contents==null)return!1;return this.contents=null,!0}return j1(this.contents)?this.contents.deleteIn($):!1}get($,I){return Q4.isCollection(this.contents)?this.contents.get($,I):void 0}getIn($,I){if(b1.isEmptyPath($))return!I&&Q4.isScalar(this.contents)?this.contents.value:this.contents;return Q4.isCollection(this.contents)?this.contents.getIn($,I):void 0}has($){return Q4.isCollection(this.contents)?this.contents.has($):!1}hasIn($){if(b1.isEmptyPath($))return this.contents!==void 0;return Q4.isCollection(this.contents)?this.contents.hasIn($):!1}set($,I){if(this.contents==null)this.contents=b1.collectionFromPath(this.schema,[$],I);else if(j1(this.contents))this.contents.set($,I)}setIn($,I){if(b1.isEmptyPath($))this.contents=I;else if(this.contents==null)this.contents=b1.collectionFromPath(this.schema,Array.from($),I);else if(j1(this.contents))this.contents.setIn($,I)}setSchema($,I={}){if(typeof $==="number")$=String($);let U;switch($){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new wg.Directives({version:"1.1"});U={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=$;else this.directives=new wg.Directives({version:$});U={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;U=null;break;default:{let _=JSON.stringify($);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${_}`)}}if(I.schema instanceof Object)this.schema=I.schema;else if(U)this.schema=new pL.Schema(Object.assign(U,I));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:$,jsonArg:I,mapAsMap:U,maxAliasCount:_,onAnchor:u,reviver:g}={}){let z={anchors:new Map,doc:this,keep:!$,mapAsMap:U===!0,mapKeyWarned:!1,maxAliasCount:typeof _==="number"?_:100},v=dL.toJS(this.contents,I??"",z);if(typeof u==="function")for(let{count:J,res:N}of z.anchors.values())u(N,J);return typeof g==="function"?tL.applyReviver(g,{"":v},"",v):v}toJSON($,I){return this.toJS({json:!0,jsonArg:$,mapAsMap:!1,onAnchor:I})}toString($={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in $&&(!Number.isInteger($.indent)||Number($.indent)<=0)){let I=JSON.stringify($.indent);throw Error(`"indent" option must be a positive integer, not ${I}`)}return oL.stringifyDocument(this,$)}}function j1($){if(Q4.isCollection($))return!0;throw Error("Expected a YAML collection as document contents")}eL.Document=Eg});var mI=E((IR)=>{class ru extends Error{constructor($,I,U,_){super();this.name=$,this.code=U,this.message=_,this.pos=I}}class jq extends ru{constructor($,I,U){super("YAMLParseError",$,I,U)}}class Fq extends ru{constructor($,I,U){super("YAMLWarning",$,I,U)}}var $R=($,I)=>(U)=>{if(U.pos[0]===-1)return;U.linePos=U.pos.map((v)=>I.linePos(v));let{line:_,col:u}=U.linePos[0];U.message+=` at line ${_}, column ${u}`;let g=u-1,z=$.substring(I.lineStarts[_-1],I.lineStarts[_]).replace(/[\n\r]+$/,"");if(g>=60&&z.length>80){let v=Math.min(g-39,z.length-79);z="…"+z.substring(v),g-=v-1}if(z.length>80)z=z.substring(0,79)+"…";if(_>1&&/^ *$/.test(z.substring(0,g))){let v=$.substring(I.lineStarts[_-2],I.lineStarts[_-1]);if(v.length>80)v=v.substring(0,79)+`…
84
- `;z=v+z}if(/[^ ]/.test(z)){let v=1,J=U.linePos[1];if(J?.line===_&&J.col>u)v=Math.max(1,Math.min(J.col-u,80-g));let N=" ".repeat(g)+"^".repeat(v);U.message+=`:
83
+ `}hR.stringifyDocument=mR});var hI=E(($L)=>{var dR=jI(),j1=Ou(),Q4=$$(),pR=q6(),oR=N6(),tR=Sz(),aR=bq(),Ez=Tu(),eR=s2(),sR=FI(),Cz=e2();class fz{constructor($,I,U){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Q4.NODE_TYPE,{value:Q4.DOC});let _=null;if(typeof I==="function"||Array.isArray(I))_=I;else if(U===void 0&&I)U=I,I=void 0;let u=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},U);this.options=u;let{version:z}=u;if(U?._directives){if(this.directives=U._directives.atDocument(),this.directives.yaml.explicit)z=this.directives.yaml.version}else this.directives=new Cz.Directives({version:z});this.setSchema(z,U),this.contents=$===void 0?null:this.createNode($,_,U)}clone(){let $=Object.create(fz.prototype,{[Q4.NODE_TYPE]:{value:Q4.DOC}});if($.commentBefore=this.commentBefore,$.comment=this.comment,$.errors=this.errors.slice(),$.warnings=this.warnings.slice(),$.options=Object.assign({},this.options),this.directives)$.directives=this.directives.clone();if($.schema=this.schema.clone(),$.contents=Q4.isNode(this.contents)?this.contents.clone($.schema):this.contents,this.range)$.range=this.range.slice();return $}add($){if(F1(this.contents))this.contents.add($)}addIn($,I){if(F1(this.contents))this.contents.addIn($,I)}createAlias($,I){if(!$.anchor){let U=Ez.anchorNames(this);$.anchor=!I||U.has(I)?Ez.findNewAnchor(I||"a",U):I}return new dR.Alias($.anchor)}createNode($,I,U){let _=void 0;if(typeof I==="function")$=I.call({"":$},"",$),_=I;else if(Array.isArray(I)){let Q=(M)=>typeof M==="number"||M instanceof String||M instanceof Number,Y=I.filter(Q).map(String);if(Y.length>0)I=I.concat(Y);_=I}else if(U===void 0&&I)U=I,I=void 0;let{aliasDuplicateObjects:u,anchorPrefix:z,flow:g,keepUndefined:v,onTagObj:J,tag:N}=U??{},{onAnchor:X,setAnchors:G,sourceObjects:q}=Ez.createNodeAnchors(this,z||"a"),T={aliasDuplicateObjects:u??!0,keepUndefined:v??!1,onAnchor:X,onTagObj:J,replacer:_,schema:this.schema,sourceObjects:q},H=sR.createNode($,N,T);if(g&&Q4.isCollection(H))H.flow=!0;return G(),H}createPair($,I,U={}){let _=this.createNode($,null,U),u=this.createNode(I,null,U);return new pR.Pair(_,u)}delete($){return F1(this.contents)?this.contents.delete($):!1}deleteIn($){if(j1.isEmptyPath($)){if(this.contents==null)return!1;return this.contents=null,!0}return F1(this.contents)?this.contents.deleteIn($):!1}get($,I){return Q4.isCollection(this.contents)?this.contents.get($,I):void 0}getIn($,I){if(j1.isEmptyPath($))return!I&&Q4.isScalar(this.contents)?this.contents.value:this.contents;return Q4.isCollection(this.contents)?this.contents.getIn($,I):void 0}has($){return Q4.isCollection(this.contents)?this.contents.has($):!1}hasIn($){if(j1.isEmptyPath($))return this.contents!==void 0;return Q4.isCollection(this.contents)?this.contents.hasIn($):!1}set($,I){if(this.contents==null)this.contents=j1.collectionFromPath(this.schema,[$],I);else if(F1(this.contents))this.contents.set($,I)}setIn($,I){if(j1.isEmptyPath($))this.contents=I;else if(this.contents==null)this.contents=j1.collectionFromPath(this.schema,Array.from($),I);else if(F1(this.contents))this.contents.setIn($,I)}setSchema($,I={}){if(typeof $==="number")$=String($);let U;switch($){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new Cz.Directives({version:"1.1"});U={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=$;else this.directives=new Cz.Directives({version:$});U={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;U=null;break;default:{let _=JSON.stringify($);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${_}`)}}if(I.schema instanceof Object)this.schema=I.schema;else if(U)this.schema=new tR.Schema(Object.assign(U,I));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:$,jsonArg:I,mapAsMap:U,maxAliasCount:_,onAnchor:u,reviver:z}={}){let g={anchors:new Map,doc:this,keep:!$,mapAsMap:U===!0,mapKeyWarned:!1,maxAliasCount:typeof _==="number"?_:100},v=oR.toJS(this.contents,I??"",g);if(typeof u==="function")for(let{count:J,res:N}of g.anchors.values())u(N,J);return typeof z==="function"?eR.applyReviver(z,{"":v},"",v):v}toJSON($,I){return this.toJS({json:!0,jsonArg:$,mapAsMap:!1,onAnchor:I})}toString($={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in $&&(!Number.isInteger($.indent)||Number($.indent)<=0)){let I=JSON.stringify($.indent);throw Error(`"indent" option must be a positive integer, not ${I}`)}return aR.stringifyDocument(this,$)}}function F1($){if(Q4.isCollection($))return!0;throw Error("Expected a YAML collection as document contents")}$L.Document=fz});var cI=E((UL)=>{class lu extends Error{constructor($,I,U,_){super();this.name=$,this.code=U,this.message=_,this.pos=I}}class jq extends lu{constructor($,I,U){super("YAMLParseError",$,I,U)}}class Fq extends lu{constructor($,I,U){super("YAMLWarning",$,I,U)}}var uL=($,I)=>(U)=>{if(U.pos[0]===-1)return;U.linePos=U.pos.map((v)=>I.linePos(v));let{line:_,col:u}=U.linePos[0];U.message+=` at line ${_}, column ${u}`;let z=u-1,g=$.substring(I.lineStarts[_-1],I.lineStarts[_]).replace(/[\n\r]+$/,"");if(z>=60&&g.length>80){let v=Math.min(z-39,g.length-79);g="…"+g.substring(v),z-=v-1}if(g.length>80)g=g.substring(0,79)+"…";if(_>1&&/^ *$/.test(g.substring(0,z))){let v=$.substring(I.lineStarts[_-2],I.lineStarts[_-1]);if(v.length>80)v=v.substring(0,79)+`…
84
+ `;g=v+g}if(/[^ ]/.test(g)){let v=1,J=U.linePos[1];if(J?.line===_&&J.col>u)v=Math.max(1,Math.min(J.col-u,80-z));let N=" ".repeat(z)+"^".repeat(v);U.message+=`:
85
85
 
86
- ${z}
86
+ ${g}
87
87
  ${N}
88
- `}};IR.YAMLError=ru;IR.YAMLParseError=jq;IR.YAMLWarning=Fq;IR.prettifyError=$R});var hI=E((vR)=>{function zR($,{flow:I,indicator:U,next:_,offset:u,onError:g,parentIndent:z,startOnNewline:v}){let J=!1,N=v,X=v,G="",q="",T=!1,H=!1,Q=null,Y=null,K=null,L=null,P=null,O=null,B=null;for(let M of $){if(H){if(M.type!=="space"&&M.type!=="newline"&&M.type!=="comma")g(M.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");H=!1}if(Q){if(N&&M.type!=="comment"&&M.type!=="newline")g(Q,"TAB_AS_INDENT","Tabs are not allowed as indentation");Q=null}switch(M.type){case"space":if(!I&&(U!=="doc-start"||_?.type!=="flow-collection")&&M.source.includes("\t"))Q=M;X=!0;break;case"comment":{if(!X)g(M,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let F=M.source.substring(1)||" ";if(!G)G=F;else G+=q+F;q="",N=!1;break}case"newline":if(N){if(G)G+=M.source;else if(!O||U!=="seq-item-ind")J=!0}else q+=M.source;if(N=!0,T=!0,Y||K)L=M;X=!0;break;case"anchor":if(Y)g(M,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(M.source.endsWith(":"))g(M.offset+M.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);Y=M,B??(B=M.offset),N=!1,X=!1,H=!0;break;case"tag":{if(K)g(M,"MULTIPLE_TAGS","A node can have at most one tag");K=M,B??(B=M.offset),N=!1,X=!1,H=!0;break}case U:if(Y||K)g(M,"BAD_PROP_ORDER",`Anchors and tags must be after the ${M.source} indicator`);if(O)g(M,"UNEXPECTED_TOKEN",`Unexpected ${M.source} in ${I??"collection"}`);O=M,N=U==="seq-item-ind"||U==="explicit-key-ind",X=!1;break;case"comma":if(I){if(P)g(M,"UNEXPECTED_TOKEN",`Unexpected , in ${I}`);P=M,N=!1,X=!1;break}default:g(M,"UNEXPECTED_TOKEN",`Unexpected ${M.type} token`),N=!1,X=!1}}let R=$[$.length-1],D=R?R.offset+R.source.length:u;if(H&&_&&_.type!=="space"&&_.type!=="newline"&&_.type!=="comma"&&(_.type!=="scalar"||_.source!==""))g(_.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(Q&&(N&&Q.indent<=z||_?.type==="block-map"||_?.type==="block-seq"))g(Q,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:P,found:O,spaceBefore:J,comment:G,hasNewline:T,anchor:Y,tag:K,newlineAfterProp:L,end:D,start:B??D}}vR.resolveProps=zR});var lu=E((NR)=>{function Cg($){if(!$)return null;switch($.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if($.source.includes(`
89
- `))return!0;if($.end){for(let I of $.end)if(I.type==="newline")return!0}return!1;case"flow-collection":for(let I of $.items){for(let U of I.start)if(U.type==="newline")return!0;if(I.sep){for(let U of I.sep)if(U.type==="newline")return!0}if(Cg(I.key)||Cg(I.value))return!0}return!1;default:return!0}}NR.containsNewline=Cg});var fg=E((QR)=>{var XR=lu();function qR($,I,U){if(I?.type==="flow-collection"){let _=I.end[0];if(_.indent===$&&(_.source==="]"||_.source==="}")&&XR.containsNewline(I))U(_,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}QR.flowIndentCheck=qR});var xg=E((YR)=>{var Sq=$$();function HR($,I,U){let{uniqueKeys:_}=$.options;if(_===!1)return!1;let u=typeof _==="function"?_:(g,z)=>g===z||Sq.isScalar(g)&&Sq.isScalar(z)&&g.value===z.value;return I.some((g)=>u(g.key,U))}YR.mapIncludes=HR});var xq=E((KR)=>{var wq=q6(),VR=T6(),Eq=hI(),BR=lu(),Cq=fg(),DR=xg(),fq="All mapping items must start at the same column";function MR({composeNode:$,composeEmptyNode:I},U,_,u,g){let v=new(g?.nodeClass??VR.YAMLMap)(U.schema);if(U.atRoot)U.atRoot=!1;let J=_.offset,N=null;for(let X of _.items){let{start:G,key:q,sep:T,value:H}=X,Q=Eq.resolveProps(G,{indicator:"explicit-key-ind",next:q??T?.[0],offset:J,onError:u,parentIndent:_.indent,startOnNewline:!0}),Y=!Q.found;if(Y){if(q){if(q.type==="block-seq")u(J,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in q&&q.indent!==_.indent)u(J,"BAD_INDENT",fq)}if(!Q.anchor&&!Q.tag&&!T){if(N=Q.end,Q.comment)if(v.comment)v.comment+=`
90
- `+Q.comment;else v.comment=Q.comment;continue}if(Q.newlineAfterProp||BR.containsNewline(q))u(q??G[G.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(Q.found?.indent!==_.indent)u(J,"BAD_INDENT",fq);U.atKey=!0;let K=Q.end,L=q?$(U,q,Q,u):I(U,K,G,null,Q,u);if(U.schema.compat)Cq.flowIndentCheck(_.indent,q,u);if(U.atKey=!1,DR.mapIncludes(U,v.items,L))u(K,"DUPLICATE_KEY","Map keys must be unique");let P=Eq.resolveProps(T??[],{indicator:"map-value-ind",next:H,offset:L.range[2],onError:u,parentIndent:_.indent,startOnNewline:!q||q.type==="block-scalar"});if(J=P.end,P.found){if(Y){if(H?.type==="block-map"&&!P.hasNewline)u(J,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(U.options.strict&&Q.start<P.found.offset-1024)u(L.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let O=H?$(U,H,P,u):I(U,J,T,null,P,u);if(U.schema.compat)Cq.flowIndentCheck(_.indent,H,u);J=O.range[2];let B=new wq.Pair(L,O);if(U.options.keepSourceTokens)B.srcToken=X;v.items.push(B)}else{if(Y)u(L.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(P.comment)if(L.comment)L.comment+=`
91
- `+P.comment;else L.comment=P.comment;let O=new wq.Pair(L);if(U.options.keepSourceTokens)O.srcToken=X;v.items.push(O)}}if(N&&N<J)u(N,"IMPOSSIBLE","Map comment with trailing content");return v.range=[_.offset,J,N??J],v}KR.resolveBlockMap=MR});var kq=E((AR)=>{var RR=H6(),WR=hI(),PR=fg();function ZR({composeNode:$,composeEmptyNode:I},U,_,u,g){let v=new(g?.nodeClass??RR.YAMLSeq)(U.schema);if(U.atRoot)U.atRoot=!1;if(U.atKey)U.atKey=!1;let J=_.offset,N=null;for(let{start:X,value:G}of _.items){let q=WR.resolveProps(X,{indicator:"seq-item-ind",next:G,offset:J,onError:u,parentIndent:_.indent,startOnNewline:!0});if(!q.found)if(q.anchor||q.tag||G)if(G?.type==="block-seq")u(q.end,"BAD_INDENT","All sequence items must start at the same column");else u(J,"MISSING_CHAR","Sequence item without - indicator");else{if(N=q.end,q.comment)v.comment=q.comment;continue}let T=G?$(U,G,q,u):I(U,q.end,X,null,q,u);if(U.schema.compat)PR.flowIndentCheck(_.indent,G,u);J=T.range[2],v.items.push(T)}return v.range=[_.offset,J,N??J],v}AR.resolveBlockSeq=ZR});var F1=E((FR)=>{function jR($,I,U,_){let u="";if($){let g=!1,z="";for(let v of $){let{source:J,type:N}=v;switch(N){case"space":g=!0;break;case"comment":{if(U&&!g)_(v,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let X=J.substring(1)||" ";if(!u)u=X;else u+=z+X;z="";break}case"newline":if(u)z+=J;g=!0;break;default:_(v,"UNEXPECTED_TOKEN",`Unexpected ${N} at node end`)}I+=J.length}}return{comment:u,offset:I}}FR.resolveEnd=jR});var nq=E((iR)=>{var wR=$$(),ER=q6(),yq=T6(),CR=H6(),fR=F1(),iq=hI(),xR=lu(),kR=xg(),kg="Block collections are not allowed within flow collections",yg=($)=>$&&($.type==="block-map"||$.type==="block-seq");function yR({composeNode:$,composeEmptyNode:I},U,_,u,g){let z=_.start.source==="{",v=z?"flow map":"flow sequence",N=new(g?.nodeClass??(z?yq.YAMLMap:CR.YAMLSeq))(U.schema);N.flow=!0;let X=U.atRoot;if(X)U.atRoot=!1;if(U.atKey)U.atKey=!1;let G=_.offset+_.start.source.length;for(let Y=0;Y<_.items.length;++Y){let K=_.items[Y],{start:L,key:P,sep:O,value:B}=K,R=iq.resolveProps(L,{flow:v,indicator:"explicit-key-ind",next:P??O?.[0],offset:G,onError:u,parentIndent:_.indent,startOnNewline:!1});if(!R.found){if(!R.anchor&&!R.tag&&!O&&!B){if(Y===0&&R.comma)u(R.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${v}`);else if(Y<_.items.length-1)u(R.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${v}`);if(R.comment)if(N.comment)N.comment+=`
92
- `+R.comment;else N.comment=R.comment;G=R.end;continue}if(!z&&U.options.strict&&xR.containsNewline(P))u(P,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(Y===0){if(R.comma)u(R.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${v}`)}else{if(!R.comma)u(R.start,"MISSING_CHAR",`Missing , between ${v} items`);if(R.comment){let D="";$:for(let M of L)switch(M.type){case"comma":case"space":break;case"comment":D=M.source.substring(1);break $;default:break $}if(D){let M=N.items[N.items.length-1];if(wR.isPair(M))M=M.value??M.key;if(M.comment)M.comment+=`
93
- `+D;else M.comment=D;R.comment=R.comment.substring(D.length+1)}}}if(!z&&!O&&!R.found){let D=B?$(U,B,R,u):I(U,R.end,O,null,R,u);if(N.items.push(D),G=D.range[2],yg(B))u(D.range,"BLOCK_IN_FLOW",kg)}else{U.atKey=!0;let D=R.end,M=P?$(U,P,R,u):I(U,D,L,null,R,u);if(yg(P))u(M.range,"BLOCK_IN_FLOW",kg);U.atKey=!1;let F=iq.resolveProps(O??[],{flow:v,indicator:"map-value-ind",next:B,offset:M.range[2],onError:u,parentIndent:_.indent,startOnNewline:!1});if(F.found){if(!z&&!R.found&&U.options.strict){if(O)for(let b of O){if(b===F.found)break;if(b.type==="newline"){u(b,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(R.start<F.found.offset-1024)u(F.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(B)if("source"in B&&B.source?.[0]===":")u(B,"MISSING_CHAR",`Missing space after : in ${v}`);else u(F.start,"MISSING_CHAR",`Missing , or : between ${v} items`);let A=B?$(U,B,F,u):F.found?I(U,F.end,O,null,F,u):null;if(A){if(yg(B))u(A.range,"BLOCK_IN_FLOW",kg)}else if(F.comment)if(M.comment)M.comment+=`
94
- `+F.comment;else M.comment=F.comment;let f=new ER.Pair(M,A);if(U.options.keepSourceTokens)f.srcToken=K;if(z){let b=N;if(kR.mapIncludes(U,b.items,M))u(D,"DUPLICATE_KEY","Map keys must be unique");b.items.push(f)}else{let b=new yq.YAMLMap(U.schema);b.flow=!0,b.items.push(f);let u$=(A??M).range;b.range=[M.range[0],u$[1],u$[2]],N.items.push(b)}G=A?A.range[2]:F.end}}let q=z?"}":"]",[T,...H]=_.end,Q=G;if(T?.source===q)Q=T.offset+T.source.length;else{let Y=v[0].toUpperCase()+v.substring(1),K=X?`${Y} must end with a ${q}`:`${Y} in block collection must be sufficiently indented and end with a ${q}`;if(u(G,X?"MISSING_CHAR":"BAD_INDENT",K),T&&T.source.length!==1)H.unshift(T)}if(H.length>0){let Y=fR.resolveEnd(H,Q,U.options.strict,u);if(Y.comment)if(N.comment)N.comment+=`
95
- `+Y.comment;else N.comment=Y.comment;N.range=[_.offset,Q,Y.offset]}else N.range=[_.offset,Q,Q];return N}iR.resolveFlowCollection=yR});var rq=E((tR)=>{var rR=$$(),lR=W$(),mR=T6(),hR=H6(),cR=xq(),dR=kq(),pR=nq();function ig($,I,U,_,u,g){let z=U.type==="block-map"?cR.resolveBlockMap($,I,U,_,g):U.type==="block-seq"?dR.resolveBlockSeq($,I,U,_,g):pR.resolveFlowCollection($,I,U,_,g),v=z.constructor;if(u==="!"||u===v.tagName)return z.tag=v.tagName,z;if(u)z.tag=u;return z}function oR($,I,U,_,u){let g=_.tag,z=!g?null:I.directives.tagName(g.source,(q)=>u(g,"TAG_RESOLVE_FAILED",q));if(U.type==="block-seq"){let{anchor:q,newlineAfterProp:T}=_,H=q&&g?q.offset>g.offset?q:g:q??g;if(H&&(!T||T.offset<H.offset))u(H,"MISSING_CHAR","Missing newline after block sequence props")}let v=U.type==="block-map"?"map":U.type==="block-seq"?"seq":U.start.source==="{"?"map":"seq";if(!g||!z||z==="!"||z===mR.YAMLMap.tagName&&v==="map"||z===hR.YAMLSeq.tagName&&v==="seq")return ig($,I,U,u,z);let J=I.schema.tags.find((q)=>q.tag===z&&q.collection===v);if(!J){let q=I.schema.knownTags[z];if(q?.collection===v)I.schema.tags.push(Object.assign({},q,{default:!1})),J=q;else{if(q)u(g,"BAD_COLLECTION_TYPE",`${q.tag} used for ${v} collection, but expects ${q.collection??"scalar"}`,!0);else u(g,"TAG_RESOLVE_FAILED",`Unresolved tag: ${z}`,!0);return ig($,I,U,u,z)}}let N=ig($,I,U,u,z,J),X=J.resolve?.(N,(q)=>u(g,"TAG_RESOLVE_FAILED",q),I.options)??N,G=rR.isNode(X)?X:new lR.Scalar(X);if(G.range=N.range,G.tag=z,J?.format)G.format=J.format;return G}tR.composeCollection=oR});var rg=E((IW)=>{var ng=W$();function eR($,I,U){let _=I.offset,u=sR(I,$.options.strict,U);if(!u)return{value:"",type:null,comment:"",range:[_,_,_]};let g=u.mode===">"?ng.Scalar.BLOCK_FOLDED:ng.Scalar.BLOCK_LITERAL,z=I.source?$W(I.source):[],v=z.length;for(let Q=z.length-1;Q>=0;--Q){let Y=z[Q][1];if(Y===""||Y==="\r")v=Q;else break}if(v===0){let Q=u.chomp==="+"&&z.length>0?`
96
- `.repeat(Math.max(1,z.length-1)):"",Y=_+u.length;if(I.source)Y+=I.source.length;return{value:Q,type:g,comment:u.comment,range:[_,Y,Y]}}let J=I.indent+u.indent,N=I.offset+u.length,X=0;for(let Q=0;Q<v;++Q){let[Y,K]=z[Q];if(K===""||K==="\r"){if(u.indent===0&&Y.length>J)J=Y.length}else{if(Y.length<J)U(N+Y.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator");if(u.indent===0)J=Y.length;if(X=Q,J===0&&!$.atRoot)U(N,"BAD_INDENT","Block scalar values in collections must be indented");break}N+=Y.length+K.length+1}for(let Q=z.length-1;Q>=v;--Q)if(z[Q][0].length>J)v=Q+1;let G="",q="",T=!1;for(let Q=0;Q<X;++Q)G+=z[Q][0].slice(J)+`
97
- `;for(let Q=X;Q<v;++Q){let[Y,K]=z[Q];N+=Y.length+K.length+1;let L=K[K.length-1]==="\r";if(L)K=K.slice(0,-1);if(K&&Y.length<J){let O=`Block scalar lines must not be less indented than their ${u.indent?"explicit indentation indicator":"first line"}`;U(N-K.length-(L?2:1),"BAD_INDENT",O),Y=""}if(g===ng.Scalar.BLOCK_LITERAL)G+=q+Y.slice(J)+K,q=`
98
- `;else if(Y.length>J||K[0]==="\t"){if(q===" ")q=`
88
+ `}};UL.YAMLError=lu;UL.YAMLParseError=jq;UL.YAMLWarning=Fq;UL.prettifyError=uL});var dI=E((NL)=>{function JL($,{flow:I,indicator:U,next:_,offset:u,onError:z,parentIndent:g,startOnNewline:v}){let J=!1,N=v,X=v,G="",q="",T=!1,H=!1,Q=null,Y=null,M=null,L=null,P=null,R=null,K=null;for(let O of $){if(H){if(O.type!=="space"&&O.type!=="newline"&&O.type!=="comma")z(O.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");H=!1}if(Q){if(N&&O.type!=="comment"&&O.type!=="newline")z(Q,"TAB_AS_INDENT","Tabs are not allowed as indentation");Q=null}switch(O.type){case"space":if(!I&&(U!=="doc-start"||_?.type!=="flow-collection")&&O.source.includes("\t"))Q=O;X=!0;break;case"comment":{if(!X)z(O,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let b=O.source.substring(1)||" ";if(!G)G=b;else G+=q+b;q="",N=!1;break}case"newline":if(N){if(G)G+=O.source;else if(!R||U!=="seq-item-ind")J=!0}else q+=O.source;if(N=!0,T=!0,Y||M)L=O;X=!0;break;case"anchor":if(Y)z(O,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(O.source.endsWith(":"))z(O.offset+O.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);Y=O,K??(K=O.offset),N=!1,X=!1,H=!0;break;case"tag":{if(M)z(O,"MULTIPLE_TAGS","A node can have at most one tag");M=O,K??(K=O.offset),N=!1,X=!1,H=!0;break}case U:if(Y||M)z(O,"BAD_PROP_ORDER",`Anchors and tags must be after the ${O.source} indicator`);if(R)z(O,"UNEXPECTED_TOKEN",`Unexpected ${O.source} in ${I??"collection"}`);R=O,N=U==="seq-item-ind"||U==="explicit-key-ind",X=!1;break;case"comma":if(I){if(P)z(O,"UNEXPECTED_TOKEN",`Unexpected , in ${I}`);P=O,N=!1,X=!1;break}default:z(O,"UNEXPECTED_TOKEN",`Unexpected ${O.type} token`),N=!1,X=!1}}let V=$[$.length-1],B=V?V.offset+V.source.length:u;if(H&&_&&_.type!=="space"&&_.type!=="newline"&&_.type!=="comma"&&(_.type!=="scalar"||_.source!==""))z(_.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(Q&&(N&&Q.indent<=g||_?.type==="block-map"||_?.type==="block-seq"))z(Q,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:P,found:R,spaceBefore:J,comment:G,hasNewline:T,anchor:Y,tag:M,newlineAfterProp:L,end:B,start:K??B}}NL.resolveProps=JL});var mu=E((XL)=>{function xz($){if(!$)return null;switch($.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if($.source.includes(`
89
+ `))return!0;if($.end){for(let I of $.end)if(I.type==="newline")return!0}return!1;case"flow-collection":for(let I of $.items){for(let U of I.start)if(U.type==="newline")return!0;if(I.sep){for(let U of I.sep)if(U.type==="newline")return!0}if(xz(I.key)||xz(I.value))return!0}return!1;default:return!0}}XL.containsNewline=xz});var kz=E((HL)=>{var QL=mu();function TL($,I,U){if(I?.type==="flow-collection"){let _=I.end[0];if(_.indent===$&&(_.source==="]"||_.source==="}")&&QL.containsNewline(I))U(_,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}HL.flowIndentCheck=TL});var yz=E((VL)=>{var Sq=$$();function OL($,I,U){let{uniqueKeys:_}=$.options;if(_===!1)return!1;let u=typeof _==="function"?_:(z,g)=>z===g||Sq.isScalar(z)&&Sq.isScalar(g)&&z.value===g.value;return I.some((z)=>u(z.key,U))}VL.mapIncludes=OL});var xq=E((LL)=>{var wq=q6(),DL=T6(),Eq=dI(),ML=mu(),Cq=kz(),KL=yz(),fq="All mapping items must start at the same column";function RL({composeNode:$,composeEmptyNode:I},U,_,u,z){let v=new(z?.nodeClass??DL.YAMLMap)(U.schema);if(U.atRoot)U.atRoot=!1;let J=_.offset,N=null;for(let X of _.items){let{start:G,key:q,sep:T,value:H}=X,Q=Eq.resolveProps(G,{indicator:"explicit-key-ind",next:q??T?.[0],offset:J,onError:u,parentIndent:_.indent,startOnNewline:!0}),Y=!Q.found;if(Y){if(q){if(q.type==="block-seq")u(J,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in q&&q.indent!==_.indent)u(J,"BAD_INDENT",fq)}if(!Q.anchor&&!Q.tag&&!T){if(N=Q.end,Q.comment)if(v.comment)v.comment+=`
90
+ `+Q.comment;else v.comment=Q.comment;continue}if(Q.newlineAfterProp||ML.containsNewline(q))u(q??G[G.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(Q.found?.indent!==_.indent)u(J,"BAD_INDENT",fq);U.atKey=!0;let M=Q.end,L=q?$(U,q,Q,u):I(U,M,G,null,Q,u);if(U.schema.compat)Cq.flowIndentCheck(_.indent,q,u);if(U.atKey=!1,KL.mapIncludes(U,v.items,L))u(M,"DUPLICATE_KEY","Map keys must be unique");let P=Eq.resolveProps(T??[],{indicator:"map-value-ind",next:H,offset:L.range[2],onError:u,parentIndent:_.indent,startOnNewline:!q||q.type==="block-scalar"});if(J=P.end,P.found){if(Y){if(H?.type==="block-map"&&!P.hasNewline)u(J,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(U.options.strict&&Q.start<P.found.offset-1024)u(L.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let R=H?$(U,H,P,u):I(U,J,T,null,P,u);if(U.schema.compat)Cq.flowIndentCheck(_.indent,H,u);J=R.range[2];let K=new wq.Pair(L,R);if(U.options.keepSourceTokens)K.srcToken=X;v.items.push(K)}else{if(Y)u(L.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(P.comment)if(L.comment)L.comment+=`
91
+ `+P.comment;else L.comment=P.comment;let R=new wq.Pair(L);if(U.options.keepSourceTokens)R.srcToken=X;v.items.push(R)}}if(N&&N<J)u(N,"IMPOSSIBLE","Map comment with trailing content");return v.range=[_.offset,J,N??J],v}LL.resolveBlockMap=RL});var kq=E((jL)=>{var PL=H6(),ZL=dI(),AL=kz();function bL({composeNode:$,composeEmptyNode:I},U,_,u,z){let v=new(z?.nodeClass??PL.YAMLSeq)(U.schema);if(U.atRoot)U.atRoot=!1;if(U.atKey)U.atKey=!1;let J=_.offset,N=null;for(let{start:X,value:G}of _.items){let q=ZL.resolveProps(X,{indicator:"seq-item-ind",next:G,offset:J,onError:u,parentIndent:_.indent,startOnNewline:!0});if(!q.found)if(q.anchor||q.tag||G)if(G?.type==="block-seq")u(q.end,"BAD_INDENT","All sequence items must start at the same column");else u(J,"MISSING_CHAR","Sequence item without - indicator");else{if(N=q.end,q.comment)v.comment=q.comment;continue}let T=G?$(U,G,q,u):I(U,q.end,X,null,q,u);if(U.schema.compat)AL.flowIndentCheck(_.indent,G,u);J=T.range[2],v.items.push(T)}return v.range=[_.offset,J,N??J],v}jL.resolveBlockSeq=bL});var S1=E((wL)=>{function SL($,I,U,_){let u="";if($){let z=!1,g="";for(let v of $){let{source:J,type:N}=v;switch(N){case"space":z=!0;break;case"comment":{if(U&&!z)_(v,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let X=J.substring(1)||" ";if(!u)u=X;else u+=g+X;g="";break}case"newline":if(u)g+=J;z=!0;break;default:_(v,"UNEXPECTED_TOKEN",`Unexpected ${N} at node end`)}I+=J.length}}return{comment:u,offset:I}}wL.resolveEnd=SL});var nq=E((rL)=>{var CL=$$(),fL=q6(),yq=T6(),xL=H6(),kL=S1(),iq=dI(),yL=mu(),iL=yz(),iz="Block collections are not allowed within flow collections",nz=($)=>$&&($.type==="block-map"||$.type==="block-seq");function nL({composeNode:$,composeEmptyNode:I},U,_,u,z){let g=_.start.source==="{",v=g?"flow map":"flow sequence",N=new(z?.nodeClass??(g?yq.YAMLMap:xL.YAMLSeq))(U.schema);N.flow=!0;let X=U.atRoot;if(X)U.atRoot=!1;if(U.atKey)U.atKey=!1;let G=_.offset+_.start.source.length;for(let Y=0;Y<_.items.length;++Y){let M=_.items[Y],{start:L,key:P,sep:R,value:K}=M,V=iq.resolveProps(L,{flow:v,indicator:"explicit-key-ind",next:P??R?.[0],offset:G,onError:u,parentIndent:_.indent,startOnNewline:!1});if(!V.found){if(!V.anchor&&!V.tag&&!R&&!K){if(Y===0&&V.comma)u(V.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${v}`);else if(Y<_.items.length-1)u(V.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${v}`);if(V.comment)if(N.comment)N.comment+=`
92
+ `+V.comment;else N.comment=V.comment;G=V.end;continue}if(!g&&U.options.strict&&yL.containsNewline(P))u(P,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(Y===0){if(V.comma)u(V.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${v}`)}else{if(!V.comma)u(V.start,"MISSING_CHAR",`Missing , between ${v} items`);if(V.comment){let B="";$:for(let O of L)switch(O.type){case"comma":case"space":break;case"comment":B=O.source.substring(1);break $;default:break $}if(B){let O=N.items[N.items.length-1];if(CL.isPair(O))O=O.value??O.key;if(O.comment)O.comment+=`
93
+ `+B;else O.comment=B;V.comment=V.comment.substring(B.length+1)}}}if(!g&&!R&&!V.found){let B=K?$(U,K,V,u):I(U,V.end,R,null,V,u);if(N.items.push(B),G=B.range[2],nz(K))u(B.range,"BLOCK_IN_FLOW",iz)}else{U.atKey=!0;let B=V.end,O=P?$(U,P,V,u):I(U,B,L,null,V,u);if(nz(P))u(O.range,"BLOCK_IN_FLOW",iz);U.atKey=!1;let b=iq.resolveProps(R??[],{flow:v,indicator:"map-value-ind",next:K,offset:O.range[2],onError:u,parentIndent:_.indent,startOnNewline:!1});if(b.found){if(!g&&!V.found&&U.options.strict){if(R)for(let j of R){if(j===b.found)break;if(j.type==="newline"){u(j,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(V.start<b.found.offset-1024)u(b.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(K)if("source"in K&&K.source?.[0]===":")u(K,"MISSING_CHAR",`Missing space after : in ${v}`);else u(b.start,"MISSING_CHAR",`Missing , or : between ${v} items`);let A=K?$(U,K,b,u):b.found?I(U,b.end,R,null,b,u):null;if(A){if(nz(K))u(A.range,"BLOCK_IN_FLOW",iz)}else if(b.comment)if(O.comment)O.comment+=`
94
+ `+b.comment;else O.comment=b.comment;let f=new fL.Pair(O,A);if(U.options.keepSourceTokens)f.srcToken=M;if(g){let j=N;if(iL.mapIncludes(U,j.items,O))u(B,"DUPLICATE_KEY","Map keys must be unique");j.items.push(f)}else{let j=new yq.YAMLMap(U.schema);j.flow=!0,j.items.push(f);let u$=(A??O).range;j.range=[O.range[0],u$[1],u$[2]],N.items.push(j)}G=A?A.range[2]:b.end}}let q=g?"}":"]",[T,...H]=_.end,Q=G;if(T?.source===q)Q=T.offset+T.source.length;else{let Y=v[0].toUpperCase()+v.substring(1),M=X?`${Y} must end with a ${q}`:`${Y} in block collection must be sufficiently indented and end with a ${q}`;if(u(G,X?"MISSING_CHAR":"BAD_INDENT",M),T&&T.source.length!==1)H.unshift(T)}if(H.length>0){let Y=kL.resolveEnd(H,Q,U.options.strict,u);if(Y.comment)if(N.comment)N.comment+=`
95
+ `+Y.comment;else N.comment=Y.comment;N.range=[_.offset,Q,Y.offset]}else N.range=[_.offset,Q,Q];return N}rL.resolveFlowCollection=nL});var rq=E((eL)=>{var mL=$$(),hL=W$(),cL=T6(),dL=H6(),pL=xq(),oL=kq(),tL=nq();function rz($,I,U,_,u,z){let g=U.type==="block-map"?pL.resolveBlockMap($,I,U,_,z):U.type==="block-seq"?oL.resolveBlockSeq($,I,U,_,z):tL.resolveFlowCollection($,I,U,_,z),v=g.constructor;if(u==="!"||u===v.tagName)return g.tag=v.tagName,g;if(u)g.tag=u;return g}function aL($,I,U,_,u){let z=_.tag,g=!z?null:I.directives.tagName(z.source,(q)=>u(z,"TAG_RESOLVE_FAILED",q));if(U.type==="block-seq"){let{anchor:q,newlineAfterProp:T}=_,H=q&&z?q.offset>z.offset?q:z:q??z;if(H&&(!T||T.offset<H.offset))u(H,"MISSING_CHAR","Missing newline after block sequence props")}let v=U.type==="block-map"?"map":U.type==="block-seq"?"seq":U.start.source==="{"?"map":"seq";if(!z||!g||g==="!"||g===cL.YAMLMap.tagName&&v==="map"||g===dL.YAMLSeq.tagName&&v==="seq")return rz($,I,U,u,g);let J=I.schema.tags.find((q)=>q.tag===g&&q.collection===v);if(!J){let q=I.schema.knownTags[g];if(q?.collection===v)I.schema.tags.push(Object.assign({},q,{default:!1})),J=q;else{if(q)u(z,"BAD_COLLECTION_TYPE",`${q.tag} used for ${v} collection, but expects ${q.collection??"scalar"}`,!0);else u(z,"TAG_RESOLVE_FAILED",`Unresolved tag: ${g}`,!0);return rz($,I,U,u,g)}}let N=rz($,I,U,u,g,J),X=J.resolve?.(N,(q)=>u(z,"TAG_RESOLVE_FAILED",q),I.options)??N,G=mL.isNode(X)?X:new hL.Scalar(X);if(G.range=N.range,G.tag=g,J?.format)G.format=J.format;return G}eL.composeCollection=aL});var mz=E((UW)=>{var lz=W$();function $W($,I,U){let _=I.offset,u=IW(I,$.options.strict,U);if(!u)return{value:"",type:null,comment:"",range:[_,_,_]};let z=u.mode===">"?lz.Scalar.BLOCK_FOLDED:lz.Scalar.BLOCK_LITERAL,g=I.source?uW(I.source):[],v=g.length;for(let Q=g.length-1;Q>=0;--Q){let Y=g[Q][1];if(Y===""||Y==="\r")v=Q;else break}if(v===0){let Q=u.chomp==="+"&&g.length>0?`
96
+ `.repeat(Math.max(1,g.length-1)):"",Y=_+u.length;if(I.source)Y+=I.source.length;return{value:Q,type:z,comment:u.comment,range:[_,Y,Y]}}let J=I.indent+u.indent,N=I.offset+u.length,X=0;for(let Q=0;Q<v;++Q){let[Y,M]=g[Q];if(M===""||M==="\r"){if(u.indent===0&&Y.length>J)J=Y.length}else{if(Y.length<J)U(N+Y.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator");if(u.indent===0)J=Y.length;if(X=Q,J===0&&!$.atRoot)U(N,"BAD_INDENT","Block scalar values in collections must be indented");break}N+=Y.length+M.length+1}for(let Q=g.length-1;Q>=v;--Q)if(g[Q][0].length>J)v=Q+1;let G="",q="",T=!1;for(let Q=0;Q<X;++Q)G+=g[Q][0].slice(J)+`
97
+ `;for(let Q=X;Q<v;++Q){let[Y,M]=g[Q];N+=Y.length+M.length+1;let L=M[M.length-1]==="\r";if(L)M=M.slice(0,-1);if(M&&Y.length<J){let R=`Block scalar lines must not be less indented than their ${u.indent?"explicit indentation indicator":"first line"}`;U(N-M.length-(L?2:1),"BAD_INDENT",R),Y=""}if(z===lz.Scalar.BLOCK_LITERAL)G+=q+Y.slice(J)+M,q=`
98
+ `;else if(Y.length>J||M[0]==="\t"){if(q===" ")q=`
99
99
  `;else if(!T&&q===`
100
100
  `)q=`
101
101
 
102
- `;G+=q+Y.slice(J)+K,q=`
103
- `,T=!0}else if(K==="")if(q===`
102
+ `;G+=q+Y.slice(J)+M,q=`
103
+ `,T=!0}else if(M==="")if(q===`
104
104
  `)G+=`
105
105
  `;else q=`
106
- `;else G+=q+K,q=" ",T=!1}switch(u.chomp){case"-":break;case"+":for(let Q=v;Q<z.length;++Q)G+=`
107
- `+z[Q][0].slice(J);if(G[G.length-1]!==`
106
+ `;else G+=q+M,q=" ",T=!1}switch(u.chomp){case"-":break;case"+":for(let Q=v;Q<g.length;++Q)G+=`
107
+ `+g[Q][0].slice(J);if(G[G.length-1]!==`
108
108
  `)G+=`
109
109
  `;break;default:G+=`
110
- `}let H=_+u.length+I.source.length;return{value:G,type:g,comment:u.comment,range:[_,H,H]}}function sR({offset:$,props:I},U,_){if(I[0].type!=="block-scalar-header")return _(I[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:u}=I[0],g=u[0],z=0,v="",J=-1;for(let q=1;q<u.length;++q){let T=u[q];if(!v&&(T==="-"||T==="+"))v=T;else{let H=Number(T);if(!z&&H)z=H;else if(J===-1)J=$+q}}if(J!==-1)_(J,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${u}`);let N=!1,X="",G=u.length;for(let q=1;q<I.length;++q){let T=I[q];switch(T.type){case"space":N=!0;case"newline":G+=T.source.length;break;case"comment":if(U&&!N)_(T,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");G+=T.source.length,X=T.source.substring(1);break;case"error":_(T,"UNEXPECTED_TOKEN",T.message),G+=T.source.length;break;default:{let H=`Unexpected token in block scalar header: ${T.type}`;_(T,"UNEXPECTED_TOKEN",H);let Q=T.source;if(Q&&typeof Q==="string")G+=Q.length}}}return{mode:g,indent:z,chomp:v,comment:X,length:G}}function $W($){let I=$.split(/\n( *)/),U=I[0],_=U.match(/^( *)/),g=[_?.[1]?[_[1],U.slice(_[1].length)]:["",U]];for(let z=1;z<I.length;z+=2)g.push([I[z],I[z+1]]);return g}IW.resolveBlockScalar=eR});var mg=E((XW)=>{var lg=W$(),UW=F1();function _W($,I,U){let{offset:_,type:u,source:g,end:z}=$,v,J,N=(q,T,H)=>U(_+q,T,H);switch(u){case"scalar":v=lg.Scalar.PLAIN,J=gW(g,N);break;case"single-quoted-scalar":v=lg.Scalar.QUOTE_SINGLE,J=zW(g,N);break;case"double-quoted-scalar":v=lg.Scalar.QUOTE_DOUBLE,J=vW(g,N);break;default:return U($,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${u}`),{value:"",type:null,comment:"",range:[_,_+g.length,_+g.length]}}let X=_+g.length,G=UW.resolveEnd(z,X,I,U);return{value:J,type:v,comment:G.comment,range:[_,X,G.offset]}}function gW($,I){let U="";switch($[0]){case"\t":U="a tab character";break;case",":U="flow indicator character ,";break;case"%":U="directive indicator character %";break;case"|":case">":{U=`block scalar indicator ${$[0]}`;break}case"@":case"`":{U=`reserved character ${$[0]}`;break}}if(U)I(0,"BAD_SCALAR_START",`Plain value cannot start with ${U}`);return lq($)}function zW($,I){if($[$.length-1]!=="'"||$.length===1)I($.length,"MISSING_CHAR","Missing closing 'quote");return lq($.slice(1,-1)).replace(/''/g,"'")}function lq($){let I,U;try{I=new RegExp(`(.*?)(?<![ ])[ ]*\r?
110
+ `}let H=_+u.length+I.source.length;return{value:G,type:z,comment:u.comment,range:[_,H,H]}}function IW({offset:$,props:I},U,_){if(I[0].type!=="block-scalar-header")return _(I[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:u}=I[0],z=u[0],g=0,v="",J=-1;for(let q=1;q<u.length;++q){let T=u[q];if(!v&&(T==="-"||T==="+"))v=T;else{let H=Number(T);if(!g&&H)g=H;else if(J===-1)J=$+q}}if(J!==-1)_(J,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${u}`);let N=!1,X="",G=u.length;for(let q=1;q<I.length;++q){let T=I[q];switch(T.type){case"space":N=!0;case"newline":G+=T.source.length;break;case"comment":if(U&&!N)_(T,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");G+=T.source.length,X=T.source.substring(1);break;case"error":_(T,"UNEXPECTED_TOKEN",T.message),G+=T.source.length;break;default:{let H=`Unexpected token in block scalar header: ${T.type}`;_(T,"UNEXPECTED_TOKEN",H);let Q=T.source;if(Q&&typeof Q==="string")G+=Q.length}}}return{mode:z,indent:g,chomp:v,comment:X,length:G}}function uW($){let I=$.split(/\n( *)/),U=I[0],_=U.match(/^( *)/),z=[_?.[1]?[_[1],U.slice(_[1].length)]:["",U]];for(let g=1;g<I.length;g+=2)z.push([I[g],I[g+1]]);return z}UW.resolveBlockScalar=$W});var cz=E((QW)=>{var hz=W$(),zW=S1();function gW($,I,U){let{offset:_,type:u,source:z,end:g}=$,v,J,N=(q,T,H)=>U(_+q,T,H);switch(u){case"scalar":v=hz.Scalar.PLAIN,J=vW(z,N);break;case"single-quoted-scalar":v=hz.Scalar.QUOTE_SINGLE,J=JW(z,N);break;case"double-quoted-scalar":v=hz.Scalar.QUOTE_DOUBLE,J=NW(z,N);break;default:return U($,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${u}`),{value:"",type:null,comment:"",range:[_,_+z.length,_+z.length]}}let X=_+z.length,G=zW.resolveEnd(g,X,I,U);return{value:J,type:v,comment:G.comment,range:[_,X,G.offset]}}function vW($,I){let U="";switch($[0]){case"\t":U="a tab character";break;case",":U="flow indicator character ,";break;case"%":U="directive indicator character %";break;case"|":case">":{U=`block scalar indicator ${$[0]}`;break}case"@":case"`":{U=`reserved character ${$[0]}`;break}}if(U)I(0,"BAD_SCALAR_START",`Plain value cannot start with ${U}`);return lq($)}function JW($,I){if($[$.length-1]!=="'"||$.length===1)I($.length,"MISSING_CHAR","Missing closing 'quote");return lq($.slice(1,-1)).replace(/''/g,"'")}function lq($){let I,U;try{I=new RegExp(`(.*?)(?<![ ])[ ]*\r?
111
111
  `,"sy"),U=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
112
- `,"sy")}catch{I=/(.*?)[ \t]*\r?\n/sy,U=/[ \t]*(.*?)[ \t]*\r?\n/sy}let _=I.exec($);if(!_)return $;let u=_[1],g=" ",z=I.lastIndex;U.lastIndex=z;while(_=U.exec($)){if(_[1]==="")if(g===`
113
- `)u+=g;else g=`
114
- `;else u+=g+_[1],g=" ";z=U.lastIndex}let v=/[ \t]*(.*)/sy;return v.lastIndex=z,_=v.exec($),u+g+(_?.[1]??"")}function vW($,I){let U="";for(let _=1;_<$.length-1;++_){let u=$[_];if(u==="\r"&&$[_+1]===`
112
+ `,"sy")}catch{I=/(.*?)[ \t]*\r?\n/sy,U=/[ \t]*(.*?)[ \t]*\r?\n/sy}let _=I.exec($);if(!_)return $;let u=_[1],z=" ",g=I.lastIndex;U.lastIndex=g;while(_=U.exec($)){if(_[1]==="")if(z===`
113
+ `)u+=z;else z=`
114
+ `;else u+=z+_[1],z=" ";g=U.lastIndex}let v=/[ \t]*(.*)/sy;return v.lastIndex=g,_=v.exec($),u+z+(_?.[1]??"")}function NW($,I){let U="";for(let _=1;_<$.length-1;++_){let u=$[_];if(u==="\r"&&$[_+1]===`
115
115
  `)continue;if(u===`
116
- `){let{fold:g,offset:z}=JW($,_);U+=g,_=z}else if(u==="\\"){let g=$[++_],z=NW[g];if(z)U+=z;else if(g===`
117
- `){g=$[_+1];while(g===" "||g==="\t")g=$[++_+1]}else if(g==="\r"&&$[_+1]===`
118
- `){g=$[++_+1];while(g===" "||g==="\t")g=$[++_+1]}else if(g==="x"||g==="u"||g==="U"){let v={x:2,u:4,U:8}[g];U+=GW($,_+1,v,I),_+=v}else{let v=$.substr(_-1,2);I(_-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${v}`),U+=v}}else if(u===" "||u==="\t"){let g=_,z=$[_+1];while(z===" "||z==="\t")z=$[++_+1];if(z!==`
119
- `&&!(z==="\r"&&$[_+2]===`
120
- `))U+=_>g?$.slice(g,_+1):u}else U+=u}if($[$.length-1]!=='"'||$.length===1)I($.length,"MISSING_CHAR",'Missing closing "quote');return U}function JW($,I){let U="",_=$[I+1];while(_===" "||_==="\t"||_===`
116
+ `){let{fold:z,offset:g}=GW($,_);U+=z,_=g}else if(u==="\\"){let z=$[++_],g=XW[z];if(g)U+=g;else if(z===`
117
+ `){z=$[_+1];while(z===" "||z==="\t")z=$[++_+1]}else if(z==="\r"&&$[_+1]===`
118
+ `){z=$[++_+1];while(z===" "||z==="\t")z=$[++_+1]}else if(z==="x"||z==="u"||z==="U"){let v={x:2,u:4,U:8}[z];U+=qW($,_+1,v,I),_+=v}else{let v=$.substr(_-1,2);I(_-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${v}`),U+=v}}else if(u===" "||u==="\t"){let z=_,g=$[_+1];while(g===" "||g==="\t")g=$[++_+1];if(g!==`
119
+ `&&!(g==="\r"&&$[_+2]===`
120
+ `))U+=_>z?$.slice(z,_+1):u}else U+=u}if($[$.length-1]!=='"'||$.length===1)I($.length,"MISSING_CHAR",'Missing closing "quote');return U}function GW($,I){let U="",_=$[I+1];while(_===" "||_==="\t"||_===`
121
121
  `||_==="\r"){if(_==="\r"&&$[I+2]!==`
122
122
  `)break;if(_===`
123
123
  `)U+=`
124
- `;I+=1,_=$[I+1]}if(!U)U=" ";return{fold:U,offset:I}}var NW={"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 GW($,I,U,_){let u=$.substr(I,U),z=u.length===U&&/^[0-9a-fA-F]+$/.test(u)?parseInt(u,16):NaN;if(isNaN(z)){let v=$.substr(I-2,U+2);return _(I-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${v}`),v}return String.fromCodePoint(z)}XW.resolveFlowScalar=_W});var hq=E((VW)=>{var m6=$$(),mq=W$(),QW=rg(),TW=mg();function HW($,I,U,_){let{value:u,type:g,comment:z,range:v}=I.type==="block-scalar"?QW.resolveBlockScalar($,I,_):TW.resolveFlowScalar(I,$.options.strict,_),J=U?$.directives.tagName(U.source,(G)=>_(U,"TAG_RESOLVE_FAILED",G)):null,N;if($.options.stringKeys&&$.atKey)N=$.schema[m6.SCALAR];else if(J)N=YW($.schema,u,J,U,_);else if(I.type==="scalar")N=OW($,u,I,_);else N=$.schema[m6.SCALAR];let X;try{let G=N.resolve(u,(q)=>_(U??I,"TAG_RESOLVE_FAILED",q),$.options);X=m6.isScalar(G)?G:new mq.Scalar(G)}catch(G){let q=G instanceof Error?G.message:String(G);_(U??I,"TAG_RESOLVE_FAILED",q),X=new mq.Scalar(u)}if(X.range=v,X.source=u,g)X.type=g;if(J)X.tag=J;if(N.format)X.format=N.format;if(z)X.comment=z;return X}function YW($,I,U,_,u){if(U==="!")return $[m6.SCALAR];let g=[];for(let v of $.tags)if(!v.collection&&v.tag===U)if(v.default&&v.test)g.push(v);else return v;for(let v of g)if(v.test?.test(I))return v;let z=$.knownTags[U];if(z&&!z.collection)return $.tags.push(Object.assign({},z,{default:!1,test:void 0})),z;return u(_,"TAG_RESOLVE_FAILED",`Unresolved tag: ${U}`,U!=="tag:yaml.org,2002:str"),$[m6.SCALAR]}function OW({atKey:$,directives:I,schema:U},_,u,g){let z=U.tags.find((v)=>(v.default===!0||$&&v.default==="key")&&v.test?.test(_))||U[m6.SCALAR];if(U.compat){let v=U.compat.find((J)=>J.default&&J.test?.test(_))??U[m6.SCALAR];if(z.tag!==v.tag){let J=I.tagString(z.tag),N=I.tagString(v.tag),X=`Value may be parsed as either ${J} or ${N}`;g(u,"TAG_RESOLVE_FAILED",X,!0)}}return z}VW.composeScalar=HW});var cq=E((MW)=>{function DW($,I,U){if(I){U??(U=I.length);for(let _=U-1;_>=0;--_){let u=I[_];switch(u.type){case"space":case"comment":case"newline":$-=u.source.length;continue}u=I[++_];while(u?.type==="space")$+=u.source.length,u=I[++_];break}}return $}MW.emptyScalarPosition=DW});var oq=E((jW)=>{var LW=AI(),RW=$$(),WW=rq(),dq=hq(),PW=F1(),ZW=cq(),AW={composeNode:pq,composeEmptyNode:hg};function pq($,I,U,_){let u=$.atKey,{spaceBefore:g,comment:z,anchor:v,tag:J}=U,N,X=!0;switch(I.type){case"alias":if(N=bW($,I,_),v||J)_(I,"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(N=dq.composeScalar($,I,J,_),v)N.anchor=v.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":if(N=WW.composeCollection(AW,$,I,U,_),v)N.anchor=v.source.substring(1);break;default:{let G=I.type==="error"?I.message:`Unsupported token (type: ${I.type})`;_(I,"UNEXPECTED_TOKEN",G),N=hg($,I.offset,void 0,null,U,_),X=!1}}if(v&&N.anchor==="")_(v,"BAD_ALIAS","Anchor cannot be an empty string");if(u&&$.options.stringKeys&&(!RW.isScalar(N)||typeof N.value!=="string"||N.tag&&N.tag!=="tag:yaml.org,2002:str"))_(J??I,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(g)N.spaceBefore=!0;if(z)if(I.type==="scalar"&&I.source==="")N.comment=z;else N.commentBefore=z;if($.options.keepSourceTokens&&X)N.srcToken=I;return N}function hg($,I,U,_,{spaceBefore:u,comment:g,anchor:z,tag:v,end:J},N){let X={type:"scalar",offset:ZW.emptyScalarPosition(I,U,_),indent:-1,source:""},G=dq.composeScalar($,X,v,N);if(z){if(G.anchor=z.source.substring(1),G.anchor==="")N(z,"BAD_ALIAS","Anchor cannot be an empty string")}if(u)G.spaceBefore=!0;if(g)G.comment=g,G.range[2]=J;return G}function bW({options:$},{offset:I,source:U,end:_},u){let g=new LW.Alias(U.substring(1));if(g.source==="")u(I,"BAD_ALIAS","Alias cannot be an empty string");if(g.source.endsWith(":"))u(I+U.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let z=I+U.length,v=PW.resolveEnd(_,z,$.strict,u);if(g.range=[I,z,v.offset],v.comment)g.comment=v.comment;return g}jW.composeEmptyNode=hg;jW.composeNode=pq});var aq=E((xW)=>{var wW=lI(),tq=oq(),EW=F1(),CW=hI();function fW($,I,{offset:U,start:_,value:u,end:g},z){let v=Object.assign({_directives:I},$),J=new wW.Document(void 0,v),N={atKey:!1,atRoot:!0,directives:J.directives,options:J.options,schema:J.schema},X=CW.resolveProps(_,{indicator:"doc-start",next:u??g?.[0],offset:U,onError:z,parentIndent:0,startOnNewline:!0});if(X.found){if(J.directives.docStart=!0,u&&(u.type==="block-map"||u.type==="block-seq")&&!X.hasNewline)z(X.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}J.contents=u?tq.composeNode(N,u,X,z):tq.composeEmptyNode(N,X.end,_,null,X,z);let G=J.contents.range[2],q=EW.resolveEnd(g,G,!1,z);if(q.comment)J.comment=q.comment;return J.range=[U,G,q.offset],J}xW.composeDoc=fW});var cg=E((mW)=>{var yW=g$("process"),iW=t2(),nW=lI(),cI=mI(),eq=$$(),rW=aq(),lW=F1();function dI($){if(typeof $==="number")return[$,$+1];if(Array.isArray($))return $.length===2?$:[$[0],$[1]];let{offset:I,source:U}=$;return[I,I+(typeof U==="string"?U.length:1)]}function sq($){let I="",U=!1,_=!1;for(let u=0;u<$.length;++u){let g=$[u];switch(g[0]){case"#":I+=(I===""?"":_?`
124
+ `;I+=1,_=$[I+1]}if(!U)U=" ";return{fold:U,offset:I}}var XW={"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 qW($,I,U,_){let u=$.substr(I,U),g=u.length===U&&/^[0-9a-fA-F]+$/.test(u)?parseInt(u,16):NaN;if(isNaN(g)){let v=$.substr(I-2,U+2);return _(I-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${v}`),v}return String.fromCodePoint(g)}QW.resolveFlowScalar=gW});var hq=E((DW)=>{var c6=$$(),mq=W$(),HW=mz(),YW=cz();function OW($,I,U,_){let{value:u,type:z,comment:g,range:v}=I.type==="block-scalar"?HW.resolveBlockScalar($,I,_):YW.resolveFlowScalar(I,$.options.strict,_),J=U?$.directives.tagName(U.source,(G)=>_(U,"TAG_RESOLVE_FAILED",G)):null,N;if($.options.stringKeys&&$.atKey)N=$.schema[c6.SCALAR];else if(J)N=VW($.schema,u,J,U,_);else if(I.type==="scalar")N=BW($,u,I,_);else N=$.schema[c6.SCALAR];let X;try{let G=N.resolve(u,(q)=>_(U??I,"TAG_RESOLVE_FAILED",q),$.options);X=c6.isScalar(G)?G:new mq.Scalar(G)}catch(G){let q=G instanceof Error?G.message:String(G);_(U??I,"TAG_RESOLVE_FAILED",q),X=new mq.Scalar(u)}if(X.range=v,X.source=u,z)X.type=z;if(J)X.tag=J;if(N.format)X.format=N.format;if(g)X.comment=g;return X}function VW($,I,U,_,u){if(U==="!")return $[c6.SCALAR];let z=[];for(let v of $.tags)if(!v.collection&&v.tag===U)if(v.default&&v.test)z.push(v);else return v;for(let v of z)if(v.test?.test(I))return v;let g=$.knownTags[U];if(g&&!g.collection)return $.tags.push(Object.assign({},g,{default:!1,test:void 0})),g;return u(_,"TAG_RESOLVE_FAILED",`Unresolved tag: ${U}`,U!=="tag:yaml.org,2002:str"),$[c6.SCALAR]}function BW({atKey:$,directives:I,schema:U},_,u,z){let g=U.tags.find((v)=>(v.default===!0||$&&v.default==="key")&&v.test?.test(_))||U[c6.SCALAR];if(U.compat){let v=U.compat.find((J)=>J.default&&J.test?.test(_))??U[c6.SCALAR];if(g.tag!==v.tag){let J=I.tagString(g.tag),N=I.tagString(v.tag),X=`Value may be parsed as either ${J} or ${N}`;z(u,"TAG_RESOLVE_FAILED",X,!0)}}return g}DW.composeScalar=OW});var cq=E((RW)=>{function KW($,I,U){if(I){U??(U=I.length);for(let _=U-1;_>=0;--_){let u=I[_];switch(u.type){case"space":case"comment":case"newline":$-=u.source.length;continue}u=I[++_];while(u?.type==="space")$+=u.source.length,u=I[++_];break}}return $}RW.emptyScalarPosition=KW});var oq=E((SW)=>{var WW=jI(),PW=$$(),ZW=rq(),dq=hq(),AW=S1(),bW=cq(),jW={composeNode:pq,composeEmptyNode:dz};function pq($,I,U,_){let u=$.atKey,{spaceBefore:z,comment:g,anchor:v,tag:J}=U,N,X=!0;switch(I.type){case"alias":if(N=FW($,I,_),v||J)_(I,"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(N=dq.composeScalar($,I,J,_),v)N.anchor=v.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":if(N=ZW.composeCollection(jW,$,I,U,_),v)N.anchor=v.source.substring(1);break;default:{let G=I.type==="error"?I.message:`Unsupported token (type: ${I.type})`;_(I,"UNEXPECTED_TOKEN",G),N=dz($,I.offset,void 0,null,U,_),X=!1}}if(v&&N.anchor==="")_(v,"BAD_ALIAS","Anchor cannot be an empty string");if(u&&$.options.stringKeys&&(!PW.isScalar(N)||typeof N.value!=="string"||N.tag&&N.tag!=="tag:yaml.org,2002:str"))_(J??I,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(z)N.spaceBefore=!0;if(g)if(I.type==="scalar"&&I.source==="")N.comment=g;else N.commentBefore=g;if($.options.keepSourceTokens&&X)N.srcToken=I;return N}function dz($,I,U,_,{spaceBefore:u,comment:z,anchor:g,tag:v,end:J},N){let X={type:"scalar",offset:bW.emptyScalarPosition(I,U,_),indent:-1,source:""},G=dq.composeScalar($,X,v,N);if(g){if(G.anchor=g.source.substring(1),G.anchor==="")N(g,"BAD_ALIAS","Anchor cannot be an empty string")}if(u)G.spaceBefore=!0;if(z)G.comment=z,G.range[2]=J;return G}function FW({options:$},{offset:I,source:U,end:_},u){let z=new WW.Alias(U.substring(1));if(z.source==="")u(I,"BAD_ALIAS","Alias cannot be an empty string");if(z.source.endsWith(":"))u(I+U.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let g=I+U.length,v=AW.resolveEnd(_,g,$.strict,u);if(z.range=[I,g,v.offset],v.comment)z.comment=v.comment;return z}SW.composeEmptyNode=dz;SW.composeNode=pq});var aq=E((yW)=>{var CW=hI(),tq=oq(),fW=S1(),xW=dI();function kW($,I,{offset:U,start:_,value:u,end:z},g){let v=Object.assign({_directives:I},$),J=new CW.Document(void 0,v),N={atKey:!1,atRoot:!0,directives:J.directives,options:J.options,schema:J.schema},X=xW.resolveProps(_,{indicator:"doc-start",next:u??z?.[0],offset:U,onError:g,parentIndent:0,startOnNewline:!0});if(X.found){if(J.directives.docStart=!0,u&&(u.type==="block-map"||u.type==="block-seq")&&!X.hasNewline)g(X.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}J.contents=u?tq.composeNode(N,u,X,g):tq.composeEmptyNode(N,X.end,_,null,X,g);let G=J.contents.range[2],q=fW.resolveEnd(z,G,!1,g);if(q.comment)J.comment=q.comment;return J.range=[U,G,q.offset],J}yW.composeDoc=kW});var pz=E((cW)=>{var nW=z$("process"),rW=e2(),lW=hI(),pI=cI(),eq=$$(),mW=aq(),hW=S1();function oI($){if(typeof $==="number")return[$,$+1];if(Array.isArray($))return $.length===2?$:[$[0],$[1]];let{offset:I,source:U}=$;return[I,I+(typeof U==="string"?U.length:1)]}function sq($){let I="",U=!1,_=!1;for(let u=0;u<$.length;++u){let z=$[u];switch(z[0]){case"#":I+=(I===""?"":_?`
126
126
 
127
127
  `:`
128
- `)+(g.substring(1)||" "),U=!0,_=!1;break;case"%":if($[u+1]?.[0]!=="#")u+=1;U=!1;break;default:if(!U)_=!0;U=!1}}return{comment:I,afterEmptyLine:_}}class $5{constructor($={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(I,U,_,u)=>{let g=dI(I);if(u)this.warnings.push(new cI.YAMLWarning(g,U,_));else this.errors.push(new cI.YAMLParseError(g,U,_))},this.directives=new iW.Directives({version:$.version||"1.2"}),this.options=$}decorate($,I){let{comment:U,afterEmptyLine:_}=sq(this.prelude);if(U){let u=$.contents;if(I)$.comment=$.comment?`${$.comment}
129
- ${U}`:U;else if(_||$.directives.docStart||!u)$.commentBefore=U;else if(eq.isCollection(u)&&!u.flow&&u.items.length>0){let g=u.items[0];if(eq.isPair(g))g=g.key;let z=g.commentBefore;g.commentBefore=z?`${U}
130
- ${z}`:U}else{let g=u.commentBefore;u.commentBefore=g?`${U}
131
- ${g}`:U}}if(I)Array.prototype.push.apply($.errors,this.errors),Array.prototype.push.apply($.warnings,this.warnings);else $.errors=this.errors,$.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:sq(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose($,I=!1,U=-1){for(let _ of $)yield*this.next(_);yield*this.end(I,U)}*next($){if(yW.env.LOG_STREAM)console.dir($,{depth:null});switch($.type){case"directive":this.directives.add($.source,(I,U,_)=>{let u=dI($);u[0]+=I,this.onError(u,"BAD_DIRECTIVE",U,_)}),this.prelude.push($.source),this.atDirectives=!0;break;case"document":{let I=rW.composeDoc(this.options,this.directives,$,this.onError);if(this.atDirectives&&!I.directives.docStart)this.onError($,"MISSING_CHAR","Missing directives-end/doc-start indicator line");if(this.decorate(I,!1),this.doc)yield this.doc;this.doc=I,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push($.source);break;case"error":{let I=$.source?`${$.message}: ${JSON.stringify($.source)}`:$.message,U=new cI.YAMLParseError(dI($),"UNEXPECTED_TOKEN",I);if(this.atDirectives||!this.doc)this.errors.push(U);else this.doc.errors.push(U);break}case"doc-end":{if(!this.doc){this.errors.push(new cI.YAMLParseError(dI($),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let I=lW.resolveEnd($.end,$.offset+$.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),I.comment){let U=this.doc.comment;this.doc.comment=U?`${U}
132
- ${I.comment}`:I.comment}this.doc.range[2]=I.offset;break}default:this.errors.push(new cI.YAMLParseError(dI($),"UNEXPECTED_TOKEN",`Unsupported token ${$.type}`))}}*end($=!1,I=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if($){let U=Object.assign({_directives:this.directives},this.options),_=new nW.Document(void 0,U);if(this.atDirectives)this.onError(I,"MISSING_CHAR","Missing directives-end indicator line");_.range=[0,I,I],this.decorate(_,!1),yield _}}}mW.Composer=$5});var U5=E((sW)=>{var cW=rg(),dW=mg(),pW=mI(),I5=SI();function oW($,I=!0,U){if($){let _=(u,g,z)=>{let v=typeof u==="number"?u:Array.isArray(u)?u[0]:u.offset;if(U)U(v,g,z);else throw new pW.YAMLParseError([v,v+1],g,z)};switch($.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return dW.resolveFlowScalar($,I,_);case"block-scalar":return cW.resolveBlockScalar({options:{strict:I}},$,_)}}return null}function tW($,I){let{implicitKey:U=!1,indent:_,inFlow:u=!1,offset:g=-1,type:z="PLAIN"}=I,v=I5.stringifyString({type:z,value:$},{implicitKey:U,indent:_>0?" ".repeat(_):"",inFlow:u,options:{blockQuote:!0,lineWidth:-1}}),J=I.end??[{type:"newline",offset:-1,indent:_,source:`
128
+ `)+(z.substring(1)||" "),U=!0,_=!1;break;case"%":if($[u+1]?.[0]!=="#")u+=1;U=!1;break;default:if(!U)_=!0;U=!1}}return{comment:I,afterEmptyLine:_}}class $5{constructor($={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(I,U,_,u)=>{let z=oI(I);if(u)this.warnings.push(new pI.YAMLWarning(z,U,_));else this.errors.push(new pI.YAMLParseError(z,U,_))},this.directives=new rW.Directives({version:$.version||"1.2"}),this.options=$}decorate($,I){let{comment:U,afterEmptyLine:_}=sq(this.prelude);if(U){let u=$.contents;if(I)$.comment=$.comment?`${$.comment}
129
+ ${U}`:U;else if(_||$.directives.docStart||!u)$.commentBefore=U;else if(eq.isCollection(u)&&!u.flow&&u.items.length>0){let z=u.items[0];if(eq.isPair(z))z=z.key;let g=z.commentBefore;z.commentBefore=g?`${U}
130
+ ${g}`:U}else{let z=u.commentBefore;u.commentBefore=z?`${U}
131
+ ${z}`:U}}if(I)Array.prototype.push.apply($.errors,this.errors),Array.prototype.push.apply($.warnings,this.warnings);else $.errors=this.errors,$.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:sq(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose($,I=!1,U=-1){for(let _ of $)yield*this.next(_);yield*this.end(I,U)}*next($){if(nW.env.LOG_STREAM)console.dir($,{depth:null});switch($.type){case"directive":this.directives.add($.source,(I,U,_)=>{let u=oI($);u[0]+=I,this.onError(u,"BAD_DIRECTIVE",U,_)}),this.prelude.push($.source),this.atDirectives=!0;break;case"document":{let I=mW.composeDoc(this.options,this.directives,$,this.onError);if(this.atDirectives&&!I.directives.docStart)this.onError($,"MISSING_CHAR","Missing directives-end/doc-start indicator line");if(this.decorate(I,!1),this.doc)yield this.doc;this.doc=I,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push($.source);break;case"error":{let I=$.source?`${$.message}: ${JSON.stringify($.source)}`:$.message,U=new pI.YAMLParseError(oI($),"UNEXPECTED_TOKEN",I);if(this.atDirectives||!this.doc)this.errors.push(U);else this.doc.errors.push(U);break}case"doc-end":{if(!this.doc){this.errors.push(new pI.YAMLParseError(oI($),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let I=hW.resolveEnd($.end,$.offset+$.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),I.comment){let U=this.doc.comment;this.doc.comment=U?`${U}
132
+ ${I.comment}`:I.comment}this.doc.range[2]=I.offset;break}default:this.errors.push(new pI.YAMLParseError(oI($),"UNEXPECTED_TOKEN",`Unsupported token ${$.type}`))}}*end($=!1,I=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if($){let U=Object.assign({_directives:this.directives},this.options),_=new lW.Document(void 0,U);if(this.atDirectives)this.onError(I,"MISSING_CHAR","Missing directives-end indicator line");_.range=[0,I,I],this.decorate(_,!1),yield _}}}cW.Composer=$5});var U5=E((IP)=>{var pW=mz(),oW=cz(),tW=cI(),I5=EI();function aW($,I=!0,U){if($){let _=(u,z,g)=>{let v=typeof u==="number"?u:Array.isArray(u)?u[0]:u.offset;if(U)U(v,z,g);else throw new tW.YAMLParseError([v,v+1],z,g)};switch($.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return oW.resolveFlowScalar($,I,_);case"block-scalar":return pW.resolveBlockScalar({options:{strict:I}},$,_)}}return null}function eW($,I){let{implicitKey:U=!1,indent:_,inFlow:u=!1,offset:z=-1,type:g="PLAIN"}=I,v=I5.stringifyString({type:g,value:$},{implicitKey:U,indent:_>0?" ".repeat(_):"",inFlow:u,options:{blockQuote:!0,lineWidth:-1}}),J=I.end??[{type:"newline",offset:-1,indent:_,source:`
133
133
  `}];switch(v[0]){case"|":case">":{let N=v.indexOf(`
134
134
  `),X=v.substring(0,N),G=v.substring(N+1)+`
135
- `,q=[{type:"block-scalar-header",offset:g,indent:_,source:X}];if(!u5(q,J))q.push({type:"newline",offset:-1,indent:_,source:`
136
- `});return{type:"block-scalar",offset:g,indent:_,props:q,source:G}}case'"':return{type:"double-quoted-scalar",offset:g,indent:_,source:v,end:J};case"'":return{type:"single-quoted-scalar",offset:g,indent:_,source:v,end:J};default:return{type:"scalar",offset:g,indent:_,source:v,end:J}}}function aW($,I,U={}){let{afterKey:_=!1,implicitKey:u=!1,inFlow:g=!1,type:z}=U,v="indent"in $?$.indent:null;if(_&&typeof v==="number")v+=2;if(!z)switch($.type){case"single-quoted-scalar":z="QUOTE_SINGLE";break;case"double-quoted-scalar":z="QUOTE_DOUBLE";break;case"block-scalar":{let N=$.props[0];if(N.type!=="block-scalar-header")throw Error("Invalid block scalar header");z=N.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:z="PLAIN"}let J=I5.stringifyString({type:z,value:I},{implicitKey:u||v===null,indent:v!==null&&v>0?" ".repeat(v):"",inFlow:g,options:{blockQuote:!0,lineWidth:-1}});switch(J[0]){case"|":case">":eW($,J);break;case'"':dg($,J,"double-quoted-scalar");break;case"'":dg($,J,"single-quoted-scalar");break;default:dg($,J,"scalar")}}function eW($,I){let U=I.indexOf(`
135
+ `,q=[{type:"block-scalar-header",offset:z,indent:_,source:X}];if(!u5(q,J))q.push({type:"newline",offset:-1,indent:_,source:`
136
+ `});return{type:"block-scalar",offset:z,indent:_,props:q,source:G}}case'"':return{type:"double-quoted-scalar",offset:z,indent:_,source:v,end:J};case"'":return{type:"single-quoted-scalar",offset:z,indent:_,source:v,end:J};default:return{type:"scalar",offset:z,indent:_,source:v,end:J}}}function sW($,I,U={}){let{afterKey:_=!1,implicitKey:u=!1,inFlow:z=!1,type:g}=U,v="indent"in $?$.indent:null;if(_&&typeof v==="number")v+=2;if(!g)switch($.type){case"single-quoted-scalar":g="QUOTE_SINGLE";break;case"double-quoted-scalar":g="QUOTE_DOUBLE";break;case"block-scalar":{let N=$.props[0];if(N.type!=="block-scalar-header")throw Error("Invalid block scalar header");g=N.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:g="PLAIN"}let J=I5.stringifyString({type:g,value:I},{implicitKey:u||v===null,indent:v!==null&&v>0?" ".repeat(v):"",inFlow:z,options:{blockQuote:!0,lineWidth:-1}});switch(J[0]){case"|":case">":$P($,J);break;case'"':oz($,J,"double-quoted-scalar");break;case"'":oz($,J,"single-quoted-scalar");break;default:oz($,J,"scalar")}}function $P($,I){let U=I.indexOf(`
137
137
  `),_=I.substring(0,U),u=I.substring(U+1)+`
138
- `;if($.type==="block-scalar"){let g=$.props[0];if(g.type!=="block-scalar-header")throw Error("Invalid block scalar header");g.source=_,$.source=u}else{let{offset:g}=$,z="indent"in $?$.indent:-1,v=[{type:"block-scalar-header",offset:g,indent:z,source:_}];if(!u5(v,"end"in $?$.end:void 0))v.push({type:"newline",offset:-1,indent:z,source:`
139
- `});for(let J of Object.keys($))if(J!=="type"&&J!=="offset")delete $[J];Object.assign($,{type:"block-scalar",indent:z,props:v,source:u})}}function u5($,I){if(I)for(let U of I)switch(U.type){case"space":case"comment":$.push(U);break;case"newline":return $.push(U),!0}return!1}function dg($,I,U){switch($.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":$.type=U,$.source=I;break;case"block-scalar":{let _=$.props.slice(1),u=I.length;if($.props[0].type==="block-scalar-header")u-=$.props[0].source.length;for(let g of _)g.offset+=u;delete $.props,Object.assign($,{type:U,source:I,end:_});break}case"block-map":case"block-seq":{let u={type:"newline",offset:$.offset+I.length,indent:$.indent,source:`
140
- `};delete $.items,Object.assign($,{type:U,source:I,end:[u]});break}default:{let _="indent"in $?$.indent:-1,u="end"in $&&Array.isArray($.end)?$.end.filter((g)=>g.type==="space"||g.type==="comment"||g.type==="newline"):[];for(let g of Object.keys($))if(g!=="type"&&g!=="offset")delete $[g];Object.assign($,{type:U,indent:_,source:I,end:u})}}}sW.createScalarToken=tW;sW.resolveAsScalar=oW;sW.setScalarValue=aW});var _5=E((_P)=>{var UP=($)=>("type"in $)?hu($):mu($);function hu($){switch($.type){case"block-scalar":{let I="";for(let U of $.props)I+=hu(U);return I+$.source}case"block-map":case"block-seq":{let I="";for(let U of $.items)I+=mu(U);return I}case"flow-collection":{let I=$.start.source;for(let U of $.items)I+=mu(U);for(let U of $.end)I+=U.source;return I}case"document":{let I=mu($);if($.end)for(let U of $.end)I+=U.source;return I}default:{let I=$.source;if("end"in $&&$.end)for(let U of $.end)I+=U.source;return I}}}function mu({start:$,key:I,sep:U,value:_}){let u="";for(let g of $)u+=g.source;if(I)u+=hu(I);if(U)for(let g of U)u+=g.source;if(_)u+=hu(_);return u}_P.stringify=UP});var v5=E((vP)=>{var pg=Symbol("break visit"),zP=Symbol("skip children"),g5=Symbol("remove item");function h6($,I){if("type"in $&&$.type==="document")$={start:$.start,value:$.value};z5(Object.freeze([]),$,I)}h6.BREAK=pg;h6.SKIP=zP;h6.REMOVE=g5;h6.itemAtPath=($,I)=>{let U=$;for(let[_,u]of I){let g=U?.[_];if(g&&"items"in g)U=g.items[u];else return}return U};h6.parentCollection=($,I)=>{let U=h6.itemAtPath($,I.slice(0,-1)),_=I[I.length-1][0],u=U?.[_];if(u&&"items"in u)return u;throw Error("Parent collection not found")};function z5($,I,U){let _=U(I,$);if(typeof _==="symbol")return _;for(let u of["key","value"]){let g=I[u];if(g&&"items"in g){for(let z=0;z<g.items.length;++z){let v=z5(Object.freeze($.concat([[u,z]])),g.items[z],U);if(typeof v==="number")z=v-1;else if(v===pg)return pg;else if(v===g5)g.items.splice(z,1),z-=1}if(typeof _==="function"&&u==="key")_=_(I,$)}}return typeof _==="function"?_(I,$):_}vP.visit=h6});var cu=E((HP)=>{var og=U5(),NP=_5(),GP=v5(),tg="\uFEFF",ag="\x02",eg="\x18",sg="\x1F",XP=($)=>!!$&&("items"in $),qP=($)=>!!$&&($.type==="scalar"||$.type==="single-quoted-scalar"||$.type==="double-quoted-scalar"||$.type==="block-scalar");function QP($){switch($){case tg:return"<BOM>";case ag:return"<DOC>";case eg:return"<FLOW_END>";case sg:return"<SCALAR>";default:return JSON.stringify($)}}function TP($){switch($){case tg:return"byte-order-mark";case ag:return"doc-mode";case eg:return"flow-error-end";case sg:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
138
+ `;if($.type==="block-scalar"){let z=$.props[0];if(z.type!=="block-scalar-header")throw Error("Invalid block scalar header");z.source=_,$.source=u}else{let{offset:z}=$,g="indent"in $?$.indent:-1,v=[{type:"block-scalar-header",offset:z,indent:g,source:_}];if(!u5(v,"end"in $?$.end:void 0))v.push({type:"newline",offset:-1,indent:g,source:`
139
+ `});for(let J of Object.keys($))if(J!=="type"&&J!=="offset")delete $[J];Object.assign($,{type:"block-scalar",indent:g,props:v,source:u})}}function u5($,I){if(I)for(let U of I)switch(U.type){case"space":case"comment":$.push(U);break;case"newline":return $.push(U),!0}return!1}function oz($,I,U){switch($.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":$.type=U,$.source=I;break;case"block-scalar":{let _=$.props.slice(1),u=I.length;if($.props[0].type==="block-scalar-header")u-=$.props[0].source.length;for(let z of _)z.offset+=u;delete $.props,Object.assign($,{type:U,source:I,end:_});break}case"block-map":case"block-seq":{let u={type:"newline",offset:$.offset+I.length,indent:$.indent,source:`
140
+ `};delete $.items,Object.assign($,{type:U,source:I,end:[u]});break}default:{let _="indent"in $?$.indent:-1,u="end"in $&&Array.isArray($.end)?$.end.filter((z)=>z.type==="space"||z.type==="comment"||z.type==="newline"):[];for(let z of Object.keys($))if(z!=="type"&&z!=="offset")delete $[z];Object.assign($,{type:U,indent:_,source:I,end:u})}}}IP.createScalarToken=eW;IP.resolveAsScalar=aW;IP.setScalarValue=sW});var _5=E((gP)=>{var zP=($)=>("type"in $)?cu($):hu($);function cu($){switch($.type){case"block-scalar":{let I="";for(let U of $.props)I+=cu(U);return I+$.source}case"block-map":case"block-seq":{let I="";for(let U of $.items)I+=hu(U);return I}case"flow-collection":{let I=$.start.source;for(let U of $.items)I+=hu(U);for(let U of $.end)I+=U.source;return I}case"document":{let I=hu($);if($.end)for(let U of $.end)I+=U.source;return I}default:{let I=$.source;if("end"in $&&$.end)for(let U of $.end)I+=U.source;return I}}}function hu({start:$,key:I,sep:U,value:_}){let u="";for(let z of $)u+=z.source;if(I)u+=cu(I);if(U)for(let z of U)u+=z.source;if(_)u+=cu(_);return u}gP.stringify=zP});var v5=E((NP)=>{var tz=Symbol("break visit"),JP=Symbol("skip children"),z5=Symbol("remove item");function d6($,I){if("type"in $&&$.type==="document")$={start:$.start,value:$.value};g5(Object.freeze([]),$,I)}d6.BREAK=tz;d6.SKIP=JP;d6.REMOVE=z5;d6.itemAtPath=($,I)=>{let U=$;for(let[_,u]of I){let z=U?.[_];if(z&&"items"in z)U=z.items[u];else return}return U};d6.parentCollection=($,I)=>{let U=d6.itemAtPath($,I.slice(0,-1)),_=I[I.length-1][0],u=U?.[_];if(u&&"items"in u)return u;throw Error("Parent collection not found")};function g5($,I,U){let _=U(I,$);if(typeof _==="symbol")return _;for(let u of["key","value"]){let z=I[u];if(z&&"items"in z){for(let g=0;g<z.items.length;++g){let v=g5(Object.freeze($.concat([[u,g]])),z.items[g],U);if(typeof v==="number")g=v-1;else if(v===tz)return tz;else if(v===z5)z.items.splice(g,1),g-=1}if(typeof _==="function"&&u==="key")_=_(I,$)}}return typeof _==="function"?_(I,$):_}NP.visit=d6});var du=E((OP)=>{var az=U5(),XP=_5(),qP=v5(),ez="\uFEFF",sz="\x02",$g="\x18",Ig="\x1F",QP=($)=>!!$&&("items"in $),TP=($)=>!!$&&($.type==="scalar"||$.type==="single-quoted-scalar"||$.type==="double-quoted-scalar"||$.type==="block-scalar");function HP($){switch($){case ez:return"<BOM>";case sz:return"<DOC>";case $g:return"<FLOW_END>";case Ig:return"<SCALAR>";default:return JSON.stringify($)}}function YP($){switch($){case ez:return"byte-order-mark";case sz:return"doc-mode";case $g:return"flow-error-end";case Ig:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
141
141
  `:case`\r
142
- `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch($[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}HP.createScalarToken=og.createScalarToken;HP.resolveAsScalar=og.resolveAsScalar;HP.setScalarValue=og.setScalarValue;HP.stringify=NP.stringify;HP.visit=GP.visit;HP.BOM=tg;HP.DOCUMENT=ag;HP.FLOW_END=eg;HP.SCALAR=sg;HP.isCollection=XP;HP.isScalar=qP;HP.prettyToken=QP;HP.tokenType=TP});var Iz=E((FP)=>{var pI=cu();function M4($){switch($){case void 0:case" ":case`
143
- `:case"\r":case"\t":return!0;default:return!1}}var J5=new Set("0123456789ABCDEFabcdef"),bP=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),du=new Set(",[]{}"),jP=new Set(` ,[]{}
144
- \r `),$z=($)=>!$||jP.has($);class N5{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex($,I=!1){if($){if(typeof $!=="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+$:$,this.lineEndPos=null}this.atEnd=!I;let U=this.next??"stream";while(U&&(I||this.hasChars(1)))U=yield*this.parseNext(U)}atLineEnd(){let $=this.pos,I=this.buffer[$];while(I===" "||I==="\t")I=this.buffer[++$];if(!I||I==="#"||I===`
142
+ `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch($[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}OP.createScalarToken=az.createScalarToken;OP.resolveAsScalar=az.resolveAsScalar;OP.setScalarValue=az.setScalarValue;OP.stringify=XP.stringify;OP.visit=qP.visit;OP.BOM=ez;OP.DOCUMENT=sz;OP.FLOW_END=$g;OP.SCALAR=Ig;OP.isCollection=QP;OP.isScalar=TP;OP.prettyToken=HP;OP.tokenType=YP});var Ug=E((wP)=>{var tI=du();function M4($){switch($){case void 0:case" ":case`
143
+ `:case"\r":case"\t":return!0;default:return!1}}var J5=new Set("0123456789ABCDEFabcdef"),FP=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),pu=new Set(",[]{}"),SP=new Set(` ,[]{}
144
+ \r `),ug=($)=>!$||SP.has($);class N5{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex($,I=!1){if($){if(typeof $!=="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+$:$,this.lineEndPos=null}this.atEnd=!I;let U=this.next??"stream";while(U&&(I||this.hasChars(1)))U=yield*this.parseNext(U)}atLineEnd(){let $=this.pos,I=this.buffer[$];while(I===" "||I==="\t")I=this.buffer[++$];if(!I||I==="#"||I===`
145
145
  `)return!0;if(I==="\r")return this.buffer[$+1]===`
146
146
  `;return!1}charAt($){return this.buffer[this.pos+$]}continueScalar($){let I=this.buffer[$];if(this.indentNext>0){let U=0;while(I===" ")I=this.buffer[++U+$];if(I==="\r"){let _=this.buffer[U+$+1];if(_===`
147
147
  `||!_&&!this.atEnd)return $+U+1}return I===`
148
148
  `||U>=this.indentNext||!I&&!this.atEnd?$+U:-1}if(I==="-"||I==="."){let U=this.buffer.substr($,3);if((U==="---"||U==="...")&&M4(this.buffer[$+3]))return-1}return $}getLine(){let $=this.lineEndPos;if(typeof $!=="number"||$!==-1&&$<this.pos)$=this.buffer.indexOf(`
149
- `,this.pos),this.lineEndPos=$;if($===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[$-1]==="\r")$-=1;return this.buffer.substring(this.pos,$)}hasChars($){return this.pos+$<=this.buffer.length}setNext($){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=$,null}peek($){return this.buffer.substr(this.pos,$)}*parseNext($){switch($){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let $=this.getLine();if($===null)return this.setNext("stream");if($[0]===pI.BOM)yield*this.pushCount(1),$=$.substring(1);if($[0]==="%"){let I=$.length,U=$.indexOf("#");while(U!==-1){let u=$[U-1];if(u===" "||u==="\t"){I=U-1;break}else U=$.indexOf("#",U+1)}while(!0){let u=$[I-1];if(u===" "||u==="\t")I-=1;else break}let _=(yield*this.pushCount(I))+(yield*this.pushSpaces(!0));return yield*this.pushCount($.length-_),this.pushNewline(),"stream"}if(this.atLineEnd()){let I=yield*this.pushSpaces(!0);return yield*this.pushCount($.length-I),yield*this.pushNewline(),"stream"}return yield pI.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let $=this.charAt(0);if(!$&&!this.atEnd)return this.setNext("line-start");if($==="-"||$==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let I=this.peek(3);if((I==="---"||I==="...")&&M4(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,I==="---"?"doc":"stream"}if(this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!M4(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){let[$,I]=this.peek(2);if(!I&&!this.atEnd)return this.setNext("block-start");if(($==="-"||$==="?"||$===":")&&M4(I)){let U=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=U,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let $=this.getLine();if($===null)return this.setNext("doc");let I=yield*this.pushIndicators();switch($[I]){case"#":yield*this.pushCount($.length-I);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil($z),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return I+=yield*this.parseBlockScalarHeader(),I+=yield*this.pushSpaces(!0),yield*this.pushCount($.length-I),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let $,I,U=-1;do{if($=yield*this.pushNewline(),$>0)I=yield*this.pushSpaces(!1),this.indentValue=U=I;else I=0;I+=yield*this.pushSpaces(!0)}while($+I>0);let _=this.getLine();if(_===null)return this.setNext("flow");if(U!==-1&&U<this.indentNext&&_[0]!=="#"||U===0&&(_.startsWith("---")||_.startsWith("..."))&&M4(_[3])){if(!(U===this.indentNext-1&&this.flowLevel===1&&(_[0]==="]"||_[0]==="}")))return this.flowLevel=0,yield pI.FLOW_END,yield*this.parseLineStart()}let u=0;while(_[u]===",")u+=yield*this.pushCount(1),u+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(u+=yield*this.pushIndicators(),_[u]){case void 0:return"flow";case"#":return yield*this.pushCount(_.length-u),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil($z),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let g=this.charAt(1);if(this.flowKey||M4(g)||g===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let $=this.charAt(0),I=this.buffer.indexOf($,this.pos+1);if($==="'")while(I!==-1&&this.buffer[I+1]==="'")I=this.buffer.indexOf("'",I+2);else while(I!==-1){let u=0;while(this.buffer[I-1-u]==="\\")u+=1;if(u%2===0)break;I=this.buffer.indexOf('"',I+1)}let U=this.buffer.substring(0,I),_=U.indexOf(`
149
+ `,this.pos),this.lineEndPos=$;if($===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[$-1]==="\r")$-=1;return this.buffer.substring(this.pos,$)}hasChars($){return this.pos+$<=this.buffer.length}setNext($){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=$,null}peek($){return this.buffer.substr(this.pos,$)}*parseNext($){switch($){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let $=this.getLine();if($===null)return this.setNext("stream");if($[0]===tI.BOM)yield*this.pushCount(1),$=$.substring(1);if($[0]==="%"){let I=$.length,U=$.indexOf("#");while(U!==-1){let u=$[U-1];if(u===" "||u==="\t"){I=U-1;break}else U=$.indexOf("#",U+1)}while(!0){let u=$[I-1];if(u===" "||u==="\t")I-=1;else break}let _=(yield*this.pushCount(I))+(yield*this.pushSpaces(!0));return yield*this.pushCount($.length-_),this.pushNewline(),"stream"}if(this.atLineEnd()){let I=yield*this.pushSpaces(!0);return yield*this.pushCount($.length-I),yield*this.pushNewline(),"stream"}return yield tI.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let $=this.charAt(0);if(!$&&!this.atEnd)return this.setNext("line-start");if($==="-"||$==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let I=this.peek(3);if((I==="---"||I==="...")&&M4(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,I==="---"?"doc":"stream"}if(this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!M4(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){let[$,I]=this.peek(2);if(!I&&!this.atEnd)return this.setNext("block-start");if(($==="-"||$==="?"||$===":")&&M4(I)){let U=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=U,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let $=this.getLine();if($===null)return this.setNext("doc");let I=yield*this.pushIndicators();switch($[I]){case"#":yield*this.pushCount($.length-I);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(ug),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return I+=yield*this.parseBlockScalarHeader(),I+=yield*this.pushSpaces(!0),yield*this.pushCount($.length-I),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let $,I,U=-1;do{if($=yield*this.pushNewline(),$>0)I=yield*this.pushSpaces(!1),this.indentValue=U=I;else I=0;I+=yield*this.pushSpaces(!0)}while($+I>0);let _=this.getLine();if(_===null)return this.setNext("flow");if(U!==-1&&U<this.indentNext&&_[0]!=="#"||U===0&&(_.startsWith("---")||_.startsWith("..."))&&M4(_[3])){if(!(U===this.indentNext-1&&this.flowLevel===1&&(_[0]==="]"||_[0]==="}")))return this.flowLevel=0,yield tI.FLOW_END,yield*this.parseLineStart()}let u=0;while(_[u]===",")u+=yield*this.pushCount(1),u+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(u+=yield*this.pushIndicators(),_[u]){case void 0:return"flow";case"#":return yield*this.pushCount(_.length-u),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(ug),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let z=this.charAt(1);if(this.flowKey||M4(z)||z===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let $=this.charAt(0),I=this.buffer.indexOf($,this.pos+1);if($==="'")while(I!==-1&&this.buffer[I+1]==="'")I=this.buffer.indexOf("'",I+2);else while(I!==-1){let u=0;while(this.buffer[I-1-u]==="\\")u+=1;if(u%2===0)break;I=this.buffer.indexOf('"',I+1)}let U=this.buffer.substring(0,I),_=U.indexOf(`
150
150
  `,this.pos);if(_!==-1){while(_!==-1){let u=this.continueScalar(_+1);if(u===-1)break;_=U.indexOf(`
151
151
  `,u)}if(_!==-1)I=_-(U[_-1]==="\r"?2:1)}if(I===-1){if(!this.atEnd)return this.setNext("quoted-scalar");I=this.buffer.length}return yield*this.pushToIndex(I+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let $=this.pos;while(!0){let I=this.buffer[++$];if(I==="+")this.blockScalarKeep=!0;else if(I>"0"&&I<="9")this.blockScalarIndent=Number(I)-1;else if(I!=="-")break}return yield*this.pushUntil((I)=>M4(I)||I==="#")}*parseBlockScalar(){let $=this.pos-1,I=0,U;$:for(let u=this.pos;U=this.buffer[u];++u)switch(U){case" ":I+=1;break;case`
152
- `:$=u,I=0;break;case"\r":{let g=this.buffer[u+1];if(!g&&!this.atEnd)return this.setNext("block-scalar");if(g===`
152
+ `:$=u,I=0;break;case"\r":{let z=this.buffer[u+1];if(!z&&!this.atEnd)return this.setNext("block-scalar");if(z===`
153
153
  `)break}default:break $}if(!U&&!this.atEnd)return this.setNext("block-scalar");if(I>=this.indentNext){if(this.blockScalarIndent===-1)this.indentNext=I;else this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let u=this.continueScalar($+1);if(u===-1)break;$=this.buffer.indexOf(`
154
154
  `,u)}while($!==-1);if($===-1){if(!this.atEnd)return this.setNext("block-scalar");$=this.buffer.length}}let _=$+1;U=this.buffer[_];while(U===" ")U=this.buffer[++_];if(U==="\t"){while(U==="\t"||U===" "||U==="\r"||U===`
155
- `)U=this.buffer[++_];$=_-1}else if(!this.blockScalarKeep)do{let u=$-1,g=this.buffer[u];if(g==="\r")g=this.buffer[--u];let z=u;while(g===" ")g=this.buffer[--u];if(g===`
156
- `&&u>=this.pos&&u+1+I>z)$=u;else break}while(!0);return yield pI.SCALAR,yield*this.pushToIndex($+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let $=this.flowLevel>0,I=this.pos-1,U=this.pos-1,_;while(_=this.buffer[++U])if(_===":"){let u=this.buffer[U+1];if(M4(u)||$&&du.has(u))break;I=U}else if(M4(_)){let u=this.buffer[U+1];if(_==="\r")if(u===`
155
+ `)U=this.buffer[++_];$=_-1}else if(!this.blockScalarKeep)do{let u=$-1,z=this.buffer[u];if(z==="\r")z=this.buffer[--u];let g=u;while(z===" ")z=this.buffer[--u];if(z===`
156
+ `&&u>=this.pos&&u+1+I>g)$=u;else break}while(!0);return yield tI.SCALAR,yield*this.pushToIndex($+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let $=this.flowLevel>0,I=this.pos-1,U=this.pos-1,_;while(_=this.buffer[++U])if(_===":"){let u=this.buffer[U+1];if(M4(u)||$&&pu.has(u))break;I=U}else if(M4(_)){let u=this.buffer[U+1];if(_==="\r")if(u===`
157
157
  `)U+=1,_=`
158
- `,u=this.buffer[U+1];else I=U;if(u==="#"||$&&du.has(u))break;if(_===`
159
- `){let g=this.continueScalar(U+1);if(g===-1)break;U=Math.max(U,g-2)}}else{if($&&du.has(_))break;I=U}if(!_&&!this.atEnd)return this.setNext("plain-scalar");return yield pI.SCALAR,yield*this.pushToIndex(I+1,!0),$?"flow":"doc"}*pushCount($){if($>0)return yield this.buffer.substr(this.pos,$),this.pos+=$,$;return 0}*pushToIndex($,I){let U=this.buffer.slice(this.pos,$);if(U)return yield U,this.pos+=U.length,U.length;else if(I)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($z))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let $=this.flowLevel>0,I=this.charAt(1);if(M4(I)||$&&du.has(I)){if(!$)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 $=this.pos+2,I=this.buffer[$];while(!M4(I)&&I!==">")I=this.buffer[++$];return yield*this.pushToIndex(I===">"?$+1:$,!1)}else{let $=this.pos+1,I=this.buffer[$];while(I)if(bP.has(I))I=this.buffer[++$];else if(I==="%"&&J5.has(this.buffer[$+1])&&J5.has(this.buffer[$+2]))I=this.buffer[$+=3];else break;return yield*this.pushToIndex($,!1)}}*pushNewline(){let $=this.buffer[this.pos];if($===`
158
+ `,u=this.buffer[U+1];else I=U;if(u==="#"||$&&pu.has(u))break;if(_===`
159
+ `){let z=this.continueScalar(U+1);if(z===-1)break;U=Math.max(U,z-2)}}else{if($&&pu.has(_))break;I=U}if(!_&&!this.atEnd)return this.setNext("plain-scalar");return yield tI.SCALAR,yield*this.pushToIndex(I+1,!0),$?"flow":"doc"}*pushCount($){if($>0)return yield this.buffer.substr(this.pos,$),this.pos+=$,$;return 0}*pushToIndex($,I){let U=this.buffer.slice(this.pos,$);if(U)return yield U,this.pos+=U.length,U.length;else if(I)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(ug))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let $=this.flowLevel>0,I=this.charAt(1);if(M4(I)||$&&pu.has(I)){if(!$)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 $=this.pos+2,I=this.buffer[$];while(!M4(I)&&I!==">")I=this.buffer[++$];return yield*this.pushToIndex(I===">"?$+1:$,!1)}else{let $=this.pos+1,I=this.buffer[$];while(I)if(FP.has(I))I=this.buffer[++$];else if(I==="%"&&J5.has(this.buffer[$+1])&&J5.has(this.buffer[$+2]))I=this.buffer[$+=3];else break;return yield*this.pushToIndex($,!1)}}*pushNewline(){let $=this.buffer[this.pos];if($===`
160
160
  `)return yield*this.pushCount(1);else if($==="\r"&&this.charAt(1)===`
161
- `)return yield*this.pushCount(2);else return 0}*pushSpaces($){let I=this.pos-1,U;do U=this.buffer[++I];while(U===" "||$&&U==="\t");let _=I-this.pos;if(_>0)yield this.buffer.substr(this.pos,_),this.pos=I;return _}*pushUntil($){let I=this.pos,U=this.buffer[I];while(!$(U))U=this.buffer[++I];return yield*this.pushToIndex(I,!1)}}FP.Lexer=N5});var uz=E((wP)=>{class G5{constructor(){this.lineStarts=[],this.addNewLine=($)=>this.lineStarts.push($),this.linePos=($)=>{let I=0,U=this.lineStarts.length;while(I<U){let u=I+U>>1;if(this.lineStarts[u]<$)I=u+1;else U=u}if(this.lineStarts[I]===$)return{line:I+1,col:1};if(I===0)return{line:0,col:$};let _=this.lineStarts[I-1];return{line:I,col:$-_+1}}}}wP.LineCounter=G5});var Uz=E((xP)=>{var CP=g$("process"),X5=cu(),fP=Iz();function Y6($,I){for(let U=0;U<$.length;++U)if($[U].type===I)return!0;return!1}function q5($){for(let I=0;I<$.length;++I)switch($[I].type){case"space":case"comment":case"newline":break;default:return I}return-1}function T5($){switch($?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function pu($){switch($.type){case"document":return $.start;case"block-map":{let I=$.items[$.items.length-1];return I.sep??I.start}case"block-seq":return $.items[$.items.length-1].start;default:return[]}}function S1($){if($.length===0)return[];let I=$.length;$:while(--I>=0)switch($[I].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break $}while($[++I]?.type==="space");return $.splice(I,$.length)}function Q5($){if($.start.type==="flow-seq-start"){for(let I of $.items)if(I.sep&&!I.value&&!Y6(I.start,"explicit-key-ind")&&!Y6(I.sep,"map-value-ind")){if(I.key)I.value=I.key;if(delete I.key,T5(I.value))if(I.value.end)Array.prototype.push.apply(I.value.end,I.sep);else I.value.end=I.sep;else Array.prototype.push.apply(I.start,I.sep);delete I.sep}}}class H5{constructor($){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new fP.Lexer,this.onNewLine=$}*parse($,I=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let U of this.lexer.lex($,I))yield*this.next(U);if(!I)yield*this.end()}*next($){if(this.source=$,CP.env.LOG_TOKENS)console.log("|",X5.prettyToken($));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=$.length;return}let I=X5.tokenType($);if(!I){let U=`Not a YAML token: ${$}`;yield*this.pop({type:"error",offset:this.offset,message:U,source:$}),this.offset+=$.length}else if(I==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=I,yield*this.step(),I){case"newline":if(this.atNewLine=!0,this.indent=0,this.onNewLine)this.onNewLine(this.offset+$.length);break;case"space":if(this.atNewLine&&$[0]===" ")this.indent+=$.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=$.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=$.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 $=this.peek(1);if(this.type==="doc-end"&&$?.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(!$)return yield*this.stream();switch($.type){case"document":return yield*this.document($);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar($);case"block-scalar":return yield*this.blockScalar($);case"block-map":return yield*this.blockMap($);case"block-seq":return yield*this.blockSequence($);case"flow-collection":return yield*this.flowCollection($);case"doc-end":return yield*this.documentEnd($)}yield*this.pop()}peek($){return this.stack[this.stack.length-$]}*pop($){let I=$??this.stack.pop();if(!I)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield I;else{let U=this.peek(1);if(I.type==="block-scalar")I.indent="indent"in U?U.indent:0;else if(I.type==="flow-collection"&&U.type==="document")I.indent=0;if(I.type==="flow-collection")Q5(I);switch(U.type){case"document":U.value=I;break;case"block-scalar":U.props.push(I);break;case"block-map":{let _=U.items[U.items.length-1];if(_.value){U.items.push({start:[],key:I,sep:[]}),this.onKeyLine=!0;return}else if(_.sep)_.value=I;else{Object.assign(_,{key:I,sep:[]}),this.onKeyLine=!_.explicitKey;return}break}case"block-seq":{let _=U.items[U.items.length-1];if(_.value)U.items.push({start:[],value:I});else _.value=I;break}case"flow-collection":{let _=U.items[U.items.length-1];if(!_||_.value)U.items.push({start:[],key:I,sep:[]});else if(_.sep)_.value=I;else Object.assign(_,{key:I,sep:[]});return}default:yield*this.pop(),yield*this.pop(I)}if((U.type==="document"||U.type==="block-map"||U.type==="block-seq")&&(I.type==="block-map"||I.type==="block-seq")){let _=I.items[I.items.length-1];if(_&&!_.sep&&!_.value&&_.start.length>0&&q5(_.start)===-1&&(I.indent===0||_.start.every((u)=>u.type!=="comment"||u.indent<I.indent))){if(U.type==="document")U.end=_.start;else U.items.push({start:_.start});I.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 $={type:"document",offset:this.offset,start:[]};if(this.type==="doc-start")$.start.push(this.sourceToken);this.stack.push($);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document($){if($.value)return yield*this.lineEnd($);switch(this.type){case"doc-start":{if(q5($.start)!==-1)yield*this.pop(),yield*this.step();else $.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":$.start.push(this.sourceToken);return}let I=this.startBlockValue($);if(I)this.stack.push(I);else yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar($){if(this.type==="map-value-ind"){let I=pu(this.peek(2)),U=S1(I),_;if($.end)_=$.end,_.push(this.sourceToken),delete $.end;else _=[this.sourceToken];let u={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:U,key:$,sep:_}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=u}else yield*this.lineEnd($)}*blockScalar($){switch(this.type){case"space":case"comment":case"newline":$.props.push(this.sourceToken);return;case"scalar":if($.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let I=this.source.indexOf(`
161
+ `)return yield*this.pushCount(2);else return 0}*pushSpaces($){let I=this.pos-1,U;do U=this.buffer[++I];while(U===" "||$&&U==="\t");let _=I-this.pos;if(_>0)yield this.buffer.substr(this.pos,_),this.pos=I;return _}*pushUntil($){let I=this.pos,U=this.buffer[I];while(!$(U))U=this.buffer[++I];return yield*this.pushToIndex(I,!1)}}wP.Lexer=N5});var _g=E((CP)=>{class G5{constructor(){this.lineStarts=[],this.addNewLine=($)=>this.lineStarts.push($),this.linePos=($)=>{let I=0,U=this.lineStarts.length;while(I<U){let u=I+U>>1;if(this.lineStarts[u]<$)I=u+1;else U=u}if(this.lineStarts[I]===$)return{line:I+1,col:1};if(I===0)return{line:0,col:$};let _=this.lineStarts[I-1];return{line:I,col:$-_+1}}}}CP.LineCounter=G5});var zg=E((yP)=>{var xP=z$("process"),X5=du(),kP=Ug();function Y6($,I){for(let U=0;U<$.length;++U)if($[U].type===I)return!0;return!1}function q5($){for(let I=0;I<$.length;++I)switch($[I].type){case"space":case"comment":case"newline":break;default:return I}return-1}function T5($){switch($?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function ou($){switch($.type){case"document":return $.start;case"block-map":{let I=$.items[$.items.length-1];return I.sep??I.start}case"block-seq":return $.items[$.items.length-1].start;default:return[]}}function w1($){if($.length===0)return[];let I=$.length;$:while(--I>=0)switch($[I].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break $}while($[++I]?.type==="space");return $.splice(I,$.length)}function Q5($){if($.start.type==="flow-seq-start"){for(let I of $.items)if(I.sep&&!I.value&&!Y6(I.start,"explicit-key-ind")&&!Y6(I.sep,"map-value-ind")){if(I.key)I.value=I.key;if(delete I.key,T5(I.value))if(I.value.end)Array.prototype.push.apply(I.value.end,I.sep);else I.value.end=I.sep;else Array.prototype.push.apply(I.start,I.sep);delete I.sep}}}class H5{constructor($){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new kP.Lexer,this.onNewLine=$}*parse($,I=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let U of this.lexer.lex($,I))yield*this.next(U);if(!I)yield*this.end()}*next($){if(this.source=$,xP.env.LOG_TOKENS)console.log("|",X5.prettyToken($));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=$.length;return}let I=X5.tokenType($);if(!I){let U=`Not a YAML token: ${$}`;yield*this.pop({type:"error",offset:this.offset,message:U,source:$}),this.offset+=$.length}else if(I==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=I,yield*this.step(),I){case"newline":if(this.atNewLine=!0,this.indent=0,this.onNewLine)this.onNewLine(this.offset+$.length);break;case"space":if(this.atNewLine&&$[0]===" ")this.indent+=$.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=$.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=$.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 $=this.peek(1);if(this.type==="doc-end"&&$?.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(!$)return yield*this.stream();switch($.type){case"document":return yield*this.document($);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar($);case"block-scalar":return yield*this.blockScalar($);case"block-map":return yield*this.blockMap($);case"block-seq":return yield*this.blockSequence($);case"flow-collection":return yield*this.flowCollection($);case"doc-end":return yield*this.documentEnd($)}yield*this.pop()}peek($){return this.stack[this.stack.length-$]}*pop($){let I=$??this.stack.pop();if(!I)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield I;else{let U=this.peek(1);if(I.type==="block-scalar")I.indent="indent"in U?U.indent:0;else if(I.type==="flow-collection"&&U.type==="document")I.indent=0;if(I.type==="flow-collection")Q5(I);switch(U.type){case"document":U.value=I;break;case"block-scalar":U.props.push(I);break;case"block-map":{let _=U.items[U.items.length-1];if(_.value){U.items.push({start:[],key:I,sep:[]}),this.onKeyLine=!0;return}else if(_.sep)_.value=I;else{Object.assign(_,{key:I,sep:[]}),this.onKeyLine=!_.explicitKey;return}break}case"block-seq":{let _=U.items[U.items.length-1];if(_.value)U.items.push({start:[],value:I});else _.value=I;break}case"flow-collection":{let _=U.items[U.items.length-1];if(!_||_.value)U.items.push({start:[],key:I,sep:[]});else if(_.sep)_.value=I;else Object.assign(_,{key:I,sep:[]});return}default:yield*this.pop(),yield*this.pop(I)}if((U.type==="document"||U.type==="block-map"||U.type==="block-seq")&&(I.type==="block-map"||I.type==="block-seq")){let _=I.items[I.items.length-1];if(_&&!_.sep&&!_.value&&_.start.length>0&&q5(_.start)===-1&&(I.indent===0||_.start.every((u)=>u.type!=="comment"||u.indent<I.indent))){if(U.type==="document")U.end=_.start;else U.items.push({start:_.start});I.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 $={type:"document",offset:this.offset,start:[]};if(this.type==="doc-start")$.start.push(this.sourceToken);this.stack.push($);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document($){if($.value)return yield*this.lineEnd($);switch(this.type){case"doc-start":{if(q5($.start)!==-1)yield*this.pop(),yield*this.step();else $.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":$.start.push(this.sourceToken);return}let I=this.startBlockValue($);if(I)this.stack.push(I);else yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar($){if(this.type==="map-value-ind"){let I=ou(this.peek(2)),U=w1(I),_;if($.end)_=$.end,_.push(this.sourceToken),delete $.end;else _=[this.sourceToken];let u={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:U,key:$,sep:_}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=u}else yield*this.lineEnd($)}*blockScalar($){switch(this.type){case"space":case"comment":case"newline":$.props.push(this.sourceToken);return;case"scalar":if($.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let I=this.source.indexOf(`
162
162
  `)+1;while(I!==0)this.onNewLine(this.offset+I),I=this.source.indexOf(`
163
- `,I)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap($){let I=$.items[$.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,I.value){let U="end"in I.value?I.value.end:void 0;if((Array.isArray(U)?U[U.length-1]:void 0)?.type==="comment")U?.push(this.sourceToken);else $.items.push({start:[this.sourceToken]})}else if(I.sep)I.sep.push(this.sourceToken);else I.start.push(this.sourceToken);return;case"space":case"comment":if(I.value)$.items.push({start:[this.sourceToken]});else if(I.sep)I.sep.push(this.sourceToken);else{if(this.atIndentedComment(I.start,$.indent)){let _=$.items[$.items.length-2]?.value?.end;if(Array.isArray(_)){Array.prototype.push.apply(_,I.start),_.push(this.sourceToken),$.items.pop();return}}I.start.push(this.sourceToken)}return}if(this.indent>=$.indent){let U=!this.onKeyLine&&this.indent===$.indent,_=U&&(I.sep||I.explicitKey)&&this.type!=="seq-item-ind",u=[];if(_&&I.sep&&!I.value){let g=[];for(let z=0;z<I.sep.length;++z){let v=I.sep[z];switch(v.type){case"newline":g.push(z);break;case"space":break;case"comment":if(v.indent>$.indent)g.length=0;break;default:g.length=0}}if(g.length>=2)u=I.sep.splice(g[1])}switch(this.type){case"anchor":case"tag":if(_||I.value)u.push(this.sourceToken),$.items.push({start:u}),this.onKeyLine=!0;else if(I.sep)I.sep.push(this.sourceToken);else I.start.push(this.sourceToken);return;case"explicit-key-ind":if(!I.sep&&!I.explicitKey)I.start.push(this.sourceToken),I.explicitKey=!0;else if(_||I.value)u.push(this.sourceToken),$.items.push({start:u,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(I.explicitKey)if(!I.sep)if(Y6(I.start,"newline"))Object.assign(I,{key:null,sep:[this.sourceToken]});else{let g=S1(I.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:g,key:null,sep:[this.sourceToken]}]})}else if(I.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Y6(I.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:null,sep:[this.sourceToken]}]});else if(T5(I.key)&&!Y6(I.sep,"newline")){let g=S1(I.start),z=I.key,v=I.sep;v.push(this.sourceToken),delete I.key,delete I.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:g,key:z,sep:v}]})}else if(u.length>0)I.sep=I.sep.concat(u,this.sourceToken);else I.sep.push(this.sourceToken);else if(!I.sep)Object.assign(I,{key:null,sep:[this.sourceToken]});else if(I.value||_)$.items.push({start:u,key:null,sep:[this.sourceToken]});else if(Y6(I.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else I.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let g=this.flowScalar(this.type);if(_||I.value)$.items.push({start:u,key:g,sep:[]}),this.onKeyLine=!0;else if(I.sep)this.stack.push(g);else Object.assign(I,{key:g,sep:[]}),this.onKeyLine=!0;return}default:{let g=this.startBlockValue($);if(g){if(g.type==="block-seq"){if(!I.explicitKey&&I.sep&&!Y6(I.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(U)$.items.push({start:u});this.stack.push(g);return}}}}yield*this.pop(),yield*this.step()}*blockSequence($){let I=$.items[$.items.length-1];switch(this.type){case"newline":if(I.value){let U="end"in I.value?I.value.end:void 0;if((Array.isArray(U)?U[U.length-1]:void 0)?.type==="comment")U?.push(this.sourceToken);else $.items.push({start:[this.sourceToken]})}else I.start.push(this.sourceToken);return;case"space":case"comment":if(I.value)$.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(I.start,$.indent)){let _=$.items[$.items.length-2]?.value?.end;if(Array.isArray(_)){Array.prototype.push.apply(_,I.start),_.push(this.sourceToken),$.items.pop();return}}I.start.push(this.sourceToken)}return;case"anchor":case"tag":if(I.value||this.indent<=$.indent)break;I.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==$.indent)break;if(I.value||Y6(I.start,"seq-item-ind"))$.items.push({start:[this.sourceToken]});else I.start.push(this.sourceToken);return}if(this.indent>$.indent){let U=this.startBlockValue($);if(U){this.stack.push(U);return}}yield*this.pop(),yield*this.step()}*flowCollection($){let I=$.items[$.items.length-1];if(this.type==="flow-error-end"){let U;do yield*this.pop(),U=this.peek(1);while(U?.type==="flow-collection")}else if($.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!I||I.sep)$.items.push({start:[this.sourceToken]});else I.start.push(this.sourceToken);return;case"map-value-ind":if(!I||I.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(I.sep)I.sep.push(this.sourceToken);else Object.assign(I,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!I||I.value)$.items.push({start:[this.sourceToken]});else if(I.sep)I.sep.push(this.sourceToken);else I.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let _=this.flowScalar(this.type);if(!I||I.value)$.items.push({start:[],key:_,sep:[]});else if(I.sep)this.stack.push(_);else Object.assign(I,{key:_,sep:[]});return}case"flow-map-end":case"flow-seq-end":$.end.push(this.sourceToken);return}let U=this.startBlockValue($);if(U)this.stack.push(U);else yield*this.pop(),yield*this.step()}else{let U=this.peek(2);if(U.type==="block-map"&&(this.type==="map-value-ind"&&U.indent===$.indent||this.type==="newline"&&!U.items[U.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&U.type!=="flow-collection"){let _=pu(U),u=S1(_);Q5($);let g=$.end.splice(1,$.end.length);g.push(this.sourceToken);let z={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:u,key:$,sep:g}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=z}else yield*this.lineEnd($)}}flowScalar($){if(this.onNewLine){let I=this.source.indexOf(`
163
+ `,I)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap($){let I=$.items[$.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,I.value){let U="end"in I.value?I.value.end:void 0;if((Array.isArray(U)?U[U.length-1]:void 0)?.type==="comment")U?.push(this.sourceToken);else $.items.push({start:[this.sourceToken]})}else if(I.sep)I.sep.push(this.sourceToken);else I.start.push(this.sourceToken);return;case"space":case"comment":if(I.value)$.items.push({start:[this.sourceToken]});else if(I.sep)I.sep.push(this.sourceToken);else{if(this.atIndentedComment(I.start,$.indent)){let _=$.items[$.items.length-2]?.value?.end;if(Array.isArray(_)){Array.prototype.push.apply(_,I.start),_.push(this.sourceToken),$.items.pop();return}}I.start.push(this.sourceToken)}return}if(this.indent>=$.indent){let U=!this.onKeyLine&&this.indent===$.indent,_=U&&(I.sep||I.explicitKey)&&this.type!=="seq-item-ind",u=[];if(_&&I.sep&&!I.value){let z=[];for(let g=0;g<I.sep.length;++g){let v=I.sep[g];switch(v.type){case"newline":z.push(g);break;case"space":break;case"comment":if(v.indent>$.indent)z.length=0;break;default:z.length=0}}if(z.length>=2)u=I.sep.splice(z[1])}switch(this.type){case"anchor":case"tag":if(_||I.value)u.push(this.sourceToken),$.items.push({start:u}),this.onKeyLine=!0;else if(I.sep)I.sep.push(this.sourceToken);else I.start.push(this.sourceToken);return;case"explicit-key-ind":if(!I.sep&&!I.explicitKey)I.start.push(this.sourceToken),I.explicitKey=!0;else if(_||I.value)u.push(this.sourceToken),$.items.push({start:u,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(I.explicitKey)if(!I.sep)if(Y6(I.start,"newline"))Object.assign(I,{key:null,sep:[this.sourceToken]});else{let z=w1(I.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:z,key:null,sep:[this.sourceToken]}]})}else if(I.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Y6(I.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:null,sep:[this.sourceToken]}]});else if(T5(I.key)&&!Y6(I.sep,"newline")){let z=w1(I.start),g=I.key,v=I.sep;v.push(this.sourceToken),delete I.key,delete I.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:z,key:g,sep:v}]})}else if(u.length>0)I.sep=I.sep.concat(u,this.sourceToken);else I.sep.push(this.sourceToken);else if(!I.sep)Object.assign(I,{key:null,sep:[this.sourceToken]});else if(I.value||_)$.items.push({start:u,key:null,sep:[this.sourceToken]});else if(Y6(I.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else I.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let z=this.flowScalar(this.type);if(_||I.value)$.items.push({start:u,key:z,sep:[]}),this.onKeyLine=!0;else if(I.sep)this.stack.push(z);else Object.assign(I,{key:z,sep:[]}),this.onKeyLine=!0;return}default:{let z=this.startBlockValue($);if(z){if(z.type==="block-seq"){if(!I.explicitKey&&I.sep&&!Y6(I.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(U)$.items.push({start:u});this.stack.push(z);return}}}}yield*this.pop(),yield*this.step()}*blockSequence($){let I=$.items[$.items.length-1];switch(this.type){case"newline":if(I.value){let U="end"in I.value?I.value.end:void 0;if((Array.isArray(U)?U[U.length-1]:void 0)?.type==="comment")U?.push(this.sourceToken);else $.items.push({start:[this.sourceToken]})}else I.start.push(this.sourceToken);return;case"space":case"comment":if(I.value)$.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(I.start,$.indent)){let _=$.items[$.items.length-2]?.value?.end;if(Array.isArray(_)){Array.prototype.push.apply(_,I.start),_.push(this.sourceToken),$.items.pop();return}}I.start.push(this.sourceToken)}return;case"anchor":case"tag":if(I.value||this.indent<=$.indent)break;I.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==$.indent)break;if(I.value||Y6(I.start,"seq-item-ind"))$.items.push({start:[this.sourceToken]});else I.start.push(this.sourceToken);return}if(this.indent>$.indent){let U=this.startBlockValue($);if(U){this.stack.push(U);return}}yield*this.pop(),yield*this.step()}*flowCollection($){let I=$.items[$.items.length-1];if(this.type==="flow-error-end"){let U;do yield*this.pop(),U=this.peek(1);while(U?.type==="flow-collection")}else if($.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!I||I.sep)$.items.push({start:[this.sourceToken]});else I.start.push(this.sourceToken);return;case"map-value-ind":if(!I||I.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(I.sep)I.sep.push(this.sourceToken);else Object.assign(I,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!I||I.value)$.items.push({start:[this.sourceToken]});else if(I.sep)I.sep.push(this.sourceToken);else I.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let _=this.flowScalar(this.type);if(!I||I.value)$.items.push({start:[],key:_,sep:[]});else if(I.sep)this.stack.push(_);else Object.assign(I,{key:_,sep:[]});return}case"flow-map-end":case"flow-seq-end":$.end.push(this.sourceToken);return}let U=this.startBlockValue($);if(U)this.stack.push(U);else yield*this.pop(),yield*this.step()}else{let U=this.peek(2);if(U.type==="block-map"&&(this.type==="map-value-ind"&&U.indent===$.indent||this.type==="newline"&&!U.items[U.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&U.type!=="flow-collection"){let _=ou(U),u=w1(_);Q5($);let z=$.end.splice(1,$.end.length);z.push(this.sourceToken);let g={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:u,key:$,sep:z}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=g}else yield*this.lineEnd($)}}flowScalar($){if(this.onNewLine){let I=this.source.indexOf(`
164
164
  `)+1;while(I!==0)this.onNewLine(this.offset+I),I=this.source.indexOf(`
165
- `,I)+1}return{type:$,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue($){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 I=pu($),U=S1(I);return U.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:U,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let I=pu($),U=S1(I);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:U,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment($,I){if(this.type!=="comment")return!1;if(this.indent<=I)return!1;return $.every((U)=>U.type==="newline"||U.type==="space")}*documentEnd($){if(this.type!=="doc-mode"){if($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd($){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($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}xP.Parser=H5});var D5=E((cP)=>{var Y5=cg(),yP=lI(),oI=mI(),iP=ug(),nP=$$(),rP=uz(),O5=Uz();function V5($){let I=$.prettyErrors!==!1;return{lineCounter:$.lineCounter||I&&new rP.LineCounter||null,prettyErrors:I}}function lP($,I={}){let{lineCounter:U,prettyErrors:_}=V5(I),u=new O5.Parser(U?.addNewLine),g=new Y5.Composer(I),z=Array.from(g.compose(u.parse($)));if(_&&U)for(let v of z)v.errors.forEach(oI.prettifyError($,U)),v.warnings.forEach(oI.prettifyError($,U));if(z.length>0)return z;return Object.assign([],{empty:!0},g.streamInfo())}function B5($,I={}){let{lineCounter:U,prettyErrors:_}=V5(I),u=new O5.Parser(U?.addNewLine),g=new Y5.Composer(I),z=null;for(let v of g.compose(u.parse($),!0,$.length))if(!z)z=v;else if(z.options.logLevel!=="silent"){z.errors.push(new oI.YAMLParseError(v.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(_&&U)z.errors.forEach(oI.prettifyError($,U)),z.warnings.forEach(oI.prettifyError($,U));return z}function mP($,I,U){let _=void 0;if(typeof I==="function")_=I;else if(U===void 0&&I&&typeof I==="object")U=I;let u=B5($,U);if(!u)return null;if(u.warnings.forEach((g)=>iP.warn(u.options.logLevel,g)),u.errors.length>0)if(u.options.logLevel!=="silent")throw u.errors[0];else u.errors=[];return u.toJS(Object.assign({reviver:_},U))}function hP($,I,U){let _=null;if(typeof I==="function"||Array.isArray(I))_=I;else if(U===void 0&&I)U=I;if(typeof U==="string")U=U.length;if(typeof U==="number"){let u=Math.round(U);U=u<1?void 0:u>8?{indent:8}:{indent:u}}if($===void 0){let{keepUndefined:u}=U??I??{};if(!u)return}if(nP.isDocument($)&&!_)return $.toString(U);return new yP.Document($,_,U).toString(U)}cP.parse=mP;cP.parseAllDocuments=lP;cP.parseDocument=B5;cP.stringify=hP});var aP,eP,sP,_z,$Z,O6,IZ,uZ,UZ,_Z,Sk,gZ,zZ,vZ,ou,M5,JZ,NZ,GZ,XZ,qZ,QZ,TZ,HZ,YZ,OZ,VZ,BZ,DZ,MZ,KZ,LZ,RZ,WZ,PZ,ZZ,AZ,bZ,c6,jZ,FZ,SZ,wZ,EZ;var gz=U4(()=>{aP=cg(),eP=lI(),sP=jg(),_z=mI(),$Z=AI(),O6=$$(),IZ=q6(),uZ=W$(),UZ=T6(),_Z=H6(),Sk=cu(),gZ=Iz(),zZ=uz(),vZ=Uz(),ou=D5(),M5=PI();JZ=aP.Composer,NZ=eP.Document,GZ=sP.Schema,XZ=_z.YAMLError,qZ=_z.YAMLParseError,QZ=_z.YAMLWarning,TZ=$Z.Alias,HZ=O6.isAlias,YZ=O6.isCollection,OZ=O6.isDocument,VZ=O6.isMap,BZ=O6.isNode,DZ=O6.isPair,MZ=O6.isScalar,KZ=O6.isSeq,LZ=IZ.Pair,RZ=uZ.Scalar,WZ=UZ.YAMLMap,PZ=_Z.YAMLSeq,ZZ=gZ.Lexer,AZ=zZ.LineCounter,bZ=vZ.Parser,c6=ou.parse,jZ=ou.parseAllDocuments,FZ=ou.parseDocument,SZ=ou.stringify,wZ=M5.visit,EZ=M5.visitAsync});import{existsSync as U1,mkdirSync as Mj,readdirSync as Kj,readFileSync as j_,writeFileSync as D7}from"node:fs";import{join as L4}from"node:path";function NI($){return L4($,".serena","memories")}function u1($){try{return j_($,"utf-8")}catch{return""}}function e3($){return($.match(/##\s*ID:\s*(.+)/i)||[])[1]||($.match(/session-id:\s*(.+)/i)||[])[1]||$.match(/(session-\d{8}-\d{6})/)?.[1]}function Lj($){let I=$.trim();return I===""||I==="---"}function s3($){let I=(J)=>String(J).padStart(2,"0"),U=$.getFullYear(),_=I($.getMonth()+1),u=I($.getDate()),g=I($.getHours()),z=I($.getMinutes()),v=I($.getSeconds());return`session-${U}${_}${u}-${g}${z}${v}`}function Rj($,I){return["# Orchestrator Session",`## ID: ${$}`,`## Started: ${I}`,"## Status: idle","","## Agents","| Agent ID | CLI | PID | Status | Task |","|----------|-----|-----|--------|------|","","## Summary (filled on completion)","- Total Tasks: 0","- Completed: 0","- Failed: 0","- Files Created: []","- Issues: []",""].join(`
166
- `)}function Wj($){return["# Task Board",`## Session: ${$}`,"","| Agent | Status | Task |","|-------|--------|------|",""].join(`
167
- `)}function $G($){let I=NI($);if(!U1(I))return[];try{return Kj(I).filter((U)=>U.endsWith(".md")&&U!==".gitkeep")}catch{return[]}}function M7($,I){let U=$.match(/^progress-(\w+)\.md$/),_=$.match(/^result-(\w+)\.md$/);if(U?.[1])return{agent:U[1],type:"progress",content:I.slice(0,500)};if(_?.[1])return{agent:_[1],type:"result",content:I.slice(0,500)};return null}function K7($){let I=NI($),U={agents:[],activities:[],completedTasks:[],inProgressTasks:[]};if(!U1(I))return U;let _=$G($);for(let u of _){if(u==="orchestrator-session.md"){try{let z=j_(L4(I,u),"utf-8").match(/session[:\s]+(\S+)/i);if(z)U.sessionId=z[1]}catch{}continue}try{let g=j_(L4(I,u),"utf-8"),z=M7(u,g);if(z){if(U.activities.push(z),!U.agents.includes(z.agent))U.agents.push(z.agent);if(z.type==="result"){let v=g.match(/task[:\s]+(.+)/i)||g.match(/##\s*(.+)/);if(v?.[1])U.completedTasks.push(v[1].trim())}else if(z.type==="progress"){let v=g.match(/current[:\s]+(.+)/i)||g.match(/working on[:\s]+(.+)/i);if(v?.[1]&&!U.completedTasks.includes(v[1].trim()))U.inProgressTasks.push(v[1].trim())}}}catch{}}return U}function F_($){let I=NI($),U=L4(I,"orchestrator-session.md");if(!U1(U))return{};let _=u1(U);if(!_)return{};let u=e3(_)?.trim(),g=(_.match(/##\s*Status:\s*(.+)/i)||[])[1]||(_.match(/status:\s*(running|completed|failed|aborted)/i)||[])[1],z=(_.match(/##\s*Started:\s*(.+)/i)||[])[1]||(_.match(/started:\s*(.+)/i)||[])[1];return{id:u,status:g?.trim().toLowerCase(),startedAt:z?.trim()}}function L7($){let I=NI($);if(!U1(I))return 0;let U=0,_=$G($);for(let z of _){if(!z.startsWith("result-"))continue;let v=u1(L4(I,z));if(!v)continue;let J=v.split(`
168
- `).map((N)=>N.trim()).find((N)=>/^##\s*Status:/i.test(N)||/^Status:/i.test(N));if(J){if(J.match(/status[^:]*:\s*([a-z_]+)/i)?.[1]?.toLowerCase()==="completed")U+=1}}let u=u1(L4(I,"task-board.md"));if(u){let z=u.split(`
169
- `).map((v)=>v.trim()).filter((v)=>/status/i.test(v)).reduce((v,J)=>{if(J.match(/status[^:]*:\s*([a-z_]+)/i)?.[1]?.toLowerCase()==="completed")return v+1;return v},0);U=Math.max(U,z)}let g=u1(L4(I,"orchestrator-session.md"));if(g){let z=g.match(/Completed:\s*(\d+)/i);if(z?.[1]){let v=parseInt(z[1],10);if(!Number.isNaN(v))U=Math.max(U,v)}}return U}function R7($,I){let U=[],_=NI($);if(!U1(_))return U;let u=I?new Date(I).getTime():0,g=$G($);for(let z of g){if(z==="orchestrator-session.md")continue;try{let v=L4(_,z),J=j_(v,"utf-8"),N=M7(z,J);if(N)U.push(N)}catch{}}return U}function W7($){let I=[];for(let U of $){let _=U.content.toLowerCase();if(_.includes("error")||_.includes("fail"))I.push(`${U.agent}: Error handling improved`);if(_.includes("refactor"))I.push(`${U.agent}: Code structure refactored`);if(_.includes("test"))I.push(`${U.agent}: Test coverage added`);if(_.includes("performance")||_.includes("optimize"))I.push(`${U.agent}: Performance optimized`)}return[...new Set(I)].slice(0,5)}function P7($,I={}){let U=NI($);if(!U1(U))Mj(U,{recursive:!0});let _=u1(L4(U,"orchestrator-session.md")),u=u1(L4(U,"task-board.md")),g=e3(_)||e3(u)||s3(new Date),z=new Date().toISOString(),v=Rj(g,z),J=Wj(g),N=[],X=[],G=[],q=(T,H)=>{let Q=L4(U,T);if(!U1(Q)){D7(Q,H,"utf-8"),N.push(T);return}let Y=u1(Q);if(I.force||Lj(Y)){D7(Q,H,"utf-8"),X.push(T);return}G.push(T)};return q("orchestrator-session.md",v),q("task-board.md",J),q(".gitkeep",""),{memoriesDir:U,sessionId:g,created:N,updated:X,skipped:G}}var F0=()=>{};var gG=E((wn,y7)=>{var _G={to($,I){if(!I)return`\x1B[${$+1}G`;return`\x1B[${I+1};${$+1}H`},move($,I){let U="";if($<0)U+=`\x1B[${-$}D`;else if($>0)U+=`\x1B[${$}C`;if(I<0)U+=`\x1B[${-I}A`;else if(I>0)U+=`\x1B[${I}B`;return U},up:($=1)=>`\x1B[${$}A`,down:($=1)=>`\x1B[${$}B`,forward:($=1)=>`\x1B[${$}C`,backward:($=1)=>`\x1B[${$}D`,nextLine:($=1)=>"\x1B[E".repeat($),prevLine:($=1)=>"\x1B[F".repeat($),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},ej={up:($=1)=>"\x1B[S".repeat($),down:($=1)=>"\x1B[T".repeat($)},sj={screen:"\x1B[2J",up:($=1)=>"\x1B[1J".repeat($),down:($=1)=>"\x1B[J".repeat($),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines($){let I="";for(let U=0;U<$;U++)I+=this.line+(U<$-1?_G.up():"");if($)I+=_G.left;return I}};y7.exports={cursor:_G,scroll:ej,erase:sj,beep:"\x07"}});import{styleText as NG}from"node:util";import{stdout as qG,stdin as m7}from"node:process";import*as Z6 from"node:readline";import $F from"node:readline";import{ReadStream as i7}from"node:tty";function e4($,I,U){if(!U.some((z)=>!z.disabled))return $;let _=$+I,u=Math.max(U.length-1,0),g=_<0?u:_>u?0:_;return U[g].disabled?e4(g,I<0?-1:1,U):g}function GG($,I,U){return String($).normalize().replaceAll(`\r
165
+ `,I)+1}return{type:$,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue($){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 I=ou($),U=w1(I);return U.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:U,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let I=ou($),U=w1(I);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:U,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment($,I){if(this.type!=="comment")return!1;if(this.indent<=I)return!1;return $.every((U)=>U.type==="newline"||U.type==="space")}*documentEnd($){if(this.type!=="doc-mode"){if($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd($){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($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}yP.Parser=H5});var D5=E((pP)=>{var Y5=pz(),nP=hI(),aI=cI(),rP=_z(),lP=$$(),mP=_g(),O5=zg();function V5($){let I=$.prettyErrors!==!1;return{lineCounter:$.lineCounter||I&&new mP.LineCounter||null,prettyErrors:I}}function hP($,I={}){let{lineCounter:U,prettyErrors:_}=V5(I),u=new O5.Parser(U?.addNewLine),z=new Y5.Composer(I),g=Array.from(z.compose(u.parse($)));if(_&&U)for(let v of g)v.errors.forEach(aI.prettifyError($,U)),v.warnings.forEach(aI.prettifyError($,U));if(g.length>0)return g;return Object.assign([],{empty:!0},z.streamInfo())}function B5($,I={}){let{lineCounter:U,prettyErrors:_}=V5(I),u=new O5.Parser(U?.addNewLine),z=new Y5.Composer(I),g=null;for(let v of z.compose(u.parse($),!0,$.length))if(!g)g=v;else if(g.options.logLevel!=="silent"){g.errors.push(new aI.YAMLParseError(v.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(_&&U)g.errors.forEach(aI.prettifyError($,U)),g.warnings.forEach(aI.prettifyError($,U));return g}function cP($,I,U){let _=void 0;if(typeof I==="function")_=I;else if(U===void 0&&I&&typeof I==="object")U=I;let u=B5($,U);if(!u)return null;if(u.warnings.forEach((z)=>rP.warn(u.options.logLevel,z)),u.errors.length>0)if(u.options.logLevel!=="silent")throw u.errors[0];else u.errors=[];return u.toJS(Object.assign({reviver:_},U))}function dP($,I,U){let _=null;if(typeof I==="function"||Array.isArray(I))_=I;else if(U===void 0&&I)U=I;if(typeof U==="string")U=U.length;if(typeof U==="number"){let u=Math.round(U);U=u<1?void 0:u>8?{indent:8}:{indent:u}}if($===void 0){let{keepUndefined:u}=U??I??{};if(!u)return}if(lP.isDocument($)&&!_)return $.toString(U);return new nP.Document($,_,U).toString(U)}pP.parse=cP;pP.parseAllDocuments=hP;pP.parseDocument=B5;pP.stringify=dP});var sP,$Z,IZ,gg,uZ,O6,UZ,_Z,zZ,gZ,fk,vZ,JZ,NZ,tu,M5,GZ,XZ,qZ,QZ,TZ,HZ,YZ,OZ,VZ,BZ,DZ,MZ,KZ,RZ,LZ,WZ,PZ,ZZ,AZ,bZ,jZ,FZ,p6,SZ,wZ,EZ,CZ,fZ;var vg=_4(()=>{sP=pz(),$Z=hI(),IZ=Sz(),gg=cI(),uZ=jI(),O6=$$(),UZ=q6(),_Z=W$(),zZ=T6(),gZ=H6(),fk=du(),vZ=Ug(),JZ=_g(),NZ=zg(),tu=D5(),M5=AI();GZ=sP.Composer,XZ=$Z.Document,qZ=IZ.Schema,QZ=gg.YAMLError,TZ=gg.YAMLParseError,HZ=gg.YAMLWarning,YZ=uZ.Alias,OZ=O6.isAlias,VZ=O6.isCollection,BZ=O6.isDocument,DZ=O6.isMap,MZ=O6.isNode,KZ=O6.isPair,RZ=O6.isScalar,LZ=O6.isSeq,WZ=UZ.Pair,PZ=_Z.Scalar,ZZ=zZ.YAMLMap,AZ=gZ.YAMLSeq,bZ=vZ.Lexer,jZ=JZ.LineCounter,FZ=NZ.Parser,p6=tu.parse,SZ=tu.parseAllDocuments,wZ=tu.parseDocument,EZ=tu.stringify,CZ=M5.visit,fZ=M5.visitAsync});import{existsSync as z1,mkdirSync as Rj,readdirSync as Lj,readFileSync as F_,writeFileSync as D7}from"node:fs";import{join as R4}from"node:path";function GI($){return R4($,".serena","memories")}function _1($){try{return F_($,"utf-8")}catch{return""}}function $G($){return($.match(/##\s*ID:\s*(.+)/i)||[])[1]||($.match(/session-id:\s*(.+)/i)||[])[1]||$.match(/(session-\d{8}-\d{6})/)?.[1]}function Wj($){let I=$.trim();return I===""||I==="---"}function IG($){let I=(J)=>String(J).padStart(2,"0"),U=$.getFullYear(),_=I($.getMonth()+1),u=I($.getDate()),z=I($.getHours()),g=I($.getMinutes()),v=I($.getSeconds());return`session-${U}${_}${u}-${z}${g}${v}`}function Pj($,I){return["# Orchestrator Session",`## ID: ${$}`,`## Started: ${I}`,"## Status: idle","","## Agents","| Agent ID | CLI | PID | Status | Task |","|----------|-----|-----|--------|------|","","## Summary (filled on completion)","- Total Tasks: 0","- Completed: 0","- Failed: 0","- Files Created: []","- Issues: []",""].join(`
166
+ `)}function Zj($){return["# Task Board",`## Session: ${$}`,"","| Agent | Status | Task |","|-------|--------|------|",""].join(`
167
+ `)}function uG($){let I=GI($);if(!z1(I))return[];try{return Lj(I).filter((U)=>U.endsWith(".md")&&U!==".gitkeep")}catch{return[]}}function M7($,I){let U=$.match(/^progress-(\w+)\.md$/),_=$.match(/^result-(\w+)\.md$/);if(U?.[1])return{agent:U[1],type:"progress",content:I.slice(0,500)};if(_?.[1])return{agent:_[1],type:"result",content:I.slice(0,500)};return null}function K7($){let I=GI($),U={agents:[],activities:[],completedTasks:[],inProgressTasks:[]};if(!z1(I))return U;let _=uG($);for(let u of _){if(u==="orchestrator-session.md"){try{let g=F_(R4(I,u),"utf-8").match(/session[:\s]+(\S+)/i);if(g)U.sessionId=g[1]}catch{}continue}try{let z=F_(R4(I,u),"utf-8"),g=M7(u,z);if(g){if(U.activities.push(g),!U.agents.includes(g.agent))U.agents.push(g.agent);if(g.type==="result"){let v=z.match(/task[:\s]+(.+)/i)||z.match(/##\s*(.+)/);if(v?.[1])U.completedTasks.push(v[1].trim())}else if(g.type==="progress"){let v=z.match(/current[:\s]+(.+)/i)||z.match(/working on[:\s]+(.+)/i);if(v?.[1]&&!U.completedTasks.includes(v[1].trim()))U.inProgressTasks.push(v[1].trim())}}}catch{}}return U}function S_($){let I=GI($),U=R4(I,"orchestrator-session.md");if(!z1(U))return{};let _=_1(U);if(!_)return{};let u=$G(_)?.trim(),z=(_.match(/##\s*Status:\s*(.+)/i)||[])[1]||(_.match(/status:\s*(running|completed|failed|aborted)/i)||[])[1],g=(_.match(/##\s*Started:\s*(.+)/i)||[])[1]||(_.match(/started:\s*(.+)/i)||[])[1];return{id:u,status:z?.trim().toLowerCase(),startedAt:g?.trim()}}function R7($){let I=GI($);if(!z1(I))return 0;let U=0,_=uG($);for(let g of _){if(!g.startsWith("result-"))continue;let v=_1(R4(I,g));if(!v)continue;let J=v.split(`
168
+ `).map((N)=>N.trim()).find((N)=>/^##\s*Status:/i.test(N)||/^Status:/i.test(N));if(J){if(J.match(/status[^:]*:\s*([a-z_]+)/i)?.[1]?.toLowerCase()==="completed")U+=1}}let u=_1(R4(I,"task-board.md"));if(u){let g=u.split(`
169
+ `).map((v)=>v.trim()).filter((v)=>/status/i.test(v)).reduce((v,J)=>{if(J.match(/status[^:]*:\s*([a-z_]+)/i)?.[1]?.toLowerCase()==="completed")return v+1;return v},0);U=Math.max(U,g)}let z=_1(R4(I,"orchestrator-session.md"));if(z){let g=z.match(/Completed:\s*(\d+)/i);if(g?.[1]){let v=parseInt(g[1],10);if(!Number.isNaN(v))U=Math.max(U,v)}}return U}function L7($,I){let U=[],_=GI($);if(!z1(_))return U;let u=I?new Date(I).getTime():0,z=uG($);for(let g of z){if(g==="orchestrator-session.md")continue;try{let v=R4(_,g),J=F_(v,"utf-8"),N=M7(g,J);if(N)U.push(N)}catch{}}return U}function W7($){let I=[];for(let U of $){let _=U.content.toLowerCase();if(_.includes("error")||_.includes("fail"))I.push(`${U.agent}: Error handling improved`);if(_.includes("refactor"))I.push(`${U.agent}: Code structure refactored`);if(_.includes("test"))I.push(`${U.agent}: Test coverage added`);if(_.includes("performance")||_.includes("optimize"))I.push(`${U.agent}: Performance optimized`)}return[...new Set(I)].slice(0,5)}function P7($,I={}){let U=GI($);if(!z1(U))Rj(U,{recursive:!0});let _=_1(R4(U,"orchestrator-session.md")),u=_1(R4(U,"task-board.md")),z=$G(_)||$G(u)||IG(new Date),g=new Date().toISOString(),v=Pj(z,g),J=Zj(z),N=[],X=[],G=[],q=(T,H)=>{let Q=R4(U,T);if(!z1(Q)){D7(Q,H,"utf-8"),N.push(T);return}let Y=_1(Q);if(I.force||Wj(Y)){D7(Q,H,"utf-8"),X.push(T);return}G.push(T)};return q("orchestrator-session.md",v),q("task-board.md",J),q(".gitkeep",""),{memoriesDir:U,sessionId:z,created:N,updated:X,skipped:G}}var w0=()=>{};var vG=E((xn,y7)=>{var gG={to($,I){if(!I)return`\x1B[${$+1}G`;return`\x1B[${I+1};${$+1}H`},move($,I){let U="";if($<0)U+=`\x1B[${-$}D`;else if($>0)U+=`\x1B[${$}C`;if(I<0)U+=`\x1B[${-I}A`;else if(I>0)U+=`\x1B[${I}B`;return U},up:($=1)=>`\x1B[${$}A`,down:($=1)=>`\x1B[${$}B`,forward:($=1)=>`\x1B[${$}C`,backward:($=1)=>`\x1B[${$}D`,nextLine:($=1)=>"\x1B[E".repeat($),prevLine:($=1)=>"\x1B[F".repeat($),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},$F={up:($=1)=>"\x1B[S".repeat($),down:($=1)=>"\x1B[T".repeat($)},IF={screen:"\x1B[2J",up:($=1)=>"\x1B[1J".repeat($),down:($=1)=>"\x1B[J".repeat($),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines($){let I="";for(let U=0;U<$;U++)I+=this.line+(U<$-1?gG.up():"");if($)I+=gG.left;return I}};y7.exports={cursor:gG,scroll:$F,erase:IF,beep:"\x07"}});import{styleText as XG}from"node:util";import{stdout as TG,stdin as m7}from"node:process";import*as Z6 from"node:readline";import uF from"node:readline";import{ReadStream as i7}from"node:tty";function e4($,I,U){if(!U.some((g)=>!g.disabled))return $;let _=$+I,u=Math.max(U.length-1,0),z=_<0?u:_>u?0:_;return U[z].disabled?e4(z,I<0?-1:1,U):z}function qG($,I,U){return String($).normalize().replaceAll(`\r
170
170
  `,`
171
171
  `).split(`
172
- `).map((_)=>qF(_,I,U)).join(`
173
- `)}function HG($,I){if(typeof $=="string")return E$.aliases.get($)===I;for(let U of $)if(U!==void 0&&HG(U,I))return!0;return!1}function TF($,I){if($===I)return;let U=$.split(`
172
+ `).map((_)=>TF(_,I,U)).join(`
173
+ `)}function OG($,I){if(typeof $=="string")return E$.aliases.get($)===I;for(let U of $)if(U!==void 0&&OG(U,I))return!0;return!1}function YF($,I){if($===I)return;let U=$.split(`
174
174
  `),_=I.split(`
175
- `),u=Math.max(U.length,_.length),g=[];for(let z=0;z<u;z++)U[z]!==_[z]&&g.push(z);return{lines:g,numLinesBefore:U.length,numLinesAfter:_.length,numLines:u}}function e($){return $===XG}function f_($,I){let U=$;U.isTTY&&U.setRawMode(I)}function o7({input:$=m7,output:I=qG,overwrite:U=!0,hideCursor:_=!0}={}){let u=Z6.createInterface({input:$,output:I,prompt:"",tabSize:1});Z6.emitKeypressEvents($,u),$ instanceof i7&&$.isTTY&&$.setRawMode(!0);let g=(z,{name:v,sequence:J})=>{let N=String(z);if(HG([N,v,J],"cancel")){_&&I.write(x$.cursor.show),process.exit(0);return}if(!U)return;Z6.moveCursor(I,v==="return"?0:-1,v==="return"?-1:0,()=>{Z6.clearLine(I,1,()=>{$.once("keypress",g)})})};return _&&I.write(x$.cursor.hide),$.once("keypress",g),()=>{$.off("keypress",g),_&&I.write(x$.cursor.show),$ instanceof i7&&$.isTTY&&!HF&&$.setRawMode(!1),u.terminal=!1,u.close()}}function _1($,I,U,_=U){let u=E0($??qG);return GG(I,u-U.length,{hard:!0,trim:!1}).split(`
176
- `).map((g,z)=>`${z===0?_:U}${g}`).join(`
177
- `)}class g1{input;output;_abortSignal;rl;opts;_render;_track=!1;_prevFrame="";_subscribers=new Map;_cursor=0;state="initial";error="";value;userInput="";constructor($,I=!0){let{input:U=m7,output:_=qG,render:u,signal:g,...z}=$;this.opts=z,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=u.bind(this),this._track=I,this._abortSignal=g,this.input=U,this.output=_}unsubscribe(){this._subscribers.clear()}setSubscriber($,I){let U=this._subscribers.get($)??[];U.push(I),this._subscribers.set($,U)}on($,I){this.setSubscriber($,{cb:I})}once($,I){this.setSubscriber($,{cb:I,once:!0})}emit($,...I){let U=this._subscribers.get($)??[],_=[];for(let u of U)u.cb(...I),u.once&&_.push(()=>U.splice(U.indexOf(u),1));for(let u of _)u()}prompt(){return new Promise(($)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),$(XG);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}this.rl=$F.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),f_(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(x$.cursor.show),this.output.off("resize",this.render),f_(this.input,!1),$(this.value)}),this.once("cancel",()=>{this.output.write(x$.cursor.show),this.output.off("resize",this.render),f_(this.input,!1),$(XG)})})}_isActionKey($,I){return $==="\t"}_setValue($){this.value=$,this.emit("value",this.value)}_setUserInput($,I){this.userInput=$??"",this.emit("userInput",this.userInput),I&&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($,I){if(this._track&&I.name!=="return"&&(I.name&&this._isActionKey($,I)&&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"),I?.name&&(!this._track&&E$.aliases.has(I.name)&&this.emit("cursor",E$.aliases.get(I.name)),E$.actions.has(I.name)&&this.emit("cursor",I.name)),$&&($.toLowerCase()==="y"||$.toLowerCase()==="n")&&this.emit("confirm",$.toLowerCase()==="y"),this.emit("key",$?.toLowerCase(),I),I?.name==="return"){if(this.opts.validate){let U=this.opts.validate(this.value);U&&(this.error=U instanceof Error?U.message:U,this.state="error",this.rl?.write(this.userInput))}this.state!=="error"&&(this.state="submit")}HG([$,I?.name,I?.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(`
178
- `),f_(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let $=GG(this._prevFrame,process.stdout.columns,{hard:!0,trim:!1}).split(`
179
- `).length-1;this.output.write(x$.cursor.move(-999,$*-1))}render(){let $=GG(this._render(this)??"",process.stdout.columns,{hard:!0,trim:!1});if($!==this._prevFrame){if(this.state==="initial")this.output.write(x$.cursor.hide);else{let I=TF(this._prevFrame,$),U=YG(this.output);if(this.restoreCursor(),I){let _=Math.max(0,I.numLinesAfter-U),u=Math.max(0,I.numLinesBefore-U),g=I.lines.find((z)=>z>=_);if(g===void 0){this._prevFrame=$;return}if(I.lines.length===1){this.output.write(x$.cursor.move(0,g-u)),this.output.write(x$.erase.lines(1));let z=$.split(`
180
- `);this.output.write(z[g]),this._prevFrame=$,this.output.write(x$.cursor.move(0,z.length-g-1));return}else if(I.lines.length>1){if(_<u)g=_;else{let v=g-u;v>0&&this.output.write(x$.cursor.move(0,v))}this.output.write(x$.erase.down());let z=$.split(`
181
- `).slice(g);this.output.write(z.join(`
182
- `)),this._prevFrame=$;return}}this.output.write(x$.erase.down())}this.output.write($),this.state==="initial"&&(this.state="active"),this._prevFrame=$}}}function YF($,I){if($===void 0||I.length===0)return 0;let U=I.findIndex((_)=>_.value===$);return U!==-1?U:0}function OF($,I){return(I.label??String(I.value)).toLowerCase().includes($.toLowerCase())}function VF($,I){if(I)return $?I:I[0]}var x$,IF=($)=>$===161||$===164||$===167||$===168||$===170||$===173||$===174||$>=176&&$<=180||$>=182&&$<=186||$>=188&&$<=191||$===198||$===208||$===215||$===216||$>=222&&$<=225||$===230||$>=232&&$<=234||$===236||$===237||$===240||$===242||$===243||$>=247&&$<=250||$===252||$===254||$===257||$===273||$===275||$===283||$===294||$===295||$===299||$>=305&&$<=307||$===312||$>=319&&$<=322||$===324||$>=328&&$<=331||$===333||$===338||$===339||$===358||$===359||$===363||$===462||$===464||$===466||$===468||$===470||$===472||$===474||$===476||$===593||$===609||$===708||$===711||$>=713&&$<=715||$===717||$===720||$>=728&&$<=731||$===733||$===735||$>=768&&$<=879||$>=913&&$<=929||$>=931&&$<=937||$>=945&&$<=961||$>=963&&$<=969||$===1025||$>=1040&&$<=1103||$===1105||$===8208||$>=8211&&$<=8214||$===8216||$===8217||$===8220||$===8221||$>=8224&&$<=8226||$>=8228&&$<=8231||$===8240||$===8242||$===8243||$===8245||$===8251||$===8254||$===8308||$===8319||$>=8321&&$<=8324||$===8364||$===8451||$===8453||$===8457||$===8467||$===8470||$===8481||$===8482||$===8486||$===8491||$===8531||$===8532||$>=8539&&$<=8542||$>=8544&&$<=8555||$>=8560&&$<=8569||$===8585||$>=8592&&$<=8601||$===8632||$===8633||$===8658||$===8660||$===8679||$===8704||$===8706||$===8707||$===8711||$===8712||$===8715||$===8719||$===8721||$===8725||$===8730||$>=8733&&$<=8736||$===8739||$===8741||$>=8743&&$<=8748||$===8750||$>=8756&&$<=8759||$===8764||$===8765||$===8776||$===8780||$===8786||$===8800||$===8801||$>=8804&&$<=8807||$===8810||$===8811||$===8814||$===8815||$===8834||$===8835||$===8838||$===8839||$===8853||$===8857||$===8869||$===8895||$===8978||$>=9312&&$<=9449||$>=9451&&$<=9547||$>=9552&&$<=9587||$>=9600&&$<=9615||$>=9618&&$<=9621||$===9632||$===9633||$>=9635&&$<=9641||$===9650||$===9651||$===9654||$===9655||$===9660||$===9661||$===9664||$===9665||$>=9670&&$<=9672||$===9675||$>=9678&&$<=9681||$>=9698&&$<=9701||$===9711||$===9733||$===9734||$===9737||$===9742||$===9743||$===9756||$===9758||$===9792||$===9794||$===9824||$===9825||$>=9827&&$<=9829||$>=9831&&$<=9834||$===9836||$===9837||$===9839||$===9886||$===9887||$===9919||$>=9926&&$<=9933||$>=9935&&$<=9939||$>=9941&&$<=9953||$===9955||$===9960||$===9961||$>=9963&&$<=9969||$===9972||$>=9974&&$<=9977||$===9979||$===9980||$===9982||$===9983||$===10045||$>=10102&&$<=10111||$>=11094&&$<=11097||$>=12872&&$<=12879||$>=57344&&$<=63743||$>=65024&&$<=65039||$===65533||$>=127232&&$<=127242||$>=127248&&$<=127277||$>=127280&&$<=127337||$>=127344&&$<=127373||$===127375||$===127376||$>=127387&&$<=127404||$>=917760&&$<=917999||$>=983040&&$<=1048573||$>=1048576&&$<=1114109,uF=($)=>$===12288||$>=65281&&$<=65376||$>=65504&&$<=65510,UF=($)=>$>=4352&&$<=4447||$===8986||$===8987||$===9001||$===9002||$>=9193&&$<=9196||$===9200||$===9203||$===9725||$===9726||$===9748||$===9749||$>=9800&&$<=9811||$===9855||$===9875||$===9889||$===9898||$===9899||$===9917||$===9918||$===9924||$===9925||$===9934||$===9940||$===9962||$===9970||$===9971||$===9973||$===9978||$===9981||$===9989||$===9994||$===9995||$===10024||$===10060||$===10062||$>=10067&&$<=10069||$===10071||$>=10133&&$<=10135||$===10160||$===10175||$===11035||$===11036||$===11088||$===11093||$>=11904&&$<=11929||$>=11931&&$<=12019||$>=12032&&$<=12245||$>=12272&&$<=12287||$>=12289&&$<=12350||$>=12353&&$<=12438||$>=12441&&$<=12543||$>=12549&&$<=12591||$>=12593&&$<=12686||$>=12688&&$<=12771||$>=12783&&$<=12830||$>=12832&&$<=12871||$>=12880&&$<=19903||$>=19968&&$<=42124||$>=42128&&$<=42182||$>=43360&&$<=43388||$>=44032&&$<=55203||$>=63744&&$<=64255||$>=65040&&$<=65049||$>=65072&&$<=65106||$>=65108&&$<=65126||$>=65128&&$<=65131||$>=94176&&$<=94180||$===94192||$===94193||$>=94208&&$<=100343||$>=100352&&$<=101589||$>=101632&&$<=101640||$>=110576&&$<=110579||$>=110581&&$<=110587||$===110589||$===110590||$>=110592&&$<=110882||$===110898||$>=110928&&$<=110930||$===110933||$>=110948&&$<=110951||$>=110960&&$<=111355||$===126980||$===127183||$===127374||$>=127377&&$<=127386||$>=127488&&$<=127490||$>=127504&&$<=127547||$>=127552&&$<=127560||$===127568||$===127569||$>=127584&&$<=127589||$>=127744&&$<=127776||$>=127789&&$<=127797||$>=127799&&$<=127868||$>=127870&&$<=127891||$>=127904&&$<=127946||$>=127951&&$<=127955||$>=127968&&$<=127984||$===127988||$>=127992&&$<=128062||$===128064||$>=128066&&$<=128252||$>=128255&&$<=128317||$>=128331&&$<=128334||$>=128336&&$<=128359||$===128378||$===128405||$===128406||$===128420||$>=128507&&$<=128591||$>=128640&&$<=128709||$===128716||$>=128720&&$<=128722||$>=128725&&$<=128727||$>=128732&&$<=128735||$===128747||$===128748||$>=128756&&$<=128764||$>=128992&&$<=129003||$===129008||$>=129292&&$<=129338||$>=129340&&$<=129349||$>=129351&&$<=129535||$>=129648&&$<=129660||$>=129664&&$<=129672||$>=129680&&$<=129725||$>=129727&&$<=129733||$>=129742&&$<=129755||$>=129760&&$<=129768||$>=129776&&$<=129784||$>=131072&&$<=196605||$>=196608&&$<=262141,zG,w_,E_,vG,C_,_F,gF,h7=($,I={},U={})=>{let _=I.limit??1/0,u=I.ellipsis??"",g=I?.ellipsisWidth??(u?h7(u,gF,U).width:0),z=U.ansiWidth??0,v=U.controlWidth??0,J=U.tabWidth??8,N=U.ambiguousWidth??1,X=U.emojiWidth??2,G=U.fullWidthWidth??2,q=U.regularWidth??1,T=U.wideWidth??2,H=0,Q=0,Y=$.length,K=0,L=!1,P=Y,O=Math.max(0,_-g),B=0,R=0,D=0,M=0;$:for(;;){if(R>B||Q>=Y&&Q>H){let F=$.slice(B,R)||$.slice(H,Q);K=0;for(let A of F.replaceAll(_F,"")){let f=A.codePointAt(0)||0;if(uF(f)?M=G:UF(f)?M=T:N!==q&&IF(f)?M=N:M=q,D+M>O&&(P=Math.min(P,Math.max(B,H)+K)),D+M>_){L=!0;break $}K+=A.length,D+=M}B=R=0}if(Q>=Y)break;if(C_.lastIndex=Q,C_.test($)){if(K=C_.lastIndex-Q,M=K*q,D+M>O&&(P=Math.min(P,Q+Math.floor((O-D)/q))),D+M>_){L=!0;break}D+=M,B=H,R=Q,Q=H=C_.lastIndex;continue}if(zG.lastIndex=Q,zG.test($)){if(D+z>O&&(P=Math.min(P,Q)),D+z>_){L=!0;break}D+=z,B=H,R=Q,Q=H=zG.lastIndex;continue}if(w_.lastIndex=Q,w_.test($)){if(K=w_.lastIndex-Q,M=K*v,D+M>O&&(P=Math.min(P,Q+Math.floor((O-D)/v))),D+M>_){L=!0;break}D+=M,B=H,R=Q,Q=H=w_.lastIndex;continue}if(E_.lastIndex=Q,E_.test($)){if(K=E_.lastIndex-Q,M=K*J,D+M>O&&(P=Math.min(P,Q+Math.floor((O-D)/J))),D+M>_){L=!0;break}D+=M,B=H,R=Q,Q=H=E_.lastIndex;continue}if(vG.lastIndex=Q,vG.test($)){if(D+X>O&&(P=Math.min(P,Q)),D+X>_){L=!0;break}D+=X,B=H,R=Q,Q=H=vG.lastIndex;continue}Q+=1}return{width:L?O:D,index:L?P:Y,truncated:L,ellipsed:L&&_>=g}},zF,w0=($,I={})=>h7($,zF,I).width,x_="\x1B",c7="›",vF=39,QG="\x07",d7="[",JF="]",p7="m",TG,n7,NF=($)=>{if($>=30&&$<=37||$>=90&&$<=97)return 39;if($>=40&&$<=47||$>=100&&$<=107)return 49;if($===1||$===2)return 22;if($===3)return 23;if($===4)return 24;if($===7)return 27;if($===8)return 28;if($===9)return 29;if($===0)return 0},r7=($)=>`${x_}${d7}${$}${p7}`,l7=($)=>`${x_}${TG}${$}${QG}`,GF=($)=>$.map((I)=>w0(I)),JG=($,I,U)=>{let _=I[Symbol.iterator](),u=!1,g=!1,z=$.at(-1),v=z===void 0?0:w0(z),J=_.next(),N=_.next(),X=0;for(;!J.done;){let G=J.value,q=w0(G);v+q<=U?$[$.length-1]+=G:($.push(G),v=0),(G===x_||G===c7)&&(u=!0,g=I.startsWith(TG,X+1)),u?g?G===QG&&(u=!1,g=!1):G===p7&&(u=!1):(v+=q,v===U&&!N.done&&($.push(""),v=0)),J=N,N=_.next(),X+=G.length}z=$.at(-1),!v&&z!==void 0&&z.length>0&&$.length>1&&($[$.length-2]+=$.pop())},XF=($)=>{let I=$.split(" "),U=I.length;for(;U>0&&!(w0(I[U-1])>0);)U--;return U===I.length?$:I.slice(0,U).join(" ")+I.slice(U).join("")},qF=($,I,U={})=>{if(U.trim!==!1&&$.trim()==="")return"";let _="",u,g,z=$.split(" "),v=GF(z),J=[""];for(let[H,Q]of z.entries()){U.trim!==!1&&(J[J.length-1]=(J.at(-1)??"").trimStart());let Y=w0(J.at(-1)??"");if(H!==0&&(Y>=I&&(U.wordWrap===!1||U.trim===!1)&&(J.push(""),Y=0),(Y>0||U.trim===!1)&&(J[J.length-1]+=" ",Y++)),U.hard&&v[H]>I){let K=I-Y,L=1+Math.floor((v[H]-K-1)/I);Math.floor((v[H]-1)/I)<L&&J.push(""),JG(J,Q,I);continue}if(Y+v[H]>I&&Y>0&&v[H]>0){if(U.wordWrap===!1&&Y<I){JG(J,Q,I);continue}J.push("")}if(Y+v[H]>I&&U.wordWrap===!1){JG(J,Q,I);continue}J[J.length-1]+=Q}U.trim!==!1&&(J=J.map((H)=>XF(H)));let N=J.join(`
183
- `),X=N[Symbol.iterator](),G=X.next(),q=X.next(),T=0;for(;!G.done;){let H=G.value,Q=q.value;if(_+=H,H===x_||H===c7){n7.lastIndex=T+1;let K=n7.exec(N)?.groups;if(K?.code!==void 0){let L=Number.parseFloat(K.code);u=L===vF?void 0:L}else K?.uri!==void 0&&(g=K.uri.length===0?void 0:K.uri)}let Y=u?NF(u):void 0;Q===`
184
- `?(g&&(_+=l7("")),u&&Y&&(_+=r7(Y))):H===`
185
- `&&(u&&Y&&(_+=r7(u)),g&&(_+=l7(g))),T+=H.length,G=q,q=X.next()}return _},QF,E$,HF,XG,E0=($)=>("columns"in $)&&typeof $.columns=="number"?$.columns:80,YG=($)=>("rows"in $)&&typeof $.rows=="number"?$.rows:20,t7,OG,a7,e7,VG,BG;var DG=U4(()=>{x$=q$(gG(),1);zG=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,w_=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,E_=/\t{1,1000}/y,vG=/[\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,C_=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,_F=/\p{M}+/gu,gF={limit:1/0,ellipsis:""},zF={limit:1/0,ellipsis:"",ellipsisWidth:0},TG=`${JF}8;;`,n7=new RegExp(`(?:\\${d7}(?<code>\\d+)m|\\${TG}(?<uri>.*)${QG})`,"y");QF=["up","down","left","right","space","enter","cancel"],E$={actions:new Set(QF),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["\x03","cancel"],["escape","cancel"]]),messages:{cancel:"Canceled",error:"Something went wrong"},withGuide:!0};HF=globalThis.process.platform.startsWith("win"),XG=Symbol("clack:cancel");t7=class t7 extends g1{filteredOptions;multiple;isNavigating=!1;selectedValues=[];focusedValue;#$=0;#u="";#U;#I;get cursor(){return this.#$}get userInputWithCursor(){if(!this.userInput)return NG(["inverse","hidden"],"_");if(this._cursor>=this.userInput.length)return`${this.userInput}█`;let $=this.userInput.slice(0,this._cursor),[I,...U]=this.userInput.slice(this._cursor);return`${$}${NG("inverse",I)}${U.join("")}`}get options(){return typeof this.#I=="function"?this.#I():this.#I}constructor($){super($),this.#I=$.options;let I=this.options;this.filteredOptions=[...I],this.multiple=$.multiple===!0,this.#U=$.filter??OF;let U;if($.initialValue&&Array.isArray($.initialValue)?this.multiple?U=$.initialValue:U=$.initialValue.slice(0,1):!this.multiple&&this.options.length>0&&(U=[this.options[0].value]),U)for(let _ of U){let u=I.findIndex((g)=>g.value===_);u!==-1&&(this.toggleSelected(_),this.#$=u)}this.focusedValue=this.options[this.#$]?.value,this.on("key",(_,u)=>this.#_(_,u)),this.on("userInput",(_)=>this.#g(_))}_isActionKey($,I){return $==="\t"||this.multiple&&this.isNavigating&&I.name==="space"&&$!==void 0&&$!==""}#_($,I){let U=I.name==="up",_=I.name==="down",u=I.name==="return";U||_?(this.#$=e4(this.#$,U?-1:1,this.filteredOptions),this.focusedValue=this.filteredOptions[this.#$]?.value,this.multiple||(this.selectedValues=[this.focusedValue]),this.isNavigating=!0):u?this.value=VF(this.multiple,this.selectedValues):this.multiple?this.focusedValue!==void 0&&(I.name==="tab"||this.isNavigating&&I.name==="space")?this.toggleSelected(this.focusedValue):this.isNavigating=!1:(this.focusedValue&&(this.selectedValues=[this.focusedValue]),this.isNavigating=!1)}deselectAll(){this.selectedValues=[]}toggleSelected($){this.filteredOptions.length!==0&&(this.multiple?this.selectedValues.includes($)?this.selectedValues=this.selectedValues.filter((I)=>I!==$):this.selectedValues=[...this.selectedValues,$]:this.selectedValues=[$])}#g($){if($!==this.#u){this.#u=$;let I=this.options;$?this.filteredOptions=I.filter((u)=>this.#U($,u)):this.filteredOptions=[...I];let U=YF(this.focusedValue,this.filteredOptions);this.#$=e4(U,0,this.filteredOptions);let _=this.filteredOptions[this.#$];_&&!_.disabled?this.focusedValue=_.value:this.focusedValue=void 0,this.multiple||(this.focusedValue!==void 0?this.toggleSelected(this.focusedValue):this.deselectAll())}}};OG=class OG extends g1{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor($){super($,!1),this.value=!!$.initialValue,this.on("userInput",()=>{this.value=this._value}),this.on("confirm",(I)=>{this.output.write(x$.cursor.move(0,-1)),this.value=I,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};a7=class a7 extends g1{options;cursor=0;#$;getGroupItems($){return this.options.filter((I)=>I.group===$)}isGroupSelected($){let I=this.getGroupItems($),U=this.value;return U===void 0?!1:I.every((_)=>U.includes(_.value))}toggleValue(){let $=this.options[this.cursor];if(this.value===void 0&&(this.value=[]),$.group===!0){let I=$.value,U=this.getGroupItems(I);this.isGroupSelected(I)?this.value=this.value.filter((_)=>U.findIndex((u)=>u.value===_)===-1):this.value=[...this.value,...U.map((_)=>_.value)],this.value=Array.from(new Set(this.value))}else{let I=this.value.includes($.value);this.value=I?this.value.filter((U)=>U!==$.value):[...this.value,$.value]}}constructor($){super($,!1);let{options:I}=$;this.#$=$.selectableGroups!==!1,this.options=Object.entries(I).flatMap(([U,_])=>[{value:U,group:!0,label:U},..._.map((u)=>({...u,group:U}))]),this.value=[...$.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:U})=>U===$.cursorAt),this.#$?0:1),this.on("cursor",(U)=>{switch(U){case"left":case"up":{this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;let _=this.options[this.cursor]?.group===!0;!this.#$&&_&&(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 _=this.options[this.cursor]?.group===!0;!this.#$&&_&&(this.cursor=this.cursor===this.options.length-1?0:this.cursor+1);break}case"space":this.toggleValue();break}})}};e7=class extends g1{options;cursor=0;get _value(){return this.options[this.cursor].value}get _enabledOptions(){return this.options.filter(($)=>$.disabled!==!0)}toggleAll(){let $=this._enabledOptions,I=this.value!==void 0&&this.value.length===$.length;this.value=I?[]:$.map((U)=>U.value)}toggleInvert(){let $=this.value;if(!$)return;let I=this._enabledOptions.filter((U)=>!$.includes(U.value));this.value=I.map((U)=>U.value)}toggleValue(){this.value===void 0&&(this.value=[]);let $=this.value.includes(this._value);this.value=$?this.value.filter((I)=>I!==this._value):[...this.value,this._value]}constructor($){super($,!1),this.options=$.options,this.value=[...$.initialValues??[]];let I=Math.max(this.options.findIndex(({value:U})=>U===$.cursorAt),0);this.cursor=this.options[I].disabled?e4(I,1,this.options):I,this.on("key",(U)=>{U==="a"&&this.toggleAll(),U==="i"&&this.toggleInvert()}),this.on("cursor",(U)=>{switch(U){case"left":case"up":this.cursor=e4(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=e4(this.cursor,1,this.options);break;case"space":this.toggleValue();break}})}};VG=class VG extends g1{options;cursor=0;get _selectedValue(){return this.options[this.cursor]}changeValue(){this.value=this._selectedValue.value}constructor($){super($,!1),this.options=$.options;let I=this.options.findIndex(({value:_})=>_===$.initialValue),U=I===-1?0:I;this.cursor=this.options[U].disabled?e4(U,1,this.options):U,this.changeValue(),this.on("cursor",(_)=>{switch(_){case"left":case"up":this.cursor=e4(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=e4(this.cursor,1,this.options);break}this.changeValue()})}};BG=class BG extends g1{get userInputWithCursor(){if(this.state==="submit")return this.userInput;let $=this.userInput;if(this.cursor>=$.length)return`${this.userInput}█`;let I=$.slice(0,this.cursor),[U,..._]=$.slice(this.cursor);return`${I}${NG("inverse",U)}${_.join("")}`}get cursor(){return this._cursor}constructor($){super({...$,initialUserInput:$.initialUserInput??$.initialValue}),this.on("userInput",(I)=>{this._setValue(I)}),this.on("finalize",()=>{this.value||(this.value=$.defaultValue),this.value===void 0&&(this.value="")})}}});import{styleText as Z,stripVTControlCharacters as cn}from"node:util";import Y4 from"node:process";function BF(){return Y4.platform!=="win32"?Y4.env.TERM!=="linux":!!Y4.env.CI||!!Y4.env.WT_SESSION||!!Y4.env.TERMINUS_SUBLIME||Y4.env.ConEmuTask==="{cmd::Cmder}"||Y4.env.TERM_PROGRAM==="Terminus-Sublime"||Y4.env.TERM_PROGRAM==="vscode"||Y4.env.TERM==="xterm-256color"||Y4.env.TERM==="alacritty"||Y4.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}function x0($,I,U){return String($).normalize().replaceAll(`\r
175
+ `),u=Math.max(U.length,_.length),z=[];for(let g=0;g<u;g++)U[g]!==_[g]&&z.push(g);return{lines:z,numLinesBefore:U.length,numLinesAfter:_.length,numLines:u}}function e($){return $===QG}function x_($,I){let U=$;U.isTTY&&U.setRawMode(I)}function o7({input:$=m7,output:I=TG,overwrite:U=!0,hideCursor:_=!0}={}){let u=Z6.createInterface({input:$,output:I,prompt:"",tabSize:1});Z6.emitKeypressEvents($,u),$ instanceof i7&&$.isTTY&&$.setRawMode(!0);let z=(g,{name:v,sequence:J})=>{let N=String(g);if(OG([N,v,J],"cancel")){_&&I.write(x$.cursor.show),process.exit(0);return}if(!U)return;Z6.moveCursor(I,v==="return"?0:-1,v==="return"?-1:0,()=>{Z6.clearLine(I,1,()=>{$.once("keypress",z)})})};return _&&I.write(x$.cursor.hide),$.once("keypress",z),()=>{$.off("keypress",z),_&&I.write(x$.cursor.show),$ instanceof i7&&$.isTTY&&!OF&&$.setRawMode(!1),u.terminal=!1,u.close()}}function g1($,I,U,_=U){let u=f0($??TG);return qG(I,u-U.length,{hard:!0,trim:!1}).split(`
176
+ `).map((z,g)=>`${g===0?_:U}${z}`).join(`
177
+ `)}class v1{input;output;_abortSignal;rl;opts;_render;_track=!1;_prevFrame="";_subscribers=new Map;_cursor=0;state="initial";error="";value;userInput="";constructor($,I=!0){let{input:U=m7,output:_=TG,render:u,signal:z,...g}=$;this.opts=g,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=u.bind(this),this._track=I,this._abortSignal=z,this.input=U,this.output=_}unsubscribe(){this._subscribers.clear()}setSubscriber($,I){let U=this._subscribers.get($)??[];U.push(I),this._subscribers.set($,U)}on($,I){this.setSubscriber($,{cb:I})}once($,I){this.setSubscriber($,{cb:I,once:!0})}emit($,...I){let U=this._subscribers.get($)??[],_=[];for(let u of U)u.cb(...I),u.once&&_.push(()=>U.splice(U.indexOf(u),1));for(let u of _)u()}prompt(){return new Promise(($)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),$(QG);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}this.rl=uF.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),x_(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(x$.cursor.show),this.output.off("resize",this.render),x_(this.input,!1),$(this.value)}),this.once("cancel",()=>{this.output.write(x$.cursor.show),this.output.off("resize",this.render),x_(this.input,!1),$(QG)})})}_isActionKey($,I){return $==="\t"}_setValue($){this.value=$,this.emit("value",this.value)}_setUserInput($,I){this.userInput=$??"",this.emit("userInput",this.userInput),I&&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($,I){if(this._track&&I.name!=="return"&&(I.name&&this._isActionKey($,I)&&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"),I?.name&&(!this._track&&E$.aliases.has(I.name)&&this.emit("cursor",E$.aliases.get(I.name)),E$.actions.has(I.name)&&this.emit("cursor",I.name)),$&&($.toLowerCase()==="y"||$.toLowerCase()==="n")&&this.emit("confirm",$.toLowerCase()==="y"),this.emit("key",$?.toLowerCase(),I),I?.name==="return"){if(this.opts.validate){let U=this.opts.validate(this.value);U&&(this.error=U instanceof Error?U.message:U,this.state="error",this.rl?.write(this.userInput))}this.state!=="error"&&(this.state="submit")}OG([$,I?.name,I?.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(`
178
+ `),x_(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let $=qG(this._prevFrame,process.stdout.columns,{hard:!0,trim:!1}).split(`
179
+ `).length-1;this.output.write(x$.cursor.move(-999,$*-1))}render(){let $=qG(this._render(this)??"",process.stdout.columns,{hard:!0,trim:!1});if($!==this._prevFrame){if(this.state==="initial")this.output.write(x$.cursor.hide);else{let I=YF(this._prevFrame,$),U=VG(this.output);if(this.restoreCursor(),I){let _=Math.max(0,I.numLinesAfter-U),u=Math.max(0,I.numLinesBefore-U),z=I.lines.find((g)=>g>=_);if(z===void 0){this._prevFrame=$;return}if(I.lines.length===1){this.output.write(x$.cursor.move(0,z-u)),this.output.write(x$.erase.lines(1));let g=$.split(`
180
+ `);this.output.write(g[z]),this._prevFrame=$,this.output.write(x$.cursor.move(0,g.length-z-1));return}else if(I.lines.length>1){if(_<u)z=_;else{let v=z-u;v>0&&this.output.write(x$.cursor.move(0,v))}this.output.write(x$.erase.down());let g=$.split(`
181
+ `).slice(z);this.output.write(g.join(`
182
+ `)),this._prevFrame=$;return}}this.output.write(x$.erase.down())}this.output.write($),this.state==="initial"&&(this.state="active"),this._prevFrame=$}}}function VF($,I){if($===void 0||I.length===0)return 0;let U=I.findIndex((_)=>_.value===$);return U!==-1?U:0}function BF($,I){return(I.label??String(I.value)).toLowerCase().includes($.toLowerCase())}function DF($,I){if(I)return $?I:I[0]}var x$,UF=($)=>$===161||$===164||$===167||$===168||$===170||$===173||$===174||$>=176&&$<=180||$>=182&&$<=186||$>=188&&$<=191||$===198||$===208||$===215||$===216||$>=222&&$<=225||$===230||$>=232&&$<=234||$===236||$===237||$===240||$===242||$===243||$>=247&&$<=250||$===252||$===254||$===257||$===273||$===275||$===283||$===294||$===295||$===299||$>=305&&$<=307||$===312||$>=319&&$<=322||$===324||$>=328&&$<=331||$===333||$===338||$===339||$===358||$===359||$===363||$===462||$===464||$===466||$===468||$===470||$===472||$===474||$===476||$===593||$===609||$===708||$===711||$>=713&&$<=715||$===717||$===720||$>=728&&$<=731||$===733||$===735||$>=768&&$<=879||$>=913&&$<=929||$>=931&&$<=937||$>=945&&$<=961||$>=963&&$<=969||$===1025||$>=1040&&$<=1103||$===1105||$===8208||$>=8211&&$<=8214||$===8216||$===8217||$===8220||$===8221||$>=8224&&$<=8226||$>=8228&&$<=8231||$===8240||$===8242||$===8243||$===8245||$===8251||$===8254||$===8308||$===8319||$>=8321&&$<=8324||$===8364||$===8451||$===8453||$===8457||$===8467||$===8470||$===8481||$===8482||$===8486||$===8491||$===8531||$===8532||$>=8539&&$<=8542||$>=8544&&$<=8555||$>=8560&&$<=8569||$===8585||$>=8592&&$<=8601||$===8632||$===8633||$===8658||$===8660||$===8679||$===8704||$===8706||$===8707||$===8711||$===8712||$===8715||$===8719||$===8721||$===8725||$===8730||$>=8733&&$<=8736||$===8739||$===8741||$>=8743&&$<=8748||$===8750||$>=8756&&$<=8759||$===8764||$===8765||$===8776||$===8780||$===8786||$===8800||$===8801||$>=8804&&$<=8807||$===8810||$===8811||$===8814||$===8815||$===8834||$===8835||$===8838||$===8839||$===8853||$===8857||$===8869||$===8895||$===8978||$>=9312&&$<=9449||$>=9451&&$<=9547||$>=9552&&$<=9587||$>=9600&&$<=9615||$>=9618&&$<=9621||$===9632||$===9633||$>=9635&&$<=9641||$===9650||$===9651||$===9654||$===9655||$===9660||$===9661||$===9664||$===9665||$>=9670&&$<=9672||$===9675||$>=9678&&$<=9681||$>=9698&&$<=9701||$===9711||$===9733||$===9734||$===9737||$===9742||$===9743||$===9756||$===9758||$===9792||$===9794||$===9824||$===9825||$>=9827&&$<=9829||$>=9831&&$<=9834||$===9836||$===9837||$===9839||$===9886||$===9887||$===9919||$>=9926&&$<=9933||$>=9935&&$<=9939||$>=9941&&$<=9953||$===9955||$===9960||$===9961||$>=9963&&$<=9969||$===9972||$>=9974&&$<=9977||$===9979||$===9980||$===9982||$===9983||$===10045||$>=10102&&$<=10111||$>=11094&&$<=11097||$>=12872&&$<=12879||$>=57344&&$<=63743||$>=65024&&$<=65039||$===65533||$>=127232&&$<=127242||$>=127248&&$<=127277||$>=127280&&$<=127337||$>=127344&&$<=127373||$===127375||$===127376||$>=127387&&$<=127404||$>=917760&&$<=917999||$>=983040&&$<=1048573||$>=1048576&&$<=1114109,_F=($)=>$===12288||$>=65281&&$<=65376||$>=65504&&$<=65510,zF=($)=>$>=4352&&$<=4447||$===8986||$===8987||$===9001||$===9002||$>=9193&&$<=9196||$===9200||$===9203||$===9725||$===9726||$===9748||$===9749||$>=9800&&$<=9811||$===9855||$===9875||$===9889||$===9898||$===9899||$===9917||$===9918||$===9924||$===9925||$===9934||$===9940||$===9962||$===9970||$===9971||$===9973||$===9978||$===9981||$===9989||$===9994||$===9995||$===10024||$===10060||$===10062||$>=10067&&$<=10069||$===10071||$>=10133&&$<=10135||$===10160||$===10175||$===11035||$===11036||$===11088||$===11093||$>=11904&&$<=11929||$>=11931&&$<=12019||$>=12032&&$<=12245||$>=12272&&$<=12287||$>=12289&&$<=12350||$>=12353&&$<=12438||$>=12441&&$<=12543||$>=12549&&$<=12591||$>=12593&&$<=12686||$>=12688&&$<=12771||$>=12783&&$<=12830||$>=12832&&$<=12871||$>=12880&&$<=19903||$>=19968&&$<=42124||$>=42128&&$<=42182||$>=43360&&$<=43388||$>=44032&&$<=55203||$>=63744&&$<=64255||$>=65040&&$<=65049||$>=65072&&$<=65106||$>=65108&&$<=65126||$>=65128&&$<=65131||$>=94176&&$<=94180||$===94192||$===94193||$>=94208&&$<=100343||$>=100352&&$<=101589||$>=101632&&$<=101640||$>=110576&&$<=110579||$>=110581&&$<=110587||$===110589||$===110590||$>=110592&&$<=110882||$===110898||$>=110928&&$<=110930||$===110933||$>=110948&&$<=110951||$>=110960&&$<=111355||$===126980||$===127183||$===127374||$>=127377&&$<=127386||$>=127488&&$<=127490||$>=127504&&$<=127547||$>=127552&&$<=127560||$===127568||$===127569||$>=127584&&$<=127589||$>=127744&&$<=127776||$>=127789&&$<=127797||$>=127799&&$<=127868||$>=127870&&$<=127891||$>=127904&&$<=127946||$>=127951&&$<=127955||$>=127968&&$<=127984||$===127988||$>=127992&&$<=128062||$===128064||$>=128066&&$<=128252||$>=128255&&$<=128317||$>=128331&&$<=128334||$>=128336&&$<=128359||$===128378||$===128405||$===128406||$===128420||$>=128507&&$<=128591||$>=128640&&$<=128709||$===128716||$>=128720&&$<=128722||$>=128725&&$<=128727||$>=128732&&$<=128735||$===128747||$===128748||$>=128756&&$<=128764||$>=128992&&$<=129003||$===129008||$>=129292&&$<=129338||$>=129340&&$<=129349||$>=129351&&$<=129535||$>=129648&&$<=129660||$>=129664&&$<=129672||$>=129680&&$<=129725||$>=129727&&$<=129733||$>=129742&&$<=129755||$>=129760&&$<=129768||$>=129776&&$<=129784||$>=131072&&$<=196605||$>=196608&&$<=262141,JG,E_,C_,NG,f_,gF,vF,h7=($,I={},U={})=>{let _=I.limit??1/0,u=I.ellipsis??"",z=I?.ellipsisWidth??(u?h7(u,vF,U).width:0),g=U.ansiWidth??0,v=U.controlWidth??0,J=U.tabWidth??8,N=U.ambiguousWidth??1,X=U.emojiWidth??2,G=U.fullWidthWidth??2,q=U.regularWidth??1,T=U.wideWidth??2,H=0,Q=0,Y=$.length,M=0,L=!1,P=Y,R=Math.max(0,_-z),K=0,V=0,B=0,O=0;$:for(;;){if(V>K||Q>=Y&&Q>H){let b=$.slice(K,V)||$.slice(H,Q);M=0;for(let A of b.replaceAll(gF,"")){let f=A.codePointAt(0)||0;if(_F(f)?O=G:zF(f)?O=T:N!==q&&UF(f)?O=N:O=q,B+O>R&&(P=Math.min(P,Math.max(K,H)+M)),B+O>_){L=!0;break $}M+=A.length,B+=O}K=V=0}if(Q>=Y)break;if(f_.lastIndex=Q,f_.test($)){if(M=f_.lastIndex-Q,O=M*q,B+O>R&&(P=Math.min(P,Q+Math.floor((R-B)/q))),B+O>_){L=!0;break}B+=O,K=H,V=Q,Q=H=f_.lastIndex;continue}if(JG.lastIndex=Q,JG.test($)){if(B+g>R&&(P=Math.min(P,Q)),B+g>_){L=!0;break}B+=g,K=H,V=Q,Q=H=JG.lastIndex;continue}if(E_.lastIndex=Q,E_.test($)){if(M=E_.lastIndex-Q,O=M*v,B+O>R&&(P=Math.min(P,Q+Math.floor((R-B)/v))),B+O>_){L=!0;break}B+=O,K=H,V=Q,Q=H=E_.lastIndex;continue}if(C_.lastIndex=Q,C_.test($)){if(M=C_.lastIndex-Q,O=M*J,B+O>R&&(P=Math.min(P,Q+Math.floor((R-B)/J))),B+O>_){L=!0;break}B+=O,K=H,V=Q,Q=H=C_.lastIndex;continue}if(NG.lastIndex=Q,NG.test($)){if(B+X>R&&(P=Math.min(P,Q)),B+X>_){L=!0;break}B+=X,K=H,V=Q,Q=H=NG.lastIndex;continue}Q+=1}return{width:L?R:B,index:L?P:Y,truncated:L,ellipsed:L&&_>=z}},JF,C0=($,I={})=>h7($,JF,I).width,k_="\x1B",c7="›",NF=39,HG="\x07",d7="[",GF="]",p7="m",YG,n7,XF=($)=>{if($>=30&&$<=37||$>=90&&$<=97)return 39;if($>=40&&$<=47||$>=100&&$<=107)return 49;if($===1||$===2)return 22;if($===3)return 23;if($===4)return 24;if($===7)return 27;if($===8)return 28;if($===9)return 29;if($===0)return 0},r7=($)=>`${k_}${d7}${$}${p7}`,l7=($)=>`${k_}${YG}${$}${HG}`,qF=($)=>$.map((I)=>C0(I)),GG=($,I,U)=>{let _=I[Symbol.iterator](),u=!1,z=!1,g=$.at(-1),v=g===void 0?0:C0(g),J=_.next(),N=_.next(),X=0;for(;!J.done;){let G=J.value,q=C0(G);v+q<=U?$[$.length-1]+=G:($.push(G),v=0),(G===k_||G===c7)&&(u=!0,z=I.startsWith(YG,X+1)),u?z?G===HG&&(u=!1,z=!1):G===p7&&(u=!1):(v+=q,v===U&&!N.done&&($.push(""),v=0)),J=N,N=_.next(),X+=G.length}g=$.at(-1),!v&&g!==void 0&&g.length>0&&$.length>1&&($[$.length-2]+=$.pop())},QF=($)=>{let I=$.split(" "),U=I.length;for(;U>0&&!(C0(I[U-1])>0);)U--;return U===I.length?$:I.slice(0,U).join(" ")+I.slice(U).join("")},TF=($,I,U={})=>{if(U.trim!==!1&&$.trim()==="")return"";let _="",u,z,g=$.split(" "),v=qF(g),J=[""];for(let[H,Q]of g.entries()){U.trim!==!1&&(J[J.length-1]=(J.at(-1)??"").trimStart());let Y=C0(J.at(-1)??"");if(H!==0&&(Y>=I&&(U.wordWrap===!1||U.trim===!1)&&(J.push(""),Y=0),(Y>0||U.trim===!1)&&(J[J.length-1]+=" ",Y++)),U.hard&&v[H]>I){let M=I-Y,L=1+Math.floor((v[H]-M-1)/I);Math.floor((v[H]-1)/I)<L&&J.push(""),GG(J,Q,I);continue}if(Y+v[H]>I&&Y>0&&v[H]>0){if(U.wordWrap===!1&&Y<I){GG(J,Q,I);continue}J.push("")}if(Y+v[H]>I&&U.wordWrap===!1){GG(J,Q,I);continue}J[J.length-1]+=Q}U.trim!==!1&&(J=J.map((H)=>QF(H)));let N=J.join(`
183
+ `),X=N[Symbol.iterator](),G=X.next(),q=X.next(),T=0;for(;!G.done;){let H=G.value,Q=q.value;if(_+=H,H===k_||H===c7){n7.lastIndex=T+1;let M=n7.exec(N)?.groups;if(M?.code!==void 0){let L=Number.parseFloat(M.code);u=L===NF?void 0:L}else M?.uri!==void 0&&(z=M.uri.length===0?void 0:M.uri)}let Y=u?XF(u):void 0;Q===`
184
+ `?(z&&(_+=l7("")),u&&Y&&(_+=r7(Y))):H===`
185
+ `&&(u&&Y&&(_+=r7(u)),z&&(_+=l7(z))),T+=H.length,G=q,q=X.next()}return _},HF,E$,OF,QG,f0=($)=>("columns"in $)&&typeof $.columns=="number"?$.columns:80,VG=($)=>("rows"in $)&&typeof $.rows=="number"?$.rows:20,t7,BG,a7,e7,DG,MG;var KG=_4(()=>{x$=q$(vG(),1);JG=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,E_=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,C_=/\t{1,1000}/y,NG=/[\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,f_=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,gF=/\p{M}+/gu,vF={limit:1/0,ellipsis:""},JF={limit:1/0,ellipsis:"",ellipsisWidth:0},YG=`${GF}8;;`,n7=new RegExp(`(?:\\${d7}(?<code>\\d+)m|\\${YG}(?<uri>.*)${HG})`,"y");HF=["up","down","left","right","space","enter","cancel"],E$={actions:new Set(HF),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["\x03","cancel"],["escape","cancel"]]),messages:{cancel:"Canceled",error:"Something went wrong"},withGuide:!0};OF=globalThis.process.platform.startsWith("win"),QG=Symbol("clack:cancel");t7=class t7 extends v1{filteredOptions;multiple;isNavigating=!1;selectedValues=[];focusedValue;#$=0;#u="";#U;#I;get cursor(){return this.#$}get userInputWithCursor(){if(!this.userInput)return XG(["inverse","hidden"],"_");if(this._cursor>=this.userInput.length)return`${this.userInput}█`;let $=this.userInput.slice(0,this._cursor),[I,...U]=this.userInput.slice(this._cursor);return`${$}${XG("inverse",I)}${U.join("")}`}get options(){return typeof this.#I=="function"?this.#I():this.#I}constructor($){super($),this.#I=$.options;let I=this.options;this.filteredOptions=[...I],this.multiple=$.multiple===!0,this.#U=$.filter??BF;let U;if($.initialValue&&Array.isArray($.initialValue)?this.multiple?U=$.initialValue:U=$.initialValue.slice(0,1):!this.multiple&&this.options.length>0&&(U=[this.options[0].value]),U)for(let _ of U){let u=I.findIndex((z)=>z.value===_);u!==-1&&(this.toggleSelected(_),this.#$=u)}this.focusedValue=this.options[this.#$]?.value,this.on("key",(_,u)=>this.#_(_,u)),this.on("userInput",(_)=>this.#z(_))}_isActionKey($,I){return $==="\t"||this.multiple&&this.isNavigating&&I.name==="space"&&$!==void 0&&$!==""}#_($,I){let U=I.name==="up",_=I.name==="down",u=I.name==="return";U||_?(this.#$=e4(this.#$,U?-1:1,this.filteredOptions),this.focusedValue=this.filteredOptions[this.#$]?.value,this.multiple||(this.selectedValues=[this.focusedValue]),this.isNavigating=!0):u?this.value=DF(this.multiple,this.selectedValues):this.multiple?this.focusedValue!==void 0&&(I.name==="tab"||this.isNavigating&&I.name==="space")?this.toggleSelected(this.focusedValue):this.isNavigating=!1:(this.focusedValue&&(this.selectedValues=[this.focusedValue]),this.isNavigating=!1)}deselectAll(){this.selectedValues=[]}toggleSelected($){this.filteredOptions.length!==0&&(this.multiple?this.selectedValues.includes($)?this.selectedValues=this.selectedValues.filter((I)=>I!==$):this.selectedValues=[...this.selectedValues,$]:this.selectedValues=[$])}#z($){if($!==this.#u){this.#u=$;let I=this.options;$?this.filteredOptions=I.filter((u)=>this.#U($,u)):this.filteredOptions=[...I];let U=VF(this.focusedValue,this.filteredOptions);this.#$=e4(U,0,this.filteredOptions);let _=this.filteredOptions[this.#$];_&&!_.disabled?this.focusedValue=_.value:this.focusedValue=void 0,this.multiple||(this.focusedValue!==void 0?this.toggleSelected(this.focusedValue):this.deselectAll())}}};BG=class BG extends v1{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor($){super($,!1),this.value=!!$.initialValue,this.on("userInput",()=>{this.value=this._value}),this.on("confirm",(I)=>{this.output.write(x$.cursor.move(0,-1)),this.value=I,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};a7=class a7 extends v1{options;cursor=0;#$;getGroupItems($){return this.options.filter((I)=>I.group===$)}isGroupSelected($){let I=this.getGroupItems($),U=this.value;return U===void 0?!1:I.every((_)=>U.includes(_.value))}toggleValue(){let $=this.options[this.cursor];if(this.value===void 0&&(this.value=[]),$.group===!0){let I=$.value,U=this.getGroupItems(I);this.isGroupSelected(I)?this.value=this.value.filter((_)=>U.findIndex((u)=>u.value===_)===-1):this.value=[...this.value,...U.map((_)=>_.value)],this.value=Array.from(new Set(this.value))}else{let I=this.value.includes($.value);this.value=I?this.value.filter((U)=>U!==$.value):[...this.value,$.value]}}constructor($){super($,!1);let{options:I}=$;this.#$=$.selectableGroups!==!1,this.options=Object.entries(I).flatMap(([U,_])=>[{value:U,group:!0,label:U},..._.map((u)=>({...u,group:U}))]),this.value=[...$.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:U})=>U===$.cursorAt),this.#$?0:1),this.on("cursor",(U)=>{switch(U){case"left":case"up":{this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;let _=this.options[this.cursor]?.group===!0;!this.#$&&_&&(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 _=this.options[this.cursor]?.group===!0;!this.#$&&_&&(this.cursor=this.cursor===this.options.length-1?0:this.cursor+1);break}case"space":this.toggleValue();break}})}};e7=class extends v1{options;cursor=0;get _value(){return this.options[this.cursor].value}get _enabledOptions(){return this.options.filter(($)=>$.disabled!==!0)}toggleAll(){let $=this._enabledOptions,I=this.value!==void 0&&this.value.length===$.length;this.value=I?[]:$.map((U)=>U.value)}toggleInvert(){let $=this.value;if(!$)return;let I=this._enabledOptions.filter((U)=>!$.includes(U.value));this.value=I.map((U)=>U.value)}toggleValue(){this.value===void 0&&(this.value=[]);let $=this.value.includes(this._value);this.value=$?this.value.filter((I)=>I!==this._value):[...this.value,this._value]}constructor($){super($,!1),this.options=$.options,this.value=[...$.initialValues??[]];let I=Math.max(this.options.findIndex(({value:U})=>U===$.cursorAt),0);this.cursor=this.options[I].disabled?e4(I,1,this.options):I,this.on("key",(U)=>{U==="a"&&this.toggleAll(),U==="i"&&this.toggleInvert()}),this.on("cursor",(U)=>{switch(U){case"left":case"up":this.cursor=e4(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=e4(this.cursor,1,this.options);break;case"space":this.toggleValue();break}})}};DG=class DG extends v1{options;cursor=0;get _selectedValue(){return this.options[this.cursor]}changeValue(){this.value=this._selectedValue.value}constructor($){super($,!1),this.options=$.options;let I=this.options.findIndex(({value:_})=>_===$.initialValue),U=I===-1?0:I;this.cursor=this.options[U].disabled?e4(U,1,this.options):U,this.changeValue(),this.on("cursor",(_)=>{switch(_){case"left":case"up":this.cursor=e4(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=e4(this.cursor,1,this.options);break}this.changeValue()})}};MG=class MG extends v1{get userInputWithCursor(){if(this.state==="submit")return this.userInput;let $=this.userInput;if(this.cursor>=$.length)return`${this.userInput}█`;let I=$.slice(0,this.cursor),[U,..._]=$.slice(this.cursor);return`${I}${XG("inverse",U)}${_.join("")}`}get cursor(){return this._cursor}constructor($){super({...$,initialUserInput:$.initialUserInput??$.initialValue}),this.on("userInput",(I)=>{this._setValue(I)}),this.on("finalize",()=>{this.value||(this.value=$.defaultValue),this.value===void 0&&(this.value="")})}}});import{styleText as Z,stripVTControlCharacters as tn}from"node:util";import Y4 from"node:process";function MF(){return Y4.platform!=="win32"?Y4.env.TERM!=="linux":!!Y4.env.CI||!!Y4.env.WT_SESSION||!!Y4.env.TERMINUS_SUBLIME||Y4.env.ConEmuTask==="{cmd::Cmder}"||Y4.env.TERM_PROGRAM==="Terminus-Sublime"||Y4.env.TERM_PROGRAM==="vscode"||Y4.env.TERM==="xterm-256color"||Y4.env.TERM==="alacritty"||Y4.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}function y0($,I,U){return String($).normalize().replaceAll(`\r
186
186
  `,`
187
187
  `).split(`
188
- `).map((_)=>lF(_,I,U)).join(`
189
- `)}var f0,RG,DF=()=>process.env.CI==="true",N$=($,I)=>RG?$:I,MF,gT,zT,l_,KF,s,A6,pn,on,WG,r_,LF,s7,$T,tn,IT,RF,WF,PF,ZF,an,AF,bF,jF,FF,m_=($)=>{switch($){case"initial":case"active":return Z("cyan",MF);case"cancel":return Z("red",gT);case"error":return Z("yellow",zT);case"submit":return Z("green",l_)}},vT=($)=>{switch($){case"initial":case"active":return Z("cyan",s);case"cancel":return Z("red",s);case"error":return Z("yellow",s);case"submit":return Z("green",s)}},SF=($)=>$===161||$===164||$===167||$===168||$===170||$===173||$===174||$>=176&&$<=180||$>=182&&$<=186||$>=188&&$<=191||$===198||$===208||$===215||$===216||$>=222&&$<=225||$===230||$>=232&&$<=234||$===236||$===237||$===240||$===242||$===243||$>=247&&$<=250||$===252||$===254||$===257||$===273||$===275||$===283||$===294||$===295||$===299||$>=305&&$<=307||$===312||$>=319&&$<=322||$===324||$>=328&&$<=331||$===333||$===338||$===339||$===358||$===359||$===363||$===462||$===464||$===466||$===468||$===470||$===472||$===474||$===476||$===593||$===609||$===708||$===711||$>=713&&$<=715||$===717||$===720||$>=728&&$<=731||$===733||$===735||$>=768&&$<=879||$>=913&&$<=929||$>=931&&$<=937||$>=945&&$<=961||$>=963&&$<=969||$===1025||$>=1040&&$<=1103||$===1105||$===8208||$>=8211&&$<=8214||$===8216||$===8217||$===8220||$===8221||$>=8224&&$<=8226||$>=8228&&$<=8231||$===8240||$===8242||$===8243||$===8245||$===8251||$===8254||$===8308||$===8319||$>=8321&&$<=8324||$===8364||$===8451||$===8453||$===8457||$===8467||$===8470||$===8481||$===8482||$===8486||$===8491||$===8531||$===8532||$>=8539&&$<=8542||$>=8544&&$<=8555||$>=8560&&$<=8569||$===8585||$>=8592&&$<=8601||$===8632||$===8633||$===8658||$===8660||$===8679||$===8704||$===8706||$===8707||$===8711||$===8712||$===8715||$===8719||$===8721||$===8725||$===8730||$>=8733&&$<=8736||$===8739||$===8741||$>=8743&&$<=8748||$===8750||$>=8756&&$<=8759||$===8764||$===8765||$===8776||$===8780||$===8786||$===8800||$===8801||$>=8804&&$<=8807||$===8810||$===8811||$===8814||$===8815||$===8834||$===8835||$===8838||$===8839||$===8853||$===8857||$===8869||$===8895||$===8978||$>=9312&&$<=9449||$>=9451&&$<=9547||$>=9552&&$<=9587||$>=9600&&$<=9615||$>=9618&&$<=9621||$===9632||$===9633||$>=9635&&$<=9641||$===9650||$===9651||$===9654||$===9655||$===9660||$===9661||$===9664||$===9665||$>=9670&&$<=9672||$===9675||$>=9678&&$<=9681||$>=9698&&$<=9701||$===9711||$===9733||$===9734||$===9737||$===9742||$===9743||$===9756||$===9758||$===9792||$===9794||$===9824||$===9825||$>=9827&&$<=9829||$>=9831&&$<=9834||$===9836||$===9837||$===9839||$===9886||$===9887||$===9919||$>=9926&&$<=9933||$>=9935&&$<=9939||$>=9941&&$<=9953||$===9955||$===9960||$===9961||$>=9963&&$<=9969||$===9972||$>=9974&&$<=9977||$===9979||$===9980||$===9982||$===9983||$===10045||$>=10102&&$<=10111||$>=11094&&$<=11097||$>=12872&&$<=12879||$>=57344&&$<=63743||$>=65024&&$<=65039||$===65533||$>=127232&&$<=127242||$>=127248&&$<=127277||$>=127280&&$<=127337||$>=127344&&$<=127373||$===127375||$===127376||$>=127387&&$<=127404||$>=917760&&$<=917999||$>=983040&&$<=1048573||$>=1048576&&$<=1114109,wF=($)=>$===12288||$>=65281&&$<=65376||$>=65504&&$<=65510,EF=($)=>$>=4352&&$<=4447||$===8986||$===8987||$===9001||$===9002||$>=9193&&$<=9196||$===9200||$===9203||$===9725||$===9726||$===9748||$===9749||$>=9800&&$<=9811||$===9855||$===9875||$===9889||$===9898||$===9899||$===9917||$===9918||$===9924||$===9925||$===9934||$===9940||$===9962||$===9970||$===9971||$===9973||$===9978||$===9981||$===9989||$===9994||$===9995||$===10024||$===10060||$===10062||$>=10067&&$<=10069||$===10071||$>=10133&&$<=10135||$===10160||$===10175||$===11035||$===11036||$===11088||$===11093||$>=11904&&$<=11929||$>=11931&&$<=12019||$>=12032&&$<=12245||$>=12272&&$<=12287||$>=12289&&$<=12350||$>=12353&&$<=12438||$>=12441&&$<=12543||$>=12549&&$<=12591||$>=12593&&$<=12686||$>=12688&&$<=12771||$>=12783&&$<=12830||$>=12832&&$<=12871||$>=12880&&$<=19903||$>=19968&&$<=42124||$>=42128&&$<=42182||$>=43360&&$<=43388||$>=44032&&$<=55203||$>=63744&&$<=64255||$>=65040&&$<=65049||$>=65072&&$<=65106||$>=65108&&$<=65126||$>=65128&&$<=65131||$>=94176&&$<=94180||$===94192||$===94193||$>=94208&&$<=100343||$>=100352&&$<=101589||$>=101632&&$<=101640||$>=110576&&$<=110579||$>=110581&&$<=110587||$===110589||$===110590||$>=110592&&$<=110882||$===110898||$>=110928&&$<=110930||$===110933||$>=110948&&$<=110951||$>=110960&&$<=111355||$===126980||$===127183||$===127374||$>=127377&&$<=127386||$>=127488&&$<=127490||$>=127504&&$<=127547||$>=127552&&$<=127560||$===127568||$===127569||$>=127584&&$<=127589||$>=127744&&$<=127776||$>=127789&&$<=127797||$>=127799&&$<=127868||$>=127870&&$<=127891||$>=127904&&$<=127946||$>=127951&&$<=127955||$>=127968&&$<=127984||$===127988||$>=127992&&$<=128062||$===128064||$>=128066&&$<=128252||$>=128255&&$<=128317||$>=128331&&$<=128334||$>=128336&&$<=128359||$===128378||$===128405||$===128406||$===128420||$>=128507&&$<=128591||$>=128640&&$<=128709||$===128716||$>=128720&&$<=128722||$>=128725&&$<=128727||$>=128732&&$<=128735||$===128747||$===128748||$>=128756&&$<=128764||$>=128992&&$<=129003||$===129008||$>=129292&&$<=129338||$>=129340&&$<=129349||$>=129351&&$<=129535||$>=129648&&$<=129660||$>=129664&&$<=129672||$>=129680&&$<=129725||$>=129727&&$<=129733||$>=129742&&$<=129755||$>=129760&&$<=129768||$>=129776&&$<=129784||$>=131072&&$<=196605||$>=196608&&$<=262141,MG,k_,y_,KG,i_,CF,fF,JT=($,I={},U={})=>{let _=I.limit??1/0,u=I.ellipsis??"",g=I?.ellipsisWidth??(u?JT(u,fF,U).width:0),z=U.ansiWidth??0,v=U.controlWidth??0,J=U.tabWidth??8,N=U.ambiguousWidth??1,X=U.emojiWidth??2,G=U.fullWidthWidth??2,q=U.regularWidth??1,T=U.wideWidth??2,H=0,Q=0,Y=$.length,K=0,L=!1,P=Y,O=Math.max(0,_-g),B=0,R=0,D=0,M=0;$:for(;;){if(R>B||Q>=Y&&Q>H){let F=$.slice(B,R)||$.slice(H,Q);K=0;for(let A of F.replaceAll(CF,"")){let f=A.codePointAt(0)||0;if(wF(f)?M=G:EF(f)?M=T:N!==q&&SF(f)?M=N:M=q,D+M>O&&(P=Math.min(P,Math.max(B,H)+K)),D+M>_){L=!0;break $}K+=A.length,D+=M}B=R=0}if(Q>=Y)break;if(i_.lastIndex=Q,i_.test($)){if(K=i_.lastIndex-Q,M=K*q,D+M>O&&(P=Math.min(P,Q+Math.floor((O-D)/q))),D+M>_){L=!0;break}D+=M,B=H,R=Q,Q=H=i_.lastIndex;continue}if(MG.lastIndex=Q,MG.test($)){if(D+z>O&&(P=Math.min(P,Q)),D+z>_){L=!0;break}D+=z,B=H,R=Q,Q=H=MG.lastIndex;continue}if(k_.lastIndex=Q,k_.test($)){if(K=k_.lastIndex-Q,M=K*v,D+M>O&&(P=Math.min(P,Q+Math.floor((O-D)/v))),D+M>_){L=!0;break}D+=M,B=H,R=Q,Q=H=k_.lastIndex;continue}if(y_.lastIndex=Q,y_.test($)){if(K=y_.lastIndex-Q,M=K*J,D+M>O&&(P=Math.min(P,Q+Math.floor((O-D)/J))),D+M>_){L=!0;break}D+=M,B=H,R=Q,Q=H=y_.lastIndex;continue}if(KG.lastIndex=Q,KG.test($)){if(D+X>O&&(P=Math.min(P,Q)),D+X>_){L=!0;break}D+=X,B=H,R=Q,Q=H=KG.lastIndex;continue}Q+=1}return{width:L?O:D,index:L?P:Y,truncated:L,ellipsed:L&&_>=g}},xF,i4=($,I={})=>JT($,xF,I).width,h_="\x1B",NT="›",kF=39,ZG="\x07",GT="[",yF="]",XT="m",AG,uT,iF=($)=>{if($>=30&&$<=37||$>=90&&$<=97)return 39;if($>=40&&$<=47||$>=100&&$<=107)return 49;if($===1||$===2)return 22;if($===3)return 23;if($===4)return 24;if($===7)return 27;if($===8)return 28;if($===9)return 29;if($===0)return 0},UT=($)=>`${h_}${GT}${$}${XT}`,_T=($)=>`${h_}${AG}${$}${ZG}`,nF=($)=>$.map((I)=>i4(I)),LG=($,I,U)=>{let _=I[Symbol.iterator](),u=!1,g=!1,z=$.at(-1),v=z===void 0?0:i4(z),J=_.next(),N=_.next(),X=0;for(;!J.done;){let G=J.value,q=i4(G);v+q<=U?$[$.length-1]+=G:($.push(G),v=0),(G===h_||G===NT)&&(u=!0,g=I.startsWith(AG,X+1)),u?g?G===ZG&&(u=!1,g=!1):G===XT&&(u=!1):(v+=q,v===U&&!N.done&&($.push(""),v=0)),J=N,N=_.next(),X+=G.length}z=$.at(-1),!v&&z!==void 0&&z.length>0&&$.length>1&&($[$.length-2]+=$.pop())},rF=($)=>{let I=$.split(" "),U=I.length;for(;U>0&&!(i4(I[U-1])>0);)U--;return U===I.length?$:I.slice(0,U).join(" ")+I.slice(U).join("")},lF=($,I,U={})=>{if(U.trim!==!1&&$.trim()==="")return"";let _="",u,g,z=$.split(" "),v=nF(z),J=[""];for(let[H,Q]of z.entries()){U.trim!==!1&&(J[J.length-1]=(J.at(-1)??"").trimStart());let Y=i4(J.at(-1)??"");if(H!==0&&(Y>=I&&(U.wordWrap===!1||U.trim===!1)&&(J.push(""),Y=0),(Y>0||U.trim===!1)&&(J[J.length-1]+=" ",Y++)),U.hard&&v[H]>I){let K=I-Y,L=1+Math.floor((v[H]-K-1)/I);Math.floor((v[H]-1)/I)<L&&J.push(""),LG(J,Q,I);continue}if(Y+v[H]>I&&Y>0&&v[H]>0){if(U.wordWrap===!1&&Y<I){LG(J,Q,I);continue}J.push("")}if(Y+v[H]>I&&U.wordWrap===!1){LG(J,Q,I);continue}J[J.length-1]+=Q}U.trim!==!1&&(J=J.map((H)=>rF(H)));let N=J.join(`
190
- `),X=N[Symbol.iterator](),G=X.next(),q=X.next(),T=0;for(;!G.done;){let H=G.value,Q=q.value;if(_+=H,H===h_||H===NT){uT.lastIndex=T+1;let K=uT.exec(N)?.groups;if(K?.code!==void 0){let L=Number.parseFloat(K.code);u=L===kF?void 0:L}else K?.uri!==void 0&&(g=K.uri.length===0?void 0:K.uri)}let Y=u?iF(u):void 0;Q===`
191
- `?(g&&(_+=_T("")),u&&Y&&(_+=UT(Y))):H===`
192
- `&&(u&&Y&&(_+=UT(u)),g&&(_+=_T(g))),T+=H.length,G=q,q=X.next()}return _},mF=($,I,U,_,u)=>{let g=I,z=0;for(let v=U;v<_;v++){let J=$[v];if(g=g-J.length,z++,g<=u)break}return{lineCount:g,removals:z}},PG=({cursor:$,options:I,style:U,output:_=process.stdout,maxItems:u=Number.POSITIVE_INFINITY,columnPadding:g=0,rowPadding:z=4})=>{let v=E0(_)-g,J=YG(_),N=Z("dim","..."),X=Math.max(J-z,0),G=Math.max(Math.min(u,X),5),q=0;$>=G-3&&(q=Math.max(Math.min($-G+3,I.length-G),0));let T=G<I.length&&q>0,H=G<I.length&&q+G<I.length,Q=Math.min(q+G,I.length),Y=[],K=0;T&&K++,H&&K++;let L=q+(T?1:0),P=Q-(H?1:0);for(let B=L;B<P;B++){let R=x0(U(I[B],B===$),v,{hard:!0,trim:!1}).split(`
193
- `);Y.push(R),K+=R.length}if(K>X){let B=0,R=0,D=K,M=$-L,F=(A,f)=>mF(Y,D,A,f,X);T?({lineCount:D,removals:B}=F(0,M),D>X&&({lineCount:D,removals:R}=F(M+1,Y.length))):({lineCount:D,removals:R}=F(M+1,Y.length),D>X&&({lineCount:D,removals:B}=F(0,M))),B>0&&(T=!0,Y.splice(0,B)),R>0&&(H=!0,Y.splice(Y.length-R,R))}let O=[];T&&O.push(N);for(let B of Y)for(let R of B)O.push(R);return H&&O.push(N),O},O$=($)=>{let I=$.active??"Yes",U=$.inactive??"No";return new OG({active:I,inactive:U,signal:$.signal,input:$.input,output:$.output,initialValue:$.initialValue??!0,render(){let _=$.withGuide??E$.withGuide,u=`${_?`${Z("gray",s)}
194
- `:""}${m_(this.state)} ${$.message}
195
- `,g=this.value?I:U;switch(this.state){case"submit":{let z=_?`${Z("gray",s)} `:"";return`${u}${z}${Z("dim",g)}`}case"cancel":{let z=_?`${Z("gray",s)} `:"";return`${u}${z}${Z(["strikethrough","dim"],g)}${_?`
196
- ${Z("gray",s)}`:""}`}default:{let z=_?`${Z("cyan",s)} `:"",v=_?Z("cyan",A6):"";return`${u}${z}${this.value?`${Z("green",WG)} ${I}`:`${Z("dim",r_)} ${Z("dim",I)}`}${$.vertical?_?`
188
+ `).map((_)=>hF(_,I,U)).join(`
189
+ `)}var k0,PG,KF=()=>process.env.CI==="true",N$=($,I)=>PG?$:I,RF,zT,gT,m_,LF,s,A6,en,sn,ZG,l_,WF,s7,$T,$r,IT,PF,ZF,AF,bF,Ir,jF,FF,SF,wF,h_=($)=>{switch($){case"initial":case"active":return Z("cyan",RF);case"cancel":return Z("red",zT);case"error":return Z("yellow",gT);case"submit":return Z("green",m_)}},vT=($)=>{switch($){case"initial":case"active":return Z("cyan",s);case"cancel":return Z("red",s);case"error":return Z("yellow",s);case"submit":return Z("green",s)}},EF=($)=>$===161||$===164||$===167||$===168||$===170||$===173||$===174||$>=176&&$<=180||$>=182&&$<=186||$>=188&&$<=191||$===198||$===208||$===215||$===216||$>=222&&$<=225||$===230||$>=232&&$<=234||$===236||$===237||$===240||$===242||$===243||$>=247&&$<=250||$===252||$===254||$===257||$===273||$===275||$===283||$===294||$===295||$===299||$>=305&&$<=307||$===312||$>=319&&$<=322||$===324||$>=328&&$<=331||$===333||$===338||$===339||$===358||$===359||$===363||$===462||$===464||$===466||$===468||$===470||$===472||$===474||$===476||$===593||$===609||$===708||$===711||$>=713&&$<=715||$===717||$===720||$>=728&&$<=731||$===733||$===735||$>=768&&$<=879||$>=913&&$<=929||$>=931&&$<=937||$>=945&&$<=961||$>=963&&$<=969||$===1025||$>=1040&&$<=1103||$===1105||$===8208||$>=8211&&$<=8214||$===8216||$===8217||$===8220||$===8221||$>=8224&&$<=8226||$>=8228&&$<=8231||$===8240||$===8242||$===8243||$===8245||$===8251||$===8254||$===8308||$===8319||$>=8321&&$<=8324||$===8364||$===8451||$===8453||$===8457||$===8467||$===8470||$===8481||$===8482||$===8486||$===8491||$===8531||$===8532||$>=8539&&$<=8542||$>=8544&&$<=8555||$>=8560&&$<=8569||$===8585||$>=8592&&$<=8601||$===8632||$===8633||$===8658||$===8660||$===8679||$===8704||$===8706||$===8707||$===8711||$===8712||$===8715||$===8719||$===8721||$===8725||$===8730||$>=8733&&$<=8736||$===8739||$===8741||$>=8743&&$<=8748||$===8750||$>=8756&&$<=8759||$===8764||$===8765||$===8776||$===8780||$===8786||$===8800||$===8801||$>=8804&&$<=8807||$===8810||$===8811||$===8814||$===8815||$===8834||$===8835||$===8838||$===8839||$===8853||$===8857||$===8869||$===8895||$===8978||$>=9312&&$<=9449||$>=9451&&$<=9547||$>=9552&&$<=9587||$>=9600&&$<=9615||$>=9618&&$<=9621||$===9632||$===9633||$>=9635&&$<=9641||$===9650||$===9651||$===9654||$===9655||$===9660||$===9661||$===9664||$===9665||$>=9670&&$<=9672||$===9675||$>=9678&&$<=9681||$>=9698&&$<=9701||$===9711||$===9733||$===9734||$===9737||$===9742||$===9743||$===9756||$===9758||$===9792||$===9794||$===9824||$===9825||$>=9827&&$<=9829||$>=9831&&$<=9834||$===9836||$===9837||$===9839||$===9886||$===9887||$===9919||$>=9926&&$<=9933||$>=9935&&$<=9939||$>=9941&&$<=9953||$===9955||$===9960||$===9961||$>=9963&&$<=9969||$===9972||$>=9974&&$<=9977||$===9979||$===9980||$===9982||$===9983||$===10045||$>=10102&&$<=10111||$>=11094&&$<=11097||$>=12872&&$<=12879||$>=57344&&$<=63743||$>=65024&&$<=65039||$===65533||$>=127232&&$<=127242||$>=127248&&$<=127277||$>=127280&&$<=127337||$>=127344&&$<=127373||$===127375||$===127376||$>=127387&&$<=127404||$>=917760&&$<=917999||$>=983040&&$<=1048573||$>=1048576&&$<=1114109,CF=($)=>$===12288||$>=65281&&$<=65376||$>=65504&&$<=65510,fF=($)=>$>=4352&&$<=4447||$===8986||$===8987||$===9001||$===9002||$>=9193&&$<=9196||$===9200||$===9203||$===9725||$===9726||$===9748||$===9749||$>=9800&&$<=9811||$===9855||$===9875||$===9889||$===9898||$===9899||$===9917||$===9918||$===9924||$===9925||$===9934||$===9940||$===9962||$===9970||$===9971||$===9973||$===9978||$===9981||$===9989||$===9994||$===9995||$===10024||$===10060||$===10062||$>=10067&&$<=10069||$===10071||$>=10133&&$<=10135||$===10160||$===10175||$===11035||$===11036||$===11088||$===11093||$>=11904&&$<=11929||$>=11931&&$<=12019||$>=12032&&$<=12245||$>=12272&&$<=12287||$>=12289&&$<=12350||$>=12353&&$<=12438||$>=12441&&$<=12543||$>=12549&&$<=12591||$>=12593&&$<=12686||$>=12688&&$<=12771||$>=12783&&$<=12830||$>=12832&&$<=12871||$>=12880&&$<=19903||$>=19968&&$<=42124||$>=42128&&$<=42182||$>=43360&&$<=43388||$>=44032&&$<=55203||$>=63744&&$<=64255||$>=65040&&$<=65049||$>=65072&&$<=65106||$>=65108&&$<=65126||$>=65128&&$<=65131||$>=94176&&$<=94180||$===94192||$===94193||$>=94208&&$<=100343||$>=100352&&$<=101589||$>=101632&&$<=101640||$>=110576&&$<=110579||$>=110581&&$<=110587||$===110589||$===110590||$>=110592&&$<=110882||$===110898||$>=110928&&$<=110930||$===110933||$>=110948&&$<=110951||$>=110960&&$<=111355||$===126980||$===127183||$===127374||$>=127377&&$<=127386||$>=127488&&$<=127490||$>=127504&&$<=127547||$>=127552&&$<=127560||$===127568||$===127569||$>=127584&&$<=127589||$>=127744&&$<=127776||$>=127789&&$<=127797||$>=127799&&$<=127868||$>=127870&&$<=127891||$>=127904&&$<=127946||$>=127951&&$<=127955||$>=127968&&$<=127984||$===127988||$>=127992&&$<=128062||$===128064||$>=128066&&$<=128252||$>=128255&&$<=128317||$>=128331&&$<=128334||$>=128336&&$<=128359||$===128378||$===128405||$===128406||$===128420||$>=128507&&$<=128591||$>=128640&&$<=128709||$===128716||$>=128720&&$<=128722||$>=128725&&$<=128727||$>=128732&&$<=128735||$===128747||$===128748||$>=128756&&$<=128764||$>=128992&&$<=129003||$===129008||$>=129292&&$<=129338||$>=129340&&$<=129349||$>=129351&&$<=129535||$>=129648&&$<=129660||$>=129664&&$<=129672||$>=129680&&$<=129725||$>=129727&&$<=129733||$>=129742&&$<=129755||$>=129760&&$<=129768||$>=129776&&$<=129784||$>=131072&&$<=196605||$>=196608&&$<=262141,RG,y_,i_,LG,n_,xF,kF,JT=($,I={},U={})=>{let _=I.limit??1/0,u=I.ellipsis??"",z=I?.ellipsisWidth??(u?JT(u,kF,U).width:0),g=U.ansiWidth??0,v=U.controlWidth??0,J=U.tabWidth??8,N=U.ambiguousWidth??1,X=U.emojiWidth??2,G=U.fullWidthWidth??2,q=U.regularWidth??1,T=U.wideWidth??2,H=0,Q=0,Y=$.length,M=0,L=!1,P=Y,R=Math.max(0,_-z),K=0,V=0,B=0,O=0;$:for(;;){if(V>K||Q>=Y&&Q>H){let b=$.slice(K,V)||$.slice(H,Q);M=0;for(let A of b.replaceAll(xF,"")){let f=A.codePointAt(0)||0;if(CF(f)?O=G:fF(f)?O=T:N!==q&&EF(f)?O=N:O=q,B+O>R&&(P=Math.min(P,Math.max(K,H)+M)),B+O>_){L=!0;break $}M+=A.length,B+=O}K=V=0}if(Q>=Y)break;if(n_.lastIndex=Q,n_.test($)){if(M=n_.lastIndex-Q,O=M*q,B+O>R&&(P=Math.min(P,Q+Math.floor((R-B)/q))),B+O>_){L=!0;break}B+=O,K=H,V=Q,Q=H=n_.lastIndex;continue}if(RG.lastIndex=Q,RG.test($)){if(B+g>R&&(P=Math.min(P,Q)),B+g>_){L=!0;break}B+=g,K=H,V=Q,Q=H=RG.lastIndex;continue}if(y_.lastIndex=Q,y_.test($)){if(M=y_.lastIndex-Q,O=M*v,B+O>R&&(P=Math.min(P,Q+Math.floor((R-B)/v))),B+O>_){L=!0;break}B+=O,K=H,V=Q,Q=H=y_.lastIndex;continue}if(i_.lastIndex=Q,i_.test($)){if(M=i_.lastIndex-Q,O=M*J,B+O>R&&(P=Math.min(P,Q+Math.floor((R-B)/J))),B+O>_){L=!0;break}B+=O,K=H,V=Q,Q=H=i_.lastIndex;continue}if(LG.lastIndex=Q,LG.test($)){if(B+X>R&&(P=Math.min(P,Q)),B+X>_){L=!0;break}B+=X,K=H,V=Q,Q=H=LG.lastIndex;continue}Q+=1}return{width:L?R:B,index:L?P:Y,truncated:L,ellipsed:L&&_>=z}},yF,i4=($,I={})=>JT($,yF,I).width,c_="\x1B",NT="›",iF=39,bG="\x07",GT="[",nF="]",XT="m",jG,uT,rF=($)=>{if($>=30&&$<=37||$>=90&&$<=97)return 39;if($>=40&&$<=47||$>=100&&$<=107)return 49;if($===1||$===2)return 22;if($===3)return 23;if($===4)return 24;if($===7)return 27;if($===8)return 28;if($===9)return 29;if($===0)return 0},UT=($)=>`${c_}${GT}${$}${XT}`,_T=($)=>`${c_}${jG}${$}${bG}`,lF=($)=>$.map((I)=>i4(I)),WG=($,I,U)=>{let _=I[Symbol.iterator](),u=!1,z=!1,g=$.at(-1),v=g===void 0?0:i4(g),J=_.next(),N=_.next(),X=0;for(;!J.done;){let G=J.value,q=i4(G);v+q<=U?$[$.length-1]+=G:($.push(G),v=0),(G===c_||G===NT)&&(u=!0,z=I.startsWith(jG,X+1)),u?z?G===bG&&(u=!1,z=!1):G===XT&&(u=!1):(v+=q,v===U&&!N.done&&($.push(""),v=0)),J=N,N=_.next(),X+=G.length}g=$.at(-1),!v&&g!==void 0&&g.length>0&&$.length>1&&($[$.length-2]+=$.pop())},mF=($)=>{let I=$.split(" "),U=I.length;for(;U>0&&!(i4(I[U-1])>0);)U--;return U===I.length?$:I.slice(0,U).join(" ")+I.slice(U).join("")},hF=($,I,U={})=>{if(U.trim!==!1&&$.trim()==="")return"";let _="",u,z,g=$.split(" "),v=lF(g),J=[""];for(let[H,Q]of g.entries()){U.trim!==!1&&(J[J.length-1]=(J.at(-1)??"").trimStart());let Y=i4(J.at(-1)??"");if(H!==0&&(Y>=I&&(U.wordWrap===!1||U.trim===!1)&&(J.push(""),Y=0),(Y>0||U.trim===!1)&&(J[J.length-1]+=" ",Y++)),U.hard&&v[H]>I){let M=I-Y,L=1+Math.floor((v[H]-M-1)/I);Math.floor((v[H]-1)/I)<L&&J.push(""),WG(J,Q,I);continue}if(Y+v[H]>I&&Y>0&&v[H]>0){if(U.wordWrap===!1&&Y<I){WG(J,Q,I);continue}J.push("")}if(Y+v[H]>I&&U.wordWrap===!1){WG(J,Q,I);continue}J[J.length-1]+=Q}U.trim!==!1&&(J=J.map((H)=>mF(H)));let N=J.join(`
190
+ `),X=N[Symbol.iterator](),G=X.next(),q=X.next(),T=0;for(;!G.done;){let H=G.value,Q=q.value;if(_+=H,H===c_||H===NT){uT.lastIndex=T+1;let M=uT.exec(N)?.groups;if(M?.code!==void 0){let L=Number.parseFloat(M.code);u=L===iF?void 0:L}else M?.uri!==void 0&&(z=M.uri.length===0?void 0:M.uri)}let Y=u?rF(u):void 0;Q===`
191
+ `?(z&&(_+=_T("")),u&&Y&&(_+=UT(Y))):H===`
192
+ `&&(u&&Y&&(_+=UT(u)),z&&(_+=_T(z))),T+=H.length,G=q,q=X.next()}return _},cF=($,I,U,_,u)=>{let z=I,g=0;for(let v=U;v<_;v++){let J=$[v];if(z=z-J.length,g++,z<=u)break}return{lineCount:z,removals:g}},AG=({cursor:$,options:I,style:U,output:_=process.stdout,maxItems:u=Number.POSITIVE_INFINITY,columnPadding:z=0,rowPadding:g=4})=>{let v=f0(_)-z,J=VG(_),N=Z("dim","..."),X=Math.max(J-g,0),G=Math.max(Math.min(u,X),5),q=0;$>=G-3&&(q=Math.max(Math.min($-G+3,I.length-G),0));let T=G<I.length&&q>0,H=G<I.length&&q+G<I.length,Q=Math.min(q+G,I.length),Y=[],M=0;T&&M++,H&&M++;let L=q+(T?1:0),P=Q-(H?1:0);for(let K=L;K<P;K++){let V=y0(U(I[K],K===$),v,{hard:!0,trim:!1}).split(`
193
+ `);Y.push(V),M+=V.length}if(M>X){let K=0,V=0,B=M,O=$-L,b=(A,f)=>cF(Y,B,A,f,X);T?({lineCount:B,removals:K}=b(0,O),B>X&&({lineCount:B,removals:V}=b(O+1,Y.length))):({lineCount:B,removals:V}=b(O+1,Y.length),B>X&&({lineCount:B,removals:K}=b(0,O))),K>0&&(T=!0,Y.splice(0,K)),V>0&&(H=!0,Y.splice(Y.length-V,V))}let R=[];T&&R.push(N);for(let K of Y)for(let V of K)R.push(V);return H&&R.push(N),R},O$=($)=>{let I=$.active??"Yes",U=$.inactive??"No";return new BG({active:I,inactive:U,signal:$.signal,input:$.input,output:$.output,initialValue:$.initialValue??!0,render(){let _=$.withGuide??E$.withGuide,u=`${_?`${Z("gray",s)}
194
+ `:""}${h_(this.state)} ${$.message}
195
+ `,z=this.value?I:U;switch(this.state){case"submit":{let g=_?`${Z("gray",s)} `:"";return`${u}${g}${Z("dim",z)}`}case"cancel":{let g=_?`${Z("gray",s)} `:"";return`${u}${g}${Z(["strikethrough","dim"],z)}${_?`
196
+ ${Z("gray",s)}`:""}`}default:{let g=_?`${Z("cyan",s)} `:"",v=_?Z("cyan",A6):"";return`${u}${g}${this.value?`${Z("green",ZG)} ${I}`:`${Z("dim",l_)} ${Z("dim",I)}`}${$.vertical?_?`
197
197
  ${Z("cyan",s)} `:`
198
- `:` ${Z("dim","/")} `}${this.value?`${Z("dim",r_)} ${Z("dim",U)}`:`${Z("green",WG)} ${U}`}
198
+ `:` ${Z("dim","/")} `}${this.value?`${Z("dim",l_)} ${Z("dim",U)}`:`${Z("green",ZG)} ${U}`}
199
199
  ${v}
200
- `}}}}).prompt()},o,z4=($="",I)=>{let U=I?.output??process.stdout,_=I?.withGuide??E$.withGuide?`${Z("gray",A6)} `:"";U.write(`${_}${Z("red",$)}
200
+ `}}}}).prompt()},d,I4=($="",I)=>{let U=I?.output??process.stdout,_=I?.withGuide??E$.withGuide?`${Z("gray",A6)} `:"";U.write(`${_}${Z("red",$)}
201
201
 
202
- `)},V$=($="",I)=>{let U=I?.output??process.stdout,_=I?.withGuide??E$.withGuide?`${Z("gray",KF)} `:"";U.write(`${_}${$}
203
- `)},d=($="",I)=>{let U=I?.output??process.stdout,_=I?.withGuide??E$.withGuide?`${Z("gray",s)}
202
+ `)},V$=($="",I)=>{let U=I?.output??process.stdout,_=I?.withGuide??E$.withGuide?`${Z("gray",LF)} `:"";U.write(`${_}${$}
203
+ `)},p=($="",I)=>{let U=I?.output??process.stdout,_=I?.withGuide??E$.withGuide?`${Z("gray",s)}
204
204
  ${Z("gray",A6)} `:"";U.write(`${_}${$}
205
205
 
206
- `)},C0=($,I)=>$.split(`
206
+ `)},x0=($,I)=>$.split(`
207
207
  `).map((U)=>I(U)).join(`
208
- `),c_=($)=>{let I=(_,u)=>{let g=_.label??String(_.value);return u==="disabled"?`${Z("gray",$T)} ${C0(g,(z)=>Z(["strikethrough","gray"],z))}${_.hint?` ${Z("dim",`(${_.hint??"disabled"})`)}`:""}`:u==="active"?`${Z("cyan",LF)} ${g}${_.hint?` ${Z("dim",`(${_.hint})`)}`:""}`:u==="selected"?`${Z("green",s7)} ${C0(g,(z)=>Z("dim",z))}${_.hint?` ${Z("dim",`(${_.hint})`)}`:""}`:u==="cancelled"?`${C0(g,(z)=>Z(["strikethrough","dim"],z))}`:u==="active-selected"?`${Z("green",s7)} ${g}${_.hint?` ${Z("dim",`(${_.hint})`)}`:""}`:u==="submitted"?`${C0(g,(z)=>Z("dim",z))}`:`${Z("dim",$T)} ${C0(g,(z)=>Z("dim",z))}`},U=$.required??!0;return new e7({options:$.options,signal:$.signal,input:$.input,output:$.output,initialValues:$.initialValues,required:U,cursorAt:$.cursorAt,validate(_){if(U&&(_===void 0||_.length===0))return`Please select at least one option.
209
- ${Z("reset",Z("dim",`Press ${Z(["gray","bgWhite","inverse"]," space ")} to select, ${Z("gray",Z("bgWhite",Z("inverse"," enter ")))} to submit`))}`},render(){let _=_1($.output,$.message,`${vT(this.state)} `,`${m_(this.state)} `),u=`${Z("gray",s)}
208
+ `),d_=($)=>{let I=(_,u)=>{let z=_.label??String(_.value);return u==="disabled"?`${Z("gray",$T)} ${x0(z,(g)=>Z(["strikethrough","gray"],g))}${_.hint?` ${Z("dim",`(${_.hint??"disabled"})`)}`:""}`:u==="active"?`${Z("cyan",WF)} ${z}${_.hint?` ${Z("dim",`(${_.hint})`)}`:""}`:u==="selected"?`${Z("green",s7)} ${x0(z,(g)=>Z("dim",g))}${_.hint?` ${Z("dim",`(${_.hint})`)}`:""}`:u==="cancelled"?`${x0(z,(g)=>Z(["strikethrough","dim"],g))}`:u==="active-selected"?`${Z("green",s7)} ${z}${_.hint?` ${Z("dim",`(${_.hint})`)}`:""}`:u==="submitted"?`${x0(z,(g)=>Z("dim",g))}`:`${Z("dim",$T)} ${x0(z,(g)=>Z("dim",g))}`},U=$.required??!0;return new e7({options:$.options,signal:$.signal,input:$.input,output:$.output,initialValues:$.initialValues,required:U,cursorAt:$.cursorAt,validate(_){if(U&&(_===void 0||_.length===0))return`Please select at least one option.
209
+ ${Z("reset",Z("dim",`Press ${Z(["gray","bgWhite","inverse"]," space ")} to select, ${Z("gray",Z("bgWhite",Z("inverse"," enter ")))} to submit`))}`},render(){let _=g1($.output,$.message,`${vT(this.state)} `,`${h_(this.state)} `),u=`${Z("gray",s)}
210
210
  ${_}
211
- `,g=this.value??[],z=(v,J)=>{if(v.disabled)return I(v,"disabled");let N=g.includes(v.value);return J&&N?I(v,"active-selected"):N?I(v,"selected"):I(v,J?"active":"inactive")};switch(this.state){case"submit":{let v=this.options.filter(({value:N})=>g.includes(N)).map((N)=>I(N,"submitted")).join(Z("dim",", "))||Z("dim","none"),J=_1($.output,v,`${Z("gray",s)} `);return`${u}${J}`}case"cancel":{let v=this.options.filter(({value:N})=>g.includes(N)).map((N)=>I(N,"cancelled")).join(Z("dim",", "));if(v.trim()==="")return`${u}${Z("gray",s)}`;let J=_1($.output,v,`${Z("gray",s)} `);return`${u}${J}
211
+ `,z=this.value??[],g=(v,J)=>{if(v.disabled)return I(v,"disabled");let N=z.includes(v.value);return J&&N?I(v,"active-selected"):N?I(v,"selected"):I(v,J?"active":"inactive")};switch(this.state){case"submit":{let v=this.options.filter(({value:N})=>z.includes(N)).map((N)=>I(N,"submitted")).join(Z("dim",", "))||Z("dim","none"),J=g1($.output,v,`${Z("gray",s)} `);return`${u}${J}`}case"cancel":{let v=this.options.filter(({value:N})=>z.includes(N)).map((N)=>I(N,"cancelled")).join(Z("dim",", "));if(v.trim()==="")return`${u}${Z("gray",s)}`;let J=g1($.output,v,`${Z("gray",s)} `);return`${u}${J}
212
212
  ${Z("gray",s)}`}case"error":{let v=`${Z("yellow",s)} `,J=this.error.split(`
213
213
  `).map((G,q)=>q===0?`${Z("yellow",A6)} ${Z("yellow",G)}`:` ${G}`).join(`
214
214
  `),N=u.split(`
215
215
  `).length,X=J.split(`
216
- `).length+1;return`${u}${v}${PG({output:$.output,options:this.options,cursor:this.cursor,maxItems:$.maxItems,columnPadding:v.length,rowPadding:N+X,style:z}).join(`
216
+ `).length+1;return`${u}${v}${AG({output:$.output,options:this.options,cursor:this.cursor,maxItems:$.maxItems,columnPadding:v.length,rowPadding:N+X,style:g}).join(`
217
217
  ${v}`)}
218
218
  ${J}
219
219
  `}default:{let v=`${Z("cyan",s)} `,J=u.split(`
220
- `).length;return`${u}${v}${PG({output:$.output,options:this.options,cursor:this.cursor,maxItems:$.maxItems,columnPadding:v.length,rowPadding:J+2,style:z}).join(`
220
+ `).length;return`${u}${v}${AG({output:$.output,options:this.options,cursor:this.cursor,maxItems:$.maxItems,columnPadding:v.length,rowPadding:J+2,style:g}).join(`
221
221
  ${v}`)}
222
222
  ${Z("cyan",A6)}
223
- `}}}}).prompt()},hF=($)=>Z("dim",$),cF=($,I,U)=>{let _={hard:!0,trim:!1},u=x0($,I,_).split(`
224
- `),g=u.reduce((J,N)=>Math.max(i4(N),J),0),z=u.map(U).reduce((J,N)=>Math.max(i4(N),J),0),v=I-(z-g);return x0($,v,_)},k=($="",I="",U)=>{let _=U?.output??Y4.stdout,u=U?.withGuide??E$.withGuide,g=U?.format??hF,z=["",...cF($,E0(_)-6,g).split(`
225
- `).map(g),""],v=i4(I),J=Math.max(z.reduce((q,T)=>{let H=i4(T);return H>q?H:q},0),v)+2,N=z.map((q)=>`${Z("gray",s)} ${q}${" ".repeat(J-i4(q))}${Z("gray",s)}`).join(`
223
+ `}}}}).prompt()},dF=($)=>Z("dim",$),pF=($,I,U)=>{let _={hard:!0,trim:!1},u=y0($,I,_).split(`
224
+ `),z=u.reduce((J,N)=>Math.max(i4(N),J),0),g=u.map(U).reduce((J,N)=>Math.max(i4(N),J),0),v=I-(g-z);return y0($,v,_)},k=($="",I="",U)=>{let _=U?.output??Y4.stdout,u=U?.withGuide??E$.withGuide,z=U?.format??dF,g=["",...pF($,f0(_)-6,z).split(`
225
+ `).map(z),""],v=i4(I),J=Math.max(g.reduce((q,T)=>{let H=i4(T);return H>q?H:q},0),v)+2,N=g.map((q)=>`${Z("gray",s)} ${q}${" ".repeat(J-i4(q))}${Z("gray",s)}`).join(`
226
226
  `),X=u?`${Z("gray",s)}
227
- `:"",G=u?WF:ZF;_.write(`${X}${Z("green",l_)} ${Z("reset",I)} ${Z("gray",IT.repeat(Math.max(J-v-1,1))+RF)}
227
+ `:"",G=u?ZF:bF;_.write(`${X}${Z("green",m_)} ${Z("reset",I)} ${Z("gray",IT.repeat(Math.max(J-v-1,1))+PF)}
228
228
  ${N}
229
- ${Z("gray",G+IT.repeat(J+2)+PF)}
230
- `)},dF=($)=>Z("magenta",$),I4=({indicator:$="dots",onCancel:I,output:U=process.stdout,cancelMessage:_,errorMessage:u,frames:g=RG?["◒","◐","◓","◑"]:["•","o","O","0"],delay:z=RG?80:120,signal:v,...J}={})=>{let N=DF(),X,G,q=!1,T=!1,H="",Q,Y=performance.now(),K=E0(U),L=J?.styleFrame??dF,P=(t)=>{let Y$=t>1?u??E$.messages.error:_??E$.messages.cancel;T=t===1,q&&(u$(Y$,t),T&&typeof I=="function"&&I())},O=()=>P(2),B=()=>P(1),R=()=>{process.on("uncaughtExceptionMonitor",O),process.on("unhandledRejection",O),process.on("SIGINT",B),process.on("SIGTERM",B),process.on("exit",P),v&&v.addEventListener("abort",B)},D=()=>{process.removeListener("uncaughtExceptionMonitor",O),process.removeListener("unhandledRejection",O),process.removeListener("SIGINT",B),process.removeListener("SIGTERM",B),process.removeListener("exit",P),v&&v.removeEventListener("abort",B)},M=()=>{if(Q===void 0)return;N&&U.write(`
231
- `);let t=x0(Q,K,{hard:!0,trim:!1}).split(`
232
- `);t.length>1&&U.write(f0.cursor.up(t.length-1)),U.write(f0.cursor.to(0)),U.write(f0.erase.down())},F=(t)=>t.replace(/\.+$/,""),A=(t)=>{let Y$=(performance.now()-t)/1000,o$=Math.floor(Y$/60),t$=Math.floor(Y$%60);return o$>0?`[${o$}m ${t$}s]`:`[${t$}s]`},f=J.withGuide??E$.withGuide,b=(t="")=>{q=!0,X=o7({output:U}),H=F(t),Y=performance.now(),f&&U.write(`${Z("gray",s)}
233
- `);let Y$=0,o$=0;R(),G=setInterval(()=>{if(N&&H===Q)return;M(),Q=H;let t$=L(g[Y$]),S4;if(N)S4=`${t$} ${H}...`;else if($==="timer")S4=`${t$} ${H} ${A(Y)}`;else{let J6=".".repeat(Math.floor(o$)).slice(0,3);S4=`${t$} ${H}${J6}`}let f2=x0(S4,K,{hard:!0,trim:!1});U.write(f2),Y$=Y$+1<g.length?Y$+1:0,o$=o$<4?o$+0.125:0},z)},u$=(t="",Y$=0,o$=!1)=>{if(!q)return;q=!1,clearInterval(G),M();let t$=Y$===0?Z("green",l_):Y$===1?Z("red",gT):Z("red",zT);H=t??H,o$||($==="timer"?U.write(`${t$} ${H} ${A(Y)}
229
+ ${Z("gray",G+IT.repeat(J+2)+AF)}
230
+ `)},oF=($)=>Z("magenta",$),u4=({indicator:$="dots",onCancel:I,output:U=process.stdout,cancelMessage:_,errorMessage:u,frames:z=PG?["◒","◐","◓","◑"]:["•","o","O","0"],delay:g=PG?80:120,signal:v,...J}={})=>{let N=KF(),X,G,q=!1,T=!1,H="",Q,Y=performance.now(),M=f0(U),L=J?.styleFrame??oF,P=(t)=>{let Y$=t>1?u??E$.messages.error:_??E$.messages.cancel;T=t===1,q&&(u$(Y$,t),T&&typeof I=="function"&&I())},R=()=>P(2),K=()=>P(1),V=()=>{process.on("uncaughtExceptionMonitor",R),process.on("unhandledRejection",R),process.on("SIGINT",K),process.on("SIGTERM",K),process.on("exit",P),v&&v.addEventListener("abort",K)},B=()=>{process.removeListener("uncaughtExceptionMonitor",R),process.removeListener("unhandledRejection",R),process.removeListener("SIGINT",K),process.removeListener("SIGTERM",K),process.removeListener("exit",P),v&&v.removeEventListener("abort",K)},O=()=>{if(Q===void 0)return;N&&U.write(`
231
+ `);let t=y0(Q,M,{hard:!0,trim:!1}).split(`
232
+ `);t.length>1&&U.write(k0.cursor.up(t.length-1)),U.write(k0.cursor.to(0)),U.write(k0.erase.down())},b=(t)=>t.replace(/\.+$/,""),A=(t)=>{let Y$=(performance.now()-t)/1000,o$=Math.floor(Y$/60),t$=Math.floor(Y$%60);return o$>0?`[${o$}m ${t$}s]`:`[${t$}s]`},f=J.withGuide??E$.withGuide,j=(t="")=>{q=!0,X=o7({output:U}),H=b(t),Y=performance.now(),f&&U.write(`${Z("gray",s)}
233
+ `);let Y$=0,o$=0;V(),G=setInterval(()=>{if(N&&H===Q)return;O(),Q=H;let t$=L(z[Y$]),S4;if(N)S4=`${t$} ${H}...`;else if($==="timer")S4=`${t$} ${H} ${A(Y)}`;else{let J6=".".repeat(Math.floor(o$)).slice(0,3);S4=`${t$} ${H}${J6}`}let k2=y0(S4,M,{hard:!0,trim:!1});U.write(k2),Y$=Y$+1<z.length?Y$+1:0,o$=o$<4?o$+0.125:0},g)},u$=(t="",Y$=0,o$=!1)=>{if(!q)return;q=!1,clearInterval(G),O();let t$=Y$===0?Z("green",m_):Y$===1?Z("red",zT):Z("red",gT);H=t??H,o$||($==="timer"?U.write(`${t$} ${H} ${A(Y)}
234
234
  `):U.write(`${t$} ${H}
235
- `)),D(),X()};return{start:b,stop:(t="")=>u$(t,0),message:(t="")=>{H=F(t??H)},cancel:(t="")=>u$(t,1),error:(t="")=>u$(t,2),clear:()=>u$("",0,!0),get isCancelled(){return T}}},en,n_=($,I)=>$.includes(`
235
+ `)),B(),X()};return{start:j,stop:(t="")=>u$(t,0),message:(t="")=>{H=b(t??H)},cancel:(t="")=>u$(t,1),error:(t="")=>u$(t,2),clear:()=>u$("",0,!0),get isCancelled(){return T}}},ur,r_=($,I)=>$.includes(`
236
236
  `)?$.split(`
237
237
  `).map((U)=>I(U)).join(`
238
- `):I($),z1=($)=>{let I=(U,_)=>{let u=U.label??String(U.value);switch(_){case"disabled":return`${Z("gray",r_)} ${n_(u,(g)=>Z("gray",g))}${U.hint?` ${Z("dim",`(${U.hint??"disabled"})`)}`:""}`;case"selected":return`${n_(u,(g)=>Z("dim",g))}`;case"active":return`${Z("green",WG)} ${u}${U.hint?` ${Z("dim",`(${U.hint})`)}`:""}`;case"cancelled":return`${n_(u,(g)=>Z(["strikethrough","dim"],g))}`;default:return`${Z("dim",r_)} ${n_(u,(g)=>Z("dim",g))}`}};return new VG({options:$.options,signal:$.signal,input:$.input,output:$.output,initialValue:$.initialValue,render(){let U=$.withGuide??E$.withGuide,_=`${m_(this.state)} `,u=`${vT(this.state)} `,g=_1($.output,$.message,u,_),z=`${U?`${Z("gray",s)}
239
- `:""}${g}
240
- `;switch(this.state){case"submit":{let v=U?`${Z("gray",s)} `:"",J=_1($.output,I(this.options[this.cursor],"selected"),v);return`${z}${J}`}case"cancel":{let v=U?`${Z("gray",s)} `:"",J=_1($.output,I(this.options[this.cursor],"cancelled"),v);return`${z}${J}${U?`
241
- ${Z("gray",s)}`:""}`}default:{let v=U?`${Z("cyan",s)} `:"",J=U?Z("cyan",A6):"",N=z.split(`
242
- `).length,X=U?2:1;return`${z}${v}${PG({output:$.output,cursor:this.cursor,options:this.options,maxItems:$.maxItems,columnPadding:v.length,rowPadding:N+X,style:(G,q)=>I(G,G.disabled?"disabled":q?"active":"inactive")}).join(`
238
+ `):I($),b6=($)=>{let I=(U,_)=>{let u=U.label??String(U.value);switch(_){case"disabled":return`${Z("gray",l_)} ${r_(u,(z)=>Z("gray",z))}${U.hint?` ${Z("dim",`(${U.hint??"disabled"})`)}`:""}`;case"selected":return`${r_(u,(z)=>Z("dim",z))}`;case"active":return`${Z("green",ZG)} ${u}${U.hint?` ${Z("dim",`(${U.hint})`)}`:""}`;case"cancelled":return`${r_(u,(z)=>Z(["strikethrough","dim"],z))}`;default:return`${Z("dim",l_)} ${r_(u,(z)=>Z("dim",z))}`}};return new DG({options:$.options,signal:$.signal,input:$.input,output:$.output,initialValue:$.initialValue,render(){let U=$.withGuide??E$.withGuide,_=`${h_(this.state)} `,u=`${vT(this.state)} `,z=g1($.output,$.message,u,_),g=`${U?`${Z("gray",s)}
239
+ `:""}${z}
240
+ `;switch(this.state){case"submit":{let v=U?`${Z("gray",s)} `:"",J=g1($.output,I(this.options[this.cursor],"selected"),v);return`${g}${J}`}case"cancel":{let v=U?`${Z("gray",s)} `:"",J=g1($.output,I(this.options[this.cursor],"cancelled"),v);return`${g}${J}${U?`
241
+ ${Z("gray",s)}`:""}`}default:{let v=U?`${Z("cyan",s)} `:"",J=U?Z("cyan",A6):"",N=g.split(`
242
+ `).length,X=U?2:1;return`${g}${v}${AG({output:$.output,cursor:this.cursor,options:this.options,maxItems:$.maxItems,columnPadding:v.length,rowPadding:N+X,style:(G,q)=>I(G,G.disabled?"disabled":q?"active":"inactive")}).join(`
243
243
  ${v}`)}
244
244
  ${J}
245
- `}}}}).prompt()},sn,d_=($)=>new BG({validate:$.validate,placeholder:$.placeholder,defaultValue:$.defaultValue,initialValue:$.initialValue,output:$.output,signal:$.signal,input:$.input,render(){let I=$?.withGuide??E$.withGuide,U=`${`${I?`${Z("gray",s)}
246
- `:""}${m_(this.state)} `}${$.message}
247
- `,_=$.placeholder?Z("inverse",$.placeholder[0])+Z("dim",$.placeholder.slice(1)):Z(["inverse","hidden"],"_"),u=this.userInput?this.userInputWithCursor:_,g=this.value??"";switch(this.state){case"error":{let z=this.error?` ${Z("yellow",this.error)}`:"",v=I?`${Z("yellow",s)} `:"",J=I?Z("yellow",A6):"";return`${U.trim()}
245
+ `}}}}).prompt()},Ur,p_=($)=>new MG({validate:$.validate,placeholder:$.placeholder,defaultValue:$.defaultValue,initialValue:$.initialValue,output:$.output,signal:$.signal,input:$.input,render(){let I=$?.withGuide??E$.withGuide,U=`${`${I?`${Z("gray",s)}
246
+ `:""}${h_(this.state)} `}${$.message}
247
+ `,_=$.placeholder?Z("inverse",$.placeholder[0])+Z("dim",$.placeholder.slice(1)):Z(["inverse","hidden"],"_"),u=this.userInput?this.userInputWithCursor:_,z=this.value??"";switch(this.state){case"error":{let g=this.error?` ${Z("yellow",this.error)}`:"",v=I?`${Z("yellow",s)} `:"",J=I?Z("yellow",A6):"";return`${U.trim()}
248
248
  ${v}${u}
249
- ${J}${z}
250
- `}case"submit":{let z=g?` ${Z("dim",g)}`:"",v=I?Z("gray",s):"";return`${U}${v}${z}`}case"cancel":{let z=g?` ${Z(["strikethrough","dim"],g)}`:"",v=I?Z("gray",s):"";return`${U}${v}${z}${g.trim()?`
251
- ${v}`:""}`}default:{let z=I?`${Z("cyan",s)} `:"",v=I?Z("cyan",A6):"";return`${U}${z}${u}
249
+ ${J}${g}
250
+ `}case"submit":{let g=z?` ${Z("dim",z)}`:"",v=I?Z("gray",s):"";return`${U}${v}${g}`}case"cancel":{let g=z?` ${Z(["strikethrough","dim"],z)}`:"",v=I?Z("gray",s):"";return`${U}${v}${g}${z.trim()?`
251
+ ${v}`:""}`}default:{let g=I?`${Z("cyan",s)} `:"",v=I?Z("cyan",A6):"";return`${U}${g}${u}
252
252
  ${v}
253
- `}}}}).prompt();var u4=U4(()=>{DG();DG();f0=q$(gG(),1);RG=BF(),MF=N$("◆","*"),gT=N$("■","x"),zT=N$("▲","x"),l_=N$("◇","o"),KF=N$("┌","T"),s=N$("│","|"),A6=N$("└","—"),pn=N$("┐","T"),on=N$("┘","—"),WG=N$("●",">"),r_=N$("○"," "),LF=N$("◻","[•]"),s7=N$("◼","[+]"),$T=N$("◻","[ ]"),tn=N$("▪","•"),IT=N$("─","-"),RF=N$("╮","+"),WF=N$("├","+"),PF=N$("╯","+"),ZF=N$("╰","+"),an=N$("╭","+"),AF=N$("●","•"),bF=N$("◆","*"),jF=N$("▲","!"),FF=N$("■","x"),MG=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,k_=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,y_=/\t{1,1000}/y,KG=/[\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,i_=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,CF=/\p{M}+/gu,fF={limit:1/0,ellipsis:""},xF={limit:1/0,ellipsis:"",ellipsisWidth:0},AG=`${yF}8;;`,uT=new RegExp(`(?:\\${GT}(?<code>\\d+)m|\\${AG}(?<uri>.*)${ZG})`,"y");o={message:($=[],{symbol:I=Z("gray",s),secondarySymbol:U=Z("gray",s),output:_=process.stdout,spacing:u=1,withGuide:g}={})=>{let z=[],v=g??E$.withGuide,J=v?U:"",N=v?`${I} `:"",X=v?`${U} `:"";for(let q=0;q<u;q++)z.push(J);let G=Array.isArray($)?$:$.split(`
254
- `);if(G.length>0){let[q,...T]=G;q.length>0?z.push(`${N}${q}`):z.push(v?I:"");for(let H of T)H.length>0?z.push(`${X}${H}`):z.push(v?U:"")}_.write(`${z.join(`
253
+ `}}}}).prompt();var U4=_4(()=>{KG();KG();k0=q$(vG(),1);PG=MF(),RF=N$("◆","*"),zT=N$("■","x"),gT=N$("▲","x"),m_=N$("◇","o"),LF=N$("┌","T"),s=N$("│","|"),A6=N$("└","—"),en=N$("┐","T"),sn=N$("┘","—"),ZG=N$("●",">"),l_=N$("○"," "),WF=N$("◻","[•]"),s7=N$("◼","[+]"),$T=N$("◻","[ ]"),$r=N$("▪","•"),IT=N$("─","-"),PF=N$("╮","+"),ZF=N$("├","+"),AF=N$("╯","+"),bF=N$("╰","+"),Ir=N$("╭","+"),jF=N$("●","•"),FF=N$("◆","*"),SF=N$("▲","!"),wF=N$("■","x"),RG=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,y_=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,i_=/\t{1,1000}/y,LG=/[\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,n_=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,xF=/\p{M}+/gu,kF={limit:1/0,ellipsis:""},yF={limit:1/0,ellipsis:"",ellipsisWidth:0},jG=`${nF}8;;`,uT=new RegExp(`(?:\\${GT}(?<code>\\d+)m|\\${jG}(?<uri>.*)${bG})`,"y");d={message:($=[],{symbol:I=Z("gray",s),secondarySymbol:U=Z("gray",s),output:_=process.stdout,spacing:u=1,withGuide:z}={})=>{let g=[],v=z??E$.withGuide,J=v?U:"",N=v?`${I} `:"",X=v?`${U} `:"";for(let q=0;q<u;q++)g.push(J);let G=Array.isArray($)?$:$.split(`
254
+ `);if(G.length>0){let[q,...T]=G;q.length>0?g.push(`${N}${q}`):g.push(v?I:"");for(let H of T)H.length>0?g.push(`${X}${H}`):g.push(v?U:"")}_.write(`${g.join(`
255
255
  `)}
256
- `)},info:($,I)=>{o.message($,{...I,symbol:Z("blue",AF)})},success:($,I)=>{o.message($,{...I,symbol:Z("green",bF)})},step:($,I)=>{o.message($,{...I,symbol:Z("green",l_)})},warn:($,I)=>{o.message($,{...I,symbol:Z("yellow",jF)})},warning:($,I)=>{o.warn($,I)},error:($,I)=>{o.message($,{...I,symbol:Z("red",FF)})}},en={light:N$("─","-"),heavy:N$("━","="),block:N$("█","#")},sn=`${Z("gray",s)} `});function jG($){let I=$.trimStart();if(!I.startsWith("---"))return{frontmatter:{},body:$};let U=I.indexOf(`
257
- ---`,3);if(U===-1)return{frontmatter:{},body:$};let _=I.slice(3,U).trim(),u=I.slice(U+4);try{let g=c6(_);return{frontmatter:g&&typeof g==="object"?g:{},body:u}}catch{return{frontmatter:{},body:u}}}function FG($,I){let U=["---"];for(let[_,u]of Object.entries($)){if(u===void 0||u===null)continue;if(Array.isArray(u)){U.push(`${_}:`);for(let g of u)U.push(` - ${g}`)}else{let g=String(u),z=/[:#[\]{}|>&*!,'"%@`]/.test(g)||g.includes(`
258
- `);U.push(`${_}: ${z?JSON.stringify(g):g}`)}}return U.push("---"),U.push(""),U.join(`
259
- `)+I}var OT=U4(()=>{gz()});import{cpSync as R4,existsSync as D$,lstatSync as BT,mkdirSync as h$,readdirSync as p_,readFileSync as GI,readlinkSync as IS,rmSync as uS,symlinkSync as US,unlinkSync as DT,writeFileSync as n4}from"node:fs";import{dirname as wG,join as n,relative as _S,resolve as SG}from"node:path";function y0($){try{if(!BT($).isDirectory())DT($)}catch{}}function o_($,I,U,_){let u=n($,".agents","skills",I);if(!D$(u))return!1;let g=n(U,W4,I);y0(g),h$(g,{recursive:!0}),R4(u,g,{recursive:!0,force:!0});let z=n(u,"variants"),v=n(g,"stack");if(_&&D$(n(z,_)))h$(v,{recursive:!0}),R4(n(z,_),v,{recursive:!0,force:!0}),n4(n(v,"stack.yaml"),`language: ${_}
256
+ `)},info:($,I)=>{d.message($,{...I,symbol:Z("blue",jF)})},success:($,I)=>{d.message($,{...I,symbol:Z("green",FF)})},step:($,I)=>{d.message($,{...I,symbol:Z("green",m_)})},warn:($,I)=>{d.message($,{...I,symbol:Z("yellow",SF)})},warning:($,I)=>{d.warn($,I)},error:($,I)=>{d.message($,{...I,symbol:Z("red",wF)})}},ur={light:N$("─","-"),heavy:N$("━","="),block:N$("█","#")},Ur=`${Z("gray",s)} `});function SG($){let I=$.trimStart();if(!I.startsWith("---"))return{frontmatter:{},body:$};let U=I.indexOf(`
257
+ ---`,3);if(U===-1)return{frontmatter:{},body:$};let _=I.slice(3,U).trim(),u=I.slice(U+4);try{let z=p6(_);return{frontmatter:z&&typeof z==="object"?z:{},body:u}}catch{return{frontmatter:{},body:u}}}function wG($,I){let U=["---"];for(let[_,u]of Object.entries($)){if(u===void 0||u===null)continue;if(Array.isArray(u)){U.push(`${_}:`);for(let z of u)U.push(` - ${z}`)}else{let z=String(u),g=/[:#[\]{}|>&*!,'"%@`]/.test(z)||z.includes(`
258
+ `);U.push(`${_}: ${g?JSON.stringify(z):z}`)}}return U.push("---"),U.push(""),U.join(`
259
+ `)+I}var OT=_4(()=>{vg()});import{cpSync as L4,existsSync as D$,lstatSync as BT,mkdirSync as m$,readdirSync as o_,readFileSync as XI,readlinkSync as US,rmSync as _S,symlinkSync as zS,unlinkSync as DT,writeFileSync as n4}from"node:fs";import{dirname as CG,join as n,relative as gS,resolve as EG}from"node:path";function n0($){try{if(!BT($).isDirectory())DT($)}catch{}}function t_($,I,U,_){let u=n($,".agents","skills",I);if(!D$(u))return!1;let z=n(U,W4,I);n0(z),m$(z,{recursive:!0}),L4(u,z,{recursive:!0,force:!0});let g=n(u,"variants"),v=n(z,"stack");if(_&&D$(n(g,_)))m$(v,{recursive:!0}),L4(n(g,_),v,{recursive:!0,force:!0}),n4(n(v,"stack.yaml"),`language: ${_}
260
260
  source: preset
261
- `);let J=n(g,"variants");if(D$(J))uS(J,{recursive:!0,force:!0});return!0}function t_($,I){let U=n($,".agents","skills","_shared");if(!D$(U))return;let _=n(I,W4,"_shared");y0(_),h$(_,{recursive:!0}),R4(U,_,{recursive:!0,force:!0})}function KT($,I){let U=n($,".agents","workflows");if(!D$(U))return;let _=n(I,".agents","workflows");y0(_),h$(_,{recursive:!0}),R4(U,_,{recursive:!0,force:!0})}function LT($,I){let U=n($,".agents","rules");if(!D$(U))return;let _=n(I,".agents","rules");y0(_),h$(_,{recursive:!0}),R4(U,_,{recursive:!0,force:!0})}function RT($,I,U=!1){let _=n($,".agents","config");if(D$(_)){let g=n(I,".agents","config");if(h$(g,{recursive:!0}),U)R4(_,g,{recursive:!0,force:!0});else for(let z of p_(_,{withFileTypes:!0})){let v=n(g,z.name);if(!D$(v))R4(n(_,z.name),v,z.isDirectory()?{recursive:!0}:{})}}let u=n($,".agents","mcp.json");if(D$(u)){let g=n(I,".agents");h$(g,{recursive:!0});let z=n(g,"mcp.json");if(U||!D$(z))R4(u,z)}}function WT($){let I=process.env.HOME||process.env.USERPROFILE||"",U=n(I,".gemini","antigravity","global_workflows"),_=n($,".agents","workflows");if(!D$(_))return;h$(U,{recursive:!0}),R4(_,U,{recursive:!0,force:!0})}function zS($,I){let U=n($,".claude","rules");if(!D$(U))return;let _=n(I,".claude","rules");h$(_,{recursive:!0}),R4(U,_,{recursive:!0,force:!0})}function vS($,I){if(!D$($))return;let U=n(I,".claude","agents");h$(U,{recursive:!0});for(let _ of p_($,{withFileTypes:!0})){if(!_.isFile()||!_.name.endsWith(".md"))continue;let u=_.name,g=GI(n($,u),"utf-8"),{frontmatter:z,body:v}=jG(g),J=z.name||u.replace(".md",""),N=gS[J]||{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:20},X={name:J,description:z.description,tools:N.tools,model:N.model,maxTurns:N.maxTurns};if(N.effort)X.effort=N.effort;if(z.skills)X.skills=z.skills;let G=v.replace("Follow the vendor-specific execution protocol:","Follow `.agents/skills/_shared/runtime/execution-protocols/claude.md`:"),q=`<!-- Generated by oh-my-agent CLI. Source: .agents/agents/${u} -->
262
- ${G}`;n4(n(U,u),FG(X,q))}}function JS($,I){if(!D$($))return;for(let U of p_($,{withFileTypes:!0})){if(!U.isFile()||!U.name.endsWith(".md")||U.name.startsWith("_"))continue;let _=U.name,u=GI(n($,_),"utf-8"),{frontmatter:g}=jG(u),z=_.replace(".md",""),v=g.description||z,J=n(I,".claude","skills",z);y0(J);let N=FG({name:z,description:v,"disable-model-invocation":!0},`# /${z}
261
+ `);let J=n(z,"variants");if(D$(J))_S(J,{recursive:!0,force:!0});return!0}function a_($,I){let U=n($,".agents","skills","_shared");if(!D$(U))return;let _=n(I,W4,"_shared");n0(_),m$(_,{recursive:!0}),L4(U,_,{recursive:!0,force:!0})}function KT($,I){let U=n($,".agents","workflows");if(!D$(U))return;let _=n(I,".agents","workflows");n0(_),m$(_,{recursive:!0}),L4(U,_,{recursive:!0,force:!0})}function RT($,I){let U=n($,".agents","rules");if(!D$(U))return;let _=n(I,".agents","rules");n0(_),m$(_,{recursive:!0}),L4(U,_,{recursive:!0,force:!0})}function LT($,I,U=!1){let _=n($,".agents","config");if(D$(_)){let z=n(I,".agents","config");if(m$(z,{recursive:!0}),U)L4(_,z,{recursive:!0,force:!0});else for(let g of o_(_,{withFileTypes:!0})){let v=n(z,g.name);if(!D$(v))L4(n(_,g.name),v,g.isDirectory()?{recursive:!0}:{})}}let u=n($,".agents","mcp.json");if(D$(u)){let z=n(I,".agents");m$(z,{recursive:!0});let g=n(z,"mcp.json");if(U||!D$(g))L4(u,g)}}function WT($){let I=process.env.HOME||process.env.USERPROFILE||"",U=n(I,".gemini","antigravity","global_workflows"),_=n($,".agents","workflows");if(!D$(_))return;m$(U,{recursive:!0}),L4(_,U,{recursive:!0,force:!0})}function JS($,I){let U=n($,".claude","rules");if(!D$(U))return;let _=n(I,".claude","rules");m$(_,{recursive:!0}),L4(U,_,{recursive:!0,force:!0})}function NS($,I){if(!D$($))return;let U=n(I,".claude","agents");m$(U,{recursive:!0});for(let _ of o_($,{withFileTypes:!0})){if(!_.isFile()||!_.name.endsWith(".md"))continue;let u=_.name,z=XI(n($,u),"utf-8"),{frontmatter:g,body:v}=SG(z),J=g.name||u.replace(".md",""),N=vS[J]||{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:20},X={name:J,description:g.description,tools:N.tools,model:N.model,maxTurns:N.maxTurns};if(N.effort)X.effort=N.effort;if(g.skills)X.skills=g.skills;let G=v.replace("Follow the vendor-specific execution protocol:","Follow `.agents/skills/_shared/runtime/execution-protocols/claude.md`:"),q=`<!-- Generated by oh-my-agent CLI. Source: .agents/agents/${u} -->
262
+ ${G}`;n4(n(U,u),wG(X,q))}}function GS($,I){if(!D$($))return;for(let U of o_($,{withFileTypes:!0})){if(!U.isFile()||!U.name.endsWith(".md")||U.name.startsWith("_"))continue;let _=U.name,u=XI(n($,_),"utf-8"),{frontmatter:z}=SG(u),g=_.replace(".md",""),v=z.description||g,J=n(I,".claude","skills",g);n0(J);let N=wG({name:g,description:v,"disable-model-invocation":!0},`# /${g}
263
263
 
264
264
  Read and follow \`.agents/workflows/${_}\` step by step.
265
- `);h$(J,{recursive:!0}),n4(n(J,"SKILL.md"),N)}}function a_($,I){let U=n($,".claude","hooks");if(!D$(U))return;h$(I,{recursive:!0}),R4(U,I,{recursive:!0,force:!0})}function e_($,I,U){let _={};if(D$($))try{_=JSON.parse(GI($,"utf-8"))}catch{}if(_.hooks={..._.hooks||{},...I},U)Object.assign(_,U);n4($,`${JSON.stringify(_,null,2)}
266
- `)}function v1($,I,U){return`bun "$${$}/${I}/hooks/${U}"`}function NS($,I){a_($,n(I,".claude","hooks")),e_(n(I,".claude","settings.json"),{UserPromptSubmit:[{hooks:[{type:"command",command:v1("CLAUDE_PROJECT_DIR",".claude","keyword-detector.ts"),timeout:5}]}],Stop:[{hooks:[{type:"command",command:v1("CLAUDE_PROJECT_DIR",".claude","persistent-mode.ts"),timeout:5}]}]},{statusLine:{type:"command",command:v1("CLAUDE_PROJECT_DIR",".claude","hud.ts")},permissions:{allow:["Bash(bun run:*)","Bash(bunx tsx:*)","Bash(git add:*)","mcp__serena__*"]}})}function GS($,I){let U=n(I,".codex","hooks");a_($,U),e_(n(I,".codex","hooks.json"),{UserPromptSubmit:[{hooks:[{type:"command",command:"bun .codex/hooks/keyword-detector.ts",timeout:5}]}],Stop:[{hooks:[{type:"command",command:"bun .codex/hooks/persistent-mode.ts",timeout:5}]}]}),XS(n(I,".codex","config.toml"))}function XS($){h$(wG($),{recursive:!0});let I="";if(D$($))I=GI($,"utf-8");if(/codex_hooks\s*=\s*true/i.test(I))return;if(/codex_hooks\s*=\s*false/i.test(I)){I=I.replace(/codex_hooks\s*=\s*false/i,"codex_hooks = true"),n4($,I);return}if(/\[features\]/i.test(I)){I=I.replace(/(\[features\][^[]*)/i,`$1codex_hooks = true
265
+ `);m$(J,{recursive:!0}),n4(n(J,"SKILL.md"),N)}}function e_($,I){let U=n($,".claude","hooks");if(!D$(U))return;m$(I,{recursive:!0}),L4(U,I,{recursive:!0,force:!0})}function s_($,I,U){let _={};if(D$($))try{_=JSON.parse(XI($,"utf-8"))}catch{}if(_.hooks={..._.hooks||{},...I},U)Object.assign(_,U);n4($,`${JSON.stringify(_,null,2)}
266
+ `)}function J1($,I,U){return`bun "$${$}/${I}/hooks/${U}"`}function XS($,I){e_($,n(I,".claude","hooks")),s_(n(I,".claude","settings.json"),{UserPromptSubmit:[{hooks:[{type:"command",command:J1("CLAUDE_PROJECT_DIR",".claude","keyword-detector.ts"),timeout:5}]}],Stop:[{hooks:[{type:"command",command:J1("CLAUDE_PROJECT_DIR",".claude","persistent-mode.ts"),timeout:5}]}]},{statusLine:{type:"command",command:J1("CLAUDE_PROJECT_DIR",".claude","hud.ts")},permissions:{allow:["Bash(bun run:*)","Bash(bunx tsx:*)","Bash(git add:*)","mcp__serena__*"]}})}function qS($,I){let U=n(I,".codex","hooks");e_($,U),s_(n(I,".codex","hooks.json"),{UserPromptSubmit:[{hooks:[{type:"command",command:"bun .codex/hooks/keyword-detector.ts",timeout:5}]}],Stop:[{hooks:[{type:"command",command:"bun .codex/hooks/persistent-mode.ts",timeout:5}]}]}),QS(n(I,".codex","config.toml"))}function QS($){m$(CG($),{recursive:!0});let I="";if(D$($))I=XI($,"utf-8");if(/codex_hooks\s*=\s*true/i.test(I))return;if(/codex_hooks\s*=\s*false/i.test(I)){I=I.replace(/codex_hooks\s*=\s*false/i,"codex_hooks = true"),n4($,I);return}if(/\[features\]/i.test(I)){I=I.replace(/(\[features\][^[]*)/i,`$1codex_hooks = true
267
267
  `),n4($,I);return}let U=`
268
268
  [features]
269
269
  codex_hooks = true
270
- `;n4($,I.trimEnd()+U)}function qS($,I){let U=n(I,".gemini","hooks");a_($,U),e_(n(I,".gemini","settings.json"),{BeforeAgent:[{matcher:"*",hooks:[{type:"command",command:v1("GEMINI_PROJECT_DIR",".gemini","keyword-detector.ts"),timeout:5}]}],AfterAgent:[{matcher:"*",hooks:[{type:"command",command:v1("GEMINI_PROJECT_DIR",".gemini","persistent-mode.ts"),timeout:5}]}]})}function QS($,I){let U=n(I,".qwen","hooks");a_($,U),e_(n(I,".qwen","settings.json"),{UserPromptSubmit:[{hooks:[{type:"command",command:v1("QWEN_PROJECT_DIR",".qwen","keyword-detector.ts"),timeout:5}]}],Stop:[{hooks:[{type:"command",command:v1("QWEN_PROJECT_DIR",".qwen","persistent-mode.ts"),timeout:5}]}]})}function HS($){let I=n($,".claude","CLAUDE.md.template");if(!D$(I))return;let U=process.env.HOME||process.env.USERPROFILE||"",_=GI(I,"utf-8").trim(),u=n(U,".claude","CLAUDE.md");if(h$(wG(u),{recursive:!0}),D$(u)){let g=GI(u,"utf-8"),z=g.indexOf(TS),v=g.indexOf(VT);if(z!==-1&&v!==-1){let J=g.slice(0,z),N=g.slice(v+VT.length);n4(u,`${J}${_}${N}`)}else n4(u,`${g.trimEnd()}
270
+ `;n4($,I.trimEnd()+U)}function TS($,I){let U=n(I,".gemini","hooks");e_($,U),s_(n(I,".gemini","settings.json"),{BeforeAgent:[{matcher:"*",hooks:[{type:"command",command:J1("GEMINI_PROJECT_DIR",".gemini","keyword-detector.ts"),timeout:5}]}],AfterAgent:[{matcher:"*",hooks:[{type:"command",command:J1("GEMINI_PROJECT_DIR",".gemini","persistent-mode.ts"),timeout:5}]}]})}function HS($,I){let U=n(I,".qwen","hooks");e_($,U),s_(n(I,".qwen","settings.json"),{UserPromptSubmit:[{hooks:[{type:"command",command:J1("QWEN_PROJECT_DIR",".qwen","keyword-detector.ts"),timeout:5}]}],Stop:[{hooks:[{type:"command",command:J1("QWEN_PROJECT_DIR",".qwen","persistent-mode.ts"),timeout:5}]}]})}function OS($){let I=n($,".claude","CLAUDE.md.template");if(!D$(I))return;let U=process.env.HOME||process.env.USERPROFILE||"",_=XI(I,"utf-8").trim(),u=n(U,".claude","CLAUDE.md");if(m$(CG(u),{recursive:!0}),D$(u)){let z=XI(u,"utf-8"),g=z.indexOf(YS),v=z.indexOf(VT);if(g!==-1&&v!==-1){let J=z.slice(0,g),N=z.slice(v+VT.length);n4(u,`${J}${_}${N}`)}else n4(u,`${z.trimEnd()}
271
271
 
272
272
  ${_}
273
273
  `)}else n4(u,`${_}
274
- `)}function s_($,I,U){let _=n($,".agents","agents"),u=n($,".agents","workflows");for(let g of U)switch(g){case"claude":vS(_,I),JS(u,I),zS($,I),NS($,I),HS($);break;case"codex":GS($,I);break;case"gemini":qS($,I);break;case"qwen":QS($,I);break}}function XI(){return[...O4.domain,...O4.design,...O4.coordination,...O4.utility,...O4.infrastructure]}function $2($,I,U){let _=[],u=[],g=SG($,W4);for(let z of I){let v=PT[z],J=n($,v);if(!D$(J))h$(J,{recursive:!0});for(let N of U){let X=n(g,N),G=n(J,N);if(!D$(X)){u.push(`${v}/${N} (source missing)`);continue}try{if(BT(G).isSymbolicLink()){if(SG(wG(G),IS(G))===SG(X)){u.push(`${v}/${N} (already linked)`);continue}DT(G)}else{u.push(`${v}/${N} (real dir exists)`);continue}}catch(T){}let q=_S(J,X);US(q,G,"dir"),_.push(`${v}/${N}`)}}return{created:_,skipped:u}}function ZT($){let I=n($,W4);if(!D$(I))return[];return p_(I,{withFileTypes:!0}).filter((U)=>U.isDirectory()&&!U.name.startsWith("_")).map((U)=>U.name)}function AT($){let I=[];for(let[U,_]of Object.entries(PT))if(D$(n($,_)))I.push(U);return I}var R$="first-fluke/oh-my-agent",W4=".agents/skills",O4,MT,gS,TS="<!-- OMA:START",VT="<!-- OMA:END -->",PT;var s4=U4(()=>{OT();O4={domain:[{name:"oma-frontend",desc:"React/Next.js UI specialist"},{name:"oma-backend",desc:"Backend API specialist (multi-language)"},{name:"oma-db",desc:"SQL/NoSQL data modeling, normalization, integrity, and capacity specialist"},{name:"oma-mobile",desc:"Flutter/Dart mobile specialist"}],design:[{name:"oma-design",desc:"Design system, DESIGN.md, accessibility, anti-pattern enforcement"}],coordination:[{name:"oma-brainstorm",desc:"Design-first ideation before planning"},{name:"oma-pm",desc:"Product manager - task decomposition"},{name:"oma-qa",desc:"QA - OWASP, Lighthouse, WCAG"},{name:"oma-coordination",desc:"Manual multi-agent orchestration"},{name:"oma-orchestrator",desc:"Automated parallel CLI execution"}],utility:[{name:"oma-debug",desc:"Bug fixing specialist"},{name:"oma-commit",desc:"Conventional Commits helper"},{name:"oma-translator",desc:"Context-aware multilingual translation"}],infrastructure:[{name:"oma-tf-infra",desc:"Multi-cloud infrastructure with Terraform - AWS, GCP, Azure, OCI support"},{name:"oma-dev-workflow",desc:"Monorepo developer workflows - mise tasks, git hooks, CI/CD, release automation"}]},MT={fullstack:["oma-brainstorm","oma-design","oma-frontend","oma-backend","oma-db","oma-pm","oma-qa","oma-debug","oma-commit","oma-tf-infra","oma-dev-workflow"],frontend:["oma-brainstorm","oma-design","oma-frontend","oma-pm","oma-qa","oma-debug","oma-commit"],backend:["oma-brainstorm","oma-backend","oma-db","oma-pm","oma-qa","oma-debug","oma-commit","oma-dev-workflow"],mobile:["oma-brainstorm","oma-mobile","oma-pm","oma-qa","oma-debug","oma-commit"],devops:["oma-brainstorm","oma-tf-infra","oma-dev-workflow","oma-pm","oma-qa","oma-debug","oma-commit"],all:[...O4.domain,...O4.design,...O4.coordination,...O4.utility,...O4.infrastructure].map(($)=>$.name)};gS={"backend-engineer":{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:20},"frontend-engineer":{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:20},"db-engineer":{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:15},"debug-investigator":{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:15},"mobile-engineer":{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:20},"pm-planner":{tools:"Read, Write, Grep, Glob, Bash",model:"sonnet",maxTurns:10},"qa-reviewer":{tools:"Read, Grep, Glob, Bash",model:"sonnet",maxTurns:15,effort:"low"}};PT={claude:".claude/skills",copilot:".github/skills"}});import{execSync as EG}from"node:child_process";function J1(){try{return EG("gh --version",{stdio:"ignore"}),!0}catch{return!1}}function r4(){try{return EG("gh auth status",{stdio:"ignore"}),!0}catch{return!1}}function N1(){try{return EG(`gh api user/starred/${R$}`,{stdio:"ignore"}),!0}catch{return!1}}function bT(){return J1()&&r4()&&N1()}var qI=U4(()=>{s4()});import{execSync as SS}from"node:child_process";import{existsSync as y$,readFileSync as TI,rmSync as q1,writeFileSync as hG}from"node:fs";import{join as c$}from"node:path";function wS($){let I=process.env.HOME||process.env.USERPROFILE||"",U=[],_=c$($,".omc"),u=c$(I,".claude","CLAUDE.md"),g=y$(_);if(!g&&y$(u))try{g=TI(u,"utf-8").includes("OMC:START")}catch{}if(g)U.push({name:"omc",displayName:"oh-my-claudecode",uninstall:()=>{let N=c$(I,".claude");for(let q of["architect","document-specialist","explore","designer","writer","vision","critic","analyst","executor","planner"]){let T=c$(N,"agents",`${q}.md`);if(y$(T))q1(T,{force:!0})}for(let q of["coordinator","omc","ultrawork","deepsearch","analyze","plan","review","planner","orchestrator","update"]){let T=c$(N,"commands",`${q}.md`);if(y$(T))q1(T,{force:!0})}for(let q of["ultrawork","git-master","frontend-ui-ux"]){let T=c$(N,"skills",q);if(!y$(T))continue;let H=c$(T,"SKILL.md");if(y$(H))try{if(TI(H,"utf-8").includes(".agents/workflows/"))continue}catch{continue}q1(T,{recursive:!0,force:!0})}for(let q of["keyword-detector.sh","silent-auto-update.sh","stop-continuation.sh"]){let T=c$(N,"hooks",q);if(y$(T))q1(T,{force:!0})}for(let q of[".omc-version.json",".omc-silent-update.json",".omc-update.log",".omc-config.json"]){let T=c$(N,q);if(y$(T))q1(T,{force:!0})}if(y$(_))q1(_,{recursive:!0,force:!0});let X=c$(N,"settings.json");if(y$(X))try{let q=JSON.parse(TI(X,"utf-8"));if(q.hooks){for(let T of Object.keys(q.hooks)){if(!Array.isArray(q.hooks[T]))continue;if(q.hooks[T]=q.hooks[T].map((H)=>{if(Array.isArray(H.hooks))H.hooks=H.hooks.filter((Q)=>!Q.command||!(Q.command.includes("keyword-detector.sh")||Q.command.includes("silent-auto-update.sh")||Q.command.includes("stop-continuation.sh")));return H}).filter((H)=>!H.hooks||H.hooks.length>0),q.hooks[T].length===0)delete q.hooks[T]}if(Object.keys(q.hooks).length===0)delete q.hooks;hG(X,`${JSON.stringify(q,null,2)}
275
- `)}}catch{}let G=c$(N,"CLAUDE.md");if(y$(G))try{let q=TI(G,"utf-8");if(q.includes("OMC:START")){let T=q.replace(/<!-- OMC:START[\s\S]*?OMC:END -->\n?/g,"");hG(G,T)}}catch{}}});for(let N of["opencode.json","opencode.jsonc"]){let X=c$(I,".config","opencode",N);if(!y$(X))continue;try{let q=TI(X,"utf-8").replace(/\/\/.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"").replace(/,\s*([\]}])/g,"$1"),T=JSON.parse(q);if(Array.isArray(T.plugin)&&T.plugin.includes("oh-my-opencode")){U.push({name:"omo",displayName:"oh-my-opencode",uninstall:()=>{let Q=TI(X,"utf-8").replace(/\/\/.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"").replace(/,\s*([\]}])/g,"$1"),Y=JSON.parse(Q);Y.plugin=Y.plugin.filter((K)=>K!=="oh-my-opencode"),hG(X,JSON.stringify(Y,null,2))}});break}}catch{}}let z=c$(I,".agents","skills","superpowers"),v=c$(I,".codex","superpowers");if(y$(z)||y$(v))U.push({name:"superpowers",displayName:"superpowers",uninstall:()=>{for(let N of[z,v])if(y$(N))q1(N,{recursive:!0,force:!0})}});let J=c$($,".omx");if(y$(J))U.push({name:"omx",displayName:"oh-my-codex",uninstall:()=>{SS("npx -y oh-my-codex@latest uninstall --yes",{stdio:"pipe",timeout:60000})}});return U}async function _2($){let I=wS($);if(I.length===0)return[];let U=I.map((z)=>z.name),_=await O$({message:`${U2.default.yellow(U.join(", "))} detected. Remove all?`,initialValue:!0});if(e(_)||!_)return[];let u=[],g=I4();g.start("Removing competing tools...");for(let z of I)try{z.uninstall(),u.push(`${z.displayName} removed`)}catch(v){let J=v instanceof Error?v.message:String(v);u.push(`${z.displayName} removal failed: ${J}`)}return g.stop(u.map((z)=>z.includes("failed")?`${U2.default.red("✗")} ${z}`:`${U2.default.green("✓")} ${z}`).join(`
276
- `)),u}var U2;var cG=U4(()=>{u4();U2=q$(b$(),1)});import{existsSync as A$,lstatSync as nT,mkdirSync as rT,readdirSync as g2,readFileSync as lT,renameSync as i0,rmSync as HI,unlinkSync as mT,writeFileSync as ES}from"node:fs";import{dirname as hT,join as C$}from"node:path";function z2($){let I=[],U=C$($,".agent"),_=C$($,".agents");if(A$(U)&&!A$(_))i0(U,_),I.push(".agent/ → .agents/ (renamed)");else if(A$(U)&&A$(_))try{let J=g2(U);for(let N of J){let X=C$(U,N),G=C$(_,N);if(!A$(G))i0(X,G),I.push(`.agent/${N} → .agents/${N} (merged)`)}HI(U,{recursive:!0,force:!0}),I.push(".agent/ (removed after merge)")}catch{}for(let J of[".cursor/skills"]){let N=C$($,J);if(!A$(N))continue;try{if(nT(N).isSymbolicLink())mT(N),I.push(`${J} (removed symlink)`);else{let G=g2(N),q=0;for(let H of G){let Q=C$(N,H);if(nT(Q).isSymbolicLink())mT(Q),q++}if(g2(N).length===0)HI(N,{recursive:!0}),I.push(`${J} (removed ${q} symlinks, cleaned dir)`);else if(q>0)I.push(`${J} (removed ${q} symlinks)`)}}catch{}}let u={"backend-agent":"oma-backend","db-agent":"oma-db","debug-agent":"oma-debug","frontend-agent":"oma-frontend","mobile-agent":"oma-mobile","pm-agent":"oma-pm","qa-agent":"oma-qa","tf-infra-agent":"oma-tf-infra",brainstorm:"oma-brainstorm",commit:"oma-commit",orchestrator:"oma-orchestrator","dev-workflow":"oma-dev-workflow",translator:"oma-translator","workflow-guide":"oma-coordination"},g=C$($,".agents","skills");if(A$(g))for(let[J,N]of Object.entries(u)){let X=C$(g,J),G=C$(g,N);if(A$(X)&&!A$(G))i0(X,G),I.push(`skills/${J} → skills/${N}`);else if(A$(X)&&A$(G))HI(X,{recursive:!0}),I.push(`skills/${J} (removed, replaced by ${N})`)}let z={"backend-impl.md":"backend-engineer.md","db-impl.md":"db-engineer.md","frontend-impl.md":"frontend-engineer.md","mobile-impl.md":"mobile-engineer.md"},v=C$($,".claude","agents");if(A$(v))for(let[J,N]of Object.entries(z)){let X=C$(v,J),G=C$(v,N);if(A$(X)&&!A$(G))i0(X,G),I.push(`agents/${J} → agents/${N}`);else if(A$(X)&&A$(G))HI(X),I.push(`agents/${J} (removed, replaced by ${N})`)}return I}function xS($,I){let U=I.replace(/^\.agents\//,"");return C$($,".agents",".migration-backup","shared-layout-v2",U)}function kS($){return C$(".agents",".migration-backup","shared-layout-v2",$.replace(/^\.agents\//,""))}function n0($){let I=[];for(let U of CS){let _=C$($,U.from),u=C$($,U.to);if(!A$(_))continue;if(!A$(u)){rT(hT(u),{recursive:!0}),i0(_,u),I.push(`${U.from} → ${U.to}`);continue}let g=lT(_,"utf-8"),z=lT(u,"utf-8");if(g!==z){let v=xS($,U.from),J=kS(U.from);rT(hT(v),{recursive:!0}),ES(v,g,"utf-8"),I.push(`${U.from} → ${J} (backup)`)}HI(_,{force:!0}),I.push(`${U.from} (removed legacy path)`)}for(let U of fS){let _=C$($,U);if(!A$(_))continue;try{if(g2(_).length===0)HI(_,{recursive:!0,force:!0}),I.push(`${U} (removed empty dir)`)}catch{}}return I}var CS,fS;var dG=U4(()=>{CS=[{from:".agents/skills/_shared/api-contracts/README.md",to:".agents/skills/_shared/core/api-contracts/README.md"},{from:".agents/skills/_shared/api-contracts/template.md",to:".agents/skills/_shared/core/api-contracts/template.md"},{from:".agents/skills/_shared/clarification-protocol.md",to:".agents/skills/_shared/core/clarification-protocol.md"},{from:".agents/skills/_shared/common-checklist.md",to:".agents/skills/_shared/core/common-checklist.md"},{from:".agents/skills/_shared/context-budget.md",to:".agents/skills/_shared/core/context-budget.md"},{from:".agents/skills/_shared/context-loading.md",to:".agents/skills/_shared/core/context-loading.md"},{from:".agents/skills/_shared/difficulty-guide.md",to:".agents/skills/_shared/core/difficulty-guide.md"},{from:".agents/skills/_shared/lessons-learned.md",to:".agents/skills/_shared/core/lessons-learned.md"},{from:".agents/skills/_shared/prompt-structure.md",to:".agents/skills/_shared/core/prompt-structure.md"},{from:".agents/skills/_shared/quality-principles.md",to:".agents/skills/_shared/core/quality-principles.md"},{from:".agents/skills/_shared/reasoning-templates.md",to:".agents/skills/_shared/core/reasoning-templates.md"},{from:".agents/skills/_shared/session-metrics.md",to:".agents/skills/_shared/core/session-metrics.md"},{from:".agents/skills/_shared/skill-routing.md",to:".agents/skills/_shared/core/skill-routing.md"},{from:".agents/skills/_shared/experiment-ledger.md",to:".agents/skills/_shared/conditional/experiment-ledger.md"},{from:".agents/skills/_shared/exploration-loop.md",to:".agents/skills/_shared/conditional/exploration-loop.md"},{from:".agents/skills/_shared/quality-score.md",to:".agents/skills/_shared/conditional/quality-score.md"},{from:".agents/skills/_shared/memory-protocol.md",to:".agents/skills/_shared/runtime/memory-protocol.md"},{from:".agents/skills/_shared/execution-protocols/claude.md",to:".agents/skills/_shared/runtime/execution-protocols/claude.md"},{from:".agents/skills/_shared/execution-protocols/codex.md",to:".agents/skills/_shared/runtime/execution-protocols/codex.md"},{from:".agents/skills/_shared/execution-protocols/gemini.md",to:".agents/skills/_shared/runtime/execution-protocols/gemini.md"},{from:".agents/skills/_shared/execution-protocols/qwen.md",to:".agents/skills/_shared/runtime/execution-protocols/qwen.md"},{from:".agents/skills/_shared/multi-review-protocol.md",to:".agents/workflows/ultrawork/resources/multi-review-protocol.md"},{from:".agents/skills/_shared/phase-gates.md",to:".agents/workflows/ultrawork/resources/phase-gates.md"}],fS=[".agents/skills/_shared/api-contracts",".agents/skills/_shared/execution-protocols"]});import{execSync as yS}from"node:child_process";import{mkdtempSync as iS,rmSync as pG,writeFileSync as nS}from"node:fs";import{tmpdir as rS}from"node:os";import{join as cT}from"node:path";async function v2(){let $=iS(cT(rS(),"oh-my-agent-"));try{let I=`https://api.github.com/repos/${R$}/tarball/main`,U=await fetch(I,{headers:{"User-Agent":"oh-my-agent-cli"}});if(!U.ok)throw Error(`HTTP ${U.status}`);let _=cT($,"repo.tar.gz");nS(_,Buffer.from(await U.arrayBuffer())),yS(`tar -xzf "${_}" -C "${$}" --strip-components=1`,{stdio:"pipe",timeout:30000}),pG(_)}catch(I){throw pG($,{recursive:!0,force:!0}),Error(`Failed to download repository archive: ${I instanceof Error?I.message:I}`)}return{dir:$,cleanup:()=>pG($,{recursive:!0,force:!0})}}var oG=U4(()=>{s4()});var dT={};B4(dT,{install:()=>N2});import{execSync as j6}from"node:child_process";import{existsSync as J2,readFileSync as tG,writeFileSync as aG}from"node:fs";import{join as r0}from"node:path";async function N2(){console.clear(),V$(M$.default.bgMagenta(M$.default.white(" \uD83D\uDEF8 oh-my-agent ")));let $=z2(process.cwd());if($.length>0)k($.map((J)=>`${M$.default.green("✓")} ${J}`).join(`
277
- `),"Migration");await _2(process.cwd());let I=await z1({message:"What type of project?",options:[{value:"all",label:"✨ All",hint:"Install everything"},{value:"fullstack",label:"\uD83C\uDF10 Fullstack",hint:"Frontend + Backend + PM + QA"},{value:"frontend",label:"\uD83C\uDFA8 Frontend",hint:"React/Next.js"},{value:"backend",label:"⚙️ Backend",hint:"Python, Node.js, Rust, ..."},{value:"mobile",label:"\uD83D\uDCF1 Mobile",hint:"Flutter/Dart"},{value:"devops",label:"\uD83D\uDE80 DevOps",hint:"Terraform + CI/CD + Workflows"},{value:"custom",label:"\uD83D\uDD27 Custom",hint:"Choose skills"}]});if(e(I))z4("Cancelled."),process.exit(0);let U;if(I==="custom"){let J=XI(),N=await c_({message:"Select skills:",options:J.map((X)=>({value:X.name,label:X.name,hint:X.desc})),required:!0});if(e(N))z4("Cancelled."),process.exit(0);U=N}else U=MT[I]??[];let _=process.cwd(),u={};if(U.includes("oma-backend")){let J=await z1({message:"Backend language?",options:[{value:"python",label:"\uD83D\uDC0D Python",hint:"FastAPI/SQLAlchemy (default)"},{value:"node",label:"\uD83D\uDFE2 Node.js",hint:"NestJS/Hono + Prisma/Drizzle"},{value:"rust",label:"\uD83E\uDD80 Rust",hint:"Axum/Actix-web"},{value:"other",label:"\uD83D\uDD27 Other / Auto-detect",hint:"Configure later with /stack-set"}],initialValue:"python"});if(e(J))z4("Cancelled."),process.exit(0);if(J!=="other")u["oma-backend"]=J}let g=["claude"];if(J2(r0(_,".github")))g.push("copilot");else{let J=await O$({message:"Also create symlinks for GitHub Copilot? (.github/skills/)",initialValue:!1});if(!e(J)&&J)g.push("copilot")}let v=I4();v.start("Downloading...");try{let{dir:J,cleanup:N}=await v2();try{v.message("Installing skills..."),t_(J,_),KT(J,_),LT(J,_),RT(J,_),WT(J);for(let B of U)v.message(`Installing ${M$.default.cyan(B)}...`),o_(J,B,_,u[B]);v.stop("Skills installed!"),v.start("Installing vendor adaptations..."),s_(J,_,["claude","codex","gemini","qwen"]),v.stop("Vendor adaptations installed!");let O=n0(_);if(O.length>0)k(O.map((B)=>`${M$.default.green("✓")} ${B}`).join(`
278
- `),"Shared layout migration")}finally{N()}let X=$2(_,g,U);k([...U.map((O)=>`${M$.default.green("✓")} ${O}`),"",M$.default.dim(`Location: ${r0(_,W4)}`),...X.created.length>0?["",M$.default.cyan("Symlinks:"),...X.created.map((O)=>`${M$.default.green("→")} ${O}`)]:[],...X.skipped.length>0?["",M$.default.dim("Skipped:"),...X.skipped.map((O)=>M$.default.dim(` ${O}`))]:[]].join(`
279
- `),"Installed");try{if(j6("git config --get rerere.enabled",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim()==="true")o.success(M$.default.green("git rerere is already enabled."))}catch{let O=await O$({message:"Enable git rerere? (Recommended for multi-agent merge conflict reuse)",initialValue:!0});if(!e(O)&&O)try{j6("git config --global rerere.enabled true"),o.success(M$.default.green("git rerere enabled globally!"))}catch(B){o.error(`Failed to enable git rerere: ${B}`)}}let G=process.env.HOME||process.env.USERPROFILE||"",q=!1;try{j6("claude --version",{stdio:"ignore"}),q=!0}catch{}let T=r0(G,".claude","settings.json");if(q)try{let O={};if(J2(T))O=JSON.parse(tG(T,"utf-8"));if((O.env?.cleanupPeriodDays??0)<180||(O.env?.CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS??0)<1e5||(O.env?.CLAUDE_AUTOCOMPACT_PCT_OVERRIDE??0)<80||!O.attribution?.commit||!O.attribution?.pr||O.env?.DISABLE_TELEMETRY!=="1"||O.env?.DISABLE_ERROR_REPORTING!=="1"||O.env?.CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY!=="1"){let R=await O$({message:"Apply recommended Claude Code settings?",initialValue:!0});if(!e(R)&&R)O.env={...O.env||{},cleanupPeriodDays:180,CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS:1e5,CLAUDE_AUTOCOMPACT_PCT_OVERRIDE:80,DISABLE_TELEMETRY:"1",DISABLE_ERROR_REPORTING:"1",CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY:"1"},O.attribution={commit:`Generated with oh-my-agent
274
+ `)}function $2($,I,U){let _=n($,".agents","agents"),u=n($,".agents","workflows");for(let z of U)switch(z){case"claude":NS(_,I),GS(u,I),JS($,I),XS($,I),OS($);break;case"codex":qS($,I);break;case"gemini":TS($,I);break;case"qwen":HS($,I);break}}function qI(){return[...O4.domain,...O4.design,...O4.coordination,...O4.utility,...O4.infrastructure]}function I2($,I,U){let _=[],u=[],z=EG($,W4);for(let g of I){let v=PT[g],J=n($,v);if(!D$(J))m$(J,{recursive:!0});for(let N of U){let X=n(z,N),G=n(J,N);if(!D$(X)){u.push(`${v}/${N} (source missing)`);continue}try{if(BT(G).isSymbolicLink()){if(EG(CG(G),US(G))===EG(X)){u.push(`${v}/${N} (already linked)`);continue}DT(G)}else{u.push(`${v}/${N} (real dir exists)`);continue}}catch(T){}let q=gS(J,X);zS(q,G,"dir"),_.push(`${v}/${N}`)}}return{created:_,skipped:u}}function ZT($){let I=n($,W4);if(!D$(I))return[];return o_(I,{withFileTypes:!0}).filter((U)=>U.isDirectory()&&!U.name.startsWith("_")).map((U)=>U.name)}function AT($){let I=[];for(let[U,_]of Object.entries(PT))if(D$(n($,_)))I.push(U);return I}var L$="first-fluke/oh-my-agent",W4=".agents/skills",O4,MT,vS,YS="<!-- OMA:START",VT="<!-- OMA:END -->",PT;var s4=_4(()=>{OT();O4={domain:[{name:"oma-frontend",desc:"React/Next.js UI specialist"},{name:"oma-backend",desc:"Backend API specialist (multi-language)"},{name:"oma-db",desc:"SQL/NoSQL data modeling, normalization, integrity, and capacity specialist"},{name:"oma-mobile",desc:"Flutter/Dart mobile specialist"}],design:[{name:"oma-design",desc:"Design system, DESIGN.md, accessibility, anti-pattern enforcement"}],coordination:[{name:"oma-brainstorm",desc:"Design-first ideation before planning"},{name:"oma-pm",desc:"Product manager - task decomposition"},{name:"oma-qa",desc:"QA - OWASP, Lighthouse, WCAG"},{name:"oma-coordination",desc:"Manual multi-agent orchestration"},{name:"oma-orchestrator",desc:"Automated parallel CLI execution"}],utility:[{name:"oma-debug",desc:"Bug fixing specialist"},{name:"oma-commit",desc:"Conventional Commits helper"},{name:"oma-translator",desc:"Context-aware multilingual translation"}],infrastructure:[{name:"oma-tf-infra",desc:"Multi-cloud infrastructure with Terraform - AWS, GCP, Azure, OCI support"},{name:"oma-dev-workflow",desc:"Monorepo developer workflows - mise tasks, git hooks, CI/CD, release automation"}]},MT={fullstack:["oma-brainstorm","oma-design","oma-frontend","oma-backend","oma-db","oma-pm","oma-qa","oma-debug","oma-commit","oma-tf-infra","oma-dev-workflow"],frontend:["oma-brainstorm","oma-design","oma-frontend","oma-pm","oma-qa","oma-debug","oma-commit"],backend:["oma-brainstorm","oma-backend","oma-db","oma-pm","oma-qa","oma-debug","oma-commit","oma-dev-workflow"],mobile:["oma-brainstorm","oma-mobile","oma-pm","oma-qa","oma-debug","oma-commit"],devops:["oma-brainstorm","oma-tf-infra","oma-dev-workflow","oma-pm","oma-qa","oma-debug","oma-commit"],all:[...O4.domain,...O4.design,...O4.coordination,...O4.utility,...O4.infrastructure].map(($)=>$.name)};vS={"backend-engineer":{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:20},"frontend-engineer":{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:20},"db-engineer":{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:15},"debug-investigator":{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:15},"mobile-engineer":{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:20},"pm-planner":{tools:"Read, Write, Grep, Glob, Bash",model:"sonnet",maxTurns:10},"qa-reviewer":{tools:"Read, Grep, Glob, Bash",model:"sonnet",maxTurns:15,effort:"low"}};PT={claude:".claude/skills",copilot:".github/skills"}});import{execSync as fG}from"node:child_process";function N1(){try{return fG("gh --version",{stdio:"ignore"}),!0}catch{return!1}}function r4(){try{return fG("gh auth status",{stdio:"ignore"}),!0}catch{return!1}}function G1(){try{return fG(`gh api user/starred/${L$}`,{stdio:"ignore"}),!0}catch{return!1}}function bT(){return N1()&&r4()&&G1()}var QI=_4(()=>{s4()});import{execSync as nT}from"node:child_process";import{existsSync as h$,readFileSync as HI,rmSync as F6,writeFileSync as dG}from"node:fs";import{join as c$}from"node:path";function ES($){for(let I of[".omc",".omx"]){let U=c$($,I);if(h$(U))F6(U,{recursive:!0,force:!0})}}function CS($){let I=process.env.HOME||process.env.USERPROFILE||"",U=[],_=c$(I,".claude","CLAUDE.md"),u=!1;if(h$(_))try{u=HI(_,"utf-8").includes("OMC:START")}catch{}if(u)U.push({name:"omc",displayName:"oh-my-claudecode",uninstall:()=>{let v=c$(I,".claude");for(let G of["architect","document-specialist","explore","designer","writer","vision","critic","analyst","executor","planner"]){let q=c$(v,"agents",`${G}.md`);if(h$(q))F6(q,{force:!0})}for(let G of["coordinator","omc","ultrawork","deepsearch","analyze","plan","review","planner","orchestrator","update"]){let q=c$(v,"commands",`${G}.md`);if(h$(q))F6(q,{force:!0})}for(let G of["ultrawork","git-master","frontend-ui-ux"]){let q=c$(v,"skills",G);if(!h$(q))continue;let T=c$(q,"SKILL.md");if(h$(T))try{if(HI(T,"utf-8").includes(".agents/workflows/"))continue}catch{continue}F6(q,{recursive:!0,force:!0})}for(let G of["keyword-detector.sh","silent-auto-update.sh","stop-continuation.sh"]){let q=c$(v,"hooks",G);if(h$(q))F6(q,{force:!0})}for(let G of[".omc-version.json",".omc-silent-update.json",".omc-update.log",".omc-config.json"]){let q=c$(v,G);if(h$(q))F6(q,{force:!0})}let J=c$($,".omc");if(h$(J))F6(J,{recursive:!0,force:!0});let N=c$(v,"settings.json");if(h$(N))try{let G=JSON.parse(HI(N,"utf-8"));if(G.hooks){for(let q of Object.keys(G.hooks)){if(!Array.isArray(G.hooks[q]))continue;if(G.hooks[q]=G.hooks[q].map((T)=>{if(Array.isArray(T.hooks))T.hooks=T.hooks.filter((H)=>!H.command||!(H.command.includes("keyword-detector.sh")||H.command.includes("silent-auto-update.sh")||H.command.includes("stop-continuation.sh")));return T}).filter((T)=>!T.hooks||T.hooks.length>0),G.hooks[q].length===0)delete G.hooks[q]}if(Object.keys(G.hooks).length===0)delete G.hooks;dG(N,`${JSON.stringify(G,null,2)}
275
+ `)}}catch{}let X=c$(v,"CLAUDE.md");if(h$(X))try{let G=HI(X,"utf-8");if(G.includes("OMC:START")){let q=G.replace(/<!-- OMC:START[\s\S]*?OMC:END -->\n?/g,"");dG(X,q)}}catch{}}});for(let v of["opencode.json","opencode.jsonc"]){let J=c$(I,".config","opencode",v);if(!h$(J))continue;try{let X=HI(J,"utf-8").replace(/\/\/.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"").replace(/,\s*([\]}])/g,"$1"),G=JSON.parse(X);if(Array.isArray(G.plugin)&&G.plugin.includes("oh-my-opencode")){U.push({name:"omo",displayName:"oh-my-opencode",uninstall:()=>{let T=HI(J,"utf-8").replace(/\/\/.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"").replace(/,\s*([\]}])/g,"$1"),H=JSON.parse(T);H.plugin=H.plugin.filter((Q)=>Q!=="oh-my-opencode"),dG(J,JSON.stringify(H,null,2))}});break}}catch{}}let z=c$(I,".agents","skills","superpowers"),g=c$(I,".codex","superpowers");if(h$(z)||h$(g))U.push({name:"superpowers",displayName:"superpowers",uninstall:()=>{for(let v of[z,g])if(h$(v))F6(v,{recursive:!0,force:!0})}});try{nT("npm ls -g oh-my-codex",{stdio:"pipe",timeout:1e4}),U.push({name:"omx",displayName:"oh-my-codex",uninstall:()=>{nT("npx -y oh-my-codex@latest uninstall --yes",{stdio:"pipe",timeout:60000})}})}catch{}return U}async function z2($){ES($);let I=CS($);if(I.length===0)return[];let U=I.map((g)=>g.name),_=await O$({message:`${_2.default.yellow(U.join(", "))} detected. Remove all?`,initialValue:!0});if(e(_)||!_)return[];let u=[],z=u4();z.start("Removing competing tools...");for(let g of I)try{g.uninstall(),u.push(`${g.displayName} removed`)}catch(v){let J=v instanceof Error?v.message:String(v);u.push(`${g.displayName} removal failed: ${J}`)}return z.stop(u.map((g)=>g.includes("failed")?`${_2.default.red("✗")} ${g}`:`${_2.default.green("✓")} ${g}`).join(`
276
+ `)),u}var _2;var pG=_4(()=>{U4();_2=q$(b$(),1)});import{existsSync as A$,lstatSync as rT,mkdirSync as lT,readdirSync as g2,readFileSync as mT,renameSync as r0,rmSync as YI,unlinkSync as hT,writeFileSync as fS}from"node:fs";import{dirname as cT,join as C$}from"node:path";function v2($){let I=[],U=C$($,".agent"),_=C$($,".agents");if(A$(U)&&!A$(_))r0(U,_),I.push(".agent/ → .agents/ (renamed)");else if(A$(U)&&A$(_))try{let J=g2(U);for(let N of J){let X=C$(U,N),G=C$(_,N);if(!A$(G))r0(X,G),I.push(`.agent/${N} → .agents/${N} (merged)`)}YI(U,{recursive:!0,force:!0}),I.push(".agent/ (removed after merge)")}catch{}for(let J of[".cursor/skills"]){let N=C$($,J);if(!A$(N))continue;try{if(rT(N).isSymbolicLink())hT(N),I.push(`${J} (removed symlink)`);else{let G=g2(N),q=0;for(let H of G){let Q=C$(N,H);if(rT(Q).isSymbolicLink())hT(Q),q++}if(g2(N).length===0)YI(N,{recursive:!0}),I.push(`${J} (removed ${q} symlinks, cleaned dir)`);else if(q>0)I.push(`${J} (removed ${q} symlinks)`)}}catch{}}let u={"backend-agent":"oma-backend","db-agent":"oma-db","debug-agent":"oma-debug","frontend-agent":"oma-frontend","mobile-agent":"oma-mobile","pm-agent":"oma-pm","qa-agent":"oma-qa","tf-infra-agent":"oma-tf-infra",brainstorm:"oma-brainstorm",commit:"oma-commit",orchestrator:"oma-orchestrator","dev-workflow":"oma-dev-workflow",translator:"oma-translator","workflow-guide":"oma-coordination"},z=C$($,".agents","skills");if(A$(z))for(let[J,N]of Object.entries(u)){let X=C$(z,J),G=C$(z,N);if(A$(X)&&!A$(G))r0(X,G),I.push(`skills/${J} → skills/${N}`);else if(A$(X)&&A$(G))YI(X,{recursive:!0}),I.push(`skills/${J} (removed, replaced by ${N})`)}let g={"backend-impl.md":"backend-engineer.md","db-impl.md":"db-engineer.md","frontend-impl.md":"frontend-engineer.md","mobile-impl.md":"mobile-engineer.md"},v=C$($,".claude","agents");if(A$(v))for(let[J,N]of Object.entries(g)){let X=C$(v,J),G=C$(v,N);if(A$(X)&&!A$(G))r0(X,G),I.push(`agents/${J} → agents/${N}`);else if(A$(X)&&A$(G))YI(X),I.push(`agents/${J} (removed, replaced by ${N})`)}return I}function yS($,I){let U=I.replace(/^\.agents\//,"");return C$($,".agents",".migration-backup","shared-layout-v2",U)}function iS($){return C$(".agents",".migration-backup","shared-layout-v2",$.replace(/^\.agents\//,""))}function l0($){let I=[];for(let U of xS){let _=C$($,U.from),u=C$($,U.to);if(!A$(_))continue;if(!A$(u)){lT(cT(u),{recursive:!0}),r0(_,u),I.push(`${U.from} → ${U.to}`);continue}let z=mT(_,"utf-8"),g=mT(u,"utf-8");if(z!==g){let v=yS($,U.from),J=iS(U.from);lT(cT(v),{recursive:!0}),fS(v,z,"utf-8"),I.push(`${U.from} → ${J} (backup)`)}YI(_,{force:!0}),I.push(`${U.from} (removed legacy path)`)}for(let U of kS){let _=C$($,U);if(!A$(_))continue;try{if(g2(_).length===0)YI(_,{recursive:!0,force:!0}),I.push(`${U} (removed empty dir)`)}catch{}}return I}var xS,kS;var oG=_4(()=>{xS=[{from:".agents/skills/_shared/api-contracts/README.md",to:".agents/skills/_shared/core/api-contracts/README.md"},{from:".agents/skills/_shared/api-contracts/template.md",to:".agents/skills/_shared/core/api-contracts/template.md"},{from:".agents/skills/_shared/clarification-protocol.md",to:".agents/skills/_shared/core/clarification-protocol.md"},{from:".agents/skills/_shared/common-checklist.md",to:".agents/skills/_shared/core/common-checklist.md"},{from:".agents/skills/_shared/context-budget.md",to:".agents/skills/_shared/core/context-budget.md"},{from:".agents/skills/_shared/context-loading.md",to:".agents/skills/_shared/core/context-loading.md"},{from:".agents/skills/_shared/difficulty-guide.md",to:".agents/skills/_shared/core/difficulty-guide.md"},{from:".agents/skills/_shared/lessons-learned.md",to:".agents/skills/_shared/core/lessons-learned.md"},{from:".agents/skills/_shared/prompt-structure.md",to:".agents/skills/_shared/core/prompt-structure.md"},{from:".agents/skills/_shared/quality-principles.md",to:".agents/skills/_shared/core/quality-principles.md"},{from:".agents/skills/_shared/reasoning-templates.md",to:".agents/skills/_shared/core/reasoning-templates.md"},{from:".agents/skills/_shared/session-metrics.md",to:".agents/skills/_shared/core/session-metrics.md"},{from:".agents/skills/_shared/skill-routing.md",to:".agents/skills/_shared/core/skill-routing.md"},{from:".agents/skills/_shared/experiment-ledger.md",to:".agents/skills/_shared/conditional/experiment-ledger.md"},{from:".agents/skills/_shared/exploration-loop.md",to:".agents/skills/_shared/conditional/exploration-loop.md"},{from:".agents/skills/_shared/quality-score.md",to:".agents/skills/_shared/conditional/quality-score.md"},{from:".agents/skills/_shared/memory-protocol.md",to:".agents/skills/_shared/runtime/memory-protocol.md"},{from:".agents/skills/_shared/execution-protocols/claude.md",to:".agents/skills/_shared/runtime/execution-protocols/claude.md"},{from:".agents/skills/_shared/execution-protocols/codex.md",to:".agents/skills/_shared/runtime/execution-protocols/codex.md"},{from:".agents/skills/_shared/execution-protocols/gemini.md",to:".agents/skills/_shared/runtime/execution-protocols/gemini.md"},{from:".agents/skills/_shared/execution-protocols/qwen.md",to:".agents/skills/_shared/runtime/execution-protocols/qwen.md"},{from:".agents/skills/_shared/multi-review-protocol.md",to:".agents/workflows/ultrawork/resources/multi-review-protocol.md"},{from:".agents/skills/_shared/phase-gates.md",to:".agents/workflows/ultrawork/resources/phase-gates.md"}],kS=[".agents/skills/_shared/api-contracts",".agents/skills/_shared/execution-protocols"]});import{execSync as nS}from"node:child_process";import{mkdtempSync as rS,rmSync as tG,writeFileSync as lS}from"node:fs";import{tmpdir as mS}from"node:os";import{join as dT}from"node:path";async function J2(){let $=rS(dT(mS(),"oh-my-agent-"));try{let I=`https://api.github.com/repos/${L$}/tarball/main`,U=await fetch(I,{headers:{"User-Agent":"oh-my-agent-cli"}});if(!U.ok)throw Error(`HTTP ${U.status}`);let _=dT($,"repo.tar.gz");lS(_,Buffer.from(await U.arrayBuffer())),nS(`tar -xzf "${_}" -C "${$}" --strip-components=1`,{stdio:"pipe",timeout:30000}),tG(_)}catch(I){throw tG($,{recursive:!0,force:!0}),Error(`Failed to download repository archive: ${I instanceof Error?I.message:I}`)}return{dir:$,cleanup:()=>tG($,{recursive:!0,force:!0})}}var aG=_4(()=>{s4()});var oT={};B4(oT,{scanLanguages:()=>pT,install:()=>X2});import{execSync as S6}from"node:child_process";import{existsSync as OI,readdirSync as hS,readFileSync as N2,writeFileSync as G2}from"node:fs";import{join as Q1}from"node:path";function pT($){let I=Q1($,"docs"),U=["en"];if(OI(I))for(let _ of hS(I)){let u=_.match(/^README\.(.+)\.md$/);if(u)U.push(u[1])}return U.map((_)=>({value:_,label:cS[_]??_}))}async function X2(){console.clear(),V$(M$.default.bgMagenta(M$.default.white(" \uD83D\uDEF8 oh-my-agent ")));let $=v2(process.cwd());if($.length>0)k($.map((q)=>`${M$.default.green("✓")} ${q}`).join(`
277
+ `),"Migration");await z2(process.cwd());let I=u4();I.start("Downloading...");let U,_;try{let q=await J2();U=q.dir,_=q.cleanup}catch(q){I.stop("Download failed"),d.error(q instanceof Error?q.message:String(q)),process.exit(1)}I.stop("Downloaded!");let u=pT(U),z=await b6({message:"Response language?",options:u,initialValue:"en"});if(e(z))_(),I4("Cancelled."),process.exit(0);let g=await b6({message:"What type of project?",options:[{value:"all",label:"✨ All",hint:"Install everything"},{value:"fullstack",label:"\uD83C\uDF10 Fullstack",hint:"Frontend + Backend + PM + QA"},{value:"frontend",label:"\uD83C\uDFA8 Frontend",hint:"React/Next.js"},{value:"backend",label:"⚙️ Backend",hint:"Python, Node.js, Rust, ..."},{value:"mobile",label:"\uD83D\uDCF1 Mobile",hint:"Flutter/Dart"},{value:"devops",label:"\uD83D\uDE80 DevOps",hint:"Terraform + CI/CD + Workflows"},{value:"custom",label:"\uD83D\uDD27 Custom",hint:"Choose skills"}]});if(e(g))I4("Cancelled."),process.exit(0);let v;if(g==="custom"){let q=qI(),T=await d_({message:"Select skills:",options:q.map((H)=>({value:H.name,label:H.name,hint:H.desc})),required:!0});if(e(T))I4("Cancelled."),process.exit(0);v=T}else v=MT[g]??[];let J=process.cwd(),N={};if(v.includes("oma-backend")){let q=await b6({message:"Backend language?",options:[{value:"python",label:"\uD83D\uDC0D Python",hint:"FastAPI/SQLAlchemy (default)"},{value:"node",label:"\uD83D\uDFE2 Node.js",hint:"NestJS/Hono + Prisma/Drizzle"},{value:"rust",label:"\uD83E\uDD80 Rust",hint:"Axum/Actix-web"},{value:"other",label:"\uD83D\uDD27 Other / Auto-detect",hint:"Configure later with /stack-set"}],initialValue:"python"});if(e(q))I4("Cancelled."),process.exit(0);if(q!=="other")N["oma-backend"]=q}let X=["claude"];if(OI(Q1(J,".github")))X.push("copilot");else{let q=await O$({message:"Also create symlinks for GitHub Copilot? (.github/skills/)",initialValue:!1});if(!e(q)&&q)X.push("copilot")}I.start("Installing skills...");try{try{a_(U,J),KT(U,J),RT(U,J),LT(U,J),WT(U);for(let O of v)I.message(`Installing ${M$.default.cyan(O)}...`),t_(U,O,J,N[O]);I.stop("Skills installed!"),I.start("Installing vendor adaptations..."),$2(U,J,["claude","codex","gemini","qwen"]),I.stop("Vendor adaptations installed!");let V=Q1(J,".agents","config","user-preferences.yaml");if(OI(V)){let O=N2(V,"utf-8");G2(V,O.replace(/^language:\s*.+$/m,`language: ${z}`))}let B=l0(J);if(B.length>0)k(B.map((O)=>`${M$.default.green("✓")} ${O}`).join(`
278
+ `),"Shared layout migration")}finally{_()}let q=I2(J,X,v);k([...v.map((V)=>`${M$.default.green("✓")} ${V}`),"",M$.default.dim(`Location: ${Q1(J,W4)}`),...q.created.length>0?["",M$.default.cyan("Symlinks:"),...q.created.map((V)=>`${M$.default.green("→")} ${V}`)]:[],...q.skipped.length>0?["",M$.default.dim("Skipped:"),...q.skipped.map((V)=>M$.default.dim(` ${V}`))]:[]].join(`
279
+ `),"Installed");try{if(S6("git config --get rerere.enabled",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim()==="true")d.success(M$.default.green("git rerere is already enabled."))}catch{let V=await O$({message:"Enable git rerere? (Recommended for multi-agent merge conflict reuse)",initialValue:!0});if(!e(V)&&V)try{S6("git config --global rerere.enabled true"),d.success(M$.default.green("git rerere enabled globally!"))}catch(B){d.error(`Failed to enable git rerere: ${B}`)}}let T=process.env.HOME||process.env.USERPROFILE||"",H=!1;try{S6("claude --version",{stdio:"ignore"}),H=!0}catch{}let Q=Q1(T,".claude","settings.json");if(H)try{let V={};if(OI(Q))V=JSON.parse(N2(Q,"utf-8"));if((V.env?.cleanupPeriodDays??0)<180||(V.env?.CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS??0)<1e5||(V.env?.CLAUDE_AUTOCOMPACT_PCT_OVERRIDE??0)<80||!V.attribution?.commit||!V.attribution?.pr||V.env?.DISABLE_TELEMETRY!=="1"||V.env?.DISABLE_ERROR_REPORTING!=="1"||V.env?.CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY!=="1"){let O=await O$({message:"Apply recommended Claude Code settings?",initialValue:!0});if(!e(O)&&O)V.env={...V.env||{},cleanupPeriodDays:180,CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS:1e5,CLAUDE_AUTOCOMPACT_PCT_OVERRIDE:80,DISABLE_TELEMETRY:"1",DISABLE_ERROR_REPORTING:"1",CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY:"1"},V.attribution={commit:`Generated with oh-my-agent
280
280
 
281
- Co-Authored-By: First Fluke <our.first.fluke@gmail.com>`,pr:"Generated with [oh-my-agent](https://github.com/first-fluke/oh-my-agent)"},aG(T,`${JSON.stringify(O,null,2)}
282
- `),o.success(M$.default.green("Claude Code recommended settings applied!"))}}catch(O){o.warn(`Could not configure Claude Code settings: ${O}`)}if(q){let O=!1;try{j6("codex --version",{stdio:"ignore"}),O=!0}catch{}if(O){let B=!1;try{B=j6("claude plugin list",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).includes("codex@openai-codex")}catch{}if(!B)try{j6("claude plugin marketplace add openai/codex-plugin-cc",{stdio:"ignore"}),j6("claude plugin install codex@openai-codex",{stdio:"ignore"}),o.success(M$.default.green("Codex plugin installed for Claude Code!"))}catch(R){o.warn(`Could not install Codex plugin: ${R}`)}}}let H=r0(G,".gemini","antigravity","mcp_config.json"),Q=null,Y=!1;try{if(J2(H)){let O=tG(H,"utf-8");Q=JSON.parse(O),Y=!0}}catch(O){}if(Y&&Q&&Q.mcpServers){let O=Q.mcpServers.serena,B="oh-my-agent@latest";if(!(O&&O.command==="npx"&&Array.isArray(O.args)&&O.args.includes("oh-my-agent@latest")&&O.args.includes("bridge"))){let D=await O$({message:"Configure Serena MCP with bridge? (Required for full functionality)",initialValue:!0});if(e(D));else if(D){Q.mcpServers.serena={command:"npx",args:["-y","oh-my-agent@latest","bridge","http://localhost:12341/mcp"],disabled:!1};try{aG(H,JSON.stringify(Q,null,2)),o.success(M$.default.green("Serena MCP configured successfully!"))}catch(M){o.error(`Failed to update MCP config: ${M}`)}}}}let K=r0(G,".gemini","settings.json"),L=null,P=!1;try{if(J2(K)){let O=tG(K,"utf-8");L=JSON.parse(O),P=!0}}catch(O){}if(P&&L&&L.mcpServers){let O=L.mcpServers.serena;if(!(O&&O.url==="http://localhost:12341/mcp")){let R=await O$({message:"Configure Serena for Gemini CLI? (HTTP Mode)",initialValue:!0});if(e(R));else if(R){L.mcpServers.serena={url:"http://localhost:12341/mcp"};try{aG(K,JSON.stringify(L,null,2)),o.success(M$.default.green("Gemini CLI configured successfully!"))}catch(D){o.error(`Failed to update Gemini config: ${D}`)}}}}if(d(M$.default.green("Done! Open your project in your IDE to use the skills.")),J1()&&r4()&&!N1()){let O=await O$({message:`${M$.default.yellow("⭐")} Star ${M$.default.cyan(R$)} on GitHub? It helps a lot!`});if(!e(O)&&O)try{j6(`gh api -X PUT /user/starred/${R$}`,{stdio:"ignore"}),o.success(`Starred ${M$.default.cyan(R$)}! Thank you! \uD83C\uDF1F`)}catch{o.warn(`Could not star automatically. Try: ${M$.default.dim(`gh api --method PUT /user/starred/${R$}`)}`)}}}catch(J){v.stop("Installation failed"),o.error(J instanceof Error?J.message:String(J)),process.exit(1)}}var M$;var eG=U4(()=>{u4();cG();qI();dG();s4();oG();M$=q$(b$(),1)});import{execSync as Q1}from"node:child_process";function X2($){try{let U=Q1("git diff --stat HEAD~10 2>/dev/null || git diff --stat",{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
283
- `),_=U[U.length-1]||"",u=_.match(/(\d+) files? changed/),g=_.match(/(\d+) insertions?\(\+\)/),z=_.match(/(\d+) deletions?\(-\)/);return{filesChanged:u?.[1]?parseInt(u[1],10):0,linesAdded:g?.[1]?parseInt(g[1],10):0,linesRemoved:z?.[1]?parseInt(z[1],10):0}}catch{return{filesChanged:0,linesAdded:0,linesRemoved:0}}}function HH($,I=5){try{return Q1(`git log --oneline -${I} 2>/dev/null`,{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
284
- `).filter(Boolean)}catch{return[]}}function g9($){try{return Q1("git diff --name-only HEAD~5 2>/dev/null || git diff --name-only",{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
285
- `).filter(Boolean).slice(0,10)}catch{return[]}}function TH($,I=10){try{return Q1(`git log --format="%s" -${I} 2>/dev/null`,{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
286
- `).filter(Boolean)}catch{return[]}}function YH($){let I={},U=/^(feat|fix|docs|style|refactor|test|chore|build|ci|perf)(\(.+\))?:/;for(let _ of $){let u=_.match(U);if(u){let g=u[1];if(g)I[g]=(I[g]||0)+1}}return I}function OH($){try{let I=`${$}/.serena/retrospectives`,U=Q1(`ls -t "${I}"/*.json 2>/dev/null | head -1`,{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim();if(!U)return null;let _=Q1(`cat "${U}"`,{encoding:"utf-8",stdio:["pipe","pipe","ignore"]});return JSON.parse(_).date||null}catch{return null}}function VH($,I){if(!I)return TH($,10);try{let _=new Date(I).toISOString().split("T")[0];return Q1(`git log --format="%s" --since="${_}" 2>/dev/null`,{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
287
- `).filter(Boolean)}catch{return TH($,10)}}var z9=()=>{};var MH={};B4(MH,{retro:()=>Jw});import{existsSync as DH,mkdirSync as uw,readdirSync as Uw,readFileSync as _w,writeFileSync as gw}from"node:fs";import{join as v9}from"node:path";function J9($){return v9($,".serena","retrospectives")}function zw($){let I=J9($);if(!DH(I))return[];try{return Uw(I).filter((_)=>_.endsWith(".json")).sort().reverse().slice(0,10).map((_)=>JSON.parse(_w(v9(I,_),"utf-8")))}catch{return[]}}function BH($,I){let U=J9($);if(!DH(U))uw(U,{recursive:!0});let _=`${I.date.replace(/[:.]/g,"-")}_${I.id}.json`;gw(v9(U,_),JSON.stringify(I,null,2),"utf-8")}function vw($){let I=OH($),U=VH($,I),_=YH(U),u=X2($),g=K7($),z=R7($,I||void 0),v=Object.entries(_).sort(([,G],[,q])=>q-G)[0],J="Development session";if(v){let[G]=v;J={feat:"Feature development",fix:"Bug fixes and improvements",refactor:"Code refactoring",docs:"Documentation updates",test:"Testing improvements",chore:"Maintenance tasks",build:"Build system updates",perf:"Performance improvements"}[G]||"Development session"}if(u.filesChanged>0)J+=` (${u.filesChanged} files, +${u.linesAdded}/-${u.linesRemoved})`;if(g.agents.length>0)J+=` with ${g.agents.join(", ")}`;let N=W7(z);if(U.length>0&&N.length===0){if(_.refactor||_.perf)N.push("Code quality and performance improvements");if(_.test)N.push("Enhanced test coverage");if(_.fix)N.push("Issue resolution and stability improvements")}let X=[];if(g.inProgressTasks.length>0)X.push(...g.inProgressTasks.slice(0,3));if(U.length>0){let G=U[0]?.toLowerCase()||"";if(G.includes("wip")||G.includes("todo"))X.push("Complete work-in-progress items")}if(X.length===0)X.push("Continue development","Review and test changes");return{summary:J,learnings:N.slice(0,5),nextSteps:X.slice(0,5)}}async function Jw(){let $=process.cwd(),I=J9($),U=zw($);console.clear(),V$(j$.default.bgMagenta(j$.default.white(" retro (interactive) ")));let _=U[0];if(_)k([j$.default.bold("Last Retrospective"),`Date: ${_.date}`,"",j$.default.bold("Summary:"),_.summary,"",j$.default.bold("Key Learnings:"),..._.keyLearnings.map((G)=>` - ${G}`),"",j$.default.bold("Next Steps:"),..._.nextSteps.map((G)=>` > ${G}`)].join(`
288
- `),"Previous Session");let u=await z1({message:"What would you like to do?",options:[{value:"auto",label:"Auto-generate from git history",hint:"Analyze commits and agent activity"},{value:"manual",label:"Create manually",hint:"Write your own retrospective"},{value:"list",label:"View past retrospectives"},{value:"exit",label:"Exit"}]});if(e(u)||u==="exit"){d(j$.default.dim("Goodbye!"));return}if(u==="list"){if(U.length===0)k(j$.default.yellow("No retrospectives found."),"History");else{let G=U.map((q,T)=>`${T+1}. [${q.date.split("T")[0]}] ${q.summary.slice(0,50)}...`).join(`
289
- `);k(G,`Past Retrospectives (${U.length})`)}d(j$.default.dim(`Stored in: ${I}`));return}if(u==="auto"){let{summary:G,learnings:q,nextSteps:T}=vw($),H=g9($);k([j$.default.bold("Auto-generated Content"),"",j$.default.bold("Summary:"),G,"",j$.default.bold("Key Learnings:"),...q.map((K)=>` - ${K}`),"",j$.default.bold("Next Steps:"),...T.map((K)=>` > ${K}`)].join(`
290
- `),"Preview");let Q=await O$({message:"Save this retrospective?",initialValue:!0});if(e(Q)||!Q){z4("Cancelled.");return}let Y={id:Math.random().toString(36).slice(2,8),date:new Date().toISOString(),summary:G,keyLearnings:q,filesChanged:H,nextSteps:T};BH($,Y),k(j$.default.green("Retrospective saved!"),"Done"),d(j$.default.dim(`Stored in: ${I}`));return}let g=HH($),z=g9($);if(g.length>0)k(g.join(`
291
- `),"Recent Commits");if(z.length>0)k(z.join(`
292
- `),"Changed Files");let v=await d_({message:"What did you accomplish in this session?",placeholder:"e.g., Implemented user authentication flow"});if(e(v)){z4("Cancelled.");return}let J=await d_({message:"Key learnings? (comma-separated)",placeholder:"e.g., JWT needs refresh token, bcrypt is slow"});if(e(J)){z4("Cancelled.");return}let N=await d_({message:"Next steps? (comma-separated)",placeholder:"e.g., Add password reset, Write tests"});if(e(N)){z4("Cancelled.");return}let X={id:Math.random().toString(36).slice(2,8),date:new Date().toISOString(),summary:v,keyLearnings:J.split(",").map((G)=>G.trim()).filter(Boolean),filesChanged:z,nextSteps:N.split(",").map((G)=>G.trim()).filter(Boolean)};BH($,X),k(j$.default.green("Retrospective saved!"),"Done"),d(j$.default.dim(`Stored in: ${I}`))}var j$;var KH=U4(()=>{u4();z9();F0();j$=q$(b$(),1)});var _6=E((Om,LY)=>{var MY=["nodebuffer","arraybuffer","fragments"],KY=typeof Blob<"u";if(KY)MY.push("blob");LY.exports={BINARY_TYPES:MY,CLOSE_TIMEOUT:30000,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:KY,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var h0=E((Vm,R2)=>{var{EMPTY_BUFFER:kE}=_6(),W9=Buffer[Symbol.species];function yE($,I){if($.length===0)return kE;if($.length===1)return $[0];let U=Buffer.allocUnsafe(I),_=0;for(let u=0;u<$.length;u++){let g=$[u];U.set(g,_),_+=g.length}if(_<I)return new W9(U.buffer,U.byteOffset,_);return U}function RY($,I,U,_,u){for(let g=0;g<u;g++)U[_+g]=$[g]^I[g&3]}function WY($,I){for(let U=0;U<$.length;U++)$[U]^=I[U&3]}function iE($){if($.length===$.buffer.byteLength)return $.buffer;return $.buffer.slice($.byteOffset,$.byteOffset+$.length)}function P9($){if(P9.readOnly=!0,Buffer.isBuffer($))return $;let I;if($ instanceof ArrayBuffer)I=new W9($);else if(ArrayBuffer.isView($))I=new W9($.buffer,$.byteOffset,$.byteLength);else I=Buffer.from($),P9.readOnly=!1;return I}R2.exports={concat:yE,mask:RY,toArrayBuffer:iE,toBuffer:P9,unmask:WY};if(!process.env.WS_NO_BUFFER_UTIL)try{let $=(()=>{throw new Error("Cannot require module "+"bufferutil");})();R2.exports.mask=function(I,U,_,u,g){if(g<48)RY(I,U,_,u,g);else $.mask(I,U,_,u,g)},R2.exports.unmask=function(I,U){if(I.length<32)WY(I,U);else $.unmask(I,U)}}catch($){}});var bY=E((Bm,AY)=>{var PY=Symbol("kDone"),Z9=Symbol("kRun");class ZY{constructor($){this[PY]=()=>{this.pending--,this[Z9]()},this.concurrency=$||1/0,this.jobs=[],this.pending=0}add($){this.jobs.push($),this[Z9]()}[Z9](){if(this.pending===this.concurrency)return;if(this.jobs.length){let $=this.jobs.shift();this.pending++,$(this[PY])}}}AY.exports=ZY});var d0=E((Dm,EY)=>{var c0=g$("zlib"),jY=h0(),nE=bY(),{kStatusCode:FY}=_6(),rE=Buffer[Symbol.species],lE=Buffer.from([0,0,255,255]),P2=Symbol("permessage-deflate"),g6=Symbol("total-length"),OI=Symbol("callback"),E6=Symbol("buffers"),VI=Symbol("error"),W2;class SY{constructor($,I,U){if(this._maxPayload=U|0,this._options=$||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!I,this._deflate=null,this._inflate=null,this.params=null,!W2){let _=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;W2=new nE(_)}}static get extensionName(){return"permessage-deflate"}offer(){let $={};if(this._options.serverNoContextTakeover)$.server_no_context_takeover=!0;if(this._options.clientNoContextTakeover)$.client_no_context_takeover=!0;if(this._options.serverMaxWindowBits)$.server_max_window_bits=this._options.serverMaxWindowBits;if(this._options.clientMaxWindowBits)$.client_max_window_bits=this._options.clientMaxWindowBits;else if(this._options.clientMaxWindowBits==null)$.client_max_window_bits=!0;return $}accept($){return $=this.normalizeParams($),this.params=this._isServer?this.acceptAsServer($):this.acceptAsClient($),this.params}cleanup(){if(this._inflate)this._inflate.close(),this._inflate=null;if(this._deflate){let $=this._deflate[OI];if(this._deflate.close(),this._deflate=null,$)$(Error("The deflate stream was closed while data was being processed"))}}acceptAsServer($){let I=this._options,U=$.find((_)=>{if(I.serverNoContextTakeover===!1&&_.server_no_context_takeover||_.server_max_window_bits&&(I.serverMaxWindowBits===!1||typeof I.serverMaxWindowBits==="number"&&I.serverMaxWindowBits>_.server_max_window_bits)||typeof I.clientMaxWindowBits==="number"&&!_.client_max_window_bits)return!1;return!0});if(!U)throw Error("None of the extension offers can be accepted");if(I.serverNoContextTakeover)U.server_no_context_takeover=!0;if(I.clientNoContextTakeover)U.client_no_context_takeover=!0;if(typeof I.serverMaxWindowBits==="number")U.server_max_window_bits=I.serverMaxWindowBits;if(typeof I.clientMaxWindowBits==="number")U.client_max_window_bits=I.clientMaxWindowBits;else if(U.client_max_window_bits===!0||I.clientMaxWindowBits===!1)delete U.client_max_window_bits;return U}acceptAsClient($){let I=$[0];if(this._options.clientNoContextTakeover===!1&&I.client_no_context_takeover)throw Error('Unexpected parameter "client_no_context_takeover"');if(!I.client_max_window_bits){if(typeof this._options.clientMaxWindowBits==="number")I.client_max_window_bits=this._options.clientMaxWindowBits}else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits==="number"&&I.client_max_window_bits>this._options.clientMaxWindowBits)throw Error('Unexpected or invalid parameter "client_max_window_bits"');return I}normalizeParams($){return $.forEach((I)=>{Object.keys(I).forEach((U)=>{let _=I[U];if(_.length>1)throw Error(`Parameter "${U}" must have only a single value`);if(_=_[0],U==="client_max_window_bits"){if(_!==!0){let u=+_;if(!Number.isInteger(u)||u<8||u>15)throw TypeError(`Invalid value for parameter "${U}": ${_}`);_=u}else if(!this._isServer)throw TypeError(`Invalid value for parameter "${U}": ${_}`)}else if(U==="server_max_window_bits"){let u=+_;if(!Number.isInteger(u)||u<8||u>15)throw TypeError(`Invalid value for parameter "${U}": ${_}`);_=u}else if(U==="client_no_context_takeover"||U==="server_no_context_takeover"){if(_!==!0)throw TypeError(`Invalid value for parameter "${U}": ${_}`)}else throw Error(`Unknown parameter "${U}"`);I[U]=_})}),$}decompress($,I,U){W2.add((_)=>{this._decompress($,I,(u,g)=>{_(),U(u,g)})})}compress($,I,U){W2.add((_)=>{this._compress($,I,(u,g)=>{_(),U(u,g)})})}_decompress($,I,U){let _=this._isServer?"client":"server";if(!this._inflate){let u=`${_}_max_window_bits`,g=typeof this.params[u]!=="number"?c0.Z_DEFAULT_WINDOWBITS:this.params[u];this._inflate=c0.createInflateRaw({...this._options.zlibInflateOptions,windowBits:g}),this._inflate[P2]=this,this._inflate[g6]=0,this._inflate[E6]=[],this._inflate.on("error",hE),this._inflate.on("data",wY)}if(this._inflate[OI]=U,this._inflate.write($),I)this._inflate.write(lE);this._inflate.flush(()=>{let u=this._inflate[VI];if(u){this._inflate.close(),this._inflate=null,U(u);return}let g=jY.concat(this._inflate[E6],this._inflate[g6]);if(this._inflate._readableState.endEmitted)this._inflate.close(),this._inflate=null;else if(this._inflate[g6]=0,this._inflate[E6]=[],I&&this.params[`${_}_no_context_takeover`])this._inflate.reset();U(null,g)})}_compress($,I,U){let _=this._isServer?"server":"client";if(!this._deflate){let u=`${_}_max_window_bits`,g=typeof this.params[u]!=="number"?c0.Z_DEFAULT_WINDOWBITS:this.params[u];this._deflate=c0.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:g}),this._deflate[g6]=0,this._deflate[E6]=[],this._deflate.on("data",mE)}this._deflate[OI]=U,this._deflate.write($),this._deflate.flush(c0.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let u=jY.concat(this._deflate[E6],this._deflate[g6]);if(I)u=new rE(u.buffer,u.byteOffset,u.length-4);if(this._deflate[OI]=null,this._deflate[g6]=0,this._deflate[E6]=[],I&&this.params[`${_}_no_context_takeover`])this._deflate.reset();U(null,u)})}}EY.exports=SY;function mE($){this[E6].push($),this[g6]+=$.length}function wY($){if(this[g6]+=$.length,this[P2]._maxPayload<1||this[g6]<=this[P2]._maxPayload){this[E6].push($);return}this[VI]=RangeError("Max payload size exceeded"),this[VI].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[VI][FY]=1009,this.removeListener("data",wY),this.reset()}function hE($){if(this[P2]._inflate=null,this[VI]){this[OI](this[VI]);return}$[FY]=1007,this[OI]($)}});var BI=E((Mm,Z2)=>{var{isUtf8:CY}=g$("buffer"),{hasBlob:cE}=_6(),dE=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function pE($){return $>=1000&&$<=1014&&$!==1004&&$!==1005&&$!==1006||$>=3000&&$<=4999}function A9($){let I=$.length,U=0;while(U<I)if(($[U]&128)===0)U++;else if(($[U]&224)===192){if(U+1===I||($[U+1]&192)!==128||($[U]&254)===192)return!1;U+=2}else if(($[U]&240)===224){if(U+2>=I||($[U+1]&192)!==128||($[U+2]&192)!==128||$[U]===224&&($[U+1]&224)===128||$[U]===237&&($[U+1]&224)===160)return!1;U+=3}else if(($[U]&248)===240){if(U+3>=I||($[U+1]&192)!==128||($[U+2]&192)!==128||($[U+3]&192)!==128||$[U]===240&&($[U+1]&240)===128||$[U]===244&&$[U+1]>143||$[U]>244)return!1;U+=4}else return!1;return!0}function oE($){return cE&&typeof $==="object"&&typeof $.arrayBuffer==="function"&&typeof $.type==="string"&&typeof $.stream==="function"&&($[Symbol.toStringTag]==="Blob"||$[Symbol.toStringTag]==="File")}Z2.exports={isBlob:oE,isValidStatusCode:pE,isValidUTF8:A9,tokenChars:dE};if(CY)Z2.exports.isValidUTF8=function($){return $.length<24?A9($):CY($)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let $=(()=>{throw new Error("Cannot require module "+"utf-8-validate");})();Z2.exports.isValidUTF8=function(I){return I.length<32?A9(I):$(I)}}catch($){}});var j9=E((Km,iY)=>{var{Writable:tE}=g$("stream"),fY=d0(),{BINARY_TYPES:aE,EMPTY_BUFFER:xY,kStatusCode:eE,kWebSocket:sE}=_6(),{concat:b9,toArrayBuffer:$C,unmask:IC}=h0(),{isValidStatusCode:uC,isValidUTF8:kY}=BI(),A2=Buffer[Symbol.species];class yY extends tE{constructor($={}){super();this._allowSynchronousEvents=$.allowSynchronousEvents!==void 0?$.allowSynchronousEvents:!0,this._binaryType=$.binaryType||aE[0],this._extensions=$.extensions||{},this._isServer=!!$.isServer,this._maxPayload=$.maxPayload|0,this._skipUTF8Validation=!!$.skipUTF8Validation,this[sE]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=0}_write($,I,U){if(this._opcode===8&&this._state==0)return U();this._bufferedBytes+=$.length,this._buffers.push($),this.startLoop(U)}consume($){if(this._bufferedBytes-=$,$===this._buffers[0].length)return this._buffers.shift();if($<this._buffers[0].length){let U=this._buffers[0];return this._buffers[0]=new A2(U.buffer,U.byteOffset+$,U.length-$),new A2(U.buffer,U.byteOffset,$)}let I=Buffer.allocUnsafe($);do{let U=this._buffers[0],_=I.length-$;if($>=U.length)I.set(this._buffers.shift(),_);else I.set(new Uint8Array(U.buffer,U.byteOffset,$),_),this._buffers[0]=new A2(U.buffer,U.byteOffset+$,U.length-$);$-=U.length}while($>0);return I}startLoop($){this._loop=!0;do switch(this._state){case 0:this.getInfo($);break;case 1:this.getPayloadLength16($);break;case 2:this.getPayloadLength64($);break;case 3:this.getMask();break;case 4:this.getData($);break;case 5:case 6:this._loop=!1;return}while(this._loop);if(!this._errored)$()}getInfo($){if(this._bufferedBytes<2){this._loop=!1;return}let I=this.consume(2);if((I[0]&48)!==0){let _=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");$(_);return}let U=(I[0]&64)===64;if(U&&!this._extensions[fY.extensionName]){let _=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");$(_);return}if(this._fin=(I[0]&128)===128,this._opcode=I[0]&15,this._payloadLength=I[1]&127,this._opcode===0){if(U){let _=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");$(_);return}if(!this._fragmented){let _=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");$(_);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let _=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");$(_);return}this._compressed=U}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let _=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");$(_);return}if(U){let _=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");$(_);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let _=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");$(_);return}}else{let _=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");$(_);return}if(!this._fin&&!this._fragmented)this._fragmented=this._opcode;if(this._masked=(I[1]&128)===128,this._isServer){if(!this._masked){let _=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");$(_);return}}else if(this._masked){let _=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");$(_);return}if(this._payloadLength===126)this._state=1;else if(this._payloadLength===127)this._state=2;else this.haveLength($)}getPayloadLength16($){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength($)}getPayloadLength64($){if(this._bufferedBytes<8){this._loop=!1;return}let I=this.consume(8),U=I.readUInt32BE(0);if(U>Math.pow(2,21)-1){let _=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");$(_);return}this._payloadLength=U*Math.pow(2,32)+I.readUInt32BE(4),this.haveLength($)}haveLength($){if(this._payloadLength&&this._opcode<8){if(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0){let I=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");$(I);return}}if(this._masked)this._state=3;else this._state=4}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=4}getData($){let I=xY;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}if(I=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0)IC(I,this._mask)}if(this._opcode>7){this.controlMessage(I,$);return}if(this._compressed){this._state=5,this.decompress(I,$);return}if(I.length)this._messageLength=this._totalPayloadLength,this._fragments.push(I);this.dataMessage($)}decompress($,I){this._extensions[fY.extensionName].decompress($,this._fin,(_,u)=>{if(_)return I(_);if(u.length){if(this._messageLength+=u.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let g=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");I(g);return}this._fragments.push(u)}if(this.dataMessage(I),this._state===0)this.startLoop(I)})}dataMessage($){if(!this._fin){this._state=0;return}let I=this._messageLength,U=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let _;if(this._binaryType==="nodebuffer")_=b9(U,I);else if(this._binaryType==="arraybuffer")_=$C(b9(U,I));else if(this._binaryType==="blob")_=new Blob(U);else _=U;if(this._allowSynchronousEvents)this.emit("message",_,!0),this._state=0;else this._state=6,setImmediate(()=>{this.emit("message",_,!0),this._state=0,this.startLoop($)})}else{let _=b9(U,I);if(!this._skipUTF8Validation&&!kY(_)){let u=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");$(u);return}if(this._state===5||this._allowSynchronousEvents)this.emit("message",_,!1),this._state=0;else this._state=6,setImmediate(()=>{this.emit("message",_,!1),this._state=0,this.startLoop($)})}}controlMessage($,I){if(this._opcode===8){if($.length===0)this._loop=!1,this.emit("conclude",1005,xY),this.end();else{let U=$.readUInt16BE(0);if(!uC(U)){let u=this.createError(RangeError,`invalid status code ${U}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");I(u);return}let _=new A2($.buffer,$.byteOffset+2,$.length-2);if(!this._skipUTF8Validation&&!kY(_)){let u=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");I(u);return}this._loop=!1,this.emit("conclude",U,_),this.end()}this._state=0;return}if(this._allowSynchronousEvents)this.emit(this._opcode===9?"ping":"pong",$),this._state=0;else this._state=6,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",$),this._state=0,this.startLoop(I)})}createError($,I,U,_,u){this._loop=!1,this._errored=!0;let g=new $(U?`Invalid WebSocket frame: ${I}`:I);return Error.captureStackTrace(g,this.createError),g.code=u,g[eE]=_,g}}iY.exports=yY});var S9=E((Rm,lY)=>{var{Duplex:Lm}=g$("stream"),{randomFillSync:UC}=g$("crypto"),nY=d0(),{EMPTY_BUFFER:_C,kWebSocket:gC,NOOP:zC}=_6(),{isBlob:DI,isValidStatusCode:vC}=BI(),{mask:rY,toBuffer:O1}=h0(),V4=Symbol("kByteLength"),JC=Buffer.alloc(4),V1,MI=8192,b4=0,NC=1,GC=2;class C6{constructor($,I,U){if(this._extensions=I||{},U)this._generateMask=U,this._maskBuffer=Buffer.alloc(4);this._socket=$,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=b4,this.onerror=zC,this[gC]=void 0}static frame($,I){let U,_=!1,u=2,g=!1;if(I.mask){if(U=I.maskBuffer||JC,I.generateMask)I.generateMask(U);else{if(MI===8192){if(V1===void 0)V1=Buffer.alloc(8192);UC(V1,0,8192),MI=0}U[0]=V1[MI++],U[1]=V1[MI++],U[2]=V1[MI++],U[3]=V1[MI++]}g=(U[0]|U[1]|U[2]|U[3])===0,u=6}let z;if(typeof $==="string")if((!I.mask||g)&&I[V4]!==void 0)z=I[V4];else $=Buffer.from($),z=$.length;else z=$.length,_=I.mask&&I.readOnly&&!g;let v=z;if(z>=65536)u+=8,v=127;else if(z>125)u+=2,v=126;let J=Buffer.allocUnsafe(_?z+u:u);if(J[0]=I.fin?I.opcode|128:I.opcode,I.rsv1)J[0]|=64;if(J[1]=v,v===126)J.writeUInt16BE(z,2);else if(v===127)J[2]=J[3]=0,J.writeUIntBE(z,4,6);if(!I.mask)return[J,$];if(J[1]|=128,J[u-4]=U[0],J[u-3]=U[1],J[u-2]=U[2],J[u-1]=U[3],g)return[J,$];if(_)return rY($,U,J,u,z),[J];return rY($,U,$,0,z),[J,$]}close($,I,U,_){let u;if($===void 0)u=_C;else if(typeof $!=="number"||!vC($))throw TypeError("First argument must be a valid error code number");else if(I===void 0||!I.length)u=Buffer.allocUnsafe(2),u.writeUInt16BE($,0);else{let z=Buffer.byteLength(I);if(z>123)throw RangeError("The message must not be greater than 123 bytes");if(u=Buffer.allocUnsafe(2+z),u.writeUInt16BE($,0),typeof I==="string")u.write(I,2);else u.set(I,2)}let g={[V4]:u.length,fin:!0,generateMask:this._generateMask,mask:U,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};if(this._state!==b4)this.enqueue([this.dispatch,u,!1,g,_]);else this.sendFrame(C6.frame(u,g),_)}ping($,I,U){let _,u;if(typeof $==="string")_=Buffer.byteLength($),u=!1;else if(DI($))_=$.size,u=!1;else $=O1($),_=$.length,u=O1.readOnly;if(_>125)throw RangeError("The data size must not be greater than 125 bytes");let g={[V4]:_,fin:!0,generateMask:this._generateMask,mask:I,maskBuffer:this._maskBuffer,opcode:9,readOnly:u,rsv1:!1};if(DI($))if(this._state!==b4)this.enqueue([this.getBlobData,$,!1,g,U]);else this.getBlobData($,!1,g,U);else if(this._state!==b4)this.enqueue([this.dispatch,$,!1,g,U]);else this.sendFrame(C6.frame($,g),U)}pong($,I,U){let _,u;if(typeof $==="string")_=Buffer.byteLength($),u=!1;else if(DI($))_=$.size,u=!1;else $=O1($),_=$.length,u=O1.readOnly;if(_>125)throw RangeError("The data size must not be greater than 125 bytes");let g={[V4]:_,fin:!0,generateMask:this._generateMask,mask:I,maskBuffer:this._maskBuffer,opcode:10,readOnly:u,rsv1:!1};if(DI($))if(this._state!==b4)this.enqueue([this.getBlobData,$,!1,g,U]);else this.getBlobData($,!1,g,U);else if(this._state!==b4)this.enqueue([this.dispatch,$,!1,g,U]);else this.sendFrame(C6.frame($,g),U)}send($,I,U){let _=this._extensions[nY.extensionName],u=I.binary?2:1,g=I.compress,z,v;if(typeof $==="string")z=Buffer.byteLength($),v=!1;else if(DI($))z=$.size,v=!1;else $=O1($),z=$.length,v=O1.readOnly;if(this._firstFragment){if(this._firstFragment=!1,g&&_&&_.params[_._isServer?"server_no_context_takeover":"client_no_context_takeover"])g=z>=_._threshold;this._compress=g}else g=!1,u=0;if(I.fin)this._firstFragment=!0;let J={[V4]:z,fin:I.fin,generateMask:this._generateMask,mask:I.mask,maskBuffer:this._maskBuffer,opcode:u,readOnly:v,rsv1:g};if(DI($))if(this._state!==b4)this.enqueue([this.getBlobData,$,this._compress,J,U]);else this.getBlobData($,this._compress,J,U);else if(this._state!==b4)this.enqueue([this.dispatch,$,this._compress,J,U]);else this.dispatch($,this._compress,J,U)}getBlobData($,I,U,_){this._bufferedBytes+=U[V4],this._state=GC,$.arrayBuffer().then((u)=>{if(this._socket.destroyed){let z=Error("The socket was closed while the blob was being read");process.nextTick(F9,this,z,_);return}this._bufferedBytes-=U[V4];let g=O1(u);if(!I)this._state=b4,this.sendFrame(C6.frame(g,U),_),this.dequeue();else this.dispatch(g,I,U,_)}).catch((u)=>{process.nextTick(XC,this,u,_)})}dispatch($,I,U,_){if(!I){this.sendFrame(C6.frame($,U),_);return}let u=this._extensions[nY.extensionName];this._bufferedBytes+=U[V4],this._state=NC,u.compress($,U.fin,(g,z)=>{if(this._socket.destroyed){let v=Error("The socket was closed while data was being compressed");F9(this,v,_);return}this._bufferedBytes-=U[V4],this._state=b4,U.readOnly=!1,this.sendFrame(C6.frame(z,U),_),this.dequeue()})}dequeue(){while(this._state===b4&&this._queue.length){let $=this._queue.shift();this._bufferedBytes-=$[3][V4],Reflect.apply($[0],this,$.slice(1))}}enqueue($){this._bufferedBytes+=$[3][V4],this._queue.push($)}sendFrame($,I){if($.length===2)this._socket.cork(),this._socket.write($[0]),this._socket.write($[1],I),this._socket.uncork();else this._socket.write($[0],I)}}lY.exports=C6;function F9($,I,U){if(typeof U==="function")U(I);for(let _=0;_<$._queue.length;_++){let u=$._queue[_],g=u[u.length-1];if(typeof g==="function")g(I)}}function XC($,I,U){F9($,I,U),$.onerror(I)}});var eY=E((Wm,aY)=>{var{kForOnEventAttribute:p0,kListener:w9}=_6(),mY=Symbol("kCode"),hY=Symbol("kData"),cY=Symbol("kError"),dY=Symbol("kMessage"),pY=Symbol("kReason"),KI=Symbol("kTarget"),oY=Symbol("kType"),tY=Symbol("kWasClean");class f6{constructor($){this[KI]=null,this[oY]=$}get target(){return this[KI]}get type(){return this[oY]}}Object.defineProperty(f6.prototype,"target",{enumerable:!0});Object.defineProperty(f6.prototype,"type",{enumerable:!0});class LI extends f6{constructor($,I={}){super($);this[mY]=I.code===void 0?0:I.code,this[pY]=I.reason===void 0?"":I.reason,this[tY]=I.wasClean===void 0?!1:I.wasClean}get code(){return this[mY]}get reason(){return this[pY]}get wasClean(){return this[tY]}}Object.defineProperty(LI.prototype,"code",{enumerable:!0});Object.defineProperty(LI.prototype,"reason",{enumerable:!0});Object.defineProperty(LI.prototype,"wasClean",{enumerable:!0});class o0 extends f6{constructor($,I={}){super($);this[cY]=I.error===void 0?null:I.error,this[dY]=I.message===void 0?"":I.message}get error(){return this[cY]}get message(){return this[dY]}}Object.defineProperty(o0.prototype,"error",{enumerable:!0});Object.defineProperty(o0.prototype,"message",{enumerable:!0});class j2 extends f6{constructor($,I={}){super($);this[hY]=I.data===void 0?null:I.data}get data(){return this[hY]}}Object.defineProperty(j2.prototype,"data",{enumerable:!0});var qC={addEventListener($,I,U={}){for(let u of this.listeners($))if(!U[p0]&&u[w9]===I&&!u[p0])return;let _;if($==="message")_=function(g,z){let v=new j2("message",{data:z?g:g.toString()});v[KI]=this,b2(I,this,v)};else if($==="close")_=function(g,z){let v=new LI("close",{code:g,reason:z.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});v[KI]=this,b2(I,this,v)};else if($==="error")_=function(g){let z=new o0("error",{error:g,message:g.message});z[KI]=this,b2(I,this,z)};else if($==="open")_=function(){let g=new f6("open");g[KI]=this,b2(I,this,g)};else return;if(_[p0]=!!U[p0],_[w9]=I,U.once)this.once($,_);else this.on($,_)},removeEventListener($,I){for(let U of this.listeners($))if(U[w9]===I&&!U[p0]){this.removeListener($,U);break}}};aY.exports={CloseEvent:LI,ErrorEvent:o0,Event:f6,EventTarget:qC,MessageEvent:j2};function b2($,I,U){if(typeof $==="object"&&$.handleEvent)$.handleEvent.call($,U);else $.call(I,U)}});var E9=E((Pm,sY)=>{var{tokenChars:t0}=BI();function m4($,I,U){if($[I]===void 0)$[I]=[U];else $[I].push(U)}function QC($){let I=Object.create(null),U=Object.create(null),_=!1,u=!1,g=!1,z,v,J=-1,N=-1,X=-1,G=0;for(;G<$.length;G++)if(N=$.charCodeAt(G),z===void 0)if(X===-1&&t0[N]===1){if(J===-1)J=G}else if(G!==0&&(N===32||N===9)){if(X===-1&&J!==-1)X=G}else if(N===59||N===44){if(J===-1)throw SyntaxError(`Unexpected character at index ${G}`);if(X===-1)X=G;let T=$.slice(J,X);if(N===44)m4(I,T,U),U=Object.create(null);else z=T;J=X=-1}else throw SyntaxError(`Unexpected character at index ${G}`);else if(v===void 0)if(X===-1&&t0[N]===1){if(J===-1)J=G}else if(N===32||N===9){if(X===-1&&J!==-1)X=G}else if(N===59||N===44){if(J===-1)throw SyntaxError(`Unexpected character at index ${G}`);if(X===-1)X=G;if(m4(U,$.slice(J,X),!0),N===44)m4(I,z,U),U=Object.create(null),z=void 0;J=X=-1}else if(N===61&&J!==-1&&X===-1)v=$.slice(J,G),J=X=-1;else throw SyntaxError(`Unexpected character at index ${G}`);else if(u){if(t0[N]!==1)throw SyntaxError(`Unexpected character at index ${G}`);if(J===-1)J=G;else if(!_)_=!0;u=!1}else if(g)if(t0[N]===1){if(J===-1)J=G}else if(N===34&&J!==-1)g=!1,X=G;else if(N===92)u=!0;else throw SyntaxError(`Unexpected character at index ${G}`);else if(N===34&&$.charCodeAt(G-1)===61)g=!0;else if(X===-1&&t0[N]===1){if(J===-1)J=G}else if(J!==-1&&(N===32||N===9)){if(X===-1)X=G}else if(N===59||N===44){if(J===-1)throw SyntaxError(`Unexpected character at index ${G}`);if(X===-1)X=G;let T=$.slice(J,X);if(_)T=T.replace(/\\/g,""),_=!1;if(m4(U,v,T),N===44)m4(I,z,U),U=Object.create(null),z=void 0;v=void 0,J=X=-1}else throw SyntaxError(`Unexpected character at index ${G}`);if(J===-1||g||N===32||N===9)throw SyntaxError("Unexpected end of input");if(X===-1)X=G;let q=$.slice(J,X);if(z===void 0)m4(I,q,U);else{if(v===void 0)m4(U,q,!0);else if(_)m4(U,v,q.replace(/\\/g,""));else m4(U,v,q);m4(I,z,U)}return I}function TC($){return Object.keys($).map((I)=>{let U=$[I];if(!Array.isArray(U))U=[U];return U.map((_)=>{return[I].concat(Object.keys(_).map((u)=>{let g=_[u];if(!Array.isArray(g))g=[g];return g.map((z)=>z===!0?u:`${u}=${z}`).join("; ")})).join("; ")}).join(", ")}).join(", ")}sY.exports={format:TC,parse:QC}});var E2=E((bm,XO)=>{var HC=g$("events"),YC=g$("https"),OC=g$("http"),uO=g$("net"),VC=g$("tls"),{randomBytes:BC,createHash:DC}=g$("crypto"),{Duplex:Zm,Readable:Am}=g$("stream"),{URL:C9}=g$("url"),x6=d0(),MC=j9(),KC=S9(),{isBlob:LC}=BI(),{BINARY_TYPES:$O,CLOSE_TIMEOUT:RC,EMPTY_BUFFER:F2,GUID:WC,kForOnEventAttribute:f9,kListener:PC,kStatusCode:ZC,kWebSocket:S$,NOOP:UO}=_6(),{EventTarget:{addEventListener:AC,removeEventListener:bC}}=eY(),{format:jC,parse:FC}=E9(),{toBuffer:SC}=h0(),_O=Symbol("kAborted"),x9=[8,13],z6=["CONNECTING","OPEN","CLOSING","CLOSED"],wC=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class h extends HC{constructor($,I,U){super();if(this._binaryType=$O[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=F2,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=h.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,$!==null){if(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,I===void 0)I=[];else if(!Array.isArray(I))if(typeof I==="object"&&I!==null)U=I,I=[];else I=[I];gO(this,$,I,U)}else this._autoPong=U.autoPong,this._closeTimeout=U.closeTimeout,this._isServer=!0}get binaryType(){return this._binaryType}set binaryType($){if(!$O.includes($))return;if(this._binaryType=$,this._receiver)this._receiver._binaryType=$}get bufferedAmount(){if(!this._socket)return this._bufferedAmount;return this._socket._writableState.length+this._sender._bufferedBytes}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket($,I,U){let _=new MC({allowSynchronousEvents:U.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:U.maxPayload,skipUTF8Validation:U.skipUTF8Validation}),u=new KC($,this._extensions,U.generateMask);if(this._receiver=_,this._sender=u,this._socket=$,_[S$]=this,u[S$]=this,$[S$]=this,_.on("conclude",fC),_.on("drain",xC),_.on("error",kC),_.on("message",yC),_.on("ping",iC),_.on("pong",nC),u.onerror=rC,$.setTimeout)$.setTimeout(0);if($.setNoDelay)$.setNoDelay();if(I.length>0)$.unshift(I);$.on("close",JO),$.on("data",w2),$.on("end",NO),$.on("error",GO),this._readyState=h.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=h.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}if(this._extensions[x6.extensionName])this._extensions[x6.extensionName].cleanup();this._receiver.removeAllListeners(),this._readyState=h.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close($,I){if(this.readyState===h.CLOSED)return;if(this.readyState===h.CONNECTING){X4(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===h.CLOSING){if(this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted))this._socket.end();return}this._readyState=h.CLOSING,this._sender.close($,I,!this._isServer,(U)=>{if(U)return;if(this._closeFrameSent=!0,this._closeFrameReceived||this._receiver._writableState.errorEmitted)this._socket.end()}),vO(this)}pause(){if(this.readyState===h.CONNECTING||this.readyState===h.CLOSED)return;this._paused=!0,this._socket.pause()}ping($,I,U){if(this.readyState===h.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof $==="function")U=$,$=I=void 0;else if(typeof I==="function")U=I,I=void 0;if(typeof $==="number")$=$.toString();if(this.readyState!==h.OPEN){k9(this,$,U);return}if(I===void 0)I=!this._isServer;this._sender.ping($||F2,I,U)}pong($,I,U){if(this.readyState===h.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof $==="function")U=$,$=I=void 0;else if(typeof I==="function")U=I,I=void 0;if(typeof $==="number")$=$.toString();if(this.readyState!==h.OPEN){k9(this,$,U);return}if(I===void 0)I=!this._isServer;this._sender.pong($||F2,I,U)}resume(){if(this.readyState===h.CONNECTING||this.readyState===h.CLOSED)return;if(this._paused=!1,!this._receiver._writableState.needDrain)this._socket.resume()}send($,I,U){if(this.readyState===h.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof I==="function")U=I,I={};if(typeof $==="number")$=$.toString();if(this.readyState!==h.OPEN){k9(this,$,U);return}let _={binary:typeof $!=="string",mask:!this._isServer,compress:!0,fin:!0,...I};if(!this._extensions[x6.extensionName])_.compress=!1;this._sender.send($||F2,_,U)}terminate(){if(this.readyState===h.CLOSED)return;if(this.readyState===h.CONNECTING){X4(this,this._req,"WebSocket was closed before the connection was established");return}if(this._socket)this._readyState=h.CLOSING,this._socket.destroy()}}Object.defineProperty(h,"CONNECTING",{enumerable:!0,value:z6.indexOf("CONNECTING")});Object.defineProperty(h.prototype,"CONNECTING",{enumerable:!0,value:z6.indexOf("CONNECTING")});Object.defineProperty(h,"OPEN",{enumerable:!0,value:z6.indexOf("OPEN")});Object.defineProperty(h.prototype,"OPEN",{enumerable:!0,value:z6.indexOf("OPEN")});Object.defineProperty(h,"CLOSING",{enumerable:!0,value:z6.indexOf("CLOSING")});Object.defineProperty(h.prototype,"CLOSING",{enumerable:!0,value:z6.indexOf("CLOSING")});Object.defineProperty(h,"CLOSED",{enumerable:!0,value:z6.indexOf("CLOSED")});Object.defineProperty(h.prototype,"CLOSED",{enumerable:!0,value:z6.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(($)=>{Object.defineProperty(h.prototype,$,{enumerable:!0})});["open","error","close","message"].forEach(($)=>{Object.defineProperty(h.prototype,`on${$}`,{enumerable:!0,get(){for(let I of this.listeners($))if(I[f9])return I[PC];return null},set(I){for(let U of this.listeners($))if(U[f9]){this.removeListener($,U);break}if(typeof I!=="function")return;this.addEventListener($,I,{[f9]:!0})}})});h.prototype.addEventListener=AC;h.prototype.removeEventListener=bC;XO.exports=h;function gO($,I,U,_){let u={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:RC,protocolVersion:x9[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,..._,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if($._autoPong=u.autoPong,$._closeTimeout=u.closeTimeout,!x9.includes(u.protocolVersion))throw RangeError(`Unsupported protocol version: ${u.protocolVersion} (supported versions: ${x9.join(", ")})`);let g;if(I instanceof C9)g=I;else try{g=new C9(I)}catch(Q){throw SyntaxError(`Invalid URL: ${I}`)}if(g.protocol==="http:")g.protocol="ws:";else if(g.protocol==="https:")g.protocol="wss:";$._url=g.href;let z=g.protocol==="wss:",v=g.protocol==="ws+unix:",J;if(g.protocol!=="ws:"&&!z&&!v)J=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`;else if(v&&!g.pathname)J="The URL's pathname is empty";else if(g.hash)J="The URL contains a fragment identifier";if(J){let Q=SyntaxError(J);if($._redirects===0)throw Q;else{S2($,Q);return}}let N=z?443:80,X=BC(16).toString("base64"),G=z?YC.request:OC.request,q=new Set,T;if(u.createConnection=u.createConnection||(z?CC:EC),u.defaultPort=u.defaultPort||N,u.port=g.port||N,u.host=g.hostname.startsWith("[")?g.hostname.slice(1,-1):g.hostname,u.headers={...u.headers,"Sec-WebSocket-Version":u.protocolVersion,"Sec-WebSocket-Key":X,Connection:"Upgrade",Upgrade:"websocket"},u.path=g.pathname+g.search,u.timeout=u.handshakeTimeout,u.perMessageDeflate)T=new x6(u.perMessageDeflate!==!0?u.perMessageDeflate:{},!1,u.maxPayload),u.headers["Sec-WebSocket-Extensions"]=jC({[x6.extensionName]:T.offer()});if(U.length){for(let Q of U){if(typeof Q!=="string"||!wC.test(Q)||q.has(Q))throw SyntaxError("An invalid or duplicated subprotocol was specified");q.add(Q)}u.headers["Sec-WebSocket-Protocol"]=U.join(",")}if(u.origin)if(u.protocolVersion<13)u.headers["Sec-WebSocket-Origin"]=u.origin;else u.headers.Origin=u.origin;if(g.username||g.password)u.auth=`${g.username}:${g.password}`;if(v){let Q=u.path.split(":");u.socketPath=Q[0],u.path=Q[1]}let H;if(u.followRedirects){if($._redirects===0){$._originalIpc=v,$._originalSecure=z,$._originalHostOrSocketPath=v?u.socketPath:g.host;let Q=_&&_.headers;if(_={..._,headers:{}},Q)for(let[Y,K]of Object.entries(Q))_.headers[Y.toLowerCase()]=K}else if($.listenerCount("redirect")===0){let Q=v?$._originalIpc?u.socketPath===$._originalHostOrSocketPath:!1:$._originalIpc?!1:g.host===$._originalHostOrSocketPath;if(!Q||$._originalSecure&&!z){if(delete u.headers.authorization,delete u.headers.cookie,!Q)delete u.headers.host;u.auth=void 0}}if(u.auth&&!_.headers.authorization)_.headers.authorization="Basic "+Buffer.from(u.auth).toString("base64");if(H=$._req=G(u),$._redirects)$.emit("redirect",$.url,H)}else H=$._req=G(u);if(u.timeout)H.on("timeout",()=>{X4($,H,"Opening handshake has timed out")});if(H.on("error",(Q)=>{if(H===null||H[_O])return;H=$._req=null,S2($,Q)}),H.on("response",(Q)=>{let Y=Q.headers.location,K=Q.statusCode;if(Y&&u.followRedirects&&K>=300&&K<400){if(++$._redirects>u.maxRedirects){X4($,H,"Maximum redirects exceeded");return}H.abort();let L;try{L=new C9(Y,I)}catch(P){let O=SyntaxError(`Invalid URL: ${Y}`);S2($,O);return}gO($,L,U,_)}else if(!$.emit("unexpected-response",H,Q))X4($,H,`Unexpected server response: ${Q.statusCode}`)}),H.on("upgrade",(Q,Y,K)=>{if($.emit("upgrade",Q),$.readyState!==h.CONNECTING)return;H=$._req=null;let L=Q.headers.upgrade;if(L===void 0||L.toLowerCase()!=="websocket"){X4($,Y,"Invalid Upgrade header");return}let P=DC("sha1").update(X+WC).digest("base64");if(Q.headers["sec-websocket-accept"]!==P){X4($,Y,"Invalid Sec-WebSocket-Accept header");return}let O=Q.headers["sec-websocket-protocol"],B;if(O!==void 0){if(!q.size)B="Server sent a subprotocol but none was requested";else if(!q.has(O))B="Server sent an invalid subprotocol"}else if(q.size)B="Server sent no subprotocol";if(B){X4($,Y,B);return}if(O)$._protocol=O;let R=Q.headers["sec-websocket-extensions"];if(R!==void 0){if(!T){X4($,Y,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let D;try{D=FC(R)}catch(F){X4($,Y,"Invalid Sec-WebSocket-Extensions header");return}let M=Object.keys(D);if(M.length!==1||M[0]!==x6.extensionName){X4($,Y,"Server indicated an extension that was not requested");return}try{T.accept(D[x6.extensionName])}catch(F){X4($,Y,"Invalid Sec-WebSocket-Extensions header");return}$._extensions[x6.extensionName]=T}$.setSocket(Y,K,{allowSynchronousEvents:u.allowSynchronousEvents,generateMask:u.generateMask,maxPayload:u.maxPayload,skipUTF8Validation:u.skipUTF8Validation})}),u.finishRequest)u.finishRequest(H,$);else H.end()}function S2($,I){$._readyState=h.CLOSING,$._errorEmitted=!0,$.emit("error",I),$.emitClose()}function EC($){return $.path=$.socketPath,uO.connect($)}function CC($){if($.path=void 0,!$.servername&&$.servername!=="")$.servername=uO.isIP($.host)?"":$.host;return VC.connect($)}function X4($,I,U){$._readyState=h.CLOSING;let _=Error(U);if(Error.captureStackTrace(_,X4),I.setHeader){if(I[_O]=!0,I.abort(),I.socket&&!I.socket.destroyed)I.socket.destroy();process.nextTick(S2,$,_)}else I.destroy(_),I.once("error",$.emit.bind($,"error")),I.once("close",$.emitClose.bind($))}function k9($,I,U){if(I){let _=LC(I)?I.size:SC(I).length;if($._socket)$._sender._bufferedBytes+=_;else $._bufferedAmount+=_}if(U){let _=Error(`WebSocket is not open: readyState ${$.readyState} (${z6[$.readyState]})`);process.nextTick(U,_)}}function fC($,I){let U=this[S$];if(U._closeFrameReceived=!0,U._closeMessage=I,U._closeCode=$,U._socket[S$]===void 0)return;if(U._socket.removeListener("data",w2),process.nextTick(zO,U._socket),$===1005)U.close();else U.close($,I)}function xC(){let $=this[S$];if(!$.isPaused)$._socket.resume()}function kC($){let I=this[S$];if(I._socket[S$]!==void 0)I._socket.removeListener("data",w2),process.nextTick(zO,I._socket),I.close($[ZC]);if(!I._errorEmitted)I._errorEmitted=!0,I.emit("error",$)}function IO(){this[S$].emitClose()}function yC($,I){this[S$].emit("message",$,I)}function iC($){let I=this[S$];if(I._autoPong)I.pong($,!this._isServer,UO);I.emit("ping",$)}function nC($){this[S$].emit("pong",$)}function zO($){$.resume()}function rC($){let I=this[S$];if(I.readyState===h.CLOSED)return;if(I.readyState===h.OPEN)I._readyState=h.CLOSING,vO(I);if(this._socket.end(),!I._errorEmitted)I._errorEmitted=!0,I.emit("error",$)}function vO($){$._closeTimer=setTimeout($._socket.destroy.bind($._socket),$._closeTimeout)}function JO(){let $=this[S$];if(this.removeListener("close",JO),this.removeListener("data",w2),this.removeListener("end",NO),$._readyState=h.CLOSING,!this._readableState.endEmitted&&!$._closeFrameReceived&&!$._receiver._writableState.errorEmitted&&this._readableState.length!==0){let I=this.read(this._readableState.length);$._receiver.write(I)}if($._receiver.end(),this[S$]=void 0,clearTimeout($._closeTimer),$._receiver._writableState.finished||$._receiver._writableState.errorEmitted)$.emitClose();else $._receiver.on("error",IO),$._receiver.on("finish",IO)}function w2($){if(!this[S$]._receiver.write($))this.pause()}function NO(){let $=this[S$];$._readyState=h.CLOSING,$._receiver.end(),this.end()}function GO(){let $=this[S$];if(this.removeListener("error",GO),this.on("error",UO),$)$._readyState=h.CLOSING,this.destroy()}});var HO=E((Fm,TO)=>{var jm=E2(),{Duplex:lC}=g$("stream");function qO($){$.emit("close")}function mC(){if(!this.destroyed&&this._writableState.finished)this.destroy()}function QO($){if(this.removeListener("error",QO),this.destroy(),this.listenerCount("error")===0)this.emit("error",$)}function hC($,I){let U=!0,_=new lC({...I,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return $.on("message",function(g,z){let v=!z&&_._readableState.objectMode?g.toString():g;if(!_.push(v))$.pause()}),$.once("error",function(g){if(_.destroyed)return;U=!1,_.destroy(g)}),$.once("close",function(){if(_.destroyed)return;_.push(null)}),_._destroy=function(u,g){if($.readyState===$.CLOSED){g(u),process.nextTick(qO,_);return}let z=!1;if($.once("error",function(J){z=!0,g(J)}),$.once("close",function(){if(!z)g(u);process.nextTick(qO,_)}),U)$.terminate()},_._final=function(u){if($.readyState===$.CONNECTING){$.once("open",function(){_._final(u)});return}if($._socket===null)return;if($._socket._writableState.finished){if(u(),_._readableState.endEmitted)_.destroy()}else $._socket.once("finish",function(){u()}),$.close()},_._read=function(){if($.isPaused)$.resume()},_._write=function(u,g,z){if($.readyState===$.CONNECTING){$.once("open",function(){_._write(u,g,z)});return}$.send(u,z)},_.on("end",mC),_.on("error",QO),_}TO.exports=hC});var OO=E((Sm,YO)=>{var{tokenChars:cC}=BI();function dC($){let I=new Set,U=-1,_=-1,u=0;for(u;u<$.length;u++){let z=$.charCodeAt(u);if(_===-1&&cC[z]===1){if(U===-1)U=u}else if(u!==0&&(z===32||z===9)){if(_===-1&&U!==-1)_=u}else if(z===44){if(U===-1)throw SyntaxError(`Unexpected character at index ${u}`);if(_===-1)_=u;let v=$.slice(U,_);if(I.has(v))throw SyntaxError(`The "${v}" subprotocol is duplicated`);I.add(v),U=_=-1}else throw SyntaxError(`Unexpected character at index ${u}`)}if(U===-1||_!==-1)throw SyntaxError("Unexpected end of input");let g=$.slice(U,u);if(I.has(g))throw SyntaxError(`The "${g}" subprotocol is duplicated`);return I.add(g),I}YO.exports={parse:dC}});var KO=E((Em,MO)=>{var pC=g$("events"),C2=g$("http"),{Duplex:wm}=g$("stream"),{createHash:oC}=g$("crypto"),VO=E9(),B1=d0(),tC=OO(),aC=E2(),{CLOSE_TIMEOUT:eC,GUID:sC,kWebSocket:$f}=_6(),If=/^[+/0-9A-Za-z]{22}==$/;class DO extends pC{constructor($,I){super();if($={allowSynchronousEvents:!0,autoPong:!0,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:eC,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:aC,...$},$.port==null&&!$.server&&!$.noServer||$.port!=null&&($.server||$.noServer)||$.server&&$.noServer)throw TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if($.port!=null)this._server=C2.createServer((U,_)=>{let u=C2.STATUS_CODES[426];_.writeHead(426,{"Content-Length":u.length,"Content-Type":"text/plain"}),_.end(u)}),this._server.listen($.port,$.host,$.backlog,I);else if($.server)this._server=$.server;if(this._server){let U=this.emit.bind(this,"connection");this._removeListeners=uf(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(_,u,g)=>{this.handleUpgrade(_,u,g,U)}})}if($.perMessageDeflate===!0)$.perMessageDeflate={};if($.clientTracking)this.clients=new Set,this._shouldEmitClose=!1;this.options=$,this._state=0}address(){if(this.options.noServer)throw Error('The server is operating in "noServer" mode');if(!this._server)return null;return this._server.address()}close($){if(this._state===2){if($)this.once("close",()=>{$(Error("The server is not running"))});process.nextTick(a0,this);return}if($)this.once("close",$);if(this._state===1)return;if(this._state=1,this.options.noServer||this.options.server){if(this._server)this._removeListeners(),this._removeListeners=this._server=null;if(this.clients)if(!this.clients.size)process.nextTick(a0,this);else this._shouldEmitClose=!0;else process.nextTick(a0,this)}else{let I=this._server;this._removeListeners(),this._removeListeners=this._server=null,I.close(()=>{a0(this)})}}shouldHandle($){if(this.options.path){let I=$.url.indexOf("?");if((I!==-1?$.url.slice(0,I):$.url)!==this.options.path)return!1}return!0}handleUpgrade($,I,U,_){I.on("error",BO);let u=$.headers["sec-websocket-key"],g=$.headers.upgrade,z=+$.headers["sec-websocket-version"];if($.method!=="GET"){D1(this,$,I,405,"Invalid HTTP method");return}if(g===void 0||g.toLowerCase()!=="websocket"){D1(this,$,I,400,"Invalid Upgrade header");return}if(u===void 0||!If.test(u)){D1(this,$,I,400,"Missing or invalid Sec-WebSocket-Key header");return}if(z!==13&&z!==8){D1(this,$,I,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle($)){e0(I,400);return}let v=$.headers["sec-websocket-protocol"],J=new Set;if(v!==void 0)try{J=tC.parse(v)}catch(G){D1(this,$,I,400,"Invalid Sec-WebSocket-Protocol header");return}let N=$.headers["sec-websocket-extensions"],X={};if(this.options.perMessageDeflate&&N!==void 0){let G=new B1(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let q=VO.parse(N);if(q[B1.extensionName])G.accept(q[B1.extensionName]),X[B1.extensionName]=G}catch(q){D1(this,$,I,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let G={origin:$.headers[`${z===8?"sec-websocket-origin":"origin"}`],secure:!!($.socket.authorized||$.socket.encrypted),req:$};if(this.options.verifyClient.length===2){this.options.verifyClient(G,(q,T,H,Q)=>{if(!q)return e0(I,T||401,H,Q);this.completeUpgrade(X,u,J,$,I,U,_)});return}if(!this.options.verifyClient(G))return e0(I,401)}this.completeUpgrade(X,u,J,$,I,U,_)}completeUpgrade($,I,U,_,u,g,z){if(!u.readable||!u.writable)return u.destroy();if(u[$f])throw Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>0)return e0(u,503);let J=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${oC("sha1").update(I+sC).digest("base64")}`],N=new this.options.WebSocket(null,void 0,this.options);if(U.size){let X=this.options.handleProtocols?this.options.handleProtocols(U,_):U.values().next().value;if(X)J.push(`Sec-WebSocket-Protocol: ${X}`),N._protocol=X}if($[B1.extensionName]){let X=$[B1.extensionName].params,G=VO.format({[B1.extensionName]:[X]});J.push(`Sec-WebSocket-Extensions: ${G}`),N._extensions=$}if(this.emit("headers",J,_),u.write(J.concat(`\r
281
+ Co-Authored-By: First Fluke <our.first.fluke@gmail.com>`,pr:"Generated with [oh-my-agent](https://github.com/first-fluke/oh-my-agent)"},G2(Q,`${JSON.stringify(V,null,2)}
282
+ `),d.success(M$.default.green("Claude Code recommended settings applied!"))}}catch(V){d.warn(`Could not configure Claude Code settings: ${V}`)}if(H){let V=!1;try{S6("codex --version",{stdio:"ignore"}),V=!0}catch{}if(V){let B=!1;try{B=S6("claude plugin list",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).includes("codex@openai-codex")}catch{}if(!B)try{S6("claude plugin marketplace add openai/codex-plugin-cc",{stdio:"ignore"}),S6("claude plugin install codex@openai-codex",{stdio:"ignore"}),d.success(M$.default.green("Codex plugin installed for Claude Code!"))}catch(O){d.warn(`Could not install Codex plugin: ${O}`)}}}let Y=Q1(T,".gemini","antigravity","mcp_config.json"),M=null,L=!1;try{if(OI(Y)){let V=N2(Y,"utf-8");M=JSON.parse(V),L=!0}}catch(V){}if(L&&M&&M.mcpServers){let V=M.mcpServers.serena,B="oh-my-agent@latest";if(!(V&&V.command==="npx"&&Array.isArray(V.args)&&V.args.includes("oh-my-agent@latest")&&V.args.includes("bridge"))){let b=await O$({message:"Configure Serena MCP with bridge? (Required for full functionality)",initialValue:!0});if(e(b));else if(b){M.mcpServers.serena={command:"npx",args:["-y","oh-my-agent@latest","bridge","http://localhost:12341/mcp"],disabled:!1};try{G2(Y,JSON.stringify(M,null,2)),d.success(M$.default.green("Serena MCP configured successfully!"))}catch(A){d.error(`Failed to update MCP config: ${A}`)}}}}let P=Q1(T,".gemini","settings.json"),R=null,K=!1;try{if(OI(P)){let V=N2(P,"utf-8");R=JSON.parse(V),K=!0}}catch(V){}if(K&&R&&R.mcpServers){let V=R.mcpServers.serena;if(!(V&&V.url==="http://localhost:12341/mcp")){let O=await O$({message:"Configure Serena for Gemini CLI? (HTTP Mode)",initialValue:!0});if(e(O));else if(O){R.mcpServers.serena={url:"http://localhost:12341/mcp"};try{G2(P,JSON.stringify(R,null,2)),d.success(M$.default.green("Gemini CLI configured successfully!"))}catch(b){d.error(`Failed to update Gemini config: ${b}`)}}}}if(p(M$.default.green("Done! Open your project in your IDE to use the skills.")),N1()&&r4()&&!G1()){let V=await O$({message:`${M$.default.yellow("⭐")} Star ${M$.default.cyan(L$)} on GitHub? It helps a lot!`});if(!e(V)&&V)try{S6(`gh api -X PUT /user/starred/${L$}`,{stdio:"ignore"}),d.success(`Starred ${M$.default.cyan(L$)}! Thank you! \uD83C\uDF1F`)}catch{d.warn(`Could not star automatically. Try: ${M$.default.dim(`gh api --method PUT /user/starred/${L$}`)}`)}}}catch(q){I.stop("Installation failed"),d.error(q instanceof Error?q.message:String(q)),process.exit(1)}}var M$,cS;var eG=_4(()=>{U4();pG();QI();oG();s4();aG();M$=q$(b$(),1),cS={en:"English",ko:"한국어",ja:"日本語",zh:"中文",vi:"Tiếng Việt",de:"Deutsch",es:"Español",fr:"Français",nl:"Nederlands",pl:"Polski",pt:"Português",ru:"Русский"}});import{execSync as T1}from"node:child_process";function Q2($){try{let U=T1("git diff --stat HEAD~10 2>/dev/null || git diff --stat",{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
283
+ `),_=U[U.length-1]||"",u=_.match(/(\d+) files? changed/),z=_.match(/(\d+) insertions?\(\+\)/),g=_.match(/(\d+) deletions?\(-\)/);return{filesChanged:u?.[1]?parseInt(u[1],10):0,linesAdded:z?.[1]?parseInt(z[1],10):0,linesRemoved:g?.[1]?parseInt(g[1],10):0}}catch{return{filesChanged:0,linesAdded:0,linesRemoved:0}}}function OH($,I=5){try{return T1(`git log --oneline -${I} 2>/dev/null`,{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
284
+ `).filter(Boolean)}catch{return[]}}function z9($){try{return T1("git diff --name-only HEAD~5 2>/dev/null || git diff --name-only",{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
285
+ `).filter(Boolean).slice(0,10)}catch{return[]}}function YH($,I=10){try{return T1(`git log --format="%s" -${I} 2>/dev/null`,{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
286
+ `).filter(Boolean)}catch{return[]}}function VH($){let I={},U=/^(feat|fix|docs|style|refactor|test|chore|build|ci|perf)(\(.+\))?:/;for(let _ of $){let u=_.match(U);if(u){let z=u[1];if(z)I[z]=(I[z]||0)+1}}return I}function BH($){try{let I=`${$}/.serena/retrospectives`,U=T1(`ls -t "${I}"/*.json 2>/dev/null | head -1`,{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim();if(!U)return null;let _=T1(`cat "${U}"`,{encoding:"utf-8",stdio:["pipe","pipe","ignore"]});return JSON.parse(_).date||null}catch{return null}}function DH($,I){if(!I)return YH($,10);try{let _=new Date(I).toISOString().split("T")[0];return T1(`git log --format="%s" --since="${_}" 2>/dev/null`,{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
287
+ `).filter(Boolean)}catch{return YH($,10)}}var g9=()=>{};var RH={};B4(RH,{retro:()=>qw});import{existsSync as KH,mkdirSync as gw,readdirSync as vw,readFileSync as Jw,writeFileSync as Nw}from"node:fs";import{join as v9}from"node:path";function J9($){return v9($,".serena","retrospectives")}function Gw($){let I=J9($);if(!KH(I))return[];try{return vw(I).filter((_)=>_.endsWith(".json")).sort().reverse().slice(0,10).map((_)=>JSON.parse(Jw(v9(I,_),"utf-8")))}catch{return[]}}function MH($,I){let U=J9($);if(!KH(U))gw(U,{recursive:!0});let _=`${I.date.replace(/[:.]/g,"-")}_${I.id}.json`;Nw(v9(U,_),JSON.stringify(I,null,2),"utf-8")}function Xw($){let I=BH($),U=DH($,I),_=VH(U),u=Q2($),z=K7($),g=L7($,I||void 0),v=Object.entries(_).sort(([,G],[,q])=>q-G)[0],J="Development session";if(v){let[G]=v;J={feat:"Feature development",fix:"Bug fixes and improvements",refactor:"Code refactoring",docs:"Documentation updates",test:"Testing improvements",chore:"Maintenance tasks",build:"Build system updates",perf:"Performance improvements"}[G]||"Development session"}if(u.filesChanged>0)J+=` (${u.filesChanged} files, +${u.linesAdded}/-${u.linesRemoved})`;if(z.agents.length>0)J+=` with ${z.agents.join(", ")}`;let N=W7(g);if(U.length>0&&N.length===0){if(_.refactor||_.perf)N.push("Code quality and performance improvements");if(_.test)N.push("Enhanced test coverage");if(_.fix)N.push("Issue resolution and stability improvements")}let X=[];if(z.inProgressTasks.length>0)X.push(...z.inProgressTasks.slice(0,3));if(U.length>0){let G=U[0]?.toLowerCase()||"";if(G.includes("wip")||G.includes("todo"))X.push("Complete work-in-progress items")}if(X.length===0)X.push("Continue development","Review and test changes");return{summary:J,learnings:N.slice(0,5),nextSteps:X.slice(0,5)}}async function qw(){let $=process.cwd(),I=J9($),U=Gw($);console.clear(),V$(j$.default.bgMagenta(j$.default.white(" retro (interactive) ")));let _=U[0];if(_)k([j$.default.bold("Last Retrospective"),`Date: ${_.date}`,"",j$.default.bold("Summary:"),_.summary,"",j$.default.bold("Key Learnings:"),..._.keyLearnings.map((G)=>` - ${G}`),"",j$.default.bold("Next Steps:"),..._.nextSteps.map((G)=>` > ${G}`)].join(`
288
+ `),"Previous Session");let u=await b6({message:"What would you like to do?",options:[{value:"auto",label:"Auto-generate from git history",hint:"Analyze commits and agent activity"},{value:"manual",label:"Create manually",hint:"Write your own retrospective"},{value:"list",label:"View past retrospectives"},{value:"exit",label:"Exit"}]});if(e(u)||u==="exit"){p(j$.default.dim("Goodbye!"));return}if(u==="list"){if(U.length===0)k(j$.default.yellow("No retrospectives found."),"History");else{let G=U.map((q,T)=>`${T+1}. [${q.date.split("T")[0]}] ${q.summary.slice(0,50)}...`).join(`
289
+ `);k(G,`Past Retrospectives (${U.length})`)}p(j$.default.dim(`Stored in: ${I}`));return}if(u==="auto"){let{summary:G,learnings:q,nextSteps:T}=Xw($),H=z9($);k([j$.default.bold("Auto-generated Content"),"",j$.default.bold("Summary:"),G,"",j$.default.bold("Key Learnings:"),...q.map((M)=>` - ${M}`),"",j$.default.bold("Next Steps:"),...T.map((M)=>` > ${M}`)].join(`
290
+ `),"Preview");let Q=await O$({message:"Save this retrospective?",initialValue:!0});if(e(Q)||!Q){I4("Cancelled.");return}let Y={id:Math.random().toString(36).slice(2,8),date:new Date().toISOString(),summary:G,keyLearnings:q,filesChanged:H,nextSteps:T};MH($,Y),k(j$.default.green("Retrospective saved!"),"Done"),p(j$.default.dim(`Stored in: ${I}`));return}let z=OH($),g=z9($);if(z.length>0)k(z.join(`
291
+ `),"Recent Commits");if(g.length>0)k(g.join(`
292
+ `),"Changed Files");let v=await p_({message:"What did you accomplish in this session?",placeholder:"e.g., Implemented user authentication flow"});if(e(v)){I4("Cancelled.");return}let J=await p_({message:"Key learnings? (comma-separated)",placeholder:"e.g., JWT needs refresh token, bcrypt is slow"});if(e(J)){I4("Cancelled.");return}let N=await p_({message:"Next steps? (comma-separated)",placeholder:"e.g., Add password reset, Write tests"});if(e(N)){I4("Cancelled.");return}let X={id:Math.random().toString(36).slice(2,8),date:new Date().toISOString(),summary:v,keyLearnings:J.split(",").map((G)=>G.trim()).filter(Boolean),filesChanged:g,nextSteps:N.split(",").map((G)=>G.trim()).filter(Boolean)};MH($,X),k(j$.default.green("Retrospective saved!"),"Done"),p(j$.default.dim(`Stored in: ${I}`))}var j$;var LH=_4(()=>{U4();g9();w0();j$=q$(b$(),1)});var _6=E((Mm,WY)=>{var RY=["nodebuffer","arraybuffer","fragments"],LY=typeof Blob<"u";if(LY)RY.push("blob");WY.exports={BINARY_TYPES:RY,CLOSE_TIMEOUT:30000,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:LY,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var c0=E((Km,P2)=>{var{EMPTY_BUFFER:rE}=_6(),W9=Buffer[Symbol.species];function lE($,I){if($.length===0)return rE;if($.length===1)return $[0];let U=Buffer.allocUnsafe(I),_=0;for(let u=0;u<$.length;u++){let z=$[u];U.set(z,_),_+=z.length}if(_<I)return new W9(U.buffer,U.byteOffset,_);return U}function PY($,I,U,_,u){for(let z=0;z<u;z++)U[_+z]=$[z]^I[z&3]}function ZY($,I){for(let U=0;U<$.length;U++)$[U]^=I[U&3]}function mE($){if($.length===$.buffer.byteLength)return $.buffer;return $.buffer.slice($.byteOffset,$.byteOffset+$.length)}function P9($){if(P9.readOnly=!0,Buffer.isBuffer($))return $;let I;if($ instanceof ArrayBuffer)I=new W9($);else if(ArrayBuffer.isView($))I=new W9($.buffer,$.byteOffset,$.byteLength);else I=Buffer.from($),P9.readOnly=!1;return I}P2.exports={concat:lE,mask:PY,toArrayBuffer:mE,toBuffer:P9,unmask:ZY};if(!process.env.WS_NO_BUFFER_UTIL)try{let $=(()=>{throw new Error("Cannot require module "+"bufferutil");})();P2.exports.mask=function(I,U,_,u,z){if(z<48)PY(I,U,_,u,z);else $.mask(I,U,_,u,z)},P2.exports.unmask=function(I,U){if(I.length<32)ZY(I,U);else $.unmask(I,U)}}catch($){}});var FY=E((Rm,jY)=>{var AY=Symbol("kDone"),Z9=Symbol("kRun");class bY{constructor($){this[AY]=()=>{this.pending--,this[Z9]()},this.concurrency=$||1/0,this.jobs=[],this.pending=0}add($){this.jobs.push($),this[Z9]()}[Z9](){if(this.pending===this.concurrency)return;if(this.jobs.length){let $=this.jobs.shift();this.pending++,$(this[AY])}}}jY.exports=bY});var p0=E((Lm,fY)=>{var d0=z$("zlib"),SY=c0(),hE=FY(),{kStatusCode:wY}=_6(),cE=Buffer[Symbol.species],dE=Buffer.from([0,0,255,255]),A2=Symbol("permessage-deflate"),z6=Symbol("total-length"),BI=Symbol("callback"),f6=Symbol("buffers"),DI=Symbol("error"),Z2;class EY{constructor($,I,U){if(this._maxPayload=U|0,this._options=$||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!I,this._deflate=null,this._inflate=null,this.params=null,!Z2){let _=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;Z2=new hE(_)}}static get extensionName(){return"permessage-deflate"}offer(){let $={};if(this._options.serverNoContextTakeover)$.server_no_context_takeover=!0;if(this._options.clientNoContextTakeover)$.client_no_context_takeover=!0;if(this._options.serverMaxWindowBits)$.server_max_window_bits=this._options.serverMaxWindowBits;if(this._options.clientMaxWindowBits)$.client_max_window_bits=this._options.clientMaxWindowBits;else if(this._options.clientMaxWindowBits==null)$.client_max_window_bits=!0;return $}accept($){return $=this.normalizeParams($),this.params=this._isServer?this.acceptAsServer($):this.acceptAsClient($),this.params}cleanup(){if(this._inflate)this._inflate.close(),this._inflate=null;if(this._deflate){let $=this._deflate[BI];if(this._deflate.close(),this._deflate=null,$)$(Error("The deflate stream was closed while data was being processed"))}}acceptAsServer($){let I=this._options,U=$.find((_)=>{if(I.serverNoContextTakeover===!1&&_.server_no_context_takeover||_.server_max_window_bits&&(I.serverMaxWindowBits===!1||typeof I.serverMaxWindowBits==="number"&&I.serverMaxWindowBits>_.server_max_window_bits)||typeof I.clientMaxWindowBits==="number"&&!_.client_max_window_bits)return!1;return!0});if(!U)throw Error("None of the extension offers can be accepted");if(I.serverNoContextTakeover)U.server_no_context_takeover=!0;if(I.clientNoContextTakeover)U.client_no_context_takeover=!0;if(typeof I.serverMaxWindowBits==="number")U.server_max_window_bits=I.serverMaxWindowBits;if(typeof I.clientMaxWindowBits==="number")U.client_max_window_bits=I.clientMaxWindowBits;else if(U.client_max_window_bits===!0||I.clientMaxWindowBits===!1)delete U.client_max_window_bits;return U}acceptAsClient($){let I=$[0];if(this._options.clientNoContextTakeover===!1&&I.client_no_context_takeover)throw Error('Unexpected parameter "client_no_context_takeover"');if(!I.client_max_window_bits){if(typeof this._options.clientMaxWindowBits==="number")I.client_max_window_bits=this._options.clientMaxWindowBits}else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits==="number"&&I.client_max_window_bits>this._options.clientMaxWindowBits)throw Error('Unexpected or invalid parameter "client_max_window_bits"');return I}normalizeParams($){return $.forEach((I)=>{Object.keys(I).forEach((U)=>{let _=I[U];if(_.length>1)throw Error(`Parameter "${U}" must have only a single value`);if(_=_[0],U==="client_max_window_bits"){if(_!==!0){let u=+_;if(!Number.isInteger(u)||u<8||u>15)throw TypeError(`Invalid value for parameter "${U}": ${_}`);_=u}else if(!this._isServer)throw TypeError(`Invalid value for parameter "${U}": ${_}`)}else if(U==="server_max_window_bits"){let u=+_;if(!Number.isInteger(u)||u<8||u>15)throw TypeError(`Invalid value for parameter "${U}": ${_}`);_=u}else if(U==="client_no_context_takeover"||U==="server_no_context_takeover"){if(_!==!0)throw TypeError(`Invalid value for parameter "${U}": ${_}`)}else throw Error(`Unknown parameter "${U}"`);I[U]=_})}),$}decompress($,I,U){Z2.add((_)=>{this._decompress($,I,(u,z)=>{_(),U(u,z)})})}compress($,I,U){Z2.add((_)=>{this._compress($,I,(u,z)=>{_(),U(u,z)})})}_decompress($,I,U){let _=this._isServer?"client":"server";if(!this._inflate){let u=`${_}_max_window_bits`,z=typeof this.params[u]!=="number"?d0.Z_DEFAULT_WINDOWBITS:this.params[u];this._inflate=d0.createInflateRaw({...this._options.zlibInflateOptions,windowBits:z}),this._inflate[A2]=this,this._inflate[z6]=0,this._inflate[f6]=[],this._inflate.on("error",oE),this._inflate.on("data",CY)}if(this._inflate[BI]=U,this._inflate.write($),I)this._inflate.write(dE);this._inflate.flush(()=>{let u=this._inflate[DI];if(u){this._inflate.close(),this._inflate=null,U(u);return}let z=SY.concat(this._inflate[f6],this._inflate[z6]);if(this._inflate._readableState.endEmitted)this._inflate.close(),this._inflate=null;else if(this._inflate[z6]=0,this._inflate[f6]=[],I&&this.params[`${_}_no_context_takeover`])this._inflate.reset();U(null,z)})}_compress($,I,U){let _=this._isServer?"server":"client";if(!this._deflate){let u=`${_}_max_window_bits`,z=typeof this.params[u]!=="number"?d0.Z_DEFAULT_WINDOWBITS:this.params[u];this._deflate=d0.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:z}),this._deflate[z6]=0,this._deflate[f6]=[],this._deflate.on("data",pE)}this._deflate[BI]=U,this._deflate.write($),this._deflate.flush(d0.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let u=SY.concat(this._deflate[f6],this._deflate[z6]);if(I)u=new cE(u.buffer,u.byteOffset,u.length-4);if(this._deflate[BI]=null,this._deflate[z6]=0,this._deflate[f6]=[],I&&this.params[`${_}_no_context_takeover`])this._deflate.reset();U(null,u)})}}fY.exports=EY;function pE($){this[f6].push($),this[z6]+=$.length}function CY($){if(this[z6]+=$.length,this[A2]._maxPayload<1||this[z6]<=this[A2]._maxPayload){this[f6].push($);return}this[DI]=RangeError("Max payload size exceeded"),this[DI].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[DI][wY]=1009,this.removeListener("data",CY),this.reset()}function oE($){if(this[A2]._inflate=null,this[DI]){this[BI](this[DI]);return}$[wY]=1007,this[BI]($)}});var MI=E((Wm,b2)=>{var{isUtf8:xY}=z$("buffer"),{hasBlob:tE}=_6(),aE=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function eE($){return $>=1000&&$<=1014&&$!==1004&&$!==1005&&$!==1006||$>=3000&&$<=4999}function A9($){let I=$.length,U=0;while(U<I)if(($[U]&128)===0)U++;else if(($[U]&224)===192){if(U+1===I||($[U+1]&192)!==128||($[U]&254)===192)return!1;U+=2}else if(($[U]&240)===224){if(U+2>=I||($[U+1]&192)!==128||($[U+2]&192)!==128||$[U]===224&&($[U+1]&224)===128||$[U]===237&&($[U+1]&224)===160)return!1;U+=3}else if(($[U]&248)===240){if(U+3>=I||($[U+1]&192)!==128||($[U+2]&192)!==128||($[U+3]&192)!==128||$[U]===240&&($[U+1]&240)===128||$[U]===244&&$[U+1]>143||$[U]>244)return!1;U+=4}else return!1;return!0}function sE($){return tE&&typeof $==="object"&&typeof $.arrayBuffer==="function"&&typeof $.type==="string"&&typeof $.stream==="function"&&($[Symbol.toStringTag]==="Blob"||$[Symbol.toStringTag]==="File")}b2.exports={isBlob:sE,isValidStatusCode:eE,isValidUTF8:A9,tokenChars:aE};if(xY)b2.exports.isValidUTF8=function($){return $.length<24?A9($):xY($)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let $=(()=>{throw new Error("Cannot require module "+"utf-8-validate");})();b2.exports.isValidUTF8=function(I){return I.length<32?A9(I):$(I)}}catch($){}});var j9=E((Pm,rY)=>{var{Writable:$C}=z$("stream"),kY=p0(),{BINARY_TYPES:IC,EMPTY_BUFFER:yY,kStatusCode:uC,kWebSocket:UC}=_6(),{concat:b9,toArrayBuffer:_C,unmask:zC}=c0(),{isValidStatusCode:gC,isValidUTF8:iY}=MI(),j2=Buffer[Symbol.species];class nY extends $C{constructor($={}){super();this._allowSynchronousEvents=$.allowSynchronousEvents!==void 0?$.allowSynchronousEvents:!0,this._binaryType=$.binaryType||IC[0],this._extensions=$.extensions||{},this._isServer=!!$.isServer,this._maxPayload=$.maxPayload|0,this._skipUTF8Validation=!!$.skipUTF8Validation,this[UC]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=0}_write($,I,U){if(this._opcode===8&&this._state==0)return U();this._bufferedBytes+=$.length,this._buffers.push($),this.startLoop(U)}consume($){if(this._bufferedBytes-=$,$===this._buffers[0].length)return this._buffers.shift();if($<this._buffers[0].length){let U=this._buffers[0];return this._buffers[0]=new j2(U.buffer,U.byteOffset+$,U.length-$),new j2(U.buffer,U.byteOffset,$)}let I=Buffer.allocUnsafe($);do{let U=this._buffers[0],_=I.length-$;if($>=U.length)I.set(this._buffers.shift(),_);else I.set(new Uint8Array(U.buffer,U.byteOffset,$),_),this._buffers[0]=new j2(U.buffer,U.byteOffset+$,U.length-$);$-=U.length}while($>0);return I}startLoop($){this._loop=!0;do switch(this._state){case 0:this.getInfo($);break;case 1:this.getPayloadLength16($);break;case 2:this.getPayloadLength64($);break;case 3:this.getMask();break;case 4:this.getData($);break;case 5:case 6:this._loop=!1;return}while(this._loop);if(!this._errored)$()}getInfo($){if(this._bufferedBytes<2){this._loop=!1;return}let I=this.consume(2);if((I[0]&48)!==0){let _=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");$(_);return}let U=(I[0]&64)===64;if(U&&!this._extensions[kY.extensionName]){let _=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");$(_);return}if(this._fin=(I[0]&128)===128,this._opcode=I[0]&15,this._payloadLength=I[1]&127,this._opcode===0){if(U){let _=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");$(_);return}if(!this._fragmented){let _=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");$(_);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let _=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");$(_);return}this._compressed=U}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let _=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");$(_);return}if(U){let _=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");$(_);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let _=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");$(_);return}}else{let _=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");$(_);return}if(!this._fin&&!this._fragmented)this._fragmented=this._opcode;if(this._masked=(I[1]&128)===128,this._isServer){if(!this._masked){let _=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");$(_);return}}else if(this._masked){let _=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");$(_);return}if(this._payloadLength===126)this._state=1;else if(this._payloadLength===127)this._state=2;else this.haveLength($)}getPayloadLength16($){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength($)}getPayloadLength64($){if(this._bufferedBytes<8){this._loop=!1;return}let I=this.consume(8),U=I.readUInt32BE(0);if(U>Math.pow(2,21)-1){let _=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");$(_);return}this._payloadLength=U*Math.pow(2,32)+I.readUInt32BE(4),this.haveLength($)}haveLength($){if(this._payloadLength&&this._opcode<8){if(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0){let I=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");$(I);return}}if(this._masked)this._state=3;else this._state=4}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=4}getData($){let I=yY;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}if(I=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0)zC(I,this._mask)}if(this._opcode>7){this.controlMessage(I,$);return}if(this._compressed){this._state=5,this.decompress(I,$);return}if(I.length)this._messageLength=this._totalPayloadLength,this._fragments.push(I);this.dataMessage($)}decompress($,I){this._extensions[kY.extensionName].decompress($,this._fin,(_,u)=>{if(_)return I(_);if(u.length){if(this._messageLength+=u.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let z=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");I(z);return}this._fragments.push(u)}if(this.dataMessage(I),this._state===0)this.startLoop(I)})}dataMessage($){if(!this._fin){this._state=0;return}let I=this._messageLength,U=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let _;if(this._binaryType==="nodebuffer")_=b9(U,I);else if(this._binaryType==="arraybuffer")_=_C(b9(U,I));else if(this._binaryType==="blob")_=new Blob(U);else _=U;if(this._allowSynchronousEvents)this.emit("message",_,!0),this._state=0;else this._state=6,setImmediate(()=>{this.emit("message",_,!0),this._state=0,this.startLoop($)})}else{let _=b9(U,I);if(!this._skipUTF8Validation&&!iY(_)){let u=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");$(u);return}if(this._state===5||this._allowSynchronousEvents)this.emit("message",_,!1),this._state=0;else this._state=6,setImmediate(()=>{this.emit("message",_,!1),this._state=0,this.startLoop($)})}}controlMessage($,I){if(this._opcode===8){if($.length===0)this._loop=!1,this.emit("conclude",1005,yY),this.end();else{let U=$.readUInt16BE(0);if(!gC(U)){let u=this.createError(RangeError,`invalid status code ${U}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");I(u);return}let _=new j2($.buffer,$.byteOffset+2,$.length-2);if(!this._skipUTF8Validation&&!iY(_)){let u=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");I(u);return}this._loop=!1,this.emit("conclude",U,_),this.end()}this._state=0;return}if(this._allowSynchronousEvents)this.emit(this._opcode===9?"ping":"pong",$),this._state=0;else this._state=6,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",$),this._state=0,this.startLoop(I)})}createError($,I,U,_,u){this._loop=!1,this._errored=!0;let z=new $(U?`Invalid WebSocket frame: ${I}`:I);return Error.captureStackTrace(z,this.createError),z.code=u,z[uC]=_,z}}rY.exports=nY});var S9=E((Am,hY)=>{var{Duplex:Zm}=z$("stream"),{randomFillSync:vC}=z$("crypto"),lY=p0(),{EMPTY_BUFFER:JC,kWebSocket:NC,NOOP:GC}=_6(),{isBlob:KI,isValidStatusCode:XC}=MI(),{mask:mY,toBuffer:V1}=c0(),V4=Symbol("kByteLength"),qC=Buffer.alloc(4),B1,RI=8192,b4=0,QC=1,TC=2;class x6{constructor($,I,U){if(this._extensions=I||{},U)this._generateMask=U,this._maskBuffer=Buffer.alloc(4);this._socket=$,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=b4,this.onerror=GC,this[NC]=void 0}static frame($,I){let U,_=!1,u=2,z=!1;if(I.mask){if(U=I.maskBuffer||qC,I.generateMask)I.generateMask(U);else{if(RI===8192){if(B1===void 0)B1=Buffer.alloc(8192);vC(B1,0,8192),RI=0}U[0]=B1[RI++],U[1]=B1[RI++],U[2]=B1[RI++],U[3]=B1[RI++]}z=(U[0]|U[1]|U[2]|U[3])===0,u=6}let g;if(typeof $==="string")if((!I.mask||z)&&I[V4]!==void 0)g=I[V4];else $=Buffer.from($),g=$.length;else g=$.length,_=I.mask&&I.readOnly&&!z;let v=g;if(g>=65536)u+=8,v=127;else if(g>125)u+=2,v=126;let J=Buffer.allocUnsafe(_?g+u:u);if(J[0]=I.fin?I.opcode|128:I.opcode,I.rsv1)J[0]|=64;if(J[1]=v,v===126)J.writeUInt16BE(g,2);else if(v===127)J[2]=J[3]=0,J.writeUIntBE(g,4,6);if(!I.mask)return[J,$];if(J[1]|=128,J[u-4]=U[0],J[u-3]=U[1],J[u-2]=U[2],J[u-1]=U[3],z)return[J,$];if(_)return mY($,U,J,u,g),[J];return mY($,U,$,0,g),[J,$]}close($,I,U,_){let u;if($===void 0)u=JC;else if(typeof $!=="number"||!XC($))throw TypeError("First argument must be a valid error code number");else if(I===void 0||!I.length)u=Buffer.allocUnsafe(2),u.writeUInt16BE($,0);else{let g=Buffer.byteLength(I);if(g>123)throw RangeError("The message must not be greater than 123 bytes");if(u=Buffer.allocUnsafe(2+g),u.writeUInt16BE($,0),typeof I==="string")u.write(I,2);else u.set(I,2)}let z={[V4]:u.length,fin:!0,generateMask:this._generateMask,mask:U,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};if(this._state!==b4)this.enqueue([this.dispatch,u,!1,z,_]);else this.sendFrame(x6.frame(u,z),_)}ping($,I,U){let _,u;if(typeof $==="string")_=Buffer.byteLength($),u=!1;else if(KI($))_=$.size,u=!1;else $=V1($),_=$.length,u=V1.readOnly;if(_>125)throw RangeError("The data size must not be greater than 125 bytes");let z={[V4]:_,fin:!0,generateMask:this._generateMask,mask:I,maskBuffer:this._maskBuffer,opcode:9,readOnly:u,rsv1:!1};if(KI($))if(this._state!==b4)this.enqueue([this.getBlobData,$,!1,z,U]);else this.getBlobData($,!1,z,U);else if(this._state!==b4)this.enqueue([this.dispatch,$,!1,z,U]);else this.sendFrame(x6.frame($,z),U)}pong($,I,U){let _,u;if(typeof $==="string")_=Buffer.byteLength($),u=!1;else if(KI($))_=$.size,u=!1;else $=V1($),_=$.length,u=V1.readOnly;if(_>125)throw RangeError("The data size must not be greater than 125 bytes");let z={[V4]:_,fin:!0,generateMask:this._generateMask,mask:I,maskBuffer:this._maskBuffer,opcode:10,readOnly:u,rsv1:!1};if(KI($))if(this._state!==b4)this.enqueue([this.getBlobData,$,!1,z,U]);else this.getBlobData($,!1,z,U);else if(this._state!==b4)this.enqueue([this.dispatch,$,!1,z,U]);else this.sendFrame(x6.frame($,z),U)}send($,I,U){let _=this._extensions[lY.extensionName],u=I.binary?2:1,z=I.compress,g,v;if(typeof $==="string")g=Buffer.byteLength($),v=!1;else if(KI($))g=$.size,v=!1;else $=V1($),g=$.length,v=V1.readOnly;if(this._firstFragment){if(this._firstFragment=!1,z&&_&&_.params[_._isServer?"server_no_context_takeover":"client_no_context_takeover"])z=g>=_._threshold;this._compress=z}else z=!1,u=0;if(I.fin)this._firstFragment=!0;let J={[V4]:g,fin:I.fin,generateMask:this._generateMask,mask:I.mask,maskBuffer:this._maskBuffer,opcode:u,readOnly:v,rsv1:z};if(KI($))if(this._state!==b4)this.enqueue([this.getBlobData,$,this._compress,J,U]);else this.getBlobData($,this._compress,J,U);else if(this._state!==b4)this.enqueue([this.dispatch,$,this._compress,J,U]);else this.dispatch($,this._compress,J,U)}getBlobData($,I,U,_){this._bufferedBytes+=U[V4],this._state=TC,$.arrayBuffer().then((u)=>{if(this._socket.destroyed){let g=Error("The socket was closed while the blob was being read");process.nextTick(F9,this,g,_);return}this._bufferedBytes-=U[V4];let z=V1(u);if(!I)this._state=b4,this.sendFrame(x6.frame(z,U),_),this.dequeue();else this.dispatch(z,I,U,_)}).catch((u)=>{process.nextTick(HC,this,u,_)})}dispatch($,I,U,_){if(!I){this.sendFrame(x6.frame($,U),_);return}let u=this._extensions[lY.extensionName];this._bufferedBytes+=U[V4],this._state=QC,u.compress($,U.fin,(z,g)=>{if(this._socket.destroyed){let v=Error("The socket was closed while data was being compressed");F9(this,v,_);return}this._bufferedBytes-=U[V4],this._state=b4,U.readOnly=!1,this.sendFrame(x6.frame(g,U),_),this.dequeue()})}dequeue(){while(this._state===b4&&this._queue.length){let $=this._queue.shift();this._bufferedBytes-=$[3][V4],Reflect.apply($[0],this,$.slice(1))}}enqueue($){this._bufferedBytes+=$[3][V4],this._queue.push($)}sendFrame($,I){if($.length===2)this._socket.cork(),this._socket.write($[0]),this._socket.write($[1],I),this._socket.uncork();else this._socket.write($[0],I)}}hY.exports=x6;function F9($,I,U){if(typeof U==="function")U(I);for(let _=0;_<$._queue.length;_++){let u=$._queue[_],z=u[u.length-1];if(typeof z==="function")z(I)}}function HC($,I,U){F9($,I,U),$.onerror(I)}});var $O=E((bm,sY)=>{var{kForOnEventAttribute:o0,kListener:w9}=_6(),cY=Symbol("kCode"),dY=Symbol("kData"),pY=Symbol("kError"),oY=Symbol("kMessage"),tY=Symbol("kReason"),LI=Symbol("kTarget"),aY=Symbol("kType"),eY=Symbol("kWasClean");class k6{constructor($){this[LI]=null,this[aY]=$}get target(){return this[LI]}get type(){return this[aY]}}Object.defineProperty(k6.prototype,"target",{enumerable:!0});Object.defineProperty(k6.prototype,"type",{enumerable:!0});class WI extends k6{constructor($,I={}){super($);this[cY]=I.code===void 0?0:I.code,this[tY]=I.reason===void 0?"":I.reason,this[eY]=I.wasClean===void 0?!1:I.wasClean}get code(){return this[cY]}get reason(){return this[tY]}get wasClean(){return this[eY]}}Object.defineProperty(WI.prototype,"code",{enumerable:!0});Object.defineProperty(WI.prototype,"reason",{enumerable:!0});Object.defineProperty(WI.prototype,"wasClean",{enumerable:!0});class t0 extends k6{constructor($,I={}){super($);this[pY]=I.error===void 0?null:I.error,this[oY]=I.message===void 0?"":I.message}get error(){return this[pY]}get message(){return this[oY]}}Object.defineProperty(t0.prototype,"error",{enumerable:!0});Object.defineProperty(t0.prototype,"message",{enumerable:!0});class S2 extends k6{constructor($,I={}){super($);this[dY]=I.data===void 0?null:I.data}get data(){return this[dY]}}Object.defineProperty(S2.prototype,"data",{enumerable:!0});var YC={addEventListener($,I,U={}){for(let u of this.listeners($))if(!U[o0]&&u[w9]===I&&!u[o0])return;let _;if($==="message")_=function(z,g){let v=new S2("message",{data:g?z:z.toString()});v[LI]=this,F2(I,this,v)};else if($==="close")_=function(z,g){let v=new WI("close",{code:z,reason:g.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});v[LI]=this,F2(I,this,v)};else if($==="error")_=function(z){let g=new t0("error",{error:z,message:z.message});g[LI]=this,F2(I,this,g)};else if($==="open")_=function(){let z=new k6("open");z[LI]=this,F2(I,this,z)};else return;if(_[o0]=!!U[o0],_[w9]=I,U.once)this.once($,_);else this.on($,_)},removeEventListener($,I){for(let U of this.listeners($))if(U[w9]===I&&!U[o0]){this.removeListener($,U);break}}};sY.exports={CloseEvent:WI,ErrorEvent:t0,Event:k6,EventTarget:YC,MessageEvent:S2};function F2($,I,U){if(typeof $==="object"&&$.handleEvent)$.handleEvent.call($,U);else $.call(I,U)}});var E9=E((jm,IO)=>{var{tokenChars:a0}=MI();function m4($,I,U){if($[I]===void 0)$[I]=[U];else $[I].push(U)}function OC($){let I=Object.create(null),U=Object.create(null),_=!1,u=!1,z=!1,g,v,J=-1,N=-1,X=-1,G=0;for(;G<$.length;G++)if(N=$.charCodeAt(G),g===void 0)if(X===-1&&a0[N]===1){if(J===-1)J=G}else if(G!==0&&(N===32||N===9)){if(X===-1&&J!==-1)X=G}else if(N===59||N===44){if(J===-1)throw SyntaxError(`Unexpected character at index ${G}`);if(X===-1)X=G;let T=$.slice(J,X);if(N===44)m4(I,T,U),U=Object.create(null);else g=T;J=X=-1}else throw SyntaxError(`Unexpected character at index ${G}`);else if(v===void 0)if(X===-1&&a0[N]===1){if(J===-1)J=G}else if(N===32||N===9){if(X===-1&&J!==-1)X=G}else if(N===59||N===44){if(J===-1)throw SyntaxError(`Unexpected character at index ${G}`);if(X===-1)X=G;if(m4(U,$.slice(J,X),!0),N===44)m4(I,g,U),U=Object.create(null),g=void 0;J=X=-1}else if(N===61&&J!==-1&&X===-1)v=$.slice(J,G),J=X=-1;else throw SyntaxError(`Unexpected character at index ${G}`);else if(u){if(a0[N]!==1)throw SyntaxError(`Unexpected character at index ${G}`);if(J===-1)J=G;else if(!_)_=!0;u=!1}else if(z)if(a0[N]===1){if(J===-1)J=G}else if(N===34&&J!==-1)z=!1,X=G;else if(N===92)u=!0;else throw SyntaxError(`Unexpected character at index ${G}`);else if(N===34&&$.charCodeAt(G-1)===61)z=!0;else if(X===-1&&a0[N]===1){if(J===-1)J=G}else if(J!==-1&&(N===32||N===9)){if(X===-1)X=G}else if(N===59||N===44){if(J===-1)throw SyntaxError(`Unexpected character at index ${G}`);if(X===-1)X=G;let T=$.slice(J,X);if(_)T=T.replace(/\\/g,""),_=!1;if(m4(U,v,T),N===44)m4(I,g,U),U=Object.create(null),g=void 0;v=void 0,J=X=-1}else throw SyntaxError(`Unexpected character at index ${G}`);if(J===-1||z||N===32||N===9)throw SyntaxError("Unexpected end of input");if(X===-1)X=G;let q=$.slice(J,X);if(g===void 0)m4(I,q,U);else{if(v===void 0)m4(U,q,!0);else if(_)m4(U,v,q.replace(/\\/g,""));else m4(U,v,q);m4(I,g,U)}return I}function VC($){return Object.keys($).map((I)=>{let U=$[I];if(!Array.isArray(U))U=[U];return U.map((_)=>{return[I].concat(Object.keys(_).map((u)=>{let z=_[u];if(!Array.isArray(z))z=[z];return z.map((g)=>g===!0?u:`${u}=${g}`).join("; ")})).join("; ")}).join(", ")}).join(", ")}IO.exports={format:VC,parse:OC}});var f2=E((wm,QO)=>{var BC=z$("events"),DC=z$("https"),MC=z$("http"),_O=z$("net"),KC=z$("tls"),{randomBytes:RC,createHash:LC}=z$("crypto"),{Duplex:Fm,Readable:Sm}=z$("stream"),{URL:C9}=z$("url"),y6=p0(),WC=j9(),PC=S9(),{isBlob:ZC}=MI(),{BINARY_TYPES:uO,CLOSE_TIMEOUT:AC,EMPTY_BUFFER:w2,GUID:bC,kForOnEventAttribute:f9,kListener:jC,kStatusCode:FC,kWebSocket:S$,NOOP:zO}=_6(),{EventTarget:{addEventListener:SC,removeEventListener:wC}}=$O(),{format:EC,parse:CC}=E9(),{toBuffer:fC}=c0(),gO=Symbol("kAborted"),x9=[8,13],g6=["CONNECTING","OPEN","CLOSING","CLOSED"],xC=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class h extends BC{constructor($,I,U){super();if(this._binaryType=uO[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=w2,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=h.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,$!==null){if(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,I===void 0)I=[];else if(!Array.isArray(I))if(typeof I==="object"&&I!==null)U=I,I=[];else I=[I];vO(this,$,I,U)}else this._autoPong=U.autoPong,this._closeTimeout=U.closeTimeout,this._isServer=!0}get binaryType(){return this._binaryType}set binaryType($){if(!uO.includes($))return;if(this._binaryType=$,this._receiver)this._receiver._binaryType=$}get bufferedAmount(){if(!this._socket)return this._bufferedAmount;return this._socket._writableState.length+this._sender._bufferedBytes}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket($,I,U){let _=new WC({allowSynchronousEvents:U.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:U.maxPayload,skipUTF8Validation:U.skipUTF8Validation}),u=new PC($,this._extensions,U.generateMask);if(this._receiver=_,this._sender=u,this._socket=$,_[S$]=this,u[S$]=this,$[S$]=this,_.on("conclude",iC),_.on("drain",nC),_.on("error",rC),_.on("message",lC),_.on("ping",mC),_.on("pong",hC),u.onerror=cC,$.setTimeout)$.setTimeout(0);if($.setNoDelay)$.setNoDelay();if(I.length>0)$.unshift(I);$.on("close",GO),$.on("data",C2),$.on("end",XO),$.on("error",qO),this._readyState=h.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=h.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}if(this._extensions[y6.extensionName])this._extensions[y6.extensionName].cleanup();this._receiver.removeAllListeners(),this._readyState=h.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close($,I){if(this.readyState===h.CLOSED)return;if(this.readyState===h.CONNECTING){X4(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===h.CLOSING){if(this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted))this._socket.end();return}this._readyState=h.CLOSING,this._sender.close($,I,!this._isServer,(U)=>{if(U)return;if(this._closeFrameSent=!0,this._closeFrameReceived||this._receiver._writableState.errorEmitted)this._socket.end()}),NO(this)}pause(){if(this.readyState===h.CONNECTING||this.readyState===h.CLOSED)return;this._paused=!0,this._socket.pause()}ping($,I,U){if(this.readyState===h.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof $==="function")U=$,$=I=void 0;else if(typeof I==="function")U=I,I=void 0;if(typeof $==="number")$=$.toString();if(this.readyState!==h.OPEN){k9(this,$,U);return}if(I===void 0)I=!this._isServer;this._sender.ping($||w2,I,U)}pong($,I,U){if(this.readyState===h.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof $==="function")U=$,$=I=void 0;else if(typeof I==="function")U=I,I=void 0;if(typeof $==="number")$=$.toString();if(this.readyState!==h.OPEN){k9(this,$,U);return}if(I===void 0)I=!this._isServer;this._sender.pong($||w2,I,U)}resume(){if(this.readyState===h.CONNECTING||this.readyState===h.CLOSED)return;if(this._paused=!1,!this._receiver._writableState.needDrain)this._socket.resume()}send($,I,U){if(this.readyState===h.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof I==="function")U=I,I={};if(typeof $==="number")$=$.toString();if(this.readyState!==h.OPEN){k9(this,$,U);return}let _={binary:typeof $!=="string",mask:!this._isServer,compress:!0,fin:!0,...I};if(!this._extensions[y6.extensionName])_.compress=!1;this._sender.send($||w2,_,U)}terminate(){if(this.readyState===h.CLOSED)return;if(this.readyState===h.CONNECTING){X4(this,this._req,"WebSocket was closed before the connection was established");return}if(this._socket)this._readyState=h.CLOSING,this._socket.destroy()}}Object.defineProperty(h,"CONNECTING",{enumerable:!0,value:g6.indexOf("CONNECTING")});Object.defineProperty(h.prototype,"CONNECTING",{enumerable:!0,value:g6.indexOf("CONNECTING")});Object.defineProperty(h,"OPEN",{enumerable:!0,value:g6.indexOf("OPEN")});Object.defineProperty(h.prototype,"OPEN",{enumerable:!0,value:g6.indexOf("OPEN")});Object.defineProperty(h,"CLOSING",{enumerable:!0,value:g6.indexOf("CLOSING")});Object.defineProperty(h.prototype,"CLOSING",{enumerable:!0,value:g6.indexOf("CLOSING")});Object.defineProperty(h,"CLOSED",{enumerable:!0,value:g6.indexOf("CLOSED")});Object.defineProperty(h.prototype,"CLOSED",{enumerable:!0,value:g6.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(($)=>{Object.defineProperty(h.prototype,$,{enumerable:!0})});["open","error","close","message"].forEach(($)=>{Object.defineProperty(h.prototype,`on${$}`,{enumerable:!0,get(){for(let I of this.listeners($))if(I[f9])return I[jC];return null},set(I){for(let U of this.listeners($))if(U[f9]){this.removeListener($,U);break}if(typeof I!=="function")return;this.addEventListener($,I,{[f9]:!0})}})});h.prototype.addEventListener=SC;h.prototype.removeEventListener=wC;QO.exports=h;function vO($,I,U,_){let u={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:AC,protocolVersion:x9[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,..._,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if($._autoPong=u.autoPong,$._closeTimeout=u.closeTimeout,!x9.includes(u.protocolVersion))throw RangeError(`Unsupported protocol version: ${u.protocolVersion} (supported versions: ${x9.join(", ")})`);let z;if(I instanceof C9)z=I;else try{z=new C9(I)}catch(Q){throw SyntaxError(`Invalid URL: ${I}`)}if(z.protocol==="http:")z.protocol="ws:";else if(z.protocol==="https:")z.protocol="wss:";$._url=z.href;let g=z.protocol==="wss:",v=z.protocol==="ws+unix:",J;if(z.protocol!=="ws:"&&!g&&!v)J=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`;else if(v&&!z.pathname)J="The URL's pathname is empty";else if(z.hash)J="The URL contains a fragment identifier";if(J){let Q=SyntaxError(J);if($._redirects===0)throw Q;else{E2($,Q);return}}let N=g?443:80,X=RC(16).toString("base64"),G=g?DC.request:MC.request,q=new Set,T;if(u.createConnection=u.createConnection||(g?yC:kC),u.defaultPort=u.defaultPort||N,u.port=z.port||N,u.host=z.hostname.startsWith("[")?z.hostname.slice(1,-1):z.hostname,u.headers={...u.headers,"Sec-WebSocket-Version":u.protocolVersion,"Sec-WebSocket-Key":X,Connection:"Upgrade",Upgrade:"websocket"},u.path=z.pathname+z.search,u.timeout=u.handshakeTimeout,u.perMessageDeflate)T=new y6(u.perMessageDeflate!==!0?u.perMessageDeflate:{},!1,u.maxPayload),u.headers["Sec-WebSocket-Extensions"]=EC({[y6.extensionName]:T.offer()});if(U.length){for(let Q of U){if(typeof Q!=="string"||!xC.test(Q)||q.has(Q))throw SyntaxError("An invalid or duplicated subprotocol was specified");q.add(Q)}u.headers["Sec-WebSocket-Protocol"]=U.join(",")}if(u.origin)if(u.protocolVersion<13)u.headers["Sec-WebSocket-Origin"]=u.origin;else u.headers.Origin=u.origin;if(z.username||z.password)u.auth=`${z.username}:${z.password}`;if(v){let Q=u.path.split(":");u.socketPath=Q[0],u.path=Q[1]}let H;if(u.followRedirects){if($._redirects===0){$._originalIpc=v,$._originalSecure=g,$._originalHostOrSocketPath=v?u.socketPath:z.host;let Q=_&&_.headers;if(_={..._,headers:{}},Q)for(let[Y,M]of Object.entries(Q))_.headers[Y.toLowerCase()]=M}else if($.listenerCount("redirect")===0){let Q=v?$._originalIpc?u.socketPath===$._originalHostOrSocketPath:!1:$._originalIpc?!1:z.host===$._originalHostOrSocketPath;if(!Q||$._originalSecure&&!g){if(delete u.headers.authorization,delete u.headers.cookie,!Q)delete u.headers.host;u.auth=void 0}}if(u.auth&&!_.headers.authorization)_.headers.authorization="Basic "+Buffer.from(u.auth).toString("base64");if(H=$._req=G(u),$._redirects)$.emit("redirect",$.url,H)}else H=$._req=G(u);if(u.timeout)H.on("timeout",()=>{X4($,H,"Opening handshake has timed out")});if(H.on("error",(Q)=>{if(H===null||H[gO])return;H=$._req=null,E2($,Q)}),H.on("response",(Q)=>{let Y=Q.headers.location,M=Q.statusCode;if(Y&&u.followRedirects&&M>=300&&M<400){if(++$._redirects>u.maxRedirects){X4($,H,"Maximum redirects exceeded");return}H.abort();let L;try{L=new C9(Y,I)}catch(P){let R=SyntaxError(`Invalid URL: ${Y}`);E2($,R);return}vO($,L,U,_)}else if(!$.emit("unexpected-response",H,Q))X4($,H,`Unexpected server response: ${Q.statusCode}`)}),H.on("upgrade",(Q,Y,M)=>{if($.emit("upgrade",Q),$.readyState!==h.CONNECTING)return;H=$._req=null;let L=Q.headers.upgrade;if(L===void 0||L.toLowerCase()!=="websocket"){X4($,Y,"Invalid Upgrade header");return}let P=LC("sha1").update(X+bC).digest("base64");if(Q.headers["sec-websocket-accept"]!==P){X4($,Y,"Invalid Sec-WebSocket-Accept header");return}let R=Q.headers["sec-websocket-protocol"],K;if(R!==void 0){if(!q.size)K="Server sent a subprotocol but none was requested";else if(!q.has(R))K="Server sent an invalid subprotocol"}else if(q.size)K="Server sent no subprotocol";if(K){X4($,Y,K);return}if(R)$._protocol=R;let V=Q.headers["sec-websocket-extensions"];if(V!==void 0){if(!T){X4($,Y,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let B;try{B=CC(V)}catch(b){X4($,Y,"Invalid Sec-WebSocket-Extensions header");return}let O=Object.keys(B);if(O.length!==1||O[0]!==y6.extensionName){X4($,Y,"Server indicated an extension that was not requested");return}try{T.accept(B[y6.extensionName])}catch(b){X4($,Y,"Invalid Sec-WebSocket-Extensions header");return}$._extensions[y6.extensionName]=T}$.setSocket(Y,M,{allowSynchronousEvents:u.allowSynchronousEvents,generateMask:u.generateMask,maxPayload:u.maxPayload,skipUTF8Validation:u.skipUTF8Validation})}),u.finishRequest)u.finishRequest(H,$);else H.end()}function E2($,I){$._readyState=h.CLOSING,$._errorEmitted=!0,$.emit("error",I),$.emitClose()}function kC($){return $.path=$.socketPath,_O.connect($)}function yC($){if($.path=void 0,!$.servername&&$.servername!=="")$.servername=_O.isIP($.host)?"":$.host;return KC.connect($)}function X4($,I,U){$._readyState=h.CLOSING;let _=Error(U);if(Error.captureStackTrace(_,X4),I.setHeader){if(I[gO]=!0,I.abort(),I.socket&&!I.socket.destroyed)I.socket.destroy();process.nextTick(E2,$,_)}else I.destroy(_),I.once("error",$.emit.bind($,"error")),I.once("close",$.emitClose.bind($))}function k9($,I,U){if(I){let _=ZC(I)?I.size:fC(I).length;if($._socket)$._sender._bufferedBytes+=_;else $._bufferedAmount+=_}if(U){let _=Error(`WebSocket is not open: readyState ${$.readyState} (${g6[$.readyState]})`);process.nextTick(U,_)}}function iC($,I){let U=this[S$];if(U._closeFrameReceived=!0,U._closeMessage=I,U._closeCode=$,U._socket[S$]===void 0)return;if(U._socket.removeListener("data",C2),process.nextTick(JO,U._socket),$===1005)U.close();else U.close($,I)}function nC(){let $=this[S$];if(!$.isPaused)$._socket.resume()}function rC($){let I=this[S$];if(I._socket[S$]!==void 0)I._socket.removeListener("data",C2),process.nextTick(JO,I._socket),I.close($[FC]);if(!I._errorEmitted)I._errorEmitted=!0,I.emit("error",$)}function UO(){this[S$].emitClose()}function lC($,I){this[S$].emit("message",$,I)}function mC($){let I=this[S$];if(I._autoPong)I.pong($,!this._isServer,zO);I.emit("ping",$)}function hC($){this[S$].emit("pong",$)}function JO($){$.resume()}function cC($){let I=this[S$];if(I.readyState===h.CLOSED)return;if(I.readyState===h.OPEN)I._readyState=h.CLOSING,NO(I);if(this._socket.end(),!I._errorEmitted)I._errorEmitted=!0,I.emit("error",$)}function NO($){$._closeTimer=setTimeout($._socket.destroy.bind($._socket),$._closeTimeout)}function GO(){let $=this[S$];if(this.removeListener("close",GO),this.removeListener("data",C2),this.removeListener("end",XO),$._readyState=h.CLOSING,!this._readableState.endEmitted&&!$._closeFrameReceived&&!$._receiver._writableState.errorEmitted&&this._readableState.length!==0){let I=this.read(this._readableState.length);$._receiver.write(I)}if($._receiver.end(),this[S$]=void 0,clearTimeout($._closeTimer),$._receiver._writableState.finished||$._receiver._writableState.errorEmitted)$.emitClose();else $._receiver.on("error",UO),$._receiver.on("finish",UO)}function C2($){if(!this[S$]._receiver.write($))this.pause()}function XO(){let $=this[S$];$._readyState=h.CLOSING,$._receiver.end(),this.end()}function qO(){let $=this[S$];if(this.removeListener("error",qO),this.on("error",zO),$)$._readyState=h.CLOSING,this.destroy()}});var OO=E((Cm,YO)=>{var Em=f2(),{Duplex:dC}=z$("stream");function TO($){$.emit("close")}function pC(){if(!this.destroyed&&this._writableState.finished)this.destroy()}function HO($){if(this.removeListener("error",HO),this.destroy(),this.listenerCount("error")===0)this.emit("error",$)}function oC($,I){let U=!0,_=new dC({...I,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return $.on("message",function(z,g){let v=!g&&_._readableState.objectMode?z.toString():z;if(!_.push(v))$.pause()}),$.once("error",function(z){if(_.destroyed)return;U=!1,_.destroy(z)}),$.once("close",function(){if(_.destroyed)return;_.push(null)}),_._destroy=function(u,z){if($.readyState===$.CLOSED){z(u),process.nextTick(TO,_);return}let g=!1;if($.once("error",function(J){g=!0,z(J)}),$.once("close",function(){if(!g)z(u);process.nextTick(TO,_)}),U)$.terminate()},_._final=function(u){if($.readyState===$.CONNECTING){$.once("open",function(){_._final(u)});return}if($._socket===null)return;if($._socket._writableState.finished){if(u(),_._readableState.endEmitted)_.destroy()}else $._socket.once("finish",function(){u()}),$.close()},_._read=function(){if($.isPaused)$.resume()},_._write=function(u,z,g){if($.readyState===$.CONNECTING){$.once("open",function(){_._write(u,z,g)});return}$.send(u,g)},_.on("end",pC),_.on("error",HO),_}YO.exports=oC});var BO=E((fm,VO)=>{var{tokenChars:tC}=MI();function aC($){let I=new Set,U=-1,_=-1,u=0;for(u;u<$.length;u++){let g=$.charCodeAt(u);if(_===-1&&tC[g]===1){if(U===-1)U=u}else if(u!==0&&(g===32||g===9)){if(_===-1&&U!==-1)_=u}else if(g===44){if(U===-1)throw SyntaxError(`Unexpected character at index ${u}`);if(_===-1)_=u;let v=$.slice(U,_);if(I.has(v))throw SyntaxError(`The "${v}" subprotocol is duplicated`);I.add(v),U=_=-1}else throw SyntaxError(`Unexpected character at index ${u}`)}if(U===-1||_!==-1)throw SyntaxError("Unexpected end of input");let z=$.slice(U,u);if(I.has(z))throw SyntaxError(`The "${z}" subprotocol is duplicated`);return I.add(z),I}VO.exports={parse:aC}});var LO=E((km,RO)=>{var eC=z$("events"),x2=z$("http"),{Duplex:xm}=z$("stream"),{createHash:sC}=z$("crypto"),DO=E9(),D1=p0(),$f=BO(),If=f2(),{CLOSE_TIMEOUT:uf,GUID:Uf,kWebSocket:_f}=_6(),zf=/^[+/0-9A-Za-z]{22}==$/;class KO extends eC{constructor($,I){super();if($={allowSynchronousEvents:!0,autoPong:!0,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:uf,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:If,...$},$.port==null&&!$.server&&!$.noServer||$.port!=null&&($.server||$.noServer)||$.server&&$.noServer)throw TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if($.port!=null)this._server=x2.createServer((U,_)=>{let u=x2.STATUS_CODES[426];_.writeHead(426,{"Content-Length":u.length,"Content-Type":"text/plain"}),_.end(u)}),this._server.listen($.port,$.host,$.backlog,I);else if($.server)this._server=$.server;if(this._server){let U=this.emit.bind(this,"connection");this._removeListeners=gf(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(_,u,z)=>{this.handleUpgrade(_,u,z,U)}})}if($.perMessageDeflate===!0)$.perMessageDeflate={};if($.clientTracking)this.clients=new Set,this._shouldEmitClose=!1;this.options=$,this._state=0}address(){if(this.options.noServer)throw Error('The server is operating in "noServer" mode');if(!this._server)return null;return this._server.address()}close($){if(this._state===2){if($)this.once("close",()=>{$(Error("The server is not running"))});process.nextTick(e0,this);return}if($)this.once("close",$);if(this._state===1)return;if(this._state=1,this.options.noServer||this.options.server){if(this._server)this._removeListeners(),this._removeListeners=this._server=null;if(this.clients)if(!this.clients.size)process.nextTick(e0,this);else this._shouldEmitClose=!0;else process.nextTick(e0,this)}else{let I=this._server;this._removeListeners(),this._removeListeners=this._server=null,I.close(()=>{e0(this)})}}shouldHandle($){if(this.options.path){let I=$.url.indexOf("?");if((I!==-1?$.url.slice(0,I):$.url)!==this.options.path)return!1}return!0}handleUpgrade($,I,U,_){I.on("error",MO);let u=$.headers["sec-websocket-key"],z=$.headers.upgrade,g=+$.headers["sec-websocket-version"];if($.method!=="GET"){M1(this,$,I,405,"Invalid HTTP method");return}if(z===void 0||z.toLowerCase()!=="websocket"){M1(this,$,I,400,"Invalid Upgrade header");return}if(u===void 0||!zf.test(u)){M1(this,$,I,400,"Missing or invalid Sec-WebSocket-Key header");return}if(g!==13&&g!==8){M1(this,$,I,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle($)){s0(I,400);return}let v=$.headers["sec-websocket-protocol"],J=new Set;if(v!==void 0)try{J=$f.parse(v)}catch(G){M1(this,$,I,400,"Invalid Sec-WebSocket-Protocol header");return}let N=$.headers["sec-websocket-extensions"],X={};if(this.options.perMessageDeflate&&N!==void 0){let G=new D1(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let q=DO.parse(N);if(q[D1.extensionName])G.accept(q[D1.extensionName]),X[D1.extensionName]=G}catch(q){M1(this,$,I,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let G={origin:$.headers[`${g===8?"sec-websocket-origin":"origin"}`],secure:!!($.socket.authorized||$.socket.encrypted),req:$};if(this.options.verifyClient.length===2){this.options.verifyClient(G,(q,T,H,Q)=>{if(!q)return s0(I,T||401,H,Q);this.completeUpgrade(X,u,J,$,I,U,_)});return}if(!this.options.verifyClient(G))return s0(I,401)}this.completeUpgrade(X,u,J,$,I,U,_)}completeUpgrade($,I,U,_,u,z,g){if(!u.readable||!u.writable)return u.destroy();if(u[_f])throw Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>0)return s0(u,503);let J=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${sC("sha1").update(I+Uf).digest("base64")}`],N=new this.options.WebSocket(null,void 0,this.options);if(U.size){let X=this.options.handleProtocols?this.options.handleProtocols(U,_):U.values().next().value;if(X)J.push(`Sec-WebSocket-Protocol: ${X}`),N._protocol=X}if($[D1.extensionName]){let X=$[D1.extensionName].params,G=DO.format({[D1.extensionName]:[X]});J.push(`Sec-WebSocket-Extensions: ${G}`),N._extensions=$}if(this.emit("headers",J,_),u.write(J.concat(`\r
293
293
  `).join(`\r
294
- `)),u.removeListener("error",BO),N.setSocket(u,g,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients)this.clients.add(N),N.on("close",()=>{if(this.clients.delete(N),this._shouldEmitClose&&!this.clients.size)process.nextTick(a0,this)});z(N,_)}}MO.exports=DO;function uf($,I){for(let U of Object.keys(I))$.on(U,I[U]);return function(){for(let _ of Object.keys(I))$.removeListener(_,I[_])}}function a0($){$._state=2,$.emit("close")}function BO(){this.destroy()}function e0($,I,U,_){U=U||C2.STATUS_CODES[I],_={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(U),..._},$.once("finish",$.destroy),$.end(`HTTP/1.1 ${I} ${C2.STATUS_CODES[I]}\r
294
+ `)),u.removeListener("error",MO),N.setSocket(u,z,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients)this.clients.add(N),N.on("close",()=>{if(this.clients.delete(N),this._shouldEmitClose&&!this.clients.size)process.nextTick(e0,this)});g(N,_)}}RO.exports=KO;function gf($,I){for(let U of Object.keys(I))$.on(U,I[U]);return function(){for(let _ of Object.keys(I))$.removeListener(_,I[_])}}function e0($){$._state=2,$.emit("close")}function MO(){this.destroy()}function s0($,I,U,_){U=U||x2.STATUS_CODES[I],_={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(U),..._},$.once("finish",$.destroy),$.end(`HTTP/1.1 ${I} ${x2.STATUS_CODES[I]}\r
295
295
  `+Object.keys(_).map((u)=>`${u}: ${_[u]}`).join(`\r
296
296
  `)+`\r
297
297
  \r
298
- `+U)}function D1($,I,U,_,u,g){if($.listenerCount("wsClientError")){let z=Error(u);Error.captureStackTrace(z,D1),$.emit("wsClientError",z,U,I)}else e0(U,_,u,g)}});var XX=q$(GX(),1),{program:Ux,createCommand:_x,createArgument:gx,createOption:zx,CommanderError:vx,InvalidArgumentError:Jx,InvalidOptionArgumentError:Nx,Command:c2,Argument:Gx,Option:Xx,Help:qx}=XX.default;gz();var r=q$(b$(),1);import{execSync as Pj,spawn as IG}from"node:child_process";import y from"node:fs";import{tmpdir as S_}from"node:os";import I$ from"node:path";var z$={};B4(z$,{xor:()=>pQ,xid:()=>OQ,void:()=>rQ,uuidv7:()=>NQ,uuidv6:()=>JQ,uuidv4:()=>vQ,uuid:()=>zQ,util:()=>w,url:()=>GQ,uppercase:()=>m1,unknown:()=>$1,union:()=>L_,undefined:()=>iQ,ulid:()=>YQ,uint64:()=>kQ,uint32:()=>CQ,tuple:()=>K3,trim:()=>t1,treeifyError:()=>Oz,transform:()=>W_,toUpperCase:()=>e1,toLowerCase:()=>a1,toJSONSchema:()=>tU,templateLiteral:()=>v7,symbol:()=>yQ,superRefine:()=>o3,success:()=>_7,stringbool:()=>H7,stringFormat:()=>AQ,string:()=>u_,strictObject:()=>cQ,startsWith:()=>c1,slugify:()=>s1,size:()=>a6,setErrorMap:()=>Xj,set:()=>sQ,safeParseAsync:()=>t8,safeParse:()=>o8,safeEncodeAsync:()=>U3,safeEncode:()=>I3,safeDecodeAsync:()=>_3,safeDecode:()=>u3,registry:()=>MU,regexes:()=>H4,regex:()=>r1,refine:()=>p3,record:()=>L3,readonly:()=>r3,property:()=>cU,promise:()=>J7,prettifyError:()=>Vz,preprocess:()=>O7,prefault:()=>C3,positive:()=>rU,pipe:()=>L0,partialRecord:()=>tQ,parseAsync:()=>p8,parse:()=>d8,overwrite:()=>K4,optional:()=>M0,object:()=>hQ,number:()=>z3,nullish:()=>U7,nullable:()=>K0,null:()=>X3,normalize:()=>o1,nonpositive:()=>mU,nonoptional:()=>f3,nonnegative:()=>hU,never:()=>K_,negative:()=>lU,nativeEnum:()=>$7,nanoid:()=>QQ,nan:()=>g7,multipleOf:()=>K6,minSize:()=>k4,minLength:()=>t4,mime:()=>p1,meta:()=>Q7,maxSize:()=>L6,maxLength:()=>e6,map:()=>eQ,mac:()=>DQ,lte:()=>g4,lt:()=>f4,lowercase:()=>l1,looseRecord:()=>aQ,looseObject:()=>dQ,locales:()=>Y0,literal:()=>I7,length:()=>s6,lazy:()=>h3,ksuid:()=>VQ,keyof:()=>mQ,jwt:()=>ZQ,json:()=>Y7,iso:()=>uI,ipv6:()=>MQ,ipv4:()=>BQ,intersection:()=>D3,int64:()=>xQ,int32:()=>EQ,int:()=>U_,instanceof:()=>T7,includes:()=>h1,httpUrl:()=>XQ,hostname:()=>bQ,hex:()=>jQ,hash:()=>FQ,guid:()=>gQ,gte:()=>l$,gt:()=>x4,globalRegistry:()=>w$,getErrorMap:()=>qj,function:()=>N7,fromJSONSchema:()=>B7,formatError:()=>g0,float64:()=>wQ,float32:()=>SQ,flattenError:()=>_0,file:()=>u7,exactOptional:()=>j3,enum:()=>R_,endsWith:()=>d1,encodeAsync:()=>s8,encode:()=>a8,emoji:()=>qQ,email:()=>_Q,e164:()=>PQ,discriminatedUnion:()=>oQ,describe:()=>q7,decodeAsync:()=>$3,decode:()=>e8,date:()=>lQ,custom:()=>X7,cuid2:()=>HQ,cuid:()=>TQ,core:()=>a4,config:()=>L$,coerce:()=>a3,codec:()=>z7,clone:()=>r$,cidrv6:()=>LQ,cidrv4:()=>KQ,check:()=>G7,catch:()=>y3,boolean:()=>v3,bigint:()=>fQ,base64url:()=>WQ,base64:()=>RQ,array:()=>P0,any:()=>nQ,_function:()=>N7,_default:()=>w3,_ZodString:()=>__,ZodXor:()=>O3,ZodXID:()=>X_,ZodVoid:()=>H3,ZodUnknown:()=>Q3,ZodUnion:()=>A0,ZodUndefined:()=>N3,ZodUUID:()=>y4,ZodURL:()=>R0,ZodULID:()=>G_,ZodType:()=>c,ZodTuple:()=>M3,ZodTransform:()=>A3,ZodTemplateLiteral:()=>l3,ZodSymbol:()=>J3,ZodSuccess:()=>x3,ZodStringFormat:()=>J$,ZodString:()=>_I,ZodSet:()=>W3,ZodRecord:()=>b0,ZodRealError:()=>$4,ZodReadonly:()=>n3,ZodPromise:()=>c3,ZodPrefault:()=>E3,ZodPipe:()=>A_,ZodOptional:()=>P_,ZodObject:()=>Z0,ZodNumberFormat:()=>I1,ZodNumber:()=>zI,ZodNullable:()=>F3,ZodNull:()=>G3,ZodNonOptional:()=>Z_,ZodNever:()=>T3,ZodNanoID:()=>v_,ZodNaN:()=>i3,ZodMap:()=>R3,ZodMAC:()=>g3,ZodLiteral:()=>P3,ZodLazy:()=>m3,ZodKSUID:()=>q_,ZodJWT:()=>D_,ZodIssueCode:()=>Gj,ZodIntersection:()=>B3,ZodISOTime:()=>$_,ZodISODuration:()=>I_,ZodISODateTime:()=>eU,ZodISODate:()=>sU,ZodIPv6:()=>T_,ZodIPv4:()=>Q_,ZodGUID:()=>D0,ZodFunction:()=>d3,ZodFirstPartyTypeKind:()=>t3,ZodFile:()=>Z3,ZodExactOptional:()=>b3,ZodError:()=>Jj,ZodEnum:()=>UI,ZodEmoji:()=>z_,ZodEmail:()=>g_,ZodE164:()=>B_,ZodDiscriminatedUnion:()=>V3,ZodDefault:()=>S3,ZodDate:()=>W0,ZodCustomStringFormat:()=>gI,ZodCustom:()=>j0,ZodCodec:()=>b_,ZodCatch:()=>k3,ZodCUID2:()=>N_,ZodCUID:()=>J_,ZodCIDRv6:()=>Y_,ZodCIDRv4:()=>H_,ZodBoolean:()=>vI,ZodBigIntFormat:()=>M_,ZodBigInt:()=>JI,ZodBase64URL:()=>V_,ZodBase64:()=>O_,ZodArray:()=>Y3,ZodAny:()=>q3,TimePrecision:()=>KN,NEVER:()=>zz,$output:()=>YN,$input:()=>ON,$brand:()=>vz});var a4={};B4(a4,{version:()=>Qv,util:()=>w,treeifyError:()=>Oz,toJSONSchema:()=>tU,toDotPath:()=>Z5,safeParseAsync:()=>Dz,safeParse:()=>Bz,safeEncodeAsync:()=>QA,safeEncode:()=>XA,safeDecodeAsync:()=>TA,safeDecode:()=>qA,registry:()=>MU,regexes:()=>H4,process:()=>_$,prettifyError:()=>Vz,parseAsync:()=>su,parse:()=>eu,meta:()=>u8,locales:()=>Y0,isValidJWT:()=>c5,isValidBase64URL:()=>h5,isValidBase64:()=>Cv,initializeContext:()=>R6,globalRegistry:()=>w$,globalConfig:()=>tI,formatError:()=>g0,flattenError:()=>_0,finalize:()=>P6,extractDefs:()=>W6,encodeAsync:()=>NA,encode:()=>vA,describe:()=>I8,decodeAsync:()=>GA,decode:()=>JA,createToJSONSchemaMethod:()=>_8,createStandardJSONSchemaMethod:()=>II,config:()=>L$,clone:()=>r$,_xor:()=>kb,_xid:()=>SU,_void:()=>cN,_uuidv7:()=>PU,_uuidv6:()=>WU,_uuidv4:()=>RU,_uuid:()=>LU,_url:()=>V0,_uppercase:()=>m1,_unknown:()=>mN,_union:()=>xb,_undefined:()=>nN,_ulid:()=>FU,_uint64:()=>yN,_uint32:()=>wN,_tuple:()=>nb,_trim:()=>t1,_transform:()=>pb,_toUpperCase:()=>e1,_toLowerCase:()=>a1,_templateLiteral:()=>Uj,_symbol:()=>iN,_superRefine:()=>$8,_success:()=>sb,_stringbool:()=>U8,_stringFormat:()=>$I,_string:()=>BN,_startsWith:()=>c1,_slugify:()=>s1,_size:()=>a6,_set:()=>mb,_safeParseAsync:()=>y1,_safeParse:()=>k1,_safeEncodeAsync:()=>zU,_safeEncode:()=>_U,_safeDecodeAsync:()=>vU,_safeDecode:()=>gU,_regex:()=>r1,_refine:()=>sN,_record:()=>rb,_readonly:()=>uj,_property:()=>cU,_promise:()=>gj,_positive:()=>rU,_pipe:()=>Ij,_parseAsync:()=>x1,_parse:()=>f1,_overwrite:()=>K4,_optional:()=>ob,_number:()=>ZN,_nullable:()=>tb,_null:()=>rN,_normalize:()=>o1,_nonpositive:()=>mU,_nonoptional:()=>eb,_nonnegative:()=>hU,_never:()=>hN,_negative:()=>lU,_nativeEnum:()=>cb,_nanoid:()=>AU,_nan:()=>oN,_multipleOf:()=>K6,_minSize:()=>k4,_minLength:()=>t4,_min:()=>l$,_mime:()=>p1,_maxSize:()=>L6,_maxLength:()=>e6,_max:()=>g4,_map:()=>lb,_mac:()=>MN,_lte:()=>g4,_lt:()=>f4,_lowercase:()=>l1,_literal:()=>db,_length:()=>s6,_lazy:()=>_j,_ksuid:()=>wU,_jwt:()=>nU,_isoTime:()=>WN,_isoDuration:()=>PN,_isoDateTime:()=>LN,_isoDate:()=>RN,_ipv6:()=>CU,_ipv4:()=>EU,_intersection:()=>ib,_int64:()=>kN,_int32:()=>SN,_int:()=>bN,_includes:()=>h1,_guid:()=>O0,_gte:()=>l$,_gt:()=>x4,_float64:()=>FN,_float32:()=>jN,_file:()=>aN,_enum:()=>hb,_endsWith:()=>d1,_encodeAsync:()=>uU,_encode:()=>$U,_emoji:()=>ZU,_email:()=>KU,_e164:()=>iU,_discriminatedUnion:()=>yb,_default:()=>ab,_decodeAsync:()=>UU,_decode:()=>IU,_date:()=>dN,_custom:()=>eN,_cuid2:()=>jU,_cuid:()=>bU,_coercedString:()=>DN,_coercedNumber:()=>AN,_coercedDate:()=>pN,_coercedBoolean:()=>CN,_coercedBigint:()=>xN,_cidrv6:()=>xU,_cidrv4:()=>fU,_check:()=>IQ,_catch:()=>$j,_boolean:()=>EN,_bigint:()=>fN,_base64url:()=>yU,_base64:()=>kU,_array:()=>tN,_any:()=>lN,TimePrecision:()=>KN,NEVER:()=>zz,JSONSchemaGenerator:()=>r8,JSONSchema:()=>uQ,Doc:()=>XU,$output:()=>YN,$input:()=>ON,$constructor:()=>V,$brand:()=>vz,$ZodXor:()=>sv,$ZodXID:()=>Rv,$ZodVoid:()=>ov,$ZodUnknown:()=>dv,$ZodUnion:()=>G0,$ZodUndefined:()=>mv,$ZodUUID:()=>Yv,$ZodURL:()=>Vv,$ZodULID:()=>Lv,$ZodType:()=>m,$ZodTuple:()=>BU,$ZodTransform:()=>JJ,$ZodTemplateLiteral:()=>BJ,$ZodSymbol:()=>lv,$ZodSuccess:()=>TJ,$ZodStringFormat:()=>v$,$ZodString:()=>t6,$ZodSet:()=>_J,$ZodRegistry:()=>VN,$ZodRecord:()=>uJ,$ZodRealError:()=>s$,$ZodReadonly:()=>VJ,$ZodPromise:()=>MJ,$ZodPrefault:()=>qJ,$ZodPipe:()=>OJ,$ZodOptional:()=>DU,$ZodObjectJIT:()=>ev,$ZodObject:()=>o5,$ZodNumberFormat:()=>nv,$ZodNumber:()=>OU,$ZodNullable:()=>GJ,$ZodNull:()=>hv,$ZodNonOptional:()=>QJ,$ZodNever:()=>pv,$ZodNanoID:()=>Dv,$ZodNaN:()=>YJ,$ZodMap:()=>UJ,$ZodMAC:()=>Sv,$ZodLiteral:()=>zJ,$ZodLazy:()=>KJ,$ZodKSUID:()=>Wv,$ZodJWT:()=>yv,$ZodIntersection:()=>IJ,$ZodISOTime:()=>Av,$ZodISODuration:()=>bv,$ZodISODateTime:()=>Pv,$ZodISODate:()=>Zv,$ZodIPv6:()=>Fv,$ZodIPv4:()=>jv,$ZodGUID:()=>Hv,$ZodFunction:()=>DJ,$ZodFile:()=>vJ,$ZodExactOptional:()=>NJ,$ZodError:()=>U0,$ZodEnum:()=>gJ,$ZodEncodeError:()=>d6,$ZodEmoji:()=>Bv,$ZodEmail:()=>Ov,$ZodE164:()=>kv,$ZodDiscriminatedUnion:()=>$J,$ZodDefault:()=>XJ,$ZodDate:()=>tv,$ZodCustomStringFormat:()=>iv,$ZodCustom:()=>LJ,$ZodCodec:()=>X0,$ZodCheckUpperCase:()=>zv,$ZodCheckStringFormat:()=>i1,$ZodCheckStartsWith:()=>Jv,$ZodCheckSizeEquals:()=>$v,$ZodCheckRegex:()=>_v,$ZodCheckProperty:()=>Gv,$ZodCheckOverwrite:()=>qv,$ZodCheckNumberFormat:()=>tz,$ZodCheckMultipleOf:()=>oz,$ZodCheckMinSize:()=>sz,$ZodCheckMinLength:()=>uv,$ZodCheckMimeType:()=>Xv,$ZodCheckMaxSize:()=>ez,$ZodCheckMaxLength:()=>Iv,$ZodCheckLowerCase:()=>gv,$ZodCheckLessThan:()=>NU,$ZodCheckLengthEquals:()=>Uv,$ZodCheckIncludes:()=>vv,$ZodCheckGreaterThan:()=>GU,$ZodCheckEndsWith:()=>Nv,$ZodCheckBigIntFormat:()=>az,$ZodCheck:()=>G$,$ZodCatch:()=>HJ,$ZodCUID2:()=>Kv,$ZodCUID:()=>Mv,$ZodCIDRv6:()=>Ev,$ZodCIDRv4:()=>wv,$ZodBoolean:()=>N0,$ZodBigIntFormat:()=>rv,$ZodBigInt:()=>VU,$ZodBase64URL:()=>xv,$ZodBase64:()=>fv,$ZodAsyncError:()=>C4,$ZodArray:()=>av,$ZodAny:()=>cv});var zz=Object.freeze({status:"aborted"});function V($,I,U){function _(v,J){if(!v._zod)Object.defineProperty(v,"_zod",{value:{def:J,constr:z,traits:new Set},enumerable:!1});if(v._zod.traits.has($))return;v._zod.traits.add($),I(v,J);let N=z.prototype,X=Object.keys(N);for(let G=0;G<X.length;G++){let q=X[G];if(!(q in v))v[q]=N[q].bind(v)}}let u=U?.Parent??Object;class g extends u{}Object.defineProperty(g,"name",{value:$});function z(v){var J;let N=U?.Parent?new g:this;_(N,v),(J=N._zod).deferred??(J.deferred=[]);for(let X of N._zod.deferred)X();return N}return Object.defineProperty(z,"init",{value:_}),Object.defineProperty(z,Symbol.hasInstance,{value:(v)=>{if(U?.Parent&&v instanceof U.Parent)return!0;return v?._zod?.traits?.has($)}}),Object.defineProperty(z,"name",{value:$}),z}var vz=Symbol("zod_brand");class C4 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class d6 extends Error{constructor($){super(`Encountered unidirectional transform during encode: ${$}`);this.name="ZodEncodeError"}}var tI={};function L$($){if($)Object.assign(tI,$);return tI}var w={};B4(w,{unwrapMessage:()=>aI,uint8ArrayToHex:()=>gA,uint8ArrayToBase64url:()=>UA,uint8ArrayToBase64:()=>R5,stringifyPrimitive:()=>j,slugify:()=>Gz,shallowClone:()=>qz,safeExtend:()=>aZ,required:()=>$A,randomString:()=>mZ,propertyKeyTypes:()=>$0,promiseAllObject:()=>lZ,primitiveTypes:()=>Qz,prefixIssues:()=>_4,pick:()=>pZ,partial:()=>sZ,parsedType:()=>S,optionalKeys:()=>Tz,omit:()=>oZ,objectClone:()=>iZ,numKeys:()=>hZ,nullish:()=>V6,normalizeParams:()=>C,mergeDefs:()=>o4,merge:()=>eZ,jsonStringifyReplacer:()=>w1,joinValues:()=>W,issue:()=>C1,isPlainObject:()=>D6,isObject:()=>p6,hexToUint8Array:()=>_A,getSizableOrigin:()=>I0,getParsedType:()=>cZ,getLengthableOrigin:()=>u0,getEnumValues:()=>eI,getElementAtPath:()=>rZ,floatSafeRemainder:()=>Nz,finalizeIssue:()=>e$,extend:()=>tZ,escapeRegex:()=>T4,esc:()=>tu,defineLazy:()=>p,createTransparentProxy:()=>dZ,cloneDef:()=>nZ,clone:()=>r$,cleanRegex:()=>sI,cleanEnum:()=>IA,captureStackTrace:()=>au,cached:()=>E1,base64urlToUint8Array:()=>uA,base64ToUint8Array:()=>L5,assignProp:()=>B6,assertNotEqual:()=>fZ,assertNever:()=>kZ,assertIs:()=>xZ,assertEqual:()=>CZ,assert:()=>yZ,allowsEval:()=>Xz,aborted:()=>M6,NUMBER_FORMAT_RANGES:()=>Hz,Class:()=>W5,BIGINT_FORMAT_RANGES:()=>Yz});function CZ($){return $}function fZ($){return $}function xZ($){}function kZ($){throw Error("Unexpected value in exhaustive check")}function yZ($){}function eI($){let I=Object.values($).filter((_)=>typeof _==="number");return Object.entries($).filter(([_,u])=>I.indexOf(+_)===-1).map(([_,u])=>u)}function W($,I="|"){return $.map((U)=>j(U)).join(I)}function w1($,I){if(typeof I==="bigint")return I.toString();return I}function E1($){return{get value(){{let U=$();return Object.defineProperty(this,"value",{value:U}),U}throw Error("cached value already set")}}}function V6($){return $===null||$===void 0}function sI($){let I=$.startsWith("^")?1:0,U=$.endsWith("$")?$.length-1:$.length;return $.slice(I,U)}function Nz($,I){let U=($.toString().split(".")[1]||"").length,_=I.toString(),u=(_.split(".")[1]||"").length;if(u===0&&/\d?e-\d?/.test(_)){let J=_.match(/\d?e-(\d?)/);if(J?.[1])u=Number.parseInt(J[1])}let g=U>u?U:u,z=Number.parseInt($.toFixed(g).replace(".","")),v=Number.parseInt(I.toFixed(g).replace(".",""));return z%v/10**g}var K5=Symbol("evaluating");function p($,I,U){let _=void 0;Object.defineProperty($,I,{get(){if(_===K5)return;if(_===void 0)_=K5,_=U();return _},set(u){Object.defineProperty($,I,{value:u})},configurable:!0})}function iZ($){return Object.create(Object.getPrototypeOf($),Object.getOwnPropertyDescriptors($))}function B6($,I,U){Object.defineProperty($,I,{value:U,writable:!0,enumerable:!0,configurable:!0})}function o4(...$){let I={};for(let U of $){let _=Object.getOwnPropertyDescriptors(U);Object.assign(I,_)}return Object.defineProperties({},I)}function nZ($){return o4($._zod.def)}function rZ($,I){if(!I)return $;return I.reduce((U,_)=>U?.[_],$)}function lZ($){let I=Object.keys($),U=I.map((_)=>$[_]);return Promise.all(U).then((_)=>{let u={};for(let g=0;g<I.length;g++)u[I[g]]=_[g];return u})}function mZ($=10){let U="";for(let _=0;_<$;_++)U+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return U}function tu($){return JSON.stringify($)}function Gz($){return $.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var au="captureStackTrace"in Error?Error.captureStackTrace:(...$)=>{};function p6($){return typeof $==="object"&&$!==null&&!Array.isArray($)}var Xz=E1(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch($){return!1}});function D6($){if(p6($)===!1)return!1;let I=$.constructor;if(I===void 0)return!0;if(typeof I!=="function")return!0;let U=I.prototype;if(p6(U)===!1)return!1;if(Object.prototype.hasOwnProperty.call(U,"isPrototypeOf")===!1)return!1;return!0}function qz($){if(D6($))return{...$};if(Array.isArray($))return[...$];return $}function hZ($){let I=0;for(let U in $)if(Object.prototype.hasOwnProperty.call($,U))I++;return I}var cZ=($)=>{let I=typeof $;switch(I){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN($)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray($))return"array";if($===null)return"null";if($.then&&typeof $.then==="function"&&$.catch&&typeof $.catch==="function")return"promise";if(typeof Map<"u"&&$ instanceof Map)return"map";if(typeof Set<"u"&&$ instanceof Set)return"set";if(typeof Date<"u"&&$ instanceof Date)return"date";if(typeof File<"u"&&$ instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${I}`)}},$0=new Set(["string","number","symbol"]),Qz=new Set(["string","number","bigint","boolean","symbol","undefined"]);function T4($){return $.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function r$($,I,U){let _=new $._zod.constr(I??$._zod.def);if(!I||U?.parent)_._zod.parent=$;return _}function C($){let I=$;if(!I)return{};if(typeof I==="string")return{error:()=>I};if(I?.message!==void 0){if(I?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");I.error=I.message}if(delete I.message,typeof I.error==="string")return{...I,error:()=>I.error};return I}function dZ($){let I;return new Proxy({},{get(U,_,u){return I??(I=$()),Reflect.get(I,_,u)},set(U,_,u,g){return I??(I=$()),Reflect.set(I,_,u,g)},has(U,_){return I??(I=$()),Reflect.has(I,_)},deleteProperty(U,_){return I??(I=$()),Reflect.deleteProperty(I,_)},ownKeys(U){return I??(I=$()),Reflect.ownKeys(I)},getOwnPropertyDescriptor(U,_){return I??(I=$()),Reflect.getOwnPropertyDescriptor(I,_)},defineProperty(U,_,u){return I??(I=$()),Reflect.defineProperty(I,_,u)}})}function j($){if(typeof $==="bigint")return $.toString()+"n";if(typeof $==="string")return`"${$}"`;return`${$}`}function Tz($){return Object.keys($).filter((I)=>{return $[I]._zod.optin==="optional"&&$[I]._zod.optout==="optional"})}var Hz={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Yz={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function pZ($,I){let U=$._zod.def,_=U.checks;if(_&&_.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let g=o4($._zod.def,{get shape(){let z={};for(let v in I){if(!(v in U.shape))throw Error(`Unrecognized key: "${v}"`);if(!I[v])continue;z[v]=U.shape[v]}return B6(this,"shape",z),z},checks:[]});return r$($,g)}function oZ($,I){let U=$._zod.def,_=U.checks;if(_&&_.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let g=o4($._zod.def,{get shape(){let z={...$._zod.def.shape};for(let v in I){if(!(v in U.shape))throw Error(`Unrecognized key: "${v}"`);if(!I[v])continue;delete z[v]}return B6(this,"shape",z),z},checks:[]});return r$($,g)}function tZ($,I){if(!D6(I))throw Error("Invalid input to extend: expected a plain object");let U=$._zod.def.checks;if(U&&U.length>0){let g=$._zod.def.shape;for(let z in I)if(Object.getOwnPropertyDescriptor(g,z)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let u=o4($._zod.def,{get shape(){let g={...$._zod.def.shape,...I};return B6(this,"shape",g),g}});return r$($,u)}function aZ($,I){if(!D6(I))throw Error("Invalid input to safeExtend: expected a plain object");let U=o4($._zod.def,{get shape(){let _={...$._zod.def.shape,...I};return B6(this,"shape",_),_}});return r$($,U)}function eZ($,I){let U=o4($._zod.def,{get shape(){let _={...$._zod.def.shape,...I._zod.def.shape};return B6(this,"shape",_),_},get catchall(){return I._zod.def.catchall},checks:[]});return r$($,U)}function sZ($,I,U){let u=I._zod.def.checks;if(u&&u.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let z=o4(I._zod.def,{get shape(){let v=I._zod.def.shape,J={...v};if(U)for(let N in U){if(!(N in v))throw Error(`Unrecognized key: "${N}"`);if(!U[N])continue;J[N]=$?new $({type:"optional",innerType:v[N]}):v[N]}else for(let N in v)J[N]=$?new $({type:"optional",innerType:v[N]}):v[N];return B6(this,"shape",J),J},checks:[]});return r$(I,z)}function $A($,I,U){let _=o4(I._zod.def,{get shape(){let u=I._zod.def.shape,g={...u};if(U)for(let z in U){if(!(z in g))throw Error(`Unrecognized key: "${z}"`);if(!U[z])continue;g[z]=new $({type:"nonoptional",innerType:u[z]})}else for(let z in u)g[z]=new $({type:"nonoptional",innerType:u[z]});return B6(this,"shape",g),g}});return r$(I,_)}function M6($,I=0){if($.aborted===!0)return!0;for(let U=I;U<$.issues.length;U++)if($.issues[U]?.continue!==!0)return!0;return!1}function _4($,I){return I.map((U)=>{var _;return(_=U).path??(_.path=[]),U.path.unshift($),U})}function aI($){return typeof $==="string"?$:$?.message}function e$($,I,U){let _={...$,path:$.path??[]};if(!$.message){let u=aI($.inst?._zod.def?.error?.($))??aI(I?.error?.($))??aI(U.customError?.($))??aI(U.localeError?.($))??"Invalid input";_.message=u}if(delete _.inst,delete _.continue,!I?.reportInput)delete _.input;return _}function I0($){if($ instanceof Set)return"set";if($ instanceof Map)return"map";if($ instanceof File)return"file";return"unknown"}function u0($){if(Array.isArray($))return"array";if(typeof $==="string")return"string";return"unknown"}function S($){let I=typeof $;switch(I){case"number":return Number.isNaN($)?"nan":"number";case"object":{if($===null)return"null";if(Array.isArray($))return"array";let U=$;if(U&&Object.getPrototypeOf(U)!==Object.prototype&&"constructor"in U&&U.constructor)return U.constructor.name}}return I}function C1(...$){let[I,U,_]=$;if(typeof I==="string")return{message:I,code:"custom",input:U,inst:_};return{...I}}function IA($){return Object.entries($).filter(([I,U])=>{return Number.isNaN(Number.parseInt(I,10))}).map((I)=>I[1])}function L5($){let I=atob($),U=new Uint8Array(I.length);for(let _=0;_<I.length;_++)U[_]=I.charCodeAt(_);return U}function R5($){let I="";for(let U=0;U<$.length;U++)I+=String.fromCharCode($[U]);return btoa(I)}function uA($){let I=$.replace(/-/g,"+").replace(/_/g,"/"),U="=".repeat((4-I.length%4)%4);return L5(I+U)}function UA($){return R5($).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function _A($){let I=$.replace(/^0x/,"");if(I.length%2!==0)throw Error("Invalid hex string length");let U=new Uint8Array(I.length/2);for(let _=0;_<I.length;_+=2)U[_/2]=Number.parseInt(I.slice(_,_+2),16);return U}function gA($){return Array.from($).map((I)=>I.toString(16).padStart(2,"0")).join("")}class W5{constructor(...$){}}var P5=($,I)=>{$.name="$ZodError",Object.defineProperty($,"_zod",{value:$._zod,enumerable:!1}),Object.defineProperty($,"issues",{value:I,enumerable:!1}),$.message=JSON.stringify(I,w1,2),Object.defineProperty($,"toString",{value:()=>$.message,enumerable:!1})},U0=V("$ZodError",P5),s$=V("$ZodError",P5,{Parent:Error});function _0($,I=(U)=>U.message){let U={},_=[];for(let u of $.issues)if(u.path.length>0)U[u.path[0]]=U[u.path[0]]||[],U[u.path[0]].push(I(u));else _.push(I(u));return{formErrors:_,fieldErrors:U}}function g0($,I=(U)=>U.message){let U={_errors:[]},_=(u)=>{for(let g of u.issues)if(g.code==="invalid_union"&&g.errors.length)g.errors.map((z)=>_({issues:z}));else if(g.code==="invalid_key")_({issues:g.issues});else if(g.code==="invalid_element")_({issues:g.issues});else if(g.path.length===0)U._errors.push(I(g));else{let z=U,v=0;while(v<g.path.length){let J=g.path[v];if(v!==g.path.length-1)z[J]=z[J]||{_errors:[]};else z[J]=z[J]||{_errors:[]},z[J]._errors.push(I(g));z=z[J],v++}}};return _($),U}function Oz($,I=(U)=>U.message){let U={errors:[]},_=(u,g=[])=>{var z,v;for(let J of u.issues)if(J.code==="invalid_union"&&J.errors.length)J.errors.map((N)=>_({issues:N},J.path));else if(J.code==="invalid_key")_({issues:J.issues},J.path);else if(J.code==="invalid_element")_({issues:J.issues},J.path);else{let N=[...g,...J.path];if(N.length===0){U.errors.push(I(J));continue}let X=U,G=0;while(G<N.length){let q=N[G],T=G===N.length-1;if(typeof q==="string")X.properties??(X.properties={}),(z=X.properties)[q]??(z[q]={errors:[]}),X=X.properties[q];else X.items??(X.items=[]),(v=X.items)[q]??(v[q]={errors:[]}),X=X.items[q];if(T)X.errors.push(I(J));G++}}};return _($),U}function Z5($){let I=[],U=$.map((_)=>typeof _==="object"?_.key:_);for(let _ of U)if(typeof _==="number")I.push(`[${_}]`);else if(typeof _==="symbol")I.push(`[${JSON.stringify(String(_))}]`);else if(/[^\w$]/.test(_))I.push(`[${JSON.stringify(_)}]`);else{if(I.length)I.push(".");I.push(_)}return I.join("")}function Vz($){let I=[],U=[...$.issues].sort((_,u)=>(_.path??[]).length-(u.path??[]).length);for(let _ of U)if(I.push(`✖ ${_.message}`),_.path?.length)I.push(` → at ${Z5(_.path)}`);return I.join(`
299
- `)}var f1=($)=>(I,U,_,u)=>{let g=_?Object.assign(_,{async:!1}):{async:!1},z=I._zod.run({value:U,issues:[]},g);if(z instanceof Promise)throw new C4;if(z.issues.length){let v=new(u?.Err??$)(z.issues.map((J)=>e$(J,g,L$())));throw au(v,u?.callee),v}return z.value},eu=f1(s$),x1=($)=>async(I,U,_,u)=>{let g=_?Object.assign(_,{async:!0}):{async:!0},z=I._zod.run({value:U,issues:[]},g);if(z instanceof Promise)z=await z;if(z.issues.length){let v=new(u?.Err??$)(z.issues.map((J)=>e$(J,g,L$())));throw au(v,u?.callee),v}return z.value},su=x1(s$),k1=($)=>(I,U,_)=>{let u=_?{..._,async:!1}:{async:!1},g=I._zod.run({value:U,issues:[]},u);if(g instanceof Promise)throw new C4;return g.issues.length?{success:!1,error:new($??U0)(g.issues.map((z)=>e$(z,u,L$())))}:{success:!0,data:g.value}},Bz=k1(s$),y1=($)=>async(I,U,_)=>{let u=_?Object.assign(_,{async:!0}):{async:!0},g=I._zod.run({value:U,issues:[]},u);if(g instanceof Promise)g=await g;return g.issues.length?{success:!1,error:new $(g.issues.map((z)=>e$(z,u,L$())))}:{success:!0,data:g.value}},Dz=y1(s$),$U=($)=>(I,U,_)=>{let u=_?Object.assign(_,{direction:"backward"}):{direction:"backward"};return f1($)(I,U,u)},vA=$U(s$),IU=($)=>(I,U,_)=>{return f1($)(I,U,_)},JA=IU(s$),uU=($)=>async(I,U,_)=>{let u=_?Object.assign(_,{direction:"backward"}):{direction:"backward"};return x1($)(I,U,u)},NA=uU(s$),UU=($)=>async(I,U,_)=>{return x1($)(I,U,_)},GA=UU(s$),_U=($)=>(I,U,_)=>{let u=_?Object.assign(_,{direction:"backward"}):{direction:"backward"};return k1($)(I,U,u)},XA=_U(s$),gU=($)=>(I,U,_)=>{return k1($)(I,U,_)},qA=gU(s$),zU=($)=>async(I,U,_)=>{let u=_?Object.assign(_,{direction:"backward"}):{direction:"backward"};return y1($)(I,U,u)},QA=zU(s$),vU=($)=>async(I,U,_)=>{return y1($)(I,U,_)},TA=vU(s$);var H4={};B4(H4,{xid:()=>Rz,uuid7:()=>VA,uuid6:()=>OA,uuid4:()=>YA,uuid:()=>o6,uppercase:()=>pz,unicodeEmail:()=>A5,undefined:()=>cz,ulid:()=>Lz,time:()=>yz,string:()=>nz,sha512_hex:()=>yA,sha512_base64url:()=>nA,sha512_base64:()=>iA,sha384_hex:()=>fA,sha384_base64url:()=>kA,sha384_base64:()=>xA,sha256_hex:()=>wA,sha256_base64url:()=>CA,sha256_base64:()=>EA,sha1_hex:()=>jA,sha1_base64url:()=>SA,sha1_base64:()=>FA,rfc5322Email:()=>DA,number:()=>z0,null:()=>hz,nanoid:()=>Pz,md5_hex:()=>ZA,md5_base64url:()=>bA,md5_base64:()=>AA,mac:()=>wz,lowercase:()=>dz,ksuid:()=>Wz,ipv6:()=>Sz,ipv4:()=>Fz,integer:()=>lz,idnEmail:()=>MA,html5Email:()=>BA,hostname:()=>RA,hex:()=>PA,guid:()=>Az,extendedDuration:()=>HA,emoji:()=>jz,email:()=>bz,e164:()=>xz,duration:()=>Zz,domain:()=>WA,datetime:()=>iz,date:()=>kz,cuid2:()=>Kz,cuid:()=>Mz,cidrv6:()=>Cz,cidrv4:()=>Ez,browserEmail:()=>KA,boolean:()=>mz,bigint:()=>rz,base64url:()=>JU,base64:()=>fz});var Mz=/^[cC][^\s-]{8,}$/,Kz=/^[0-9a-z]+$/,Lz=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Rz=/^[0-9a-vA-V]{20}$/,Wz=/^[A-Za-z0-9]{27}$/,Pz=/^[a-zA-Z0-9_-]{21}$/,Zz=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,HA=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Az=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,o6=($)=>{if(!$)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${$}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},YA=o6(4),OA=o6(6),VA=o6(7),bz=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,BA=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,DA=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,A5=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,MA=A5,KA=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,LA="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function jz(){return new RegExp(LA,"u")}var Fz=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Sz=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,wz=($)=>{let I=T4($??":");return new RegExp(`^(?:[0-9A-F]{2}${I}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${I}){5}[0-9a-f]{2}$`)},Ez=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Cz=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,fz=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,JU=/^[A-Za-z0-9_-]*$/,RA=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,WA=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,xz=/^\+[1-9]\d{6,14}$/,b5="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",kz=new RegExp(`^${b5}$`);function j5($){return typeof $.precision==="number"?$.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":$.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${$.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function yz($){return new RegExp(`^${j5($)}$`)}function iz($){let I=j5({precision:$.precision}),U=["Z"];if($.local)U.push("");if($.offset)U.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let _=`${I}(?:${U.join("|")})`;return new RegExp(`^${b5}T(?:${_})$`)}var nz=($)=>{let I=$?`[\\s\\S]{${$?.minimum??0},${$?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${I}$`)},rz=/^-?\d+n?$/,lz=/^-?\d+$/,z0=/^-?\d+(?:\.\d+)?$/,mz=/^(?:true|false)$/i,hz=/^null$/i;var cz=/^undefined$/i;var dz=/^[^A-Z]*$/,pz=/^[^a-z]*$/,PA=/^[0-9a-fA-F]*$/;function v0($,I){return new RegExp(`^[A-Za-z0-9+/]{${$}}${I}$`)}function J0($){return new RegExp(`^[A-Za-z0-9_-]{${$}}$`)}var ZA=/^[0-9a-fA-F]{32}$/,AA=v0(22,"=="),bA=J0(22),jA=/^[0-9a-fA-F]{40}$/,FA=v0(27,"="),SA=J0(27),wA=/^[0-9a-fA-F]{64}$/,EA=v0(43,"="),CA=J0(43),fA=/^[0-9a-fA-F]{96}$/,xA=v0(64,""),kA=J0(64),yA=/^[0-9a-fA-F]{128}$/,iA=v0(86,"=="),nA=J0(86);var G$=V("$ZodCheck",($,I)=>{var U;$._zod??($._zod={}),$._zod.def=I,(U=$._zod).onattach??(U.onattach=[])}),S5={number:"number",bigint:"bigint",object:"date"},NU=V("$ZodCheckLessThan",($,I)=>{G$.init($,I);let U=S5[typeof I.value];$._zod.onattach.push((_)=>{let u=_._zod.bag,g=(I.inclusive?u.maximum:u.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(I.value<g)if(I.inclusive)u.maximum=I.value;else u.exclusiveMaximum=I.value}),$._zod.check=(_)=>{if(I.inclusive?_.value<=I.value:_.value<I.value)return;_.issues.push({origin:U,code:"too_big",maximum:typeof I.value==="object"?I.value.getTime():I.value,input:_.value,inclusive:I.inclusive,inst:$,continue:!I.abort})}}),GU=V("$ZodCheckGreaterThan",($,I)=>{G$.init($,I);let U=S5[typeof I.value];$._zod.onattach.push((_)=>{let u=_._zod.bag,g=(I.inclusive?u.minimum:u.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(I.value>g)if(I.inclusive)u.minimum=I.value;else u.exclusiveMinimum=I.value}),$._zod.check=(_)=>{if(I.inclusive?_.value>=I.value:_.value>I.value)return;_.issues.push({origin:U,code:"too_small",minimum:typeof I.value==="object"?I.value.getTime():I.value,input:_.value,inclusive:I.inclusive,inst:$,continue:!I.abort})}}),oz=V("$ZodCheckMultipleOf",($,I)=>{G$.init($,I),$._zod.onattach.push((U)=>{var _;(_=U._zod.bag).multipleOf??(_.multipleOf=I.value)}),$._zod.check=(U)=>{if(typeof U.value!==typeof I.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof U.value==="bigint"?U.value%I.value===BigInt(0):Nz(U.value,I.value)===0)return;U.issues.push({origin:typeof U.value,code:"not_multiple_of",divisor:I.value,input:U.value,inst:$,continue:!I.abort})}}),tz=V("$ZodCheckNumberFormat",($,I)=>{G$.init($,I),I.format=I.format||"float64";let U=I.format?.includes("int"),_=U?"int":"number",[u,g]=Hz[I.format];$._zod.onattach.push((z)=>{let v=z._zod.bag;if(v.format=I.format,v.minimum=u,v.maximum=g,U)v.pattern=lz}),$._zod.check=(z)=>{let v=z.value;if(U){if(!Number.isInteger(v)){z.issues.push({expected:_,format:I.format,code:"invalid_type",continue:!1,input:v,inst:$});return}if(!Number.isSafeInteger(v)){if(v>0)z.issues.push({input:v,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:_,inclusive:!0,continue:!I.abort});else z.issues.push({input:v,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:_,inclusive:!0,continue:!I.abort});return}}if(v<u)z.issues.push({origin:"number",input:v,code:"too_small",minimum:u,inclusive:!0,inst:$,continue:!I.abort});if(v>g)z.issues.push({origin:"number",input:v,code:"too_big",maximum:g,inclusive:!0,inst:$,continue:!I.abort})}}),az=V("$ZodCheckBigIntFormat",($,I)=>{G$.init($,I);let[U,_]=Yz[I.format];$._zod.onattach.push((u)=>{let g=u._zod.bag;g.format=I.format,g.minimum=U,g.maximum=_}),$._zod.check=(u)=>{let g=u.value;if(g<U)u.issues.push({origin:"bigint",input:g,code:"too_small",minimum:U,inclusive:!0,inst:$,continue:!I.abort});if(g>_)u.issues.push({origin:"bigint",input:g,code:"too_big",maximum:_,inclusive:!0,inst:$,continue:!I.abort})}}),ez=V("$ZodCheckMaxSize",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!V6(u)&&u.size!==void 0}),$._zod.onattach.push((_)=>{let u=_._zod.bag.maximum??Number.POSITIVE_INFINITY;if(I.maximum<u)_._zod.bag.maximum=I.maximum}),$._zod.check=(_)=>{let u=_.value;if(u.size<=I.maximum)return;_.issues.push({origin:I0(u),code:"too_big",maximum:I.maximum,inclusive:!0,input:u,inst:$,continue:!I.abort})}}),sz=V("$ZodCheckMinSize",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!V6(u)&&u.size!==void 0}),$._zod.onattach.push((_)=>{let u=_._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(I.minimum>u)_._zod.bag.minimum=I.minimum}),$._zod.check=(_)=>{let u=_.value;if(u.size>=I.minimum)return;_.issues.push({origin:I0(u),code:"too_small",minimum:I.minimum,inclusive:!0,input:u,inst:$,continue:!I.abort})}}),$v=V("$ZodCheckSizeEquals",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!V6(u)&&u.size!==void 0}),$._zod.onattach.push((_)=>{let u=_._zod.bag;u.minimum=I.size,u.maximum=I.size,u.size=I.size}),$._zod.check=(_)=>{let u=_.value,g=u.size;if(g===I.size)return;let z=g>I.size;_.issues.push({origin:I0(u),...z?{code:"too_big",maximum:I.size}:{code:"too_small",minimum:I.size},inclusive:!0,exact:!0,input:_.value,inst:$,continue:!I.abort})}}),Iv=V("$ZodCheckMaxLength",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!V6(u)&&u.length!==void 0}),$._zod.onattach.push((_)=>{let u=_._zod.bag.maximum??Number.POSITIVE_INFINITY;if(I.maximum<u)_._zod.bag.maximum=I.maximum}),$._zod.check=(_)=>{let u=_.value;if(u.length<=I.maximum)return;let z=u0(u);_.issues.push({origin:z,code:"too_big",maximum:I.maximum,inclusive:!0,input:u,inst:$,continue:!I.abort})}}),uv=V("$ZodCheckMinLength",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!V6(u)&&u.length!==void 0}),$._zod.onattach.push((_)=>{let u=_._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(I.minimum>u)_._zod.bag.minimum=I.minimum}),$._zod.check=(_)=>{let u=_.value;if(u.length>=I.minimum)return;let z=u0(u);_.issues.push({origin:z,code:"too_small",minimum:I.minimum,inclusive:!0,input:u,inst:$,continue:!I.abort})}}),Uv=V("$ZodCheckLengthEquals",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!V6(u)&&u.length!==void 0}),$._zod.onattach.push((_)=>{let u=_._zod.bag;u.minimum=I.length,u.maximum=I.length,u.length=I.length}),$._zod.check=(_)=>{let u=_.value,g=u.length;if(g===I.length)return;let z=u0(u),v=g>I.length;_.issues.push({origin:z,...v?{code:"too_big",maximum:I.length}:{code:"too_small",minimum:I.length},inclusive:!0,exact:!0,input:_.value,inst:$,continue:!I.abort})}}),i1=V("$ZodCheckStringFormat",($,I)=>{var U,_;if(G$.init($,I),$._zod.onattach.push((u)=>{let g=u._zod.bag;if(g.format=I.format,I.pattern)g.patterns??(g.patterns=new Set),g.patterns.add(I.pattern)}),I.pattern)(U=$._zod).check??(U.check=(u)=>{if(I.pattern.lastIndex=0,I.pattern.test(u.value))return;u.issues.push({origin:"string",code:"invalid_format",format:I.format,input:u.value,...I.pattern?{pattern:I.pattern.toString()}:{},inst:$,continue:!I.abort})});else(_=$._zod).check??(_.check=()=>{})}),_v=V("$ZodCheckRegex",($,I)=>{i1.init($,I),$._zod.check=(U)=>{if(I.pattern.lastIndex=0,I.pattern.test(U.value))return;U.issues.push({origin:"string",code:"invalid_format",format:"regex",input:U.value,pattern:I.pattern.toString(),inst:$,continue:!I.abort})}}),gv=V("$ZodCheckLowerCase",($,I)=>{I.pattern??(I.pattern=dz),i1.init($,I)}),zv=V("$ZodCheckUpperCase",($,I)=>{I.pattern??(I.pattern=pz),i1.init($,I)}),vv=V("$ZodCheckIncludes",($,I)=>{G$.init($,I);let U=T4(I.includes),_=new RegExp(typeof I.position==="number"?`^.{${I.position}}${U}`:U);I.pattern=_,$._zod.onattach.push((u)=>{let g=u._zod.bag;g.patterns??(g.patterns=new Set),g.patterns.add(_)}),$._zod.check=(u)=>{if(u.value.includes(I.includes,I.position))return;u.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:I.includes,input:u.value,inst:$,continue:!I.abort})}}),Jv=V("$ZodCheckStartsWith",($,I)=>{G$.init($,I);let U=new RegExp(`^${T4(I.prefix)}.*`);I.pattern??(I.pattern=U),$._zod.onattach.push((_)=>{let u=_._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(U)}),$._zod.check=(_)=>{if(_.value.startsWith(I.prefix))return;_.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:I.prefix,input:_.value,inst:$,continue:!I.abort})}}),Nv=V("$ZodCheckEndsWith",($,I)=>{G$.init($,I);let U=new RegExp(`.*${T4(I.suffix)}$`);I.pattern??(I.pattern=U),$._zod.onattach.push((_)=>{let u=_._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(U)}),$._zod.check=(_)=>{if(_.value.endsWith(I.suffix))return;_.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:I.suffix,input:_.value,inst:$,continue:!I.abort})}});function F5($,I,U){if($.issues.length)I.issues.push(..._4(U,$.issues))}var Gv=V("$ZodCheckProperty",($,I)=>{G$.init($,I),$._zod.check=(U)=>{let _=I.schema._zod.run({value:U.value[I.property],issues:[]},{});if(_ instanceof Promise)return _.then((u)=>F5(u,U,I.property));F5(_,U,I.property);return}}),Xv=V("$ZodCheckMimeType",($,I)=>{G$.init($,I);let U=new Set(I.mime);$._zod.onattach.push((_)=>{_._zod.bag.mime=I.mime}),$._zod.check=(_)=>{if(U.has(_.value.type))return;_.issues.push({code:"invalid_value",values:I.mime,input:_.value.type,inst:$,continue:!I.abort})}}),qv=V("$ZodCheckOverwrite",($,I)=>{G$.init($,I),$._zod.check=(U)=>{U.value=I.tx(U.value)}});class XU{constructor($=[]){if(this.content=[],this.indent=0,this)this.args=$}indented($){this.indent+=1,$(this),this.indent-=1}write($){if(typeof $==="function"){$(this,{execution:"sync"}),$(this,{execution:"async"});return}let U=$.split(`
300
- `).filter((g)=>g),_=Math.min(...U.map((g)=>g.length-g.trimStart().length)),u=U.map((g)=>g.slice(_)).map((g)=>" ".repeat(this.indent*2)+g);for(let g of u)this.content.push(g)}compile(){let $=Function,I=this?.args,_=[...(this?.content??[""]).map((u)=>` ${u}`)];return new $(...I,_.join(`
301
- `))}}var Qv={major:4,minor:3,patch:6};var m=V("$ZodType",($,I)=>{var U;$??($={}),$._zod.def=I,$._zod.bag=$._zod.bag||{},$._zod.version=Qv;let _=[...$._zod.def.checks??[]];if($._zod.traits.has("$ZodCheck"))_.unshift($);for(let u of _)for(let g of u._zod.onattach)g($);if(_.length===0)(U=$._zod).deferred??(U.deferred=[]),$._zod.deferred?.push(()=>{$._zod.run=$._zod.parse});else{let u=(z,v,J)=>{let N=M6(z),X;for(let G of v){if(G._zod.def.when){if(!G._zod.def.when(z))continue}else if(N)continue;let q=z.issues.length,T=G._zod.check(z);if(T instanceof Promise&&J?.async===!1)throw new C4;if(X||T instanceof Promise)X=(X??Promise.resolve()).then(async()=>{if(await T,z.issues.length===q)return;if(!N)N=M6(z,q)});else{if(z.issues.length===q)continue;if(!N)N=M6(z,q)}}if(X)return X.then(()=>{return z});return z},g=(z,v,J)=>{if(M6(z))return z.aborted=!0,z;let N=u(v,_,J);if(N instanceof Promise){if(J.async===!1)throw new C4;return N.then((X)=>$._zod.parse(X,J))}return $._zod.parse(N,J)};$._zod.run=(z,v)=>{if(v.skipChecks)return $._zod.parse(z,v);if(v.direction==="backward"){let N=$._zod.parse({value:z.value,issues:[]},{...v,skipChecks:!0});if(N instanceof Promise)return N.then((X)=>{return g(X,z,v)});return g(N,z,v)}let J=$._zod.parse(z,v);if(J instanceof Promise){if(v.async===!1)throw new C4;return J.then((N)=>u(N,_,v))}return u(J,_,v)}}p($,"~standard",()=>({validate:(u)=>{try{let g=Bz($,u);return g.success?{value:g.data}:{issues:g.error?.issues}}catch(g){return Dz($,u).then((z)=>z.success?{value:z.data}:{issues:z.error?.issues})}},vendor:"zod",version:1}))}),t6=V("$ZodString",($,I)=>{m.init($,I),$._zod.pattern=[...$?._zod.bag?.patterns??[]].pop()??nz($._zod.bag),$._zod.parse=(U,_)=>{if(I.coerce)try{U.value=String(U.value)}catch(u){}if(typeof U.value==="string")return U;return U.issues.push({expected:"string",code:"invalid_type",input:U.value,inst:$}),U}}),v$=V("$ZodStringFormat",($,I)=>{i1.init($,I),t6.init($,I)}),Hv=V("$ZodGUID",($,I)=>{I.pattern??(I.pattern=Az),v$.init($,I)}),Yv=V("$ZodUUID",($,I)=>{if(I.version){let _={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[I.version];if(_===void 0)throw Error(`Invalid UUID version: "${I.version}"`);I.pattern??(I.pattern=o6(_))}else I.pattern??(I.pattern=o6());v$.init($,I)}),Ov=V("$ZodEmail",($,I)=>{I.pattern??(I.pattern=bz),v$.init($,I)}),Vv=V("$ZodURL",($,I)=>{v$.init($,I),$._zod.check=(U)=>{try{let _=U.value.trim(),u=new URL(_);if(I.hostname){if(I.hostname.lastIndex=0,!I.hostname.test(u.hostname))U.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:I.hostname.source,input:U.value,inst:$,continue:!I.abort})}if(I.protocol){if(I.protocol.lastIndex=0,!I.protocol.test(u.protocol.endsWith(":")?u.protocol.slice(0,-1):u.protocol))U.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:I.protocol.source,input:U.value,inst:$,continue:!I.abort})}if(I.normalize)U.value=u.href;else U.value=_;return}catch(_){U.issues.push({code:"invalid_format",format:"url",input:U.value,inst:$,continue:!I.abort})}}}),Bv=V("$ZodEmoji",($,I)=>{I.pattern??(I.pattern=jz()),v$.init($,I)}),Dv=V("$ZodNanoID",($,I)=>{I.pattern??(I.pattern=Pz),v$.init($,I)}),Mv=V("$ZodCUID",($,I)=>{I.pattern??(I.pattern=Mz),v$.init($,I)}),Kv=V("$ZodCUID2",($,I)=>{I.pattern??(I.pattern=Kz),v$.init($,I)}),Lv=V("$ZodULID",($,I)=>{I.pattern??(I.pattern=Lz),v$.init($,I)}),Rv=V("$ZodXID",($,I)=>{I.pattern??(I.pattern=Rz),v$.init($,I)}),Wv=V("$ZodKSUID",($,I)=>{I.pattern??(I.pattern=Wz),v$.init($,I)}),Pv=V("$ZodISODateTime",($,I)=>{I.pattern??(I.pattern=iz(I)),v$.init($,I)}),Zv=V("$ZodISODate",($,I)=>{I.pattern??(I.pattern=kz),v$.init($,I)}),Av=V("$ZodISOTime",($,I)=>{I.pattern??(I.pattern=yz(I)),v$.init($,I)}),bv=V("$ZodISODuration",($,I)=>{I.pattern??(I.pattern=Zz),v$.init($,I)}),jv=V("$ZodIPv4",($,I)=>{I.pattern??(I.pattern=Fz),v$.init($,I),$._zod.bag.format="ipv4"}),Fv=V("$ZodIPv6",($,I)=>{I.pattern??(I.pattern=Sz),v$.init($,I),$._zod.bag.format="ipv6",$._zod.check=(U)=>{try{new URL(`http://[${U.value}]`)}catch{U.issues.push({code:"invalid_format",format:"ipv6",input:U.value,inst:$,continue:!I.abort})}}}),Sv=V("$ZodMAC",($,I)=>{I.pattern??(I.pattern=wz(I.delimiter)),v$.init($,I),$._zod.bag.format="mac"}),wv=V("$ZodCIDRv4",($,I)=>{I.pattern??(I.pattern=Ez),v$.init($,I)}),Ev=V("$ZodCIDRv6",($,I)=>{I.pattern??(I.pattern=Cz),v$.init($,I),$._zod.check=(U)=>{let _=U.value.split("/");try{if(_.length!==2)throw Error();let[u,g]=_;if(!g)throw Error();let z=Number(g);if(`${z}`!==g)throw Error();if(z<0||z>128)throw Error();new URL(`http://[${u}]`)}catch{U.issues.push({code:"invalid_format",format:"cidrv6",input:U.value,inst:$,continue:!I.abort})}}});function Cv($){if($==="")return!0;if($.length%4!==0)return!1;try{return atob($),!0}catch{return!1}}var fv=V("$ZodBase64",($,I)=>{I.pattern??(I.pattern=fz),v$.init($,I),$._zod.bag.contentEncoding="base64",$._zod.check=(U)=>{if(Cv(U.value))return;U.issues.push({code:"invalid_format",format:"base64",input:U.value,inst:$,continue:!I.abort})}});function h5($){if(!JU.test($))return!1;let I=$.replace(/[-_]/g,(_)=>_==="-"?"+":"/"),U=I.padEnd(Math.ceil(I.length/4)*4,"=");return Cv(U)}var xv=V("$ZodBase64URL",($,I)=>{I.pattern??(I.pattern=JU),v$.init($,I),$._zod.bag.contentEncoding="base64url",$._zod.check=(U)=>{if(h5(U.value))return;U.issues.push({code:"invalid_format",format:"base64url",input:U.value,inst:$,continue:!I.abort})}}),kv=V("$ZodE164",($,I)=>{I.pattern??(I.pattern=xz),v$.init($,I)});function c5($,I=null){try{let U=$.split(".");if(U.length!==3)return!1;let[_]=U;if(!_)return!1;let u=JSON.parse(atob(_));if("typ"in u&&u?.typ!=="JWT")return!1;if(!u.alg)return!1;if(I&&(!("alg"in u)||u.alg!==I))return!1;return!0}catch{return!1}}var yv=V("$ZodJWT",($,I)=>{v$.init($,I),$._zod.check=(U)=>{if(c5(U.value,I.alg))return;U.issues.push({code:"invalid_format",format:"jwt",input:U.value,inst:$,continue:!I.abort})}}),iv=V("$ZodCustomStringFormat",($,I)=>{v$.init($,I),$._zod.check=(U)=>{if(I.fn(U.value))return;U.issues.push({code:"invalid_format",format:I.format,input:U.value,inst:$,continue:!I.abort})}}),OU=V("$ZodNumber",($,I)=>{m.init($,I),$._zod.pattern=$._zod.bag.pattern??z0,$._zod.parse=(U,_)=>{if(I.coerce)try{U.value=Number(U.value)}catch(z){}let u=U.value;if(typeof u==="number"&&!Number.isNaN(u)&&Number.isFinite(u))return U;let g=typeof u==="number"?Number.isNaN(u)?"NaN":!Number.isFinite(u)?"Infinity":void 0:void 0;return U.issues.push({expected:"number",code:"invalid_type",input:u,inst:$,...g?{received:g}:{}}),U}}),nv=V("$ZodNumberFormat",($,I)=>{tz.init($,I),OU.init($,I)}),N0=V("$ZodBoolean",($,I)=>{m.init($,I),$._zod.pattern=mz,$._zod.parse=(U,_)=>{if(I.coerce)try{U.value=Boolean(U.value)}catch(g){}let u=U.value;if(typeof u==="boolean")return U;return U.issues.push({expected:"boolean",code:"invalid_type",input:u,inst:$}),U}}),VU=V("$ZodBigInt",($,I)=>{m.init($,I),$._zod.pattern=rz,$._zod.parse=(U,_)=>{if(I.coerce)try{U.value=BigInt(U.value)}catch(u){}if(typeof U.value==="bigint")return U;return U.issues.push({expected:"bigint",code:"invalid_type",input:U.value,inst:$}),U}}),rv=V("$ZodBigIntFormat",($,I)=>{az.init($,I),VU.init($,I)}),lv=V("$ZodSymbol",($,I)=>{m.init($,I),$._zod.parse=(U,_)=>{let u=U.value;if(typeof u==="symbol")return U;return U.issues.push({expected:"symbol",code:"invalid_type",input:u,inst:$}),U}}),mv=V("$ZodUndefined",($,I)=>{m.init($,I),$._zod.pattern=cz,$._zod.values=new Set([void 0]),$._zod.optin="optional",$._zod.optout="optional",$._zod.parse=(U,_)=>{let u=U.value;if(typeof u>"u")return U;return U.issues.push({expected:"undefined",code:"invalid_type",input:u,inst:$}),U}}),hv=V("$ZodNull",($,I)=>{m.init($,I),$._zod.pattern=hz,$._zod.values=new Set([null]),$._zod.parse=(U,_)=>{let u=U.value;if(u===null)return U;return U.issues.push({expected:"null",code:"invalid_type",input:u,inst:$}),U}}),cv=V("$ZodAny",($,I)=>{m.init($,I),$._zod.parse=(U)=>U}),dv=V("$ZodUnknown",($,I)=>{m.init($,I),$._zod.parse=(U)=>U}),pv=V("$ZodNever",($,I)=>{m.init($,I),$._zod.parse=(U,_)=>{return U.issues.push({expected:"never",code:"invalid_type",input:U.value,inst:$}),U}}),ov=V("$ZodVoid",($,I)=>{m.init($,I),$._zod.parse=(U,_)=>{let u=U.value;if(typeof u>"u")return U;return U.issues.push({expected:"void",code:"invalid_type",input:u,inst:$}),U}}),tv=V("$ZodDate",($,I)=>{m.init($,I),$._zod.parse=(U,_)=>{if(I.coerce)try{U.value=new Date(U.value)}catch(v){}let u=U.value,g=u instanceof Date;if(g&&!Number.isNaN(u.getTime()))return U;return U.issues.push({expected:"date",code:"invalid_type",input:u,...g?{received:"Invalid Date"}:{},inst:$}),U}});function E5($,I,U){if($.issues.length)I.issues.push(..._4(U,$.issues));I.value[U]=$.value}var av=V("$ZodArray",($,I)=>{m.init($,I),$._zod.parse=(U,_)=>{let u=U.value;if(!Array.isArray(u))return U.issues.push({expected:"array",code:"invalid_type",input:u,inst:$}),U;U.value=Array(u.length);let g=[];for(let z=0;z<u.length;z++){let v=u[z],J=I.element._zod.run({value:v,issues:[]},_);if(J instanceof Promise)g.push(J.then((N)=>E5(N,U,z)));else E5(J,U,z)}if(g.length)return Promise.all(g).then(()=>U);return U}});function YU($,I,U,_,u){if($.issues.length){if(u&&!(U in _))return;I.issues.push(..._4(U,$.issues))}if($.value===void 0){if(U in _)I.value[U]=void 0}else I.value[U]=$.value}function d5($){let I=Object.keys($.shape);for(let _ of I)if(!$.shape?.[_]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${_}": expected a Zod schema`);let U=Tz($.shape);return{...$,keys:I,keySet:new Set(I),numKeys:I.length,optionalKeys:new Set(U)}}function p5($,I,U,_,u,g){let z=[],v=u.keySet,J=u.catchall._zod,N=J.def.type,X=J.optout==="optional";for(let G in I){if(v.has(G))continue;if(N==="never"){z.push(G);continue}let q=J.run({value:I[G],issues:[]},_);if(q instanceof Promise)$.push(q.then((T)=>YU(T,U,G,I,X)));else YU(q,U,G,I,X)}if(z.length)U.issues.push({code:"unrecognized_keys",keys:z,input:I,inst:g});if(!$.length)return U;return Promise.all($).then(()=>{return U})}var o5=V("$ZodObject",($,I)=>{if(m.init($,I),!Object.getOwnPropertyDescriptor(I,"shape")?.get){let v=I.shape;Object.defineProperty(I,"shape",{get:()=>{let J={...v};return Object.defineProperty(I,"shape",{value:J}),J}})}let _=E1(()=>d5(I));p($._zod,"propValues",()=>{let v=I.shape,J={};for(let N in v){let X=v[N]._zod;if(X.values){J[N]??(J[N]=new Set);for(let G of X.values)J[N].add(G)}}return J});let u=p6,g=I.catchall,z;$._zod.parse=(v,J)=>{z??(z=_.value);let N=v.value;if(!u(N))return v.issues.push({expected:"object",code:"invalid_type",input:N,inst:$}),v;v.value={};let X=[],G=z.shape;for(let q of z.keys){let T=G[q],H=T._zod.optout==="optional",Q=T._zod.run({value:N[q],issues:[]},J);if(Q instanceof Promise)X.push(Q.then((Y)=>YU(Y,v,q,N,H)));else YU(Q,v,q,N,H)}if(!g)return X.length?Promise.all(X).then(()=>v):v;return p5(X,N,v,J,_.value,$)}}),ev=V("$ZodObjectJIT",($,I)=>{o5.init($,I);let U=$._zod.parse,_=E1(()=>d5(I)),u=(q)=>{let T=new XU(["shape","payload","ctx"]),H=_.value,Q=(P)=>{let O=tu(P);return`shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`};T.write("const input = payload.value;");let Y=Object.create(null),K=0;for(let P of H.keys)Y[P]=`key_${K++}`;T.write("const newResult = {};");for(let P of H.keys){let O=Y[P],B=tu(P),D=q[P]?._zod?.optout==="optional";if(T.write(`const ${O} = ${Q(P)};`),D)T.write(`
302
- if (${O}.issues.length) {
303
- if (${B} in input) {
304
- payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
298
+ `+U)}function M1($,I,U,_,u,z){if($.listenerCount("wsClientError")){let g=Error(u);Error.captureStackTrace(g,M1),$.emit("wsClientError",g,U,I)}else s0(U,_,u,z)}});var XX=q$(GX(),1),{program:vx,createCommand:Jx,createArgument:Nx,createOption:Gx,CommanderError:Xx,InvalidArgumentError:qx,InvalidOptionArgumentError:Qx,Command:p2,Argument:Tx,Option:Hx,Help:Yx}=XX.default;vg();var r=q$(b$(),1);import{execSync as Aj,spawn as UG}from"node:child_process";import y from"node:fs";import{tmpdir as w_}from"node:os";import I$ from"node:path";var g$={};B4(g$,{xor:()=>pQ,xid:()=>OQ,void:()=>rQ,uuidv7:()=>NQ,uuidv6:()=>JQ,uuidv4:()=>vQ,uuid:()=>gQ,util:()=>w,url:()=>GQ,uppercase:()=>h1,unknown:()=>u1,union:()=>L_,undefined:()=>iQ,ulid:()=>YQ,uint64:()=>kQ,uint32:()=>CQ,tuple:()=>L3,trim:()=>a1,treeifyError:()=>Bg,transform:()=>P_,toUpperCase:()=>s1,toLowerCase:()=>e1,toJSONSchema:()=>aU,templateLiteral:()=>v7,symbol:()=>yQ,superRefine:()=>a3,success:()=>_7,stringbool:()=>H7,stringFormat:()=>AQ,string:()=>U_,strictObject:()=>cQ,startsWith:()=>d1,slugify:()=>$I,size:()=>s6,setErrorMap:()=>Qj,set:()=>sQ,safeParseAsync:()=>e8,safeParse:()=>a8,safeEncodeAsync:()=>z3,safeEncode:()=>U3,safeDecodeAsync:()=>g3,safeDecode:()=>_3,registry:()=>KU,regexes:()=>H4,regex:()=>l1,refine:()=>t3,record:()=>W3,readonly:()=>m3,property:()=>dU,promise:()=>J7,prettifyError:()=>Dg,preprocess:()=>O7,prefault:()=>x3,positive:()=>lU,pipe:()=>W0,partialRecord:()=>tQ,parseAsync:()=>t8,parse:()=>o8,overwrite:()=>K4,optional:()=>R0,object:()=>hQ,number:()=>J3,nullish:()=>U7,nullable:()=>L0,null:()=>Q3,normalize:()=>t1,nonpositive:()=>hU,nonoptional:()=>k3,nonnegative:()=>cU,never:()=>R_,negative:()=>mU,nativeEnum:()=>$7,nanoid:()=>QQ,nan:()=>z7,multipleOf:()=>K6,minSize:()=>k4,minLength:()=>t4,mime:()=>o1,meta:()=>Q7,maxSize:()=>R6,maxLength:()=>$1,map:()=>eQ,mac:()=>DQ,lte:()=>g4,lt:()=>f4,lowercase:()=>m1,looseRecord:()=>aQ,looseObject:()=>dQ,locales:()=>V0,literal:()=>I7,length:()=>I1,lazy:()=>d3,ksuid:()=>VQ,keyof:()=>mQ,jwt:()=>ZQ,json:()=>Y7,iso:()=>UI,ipv6:()=>MQ,ipv4:()=>BQ,intersection:()=>K3,int64:()=>xQ,int32:()=>EQ,int:()=>__,instanceof:()=>T7,includes:()=>c1,httpUrl:()=>XQ,hostname:()=>bQ,hex:()=>jQ,hash:()=>FQ,guid:()=>zQ,gte:()=>r$,gt:()=>x4,globalRegistry:()=>w$,getErrorMap:()=>Tj,function:()=>N7,fromJSONSchema:()=>B7,formatError:()=>v0,float64:()=>wQ,float32:()=>SQ,flattenError:()=>g0,file:()=>u7,exactOptional:()=>S3,enum:()=>W_,endsWith:()=>p1,encodeAsync:()=>I3,encode:()=>s8,emoji:()=>qQ,email:()=>_Q,e164:()=>PQ,discriminatedUnion:()=>oQ,describe:()=>q7,decodeAsync:()=>u3,decode:()=>$3,date:()=>lQ,custom:()=>X7,cuid2:()=>HQ,cuid:()=>TQ,core:()=>a4,config:()=>R$,coerce:()=>s3,codec:()=>g7,clone:()=>n$,cidrv6:()=>RQ,cidrv4:()=>KQ,check:()=>G7,catch:()=>n3,boolean:()=>N3,bigint:()=>fQ,base64url:()=>WQ,base64:()=>LQ,array:()=>A0,any:()=>nQ,_function:()=>N7,_default:()=>C3,_ZodString:()=>z_,ZodXor:()=>B3,ZodXID:()=>q_,ZodVoid:()=>O3,ZodUnknown:()=>H3,ZodUnion:()=>j0,ZodUndefined:()=>X3,ZodUUID:()=>y4,ZodURL:()=>P0,ZodULID:()=>X_,ZodType:()=>c,ZodTuple:()=>R3,ZodTransform:()=>j3,ZodTemplateLiteral:()=>h3,ZodSymbol:()=>G3,ZodSuccess:()=>y3,ZodStringFormat:()=>J$,ZodString:()=>zI,ZodSet:()=>Z3,ZodRecord:()=>F0,ZodRealError:()=>$4,ZodReadonly:()=>l3,ZodPromise:()=>p3,ZodPrefault:()=>f3,ZodPipe:()=>b_,ZodOptional:()=>Z_,ZodObject:()=>b0,ZodNumberFormat:()=>U1,ZodNumber:()=>vI,ZodNullable:()=>w3,ZodNull:()=>q3,ZodNonOptional:()=>A_,ZodNever:()=>Y3,ZodNanoID:()=>J_,ZodNaN:()=>r3,ZodMap:()=>P3,ZodMAC:()=>v3,ZodLiteral:()=>A3,ZodLazy:()=>c3,ZodKSUID:()=>Q_,ZodJWT:()=>M_,ZodIssueCode:()=>qj,ZodIntersection:()=>M3,ZodISOTime:()=>I_,ZodISODuration:()=>u_,ZodISODateTime:()=>sU,ZodISODate:()=>$_,ZodIPv6:()=>H_,ZodIPv4:()=>T_,ZodGUID:()=>K0,ZodFunction:()=>o3,ZodFirstPartyTypeKind:()=>e3,ZodFile:()=>b3,ZodExactOptional:()=>F3,ZodError:()=>Gj,ZodEnum:()=>_I,ZodEmoji:()=>v_,ZodEmail:()=>g_,ZodE164:()=>D_,ZodDiscriminatedUnion:()=>D3,ZodDefault:()=>E3,ZodDate:()=>Z0,ZodCustomStringFormat:()=>gI,ZodCustom:()=>S0,ZodCodec:()=>j_,ZodCatch:()=>i3,ZodCUID2:()=>G_,ZodCUID:()=>N_,ZodCIDRv6:()=>O_,ZodCIDRv4:()=>Y_,ZodBoolean:()=>JI,ZodBigIntFormat:()=>K_,ZodBigInt:()=>NI,ZodBase64URL:()=>B_,ZodBase64:()=>V_,ZodArray:()=>V3,ZodAny:()=>T3,TimePrecision:()=>LN,NEVER:()=>Jg,$output:()=>VN,$input:()=>BN,$brand:()=>Ng});var a4={};B4(a4,{version:()=>Hv,util:()=>w,treeifyError:()=>Bg,toJSONSchema:()=>aU,toDotPath:()=>Z5,safeParseAsync:()=>Kg,safeParse:()=>Mg,safeEncodeAsync:()=>HA,safeEncode:()=>QA,safeDecodeAsync:()=>YA,safeDecode:()=>TA,registry:()=>KU,regexes:()=>H4,process:()=>_$,prettifyError:()=>Dg,parseAsync:()=>$U,parse:()=>su,meta:()=>_8,locales:()=>V0,isValidJWT:()=>c5,isValidBase64URL:()=>h5,isValidBase64:()=>xv,initializeContext:()=>L6,globalRegistry:()=>w$,globalConfig:()=>eI,formatError:()=>v0,flattenError:()=>g0,finalize:()=>P6,extractDefs:()=>W6,encodeAsync:()=>XA,encode:()=>NA,describe:()=>U8,decodeAsync:()=>qA,decode:()=>GA,createToJSONSchemaMethod:()=>g8,createStandardJSONSchemaMethod:()=>uI,config:()=>R$,clone:()=>n$,_xor:()=>ib,_xid:()=>wU,_void:()=>pN,_uuidv7:()=>ZU,_uuidv6:()=>PU,_uuidv4:()=>WU,_uuid:()=>LU,_url:()=>D0,_uppercase:()=>h1,_unknown:()=>cN,_union:()=>yb,_undefined:()=>lN,_ulid:()=>SU,_uint64:()=>nN,_uint32:()=>CN,_tuple:()=>lb,_trim:()=>a1,_transform:()=>tb,_toUpperCase:()=>s1,_toLowerCase:()=>e1,_templateLiteral:()=>zj,_symbol:()=>rN,_superRefine:()=>u8,_success:()=>Ij,_stringbool:()=>z8,_stringFormat:()=>II,_string:()=>MN,_startsWith:()=>d1,_slugify:()=>$I,_size:()=>s6,_set:()=>cb,_safeParseAsync:()=>i1,_safeParse:()=>y1,_safeEncodeAsync:()=>vU,_safeEncode:()=>zU,_safeDecodeAsync:()=>JU,_safeDecode:()=>gU,_regex:()=>l1,_refine:()=>I8,_record:()=>mb,_readonly:()=>_j,_property:()=>dU,_promise:()=>vj,_positive:()=>lU,_pipe:()=>Uj,_parseAsync:()=>k1,_parse:()=>x1,_overwrite:()=>K4,_optional:()=>ab,_number:()=>bN,_nullable:()=>eb,_null:()=>mN,_normalize:()=>t1,_nonpositive:()=>hU,_nonoptional:()=>$j,_nonnegative:()=>cU,_never:()=>dN,_negative:()=>mU,_nativeEnum:()=>pb,_nanoid:()=>bU,_nan:()=>aN,_multipleOf:()=>K6,_minSize:()=>k4,_minLength:()=>t4,_min:()=>r$,_mime:()=>o1,_maxSize:()=>R6,_maxLength:()=>$1,_max:()=>g4,_map:()=>hb,_mac:()=>RN,_lte:()=>g4,_lt:()=>f4,_lowercase:()=>m1,_literal:()=>ob,_length:()=>I1,_lazy:()=>gj,_ksuid:()=>EU,_jwt:()=>rU,_isoTime:()=>ZN,_isoDuration:()=>AN,_isoDateTime:()=>WN,_isoDate:()=>PN,_ipv6:()=>fU,_ipv4:()=>CU,_intersection:()=>rb,_int64:()=>iN,_int32:()=>EN,_int:()=>FN,_includes:()=>c1,_guid:()=>B0,_gte:()=>r$,_gt:()=>x4,_float64:()=>wN,_float32:()=>SN,_file:()=>sN,_enum:()=>db,_endsWith:()=>p1,_encodeAsync:()=>UU,_encode:()=>IU,_emoji:()=>AU,_email:()=>RU,_e164:()=>nU,_discriminatedUnion:()=>nb,_default:()=>sb,_decodeAsync:()=>_U,_decode:()=>uU,_date:()=>oN,_custom:()=>$8,_cuid2:()=>FU,_cuid:()=>jU,_coercedString:()=>KN,_coercedNumber:()=>jN,_coercedDate:()=>tN,_coercedBoolean:()=>xN,_coercedBigint:()=>yN,_cidrv6:()=>kU,_cidrv4:()=>xU,_check:()=>IQ,_catch:()=>uj,_boolean:()=>fN,_bigint:()=>kN,_base64url:()=>iU,_base64:()=>yU,_array:()=>eN,_any:()=>hN,TimePrecision:()=>LN,NEVER:()=>Jg,JSONSchemaGenerator:()=>m8,JSONSchema:()=>uQ,Doc:()=>qU,$output:()=>VN,$input:()=>BN,$constructor:()=>D,$brand:()=>Ng,$ZodXor:()=>IJ,$ZodXID:()=>Pv,$ZodVoid:()=>av,$ZodUnknown:()=>ov,$ZodUnion:()=>q0,$ZodUndefined:()=>cv,$ZodUUID:()=>Vv,$ZodURL:()=>Dv,$ZodULID:()=>Wv,$ZodType:()=>m,$ZodTuple:()=>DU,$ZodTransform:()=>GJ,$ZodTemplateLiteral:()=>MJ,$ZodSymbol:()=>hv,$ZodSuccess:()=>YJ,$ZodStringFormat:()=>v$,$ZodString:()=>e6,$ZodSet:()=>gJ,$ZodRegistry:()=>DN,$ZodRecord:()=>_J,$ZodRealError:()=>s$,$ZodReadonly:()=>DJ,$ZodPromise:()=>RJ,$ZodPrefault:()=>TJ,$ZodPipe:()=>BJ,$ZodOptional:()=>MU,$ZodObjectJIT:()=>$J,$ZodObject:()=>o5,$ZodNumberFormat:()=>lv,$ZodNumber:()=>VU,$ZodNullable:()=>qJ,$ZodNull:()=>dv,$ZodNonOptional:()=>HJ,$ZodNever:()=>tv,$ZodNanoID:()=>Kv,$ZodNaN:()=>VJ,$ZodMap:()=>zJ,$ZodMAC:()=>Ev,$ZodLiteral:()=>JJ,$ZodLazy:()=>LJ,$ZodKSUID:()=>Zv,$ZodJWT:()=>nv,$ZodIntersection:()=>UJ,$ZodISOTime:()=>jv,$ZodISODuration:()=>Fv,$ZodISODateTime:()=>Av,$ZodISODate:()=>bv,$ZodIPv6:()=>wv,$ZodIPv4:()=>Sv,$ZodGUID:()=>Ov,$ZodFunction:()=>KJ,$ZodFile:()=>NJ,$ZodExactOptional:()=>XJ,$ZodError:()=>z0,$ZodEnum:()=>vJ,$ZodEncodeError:()=>o6,$ZodEmoji:()=>Mv,$ZodEmail:()=>Bv,$ZodE164:()=>iv,$ZodDiscriminatedUnion:()=>uJ,$ZodDefault:()=>QJ,$ZodDate:()=>ev,$ZodCustomStringFormat:()=>rv,$ZodCustom:()=>WJ,$ZodCodec:()=>Q0,$ZodCheckUpperCase:()=>Jv,$ZodCheckStringFormat:()=>n1,$ZodCheckStartsWith:()=>Gv,$ZodCheckSizeEquals:()=>uv,$ZodCheckRegex:()=>gv,$ZodCheckProperty:()=>qv,$ZodCheckOverwrite:()=>Tv,$ZodCheckNumberFormat:()=>eg,$ZodCheckMultipleOf:()=>ag,$ZodCheckMinSize:()=>Iv,$ZodCheckMinLength:()=>_v,$ZodCheckMimeType:()=>Qv,$ZodCheckMaxSize:()=>$v,$ZodCheckMaxLength:()=>Uv,$ZodCheckLowerCase:()=>vv,$ZodCheckLessThan:()=>GU,$ZodCheckLengthEquals:()=>zv,$ZodCheckIncludes:()=>Nv,$ZodCheckGreaterThan:()=>XU,$ZodCheckEndsWith:()=>Xv,$ZodCheckBigIntFormat:()=>sg,$ZodCheck:()=>G$,$ZodCatch:()=>OJ,$ZodCUID2:()=>Lv,$ZodCUID:()=>Rv,$ZodCIDRv6:()=>fv,$ZodCIDRv4:()=>Cv,$ZodBoolean:()=>X0,$ZodBigIntFormat:()=>mv,$ZodBigInt:()=>BU,$ZodBase64URL:()=>yv,$ZodBase64:()=>kv,$ZodAsyncError:()=>C4,$ZodArray:()=>sv,$ZodAny:()=>pv});var Jg=Object.freeze({status:"aborted"});function D($,I,U){function _(v,J){if(!v._zod)Object.defineProperty(v,"_zod",{value:{def:J,constr:g,traits:new Set},enumerable:!1});if(v._zod.traits.has($))return;v._zod.traits.add($),I(v,J);let N=g.prototype,X=Object.keys(N);for(let G=0;G<X.length;G++){let q=X[G];if(!(q in v))v[q]=N[q].bind(v)}}let u=U?.Parent??Object;class z extends u{}Object.defineProperty(z,"name",{value:$});function g(v){var J;let N=U?.Parent?new z:this;_(N,v),(J=N._zod).deferred??(J.deferred=[]);for(let X of N._zod.deferred)X();return N}return Object.defineProperty(g,"init",{value:_}),Object.defineProperty(g,Symbol.hasInstance,{value:(v)=>{if(U?.Parent&&v instanceof U.Parent)return!0;return v?._zod?.traits?.has($)}}),Object.defineProperty(g,"name",{value:$}),g}var Ng=Symbol("zod_brand");class C4 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class o6 extends Error{constructor($){super(`Encountered unidirectional transform during encode: ${$}`);this.name="ZodEncodeError"}}var eI={};function R$($){if($)Object.assign(eI,$);return eI}var w={};B4(w,{unwrapMessage:()=>sI,uint8ArrayToHex:()=>vA,uint8ArrayToBase64url:()=>zA,uint8ArrayToBase64:()=>L5,stringifyPrimitive:()=>F,slugify:()=>qg,shallowClone:()=>Tg,safeExtend:()=>sZ,required:()=>uA,randomString:()=>cZ,propertyKeyTypes:()=>u0,promiseAllObject:()=>hZ,primitiveTypes:()=>Hg,prefixIssues:()=>z4,pick:()=>tZ,partial:()=>IA,parsedType:()=>S,optionalKeys:()=>Yg,omit:()=>aZ,objectClone:()=>rZ,numKeys:()=>dZ,nullish:()=>V6,normalizeParams:()=>C,mergeDefs:()=>o4,merge:()=>$A,jsonStringifyReplacer:()=>E1,joinValues:()=>W,issue:()=>f1,isPlainObject:()=>D6,isObject:()=>t6,hexToUint8Array:()=>gA,getSizableOrigin:()=>U0,getParsedType:()=>pZ,getLengthableOrigin:()=>_0,getEnumValues:()=>$0,getElementAtPath:()=>mZ,floatSafeRemainder:()=>Xg,finalizeIssue:()=>e$,extend:()=>eZ,escapeRegex:()=>T4,esc:()=>au,defineLazy:()=>o,createTransparentProxy:()=>oZ,cloneDef:()=>lZ,clone:()=>n$,cleanRegex:()=>I0,cleanEnum:()=>UA,captureStackTrace:()=>eu,cached:()=>C1,base64urlToUint8Array:()=>_A,base64ToUint8Array:()=>R5,assignProp:()=>B6,assertNotEqual:()=>kZ,assertNever:()=>iZ,assertIs:()=>yZ,assertEqual:()=>xZ,assert:()=>nZ,allowsEval:()=>Qg,aborted:()=>M6,NUMBER_FORMAT_RANGES:()=>Og,Class:()=>W5,BIGINT_FORMAT_RANGES:()=>Vg});function xZ($){return $}function kZ($){return $}function yZ($){}function iZ($){throw Error("Unexpected value in exhaustive check")}function nZ($){}function $0($){let I=Object.values($).filter((_)=>typeof _==="number");return Object.entries($).filter(([_,u])=>I.indexOf(+_)===-1).map(([_,u])=>u)}function W($,I="|"){return $.map((U)=>F(U)).join(I)}function E1($,I){if(typeof I==="bigint")return I.toString();return I}function C1($){return{get value(){{let U=$();return Object.defineProperty(this,"value",{value:U}),U}throw Error("cached value already set")}}}function V6($){return $===null||$===void 0}function I0($){let I=$.startsWith("^")?1:0,U=$.endsWith("$")?$.length-1:$.length;return $.slice(I,U)}function Xg($,I){let U=($.toString().split(".")[1]||"").length,_=I.toString(),u=(_.split(".")[1]||"").length;if(u===0&&/\d?e-\d?/.test(_)){let J=_.match(/\d?e-(\d?)/);if(J?.[1])u=Number.parseInt(J[1])}let z=U>u?U:u,g=Number.parseInt($.toFixed(z).replace(".","")),v=Number.parseInt(I.toFixed(z).replace(".",""));return g%v/10**z}var K5=Symbol("evaluating");function o($,I,U){let _=void 0;Object.defineProperty($,I,{get(){if(_===K5)return;if(_===void 0)_=K5,_=U();return _},set(u){Object.defineProperty($,I,{value:u})},configurable:!0})}function rZ($){return Object.create(Object.getPrototypeOf($),Object.getOwnPropertyDescriptors($))}function B6($,I,U){Object.defineProperty($,I,{value:U,writable:!0,enumerable:!0,configurable:!0})}function o4(...$){let I={};for(let U of $){let _=Object.getOwnPropertyDescriptors(U);Object.assign(I,_)}return Object.defineProperties({},I)}function lZ($){return o4($._zod.def)}function mZ($,I){if(!I)return $;return I.reduce((U,_)=>U?.[_],$)}function hZ($){let I=Object.keys($),U=I.map((_)=>$[_]);return Promise.all(U).then((_)=>{let u={};for(let z=0;z<I.length;z++)u[I[z]]=_[z];return u})}function cZ($=10){let U="";for(let _=0;_<$;_++)U+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return U}function au($){return JSON.stringify($)}function qg($){return $.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var eu="captureStackTrace"in Error?Error.captureStackTrace:(...$)=>{};function t6($){return typeof $==="object"&&$!==null&&!Array.isArray($)}var Qg=C1(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch($){return!1}});function D6($){if(t6($)===!1)return!1;let I=$.constructor;if(I===void 0)return!0;if(typeof I!=="function")return!0;let U=I.prototype;if(t6(U)===!1)return!1;if(Object.prototype.hasOwnProperty.call(U,"isPrototypeOf")===!1)return!1;return!0}function Tg($){if(D6($))return{...$};if(Array.isArray($))return[...$];return $}function dZ($){let I=0;for(let U in $)if(Object.prototype.hasOwnProperty.call($,U))I++;return I}var pZ=($)=>{let I=typeof $;switch(I){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN($)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray($))return"array";if($===null)return"null";if($.then&&typeof $.then==="function"&&$.catch&&typeof $.catch==="function")return"promise";if(typeof Map<"u"&&$ instanceof Map)return"map";if(typeof Set<"u"&&$ instanceof Set)return"set";if(typeof Date<"u"&&$ instanceof Date)return"date";if(typeof File<"u"&&$ instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${I}`)}},u0=new Set(["string","number","symbol"]),Hg=new Set(["string","number","bigint","boolean","symbol","undefined"]);function T4($){return $.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function n$($,I,U){let _=new $._zod.constr(I??$._zod.def);if(!I||U?.parent)_._zod.parent=$;return _}function C($){let I=$;if(!I)return{};if(typeof I==="string")return{error:()=>I};if(I?.message!==void 0){if(I?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");I.error=I.message}if(delete I.message,typeof I.error==="string")return{...I,error:()=>I.error};return I}function oZ($){let I;return new Proxy({},{get(U,_,u){return I??(I=$()),Reflect.get(I,_,u)},set(U,_,u,z){return I??(I=$()),Reflect.set(I,_,u,z)},has(U,_){return I??(I=$()),Reflect.has(I,_)},deleteProperty(U,_){return I??(I=$()),Reflect.deleteProperty(I,_)},ownKeys(U){return I??(I=$()),Reflect.ownKeys(I)},getOwnPropertyDescriptor(U,_){return I??(I=$()),Reflect.getOwnPropertyDescriptor(I,_)},defineProperty(U,_,u){return I??(I=$()),Reflect.defineProperty(I,_,u)}})}function F($){if(typeof $==="bigint")return $.toString()+"n";if(typeof $==="string")return`"${$}"`;return`${$}`}function Yg($){return Object.keys($).filter((I)=>{return $[I]._zod.optin==="optional"&&$[I]._zod.optout==="optional"})}var Og={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Vg={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function tZ($,I){let U=$._zod.def,_=U.checks;if(_&&_.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let z=o4($._zod.def,{get shape(){let g={};for(let v in I){if(!(v in U.shape))throw Error(`Unrecognized key: "${v}"`);if(!I[v])continue;g[v]=U.shape[v]}return B6(this,"shape",g),g},checks:[]});return n$($,z)}function aZ($,I){let U=$._zod.def,_=U.checks;if(_&&_.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let z=o4($._zod.def,{get shape(){let g={...$._zod.def.shape};for(let v in I){if(!(v in U.shape))throw Error(`Unrecognized key: "${v}"`);if(!I[v])continue;delete g[v]}return B6(this,"shape",g),g},checks:[]});return n$($,z)}function eZ($,I){if(!D6(I))throw Error("Invalid input to extend: expected a plain object");let U=$._zod.def.checks;if(U&&U.length>0){let z=$._zod.def.shape;for(let g in I)if(Object.getOwnPropertyDescriptor(z,g)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let u=o4($._zod.def,{get shape(){let z={...$._zod.def.shape,...I};return B6(this,"shape",z),z}});return n$($,u)}function sZ($,I){if(!D6(I))throw Error("Invalid input to safeExtend: expected a plain object");let U=o4($._zod.def,{get shape(){let _={...$._zod.def.shape,...I};return B6(this,"shape",_),_}});return n$($,U)}function $A($,I){let U=o4($._zod.def,{get shape(){let _={...$._zod.def.shape,...I._zod.def.shape};return B6(this,"shape",_),_},get catchall(){return I._zod.def.catchall},checks:[]});return n$($,U)}function IA($,I,U){let u=I._zod.def.checks;if(u&&u.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let g=o4(I._zod.def,{get shape(){let v=I._zod.def.shape,J={...v};if(U)for(let N in U){if(!(N in v))throw Error(`Unrecognized key: "${N}"`);if(!U[N])continue;J[N]=$?new $({type:"optional",innerType:v[N]}):v[N]}else for(let N in v)J[N]=$?new $({type:"optional",innerType:v[N]}):v[N];return B6(this,"shape",J),J},checks:[]});return n$(I,g)}function uA($,I,U){let _=o4(I._zod.def,{get shape(){let u=I._zod.def.shape,z={...u};if(U)for(let g in U){if(!(g in z))throw Error(`Unrecognized key: "${g}"`);if(!U[g])continue;z[g]=new $({type:"nonoptional",innerType:u[g]})}else for(let g in u)z[g]=new $({type:"nonoptional",innerType:u[g]});return B6(this,"shape",z),z}});return n$(I,_)}function M6($,I=0){if($.aborted===!0)return!0;for(let U=I;U<$.issues.length;U++)if($.issues[U]?.continue!==!0)return!0;return!1}function z4($,I){return I.map((U)=>{var _;return(_=U).path??(_.path=[]),U.path.unshift($),U})}function sI($){return typeof $==="string"?$:$?.message}function e$($,I,U){let _={...$,path:$.path??[]};if(!$.message){let u=sI($.inst?._zod.def?.error?.($))??sI(I?.error?.($))??sI(U.customError?.($))??sI(U.localeError?.($))??"Invalid input";_.message=u}if(delete _.inst,delete _.continue,!I?.reportInput)delete _.input;return _}function U0($){if($ instanceof Set)return"set";if($ instanceof Map)return"map";if($ instanceof File)return"file";return"unknown"}function _0($){if(Array.isArray($))return"array";if(typeof $==="string")return"string";return"unknown"}function S($){let I=typeof $;switch(I){case"number":return Number.isNaN($)?"nan":"number";case"object":{if($===null)return"null";if(Array.isArray($))return"array";let U=$;if(U&&Object.getPrototypeOf(U)!==Object.prototype&&"constructor"in U&&U.constructor)return U.constructor.name}}return I}function f1(...$){let[I,U,_]=$;if(typeof I==="string")return{message:I,code:"custom",input:U,inst:_};return{...I}}function UA($){return Object.entries($).filter(([I,U])=>{return Number.isNaN(Number.parseInt(I,10))}).map((I)=>I[1])}function R5($){let I=atob($),U=new Uint8Array(I.length);for(let _=0;_<I.length;_++)U[_]=I.charCodeAt(_);return U}function L5($){let I="";for(let U=0;U<$.length;U++)I+=String.fromCharCode($[U]);return btoa(I)}function _A($){let I=$.replace(/-/g,"+").replace(/_/g,"/"),U="=".repeat((4-I.length%4)%4);return R5(I+U)}function zA($){return L5($).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function gA($){let I=$.replace(/^0x/,"");if(I.length%2!==0)throw Error("Invalid hex string length");let U=new Uint8Array(I.length/2);for(let _=0;_<I.length;_+=2)U[_/2]=Number.parseInt(I.slice(_,_+2),16);return U}function vA($){return Array.from($).map((I)=>I.toString(16).padStart(2,"0")).join("")}class W5{constructor(...$){}}var P5=($,I)=>{$.name="$ZodError",Object.defineProperty($,"_zod",{value:$._zod,enumerable:!1}),Object.defineProperty($,"issues",{value:I,enumerable:!1}),$.message=JSON.stringify(I,E1,2),Object.defineProperty($,"toString",{value:()=>$.message,enumerable:!1})},z0=D("$ZodError",P5),s$=D("$ZodError",P5,{Parent:Error});function g0($,I=(U)=>U.message){let U={},_=[];for(let u of $.issues)if(u.path.length>0)U[u.path[0]]=U[u.path[0]]||[],U[u.path[0]].push(I(u));else _.push(I(u));return{formErrors:_,fieldErrors:U}}function v0($,I=(U)=>U.message){let U={_errors:[]},_=(u)=>{for(let z of u.issues)if(z.code==="invalid_union"&&z.errors.length)z.errors.map((g)=>_({issues:g}));else if(z.code==="invalid_key")_({issues:z.issues});else if(z.code==="invalid_element")_({issues:z.issues});else if(z.path.length===0)U._errors.push(I(z));else{let g=U,v=0;while(v<z.path.length){let J=z.path[v];if(v!==z.path.length-1)g[J]=g[J]||{_errors:[]};else g[J]=g[J]||{_errors:[]},g[J]._errors.push(I(z));g=g[J],v++}}};return _($),U}function Bg($,I=(U)=>U.message){let U={errors:[]},_=(u,z=[])=>{var g,v;for(let J of u.issues)if(J.code==="invalid_union"&&J.errors.length)J.errors.map((N)=>_({issues:N},J.path));else if(J.code==="invalid_key")_({issues:J.issues},J.path);else if(J.code==="invalid_element")_({issues:J.issues},J.path);else{let N=[...z,...J.path];if(N.length===0){U.errors.push(I(J));continue}let X=U,G=0;while(G<N.length){let q=N[G],T=G===N.length-1;if(typeof q==="string")X.properties??(X.properties={}),(g=X.properties)[q]??(g[q]={errors:[]}),X=X.properties[q];else X.items??(X.items=[]),(v=X.items)[q]??(v[q]={errors:[]}),X=X.items[q];if(T)X.errors.push(I(J));G++}}};return _($),U}function Z5($){let I=[],U=$.map((_)=>typeof _==="object"?_.key:_);for(let _ of U)if(typeof _==="number")I.push(`[${_}]`);else if(typeof _==="symbol")I.push(`[${JSON.stringify(String(_))}]`);else if(/[^\w$]/.test(_))I.push(`[${JSON.stringify(_)}]`);else{if(I.length)I.push(".");I.push(_)}return I.join("")}function Dg($){let I=[],U=[...$.issues].sort((_,u)=>(_.path??[]).length-(u.path??[]).length);for(let _ of U)if(I.push(`✖ ${_.message}`),_.path?.length)I.push(` → at ${Z5(_.path)}`);return I.join(`
299
+ `)}var x1=($)=>(I,U,_,u)=>{let z=_?Object.assign(_,{async:!1}):{async:!1},g=I._zod.run({value:U,issues:[]},z);if(g instanceof Promise)throw new C4;if(g.issues.length){let v=new(u?.Err??$)(g.issues.map((J)=>e$(J,z,R$())));throw eu(v,u?.callee),v}return g.value},su=x1(s$),k1=($)=>async(I,U,_,u)=>{let z=_?Object.assign(_,{async:!0}):{async:!0},g=I._zod.run({value:U,issues:[]},z);if(g instanceof Promise)g=await g;if(g.issues.length){let v=new(u?.Err??$)(g.issues.map((J)=>e$(J,z,R$())));throw eu(v,u?.callee),v}return g.value},$U=k1(s$),y1=($)=>(I,U,_)=>{let u=_?{..._,async:!1}:{async:!1},z=I._zod.run({value:U,issues:[]},u);if(z instanceof Promise)throw new C4;return z.issues.length?{success:!1,error:new($??z0)(z.issues.map((g)=>e$(g,u,R$())))}:{success:!0,data:z.value}},Mg=y1(s$),i1=($)=>async(I,U,_)=>{let u=_?Object.assign(_,{async:!0}):{async:!0},z=I._zod.run({value:U,issues:[]},u);if(z instanceof Promise)z=await z;return z.issues.length?{success:!1,error:new $(z.issues.map((g)=>e$(g,u,R$())))}:{success:!0,data:z.value}},Kg=i1(s$),IU=($)=>(I,U,_)=>{let u=_?Object.assign(_,{direction:"backward"}):{direction:"backward"};return x1($)(I,U,u)},NA=IU(s$),uU=($)=>(I,U,_)=>{return x1($)(I,U,_)},GA=uU(s$),UU=($)=>async(I,U,_)=>{let u=_?Object.assign(_,{direction:"backward"}):{direction:"backward"};return k1($)(I,U,u)},XA=UU(s$),_U=($)=>async(I,U,_)=>{return k1($)(I,U,_)},qA=_U(s$),zU=($)=>(I,U,_)=>{let u=_?Object.assign(_,{direction:"backward"}):{direction:"backward"};return y1($)(I,U,u)},QA=zU(s$),gU=($)=>(I,U,_)=>{return y1($)(I,U,_)},TA=gU(s$),vU=($)=>async(I,U,_)=>{let u=_?Object.assign(_,{direction:"backward"}):{direction:"backward"};return i1($)(I,U,u)},HA=vU(s$),JU=($)=>async(I,U,_)=>{return i1($)(I,U,_)},YA=JU(s$);var H4={};B4(H4,{xid:()=>Pg,uuid7:()=>DA,uuid6:()=>BA,uuid4:()=>VA,uuid:()=>a6,uppercase:()=>tg,unicodeEmail:()=>A5,undefined:()=>pg,ulid:()=>Wg,time:()=>ng,string:()=>lg,sha512_hex:()=>nA,sha512_base64url:()=>lA,sha512_base64:()=>rA,sha384_hex:()=>kA,sha384_base64url:()=>iA,sha384_base64:()=>yA,sha256_hex:()=>CA,sha256_base64url:()=>xA,sha256_base64:()=>fA,sha1_hex:()=>SA,sha1_base64url:()=>EA,sha1_base64:()=>wA,rfc5322Email:()=>KA,number:()=>J0,null:()=>dg,nanoid:()=>Ag,md5_hex:()=>bA,md5_base64url:()=>FA,md5_base64:()=>jA,mac:()=>Cg,lowercase:()=>og,ksuid:()=>Zg,ipv6:()=>Eg,ipv4:()=>wg,integer:()=>hg,idnEmail:()=>RA,html5Email:()=>MA,hostname:()=>PA,hex:()=>AA,guid:()=>jg,extendedDuration:()=>OA,emoji:()=>Sg,email:()=>Fg,e164:()=>yg,duration:()=>bg,domain:()=>ZA,datetime:()=>rg,date:()=>ig,cuid2:()=>Lg,cuid:()=>Rg,cidrv6:()=>xg,cidrv4:()=>fg,browserEmail:()=>LA,boolean:()=>cg,bigint:()=>mg,base64url:()=>NU,base64:()=>kg});var Rg=/^[cC][^\s-]{8,}$/,Lg=/^[0-9a-z]+$/,Wg=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Pg=/^[0-9a-vA-V]{20}$/,Zg=/^[A-Za-z0-9]{27}$/,Ag=/^[a-zA-Z0-9_-]{21}$/,bg=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,OA=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,jg=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,a6=($)=>{if(!$)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${$}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},VA=a6(4),BA=a6(6),DA=a6(7),Fg=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,MA=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,KA=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,A5=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,RA=A5,LA=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,WA="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Sg(){return new RegExp(WA,"u")}var wg=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Eg=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Cg=($)=>{let I=T4($??":");return new RegExp(`^(?:[0-9A-F]{2}${I}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${I}){5}[0-9a-f]{2}$`)},fg=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,xg=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,kg=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,NU=/^[A-Za-z0-9_-]*$/,PA=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,ZA=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,yg=/^\+[1-9]\d{6,14}$/,b5="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",ig=new RegExp(`^${b5}$`);function j5($){return typeof $.precision==="number"?$.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":$.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${$.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function ng($){return new RegExp(`^${j5($)}$`)}function rg($){let I=j5({precision:$.precision}),U=["Z"];if($.local)U.push("");if($.offset)U.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let _=`${I}(?:${U.join("|")})`;return new RegExp(`^${b5}T(?:${_})$`)}var lg=($)=>{let I=$?`[\\s\\S]{${$?.minimum??0},${$?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${I}$`)},mg=/^-?\d+n?$/,hg=/^-?\d+$/,J0=/^-?\d+(?:\.\d+)?$/,cg=/^(?:true|false)$/i,dg=/^null$/i;var pg=/^undefined$/i;var og=/^[^A-Z]*$/,tg=/^[^a-z]*$/,AA=/^[0-9a-fA-F]*$/;function N0($,I){return new RegExp(`^[A-Za-z0-9+/]{${$}}${I}$`)}function G0($){return new RegExp(`^[A-Za-z0-9_-]{${$}}$`)}var bA=/^[0-9a-fA-F]{32}$/,jA=N0(22,"=="),FA=G0(22),SA=/^[0-9a-fA-F]{40}$/,wA=N0(27,"="),EA=G0(27),CA=/^[0-9a-fA-F]{64}$/,fA=N0(43,"="),xA=G0(43),kA=/^[0-9a-fA-F]{96}$/,yA=N0(64,""),iA=G0(64),nA=/^[0-9a-fA-F]{128}$/,rA=N0(86,"=="),lA=G0(86);var G$=D("$ZodCheck",($,I)=>{var U;$._zod??($._zod={}),$._zod.def=I,(U=$._zod).onattach??(U.onattach=[])}),S5={number:"number",bigint:"bigint",object:"date"},GU=D("$ZodCheckLessThan",($,I)=>{G$.init($,I);let U=S5[typeof I.value];$._zod.onattach.push((_)=>{let u=_._zod.bag,z=(I.inclusive?u.maximum:u.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(I.value<z)if(I.inclusive)u.maximum=I.value;else u.exclusiveMaximum=I.value}),$._zod.check=(_)=>{if(I.inclusive?_.value<=I.value:_.value<I.value)return;_.issues.push({origin:U,code:"too_big",maximum:typeof I.value==="object"?I.value.getTime():I.value,input:_.value,inclusive:I.inclusive,inst:$,continue:!I.abort})}}),XU=D("$ZodCheckGreaterThan",($,I)=>{G$.init($,I);let U=S5[typeof I.value];$._zod.onattach.push((_)=>{let u=_._zod.bag,z=(I.inclusive?u.minimum:u.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(I.value>z)if(I.inclusive)u.minimum=I.value;else u.exclusiveMinimum=I.value}),$._zod.check=(_)=>{if(I.inclusive?_.value>=I.value:_.value>I.value)return;_.issues.push({origin:U,code:"too_small",minimum:typeof I.value==="object"?I.value.getTime():I.value,input:_.value,inclusive:I.inclusive,inst:$,continue:!I.abort})}}),ag=D("$ZodCheckMultipleOf",($,I)=>{G$.init($,I),$._zod.onattach.push((U)=>{var _;(_=U._zod.bag).multipleOf??(_.multipleOf=I.value)}),$._zod.check=(U)=>{if(typeof U.value!==typeof I.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof U.value==="bigint"?U.value%I.value===BigInt(0):Xg(U.value,I.value)===0)return;U.issues.push({origin:typeof U.value,code:"not_multiple_of",divisor:I.value,input:U.value,inst:$,continue:!I.abort})}}),eg=D("$ZodCheckNumberFormat",($,I)=>{G$.init($,I),I.format=I.format||"float64";let U=I.format?.includes("int"),_=U?"int":"number",[u,z]=Og[I.format];$._zod.onattach.push((g)=>{let v=g._zod.bag;if(v.format=I.format,v.minimum=u,v.maximum=z,U)v.pattern=hg}),$._zod.check=(g)=>{let v=g.value;if(U){if(!Number.isInteger(v)){g.issues.push({expected:_,format:I.format,code:"invalid_type",continue:!1,input:v,inst:$});return}if(!Number.isSafeInteger(v)){if(v>0)g.issues.push({input:v,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:_,inclusive:!0,continue:!I.abort});else g.issues.push({input:v,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:_,inclusive:!0,continue:!I.abort});return}}if(v<u)g.issues.push({origin:"number",input:v,code:"too_small",minimum:u,inclusive:!0,inst:$,continue:!I.abort});if(v>z)g.issues.push({origin:"number",input:v,code:"too_big",maximum:z,inclusive:!0,inst:$,continue:!I.abort})}}),sg=D("$ZodCheckBigIntFormat",($,I)=>{G$.init($,I);let[U,_]=Vg[I.format];$._zod.onattach.push((u)=>{let z=u._zod.bag;z.format=I.format,z.minimum=U,z.maximum=_}),$._zod.check=(u)=>{let z=u.value;if(z<U)u.issues.push({origin:"bigint",input:z,code:"too_small",minimum:U,inclusive:!0,inst:$,continue:!I.abort});if(z>_)u.issues.push({origin:"bigint",input:z,code:"too_big",maximum:_,inclusive:!0,inst:$,continue:!I.abort})}}),$v=D("$ZodCheckMaxSize",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!V6(u)&&u.size!==void 0}),$._zod.onattach.push((_)=>{let u=_._zod.bag.maximum??Number.POSITIVE_INFINITY;if(I.maximum<u)_._zod.bag.maximum=I.maximum}),$._zod.check=(_)=>{let u=_.value;if(u.size<=I.maximum)return;_.issues.push({origin:U0(u),code:"too_big",maximum:I.maximum,inclusive:!0,input:u,inst:$,continue:!I.abort})}}),Iv=D("$ZodCheckMinSize",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!V6(u)&&u.size!==void 0}),$._zod.onattach.push((_)=>{let u=_._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(I.minimum>u)_._zod.bag.minimum=I.minimum}),$._zod.check=(_)=>{let u=_.value;if(u.size>=I.minimum)return;_.issues.push({origin:U0(u),code:"too_small",minimum:I.minimum,inclusive:!0,input:u,inst:$,continue:!I.abort})}}),uv=D("$ZodCheckSizeEquals",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!V6(u)&&u.size!==void 0}),$._zod.onattach.push((_)=>{let u=_._zod.bag;u.minimum=I.size,u.maximum=I.size,u.size=I.size}),$._zod.check=(_)=>{let u=_.value,z=u.size;if(z===I.size)return;let g=z>I.size;_.issues.push({origin:U0(u),...g?{code:"too_big",maximum:I.size}:{code:"too_small",minimum:I.size},inclusive:!0,exact:!0,input:_.value,inst:$,continue:!I.abort})}}),Uv=D("$ZodCheckMaxLength",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!V6(u)&&u.length!==void 0}),$._zod.onattach.push((_)=>{let u=_._zod.bag.maximum??Number.POSITIVE_INFINITY;if(I.maximum<u)_._zod.bag.maximum=I.maximum}),$._zod.check=(_)=>{let u=_.value;if(u.length<=I.maximum)return;let g=_0(u);_.issues.push({origin:g,code:"too_big",maximum:I.maximum,inclusive:!0,input:u,inst:$,continue:!I.abort})}}),_v=D("$ZodCheckMinLength",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!V6(u)&&u.length!==void 0}),$._zod.onattach.push((_)=>{let u=_._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(I.minimum>u)_._zod.bag.minimum=I.minimum}),$._zod.check=(_)=>{let u=_.value;if(u.length>=I.minimum)return;let g=_0(u);_.issues.push({origin:g,code:"too_small",minimum:I.minimum,inclusive:!0,input:u,inst:$,continue:!I.abort})}}),zv=D("$ZodCheckLengthEquals",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!V6(u)&&u.length!==void 0}),$._zod.onattach.push((_)=>{let u=_._zod.bag;u.minimum=I.length,u.maximum=I.length,u.length=I.length}),$._zod.check=(_)=>{let u=_.value,z=u.length;if(z===I.length)return;let g=_0(u),v=z>I.length;_.issues.push({origin:g,...v?{code:"too_big",maximum:I.length}:{code:"too_small",minimum:I.length},inclusive:!0,exact:!0,input:_.value,inst:$,continue:!I.abort})}}),n1=D("$ZodCheckStringFormat",($,I)=>{var U,_;if(G$.init($,I),$._zod.onattach.push((u)=>{let z=u._zod.bag;if(z.format=I.format,I.pattern)z.patterns??(z.patterns=new Set),z.patterns.add(I.pattern)}),I.pattern)(U=$._zod).check??(U.check=(u)=>{if(I.pattern.lastIndex=0,I.pattern.test(u.value))return;u.issues.push({origin:"string",code:"invalid_format",format:I.format,input:u.value,...I.pattern?{pattern:I.pattern.toString()}:{},inst:$,continue:!I.abort})});else(_=$._zod).check??(_.check=()=>{})}),gv=D("$ZodCheckRegex",($,I)=>{n1.init($,I),$._zod.check=(U)=>{if(I.pattern.lastIndex=0,I.pattern.test(U.value))return;U.issues.push({origin:"string",code:"invalid_format",format:"regex",input:U.value,pattern:I.pattern.toString(),inst:$,continue:!I.abort})}}),vv=D("$ZodCheckLowerCase",($,I)=>{I.pattern??(I.pattern=og),n1.init($,I)}),Jv=D("$ZodCheckUpperCase",($,I)=>{I.pattern??(I.pattern=tg),n1.init($,I)}),Nv=D("$ZodCheckIncludes",($,I)=>{G$.init($,I);let U=T4(I.includes),_=new RegExp(typeof I.position==="number"?`^.{${I.position}}${U}`:U);I.pattern=_,$._zod.onattach.push((u)=>{let z=u._zod.bag;z.patterns??(z.patterns=new Set),z.patterns.add(_)}),$._zod.check=(u)=>{if(u.value.includes(I.includes,I.position))return;u.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:I.includes,input:u.value,inst:$,continue:!I.abort})}}),Gv=D("$ZodCheckStartsWith",($,I)=>{G$.init($,I);let U=new RegExp(`^${T4(I.prefix)}.*`);I.pattern??(I.pattern=U),$._zod.onattach.push((_)=>{let u=_._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(U)}),$._zod.check=(_)=>{if(_.value.startsWith(I.prefix))return;_.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:I.prefix,input:_.value,inst:$,continue:!I.abort})}}),Xv=D("$ZodCheckEndsWith",($,I)=>{G$.init($,I);let U=new RegExp(`.*${T4(I.suffix)}$`);I.pattern??(I.pattern=U),$._zod.onattach.push((_)=>{let u=_._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(U)}),$._zod.check=(_)=>{if(_.value.endsWith(I.suffix))return;_.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:I.suffix,input:_.value,inst:$,continue:!I.abort})}});function F5($,I,U){if($.issues.length)I.issues.push(...z4(U,$.issues))}var qv=D("$ZodCheckProperty",($,I)=>{G$.init($,I),$._zod.check=(U)=>{let _=I.schema._zod.run({value:U.value[I.property],issues:[]},{});if(_ instanceof Promise)return _.then((u)=>F5(u,U,I.property));F5(_,U,I.property);return}}),Qv=D("$ZodCheckMimeType",($,I)=>{G$.init($,I);let U=new Set(I.mime);$._zod.onattach.push((_)=>{_._zod.bag.mime=I.mime}),$._zod.check=(_)=>{if(U.has(_.value.type))return;_.issues.push({code:"invalid_value",values:I.mime,input:_.value.type,inst:$,continue:!I.abort})}}),Tv=D("$ZodCheckOverwrite",($,I)=>{G$.init($,I),$._zod.check=(U)=>{U.value=I.tx(U.value)}});class qU{constructor($=[]){if(this.content=[],this.indent=0,this)this.args=$}indented($){this.indent+=1,$(this),this.indent-=1}write($){if(typeof $==="function"){$(this,{execution:"sync"}),$(this,{execution:"async"});return}let U=$.split(`
300
+ `).filter((z)=>z),_=Math.min(...U.map((z)=>z.length-z.trimStart().length)),u=U.map((z)=>z.slice(_)).map((z)=>" ".repeat(this.indent*2)+z);for(let z of u)this.content.push(z)}compile(){let $=Function,I=this?.args,_=[...(this?.content??[""]).map((u)=>` ${u}`)];return new $(...I,_.join(`
301
+ `))}}var Hv={major:4,minor:3,patch:6};var m=D("$ZodType",($,I)=>{var U;$??($={}),$._zod.def=I,$._zod.bag=$._zod.bag||{},$._zod.version=Hv;let _=[...$._zod.def.checks??[]];if($._zod.traits.has("$ZodCheck"))_.unshift($);for(let u of _)for(let z of u._zod.onattach)z($);if(_.length===0)(U=$._zod).deferred??(U.deferred=[]),$._zod.deferred?.push(()=>{$._zod.run=$._zod.parse});else{let u=(g,v,J)=>{let N=M6(g),X;for(let G of v){if(G._zod.def.when){if(!G._zod.def.when(g))continue}else if(N)continue;let q=g.issues.length,T=G._zod.check(g);if(T instanceof Promise&&J?.async===!1)throw new C4;if(X||T instanceof Promise)X=(X??Promise.resolve()).then(async()=>{if(await T,g.issues.length===q)return;if(!N)N=M6(g,q)});else{if(g.issues.length===q)continue;if(!N)N=M6(g,q)}}if(X)return X.then(()=>{return g});return g},z=(g,v,J)=>{if(M6(g))return g.aborted=!0,g;let N=u(v,_,J);if(N instanceof Promise){if(J.async===!1)throw new C4;return N.then((X)=>$._zod.parse(X,J))}return $._zod.parse(N,J)};$._zod.run=(g,v)=>{if(v.skipChecks)return $._zod.parse(g,v);if(v.direction==="backward"){let N=$._zod.parse({value:g.value,issues:[]},{...v,skipChecks:!0});if(N instanceof Promise)return N.then((X)=>{return z(X,g,v)});return z(N,g,v)}let J=$._zod.parse(g,v);if(J instanceof Promise){if(v.async===!1)throw new C4;return J.then((N)=>u(N,_,v))}return u(J,_,v)}}o($,"~standard",()=>({validate:(u)=>{try{let z=Mg($,u);return z.success?{value:z.data}:{issues:z.error?.issues}}catch(z){return Kg($,u).then((g)=>g.success?{value:g.data}:{issues:g.error?.issues})}},vendor:"zod",version:1}))}),e6=D("$ZodString",($,I)=>{m.init($,I),$._zod.pattern=[...$?._zod.bag?.patterns??[]].pop()??lg($._zod.bag),$._zod.parse=(U,_)=>{if(I.coerce)try{U.value=String(U.value)}catch(u){}if(typeof U.value==="string")return U;return U.issues.push({expected:"string",code:"invalid_type",input:U.value,inst:$}),U}}),v$=D("$ZodStringFormat",($,I)=>{n1.init($,I),e6.init($,I)}),Ov=D("$ZodGUID",($,I)=>{I.pattern??(I.pattern=jg),v$.init($,I)}),Vv=D("$ZodUUID",($,I)=>{if(I.version){let _={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[I.version];if(_===void 0)throw Error(`Invalid UUID version: "${I.version}"`);I.pattern??(I.pattern=a6(_))}else I.pattern??(I.pattern=a6());v$.init($,I)}),Bv=D("$ZodEmail",($,I)=>{I.pattern??(I.pattern=Fg),v$.init($,I)}),Dv=D("$ZodURL",($,I)=>{v$.init($,I),$._zod.check=(U)=>{try{let _=U.value.trim(),u=new URL(_);if(I.hostname){if(I.hostname.lastIndex=0,!I.hostname.test(u.hostname))U.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:I.hostname.source,input:U.value,inst:$,continue:!I.abort})}if(I.protocol){if(I.protocol.lastIndex=0,!I.protocol.test(u.protocol.endsWith(":")?u.protocol.slice(0,-1):u.protocol))U.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:I.protocol.source,input:U.value,inst:$,continue:!I.abort})}if(I.normalize)U.value=u.href;else U.value=_;return}catch(_){U.issues.push({code:"invalid_format",format:"url",input:U.value,inst:$,continue:!I.abort})}}}),Mv=D("$ZodEmoji",($,I)=>{I.pattern??(I.pattern=Sg()),v$.init($,I)}),Kv=D("$ZodNanoID",($,I)=>{I.pattern??(I.pattern=Ag),v$.init($,I)}),Rv=D("$ZodCUID",($,I)=>{I.pattern??(I.pattern=Rg),v$.init($,I)}),Lv=D("$ZodCUID2",($,I)=>{I.pattern??(I.pattern=Lg),v$.init($,I)}),Wv=D("$ZodULID",($,I)=>{I.pattern??(I.pattern=Wg),v$.init($,I)}),Pv=D("$ZodXID",($,I)=>{I.pattern??(I.pattern=Pg),v$.init($,I)}),Zv=D("$ZodKSUID",($,I)=>{I.pattern??(I.pattern=Zg),v$.init($,I)}),Av=D("$ZodISODateTime",($,I)=>{I.pattern??(I.pattern=rg(I)),v$.init($,I)}),bv=D("$ZodISODate",($,I)=>{I.pattern??(I.pattern=ig),v$.init($,I)}),jv=D("$ZodISOTime",($,I)=>{I.pattern??(I.pattern=ng(I)),v$.init($,I)}),Fv=D("$ZodISODuration",($,I)=>{I.pattern??(I.pattern=bg),v$.init($,I)}),Sv=D("$ZodIPv4",($,I)=>{I.pattern??(I.pattern=wg),v$.init($,I),$._zod.bag.format="ipv4"}),wv=D("$ZodIPv6",($,I)=>{I.pattern??(I.pattern=Eg),v$.init($,I),$._zod.bag.format="ipv6",$._zod.check=(U)=>{try{new URL(`http://[${U.value}]`)}catch{U.issues.push({code:"invalid_format",format:"ipv6",input:U.value,inst:$,continue:!I.abort})}}}),Ev=D("$ZodMAC",($,I)=>{I.pattern??(I.pattern=Cg(I.delimiter)),v$.init($,I),$._zod.bag.format="mac"}),Cv=D("$ZodCIDRv4",($,I)=>{I.pattern??(I.pattern=fg),v$.init($,I)}),fv=D("$ZodCIDRv6",($,I)=>{I.pattern??(I.pattern=xg),v$.init($,I),$._zod.check=(U)=>{let _=U.value.split("/");try{if(_.length!==2)throw Error();let[u,z]=_;if(!z)throw Error();let g=Number(z);if(`${g}`!==z)throw Error();if(g<0||g>128)throw Error();new URL(`http://[${u}]`)}catch{U.issues.push({code:"invalid_format",format:"cidrv6",input:U.value,inst:$,continue:!I.abort})}}});function xv($){if($==="")return!0;if($.length%4!==0)return!1;try{return atob($),!0}catch{return!1}}var kv=D("$ZodBase64",($,I)=>{I.pattern??(I.pattern=kg),v$.init($,I),$._zod.bag.contentEncoding="base64",$._zod.check=(U)=>{if(xv(U.value))return;U.issues.push({code:"invalid_format",format:"base64",input:U.value,inst:$,continue:!I.abort})}});function h5($){if(!NU.test($))return!1;let I=$.replace(/[-_]/g,(_)=>_==="-"?"+":"/"),U=I.padEnd(Math.ceil(I.length/4)*4,"=");return xv(U)}var yv=D("$ZodBase64URL",($,I)=>{I.pattern??(I.pattern=NU),v$.init($,I),$._zod.bag.contentEncoding="base64url",$._zod.check=(U)=>{if(h5(U.value))return;U.issues.push({code:"invalid_format",format:"base64url",input:U.value,inst:$,continue:!I.abort})}}),iv=D("$ZodE164",($,I)=>{I.pattern??(I.pattern=yg),v$.init($,I)});function c5($,I=null){try{let U=$.split(".");if(U.length!==3)return!1;let[_]=U;if(!_)return!1;let u=JSON.parse(atob(_));if("typ"in u&&u?.typ!=="JWT")return!1;if(!u.alg)return!1;if(I&&(!("alg"in u)||u.alg!==I))return!1;return!0}catch{return!1}}var nv=D("$ZodJWT",($,I)=>{v$.init($,I),$._zod.check=(U)=>{if(c5(U.value,I.alg))return;U.issues.push({code:"invalid_format",format:"jwt",input:U.value,inst:$,continue:!I.abort})}}),rv=D("$ZodCustomStringFormat",($,I)=>{v$.init($,I),$._zod.check=(U)=>{if(I.fn(U.value))return;U.issues.push({code:"invalid_format",format:I.format,input:U.value,inst:$,continue:!I.abort})}}),VU=D("$ZodNumber",($,I)=>{m.init($,I),$._zod.pattern=$._zod.bag.pattern??J0,$._zod.parse=(U,_)=>{if(I.coerce)try{U.value=Number(U.value)}catch(g){}let u=U.value;if(typeof u==="number"&&!Number.isNaN(u)&&Number.isFinite(u))return U;let z=typeof u==="number"?Number.isNaN(u)?"NaN":!Number.isFinite(u)?"Infinity":void 0:void 0;return U.issues.push({expected:"number",code:"invalid_type",input:u,inst:$,...z?{received:z}:{}}),U}}),lv=D("$ZodNumberFormat",($,I)=>{eg.init($,I),VU.init($,I)}),X0=D("$ZodBoolean",($,I)=>{m.init($,I),$._zod.pattern=cg,$._zod.parse=(U,_)=>{if(I.coerce)try{U.value=Boolean(U.value)}catch(z){}let u=U.value;if(typeof u==="boolean")return U;return U.issues.push({expected:"boolean",code:"invalid_type",input:u,inst:$}),U}}),BU=D("$ZodBigInt",($,I)=>{m.init($,I),$._zod.pattern=mg,$._zod.parse=(U,_)=>{if(I.coerce)try{U.value=BigInt(U.value)}catch(u){}if(typeof U.value==="bigint")return U;return U.issues.push({expected:"bigint",code:"invalid_type",input:U.value,inst:$}),U}}),mv=D("$ZodBigIntFormat",($,I)=>{sg.init($,I),BU.init($,I)}),hv=D("$ZodSymbol",($,I)=>{m.init($,I),$._zod.parse=(U,_)=>{let u=U.value;if(typeof u==="symbol")return U;return U.issues.push({expected:"symbol",code:"invalid_type",input:u,inst:$}),U}}),cv=D("$ZodUndefined",($,I)=>{m.init($,I),$._zod.pattern=pg,$._zod.values=new Set([void 0]),$._zod.optin="optional",$._zod.optout="optional",$._zod.parse=(U,_)=>{let u=U.value;if(typeof u>"u")return U;return U.issues.push({expected:"undefined",code:"invalid_type",input:u,inst:$}),U}}),dv=D("$ZodNull",($,I)=>{m.init($,I),$._zod.pattern=dg,$._zod.values=new Set([null]),$._zod.parse=(U,_)=>{let u=U.value;if(u===null)return U;return U.issues.push({expected:"null",code:"invalid_type",input:u,inst:$}),U}}),pv=D("$ZodAny",($,I)=>{m.init($,I),$._zod.parse=(U)=>U}),ov=D("$ZodUnknown",($,I)=>{m.init($,I),$._zod.parse=(U)=>U}),tv=D("$ZodNever",($,I)=>{m.init($,I),$._zod.parse=(U,_)=>{return U.issues.push({expected:"never",code:"invalid_type",input:U.value,inst:$}),U}}),av=D("$ZodVoid",($,I)=>{m.init($,I),$._zod.parse=(U,_)=>{let u=U.value;if(typeof u>"u")return U;return U.issues.push({expected:"void",code:"invalid_type",input:u,inst:$}),U}}),ev=D("$ZodDate",($,I)=>{m.init($,I),$._zod.parse=(U,_)=>{if(I.coerce)try{U.value=new Date(U.value)}catch(v){}let u=U.value,z=u instanceof Date;if(z&&!Number.isNaN(u.getTime()))return U;return U.issues.push({expected:"date",code:"invalid_type",input:u,...z?{received:"Invalid Date"}:{},inst:$}),U}});function E5($,I,U){if($.issues.length)I.issues.push(...z4(U,$.issues));I.value[U]=$.value}var sv=D("$ZodArray",($,I)=>{m.init($,I),$._zod.parse=(U,_)=>{let u=U.value;if(!Array.isArray(u))return U.issues.push({expected:"array",code:"invalid_type",input:u,inst:$}),U;U.value=Array(u.length);let z=[];for(let g=0;g<u.length;g++){let v=u[g],J=I.element._zod.run({value:v,issues:[]},_);if(J instanceof Promise)z.push(J.then((N)=>E5(N,U,g)));else E5(J,U,g)}if(z.length)return Promise.all(z).then(()=>U);return U}});function OU($,I,U,_,u){if($.issues.length){if(u&&!(U in _))return;I.issues.push(...z4(U,$.issues))}if($.value===void 0){if(U in _)I.value[U]=void 0}else I.value[U]=$.value}function d5($){let I=Object.keys($.shape);for(let _ of I)if(!$.shape?.[_]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${_}": expected a Zod schema`);let U=Yg($.shape);return{...$,keys:I,keySet:new Set(I),numKeys:I.length,optionalKeys:new Set(U)}}function p5($,I,U,_,u,z){let g=[],v=u.keySet,J=u.catchall._zod,N=J.def.type,X=J.optout==="optional";for(let G in I){if(v.has(G))continue;if(N==="never"){g.push(G);continue}let q=J.run({value:I[G],issues:[]},_);if(q instanceof Promise)$.push(q.then((T)=>OU(T,U,G,I,X)));else OU(q,U,G,I,X)}if(g.length)U.issues.push({code:"unrecognized_keys",keys:g,input:I,inst:z});if(!$.length)return U;return Promise.all($).then(()=>{return U})}var o5=D("$ZodObject",($,I)=>{if(m.init($,I),!Object.getOwnPropertyDescriptor(I,"shape")?.get){let v=I.shape;Object.defineProperty(I,"shape",{get:()=>{let J={...v};return Object.defineProperty(I,"shape",{value:J}),J}})}let _=C1(()=>d5(I));o($._zod,"propValues",()=>{let v=I.shape,J={};for(let N in v){let X=v[N]._zod;if(X.values){J[N]??(J[N]=new Set);for(let G of X.values)J[N].add(G)}}return J});let u=t6,z=I.catchall,g;$._zod.parse=(v,J)=>{g??(g=_.value);let N=v.value;if(!u(N))return v.issues.push({expected:"object",code:"invalid_type",input:N,inst:$}),v;v.value={};let X=[],G=g.shape;for(let q of g.keys){let T=G[q],H=T._zod.optout==="optional",Q=T._zod.run({value:N[q],issues:[]},J);if(Q instanceof Promise)X.push(Q.then((Y)=>OU(Y,v,q,N,H)));else OU(Q,v,q,N,H)}if(!z)return X.length?Promise.all(X).then(()=>v):v;return p5(X,N,v,J,_.value,$)}}),$J=D("$ZodObjectJIT",($,I)=>{o5.init($,I);let U=$._zod.parse,_=C1(()=>d5(I)),u=(q)=>{let T=new qU(["shape","payload","ctx"]),H=_.value,Q=(P)=>{let R=au(P);return`shape[${R}]._zod.run({ value: input[${R}], issues: [] }, ctx)`};T.write("const input = payload.value;");let Y=Object.create(null),M=0;for(let P of H.keys)Y[P]=`key_${M++}`;T.write("const newResult = {};");for(let P of H.keys){let R=Y[P],K=au(P),B=q[P]?._zod?.optout==="optional";if(T.write(`const ${R} = ${Q(P)};`),B)T.write(`
302
+ if (${R}.issues.length) {
303
+ if (${K} in input) {
304
+ payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
305
305
  ...iss,
306
- path: iss.path ? [${B}, ...iss.path] : [${B}]
306
+ path: iss.path ? [${K}, ...iss.path] : [${K}]
307
307
  })));
308
308
  }
309
309
  }
310
310
 
311
- if (${O}.value === undefined) {
312
- if (${B} in input) {
313
- newResult[${B}] = undefined;
311
+ if (${R}.value === undefined) {
312
+ if (${K} in input) {
313
+ newResult[${K}] = undefined;
314
314
  }
315
315
  } else {
316
- newResult[${B}] = ${O}.value;
316
+ newResult[${K}] = ${R}.value;
317
317
  }
318
318
 
319
319
  `);else T.write(`
320
- if (${O}.issues.length) {
321
- payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
320
+ if (${R}.issues.length) {
321
+ payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
322
322
  ...iss,
323
- path: iss.path ? [${B}, ...iss.path] : [${B}]
323
+ path: iss.path ? [${K}, ...iss.path] : [${K}]
324
324
  })));
325
325
  }
326
326
 
327
- if (${O}.value === undefined) {
328
- if (${B} in input) {
329
- newResult[${B}] = undefined;
327
+ if (${R}.value === undefined) {
328
+ if (${K} in input) {
329
+ newResult[${K}] = undefined;
330
330
  }
331
331
  } else {
332
- newResult[${B}] = ${O}.value;
332
+ newResult[${K}] = ${R}.value;
333
333
  }
334
334
 
335
- `)}T.write("payload.value = newResult;"),T.write("return payload;");let L=T.compile();return(P,O)=>L(q,P,O)},g,z=p6,v=!tI.jitless,N=v&&Xz.value,X=I.catchall,G;$._zod.parse=(q,T)=>{G??(G=_.value);let H=q.value;if(!z(H))return q.issues.push({expected:"object",code:"invalid_type",input:H,inst:$}),q;if(v&&N&&T?.async===!1&&T.jitless!==!0){if(!g)g=u(I.shape);if(q=g(q,T),!X)return q;return p5([],H,q,T,G,$)}return U(q,T)}});function C5($,I,U,_){for(let g of $)if(g.issues.length===0)return I.value=g.value,I;let u=$.filter((g)=>!M6(g));if(u.length===1)return I.value=u[0].value,u[0];return I.issues.push({code:"invalid_union",input:I.value,inst:U,errors:$.map((g)=>g.issues.map((z)=>e$(z,_,L$())))}),I}var G0=V("$ZodUnion",($,I)=>{m.init($,I),p($._zod,"optin",()=>I.options.some((u)=>u._zod.optin==="optional")?"optional":void 0),p($._zod,"optout",()=>I.options.some((u)=>u._zod.optout==="optional")?"optional":void 0),p($._zod,"values",()=>{if(I.options.every((u)=>u._zod.values))return new Set(I.options.flatMap((u)=>Array.from(u._zod.values)));return}),p($._zod,"pattern",()=>{if(I.options.every((u)=>u._zod.pattern)){let u=I.options.map((g)=>g._zod.pattern);return new RegExp(`^(${u.map((g)=>sI(g.source)).join("|")})$`)}return});let U=I.options.length===1,_=I.options[0]._zod.run;$._zod.parse=(u,g)=>{if(U)return _(u,g);let z=!1,v=[];for(let J of I.options){let N=J._zod.run({value:u.value,issues:[]},g);if(N instanceof Promise)v.push(N),z=!0;else{if(N.issues.length===0)return N;v.push(N)}}if(!z)return C5(v,u,$,g);return Promise.all(v).then((J)=>{return C5(J,u,$,g)})}});function f5($,I,U,_){let u=$.filter((g)=>g.issues.length===0);if(u.length===1)return I.value=u[0].value,I;if(u.length===0)I.issues.push({code:"invalid_union",input:I.value,inst:U,errors:$.map((g)=>g.issues.map((z)=>e$(z,_,L$())))});else I.issues.push({code:"invalid_union",input:I.value,inst:U,errors:[],inclusive:!1});return I}var sv=V("$ZodXor",($,I)=>{G0.init($,I),I.inclusive=!1;let U=I.options.length===1,_=I.options[0]._zod.run;$._zod.parse=(u,g)=>{if(U)return _(u,g);let z=!1,v=[];for(let J of I.options){let N=J._zod.run({value:u.value,issues:[]},g);if(N instanceof Promise)v.push(N),z=!0;else v.push(N)}if(!z)return f5(v,u,$,g);return Promise.all(v).then((J)=>{return f5(J,u,$,g)})}}),$J=V("$ZodDiscriminatedUnion",($,I)=>{I.inclusive=!1,G0.init($,I);let U=$._zod.parse;p($._zod,"propValues",()=>{let u={};for(let g of I.options){let z=g._zod.propValues;if(!z||Object.keys(z).length===0)throw Error(`Invalid discriminated union option at index "${I.options.indexOf(g)}"`);for(let[v,J]of Object.entries(z)){if(!u[v])u[v]=new Set;for(let N of J)u[v].add(N)}}return u});let _=E1(()=>{let u=I.options,g=new Map;for(let z of u){let v=z._zod.propValues?.[I.discriminator];if(!v||v.size===0)throw Error(`Invalid discriminated union option at index "${I.options.indexOf(z)}"`);for(let J of v){if(g.has(J))throw Error(`Duplicate discriminator value "${String(J)}"`);g.set(J,z)}}return g});$._zod.parse=(u,g)=>{let z=u.value;if(!p6(z))return u.issues.push({code:"invalid_type",expected:"object",input:z,inst:$}),u;let v=_.value.get(z?.[I.discriminator]);if(v)return v._zod.run(u,g);if(I.unionFallback)return U(u,g);return u.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:I.discriminator,input:z,path:[I.discriminator],inst:$}),u}}),IJ=V("$ZodIntersection",($,I)=>{m.init($,I),$._zod.parse=(U,_)=>{let u=U.value,g=I.left._zod.run({value:u,issues:[]},_),z=I.right._zod.run({value:u,issues:[]},_);if(g instanceof Promise||z instanceof Promise)return Promise.all([g,z]).then(([J,N])=>{return x5(U,J,N)});return x5(U,g,z)}});function Tv($,I){if($===I)return{valid:!0,data:$};if($ instanceof Date&&I instanceof Date&&+$===+I)return{valid:!0,data:$};if(D6($)&&D6(I)){let U=Object.keys(I),_=Object.keys($).filter((g)=>U.indexOf(g)!==-1),u={...$,...I};for(let g of _){let z=Tv($[g],I[g]);if(!z.valid)return{valid:!1,mergeErrorPath:[g,...z.mergeErrorPath]};u[g]=z.data}return{valid:!0,data:u}}if(Array.isArray($)&&Array.isArray(I)){if($.length!==I.length)return{valid:!1,mergeErrorPath:[]};let U=[];for(let _=0;_<$.length;_++){let u=$[_],g=I[_],z=Tv(u,g);if(!z.valid)return{valid:!1,mergeErrorPath:[_,...z.mergeErrorPath]};U.push(z.data)}return{valid:!0,data:U}}return{valid:!1,mergeErrorPath:[]}}function x5($,I,U){let _=new Map,u;for(let v of I.issues)if(v.code==="unrecognized_keys"){u??(u=v);for(let J of v.keys){if(!_.has(J))_.set(J,{});_.get(J).l=!0}}else $.issues.push(v);for(let v of U.issues)if(v.code==="unrecognized_keys")for(let J of v.keys){if(!_.has(J))_.set(J,{});_.get(J).r=!0}else $.issues.push(v);let g=[..._].filter(([,v])=>v.l&&v.r).map(([v])=>v);if(g.length&&u)$.issues.push({...u,keys:g});if(M6($))return $;let z=Tv(I.value,U.value);if(!z.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(z.mergeErrorPath)}`);return $.value=z.data,$}var BU=V("$ZodTuple",($,I)=>{m.init($,I);let U=I.items;$._zod.parse=(_,u)=>{let g=_.value;if(!Array.isArray(g))return _.issues.push({input:g,inst:$,expected:"tuple",code:"invalid_type"}),_;_.value=[];let z=[],v=[...U].reverse().findIndex((X)=>X._zod.optin!=="optional"),J=v===-1?0:U.length-v;if(!I.rest){let X=g.length>U.length,G=g.length<J-1;if(X||G)return _.issues.push({...X?{code:"too_big",maximum:U.length,inclusive:!0}:{code:"too_small",minimum:U.length},input:g,inst:$,origin:"array"}),_}let N=-1;for(let X of U){if(N++,N>=g.length){if(N>=J)continue}let G=X._zod.run({value:g[N],issues:[]},u);if(G instanceof Promise)z.push(G.then((q)=>qU(q,_,N)));else qU(G,_,N)}if(I.rest){let X=g.slice(U.length);for(let G of X){N++;let q=I.rest._zod.run({value:G,issues:[]},u);if(q instanceof Promise)z.push(q.then((T)=>qU(T,_,N)));else qU(q,_,N)}}if(z.length)return Promise.all(z).then(()=>_);return _}});function qU($,I,U){if($.issues.length)I.issues.push(..._4(U,$.issues));I.value[U]=$.value}var uJ=V("$ZodRecord",($,I)=>{m.init($,I),$._zod.parse=(U,_)=>{let u=U.value;if(!D6(u))return U.issues.push({expected:"record",code:"invalid_type",input:u,inst:$}),U;let g=[],z=I.keyType._zod.values;if(z){U.value={};let v=new Set;for(let N of z)if(typeof N==="string"||typeof N==="number"||typeof N==="symbol"){v.add(typeof N==="number"?N.toString():N);let X=I.valueType._zod.run({value:u[N],issues:[]},_);if(X instanceof Promise)g.push(X.then((G)=>{if(G.issues.length)U.issues.push(..._4(N,G.issues));U.value[N]=G.value}));else{if(X.issues.length)U.issues.push(..._4(N,X.issues));U.value[N]=X.value}}let J;for(let N in u)if(!v.has(N))J=J??[],J.push(N);if(J&&J.length>0)U.issues.push({code:"unrecognized_keys",input:u,inst:$,keys:J})}else{U.value={};for(let v of Reflect.ownKeys(u)){if(v==="__proto__")continue;let J=I.keyType._zod.run({value:v,issues:[]},_);if(J instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof v==="string"&&z0.test(v)&&J.issues.length){let G=I.keyType._zod.run({value:Number(v),issues:[]},_);if(G instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(G.issues.length===0)J=G}if(J.issues.length){if(I.mode==="loose")U.value[v]=u[v];else U.issues.push({code:"invalid_key",origin:"record",issues:J.issues.map((G)=>e$(G,_,L$())),input:v,path:[v],inst:$});continue}let X=I.valueType._zod.run({value:u[v],issues:[]},_);if(X instanceof Promise)g.push(X.then((G)=>{if(G.issues.length)U.issues.push(..._4(v,G.issues));U.value[J.value]=G.value}));else{if(X.issues.length)U.issues.push(..._4(v,X.issues));U.value[J.value]=X.value}}}if(g.length)return Promise.all(g).then(()=>U);return U}}),UJ=V("$ZodMap",($,I)=>{m.init($,I),$._zod.parse=(U,_)=>{let u=U.value;if(!(u instanceof Map))return U.issues.push({expected:"map",code:"invalid_type",input:u,inst:$}),U;let g=[];U.value=new Map;for(let[z,v]of u){let J=I.keyType._zod.run({value:z,issues:[]},_),N=I.valueType._zod.run({value:v,issues:[]},_);if(J instanceof Promise||N instanceof Promise)g.push(Promise.all([J,N]).then(([X,G])=>{k5(X,G,U,z,u,$,_)}));else k5(J,N,U,z,u,$,_)}if(g.length)return Promise.all(g).then(()=>U);return U}});function k5($,I,U,_,u,g,z){if($.issues.length)if($0.has(typeof _))U.issues.push(..._4(_,$.issues));else U.issues.push({code:"invalid_key",origin:"map",input:u,inst:g,issues:$.issues.map((v)=>e$(v,z,L$()))});if(I.issues.length)if($0.has(typeof _))U.issues.push(..._4(_,I.issues));else U.issues.push({origin:"map",code:"invalid_element",input:u,inst:g,key:_,issues:I.issues.map((v)=>e$(v,z,L$()))});U.value.set($.value,I.value)}var _J=V("$ZodSet",($,I)=>{m.init($,I),$._zod.parse=(U,_)=>{let u=U.value;if(!(u instanceof Set))return U.issues.push({input:u,inst:$,expected:"set",code:"invalid_type"}),U;let g=[];U.value=new Set;for(let z of u){let v=I.valueType._zod.run({value:z,issues:[]},_);if(v instanceof Promise)g.push(v.then((J)=>y5(J,U)));else y5(v,U)}if(g.length)return Promise.all(g).then(()=>U);return U}});function y5($,I){if($.issues.length)I.issues.push(...$.issues);I.value.add($.value)}var gJ=V("$ZodEnum",($,I)=>{m.init($,I);let U=eI(I.entries),_=new Set(U);$._zod.values=_,$._zod.pattern=new RegExp(`^(${U.filter((u)=>$0.has(typeof u)).map((u)=>typeof u==="string"?T4(u):u.toString()).join("|")})$`),$._zod.parse=(u,g)=>{let z=u.value;if(_.has(z))return u;return u.issues.push({code:"invalid_value",values:U,input:z,inst:$}),u}}),zJ=V("$ZodLiteral",($,I)=>{if(m.init($,I),I.values.length===0)throw Error("Cannot create literal schema with no valid values");let U=new Set(I.values);$._zod.values=U,$._zod.pattern=new RegExp(`^(${I.values.map((_)=>typeof _==="string"?T4(_):_?T4(_.toString()):String(_)).join("|")})$`),$._zod.parse=(_,u)=>{let g=_.value;if(U.has(g))return _;return _.issues.push({code:"invalid_value",values:I.values,input:g,inst:$}),_}}),vJ=V("$ZodFile",($,I)=>{m.init($,I),$._zod.parse=(U,_)=>{let u=U.value;if(u instanceof File)return U;return U.issues.push({expected:"file",code:"invalid_type",input:u,inst:$}),U}}),JJ=V("$ZodTransform",($,I)=>{m.init($,I),$._zod.parse=(U,_)=>{if(_.direction==="backward")throw new d6($.constructor.name);let u=I.transform(U.value,U);if(_.async)return(u instanceof Promise?u:Promise.resolve(u)).then((z)=>{return U.value=z,U});if(u instanceof Promise)throw new C4;return U.value=u,U}});function i5($,I){if($.issues.length&&I===void 0)return{issues:[],value:void 0};return $}var DU=V("$ZodOptional",($,I)=>{m.init($,I),$._zod.optin="optional",$._zod.optout="optional",p($._zod,"values",()=>{return I.innerType._zod.values?new Set([...I.innerType._zod.values,void 0]):void 0}),p($._zod,"pattern",()=>{let U=I.innerType._zod.pattern;return U?new RegExp(`^(${sI(U.source)})?$`):void 0}),$._zod.parse=(U,_)=>{if(I.innerType._zod.optin==="optional"){let u=I.innerType._zod.run(U,_);if(u instanceof Promise)return u.then((g)=>i5(g,U.value));return i5(u,U.value)}if(U.value===void 0)return U;return I.innerType._zod.run(U,_)}}),NJ=V("$ZodExactOptional",($,I)=>{DU.init($,I),p($._zod,"values",()=>I.innerType._zod.values),p($._zod,"pattern",()=>I.innerType._zod.pattern),$._zod.parse=(U,_)=>{return I.innerType._zod.run(U,_)}}),GJ=V("$ZodNullable",($,I)=>{m.init($,I),p($._zod,"optin",()=>I.innerType._zod.optin),p($._zod,"optout",()=>I.innerType._zod.optout),p($._zod,"pattern",()=>{let U=I.innerType._zod.pattern;return U?new RegExp(`^(${sI(U.source)}|null)$`):void 0}),p($._zod,"values",()=>{return I.innerType._zod.values?new Set([...I.innerType._zod.values,null]):void 0}),$._zod.parse=(U,_)=>{if(U.value===null)return U;return I.innerType._zod.run(U,_)}}),XJ=V("$ZodDefault",($,I)=>{m.init($,I),$._zod.optin="optional",p($._zod,"values",()=>I.innerType._zod.values),$._zod.parse=(U,_)=>{if(_.direction==="backward")return I.innerType._zod.run(U,_);if(U.value===void 0)return U.value=I.defaultValue,U;let u=I.innerType._zod.run(U,_);if(u instanceof Promise)return u.then((g)=>n5(g,I));return n5(u,I)}});function n5($,I){if($.value===void 0)$.value=I.defaultValue;return $}var qJ=V("$ZodPrefault",($,I)=>{m.init($,I),$._zod.optin="optional",p($._zod,"values",()=>I.innerType._zod.values),$._zod.parse=(U,_)=>{if(_.direction==="backward")return I.innerType._zod.run(U,_);if(U.value===void 0)U.value=I.defaultValue;return I.innerType._zod.run(U,_)}}),QJ=V("$ZodNonOptional",($,I)=>{m.init($,I),p($._zod,"values",()=>{let U=I.innerType._zod.values;return U?new Set([...U].filter((_)=>_!==void 0)):void 0}),$._zod.parse=(U,_)=>{let u=I.innerType._zod.run(U,_);if(u instanceof Promise)return u.then((g)=>r5(g,$));return r5(u,$)}});function r5($,I){if(!$.issues.length&&$.value===void 0)$.issues.push({code:"invalid_type",expected:"nonoptional",input:$.value,inst:I});return $}var TJ=V("$ZodSuccess",($,I)=>{m.init($,I),$._zod.parse=(U,_)=>{if(_.direction==="backward")throw new d6("ZodSuccess");let u=I.innerType._zod.run(U,_);if(u instanceof Promise)return u.then((g)=>{return U.value=g.issues.length===0,U});return U.value=u.issues.length===0,U}}),HJ=V("$ZodCatch",($,I)=>{m.init($,I),p($._zod,"optin",()=>I.innerType._zod.optin),p($._zod,"optout",()=>I.innerType._zod.optout),p($._zod,"values",()=>I.innerType._zod.values),$._zod.parse=(U,_)=>{if(_.direction==="backward")return I.innerType._zod.run(U,_);let u=I.innerType._zod.run(U,_);if(u instanceof Promise)return u.then((g)=>{if(U.value=g.value,g.issues.length)U.value=I.catchValue({...U,error:{issues:g.issues.map((z)=>e$(z,_,L$()))},input:U.value}),U.issues=[];return U});if(U.value=u.value,u.issues.length)U.value=I.catchValue({...U,error:{issues:u.issues.map((g)=>e$(g,_,L$()))},input:U.value}),U.issues=[];return U}}),YJ=V("$ZodNaN",($,I)=>{m.init($,I),$._zod.parse=(U,_)=>{if(typeof U.value!=="number"||!Number.isNaN(U.value))return U.issues.push({input:U.value,inst:$,expected:"nan",code:"invalid_type"}),U;return U}}),OJ=V("$ZodPipe",($,I)=>{m.init($,I),p($._zod,"values",()=>I.in._zod.values),p($._zod,"optin",()=>I.in._zod.optin),p($._zod,"optout",()=>I.out._zod.optout),p($._zod,"propValues",()=>I.in._zod.propValues),$._zod.parse=(U,_)=>{if(_.direction==="backward"){let g=I.out._zod.run(U,_);if(g instanceof Promise)return g.then((z)=>QU(z,I.in,_));return QU(g,I.in,_)}let u=I.in._zod.run(U,_);if(u instanceof Promise)return u.then((g)=>QU(g,I.out,_));return QU(u,I.out,_)}});function QU($,I,U){if($.issues.length)return $.aborted=!0,$;return I._zod.run({value:$.value,issues:$.issues},U)}var X0=V("$ZodCodec",($,I)=>{m.init($,I),p($._zod,"values",()=>I.in._zod.values),p($._zod,"optin",()=>I.in._zod.optin),p($._zod,"optout",()=>I.out._zod.optout),p($._zod,"propValues",()=>I.in._zod.propValues),$._zod.parse=(U,_)=>{if((_.direction||"forward")==="forward"){let g=I.in._zod.run(U,_);if(g instanceof Promise)return g.then((z)=>TU(z,I,_));return TU(g,I,_)}else{let g=I.out._zod.run(U,_);if(g instanceof Promise)return g.then((z)=>TU(z,I,_));return TU(g,I,_)}}});function TU($,I,U){if($.issues.length)return $.aborted=!0,$;if((U.direction||"forward")==="forward"){let u=I.transform($.value,$);if(u instanceof Promise)return u.then((g)=>HU($,g,I.out,U));return HU($,u,I.out,U)}else{let u=I.reverseTransform($.value,$);if(u instanceof Promise)return u.then((g)=>HU($,g,I.in,U));return HU($,u,I.in,U)}}function HU($,I,U,_){if($.issues.length)return $.aborted=!0,$;return U._zod.run({value:I,issues:$.issues},_)}var VJ=V("$ZodReadonly",($,I)=>{m.init($,I),p($._zod,"propValues",()=>I.innerType._zod.propValues),p($._zod,"values",()=>I.innerType._zod.values),p($._zod,"optin",()=>I.innerType?._zod?.optin),p($._zod,"optout",()=>I.innerType?._zod?.optout),$._zod.parse=(U,_)=>{if(_.direction==="backward")return I.innerType._zod.run(U,_);let u=I.innerType._zod.run(U,_);if(u instanceof Promise)return u.then(l5);return l5(u)}});function l5($){return $.value=Object.freeze($.value),$}var BJ=V("$ZodTemplateLiteral",($,I)=>{m.init($,I);let U=[];for(let _ of I.parts)if(typeof _==="object"&&_!==null){if(!_._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[..._._zod.traits].shift()}`);let u=_._zod.pattern instanceof RegExp?_._zod.pattern.source:_._zod.pattern;if(!u)throw Error(`Invalid template literal part: ${_._zod.traits}`);let g=u.startsWith("^")?1:0,z=u.endsWith("$")?u.length-1:u.length;U.push(u.slice(g,z))}else if(_===null||Qz.has(typeof _))U.push(T4(`${_}`));else throw Error(`Invalid template literal part: ${_}`);$._zod.pattern=new RegExp(`^${U.join("")}$`),$._zod.parse=(_,u)=>{if(typeof _.value!=="string")return _.issues.push({input:_.value,inst:$,expected:"string",code:"invalid_type"}),_;if($._zod.pattern.lastIndex=0,!$._zod.pattern.test(_.value))return _.issues.push({input:_.value,inst:$,code:"invalid_format",format:I.format??"template_literal",pattern:$._zod.pattern.source}),_;return _}}),DJ=V("$ZodFunction",($,I)=>{return m.init($,I),$._def=I,$._zod.def=I,$.implement=(U)=>{if(typeof U!=="function")throw Error("implement() must be called with a function");return function(..._){let u=$._def.input?eu($._def.input,_):_,g=Reflect.apply(U,this,u);if($._def.output)return eu($._def.output,g);return g}},$.implementAsync=(U)=>{if(typeof U!=="function")throw Error("implementAsync() must be called with a function");return async function(..._){let u=$._def.input?await su($._def.input,_):_,g=await Reflect.apply(U,this,u);if($._def.output)return await su($._def.output,g);return g}},$._zod.parse=(U,_)=>{if(typeof U.value!=="function")return U.issues.push({code:"invalid_type",expected:"function",input:U.value,inst:$}),U;if($._def.output&&$._def.output._zod.def.type==="promise")U.value=$.implementAsync(U.value);else U.value=$.implement(U.value);return U},$.input=(...U)=>{let _=$.constructor;if(Array.isArray(U[0]))return new _({type:"function",input:new BU({type:"tuple",items:U[0],rest:U[1]}),output:$._def.output});return new _({type:"function",input:U[0],output:$._def.output})},$.output=(U)=>{return new $.constructor({type:"function",input:$._def.input,output:U})},$}),MJ=V("$ZodPromise",($,I)=>{m.init($,I),$._zod.parse=(U,_)=>{return Promise.resolve(U.value).then((u)=>I.innerType._zod.run({value:u,issues:[]},_))}}),KJ=V("$ZodLazy",($,I)=>{m.init($,I),p($._zod,"innerType",()=>I.getter()),p($._zod,"pattern",()=>$._zod.innerType?._zod?.pattern),p($._zod,"propValues",()=>$._zod.innerType?._zod?.propValues),p($._zod,"optin",()=>$._zod.innerType?._zod?.optin??void 0),p($._zod,"optout",()=>$._zod.innerType?._zod?.optout??void 0),$._zod.parse=(U,_)=>{return $._zod.innerType._zod.run(U,_)}}),LJ=V("$ZodCustom",($,I)=>{G$.init($,I),m.init($,I),$._zod.parse=(U,_)=>{return U},$._zod.check=(U)=>{let _=U.value,u=I.fn(_);if(u instanceof Promise)return u.then((g)=>m5(g,U,_,$));m5(u,U,_,$);return}});function m5($,I,U,_){if(!$){let u={code:"custom",input:U,inst:_,path:[..._._zod.def.path??[]],continue:!_._zod.def.abort};if(_._zod.def.params)u.params=_._zod.def.params;I.issues.push(C1(u))}}var Y0={};B4(Y0,{zhTW:()=>TN,zhCN:()=>QN,yo:()=>HN,vi:()=>qN,uz:()=>XN,ur:()=>GN,uk:()=>H0,ua:()=>NN,tr:()=>JN,th:()=>vN,ta:()=>zN,sv:()=>gN,sl:()=>_N,ru:()=>UN,pt:()=>uN,ps:()=>$N,pl:()=>IN,ota:()=>sJ,no:()=>eJ,nl:()=>aJ,ms:()=>tJ,mk:()=>oJ,lt:()=>pJ,ko:()=>dJ,km:()=>Q0,kh:()=>cJ,ka:()=>hJ,ja:()=>mJ,it:()=>lJ,is:()=>rJ,id:()=>nJ,hy:()=>iJ,hu:()=>yJ,he:()=>kJ,frCA:()=>xJ,fr:()=>fJ,fi:()=>CJ,fa:()=>EJ,es:()=>wJ,eo:()=>SJ,en:()=>q0,de:()=>FJ,da:()=>jJ,cs:()=>bJ,ca:()=>AJ,bg:()=>ZJ,be:()=>PJ,az:()=>WJ,ar:()=>RJ});var lA=()=>{let $={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function I(u){return $[u]??null}let U={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`مدخلات غير مقبولة: يفترض إدخال instanceof ${u.expected}، ولكن تم إدخال ${v}`;return`مدخلات غير مقبولة: يفترض إدخال ${g}، ولكن تم إدخال ${v}`}case"invalid_value":if(u.values.length===1)return`مدخلات غير مقبولة: يفترض إدخال ${j(u.values[0])}`;return`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return` أكبر من اللازم: يفترض أن تكون ${u.origin??"القيمة"} ${g} ${u.maximum.toString()} ${z.unit??"عنصر"}`;return`أكبر من اللازم: يفترض أن تكون ${u.origin??"القيمة"} ${g} ${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`أصغر من اللازم: يفترض لـ ${u.origin} أن يكون ${g} ${u.minimum.toString()} ${z.unit}`;return`أصغر من اللازم: يفترض لـ ${u.origin} أن يكون ${g} ${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`نَص غير مقبول: يجب أن يبدأ بـ "${u.prefix}"`;if(g.format==="ends_with")return`نَص غير مقبول: يجب أن ينتهي بـ "${g.suffix}"`;if(g.format==="includes")return`نَص غير مقبول: يجب أن يتضمَّن "${g.includes}"`;if(g.format==="regex")return`نَص غير مقبول: يجب أن يطابق النمط ${g.pattern}`;return`${U[g.format]??u.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${u.divisor}`;case"unrecognized_keys":return`معرف${u.keys.length>1?"ات":""} غريب${u.keys.length>1?"ة":""}: ${W(u.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${u.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${u.origin}`;default:return"مدخل غير مقبول"}}};function RJ(){return{localeError:lA()}}var mA=()=>{let $={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function I(u){return $[u]??null}let U={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Yanlış dəyər: gözlənilən instanceof ${u.expected}, daxil olan ${v}`;return`Yanlış dəyər: gözlənilən ${g}, daxil olan ${v}`}case"invalid_value":if(u.values.length===1)return`Yanlış dəyər: gözlənilən ${j(u.values[0])}`;return`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Çox böyük: gözlənilən ${u.origin??"dəyər"} ${g}${u.maximum.toString()} ${z.unit??"element"}`;return`Çox böyük: gözlənilən ${u.origin??"dəyər"} ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Çox kiçik: gözlənilən ${u.origin} ${g}${u.minimum.toString()} ${z.unit}`;return`Çox kiçik: gözlənilən ${u.origin} ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Yanlış mətn: "${g.prefix}" ilə başlamalıdır`;if(g.format==="ends_with")return`Yanlış mətn: "${g.suffix}" ilə bitməlidir`;if(g.format==="includes")return`Yanlış mətn: "${g.includes}" daxil olmalıdır`;if(g.format==="regex")return`Yanlış mətn: ${g.pattern} şablonuna uyğun olmalıdır`;return`Yanlış ${U[g.format]??u.format}`}case"not_multiple_of":return`Yanlış ədəd: ${u.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${u.keys.length>1?"lar":""}: ${W(u.keys,", ")}`;case"invalid_key":return`${u.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${u.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function WJ(){return{localeError:mA()}}function t5($,I,U,_){let u=Math.abs($),g=u%10,z=u%100;if(z>=11&&z<=19)return _;if(g===1)return I;if(g>=2&&g<=4)return U;return _}var hA=()=>{let $={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function I(u){return $[u]??null}let U={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},_={nan:"NaN",number:"лік",array:"масіў"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Няправільны ўвод: чакаўся instanceof ${u.expected}, атрымана ${v}`;return`Няправільны ўвод: чакаўся ${g}, атрымана ${v}`}case"invalid_value":if(u.values.length===1)return`Няправільны ўвод: чакалася ${j(u.values[0])}`;return`Няправільны варыянт: чакаўся адзін з ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z){let v=Number(u.maximum),J=t5(v,z.unit.one,z.unit.few,z.unit.many);return`Занадта вялікі: чакалася, што ${u.origin??"значэнне"} павінна ${z.verb} ${g}${u.maximum.toString()} ${J}`}return`Занадта вялікі: чакалася, што ${u.origin??"значэнне"} павінна быць ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z){let v=Number(u.minimum),J=t5(v,z.unit.one,z.unit.few,z.unit.many);return`Занадта малы: чакалася, што ${u.origin} павінна ${z.verb} ${g}${u.minimum.toString()} ${J}`}return`Занадта малы: чакалася, што ${u.origin} павінна быць ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Няправільны радок: павінен пачынацца з "${g.prefix}"`;if(g.format==="ends_with")return`Няправільны радок: павінен заканчвацца на "${g.suffix}"`;if(g.format==="includes")return`Няправільны радок: павінен змяшчаць "${g.includes}"`;if(g.format==="regex")return`Няправільны радок: павінен адпавядаць шаблону ${g.pattern}`;return`Няправільны ${U[g.format]??u.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${u.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${u.keys.length>1?"ключы":"ключ"}: ${W(u.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${u.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${u.origin}`;default:return"Няправільны ўвод"}}};function PJ(){return{localeError:hA()}}var cA=()=>{let $={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function I(u){return $[u]??null}let U={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"},_={nan:"NaN",number:"число",array:"масив"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Невалиден вход: очакван instanceof ${u.expected}, получен ${v}`;return`Невалиден вход: очакван ${g}, получен ${v}`}case"invalid_value":if(u.values.length===1)return`Невалиден вход: очакван ${j(u.values[0])}`;return`Невалидна опция: очаквано едно от ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Твърде голямо: очаква се ${u.origin??"стойност"} да съдържа ${g}${u.maximum.toString()} ${z.unit??"елемента"}`;return`Твърде голямо: очаква се ${u.origin??"стойност"} да бъде ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Твърде малко: очаква се ${u.origin} да съдържа ${g}${u.minimum.toString()} ${z.unit}`;return`Твърде малко: очаква се ${u.origin} да бъде ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Невалиден низ: трябва да започва с "${g.prefix}"`;if(g.format==="ends_with")return`Невалиден низ: трябва да завършва с "${g.suffix}"`;if(g.format==="includes")return`Невалиден низ: трябва да включва "${g.includes}"`;if(g.format==="regex")return`Невалиден низ: трябва да съвпада с ${g.pattern}`;let z="Невалиден";if(g.format==="emoji")z="Невалидно";if(g.format==="datetime")z="Невалидно";if(g.format==="date")z="Невалидна";if(g.format==="time")z="Невалидно";if(g.format==="duration")z="Невалидна";return`${z} ${U[g.format]??u.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${u.divisor}`;case"unrecognized_keys":return`Неразпознат${u.keys.length>1?"и":""} ключ${u.keys.length>1?"ове":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${u.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${u.origin}`;default:return"Невалиден вход"}}};function ZJ(){return{localeError:cA()}}var dA=()=>{let $={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function I(u){return $[u]??null}let U={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Tipus invàlid: s'esperava instanceof ${u.expected}, s'ha rebut ${v}`;return`Tipus invàlid: s'esperava ${g}, s'ha rebut ${v}`}case"invalid_value":if(u.values.length===1)return`Valor invàlid: s'esperava ${j(u.values[0])}`;return`Opció invàlida: s'esperava una de ${W(u.values," o ")}`;case"too_big":{let g=u.inclusive?"com a màxim":"menys de",z=I(u.origin);if(z)return`Massa gran: s'esperava que ${u.origin??"el valor"} contingués ${g} ${u.maximum.toString()} ${z.unit??"elements"}`;return`Massa gran: s'esperava que ${u.origin??"el valor"} fos ${g} ${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?"com a mínim":"més de",z=I(u.origin);if(z)return`Massa petit: s'esperava que ${u.origin} contingués ${g} ${u.minimum.toString()} ${z.unit}`;return`Massa petit: s'esperava que ${u.origin} fos ${g} ${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Format invàlid: ha de començar amb "${g.prefix}"`;if(g.format==="ends_with")return`Format invàlid: ha d'acabar amb "${g.suffix}"`;if(g.format==="includes")return`Format invàlid: ha d'incloure "${g.includes}"`;if(g.format==="regex")return`Format invàlid: ha de coincidir amb el patró ${g.pattern}`;return`Format invàlid per a ${U[g.format]??u.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${u.divisor}`;case"unrecognized_keys":return`Clau${u.keys.length>1?"s":""} no reconeguda${u.keys.length>1?"s":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${u.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${u.origin}`;default:return"Entrada invàlida"}}};function AJ(){return{localeError:dA()}}var pA=()=>{let $={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function I(u){return $[u]??null}let U={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},_={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Neplatný vstup: očekáváno instanceof ${u.expected}, obdrženo ${v}`;return`Neplatný vstup: očekáváno ${g}, obdrženo ${v}`}case"invalid_value":if(u.values.length===1)return`Neplatný vstup: očekáváno ${j(u.values[0])}`;return`Neplatná možnost: očekávána jedna z hodnot ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Hodnota je příliš velká: ${u.origin??"hodnota"} musí mít ${g}${u.maximum.toString()} ${z.unit??"prvků"}`;return`Hodnota je příliš velká: ${u.origin??"hodnota"} musí být ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Hodnota je příliš malá: ${u.origin??"hodnota"} musí mít ${g}${u.minimum.toString()} ${z.unit??"prvků"}`;return`Hodnota je příliš malá: ${u.origin??"hodnota"} musí být ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Neplatný řetězec: musí začínat na "${g.prefix}"`;if(g.format==="ends_with")return`Neplatný řetězec: musí končit na "${g.suffix}"`;if(g.format==="includes")return`Neplatný řetězec: musí obsahovat "${g.includes}"`;if(g.format==="regex")return`Neplatný řetězec: musí odpovídat vzoru ${g.pattern}`;return`Neplatný formát ${U[g.format]??u.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${u.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${W(u.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${u.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${u.origin}`;default:return"Neplatný vstup"}}};function bJ(){return{localeError:pA()}}var oA=()=>{let $={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function I(u){return $[u]??null}let U={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},_={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Ugyldigt input: forventede instanceof ${u.expected}, fik ${v}`;return`Ugyldigt input: forventede ${g}, fik ${v}`}case"invalid_value":if(u.values.length===1)return`Ugyldig værdi: forventede ${j(u.values[0])}`;return`Ugyldigt valg: forventede en af følgende ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin),v=_[u.origin]??u.origin;if(z)return`For stor: forventede ${v??"value"} ${z.verb} ${g} ${u.maximum.toString()} ${z.unit??"elementer"}`;return`For stor: forventede ${v??"value"} havde ${g} ${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin),v=_[u.origin]??u.origin;if(z)return`For lille: forventede ${v} ${z.verb} ${g} ${u.minimum.toString()} ${z.unit}`;return`For lille: forventede ${v} havde ${g} ${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Ugyldig streng: skal starte med "${g.prefix}"`;if(g.format==="ends_with")return`Ugyldig streng: skal ende med "${g.suffix}"`;if(g.format==="includes")return`Ugyldig streng: skal indeholde "${g.includes}"`;if(g.format==="regex")return`Ugyldig streng: skal matche mønsteret ${g.pattern}`;return`Ugyldig ${U[g.format]??u.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${W(u.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${u.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${u.origin}`;default:return"Ugyldigt input"}}};function jJ(){return{localeError:oA()}}var tA=()=>{let $={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function I(u){return $[u]??null}let U={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},_={nan:"NaN",number:"Zahl",array:"Array"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Ungültige Eingabe: erwartet instanceof ${u.expected}, erhalten ${v}`;return`Ungültige Eingabe: erwartet ${g}, erhalten ${v}`}case"invalid_value":if(u.values.length===1)return`Ungültige Eingabe: erwartet ${j(u.values[0])}`;return`Ungültige Option: erwartet eine von ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Zu groß: erwartet, dass ${u.origin??"Wert"} ${g}${u.maximum.toString()} ${z.unit??"Elemente"} hat`;return`Zu groß: erwartet, dass ${u.origin??"Wert"} ${g}${u.maximum.toString()} ist`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Zu klein: erwartet, dass ${u.origin} ${g}${u.minimum.toString()} ${z.unit} hat`;return`Zu klein: erwartet, dass ${u.origin} ${g}${u.minimum.toString()} ist`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Ungültiger String: muss mit "${g.prefix}" beginnen`;if(g.format==="ends_with")return`Ungültiger String: muss mit "${g.suffix}" enden`;if(g.format==="includes")return`Ungültiger String: muss "${g.includes}" enthalten`;if(g.format==="regex")return`Ungültiger String: muss dem Muster ${g.pattern} entsprechen`;return`Ungültig: ${U[g.format]??u.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${u.divisor} sein`;case"unrecognized_keys":return`${u.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${W(u.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${u.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${u.origin}`;default:return"Ungültige Eingabe"}}};function FJ(){return{localeError:tA()}}var aA=()=>{let $={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function I(u){return $[u]??null}let U={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;return`Invalid input: expected ${g}, received ${v}`}case"invalid_value":if(u.values.length===1)return`Invalid input: expected ${j(u.values[0])}`;return`Invalid option: expected one of ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Too big: expected ${u.origin??"value"} to have ${g}${u.maximum.toString()} ${z.unit??"elements"}`;return`Too big: expected ${u.origin??"value"} to be ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Too small: expected ${u.origin} to have ${g}${u.minimum.toString()} ${z.unit}`;return`Too small: expected ${u.origin} to be ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Invalid string: must start with "${g.prefix}"`;if(g.format==="ends_with")return`Invalid string: must end with "${g.suffix}"`;if(g.format==="includes")return`Invalid string: must include "${g.includes}"`;if(g.format==="regex")return`Invalid string: must match pattern ${g.pattern}`;return`Invalid ${U[g.format]??u.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${u.divisor}`;case"unrecognized_keys":return`Unrecognized key${u.keys.length>1?"s":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Invalid key in ${u.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${u.origin}`;default:return"Invalid input"}}};function q0(){return{localeError:aA()}}var eA=()=>{let $={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function I(u){return $[u]??null}let U={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},_={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Nevalida enigo: atendiĝis instanceof ${u.expected}, riceviĝis ${v}`;return`Nevalida enigo: atendiĝis ${g}, riceviĝis ${v}`}case"invalid_value":if(u.values.length===1)return`Nevalida enigo: atendiĝis ${j(u.values[0])}`;return`Nevalida opcio: atendiĝis unu el ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Tro granda: atendiĝis ke ${u.origin??"valoro"} havu ${g}${u.maximum.toString()} ${z.unit??"elementojn"}`;return`Tro granda: atendiĝis ke ${u.origin??"valoro"} havu ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Tro malgranda: atendiĝis ke ${u.origin} havu ${g}${u.minimum.toString()} ${z.unit}`;return`Tro malgranda: atendiĝis ke ${u.origin} estu ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Nevalida karaktraro: devas komenciĝi per "${g.prefix}"`;if(g.format==="ends_with")return`Nevalida karaktraro: devas finiĝi per "${g.suffix}"`;if(g.format==="includes")return`Nevalida karaktraro: devas inkluzivi "${g.includes}"`;if(g.format==="regex")return`Nevalida karaktraro: devas kongrui kun la modelo ${g.pattern}`;return`Nevalida ${U[g.format]??u.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${u.divisor}`;case"unrecognized_keys":return`Nekonata${u.keys.length>1?"j":""} ŝlosilo${u.keys.length>1?"j":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${u.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${u.origin}`;default:return"Nevalida enigo"}}};function SJ(){return{localeError:eA()}}var sA=()=>{let $={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function I(u){return $[u]??null}let U={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},_={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Entrada inválida: se esperaba instanceof ${u.expected}, recibido ${v}`;return`Entrada inválida: se esperaba ${g}, recibido ${v}`}case"invalid_value":if(u.values.length===1)return`Entrada inválida: se esperaba ${j(u.values[0])}`;return`Opción inválida: se esperaba una de ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin),v=_[u.origin]??u.origin;if(z)return`Demasiado grande: se esperaba que ${v??"valor"} tuviera ${g}${u.maximum.toString()} ${z.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${v??"valor"} fuera ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin),v=_[u.origin]??u.origin;if(z)return`Demasiado pequeño: se esperaba que ${v} tuviera ${g}${u.minimum.toString()} ${z.unit}`;return`Demasiado pequeño: se esperaba que ${v} fuera ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Cadena inválida: debe comenzar con "${g.prefix}"`;if(g.format==="ends_with")return`Cadena inválida: debe terminar en "${g.suffix}"`;if(g.format==="includes")return`Cadena inválida: debe incluir "${g.includes}"`;if(g.format==="regex")return`Cadena inválida: debe coincidir con el patrón ${g.pattern}`;return`Inválido ${U[g.format]??u.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${u.divisor}`;case"unrecognized_keys":return`Llave${u.keys.length>1?"s":""} desconocida${u.keys.length>1?"s":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Llave inválida en ${_[u.origin]??u.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${_[u.origin]??u.origin}`;default:return"Entrada inválida"}}};function wJ(){return{localeError:sA()}}var $b=()=>{let $={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function I(u){return $[u]??null}let U={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},_={nan:"NaN",number:"عدد",array:"آرایه"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`ورودی نامعتبر: می‌بایست instanceof ${u.expected} می‌بود، ${v} دریافت شد`;return`ورودی نامعتبر: می‌بایست ${g} می‌بود، ${v} دریافت شد`}case"invalid_value":if(u.values.length===1)return`ورودی نامعتبر: می‌بایست ${j(u.values[0])} می‌بود`;return`گزینه نامعتبر: می‌بایست یکی از ${W(u.values,"|")} می‌بود`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`خیلی بزرگ: ${u.origin??"مقدار"} باید ${g}${u.maximum.toString()} ${z.unit??"عنصر"} باشد`;return`خیلی بزرگ: ${u.origin??"مقدار"} باید ${g}${u.maximum.toString()} باشد`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`خیلی کوچک: ${u.origin} باید ${g}${u.minimum.toString()} ${z.unit} باشد`;return`خیلی کوچک: ${u.origin} باید ${g}${u.minimum.toString()} باشد`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`رشته نامعتبر: باید با "${g.prefix}" شروع شود`;if(g.format==="ends_with")return`رشته نامعتبر: باید با "${g.suffix}" تمام شود`;if(g.format==="includes")return`رشته نامعتبر: باید شامل "${g.includes}" باشد`;if(g.format==="regex")return`رشته نامعتبر: باید با الگوی ${g.pattern} مطابقت داشته باشد`;return`${U[g.format]??u.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${u.divisor} باشد`;case"unrecognized_keys":return`کلید${u.keys.length>1?"های":""} ناشناس: ${W(u.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${u.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${u.origin}`;default:return"ورودی نامعتبر"}}};function EJ(){return{localeError:$b()}}var Ib=()=>{let $={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function I(u){return $[u]??null}let U={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Virheellinen tyyppi: odotettiin instanceof ${u.expected}, oli ${v}`;return`Virheellinen tyyppi: odotettiin ${g}, oli ${v}`}case"invalid_value":if(u.values.length===1)return`Virheellinen syöte: täytyy olla ${j(u.values[0])}`;return`Virheellinen valinta: täytyy olla yksi seuraavista: ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Liian suuri: ${z.subject} täytyy olla ${g}${u.maximum.toString()} ${z.unit}`.trim();return`Liian suuri: arvon täytyy olla ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Liian pieni: ${z.subject} täytyy olla ${g}${u.minimum.toString()} ${z.unit}`.trim();return`Liian pieni: arvon täytyy olla ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Virheellinen syöte: täytyy alkaa "${g.prefix}"`;if(g.format==="ends_with")return`Virheellinen syöte: täytyy loppua "${g.suffix}"`;if(g.format==="includes")return`Virheellinen syöte: täytyy sisältää "${g.includes}"`;if(g.format==="regex")return`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${g.pattern}`;return`Virheellinen ${U[g.format]??u.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${u.divisor} monikerta`;case"unrecognized_keys":return`${u.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${W(u.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function CJ(){return{localeError:Ib()}}var ub=()=>{let $={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function I(u){return $[u]??null}let U={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},_={nan:"NaN",number:"nombre",array:"tableau"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Entrée invalide : instanceof ${u.expected} attendu, ${v} reçu`;return`Entrée invalide : ${g} attendu, ${v} reçu`}case"invalid_value":if(u.values.length===1)return`Entrée invalide : ${j(u.values[0])} attendu`;return`Option invalide : une valeur parmi ${W(u.values,"|")} attendue`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Trop grand : ${u.origin??"valeur"} doit ${z.verb} ${g}${u.maximum.toString()} ${z.unit??"élément(s)"}`;return`Trop grand : ${u.origin??"valeur"} doit être ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Trop petit : ${u.origin} doit ${z.verb} ${g}${u.minimum.toString()} ${z.unit}`;return`Trop petit : ${u.origin} doit être ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Chaîne invalide : doit commencer par "${g.prefix}"`;if(g.format==="ends_with")return`Chaîne invalide : doit se terminer par "${g.suffix}"`;if(g.format==="includes")return`Chaîne invalide : doit inclure "${g.includes}"`;if(g.format==="regex")return`Chaîne invalide : doit correspondre au modèle ${g.pattern}`;return`${U[g.format]??u.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${u.divisor}`;case"unrecognized_keys":return`Clé${u.keys.length>1?"s":""} non reconnue${u.keys.length>1?"s":""} : ${W(u.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${u.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${u.origin}`;default:return"Entrée invalide"}}};function fJ(){return{localeError:ub()}}var Ub=()=>{let $={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function I(u){return $[u]??null}let U={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Entrée invalide : attendu instanceof ${u.expected}, reçu ${v}`;return`Entrée invalide : attendu ${g}, reçu ${v}`}case"invalid_value":if(u.values.length===1)return`Entrée invalide : attendu ${j(u.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"≤":"<",z=I(u.origin);if(z)return`Trop grand : attendu que ${u.origin??"la valeur"} ait ${g}${u.maximum.toString()} ${z.unit}`;return`Trop grand : attendu que ${u.origin??"la valeur"} soit ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?"≥":">",z=I(u.origin);if(z)return`Trop petit : attendu que ${u.origin} ait ${g}${u.minimum.toString()} ${z.unit}`;return`Trop petit : attendu que ${u.origin} soit ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Chaîne invalide : doit commencer par "${g.prefix}"`;if(g.format==="ends_with")return`Chaîne invalide : doit se terminer par "${g.suffix}"`;if(g.format==="includes")return`Chaîne invalide : doit inclure "${g.includes}"`;if(g.format==="regex")return`Chaîne invalide : doit correspondre au motif ${g.pattern}`;return`${U[g.format]??u.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${u.divisor}`;case"unrecognized_keys":return`Clé${u.keys.length>1?"s":""} non reconnue${u.keys.length>1?"s":""} : ${W(u.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${u.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${u.origin}`;default:return"Entrée invalide"}}};function xJ(){return{localeError:Ub()}}var _b=()=>{let $={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},I={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},U=(N)=>N?$[N]:void 0,_=(N)=>{let X=U(N);if(X)return X.label;return N??$.unknown.label},u=(N)=>`ה${_(N)}`,g=(N)=>{return(U(N)?.gender??"m")==="f"?"צריכה להיות":"צריך להיות"},z=(N)=>{if(!N)return null;return I[N]??null},v={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},J={nan:"NaN"};return(N)=>{switch(N.code){case"invalid_type":{let X=N.expected,G=J[X??""]??_(X),q=S(N.input),T=J[q]??$[q]?.label??q;if(/^[A-Z]/.test(N.expected))return`קלט לא תקין: צריך להיות instanceof ${N.expected}, התקבל ${T}`;return`קלט לא תקין: צריך להיות ${G}, התקבל ${T}`}case"invalid_value":{if(N.values.length===1)return`ערך לא תקין: הערך חייב להיות ${j(N.values[0])}`;let X=N.values.map((T)=>j(T));if(N.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${X[0]} או ${X[1]}`;let G=X[X.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${X.slice(0,-1).join(", ")} או ${G}`}case"too_big":{let X=z(N.origin),G=u(N.origin??"value");if(N.origin==="string")return`${X?.longLabel??"ארוך"} מדי: ${G} צריכה להכיל ${N.maximum.toString()} ${X?.unit??""} ${N.inclusive?"או פחות":"לכל היותר"}`.trim();if(N.origin==="number"){let H=N.inclusive?`קטן או שווה ל-${N.maximum}`:`קטן מ-${N.maximum}`;return`גדול מדי: ${G} צריך להיות ${H}`}if(N.origin==="array"||N.origin==="set"){let H=N.origin==="set"?"צריכה":"צריך",Q=N.inclusive?`${N.maximum} ${X?.unit??""} או פחות`:`פחות מ-${N.maximum} ${X?.unit??""}`;return`גדול מדי: ${G} ${H} להכיל ${Q}`.trim()}let q=N.inclusive?"<=":"<",T=g(N.origin??"value");if(X?.unit)return`${X.longLabel} מדי: ${G} ${T} ${q}${N.maximum.toString()} ${X.unit}`;return`${X?.longLabel??"גדול"} מדי: ${G} ${T} ${q}${N.maximum.toString()}`}case"too_small":{let X=z(N.origin),G=u(N.origin??"value");if(N.origin==="string")return`${X?.shortLabel??"קצר"} מדי: ${G} צריכה להכיל ${N.minimum.toString()} ${X?.unit??""} ${N.inclusive?"או יותר":"לפחות"}`.trim();if(N.origin==="number"){let H=N.inclusive?`גדול או שווה ל-${N.minimum}`:`גדול מ-${N.minimum}`;return`קטן מדי: ${G} צריך להיות ${H}`}if(N.origin==="array"||N.origin==="set"){let H=N.origin==="set"?"צריכה":"צריך";if(N.minimum===1&&N.inclusive){let Y=N.origin==="set"?"לפחות פריט אחד":"לפחות פריט אחד";return`קטן מדי: ${G} ${H} להכיל ${Y}`}let Q=N.inclusive?`${N.minimum} ${X?.unit??""} או יותר`:`יותר מ-${N.minimum} ${X?.unit??""}`;return`קטן מדי: ${G} ${H} להכיל ${Q}`.trim()}let q=N.inclusive?">=":">",T=g(N.origin??"value");if(X?.unit)return`${X.shortLabel} מדי: ${G} ${T} ${q}${N.minimum.toString()} ${X.unit}`;return`${X?.shortLabel??"קטן"} מדי: ${G} ${T} ${q}${N.minimum.toString()}`}case"invalid_format":{let X=N;if(X.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${X.prefix}"`;if(X.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${X.suffix}"`;if(X.format==="includes")return`המחרוזת חייבת לכלול "${X.includes}"`;if(X.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${X.pattern}`;let G=v[X.format],q=G?.label??X.format,H=(G?.gender??"m")==="f"?"תקינה":"תקין";return`${q} לא ${H}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${N.divisor}`;case"unrecognized_keys":return`מפתח${N.keys.length>1?"ות":""} לא מזוה${N.keys.length>1?"ים":"ה"}: ${W(N.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${u(N.origin??"array")}`;default:return"קלט לא תקין"}}};function kJ(){return{localeError:_b()}}var gb=()=>{let $={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function I(u){return $[u]??null}let U={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},_={nan:"NaN",number:"szám",array:"tömb"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Érvénytelen bemenet: a várt érték instanceof ${u.expected}, a kapott érték ${v}`;return`Érvénytelen bemenet: a várt érték ${g}, a kapott érték ${v}`}case"invalid_value":if(u.values.length===1)return`Érvénytelen bemenet: a várt érték ${j(u.values[0])}`;return`Érvénytelen opció: valamelyik érték várt ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Túl nagy: ${u.origin??"érték"} mérete túl nagy ${g}${u.maximum.toString()} ${z.unit??"elem"}`;return`Túl nagy: a bemeneti érték ${u.origin??"érték"} túl nagy: ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Túl kicsi: a bemeneti érték ${u.origin} mérete túl kicsi ${g}${u.minimum.toString()} ${z.unit}`;return`Túl kicsi: a bemeneti érték ${u.origin} túl kicsi ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Érvénytelen string: "${g.prefix}" értékkel kell kezdődnie`;if(g.format==="ends_with")return`Érvénytelen string: "${g.suffix}" értékkel kell végződnie`;if(g.format==="includes")return`Érvénytelen string: "${g.includes}" értéket kell tartalmaznia`;if(g.format==="regex")return`Érvénytelen string: ${g.pattern} mintának kell megfelelnie`;return`Érvénytelen ${U[g.format]??u.format}`}case"not_multiple_of":return`Érvénytelen szám: ${u.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${u.keys.length>1?"s":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${u.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${u.origin}`;default:return"Érvénytelen bemenet"}}};function yJ(){return{localeError:gb()}}function a5($,I,U){return Math.abs($)===1?I:U}function n1($){if(!$)return"";let I=["ա","ե","ը","ի","ո","ու","օ"],U=$[$.length-1];return $+(I.includes(U)?"ն":"ը")}var zb=()=>{let $={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function I(u){return $[u]??null}let U={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},_={nan:"NaN",number:"թիվ",array:"զանգված"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Սխալ մուտքագրում․ սպասվում էր instanceof ${u.expected}, ստացվել է ${v}`;return`Սխալ մուտքագրում․ սպասվում էր ${g}, ստացվել է ${v}`}case"invalid_value":if(u.values.length===1)return`Սխալ մուտքագրում․ սպասվում էր ${j(u.values[1])}`;return`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z){let v=Number(u.maximum),J=a5(v,z.unit.one,z.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${n1(u.origin??"արժեք")} կունենա ${g}${u.maximum.toString()} ${J}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${n1(u.origin??"արժեք")} լինի ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z){let v=Number(u.minimum),J=a5(v,z.unit.one,z.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${n1(u.origin)} կունենա ${g}${u.minimum.toString()} ${J}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${n1(u.origin)} լինի ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Սխալ տող․ պետք է սկսվի "${g.prefix}"-ով`;if(g.format==="ends_with")return`Սխալ տող․ պետք է ավարտվի "${g.suffix}"-ով`;if(g.format==="includes")return`Սխալ տող․ պետք է պարունակի "${g.includes}"`;if(g.format==="regex")return`Սխալ տող․ պետք է համապատասխանի ${g.pattern} ձևաչափին`;return`Սխալ ${U[g.format]??u.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${u.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${u.keys.length>1?"ներ":""}. ${W(u.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${n1(u.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${n1(u.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};function iJ(){return{localeError:zb()}}var vb=()=>{let $={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function I(u){return $[u]??null}let U={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Input tidak valid: diharapkan instanceof ${u.expected}, diterima ${v}`;return`Input tidak valid: diharapkan ${g}, diterima ${v}`}case"invalid_value":if(u.values.length===1)return`Input tidak valid: diharapkan ${j(u.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Terlalu besar: diharapkan ${u.origin??"value"} memiliki ${g}${u.maximum.toString()} ${z.unit??"elemen"}`;return`Terlalu besar: diharapkan ${u.origin??"value"} menjadi ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Terlalu kecil: diharapkan ${u.origin} memiliki ${g}${u.minimum.toString()} ${z.unit}`;return`Terlalu kecil: diharapkan ${u.origin} menjadi ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`String tidak valid: harus dimulai dengan "${g.prefix}"`;if(g.format==="ends_with")return`String tidak valid: harus berakhir dengan "${g.suffix}"`;if(g.format==="includes")return`String tidak valid: harus menyertakan "${g.includes}"`;if(g.format==="regex")return`String tidak valid: harus sesuai pola ${g.pattern}`;return`${U[g.format]??u.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${u.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${u.keys.length>1?"s":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${u.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${u.origin}`;default:return"Input tidak valid"}}};function nJ(){return{localeError:vb()}}var Jb=()=>{let $={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function I(u){return $[u]??null}let U={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"},_={nan:"NaN",number:"númer",array:"fylki"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Rangt gildi: Þú slóst inn ${v} þar sem á að vera instanceof ${u.expected}`;return`Rangt gildi: Þú slóst inn ${v} þar sem á að vera ${g}`}case"invalid_value":if(u.values.length===1)return`Rangt gildi: gert ráð fyrir ${j(u.values[0])}`;return`Ógilt val: má vera eitt af eftirfarandi ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Of stórt: gert er ráð fyrir að ${u.origin??"gildi"} hafi ${g}${u.maximum.toString()} ${z.unit??"hluti"}`;return`Of stórt: gert er ráð fyrir að ${u.origin??"gildi"} sé ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Of lítið: gert er ráð fyrir að ${u.origin} hafi ${g}${u.minimum.toString()} ${z.unit}`;return`Of lítið: gert er ráð fyrir að ${u.origin} sé ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Ógildur strengur: verður að byrja á "${g.prefix}"`;if(g.format==="ends_with")return`Ógildur strengur: verður að enda á "${g.suffix}"`;if(g.format==="includes")return`Ógildur strengur: verður að innihalda "${g.includes}"`;if(g.format==="regex")return`Ógildur strengur: verður að fylgja mynstri ${g.pattern}`;return`Rangt ${U[g.format]??u.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${u.divisor}`;case"unrecognized_keys":return`Óþekkt ${u.keys.length>1?"ir lyklar":"ur lykill"}: ${W(u.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${u.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${u.origin}`;default:return"Rangt gildi"}}};function rJ(){return{localeError:Jb()}}var Nb=()=>{let $={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function I(u){return $[u]??null}let U={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},_={nan:"NaN",number:"numero",array:"vettore"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Input non valido: atteso instanceof ${u.expected}, ricevuto ${v}`;return`Input non valido: atteso ${g}, ricevuto ${v}`}case"invalid_value":if(u.values.length===1)return`Input non valido: atteso ${j(u.values[0])}`;return`Opzione non valida: atteso uno tra ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Troppo grande: ${u.origin??"valore"} deve avere ${g}${u.maximum.toString()} ${z.unit??"elementi"}`;return`Troppo grande: ${u.origin??"valore"} deve essere ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Troppo piccolo: ${u.origin} deve avere ${g}${u.minimum.toString()} ${z.unit}`;return`Troppo piccolo: ${u.origin} deve essere ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Stringa non valida: deve iniziare con "${g.prefix}"`;if(g.format==="ends_with")return`Stringa non valida: deve terminare con "${g.suffix}"`;if(g.format==="includes")return`Stringa non valida: deve includere "${g.includes}"`;if(g.format==="regex")return`Stringa non valida: deve corrispondere al pattern ${g.pattern}`;return`Invalid ${U[g.format]??u.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${u.divisor}`;case"unrecognized_keys":return`Chiav${u.keys.length>1?"i":"e"} non riconosciut${u.keys.length>1?"e":"a"}: ${W(u.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${u.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${u.origin}`;default:return"Input non valido"}}};function lJ(){return{localeError:Nb()}}var Gb=()=>{let $={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function I(u){return $[u]??null}let U={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},_={nan:"NaN",number:"数値",array:"配列"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`無効な入力: instanceof ${u.expected}が期待されましたが、${v}が入力されました`;return`無効な入力: ${g}が期待されましたが、${v}が入力されました`}case"invalid_value":if(u.values.length===1)return`無効な入力: ${j(u.values[0])}が期待されました`;return`無効な選択: ${W(u.values,"、")}のいずれかである必要があります`;case"too_big":{let g=u.inclusive?"以下である":"より小さい",z=I(u.origin);if(z)return`大きすぎる値: ${u.origin??"値"}は${u.maximum.toString()}${z.unit??"要素"}${g}必要があります`;return`大きすぎる値: ${u.origin??"値"}は${u.maximum.toString()}${g}必要があります`}case"too_small":{let g=u.inclusive?"以上である":"より大きい",z=I(u.origin);if(z)return`小さすぎる値: ${u.origin}は${u.minimum.toString()}${z.unit}${g}必要があります`;return`小さすぎる値: ${u.origin}は${u.minimum.toString()}${g}必要があります`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`無効な文字列: "${g.prefix}"で始まる必要があります`;if(g.format==="ends_with")return`無効な文字列: "${g.suffix}"で終わる必要があります`;if(g.format==="includes")return`無効な文字列: "${g.includes}"を含む必要があります`;if(g.format==="regex")return`無効な文字列: パターン${g.pattern}に一致する必要があります`;return`無効な${U[g.format]??u.format}`}case"not_multiple_of":return`無効な数値: ${u.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${u.keys.length>1?"群":""}: ${W(u.keys,"、")}`;case"invalid_key":return`${u.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${u.origin}内の無効な値`;default:return"無効な入力"}}};function mJ(){return{localeError:Gb()}}var Xb=()=>{let $={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function I(u){return $[u]??null}let U={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},_={nan:"NaN",number:"რიცხვი",string:"სტრინგი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`არასწორი შეყვანა: მოსალოდნელი instanceof ${u.expected}, მიღებული ${v}`;return`არასწორი შეყვანა: მოსალოდნელი ${g}, მიღებული ${v}`}case"invalid_value":if(u.values.length===1)return`არასწორი შეყვანა: მოსალოდნელი ${j(u.values[0])}`;return`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${W(u.values,"|")}-დან`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`ზედმეტად დიდი: მოსალოდნელი ${u.origin??"მნიშვნელობა"} ${z.verb} ${g}${u.maximum.toString()} ${z.unit}`;return`ზედმეტად დიდი: მოსალოდნელი ${u.origin??"მნიშვნელობა"} იყოს ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`ზედმეტად პატარა: მოსალოდნელი ${u.origin} ${z.verb} ${g}${u.minimum.toString()} ${z.unit}`;return`ზედმეტად პატარა: მოსალოდნელი ${u.origin} იყოს ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`არასწორი სტრინგი: უნდა იწყებოდეს "${g.prefix}"-ით`;if(g.format==="ends_with")return`არასწორი სტრინგი: უნდა მთავრდებოდეს "${g.suffix}"-ით`;if(g.format==="includes")return`არასწორი სტრინგი: უნდა შეიცავდეს "${g.includes}"-ს`;if(g.format==="regex")return`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${g.pattern}`;return`არასწორი ${U[g.format]??u.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${u.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${u.keys.length>1?"ები":"ი"}: ${W(u.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${u.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${u.origin}-ში`;default:return"არასწორი შეყვანა"}}};function hJ(){return{localeError:Xb()}}var qb=()=>{let $={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function I(u){return $[u]??null}let U={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},_={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${u.expected} ប៉ុន្តែទទួលបាន ${v}`;return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${g} ប៉ុន្តែទទួលបាន ${v}`}case"invalid_value":if(u.values.length===1)return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${j(u.values[0])}`;return`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`ធំពេក៖ ត្រូវការ ${u.origin??"តម្លៃ"} ${g} ${u.maximum.toString()} ${z.unit??"ធាតុ"}`;return`ធំពេក៖ ត្រូវការ ${u.origin??"តម្លៃ"} ${g} ${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`តូចពេក៖ ត្រូវការ ${u.origin} ${g} ${u.minimum.toString()} ${z.unit}`;return`តូចពេក៖ ត្រូវការ ${u.origin} ${g} ${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${g.prefix}"`;if(g.format==="ends_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${g.suffix}"`;if(g.format==="includes")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${g.includes}"`;if(g.format==="regex")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${g.pattern}`;return`មិនត្រឹមត្រូវ៖ ${U[g.format]??u.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${u.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${W(u.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${u.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${u.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function Q0(){return{localeError:qb()}}function cJ(){return Q0()}var Qb=()=>{let $={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function I(u){return $[u]??null}let U={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`잘못된 입력: 예상 타입은 instanceof ${u.expected}, 받은 타입은 ${v}입니다`;return`잘못된 입력: 예상 타입은 ${g}, 받은 타입은 ${v}입니다`}case"invalid_value":if(u.values.length===1)return`잘못된 입력: 값은 ${j(u.values[0])} 이어야 합니다`;return`잘못된 옵션: ${W(u.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let g=u.inclusive?"이하":"미만",z=g==="미만"?"이어야 합니다":"여야 합니다",v=I(u.origin),J=v?.unit??"요소";if(v)return`${u.origin??"값"}이 너무 큽니다: ${u.maximum.toString()}${J} ${g}${z}`;return`${u.origin??"값"}이 너무 큽니다: ${u.maximum.toString()} ${g}${z}`}case"too_small":{let g=u.inclusive?"이상":"초과",z=g==="이상"?"이어야 합니다":"여야 합니다",v=I(u.origin),J=v?.unit??"요소";if(v)return`${u.origin??"값"}이 너무 작습니다: ${u.minimum.toString()}${J} ${g}${z}`;return`${u.origin??"값"}이 너무 작습니다: ${u.minimum.toString()} ${g}${z}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`잘못된 문자열: "${g.prefix}"(으)로 시작해야 합니다`;if(g.format==="ends_with")return`잘못된 문자열: "${g.suffix}"(으)로 끝나야 합니다`;if(g.format==="includes")return`잘못된 문자열: "${g.includes}"을(를) 포함해야 합니다`;if(g.format==="regex")return`잘못된 문자열: 정규식 ${g.pattern} 패턴과 일치해야 합니다`;return`잘못된 ${U[g.format]??u.format}`}case"not_multiple_of":return`잘못된 숫자: ${u.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${W(u.keys,", ")}`;case"invalid_key":return`잘못된 키: ${u.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${u.origin}`;default:return"잘못된 입력"}}};function dJ(){return{localeError:Qb()}}var T0=($)=>{return $.charAt(0).toUpperCase()+$.slice(1)};function e5($){let I=Math.abs($),U=I%10,_=I%100;if(_>=11&&_<=19||U===0)return"many";if(U===1)return"one";return"few"}var Tb=()=>{let $={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function I(u,g,z,v){let J=$[u]??null;if(J===null)return J;return{unit:J.unit[g],verb:J.verb[v][z?"inclusive":"notInclusive"]}}let U={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},_={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Gautas tipas ${v}, o tikėtasi - instanceof ${u.expected}`;return`Gautas tipas ${v}, o tikėtasi - ${g}`}case"invalid_value":if(u.values.length===1)return`Privalo būti ${j(u.values[0])}`;return`Privalo būti vienas iš ${W(u.values,"|")} pasirinkimų`;case"too_big":{let g=_[u.origin]??u.origin,z=I(u.origin,e5(Number(u.maximum)),u.inclusive??!1,"smaller");if(z?.verb)return`${T0(g??u.origin??"reikšmė")} ${z.verb} ${u.maximum.toString()} ${z.unit??"elementų"}`;let v=u.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${T0(g??u.origin??"reikšmė")} turi būti ${v} ${u.maximum.toString()} ${z?.unit}`}case"too_small":{let g=_[u.origin]??u.origin,z=I(u.origin,e5(Number(u.minimum)),u.inclusive??!1,"bigger");if(z?.verb)return`${T0(g??u.origin??"reikšmė")} ${z.verb} ${u.minimum.toString()} ${z.unit??"elementų"}`;let v=u.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${T0(g??u.origin??"reikšmė")} turi būti ${v} ${u.minimum.toString()} ${z?.unit}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Eilutė privalo prasidėti "${g.prefix}"`;if(g.format==="ends_with")return`Eilutė privalo pasibaigti "${g.suffix}"`;if(g.format==="includes")return`Eilutė privalo įtraukti "${g.includes}"`;if(g.format==="regex")return`Eilutė privalo atitikti ${g.pattern}`;return`Neteisingas ${U[g.format]??u.format}`}case"not_multiple_of":return`Skaičius privalo būti ${u.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${u.keys.length>1?"i":"as"} rakt${u.keys.length>1?"ai":"as"}: ${W(u.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{let g=_[u.origin]??u.origin;return`${T0(g??u.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function pJ(){return{localeError:Tb()}}var Hb=()=>{let $={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function I(u){return $[u]??null}let U={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},_={nan:"NaN",number:"број",array:"низа"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Грешен внес: се очекува instanceof ${u.expected}, примено ${v}`;return`Грешен внес: се очекува ${g}, примено ${v}`}case"invalid_value":if(u.values.length===1)return`Invalid input: expected ${j(u.values[0])}`;return`Грешана опција: се очекува една ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Премногу голем: се очекува ${u.origin??"вредноста"} да има ${g}${u.maximum.toString()} ${z.unit??"елементи"}`;return`Премногу голем: се очекува ${u.origin??"вредноста"} да биде ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Премногу мал: се очекува ${u.origin} да има ${g}${u.minimum.toString()} ${z.unit}`;return`Премногу мал: се очекува ${u.origin} да биде ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Неважечка низа: мора да започнува со "${g.prefix}"`;if(g.format==="ends_with")return`Неважечка низа: мора да завршува со "${g.suffix}"`;if(g.format==="includes")return`Неважечка низа: мора да вклучува "${g.includes}"`;if(g.format==="regex")return`Неважечка низа: мора да одгоара на патернот ${g.pattern}`;return`Invalid ${U[g.format]??u.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${W(u.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${u.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${u.origin}`;default:return"Грешен внес"}}};function oJ(){return{localeError:Hb()}}var Yb=()=>{let $={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function I(u){return $[u]??null}let U={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},_={nan:"NaN",number:"nombor"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Input tidak sah: dijangka instanceof ${u.expected}, diterima ${v}`;return`Input tidak sah: dijangka ${g}, diterima ${v}`}case"invalid_value":if(u.values.length===1)return`Input tidak sah: dijangka ${j(u.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Terlalu besar: dijangka ${u.origin??"nilai"} ${z.verb} ${g}${u.maximum.toString()} ${z.unit??"elemen"}`;return`Terlalu besar: dijangka ${u.origin??"nilai"} adalah ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Terlalu kecil: dijangka ${u.origin} ${z.verb} ${g}${u.minimum.toString()} ${z.unit}`;return`Terlalu kecil: dijangka ${u.origin} adalah ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`String tidak sah: mesti bermula dengan "${g.prefix}"`;if(g.format==="ends_with")return`String tidak sah: mesti berakhir dengan "${g.suffix}"`;if(g.format==="includes")return`String tidak sah: mesti mengandungi "${g.includes}"`;if(g.format==="regex")return`String tidak sah: mesti sepadan dengan corak ${g.pattern}`;return`${U[g.format]??u.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${u.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${W(u.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${u.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${u.origin}`;default:return"Input tidak sah"}}};function tJ(){return{localeError:Yb()}}var Ob=()=>{let $={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function I(u){return $[u]??null}let U={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},_={nan:"NaN",number:"getal"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Ongeldige invoer: verwacht instanceof ${u.expected}, ontving ${v}`;return`Ongeldige invoer: verwacht ${g}, ontving ${v}`}case"invalid_value":if(u.values.length===1)return`Ongeldige invoer: verwacht ${j(u.values[0])}`;return`Ongeldige optie: verwacht één van ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin),v=u.origin==="date"?"laat":u.origin==="string"?"lang":"groot";if(z)return`Te ${v}: verwacht dat ${u.origin??"waarde"} ${g}${u.maximum.toString()} ${z.unit??"elementen"} ${z.verb}`;return`Te ${v}: verwacht dat ${u.origin??"waarde"} ${g}${u.maximum.toString()} is`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin),v=u.origin==="date"?"vroeg":u.origin==="string"?"kort":"klein";if(z)return`Te ${v}: verwacht dat ${u.origin} ${g}${u.minimum.toString()} ${z.unit} ${z.verb}`;return`Te ${v}: verwacht dat ${u.origin} ${g}${u.minimum.toString()} is`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Ongeldige tekst: moet met "${g.prefix}" beginnen`;if(g.format==="ends_with")return`Ongeldige tekst: moet op "${g.suffix}" eindigen`;if(g.format==="includes")return`Ongeldige tekst: moet "${g.includes}" bevatten`;if(g.format==="regex")return`Ongeldige tekst: moet overeenkomen met patroon ${g.pattern}`;return`Ongeldig: ${U[g.format]??u.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${u.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${u.keys.length>1?"s":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${u.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${u.origin}`;default:return"Ongeldige invoer"}}};function aJ(){return{localeError:Ob()}}var Vb=()=>{let $={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function I(u){return $[u]??null}let U={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},_={nan:"NaN",number:"tall",array:"liste"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Ugyldig input: forventet instanceof ${u.expected}, fikk ${v}`;return`Ugyldig input: forventet ${g}, fikk ${v}`}case"invalid_value":if(u.values.length===1)return`Ugyldig verdi: forventet ${j(u.values[0])}`;return`Ugyldig valg: forventet en av ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`For stor(t): forventet ${u.origin??"value"} til å ha ${g}${u.maximum.toString()} ${z.unit??"elementer"}`;return`For stor(t): forventet ${u.origin??"value"} til å ha ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`For lite(n): forventet ${u.origin} til å ha ${g}${u.minimum.toString()} ${z.unit}`;return`For lite(n): forventet ${u.origin} til å ha ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Ugyldig streng: må starte med "${g.prefix}"`;if(g.format==="ends_with")return`Ugyldig streng: må ende med "${g.suffix}"`;if(g.format==="includes")return`Ugyldig streng: må inneholde "${g.includes}"`;if(g.format==="regex")return`Ugyldig streng: må matche mønsteret ${g.pattern}`;return`Ugyldig ${U[g.format]??u.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${W(u.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${u.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${u.origin}`;default:return"Ugyldig input"}}};function eJ(){return{localeError:Vb()}}var Bb=()=>{let $={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function I(u){return $[u]??null}let U={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},_={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Fâsit giren: umulan instanceof ${u.expected}, alınan ${v}`;return`Fâsit giren: umulan ${g}, alınan ${v}`}case"invalid_value":if(u.values.length===1)return`Fâsit giren: umulan ${j(u.values[0])}`;return`Fâsit tercih: mûteberler ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Fazla büyük: ${u.origin??"value"}, ${g}${u.maximum.toString()} ${z.unit??"elements"} sahip olmalıydı.`;return`Fazla büyük: ${u.origin??"value"}, ${g}${u.maximum.toString()} olmalıydı.`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Fazla küçük: ${u.origin}, ${g}${u.minimum.toString()} ${z.unit} sahip olmalıydı.`;return`Fazla küçük: ${u.origin}, ${g}${u.minimum.toString()} olmalıydı.`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Fâsit metin: "${g.prefix}" ile başlamalı.`;if(g.format==="ends_with")return`Fâsit metin: "${g.suffix}" ile bitmeli.`;if(g.format==="includes")return`Fâsit metin: "${g.includes}" ihtivâ etmeli.`;if(g.format==="regex")return`Fâsit metin: ${g.pattern} nakşına uymalı.`;return`Fâsit ${U[g.format]??u.format}`}case"not_multiple_of":return`Fâsit sayı: ${u.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${u.keys.length>1?"s":""}: ${W(u.keys,", ")}`;case"invalid_key":return`${u.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${u.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function sJ(){return{localeError:Bb()}}var Db=()=>{let $={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function I(u){return $[u]??null}let U={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},_={nan:"NaN",number:"عدد",array:"ارې"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`ناسم ورودي: باید instanceof ${u.expected} وای, مګر ${v} ترلاسه شو`;return`ناسم ورودي: باید ${g} وای, مګر ${v} ترلاسه شو`}case"invalid_value":if(u.values.length===1)return`ناسم ورودي: باید ${j(u.values[0])} وای`;return`ناسم انتخاب: باید یو له ${W(u.values,"|")} څخه وای`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`ډیر لوی: ${u.origin??"ارزښت"} باید ${g}${u.maximum.toString()} ${z.unit??"عنصرونه"} ولري`;return`ډیر لوی: ${u.origin??"ارزښت"} باید ${g}${u.maximum.toString()} وي`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`ډیر کوچنی: ${u.origin} باید ${g}${u.minimum.toString()} ${z.unit} ولري`;return`ډیر کوچنی: ${u.origin} باید ${g}${u.minimum.toString()} وي`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`ناسم متن: باید د "${g.prefix}" سره پیل شي`;if(g.format==="ends_with")return`ناسم متن: باید د "${g.suffix}" سره پای ته ورسيږي`;if(g.format==="includes")return`ناسم متن: باید "${g.includes}" ولري`;if(g.format==="regex")return`ناسم متن: باید د ${g.pattern} سره مطابقت ولري`;return`${U[g.format]??u.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${u.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${u.keys.length>1?"کلیډونه":"کلیډ"}: ${W(u.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${u.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${u.origin} کې`;default:return"ناسمه ورودي"}}};function $N(){return{localeError:Db()}}var Mb=()=>{let $={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function I(u){return $[u]??null}let U={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},_={nan:"NaN",number:"liczba",array:"tablica"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${u.expected}, otrzymano ${v}`;return`Nieprawidłowe dane wejściowe: oczekiwano ${g}, otrzymano ${v}`}case"invalid_value":if(u.values.length===1)return`Nieprawidłowe dane wejściowe: oczekiwano ${j(u.values[0])}`;return`Nieprawidłowa opcja: oczekiwano jednej z wartości ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Za duża wartość: oczekiwano, że ${u.origin??"wartość"} będzie mieć ${g}${u.maximum.toString()} ${z.unit??"elementów"}`;return`Zbyt duż(y/a/e): oczekiwano, że ${u.origin??"wartość"} będzie wynosić ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Za mała wartość: oczekiwano, że ${u.origin??"wartość"} będzie mieć ${g}${u.minimum.toString()} ${z.unit??"elementów"}`;return`Zbyt mał(y/a/e): oczekiwano, że ${u.origin??"wartość"} będzie wynosić ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Nieprawidłowy ciąg znaków: musi zaczynać się od "${g.prefix}"`;if(g.format==="ends_with")return`Nieprawidłowy ciąg znaków: musi kończyć się na "${g.suffix}"`;if(g.format==="includes")return`Nieprawidłowy ciąg znaków: musi zawierać "${g.includes}"`;if(g.format==="regex")return`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${g.pattern}`;return`Nieprawidłow(y/a/e) ${U[g.format]??u.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${u.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${u.keys.length>1?"s":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${u.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${u.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function IN(){return{localeError:Mb()}}var Kb=()=>{let $={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function I(u){return $[u]??null}let U={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},_={nan:"NaN",number:"número",null:"nulo"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Tipo inválido: esperado instanceof ${u.expected}, recebido ${v}`;return`Tipo inválido: esperado ${g}, recebido ${v}`}case"invalid_value":if(u.values.length===1)return`Entrada inválida: esperado ${j(u.values[0])}`;return`Opção inválida: esperada uma das ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Muito grande: esperado que ${u.origin??"valor"} tivesse ${g}${u.maximum.toString()} ${z.unit??"elementos"}`;return`Muito grande: esperado que ${u.origin??"valor"} fosse ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Muito pequeno: esperado que ${u.origin} tivesse ${g}${u.minimum.toString()} ${z.unit}`;return`Muito pequeno: esperado que ${u.origin} fosse ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Texto inválido: deve começar com "${g.prefix}"`;if(g.format==="ends_with")return`Texto inválido: deve terminar com "${g.suffix}"`;if(g.format==="includes")return`Texto inválido: deve incluir "${g.includes}"`;if(g.format==="regex")return`Texto inválido: deve corresponder ao padrão ${g.pattern}`;return`${U[g.format]??u.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${u.divisor}`;case"unrecognized_keys":return`Chave${u.keys.length>1?"s":""} desconhecida${u.keys.length>1?"s":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Chave inválida em ${u.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${u.origin}`;default:return"Campo inválido"}}};function uN(){return{localeError:Kb()}}function s5($,I,U,_){let u=Math.abs($),g=u%10,z=u%100;if(z>=11&&z<=19)return _;if(g===1)return I;if(g>=2&&g<=4)return U;return _}var Lb=()=>{let $={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function I(u){return $[u]??null}let U={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},_={nan:"NaN",number:"число",array:"массив"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Неверный ввод: ожидалось instanceof ${u.expected}, получено ${v}`;return`Неверный ввод: ожидалось ${g}, получено ${v}`}case"invalid_value":if(u.values.length===1)return`Неверный ввод: ожидалось ${j(u.values[0])}`;return`Неверный вариант: ожидалось одно из ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z){let v=Number(u.maximum),J=s5(v,z.unit.one,z.unit.few,z.unit.many);return`Слишком большое значение: ожидалось, что ${u.origin??"значение"} будет иметь ${g}${u.maximum.toString()} ${J}`}return`Слишком большое значение: ожидалось, что ${u.origin??"значение"} будет ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z){let v=Number(u.minimum),J=s5(v,z.unit.one,z.unit.few,z.unit.many);return`Слишком маленькое значение: ожидалось, что ${u.origin} будет иметь ${g}${u.minimum.toString()} ${J}`}return`Слишком маленькое значение: ожидалось, что ${u.origin} будет ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Неверная строка: должна начинаться с "${g.prefix}"`;if(g.format==="ends_with")return`Неверная строка: должна заканчиваться на "${g.suffix}"`;if(g.format==="includes")return`Неверная строка: должна содержать "${g.includes}"`;if(g.format==="regex")return`Неверная строка: должна соответствовать шаблону ${g.pattern}`;return`Неверный ${U[g.format]??u.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${u.divisor}`;case"unrecognized_keys":return`Нераспознанн${u.keys.length>1?"ые":"ый"} ключ${u.keys.length>1?"и":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${u.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${u.origin}`;default:return"Неверные входные данные"}}};function UN(){return{localeError:Lb()}}var Rb=()=>{let $={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function I(u){return $[u]??null}let U={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"},_={nan:"NaN",number:"število",array:"tabela"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Neveljaven vnos: pričakovano instanceof ${u.expected}, prejeto ${v}`;return`Neveljaven vnos: pričakovano ${g}, prejeto ${v}`}case"invalid_value":if(u.values.length===1)return`Neveljaven vnos: pričakovano ${j(u.values[0])}`;return`Neveljavna možnost: pričakovano eno izmed ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Preveliko: pričakovano, da bo ${u.origin??"vrednost"} imelo ${g}${u.maximum.toString()} ${z.unit??"elementov"}`;return`Preveliko: pričakovano, da bo ${u.origin??"vrednost"} ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Premajhno: pričakovano, da bo ${u.origin} imelo ${g}${u.minimum.toString()} ${z.unit}`;return`Premajhno: pričakovano, da bo ${u.origin} ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Neveljaven niz: mora se začeti z "${g.prefix}"`;if(g.format==="ends_with")return`Neveljaven niz: mora se končati z "${g.suffix}"`;if(g.format==="includes")return`Neveljaven niz: mora vsebovati "${g.includes}"`;if(g.format==="regex")return`Neveljaven niz: mora ustrezati vzorcu ${g.pattern}`;return`Neveljaven ${U[g.format]??u.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${u.divisor}`;case"unrecognized_keys":return`Neprepoznan${u.keys.length>1?"i ključi":" ključ"}: ${W(u.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${u.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${u.origin}`;default:return"Neveljaven vnos"}}};function _N(){return{localeError:Rb()}}var Wb=()=>{let $={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function I(u){return $[u]??null}let U={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},_={nan:"NaN",number:"antal",array:"lista"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Ogiltig inmatning: förväntat instanceof ${u.expected}, fick ${v}`;return`Ogiltig inmatning: förväntat ${g}, fick ${v}`}case"invalid_value":if(u.values.length===1)return`Ogiltig inmatning: förväntat ${j(u.values[0])}`;return`Ogiltigt val: förväntade en av ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`För stor(t): förväntade ${u.origin??"värdet"} att ha ${g}${u.maximum.toString()} ${z.unit??"element"}`;return`För stor(t): förväntat ${u.origin??"värdet"} att ha ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`För lite(t): förväntade ${u.origin??"värdet"} att ha ${g}${u.minimum.toString()} ${z.unit}`;return`För lite(t): förväntade ${u.origin??"värdet"} att ha ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Ogiltig sträng: måste börja med "${g.prefix}"`;if(g.format==="ends_with")return`Ogiltig sträng: måste sluta med "${g.suffix}"`;if(g.format==="includes")return`Ogiltig sträng: måste innehålla "${g.includes}"`;if(g.format==="regex")return`Ogiltig sträng: måste matcha mönstret "${g.pattern}"`;return`Ogiltig(t) ${U[g.format]??u.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${W(u.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${u.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${u.origin??"värdet"}`;default:return"Ogiltig input"}}};function gN(){return{localeError:Wb()}}var Pb=()=>{let $={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function I(u){return $[u]??null}let U={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},_={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${u.expected}, பெறப்பட்டது ${v}`;return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${g}, பெறப்பட்டது ${v}`}case"invalid_value":if(u.values.length===1)return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${j(u.values[0])}`;return`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${W(u.values,"|")} இல் ஒன்று`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${u.origin??"மதிப்பு"} ${g}${u.maximum.toString()} ${z.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`;return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${u.origin??"மதிப்பு"} ${g}${u.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${u.origin} ${g}${u.minimum.toString()} ${z.unit} ஆக இருக்க வேண்டும்`;return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${u.origin} ${g}${u.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`தவறான சரம்: "${g.prefix}" இல் தொடங்க வேண்டும்`;if(g.format==="ends_with")return`தவறான சரம்: "${g.suffix}" இல் முடிவடைய வேண்டும்`;if(g.format==="includes")return`தவறான சரம்: "${g.includes}" ஐ உள்ளடக்க வேண்டும்`;if(g.format==="regex")return`தவறான சரம்: ${g.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;return`தவறான ${U[g.format]??u.format}`}case"not_multiple_of":return`தவறான எண்: ${u.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${u.keys.length>1?"கள்":""}: ${W(u.keys,", ")}`;case"invalid_key":return`${u.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${u.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function zN(){return{localeError:Pb()}}var Zb=()=>{let $={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function I(u){return $[u]??null}let U={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},_={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${u.expected} แต่ได้รับ ${v}`;return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${g} แต่ได้รับ ${v}`}case"invalid_value":if(u.values.length===1)return`ค่าไม่ถูกต้อง: ควรเป็น ${j(u.values[0])}`;return`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"ไม่เกิน":"น้อยกว่า",z=I(u.origin);if(z)return`เกินกำหนด: ${u.origin??"ค่า"} ควรมี${g} ${u.maximum.toString()} ${z.unit??"รายการ"}`;return`เกินกำหนด: ${u.origin??"ค่า"} ควรมี${g} ${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?"อย่างน้อย":"มากกว่า",z=I(u.origin);if(z)return`น้อยกว่ากำหนด: ${u.origin} ควรมี${g} ${u.minimum.toString()} ${z.unit}`;return`น้อยกว่ากำหนด: ${u.origin} ควรมี${g} ${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${g.prefix}"`;if(g.format==="ends_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${g.suffix}"`;if(g.format==="includes")return`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${g.includes}" อยู่ในข้อความ`;if(g.format==="regex")return`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${g.pattern}`;return`รูปแบบไม่ถูกต้อง: ${U[g.format]??u.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${u.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${W(u.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${u.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${u.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function vN(){return{localeError:Zb()}}var Ab=()=>{let $={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function I(u){return $[u]??null}let U={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Geçersiz değer: beklenen instanceof ${u.expected}, alınan ${v}`;return`Geçersiz değer: beklenen ${g}, alınan ${v}`}case"invalid_value":if(u.values.length===1)return`Geçersiz değer: beklenen ${j(u.values[0])}`;return`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Çok büyük: beklenen ${u.origin??"değer"} ${g}${u.maximum.toString()} ${z.unit??"öğe"}`;return`Çok büyük: beklenen ${u.origin??"değer"} ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Çok küçük: beklenen ${u.origin} ${g}${u.minimum.toString()} ${z.unit}`;return`Çok küçük: beklenen ${u.origin} ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Geçersiz metin: "${g.prefix}" ile başlamalı`;if(g.format==="ends_with")return`Geçersiz metin: "${g.suffix}" ile bitmeli`;if(g.format==="includes")return`Geçersiz metin: "${g.includes}" içermeli`;if(g.format==="regex")return`Geçersiz metin: ${g.pattern} desenine uymalı`;return`Geçersiz ${U[g.format]??u.format}`}case"not_multiple_of":return`Geçersiz sayı: ${u.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${u.keys.length>1?"lar":""}: ${W(u.keys,", ")}`;case"invalid_key":return`${u.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${u.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function JN(){return{localeError:Ab()}}var bb=()=>{let $={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function I(u){return $[u]??null}let U={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},_={nan:"NaN",number:"число",array:"масив"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Неправильні вхідні дані: очікується instanceof ${u.expected}, отримано ${v}`;return`Неправильні вхідні дані: очікується ${g}, отримано ${v}`}case"invalid_value":if(u.values.length===1)return`Неправильні вхідні дані: очікується ${j(u.values[0])}`;return`Неправильна опція: очікується одне з ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Занадто велике: очікується, що ${u.origin??"значення"} ${z.verb} ${g}${u.maximum.toString()} ${z.unit??"елементів"}`;return`Занадто велике: очікується, що ${u.origin??"значення"} буде ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Занадто мале: очікується, що ${u.origin} ${z.verb} ${g}${u.minimum.toString()} ${z.unit}`;return`Занадто мале: очікується, що ${u.origin} буде ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Неправильний рядок: повинен починатися з "${g.prefix}"`;if(g.format==="ends_with")return`Неправильний рядок: повинен закінчуватися на "${g.suffix}"`;if(g.format==="includes")return`Неправильний рядок: повинен містити "${g.includes}"`;if(g.format==="regex")return`Неправильний рядок: повинен відповідати шаблону ${g.pattern}`;return`Неправильний ${U[g.format]??u.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${u.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${u.keys.length>1?"і":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${u.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${u.origin}`;default:return"Неправильні вхідні дані"}}};function H0(){return{localeError:bb()}}function NN(){return H0()}var jb=()=>{let $={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function I(u){return $[u]??null}let U={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},_={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`غلط ان پٹ: instanceof ${u.expected} متوقع تھا، ${v} موصول ہوا`;return`غلط ان پٹ: ${g} متوقع تھا، ${v} موصول ہوا`}case"invalid_value":if(u.values.length===1)return`غلط ان پٹ: ${j(u.values[0])} متوقع تھا`;return`غلط آپشن: ${W(u.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`بہت بڑا: ${u.origin??"ویلیو"} کے ${g}${u.maximum.toString()} ${z.unit??"عناصر"} ہونے متوقع تھے`;return`بہت بڑا: ${u.origin??"ویلیو"} کا ${g}${u.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`بہت چھوٹا: ${u.origin} کے ${g}${u.minimum.toString()} ${z.unit} ہونے متوقع تھے`;return`بہت چھوٹا: ${u.origin} کا ${g}${u.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`غلط سٹرنگ: "${g.prefix}" سے شروع ہونا چاہیے`;if(g.format==="ends_with")return`غلط سٹرنگ: "${g.suffix}" پر ختم ہونا چاہیے`;if(g.format==="includes")return`غلط سٹرنگ: "${g.includes}" شامل ہونا چاہیے`;if(g.format==="regex")return`غلط سٹرنگ: پیٹرن ${g.pattern} سے میچ ہونا چاہیے`;return`غلط ${U[g.format]??u.format}`}case"not_multiple_of":return`غلط نمبر: ${u.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${u.keys.length>1?"ز":""}: ${W(u.keys,"، ")}`;case"invalid_key":return`${u.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${u.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function GN(){return{localeError:jb()}}var Fb=()=>{let $={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"}};function I(u){return $[u]??null}let U={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},_={nan:"NaN",number:"raqam",array:"massiv"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Noto‘g‘ri kirish: kutilgan instanceof ${u.expected}, qabul qilingan ${v}`;return`Noto‘g‘ri kirish: kutilgan ${g}, qabul qilingan ${v}`}case"invalid_value":if(u.values.length===1)return`Noto‘g‘ri kirish: kutilgan ${j(u.values[0])}`;return`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Juda katta: kutilgan ${u.origin??"qiymat"} ${g}${u.maximum.toString()} ${z.unit} ${z.verb}`;return`Juda katta: kutilgan ${u.origin??"qiymat"} ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Juda kichik: kutilgan ${u.origin} ${g}${u.minimum.toString()} ${z.unit} ${z.verb}`;return`Juda kichik: kutilgan ${u.origin} ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Noto‘g‘ri satr: "${g.prefix}" bilan boshlanishi kerak`;if(g.format==="ends_with")return`Noto‘g‘ri satr: "${g.suffix}" bilan tugashi kerak`;if(g.format==="includes")return`Noto‘g‘ri satr: "${g.includes}" ni o‘z ichiga olishi kerak`;if(g.format==="regex")return`Noto‘g‘ri satr: ${g.pattern} shabloniga mos kelishi kerak`;return`Noto‘g‘ri ${U[g.format]??u.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${u.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${u.keys.length>1?"lar":""}: ${W(u.keys,", ")}`;case"invalid_key":return`${u.origin} dagi kalit noto‘g‘ri`;case"invalid_union":return"Noto‘g‘ri kirish";case"invalid_element":return`${u.origin} da noto‘g‘ri qiymat`;default:return"Noto‘g‘ri kirish"}}};function XN(){return{localeError:Fb()}}var Sb=()=>{let $={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function I(u){return $[u]??null}let U={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},_={nan:"NaN",number:"số",array:"mảng"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Đầu vào không hợp lệ: mong đợi instanceof ${u.expected}, nhận được ${v}`;return`Đầu vào không hợp lệ: mong đợi ${g}, nhận được ${v}`}case"invalid_value":if(u.values.length===1)return`Đầu vào không hợp lệ: mong đợi ${j(u.values[0])}`;return`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Quá lớn: mong đợi ${u.origin??"giá trị"} ${z.verb} ${g}${u.maximum.toString()} ${z.unit??"phần tử"}`;return`Quá lớn: mong đợi ${u.origin??"giá trị"} ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Quá nhỏ: mong đợi ${u.origin} ${z.verb} ${g}${u.minimum.toString()} ${z.unit}`;return`Quá nhỏ: mong đợi ${u.origin} ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Chuỗi không hợp lệ: phải bắt đầu bằng "${g.prefix}"`;if(g.format==="ends_with")return`Chuỗi không hợp lệ: phải kết thúc bằng "${g.suffix}"`;if(g.format==="includes")return`Chuỗi không hợp lệ: phải bao gồm "${g.includes}"`;if(g.format==="regex")return`Chuỗi không hợp lệ: phải khớp với mẫu ${g.pattern}`;return`${U[g.format]??u.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${u.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${W(u.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${u.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${u.origin}`;default:return"Đầu vào không hợp lệ"}}};function qN(){return{localeError:Sb()}}var wb=()=>{let $={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function I(u){return $[u]??null}let U={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},_={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`无效输入:期望 instanceof ${u.expected},实际接收 ${v}`;return`无效输入:期望 ${g},实际接收 ${v}`}case"invalid_value":if(u.values.length===1)return`无效输入:期望 ${j(u.values[0])}`;return`无效选项:期望以下之一 ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`数值过大:期望 ${u.origin??"值"} ${g}${u.maximum.toString()} ${z.unit??"个元素"}`;return`数值过大:期望 ${u.origin??"值"} ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`数值过小:期望 ${u.origin} ${g}${u.minimum.toString()} ${z.unit}`;return`数值过小:期望 ${u.origin} ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`无效字符串:必须以 "${g.prefix}" 开头`;if(g.format==="ends_with")return`无效字符串:必须以 "${g.suffix}" 结尾`;if(g.format==="includes")return`无效字符串:必须包含 "${g.includes}"`;if(g.format==="regex")return`无效字符串:必须满足正则表达式 ${g.pattern}`;return`无效${U[g.format]??u.format}`}case"not_multiple_of":return`无效数字:必须是 ${u.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${W(u.keys,", ")}`;case"invalid_key":return`${u.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${u.origin} 中包含无效值(value)`;default:return"无效输入"}}};function QN(){return{localeError:wb()}}var Eb=()=>{let $={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function I(u){return $[u]??null}let U={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`無效的輸入值:預期為 instanceof ${u.expected},但收到 ${v}`;return`無效的輸入值:預期為 ${g},但收到 ${v}`}case"invalid_value":if(u.values.length===1)return`無效的輸入值:預期為 ${j(u.values[0])}`;return`無效的選項:預期為以下其中之一 ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`數值過大:預期 ${u.origin??"值"} 應為 ${g}${u.maximum.toString()} ${z.unit??"個元素"}`;return`數值過大:預期 ${u.origin??"值"} 應為 ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`數值過小:預期 ${u.origin} 應為 ${g}${u.minimum.toString()} ${z.unit}`;return`數值過小:預期 ${u.origin} 應為 ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`無效的字串:必須以 "${g.prefix}" 開頭`;if(g.format==="ends_with")return`無效的字串:必須以 "${g.suffix}" 結尾`;if(g.format==="includes")return`無效的字串:必須包含 "${g.includes}"`;if(g.format==="regex")return`無效的字串:必須符合格式 ${g.pattern}`;return`無效的 ${U[g.format]??u.format}`}case"not_multiple_of":return`無效的數字:必須為 ${u.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${u.keys.length>1?"們":""}:${W(u.keys,"、")}`;case"invalid_key":return`${u.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${u.origin} 中有無效的值`;default:return"無效的輸入值"}}};function TN(){return{localeError:Eb()}}var Cb=()=>{let $={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function I(u){return $[u]??null}let U={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},_={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${u.expected}, àmọ̀ a rí ${v}`;return`Ìbáwọlé aṣìṣe: a ní láti fi ${g}, àmọ̀ a rí ${v}`}case"invalid_value":if(u.values.length===1)return`Ìbáwọlé aṣìṣe: a ní láti fi ${j(u.values[0])}`;return`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Tó pọ̀ jù: a ní láti jẹ́ pé ${u.origin??"iye"} ${z.verb} ${g}${u.maximum} ${z.unit}`;return`Tó pọ̀ jù: a ní láti jẹ́ ${g}${u.maximum}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Kéré ju: a ní láti jẹ́ pé ${u.origin} ${z.verb} ${g}${u.minimum} ${z.unit}`;return`Kéré ju: a ní láti jẹ́ ${g}${u.minimum}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${g.prefix}"`;if(g.format==="ends_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${g.suffix}"`;if(g.format==="includes")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${g.includes}"`;if(g.format==="regex")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${g.pattern}`;return`Aṣìṣe: ${U[g.format]??u.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${u.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${W(u.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${u.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${u.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function HN(){return{localeError:Cb()}}var $Q,YN=Symbol("ZodOutput"),ON=Symbol("ZodInput");class VN{constructor(){this._map=new WeakMap,this._idmap=new Map}add($,...I){let U=I[0];if(this._map.set($,U),U&&typeof U==="object"&&"id"in U)this._idmap.set(U.id,$);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove($){let I=this._map.get($);if(I&&typeof I==="object"&&"id"in I)this._idmap.delete(I.id);return this._map.delete($),this}get($){let I=$._zod.parent;if(I){let U={...this.get(I)??{}};delete U.id;let _={...U,...this._map.get($)};return Object.keys(_).length?_:void 0}return this._map.get($)}has($){return this._map.has($)}}function MU(){return new VN}($Q=globalThis).__zod_globalRegistry??($Q.__zod_globalRegistry=MU());var w$=globalThis.__zod_globalRegistry;function BN($,I){return new $({type:"string",...C(I)})}function DN($,I){return new $({type:"string",coerce:!0,...C(I)})}function KU($,I){return new $({type:"string",format:"email",check:"string_format",abort:!1,...C(I)})}function O0($,I){return new $({type:"string",format:"guid",check:"string_format",abort:!1,...C(I)})}function LU($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,...C(I)})}function RU($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...C(I)})}function WU($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...C(I)})}function PU($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...C(I)})}function V0($,I){return new $({type:"string",format:"url",check:"string_format",abort:!1,...C(I)})}function ZU($,I){return new $({type:"string",format:"emoji",check:"string_format",abort:!1,...C(I)})}function AU($,I){return new $({type:"string",format:"nanoid",check:"string_format",abort:!1,...C(I)})}function bU($,I){return new $({type:"string",format:"cuid",check:"string_format",abort:!1,...C(I)})}function jU($,I){return new $({type:"string",format:"cuid2",check:"string_format",abort:!1,...C(I)})}function FU($,I){return new $({type:"string",format:"ulid",check:"string_format",abort:!1,...C(I)})}function SU($,I){return new $({type:"string",format:"xid",check:"string_format",abort:!1,...C(I)})}function wU($,I){return new $({type:"string",format:"ksuid",check:"string_format",abort:!1,...C(I)})}function EU($,I){return new $({type:"string",format:"ipv4",check:"string_format",abort:!1,...C(I)})}function CU($,I){return new $({type:"string",format:"ipv6",check:"string_format",abort:!1,...C(I)})}function MN($,I){return new $({type:"string",format:"mac",check:"string_format",abort:!1,...C(I)})}function fU($,I){return new $({type:"string",format:"cidrv4",check:"string_format",abort:!1,...C(I)})}function xU($,I){return new $({type:"string",format:"cidrv6",check:"string_format",abort:!1,...C(I)})}function kU($,I){return new $({type:"string",format:"base64",check:"string_format",abort:!1,...C(I)})}function yU($,I){return new $({type:"string",format:"base64url",check:"string_format",abort:!1,...C(I)})}function iU($,I){return new $({type:"string",format:"e164",check:"string_format",abort:!1,...C(I)})}function nU($,I){return new $({type:"string",format:"jwt",check:"string_format",abort:!1,...C(I)})}var KN={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function LN($,I){return new $({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...C(I)})}function RN($,I){return new $({type:"string",format:"date",check:"string_format",...C(I)})}function WN($,I){return new $({type:"string",format:"time",check:"string_format",precision:null,...C(I)})}function PN($,I){return new $({type:"string",format:"duration",check:"string_format",...C(I)})}function ZN($,I){return new $({type:"number",checks:[],...C(I)})}function AN($,I){return new $({type:"number",coerce:!0,checks:[],...C(I)})}function bN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"safeint",...C(I)})}function jN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"float32",...C(I)})}function FN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"float64",...C(I)})}function SN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"int32",...C(I)})}function wN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"uint32",...C(I)})}function EN($,I){return new $({type:"boolean",...C(I)})}function CN($,I){return new $({type:"boolean",coerce:!0,...C(I)})}function fN($,I){return new $({type:"bigint",...C(I)})}function xN($,I){return new $({type:"bigint",coerce:!0,...C(I)})}function kN($,I){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...C(I)})}function yN($,I){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...C(I)})}function iN($,I){return new $({type:"symbol",...C(I)})}function nN($,I){return new $({type:"undefined",...C(I)})}function rN($,I){return new $({type:"null",...C(I)})}function lN($){return new $({type:"any"})}function mN($){return new $({type:"unknown"})}function hN($,I){return new $({type:"never",...C(I)})}function cN($,I){return new $({type:"void",...C(I)})}function dN($,I){return new $({type:"date",...C(I)})}function pN($,I){return new $({type:"date",coerce:!0,...C(I)})}function oN($,I){return new $({type:"nan",...C(I)})}function f4($,I){return new NU({check:"less_than",...C(I),value:$,inclusive:!1})}function g4($,I){return new NU({check:"less_than",...C(I),value:$,inclusive:!0})}function x4($,I){return new GU({check:"greater_than",...C(I),value:$,inclusive:!1})}function l$($,I){return new GU({check:"greater_than",...C(I),value:$,inclusive:!0})}function rU($){return x4(0,$)}function lU($){return f4(0,$)}function mU($){return g4(0,$)}function hU($){return l$(0,$)}function K6($,I){return new oz({check:"multiple_of",...C(I),value:$})}function L6($,I){return new ez({check:"max_size",...C(I),maximum:$})}function k4($,I){return new sz({check:"min_size",...C(I),minimum:$})}function a6($,I){return new $v({check:"size_equals",...C(I),size:$})}function e6($,I){return new Iv({check:"max_length",...C(I),maximum:$})}function t4($,I){return new uv({check:"min_length",...C(I),minimum:$})}function s6($,I){return new Uv({check:"length_equals",...C(I),length:$})}function r1($,I){return new _v({check:"string_format",format:"regex",...C(I),pattern:$})}function l1($){return new gv({check:"string_format",format:"lowercase",...C($)})}function m1($){return new zv({check:"string_format",format:"uppercase",...C($)})}function h1($,I){return new vv({check:"string_format",format:"includes",...C(I),includes:$})}function c1($,I){return new Jv({check:"string_format",format:"starts_with",...C(I),prefix:$})}function d1($,I){return new Nv({check:"string_format",format:"ends_with",...C(I),suffix:$})}function cU($,I,U){return new Gv({check:"property",property:$,schema:I,...C(U)})}function p1($,I){return new Xv({check:"mime_type",mime:$,...C(I)})}function K4($){return new qv({check:"overwrite",tx:$})}function o1($){return K4((I)=>I.normalize($))}function t1(){return K4(($)=>$.trim())}function a1(){return K4(($)=>$.toLowerCase())}function e1(){return K4(($)=>$.toUpperCase())}function s1(){return K4(($)=>Gz($))}function tN($,I,U){return new $({type:"array",element:I,...C(U)})}function xb($,I,U){return new $({type:"union",options:I,...C(U)})}function kb($,I,U){return new $({type:"union",options:I,inclusive:!1,...C(U)})}function yb($,I,U,_){return new $({type:"union",options:U,discriminator:I,...C(_)})}function ib($,I,U){return new $({type:"intersection",left:I,right:U})}function nb($,I,U,_){let u=U instanceof m;return new $({type:"tuple",items:I,rest:u?U:null,...C(u?_:U)})}function rb($,I,U,_){return new $({type:"record",keyType:I,valueType:U,...C(_)})}function lb($,I,U,_){return new $({type:"map",keyType:I,valueType:U,...C(_)})}function mb($,I,U){return new $({type:"set",valueType:I,...C(U)})}function hb($,I,U){let _=Array.isArray(I)?Object.fromEntries(I.map((u)=>[u,u])):I;return new $({type:"enum",entries:_,...C(U)})}function cb($,I,U){return new $({type:"enum",entries:I,...C(U)})}function db($,I,U){return new $({type:"literal",values:Array.isArray(I)?I:[I],...C(U)})}function aN($,I){return new $({type:"file",...C(I)})}function pb($,I){return new $({type:"transform",transform:I})}function ob($,I){return new $({type:"optional",innerType:I})}function tb($,I){return new $({type:"nullable",innerType:I})}function ab($,I,U){return new $({type:"default",innerType:I,get defaultValue(){return typeof U==="function"?U():qz(U)}})}function eb($,I,U){return new $({type:"nonoptional",innerType:I,...C(U)})}function sb($,I){return new $({type:"success",innerType:I})}function $j($,I,U){return new $({type:"catch",innerType:I,catchValue:typeof U==="function"?U:()=>U})}function Ij($,I,U){return new $({type:"pipe",in:I,out:U})}function uj($,I){return new $({type:"readonly",innerType:I})}function Uj($,I,U){return new $({type:"template_literal",parts:I,...C(U)})}function _j($,I){return new $({type:"lazy",getter:I})}function gj($,I){return new $({type:"promise",innerType:I})}function eN($,I,U){let _=C(U);return _.abort??(_.abort=!0),new $({type:"custom",check:"custom",fn:I,..._})}function sN($,I,U){return new $({type:"custom",check:"custom",fn:I,...C(U)})}function $8($){let I=IQ((U)=>{return U.addIssue=(_)=>{if(typeof _==="string")U.issues.push(C1(_,U.value,I._zod.def));else{let u=_;if(u.fatal)u.continue=!1;u.code??(u.code="custom"),u.input??(u.input=U.value),u.inst??(u.inst=I),u.continue??(u.continue=!I._zod.def.abort),U.issues.push(C1(u))}},$(U.value,U)});return I}function IQ($,I){let U=new G$({check:"custom",...C(I)});return U._zod.check=$,U}function I8($){let I=new G$({check:"describe"});return I._zod.onattach=[(U)=>{let _=w$.get(U)??{};w$.add(U,{..._,description:$})}],I._zod.check=()=>{},I}function u8($){let I=new G$({check:"meta"});return I._zod.onattach=[(U)=>{let _=w$.get(U)??{};w$.add(U,{..._,...$})}],I._zod.check=()=>{},I}function U8($,I){let U=C(I),_=U.truthy??["true","1","yes","on","y","enabled"],u=U.falsy??["false","0","no","off","n","disabled"];if(U.case!=="sensitive")_=_.map((T)=>typeof T==="string"?T.toLowerCase():T),u=u.map((T)=>typeof T==="string"?T.toLowerCase():T);let g=new Set(_),z=new Set(u),v=$.Codec??X0,J=$.Boolean??N0,X=new($.String??t6)({type:"string",error:U.error}),G=new J({type:"boolean",error:U.error}),q=new v({type:"pipe",in:X,out:G,transform:(T,H)=>{let Q=T;if(U.case!=="sensitive")Q=Q.toLowerCase();if(g.has(Q))return!0;else if(z.has(Q))return!1;else return H.issues.push({code:"invalid_value",expected:"stringbool",values:[...g,...z],input:H.value,inst:q,continue:!1}),{}},reverseTransform:(T,H)=>{if(T===!0)return _[0]||"true";else return u[0]||"false"},error:U.error});return q}function $I($,I,U,_={}){let u=C(_),g={...C(_),check:"string_format",type:"string",format:I,fn:typeof U==="function"?U:(v)=>U.test(v),...u};if(U instanceof RegExp)g.pattern=U;return new $(g)}function R6($){let I=$?.target??"draft-2020-12";if(I==="draft-4")I="draft-04";if(I==="draft-7")I="draft-07";return{processors:$.processors??{},metadataRegistry:$?.metadata??w$,target:I,unrepresentable:$?.unrepresentable??"throw",override:$?.override??(()=>{}),io:$?.io??"output",counter:0,seen:new Map,cycles:$?.cycles??"ref",reused:$?.reused??"inline",external:$?.external??void 0}}function _$($,I,U={path:[],schemaPath:[]}){var _;let u=$._zod.def,g=I.seen.get($);if(g){if(g.count++,U.schemaPath.includes($))g.cycle=U.path;return g.schema}let z={schema:{},count:1,cycle:void 0,path:U.path};I.seen.set($,z);let v=$._zod.toJSONSchema?.();if(v)z.schema=v;else{let X={...U,schemaPath:[...U.schemaPath,$],path:U.path};if($._zod.processJSONSchema)$._zod.processJSONSchema(I,z.schema,X);else{let q=z.schema,T=I.processors[u.type];if(!T)throw Error(`[toJSONSchema]: Non-representable type encountered: ${u.type}`);T($,I,q,X)}let G=$._zod.parent;if(G){if(!z.ref)z.ref=G;_$(G,I,X),I.seen.get(G).isParent=!0}}let J=I.metadataRegistry.get($);if(J)Object.assign(z.schema,J);if(I.io==="input"&&m$($))delete z.schema.examples,delete z.schema.default;if(I.io==="input"&&z.schema._prefault)(_=z.schema).default??(_.default=z.schema._prefault);return delete z.schema._prefault,I.seen.get($).schema}function W6($,I){let U=$.seen.get(I);if(!U)throw Error("Unprocessed schema. This is a bug in Zod.");let _=new Map;for(let z of $.seen.entries()){let v=$.metadataRegistry.get(z[0])?.id;if(v){let J=_.get(v);if(J&&J!==z[0])throw Error(`Duplicate schema id "${v}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);_.set(v,z[0])}}let u=(z)=>{let v=$.target==="draft-2020-12"?"$defs":"definitions";if($.external){let G=$.external.registry.get(z[0])?.id,q=$.external.uri??((H)=>H);if(G)return{ref:q(G)};let T=z[1].defId??z[1].schema.id??`schema${$.counter++}`;return z[1].defId=T,{defId:T,ref:`${q("__shared")}#/${v}/${T}`}}if(z[1]===U)return{ref:"#"};let N=`${"#"}/${v}/`,X=z[1].schema.id??`__schema${$.counter++}`;return{defId:X,ref:N+X}},g=(z)=>{if(z[1].schema.$ref)return;let v=z[1],{ref:J,defId:N}=u(z);if(v.def={...v.schema},N)v.defId=N;let X=v.schema;for(let G in X)delete X[G];X.$ref=J};if($.cycles==="throw")for(let z of $.seen.entries()){let v=z[1];if(v.cycle)throw Error(`Cycle detected: #/${v.cycle?.join("/")}/<root>
335
+ `)}T.write("payload.value = newResult;"),T.write("return payload;");let L=T.compile();return(P,R)=>L(q,P,R)},z,g=t6,v=!eI.jitless,N=v&&Qg.value,X=I.catchall,G;$._zod.parse=(q,T)=>{G??(G=_.value);let H=q.value;if(!g(H))return q.issues.push({expected:"object",code:"invalid_type",input:H,inst:$}),q;if(v&&N&&T?.async===!1&&T.jitless!==!0){if(!z)z=u(I.shape);if(q=z(q,T),!X)return q;return p5([],H,q,T,G,$)}return U(q,T)}});function C5($,I,U,_){for(let z of $)if(z.issues.length===0)return I.value=z.value,I;let u=$.filter((z)=>!M6(z));if(u.length===1)return I.value=u[0].value,u[0];return I.issues.push({code:"invalid_union",input:I.value,inst:U,errors:$.map((z)=>z.issues.map((g)=>e$(g,_,R$())))}),I}var q0=D("$ZodUnion",($,I)=>{m.init($,I),o($._zod,"optin",()=>I.options.some((u)=>u._zod.optin==="optional")?"optional":void 0),o($._zod,"optout",()=>I.options.some((u)=>u._zod.optout==="optional")?"optional":void 0),o($._zod,"values",()=>{if(I.options.every((u)=>u._zod.values))return new Set(I.options.flatMap((u)=>Array.from(u._zod.values)));return}),o($._zod,"pattern",()=>{if(I.options.every((u)=>u._zod.pattern)){let u=I.options.map((z)=>z._zod.pattern);return new RegExp(`^(${u.map((z)=>I0(z.source)).join("|")})$`)}return});let U=I.options.length===1,_=I.options[0]._zod.run;$._zod.parse=(u,z)=>{if(U)return _(u,z);let g=!1,v=[];for(let J of I.options){let N=J._zod.run({value:u.value,issues:[]},z);if(N instanceof Promise)v.push(N),g=!0;else{if(N.issues.length===0)return N;v.push(N)}}if(!g)return C5(v,u,$,z);return Promise.all(v).then((J)=>{return C5(J,u,$,z)})}});function f5($,I,U,_){let u=$.filter((z)=>z.issues.length===0);if(u.length===1)return I.value=u[0].value,I;if(u.length===0)I.issues.push({code:"invalid_union",input:I.value,inst:U,errors:$.map((z)=>z.issues.map((g)=>e$(g,_,R$())))});else I.issues.push({code:"invalid_union",input:I.value,inst:U,errors:[],inclusive:!1});return I}var IJ=D("$ZodXor",($,I)=>{q0.init($,I),I.inclusive=!1;let U=I.options.length===1,_=I.options[0]._zod.run;$._zod.parse=(u,z)=>{if(U)return _(u,z);let g=!1,v=[];for(let J of I.options){let N=J._zod.run({value:u.value,issues:[]},z);if(N instanceof Promise)v.push(N),g=!0;else v.push(N)}if(!g)return f5(v,u,$,z);return Promise.all(v).then((J)=>{return f5(J,u,$,z)})}}),uJ=D("$ZodDiscriminatedUnion",($,I)=>{I.inclusive=!1,q0.init($,I);let U=$._zod.parse;o($._zod,"propValues",()=>{let u={};for(let z of I.options){let g=z._zod.propValues;if(!g||Object.keys(g).length===0)throw Error(`Invalid discriminated union option at index "${I.options.indexOf(z)}"`);for(let[v,J]of Object.entries(g)){if(!u[v])u[v]=new Set;for(let N of J)u[v].add(N)}}return u});let _=C1(()=>{let u=I.options,z=new Map;for(let g of u){let v=g._zod.propValues?.[I.discriminator];if(!v||v.size===0)throw Error(`Invalid discriminated union option at index "${I.options.indexOf(g)}"`);for(let J of v){if(z.has(J))throw Error(`Duplicate discriminator value "${String(J)}"`);z.set(J,g)}}return z});$._zod.parse=(u,z)=>{let g=u.value;if(!t6(g))return u.issues.push({code:"invalid_type",expected:"object",input:g,inst:$}),u;let v=_.value.get(g?.[I.discriminator]);if(v)return v._zod.run(u,z);if(I.unionFallback)return U(u,z);return u.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:I.discriminator,input:g,path:[I.discriminator],inst:$}),u}}),UJ=D("$ZodIntersection",($,I)=>{m.init($,I),$._zod.parse=(U,_)=>{let u=U.value,z=I.left._zod.run({value:u,issues:[]},_),g=I.right._zod.run({value:u,issues:[]},_);if(z instanceof Promise||g instanceof Promise)return Promise.all([z,g]).then(([J,N])=>{return x5(U,J,N)});return x5(U,z,g)}});function Yv($,I){if($===I)return{valid:!0,data:$};if($ instanceof Date&&I instanceof Date&&+$===+I)return{valid:!0,data:$};if(D6($)&&D6(I)){let U=Object.keys(I),_=Object.keys($).filter((z)=>U.indexOf(z)!==-1),u={...$,...I};for(let z of _){let g=Yv($[z],I[z]);if(!g.valid)return{valid:!1,mergeErrorPath:[z,...g.mergeErrorPath]};u[z]=g.data}return{valid:!0,data:u}}if(Array.isArray($)&&Array.isArray(I)){if($.length!==I.length)return{valid:!1,mergeErrorPath:[]};let U=[];for(let _=0;_<$.length;_++){let u=$[_],z=I[_],g=Yv(u,z);if(!g.valid)return{valid:!1,mergeErrorPath:[_,...g.mergeErrorPath]};U.push(g.data)}return{valid:!0,data:U}}return{valid:!1,mergeErrorPath:[]}}function x5($,I,U){let _=new Map,u;for(let v of I.issues)if(v.code==="unrecognized_keys"){u??(u=v);for(let J of v.keys){if(!_.has(J))_.set(J,{});_.get(J).l=!0}}else $.issues.push(v);for(let v of U.issues)if(v.code==="unrecognized_keys")for(let J of v.keys){if(!_.has(J))_.set(J,{});_.get(J).r=!0}else $.issues.push(v);let z=[..._].filter(([,v])=>v.l&&v.r).map(([v])=>v);if(z.length&&u)$.issues.push({...u,keys:z});if(M6($))return $;let g=Yv(I.value,U.value);if(!g.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(g.mergeErrorPath)}`);return $.value=g.data,$}var DU=D("$ZodTuple",($,I)=>{m.init($,I);let U=I.items;$._zod.parse=(_,u)=>{let z=_.value;if(!Array.isArray(z))return _.issues.push({input:z,inst:$,expected:"tuple",code:"invalid_type"}),_;_.value=[];let g=[],v=[...U].reverse().findIndex((X)=>X._zod.optin!=="optional"),J=v===-1?0:U.length-v;if(!I.rest){let X=z.length>U.length,G=z.length<J-1;if(X||G)return _.issues.push({...X?{code:"too_big",maximum:U.length,inclusive:!0}:{code:"too_small",minimum:U.length},input:z,inst:$,origin:"array"}),_}let N=-1;for(let X of U){if(N++,N>=z.length){if(N>=J)continue}let G=X._zod.run({value:z[N],issues:[]},u);if(G instanceof Promise)g.push(G.then((q)=>QU(q,_,N)));else QU(G,_,N)}if(I.rest){let X=z.slice(U.length);for(let G of X){N++;let q=I.rest._zod.run({value:G,issues:[]},u);if(q instanceof Promise)g.push(q.then((T)=>QU(T,_,N)));else QU(q,_,N)}}if(g.length)return Promise.all(g).then(()=>_);return _}});function QU($,I,U){if($.issues.length)I.issues.push(...z4(U,$.issues));I.value[U]=$.value}var _J=D("$ZodRecord",($,I)=>{m.init($,I),$._zod.parse=(U,_)=>{let u=U.value;if(!D6(u))return U.issues.push({expected:"record",code:"invalid_type",input:u,inst:$}),U;let z=[],g=I.keyType._zod.values;if(g){U.value={};let v=new Set;for(let N of g)if(typeof N==="string"||typeof N==="number"||typeof N==="symbol"){v.add(typeof N==="number"?N.toString():N);let X=I.valueType._zod.run({value:u[N],issues:[]},_);if(X instanceof Promise)z.push(X.then((G)=>{if(G.issues.length)U.issues.push(...z4(N,G.issues));U.value[N]=G.value}));else{if(X.issues.length)U.issues.push(...z4(N,X.issues));U.value[N]=X.value}}let J;for(let N in u)if(!v.has(N))J=J??[],J.push(N);if(J&&J.length>0)U.issues.push({code:"unrecognized_keys",input:u,inst:$,keys:J})}else{U.value={};for(let v of Reflect.ownKeys(u)){if(v==="__proto__")continue;let J=I.keyType._zod.run({value:v,issues:[]},_);if(J instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof v==="string"&&J0.test(v)&&J.issues.length){let G=I.keyType._zod.run({value:Number(v),issues:[]},_);if(G instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(G.issues.length===0)J=G}if(J.issues.length){if(I.mode==="loose")U.value[v]=u[v];else U.issues.push({code:"invalid_key",origin:"record",issues:J.issues.map((G)=>e$(G,_,R$())),input:v,path:[v],inst:$});continue}let X=I.valueType._zod.run({value:u[v],issues:[]},_);if(X instanceof Promise)z.push(X.then((G)=>{if(G.issues.length)U.issues.push(...z4(v,G.issues));U.value[J.value]=G.value}));else{if(X.issues.length)U.issues.push(...z4(v,X.issues));U.value[J.value]=X.value}}}if(z.length)return Promise.all(z).then(()=>U);return U}}),zJ=D("$ZodMap",($,I)=>{m.init($,I),$._zod.parse=(U,_)=>{let u=U.value;if(!(u instanceof Map))return U.issues.push({expected:"map",code:"invalid_type",input:u,inst:$}),U;let z=[];U.value=new Map;for(let[g,v]of u){let J=I.keyType._zod.run({value:g,issues:[]},_),N=I.valueType._zod.run({value:v,issues:[]},_);if(J instanceof Promise||N instanceof Promise)z.push(Promise.all([J,N]).then(([X,G])=>{k5(X,G,U,g,u,$,_)}));else k5(J,N,U,g,u,$,_)}if(z.length)return Promise.all(z).then(()=>U);return U}});function k5($,I,U,_,u,z,g){if($.issues.length)if(u0.has(typeof _))U.issues.push(...z4(_,$.issues));else U.issues.push({code:"invalid_key",origin:"map",input:u,inst:z,issues:$.issues.map((v)=>e$(v,g,R$()))});if(I.issues.length)if(u0.has(typeof _))U.issues.push(...z4(_,I.issues));else U.issues.push({origin:"map",code:"invalid_element",input:u,inst:z,key:_,issues:I.issues.map((v)=>e$(v,g,R$()))});U.value.set($.value,I.value)}var gJ=D("$ZodSet",($,I)=>{m.init($,I),$._zod.parse=(U,_)=>{let u=U.value;if(!(u instanceof Set))return U.issues.push({input:u,inst:$,expected:"set",code:"invalid_type"}),U;let z=[];U.value=new Set;for(let g of u){let v=I.valueType._zod.run({value:g,issues:[]},_);if(v instanceof Promise)z.push(v.then((J)=>y5(J,U)));else y5(v,U)}if(z.length)return Promise.all(z).then(()=>U);return U}});function y5($,I){if($.issues.length)I.issues.push(...$.issues);I.value.add($.value)}var vJ=D("$ZodEnum",($,I)=>{m.init($,I);let U=$0(I.entries),_=new Set(U);$._zod.values=_,$._zod.pattern=new RegExp(`^(${U.filter((u)=>u0.has(typeof u)).map((u)=>typeof u==="string"?T4(u):u.toString()).join("|")})$`),$._zod.parse=(u,z)=>{let g=u.value;if(_.has(g))return u;return u.issues.push({code:"invalid_value",values:U,input:g,inst:$}),u}}),JJ=D("$ZodLiteral",($,I)=>{if(m.init($,I),I.values.length===0)throw Error("Cannot create literal schema with no valid values");let U=new Set(I.values);$._zod.values=U,$._zod.pattern=new RegExp(`^(${I.values.map((_)=>typeof _==="string"?T4(_):_?T4(_.toString()):String(_)).join("|")})$`),$._zod.parse=(_,u)=>{let z=_.value;if(U.has(z))return _;return _.issues.push({code:"invalid_value",values:I.values,input:z,inst:$}),_}}),NJ=D("$ZodFile",($,I)=>{m.init($,I),$._zod.parse=(U,_)=>{let u=U.value;if(u instanceof File)return U;return U.issues.push({expected:"file",code:"invalid_type",input:u,inst:$}),U}}),GJ=D("$ZodTransform",($,I)=>{m.init($,I),$._zod.parse=(U,_)=>{if(_.direction==="backward")throw new o6($.constructor.name);let u=I.transform(U.value,U);if(_.async)return(u instanceof Promise?u:Promise.resolve(u)).then((g)=>{return U.value=g,U});if(u instanceof Promise)throw new C4;return U.value=u,U}});function i5($,I){if($.issues.length&&I===void 0)return{issues:[],value:void 0};return $}var MU=D("$ZodOptional",($,I)=>{m.init($,I),$._zod.optin="optional",$._zod.optout="optional",o($._zod,"values",()=>{return I.innerType._zod.values?new Set([...I.innerType._zod.values,void 0]):void 0}),o($._zod,"pattern",()=>{let U=I.innerType._zod.pattern;return U?new RegExp(`^(${I0(U.source)})?$`):void 0}),$._zod.parse=(U,_)=>{if(I.innerType._zod.optin==="optional"){let u=I.innerType._zod.run(U,_);if(u instanceof Promise)return u.then((z)=>i5(z,U.value));return i5(u,U.value)}if(U.value===void 0)return U;return I.innerType._zod.run(U,_)}}),XJ=D("$ZodExactOptional",($,I)=>{MU.init($,I),o($._zod,"values",()=>I.innerType._zod.values),o($._zod,"pattern",()=>I.innerType._zod.pattern),$._zod.parse=(U,_)=>{return I.innerType._zod.run(U,_)}}),qJ=D("$ZodNullable",($,I)=>{m.init($,I),o($._zod,"optin",()=>I.innerType._zod.optin),o($._zod,"optout",()=>I.innerType._zod.optout),o($._zod,"pattern",()=>{let U=I.innerType._zod.pattern;return U?new RegExp(`^(${I0(U.source)}|null)$`):void 0}),o($._zod,"values",()=>{return I.innerType._zod.values?new Set([...I.innerType._zod.values,null]):void 0}),$._zod.parse=(U,_)=>{if(U.value===null)return U;return I.innerType._zod.run(U,_)}}),QJ=D("$ZodDefault",($,I)=>{m.init($,I),$._zod.optin="optional",o($._zod,"values",()=>I.innerType._zod.values),$._zod.parse=(U,_)=>{if(_.direction==="backward")return I.innerType._zod.run(U,_);if(U.value===void 0)return U.value=I.defaultValue,U;let u=I.innerType._zod.run(U,_);if(u instanceof Promise)return u.then((z)=>n5(z,I));return n5(u,I)}});function n5($,I){if($.value===void 0)$.value=I.defaultValue;return $}var TJ=D("$ZodPrefault",($,I)=>{m.init($,I),$._zod.optin="optional",o($._zod,"values",()=>I.innerType._zod.values),$._zod.parse=(U,_)=>{if(_.direction==="backward")return I.innerType._zod.run(U,_);if(U.value===void 0)U.value=I.defaultValue;return I.innerType._zod.run(U,_)}}),HJ=D("$ZodNonOptional",($,I)=>{m.init($,I),o($._zod,"values",()=>{let U=I.innerType._zod.values;return U?new Set([...U].filter((_)=>_!==void 0)):void 0}),$._zod.parse=(U,_)=>{let u=I.innerType._zod.run(U,_);if(u instanceof Promise)return u.then((z)=>r5(z,$));return r5(u,$)}});function r5($,I){if(!$.issues.length&&$.value===void 0)$.issues.push({code:"invalid_type",expected:"nonoptional",input:$.value,inst:I});return $}var YJ=D("$ZodSuccess",($,I)=>{m.init($,I),$._zod.parse=(U,_)=>{if(_.direction==="backward")throw new o6("ZodSuccess");let u=I.innerType._zod.run(U,_);if(u instanceof Promise)return u.then((z)=>{return U.value=z.issues.length===0,U});return U.value=u.issues.length===0,U}}),OJ=D("$ZodCatch",($,I)=>{m.init($,I),o($._zod,"optin",()=>I.innerType._zod.optin),o($._zod,"optout",()=>I.innerType._zod.optout),o($._zod,"values",()=>I.innerType._zod.values),$._zod.parse=(U,_)=>{if(_.direction==="backward")return I.innerType._zod.run(U,_);let u=I.innerType._zod.run(U,_);if(u instanceof Promise)return u.then((z)=>{if(U.value=z.value,z.issues.length)U.value=I.catchValue({...U,error:{issues:z.issues.map((g)=>e$(g,_,R$()))},input:U.value}),U.issues=[];return U});if(U.value=u.value,u.issues.length)U.value=I.catchValue({...U,error:{issues:u.issues.map((z)=>e$(z,_,R$()))},input:U.value}),U.issues=[];return U}}),VJ=D("$ZodNaN",($,I)=>{m.init($,I),$._zod.parse=(U,_)=>{if(typeof U.value!=="number"||!Number.isNaN(U.value))return U.issues.push({input:U.value,inst:$,expected:"nan",code:"invalid_type"}),U;return U}}),BJ=D("$ZodPipe",($,I)=>{m.init($,I),o($._zod,"values",()=>I.in._zod.values),o($._zod,"optin",()=>I.in._zod.optin),o($._zod,"optout",()=>I.out._zod.optout),o($._zod,"propValues",()=>I.in._zod.propValues),$._zod.parse=(U,_)=>{if(_.direction==="backward"){let z=I.out._zod.run(U,_);if(z instanceof Promise)return z.then((g)=>TU(g,I.in,_));return TU(z,I.in,_)}let u=I.in._zod.run(U,_);if(u instanceof Promise)return u.then((z)=>TU(z,I.out,_));return TU(u,I.out,_)}});function TU($,I,U){if($.issues.length)return $.aborted=!0,$;return I._zod.run({value:$.value,issues:$.issues},U)}var Q0=D("$ZodCodec",($,I)=>{m.init($,I),o($._zod,"values",()=>I.in._zod.values),o($._zod,"optin",()=>I.in._zod.optin),o($._zod,"optout",()=>I.out._zod.optout),o($._zod,"propValues",()=>I.in._zod.propValues),$._zod.parse=(U,_)=>{if((_.direction||"forward")==="forward"){let z=I.in._zod.run(U,_);if(z instanceof Promise)return z.then((g)=>HU(g,I,_));return HU(z,I,_)}else{let z=I.out._zod.run(U,_);if(z instanceof Promise)return z.then((g)=>HU(g,I,_));return HU(z,I,_)}}});function HU($,I,U){if($.issues.length)return $.aborted=!0,$;if((U.direction||"forward")==="forward"){let u=I.transform($.value,$);if(u instanceof Promise)return u.then((z)=>YU($,z,I.out,U));return YU($,u,I.out,U)}else{let u=I.reverseTransform($.value,$);if(u instanceof Promise)return u.then((z)=>YU($,z,I.in,U));return YU($,u,I.in,U)}}function YU($,I,U,_){if($.issues.length)return $.aborted=!0,$;return U._zod.run({value:I,issues:$.issues},_)}var DJ=D("$ZodReadonly",($,I)=>{m.init($,I),o($._zod,"propValues",()=>I.innerType._zod.propValues),o($._zod,"values",()=>I.innerType._zod.values),o($._zod,"optin",()=>I.innerType?._zod?.optin),o($._zod,"optout",()=>I.innerType?._zod?.optout),$._zod.parse=(U,_)=>{if(_.direction==="backward")return I.innerType._zod.run(U,_);let u=I.innerType._zod.run(U,_);if(u instanceof Promise)return u.then(l5);return l5(u)}});function l5($){return $.value=Object.freeze($.value),$}var MJ=D("$ZodTemplateLiteral",($,I)=>{m.init($,I);let U=[];for(let _ of I.parts)if(typeof _==="object"&&_!==null){if(!_._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[..._._zod.traits].shift()}`);let u=_._zod.pattern instanceof RegExp?_._zod.pattern.source:_._zod.pattern;if(!u)throw Error(`Invalid template literal part: ${_._zod.traits}`);let z=u.startsWith("^")?1:0,g=u.endsWith("$")?u.length-1:u.length;U.push(u.slice(z,g))}else if(_===null||Hg.has(typeof _))U.push(T4(`${_}`));else throw Error(`Invalid template literal part: ${_}`);$._zod.pattern=new RegExp(`^${U.join("")}$`),$._zod.parse=(_,u)=>{if(typeof _.value!=="string")return _.issues.push({input:_.value,inst:$,expected:"string",code:"invalid_type"}),_;if($._zod.pattern.lastIndex=0,!$._zod.pattern.test(_.value))return _.issues.push({input:_.value,inst:$,code:"invalid_format",format:I.format??"template_literal",pattern:$._zod.pattern.source}),_;return _}}),KJ=D("$ZodFunction",($,I)=>{return m.init($,I),$._def=I,$._zod.def=I,$.implement=(U)=>{if(typeof U!=="function")throw Error("implement() must be called with a function");return function(..._){let u=$._def.input?su($._def.input,_):_,z=Reflect.apply(U,this,u);if($._def.output)return su($._def.output,z);return z}},$.implementAsync=(U)=>{if(typeof U!=="function")throw Error("implementAsync() must be called with a function");return async function(..._){let u=$._def.input?await $U($._def.input,_):_,z=await Reflect.apply(U,this,u);if($._def.output)return await $U($._def.output,z);return z}},$._zod.parse=(U,_)=>{if(typeof U.value!=="function")return U.issues.push({code:"invalid_type",expected:"function",input:U.value,inst:$}),U;if($._def.output&&$._def.output._zod.def.type==="promise")U.value=$.implementAsync(U.value);else U.value=$.implement(U.value);return U},$.input=(...U)=>{let _=$.constructor;if(Array.isArray(U[0]))return new _({type:"function",input:new DU({type:"tuple",items:U[0],rest:U[1]}),output:$._def.output});return new _({type:"function",input:U[0],output:$._def.output})},$.output=(U)=>{return new $.constructor({type:"function",input:$._def.input,output:U})},$}),RJ=D("$ZodPromise",($,I)=>{m.init($,I),$._zod.parse=(U,_)=>{return Promise.resolve(U.value).then((u)=>I.innerType._zod.run({value:u,issues:[]},_))}}),LJ=D("$ZodLazy",($,I)=>{m.init($,I),o($._zod,"innerType",()=>I.getter()),o($._zod,"pattern",()=>$._zod.innerType?._zod?.pattern),o($._zod,"propValues",()=>$._zod.innerType?._zod?.propValues),o($._zod,"optin",()=>$._zod.innerType?._zod?.optin??void 0),o($._zod,"optout",()=>$._zod.innerType?._zod?.optout??void 0),$._zod.parse=(U,_)=>{return $._zod.innerType._zod.run(U,_)}}),WJ=D("$ZodCustom",($,I)=>{G$.init($,I),m.init($,I),$._zod.parse=(U,_)=>{return U},$._zod.check=(U)=>{let _=U.value,u=I.fn(_);if(u instanceof Promise)return u.then((z)=>m5(z,U,_,$));m5(u,U,_,$);return}});function m5($,I,U,_){if(!$){let u={code:"custom",input:U,inst:_,path:[..._._zod.def.path??[]],continue:!_._zod.def.abort};if(_._zod.def.params)u.params=_._zod.def.params;I.issues.push(f1(u))}}var V0={};B4(V0,{zhTW:()=>YN,zhCN:()=>HN,yo:()=>ON,vi:()=>TN,uz:()=>QN,ur:()=>qN,uk:()=>O0,ua:()=>XN,tr:()=>GN,th:()=>NN,ta:()=>JN,sv:()=>vN,sl:()=>gN,ru:()=>zN,pt:()=>_N,ps:()=>uN,pl:()=>UN,ota:()=>IN,no:()=>$N,nl:()=>sJ,ms:()=>eJ,mk:()=>aJ,lt:()=>tJ,ko:()=>oJ,km:()=>H0,kh:()=>pJ,ka:()=>dJ,ja:()=>cJ,it:()=>hJ,is:()=>mJ,id:()=>lJ,hy:()=>rJ,hu:()=>nJ,he:()=>iJ,frCA:()=>yJ,fr:()=>kJ,fi:()=>xJ,fa:()=>fJ,es:()=>CJ,eo:()=>EJ,en:()=>T0,de:()=>wJ,da:()=>SJ,cs:()=>FJ,ca:()=>jJ,bg:()=>bJ,be:()=>AJ,az:()=>ZJ,ar:()=>PJ});var hA=()=>{let $={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function I(u){return $[u]??null}let U={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`مدخلات غير مقبولة: يفترض إدخال instanceof ${u.expected}، ولكن تم إدخال ${v}`;return`مدخلات غير مقبولة: يفترض إدخال ${z}، ولكن تم إدخال ${v}`}case"invalid_value":if(u.values.length===1)return`مدخلات غير مقبولة: يفترض إدخال ${F(u.values[0])}`;return`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return` أكبر من اللازم: يفترض أن تكون ${u.origin??"القيمة"} ${z} ${u.maximum.toString()} ${g.unit??"عنصر"}`;return`أكبر من اللازم: يفترض أن تكون ${u.origin??"القيمة"} ${z} ${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`أصغر من اللازم: يفترض لـ ${u.origin} أن يكون ${z} ${u.minimum.toString()} ${g.unit}`;return`أصغر من اللازم: يفترض لـ ${u.origin} أن يكون ${z} ${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`نَص غير مقبول: يجب أن يبدأ بـ "${u.prefix}"`;if(z.format==="ends_with")return`نَص غير مقبول: يجب أن ينتهي بـ "${z.suffix}"`;if(z.format==="includes")return`نَص غير مقبول: يجب أن يتضمَّن "${z.includes}"`;if(z.format==="regex")return`نَص غير مقبول: يجب أن يطابق النمط ${z.pattern}`;return`${U[z.format]??u.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${u.divisor}`;case"unrecognized_keys":return`معرف${u.keys.length>1?"ات":""} غريب${u.keys.length>1?"ة":""}: ${W(u.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${u.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${u.origin}`;default:return"مدخل غير مقبول"}}};function PJ(){return{localeError:hA()}}var cA=()=>{let $={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function I(u){return $[u]??null}let U={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Yanlış dəyər: gözlənilən instanceof ${u.expected}, daxil olan ${v}`;return`Yanlış dəyər: gözlənilən ${z}, daxil olan ${v}`}case"invalid_value":if(u.values.length===1)return`Yanlış dəyər: gözlənilən ${F(u.values[0])}`;return`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`Çox böyük: gözlənilən ${u.origin??"dəyər"} ${z}${u.maximum.toString()} ${g.unit??"element"}`;return`Çox böyük: gözlənilən ${u.origin??"dəyər"} ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`Çox kiçik: gözlənilən ${u.origin} ${z}${u.minimum.toString()} ${g.unit}`;return`Çox kiçik: gözlənilən ${u.origin} ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Yanlış mətn: "${z.prefix}" ilə başlamalıdır`;if(z.format==="ends_with")return`Yanlış mətn: "${z.suffix}" ilə bitməlidir`;if(z.format==="includes")return`Yanlış mətn: "${z.includes}" daxil olmalıdır`;if(z.format==="regex")return`Yanlış mətn: ${z.pattern} şablonuna uyğun olmalıdır`;return`Yanlış ${U[z.format]??u.format}`}case"not_multiple_of":return`Yanlış ədəd: ${u.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${u.keys.length>1?"lar":""}: ${W(u.keys,", ")}`;case"invalid_key":return`${u.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${u.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function ZJ(){return{localeError:cA()}}function t5($,I,U,_){let u=Math.abs($),z=u%10,g=u%100;if(g>=11&&g<=19)return _;if(z===1)return I;if(z>=2&&z<=4)return U;return _}var dA=()=>{let $={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function I(u){return $[u]??null}let U={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},_={nan:"NaN",number:"лік",array:"масіў"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Няправільны ўвод: чакаўся instanceof ${u.expected}, атрымана ${v}`;return`Няправільны ўвод: чакаўся ${z}, атрымана ${v}`}case"invalid_value":if(u.values.length===1)return`Няправільны ўвод: чакалася ${F(u.values[0])}`;return`Няправільны варыянт: чакаўся адзін з ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g){let v=Number(u.maximum),J=t5(v,g.unit.one,g.unit.few,g.unit.many);return`Занадта вялікі: чакалася, што ${u.origin??"значэнне"} павінна ${g.verb} ${z}${u.maximum.toString()} ${J}`}return`Занадта вялікі: чакалася, што ${u.origin??"значэнне"} павінна быць ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g){let v=Number(u.minimum),J=t5(v,g.unit.one,g.unit.few,g.unit.many);return`Занадта малы: чакалася, што ${u.origin} павінна ${g.verb} ${z}${u.minimum.toString()} ${J}`}return`Занадта малы: чакалася, што ${u.origin} павінна быць ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Няправільны радок: павінен пачынацца з "${z.prefix}"`;if(z.format==="ends_with")return`Няправільны радок: павінен заканчвацца на "${z.suffix}"`;if(z.format==="includes")return`Няправільны радок: павінен змяшчаць "${z.includes}"`;if(z.format==="regex")return`Няправільны радок: павінен адпавядаць шаблону ${z.pattern}`;return`Няправільны ${U[z.format]??u.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${u.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${u.keys.length>1?"ключы":"ключ"}: ${W(u.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${u.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${u.origin}`;default:return"Няправільны ўвод"}}};function AJ(){return{localeError:dA()}}var pA=()=>{let $={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function I(u){return $[u]??null}let U={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"},_={nan:"NaN",number:"число",array:"масив"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Невалиден вход: очакван instanceof ${u.expected}, получен ${v}`;return`Невалиден вход: очакван ${z}, получен ${v}`}case"invalid_value":if(u.values.length===1)return`Невалиден вход: очакван ${F(u.values[0])}`;return`Невалидна опция: очаквано едно от ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`Твърде голямо: очаква се ${u.origin??"стойност"} да съдържа ${z}${u.maximum.toString()} ${g.unit??"елемента"}`;return`Твърде голямо: очаква се ${u.origin??"стойност"} да бъде ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`Твърде малко: очаква се ${u.origin} да съдържа ${z}${u.minimum.toString()} ${g.unit}`;return`Твърде малко: очаква се ${u.origin} да бъде ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Невалиден низ: трябва да започва с "${z.prefix}"`;if(z.format==="ends_with")return`Невалиден низ: трябва да завършва с "${z.suffix}"`;if(z.format==="includes")return`Невалиден низ: трябва да включва "${z.includes}"`;if(z.format==="regex")return`Невалиден низ: трябва да съвпада с ${z.pattern}`;let g="Невалиден";if(z.format==="emoji")g="Невалидно";if(z.format==="datetime")g="Невалидно";if(z.format==="date")g="Невалидна";if(z.format==="time")g="Невалидно";if(z.format==="duration")g="Невалидна";return`${g} ${U[z.format]??u.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${u.divisor}`;case"unrecognized_keys":return`Неразпознат${u.keys.length>1?"и":""} ключ${u.keys.length>1?"ове":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${u.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${u.origin}`;default:return"Невалиден вход"}}};function bJ(){return{localeError:pA()}}var oA=()=>{let $={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function I(u){return $[u]??null}let U={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Tipus invàlid: s'esperava instanceof ${u.expected}, s'ha rebut ${v}`;return`Tipus invàlid: s'esperava ${z}, s'ha rebut ${v}`}case"invalid_value":if(u.values.length===1)return`Valor invàlid: s'esperava ${F(u.values[0])}`;return`Opció invàlida: s'esperava una de ${W(u.values," o ")}`;case"too_big":{let z=u.inclusive?"com a màxim":"menys de",g=I(u.origin);if(g)return`Massa gran: s'esperava que ${u.origin??"el valor"} contingués ${z} ${u.maximum.toString()} ${g.unit??"elements"}`;return`Massa gran: s'esperava que ${u.origin??"el valor"} fos ${z} ${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?"com a mínim":"més de",g=I(u.origin);if(g)return`Massa petit: s'esperava que ${u.origin} contingués ${z} ${u.minimum.toString()} ${g.unit}`;return`Massa petit: s'esperava que ${u.origin} fos ${z} ${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Format invàlid: ha de començar amb "${z.prefix}"`;if(z.format==="ends_with")return`Format invàlid: ha d'acabar amb "${z.suffix}"`;if(z.format==="includes")return`Format invàlid: ha d'incloure "${z.includes}"`;if(z.format==="regex")return`Format invàlid: ha de coincidir amb el patró ${z.pattern}`;return`Format invàlid per a ${U[z.format]??u.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${u.divisor}`;case"unrecognized_keys":return`Clau${u.keys.length>1?"s":""} no reconeguda${u.keys.length>1?"s":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${u.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${u.origin}`;default:return"Entrada invàlida"}}};function jJ(){return{localeError:oA()}}var tA=()=>{let $={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function I(u){return $[u]??null}let U={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},_={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Neplatný vstup: očekáváno instanceof ${u.expected}, obdrženo ${v}`;return`Neplatný vstup: očekáváno ${z}, obdrženo ${v}`}case"invalid_value":if(u.values.length===1)return`Neplatný vstup: očekáváno ${F(u.values[0])}`;return`Neplatná možnost: očekávána jedna z hodnot ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`Hodnota je příliš velká: ${u.origin??"hodnota"} musí mít ${z}${u.maximum.toString()} ${g.unit??"prvků"}`;return`Hodnota je příliš velká: ${u.origin??"hodnota"} musí být ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`Hodnota je příliš malá: ${u.origin??"hodnota"} musí mít ${z}${u.minimum.toString()} ${g.unit??"prvků"}`;return`Hodnota je příliš malá: ${u.origin??"hodnota"} musí být ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Neplatný řetězec: musí začínat na "${z.prefix}"`;if(z.format==="ends_with")return`Neplatný řetězec: musí končit na "${z.suffix}"`;if(z.format==="includes")return`Neplatný řetězec: musí obsahovat "${z.includes}"`;if(z.format==="regex")return`Neplatný řetězec: musí odpovídat vzoru ${z.pattern}`;return`Neplatný formát ${U[z.format]??u.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${u.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${W(u.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${u.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${u.origin}`;default:return"Neplatný vstup"}}};function FJ(){return{localeError:tA()}}var aA=()=>{let $={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function I(u){return $[u]??null}let U={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},_={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Ugyldigt input: forventede instanceof ${u.expected}, fik ${v}`;return`Ugyldigt input: forventede ${z}, fik ${v}`}case"invalid_value":if(u.values.length===1)return`Ugyldig værdi: forventede ${F(u.values[0])}`;return`Ugyldigt valg: forventede en af følgende ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin),v=_[u.origin]??u.origin;if(g)return`For stor: forventede ${v??"value"} ${g.verb} ${z} ${u.maximum.toString()} ${g.unit??"elementer"}`;return`For stor: forventede ${v??"value"} havde ${z} ${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin),v=_[u.origin]??u.origin;if(g)return`For lille: forventede ${v} ${g.verb} ${z} ${u.minimum.toString()} ${g.unit}`;return`For lille: forventede ${v} havde ${z} ${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Ugyldig streng: skal starte med "${z.prefix}"`;if(z.format==="ends_with")return`Ugyldig streng: skal ende med "${z.suffix}"`;if(z.format==="includes")return`Ugyldig streng: skal indeholde "${z.includes}"`;if(z.format==="regex")return`Ugyldig streng: skal matche mønsteret ${z.pattern}`;return`Ugyldig ${U[z.format]??u.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${W(u.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${u.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${u.origin}`;default:return"Ugyldigt input"}}};function SJ(){return{localeError:aA()}}var eA=()=>{let $={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function I(u){return $[u]??null}let U={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},_={nan:"NaN",number:"Zahl",array:"Array"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Ungültige Eingabe: erwartet instanceof ${u.expected}, erhalten ${v}`;return`Ungültige Eingabe: erwartet ${z}, erhalten ${v}`}case"invalid_value":if(u.values.length===1)return`Ungültige Eingabe: erwartet ${F(u.values[0])}`;return`Ungültige Option: erwartet eine von ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`Zu groß: erwartet, dass ${u.origin??"Wert"} ${z}${u.maximum.toString()} ${g.unit??"Elemente"} hat`;return`Zu groß: erwartet, dass ${u.origin??"Wert"} ${z}${u.maximum.toString()} ist`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`Zu klein: erwartet, dass ${u.origin} ${z}${u.minimum.toString()} ${g.unit} hat`;return`Zu klein: erwartet, dass ${u.origin} ${z}${u.minimum.toString()} ist`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Ungültiger String: muss mit "${z.prefix}" beginnen`;if(z.format==="ends_with")return`Ungültiger String: muss mit "${z.suffix}" enden`;if(z.format==="includes")return`Ungültiger String: muss "${z.includes}" enthalten`;if(z.format==="regex")return`Ungültiger String: muss dem Muster ${z.pattern} entsprechen`;return`Ungültig: ${U[z.format]??u.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${u.divisor} sein`;case"unrecognized_keys":return`${u.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${W(u.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${u.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${u.origin}`;default:return"Ungültige Eingabe"}}};function wJ(){return{localeError:eA()}}var sA=()=>{let $={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function I(u){return $[u]??null}let U={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;return`Invalid input: expected ${z}, received ${v}`}case"invalid_value":if(u.values.length===1)return`Invalid input: expected ${F(u.values[0])}`;return`Invalid option: expected one of ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`Too big: expected ${u.origin??"value"} to have ${z}${u.maximum.toString()} ${g.unit??"elements"}`;return`Too big: expected ${u.origin??"value"} to be ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`Too small: expected ${u.origin} to have ${z}${u.minimum.toString()} ${g.unit}`;return`Too small: expected ${u.origin} to be ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Invalid string: must start with "${z.prefix}"`;if(z.format==="ends_with")return`Invalid string: must end with "${z.suffix}"`;if(z.format==="includes")return`Invalid string: must include "${z.includes}"`;if(z.format==="regex")return`Invalid string: must match pattern ${z.pattern}`;return`Invalid ${U[z.format]??u.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${u.divisor}`;case"unrecognized_keys":return`Unrecognized key${u.keys.length>1?"s":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Invalid key in ${u.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${u.origin}`;default:return"Invalid input"}}};function T0(){return{localeError:sA()}}var $b=()=>{let $={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function I(u){return $[u]??null}let U={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},_={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Nevalida enigo: atendiĝis instanceof ${u.expected}, riceviĝis ${v}`;return`Nevalida enigo: atendiĝis ${z}, riceviĝis ${v}`}case"invalid_value":if(u.values.length===1)return`Nevalida enigo: atendiĝis ${F(u.values[0])}`;return`Nevalida opcio: atendiĝis unu el ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`Tro granda: atendiĝis ke ${u.origin??"valoro"} havu ${z}${u.maximum.toString()} ${g.unit??"elementojn"}`;return`Tro granda: atendiĝis ke ${u.origin??"valoro"} havu ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`Tro malgranda: atendiĝis ke ${u.origin} havu ${z}${u.minimum.toString()} ${g.unit}`;return`Tro malgranda: atendiĝis ke ${u.origin} estu ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Nevalida karaktraro: devas komenciĝi per "${z.prefix}"`;if(z.format==="ends_with")return`Nevalida karaktraro: devas finiĝi per "${z.suffix}"`;if(z.format==="includes")return`Nevalida karaktraro: devas inkluzivi "${z.includes}"`;if(z.format==="regex")return`Nevalida karaktraro: devas kongrui kun la modelo ${z.pattern}`;return`Nevalida ${U[z.format]??u.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${u.divisor}`;case"unrecognized_keys":return`Nekonata${u.keys.length>1?"j":""} ŝlosilo${u.keys.length>1?"j":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${u.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${u.origin}`;default:return"Nevalida enigo"}}};function EJ(){return{localeError:$b()}}var Ib=()=>{let $={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function I(u){return $[u]??null}let U={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},_={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Entrada inválida: se esperaba instanceof ${u.expected}, recibido ${v}`;return`Entrada inválida: se esperaba ${z}, recibido ${v}`}case"invalid_value":if(u.values.length===1)return`Entrada inválida: se esperaba ${F(u.values[0])}`;return`Opción inválida: se esperaba una de ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin),v=_[u.origin]??u.origin;if(g)return`Demasiado grande: se esperaba que ${v??"valor"} tuviera ${z}${u.maximum.toString()} ${g.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${v??"valor"} fuera ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin),v=_[u.origin]??u.origin;if(g)return`Demasiado pequeño: se esperaba que ${v} tuviera ${z}${u.minimum.toString()} ${g.unit}`;return`Demasiado pequeño: se esperaba que ${v} fuera ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Cadena inválida: debe comenzar con "${z.prefix}"`;if(z.format==="ends_with")return`Cadena inválida: debe terminar en "${z.suffix}"`;if(z.format==="includes")return`Cadena inválida: debe incluir "${z.includes}"`;if(z.format==="regex")return`Cadena inválida: debe coincidir con el patrón ${z.pattern}`;return`Inválido ${U[z.format]??u.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${u.divisor}`;case"unrecognized_keys":return`Llave${u.keys.length>1?"s":""} desconocida${u.keys.length>1?"s":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Llave inválida en ${_[u.origin]??u.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${_[u.origin]??u.origin}`;default:return"Entrada inválida"}}};function CJ(){return{localeError:Ib()}}var ub=()=>{let $={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function I(u){return $[u]??null}let U={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},_={nan:"NaN",number:"عدد",array:"آرایه"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`ورودی نامعتبر: می‌بایست instanceof ${u.expected} می‌بود، ${v} دریافت شد`;return`ورودی نامعتبر: می‌بایست ${z} می‌بود، ${v} دریافت شد`}case"invalid_value":if(u.values.length===1)return`ورودی نامعتبر: می‌بایست ${F(u.values[0])} می‌بود`;return`گزینه نامعتبر: می‌بایست یکی از ${W(u.values,"|")} می‌بود`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`خیلی بزرگ: ${u.origin??"مقدار"} باید ${z}${u.maximum.toString()} ${g.unit??"عنصر"} باشد`;return`خیلی بزرگ: ${u.origin??"مقدار"} باید ${z}${u.maximum.toString()} باشد`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`خیلی کوچک: ${u.origin} باید ${z}${u.minimum.toString()} ${g.unit} باشد`;return`خیلی کوچک: ${u.origin} باید ${z}${u.minimum.toString()} باشد`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`رشته نامعتبر: باید با "${z.prefix}" شروع شود`;if(z.format==="ends_with")return`رشته نامعتبر: باید با "${z.suffix}" تمام شود`;if(z.format==="includes")return`رشته نامعتبر: باید شامل "${z.includes}" باشد`;if(z.format==="regex")return`رشته نامعتبر: باید با الگوی ${z.pattern} مطابقت داشته باشد`;return`${U[z.format]??u.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${u.divisor} باشد`;case"unrecognized_keys":return`کلید${u.keys.length>1?"های":""} ناشناس: ${W(u.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${u.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${u.origin}`;default:return"ورودی نامعتبر"}}};function fJ(){return{localeError:ub()}}var Ub=()=>{let $={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function I(u){return $[u]??null}let U={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Virheellinen tyyppi: odotettiin instanceof ${u.expected}, oli ${v}`;return`Virheellinen tyyppi: odotettiin ${z}, oli ${v}`}case"invalid_value":if(u.values.length===1)return`Virheellinen syöte: täytyy olla ${F(u.values[0])}`;return`Virheellinen valinta: täytyy olla yksi seuraavista: ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`Liian suuri: ${g.subject} täytyy olla ${z}${u.maximum.toString()} ${g.unit}`.trim();return`Liian suuri: arvon täytyy olla ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`Liian pieni: ${g.subject} täytyy olla ${z}${u.minimum.toString()} ${g.unit}`.trim();return`Liian pieni: arvon täytyy olla ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Virheellinen syöte: täytyy alkaa "${z.prefix}"`;if(z.format==="ends_with")return`Virheellinen syöte: täytyy loppua "${z.suffix}"`;if(z.format==="includes")return`Virheellinen syöte: täytyy sisältää "${z.includes}"`;if(z.format==="regex")return`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${z.pattern}`;return`Virheellinen ${U[z.format]??u.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${u.divisor} monikerta`;case"unrecognized_keys":return`${u.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${W(u.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function xJ(){return{localeError:Ub()}}var _b=()=>{let $={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function I(u){return $[u]??null}let U={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},_={nan:"NaN",number:"nombre",array:"tableau"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Entrée invalide : instanceof ${u.expected} attendu, ${v} reçu`;return`Entrée invalide : ${z} attendu, ${v} reçu`}case"invalid_value":if(u.values.length===1)return`Entrée invalide : ${F(u.values[0])} attendu`;return`Option invalide : une valeur parmi ${W(u.values,"|")} attendue`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`Trop grand : ${u.origin??"valeur"} doit ${g.verb} ${z}${u.maximum.toString()} ${g.unit??"élément(s)"}`;return`Trop grand : ${u.origin??"valeur"} doit être ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`Trop petit : ${u.origin} doit ${g.verb} ${z}${u.minimum.toString()} ${g.unit}`;return`Trop petit : ${u.origin} doit être ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Chaîne invalide : doit commencer par "${z.prefix}"`;if(z.format==="ends_with")return`Chaîne invalide : doit se terminer par "${z.suffix}"`;if(z.format==="includes")return`Chaîne invalide : doit inclure "${z.includes}"`;if(z.format==="regex")return`Chaîne invalide : doit correspondre au modèle ${z.pattern}`;return`${U[z.format]??u.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${u.divisor}`;case"unrecognized_keys":return`Clé${u.keys.length>1?"s":""} non reconnue${u.keys.length>1?"s":""} : ${W(u.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${u.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${u.origin}`;default:return"Entrée invalide"}}};function kJ(){return{localeError:_b()}}var zb=()=>{let $={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function I(u){return $[u]??null}let U={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Entrée invalide : attendu instanceof ${u.expected}, reçu ${v}`;return`Entrée invalide : attendu ${z}, reçu ${v}`}case"invalid_value":if(u.values.length===1)return`Entrée invalide : attendu ${F(u.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"≤":"<",g=I(u.origin);if(g)return`Trop grand : attendu que ${u.origin??"la valeur"} ait ${z}${u.maximum.toString()} ${g.unit}`;return`Trop grand : attendu que ${u.origin??"la valeur"} soit ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?"≥":">",g=I(u.origin);if(g)return`Trop petit : attendu que ${u.origin} ait ${z}${u.minimum.toString()} ${g.unit}`;return`Trop petit : attendu que ${u.origin} soit ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Chaîne invalide : doit commencer par "${z.prefix}"`;if(z.format==="ends_with")return`Chaîne invalide : doit se terminer par "${z.suffix}"`;if(z.format==="includes")return`Chaîne invalide : doit inclure "${z.includes}"`;if(z.format==="regex")return`Chaîne invalide : doit correspondre au motif ${z.pattern}`;return`${U[z.format]??u.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${u.divisor}`;case"unrecognized_keys":return`Clé${u.keys.length>1?"s":""} non reconnue${u.keys.length>1?"s":""} : ${W(u.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${u.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${u.origin}`;default:return"Entrée invalide"}}};function yJ(){return{localeError:zb()}}var gb=()=>{let $={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},I={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},U=(N)=>N?$[N]:void 0,_=(N)=>{let X=U(N);if(X)return X.label;return N??$.unknown.label},u=(N)=>`ה${_(N)}`,z=(N)=>{return(U(N)?.gender??"m")==="f"?"צריכה להיות":"צריך להיות"},g=(N)=>{if(!N)return null;return I[N]??null},v={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},J={nan:"NaN"};return(N)=>{switch(N.code){case"invalid_type":{let X=N.expected,G=J[X??""]??_(X),q=S(N.input),T=J[q]??$[q]?.label??q;if(/^[A-Z]/.test(N.expected))return`קלט לא תקין: צריך להיות instanceof ${N.expected}, התקבל ${T}`;return`קלט לא תקין: צריך להיות ${G}, התקבל ${T}`}case"invalid_value":{if(N.values.length===1)return`ערך לא תקין: הערך חייב להיות ${F(N.values[0])}`;let X=N.values.map((T)=>F(T));if(N.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${X[0]} או ${X[1]}`;let G=X[X.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${X.slice(0,-1).join(", ")} או ${G}`}case"too_big":{let X=g(N.origin),G=u(N.origin??"value");if(N.origin==="string")return`${X?.longLabel??"ארוך"} מדי: ${G} צריכה להכיל ${N.maximum.toString()} ${X?.unit??""} ${N.inclusive?"או פחות":"לכל היותר"}`.trim();if(N.origin==="number"){let H=N.inclusive?`קטן או שווה ל-${N.maximum}`:`קטן מ-${N.maximum}`;return`גדול מדי: ${G} צריך להיות ${H}`}if(N.origin==="array"||N.origin==="set"){let H=N.origin==="set"?"צריכה":"צריך",Q=N.inclusive?`${N.maximum} ${X?.unit??""} או פחות`:`פחות מ-${N.maximum} ${X?.unit??""}`;return`גדול מדי: ${G} ${H} להכיל ${Q}`.trim()}let q=N.inclusive?"<=":"<",T=z(N.origin??"value");if(X?.unit)return`${X.longLabel} מדי: ${G} ${T} ${q}${N.maximum.toString()} ${X.unit}`;return`${X?.longLabel??"גדול"} מדי: ${G} ${T} ${q}${N.maximum.toString()}`}case"too_small":{let X=g(N.origin),G=u(N.origin??"value");if(N.origin==="string")return`${X?.shortLabel??"קצר"} מדי: ${G} צריכה להכיל ${N.minimum.toString()} ${X?.unit??""} ${N.inclusive?"או יותר":"לפחות"}`.trim();if(N.origin==="number"){let H=N.inclusive?`גדול או שווה ל-${N.minimum}`:`גדול מ-${N.minimum}`;return`קטן מדי: ${G} צריך להיות ${H}`}if(N.origin==="array"||N.origin==="set"){let H=N.origin==="set"?"צריכה":"צריך";if(N.minimum===1&&N.inclusive){let Y=N.origin==="set"?"לפחות פריט אחד":"לפחות פריט אחד";return`קטן מדי: ${G} ${H} להכיל ${Y}`}let Q=N.inclusive?`${N.minimum} ${X?.unit??""} או יותר`:`יותר מ-${N.minimum} ${X?.unit??""}`;return`קטן מדי: ${G} ${H} להכיל ${Q}`.trim()}let q=N.inclusive?">=":">",T=z(N.origin??"value");if(X?.unit)return`${X.shortLabel} מדי: ${G} ${T} ${q}${N.minimum.toString()} ${X.unit}`;return`${X?.shortLabel??"קטן"} מדי: ${G} ${T} ${q}${N.minimum.toString()}`}case"invalid_format":{let X=N;if(X.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${X.prefix}"`;if(X.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${X.suffix}"`;if(X.format==="includes")return`המחרוזת חייבת לכלול "${X.includes}"`;if(X.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${X.pattern}`;let G=v[X.format],q=G?.label??X.format,H=(G?.gender??"m")==="f"?"תקינה":"תקין";return`${q} לא ${H}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${N.divisor}`;case"unrecognized_keys":return`מפתח${N.keys.length>1?"ות":""} לא מזוה${N.keys.length>1?"ים":"ה"}: ${W(N.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${u(N.origin??"array")}`;default:return"קלט לא תקין"}}};function iJ(){return{localeError:gb()}}var vb=()=>{let $={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function I(u){return $[u]??null}let U={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},_={nan:"NaN",number:"szám",array:"tömb"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Érvénytelen bemenet: a várt érték instanceof ${u.expected}, a kapott érték ${v}`;return`Érvénytelen bemenet: a várt érték ${z}, a kapott érték ${v}`}case"invalid_value":if(u.values.length===1)return`Érvénytelen bemenet: a várt érték ${F(u.values[0])}`;return`Érvénytelen opció: valamelyik érték várt ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`Túl nagy: ${u.origin??"érték"} mérete túl nagy ${z}${u.maximum.toString()} ${g.unit??"elem"}`;return`Túl nagy: a bemeneti érték ${u.origin??"érték"} túl nagy: ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`Túl kicsi: a bemeneti érték ${u.origin} mérete túl kicsi ${z}${u.minimum.toString()} ${g.unit}`;return`Túl kicsi: a bemeneti érték ${u.origin} túl kicsi ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Érvénytelen string: "${z.prefix}" értékkel kell kezdődnie`;if(z.format==="ends_with")return`Érvénytelen string: "${z.suffix}" értékkel kell végződnie`;if(z.format==="includes")return`Érvénytelen string: "${z.includes}" értéket kell tartalmaznia`;if(z.format==="regex")return`Érvénytelen string: ${z.pattern} mintának kell megfelelnie`;return`Érvénytelen ${U[z.format]??u.format}`}case"not_multiple_of":return`Érvénytelen szám: ${u.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${u.keys.length>1?"s":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${u.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${u.origin}`;default:return"Érvénytelen bemenet"}}};function nJ(){return{localeError:vb()}}function a5($,I,U){return Math.abs($)===1?I:U}function r1($){if(!$)return"";let I=["ա","ե","ը","ի","ո","ու","օ"],U=$[$.length-1];return $+(I.includes(U)?"ն":"ը")}var Jb=()=>{let $={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function I(u){return $[u]??null}let U={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},_={nan:"NaN",number:"թիվ",array:"զանգված"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Սխալ մուտքագրում․ սպասվում էր instanceof ${u.expected}, ստացվել է ${v}`;return`Սխալ մուտքագրում․ սպասվում էր ${z}, ստացվել է ${v}`}case"invalid_value":if(u.values.length===1)return`Սխալ մուտքագրում․ սպասվում էր ${F(u.values[1])}`;return`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g){let v=Number(u.maximum),J=a5(v,g.unit.one,g.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${r1(u.origin??"արժեք")} կունենա ${z}${u.maximum.toString()} ${J}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${r1(u.origin??"արժեք")} լինի ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g){let v=Number(u.minimum),J=a5(v,g.unit.one,g.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${r1(u.origin)} կունենա ${z}${u.minimum.toString()} ${J}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${r1(u.origin)} լինի ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Սխալ տող․ պետք է սկսվի "${z.prefix}"-ով`;if(z.format==="ends_with")return`Սխալ տող․ պետք է ավարտվի "${z.suffix}"-ով`;if(z.format==="includes")return`Սխալ տող․ պետք է պարունակի "${z.includes}"`;if(z.format==="regex")return`Սխալ տող․ պետք է համապատասխանի ${z.pattern} ձևաչափին`;return`Սխալ ${U[z.format]??u.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${u.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${u.keys.length>1?"ներ":""}. ${W(u.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${r1(u.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${r1(u.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};function rJ(){return{localeError:Jb()}}var Nb=()=>{let $={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function I(u){return $[u]??null}let U={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Input tidak valid: diharapkan instanceof ${u.expected}, diterima ${v}`;return`Input tidak valid: diharapkan ${z}, diterima ${v}`}case"invalid_value":if(u.values.length===1)return`Input tidak valid: diharapkan ${F(u.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`Terlalu besar: diharapkan ${u.origin??"value"} memiliki ${z}${u.maximum.toString()} ${g.unit??"elemen"}`;return`Terlalu besar: diharapkan ${u.origin??"value"} menjadi ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`Terlalu kecil: diharapkan ${u.origin} memiliki ${z}${u.minimum.toString()} ${g.unit}`;return`Terlalu kecil: diharapkan ${u.origin} menjadi ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`String tidak valid: harus dimulai dengan "${z.prefix}"`;if(z.format==="ends_with")return`String tidak valid: harus berakhir dengan "${z.suffix}"`;if(z.format==="includes")return`String tidak valid: harus menyertakan "${z.includes}"`;if(z.format==="regex")return`String tidak valid: harus sesuai pola ${z.pattern}`;return`${U[z.format]??u.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${u.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${u.keys.length>1?"s":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${u.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${u.origin}`;default:return"Input tidak valid"}}};function lJ(){return{localeError:Nb()}}var Gb=()=>{let $={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function I(u){return $[u]??null}let U={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"},_={nan:"NaN",number:"númer",array:"fylki"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Rangt gildi: Þú slóst inn ${v} þar sem á að vera instanceof ${u.expected}`;return`Rangt gildi: Þú slóst inn ${v} þar sem á að vera ${z}`}case"invalid_value":if(u.values.length===1)return`Rangt gildi: gert ráð fyrir ${F(u.values[0])}`;return`Ógilt val: má vera eitt af eftirfarandi ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`Of stórt: gert er ráð fyrir að ${u.origin??"gildi"} hafi ${z}${u.maximum.toString()} ${g.unit??"hluti"}`;return`Of stórt: gert er ráð fyrir að ${u.origin??"gildi"} sé ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`Of lítið: gert er ráð fyrir að ${u.origin} hafi ${z}${u.minimum.toString()} ${g.unit}`;return`Of lítið: gert er ráð fyrir að ${u.origin} sé ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Ógildur strengur: verður að byrja á "${z.prefix}"`;if(z.format==="ends_with")return`Ógildur strengur: verður að enda á "${z.suffix}"`;if(z.format==="includes")return`Ógildur strengur: verður að innihalda "${z.includes}"`;if(z.format==="regex")return`Ógildur strengur: verður að fylgja mynstri ${z.pattern}`;return`Rangt ${U[z.format]??u.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${u.divisor}`;case"unrecognized_keys":return`Óþekkt ${u.keys.length>1?"ir lyklar":"ur lykill"}: ${W(u.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${u.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${u.origin}`;default:return"Rangt gildi"}}};function mJ(){return{localeError:Gb()}}var Xb=()=>{let $={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function I(u){return $[u]??null}let U={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},_={nan:"NaN",number:"numero",array:"vettore"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Input non valido: atteso instanceof ${u.expected}, ricevuto ${v}`;return`Input non valido: atteso ${z}, ricevuto ${v}`}case"invalid_value":if(u.values.length===1)return`Input non valido: atteso ${F(u.values[0])}`;return`Opzione non valida: atteso uno tra ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`Troppo grande: ${u.origin??"valore"} deve avere ${z}${u.maximum.toString()} ${g.unit??"elementi"}`;return`Troppo grande: ${u.origin??"valore"} deve essere ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`Troppo piccolo: ${u.origin} deve avere ${z}${u.minimum.toString()} ${g.unit}`;return`Troppo piccolo: ${u.origin} deve essere ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Stringa non valida: deve iniziare con "${z.prefix}"`;if(z.format==="ends_with")return`Stringa non valida: deve terminare con "${z.suffix}"`;if(z.format==="includes")return`Stringa non valida: deve includere "${z.includes}"`;if(z.format==="regex")return`Stringa non valida: deve corrispondere al pattern ${z.pattern}`;return`Invalid ${U[z.format]??u.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${u.divisor}`;case"unrecognized_keys":return`Chiav${u.keys.length>1?"i":"e"} non riconosciut${u.keys.length>1?"e":"a"}: ${W(u.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${u.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${u.origin}`;default:return"Input non valido"}}};function hJ(){return{localeError:Xb()}}var qb=()=>{let $={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function I(u){return $[u]??null}let U={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},_={nan:"NaN",number:"数値",array:"配列"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`無効な入力: instanceof ${u.expected}が期待されましたが、${v}が入力されました`;return`無効な入力: ${z}が期待されましたが、${v}が入力されました`}case"invalid_value":if(u.values.length===1)return`無効な入力: ${F(u.values[0])}が期待されました`;return`無効な選択: ${W(u.values,"、")}のいずれかである必要があります`;case"too_big":{let z=u.inclusive?"以下である":"より小さい",g=I(u.origin);if(g)return`大きすぎる値: ${u.origin??"値"}は${u.maximum.toString()}${g.unit??"要素"}${z}必要があります`;return`大きすぎる値: ${u.origin??"値"}は${u.maximum.toString()}${z}必要があります`}case"too_small":{let z=u.inclusive?"以上である":"より大きい",g=I(u.origin);if(g)return`小さすぎる値: ${u.origin}は${u.minimum.toString()}${g.unit}${z}必要があります`;return`小さすぎる値: ${u.origin}は${u.minimum.toString()}${z}必要があります`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`無効な文字列: "${z.prefix}"で始まる必要があります`;if(z.format==="ends_with")return`無効な文字列: "${z.suffix}"で終わる必要があります`;if(z.format==="includes")return`無効な文字列: "${z.includes}"を含む必要があります`;if(z.format==="regex")return`無効な文字列: パターン${z.pattern}に一致する必要があります`;return`無効な${U[z.format]??u.format}`}case"not_multiple_of":return`無効な数値: ${u.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${u.keys.length>1?"群":""}: ${W(u.keys,"、")}`;case"invalid_key":return`${u.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${u.origin}内の無効な値`;default:return"無効な入力"}}};function cJ(){return{localeError:qb()}}var Qb=()=>{let $={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function I(u){return $[u]??null}let U={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},_={nan:"NaN",number:"რიცხვი",string:"სტრინგი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`არასწორი შეყვანა: მოსალოდნელი instanceof ${u.expected}, მიღებული ${v}`;return`არასწორი შეყვანა: მოსალოდნელი ${z}, მიღებული ${v}`}case"invalid_value":if(u.values.length===1)return`არასწორი შეყვანა: მოსალოდნელი ${F(u.values[0])}`;return`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${W(u.values,"|")}-დან`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`ზედმეტად დიდი: მოსალოდნელი ${u.origin??"მნიშვნელობა"} ${g.verb} ${z}${u.maximum.toString()} ${g.unit}`;return`ზედმეტად დიდი: მოსალოდნელი ${u.origin??"მნიშვნელობა"} იყოს ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`ზედმეტად პატარა: მოსალოდნელი ${u.origin} ${g.verb} ${z}${u.minimum.toString()} ${g.unit}`;return`ზედმეტად პატარა: მოსალოდნელი ${u.origin} იყოს ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`არასწორი სტრინგი: უნდა იწყებოდეს "${z.prefix}"-ით`;if(z.format==="ends_with")return`არასწორი სტრინგი: უნდა მთავრდებოდეს "${z.suffix}"-ით`;if(z.format==="includes")return`არასწორი სტრინგი: უნდა შეიცავდეს "${z.includes}"-ს`;if(z.format==="regex")return`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${z.pattern}`;return`არასწორი ${U[z.format]??u.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${u.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${u.keys.length>1?"ები":"ი"}: ${W(u.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${u.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${u.origin}-ში`;default:return"არასწორი შეყვანა"}}};function dJ(){return{localeError:Qb()}}var Tb=()=>{let $={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function I(u){return $[u]??null}let U={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},_={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${u.expected} ប៉ុន្តែទទួលបាន ${v}`;return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${z} ប៉ុន្តែទទួលបាន ${v}`}case"invalid_value":if(u.values.length===1)return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${F(u.values[0])}`;return`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`ធំពេក៖ ត្រូវការ ${u.origin??"តម្លៃ"} ${z} ${u.maximum.toString()} ${g.unit??"ធាតុ"}`;return`ធំពេក៖ ត្រូវការ ${u.origin??"តម្លៃ"} ${z} ${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`តូចពេក៖ ត្រូវការ ${u.origin} ${z} ${u.minimum.toString()} ${g.unit}`;return`តូចពេក៖ ត្រូវការ ${u.origin} ${z} ${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${z.prefix}"`;if(z.format==="ends_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${z.suffix}"`;if(z.format==="includes")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${z.includes}"`;if(z.format==="regex")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${z.pattern}`;return`មិនត្រឹមត្រូវ៖ ${U[z.format]??u.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${u.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${W(u.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${u.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${u.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function H0(){return{localeError:Tb()}}function pJ(){return H0()}var Hb=()=>{let $={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function I(u){return $[u]??null}let U={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`잘못된 입력: 예상 타입은 instanceof ${u.expected}, 받은 타입은 ${v}입니다`;return`잘못된 입력: 예상 타입은 ${z}, 받은 타입은 ${v}입니다`}case"invalid_value":if(u.values.length===1)return`잘못된 입력: 값은 ${F(u.values[0])} 이어야 합니다`;return`잘못된 옵션: ${W(u.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let z=u.inclusive?"이하":"미만",g=z==="미만"?"이어야 합니다":"여야 합니다",v=I(u.origin),J=v?.unit??"요소";if(v)return`${u.origin??"값"}이 너무 큽니다: ${u.maximum.toString()}${J} ${z}${g}`;return`${u.origin??"값"}이 너무 큽니다: ${u.maximum.toString()} ${z}${g}`}case"too_small":{let z=u.inclusive?"이상":"초과",g=z==="이상"?"이어야 합니다":"여야 합니다",v=I(u.origin),J=v?.unit??"요소";if(v)return`${u.origin??"값"}이 너무 작습니다: ${u.minimum.toString()}${J} ${z}${g}`;return`${u.origin??"값"}이 너무 작습니다: ${u.minimum.toString()} ${z}${g}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`잘못된 문자열: "${z.prefix}"(으)로 시작해야 합니다`;if(z.format==="ends_with")return`잘못된 문자열: "${z.suffix}"(으)로 끝나야 합니다`;if(z.format==="includes")return`잘못된 문자열: "${z.includes}"을(를) 포함해야 합니다`;if(z.format==="regex")return`잘못된 문자열: 정규식 ${z.pattern} 패턴과 일치해야 합니다`;return`잘못된 ${U[z.format]??u.format}`}case"not_multiple_of":return`잘못된 숫자: ${u.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${W(u.keys,", ")}`;case"invalid_key":return`잘못된 키: ${u.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${u.origin}`;default:return"잘못된 입력"}}};function oJ(){return{localeError:Hb()}}var Y0=($)=>{return $.charAt(0).toUpperCase()+$.slice(1)};function e5($){let I=Math.abs($),U=I%10,_=I%100;if(_>=11&&_<=19||U===0)return"many";if(U===1)return"one";return"few"}var Yb=()=>{let $={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function I(u,z,g,v){let J=$[u]??null;if(J===null)return J;return{unit:J.unit[z],verb:J.verb[v][g?"inclusive":"notInclusive"]}}let U={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},_={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Gautas tipas ${v}, o tikėtasi - instanceof ${u.expected}`;return`Gautas tipas ${v}, o tikėtasi - ${z}`}case"invalid_value":if(u.values.length===1)return`Privalo būti ${F(u.values[0])}`;return`Privalo būti vienas iš ${W(u.values,"|")} pasirinkimų`;case"too_big":{let z=_[u.origin]??u.origin,g=I(u.origin,e5(Number(u.maximum)),u.inclusive??!1,"smaller");if(g?.verb)return`${Y0(z??u.origin??"reikšmė")} ${g.verb} ${u.maximum.toString()} ${g.unit??"elementų"}`;let v=u.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${Y0(z??u.origin??"reikšmė")} turi būti ${v} ${u.maximum.toString()} ${g?.unit}`}case"too_small":{let z=_[u.origin]??u.origin,g=I(u.origin,e5(Number(u.minimum)),u.inclusive??!1,"bigger");if(g?.verb)return`${Y0(z??u.origin??"reikšmė")} ${g.verb} ${u.minimum.toString()} ${g.unit??"elementų"}`;let v=u.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${Y0(z??u.origin??"reikšmė")} turi būti ${v} ${u.minimum.toString()} ${g?.unit}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Eilutė privalo prasidėti "${z.prefix}"`;if(z.format==="ends_with")return`Eilutė privalo pasibaigti "${z.suffix}"`;if(z.format==="includes")return`Eilutė privalo įtraukti "${z.includes}"`;if(z.format==="regex")return`Eilutė privalo atitikti ${z.pattern}`;return`Neteisingas ${U[z.format]??u.format}`}case"not_multiple_of":return`Skaičius privalo būti ${u.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${u.keys.length>1?"i":"as"} rakt${u.keys.length>1?"ai":"as"}: ${W(u.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{let z=_[u.origin]??u.origin;return`${Y0(z??u.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function tJ(){return{localeError:Yb()}}var Ob=()=>{let $={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function I(u){return $[u]??null}let U={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},_={nan:"NaN",number:"број",array:"низа"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Грешен внес: се очекува instanceof ${u.expected}, примено ${v}`;return`Грешен внес: се очекува ${z}, примено ${v}`}case"invalid_value":if(u.values.length===1)return`Invalid input: expected ${F(u.values[0])}`;return`Грешана опција: се очекува една ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`Премногу голем: се очекува ${u.origin??"вредноста"} да има ${z}${u.maximum.toString()} ${g.unit??"елементи"}`;return`Премногу голем: се очекува ${u.origin??"вредноста"} да биде ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`Премногу мал: се очекува ${u.origin} да има ${z}${u.minimum.toString()} ${g.unit}`;return`Премногу мал: се очекува ${u.origin} да биде ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Неважечка низа: мора да започнува со "${z.prefix}"`;if(z.format==="ends_with")return`Неважечка низа: мора да завршува со "${z.suffix}"`;if(z.format==="includes")return`Неважечка низа: мора да вклучува "${z.includes}"`;if(z.format==="regex")return`Неважечка низа: мора да одгоара на патернот ${z.pattern}`;return`Invalid ${U[z.format]??u.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${W(u.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${u.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${u.origin}`;default:return"Грешен внес"}}};function aJ(){return{localeError:Ob()}}var Vb=()=>{let $={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function I(u){return $[u]??null}let U={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},_={nan:"NaN",number:"nombor"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Input tidak sah: dijangka instanceof ${u.expected}, diterima ${v}`;return`Input tidak sah: dijangka ${z}, diterima ${v}`}case"invalid_value":if(u.values.length===1)return`Input tidak sah: dijangka ${F(u.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`Terlalu besar: dijangka ${u.origin??"nilai"} ${g.verb} ${z}${u.maximum.toString()} ${g.unit??"elemen"}`;return`Terlalu besar: dijangka ${u.origin??"nilai"} adalah ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`Terlalu kecil: dijangka ${u.origin} ${g.verb} ${z}${u.minimum.toString()} ${g.unit}`;return`Terlalu kecil: dijangka ${u.origin} adalah ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`String tidak sah: mesti bermula dengan "${z.prefix}"`;if(z.format==="ends_with")return`String tidak sah: mesti berakhir dengan "${z.suffix}"`;if(z.format==="includes")return`String tidak sah: mesti mengandungi "${z.includes}"`;if(z.format==="regex")return`String tidak sah: mesti sepadan dengan corak ${z.pattern}`;return`${U[z.format]??u.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${u.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${W(u.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${u.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${u.origin}`;default:return"Input tidak sah"}}};function eJ(){return{localeError:Vb()}}var Bb=()=>{let $={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function I(u){return $[u]??null}let U={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},_={nan:"NaN",number:"getal"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Ongeldige invoer: verwacht instanceof ${u.expected}, ontving ${v}`;return`Ongeldige invoer: verwacht ${z}, ontving ${v}`}case"invalid_value":if(u.values.length===1)return`Ongeldige invoer: verwacht ${F(u.values[0])}`;return`Ongeldige optie: verwacht één van ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin),v=u.origin==="date"?"laat":u.origin==="string"?"lang":"groot";if(g)return`Te ${v}: verwacht dat ${u.origin??"waarde"} ${z}${u.maximum.toString()} ${g.unit??"elementen"} ${g.verb}`;return`Te ${v}: verwacht dat ${u.origin??"waarde"} ${z}${u.maximum.toString()} is`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin),v=u.origin==="date"?"vroeg":u.origin==="string"?"kort":"klein";if(g)return`Te ${v}: verwacht dat ${u.origin} ${z}${u.minimum.toString()} ${g.unit} ${g.verb}`;return`Te ${v}: verwacht dat ${u.origin} ${z}${u.minimum.toString()} is`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Ongeldige tekst: moet met "${z.prefix}" beginnen`;if(z.format==="ends_with")return`Ongeldige tekst: moet op "${z.suffix}" eindigen`;if(z.format==="includes")return`Ongeldige tekst: moet "${z.includes}" bevatten`;if(z.format==="regex")return`Ongeldige tekst: moet overeenkomen met patroon ${z.pattern}`;return`Ongeldig: ${U[z.format]??u.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${u.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${u.keys.length>1?"s":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${u.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${u.origin}`;default:return"Ongeldige invoer"}}};function sJ(){return{localeError:Bb()}}var Db=()=>{let $={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function I(u){return $[u]??null}let U={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},_={nan:"NaN",number:"tall",array:"liste"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Ugyldig input: forventet instanceof ${u.expected}, fikk ${v}`;return`Ugyldig input: forventet ${z}, fikk ${v}`}case"invalid_value":if(u.values.length===1)return`Ugyldig verdi: forventet ${F(u.values[0])}`;return`Ugyldig valg: forventet en av ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`For stor(t): forventet ${u.origin??"value"} til å ha ${z}${u.maximum.toString()} ${g.unit??"elementer"}`;return`For stor(t): forventet ${u.origin??"value"} til å ha ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`For lite(n): forventet ${u.origin} til å ha ${z}${u.minimum.toString()} ${g.unit}`;return`For lite(n): forventet ${u.origin} til å ha ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Ugyldig streng: må starte med "${z.prefix}"`;if(z.format==="ends_with")return`Ugyldig streng: må ende med "${z.suffix}"`;if(z.format==="includes")return`Ugyldig streng: må inneholde "${z.includes}"`;if(z.format==="regex")return`Ugyldig streng: må matche mønsteret ${z.pattern}`;return`Ugyldig ${U[z.format]??u.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${W(u.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${u.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${u.origin}`;default:return"Ugyldig input"}}};function $N(){return{localeError:Db()}}var Mb=()=>{let $={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function I(u){return $[u]??null}let U={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},_={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Fâsit giren: umulan instanceof ${u.expected}, alınan ${v}`;return`Fâsit giren: umulan ${z}, alınan ${v}`}case"invalid_value":if(u.values.length===1)return`Fâsit giren: umulan ${F(u.values[0])}`;return`Fâsit tercih: mûteberler ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`Fazla büyük: ${u.origin??"value"}, ${z}${u.maximum.toString()} ${g.unit??"elements"} sahip olmalıydı.`;return`Fazla büyük: ${u.origin??"value"}, ${z}${u.maximum.toString()} olmalıydı.`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`Fazla küçük: ${u.origin}, ${z}${u.minimum.toString()} ${g.unit} sahip olmalıydı.`;return`Fazla küçük: ${u.origin}, ${z}${u.minimum.toString()} olmalıydı.`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Fâsit metin: "${z.prefix}" ile başlamalı.`;if(z.format==="ends_with")return`Fâsit metin: "${z.suffix}" ile bitmeli.`;if(z.format==="includes")return`Fâsit metin: "${z.includes}" ihtivâ etmeli.`;if(z.format==="regex")return`Fâsit metin: ${z.pattern} nakşına uymalı.`;return`Fâsit ${U[z.format]??u.format}`}case"not_multiple_of":return`Fâsit sayı: ${u.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${u.keys.length>1?"s":""}: ${W(u.keys,", ")}`;case"invalid_key":return`${u.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${u.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function IN(){return{localeError:Mb()}}var Kb=()=>{let $={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function I(u){return $[u]??null}let U={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},_={nan:"NaN",number:"عدد",array:"ارې"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`ناسم ورودي: باید instanceof ${u.expected} وای, مګر ${v} ترلاسه شو`;return`ناسم ورودي: باید ${z} وای, مګر ${v} ترلاسه شو`}case"invalid_value":if(u.values.length===1)return`ناسم ورودي: باید ${F(u.values[0])} وای`;return`ناسم انتخاب: باید یو له ${W(u.values,"|")} څخه وای`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`ډیر لوی: ${u.origin??"ارزښت"} باید ${z}${u.maximum.toString()} ${g.unit??"عنصرونه"} ولري`;return`ډیر لوی: ${u.origin??"ارزښت"} باید ${z}${u.maximum.toString()} وي`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`ډیر کوچنی: ${u.origin} باید ${z}${u.minimum.toString()} ${g.unit} ولري`;return`ډیر کوچنی: ${u.origin} باید ${z}${u.minimum.toString()} وي`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`ناسم متن: باید د "${z.prefix}" سره پیل شي`;if(z.format==="ends_with")return`ناسم متن: باید د "${z.suffix}" سره پای ته ورسيږي`;if(z.format==="includes")return`ناسم متن: باید "${z.includes}" ولري`;if(z.format==="regex")return`ناسم متن: باید د ${z.pattern} سره مطابقت ولري`;return`${U[z.format]??u.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${u.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${u.keys.length>1?"کلیډونه":"کلیډ"}: ${W(u.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${u.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${u.origin} کې`;default:return"ناسمه ورودي"}}};function uN(){return{localeError:Kb()}}var Rb=()=>{let $={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function I(u){return $[u]??null}let U={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},_={nan:"NaN",number:"liczba",array:"tablica"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${u.expected}, otrzymano ${v}`;return`Nieprawidłowe dane wejściowe: oczekiwano ${z}, otrzymano ${v}`}case"invalid_value":if(u.values.length===1)return`Nieprawidłowe dane wejściowe: oczekiwano ${F(u.values[0])}`;return`Nieprawidłowa opcja: oczekiwano jednej z wartości ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`Za duża wartość: oczekiwano, że ${u.origin??"wartość"} będzie mieć ${z}${u.maximum.toString()} ${g.unit??"elementów"}`;return`Zbyt duż(y/a/e): oczekiwano, że ${u.origin??"wartość"} będzie wynosić ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`Za mała wartość: oczekiwano, że ${u.origin??"wartość"} będzie mieć ${z}${u.minimum.toString()} ${g.unit??"elementów"}`;return`Zbyt mał(y/a/e): oczekiwano, że ${u.origin??"wartość"} będzie wynosić ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Nieprawidłowy ciąg znaków: musi zaczynać się od "${z.prefix}"`;if(z.format==="ends_with")return`Nieprawidłowy ciąg znaków: musi kończyć się na "${z.suffix}"`;if(z.format==="includes")return`Nieprawidłowy ciąg znaków: musi zawierać "${z.includes}"`;if(z.format==="regex")return`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${z.pattern}`;return`Nieprawidłow(y/a/e) ${U[z.format]??u.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${u.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${u.keys.length>1?"s":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${u.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${u.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function UN(){return{localeError:Rb()}}var Lb=()=>{let $={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function I(u){return $[u]??null}let U={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},_={nan:"NaN",number:"número",null:"nulo"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Tipo inválido: esperado instanceof ${u.expected}, recebido ${v}`;return`Tipo inválido: esperado ${z}, recebido ${v}`}case"invalid_value":if(u.values.length===1)return`Entrada inválida: esperado ${F(u.values[0])}`;return`Opção inválida: esperada uma das ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`Muito grande: esperado que ${u.origin??"valor"} tivesse ${z}${u.maximum.toString()} ${g.unit??"elementos"}`;return`Muito grande: esperado que ${u.origin??"valor"} fosse ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`Muito pequeno: esperado que ${u.origin} tivesse ${z}${u.minimum.toString()} ${g.unit}`;return`Muito pequeno: esperado que ${u.origin} fosse ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Texto inválido: deve começar com "${z.prefix}"`;if(z.format==="ends_with")return`Texto inválido: deve terminar com "${z.suffix}"`;if(z.format==="includes")return`Texto inválido: deve incluir "${z.includes}"`;if(z.format==="regex")return`Texto inválido: deve corresponder ao padrão ${z.pattern}`;return`${U[z.format]??u.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${u.divisor}`;case"unrecognized_keys":return`Chave${u.keys.length>1?"s":""} desconhecida${u.keys.length>1?"s":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Chave inválida em ${u.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${u.origin}`;default:return"Campo inválido"}}};function _N(){return{localeError:Lb()}}function s5($,I,U,_){let u=Math.abs($),z=u%10,g=u%100;if(g>=11&&g<=19)return _;if(z===1)return I;if(z>=2&&z<=4)return U;return _}var Wb=()=>{let $={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function I(u){return $[u]??null}let U={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},_={nan:"NaN",number:"число",array:"массив"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Неверный ввод: ожидалось instanceof ${u.expected}, получено ${v}`;return`Неверный ввод: ожидалось ${z}, получено ${v}`}case"invalid_value":if(u.values.length===1)return`Неверный ввод: ожидалось ${F(u.values[0])}`;return`Неверный вариант: ожидалось одно из ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g){let v=Number(u.maximum),J=s5(v,g.unit.one,g.unit.few,g.unit.many);return`Слишком большое значение: ожидалось, что ${u.origin??"значение"} будет иметь ${z}${u.maximum.toString()} ${J}`}return`Слишком большое значение: ожидалось, что ${u.origin??"значение"} будет ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g){let v=Number(u.minimum),J=s5(v,g.unit.one,g.unit.few,g.unit.many);return`Слишком маленькое значение: ожидалось, что ${u.origin} будет иметь ${z}${u.minimum.toString()} ${J}`}return`Слишком маленькое значение: ожидалось, что ${u.origin} будет ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Неверная строка: должна начинаться с "${z.prefix}"`;if(z.format==="ends_with")return`Неверная строка: должна заканчиваться на "${z.suffix}"`;if(z.format==="includes")return`Неверная строка: должна содержать "${z.includes}"`;if(z.format==="regex")return`Неверная строка: должна соответствовать шаблону ${z.pattern}`;return`Неверный ${U[z.format]??u.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${u.divisor}`;case"unrecognized_keys":return`Нераспознанн${u.keys.length>1?"ые":"ый"} ключ${u.keys.length>1?"и":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${u.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${u.origin}`;default:return"Неверные входные данные"}}};function zN(){return{localeError:Wb()}}var Pb=()=>{let $={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function I(u){return $[u]??null}let U={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"},_={nan:"NaN",number:"število",array:"tabela"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Neveljaven vnos: pričakovano instanceof ${u.expected}, prejeto ${v}`;return`Neveljaven vnos: pričakovano ${z}, prejeto ${v}`}case"invalid_value":if(u.values.length===1)return`Neveljaven vnos: pričakovano ${F(u.values[0])}`;return`Neveljavna možnost: pričakovano eno izmed ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`Preveliko: pričakovano, da bo ${u.origin??"vrednost"} imelo ${z}${u.maximum.toString()} ${g.unit??"elementov"}`;return`Preveliko: pričakovano, da bo ${u.origin??"vrednost"} ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`Premajhno: pričakovano, da bo ${u.origin} imelo ${z}${u.minimum.toString()} ${g.unit}`;return`Premajhno: pričakovano, da bo ${u.origin} ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Neveljaven niz: mora se začeti z "${z.prefix}"`;if(z.format==="ends_with")return`Neveljaven niz: mora se končati z "${z.suffix}"`;if(z.format==="includes")return`Neveljaven niz: mora vsebovati "${z.includes}"`;if(z.format==="regex")return`Neveljaven niz: mora ustrezati vzorcu ${z.pattern}`;return`Neveljaven ${U[z.format]??u.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${u.divisor}`;case"unrecognized_keys":return`Neprepoznan${u.keys.length>1?"i ključi":" ključ"}: ${W(u.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${u.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${u.origin}`;default:return"Neveljaven vnos"}}};function gN(){return{localeError:Pb()}}var Zb=()=>{let $={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function I(u){return $[u]??null}let U={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},_={nan:"NaN",number:"antal",array:"lista"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Ogiltig inmatning: förväntat instanceof ${u.expected}, fick ${v}`;return`Ogiltig inmatning: förväntat ${z}, fick ${v}`}case"invalid_value":if(u.values.length===1)return`Ogiltig inmatning: förväntat ${F(u.values[0])}`;return`Ogiltigt val: förväntade en av ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`För stor(t): förväntade ${u.origin??"värdet"} att ha ${z}${u.maximum.toString()} ${g.unit??"element"}`;return`För stor(t): förväntat ${u.origin??"värdet"} att ha ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`För lite(t): förväntade ${u.origin??"värdet"} att ha ${z}${u.minimum.toString()} ${g.unit}`;return`För lite(t): förväntade ${u.origin??"värdet"} att ha ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Ogiltig sträng: måste börja med "${z.prefix}"`;if(z.format==="ends_with")return`Ogiltig sträng: måste sluta med "${z.suffix}"`;if(z.format==="includes")return`Ogiltig sträng: måste innehålla "${z.includes}"`;if(z.format==="regex")return`Ogiltig sträng: måste matcha mönstret "${z.pattern}"`;return`Ogiltig(t) ${U[z.format]??u.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${W(u.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${u.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${u.origin??"värdet"}`;default:return"Ogiltig input"}}};function vN(){return{localeError:Zb()}}var Ab=()=>{let $={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function I(u){return $[u]??null}let U={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},_={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${u.expected}, பெறப்பட்டது ${v}`;return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${z}, பெறப்பட்டது ${v}`}case"invalid_value":if(u.values.length===1)return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${F(u.values[0])}`;return`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${W(u.values,"|")} இல் ஒன்று`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${u.origin??"மதிப்பு"} ${z}${u.maximum.toString()} ${g.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`;return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${u.origin??"மதிப்பு"} ${z}${u.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${u.origin} ${z}${u.minimum.toString()} ${g.unit} ஆக இருக்க வேண்டும்`;return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${u.origin} ${z}${u.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`தவறான சரம்: "${z.prefix}" இல் தொடங்க வேண்டும்`;if(z.format==="ends_with")return`தவறான சரம்: "${z.suffix}" இல் முடிவடைய வேண்டும்`;if(z.format==="includes")return`தவறான சரம்: "${z.includes}" ஐ உள்ளடக்க வேண்டும்`;if(z.format==="regex")return`தவறான சரம்: ${z.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;return`தவறான ${U[z.format]??u.format}`}case"not_multiple_of":return`தவறான எண்: ${u.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${u.keys.length>1?"கள்":""}: ${W(u.keys,", ")}`;case"invalid_key":return`${u.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${u.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function JN(){return{localeError:Ab()}}var bb=()=>{let $={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function I(u){return $[u]??null}let U={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},_={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${u.expected} แต่ได้รับ ${v}`;return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${z} แต่ได้รับ ${v}`}case"invalid_value":if(u.values.length===1)return`ค่าไม่ถูกต้อง: ควรเป็น ${F(u.values[0])}`;return`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"ไม่เกิน":"น้อยกว่า",g=I(u.origin);if(g)return`เกินกำหนด: ${u.origin??"ค่า"} ควรมี${z} ${u.maximum.toString()} ${g.unit??"รายการ"}`;return`เกินกำหนด: ${u.origin??"ค่า"} ควรมี${z} ${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?"อย่างน้อย":"มากกว่า",g=I(u.origin);if(g)return`น้อยกว่ากำหนด: ${u.origin} ควรมี${z} ${u.minimum.toString()} ${g.unit}`;return`น้อยกว่ากำหนด: ${u.origin} ควรมี${z} ${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${z.prefix}"`;if(z.format==="ends_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${z.suffix}"`;if(z.format==="includes")return`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${z.includes}" อยู่ในข้อความ`;if(z.format==="regex")return`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${z.pattern}`;return`รูปแบบไม่ถูกต้อง: ${U[z.format]??u.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${u.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${W(u.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${u.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${u.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function NN(){return{localeError:bb()}}var jb=()=>{let $={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function I(u){return $[u]??null}let U={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Geçersiz değer: beklenen instanceof ${u.expected}, alınan ${v}`;return`Geçersiz değer: beklenen ${z}, alınan ${v}`}case"invalid_value":if(u.values.length===1)return`Geçersiz değer: beklenen ${F(u.values[0])}`;return`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`Çok büyük: beklenen ${u.origin??"değer"} ${z}${u.maximum.toString()} ${g.unit??"öğe"}`;return`Çok büyük: beklenen ${u.origin??"değer"} ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`Çok küçük: beklenen ${u.origin} ${z}${u.minimum.toString()} ${g.unit}`;return`Çok küçük: beklenen ${u.origin} ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Geçersiz metin: "${z.prefix}" ile başlamalı`;if(z.format==="ends_with")return`Geçersiz metin: "${z.suffix}" ile bitmeli`;if(z.format==="includes")return`Geçersiz metin: "${z.includes}" içermeli`;if(z.format==="regex")return`Geçersiz metin: ${z.pattern} desenine uymalı`;return`Geçersiz ${U[z.format]??u.format}`}case"not_multiple_of":return`Geçersiz sayı: ${u.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${u.keys.length>1?"lar":""}: ${W(u.keys,", ")}`;case"invalid_key":return`${u.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${u.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function GN(){return{localeError:jb()}}var Fb=()=>{let $={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function I(u){return $[u]??null}let U={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},_={nan:"NaN",number:"число",array:"масив"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Неправильні вхідні дані: очікується instanceof ${u.expected}, отримано ${v}`;return`Неправильні вхідні дані: очікується ${z}, отримано ${v}`}case"invalid_value":if(u.values.length===1)return`Неправильні вхідні дані: очікується ${F(u.values[0])}`;return`Неправильна опція: очікується одне з ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`Занадто велике: очікується, що ${u.origin??"значення"} ${g.verb} ${z}${u.maximum.toString()} ${g.unit??"елементів"}`;return`Занадто велике: очікується, що ${u.origin??"значення"} буде ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`Занадто мале: очікується, що ${u.origin} ${g.verb} ${z}${u.minimum.toString()} ${g.unit}`;return`Занадто мале: очікується, що ${u.origin} буде ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Неправильний рядок: повинен починатися з "${z.prefix}"`;if(z.format==="ends_with")return`Неправильний рядок: повинен закінчуватися на "${z.suffix}"`;if(z.format==="includes")return`Неправильний рядок: повинен містити "${z.includes}"`;if(z.format==="regex")return`Неправильний рядок: повинен відповідати шаблону ${z.pattern}`;return`Неправильний ${U[z.format]??u.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${u.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${u.keys.length>1?"і":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${u.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${u.origin}`;default:return"Неправильні вхідні дані"}}};function O0(){return{localeError:Fb()}}function XN(){return O0()}var Sb=()=>{let $={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function I(u){return $[u]??null}let U={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},_={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`غلط ان پٹ: instanceof ${u.expected} متوقع تھا، ${v} موصول ہوا`;return`غلط ان پٹ: ${z} متوقع تھا، ${v} موصول ہوا`}case"invalid_value":if(u.values.length===1)return`غلط ان پٹ: ${F(u.values[0])} متوقع تھا`;return`غلط آپشن: ${W(u.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`بہت بڑا: ${u.origin??"ویلیو"} کے ${z}${u.maximum.toString()} ${g.unit??"عناصر"} ہونے متوقع تھے`;return`بہت بڑا: ${u.origin??"ویلیو"} کا ${z}${u.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`بہت چھوٹا: ${u.origin} کے ${z}${u.minimum.toString()} ${g.unit} ہونے متوقع تھے`;return`بہت چھوٹا: ${u.origin} کا ${z}${u.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`غلط سٹرنگ: "${z.prefix}" سے شروع ہونا چاہیے`;if(z.format==="ends_with")return`غلط سٹرنگ: "${z.suffix}" پر ختم ہونا چاہیے`;if(z.format==="includes")return`غلط سٹرنگ: "${z.includes}" شامل ہونا چاہیے`;if(z.format==="regex")return`غلط سٹرنگ: پیٹرن ${z.pattern} سے میچ ہونا چاہیے`;return`غلط ${U[z.format]??u.format}`}case"not_multiple_of":return`غلط نمبر: ${u.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${u.keys.length>1?"ز":""}: ${W(u.keys,"، ")}`;case"invalid_key":return`${u.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${u.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function qN(){return{localeError:Sb()}}var wb=()=>{let $={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"}};function I(u){return $[u]??null}let U={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},_={nan:"NaN",number:"raqam",array:"massiv"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Noto‘g‘ri kirish: kutilgan instanceof ${u.expected}, qabul qilingan ${v}`;return`Noto‘g‘ri kirish: kutilgan ${z}, qabul qilingan ${v}`}case"invalid_value":if(u.values.length===1)return`Noto‘g‘ri kirish: kutilgan ${F(u.values[0])}`;return`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`Juda katta: kutilgan ${u.origin??"qiymat"} ${z}${u.maximum.toString()} ${g.unit} ${g.verb}`;return`Juda katta: kutilgan ${u.origin??"qiymat"} ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`Juda kichik: kutilgan ${u.origin} ${z}${u.minimum.toString()} ${g.unit} ${g.verb}`;return`Juda kichik: kutilgan ${u.origin} ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Noto‘g‘ri satr: "${z.prefix}" bilan boshlanishi kerak`;if(z.format==="ends_with")return`Noto‘g‘ri satr: "${z.suffix}" bilan tugashi kerak`;if(z.format==="includes")return`Noto‘g‘ri satr: "${z.includes}" ni o‘z ichiga olishi kerak`;if(z.format==="regex")return`Noto‘g‘ri satr: ${z.pattern} shabloniga mos kelishi kerak`;return`Noto‘g‘ri ${U[z.format]??u.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${u.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${u.keys.length>1?"lar":""}: ${W(u.keys,", ")}`;case"invalid_key":return`${u.origin} dagi kalit noto‘g‘ri`;case"invalid_union":return"Noto‘g‘ri kirish";case"invalid_element":return`${u.origin} da noto‘g‘ri qiymat`;default:return"Noto‘g‘ri kirish"}}};function QN(){return{localeError:wb()}}var Eb=()=>{let $={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function I(u){return $[u]??null}let U={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},_={nan:"NaN",number:"số",array:"mảng"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Đầu vào không hợp lệ: mong đợi instanceof ${u.expected}, nhận được ${v}`;return`Đầu vào không hợp lệ: mong đợi ${z}, nhận được ${v}`}case"invalid_value":if(u.values.length===1)return`Đầu vào không hợp lệ: mong đợi ${F(u.values[0])}`;return`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`Quá lớn: mong đợi ${u.origin??"giá trị"} ${g.verb} ${z}${u.maximum.toString()} ${g.unit??"phần tử"}`;return`Quá lớn: mong đợi ${u.origin??"giá trị"} ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`Quá nhỏ: mong đợi ${u.origin} ${g.verb} ${z}${u.minimum.toString()} ${g.unit}`;return`Quá nhỏ: mong đợi ${u.origin} ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Chuỗi không hợp lệ: phải bắt đầu bằng "${z.prefix}"`;if(z.format==="ends_with")return`Chuỗi không hợp lệ: phải kết thúc bằng "${z.suffix}"`;if(z.format==="includes")return`Chuỗi không hợp lệ: phải bao gồm "${z.includes}"`;if(z.format==="regex")return`Chuỗi không hợp lệ: phải khớp với mẫu ${z.pattern}`;return`${U[z.format]??u.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${u.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${W(u.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${u.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${u.origin}`;default:return"Đầu vào không hợp lệ"}}};function TN(){return{localeError:Eb()}}var Cb=()=>{let $={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function I(u){return $[u]??null}let U={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},_={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`无效输入:期望 instanceof ${u.expected},实际接收 ${v}`;return`无效输入:期望 ${z},实际接收 ${v}`}case"invalid_value":if(u.values.length===1)return`无效输入:期望 ${F(u.values[0])}`;return`无效选项:期望以下之一 ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`数值过大:期望 ${u.origin??"值"} ${z}${u.maximum.toString()} ${g.unit??"个元素"}`;return`数值过大:期望 ${u.origin??"值"} ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`数值过小:期望 ${u.origin} ${z}${u.minimum.toString()} ${g.unit}`;return`数值过小:期望 ${u.origin} ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`无效字符串:必须以 "${z.prefix}" 开头`;if(z.format==="ends_with")return`无效字符串:必须以 "${z.suffix}" 结尾`;if(z.format==="includes")return`无效字符串:必须包含 "${z.includes}"`;if(z.format==="regex")return`无效字符串:必须满足正则表达式 ${z.pattern}`;return`无效${U[z.format]??u.format}`}case"not_multiple_of":return`无效数字:必须是 ${u.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${W(u.keys,", ")}`;case"invalid_key":return`${u.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${u.origin} 中包含无效值(value)`;default:return"无效输入"}}};function HN(){return{localeError:Cb()}}var fb=()=>{let $={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function I(u){return $[u]??null}let U={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`無效的輸入值:預期為 instanceof ${u.expected},但收到 ${v}`;return`無效的輸入值:預期為 ${z},但收到 ${v}`}case"invalid_value":if(u.values.length===1)return`無效的輸入值:預期為 ${F(u.values[0])}`;return`無效的選項:預期為以下其中之一 ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`數值過大:預期 ${u.origin??"值"} 應為 ${z}${u.maximum.toString()} ${g.unit??"個元素"}`;return`數值過大:預期 ${u.origin??"值"} 應為 ${z}${u.maximum.toString()}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`數值過小:預期 ${u.origin} 應為 ${z}${u.minimum.toString()} ${g.unit}`;return`數值過小:預期 ${u.origin} 應為 ${z}${u.minimum.toString()}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`無效的字串:必須以 "${z.prefix}" 開頭`;if(z.format==="ends_with")return`無效的字串:必須以 "${z.suffix}" 結尾`;if(z.format==="includes")return`無效的字串:必須包含 "${z.includes}"`;if(z.format==="regex")return`無效的字串:必須符合格式 ${z.pattern}`;return`無效的 ${U[z.format]??u.format}`}case"not_multiple_of":return`無效的數字:必須為 ${u.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${u.keys.length>1?"們":""}:${W(u.keys,"、")}`;case"invalid_key":return`${u.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${u.origin} 中有無效的值`;default:return"無效的輸入值"}}};function YN(){return{localeError:fb()}}var xb=()=>{let $={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function I(u){return $[u]??null}let U={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},_={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return(u)=>{switch(u.code){case"invalid_type":{let z=_[u.expected]??u.expected,g=S(u.input),v=_[g]??g;if(/^[A-Z]/.test(u.expected))return`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${u.expected}, àmọ̀ a rí ${v}`;return`Ìbáwọlé aṣìṣe: a ní láti fi ${z}, àmọ̀ a rí ${v}`}case"invalid_value":if(u.values.length===1)return`Ìbáwọlé aṣìṣe: a ní láti fi ${F(u.values[0])}`;return`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${W(u.values,"|")}`;case"too_big":{let z=u.inclusive?"<=":"<",g=I(u.origin);if(g)return`Tó pọ̀ jù: a ní láti jẹ́ pé ${u.origin??"iye"} ${g.verb} ${z}${u.maximum} ${g.unit}`;return`Tó pọ̀ jù: a ní láti jẹ́ ${z}${u.maximum}`}case"too_small":{let z=u.inclusive?">=":">",g=I(u.origin);if(g)return`Kéré ju: a ní láti jẹ́ pé ${u.origin} ${g.verb} ${z}${u.minimum} ${g.unit}`;return`Kéré ju: a ní láti jẹ́ ${z}${u.minimum}`}case"invalid_format":{let z=u;if(z.format==="starts_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${z.prefix}"`;if(z.format==="ends_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${z.suffix}"`;if(z.format==="includes")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${z.includes}"`;if(z.format==="regex")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${z.pattern}`;return`Aṣìṣe: ${U[z.format]??u.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${u.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${W(u.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${u.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${u.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function ON(){return{localeError:xb()}}var $Q,VN=Symbol("ZodOutput"),BN=Symbol("ZodInput");class DN{constructor(){this._map=new WeakMap,this._idmap=new Map}add($,...I){let U=I[0];if(this._map.set($,U),U&&typeof U==="object"&&"id"in U)this._idmap.set(U.id,$);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove($){let I=this._map.get($);if(I&&typeof I==="object"&&"id"in I)this._idmap.delete(I.id);return this._map.delete($),this}get($){let I=$._zod.parent;if(I){let U={...this.get(I)??{}};delete U.id;let _={...U,...this._map.get($)};return Object.keys(_).length?_:void 0}return this._map.get($)}has($){return this._map.has($)}}function KU(){return new DN}($Q=globalThis).__zod_globalRegistry??($Q.__zod_globalRegistry=KU());var w$=globalThis.__zod_globalRegistry;function MN($,I){return new $({type:"string",...C(I)})}function KN($,I){return new $({type:"string",coerce:!0,...C(I)})}function RU($,I){return new $({type:"string",format:"email",check:"string_format",abort:!1,...C(I)})}function B0($,I){return new $({type:"string",format:"guid",check:"string_format",abort:!1,...C(I)})}function LU($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,...C(I)})}function WU($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...C(I)})}function PU($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...C(I)})}function ZU($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...C(I)})}function D0($,I){return new $({type:"string",format:"url",check:"string_format",abort:!1,...C(I)})}function AU($,I){return new $({type:"string",format:"emoji",check:"string_format",abort:!1,...C(I)})}function bU($,I){return new $({type:"string",format:"nanoid",check:"string_format",abort:!1,...C(I)})}function jU($,I){return new $({type:"string",format:"cuid",check:"string_format",abort:!1,...C(I)})}function FU($,I){return new $({type:"string",format:"cuid2",check:"string_format",abort:!1,...C(I)})}function SU($,I){return new $({type:"string",format:"ulid",check:"string_format",abort:!1,...C(I)})}function wU($,I){return new $({type:"string",format:"xid",check:"string_format",abort:!1,...C(I)})}function EU($,I){return new $({type:"string",format:"ksuid",check:"string_format",abort:!1,...C(I)})}function CU($,I){return new $({type:"string",format:"ipv4",check:"string_format",abort:!1,...C(I)})}function fU($,I){return new $({type:"string",format:"ipv6",check:"string_format",abort:!1,...C(I)})}function RN($,I){return new $({type:"string",format:"mac",check:"string_format",abort:!1,...C(I)})}function xU($,I){return new $({type:"string",format:"cidrv4",check:"string_format",abort:!1,...C(I)})}function kU($,I){return new $({type:"string",format:"cidrv6",check:"string_format",abort:!1,...C(I)})}function yU($,I){return new $({type:"string",format:"base64",check:"string_format",abort:!1,...C(I)})}function iU($,I){return new $({type:"string",format:"base64url",check:"string_format",abort:!1,...C(I)})}function nU($,I){return new $({type:"string",format:"e164",check:"string_format",abort:!1,...C(I)})}function rU($,I){return new $({type:"string",format:"jwt",check:"string_format",abort:!1,...C(I)})}var LN={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function WN($,I){return new $({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...C(I)})}function PN($,I){return new $({type:"string",format:"date",check:"string_format",...C(I)})}function ZN($,I){return new $({type:"string",format:"time",check:"string_format",precision:null,...C(I)})}function AN($,I){return new $({type:"string",format:"duration",check:"string_format",...C(I)})}function bN($,I){return new $({type:"number",checks:[],...C(I)})}function jN($,I){return new $({type:"number",coerce:!0,checks:[],...C(I)})}function FN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"safeint",...C(I)})}function SN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"float32",...C(I)})}function wN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"float64",...C(I)})}function EN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"int32",...C(I)})}function CN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"uint32",...C(I)})}function fN($,I){return new $({type:"boolean",...C(I)})}function xN($,I){return new $({type:"boolean",coerce:!0,...C(I)})}function kN($,I){return new $({type:"bigint",...C(I)})}function yN($,I){return new $({type:"bigint",coerce:!0,...C(I)})}function iN($,I){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...C(I)})}function nN($,I){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...C(I)})}function rN($,I){return new $({type:"symbol",...C(I)})}function lN($,I){return new $({type:"undefined",...C(I)})}function mN($,I){return new $({type:"null",...C(I)})}function hN($){return new $({type:"any"})}function cN($){return new $({type:"unknown"})}function dN($,I){return new $({type:"never",...C(I)})}function pN($,I){return new $({type:"void",...C(I)})}function oN($,I){return new $({type:"date",...C(I)})}function tN($,I){return new $({type:"date",coerce:!0,...C(I)})}function aN($,I){return new $({type:"nan",...C(I)})}function f4($,I){return new GU({check:"less_than",...C(I),value:$,inclusive:!1})}function g4($,I){return new GU({check:"less_than",...C(I),value:$,inclusive:!0})}function x4($,I){return new XU({check:"greater_than",...C(I),value:$,inclusive:!1})}function r$($,I){return new XU({check:"greater_than",...C(I),value:$,inclusive:!0})}function lU($){return x4(0,$)}function mU($){return f4(0,$)}function hU($){return g4(0,$)}function cU($){return r$(0,$)}function K6($,I){return new ag({check:"multiple_of",...C(I),value:$})}function R6($,I){return new $v({check:"max_size",...C(I),maximum:$})}function k4($,I){return new Iv({check:"min_size",...C(I),minimum:$})}function s6($,I){return new uv({check:"size_equals",...C(I),size:$})}function $1($,I){return new Uv({check:"max_length",...C(I),maximum:$})}function t4($,I){return new _v({check:"min_length",...C(I),minimum:$})}function I1($,I){return new zv({check:"length_equals",...C(I),length:$})}function l1($,I){return new gv({check:"string_format",format:"regex",...C(I),pattern:$})}function m1($){return new vv({check:"string_format",format:"lowercase",...C($)})}function h1($){return new Jv({check:"string_format",format:"uppercase",...C($)})}function c1($,I){return new Nv({check:"string_format",format:"includes",...C(I),includes:$})}function d1($,I){return new Gv({check:"string_format",format:"starts_with",...C(I),prefix:$})}function p1($,I){return new Xv({check:"string_format",format:"ends_with",...C(I),suffix:$})}function dU($,I,U){return new qv({check:"property",property:$,schema:I,...C(U)})}function o1($,I){return new Qv({check:"mime_type",mime:$,...C(I)})}function K4($){return new Tv({check:"overwrite",tx:$})}function t1($){return K4((I)=>I.normalize($))}function a1(){return K4(($)=>$.trim())}function e1(){return K4(($)=>$.toLowerCase())}function s1(){return K4(($)=>$.toUpperCase())}function $I(){return K4(($)=>qg($))}function eN($,I,U){return new $({type:"array",element:I,...C(U)})}function yb($,I,U){return new $({type:"union",options:I,...C(U)})}function ib($,I,U){return new $({type:"union",options:I,inclusive:!1,...C(U)})}function nb($,I,U,_){return new $({type:"union",options:U,discriminator:I,...C(_)})}function rb($,I,U){return new $({type:"intersection",left:I,right:U})}function lb($,I,U,_){let u=U instanceof m;return new $({type:"tuple",items:I,rest:u?U:null,...C(u?_:U)})}function mb($,I,U,_){return new $({type:"record",keyType:I,valueType:U,...C(_)})}function hb($,I,U,_){return new $({type:"map",keyType:I,valueType:U,...C(_)})}function cb($,I,U){return new $({type:"set",valueType:I,...C(U)})}function db($,I,U){let _=Array.isArray(I)?Object.fromEntries(I.map((u)=>[u,u])):I;return new $({type:"enum",entries:_,...C(U)})}function pb($,I,U){return new $({type:"enum",entries:I,...C(U)})}function ob($,I,U){return new $({type:"literal",values:Array.isArray(I)?I:[I],...C(U)})}function sN($,I){return new $({type:"file",...C(I)})}function tb($,I){return new $({type:"transform",transform:I})}function ab($,I){return new $({type:"optional",innerType:I})}function eb($,I){return new $({type:"nullable",innerType:I})}function sb($,I,U){return new $({type:"default",innerType:I,get defaultValue(){return typeof U==="function"?U():Tg(U)}})}function $j($,I,U){return new $({type:"nonoptional",innerType:I,...C(U)})}function Ij($,I){return new $({type:"success",innerType:I})}function uj($,I,U){return new $({type:"catch",innerType:I,catchValue:typeof U==="function"?U:()=>U})}function Uj($,I,U){return new $({type:"pipe",in:I,out:U})}function _j($,I){return new $({type:"readonly",innerType:I})}function zj($,I,U){return new $({type:"template_literal",parts:I,...C(U)})}function gj($,I){return new $({type:"lazy",getter:I})}function vj($,I){return new $({type:"promise",innerType:I})}function $8($,I,U){let _=C(U);return _.abort??(_.abort=!0),new $({type:"custom",check:"custom",fn:I,..._})}function I8($,I,U){return new $({type:"custom",check:"custom",fn:I,...C(U)})}function u8($){let I=IQ((U)=>{return U.addIssue=(_)=>{if(typeof _==="string")U.issues.push(f1(_,U.value,I._zod.def));else{let u=_;if(u.fatal)u.continue=!1;u.code??(u.code="custom"),u.input??(u.input=U.value),u.inst??(u.inst=I),u.continue??(u.continue=!I._zod.def.abort),U.issues.push(f1(u))}},$(U.value,U)});return I}function IQ($,I){let U=new G$({check:"custom",...C(I)});return U._zod.check=$,U}function U8($){let I=new G$({check:"describe"});return I._zod.onattach=[(U)=>{let _=w$.get(U)??{};w$.add(U,{..._,description:$})}],I._zod.check=()=>{},I}function _8($){let I=new G$({check:"meta"});return I._zod.onattach=[(U)=>{let _=w$.get(U)??{};w$.add(U,{..._,...$})}],I._zod.check=()=>{},I}function z8($,I){let U=C(I),_=U.truthy??["true","1","yes","on","y","enabled"],u=U.falsy??["false","0","no","off","n","disabled"];if(U.case!=="sensitive")_=_.map((T)=>typeof T==="string"?T.toLowerCase():T),u=u.map((T)=>typeof T==="string"?T.toLowerCase():T);let z=new Set(_),g=new Set(u),v=$.Codec??Q0,J=$.Boolean??X0,X=new($.String??e6)({type:"string",error:U.error}),G=new J({type:"boolean",error:U.error}),q=new v({type:"pipe",in:X,out:G,transform:(T,H)=>{let Q=T;if(U.case!=="sensitive")Q=Q.toLowerCase();if(z.has(Q))return!0;else if(g.has(Q))return!1;else return H.issues.push({code:"invalid_value",expected:"stringbool",values:[...z,...g],input:H.value,inst:q,continue:!1}),{}},reverseTransform:(T,H)=>{if(T===!0)return _[0]||"true";else return u[0]||"false"},error:U.error});return q}function II($,I,U,_={}){let u=C(_),z={...C(_),check:"string_format",type:"string",format:I,fn:typeof U==="function"?U:(v)=>U.test(v),...u};if(U instanceof RegExp)z.pattern=U;return new $(z)}function L6($){let I=$?.target??"draft-2020-12";if(I==="draft-4")I="draft-04";if(I==="draft-7")I="draft-07";return{processors:$.processors??{},metadataRegistry:$?.metadata??w$,target:I,unrepresentable:$?.unrepresentable??"throw",override:$?.override??(()=>{}),io:$?.io??"output",counter:0,seen:new Map,cycles:$?.cycles??"ref",reused:$?.reused??"inline",external:$?.external??void 0}}function _$($,I,U={path:[],schemaPath:[]}){var _;let u=$._zod.def,z=I.seen.get($);if(z){if(z.count++,U.schemaPath.includes($))z.cycle=U.path;return z.schema}let g={schema:{},count:1,cycle:void 0,path:U.path};I.seen.set($,g);let v=$._zod.toJSONSchema?.();if(v)g.schema=v;else{let X={...U,schemaPath:[...U.schemaPath,$],path:U.path};if($._zod.processJSONSchema)$._zod.processJSONSchema(I,g.schema,X);else{let q=g.schema,T=I.processors[u.type];if(!T)throw Error(`[toJSONSchema]: Non-representable type encountered: ${u.type}`);T($,I,q,X)}let G=$._zod.parent;if(G){if(!g.ref)g.ref=G;_$(G,I,X),I.seen.get(G).isParent=!0}}let J=I.metadataRegistry.get($);if(J)Object.assign(g.schema,J);if(I.io==="input"&&l$($))delete g.schema.examples,delete g.schema.default;if(I.io==="input"&&g.schema._prefault)(_=g.schema).default??(_.default=g.schema._prefault);return delete g.schema._prefault,I.seen.get($).schema}function W6($,I){let U=$.seen.get(I);if(!U)throw Error("Unprocessed schema. This is a bug in Zod.");let _=new Map;for(let g of $.seen.entries()){let v=$.metadataRegistry.get(g[0])?.id;if(v){let J=_.get(v);if(J&&J!==g[0])throw Error(`Duplicate schema id "${v}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);_.set(v,g[0])}}let u=(g)=>{let v=$.target==="draft-2020-12"?"$defs":"definitions";if($.external){let G=$.external.registry.get(g[0])?.id,q=$.external.uri??((H)=>H);if(G)return{ref:q(G)};let T=g[1].defId??g[1].schema.id??`schema${$.counter++}`;return g[1].defId=T,{defId:T,ref:`${q("__shared")}#/${v}/${T}`}}if(g[1]===U)return{ref:"#"};let N=`${"#"}/${v}/`,X=g[1].schema.id??`__schema${$.counter++}`;return{defId:X,ref:N+X}},z=(g)=>{if(g[1].schema.$ref)return;let v=g[1],{ref:J,defId:N}=u(g);if(v.def={...v.schema},N)v.defId=N;let X=v.schema;for(let G in X)delete X[G];X.$ref=J};if($.cycles==="throw")for(let g of $.seen.entries()){let v=g[1];if(v.cycle)throw Error(`Cycle detected: #/${v.cycle?.join("/")}/<root>
336
336
 
337
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let z of $.seen.entries()){let v=z[1];if(I===z[0]){g(z);continue}if($.external){let N=$.external.registry.get(z[0])?.id;if(I!==z[0]&&N){g(z);continue}}if($.metadataRegistry.get(z[0])?.id){g(z);continue}if(v.cycle){g(z);continue}if(v.count>1){if($.reused==="ref"){g(z);continue}}}}function P6($,I){let U=$.seen.get(I);if(!U)throw Error("Unprocessed schema. This is a bug in Zod.");let _=(z)=>{let v=$.seen.get(z);if(v.ref===null)return;let J=v.def??v.schema,N={...J},X=v.ref;if(v.ref=null,X){_(X);let q=$.seen.get(X),T=q.schema;if(T.$ref&&($.target==="draft-07"||$.target==="draft-04"||$.target==="openapi-3.0"))J.allOf=J.allOf??[],J.allOf.push(T);else Object.assign(J,T);if(Object.assign(J,N),z._zod.parent===X)for(let Q in J){if(Q==="$ref"||Q==="allOf")continue;if(!(Q in N))delete J[Q]}if(T.$ref&&q.def)for(let Q in J){if(Q==="$ref"||Q==="allOf")continue;if(Q in q.def&&JSON.stringify(J[Q])===JSON.stringify(q.def[Q]))delete J[Q]}}let G=z._zod.parent;if(G&&G!==X){_(G);let q=$.seen.get(G);if(q?.schema.$ref){if(J.$ref=q.schema.$ref,q.def)for(let T in J){if(T==="$ref"||T==="allOf")continue;if(T in q.def&&JSON.stringify(J[T])===JSON.stringify(q.def[T]))delete J[T]}}}$.override({zodSchema:z,jsonSchema:J,path:v.path??[]})};for(let z of[...$.seen.entries()].reverse())_(z[0]);let u={};if($.target==="draft-2020-12")u.$schema="https://json-schema.org/draft/2020-12/schema";else if($.target==="draft-07")u.$schema="http://json-schema.org/draft-07/schema#";else if($.target==="draft-04")u.$schema="http://json-schema.org/draft-04/schema#";else if($.target==="openapi-3.0");if($.external?.uri){let z=$.external.registry.get(I)?.id;if(!z)throw Error("Schema is missing an `id` property");u.$id=$.external.uri(z)}Object.assign(u,U.def??U.schema);let g=$.external?.defs??{};for(let z of $.seen.entries()){let v=z[1];if(v.def&&v.defId)g[v.defId]=v.def}if($.external);else if(Object.keys(g).length>0)if($.target==="draft-2020-12")u.$defs=g;else u.definitions=g;try{let z=JSON.parse(JSON.stringify(u));return Object.defineProperty(z,"~standard",{value:{...I["~standard"],jsonSchema:{input:II(I,"input",$.processors),output:II(I,"output",$.processors)}},enumerable:!1,writable:!1}),z}catch(z){throw Error("Error converting schema to JSON.")}}function m$($,I){let U=I??{seen:new Set};if(U.seen.has($))return!1;U.seen.add($);let _=$._zod.def;if(_.type==="transform")return!0;if(_.type==="array")return m$(_.element,U);if(_.type==="set")return m$(_.valueType,U);if(_.type==="lazy")return m$(_.getter(),U);if(_.type==="promise"||_.type==="optional"||_.type==="nonoptional"||_.type==="nullable"||_.type==="readonly"||_.type==="default"||_.type==="prefault")return m$(_.innerType,U);if(_.type==="intersection")return m$(_.left,U)||m$(_.right,U);if(_.type==="record"||_.type==="map")return m$(_.keyType,U)||m$(_.valueType,U);if(_.type==="pipe")return m$(_.in,U)||m$(_.out,U);if(_.type==="object"){for(let u in _.shape)if(m$(_.shape[u],U))return!0;return!1}if(_.type==="union"){for(let u of _.options)if(m$(u,U))return!0;return!1}if(_.type==="tuple"){for(let u of _.items)if(m$(u,U))return!0;if(_.rest&&m$(_.rest,U))return!0;return!1}return!1}var _8=($,I={})=>(U)=>{let _=R6({...U,processors:I});return _$($,_),W6(_,$),P6(_,$)},II=($,I,U={})=>(_)=>{let{libraryOptions:u,target:g}=_??{},z=R6({...u??{},target:g,io:I,processors:U});return _$($,z),W6(z,$),P6(z,$)};var zj={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},g8=($,I,U,_)=>{let u=U;u.type="string";let{minimum:g,maximum:z,format:v,patterns:J,contentEncoding:N}=$._zod.bag;if(typeof g==="number")u.minLength=g;if(typeof z==="number")u.maxLength=z;if(v){if(u.format=zj[v]??v,u.format==="")delete u.format;if(v==="time")delete u.format}if(N)u.contentEncoding=N;if(J&&J.size>0){let X=[...J];if(X.length===1)u.pattern=X[0].source;else if(X.length>1)u.allOf=[...X.map((G)=>({...I.target==="draft-07"||I.target==="draft-04"||I.target==="openapi-3.0"?{type:"string"}:{},pattern:G.source}))]}},z8=($,I,U,_)=>{let u=U,{minimum:g,maximum:z,format:v,multipleOf:J,exclusiveMaximum:N,exclusiveMinimum:X}=$._zod.bag;if(typeof v==="string"&&v.includes("int"))u.type="integer";else u.type="number";if(typeof X==="number")if(I.target==="draft-04"||I.target==="openapi-3.0")u.minimum=X,u.exclusiveMinimum=!0;else u.exclusiveMinimum=X;if(typeof g==="number"){if(u.minimum=g,typeof X==="number"&&I.target!=="draft-04")if(X>=g)delete u.minimum;else delete u.exclusiveMinimum}if(typeof N==="number")if(I.target==="draft-04"||I.target==="openapi-3.0")u.maximum=N,u.exclusiveMaximum=!0;else u.exclusiveMaximum=N;if(typeof z==="number"){if(u.maximum=z,typeof N==="number"&&I.target!=="draft-04")if(N<=z)delete u.maximum;else delete u.exclusiveMaximum}if(typeof J==="number")u.multipleOf=J},v8=($,I,U,_)=>{U.type="boolean"},J8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},N8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},G8=($,I,U,_)=>{if(I.target==="openapi-3.0")U.type="string",U.nullable=!0,U.enum=[null];else U.type="null"},X8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},q8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},Q8=($,I,U,_)=>{U.not={}},T8=($,I,U,_)=>{},H8=($,I,U,_)=>{},Y8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},O8=($,I,U,_)=>{let u=$._zod.def,g=eI(u.entries);if(g.every((z)=>typeof z==="number"))U.type="number";if(g.every((z)=>typeof z==="string"))U.type="string";U.enum=g},V8=($,I,U,_)=>{let u=$._zod.def,g=[];for(let z of u.values)if(z===void 0){if(I.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof z==="bigint")if(I.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else g.push(Number(z));else g.push(z);if(g.length===0);else if(g.length===1){let z=g[0];if(U.type=z===null?"null":typeof z,I.target==="draft-04"||I.target==="openapi-3.0")U.enum=[z];else U.const=z}else{if(g.every((z)=>typeof z==="number"))U.type="number";if(g.every((z)=>typeof z==="string"))U.type="string";if(g.every((z)=>typeof z==="boolean"))U.type="boolean";if(g.every((z)=>z===null))U.type="null";U.enum=g}},B8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},D8=($,I,U,_)=>{let u=U,g=$._zod.pattern;if(!g)throw Error("Pattern not found in template literal");u.type="string",u.pattern=g.source},M8=($,I,U,_)=>{let u=U,g={type:"string",format:"binary",contentEncoding:"binary"},{minimum:z,maximum:v,mime:J}=$._zod.bag;if(z!==void 0)g.minLength=z;if(v!==void 0)g.maxLength=v;if(J)if(J.length===1)g.contentMediaType=J[0],Object.assign(u,g);else Object.assign(u,g),u.anyOf=J.map((N)=>({contentMediaType:N}));else Object.assign(u,g)},K8=($,I,U,_)=>{U.type="boolean"},L8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},R8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},W8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},P8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},Z8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},A8=($,I,U,_)=>{let u=U,g=$._zod.def,{minimum:z,maximum:v}=$._zod.bag;if(typeof z==="number")u.minItems=z;if(typeof v==="number")u.maxItems=v;u.type="array",u.items=_$(g.element,I,{..._,path:[..._.path,"items"]})},b8=($,I,U,_)=>{let u=U,g=$._zod.def;u.type="object",u.properties={};let z=g.shape;for(let N in z)u.properties[N]=_$(z[N],I,{..._,path:[..._.path,"properties",N]});let v=new Set(Object.keys(z)),J=new Set([...v].filter((N)=>{let X=g.shape[N]._zod;if(I.io==="input")return X.optin===void 0;else return X.optout===void 0}));if(J.size>0)u.required=Array.from(J);if(g.catchall?._zod.def.type==="never")u.additionalProperties=!1;else if(!g.catchall){if(I.io==="output")u.additionalProperties=!1}else if(g.catchall)u.additionalProperties=_$(g.catchall,I,{..._,path:[..._.path,"additionalProperties"]})},pU=($,I,U,_)=>{let u=$._zod.def,g=u.inclusive===!1,z=u.options.map((v,J)=>_$(v,I,{..._,path:[..._.path,g?"oneOf":"anyOf",J]}));if(g)U.oneOf=z;else U.anyOf=z},j8=($,I,U,_)=>{let u=$._zod.def,g=_$(u.left,I,{..._,path:[..._.path,"allOf",0]}),z=_$(u.right,I,{..._,path:[..._.path,"allOf",1]}),v=(N)=>("allOf"in N)&&Object.keys(N).length===1,J=[...v(g)?g.allOf:[g],...v(z)?z.allOf:[z]];U.allOf=J},F8=($,I,U,_)=>{let u=U,g=$._zod.def;u.type="array";let z=I.target==="draft-2020-12"?"prefixItems":"items",v=I.target==="draft-2020-12"?"items":I.target==="openapi-3.0"?"items":"additionalItems",J=g.items.map((q,T)=>_$(q,I,{..._,path:[..._.path,z,T]})),N=g.rest?_$(g.rest,I,{..._,path:[..._.path,v,...I.target==="openapi-3.0"?[g.items.length]:[]]}):null;if(I.target==="draft-2020-12"){if(u.prefixItems=J,N)u.items=N}else if(I.target==="openapi-3.0"){if(u.items={anyOf:J},N)u.items.anyOf.push(N);if(u.minItems=J.length,!N)u.maxItems=J.length}else if(u.items=J,N)u.additionalItems=N;let{minimum:X,maximum:G}=$._zod.bag;if(typeof X==="number")u.minItems=X;if(typeof G==="number")u.maxItems=G},S8=($,I,U,_)=>{let u=U,g=$._zod.def;u.type="object";let z=g.keyType,J=z._zod.bag?.patterns;if(g.mode==="loose"&&J&&J.size>0){let X=_$(g.valueType,I,{..._,path:[..._.path,"patternProperties","*"]});u.patternProperties={};for(let G of J)u.patternProperties[G.source]=X}else{if(I.target==="draft-07"||I.target==="draft-2020-12")u.propertyNames=_$(g.keyType,I,{..._,path:[..._.path,"propertyNames"]});u.additionalProperties=_$(g.valueType,I,{..._,path:[..._.path,"additionalProperties"]})}let N=z._zod.values;if(N){let X=[...N].filter((G)=>typeof G==="string"||typeof G==="number");if(X.length>0)u.required=X}},w8=($,I,U,_)=>{let u=$._zod.def,g=_$(u.innerType,I,_),z=I.seen.get($);if(I.target==="openapi-3.0")z.ref=u.innerType,U.nullable=!0;else U.anyOf=[g,{type:"null"}]},E8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let g=I.seen.get($);g.ref=u.innerType},C8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let g=I.seen.get($);g.ref=u.innerType,U.default=JSON.parse(JSON.stringify(u.defaultValue))},f8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let g=I.seen.get($);if(g.ref=u.innerType,I.io==="input")U._prefault=JSON.parse(JSON.stringify(u.defaultValue))},x8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let g=I.seen.get($);g.ref=u.innerType;let z;try{z=u.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}U.default=z},k8=($,I,U,_)=>{let u=$._zod.def,g=I.io==="input"?u.in._zod.def.type==="transform"?u.out:u.in:u.out;_$(g,I,_);let z=I.seen.get($);z.ref=g},y8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let g=I.seen.get($);g.ref=u.innerType,U.readOnly=!0},i8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let g=I.seen.get($);g.ref=u.innerType},oU=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let g=I.seen.get($);g.ref=u.innerType},n8=($,I,U,_)=>{let u=$._zod.innerType;_$(u,I,_);let g=I.seen.get($);g.ref=u},dU={string:g8,number:z8,boolean:v8,bigint:J8,symbol:N8,null:G8,undefined:X8,void:q8,never:Q8,any:T8,unknown:H8,date:Y8,enum:O8,literal:V8,nan:B8,template_literal:D8,file:M8,success:K8,custom:L8,function:R8,transform:W8,map:P8,set:Z8,array:A8,object:b8,union:pU,intersection:j8,tuple:F8,record:S8,nullable:w8,nonoptional:E8,default:C8,prefault:f8,catch:x8,pipe:k8,readonly:y8,promise:i8,optional:oU,lazy:n8};function tU($,I){if("_idmap"in $){let _=$,u=R6({...I,processors:dU}),g={};for(let J of _._idmap.entries()){let[N,X]=J;_$(X,u)}let z={},v={registry:_,uri:I?.uri,defs:g};u.external=v;for(let J of _._idmap.entries()){let[N,X]=J;W6(u,X),z[N]=P6(u,X)}if(Object.keys(g).length>0){let J=u.target==="draft-2020-12"?"$defs":"definitions";z.__shared={[J]:g}}return{schemas:z}}let U=R6({...I,processors:dU});return _$($,U),W6(U,$),P6(U,$)}class r8{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter($){this.ctx.counter=$}get seen(){return this.ctx.seen}constructor($){let I=$?.target??"draft-2020-12";if(I==="draft-4")I="draft-04";if(I==="draft-7")I="draft-07";this.ctx=R6({processors:dU,target:I,...$?.metadata&&{metadata:$.metadata},...$?.unrepresentable&&{unrepresentable:$.unrepresentable},...$?.override&&{override:$.override},...$?.io&&{io:$.io}})}process($,I={path:[],schemaPath:[]}){return _$($,this.ctx,I)}emit($,I){if(I){if(I.cycles)this.ctx.cycles=I.cycles;if(I.reused)this.ctx.reused=I.reused;if(I.external)this.ctx.external=I.external}W6(this.ctx,$);let U=P6(this.ctx,$),{"~standard":_,...u}=U;return u}}var uQ={};var B0={};B4(B0,{xor:()=>pQ,xid:()=>OQ,void:()=>rQ,uuidv7:()=>NQ,uuidv6:()=>JQ,uuidv4:()=>vQ,uuid:()=>zQ,url:()=>GQ,unknown:()=>$1,union:()=>L_,undefined:()=>iQ,ulid:()=>YQ,uint64:()=>kQ,uint32:()=>CQ,tuple:()=>K3,transform:()=>W_,templateLiteral:()=>v7,symbol:()=>yQ,superRefine:()=>o3,success:()=>_7,stringbool:()=>H7,stringFormat:()=>AQ,string:()=>u_,strictObject:()=>cQ,set:()=>sQ,refine:()=>p3,record:()=>L3,readonly:()=>r3,promise:()=>J7,preprocess:()=>O7,prefault:()=>C3,pipe:()=>L0,partialRecord:()=>tQ,optional:()=>M0,object:()=>hQ,number:()=>z3,nullish:()=>U7,nullable:()=>K0,null:()=>X3,nonoptional:()=>f3,never:()=>K_,nativeEnum:()=>$7,nanoid:()=>QQ,nan:()=>g7,meta:()=>Q7,map:()=>eQ,mac:()=>DQ,looseRecord:()=>aQ,looseObject:()=>dQ,literal:()=>I7,lazy:()=>h3,ksuid:()=>VQ,keyof:()=>mQ,jwt:()=>ZQ,json:()=>Y7,ipv6:()=>MQ,ipv4:()=>BQ,intersection:()=>D3,int64:()=>xQ,int32:()=>EQ,int:()=>U_,instanceof:()=>T7,httpUrl:()=>XQ,hostname:()=>bQ,hex:()=>jQ,hash:()=>FQ,guid:()=>gQ,function:()=>N7,float64:()=>wQ,float32:()=>SQ,file:()=>u7,exactOptional:()=>j3,enum:()=>R_,emoji:()=>qQ,email:()=>_Q,e164:()=>PQ,discriminatedUnion:()=>oQ,describe:()=>q7,date:()=>lQ,custom:()=>X7,cuid2:()=>HQ,cuid:()=>TQ,codec:()=>z7,cidrv6:()=>LQ,cidrv4:()=>KQ,check:()=>G7,catch:()=>y3,boolean:()=>v3,bigint:()=>fQ,base64url:()=>WQ,base64:()=>RQ,array:()=>P0,any:()=>nQ,_function:()=>N7,_default:()=>w3,_ZodString:()=>__,ZodXor:()=>O3,ZodXID:()=>X_,ZodVoid:()=>H3,ZodUnknown:()=>Q3,ZodUnion:()=>A0,ZodUndefined:()=>N3,ZodUUID:()=>y4,ZodURL:()=>R0,ZodULID:()=>G_,ZodType:()=>c,ZodTuple:()=>M3,ZodTransform:()=>A3,ZodTemplateLiteral:()=>l3,ZodSymbol:()=>J3,ZodSuccess:()=>x3,ZodStringFormat:()=>J$,ZodString:()=>_I,ZodSet:()=>W3,ZodRecord:()=>b0,ZodReadonly:()=>n3,ZodPromise:()=>c3,ZodPrefault:()=>E3,ZodPipe:()=>A_,ZodOptional:()=>P_,ZodObject:()=>Z0,ZodNumberFormat:()=>I1,ZodNumber:()=>zI,ZodNullable:()=>F3,ZodNull:()=>G3,ZodNonOptional:()=>Z_,ZodNever:()=>T3,ZodNanoID:()=>v_,ZodNaN:()=>i3,ZodMap:()=>R3,ZodMAC:()=>g3,ZodLiteral:()=>P3,ZodLazy:()=>m3,ZodKSUID:()=>q_,ZodJWT:()=>D_,ZodIntersection:()=>B3,ZodIPv6:()=>T_,ZodIPv4:()=>Q_,ZodGUID:()=>D0,ZodFunction:()=>d3,ZodFile:()=>Z3,ZodExactOptional:()=>b3,ZodEnum:()=>UI,ZodEmoji:()=>z_,ZodEmail:()=>g_,ZodE164:()=>B_,ZodDiscriminatedUnion:()=>V3,ZodDefault:()=>S3,ZodDate:()=>W0,ZodCustomStringFormat:()=>gI,ZodCustom:()=>j0,ZodCodec:()=>b_,ZodCatch:()=>k3,ZodCUID2:()=>N_,ZodCUID:()=>J_,ZodCIDRv6:()=>Y_,ZodCIDRv4:()=>H_,ZodBoolean:()=>vI,ZodBigIntFormat:()=>M_,ZodBigInt:()=>JI,ZodBase64URL:()=>V_,ZodBase64:()=>O_,ZodArray:()=>Y3,ZodAny:()=>q3});var aU={};B4(aU,{uppercase:()=>m1,trim:()=>t1,toUpperCase:()=>e1,toLowerCase:()=>a1,startsWith:()=>c1,slugify:()=>s1,size:()=>a6,regex:()=>r1,property:()=>cU,positive:()=>rU,overwrite:()=>K4,normalize:()=>o1,nonpositive:()=>mU,nonnegative:()=>hU,negative:()=>lU,multipleOf:()=>K6,minSize:()=>k4,minLength:()=>t4,mime:()=>p1,maxSize:()=>L6,maxLength:()=>e6,lte:()=>g4,lt:()=>f4,lowercase:()=>l1,length:()=>s6,includes:()=>h1,gte:()=>l$,gt:()=>x4,endsWith:()=>d1});var uI={};B4(uI,{time:()=>h8,duration:()=>c8,datetime:()=>l8,date:()=>m8,ZodISOTime:()=>$_,ZodISODuration:()=>I_,ZodISODateTime:()=>eU,ZodISODate:()=>sU});var eU=V("ZodISODateTime",($,I)=>{Pv.init($,I),J$.init($,I)});function l8($){return LN(eU,$)}var sU=V("ZodISODate",($,I)=>{Zv.init($,I),J$.init($,I)});function m8($){return RN(sU,$)}var $_=V("ZodISOTime",($,I)=>{Av.init($,I),J$.init($,I)});function h8($){return WN($_,$)}var I_=V("ZodISODuration",($,I)=>{bv.init($,I),J$.init($,I)});function c8($){return PN(I_,$)}var UQ=($,I)=>{U0.init($,I),$.name="ZodError",Object.defineProperties($,{format:{value:(U)=>g0($,U)},flatten:{value:(U)=>_0($,U)},addIssue:{value:(U)=>{$.issues.push(U),$.message=JSON.stringify($.issues,w1,2)}},addIssues:{value:(U)=>{$.issues.push(...U),$.message=JSON.stringify($.issues,w1,2)}},isEmpty:{get(){return $.issues.length===0}}})},Jj=V("ZodError",UQ),$4=V("ZodError",UQ,{Parent:Error});var d8=f1($4),p8=x1($4),o8=k1($4),t8=y1($4),a8=$U($4),e8=IU($4),s8=uU($4),$3=UU($4),I3=_U($4),u3=gU($4),U3=zU($4),_3=vU($4);var c=V("ZodType",($,I)=>{return m.init($,I),Object.assign($["~standard"],{jsonSchema:{input:II($,"input"),output:II($,"output")}}),$.toJSONSchema=_8($,{}),$.def=I,$.type=I.type,Object.defineProperty($,"_def",{value:I}),$.check=(...U)=>{return $.clone(w.mergeDefs(I,{checks:[...I.checks??[],...U.map((_)=>typeof _==="function"?{_zod:{check:_,def:{check:"custom"},onattach:[]}}:_)]}),{parent:!0})},$.with=$.check,$.clone=(U,_)=>r$($,U,_),$.brand=()=>$,$.register=(U,_)=>{return U.add($,_),$},$.parse=(U,_)=>d8($,U,_,{callee:$.parse}),$.safeParse=(U,_)=>o8($,U,_),$.parseAsync=async(U,_)=>p8($,U,_,{callee:$.parseAsync}),$.safeParseAsync=async(U,_)=>t8($,U,_),$.spa=$.safeParseAsync,$.encode=(U,_)=>a8($,U,_),$.decode=(U,_)=>e8($,U,_),$.encodeAsync=async(U,_)=>s8($,U,_),$.decodeAsync=async(U,_)=>$3($,U,_),$.safeEncode=(U,_)=>I3($,U,_),$.safeDecode=(U,_)=>u3($,U,_),$.safeEncodeAsync=async(U,_)=>U3($,U,_),$.safeDecodeAsync=async(U,_)=>_3($,U,_),$.refine=(U,_)=>$.check(p3(U,_)),$.superRefine=(U)=>$.check(o3(U)),$.overwrite=(U)=>$.check(K4(U)),$.optional=()=>M0($),$.exactOptional=()=>j3($),$.nullable=()=>K0($),$.nullish=()=>M0(K0($)),$.nonoptional=(U)=>f3($,U),$.array=()=>P0($),$.or=(U)=>L_([$,U]),$.and=(U)=>D3($,U),$.transform=(U)=>L0($,W_(U)),$.default=(U)=>w3($,U),$.prefault=(U)=>C3($,U),$.catch=(U)=>y3($,U),$.pipe=(U)=>L0($,U),$.readonly=()=>r3($),$.describe=(U)=>{let _=$.clone();return w$.add(_,{description:U}),_},Object.defineProperty($,"description",{get(){return w$.get($)?.description},configurable:!0}),$.meta=(...U)=>{if(U.length===0)return w$.get($);let _=$.clone();return w$.add(_,U[0]),_},$.isOptional=()=>$.safeParse(void 0).success,$.isNullable=()=>$.safeParse(null).success,$.apply=(U)=>U($),$}),__=V("_ZodString",($,I)=>{t6.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,g)=>g8($,_,u,g);let U=$._zod.bag;$.format=U.format??null,$.minLength=U.minimum??null,$.maxLength=U.maximum??null,$.regex=(..._)=>$.check(r1(..._)),$.includes=(..._)=>$.check(h1(..._)),$.startsWith=(..._)=>$.check(c1(..._)),$.endsWith=(..._)=>$.check(d1(..._)),$.min=(..._)=>$.check(t4(..._)),$.max=(..._)=>$.check(e6(..._)),$.length=(..._)=>$.check(s6(..._)),$.nonempty=(..._)=>$.check(t4(1,..._)),$.lowercase=(_)=>$.check(l1(_)),$.uppercase=(_)=>$.check(m1(_)),$.trim=()=>$.check(t1()),$.normalize=(..._)=>$.check(o1(..._)),$.toLowerCase=()=>$.check(a1()),$.toUpperCase=()=>$.check(e1()),$.slugify=()=>$.check(s1())}),_I=V("ZodString",($,I)=>{t6.init($,I),__.init($,I),$.email=(U)=>$.check(KU(g_,U)),$.url=(U)=>$.check(V0(R0,U)),$.jwt=(U)=>$.check(nU(D_,U)),$.emoji=(U)=>$.check(ZU(z_,U)),$.guid=(U)=>$.check(O0(D0,U)),$.uuid=(U)=>$.check(LU(y4,U)),$.uuidv4=(U)=>$.check(RU(y4,U)),$.uuidv6=(U)=>$.check(WU(y4,U)),$.uuidv7=(U)=>$.check(PU(y4,U)),$.nanoid=(U)=>$.check(AU(v_,U)),$.guid=(U)=>$.check(O0(D0,U)),$.cuid=(U)=>$.check(bU(J_,U)),$.cuid2=(U)=>$.check(jU(N_,U)),$.ulid=(U)=>$.check(FU(G_,U)),$.base64=(U)=>$.check(kU(O_,U)),$.base64url=(U)=>$.check(yU(V_,U)),$.xid=(U)=>$.check(SU(X_,U)),$.ksuid=(U)=>$.check(wU(q_,U)),$.ipv4=(U)=>$.check(EU(Q_,U)),$.ipv6=(U)=>$.check(CU(T_,U)),$.cidrv4=(U)=>$.check(fU(H_,U)),$.cidrv6=(U)=>$.check(xU(Y_,U)),$.e164=(U)=>$.check(iU(B_,U)),$.datetime=(U)=>$.check(l8(U)),$.date=(U)=>$.check(m8(U)),$.time=(U)=>$.check(h8(U)),$.duration=(U)=>$.check(c8(U))});function u_($){return BN(_I,$)}var J$=V("ZodStringFormat",($,I)=>{v$.init($,I),__.init($,I)}),g_=V("ZodEmail",($,I)=>{Ov.init($,I),J$.init($,I)});function _Q($){return KU(g_,$)}var D0=V("ZodGUID",($,I)=>{Hv.init($,I),J$.init($,I)});function gQ($){return O0(D0,$)}var y4=V("ZodUUID",($,I)=>{Yv.init($,I),J$.init($,I)});function zQ($){return LU(y4,$)}function vQ($){return RU(y4,$)}function JQ($){return WU(y4,$)}function NQ($){return PU(y4,$)}var R0=V("ZodURL",($,I)=>{Vv.init($,I),J$.init($,I)});function GQ($){return V0(R0,$)}function XQ($){return V0(R0,{protocol:/^https?$/,hostname:H4.domain,...w.normalizeParams($)})}var z_=V("ZodEmoji",($,I)=>{Bv.init($,I),J$.init($,I)});function qQ($){return ZU(z_,$)}var v_=V("ZodNanoID",($,I)=>{Dv.init($,I),J$.init($,I)});function QQ($){return AU(v_,$)}var J_=V("ZodCUID",($,I)=>{Mv.init($,I),J$.init($,I)});function TQ($){return bU(J_,$)}var N_=V("ZodCUID2",($,I)=>{Kv.init($,I),J$.init($,I)});function HQ($){return jU(N_,$)}var G_=V("ZodULID",($,I)=>{Lv.init($,I),J$.init($,I)});function YQ($){return FU(G_,$)}var X_=V("ZodXID",($,I)=>{Rv.init($,I),J$.init($,I)});function OQ($){return SU(X_,$)}var q_=V("ZodKSUID",($,I)=>{Wv.init($,I),J$.init($,I)});function VQ($){return wU(q_,$)}var Q_=V("ZodIPv4",($,I)=>{jv.init($,I),J$.init($,I)});function BQ($){return EU(Q_,$)}var g3=V("ZodMAC",($,I)=>{Sv.init($,I),J$.init($,I)});function DQ($){return MN(g3,$)}var T_=V("ZodIPv6",($,I)=>{Fv.init($,I),J$.init($,I)});function MQ($){return CU(T_,$)}var H_=V("ZodCIDRv4",($,I)=>{wv.init($,I),J$.init($,I)});function KQ($){return fU(H_,$)}var Y_=V("ZodCIDRv6",($,I)=>{Ev.init($,I),J$.init($,I)});function LQ($){return xU(Y_,$)}var O_=V("ZodBase64",($,I)=>{fv.init($,I),J$.init($,I)});function RQ($){return kU(O_,$)}var V_=V("ZodBase64URL",($,I)=>{xv.init($,I),J$.init($,I)});function WQ($){return yU(V_,$)}var B_=V("ZodE164",($,I)=>{kv.init($,I),J$.init($,I)});function PQ($){return iU(B_,$)}var D_=V("ZodJWT",($,I)=>{yv.init($,I),J$.init($,I)});function ZQ($){return nU(D_,$)}var gI=V("ZodCustomStringFormat",($,I)=>{iv.init($,I),J$.init($,I)});function AQ($,I,U={}){return $I(gI,$,I,U)}function bQ($){return $I(gI,"hostname",H4.hostname,$)}function jQ($){return $I(gI,"hex",H4.hex,$)}function FQ($,I){let U=I?.enc??"hex",_=`${$}_${U}`,u=H4[_];if(!u)throw Error(`Unrecognized hash format: ${_}`);return $I(gI,_,u,I)}var zI=V("ZodNumber",($,I)=>{OU.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,g)=>z8($,_,u,g),$.gt=(_,u)=>$.check(x4(_,u)),$.gte=(_,u)=>$.check(l$(_,u)),$.min=(_,u)=>$.check(l$(_,u)),$.lt=(_,u)=>$.check(f4(_,u)),$.lte=(_,u)=>$.check(g4(_,u)),$.max=(_,u)=>$.check(g4(_,u)),$.int=(_)=>$.check(U_(_)),$.safe=(_)=>$.check(U_(_)),$.positive=(_)=>$.check(x4(0,_)),$.nonnegative=(_)=>$.check(l$(0,_)),$.negative=(_)=>$.check(f4(0,_)),$.nonpositive=(_)=>$.check(g4(0,_)),$.multipleOf=(_,u)=>$.check(K6(_,u)),$.step=(_,u)=>$.check(K6(_,u)),$.finite=()=>$;let U=$._zod.bag;$.minValue=Math.max(U.minimum??Number.NEGATIVE_INFINITY,U.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,$.maxValue=Math.min(U.maximum??Number.POSITIVE_INFINITY,U.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,$.isInt=(U.format??"").includes("int")||Number.isSafeInteger(U.multipleOf??0.5),$.isFinite=!0,$.format=U.format??null});function z3($){return ZN(zI,$)}var I1=V("ZodNumberFormat",($,I)=>{nv.init($,I),zI.init($,I)});function U_($){return bN(I1,$)}function SQ($){return jN(I1,$)}function wQ($){return FN(I1,$)}function EQ($){return SN(I1,$)}function CQ($){return wN(I1,$)}var vI=V("ZodBoolean",($,I)=>{N0.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>v8($,U,_,u)});function v3($){return EN(vI,$)}var JI=V("ZodBigInt",($,I)=>{VU.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,g)=>J8($,_,u,g),$.gte=(_,u)=>$.check(l$(_,u)),$.min=(_,u)=>$.check(l$(_,u)),$.gt=(_,u)=>$.check(x4(_,u)),$.gte=(_,u)=>$.check(l$(_,u)),$.min=(_,u)=>$.check(l$(_,u)),$.lt=(_,u)=>$.check(f4(_,u)),$.lte=(_,u)=>$.check(g4(_,u)),$.max=(_,u)=>$.check(g4(_,u)),$.positive=(_)=>$.check(x4(BigInt(0),_)),$.negative=(_)=>$.check(f4(BigInt(0),_)),$.nonpositive=(_)=>$.check(g4(BigInt(0),_)),$.nonnegative=(_)=>$.check(l$(BigInt(0),_)),$.multipleOf=(_,u)=>$.check(K6(_,u));let U=$._zod.bag;$.minValue=U.minimum??null,$.maxValue=U.maximum??null,$.format=U.format??null});function fQ($){return fN(JI,$)}var M_=V("ZodBigIntFormat",($,I)=>{rv.init($,I),JI.init($,I)});function xQ($){return kN(M_,$)}function kQ($){return yN(M_,$)}var J3=V("ZodSymbol",($,I)=>{lv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>N8($,U,_,u)});function yQ($){return iN(J3,$)}var N3=V("ZodUndefined",($,I)=>{mv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>X8($,U,_,u)});function iQ($){return nN(N3,$)}var G3=V("ZodNull",($,I)=>{hv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>G8($,U,_,u)});function X3($){return rN(G3,$)}var q3=V("ZodAny",($,I)=>{cv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>T8($,U,_,u)});function nQ(){return lN(q3)}var Q3=V("ZodUnknown",($,I)=>{dv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>H8($,U,_,u)});function $1(){return mN(Q3)}var T3=V("ZodNever",($,I)=>{pv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>Q8($,U,_,u)});function K_($){return hN(T3,$)}var H3=V("ZodVoid",($,I)=>{ov.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>q8($,U,_,u)});function rQ($){return cN(H3,$)}var W0=V("ZodDate",($,I)=>{tv.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,g)=>Y8($,_,u,g),$.min=(_,u)=>$.check(l$(_,u)),$.max=(_,u)=>$.check(g4(_,u));let U=$._zod.bag;$.minDate=U.minimum?new Date(U.minimum):null,$.maxDate=U.maximum?new Date(U.maximum):null});function lQ($){return dN(W0,$)}var Y3=V("ZodArray",($,I)=>{av.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>A8($,U,_,u),$.element=I.element,$.min=(U,_)=>$.check(t4(U,_)),$.nonempty=(U)=>$.check(t4(1,U)),$.max=(U,_)=>$.check(e6(U,_)),$.length=(U,_)=>$.check(s6(U,_)),$.unwrap=()=>$.element});function P0($,I){return tN(Y3,$,I)}function mQ($){let I=$._zod.def.shape;return R_(Object.keys(I))}var Z0=V("ZodObject",($,I)=>{ev.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>b8($,U,_,u),w.defineLazy($,"shape",()=>{return I.shape}),$.keyof=()=>R_(Object.keys($._zod.def.shape)),$.catchall=(U)=>$.clone({...$._zod.def,catchall:U}),$.passthrough=()=>$.clone({...$._zod.def,catchall:$1()}),$.loose=()=>$.clone({...$._zod.def,catchall:$1()}),$.strict=()=>$.clone({...$._zod.def,catchall:K_()}),$.strip=()=>$.clone({...$._zod.def,catchall:void 0}),$.extend=(U)=>{return w.extend($,U)},$.safeExtend=(U)=>{return w.safeExtend($,U)},$.merge=(U)=>w.merge($,U),$.pick=(U)=>w.pick($,U),$.omit=(U)=>w.omit($,U),$.partial=(...U)=>w.partial(P_,$,U[0]),$.required=(...U)=>w.required(Z_,$,U[0])});function hQ($,I){let U={type:"object",shape:$??{},...w.normalizeParams(I)};return new Z0(U)}function cQ($,I){return new Z0({type:"object",shape:$,catchall:K_(),...w.normalizeParams(I)})}function dQ($,I){return new Z0({type:"object",shape:$,catchall:$1(),...w.normalizeParams(I)})}var A0=V("ZodUnion",($,I)=>{G0.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>pU($,U,_,u),$.options=I.options});function L_($,I){return new A0({type:"union",options:$,...w.normalizeParams(I)})}var O3=V("ZodXor",($,I)=>{A0.init($,I),sv.init($,I),$._zod.processJSONSchema=(U,_,u)=>pU($,U,_,u),$.options=I.options});function pQ($,I){return new O3({type:"union",options:$,inclusive:!1,...w.normalizeParams(I)})}var V3=V("ZodDiscriminatedUnion",($,I)=>{A0.init($,I),$J.init($,I)});function oQ($,I,U){return new V3({type:"union",options:I,discriminator:$,...w.normalizeParams(U)})}var B3=V("ZodIntersection",($,I)=>{IJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>j8($,U,_,u)});function D3($,I){return new B3({type:"intersection",left:$,right:I})}var M3=V("ZodTuple",($,I)=>{BU.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>F8($,U,_,u),$.rest=(U)=>$.clone({...$._zod.def,rest:U})});function K3($,I,U){let _=I instanceof m,u=_?U:I;return new M3({type:"tuple",items:$,rest:_?I:null,...w.normalizeParams(u)})}var b0=V("ZodRecord",($,I)=>{uJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>S8($,U,_,u),$.keyType=I.keyType,$.valueType=I.valueType});function L3($,I,U){return new b0({type:"record",keyType:$,valueType:I,...w.normalizeParams(U)})}function tQ($,I,U){let _=r$($);return _._zod.values=void 0,new b0({type:"record",keyType:_,valueType:I,...w.normalizeParams(U)})}function aQ($,I,U){return new b0({type:"record",keyType:$,valueType:I,mode:"loose",...w.normalizeParams(U)})}var R3=V("ZodMap",($,I)=>{UJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>P8($,U,_,u),$.keyType=I.keyType,$.valueType=I.valueType,$.min=(...U)=>$.check(k4(...U)),$.nonempty=(U)=>$.check(k4(1,U)),$.max=(...U)=>$.check(L6(...U)),$.size=(...U)=>$.check(a6(...U))});function eQ($,I,U){return new R3({type:"map",keyType:$,valueType:I,...w.normalizeParams(U)})}var W3=V("ZodSet",($,I)=>{_J.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>Z8($,U,_,u),$.min=(...U)=>$.check(k4(...U)),$.nonempty=(U)=>$.check(k4(1,U)),$.max=(...U)=>$.check(L6(...U)),$.size=(...U)=>$.check(a6(...U))});function sQ($,I){return new W3({type:"set",valueType:$,...w.normalizeParams(I)})}var UI=V("ZodEnum",($,I)=>{gJ.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,g)=>O8($,_,u,g),$.enum=I.entries,$.options=Object.values(I.entries);let U=new Set(Object.keys(I.entries));$.extract=(_,u)=>{let g={};for(let z of _)if(U.has(z))g[z]=I.entries[z];else throw Error(`Key ${z} not found in enum`);return new UI({...I,checks:[],...w.normalizeParams(u),entries:g})},$.exclude=(_,u)=>{let g={...I.entries};for(let z of _)if(U.has(z))delete g[z];else throw Error(`Key ${z} not found in enum`);return new UI({...I,checks:[],...w.normalizeParams(u),entries:g})}});function R_($,I){let U=Array.isArray($)?Object.fromEntries($.map((_)=>[_,_])):$;return new UI({type:"enum",entries:U,...w.normalizeParams(I)})}function $7($,I){return new UI({type:"enum",entries:$,...w.normalizeParams(I)})}var P3=V("ZodLiteral",($,I)=>{zJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>V8($,U,_,u),$.values=new Set(I.values),Object.defineProperty($,"value",{get(){if(I.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return I.values[0]}})});function I7($,I){return new P3({type:"literal",values:Array.isArray($)?$:[$],...w.normalizeParams(I)})}var Z3=V("ZodFile",($,I)=>{vJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>M8($,U,_,u),$.min=(U,_)=>$.check(k4(U,_)),$.max=(U,_)=>$.check(L6(U,_)),$.mime=(U,_)=>$.check(p1(Array.isArray(U)?U:[U],_))});function u7($){return aN(Z3,$)}var A3=V("ZodTransform",($,I)=>{JJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>W8($,U,_,u),$._zod.parse=(U,_)=>{if(_.direction==="backward")throw new d6($.constructor.name);U.addIssue=(g)=>{if(typeof g==="string")U.issues.push(w.issue(g,U.value,I));else{let z=g;if(z.fatal)z.continue=!1;z.code??(z.code="custom"),z.input??(z.input=U.value),z.inst??(z.inst=$),U.issues.push(w.issue(z))}};let u=I.transform(U.value,U);if(u instanceof Promise)return u.then((g)=>{return U.value=g,U});return U.value=u,U}});function W_($){return new A3({type:"transform",transform:$})}var P_=V("ZodOptional",($,I)=>{DU.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>oU($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function M0($){return new P_({type:"optional",innerType:$})}var b3=V("ZodExactOptional",($,I)=>{NJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>oU($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function j3($){return new b3({type:"optional",innerType:$})}var F3=V("ZodNullable",($,I)=>{GJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>w8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function K0($){return new F3({type:"nullable",innerType:$})}function U7($){return M0(K0($))}var S3=V("ZodDefault",($,I)=>{XJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>C8($,U,_,u),$.unwrap=()=>$._zod.def.innerType,$.removeDefault=$.unwrap});function w3($,I){return new S3({type:"default",innerType:$,get defaultValue(){return typeof I==="function"?I():w.shallowClone(I)}})}var E3=V("ZodPrefault",($,I)=>{qJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>f8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function C3($,I){return new E3({type:"prefault",innerType:$,get defaultValue(){return typeof I==="function"?I():w.shallowClone(I)}})}var Z_=V("ZodNonOptional",($,I)=>{QJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>E8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function f3($,I){return new Z_({type:"nonoptional",innerType:$,...w.normalizeParams(I)})}var x3=V("ZodSuccess",($,I)=>{TJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>K8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function _7($){return new x3({type:"success",innerType:$})}var k3=V("ZodCatch",($,I)=>{HJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>x8($,U,_,u),$.unwrap=()=>$._zod.def.innerType,$.removeCatch=$.unwrap});function y3($,I){return new k3({type:"catch",innerType:$,catchValue:typeof I==="function"?I:()=>I})}var i3=V("ZodNaN",($,I)=>{YJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>B8($,U,_,u)});function g7($){return oN(i3,$)}var A_=V("ZodPipe",($,I)=>{OJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>k8($,U,_,u),$.in=I.in,$.out=I.out});function L0($,I){return new A_({type:"pipe",in:$,out:I})}var b_=V("ZodCodec",($,I)=>{A_.init($,I),X0.init($,I)});function z7($,I,U){return new b_({type:"pipe",in:$,out:I,transform:U.decode,reverseTransform:U.encode})}var n3=V("ZodReadonly",($,I)=>{VJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>y8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function r3($){return new n3({type:"readonly",innerType:$})}var l3=V("ZodTemplateLiteral",($,I)=>{BJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>D8($,U,_,u)});function v7($,I){return new l3({type:"template_literal",parts:$,...w.normalizeParams(I)})}var m3=V("ZodLazy",($,I)=>{KJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>n8($,U,_,u),$.unwrap=()=>$._zod.def.getter()});function h3($){return new m3({type:"lazy",getter:$})}var c3=V("ZodPromise",($,I)=>{MJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>i8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function J7($){return new c3({type:"promise",innerType:$})}var d3=V("ZodFunction",($,I)=>{DJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>R8($,U,_,u)});function N7($){return new d3({type:"function",input:Array.isArray($?.input)?K3($?.input):$?.input??P0($1()),output:$?.output??$1()})}var j0=V("ZodCustom",($,I)=>{LJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>L8($,U,_,u)});function G7($){let I=new G$({check:"custom"});return I._zod.check=$,I}function X7($,I){return eN(j0,$??(()=>!0),I)}function p3($,I={}){return sN(j0,$,I)}function o3($){return $8($)}var q7=I8,Q7=u8;function T7($,I={}){let U=new j0({type:"custom",check:"custom",fn:(_)=>_ instanceof $,abort:!0,...w.normalizeParams(I)});return U._zod.bag.Class=$,U._zod.check=(_)=>{if(!(_.value instanceof $))_.issues.push({code:"invalid_type",expected:$.name,input:_.value,inst:U,path:[...U._zod.def.path??[]]})},U}var H7=(...$)=>U8({Codec:b_,Boolean:vI,String:_I},...$);function Y7($){let I=h3(()=>{return L_([u_($),z3(),v3(),X3(),P0(I),L3(u_(),I)])});return I}function O7($,I){return L0(W_($),I)}var Gj={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function Xj($){L$({customError:$})}function qj(){return L$().customError}var t3;(function($){})(t3||(t3={}));var x={...B0,...aU,iso:uI},Qj=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function Tj($,I){let U=$.$schema;if(U==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(U==="http://json-schema.org/draft-07/schema#")return"draft-7";if(U==="http://json-schema.org/draft-04/schema#")return"draft-4";return I??"draft-2020-12"}function Hj($,I){if(!$.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let U=$.slice(1).split("/").filter(Boolean);if(U.length===0)return I.rootSchema;let _=I.version==="draft-2020-12"?"$defs":"definitions";if(U[0]===_){let u=U[1];if(!u||!I.defs[u])throw Error(`Reference not found: ${$}`);return I.defs[u]}throw Error(`Reference not found: ${$}`)}function V7($,I){if($.not!==void 0){if(typeof $.not==="object"&&Object.keys($.not).length===0)return x.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if($.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if($.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if($.if!==void 0||$.then!==void 0||$.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if($.dependentSchemas!==void 0||$.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if($.$ref){let u=$.$ref;if(I.refs.has(u))return I.refs.get(u);if(I.processing.has(u))return x.lazy(()=>{if(!I.refs.has(u))throw Error(`Circular reference not resolved: ${u}`);return I.refs.get(u)});I.processing.add(u);let g=Hj(u,I),z=f$(g,I);return I.refs.set(u,z),I.processing.delete(u),z}if($.enum!==void 0){let u=$.enum;if(I.version==="openapi-3.0"&&$.nullable===!0&&u.length===1&&u[0]===null)return x.null();if(u.length===0)return x.never();if(u.length===1)return x.literal(u[0]);if(u.every((z)=>typeof z==="string"))return x.enum(u);let g=u.map((z)=>x.literal(z));if(g.length<2)return g[0];return x.union([g[0],g[1],...g.slice(2)])}if($.const!==void 0)return x.literal($.const);let U=$.type;if(Array.isArray(U)){let u=U.map((g)=>{let z={...$,type:g};return V7(z,I)});if(u.length===0)return x.never();if(u.length===1)return u[0];return x.union(u)}if(!U)return x.any();let _;switch(U){case"string":{let u=x.string();if($.format){let g=$.format;if(g==="email")u=u.check(x.email());else if(g==="uri"||g==="uri-reference")u=u.check(x.url());else if(g==="uuid"||g==="guid")u=u.check(x.uuid());else if(g==="date-time")u=u.check(x.iso.datetime());else if(g==="date")u=u.check(x.iso.date());else if(g==="time")u=u.check(x.iso.time());else if(g==="duration")u=u.check(x.iso.duration());else if(g==="ipv4")u=u.check(x.ipv4());else if(g==="ipv6")u=u.check(x.ipv6());else if(g==="mac")u=u.check(x.mac());else if(g==="cidr")u=u.check(x.cidrv4());else if(g==="cidr-v6")u=u.check(x.cidrv6());else if(g==="base64")u=u.check(x.base64());else if(g==="base64url")u=u.check(x.base64url());else if(g==="e164")u=u.check(x.e164());else if(g==="jwt")u=u.check(x.jwt());else if(g==="emoji")u=u.check(x.emoji());else if(g==="nanoid")u=u.check(x.nanoid());else if(g==="cuid")u=u.check(x.cuid());else if(g==="cuid2")u=u.check(x.cuid2());else if(g==="ulid")u=u.check(x.ulid());else if(g==="xid")u=u.check(x.xid());else if(g==="ksuid")u=u.check(x.ksuid())}if(typeof $.minLength==="number")u=u.min($.minLength);if(typeof $.maxLength==="number")u=u.max($.maxLength);if($.pattern)u=u.regex(new RegExp($.pattern));_=u;break}case"number":case"integer":{let u=U==="integer"?x.number().int():x.number();if(typeof $.minimum==="number")u=u.min($.minimum);if(typeof $.maximum==="number")u=u.max($.maximum);if(typeof $.exclusiveMinimum==="number")u=u.gt($.exclusiveMinimum);else if($.exclusiveMinimum===!0&&typeof $.minimum==="number")u=u.gt($.minimum);if(typeof $.exclusiveMaximum==="number")u=u.lt($.exclusiveMaximum);else if($.exclusiveMaximum===!0&&typeof $.maximum==="number")u=u.lt($.maximum);if(typeof $.multipleOf==="number")u=u.multipleOf($.multipleOf);_=u;break}case"boolean":{_=x.boolean();break}case"null":{_=x.null();break}case"object":{let u={},g=$.properties||{},z=new Set($.required||[]);for(let[J,N]of Object.entries(g)){let X=f$(N,I);u[J]=z.has(J)?X:X.optional()}if($.propertyNames){let J=f$($.propertyNames,I),N=$.additionalProperties&&typeof $.additionalProperties==="object"?f$($.additionalProperties,I):x.any();if(Object.keys(u).length===0){_=x.record(J,N);break}let X=x.object(u).passthrough(),G=x.looseRecord(J,N);_=x.intersection(X,G);break}if($.patternProperties){let J=$.patternProperties,N=Object.keys(J),X=[];for(let q of N){let T=f$(J[q],I),H=x.string().regex(new RegExp(q));X.push(x.looseRecord(H,T))}let G=[];if(Object.keys(u).length>0)G.push(x.object(u).passthrough());if(G.push(...X),G.length===0)_=x.object({}).passthrough();else if(G.length===1)_=G[0];else{let q=x.intersection(G[0],G[1]);for(let T=2;T<G.length;T++)q=x.intersection(q,G[T]);_=q}break}let v=x.object(u);if($.additionalProperties===!1)_=v.strict();else if(typeof $.additionalProperties==="object")_=v.catchall(f$($.additionalProperties,I));else _=v.passthrough();break}case"array":{let{prefixItems:u,items:g}=$;if(u&&Array.isArray(u)){let z=u.map((J)=>f$(J,I)),v=g&&typeof g==="object"&&!Array.isArray(g)?f$(g,I):void 0;if(v)_=x.tuple(z).rest(v);else _=x.tuple(z);if(typeof $.minItems==="number")_=_.check(x.minLength($.minItems));if(typeof $.maxItems==="number")_=_.check(x.maxLength($.maxItems))}else if(Array.isArray(g)){let z=g.map((J)=>f$(J,I)),v=$.additionalItems&&typeof $.additionalItems==="object"?f$($.additionalItems,I):void 0;if(v)_=x.tuple(z).rest(v);else _=x.tuple(z);if(typeof $.minItems==="number")_=_.check(x.minLength($.minItems));if(typeof $.maxItems==="number")_=_.check(x.maxLength($.maxItems))}else if(g!==void 0){let z=f$(g,I),v=x.array(z);if(typeof $.minItems==="number")v=v.min($.minItems);if(typeof $.maxItems==="number")v=v.max($.maxItems);_=v}else _=x.array(x.any());break}default:throw Error(`Unsupported type: ${U}`)}if($.description)_=_.describe($.description);if($.default!==void 0)_=_.default($.default);return _}function f$($,I){if(typeof $==="boolean")return $?x.any():x.never();let U=V7($,I),_=$.type||$.enum!==void 0||$.const!==void 0;if($.anyOf&&Array.isArray($.anyOf)){let v=$.anyOf.map((N)=>f$(N,I)),J=x.union(v);U=_?x.intersection(U,J):J}if($.oneOf&&Array.isArray($.oneOf)){let v=$.oneOf.map((N)=>f$(N,I)),J=x.xor(v);U=_?x.intersection(U,J):J}if($.allOf&&Array.isArray($.allOf))if($.allOf.length===0)U=_?U:x.any();else{let v=_?U:f$($.allOf[0],I),J=_?0:1;for(let N=J;N<$.allOf.length;N++)v=x.intersection(v,f$($.allOf[N],I));U=v}if($.nullable===!0&&I.version==="openapi-3.0")U=x.nullable(U);if($.readOnly===!0)U=x.readonly(U);let u={},g=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let v of g)if(v in $)u[v]=$[v];let z=["contentEncoding","contentMediaType","contentSchema"];for(let v of z)if(v in $)u[v]=$[v];for(let v of Object.keys($))if(!Qj.has(v))u[v]=$[v];if(Object.keys(u).length>0)I.registry.add(U,u);return U}function B7($,I){if(typeof $==="boolean")return $?x.any():x.never();let U=Tj($,I?.defaultTarget),_=$.$defs||$.definitions||{},u={version:U,defs:_,refs:new Map,processing:new Set,rootSchema:$,registry:I?.registry??w$};return f$($,u)}var a3={};B4(a3,{string:()=>Yj,number:()=>Oj,date:()=>Dj,boolean:()=>Vj,bigint:()=>Bj});function Yj($){return DN(_I,$)}function Oj($){return AN(zI,$)}function Vj($){return CN(vI,$)}function Bj($){return xN(JI,$)}function Dj($){return pN(W0,$)}L$(q0());F0();function S0($){try{return process.kill($,0),!0}catch(I){return!1}}function Z7($){let I=[],U=/[^\s"']+|"([^"]*)"|'([^']*)'/g,_=U.exec($);while(_!==null){if(_[1]!==void 0)I.push(_[1]);else if(_[2]!==void 0)I.push(_[2]);else if(_[0])I.push(_[0]);_=U.exec($)}return I}var Zj=z$.object({default_cli:z$.string().optional(),agent_cli_mapping:z$.record(z$.string(),z$.string()).optional()}).passthrough().transform(($)=>({default_cli:$.default_cli,agent_cli_mapping:$.agent_cli_mapping??{}})),Aj=z$.object({command:z$.string().optional(),subcommand:z$.string().optional(),prompt_flag:z$.string().optional().transform(($)=>{if($===void 0)return;let I=$.trim().toLowerCase();if(I===""||I==="none"||I==="null")return null;return $}),auto_approve_flag:z$.string().optional(),output_format_flag:z$.string().optional(),output_format:z$.string().optional(),model_flag:z$.string().optional(),default_model:z$.string().optional(),isolation_env:z$.string().optional(),isolation_flags:z$.string().optional()}).passthrough().transform(($)=>({...$,prompt_flag:$.prompt_flag??void 0})),bj=z$.object({active_vendor:z$.string().optional(),vendors:z$.record(z$.string(),Aj).optional()}).passthrough().transform(($)=>({active_vendor:$.active_vendor,vendors:$.vendors??{}}));function A7($){try{return c6($)}catch{return null}}function jj($){let I=A7($),U=Zj.safeParse(I);if(!U.success)return{};return U.data}function Fj($){let I=A7($),U=bj.safeParse(I);if(!U.success)return{vendors:{}};return{active_vendor:U.data.active_vendor,vendors:U.data.vendors}}function uG($,I){let U=I$.resolve($),_=I$.parse(U).root;while(U!==_){let u=I$.join(U,I);if(y.existsSync(u))return u;U=I$.dirname(U)}return null}function Sj($){let I=uG($,I$.join(".agents","config","user-preferences.yaml"));if(!I)return null;try{let U=y.readFileSync(I,"utf-8");return jj(U)}catch{return null}}function wj($){let I=uG($,I$.join(".agents","skills","oma-orchestrator","config","cli-config.yaml"));if(!I)return null;try{let U=y.readFileSync(I,"utf-8");return Fj(U)}catch{return null}}function UG($,I){let U=process.cwd(),_=Sj(U),u=wj(U),g=$.replace(/-agent$/i,""),z=_?.agent_cli_mapping?.[$]||_?.agent_cli_mapping?.[g],v=I||z||_?.default_cli||u?.active_vendor||"gemini";if(!I&&!z&&!_?.default_cli&&!u?.active_vendor)console.error(r.default.yellow(`[oma] No vendor configured for agent "${$}". Falling back to "gemini".
338
- Set default_cli in .agents/config/user-preferences.yaml or use --vendor flag.`));return{vendor:v.toLowerCase(),config:u}}function b7($,I){if(I!==void 0)return I;return{gemini:"-p",claude:"-p",qwen:"-p",codex:null}[$]??"-p"}var Ej={frontend:["web","frontend","client","ui","app","dashboard","admin","portal"],backend:["api","backend","server","service","gateway","core"],mobile:["mobile","ios","android","native","rn","expo"]},Cj={frontend:["apps/web","apps/frontend","apps/client","packages/web","packages/frontend","frontend","web","client"],backend:["apps/api","apps/backend","apps/server","packages/api","packages/backend","backend","api","server"],mobile:["apps/mobile","apps/app","packages/mobile","mobile","app"]};function j7($,I){if($.startsWith("!"))return[];let U=$.replace(/\/\*\*?$/,"").replace(/\/$/,"");if(!$.includes("*")){let u=I$.join(I,U);if(y.existsSync(u)&&y.statSync(u).isDirectory())return[U];return[]}let _=I$.join(I,U);if(!y.existsSync(_)||!y.statSync(_).isDirectory())return[];try{return y.readdirSync(_,{withFileTypes:!0}).filter((g)=>g.isDirectory()&&!g.name.startsWith(".")).map((g)=>I$.join(U,g.name))}catch{return[]}}function fj($){let I=I$.join($,"pnpm-workspace.yaml");if(!y.existsSync(I))return[];try{let U=y.readFileSync(I,"utf-8");return c6(U)?.packages??[]}catch{return[]}}function F7($){let I=I$.join($,"package.json");if(!y.existsSync(I))return[];try{let U=y.readFileSync(I,"utf-8"),_=JSON.parse(U);if(Array.isArray(_?.workspaces))return _.workspaces;if(_?.workspaces&&typeof _.workspaces==="object")return _.workspaces.packages??[];return[]}catch{return[]}}function xj($){let I=I$.join($,"lerna.json");if(!y.existsSync(I))return[];try{let U=y.readFileSync(I,"utf-8");return JSON.parse(U)?.packages??[]}catch{return[]}}function kj($){let I=I$.join($,"nx.json");if(!y.existsSync(I))return[];return["apps/*","libs/*","packages/*"].flatMap((_)=>j7(_,$))}function yj($){let I=I$.join($,"turbo.json");if(!y.existsSync(I))return[];return F7($)}function ij($){let I=I$.join($,"mise.toml");if(!y.existsSync(I))return[];try{let U=y.readFileSync(I,"utf-8"),_=[],u=U.match(/workspaces\s*=\s*\[([^\]]+)\]/);if(u?.[1]){let g=u[1].match(/"([^"]+)"|'([^']+)'/g);if(g)_.push(...g.map((z)=>z.replace(/["']/g,"")))}return _}catch{return[]}}function nj($){let I=new Set,U=[fj($),F7($),xj($),kj($),yj($),ij($)];for(let u of U)for(let g of u)I.add(g);let _=new Set;for(let u of I)for(let g of j7(u,$))_.add(g);return[..._]}function rj($,I){let U=Ej[I];if(!U)return 0;let _=I$.basename($).toLowerCase(),u=$.toLowerCase();for(let g=0;g<U.length;g++){let z=U[g];if(!z)continue;if(_===z)return 100-g;if(_.includes(z))return 50-g;if(u.includes(z))return 25-g}return 0}function S7($){let I=process.cwd(),U=nj(I);if(U.length>0){let u=U.map((g)=>({workspace:g,score:rj(g,$)})).filter((g)=>g.score>0).sort((g,z)=>z.score-g.score);if(u.length>0&&u[0])return u[0].workspace}let _=Cj[$];if(_)for(let u of _){let g=I$.resolve(u);if(y.existsSync(g)&&y.statSync(g).isDirectory())return u}return"."}function w7($){let I=I$.resolve($);if(y.existsSync(I)&&y.statSync(I).isFile())return y.readFileSync(I,"utf-8");return $}function E7($,I){let U=uG(I,I$.join(".agents","skills","_shared","runtime","execution-protocols",`${$}.md`));if(!U)return"";try{return y.readFileSync(U,"utf-8")}catch{return""}}async function C7($,I,U,_,u){let g=_==="."?S7($):_,z=I$.resolve(g);if(!y.existsSync(z))y.mkdirSync(z,{recursive:!0}),console.log(r.default.dim(`[${$}] Created workspace: ${z}`));else if(g!==_)console.log(r.default.blue(`[${$}] Auto-detected workspace: ${g}`));let v=S_(),J=I$.join(v,`subagent-${U}-${$}.log`),N=I$.join(v,`subagent-${U}-${$}.pid`),X=w7(I),{vendor:G,config:q}=UG($,u),T=E7(G,process.cwd()),H=T?`${X}
337
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let g of $.seen.entries()){let v=g[1];if(I===g[0]){z(g);continue}if($.external){let N=$.external.registry.get(g[0])?.id;if(I!==g[0]&&N){z(g);continue}}if($.metadataRegistry.get(g[0])?.id){z(g);continue}if(v.cycle){z(g);continue}if(v.count>1){if($.reused==="ref"){z(g);continue}}}}function P6($,I){let U=$.seen.get(I);if(!U)throw Error("Unprocessed schema. This is a bug in Zod.");let _=(g)=>{let v=$.seen.get(g);if(v.ref===null)return;let J=v.def??v.schema,N={...J},X=v.ref;if(v.ref=null,X){_(X);let q=$.seen.get(X),T=q.schema;if(T.$ref&&($.target==="draft-07"||$.target==="draft-04"||$.target==="openapi-3.0"))J.allOf=J.allOf??[],J.allOf.push(T);else Object.assign(J,T);if(Object.assign(J,N),g._zod.parent===X)for(let Q in J){if(Q==="$ref"||Q==="allOf")continue;if(!(Q in N))delete J[Q]}if(T.$ref&&q.def)for(let Q in J){if(Q==="$ref"||Q==="allOf")continue;if(Q in q.def&&JSON.stringify(J[Q])===JSON.stringify(q.def[Q]))delete J[Q]}}let G=g._zod.parent;if(G&&G!==X){_(G);let q=$.seen.get(G);if(q?.schema.$ref){if(J.$ref=q.schema.$ref,q.def)for(let T in J){if(T==="$ref"||T==="allOf")continue;if(T in q.def&&JSON.stringify(J[T])===JSON.stringify(q.def[T]))delete J[T]}}}$.override({zodSchema:g,jsonSchema:J,path:v.path??[]})};for(let g of[...$.seen.entries()].reverse())_(g[0]);let u={};if($.target==="draft-2020-12")u.$schema="https://json-schema.org/draft/2020-12/schema";else if($.target==="draft-07")u.$schema="http://json-schema.org/draft-07/schema#";else if($.target==="draft-04")u.$schema="http://json-schema.org/draft-04/schema#";else if($.target==="openapi-3.0");if($.external?.uri){let g=$.external.registry.get(I)?.id;if(!g)throw Error("Schema is missing an `id` property");u.$id=$.external.uri(g)}Object.assign(u,U.def??U.schema);let z=$.external?.defs??{};for(let g of $.seen.entries()){let v=g[1];if(v.def&&v.defId)z[v.defId]=v.def}if($.external);else if(Object.keys(z).length>0)if($.target==="draft-2020-12")u.$defs=z;else u.definitions=z;try{let g=JSON.parse(JSON.stringify(u));return Object.defineProperty(g,"~standard",{value:{...I["~standard"],jsonSchema:{input:uI(I,"input",$.processors),output:uI(I,"output",$.processors)}},enumerable:!1,writable:!1}),g}catch(g){throw Error("Error converting schema to JSON.")}}function l$($,I){let U=I??{seen:new Set};if(U.seen.has($))return!1;U.seen.add($);let _=$._zod.def;if(_.type==="transform")return!0;if(_.type==="array")return l$(_.element,U);if(_.type==="set")return l$(_.valueType,U);if(_.type==="lazy")return l$(_.getter(),U);if(_.type==="promise"||_.type==="optional"||_.type==="nonoptional"||_.type==="nullable"||_.type==="readonly"||_.type==="default"||_.type==="prefault")return l$(_.innerType,U);if(_.type==="intersection")return l$(_.left,U)||l$(_.right,U);if(_.type==="record"||_.type==="map")return l$(_.keyType,U)||l$(_.valueType,U);if(_.type==="pipe")return l$(_.in,U)||l$(_.out,U);if(_.type==="object"){for(let u in _.shape)if(l$(_.shape[u],U))return!0;return!1}if(_.type==="union"){for(let u of _.options)if(l$(u,U))return!0;return!1}if(_.type==="tuple"){for(let u of _.items)if(l$(u,U))return!0;if(_.rest&&l$(_.rest,U))return!0;return!1}return!1}var g8=($,I={})=>(U)=>{let _=L6({...U,processors:I});return _$($,_),W6(_,$),P6(_,$)},uI=($,I,U={})=>(_)=>{let{libraryOptions:u,target:z}=_??{},g=L6({...u??{},target:z,io:I,processors:U});return _$($,g),W6(g,$),P6(g,$)};var Jj={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},v8=($,I,U,_)=>{let u=U;u.type="string";let{minimum:z,maximum:g,format:v,patterns:J,contentEncoding:N}=$._zod.bag;if(typeof z==="number")u.minLength=z;if(typeof g==="number")u.maxLength=g;if(v){if(u.format=Jj[v]??v,u.format==="")delete u.format;if(v==="time")delete u.format}if(N)u.contentEncoding=N;if(J&&J.size>0){let X=[...J];if(X.length===1)u.pattern=X[0].source;else if(X.length>1)u.allOf=[...X.map((G)=>({...I.target==="draft-07"||I.target==="draft-04"||I.target==="openapi-3.0"?{type:"string"}:{},pattern:G.source}))]}},J8=($,I,U,_)=>{let u=U,{minimum:z,maximum:g,format:v,multipleOf:J,exclusiveMaximum:N,exclusiveMinimum:X}=$._zod.bag;if(typeof v==="string"&&v.includes("int"))u.type="integer";else u.type="number";if(typeof X==="number")if(I.target==="draft-04"||I.target==="openapi-3.0")u.minimum=X,u.exclusiveMinimum=!0;else u.exclusiveMinimum=X;if(typeof z==="number"){if(u.minimum=z,typeof X==="number"&&I.target!=="draft-04")if(X>=z)delete u.minimum;else delete u.exclusiveMinimum}if(typeof N==="number")if(I.target==="draft-04"||I.target==="openapi-3.0")u.maximum=N,u.exclusiveMaximum=!0;else u.exclusiveMaximum=N;if(typeof g==="number"){if(u.maximum=g,typeof N==="number"&&I.target!=="draft-04")if(N<=g)delete u.maximum;else delete u.exclusiveMaximum}if(typeof J==="number")u.multipleOf=J},N8=($,I,U,_)=>{U.type="boolean"},G8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},X8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},q8=($,I,U,_)=>{if(I.target==="openapi-3.0")U.type="string",U.nullable=!0,U.enum=[null];else U.type="null"},Q8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},T8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},H8=($,I,U,_)=>{U.not={}},Y8=($,I,U,_)=>{},O8=($,I,U,_)=>{},V8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},B8=($,I,U,_)=>{let u=$._zod.def,z=$0(u.entries);if(z.every((g)=>typeof g==="number"))U.type="number";if(z.every((g)=>typeof g==="string"))U.type="string";U.enum=z},D8=($,I,U,_)=>{let u=$._zod.def,z=[];for(let g of u.values)if(g===void 0){if(I.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof g==="bigint")if(I.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else z.push(Number(g));else z.push(g);if(z.length===0);else if(z.length===1){let g=z[0];if(U.type=g===null?"null":typeof g,I.target==="draft-04"||I.target==="openapi-3.0")U.enum=[g];else U.const=g}else{if(z.every((g)=>typeof g==="number"))U.type="number";if(z.every((g)=>typeof g==="string"))U.type="string";if(z.every((g)=>typeof g==="boolean"))U.type="boolean";if(z.every((g)=>g===null))U.type="null";U.enum=z}},M8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},K8=($,I,U,_)=>{let u=U,z=$._zod.pattern;if(!z)throw Error("Pattern not found in template literal");u.type="string",u.pattern=z.source},R8=($,I,U,_)=>{let u=U,z={type:"string",format:"binary",contentEncoding:"binary"},{minimum:g,maximum:v,mime:J}=$._zod.bag;if(g!==void 0)z.minLength=g;if(v!==void 0)z.maxLength=v;if(J)if(J.length===1)z.contentMediaType=J[0],Object.assign(u,z);else Object.assign(u,z),u.anyOf=J.map((N)=>({contentMediaType:N}));else Object.assign(u,z)},L8=($,I,U,_)=>{U.type="boolean"},W8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},P8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},Z8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},A8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},b8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},j8=($,I,U,_)=>{let u=U,z=$._zod.def,{minimum:g,maximum:v}=$._zod.bag;if(typeof g==="number")u.minItems=g;if(typeof v==="number")u.maxItems=v;u.type="array",u.items=_$(z.element,I,{..._,path:[..._.path,"items"]})},F8=($,I,U,_)=>{let u=U,z=$._zod.def;u.type="object",u.properties={};let g=z.shape;for(let N in g)u.properties[N]=_$(g[N],I,{..._,path:[..._.path,"properties",N]});let v=new Set(Object.keys(g)),J=new Set([...v].filter((N)=>{let X=z.shape[N]._zod;if(I.io==="input")return X.optin===void 0;else return X.optout===void 0}));if(J.size>0)u.required=Array.from(J);if(z.catchall?._zod.def.type==="never")u.additionalProperties=!1;else if(!z.catchall){if(I.io==="output")u.additionalProperties=!1}else if(z.catchall)u.additionalProperties=_$(z.catchall,I,{..._,path:[..._.path,"additionalProperties"]})},oU=($,I,U,_)=>{let u=$._zod.def,z=u.inclusive===!1,g=u.options.map((v,J)=>_$(v,I,{..._,path:[..._.path,z?"oneOf":"anyOf",J]}));if(z)U.oneOf=g;else U.anyOf=g},S8=($,I,U,_)=>{let u=$._zod.def,z=_$(u.left,I,{..._,path:[..._.path,"allOf",0]}),g=_$(u.right,I,{..._,path:[..._.path,"allOf",1]}),v=(N)=>("allOf"in N)&&Object.keys(N).length===1,J=[...v(z)?z.allOf:[z],...v(g)?g.allOf:[g]];U.allOf=J},w8=($,I,U,_)=>{let u=U,z=$._zod.def;u.type="array";let g=I.target==="draft-2020-12"?"prefixItems":"items",v=I.target==="draft-2020-12"?"items":I.target==="openapi-3.0"?"items":"additionalItems",J=z.items.map((q,T)=>_$(q,I,{..._,path:[..._.path,g,T]})),N=z.rest?_$(z.rest,I,{..._,path:[..._.path,v,...I.target==="openapi-3.0"?[z.items.length]:[]]}):null;if(I.target==="draft-2020-12"){if(u.prefixItems=J,N)u.items=N}else if(I.target==="openapi-3.0"){if(u.items={anyOf:J},N)u.items.anyOf.push(N);if(u.minItems=J.length,!N)u.maxItems=J.length}else if(u.items=J,N)u.additionalItems=N;let{minimum:X,maximum:G}=$._zod.bag;if(typeof X==="number")u.minItems=X;if(typeof G==="number")u.maxItems=G},E8=($,I,U,_)=>{let u=U,z=$._zod.def;u.type="object";let g=z.keyType,J=g._zod.bag?.patterns;if(z.mode==="loose"&&J&&J.size>0){let X=_$(z.valueType,I,{..._,path:[..._.path,"patternProperties","*"]});u.patternProperties={};for(let G of J)u.patternProperties[G.source]=X}else{if(I.target==="draft-07"||I.target==="draft-2020-12")u.propertyNames=_$(z.keyType,I,{..._,path:[..._.path,"propertyNames"]});u.additionalProperties=_$(z.valueType,I,{..._,path:[..._.path,"additionalProperties"]})}let N=g._zod.values;if(N){let X=[...N].filter((G)=>typeof G==="string"||typeof G==="number");if(X.length>0)u.required=X}},C8=($,I,U,_)=>{let u=$._zod.def,z=_$(u.innerType,I,_),g=I.seen.get($);if(I.target==="openapi-3.0")g.ref=u.innerType,U.nullable=!0;else U.anyOf=[z,{type:"null"}]},f8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let z=I.seen.get($);z.ref=u.innerType},x8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let z=I.seen.get($);z.ref=u.innerType,U.default=JSON.parse(JSON.stringify(u.defaultValue))},k8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let z=I.seen.get($);if(z.ref=u.innerType,I.io==="input")U._prefault=JSON.parse(JSON.stringify(u.defaultValue))},y8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let z=I.seen.get($);z.ref=u.innerType;let g;try{g=u.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}U.default=g},i8=($,I,U,_)=>{let u=$._zod.def,z=I.io==="input"?u.in._zod.def.type==="transform"?u.out:u.in:u.out;_$(z,I,_);let g=I.seen.get($);g.ref=z},n8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let z=I.seen.get($);z.ref=u.innerType,U.readOnly=!0},r8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let z=I.seen.get($);z.ref=u.innerType},tU=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let z=I.seen.get($);z.ref=u.innerType},l8=($,I,U,_)=>{let u=$._zod.innerType;_$(u,I,_);let z=I.seen.get($);z.ref=u},pU={string:v8,number:J8,boolean:N8,bigint:G8,symbol:X8,null:q8,undefined:Q8,void:T8,never:H8,any:Y8,unknown:O8,date:V8,enum:B8,literal:D8,nan:M8,template_literal:K8,file:R8,success:L8,custom:W8,function:P8,transform:Z8,map:A8,set:b8,array:j8,object:F8,union:oU,intersection:S8,tuple:w8,record:E8,nullable:C8,nonoptional:f8,default:x8,prefault:k8,catch:y8,pipe:i8,readonly:n8,promise:r8,optional:tU,lazy:l8};function aU($,I){if("_idmap"in $){let _=$,u=L6({...I,processors:pU}),z={};for(let J of _._idmap.entries()){let[N,X]=J;_$(X,u)}let g={},v={registry:_,uri:I?.uri,defs:z};u.external=v;for(let J of _._idmap.entries()){let[N,X]=J;W6(u,X),g[N]=P6(u,X)}if(Object.keys(z).length>0){let J=u.target==="draft-2020-12"?"$defs":"definitions";g.__shared={[J]:z}}return{schemas:g}}let U=L6({...I,processors:pU});return _$($,U),W6(U,$),P6(U,$)}class m8{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter($){this.ctx.counter=$}get seen(){return this.ctx.seen}constructor($){let I=$?.target??"draft-2020-12";if(I==="draft-4")I="draft-04";if(I==="draft-7")I="draft-07";this.ctx=L6({processors:pU,target:I,...$?.metadata&&{metadata:$.metadata},...$?.unrepresentable&&{unrepresentable:$.unrepresentable},...$?.override&&{override:$.override},...$?.io&&{io:$.io}})}process($,I={path:[],schemaPath:[]}){return _$($,this.ctx,I)}emit($,I){if(I){if(I.cycles)this.ctx.cycles=I.cycles;if(I.reused)this.ctx.reused=I.reused;if(I.external)this.ctx.external=I.external}W6(this.ctx,$);let U=P6(this.ctx,$),{"~standard":_,...u}=U;return u}}var uQ={};var M0={};B4(M0,{xor:()=>pQ,xid:()=>OQ,void:()=>rQ,uuidv7:()=>NQ,uuidv6:()=>JQ,uuidv4:()=>vQ,uuid:()=>gQ,url:()=>GQ,unknown:()=>u1,union:()=>L_,undefined:()=>iQ,ulid:()=>YQ,uint64:()=>kQ,uint32:()=>CQ,tuple:()=>L3,transform:()=>P_,templateLiteral:()=>v7,symbol:()=>yQ,superRefine:()=>a3,success:()=>_7,stringbool:()=>H7,stringFormat:()=>AQ,string:()=>U_,strictObject:()=>cQ,set:()=>sQ,refine:()=>t3,record:()=>W3,readonly:()=>m3,promise:()=>J7,preprocess:()=>O7,prefault:()=>x3,pipe:()=>W0,partialRecord:()=>tQ,optional:()=>R0,object:()=>hQ,number:()=>J3,nullish:()=>U7,nullable:()=>L0,null:()=>Q3,nonoptional:()=>k3,never:()=>R_,nativeEnum:()=>$7,nanoid:()=>QQ,nan:()=>z7,meta:()=>Q7,map:()=>eQ,mac:()=>DQ,looseRecord:()=>aQ,looseObject:()=>dQ,literal:()=>I7,lazy:()=>d3,ksuid:()=>VQ,keyof:()=>mQ,jwt:()=>ZQ,json:()=>Y7,ipv6:()=>MQ,ipv4:()=>BQ,intersection:()=>K3,int64:()=>xQ,int32:()=>EQ,int:()=>__,instanceof:()=>T7,httpUrl:()=>XQ,hostname:()=>bQ,hex:()=>jQ,hash:()=>FQ,guid:()=>zQ,function:()=>N7,float64:()=>wQ,float32:()=>SQ,file:()=>u7,exactOptional:()=>S3,enum:()=>W_,emoji:()=>qQ,email:()=>_Q,e164:()=>PQ,discriminatedUnion:()=>oQ,describe:()=>q7,date:()=>lQ,custom:()=>X7,cuid2:()=>HQ,cuid:()=>TQ,codec:()=>g7,cidrv6:()=>RQ,cidrv4:()=>KQ,check:()=>G7,catch:()=>n3,boolean:()=>N3,bigint:()=>fQ,base64url:()=>WQ,base64:()=>LQ,array:()=>A0,any:()=>nQ,_function:()=>N7,_default:()=>C3,_ZodString:()=>z_,ZodXor:()=>B3,ZodXID:()=>q_,ZodVoid:()=>O3,ZodUnknown:()=>H3,ZodUnion:()=>j0,ZodUndefined:()=>X3,ZodUUID:()=>y4,ZodURL:()=>P0,ZodULID:()=>X_,ZodType:()=>c,ZodTuple:()=>R3,ZodTransform:()=>j3,ZodTemplateLiteral:()=>h3,ZodSymbol:()=>G3,ZodSuccess:()=>y3,ZodStringFormat:()=>J$,ZodString:()=>zI,ZodSet:()=>Z3,ZodRecord:()=>F0,ZodReadonly:()=>l3,ZodPromise:()=>p3,ZodPrefault:()=>f3,ZodPipe:()=>b_,ZodOptional:()=>Z_,ZodObject:()=>b0,ZodNumberFormat:()=>U1,ZodNumber:()=>vI,ZodNullable:()=>w3,ZodNull:()=>q3,ZodNonOptional:()=>A_,ZodNever:()=>Y3,ZodNanoID:()=>J_,ZodNaN:()=>r3,ZodMap:()=>P3,ZodMAC:()=>v3,ZodLiteral:()=>A3,ZodLazy:()=>c3,ZodKSUID:()=>Q_,ZodJWT:()=>M_,ZodIntersection:()=>M3,ZodIPv6:()=>H_,ZodIPv4:()=>T_,ZodGUID:()=>K0,ZodFunction:()=>o3,ZodFile:()=>b3,ZodExactOptional:()=>F3,ZodEnum:()=>_I,ZodEmoji:()=>v_,ZodEmail:()=>g_,ZodE164:()=>D_,ZodDiscriminatedUnion:()=>D3,ZodDefault:()=>E3,ZodDate:()=>Z0,ZodCustomStringFormat:()=>gI,ZodCustom:()=>S0,ZodCodec:()=>j_,ZodCatch:()=>i3,ZodCUID2:()=>G_,ZodCUID:()=>N_,ZodCIDRv6:()=>O_,ZodCIDRv4:()=>Y_,ZodBoolean:()=>JI,ZodBigIntFormat:()=>K_,ZodBigInt:()=>NI,ZodBase64URL:()=>B_,ZodBase64:()=>V_,ZodArray:()=>V3,ZodAny:()=>T3});var eU={};B4(eU,{uppercase:()=>h1,trim:()=>a1,toUpperCase:()=>s1,toLowerCase:()=>e1,startsWith:()=>d1,slugify:()=>$I,size:()=>s6,regex:()=>l1,property:()=>dU,positive:()=>lU,overwrite:()=>K4,normalize:()=>t1,nonpositive:()=>hU,nonnegative:()=>cU,negative:()=>mU,multipleOf:()=>K6,minSize:()=>k4,minLength:()=>t4,mime:()=>o1,maxSize:()=>R6,maxLength:()=>$1,lte:()=>g4,lt:()=>f4,lowercase:()=>m1,length:()=>I1,includes:()=>c1,gte:()=>r$,gt:()=>x4,endsWith:()=>p1});var UI={};B4(UI,{time:()=>d8,duration:()=>p8,datetime:()=>h8,date:()=>c8,ZodISOTime:()=>I_,ZodISODuration:()=>u_,ZodISODateTime:()=>sU,ZodISODate:()=>$_});var sU=D("ZodISODateTime",($,I)=>{Av.init($,I),J$.init($,I)});function h8($){return WN(sU,$)}var $_=D("ZodISODate",($,I)=>{bv.init($,I),J$.init($,I)});function c8($){return PN($_,$)}var I_=D("ZodISOTime",($,I)=>{jv.init($,I),J$.init($,I)});function d8($){return ZN(I_,$)}var u_=D("ZodISODuration",($,I)=>{Fv.init($,I),J$.init($,I)});function p8($){return AN(u_,$)}var UQ=($,I)=>{z0.init($,I),$.name="ZodError",Object.defineProperties($,{format:{value:(U)=>v0($,U)},flatten:{value:(U)=>g0($,U)},addIssue:{value:(U)=>{$.issues.push(U),$.message=JSON.stringify($.issues,E1,2)}},addIssues:{value:(U)=>{$.issues.push(...U),$.message=JSON.stringify($.issues,E1,2)}},isEmpty:{get(){return $.issues.length===0}}})},Gj=D("ZodError",UQ),$4=D("ZodError",UQ,{Parent:Error});var o8=x1($4),t8=k1($4),a8=y1($4),e8=i1($4),s8=IU($4),$3=uU($4),I3=UU($4),u3=_U($4),U3=zU($4),_3=gU($4),z3=vU($4),g3=JU($4);var c=D("ZodType",($,I)=>{return m.init($,I),Object.assign($["~standard"],{jsonSchema:{input:uI($,"input"),output:uI($,"output")}}),$.toJSONSchema=g8($,{}),$.def=I,$.type=I.type,Object.defineProperty($,"_def",{value:I}),$.check=(...U)=>{return $.clone(w.mergeDefs(I,{checks:[...I.checks??[],...U.map((_)=>typeof _==="function"?{_zod:{check:_,def:{check:"custom"},onattach:[]}}:_)]}),{parent:!0})},$.with=$.check,$.clone=(U,_)=>n$($,U,_),$.brand=()=>$,$.register=(U,_)=>{return U.add($,_),$},$.parse=(U,_)=>o8($,U,_,{callee:$.parse}),$.safeParse=(U,_)=>a8($,U,_),$.parseAsync=async(U,_)=>t8($,U,_,{callee:$.parseAsync}),$.safeParseAsync=async(U,_)=>e8($,U,_),$.spa=$.safeParseAsync,$.encode=(U,_)=>s8($,U,_),$.decode=(U,_)=>$3($,U,_),$.encodeAsync=async(U,_)=>I3($,U,_),$.decodeAsync=async(U,_)=>u3($,U,_),$.safeEncode=(U,_)=>U3($,U,_),$.safeDecode=(U,_)=>_3($,U,_),$.safeEncodeAsync=async(U,_)=>z3($,U,_),$.safeDecodeAsync=async(U,_)=>g3($,U,_),$.refine=(U,_)=>$.check(t3(U,_)),$.superRefine=(U)=>$.check(a3(U)),$.overwrite=(U)=>$.check(K4(U)),$.optional=()=>R0($),$.exactOptional=()=>S3($),$.nullable=()=>L0($),$.nullish=()=>R0(L0($)),$.nonoptional=(U)=>k3($,U),$.array=()=>A0($),$.or=(U)=>L_([$,U]),$.and=(U)=>K3($,U),$.transform=(U)=>W0($,P_(U)),$.default=(U)=>C3($,U),$.prefault=(U)=>x3($,U),$.catch=(U)=>n3($,U),$.pipe=(U)=>W0($,U),$.readonly=()=>m3($),$.describe=(U)=>{let _=$.clone();return w$.add(_,{description:U}),_},Object.defineProperty($,"description",{get(){return w$.get($)?.description},configurable:!0}),$.meta=(...U)=>{if(U.length===0)return w$.get($);let _=$.clone();return w$.add(_,U[0]),_},$.isOptional=()=>$.safeParse(void 0).success,$.isNullable=()=>$.safeParse(null).success,$.apply=(U)=>U($),$}),z_=D("_ZodString",($,I)=>{e6.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,z)=>v8($,_,u,z);let U=$._zod.bag;$.format=U.format??null,$.minLength=U.minimum??null,$.maxLength=U.maximum??null,$.regex=(..._)=>$.check(l1(..._)),$.includes=(..._)=>$.check(c1(..._)),$.startsWith=(..._)=>$.check(d1(..._)),$.endsWith=(..._)=>$.check(p1(..._)),$.min=(..._)=>$.check(t4(..._)),$.max=(..._)=>$.check($1(..._)),$.length=(..._)=>$.check(I1(..._)),$.nonempty=(..._)=>$.check(t4(1,..._)),$.lowercase=(_)=>$.check(m1(_)),$.uppercase=(_)=>$.check(h1(_)),$.trim=()=>$.check(a1()),$.normalize=(..._)=>$.check(t1(..._)),$.toLowerCase=()=>$.check(e1()),$.toUpperCase=()=>$.check(s1()),$.slugify=()=>$.check($I())}),zI=D("ZodString",($,I)=>{e6.init($,I),z_.init($,I),$.email=(U)=>$.check(RU(g_,U)),$.url=(U)=>$.check(D0(P0,U)),$.jwt=(U)=>$.check(rU(M_,U)),$.emoji=(U)=>$.check(AU(v_,U)),$.guid=(U)=>$.check(B0(K0,U)),$.uuid=(U)=>$.check(LU(y4,U)),$.uuidv4=(U)=>$.check(WU(y4,U)),$.uuidv6=(U)=>$.check(PU(y4,U)),$.uuidv7=(U)=>$.check(ZU(y4,U)),$.nanoid=(U)=>$.check(bU(J_,U)),$.guid=(U)=>$.check(B0(K0,U)),$.cuid=(U)=>$.check(jU(N_,U)),$.cuid2=(U)=>$.check(FU(G_,U)),$.ulid=(U)=>$.check(SU(X_,U)),$.base64=(U)=>$.check(yU(V_,U)),$.base64url=(U)=>$.check(iU(B_,U)),$.xid=(U)=>$.check(wU(q_,U)),$.ksuid=(U)=>$.check(EU(Q_,U)),$.ipv4=(U)=>$.check(CU(T_,U)),$.ipv6=(U)=>$.check(fU(H_,U)),$.cidrv4=(U)=>$.check(xU(Y_,U)),$.cidrv6=(U)=>$.check(kU(O_,U)),$.e164=(U)=>$.check(nU(D_,U)),$.datetime=(U)=>$.check(h8(U)),$.date=(U)=>$.check(c8(U)),$.time=(U)=>$.check(d8(U)),$.duration=(U)=>$.check(p8(U))});function U_($){return MN(zI,$)}var J$=D("ZodStringFormat",($,I)=>{v$.init($,I),z_.init($,I)}),g_=D("ZodEmail",($,I)=>{Bv.init($,I),J$.init($,I)});function _Q($){return RU(g_,$)}var K0=D("ZodGUID",($,I)=>{Ov.init($,I),J$.init($,I)});function zQ($){return B0(K0,$)}var y4=D("ZodUUID",($,I)=>{Vv.init($,I),J$.init($,I)});function gQ($){return LU(y4,$)}function vQ($){return WU(y4,$)}function JQ($){return PU(y4,$)}function NQ($){return ZU(y4,$)}var P0=D("ZodURL",($,I)=>{Dv.init($,I),J$.init($,I)});function GQ($){return D0(P0,$)}function XQ($){return D0(P0,{protocol:/^https?$/,hostname:H4.domain,...w.normalizeParams($)})}var v_=D("ZodEmoji",($,I)=>{Mv.init($,I),J$.init($,I)});function qQ($){return AU(v_,$)}var J_=D("ZodNanoID",($,I)=>{Kv.init($,I),J$.init($,I)});function QQ($){return bU(J_,$)}var N_=D("ZodCUID",($,I)=>{Rv.init($,I),J$.init($,I)});function TQ($){return jU(N_,$)}var G_=D("ZodCUID2",($,I)=>{Lv.init($,I),J$.init($,I)});function HQ($){return FU(G_,$)}var X_=D("ZodULID",($,I)=>{Wv.init($,I),J$.init($,I)});function YQ($){return SU(X_,$)}var q_=D("ZodXID",($,I)=>{Pv.init($,I),J$.init($,I)});function OQ($){return wU(q_,$)}var Q_=D("ZodKSUID",($,I)=>{Zv.init($,I),J$.init($,I)});function VQ($){return EU(Q_,$)}var T_=D("ZodIPv4",($,I)=>{Sv.init($,I),J$.init($,I)});function BQ($){return CU(T_,$)}var v3=D("ZodMAC",($,I)=>{Ev.init($,I),J$.init($,I)});function DQ($){return RN(v3,$)}var H_=D("ZodIPv6",($,I)=>{wv.init($,I),J$.init($,I)});function MQ($){return fU(H_,$)}var Y_=D("ZodCIDRv4",($,I)=>{Cv.init($,I),J$.init($,I)});function KQ($){return xU(Y_,$)}var O_=D("ZodCIDRv6",($,I)=>{fv.init($,I),J$.init($,I)});function RQ($){return kU(O_,$)}var V_=D("ZodBase64",($,I)=>{kv.init($,I),J$.init($,I)});function LQ($){return yU(V_,$)}var B_=D("ZodBase64URL",($,I)=>{yv.init($,I),J$.init($,I)});function WQ($){return iU(B_,$)}var D_=D("ZodE164",($,I)=>{iv.init($,I),J$.init($,I)});function PQ($){return nU(D_,$)}var M_=D("ZodJWT",($,I)=>{nv.init($,I),J$.init($,I)});function ZQ($){return rU(M_,$)}var gI=D("ZodCustomStringFormat",($,I)=>{rv.init($,I),J$.init($,I)});function AQ($,I,U={}){return II(gI,$,I,U)}function bQ($){return II(gI,"hostname",H4.hostname,$)}function jQ($){return II(gI,"hex",H4.hex,$)}function FQ($,I){let U=I?.enc??"hex",_=`${$}_${U}`,u=H4[_];if(!u)throw Error(`Unrecognized hash format: ${_}`);return II(gI,_,u,I)}var vI=D("ZodNumber",($,I)=>{VU.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,z)=>J8($,_,u,z),$.gt=(_,u)=>$.check(x4(_,u)),$.gte=(_,u)=>$.check(r$(_,u)),$.min=(_,u)=>$.check(r$(_,u)),$.lt=(_,u)=>$.check(f4(_,u)),$.lte=(_,u)=>$.check(g4(_,u)),$.max=(_,u)=>$.check(g4(_,u)),$.int=(_)=>$.check(__(_)),$.safe=(_)=>$.check(__(_)),$.positive=(_)=>$.check(x4(0,_)),$.nonnegative=(_)=>$.check(r$(0,_)),$.negative=(_)=>$.check(f4(0,_)),$.nonpositive=(_)=>$.check(g4(0,_)),$.multipleOf=(_,u)=>$.check(K6(_,u)),$.step=(_,u)=>$.check(K6(_,u)),$.finite=()=>$;let U=$._zod.bag;$.minValue=Math.max(U.minimum??Number.NEGATIVE_INFINITY,U.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,$.maxValue=Math.min(U.maximum??Number.POSITIVE_INFINITY,U.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,$.isInt=(U.format??"").includes("int")||Number.isSafeInteger(U.multipleOf??0.5),$.isFinite=!0,$.format=U.format??null});function J3($){return bN(vI,$)}var U1=D("ZodNumberFormat",($,I)=>{lv.init($,I),vI.init($,I)});function __($){return FN(U1,$)}function SQ($){return SN(U1,$)}function wQ($){return wN(U1,$)}function EQ($){return EN(U1,$)}function CQ($){return CN(U1,$)}var JI=D("ZodBoolean",($,I)=>{X0.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>N8($,U,_,u)});function N3($){return fN(JI,$)}var NI=D("ZodBigInt",($,I)=>{BU.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,z)=>G8($,_,u,z),$.gte=(_,u)=>$.check(r$(_,u)),$.min=(_,u)=>$.check(r$(_,u)),$.gt=(_,u)=>$.check(x4(_,u)),$.gte=(_,u)=>$.check(r$(_,u)),$.min=(_,u)=>$.check(r$(_,u)),$.lt=(_,u)=>$.check(f4(_,u)),$.lte=(_,u)=>$.check(g4(_,u)),$.max=(_,u)=>$.check(g4(_,u)),$.positive=(_)=>$.check(x4(BigInt(0),_)),$.negative=(_)=>$.check(f4(BigInt(0),_)),$.nonpositive=(_)=>$.check(g4(BigInt(0),_)),$.nonnegative=(_)=>$.check(r$(BigInt(0),_)),$.multipleOf=(_,u)=>$.check(K6(_,u));let U=$._zod.bag;$.minValue=U.minimum??null,$.maxValue=U.maximum??null,$.format=U.format??null});function fQ($){return kN(NI,$)}var K_=D("ZodBigIntFormat",($,I)=>{mv.init($,I),NI.init($,I)});function xQ($){return iN(K_,$)}function kQ($){return nN(K_,$)}var G3=D("ZodSymbol",($,I)=>{hv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>X8($,U,_,u)});function yQ($){return rN(G3,$)}var X3=D("ZodUndefined",($,I)=>{cv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>Q8($,U,_,u)});function iQ($){return lN(X3,$)}var q3=D("ZodNull",($,I)=>{dv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>q8($,U,_,u)});function Q3($){return mN(q3,$)}var T3=D("ZodAny",($,I)=>{pv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>Y8($,U,_,u)});function nQ(){return hN(T3)}var H3=D("ZodUnknown",($,I)=>{ov.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>O8($,U,_,u)});function u1(){return cN(H3)}var Y3=D("ZodNever",($,I)=>{tv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>H8($,U,_,u)});function R_($){return dN(Y3,$)}var O3=D("ZodVoid",($,I)=>{av.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>T8($,U,_,u)});function rQ($){return pN(O3,$)}var Z0=D("ZodDate",($,I)=>{ev.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,z)=>V8($,_,u,z),$.min=(_,u)=>$.check(r$(_,u)),$.max=(_,u)=>$.check(g4(_,u));let U=$._zod.bag;$.minDate=U.minimum?new Date(U.minimum):null,$.maxDate=U.maximum?new Date(U.maximum):null});function lQ($){return oN(Z0,$)}var V3=D("ZodArray",($,I)=>{sv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>j8($,U,_,u),$.element=I.element,$.min=(U,_)=>$.check(t4(U,_)),$.nonempty=(U)=>$.check(t4(1,U)),$.max=(U,_)=>$.check($1(U,_)),$.length=(U,_)=>$.check(I1(U,_)),$.unwrap=()=>$.element});function A0($,I){return eN(V3,$,I)}function mQ($){let I=$._zod.def.shape;return W_(Object.keys(I))}var b0=D("ZodObject",($,I)=>{$J.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>F8($,U,_,u),w.defineLazy($,"shape",()=>{return I.shape}),$.keyof=()=>W_(Object.keys($._zod.def.shape)),$.catchall=(U)=>$.clone({...$._zod.def,catchall:U}),$.passthrough=()=>$.clone({...$._zod.def,catchall:u1()}),$.loose=()=>$.clone({...$._zod.def,catchall:u1()}),$.strict=()=>$.clone({...$._zod.def,catchall:R_()}),$.strip=()=>$.clone({...$._zod.def,catchall:void 0}),$.extend=(U)=>{return w.extend($,U)},$.safeExtend=(U)=>{return w.safeExtend($,U)},$.merge=(U)=>w.merge($,U),$.pick=(U)=>w.pick($,U),$.omit=(U)=>w.omit($,U),$.partial=(...U)=>w.partial(Z_,$,U[0]),$.required=(...U)=>w.required(A_,$,U[0])});function hQ($,I){let U={type:"object",shape:$??{},...w.normalizeParams(I)};return new b0(U)}function cQ($,I){return new b0({type:"object",shape:$,catchall:R_(),...w.normalizeParams(I)})}function dQ($,I){return new b0({type:"object",shape:$,catchall:u1(),...w.normalizeParams(I)})}var j0=D("ZodUnion",($,I)=>{q0.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>oU($,U,_,u),$.options=I.options});function L_($,I){return new j0({type:"union",options:$,...w.normalizeParams(I)})}var B3=D("ZodXor",($,I)=>{j0.init($,I),IJ.init($,I),$._zod.processJSONSchema=(U,_,u)=>oU($,U,_,u),$.options=I.options});function pQ($,I){return new B3({type:"union",options:$,inclusive:!1,...w.normalizeParams(I)})}var D3=D("ZodDiscriminatedUnion",($,I)=>{j0.init($,I),uJ.init($,I)});function oQ($,I,U){return new D3({type:"union",options:I,discriminator:$,...w.normalizeParams(U)})}var M3=D("ZodIntersection",($,I)=>{UJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>S8($,U,_,u)});function K3($,I){return new M3({type:"intersection",left:$,right:I})}var R3=D("ZodTuple",($,I)=>{DU.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>w8($,U,_,u),$.rest=(U)=>$.clone({...$._zod.def,rest:U})});function L3($,I,U){let _=I instanceof m,u=_?U:I;return new R3({type:"tuple",items:$,rest:_?I:null,...w.normalizeParams(u)})}var F0=D("ZodRecord",($,I)=>{_J.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>E8($,U,_,u),$.keyType=I.keyType,$.valueType=I.valueType});function W3($,I,U){return new F0({type:"record",keyType:$,valueType:I,...w.normalizeParams(U)})}function tQ($,I,U){let _=n$($);return _._zod.values=void 0,new F0({type:"record",keyType:_,valueType:I,...w.normalizeParams(U)})}function aQ($,I,U){return new F0({type:"record",keyType:$,valueType:I,mode:"loose",...w.normalizeParams(U)})}var P3=D("ZodMap",($,I)=>{zJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>A8($,U,_,u),$.keyType=I.keyType,$.valueType=I.valueType,$.min=(...U)=>$.check(k4(...U)),$.nonempty=(U)=>$.check(k4(1,U)),$.max=(...U)=>$.check(R6(...U)),$.size=(...U)=>$.check(s6(...U))});function eQ($,I,U){return new P3({type:"map",keyType:$,valueType:I,...w.normalizeParams(U)})}var Z3=D("ZodSet",($,I)=>{gJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>b8($,U,_,u),$.min=(...U)=>$.check(k4(...U)),$.nonempty=(U)=>$.check(k4(1,U)),$.max=(...U)=>$.check(R6(...U)),$.size=(...U)=>$.check(s6(...U))});function sQ($,I){return new Z3({type:"set",valueType:$,...w.normalizeParams(I)})}var _I=D("ZodEnum",($,I)=>{vJ.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,z)=>B8($,_,u,z),$.enum=I.entries,$.options=Object.values(I.entries);let U=new Set(Object.keys(I.entries));$.extract=(_,u)=>{let z={};for(let g of _)if(U.has(g))z[g]=I.entries[g];else throw Error(`Key ${g} not found in enum`);return new _I({...I,checks:[],...w.normalizeParams(u),entries:z})},$.exclude=(_,u)=>{let z={...I.entries};for(let g of _)if(U.has(g))delete z[g];else throw Error(`Key ${g} not found in enum`);return new _I({...I,checks:[],...w.normalizeParams(u),entries:z})}});function W_($,I){let U=Array.isArray($)?Object.fromEntries($.map((_)=>[_,_])):$;return new _I({type:"enum",entries:U,...w.normalizeParams(I)})}function $7($,I){return new _I({type:"enum",entries:$,...w.normalizeParams(I)})}var A3=D("ZodLiteral",($,I)=>{JJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>D8($,U,_,u),$.values=new Set(I.values),Object.defineProperty($,"value",{get(){if(I.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return I.values[0]}})});function I7($,I){return new A3({type:"literal",values:Array.isArray($)?$:[$],...w.normalizeParams(I)})}var b3=D("ZodFile",($,I)=>{NJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>R8($,U,_,u),$.min=(U,_)=>$.check(k4(U,_)),$.max=(U,_)=>$.check(R6(U,_)),$.mime=(U,_)=>$.check(o1(Array.isArray(U)?U:[U],_))});function u7($){return sN(b3,$)}var j3=D("ZodTransform",($,I)=>{GJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>Z8($,U,_,u),$._zod.parse=(U,_)=>{if(_.direction==="backward")throw new o6($.constructor.name);U.addIssue=(z)=>{if(typeof z==="string")U.issues.push(w.issue(z,U.value,I));else{let g=z;if(g.fatal)g.continue=!1;g.code??(g.code="custom"),g.input??(g.input=U.value),g.inst??(g.inst=$),U.issues.push(w.issue(g))}};let u=I.transform(U.value,U);if(u instanceof Promise)return u.then((z)=>{return U.value=z,U});return U.value=u,U}});function P_($){return new j3({type:"transform",transform:$})}var Z_=D("ZodOptional",($,I)=>{MU.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>tU($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function R0($){return new Z_({type:"optional",innerType:$})}var F3=D("ZodExactOptional",($,I)=>{XJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>tU($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function S3($){return new F3({type:"optional",innerType:$})}var w3=D("ZodNullable",($,I)=>{qJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>C8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function L0($){return new w3({type:"nullable",innerType:$})}function U7($){return R0(L0($))}var E3=D("ZodDefault",($,I)=>{QJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>x8($,U,_,u),$.unwrap=()=>$._zod.def.innerType,$.removeDefault=$.unwrap});function C3($,I){return new E3({type:"default",innerType:$,get defaultValue(){return typeof I==="function"?I():w.shallowClone(I)}})}var f3=D("ZodPrefault",($,I)=>{TJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>k8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function x3($,I){return new f3({type:"prefault",innerType:$,get defaultValue(){return typeof I==="function"?I():w.shallowClone(I)}})}var A_=D("ZodNonOptional",($,I)=>{HJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>f8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function k3($,I){return new A_({type:"nonoptional",innerType:$,...w.normalizeParams(I)})}var y3=D("ZodSuccess",($,I)=>{YJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>L8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function _7($){return new y3({type:"success",innerType:$})}var i3=D("ZodCatch",($,I)=>{OJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>y8($,U,_,u),$.unwrap=()=>$._zod.def.innerType,$.removeCatch=$.unwrap});function n3($,I){return new i3({type:"catch",innerType:$,catchValue:typeof I==="function"?I:()=>I})}var r3=D("ZodNaN",($,I)=>{VJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>M8($,U,_,u)});function z7($){return aN(r3,$)}var b_=D("ZodPipe",($,I)=>{BJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>i8($,U,_,u),$.in=I.in,$.out=I.out});function W0($,I){return new b_({type:"pipe",in:$,out:I})}var j_=D("ZodCodec",($,I)=>{b_.init($,I),Q0.init($,I)});function g7($,I,U){return new j_({type:"pipe",in:$,out:I,transform:U.decode,reverseTransform:U.encode})}var l3=D("ZodReadonly",($,I)=>{DJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>n8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function m3($){return new l3({type:"readonly",innerType:$})}var h3=D("ZodTemplateLiteral",($,I)=>{MJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>K8($,U,_,u)});function v7($,I){return new h3({type:"template_literal",parts:$,...w.normalizeParams(I)})}var c3=D("ZodLazy",($,I)=>{LJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>l8($,U,_,u),$.unwrap=()=>$._zod.def.getter()});function d3($){return new c3({type:"lazy",getter:$})}var p3=D("ZodPromise",($,I)=>{RJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>r8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function J7($){return new p3({type:"promise",innerType:$})}var o3=D("ZodFunction",($,I)=>{KJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>P8($,U,_,u)});function N7($){return new o3({type:"function",input:Array.isArray($?.input)?L3($?.input):$?.input??A0(u1()),output:$?.output??u1()})}var S0=D("ZodCustom",($,I)=>{WJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>W8($,U,_,u)});function G7($){let I=new G$({check:"custom"});return I._zod.check=$,I}function X7($,I){return $8(S0,$??(()=>!0),I)}function t3($,I={}){return I8(S0,$,I)}function a3($){return u8($)}var q7=U8,Q7=_8;function T7($,I={}){let U=new S0({type:"custom",check:"custom",fn:(_)=>_ instanceof $,abort:!0,...w.normalizeParams(I)});return U._zod.bag.Class=$,U._zod.check=(_)=>{if(!(_.value instanceof $))_.issues.push({code:"invalid_type",expected:$.name,input:_.value,inst:U,path:[...U._zod.def.path??[]]})},U}var H7=(...$)=>z8({Codec:j_,Boolean:JI,String:zI},...$);function Y7($){let I=d3(()=>{return L_([U_($),J3(),N3(),Q3(),A0(I),W3(U_(),I)])});return I}function O7($,I){return W0(P_($),I)}var qj={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function Qj($){R$({customError:$})}function Tj(){return R$().customError}var e3;(function($){})(e3||(e3={}));var x={...M0,...eU,iso:UI},Hj=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function Yj($,I){let U=$.$schema;if(U==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(U==="http://json-schema.org/draft-07/schema#")return"draft-7";if(U==="http://json-schema.org/draft-04/schema#")return"draft-4";return I??"draft-2020-12"}function Oj($,I){if(!$.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let U=$.slice(1).split("/").filter(Boolean);if(U.length===0)return I.rootSchema;let _=I.version==="draft-2020-12"?"$defs":"definitions";if(U[0]===_){let u=U[1];if(!u||!I.defs[u])throw Error(`Reference not found: ${$}`);return I.defs[u]}throw Error(`Reference not found: ${$}`)}function V7($,I){if($.not!==void 0){if(typeof $.not==="object"&&Object.keys($.not).length===0)return x.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if($.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if($.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if($.if!==void 0||$.then!==void 0||$.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if($.dependentSchemas!==void 0||$.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if($.$ref){let u=$.$ref;if(I.refs.has(u))return I.refs.get(u);if(I.processing.has(u))return x.lazy(()=>{if(!I.refs.has(u))throw Error(`Circular reference not resolved: ${u}`);return I.refs.get(u)});I.processing.add(u);let z=Oj(u,I),g=f$(z,I);return I.refs.set(u,g),I.processing.delete(u),g}if($.enum!==void 0){let u=$.enum;if(I.version==="openapi-3.0"&&$.nullable===!0&&u.length===1&&u[0]===null)return x.null();if(u.length===0)return x.never();if(u.length===1)return x.literal(u[0]);if(u.every((g)=>typeof g==="string"))return x.enum(u);let z=u.map((g)=>x.literal(g));if(z.length<2)return z[0];return x.union([z[0],z[1],...z.slice(2)])}if($.const!==void 0)return x.literal($.const);let U=$.type;if(Array.isArray(U)){let u=U.map((z)=>{let g={...$,type:z};return V7(g,I)});if(u.length===0)return x.never();if(u.length===1)return u[0];return x.union(u)}if(!U)return x.any();let _;switch(U){case"string":{let u=x.string();if($.format){let z=$.format;if(z==="email")u=u.check(x.email());else if(z==="uri"||z==="uri-reference")u=u.check(x.url());else if(z==="uuid"||z==="guid")u=u.check(x.uuid());else if(z==="date-time")u=u.check(x.iso.datetime());else if(z==="date")u=u.check(x.iso.date());else if(z==="time")u=u.check(x.iso.time());else if(z==="duration")u=u.check(x.iso.duration());else if(z==="ipv4")u=u.check(x.ipv4());else if(z==="ipv6")u=u.check(x.ipv6());else if(z==="mac")u=u.check(x.mac());else if(z==="cidr")u=u.check(x.cidrv4());else if(z==="cidr-v6")u=u.check(x.cidrv6());else if(z==="base64")u=u.check(x.base64());else if(z==="base64url")u=u.check(x.base64url());else if(z==="e164")u=u.check(x.e164());else if(z==="jwt")u=u.check(x.jwt());else if(z==="emoji")u=u.check(x.emoji());else if(z==="nanoid")u=u.check(x.nanoid());else if(z==="cuid")u=u.check(x.cuid());else if(z==="cuid2")u=u.check(x.cuid2());else if(z==="ulid")u=u.check(x.ulid());else if(z==="xid")u=u.check(x.xid());else if(z==="ksuid")u=u.check(x.ksuid())}if(typeof $.minLength==="number")u=u.min($.minLength);if(typeof $.maxLength==="number")u=u.max($.maxLength);if($.pattern)u=u.regex(new RegExp($.pattern));_=u;break}case"number":case"integer":{let u=U==="integer"?x.number().int():x.number();if(typeof $.minimum==="number")u=u.min($.minimum);if(typeof $.maximum==="number")u=u.max($.maximum);if(typeof $.exclusiveMinimum==="number")u=u.gt($.exclusiveMinimum);else if($.exclusiveMinimum===!0&&typeof $.minimum==="number")u=u.gt($.minimum);if(typeof $.exclusiveMaximum==="number")u=u.lt($.exclusiveMaximum);else if($.exclusiveMaximum===!0&&typeof $.maximum==="number")u=u.lt($.maximum);if(typeof $.multipleOf==="number")u=u.multipleOf($.multipleOf);_=u;break}case"boolean":{_=x.boolean();break}case"null":{_=x.null();break}case"object":{let u={},z=$.properties||{},g=new Set($.required||[]);for(let[J,N]of Object.entries(z)){let X=f$(N,I);u[J]=g.has(J)?X:X.optional()}if($.propertyNames){let J=f$($.propertyNames,I),N=$.additionalProperties&&typeof $.additionalProperties==="object"?f$($.additionalProperties,I):x.any();if(Object.keys(u).length===0){_=x.record(J,N);break}let X=x.object(u).passthrough(),G=x.looseRecord(J,N);_=x.intersection(X,G);break}if($.patternProperties){let J=$.patternProperties,N=Object.keys(J),X=[];for(let q of N){let T=f$(J[q],I),H=x.string().regex(new RegExp(q));X.push(x.looseRecord(H,T))}let G=[];if(Object.keys(u).length>0)G.push(x.object(u).passthrough());if(G.push(...X),G.length===0)_=x.object({}).passthrough();else if(G.length===1)_=G[0];else{let q=x.intersection(G[0],G[1]);for(let T=2;T<G.length;T++)q=x.intersection(q,G[T]);_=q}break}let v=x.object(u);if($.additionalProperties===!1)_=v.strict();else if(typeof $.additionalProperties==="object")_=v.catchall(f$($.additionalProperties,I));else _=v.passthrough();break}case"array":{let{prefixItems:u,items:z}=$;if(u&&Array.isArray(u)){let g=u.map((J)=>f$(J,I)),v=z&&typeof z==="object"&&!Array.isArray(z)?f$(z,I):void 0;if(v)_=x.tuple(g).rest(v);else _=x.tuple(g);if(typeof $.minItems==="number")_=_.check(x.minLength($.minItems));if(typeof $.maxItems==="number")_=_.check(x.maxLength($.maxItems))}else if(Array.isArray(z)){let g=z.map((J)=>f$(J,I)),v=$.additionalItems&&typeof $.additionalItems==="object"?f$($.additionalItems,I):void 0;if(v)_=x.tuple(g).rest(v);else _=x.tuple(g);if(typeof $.minItems==="number")_=_.check(x.minLength($.minItems));if(typeof $.maxItems==="number")_=_.check(x.maxLength($.maxItems))}else if(z!==void 0){let g=f$(z,I),v=x.array(g);if(typeof $.minItems==="number")v=v.min($.minItems);if(typeof $.maxItems==="number")v=v.max($.maxItems);_=v}else _=x.array(x.any());break}default:throw Error(`Unsupported type: ${U}`)}if($.description)_=_.describe($.description);if($.default!==void 0)_=_.default($.default);return _}function f$($,I){if(typeof $==="boolean")return $?x.any():x.never();let U=V7($,I),_=$.type||$.enum!==void 0||$.const!==void 0;if($.anyOf&&Array.isArray($.anyOf)){let v=$.anyOf.map((N)=>f$(N,I)),J=x.union(v);U=_?x.intersection(U,J):J}if($.oneOf&&Array.isArray($.oneOf)){let v=$.oneOf.map((N)=>f$(N,I)),J=x.xor(v);U=_?x.intersection(U,J):J}if($.allOf&&Array.isArray($.allOf))if($.allOf.length===0)U=_?U:x.any();else{let v=_?U:f$($.allOf[0],I),J=_?0:1;for(let N=J;N<$.allOf.length;N++)v=x.intersection(v,f$($.allOf[N],I));U=v}if($.nullable===!0&&I.version==="openapi-3.0")U=x.nullable(U);if($.readOnly===!0)U=x.readonly(U);let u={},z=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let v of z)if(v in $)u[v]=$[v];let g=["contentEncoding","contentMediaType","contentSchema"];for(let v of g)if(v in $)u[v]=$[v];for(let v of Object.keys($))if(!Hj.has(v))u[v]=$[v];if(Object.keys(u).length>0)I.registry.add(U,u);return U}function B7($,I){if(typeof $==="boolean")return $?x.any():x.never();let U=Yj($,I?.defaultTarget),_=$.$defs||$.definitions||{},u={version:U,defs:_,refs:new Map,processing:new Set,rootSchema:$,registry:I?.registry??w$};return f$($,u)}var s3={};B4(s3,{string:()=>Vj,number:()=>Bj,date:()=>Kj,boolean:()=>Dj,bigint:()=>Mj});function Vj($){return KN(zI,$)}function Bj($){return jN(vI,$)}function Dj($){return xN(JI,$)}function Mj($){return yN(NI,$)}function Kj($){return tN(Z0,$)}R$(T0());w0();function E0($){try{return process.kill($,0),!0}catch(I){return!1}}function Z7($){let I=[],U=/[^\s"']+|"([^"]*)"|'([^']*)'/g,_=U.exec($);while(_!==null){if(_[1]!==void 0)I.push(_[1]);else if(_[2]!==void 0)I.push(_[2]);else if(_[0])I.push(_[0]);_=U.exec($)}return I}var bj=g$.object({default_cli:g$.string().optional(),agent_cli_mapping:g$.record(g$.string(),g$.string()).optional()}).passthrough().transform(($)=>({default_cli:$.default_cli,agent_cli_mapping:$.agent_cli_mapping??{}})),jj=g$.object({command:g$.string().optional(),subcommand:g$.string().optional(),prompt_flag:g$.string().optional().transform(($)=>{if($===void 0)return;let I=$.trim().toLowerCase();if(I===""||I==="none"||I==="null")return null;return $}),auto_approve_flag:g$.string().optional(),output_format_flag:g$.string().optional(),output_format:g$.string().optional(),model_flag:g$.string().optional(),default_model:g$.string().optional(),isolation_env:g$.string().optional(),isolation_flags:g$.string().optional()}).passthrough().transform(($)=>({...$,prompt_flag:$.prompt_flag??void 0})),Fj=g$.object({active_vendor:g$.string().optional(),vendors:g$.record(g$.string(),jj).optional()}).passthrough().transform(($)=>({active_vendor:$.active_vendor,vendors:$.vendors??{}}));function A7($){try{return p6($)}catch{return null}}function Sj($){let I=A7($),U=bj.safeParse(I);if(!U.success)return{};return U.data}function wj($){let I=A7($),U=Fj.safeParse(I);if(!U.success)return{vendors:{}};return{active_vendor:U.data.active_vendor,vendors:U.data.vendors}}function _G($,I){let U=I$.resolve($),_=I$.parse(U).root;while(U!==_){let u=I$.join(U,I);if(y.existsSync(u))return u;U=I$.dirname(U)}return null}function Ej($){let I=_G($,I$.join(".agents","config","user-preferences.yaml"));if(!I)return null;try{let U=y.readFileSync(I,"utf-8");return Sj(U)}catch{return null}}function Cj($){let I=_G($,I$.join(".agents","skills","oma-orchestrator","config","cli-config.yaml"));if(!I)return null;try{let U=y.readFileSync(I,"utf-8");return wj(U)}catch{return null}}function zG($,I){let U=process.cwd(),_=Ej(U),u=Cj(U),z=$.replace(/-agent$/i,""),g=_?.agent_cli_mapping?.[$]||_?.agent_cli_mapping?.[z],v=I||g||_?.default_cli||u?.active_vendor||"gemini";if(!I&&!g&&!_?.default_cli&&!u?.active_vendor)console.error(r.default.yellow(`[oma] No vendor configured for agent "${$}". Falling back to "gemini".
338
+ Set default_cli in .agents/config/user-preferences.yaml or use --vendor flag.`));return{vendor:v.toLowerCase(),config:u}}function b7($,I){if(I!==void 0)return I;return{gemini:"-p",claude:"-p",qwen:"-p",codex:null}[$]??"-p"}var fj={frontend:["web","frontend","client","ui","app","dashboard","admin","portal"],backend:["api","backend","server","service","gateway","core"],mobile:["mobile","ios","android","native","rn","expo"]},xj={frontend:["apps/web","apps/frontend","apps/client","packages/web","packages/frontend","frontend","web","client"],backend:["apps/api","apps/backend","apps/server","packages/api","packages/backend","backend","api","server"],mobile:["apps/mobile","apps/app","packages/mobile","mobile","app"]};function j7($,I){if($.startsWith("!"))return[];let U=$.replace(/\/\*\*?$/,"").replace(/\/$/,"");if(!$.includes("*")){let u=I$.join(I,U);if(y.existsSync(u)&&y.statSync(u).isDirectory())return[U];return[]}let _=I$.join(I,U);if(!y.existsSync(_)||!y.statSync(_).isDirectory())return[];try{return y.readdirSync(_,{withFileTypes:!0}).filter((z)=>z.isDirectory()&&!z.name.startsWith(".")).map((z)=>I$.join(U,z.name))}catch{return[]}}function kj($){let I=I$.join($,"pnpm-workspace.yaml");if(!y.existsSync(I))return[];try{let U=y.readFileSync(I,"utf-8");return p6(U)?.packages??[]}catch{return[]}}function F7($){let I=I$.join($,"package.json");if(!y.existsSync(I))return[];try{let U=y.readFileSync(I,"utf-8"),_=JSON.parse(U);if(Array.isArray(_?.workspaces))return _.workspaces;if(_?.workspaces&&typeof _.workspaces==="object")return _.workspaces.packages??[];return[]}catch{return[]}}function yj($){let I=I$.join($,"lerna.json");if(!y.existsSync(I))return[];try{let U=y.readFileSync(I,"utf-8");return JSON.parse(U)?.packages??[]}catch{return[]}}function ij($){let I=I$.join($,"nx.json");if(!y.existsSync(I))return[];return["apps/*","libs/*","packages/*"].flatMap((_)=>j7(_,$))}function nj($){let I=I$.join($,"turbo.json");if(!y.existsSync(I))return[];return F7($)}function rj($){let I=I$.join($,"mise.toml");if(!y.existsSync(I))return[];try{let U=y.readFileSync(I,"utf-8"),_=[],u=U.match(/workspaces\s*=\s*\[([^\]]+)\]/);if(u?.[1]){let z=u[1].match(/"([^"]+)"|'([^']+)'/g);if(z)_.push(...z.map((g)=>g.replace(/["']/g,"")))}return _}catch{return[]}}function lj($){let I=new Set,U=[kj($),F7($),yj($),ij($),nj($),rj($)];for(let u of U)for(let z of u)I.add(z);let _=new Set;for(let u of I)for(let z of j7(u,$))_.add(z);return[..._]}function mj($,I){let U=fj[I];if(!U)return 0;let _=I$.basename($).toLowerCase(),u=$.toLowerCase();for(let z=0;z<U.length;z++){let g=U[z];if(!g)continue;if(_===g)return 100-z;if(_.includes(g))return 50-z;if(u.includes(g))return 25-z}return 0}function S7($){let I=process.cwd(),U=lj(I);if(U.length>0){let u=U.map((z)=>({workspace:z,score:mj(z,$)})).filter((z)=>z.score>0).sort((z,g)=>g.score-z.score);if(u.length>0&&u[0])return u[0].workspace}let _=xj[$];if(_)for(let u of _){let z=I$.resolve(u);if(y.existsSync(z)&&y.statSync(z).isDirectory())return u}return"."}function w7($){let I=I$.resolve($);if(y.existsSync(I)&&y.statSync(I).isFile())return y.readFileSync(I,"utf-8");return $}function E7($,I){let U=_G(I,I$.join(".agents","skills","_shared","runtime","execution-protocols",`${$}.md`));if(!U)return"";try{return y.readFileSync(U,"utf-8")}catch{return""}}async function C7($,I,U,_,u){let z=_==="."?S7($):_,g=I$.resolve(z);if(!y.existsSync(g))y.mkdirSync(g,{recursive:!0}),console.log(r.default.dim(`[${$}] Created workspace: ${g}`));else if(z!==_)console.log(r.default.blue(`[${$}] Auto-detected workspace: ${z}`));let v=w_(),J=I$.join(v,`subagent-${U}-${$}.log`),N=I$.join(v,`subagent-${U}-${$}.pid`),X=w7(I),{vendor:G,config:q}=zG($,u),T=E7(G,process.cwd()),H=T?`${X}
339
339
 
340
- ${T}`:X,Q=q?.vendors?.[G]||{},Y=Q.command||G,K=Q.subcommand,L=y.openSync(J,"w");console.log(r.default.blue(`[${$}] Spawning subagent...`)),console.log(r.default.dim(` Vendor: ${G}`)),console.log(r.default.dim(` Workspace: ${z}`)),console.log(r.default.dim(` Log: ${J}`));let P=[],O=b7(G,Q.prompt_flag);if(Q.output_format_flag&&Q.output_format)P.push(Q.output_format_flag,Q.output_format);else if(Q.output_format_flag)P.push(Q.output_format_flag);if(Q.model_flag&&Q.default_model)P.push(Q.model_flag,Q.default_model);if(Q.isolation_flags)P.push(...Z7(Q.isolation_flags));if(Q.auto_approve_flag)P.push(Q.auto_approve_flag);else{let f={gemini:"--approval-mode=yolo",codex:"--full-auto",qwen:"--yolo"}[G];if(f)P.push(f)}if(O)P.push(O,H);let B=[];if(K)B.push(K);if(B.push(...P),!O)B.push(H);let R={...process.env};if(Q.isolation_env){let[A,...f]=Q.isolation_env.split("="),b=f.join("=");if(A&&b){let u$=b.replace("$$",String(process.pid));if(R[A]=u$,u$.startsWith("/")&&!y.existsSync(u$))y.mkdirSync(u$,{recursive:!0})}}let D=IG(Y,B,{cwd:z,stdio:["ignore",L,L],detached:!1,env:R});if(!D.pid)console.error(r.default.red(`[${$}] Failed to spawn process`)),process.exit(1);y.writeFileSync(N,D.pid.toString()),console.log(r.default.green(`[${$}] Started with PID ${D.pid}`));let M=()=>{try{if(y.existsSync(N))y.unlinkSync(N);if(y.existsSync(J))y.unlinkSync(J)}catch(A){}},F=()=>{if(D.pid&&S0(D.pid))process.kill(D.pid);M(),process.exit()};process.on("SIGINT",F),process.on("SIGTERM",F),D.on("exit",(A)=>{if(console.log(r.default.blue(`[${$}] Exited with code ${A}`)),A!==0&&y.existsSync(J)){let f=y.readFileSync(J,"utf-8").trim();if(f)console.log(r.default.red(`[${$}] Log output:`)),console.log(f)}M(),process.exit(A??0)})}async function f7($,I,U=process.cwd()){let _={};for(let u of I){let g=I$.join(U,".serena","memories",`result-${u}.md`),z=I$.join(S_(),`subagent-${$}-${u}.pid`);if(y.existsSync(g)){let J=y.readFileSync(g,"utf-8").match(/^## Status:\s*(\S+)/m);if(J?.[1])_[u]=J[1];else{let N=y.existsSync(z)?y.readFileSync(z,"utf-8").trim():"",X=parseInt(N,10);if(!Number.isNaN(X)&&S0(X))_[u]="running";else _[u]="completed"}}else if(y.existsSync(z)){let v=y.readFileSync(z,"utf-8").trim(),J=parseInt(v,10);if(!Number.isNaN(J)&&S0(J))_[u]="running";else _[u]="crashed"}else _[u]="crashed"}for(let[u,g]of Object.entries(_))console.log(`${u}:${g}`)}var lj=z$.object({agent:z$.string(),task:z$.string(),workspace:z$.string().optional()}),mj=z$.object({tasks:z$.array(lj)});function hj($){if(!y.existsSync($))throw Error(`Tasks file not found: ${$}`);let I=y.readFileSync($,"utf-8"),U=c6(I),_=mj.safeParse(U);if(!_.success)throw Error(`Invalid tasks file format: ${_.error.message}`);return _.data.tasks}function cj($){return $.map((I)=>{let U=I.split(":");if(U.length<2||!U[0])throw Error(`Invalid task format: "${I}". Expected "agent:task" or "agent:task:workspace"`);let _=U[0],u=U.slice(1),g,z;if(u.length>=2){let v=u[u.length-1]??"";if(v.startsWith("./")||v.startsWith("/")||v===".")z=v,g=u.slice(0,-1).join(":");else g=u.join(":")}else g=u.join(":");return{agent:_,task:g,workspace:z}})}async function x7($,I={}){let U=process.cwd(),_=I$.join(U,".agents","results"),u=new Date().toISOString().replace(/[:.]/g,"-").slice(0,19),g=I$.join(_,`parallel-${u}`);y.mkdirSync(g,{recursive:!0});let z=I$.join(g,"pids.txt"),v;try{if(I.inline){if($.length===0)console.error(r.default.red("Error: No tasks specified")),console.log('Usage: oh-my-agent agent:parallel --inline "agent:task" "agent:task" ...'),process.exit(1);v=cj($)}else{if($.length===0)console.error(r.default.red("Error: No tasks file specified")),console.log("Usage: oh-my-agent agent:parallel <tasks-file.yaml>"),process.exit(1);let T=$[0];if(!T)console.error(r.default.red("Error: No tasks file specified")),process.exit(1);v=hj(T)}}catch(T){console.error(r.default.red(`Error: ${T.message}`)),process.exit(1)}console.log(r.default.cyan("======================================")),console.log(r.default.cyan(" Parallel SubAgent Execution")),console.log(r.default.cyan("======================================")),console.log(""),console.log(r.default.blue("Starting parallel execution...")),console.log("");let J=[];for(let T=0;T<v.length;T++){let H=v[T];if(!H)continue;let{agent:Q,task:Y,workspace:K="."}=H,L=K==="."?S7(Q):K,P=I$.resolve(L),O=I$.join(g,`${Q}-${T}.log`);if(console.log(`${r.default.blue(`[${T}]`)} Spawning ${r.default.yellow(Q)} agent...`),console.log(` Task: ${Y.slice(0,60)}${Y.length>60?"...":""}`),console.log(` Workspace: ${L}`),!y.existsSync(P))y.mkdirSync(P,{recursive:!0});let{vendor:B,config:R}=UG(Q,I.vendor),D=R?.vendors?.[B]||{},M=D.command||B,F=D.subcommand,A=[],f=b7(B,D.prompt_flag),b=w7(Y),u$=E7(B,U),t=u$?`${b}
340
+ ${T}`:X,Q=q?.vendors?.[G]||{},Y=Q.command||G,M=Q.subcommand,L=y.openSync(J,"w");console.log(r.default.blue(`[${$}] Spawning subagent...`)),console.log(r.default.dim(` Vendor: ${G}`)),console.log(r.default.dim(` Workspace: ${g}`)),console.log(r.default.dim(` Log: ${J}`));let P=[],R=b7(G,Q.prompt_flag);if(Q.output_format_flag&&Q.output_format)P.push(Q.output_format_flag,Q.output_format);else if(Q.output_format_flag)P.push(Q.output_format_flag);if(Q.model_flag&&Q.default_model)P.push(Q.model_flag,Q.default_model);if(Q.isolation_flags)P.push(...Z7(Q.isolation_flags));if(Q.auto_approve_flag)P.push(Q.auto_approve_flag);else{let f={gemini:"--approval-mode=yolo",codex:"--full-auto",qwen:"--yolo"}[G];if(f)P.push(f)}if(R)P.push(R,H);let K=[];if(M)K.push(M);if(K.push(...P),!R)K.push(H);let V={...process.env};if(Q.isolation_env){let[A,...f]=Q.isolation_env.split("="),j=f.join("=");if(A&&j){let u$=j.replace("$$",String(process.pid));if(V[A]=u$,u$.startsWith("/")&&!y.existsSync(u$))y.mkdirSync(u$,{recursive:!0})}}let B=UG(Y,K,{cwd:g,stdio:["ignore",L,L],detached:!1,env:V});if(!B.pid)console.error(r.default.red(`[${$}] Failed to spawn process`)),process.exit(1);y.writeFileSync(N,B.pid.toString()),console.log(r.default.green(`[${$}] Started with PID ${B.pid}`));let O=()=>{try{if(y.existsSync(N))y.unlinkSync(N);if(y.existsSync(J))y.unlinkSync(J)}catch(A){}},b=()=>{if(B.pid&&E0(B.pid))process.kill(B.pid);O(),process.exit()};process.on("SIGINT",b),process.on("SIGTERM",b),B.on("exit",(A)=>{if(console.log(r.default.blue(`[${$}] Exited with code ${A}`)),A!==0&&y.existsSync(J)){let f=y.readFileSync(J,"utf-8").trim();if(f)console.log(r.default.red(`[${$}] Log output:`)),console.log(f)}O(),process.exit(A??0)})}async function f7($,I,U=process.cwd()){let _={};for(let u of I){let z=I$.join(U,".serena","memories",`result-${u}.md`),g=I$.join(w_(),`subagent-${$}-${u}.pid`);if(y.existsSync(z)){let J=y.readFileSync(z,"utf-8").match(/^## Status:\s*(\S+)/m);if(J?.[1])_[u]=J[1];else{let N=y.existsSync(g)?y.readFileSync(g,"utf-8").trim():"",X=parseInt(N,10);if(!Number.isNaN(X)&&E0(X))_[u]="running";else _[u]="completed"}}else if(y.existsSync(g)){let v=y.readFileSync(g,"utf-8").trim(),J=parseInt(v,10);if(!Number.isNaN(J)&&E0(J))_[u]="running";else _[u]="crashed"}else _[u]="crashed"}for(let[u,z]of Object.entries(_))console.log(`${u}:${z}`)}var hj=g$.object({agent:g$.string(),task:g$.string(),workspace:g$.string().optional()}),cj=g$.object({tasks:g$.array(hj)});function dj($){if(!y.existsSync($))throw Error(`Tasks file not found: ${$}`);let I=y.readFileSync($,"utf-8"),U=p6(I),_=cj.safeParse(U);if(!_.success)throw Error(`Invalid tasks file format: ${_.error.message}`);return _.data.tasks}function pj($){return $.map((I)=>{let U=I.split(":");if(U.length<2||!U[0])throw Error(`Invalid task format: "${I}". Expected "agent:task" or "agent:task:workspace"`);let _=U[0],u=U.slice(1),z,g;if(u.length>=2){let v=u[u.length-1]??"";if(v.startsWith("./")||v.startsWith("/")||v===".")g=v,z=u.slice(0,-1).join(":");else z=u.join(":")}else z=u.join(":");return{agent:_,task:z,workspace:g}})}async function x7($,I={}){let U=process.cwd(),_=I$.join(U,".agents","results"),u=new Date().toISOString().replace(/[:.]/g,"-").slice(0,19),z=I$.join(_,`parallel-${u}`);y.mkdirSync(z,{recursive:!0});let g=I$.join(z,"pids.txt"),v;try{if(I.inline){if($.length===0)console.error(r.default.red("Error: No tasks specified")),console.log('Usage: oh-my-agent agent:parallel --inline "agent:task" "agent:task" ...'),process.exit(1);v=pj($)}else{if($.length===0)console.error(r.default.red("Error: No tasks file specified")),console.log("Usage: oh-my-agent agent:parallel <tasks-file.yaml>"),process.exit(1);let T=$[0];if(!T)console.error(r.default.red("Error: No tasks file specified")),process.exit(1);v=dj(T)}}catch(T){console.error(r.default.red(`Error: ${T.message}`)),process.exit(1)}console.log(r.default.cyan("======================================")),console.log(r.default.cyan(" Parallel SubAgent Execution")),console.log(r.default.cyan("======================================")),console.log(""),console.log(r.default.blue("Starting parallel execution...")),console.log("");let J=[];for(let T=0;T<v.length;T++){let H=v[T];if(!H)continue;let{agent:Q,task:Y,workspace:M="."}=H,L=M==="."?S7(Q):M,P=I$.resolve(L),R=I$.join(z,`${Q}-${T}.log`);if(console.log(`${r.default.blue(`[${T}]`)} Spawning ${r.default.yellow(Q)} agent...`),console.log(` Task: ${Y.slice(0,60)}${Y.length>60?"...":""}`),console.log(` Workspace: ${L}`),!y.existsSync(P))y.mkdirSync(P,{recursive:!0});let{vendor:K,config:V}=zG(Q,I.vendor),B=V?.vendors?.[K]||{},O=B.command||K,b=B.subcommand,A=[],f=b7(K,B.prompt_flag),j=w7(Y),u$=E7(K,U),t=u$?`${j}
341
341
 
342
- ${u$}`:b;if(D.output_format_flag&&D.output_format)A.push(D.output_format_flag,D.output_format);else if(D.output_format_flag)A.push(D.output_format_flag);if(D.model_flag&&D.default_model)A.push(D.model_flag,D.default_model);if(D.isolation_flags)A.push(...Z7(D.isolation_flags));if(D.auto_approve_flag)A.push(D.auto_approve_flag);else{let M1={gemini:"--approval-mode=yolo",codex:"--full-auto",qwen:"--yolo"}[B];if(M1)A.push(M1)}if(f)A.push(f,t);let Y$=[];if(F)Y$.push(F);if(Y$.push(...A),!f)Y$.push(t);let o$={...process.env};if(D.isolation_env){let[J6,...M1]=D.isolation_env.split("="),p9=M1.join("=");if(J6&&p9){let _u=p9.replace("$$",String(process.pid));if(o$[J6]=_u,_u.startsWith("/")&&!y.existsSync(_u))y.mkdirSync(_u,{recursive:!0})}}let t$=y.openSync(O,"w"),S4=IG(M,Y$,{cwd:P,stdio:["ignore",t$,t$],detached:!0,env:o$});if(!S4.pid){console.error(r.default.red(`[${T}] Failed to spawn ${Q} process`));continue}y.appendFileSync(z,`${S4.pid}:${Q}
343
- `);let f2=new Promise((J6)=>{S4.on("exit",(M1)=>{y.closeSync(t$),J6(M1)}),S4.on("error",()=>{y.closeSync(t$),J6(null)})});J.push({pid:S4.pid,agent:Q,idx:T,promise:f2})}if(console.log(""),console.log(r.default.blue("[Parallel]")+` Started ${r.default.yellow(String(J.length))} agents`),I.noWait){console.log(`${r.default.blue("[Parallel]")} Running in background mode`),console.log(`${r.default.blue("[Parallel]")} Results will be in: ${g}`),console.log(`${r.default.blue("[Parallel]")} PID list: ${z}`);return}console.log(`${r.default.blue("[Parallel]")} Waiting for completion...`),console.log("");let N=()=>{console.log(""),console.log(`${r.default.yellow("[Parallel]")} Cleaning up child processes...`);for(let{pid:T,agent:H}of J)if(S0(T)){try{process.kill(-T,"SIGTERM")}catch{try{process.kill(T,"SIGTERM")}catch{}}console.log(`${r.default.yellow("[Parallel]")} Killed PID ${T} (${H})`)}try{if(y.existsSync(z))y.unlinkSync(z)}catch{}};process.on("SIGINT",()=>{N(),process.exit(130)}),process.on("SIGTERM",()=>{N(),process.exit(143)});let X=0,G=0;for(let{agent:T,idx:H,promise:Q}of J){let Y=await Q;if(Y===0)console.log(`${r.default.green("[DONE]")} ${T} agent (${H}) completed`),X++;else console.log(r.default.red("[FAIL]")+` ${T} agent (${H}) failed (exit code: ${Y})`),G++}try{if(y.existsSync(z))y.unlinkSync(z)}catch{}console.log(""),console.log(r.default.cyan("======================================")),console.log(r.default.cyan(" Execution Summary")),console.log(r.default.cyan("======================================")),console.log(`Total: ${J.length}`),console.log(`Completed: ${r.default.green(String(X))}`),console.log(`Failed: ${r.default.red(String(G))}`),console.log(`Results: ${g}`),console.log(r.default.cyan("======================================")),console.log(""),console.log(r.default.blue("Result files:"));let q=y.readdirSync(g).filter((T)=>T.endsWith(".log"));for(let T of q)console.log(` - ${I$.join(g,T)}`);if(G>0)process.exit(1)}function dj(){let $=F_(process.cwd());if($.id&&$.status!=="completed"&&$.status!=="failed")return $.id;return s3(new Date)}var pj="codex",oj=["codex","claude","gemini","qwen"];function tj($,I,U){if(I)return`Review the uncommitted changes (git diff) in this repository. ${$}`;try{let _=Pj("git diff HEAD~1",{cwd:U,encoding:"utf-8"}).trim();if(!_)return`No committed changes found. ${$}`;return`Review the following committed diff:
342
+ ${u$}`:j;if(B.output_format_flag&&B.output_format)A.push(B.output_format_flag,B.output_format);else if(B.output_format_flag)A.push(B.output_format_flag);if(B.model_flag&&B.default_model)A.push(B.model_flag,B.default_model);if(B.isolation_flags)A.push(...Z7(B.isolation_flags));if(B.auto_approve_flag)A.push(B.auto_approve_flag);else{let K1={gemini:"--approval-mode=yolo",codex:"--full-auto",qwen:"--yolo"}[K];if(K1)A.push(K1)}if(f)A.push(f,t);let Y$=[];if(b)Y$.push(b);if(Y$.push(...A),!f)Y$.push(t);let o$={...process.env};if(B.isolation_env){let[J6,...K1]=B.isolation_env.split("="),p9=K1.join("=");if(J6&&p9){let zu=p9.replace("$$",String(process.pid));if(o$[J6]=zu,zu.startsWith("/")&&!y.existsSync(zu))y.mkdirSync(zu,{recursive:!0})}}let t$=y.openSync(R,"w"),S4=UG(O,Y$,{cwd:P,stdio:["ignore",t$,t$],detached:!0,env:o$});if(!S4.pid){console.error(r.default.red(`[${T}] Failed to spawn ${Q} process`));continue}y.appendFileSync(g,`${S4.pid}:${Q}
343
+ `);let k2=new Promise((J6)=>{S4.on("exit",(K1)=>{y.closeSync(t$),J6(K1)}),S4.on("error",()=>{y.closeSync(t$),J6(null)})});J.push({pid:S4.pid,agent:Q,idx:T,promise:k2})}if(console.log(""),console.log(r.default.blue("[Parallel]")+` Started ${r.default.yellow(String(J.length))} agents`),I.noWait){console.log(`${r.default.blue("[Parallel]")} Running in background mode`),console.log(`${r.default.blue("[Parallel]")} Results will be in: ${z}`),console.log(`${r.default.blue("[Parallel]")} PID list: ${g}`);return}console.log(`${r.default.blue("[Parallel]")} Waiting for completion...`),console.log("");let N=()=>{console.log(""),console.log(`${r.default.yellow("[Parallel]")} Cleaning up child processes...`);for(let{pid:T,agent:H}of J)if(E0(T)){try{process.kill(-T,"SIGTERM")}catch{try{process.kill(T,"SIGTERM")}catch{}}console.log(`${r.default.yellow("[Parallel]")} Killed PID ${T} (${H})`)}try{if(y.existsSync(g))y.unlinkSync(g)}catch{}};process.on("SIGINT",()=>{N(),process.exit(130)}),process.on("SIGTERM",()=>{N(),process.exit(143)});let X=0,G=0;for(let{agent:T,idx:H,promise:Q}of J){let Y=await Q;if(Y===0)console.log(`${r.default.green("[DONE]")} ${T} agent (${H}) completed`),X++;else console.log(r.default.red("[FAIL]")+` ${T} agent (${H}) failed (exit code: ${Y})`),G++}try{if(y.existsSync(g))y.unlinkSync(g)}catch{}console.log(""),console.log(r.default.cyan("======================================")),console.log(r.default.cyan(" Execution Summary")),console.log(r.default.cyan("======================================")),console.log(`Total: ${J.length}`),console.log(`Completed: ${r.default.green(String(X))}`),console.log(`Failed: ${r.default.red(String(G))}`),console.log(`Results: ${z}`),console.log(r.default.cyan("======================================")),console.log(""),console.log(r.default.blue("Result files:"));let q=y.readdirSync(z).filter((T)=>T.endsWith(".log"));for(let T of q)console.log(` - ${I$.join(z,T)}`);if(G>0)process.exit(1)}function oj(){let $=S_(process.cwd());if($.id&&$.status!=="completed"&&$.status!=="failed")return $.id;return IG(new Date)}var tj="codex",aj=["codex","claude","gemini","qwen"];function ej($,I,U){if(I)return`Review the uncommitted changes (git diff) in this repository. ${$}`;try{let _=Aj("git diff HEAD~1",{cwd:U,encoding:"utf-8"}).trim();if(!_)return`No committed changes found. ${$}`;return`Review the following committed diff:
344
344
 
345
345
  \`\`\`diff
346
346
  ${_}
347
347
  \`\`\`
348
348
 
349
- ${$}`}catch{return`Review the latest committed changes. ${$}`}}function aj($,I,U,_,u){let g=I.command||$;if($==="codex")return _?[g,"review","--uncommitted"]:[g,"review"];let z=tj(U,_,u),v=I.prompt_flag||"-p",J=[g,v,z];if(I.model_flag&&I.default_model)J.push(I.model_flag,I.default_model);if(I.auto_approve_flag)J.push(I.auto_approve_flag);else{let X={gemini:"--approval-mode=yolo",qwen:"--yolo"}[$];if(X)J.push(X)}if($==="claude")J.push("--output-format","text");return J}async function k7($){let I=dj(),U=$.prompt||"Review for bugs, security vulnerabilities, performance issues, and code quality. Report findings with severity levels.",_="review",u=$.workspace||".",g=I$.resolve(u),{vendor:z,config:v}=UG("review",$.model),J=oj.includes(z)?z:pj;if(J!==z)console.log(r.default.yellow(`[review] "${z}" has no review mode, falling back to ${J}`));let N=v?.vendors?.[J]||{},X=$.uncommitted??!0,G=aj(J,N,U,X,g),[q,...T]=G,H=I$.join(S_(),`review-${I}.log`),Q=I$.join(S_(),`review-${I}.pid`);console.log(r.default.dim(` Session: ${I}`)),console.log(r.default.blue("[review] Starting review...")),console.log(r.default.dim(` Vendor: ${J}`)),console.log(r.default.dim(` Command: ${q} ${T.slice(0,2).join(" ")}...`));let Y=y.openSync(H,"w"),K=IG(q,T,{cwd:g,stdio:["ignore",Y,Y],detached:!1});if(!K.pid)console.error(r.default.red("[review] Failed to spawn process")),process.exit(1);y.writeFileSync(Q,K.pid.toString()),console.log(r.default.green(`[review] Started with PID ${K.pid}`));let L=()=>{try{if(y.existsSync(Q))y.unlinkSync(Q);if(y.existsSync(H))y.unlinkSync(H)}catch(O){}},P=()=>{if(K.pid&&S0(K.pid))process.kill(K.pid);L(),process.exit()};process.on("SIGINT",P),process.on("SIGTERM",P),K.on("exit",(O)=>{if(y.existsSync(H)){let B=y.readFileSync(H,"utf-8").trim();if(B)console.log(""),console.log(B)}console.log(O===0?r.default.green("[review] Done"):r.default.red(`[review] Exited with code ${O}`)),L(),process.exit(O??0)})}u4();var G1=q$(b$(),1);import{execSync as YS}from"node:child_process";import{existsSync as CG,readFileSync as fG}from"node:fs";import{homedir as xG}from"node:os";import{join as kG}from"node:path";import{execSync as bG}from"node:child_process";import QT from"node:https";function pF(){try{let $=bG("pgrep -fl language_server",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]});for(let I of $.split(`
350
- `))if(I.includes("antigravity")||I.includes("language_server")){let U=I.trim().split(" ")[0];if(!U)continue;let _=Number.parseInt(U,10);if(!Number.isNaN(_))return _}}catch{}return null}function oF($){try{return bG(`ps -p ${$} -ww -o args`,{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).match(/--csrf_token\s+([a-zA-Z0-9-]+)/)?.[1]??null}catch{}return null}function tF($){try{let I=bG(`lsof -nP -a -iTCP -sTCP:LISTEN -p ${$}`,{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}),U=[];for(let _ of I.split(`
351
- `).slice(1)){let u=_.match(/:(\d+)\s+\(LISTEN\)/);if(u?.[1])U.push(Number.parseInt(u[1],10))}return U}catch{}return[]}function TT($,I,U,_){return new Promise((u,g)=>{let z=JSON.stringify(_),v=QT.request({hostname:"127.0.0.1",port:$,path:I,method:"POST",headers:{"Content-Type":"application/json","Content-Length":Buffer.byteLength(z),"Connect-Protocol-Version":"1","X-Codeium-Csrf-Token":U},rejectUnauthorized:!1,timeout:5000},(J)=>{let N="";J.on("data",(X)=>{N+=X}),J.on("end",()=>{if(J.statusCode&&J.statusCode>=200&&J.statusCode<300)try{u(JSON.parse(N))}catch{g(Error("Invalid JSON response"))}else g(Error(`Request failed: ${J.statusCode}`))})});v.on("error",g),v.on("timeout",()=>{v.destroy(),g(Error("Request timeout"))}),v.write(z),v.end()})}function aF($,I){return new Promise((U)=>{let _=QT.request({hostname:"127.0.0.1",port:$,path:"/exa.language_server_pb.LanguageServerService/GetUnleashData",method:"POST",headers:{"Content-Type":"application/json","X-Codeium-Csrf-Token":I,"Connect-Protocol-Version":"1"},rejectUnauthorized:!1,timeout:5000},(u)=>{let g="";u.on("data",(z)=>{g+=z}),u.on("end",()=>{if(u.statusCode===200)try{JSON.parse(g),U(!0)}catch{U(!1)}else U(!1)})});_.on("error",()=>U(!1)),_.on("timeout",()=>{_.destroy(),U(!1)}),_.write(JSON.stringify({wrapper_data:{}})),_.end()})}function eF($){if($<=0)return"Ready";let I=Math.ceil($/60000);if(I<60)return`${I}m`;return`${Math.floor(I/60)}h ${I%60}m`}function qT($,I){if(!$||I===void 0)return;let U=Number($),_=Number(I);if(U<=0)return;return{available:_,monthly:U,usedPercent:(U-_)/U*100,remainingPercent:_/U*100}}function sF($){let I=$.userStatus??{},U=I.planStatus?.planInfo??{},_=qT(U.monthlyPromptCredits,I.planStatus?.availablePromptCredits),u=qT(U.monthlyFlowCredits,I.planStatus?.availableFlowCredits),z=(I.cascadeModelConfigData?.clientModelConfigs??[]).filter((J)=>J.quotaInfo!==void 0).map((J)=>{let N=J.quotaInfo.resetTime?new Date(J.quotaInfo.resetTime):null,X=N?N.getTime()-Date.now():0,G=J.quotaInfo.remainingFraction,q=0;if(G!==void 0&&G!==null)q=G*100;else if(J.quotaInfo.allowed)q=100;return{label:J.label||"Unknown",modelId:J.modelOrAlias?.model||"unknown",remainingPercent:q,isExhausted:J.quotaInfo.remainingFraction===0,resetTime:N,timeUntilReset:eF(X),supportsImages:J.supportsImages??!1}}),v=I.cascadeModelConfigData?.defaultOverrideModelConfig?.modelOrAlias?.model??null;return{userName:I.name||"Unknown",email:I.email||"",planName:U.planName||"Free",tierName:I.userTier?.name||"",promptCredits:_,flowCredits:u,models:z,defaultModel:v,timestamp:new Date}}async function HT(){let $=pF();if(!$)return null;let I=oF($);if(!I)return null;let U=tF($);for(let _ of U)if(await aF(_,I))return{pid:$,csrfToken:I,port:_};return null}async function $S($){try{let I=await TT($.port,"/exa.language_server_pb.LanguageServerService/GetUserStatus",$.csrfToken,{metadata:{ideName:"antigravity",extensionName:"antigravity",locale:"en"}});return sF(I)}catch{return null}}async function YT(){let $=await HT();if(!$)return null;try{return await TT($.port,"/exa.language_server_pb.LanguageServerService/GetUserStatus",$.csrfToken,{metadata:{ideName:"antigravity",extensionName:"antigravity",locale:"en"}})}catch{return null}}async function k0(){let $=await HT();if(!$)return null;return $S($)}qI();function yG(){try{let $=YS("claude auth status",{stdio:["pipe","pipe","ignore"],encoding:"utf-8"});return JSON.parse($).loggedIn===!0}catch{return!1}}function iG(){let $=kG(xG(),".gemini","oauth_creds.json");if(!CG($))return!1;try{let I=JSON.parse(fG($,"utf-8"));return!!(I.access_token&&I.refresh_token)}catch{return!1}}function nG(){let $=kG(xG(),".codex","auth.json");if(!CG($))return!1;try{return!!JSON.parse(fG($,"utf-8")).tokens?.access_token}catch{return!1}}function rG(){let $=kG(xG(),".qwen","settings.json");if(!CG($))return!1;try{return!!JSON.parse(fG($,"utf-8")).security?.auth?.selectedType}catch{return!1}}async function jT($=!1){let[I,U]=await Promise.all([r4(),k0().then((G)=>!!G)]),_=iG(),u=yG(),g=nG(),z=rG(),v={github:I,gemini:_,claude:u,codex:g,qwen:z,antigravity:U};if($){console.log(JSON.stringify(v,null,2));return}V$(G1.default.bgMagenta(G1.default.white(" \uD83D\uDD10 oh-my-agent auth status ")));let J=(G)=>G?"✅":"❌",N=(G)=>G?G1.default.green("Authenticated"):G1.default.red("Not Authenticated");k([["GitHub",I],["Gemini CLI",_],["Claude CLI",u],["Codex CLI",g],["Qwen CLI",z],["Antigravity",U]].map(([G,q])=>`${J(q)} ${G.padEnd(12)} ${N(q)}`).join(`
352
- `),"Authentication Status"),d(`Use ${G1.default.cyan("gemini auth")}, ${G1.default.cyan("claude auth")}, etc. to login.`)}import{spawn as OS}from"node:child_process";import{existsSync as FT,readFileSync as ST,writeFileSync as VS}from"node:fs";import BS from"node:http";import DS from"node:https";import{homedir as MS}from"node:os";import{join as wT}from"node:path";var KS="http://localhost:12341/mcp",ET=1000,LS=Number.parseInt(process.env.OH_MY_AG_BRIDGE_PROBE_TIMEOUT_MS??"2000",10),RS=Number.parseInt(process.env.OH_MY_AG_BRIDGE_STARTUP_TIMEOUT_MS??"120000",10),b6={};function CT(){if(b6.stdinData)process.stdin.off("data",b6.stdinData);if(b6.sigint)process.off("SIGINT",b6.sigint);if(b6.sigterm)process.off("SIGTERM",b6.sigterm);b6={}}function WS(){let $=wT(MS(),".serena","serena_config.yml");if(!FT($))return;try{let U=ST($,"utf8").match(/^projects:\s*\n((?:\s*-\s*.+\n?)*)/m);if(!U)return;let u=((U[1]??"").match(/^\s*-\s*(.+)$/gm)||[]).map((g)=>g.replace(/^\s*-\s*/,"").trim());for(let g of u){let z=wT(g,".serena","project.yml");if(!FT(z))continue;let v=ST(z,"utf8");if(!/^languages:/m.test(v)){console.error(`[Bridge] Missing 'languages' key in ${z}, adding default...`);let J=v.search(/\n(?=\w)/);if(J!==-1){let N=`${v.slice(0,J)}
349
+ ${$}`}catch{return`Review the latest committed changes. ${$}`}}function sj($,I,U,_,u){let z=I.command||$;if($==="codex")return _?[z,"review","--uncommitted"]:[z,"review"];let g=ej(U,_,u),v=I.prompt_flag||"-p",J=[z,v,g];if(I.model_flag&&I.default_model)J.push(I.model_flag,I.default_model);if(I.auto_approve_flag)J.push(I.auto_approve_flag);else{let X={gemini:"--approval-mode=yolo",qwen:"--yolo"}[$];if(X)J.push(X)}if($==="claude")J.push("--output-format","text");return J}async function k7($){let I=oj(),U=$.prompt||"Review for bugs, security vulnerabilities, performance issues, and code quality. Report findings with severity levels.",_="review",u=$.workspace||".",z=I$.resolve(u),{vendor:g,config:v}=zG("review",$.model),J=aj.includes(g)?g:tj;if(J!==g)console.log(r.default.yellow(`[review] "${g}" has no review mode, falling back to ${J}`));let N=v?.vendors?.[J]||{},X=$.uncommitted??!0,G=sj(J,N,U,X,z),[q,...T]=G,H=I$.join(w_(),`review-${I}.log`),Q=I$.join(w_(),`review-${I}.pid`);console.log(r.default.dim(` Session: ${I}`)),console.log(r.default.blue("[review] Starting review...")),console.log(r.default.dim(` Vendor: ${J}`)),console.log(r.default.dim(` Command: ${q} ${T.slice(0,2).join(" ")}...`));let Y=y.openSync(H,"w"),M=UG(q,T,{cwd:z,stdio:["ignore",Y,Y],detached:!1});if(!M.pid)console.error(r.default.red("[review] Failed to spawn process")),process.exit(1);y.writeFileSync(Q,M.pid.toString()),console.log(r.default.green(`[review] Started with PID ${M.pid}`));let L=()=>{try{if(y.existsSync(Q))y.unlinkSync(Q);if(y.existsSync(H))y.unlinkSync(H)}catch(R){}},P=()=>{if(M.pid&&E0(M.pid))process.kill(M.pid);L(),process.exit()};process.on("SIGINT",P),process.on("SIGTERM",P),M.on("exit",(R)=>{if(y.existsSync(H)){let K=y.readFileSync(H,"utf-8").trim();if(K)console.log(""),console.log(K)}console.log(R===0?r.default.green("[review] Done"):r.default.red(`[review] Exited with code ${R}`)),L(),process.exit(R??0)})}U4();var X1=q$(b$(),1);import{execSync as VS}from"node:child_process";import{existsSync as xG,readFileSync as kG}from"node:fs";import{homedir as yG}from"node:os";import{join as iG}from"node:path";import{execSync as FG}from"node:child_process";import QT from"node:https";function tF(){try{let $=FG("pgrep -fl language_server",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]});for(let I of $.split(`
350
+ `))if(I.includes("antigravity")||I.includes("language_server")){let U=I.trim().split(" ")[0];if(!U)continue;let _=Number.parseInt(U,10);if(!Number.isNaN(_))return _}}catch{}return null}function aF($){try{return FG(`ps -p ${$} -ww -o args`,{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).match(/--csrf_token\s+([a-zA-Z0-9-]+)/)?.[1]??null}catch{}return null}function eF($){try{let I=FG(`lsof -nP -a -iTCP -sTCP:LISTEN -p ${$}`,{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}),U=[];for(let _ of I.split(`
351
+ `).slice(1)){let u=_.match(/:(\d+)\s+\(LISTEN\)/);if(u?.[1])U.push(Number.parseInt(u[1],10))}return U}catch{}return[]}function TT($,I,U,_){return new Promise((u,z)=>{let g=JSON.stringify(_),v=QT.request({hostname:"127.0.0.1",port:$,path:I,method:"POST",headers:{"Content-Type":"application/json","Content-Length":Buffer.byteLength(g),"Connect-Protocol-Version":"1","X-Codeium-Csrf-Token":U},rejectUnauthorized:!1,timeout:5000},(J)=>{let N="";J.on("data",(X)=>{N+=X}),J.on("end",()=>{if(J.statusCode&&J.statusCode>=200&&J.statusCode<300)try{u(JSON.parse(N))}catch{z(Error("Invalid JSON response"))}else z(Error(`Request failed: ${J.statusCode}`))})});v.on("error",z),v.on("timeout",()=>{v.destroy(),z(Error("Request timeout"))}),v.write(g),v.end()})}function sF($,I){return new Promise((U)=>{let _=QT.request({hostname:"127.0.0.1",port:$,path:"/exa.language_server_pb.LanguageServerService/GetUnleashData",method:"POST",headers:{"Content-Type":"application/json","X-Codeium-Csrf-Token":I,"Connect-Protocol-Version":"1"},rejectUnauthorized:!1,timeout:5000},(u)=>{let z="";u.on("data",(g)=>{z+=g}),u.on("end",()=>{if(u.statusCode===200)try{JSON.parse(z),U(!0)}catch{U(!1)}else U(!1)})});_.on("error",()=>U(!1)),_.on("timeout",()=>{_.destroy(),U(!1)}),_.write(JSON.stringify({wrapper_data:{}})),_.end()})}function $S($){if($<=0)return"Ready";let I=Math.ceil($/60000);if(I<60)return`${I}m`;return`${Math.floor(I/60)}h ${I%60}m`}function qT($,I){if(!$||I===void 0)return;let U=Number($),_=Number(I);if(U<=0)return;return{available:_,monthly:U,usedPercent:(U-_)/U*100,remainingPercent:_/U*100}}function IS($){let I=$.userStatus??{},U=I.planStatus?.planInfo??{},_=qT(U.monthlyPromptCredits,I.planStatus?.availablePromptCredits),u=qT(U.monthlyFlowCredits,I.planStatus?.availableFlowCredits),g=(I.cascadeModelConfigData?.clientModelConfigs??[]).filter((J)=>J.quotaInfo!==void 0).map((J)=>{let N=J.quotaInfo.resetTime?new Date(J.quotaInfo.resetTime):null,X=N?N.getTime()-Date.now():0,G=J.quotaInfo.remainingFraction,q=0;if(G!==void 0&&G!==null)q=G*100;else if(J.quotaInfo.allowed)q=100;return{label:J.label||"Unknown",modelId:J.modelOrAlias?.model||"unknown",remainingPercent:q,isExhausted:J.quotaInfo.remainingFraction===0,resetTime:N,timeUntilReset:$S(X),supportsImages:J.supportsImages??!1}}),v=I.cascadeModelConfigData?.defaultOverrideModelConfig?.modelOrAlias?.model??null;return{userName:I.name||"Unknown",email:I.email||"",planName:U.planName||"Free",tierName:I.userTier?.name||"",promptCredits:_,flowCredits:u,models:g,defaultModel:v,timestamp:new Date}}async function HT(){let $=tF();if(!$)return null;let I=aF($);if(!I)return null;let U=eF($);for(let _ of U)if(await sF(_,I))return{pid:$,csrfToken:I,port:_};return null}async function uS($){try{let I=await TT($.port,"/exa.language_server_pb.LanguageServerService/GetUserStatus",$.csrfToken,{metadata:{ideName:"antigravity",extensionName:"antigravity",locale:"en"}});return IS(I)}catch{return null}}async function YT(){let $=await HT();if(!$)return null;try{return await TT($.port,"/exa.language_server_pb.LanguageServerService/GetUserStatus",$.csrfToken,{metadata:{ideName:"antigravity",extensionName:"antigravity",locale:"en"}})}catch{return null}}async function i0(){let $=await HT();if(!$)return null;return uS($)}QI();function nG(){try{let $=VS("claude auth status",{stdio:["pipe","pipe","ignore"],encoding:"utf-8"});return JSON.parse($).loggedIn===!0}catch{return!1}}function rG(){let $=iG(yG(),".gemini","oauth_creds.json");if(!xG($))return!1;try{let I=JSON.parse(kG($,"utf-8"));return!!(I.access_token&&I.refresh_token)}catch{return!1}}function lG(){let $=iG(yG(),".codex","auth.json");if(!xG($))return!1;try{return!!JSON.parse(kG($,"utf-8")).tokens?.access_token}catch{return!1}}function mG(){let $=iG(yG(),".qwen","settings.json");if(!xG($))return!1;try{return!!JSON.parse(kG($,"utf-8")).security?.auth?.selectedType}catch{return!1}}async function jT($=!1){let[I,U]=await Promise.all([r4(),i0().then((G)=>!!G)]),_=rG(),u=nG(),z=lG(),g=mG(),v={github:I,gemini:_,claude:u,codex:z,qwen:g,antigravity:U};if($){console.log(JSON.stringify(v,null,2));return}V$(X1.default.bgMagenta(X1.default.white(" \uD83D\uDD10 oh-my-agent auth status ")));let J=(G)=>G?"✅":"❌",N=(G)=>G?X1.default.green("Authenticated"):X1.default.red("Not Authenticated");k([["GitHub",I],["Gemini CLI",_],["Claude CLI",u],["Codex CLI",z],["Qwen CLI",g],["Antigravity",U]].map(([G,q])=>`${J(q)} ${G.padEnd(12)} ${N(q)}`).join(`
352
+ `),"Authentication Status"),p(`Use ${X1.default.cyan("gemini auth")}, ${X1.default.cyan("claude auth")}, etc. to login.`)}import{spawn as BS}from"node:child_process";import{existsSync as FT,readFileSync as ST,writeFileSync as DS}from"node:fs";import MS from"node:http";import KS from"node:https";import{homedir as RS}from"node:os";import{join as wT}from"node:path";var LS="http://localhost:12341/mcp",ET=1000,WS=Number.parseInt(process.env.OH_MY_AG_BRIDGE_PROBE_TIMEOUT_MS??"2000",10),PS=Number.parseInt(process.env.OH_MY_AG_BRIDGE_STARTUP_TIMEOUT_MS??"120000",10),j6={};function CT(){if(j6.stdinData)process.stdin.off("data",j6.stdinData);if(j6.sigint)process.off("SIGINT",j6.sigint);if(j6.sigterm)process.off("SIGTERM",j6.sigterm);j6={}}function ZS(){let $=wT(RS(),".serena","serena_config.yml");if(!FT($))return;try{let U=ST($,"utf8").match(/^projects:\s*\n((?:\s*-\s*.+\n?)*)/m);if(!U)return;let u=((U[1]??"").match(/^\s*-\s*(.+)$/gm)||[]).map((z)=>z.replace(/^\s*-\s*/,"").trim());for(let z of u){let g=wT(z,".serena","project.yml");if(!FT(g))continue;let v=ST(g,"utf8");if(!/^languages:/m.test(v)){console.error(`[Bridge] Missing 'languages' key in ${g}, adding default...`);let J=v.search(/\n(?=\w)/);if(J!==-1){let N=`${v.slice(0,J)}
353
353
 
354
354
  languages:
355
355
  - python
356
356
  - typescript
357
357
  - dart
358
- - terraform${v.slice(J)}`;VS(z,N),console.error(`[Bridge] Fixed ${z}`)}}}}catch(I){console.error(`[Bridge] Warning: Failed to validate Serena configs: ${I instanceof Error?I.message:I}`)}}async function fT($){CT();let I=$||KS,U=new URL(I),u=U.protocol==="https:"?DS:BS,g=null,z=!1,v=null,J=!1;async function N(){let D=U.hostname==="localhost"?[I,I.replace("localhost","127.0.0.1")]:[I];for(let M of D)if(await new Promise((A)=>{let f=u.get(M,(b)=>{A(!0),f.destroy()});f.setTimeout(LS,()=>{f.destroy(),A(!1)}),f.on("error",()=>{A(!1)}),f.end()}))return!0;return!1}async function X(){let D=U.port||"12341",M=U.hostname||"0.0.0.0";console.error(`Starting Serena server on ${M}:${D}...`),g=OS("uvx",["--from","git+https://github.com/oraios/serena","serena-mcp-server","--transport","streamable-http","--host",M,"--port",D,"--context","ide","--open-web-dashboard","false"],{stdio:"pipe",detached:!1});let A=g;if(g.stderr)g.stderr.on("data",(b)=>{process.stderr.write(`[Serena] ${b}`)});if(g.stdout)g.stdout.on("data",()=>{});A.on("error",(b)=>{console.error("Failed to start Serena server:",b),process.exit(1)}),A.on("exit",(b,u$)=>{if(console.error(`Serena server exited with code ${String(b)} signal ${String(u$)}`),!z)process.exit(typeof b==="number"?b:1)}),console.error("Waiting for Serena to be ready...");let f=Math.max(1,Math.ceil(RS/ET));for(let b=0;b<f;b++){if(await N()){console.error("Serena server is ready!");return}await new Promise((u$)=>setTimeout(u$,ET))}console.error("Timed out waiting for Serena server to start."),process.exit(1)}function G(D,M){let F=new URL(I),A={"Content-Type":"application/json",Accept:"application/json, text/event-stream","Content-Length":String(Buffer.byteLength(D))};if(v)A["Mcp-Session-Id"]=v;let f={hostname:F.hostname,port:F.port,path:F.pathname,method:"POST",headers:A},b=u.request(f,M);b.on("error",(u$)=>{console.error("POST error:",u$.message)}),b.write(D),b.end()}function q(D,M){let F="";D.on("data",(A)=>{F+=A.toString(),F=F.replace(/\r\n/g,`
359
- `);let f=F.split(`
358
+ - terraform${v.slice(J)}`;DS(g,N),console.error(`[Bridge] Fixed ${g}`)}}}}catch(I){console.error(`[Bridge] Warning: Failed to validate Serena configs: ${I instanceof Error?I.message:I}`)}}async function fT($){CT();let I=$||LS,U=new URL(I),u=U.protocol==="https:"?KS:MS,z=null,g=!1,v=null,J=!1;async function N(){let B=U.hostname==="localhost"?[I,I.replace("localhost","127.0.0.1")]:[I];for(let O of B)if(await new Promise((A)=>{let f=u.get(O,(j)=>{A(!0),f.destroy()});f.setTimeout(WS,()=>{f.destroy(),A(!1)}),f.on("error",()=>{A(!1)}),f.end()}))return!0;return!1}async function X(){let B=U.port||"12341",O=U.hostname||"0.0.0.0";console.error(`Starting Serena server on ${O}:${B}...`),z=BS("uvx",["--from","git+https://github.com/oraios/serena","serena-mcp-server","--transport","streamable-http","--host",O,"--port",B,"--context","ide","--open-web-dashboard","false"],{stdio:"pipe",detached:!1});let A=z;if(z.stderr)z.stderr.on("data",(j)=>{process.stderr.write(`[Serena] ${j}`)});if(z.stdout)z.stdout.on("data",()=>{});A.on("error",(j)=>{console.error("Failed to start Serena server:",j),process.exit(1)}),A.on("exit",(j,u$)=>{if(console.error(`Serena server exited with code ${String(j)} signal ${String(u$)}`),!g)process.exit(typeof j==="number"?j:1)}),console.error("Waiting for Serena to be ready...");let f=Math.max(1,Math.ceil(PS/ET));for(let j=0;j<f;j++){if(await N()){console.error("Serena server is ready!");return}await new Promise((u$)=>setTimeout(u$,ET))}console.error("Timed out waiting for Serena server to start."),process.exit(1)}function G(B,O){let b=new URL(I),A={"Content-Type":"application/json",Accept:"application/json, text/event-stream","Content-Length":String(Buffer.byteLength(B))};if(v)A["Mcp-Session-Id"]=v;let f={hostname:b.hostname,port:b.port,path:b.pathname,method:"POST",headers:A},j=u.request(f,O);j.on("error",(u$)=>{console.error("POST error:",u$.message)}),j.write(B),j.end()}function q(B,O){let b="";B.on("data",(A)=>{b+=A.toString(),b=b.replace(/\r\n/g,`
359
+ `);let f=b.split(`
360
360
 
361
- `);F=f.pop()||"";for(let b of f){let u$=b.split(`
362
- `),t="";for(let Y$ of u$)if(Y$.startsWith("data:"))t+=Y$.slice(5).trim();if(t)M(t)}})}function T(){if(!v||J)return;J=!0;let D=new URL(I),M={hostname:D.hostname,port:D.port,path:D.pathname,method:"GET",headers:{Accept:"application/json, text/event-stream","Cache-Control":"no-cache","Mcp-Session-Id":v}},F=u.request(M,(A)=>{if(A.statusCode===405){A.resume(),J=!1;return}if(A.statusCode===409){console.error("GET stream already open for this session (409)"),A.resume();return}if(A.statusCode!==200){if(console.error(`Server stream connection failed: ${A.statusCode}`),A.resume(),J=!1,!z)setTimeout(T,1000);return}q(A,(f)=>{process.stdout.write(`${f}
363
- `)}),A.on("end",()=>{if(J=!1,!z)console.error("Server stream closed, reconnecting..."),setTimeout(T,1000)}),A.on("error",(f)=>{if(J=!1,console.error("Server stream error:",f.message),!z)setTimeout(T,1000)})});F.on("error",(A)=>{if(J=!1,console.error("Server stream connection error:",A.message),!z)setTimeout(T,1000)}),F.end()}if(WS(),!await N())await X();else console.error(`Connected to existing Serena server at ${I}`);let Q="",Y=!1,K=[];process.stdin.setEncoding("utf8");let L=(D)=>{Q+=D.toString();let M=Q.split(`
364
- `);Q=M.pop()||"";for(let F of M)if(F.trim())P(F.trim())};process.stdin.on("data",L);function P(D){if(Y){K.push(D);return}B(D)}function O(){while(K.length>0){let D=K.shift();if(D)B(D)}}function B(D){try{let M=JSON.parse(D),F=M.method==="initialize";if(F)Y=!0;let A=JSON.stringify(M);G(A,(f)=>{let b=f.headers["mcp-session-id"];if(b)v=b;if(f.statusCode===202){if(f.resume(),F)Y=!1,O();return}if((f.headers["content-type"]||"").includes("text/event-stream"))q(f,(t)=>{process.stdout.write(`${t}
365
- `)}),f.on("end",()=>{if(F){if(Y=!1,v)T();O()}});else{let t="";f.on("data",(Y$)=>{t+=Y$.toString()}),f.on("end",()=>{if(t.trim())process.stdout.write(`${t}
366
- `);if(F){if(Y=!1,v)T();O()}})}})}catch(M){let F=M instanceof Error?M.message:String(M);console.error("Failed to parse IDE message:",F)}}process.stdin.resume();let R=()=>{if(z=!0,CT(),g)console.error("Stopping Serena server..."),g.kill("SIGTERM");process.exit(0)};b6={stdinData:L,sigint:R,sigterm:R},process.on("SIGINT",R),process.on("SIGTERM",R)}u4();var J4=q$(b$(),1);import{existsSync as $6,readdirSync as QI,readFileSync as lG,rmSync as xT}from"node:fs";import{tmpdir as PS}from"node:os";import{join as k$}from"node:path";async function ZS($,I,U){let _=k$($,".gemini","antigravity"),u=k$(_,"brain"),g=k$(_,"implicit"),z=k$(_,"knowledge"),v=$6(u),J=$6(g),N=$6(z);if(!v&&!J&&!N)return{shouldCleanupBrain:!1,shouldCleanupImplicit:!1,shouldCleanupKnowledge:!1};if(I)return{shouldCleanupBrain:v,shouldCleanupImplicit:J,shouldCleanupKnowledge:N};let X=[v&&" - brain",J&&" - implicit",N&&" - knowledge"].filter(Boolean).join(`
361
+ `);b=f.pop()||"";for(let j of f){let u$=j.split(`
362
+ `),t="";for(let Y$ of u$)if(Y$.startsWith("data:"))t+=Y$.slice(5).trim();if(t)O(t)}})}function T(){if(!v||J)return;J=!0;let B=new URL(I),O={hostname:B.hostname,port:B.port,path:B.pathname,method:"GET",headers:{Accept:"application/json, text/event-stream","Cache-Control":"no-cache","Mcp-Session-Id":v}},b=u.request(O,(A)=>{if(A.statusCode===405){A.resume(),J=!1;return}if(A.statusCode===409){console.error("GET stream already open for this session (409)"),A.resume();return}if(A.statusCode!==200){if(console.error(`Server stream connection failed: ${A.statusCode}`),A.resume(),J=!1,!g)setTimeout(T,1000);return}q(A,(f)=>{process.stdout.write(`${f}
363
+ `)}),A.on("end",()=>{if(J=!1,!g)console.error("Server stream closed, reconnecting..."),setTimeout(T,1000)}),A.on("error",(f)=>{if(J=!1,console.error("Server stream error:",f.message),!g)setTimeout(T,1000)})});b.on("error",(A)=>{if(J=!1,console.error("Server stream connection error:",A.message),!g)setTimeout(T,1000)}),b.end()}if(ZS(),!await N())await X();else console.error(`Connected to existing Serena server at ${I}`);let Q="",Y=!1,M=[];process.stdin.setEncoding("utf8");let L=(B)=>{Q+=B.toString();let O=Q.split(`
364
+ `);Q=O.pop()||"";for(let b of O)if(b.trim())P(b.trim())};process.stdin.on("data",L);function P(B){if(Y){M.push(B);return}K(B)}function R(){while(M.length>0){let B=M.shift();if(B)K(B)}}function K(B){try{let O=JSON.parse(B),b=O.method==="initialize";if(b)Y=!0;let A=JSON.stringify(O);G(A,(f)=>{let j=f.headers["mcp-session-id"];if(j)v=j;if(f.statusCode===202){if(f.resume(),b)Y=!1,R();return}if((f.headers["content-type"]||"").includes("text/event-stream"))q(f,(t)=>{process.stdout.write(`${t}
365
+ `)}),f.on("end",()=>{if(b){if(Y=!1,v)T();R()}});else{let t="";f.on("data",(Y$)=>{t+=Y$.toString()}),f.on("end",()=>{if(t.trim())process.stdout.write(`${t}
366
+ `);if(b){if(Y=!1,v)T();R()}})}})}catch(O){let b=O instanceof Error?O.message:String(O);console.error("Failed to parse IDE message:",b)}}process.stdin.resume();let V=()=>{if(g=!0,CT(),z)console.error("Stopping Serena server..."),z.kill("SIGTERM");process.exit(0)};j6={stdinData:L,sigint:V,sigterm:V},process.on("SIGINT",V),process.on("SIGTERM",V)}U4();var J4=q$(b$(),1);import{existsSync as $6,readdirSync as TI,readFileSync as hG,rmSync as xT}from"node:fs";import{tmpdir as AS}from"node:os";import{join as k$}from"node:path";async function bS($,I,U){let _=k$($,".gemini","antigravity"),u=k$(_,"brain"),z=k$(_,"implicit"),g=k$(_,"knowledge"),v=$6(u),J=$6(z),N=$6(g);if(!v&&!J&&!N)return{shouldCleanupBrain:!1,shouldCleanupImplicit:!1,shouldCleanupKnowledge:!1};if(I)return{shouldCleanupBrain:v,shouldCleanupImplicit:J,shouldCleanupKnowledge:N};let X=[v&&" - brain",J&&" - implicit",N&&" - knowledge"].filter(Boolean).join(`
367
367
  `),G=U?!0:await O$({message:`Clean up IDE garbage?
368
- ${X}`,initialValue:!0});if(e(G)||!G)return{shouldCleanupBrain:!1,shouldCleanupImplicit:!1,shouldCleanupKnowledge:!1};return{shouldCleanupBrain:v,shouldCleanupImplicit:J,shouldCleanupKnowledge:N}}async function kT($=!1,I=!1,U=!1){let _=process.cwd(),u=k$(_,".agents","results"),g=PS(),z={cleaned:0,skipped:0,details:[]},v=await ZS(_,I,U),J=(H)=>{z.details.push($?`[DRY-RUN] ${H}`:`[CLEAN] ${H}`),z.cleaned++},N=(H)=>{z.details.push(`[SKIP] ${H}`),z.skipped++},X=(H)=>{if($)return;try{xT(H,{force:!0})}catch{}},G=(H)=>{try{return process.kill(H,0),!0}catch{return!1}},q=async(H)=>{if($)return;try{process.kill(H)}catch{}await new Promise((Q)=>setTimeout(Q,1000));try{if(G(H))process.kill(H,"SIGKILL")}catch{}};try{let H=QI(g).filter((Q)=>Q.startsWith("subagent-")&&Q.endsWith(".pid"));for(let Q of H){let Y=k$(g,Q),K=lG(Y,"utf-8").trim();if(!K){J(`Removing empty PID file: ${Y}`),X(Y);continue}let L=parseInt(K,10);if(Number.isNaN(L)){J(`Removing invalid PID file: ${Y}`),X(Y);continue}if(G(L))J(`Killing orphaned process PID=${L} (from ${Y})`),await q(L),X(Y);else J(`Removing stale PID file (process gone): ${Y}`),X(Y)}}catch{}try{let H=QI(g).filter((Q)=>Q.startsWith("subagent-")&&Q.endsWith(".log"));for(let Q of H){let Y=k$(g,Q),K=Q.replace(".log",".pid"),L=k$(g,K);if($6(L))try{let P=lG(L,"utf-8").trim(),O=parseInt(P,10);if(!Number.isNaN(O)){if(G(O)){N(`Log file has active process: ${Y}`);continue}}}catch{}J(`Removing stale log file: ${Y}`),X(Y)}}catch{}if($6(u))try{let H=QI(u).filter((Q)=>Q.startsWith("parallel-"));for(let Q of H){let Y=k$(u,Q,"pids.txt");if(!$6(Y))continue;let L=lG(Y,"utf-8").split(`
369
- `).filter((O)=>O.trim()),P=!1;for(let O of L){let[B,R]=O.split(":"),D=parseInt(B?.trim()||"",10);if(Number.isNaN(D))continue;if(G(D))P=!0,J(`Killing orphaned parallel agent PID=${D} (${R?.trim()||"unknown"})`),await q(D),X(Y)}if(!P)J(`Removing stale PID list: ${Y}`),X(Y);else if(!$){await new Promise((O)=>setTimeout(O,1000));try{xT(Y,{force:!0})}catch{}}}}catch{}else N(`No results directory found: ${u}`);if(v.shouldCleanupBrain||v.shouldCleanupImplicit||v.shouldCleanupKnowledge){let H=k$(_,".gemini","antigravity");if(v.shouldCleanupBrain){let Q=k$(H,"brain");try{if($6(Q)){let Y=QI(Q);for(let K of Y){let L=k$(Q,K);J(`Removing brain file: ${L}`),X(L)}}}catch{}}if(v.shouldCleanupImplicit){let Q=k$(H,"implicit");try{if($6(Q)){let Y=QI(Q);for(let K of Y){let L=k$(Q,K);J(`Removing implicit file: ${L}`),X(L)}}}catch{}}if(v.shouldCleanupKnowledge){let Q=k$(H,"knowledge");try{if($6(Q)){let Y=QI(Q);for(let K of Y){let L=k$(Q,K);J(`Removing knowledge file: ${L}`),X(L)}}}catch{}}}if(I){console.log(JSON.stringify(z,null,2));return}if(console.clear(),V$(J4.default.bgMagenta(J4.default.white(" \uD83E\uDDF9 oh-my-agent cleanup "))),$)k(J4.default.yellow("Dry-run mode — no changes will be made"),"Mode");if(z.details.length>0){let H=[J4.default.bold("Cleanup Details"),...z.details.map((Q)=>{if(Q.startsWith("[DRY-RUN]"))return J4.default.yellow(Q);if(Q.startsWith("[CLEAN]"))return J4.default.green(Q);return J4.default.cyan(Q)})].join(`
370
- `);k(H,"Details")}let T=[J4.default.bold("Summary"),"┌─────────┬────────┐",`│ ${J4.default.bold("Action")} │ ${J4.default.bold("Count")} │`,"├─────────┼────────┤",`│ Cleaned │ ${String(z.cleaned).padEnd(6)} │`,`│ Skipped │ ${String(z.skipped).padEnd(6)} │`,"└─────────┴────────┘"].join(`
371
- `);if(k(T,"Results"),$)d(J4.default.yellow("Run without --dry-run to apply changes"));else d(J4.default.green("Cleanup complete!"))}u4();qI();s4();var i=q$(b$(),1);import{execSync as mG}from"node:child_process";import{existsSync as I6,readdirSync as yT,readFileSync as u2,writeFileSync as AS}from"node:fs";import{join as X1}from"node:path";async function I2($,I,U){try{let _=mG(`${I} --version`,{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim();return{name:$,installed:!0,version:_,installCmd:U}}catch{return{name:$,installed:!1,installCmd:U}}}async function bS($){let I=process.env.HOME||process.env.USERPROFILE||"",_={gemini:{path:`${I}/.gemini/settings.json`,type:"json"},claude:{path:`${I}/.claude.json`,type:"json"},codex:{path:`${I}/.codex/config.toml`,type:"toml"}}[$];if(!_)return{configured:!1};if(I6(_.path))try{let u=u2(_.path,"utf-8");if(_.type==="json"){let g=JSON.parse(u);return{configured:!!(g.mcpServers||g.mcp),path:_.path}}return{configured:!0,path:_.path}}catch{return{configured:!1}}return{configured:!1}}async function jS(){let $=X1(process.cwd(),W4);if(!I6($))return[];let I=XI(),U=[];for(let _ of I){let u=X1($,_.name),g=X1(u,"SKILL.md");U.push({name:_.name,installed:I6(u),hasSkillMd:I6(g)})}return U}async function FS(){let $=process.env.HOME||process.env.USERPROFILE||"",I=X1($,".gemini","antigravity","global_workflows");if(!I6(I))return{installed:!1,count:0};try{return{installed:!0,count:yT(I).filter((_)=>_.endsWith(".md")).length}}catch{return{installed:!1,count:0}}}async function iT($=!1){let I=process.cwd(),U=process.env.HOME||process.env.USERPROFILE||"",_=await Promise.all([I2("gemini","gemini","bun install --global @google/gemini-cli"),I2("claude","claude","bun install --global @anthropic-ai/claude-code"),I2("codex","codex","bun install --global @openai/codex"),I2("qwen","qwen","bun install --global @qwen-code/qwen-code")]),u={gemini:iG,claude:yG,codex:nG,qwen:rG},g=await Promise.all(_.filter((B)=>B.installed).map(async(B)=>{let R=await bS(B.name);return{...B,mcp:R}})),z=await jS(),v=await FS(),J=!1;try{J=mG("git config --get rerere.enabled",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim()==="true"}catch{}let N=_.some((B)=>B.name==="claude"&&B.installed),X=!1,G=!1,q=X1(U,".claude","settings.json"),T=X1(U,".claude","CLAUDE.md");if(N)try{if(I6(q)){let B=JSON.parse(u2(q,"utf-8"));X=(B.env?.cleanupPeriodDays??0)>=180&&(B.env?.CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS??0)>=1e5&&(B.env?.CLAUDE_AUTOCOMPACT_PCT_OVERRIDE??0)>=80&&!!B.attribution?.commit&&!!B.attribution?.pr&&B.env?.DISABLE_TELEMETRY==="1"&&B.env?.DISABLE_ERROR_REPORTING==="1"&&B.env?.CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY==="1"}}catch{}try{if(I6(T))G=u2(T,"utf-8").includes("<!-- OMA:START")}catch{}let H=X1(I,".serena","memories"),Q=I6(H),Y=0;if(Q)try{Y=yT(H).length}catch{}let K=_.filter((B)=>!B.installed),L=z.length>0?z.filter((B)=>!B.installed||!B.hasSkillMd):XI().map((B)=>({name:B.name,installed:!1,hasSkillMd:!1})),P=K.length+L.length+(v.installed?0:1)+(J?0:1)+(N&&!X?1:0)+(N&&!G?1:0);if($){let B={ok:P===0,issues:P,clis:_.map((R)=>({name:R.name,installed:R.installed,version:R.version||null,authenticated:R.installed?u[R.name]?.()??!1:!1})),mcp:g.map((R)=>({name:R.name,configured:R.mcp.configured,path:R.mcp.path||null})),skills:z.length>0?z.map((R)=>({name:R.name,installed:R.installed,complete:R.hasSkillMd})):[],missingSkills:L.map((R)=>R.name),globalWorkflows:{installed:v.installed,count:v.count},serena:{exists:Q,fileCount:Y},gitRerere:{enabled:J},recommendedSettings:{configured:X},claudeMd:{hasOmaBlock:G}};console.log(JSON.stringify(B,null,2)),process.exit(P===0?0:1)}console.clear(),V$(i.default.bgMagenta(i.default.white(" \uD83E\uDE7A oh-my-agent doctor ")));let O=I4();try{let B=_.map((M)=>{let F=M.installed?i.default.green("✅"):i.default.red("❌"),A=M.version||"-",f=M.installed?u[M.name]?.()?i.default.green("✅"):i.default.red("❌"):i.default.dim("-");return`${F} ${M.name.padEnd(8)} ${A.padEnd(12)} ${f}`});if(k([`${"CLI".padEnd(11)} ${"Version".padEnd(12)} Auth`,...B].join(`
372
- `),"CLI Status"),K.length>0)k(K.map((M)=>`${i.default.yellow("→")} ${M.name}: ${i.default.dim(M.installCmd)}`).join(`
373
- `),"Install missing CLIs");if(g.length>0){let M=[i.default.bold("\uD83D\uDD17 MCP Connection Status"),"┌─────────┬──────────┬─────────────────────┐",`│ ${i.default.bold("CLI")} │ ${i.default.bold("MCP Config")} │ ${i.default.bold("Path")} │`,"├─────────┼──────────┼─────────────────────┤",...g.map((F)=>{let A=F.mcp.configured?i.default.green("✅ Configured"):i.default.yellow("⚠️ Not configured"),f=F.mcp.path?F.mcp.path.split("/").pop()||"":"-";return`│ ${F.name.padEnd(7)} │ ${A.padEnd(8)} │ ${f.padEnd(19)} │`}),"└─────────┴──────────┴─────────────────────┘"].join(`
374
- `);k(M,"MCP Status")}let R=z.filter((M)=>M.installed).length,D=z.filter((M)=>M.hasSkillMd).length;if(z.length>0){let M=[i.default.bold(`\uD83D\uDCE6 Skills (${R}/${z.length} installed, ${D} complete)`),"┌────────────────────┬──────────┬─────────────┐",`│ ${i.default.bold("Skill")} │ ${i.default.bold("Installed")} │ ${i.default.bold("SKILL.md")} │`,"├────────────────────┼──────────┼─────────────┤",...z.map((F)=>{let A=F.installed?i.default.green("✅"):i.default.red("❌"),f=F.hasSkillMd?i.default.green("✅"):i.default.red("❌");return`│ ${F.name.padEnd(18)} │ ${A.padEnd(8)} │ ${f.padEnd(11)} │`}),"└────────────────────┴──────────┴─────────────┘"].join(`
375
- `);k(M,"Skills Status")}else k(i.default.yellow("No skills installed."),"Skills Status");if(L.length>0){let M=await O$({message:`Found ${L.length} missing/incomplete skill(s). Install them?`,initialValue:!0});if(e(M))z4("Cancelled."),process.exit(0);if(M){let F=L.map((b)=>b.name),A=await z1({message:"Which skills to install?",options:[{value:"all",label:`✨ All (${F.length} skills)`,hint:"Recommended"},{value:"select",label:"\uD83D\uDD27 Select individually"}]});if(e(A))z4("Cancelled."),process.exit(0);let f;if(A==="select"){let b=XI(),u$=await c_({message:"Select skills to install:",options:L.map((t)=>{let Y$=b.find((o$)=>o$.name===t.name);return{value:t.name,label:t.name,hint:Y$?.desc||""}}),required:!0});if(e(u$))z4("Cancelled."),process.exit(0);f=u$}else f=F;O.start("Installing skills...");try{t_(I,I);for(let b of f)O.message(`Installing ${i.default.cyan(b)}...`),o_(I,b,I);O.stop(`Installed ${f.length} skill(s)!`),k(f.map((b)=>`${i.default.green("✓")} ${b}`).join(`
376
- `),"Installed Skills")}catch(b){O.stop("Installation failed"),o.error(b instanceof Error?b.message:String(b))}}}if(Q)k(`${i.default.green("✅")} Serena memory directory exists
368
+ ${X}`,initialValue:!0});if(e(G)||!G)return{shouldCleanupBrain:!1,shouldCleanupImplicit:!1,shouldCleanupKnowledge:!1};return{shouldCleanupBrain:v,shouldCleanupImplicit:J,shouldCleanupKnowledge:N}}async function kT($=!1,I=!1,U=!1){let _=process.cwd(),u=k$(_,".agents","results"),z=AS(),g={cleaned:0,skipped:0,details:[]},v=await bS(_,I,U),J=(H)=>{g.details.push($?`[DRY-RUN] ${H}`:`[CLEAN] ${H}`),g.cleaned++},N=(H)=>{g.details.push(`[SKIP] ${H}`),g.skipped++},X=(H)=>{if($)return;try{xT(H,{force:!0})}catch{}},G=(H)=>{try{return process.kill(H,0),!0}catch{return!1}},q=async(H)=>{if($)return;try{process.kill(H)}catch{}await new Promise((Q)=>setTimeout(Q,1000));try{if(G(H))process.kill(H,"SIGKILL")}catch{}};try{let H=TI(z).filter((Q)=>Q.startsWith("subagent-")&&Q.endsWith(".pid"));for(let Q of H){let Y=k$(z,Q),M=hG(Y,"utf-8").trim();if(!M){J(`Removing empty PID file: ${Y}`),X(Y);continue}let L=parseInt(M,10);if(Number.isNaN(L)){J(`Removing invalid PID file: ${Y}`),X(Y);continue}if(G(L))J(`Killing orphaned process PID=${L} (from ${Y})`),await q(L),X(Y);else J(`Removing stale PID file (process gone): ${Y}`),X(Y)}}catch{}try{let H=TI(z).filter((Q)=>Q.startsWith("subagent-")&&Q.endsWith(".log"));for(let Q of H){let Y=k$(z,Q),M=Q.replace(".log",".pid"),L=k$(z,M);if($6(L))try{let P=hG(L,"utf-8").trim(),R=parseInt(P,10);if(!Number.isNaN(R)){if(G(R)){N(`Log file has active process: ${Y}`);continue}}}catch{}J(`Removing stale log file: ${Y}`),X(Y)}}catch{}if($6(u))try{let H=TI(u).filter((Q)=>Q.startsWith("parallel-"));for(let Q of H){let Y=k$(u,Q,"pids.txt");if(!$6(Y))continue;let L=hG(Y,"utf-8").split(`
369
+ `).filter((R)=>R.trim()),P=!1;for(let R of L){let[K,V]=R.split(":"),B=parseInt(K?.trim()||"",10);if(Number.isNaN(B))continue;if(G(B))P=!0,J(`Killing orphaned parallel agent PID=${B} (${V?.trim()||"unknown"})`),await q(B),X(Y)}if(!P)J(`Removing stale PID list: ${Y}`),X(Y);else if(!$){await new Promise((R)=>setTimeout(R,1000));try{xT(Y,{force:!0})}catch{}}}}catch{}else N(`No results directory found: ${u}`);if(v.shouldCleanupBrain||v.shouldCleanupImplicit||v.shouldCleanupKnowledge){let H=k$(_,".gemini","antigravity");if(v.shouldCleanupBrain){let Q=k$(H,"brain");try{if($6(Q)){let Y=TI(Q);for(let M of Y){let L=k$(Q,M);J(`Removing brain file: ${L}`),X(L)}}}catch{}}if(v.shouldCleanupImplicit){let Q=k$(H,"implicit");try{if($6(Q)){let Y=TI(Q);for(let M of Y){let L=k$(Q,M);J(`Removing implicit file: ${L}`),X(L)}}}catch{}}if(v.shouldCleanupKnowledge){let Q=k$(H,"knowledge");try{if($6(Q)){let Y=TI(Q);for(let M of Y){let L=k$(Q,M);J(`Removing knowledge file: ${L}`),X(L)}}}catch{}}}if(I){console.log(JSON.stringify(g,null,2));return}if(console.clear(),V$(J4.default.bgMagenta(J4.default.white(" \uD83E\uDDF9 oh-my-agent cleanup "))),$)k(J4.default.yellow("Dry-run mode — no changes will be made"),"Mode");if(g.details.length>0){let H=[J4.default.bold("Cleanup Details"),...g.details.map((Q)=>{if(Q.startsWith("[DRY-RUN]"))return J4.default.yellow(Q);if(Q.startsWith("[CLEAN]"))return J4.default.green(Q);return J4.default.cyan(Q)})].join(`
370
+ `);k(H,"Details")}let T=[J4.default.bold("Summary"),"┌─────────┬────────┐",`│ ${J4.default.bold("Action")} │ ${J4.default.bold("Count")} │`,"├─────────┼────────┤",`│ Cleaned │ ${String(g.cleaned).padEnd(6)} │`,`│ Skipped │ ${String(g.skipped).padEnd(6)} │`,"└─────────┴────────┘"].join(`
371
+ `);if(k(T,"Results"),$)p(J4.default.yellow("Run without --dry-run to apply changes"));else p(J4.default.green("Cleanup complete!"))}U4();QI();s4();var i=q$(b$(),1);import{execSync as cG}from"node:child_process";import{existsSync as I6,readdirSync as yT,readFileSync as U2,writeFileSync as jS}from"node:fs";import{join as q1}from"node:path";async function u2($,I,U){try{let _=cG(`${I} --version`,{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim();return{name:$,installed:!0,version:_,installCmd:U}}catch{return{name:$,installed:!1,installCmd:U}}}async function FS($){let I=process.env.HOME||process.env.USERPROFILE||"",_={gemini:{path:`${I}/.gemini/settings.json`,type:"json"},claude:{path:`${I}/.claude.json`,type:"json"},codex:{path:`${I}/.codex/config.toml`,type:"toml"}}[$];if(!_)return{configured:!1};if(I6(_.path))try{let u=U2(_.path,"utf-8");if(_.type==="json"){let z=JSON.parse(u);return{configured:!!(z.mcpServers||z.mcp),path:_.path}}return{configured:!0,path:_.path}}catch{return{configured:!1}}return{configured:!1}}async function SS(){let $=q1(process.cwd(),W4);if(!I6($))return[];let I=qI(),U=[];for(let _ of I){let u=q1($,_.name),z=q1(u,"SKILL.md");U.push({name:_.name,installed:I6(u),hasSkillMd:I6(z)})}return U}async function wS(){let $=process.env.HOME||process.env.USERPROFILE||"",I=q1($,".gemini","antigravity","global_workflows");if(!I6(I))return{installed:!1,count:0};try{return{installed:!0,count:yT(I).filter((_)=>_.endsWith(".md")).length}}catch{return{installed:!1,count:0}}}async function iT($=!1){let I=process.cwd(),U=process.env.HOME||process.env.USERPROFILE||"",_=await Promise.all([u2("gemini","gemini","bun install --global @google/gemini-cli"),u2("claude","claude","bun install --global @anthropic-ai/claude-code"),u2("codex","codex","bun install --global @openai/codex"),u2("qwen","qwen","bun install --global @qwen-code/qwen-code")]),u={gemini:rG,claude:nG,codex:lG,qwen:mG},z=await Promise.all(_.filter((K)=>K.installed).map(async(K)=>{let V=await FS(K.name);return{...K,mcp:V}})),g=await SS(),v=await wS(),J=!1;try{J=cG("git config --get rerere.enabled",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim()==="true"}catch{}let N=_.some((K)=>K.name==="claude"&&K.installed),X=!1,G=!1,q=q1(U,".claude","settings.json"),T=q1(U,".claude","CLAUDE.md");if(N)try{if(I6(q)){let K=JSON.parse(U2(q,"utf-8"));X=(K.env?.cleanupPeriodDays??0)>=180&&(K.env?.CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS??0)>=1e5&&(K.env?.CLAUDE_AUTOCOMPACT_PCT_OVERRIDE??0)>=80&&!!K.attribution?.commit&&!!K.attribution?.pr&&K.env?.DISABLE_TELEMETRY==="1"&&K.env?.DISABLE_ERROR_REPORTING==="1"&&K.env?.CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY==="1"}}catch{}try{if(I6(T))G=U2(T,"utf-8").includes("<!-- OMA:START")}catch{}let H=q1(I,".serena","memories"),Q=I6(H),Y=0;if(Q)try{Y=yT(H).length}catch{}let M=_.filter((K)=>!K.installed),L=g.length>0?g.filter((K)=>!K.installed||!K.hasSkillMd):qI().map((K)=>({name:K.name,installed:!1,hasSkillMd:!1})),P=M.length+L.length+(v.installed?0:1)+(J?0:1)+(N&&!X?1:0)+(N&&!G?1:0);if($){let K={ok:P===0,issues:P,clis:_.map((V)=>({name:V.name,installed:V.installed,version:V.version||null,authenticated:V.installed?u[V.name]?.()??!1:!1})),mcp:z.map((V)=>({name:V.name,configured:V.mcp.configured,path:V.mcp.path||null})),skills:g.length>0?g.map((V)=>({name:V.name,installed:V.installed,complete:V.hasSkillMd})):[],missingSkills:L.map((V)=>V.name),globalWorkflows:{installed:v.installed,count:v.count},serena:{exists:Q,fileCount:Y},gitRerere:{enabled:J},recommendedSettings:{configured:X},claudeMd:{hasOmaBlock:G}};console.log(JSON.stringify(K,null,2)),process.exit(P===0?0:1)}console.clear(),V$(i.default.bgMagenta(i.default.white(" \uD83E\uDE7A oh-my-agent doctor ")));let R=u4();try{let K=_.map((O)=>{let b=O.installed?i.default.green("✅"):i.default.red("❌"),A=O.version||"-",f=O.installed?u[O.name]?.()?i.default.green("✅"):i.default.red("❌"):i.default.dim("-");return`${b} ${O.name.padEnd(8)} ${A.padEnd(12)} ${f}`});if(k([`${"CLI".padEnd(11)} ${"Version".padEnd(12)} Auth`,...K].join(`
372
+ `),"CLI Status"),M.length>0)k(M.map((O)=>`${i.default.yellow("→")} ${O.name}: ${i.default.dim(O.installCmd)}`).join(`
373
+ `),"Install missing CLIs");if(z.length>0){let O=[i.default.bold("\uD83D\uDD17 MCP Connection Status"),"┌─────────┬──────────┬─────────────────────┐",`│ ${i.default.bold("CLI")} │ ${i.default.bold("MCP Config")} │ ${i.default.bold("Path")} │`,"├─────────┼──────────┼─────────────────────┤",...z.map((b)=>{let A=b.mcp.configured?i.default.green("✅ Configured"):i.default.yellow("⚠️ Not configured"),f=b.mcp.path?b.mcp.path.split("/").pop()||"":"-";return`│ ${b.name.padEnd(7)} │ ${A.padEnd(8)} │ ${f.padEnd(19)} │`}),"└─────────┴──────────┴─────────────────────┘"].join(`
374
+ `);k(O,"MCP Status")}let V=g.filter((O)=>O.installed).length,B=g.filter((O)=>O.hasSkillMd).length;if(g.length>0){let O=[i.default.bold(`\uD83D\uDCE6 Skills (${V}/${g.length} installed, ${B} complete)`),"┌────────────────────┬──────────┬─────────────┐",`│ ${i.default.bold("Skill")} │ ${i.default.bold("Installed")} │ ${i.default.bold("SKILL.md")} │`,"├────────────────────┼──────────┼─────────────┤",...g.map((b)=>{let A=b.installed?i.default.green("✅"):i.default.red("❌"),f=b.hasSkillMd?i.default.green("✅"):i.default.red("❌");return`│ ${b.name.padEnd(18)} │ ${A.padEnd(8)} │ ${f.padEnd(11)} │`}),"└────────────────────┴──────────┴─────────────┘"].join(`
375
+ `);k(O,"Skills Status")}else k(i.default.yellow("No skills installed."),"Skills Status");if(L.length>0){let O=await O$({message:`Found ${L.length} missing/incomplete skill(s). Install them?`,initialValue:!0});if(e(O))I4("Cancelled."),process.exit(0);if(O){let b=L.map((j)=>j.name),A=await b6({message:"Which skills to install?",options:[{value:"all",label:`✨ All (${b.length} skills)`,hint:"Recommended"},{value:"select",label:"\uD83D\uDD27 Select individually"}]});if(e(A))I4("Cancelled."),process.exit(0);let f;if(A==="select"){let j=qI(),u$=await d_({message:"Select skills to install:",options:L.map((t)=>{let Y$=j.find((o$)=>o$.name===t.name);return{value:t.name,label:t.name,hint:Y$?.desc||""}}),required:!0});if(e(u$))I4("Cancelled."),process.exit(0);f=u$}else f=b;R.start("Installing skills...");try{a_(I,I);for(let j of f)R.message(`Installing ${i.default.cyan(j)}...`),t_(I,j,I);R.stop(`Installed ${f.length} skill(s)!`),k(f.map((j)=>`${i.default.green("✓")} ${j}`).join(`
376
+ `),"Installed Skills")}catch(j){R.stop("Installation failed"),d.error(j instanceof Error?j.message:String(j))}}}if(Q)k(`${i.default.green("✅")} Serena memory directory exists
377
377
  ${i.default.dim(`${Y} memory files found`)}`,"Serena Memory");else k(`${i.default.yellow("⚠️")} Serena memory directory not found
378
378
  ${i.default.dim("Dashboard will show 'No agents detected'")}`,"Serena Memory");if(v.installed)k(`${i.default.green("✅")} Global workflows installed
379
379
  ${i.default.dim(`${v.count} workflow files found`)}`,"Global Workflows");else k(`${i.default.red("❌")} Global workflows missing
380
- ${i.default.dim("Run 'oh-my-ag' to install or reinstall global workflows")}`,"Global Workflows");if(J)k(`${i.default.green("✅")} git rerere is enabled`,"Git Config");else{let M=await O$({message:"Enable git rerere? (Recommended for multi-agent merge conflict reuse)",initialValue:!0});if(!e(M)&&M)try{mG("git config --global rerere.enabled true"),o.success(i.default.green("git rerere enabled globally!"))}catch(F){o.error(`Failed to enable git rerere: ${F}`)}else k(`${i.default.yellow("⚠️")} git rerere is not enabled
381
- ${i.default.dim("Run: git config --global rerere.enabled true")}`,"Git Config")}if(N){if(X)k(`${i.default.green("✅")} Claude Code recommended settings applied`,"Claude Config");else{let M=await O$({message:"Apply recommended Claude Code settings?",initialValue:!0});if(!e(M)&&M)try{let F={};if(I6(q))F=JSON.parse(u2(q,"utf-8"));F.env={...F.env||{},cleanupPeriodDays:180,CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS:1e5,CLAUDE_AUTOCOMPACT_PCT_OVERRIDE:80,DISABLE_TELEMETRY:"1",DISABLE_ERROR_REPORTING:"1",CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY:"1"},F.attribution={commit:`Generated with oh-my-agent
380
+ ${i.default.dim("Run 'oh-my-ag' to install or reinstall global workflows")}`,"Global Workflows");if(J)k(`${i.default.green("✅")} git rerere is enabled`,"Git Config");else{let O=await O$({message:"Enable git rerere? (Recommended for multi-agent merge conflict reuse)",initialValue:!0});if(!e(O)&&O)try{cG("git config --global rerere.enabled true"),d.success(i.default.green("git rerere enabled globally!"))}catch(b){d.error(`Failed to enable git rerere: ${b}`)}else k(`${i.default.yellow("⚠️")} git rerere is not enabled
381
+ ${i.default.dim("Run: git config --global rerere.enabled true")}`,"Git Config")}if(N){if(X)k(`${i.default.green("✅")} Claude Code recommended settings applied`,"Claude Config");else{let O=await O$({message:"Apply recommended Claude Code settings?",initialValue:!0});if(!e(O)&&O)try{let b={};if(I6(q))b=JSON.parse(U2(q,"utf-8"));b.env={...b.env||{},cleanupPeriodDays:180,CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS:1e5,CLAUDE_AUTOCOMPACT_PCT_OVERRIDE:80,DISABLE_TELEMETRY:"1",DISABLE_ERROR_REPORTING:"1",CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY:"1"},b.attribution={commit:`Generated with oh-my-agent
382
382
 
383
- Co-Authored-By: First Fluke <our.first.fluke@gmail.com>`,pr:"Generated with [oh-my-agent](https://github.com/first-fluke/oh-my-agent)"},AS(q,`${JSON.stringify(F,null,2)}
384
- `),o.success(i.default.green("Claude Code recommended settings applied!"))}catch(F){o.error(`Failed to apply Claude Code settings: ${F}`)}else k(`${i.default.yellow("⚠️")} Claude Code recommended settings not applied
383
+ Co-Authored-By: First Fluke <our.first.fluke@gmail.com>`,pr:"Generated with [oh-my-agent](https://github.com/first-fluke/oh-my-agent)"},jS(q,`${JSON.stringify(b,null,2)}
384
+ `),d.success(i.default.green("Claude Code recommended settings applied!"))}catch(b){d.error(`Failed to apply Claude Code settings: ${b}`)}else k(`${i.default.yellow("⚠️")} Claude Code recommended settings not applied
385
385
  ${i.default.dim("Conversations are deleted after 30 days by default")}`,"Claude Config")}if(G)k(`${i.default.green("✅")} OMA block found in ~/.claude/CLAUDE.md`,"CLAUDE.md");else k(`${i.default.yellow("⚠️")} OMA block missing in ~/.claude/CLAUDE.md
386
- ${i.default.dim("Run 'oh-my-agent' to install or reinstall")}`,"CLAUDE.md")}if(P===0)d(i.default.green("✅ All checks passed! Ready to use."));else d(i.default.yellow(`⚠️ Found ${P} issue(s). See details above.`));if(bT())k(`${i.default.green("⭐")} Thank you for starring oh-my-agent!
386
+ ${i.default.dim("Run 'oh-my-agent' to install or reinstall")}`,"CLAUDE.md")}if(P===0)p(i.default.green("✅ All checks passed! Ready to use."));else p(i.default.yellow(`⚠️ Found ${P} issue(s). See details above.`));if(bT())k(`${i.default.green("⭐")} Thank you for starring oh-my-agent!
387
387
  ${i.default.dim("https://github.com/sponsors/first-fluke")}`,"Support");else k(`${i.default.yellow("❤️")} Enjoying oh-my-agent? Give it a star or sponsor!
388
388
  ${i.default.dim("gh api --method PUT /user/starred/first-fluke/oh-my-agent")}
389
- ${i.default.dim("https://github.com/sponsors/first-fluke")}`,"Support")}catch(B){if(O)O.stop("Check failed");o.error(B instanceof Error?B.message:String(B)),process.exit(1)}}eG();u4();F0();var u6=q$(b$(),1);async function pT($=!1,I=!1){let U=process.cwd(),_=P7(U,{force:I});if($){console.log(JSON.stringify(_,null,2));return}console.clear(),V$(u6.default.bgMagenta(u6.default.white(" \uD83E\uDDE0 oh-my-agent memory:init ")));let u=[`Memories dir: ${u6.default.cyan(_.memoriesDir)}`,`Session ID: ${u6.default.cyan(_.sessionId)}`,"",u6.default.bold("Created:"),_.created.length>0?_.created.map((g)=>` + ${g}`).join(`
390
- `):" (none)","",u6.default.bold("Updated:"),_.updated.length>0?_.updated.map((g)=>` ~ ${g}`).join(`
391
- `):" (none)","",u6.default.bold("Skipped:"),_.skipped.length>0?_.skipped.map((g)=>` - ${g}`).join(`
389
+ ${i.default.dim("https://github.com/sponsors/first-fluke")}`,"Support")}catch(K){if(R)R.stop("Check failed");d.error(K instanceof Error?K.message:String(K)),process.exit(1)}}eG();U4();w0();var u6=q$(b$(),1);async function tT($=!1,I=!1){let U=process.cwd(),_=P7(U,{force:I});if($){console.log(JSON.stringify(_,null,2));return}console.clear(),V$(u6.default.bgMagenta(u6.default.white(" \uD83E\uDDE0 oh-my-agent memory:init ")));let u=[`Memories dir: ${u6.default.cyan(_.memoriesDir)}`,`Session ID: ${u6.default.cyan(_.sessionId)}`,"",u6.default.bold("Created:"),_.created.length>0?_.created.map((z)=>` + ${z}`).join(`
390
+ `):" (none)","",u6.default.bold("Updated:"),_.updated.length>0?_.updated.map((z)=>` ~ ${z}`).join(`
391
+ `):" (none)","",u6.default.bold("Skipped:"),_.skipped.length>0?_.skipped.map((z)=>` - ${z}`).join(`
392
392
  `):" (none)"].join(`
393
- `);k(u,"Memory Schema"),d(u6.default.green("Memory schema ready!"))}u4();var P$=q$(b$(),1);import{execSync as lS}from"node:child_process";import{existsSync as oT,mkdirSync as mS,readdirSync as tT,readFileSync as hS,writeFileSync as cS}from"node:fs";import{join as sG}from"node:path";function $9($){if(!$)return{since:"7 days ago",label:"7d",days:7};let I=$.match(/^(\d+)(h|d|w)$/);if(!I)throw Error(`Invalid window: ${$}. Use: 24h, 7d, 14d, 30d, 2w`);let U=parseInt(I[1]||"0",10),_=I[2]||"";switch(_){case"h":return{since:`${U} hours ago`,label:`${U}h`,days:U/24};case"d":return{since:`${U} days ago`,label:`${U}d`,days:U};case"w":return{since:`${U*7} days ago`,label:`${U}w`,days:U*7};default:throw Error(`Invalid unit: ${_}`)}}function aT($){let I=$9($);return{current:I,previous:{since:`${I.days*2} days ago`,until:`${I.days} days ago`,label:I.label,days:I.days}}}function F6($,I){try{return lS(I,{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"],maxBuffer:10485760}).trim()}catch{return""}}function eT($){F6($,"git fetch origin --quiet 2>/dev/null || true")}function sT($){return F6($,"git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's|refs/remotes/origin/||'")||"main"}function $H($){return F6($,"git config user.name")||"Unknown"}function IH($,I,U){let _=I.until?` --until="${I.until}"`:"",u=F6($,`git log ${U} --since="${I.since}"${_} --format="COMMIT:%H|%aN|%ae|%at|%s" --shortstat`);if(!u)return[];let g=[],z=null;for(let v of u.split(`
394
- `))if(v.startsWith("COMMIT:")){if(z?.hash)g.push({hash:z.hash,author:z.author||"",email:z.email||"",timestamp:z.timestamp||0,subject:z.subject||"",insertions:z.insertions||0,deletions:z.deletions||0});let J=v.slice(7).split("|");z={hash:J[0],author:J[1],email:J[2],timestamp:parseInt(J[3]||"0",10),subject:J.slice(4).join("|"),insertions:0,deletions:0}}else if(z&&v.trim()){let J=v.match(/(\d+) insertions?\(\+\)/),N=v.match(/(\d+) deletions?\(-\)/);if(J)z.insertions=parseInt(J[1]||"0",10);if(N)z.deletions=parseInt(N[1]||"0",10)}if(z?.hash)g.push({hash:z.hash,author:z.author||"",email:z.email||"",timestamp:z.timestamp||0,subject:z.subject||"",insertions:z.insertions||0,deletions:z.deletions||0});return g}function dS($,I,U){let _=I.until?` --until="${I.until}"`:"",u=F6($,`git log ${U} --since="${I.since}"${_} --format="COMMIT:%H|%aN" --numstat`);if(!u)return[];let g=[],z="";for(let v of u.split(`
395
- `))if(v.startsWith("COMMIT:"))z=v.slice(7).split("|")[1]||"";else if(v.trim()&&z){let J=v.split("\t");if(J.length>=3){let N=parseInt(J[0]||"0",10),X=parseInt(J[1]||"0",10);if(!Number.isNaN(N)&&!Number.isNaN(X)&&J[2])g.push({file:J[2],insertions:N,deletions:X,author:z})}}return g}function pS($,I,U,_=10){let u=I.until?` --until="${I.until}"`:"",g=F6($,`git log ${U} --since="${I.since}"${u} --format="" --name-only | grep -v '^$' | sort | uniq -c | sort -rn | head -${_}`);if(!g)return[];return g.split(`
396
- `).filter(Boolean).map((z)=>{let v=z.trim().match(/^\s*(\d+)\s+(.+)$/);if(!v)return null;return{count:parseInt(v[1]||"0",10),file:v[2]||""}}).filter((z)=>z!==null)}function oS($,I,U){let _=U?` --author="${U}"`:"",u=F6($,`git log ${I}${_} --format="%ad" --date=format:"%Y-%m-%d" | sort -u`);if(!u)return 0;let g=u.split(`
397
- `).filter(Boolean).sort().reverse(),z=new Date;z.setHours(0,0,0,0);let v=0,J=new Date(z);for(let N of g){let[X=0,G=0,q=0]=N.split("-").map(Number),T=new Date(X,G-1,q);T.setHours(0,0,0,0);let H=Math.round((J.getTime()-T.getTime())/86400000);if(H===0)v++,J.setDate(J.getDate()-1);else if(H===1&&v===0)v++,J.setTime(T.getTime()),J.setDate(J.getDate()-1);else break}return v}function tS($,I,U){let _=I.until?` --until="${I.until}"`:"",u=F6($,`git log ${U} --since="${I.since}"${_} --format="%b" | grep -ci "co-authored-by.*noreply@anthropic\\.com\\|co-authored-by.*copilot\\|co-authored-by.*openai" 2>/dev/null || echo 0`);return parseInt(u||"0",10)}var aS=/(?:test|spec|__tests__|\.test\.|\.spec\.)/i;function I9($){return aS.test($)}function uH($,I=45){if($.length===0)return[];let U=[...$].sort((J,N)=>J.timestamp-N.timestamp),_=[],u=U[0]?.timestamp??0,g=U[0]?.timestamp??0,z=1,v=()=>{let J=Math.max(Math.round((g-u)/60),1),N=J>=50?"deep":J>=20?"medium":"micro";_.push({startTime:u,endTime:g,commits:z,type:N,durationMinutes:J})};for(let J=1;J<U.length;J++){let N=U[J]?.timestamp??0;if((N-g)/60>I)v(),u=N,g=N,z=1;else g=N,z++}return v(),_}function UH($){let I=Array(24).fill(0);for(let U of $){let _=new Date(U.timestamp*1000).getHours();I[_]=(I[_]||0)+1}return I}function eS($){let I={},U=/^(feat|fix|docs|style|refactor|test|chore|build|ci|perf)(\(.+\))?!?:/;for(let _ of $){let u=_.subject.match(U),g=u?u[1]||"other":"other";I[g]=(I[g]||0)+1}return I}function sS($){let I={};for(let g of $){let z=g.file.split("/")[0]||g.file;I[z]=(I[z]||0)+1}let U=$.length;if(U===0)return{score:0,area:"-"};let u=Object.entries(I).sort(([,g],[,z])=>z-g)[0];if(!u)return{score:0,area:"-"};return{score:Math.round(u[1]/U*100),area:u[0]}}function $w($,I){let U={};for(let g of $){if(!U[g.author])U[g.author]={commits:0,insertions:0,deletions:0,testInsertions:0,topAreas:[],commitTypes:{},peakHour:0};let z=U[g.author];if(!z)continue;z.commits++,z.insertions+=g.insertions,z.deletions+=g.deletions;let v=g.subject.match(/^(feat|fix|docs|style|refactor|test|chore|build|ci|perf)(\(.+\))?!?:/),J=v?v[1]||"other":"other";z.commitTypes[J]=(z.commitTypes[J]||0)+1}let _={},u={};for(let g of I){if(!_[g.author])_[g.author]={};let z=g.file.split("/")[0]||g.file,v=_[g.author];if(v)v[z]=(v[z]||0)+1;let J=U[g.author];if(J&&I9(g.file))J.testInsertions+=g.insertions}for(let g of $){if(!u[g.author])u[g.author]=Array(24).fill(0);let z=new Date(g.timestamp*1000).getHours(),v=u[g.author];if(v)v[z]=(v[z]||0)+1}for(let[g,z]of Object.entries(U)){let v=_[g]||{};z.topAreas=Object.entries(v).sort(([,X],[,G])=>G-X).slice(0,3).map(([X])=>X);let J=u[g]||[],N=Math.max(...J,0);z.peakHour=N>0?J.indexOf(N):0}return U}function _H($){return sG($,".serena","retrospectives")}function u9($,I){let U=_H($);if(!oT(U))mS(U,{recursive:!0});let _=I.date.split("T")[0]||I.date,u=tT(U).filter((v)=>v.startsWith(_)).length,g=`${_}-${u+1}.json`,z=sG(U,g);return cS(z,JSON.stringify(I,null,2),"utf-8"),z}function gH($){let I=_H($);if(!oT(I))return null;try{let U=tT(I).filter((g)=>g.endsWith(".json")).sort().reverse();if(U.length===0)return null;let _=hS(sG(I,U[0]||""),"utf-8"),u=JSON.parse(_);if(u.metrics)return u;return null}catch{return null}}function zH($,I,U=30){if(I===0)return"";let _=Math.round($/I*U);return"█".repeat(_)}function Iw($,I,U,_=25){let u=U>0?Math.round(I/U*100):0,g=zH(I,U,_);return` ${$.padEnd(12)} ${String(I).padStart(4)} (${String(u).padStart(2)}%) ${g}`}function vH($){let I=Math.max(...$,1),U=[];for(let _=0;_<24;_++){let u=$[_]||0;if(u===0)continue;U.push(` ${String(_).padStart(2)}:00 ${String(u).padStart(3)} ${zH(u,I,20)}`)}return U.length>0?U.join(`
398
- `):" (no commits)"}function JH($){return[["Commits",String($.commits)],["Contributors",String($.contributors)],["Insertions",`+${$.insertions}`],["Deletions",`-${$.deletions}`],["Net LOC",String($.netLoc)],["Test LOC (ins)",String($.testLoc)],["Test ratio",`${$.testRatio}%`],["Active days",String($.activeDays)],["Sessions",String($.sessions)],["Deep sessions",String($.deepSessions)],["Avg session",`${$.avgSessionMinutes} min`],["LOC/session-hour",String($.locPerSessionHour)],["Peak hour",`${$.peakHour}:00`],["Focus score",`${$.focusScore}% (${$.focusArea})`],["Streak",`${$.streakDays} days`],["AI-assisted",String($.aiAssistedCommits)]].map(([U,_])=>` ${U?.padEnd(20)} ${_}`).join(`
399
- `)}function NH($,I){let U=Object.entries($).sort(([,v],[,J])=>J.commits-v.commits),_=U.findIndex(([v])=>v===I);if(_>0){let[v]=U.splice(_,1);if(v)U.unshift(v)}let u=` ${"Contributor".padEnd(24)} ${"Commits".padStart(7)} ${"+/-".padStart(14)} Top area`,g=` ${"-".repeat(24)} ${"-".repeat(7)} ${"-".repeat(14)} ${"-".repeat(15)}`,z=U.map(([v,J])=>{let N=v===I?`You (${v})`:v,X=`+${J.insertions}/-${J.deletions}`;return` ${N.padEnd(24)} ${String(J.commits).padStart(7)} ${X.padStart(14)} ${J.topArea}`});return[u,g,...z].join(`
400
- `)}function U9($,I){let U=$.metrics,_=I.metrics;function u(z,v,J=""){let N=z-v,X=N>0?"↑":N<0?"↓":"→",G=N>0?"+":"";return`${v}${J} → ${z}${J} ${X}${G}${N}${J}`}return[` ${"Metric".padEnd(20)} Change`,` ${"-".repeat(20)} ${"-".repeat(35)}`,` ${"Commits".padEnd(20)} ${u(U.commits,_.commits)}`,` ${"Test ratio".padEnd(20)} ${u(U.testRatio,_.testRatio,"%")}`,` ${"Sessions".padEnd(20)} ${u(U.sessions,_.sessions)}`,` ${"Deep sessions".padEnd(20)} ${u(U.deepSessions,_.deepSessions)}`,` ${"LOC/session-hour".padEnd(20)} ${u(U.locPerSessionHour,_.locPerSessionHour)}`,` ${"Focus score".padEnd(20)} ${u(U.focusScore,_.focusScore,"%")}`,` ${"Streak".padEnd(20)} ${u(U.streakDays,_.streakDays,"d")}`].join(`
401
- `)}function GH($){let I=$.filter((z)=>z.type==="deep").length,U=$.filter((z)=>z.type==="medium").length,_=$.filter((z)=>z.type==="micro").length,u=$.reduce((z,v)=>z+v.durationMinutes,0),g=$.length>0?Math.round(u/$.length):0;return[` Total sessions: ${$.length}`,` Deep (50+ min): ${I}`,` Medium (20-50): ${U}`,` Micro (<20 min): ${_}`,` Total active time: ${Math.floor(u/60)}h ${u%60}m`,` Avg session: ${g} min`].join(`
402
- `)}function XH($){if($.length===0)return" (no file changes)";return $.map((I,U)=>{let _=I.count>=5?" [churn]":"",u=I9(I.file)?" [test]":"";return` ${String(U+1).padStart(2)}. ${I.file} (${I.count}x)${u}${_}`}).join(`
403
- `)}function qH($,I){if(I===0)return" (no commits)";return Object.entries($).sort(([,U],[,_])=>_-U).map(([U,_])=>Iw(U,_,I)).join(`
404
- `)}function QH($){let I=$.metrics;return`${$.date.split("T")[0]||""} (${$.window}): ${I.commits} commits (${I.contributors} contrib), ${I.netLoc>0?"+":""}${I.netLoc} LOC, ${I.testRatio}% tests, peak: ${I.peakHour}:00 | Streak: ${I.streakDays}d`}function G2($,I){let U=`origin/${sT($)}`,_=IH($,I,U),u=dS($,I,U),g=pS($,I,U),z=$w(_,u),v=uH(_),J=UH(_),N=eS(_),X=sS(u),G=oS($,U),q=tS($,I,U),T=0;for(let R of u)if(I9(R.file))T+=R.insertions;let H=_.reduce((R,D)=>R+D.insertions,0),Q=_.reduce((R,D)=>R+D.deletions,0),Y=new Set(_.map((R)=>new Date(R.timestamp*1000).toISOString().split("T")[0])).size,K=v.reduce((R,D)=>R+D.durationMinutes,0),L=K/60,P=L>0?Math.round((H+Q)/L/50)*50:0,O=J.indexOf(Math.max(...J)),B={};for(let[R,D]of Object.entries(z)){let M=D.insertions>0?Math.round(D.testInsertions/D.insertions*100):0;B[R]={commits:D.commits,insertions:D.insertions,deletions:D.deletions,testRatio:M,topArea:D.topAreas[0]||"-"}}return{date:new Date().toISOString(),window:I.label,metrics:{commits:_.length,contributors:Object.keys(z).length,insertions:H,deletions:Q,netLoc:H-Q,testLoc:T,testRatio:H>0?Math.round(T/H*100):0,activeDays:Y,sessions:v.length,deepSessions:v.filter((R)=>R.type==="deep").length,avgSessionMinutes:v.length>0?Math.round(K/v.length):0,locPerSessionHour:P,peakHour:O,focusScore:X.score,focusArea:X.area,streakDays:G,aiAssistedCommits:q},authors:B,commitTypes:N,hotspots:g}}function _9($,I){let U=`origin/${sT($)}`,_=IH($,I,U);return{sessions:uH(_),hourly:UH(_)}}function LH($,I,U,_,u){if(console.log(P$.default.bold(P$.default.cyan(QH($)))),console.log(),k(JH($.metrics),"Summary"),u)k(U9($,u),"Trends vs Last Retro");if($.metrics.contributors>0)k(NH($.authors,_),"Contributors");if(k(vH(U),"Commit Time Distribution"),I.length>0)k(GH(I),"Work Sessions");if(k(qH($.commitTypes,$.metrics.commits),"Commit Types"),$.hotspots.length>0){let J=$.metrics.commits>0?Math.round(($.commitTypes.fix||0)/$.metrics.commits*100):0,N=XH($.hotspots);if(J>50)N+=`
393
+ `);k(u,"Memory Schema"),p(u6.default.green("Memory schema ready!"))}U4();var P$=q$(b$(),1);import{execSync as dS}from"node:child_process";import{existsSync as aT,mkdirSync as pS,readdirSync as eT,readFileSync as oS,writeFileSync as tS}from"node:fs";import{join as sG}from"node:path";function $9($){if(!$)return{since:"7 days ago",label:"7d",days:7};let I=$.match(/^(\d+)(h|d|w)$/);if(!I)throw Error(`Invalid window: ${$}. Use: 24h, 7d, 14d, 30d, 2w`);let U=parseInt(I[1]||"0",10),_=I[2]||"";switch(_){case"h":return{since:`${U} hours ago`,label:`${U}h`,days:U/24};case"d":return{since:`${U} days ago`,label:`${U}d`,days:U};case"w":return{since:`${U*7} days ago`,label:`${U}w`,days:U*7};default:throw Error(`Invalid unit: ${_}`)}}function sT($){let I=$9($);return{current:I,previous:{since:`${I.days*2} days ago`,until:`${I.days} days ago`,label:I.label,days:I.days}}}function w6($,I){try{return dS(I,{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"],maxBuffer:10485760}).trim()}catch{return""}}function $H($){w6($,"git fetch origin --quiet 2>/dev/null || true")}function IH($){return w6($,"git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's|refs/remotes/origin/||'")||"main"}function uH($){return w6($,"git config user.name")||"Unknown"}function UH($,I,U){let _=I.until?` --until="${I.until}"`:"",u=w6($,`git log ${U} --since="${I.since}"${_} --format="COMMIT:%H|%aN|%ae|%at|%s" --shortstat`);if(!u)return[];let z=[],g=null;for(let v of u.split(`
394
+ `))if(v.startsWith("COMMIT:")){if(g?.hash)z.push({hash:g.hash,author:g.author||"",email:g.email||"",timestamp:g.timestamp||0,subject:g.subject||"",insertions:g.insertions||0,deletions:g.deletions||0});let J=v.slice(7).split("|");g={hash:J[0],author:J[1],email:J[2],timestamp:parseInt(J[3]||"0",10),subject:J.slice(4).join("|"),insertions:0,deletions:0}}else if(g&&v.trim()){let J=v.match(/(\d+) insertions?\(\+\)/),N=v.match(/(\d+) deletions?\(-\)/);if(J)g.insertions=parseInt(J[1]||"0",10);if(N)g.deletions=parseInt(N[1]||"0",10)}if(g?.hash)z.push({hash:g.hash,author:g.author||"",email:g.email||"",timestamp:g.timestamp||0,subject:g.subject||"",insertions:g.insertions||0,deletions:g.deletions||0});return z}function aS($,I,U){let _=I.until?` --until="${I.until}"`:"",u=w6($,`git log ${U} --since="${I.since}"${_} --format="COMMIT:%H|%aN" --numstat`);if(!u)return[];let z=[],g="";for(let v of u.split(`
395
+ `))if(v.startsWith("COMMIT:"))g=v.slice(7).split("|")[1]||"";else if(v.trim()&&g){let J=v.split("\t");if(J.length>=3){let N=parseInt(J[0]||"0",10),X=parseInt(J[1]||"0",10);if(!Number.isNaN(N)&&!Number.isNaN(X)&&J[2])z.push({file:J[2],insertions:N,deletions:X,author:g})}}return z}function eS($,I,U,_=10){let u=I.until?` --until="${I.until}"`:"",z=w6($,`git log ${U} --since="${I.since}"${u} --format="" --name-only | grep -v '^$' | sort | uniq -c | sort -rn | head -${_}`);if(!z)return[];return z.split(`
396
+ `).filter(Boolean).map((g)=>{let v=g.trim().match(/^\s*(\d+)\s+(.+)$/);if(!v)return null;return{count:parseInt(v[1]||"0",10),file:v[2]||""}}).filter((g)=>g!==null)}function sS($,I,U){let _=U?` --author="${U}"`:"",u=w6($,`git log ${I}${_} --format="%ad" --date=format:"%Y-%m-%d" | sort -u`);if(!u)return 0;let z=u.split(`
397
+ `).filter(Boolean).sort().reverse(),g=new Date;g.setHours(0,0,0,0);let v=0,J=new Date(g);for(let N of z){let[X=0,G=0,q=0]=N.split("-").map(Number),T=new Date(X,G-1,q);T.setHours(0,0,0,0);let H=Math.round((J.getTime()-T.getTime())/86400000);if(H===0)v++,J.setDate(J.getDate()-1);else if(H===1&&v===0)v++,J.setTime(T.getTime()),J.setDate(J.getDate()-1);else break}return v}function $w($,I,U){let _=I.until?` --until="${I.until}"`:"",u=w6($,`git log ${U} --since="${I.since}"${_} --format="%b" | grep -ci "co-authored-by.*noreply@anthropic\\.com\\|co-authored-by.*copilot\\|co-authored-by.*openai" 2>/dev/null || echo 0`);return parseInt(u||"0",10)}var Iw=/(?:test|spec|__tests__|\.test\.|\.spec\.)/i;function I9($){return Iw.test($)}function _H($,I=45){if($.length===0)return[];let U=[...$].sort((J,N)=>J.timestamp-N.timestamp),_=[],u=U[0]?.timestamp??0,z=U[0]?.timestamp??0,g=1,v=()=>{let J=Math.max(Math.round((z-u)/60),1),N=J>=50?"deep":J>=20?"medium":"micro";_.push({startTime:u,endTime:z,commits:g,type:N,durationMinutes:J})};for(let J=1;J<U.length;J++){let N=U[J]?.timestamp??0;if((N-z)/60>I)v(),u=N,z=N,g=1;else z=N,g++}return v(),_}function zH($){let I=Array(24).fill(0);for(let U of $){let _=new Date(U.timestamp*1000).getHours();I[_]=(I[_]||0)+1}return I}function uw($){let I={},U=/^(feat|fix|docs|style|refactor|test|chore|build|ci|perf)(\(.+\))?!?:/;for(let _ of $){let u=_.subject.match(U),z=u?u[1]||"other":"other";I[z]=(I[z]||0)+1}return I}function Uw($){let I={};for(let z of $){let g=z.file.split("/")[0]||z.file;I[g]=(I[g]||0)+1}let U=$.length;if(U===0)return{score:0,area:"-"};let u=Object.entries(I).sort(([,z],[,g])=>g-z)[0];if(!u)return{score:0,area:"-"};return{score:Math.round(u[1]/U*100),area:u[0]}}function _w($,I){let U={};for(let z of $){if(!U[z.author])U[z.author]={commits:0,insertions:0,deletions:0,testInsertions:0,topAreas:[],commitTypes:{},peakHour:0};let g=U[z.author];if(!g)continue;g.commits++,g.insertions+=z.insertions,g.deletions+=z.deletions;let v=z.subject.match(/^(feat|fix|docs|style|refactor|test|chore|build|ci|perf)(\(.+\))?!?:/),J=v?v[1]||"other":"other";g.commitTypes[J]=(g.commitTypes[J]||0)+1}let _={},u={};for(let z of I){if(!_[z.author])_[z.author]={};let g=z.file.split("/")[0]||z.file,v=_[z.author];if(v)v[g]=(v[g]||0)+1;let J=U[z.author];if(J&&I9(z.file))J.testInsertions+=z.insertions}for(let z of $){if(!u[z.author])u[z.author]=Array(24).fill(0);let g=new Date(z.timestamp*1000).getHours(),v=u[z.author];if(v)v[g]=(v[g]||0)+1}for(let[z,g]of Object.entries(U)){let v=_[z]||{};g.topAreas=Object.entries(v).sort(([,X],[,G])=>G-X).slice(0,3).map(([X])=>X);let J=u[z]||[],N=Math.max(...J,0);g.peakHour=N>0?J.indexOf(N):0}return U}function gH($){return sG($,".serena","retrospectives")}function u9($,I){let U=gH($);if(!aT(U))pS(U,{recursive:!0});let _=I.date.split("T")[0]||I.date,u=eT(U).filter((v)=>v.startsWith(_)).length,z=`${_}-${u+1}.json`,g=sG(U,z);return tS(g,JSON.stringify(I,null,2),"utf-8"),g}function vH($){let I=gH($);if(!aT(I))return null;try{let U=eT(I).filter((z)=>z.endsWith(".json")).sort().reverse();if(U.length===0)return null;let _=oS(sG(I,U[0]||""),"utf-8"),u=JSON.parse(_);if(u.metrics)return u;return null}catch{return null}}function JH($,I,U=30){if(I===0)return"";let _=Math.round($/I*U);return"█".repeat(_)}function zw($,I,U,_=25){let u=U>0?Math.round(I/U*100):0,z=JH(I,U,_);return` ${$.padEnd(12)} ${String(I).padStart(4)} (${String(u).padStart(2)}%) ${z}`}function NH($){let I=Math.max(...$,1),U=[];for(let _=0;_<24;_++){let u=$[_]||0;if(u===0)continue;U.push(` ${String(_).padStart(2)}:00 ${String(u).padStart(3)} ${JH(u,I,20)}`)}return U.length>0?U.join(`
398
+ `):" (no commits)"}function GH($){return[["Commits",String($.commits)],["Contributors",String($.contributors)],["Insertions",`+${$.insertions}`],["Deletions",`-${$.deletions}`],["Net LOC",String($.netLoc)],["Test LOC (ins)",String($.testLoc)],["Test ratio",`${$.testRatio}%`],["Active days",String($.activeDays)],["Sessions",String($.sessions)],["Deep sessions",String($.deepSessions)],["Avg session",`${$.avgSessionMinutes} min`],["LOC/session-hour",String($.locPerSessionHour)],["Peak hour",`${$.peakHour}:00`],["Focus score",`${$.focusScore}% (${$.focusArea})`],["Streak",`${$.streakDays} days`],["AI-assisted",String($.aiAssistedCommits)]].map(([U,_])=>` ${U?.padEnd(20)} ${_}`).join(`
399
+ `)}function XH($,I){let U=Object.entries($).sort(([,v],[,J])=>J.commits-v.commits),_=U.findIndex(([v])=>v===I);if(_>0){let[v]=U.splice(_,1);if(v)U.unshift(v)}let u=` ${"Contributor".padEnd(24)} ${"Commits".padStart(7)} ${"+/-".padStart(14)} Top area`,z=` ${"-".repeat(24)} ${"-".repeat(7)} ${"-".repeat(14)} ${"-".repeat(15)}`,g=U.map(([v,J])=>{let N=v===I?`You (${v})`:v,X=`+${J.insertions}/-${J.deletions}`;return` ${N.padEnd(24)} ${String(J.commits).padStart(7)} ${X.padStart(14)} ${J.topArea}`});return[u,z,...g].join(`
400
+ `)}function U9($,I){let U=$.metrics,_=I.metrics;function u(g,v,J=""){let N=g-v,X=N>0?"↑":N<0?"↓":"→",G=N>0?"+":"";return`${v}${J} → ${g}${J} ${X}${G}${N}${J}`}return[` ${"Metric".padEnd(20)} Change`,` ${"-".repeat(20)} ${"-".repeat(35)}`,` ${"Commits".padEnd(20)} ${u(U.commits,_.commits)}`,` ${"Test ratio".padEnd(20)} ${u(U.testRatio,_.testRatio,"%")}`,` ${"Sessions".padEnd(20)} ${u(U.sessions,_.sessions)}`,` ${"Deep sessions".padEnd(20)} ${u(U.deepSessions,_.deepSessions)}`,` ${"LOC/session-hour".padEnd(20)} ${u(U.locPerSessionHour,_.locPerSessionHour)}`,` ${"Focus score".padEnd(20)} ${u(U.focusScore,_.focusScore,"%")}`,` ${"Streak".padEnd(20)} ${u(U.streakDays,_.streakDays,"d")}`].join(`
401
+ `)}function qH($){let I=$.filter((g)=>g.type==="deep").length,U=$.filter((g)=>g.type==="medium").length,_=$.filter((g)=>g.type==="micro").length,u=$.reduce((g,v)=>g+v.durationMinutes,0),z=$.length>0?Math.round(u/$.length):0;return[` Total sessions: ${$.length}`,` Deep (50+ min): ${I}`,` Medium (20-50): ${U}`,` Micro (<20 min): ${_}`,` Total active time: ${Math.floor(u/60)}h ${u%60}m`,` Avg session: ${z} min`].join(`
402
+ `)}function QH($){if($.length===0)return" (no file changes)";return $.map((I,U)=>{let _=I.count>=5?" [churn]":"",u=I9(I.file)?" [test]":"";return` ${String(U+1).padStart(2)}. ${I.file} (${I.count}x)${u}${_}`}).join(`
403
+ `)}function TH($,I){if(I===0)return" (no commits)";return Object.entries($).sort(([,U],[,_])=>_-U).map(([U,_])=>zw(U,_,I)).join(`
404
+ `)}function HH($){let I=$.metrics;return`${$.date.split("T")[0]||""} (${$.window}): ${I.commits} commits (${I.contributors} contrib), ${I.netLoc>0?"+":""}${I.netLoc} LOC, ${I.testRatio}% tests, peak: ${I.peakHour}:00 | Streak: ${I.streakDays}d`}function q2($,I){let U=`origin/${IH($)}`,_=UH($,I,U),u=aS($,I,U),z=eS($,I,U),g=_w(_,u),v=_H(_),J=zH(_),N=uw(_),X=Uw(u),G=sS($,U),q=$w($,I,U),T=0;for(let V of u)if(I9(V.file))T+=V.insertions;let H=_.reduce((V,B)=>V+B.insertions,0),Q=_.reduce((V,B)=>V+B.deletions,0),Y=new Set(_.map((V)=>new Date(V.timestamp*1000).toISOString().split("T")[0])).size,M=v.reduce((V,B)=>V+B.durationMinutes,0),L=M/60,P=L>0?Math.round((H+Q)/L/50)*50:0,R=J.indexOf(Math.max(...J)),K={};for(let[V,B]of Object.entries(g)){let O=B.insertions>0?Math.round(B.testInsertions/B.insertions*100):0;K[V]={commits:B.commits,insertions:B.insertions,deletions:B.deletions,testRatio:O,topArea:B.topAreas[0]||"-"}}return{date:new Date().toISOString(),window:I.label,metrics:{commits:_.length,contributors:Object.keys(g).length,insertions:H,deletions:Q,netLoc:H-Q,testLoc:T,testRatio:H>0?Math.round(T/H*100):0,activeDays:Y,sessions:v.length,deepSessions:v.filter((V)=>V.type==="deep").length,avgSessionMinutes:v.length>0?Math.round(M/v.length):0,locPerSessionHour:P,peakHour:R,focusScore:X.score,focusArea:X.area,streakDays:G,aiAssistedCommits:q},authors:K,commitTypes:N,hotspots:z}}function _9($,I){let U=`origin/${IH($)}`,_=UH($,I,U);return{sessions:_H(_),hourly:zH(_)}}function WH($,I,U,_,u){if(console.log(P$.default.bold(P$.default.cyan(HH($)))),console.log(),k(GH($.metrics),"Summary"),u)k(U9($,u),"Trends vs Last Retro");if($.metrics.contributors>0)k(XH($.authors,_),"Contributors");if(k(NH(U),"Commit Time Distribution"),I.length>0)k(qH(I),"Work Sessions");if(k(TH($.commitTypes,$.metrics.commits),"Commit Types"),$.hotspots.length>0){let J=$.metrics.commits>0?Math.round(($.commitTypes.fix||0)/$.metrics.commits*100):0,N=QH($.hotspots);if(J>50)N+=`
405
405
 
406
- ${P$.default.yellow(`Fix ratio ${J}% — ship-fast-fix-fast pattern detected`)}`;k(N,"File Hotspots (Top 10)")}let{focusScore:g,focusArea:z}=$.metrics,v=g>=60?P$.default.green:g>=40?P$.default.yellow:P$.default.red;if(k(` ${v(`${g}%`)} — primary area: ${P$.default.bold(z)}`,"Focus Score"),k(` ${P$.default.bold(String($.metrics.streakDays))} consecutive days with commits`,"Shipping Streak"),$.metrics.aiAssistedCommits>0){let J=$.metrics.commits>0?Math.round($.metrics.aiAssistedCommits/$.metrics.commits*100):0;k(` ${$.metrics.aiAssistedCommits} commits (${J}%) AI-assisted`,"AI Collaboration")}}async function RH($,I={}){let U=process.cwd();if(I.interactive){let{retro:X}=await Promise.resolve().then(() => (KH(),MH));await X();return}console.clear(),V$(P$.default.bgMagenta(P$.default.white(" retro ")));let _=I4();_.start("Fetching origin..."),eT(U),_.stop("Origin fetched");let u=$H(U);if(I.compare){let{current:X,previous:G}=aT($);_.start(`Analyzing current window (${X.label})...`);let q=G2(U,X),T=_9(U,X);_.stop("Current window analyzed"),_.start(`Analyzing previous window (${G.label})...`);let H=G2(U,G);if(_.stop("Previous window analyzed"),q.metrics.commits===0&&H.metrics.commits===0){k(P$.default.yellow("No commits found in either window."),"Empty"),d(P$.default.dim("Try a wider window: oma retro compare 30d"));return}if(I.json){console.log(JSON.stringify({current:q,previous:H},null,2));return}console.log(P$.default.bold(`
406
+ ${P$.default.yellow(`Fix ratio ${J}% — ship-fast-fix-fast pattern detected`)}`;k(N,"File Hotspots (Top 10)")}let{focusScore:z,focusArea:g}=$.metrics,v=z>=60?P$.default.green:z>=40?P$.default.yellow:P$.default.red;if(k(` ${v(`${z}%`)} — primary area: ${P$.default.bold(g)}`,"Focus Score"),k(` ${P$.default.bold(String($.metrics.streakDays))} consecutive days with commits`,"Shipping Streak"),$.metrics.aiAssistedCommits>0){let J=$.metrics.commits>0?Math.round($.metrics.aiAssistedCommits/$.metrics.commits*100):0;k(` ${$.metrics.aiAssistedCommits} commits (${J}%) AI-assisted`,"AI Collaboration")}}async function PH($,I={}){let U=process.cwd();if(I.interactive){let{retro:X}=await Promise.resolve().then(() => (LH(),RH));await X();return}console.clear(),V$(P$.default.bgMagenta(P$.default.white(" retro ")));let _=u4();_.start("Fetching origin..."),$H(U),_.stop("Origin fetched");let u=uH(U);if(I.compare){let{current:X,previous:G}=sT($);_.start(`Analyzing current window (${X.label})...`);let q=q2(U,X),T=_9(U,X);_.stop("Current window analyzed"),_.start(`Analyzing previous window (${G.label})...`);let H=q2(U,G);if(_.stop("Previous window analyzed"),q.metrics.commits===0&&H.metrics.commits===0){k(P$.default.yellow("No commits found in either window."),"Empty"),p(P$.default.dim("Try a wider window: oma retro compare 30d"));return}if(I.json){console.log(JSON.stringify({current:q,previous:H},null,2));return}console.log(P$.default.bold(`
407
407
  Comparing: ${X.label} (current) vs ${G.label} (prior)
408
408
  `)),k(U9(q,H),"Period Comparison"),console.log(P$.default.bold(`
409
409
  --- Current Period ---
410
- `)),LH(q,T.sessions,T.hourly,u,null);let Q=u9(U,q);d(P$.default.dim(`Snapshot saved: ${Q}`));return}let g;try{g=$9($)}catch(X){k(["Usage: oma retro [window]",""," oma retro last 7 days (default)"," oma retro 24h last 24 hours"," oma retro 14d last 14 days"," oma retro 30d last 30 days"," oma retro 2w last 2 weeks"," oma retro --compare compare current vs prior period"," oma retro --compare 14d"].join(`
411
- `),"Usage"),d(P$.default.dim(X.message));return}_.start(`Analyzing ${g.label} window...`);let z=G2(U,g),v=_9(U,g);if(_.stop(`Analysis complete (${z.metrics.commits} commits)`),z.metrics.commits===0){k(P$.default.yellow("No commits found in this window."),"Empty"),d(P$.default.dim("Try a wider window: oma retro 30d"));return}if(I.json){console.log(JSON.stringify(z,null,2));return}let J=gH(U);LH(z,v.sessions,v.hourly,u,J);let N=u9(U,z);d(P$.default.dim(`Snapshot saved: ${N}`))}u4();qI();s4();var S6=q$(b$(),1);import{execSync as Nw,spawnSync as WH}from"node:child_process";import{platform as Gw}from"node:os";function Xw(){let $=Gw();if($==="darwin")return"brew install gh";if($==="win32")return"winget install GitHub.cli";return"sudo apt install gh"}async function PH(){if(console.clear(),V$(S6.default.bgMagenta(S6.default.white(" ⭐ oh-my-agent star "))),!J1()){let I=Xw(),U=await O$({message:`GitHub CLI (gh) is not installed. Install with ${S6.default.cyan(I)}?`});if(e(U)||!U){d("Install gh manually and try again.");return}let _=I4();_.start("Installing GitHub CLI...");let u=WH(I,{shell:!0,stdio:"pipe"});if(u.status!==0){_.stop("Installation failed"),o.error(u.stderr?.toString()||"Unknown error"),d("Please install gh manually.");return}_.stop("GitHub CLI installed!")}if(!r4()){o.warn("GitHub CLI is not authenticated.");let I=await O$({message:`Run ${S6.default.cyan("gh auth login")} now?`});if(e(I)||!I){d("Authenticate and try again.");return}if(WH("gh",["auth","login"],{stdio:"inherit"}),!r4()){d("Authentication was not completed. Try again.");return}o.success("Authenticated!")}if(N1()){d(`Already starred ${S6.default.cyan(R$)}! Thank you! \uD83D\uDE4F`);return}let $=await O$({message:`Star ${S6.default.cyan(R$)} on GitHub?`});if(e($)||!$){d("Maybe next time!");return}try{Nw(`gh api -X PUT /user/starred/${R$}`,{stdio:"ignore"}),d(`Starred ${S6.default.cyan(R$)}! Thank you! \uD83C\uDF1F`)}catch{o.error("Failed to star the repository."),d("Please try again later.")}}u4();z9();F0();var P4=q$(b$(),1);import{existsSync as q2,mkdirSync as qw,readdirSync as Qw,readFileSync as Tw,writeFileSync as ZH}from"node:fs";import{dirname as Hw,join as AH}from"node:path";function G9($){return AH($,".serena","metrics.json")}function N9(){return{sessions:0,skillsUsed:{},tasksCompleted:0,totalSessionTime:0,filesChanged:0,linesAdded:0,linesRemoved:0,lastUpdated:new Date().toISOString(),startDate:new Date().toISOString()}}function Yw($){let I=G9($);if(q2(I))try{return JSON.parse(Tw(I,"utf-8"))}catch{return N9()}return N9()}function Ow($,I){let U=G9($),_=Hw(U);if(!q2(_))qw(_,{recursive:!0});I.lastUpdated=new Date().toISOString(),ZH(U,JSON.stringify(I,null,2),"utf-8")}function Vw($){let I=AH($,".serena","memories"),U={};if(!q2(I))return U;try{let _=Qw(I);for(let u of _){let g=u.match(/(?:progress|result)-(\w+)/);if(g?.[1]){let z=g[1];U[z]=(U[z]||0)+1}}}catch{}return U}async function bH($=!1,I=!1){let U=process.cwd(),_=G9(U);if(I){if(q2(_))ZH(_,JSON.stringify(N9(),null,2),"utf-8");if($)console.log(JSON.stringify({reset:!0}));else console.log(P4.default.green("✅ Metrics reset successfully."));return}let u=Yw(U),g=X2(U),z=Vw(U),v=L7(U),J=F_(U),N=J.startedAt?new Date(J.startedAt):null,X=N&&!Number.isNaN(N.getTime())?Math.max(0,Math.floor((Date.now()-N.getTime())/1000)):0;for(let[Q,Y]of Object.entries(z))u.skillsUsed[Q]=(u.skillsUsed[Q]||0)+Y;if(v>u.tasksCompleted)u.tasksCompleted=v;if(J.id){if(["completed","failed","aborted"].includes(J.status||"")&&(u.lastSessionId!==J.id||u.lastSessionStatus!==J.status)&&X>0)u.totalSessionTime+=X;u.lastSessionId=J.id,u.lastSessionStatus=J.status,u.lastSessionStarted=J.startedAt,u.lastSessionDuration=X}u.filesChanged+=g.filesChanged,u.linesAdded+=g.linesAdded,u.linesRemoved+=g.linesRemoved,u.sessions+=1,Ow(U,u);let G=Math.max(1,Math.ceil((Date.now()-new Date(u.startDate).getTime())/86400000)),q=u.sessions>0?Math.round(u.totalSessionTime/u.sessions):0;if($){console.log(JSON.stringify({...u,gitStats:g,daysSinceStart:G,avgSessionTime:q},null,2));return}console.clear(),V$(P4.default.bgMagenta(P4.default.white(" \uD83D\uDCCA oh-my-agent stats ")));let T=[P4.default.bold(`\uD83D\uDCC8 Productivity Metrics (${G} days)`),"┌─────────────────────┬──────────────┐",`│ ${P4.default.bold("Metric")} │ ${P4.default.bold("Value")} │`,"├─────────────────────┼──────────────┤",`│ Sessions │ ${String(u.sessions).padEnd(12)} │`,`│ Tasks Completed │ ${String(u.tasksCompleted).padEnd(12)} │`,`│ Files Changed │ ${String(u.filesChanged).padEnd(12)} │`,`│ Lines Added │ ${P4.default.green(`+${u.linesAdded}`).padEnd(12)} │`,`│ Lines Removed │ ${P4.default.red(`-${u.linesRemoved}`).padEnd(12)} │`,"└─────────────────────┴──────────────┘"].join(`
412
- `);k(T,"Overview");let H=Object.entries(u.skillsUsed).sort(([,Q],[,Y])=>Y-Q).slice(0,5);if(H.length>0){let Q=[P4.default.bold("\uD83C\uDFC6 Top Skills Used"),...H.map(([Y,K],L)=>` ${L+1}. ${Y} (${K})`)].join(`
413
- `);k(Q,"Skills")}d(P4.default.dim(`Data stored in: ${_}`))}u4();cG();qI();var p$=q$(b$(),1);import{execSync as T1}from"node:child_process";import{cpSync as Q2,existsSync as H1,mkdirSync as T2,readFileSync as X9,rmSync as CH,writeFileSync as H2}from"node:fs";import{tmpdir as Lw}from"node:os";import{join as d$}from"node:path";s4();import{existsSync as jH,mkdirSync as Bw,readFileSync as Dw,writeFileSync as Mw}from"node:fs";import{dirname as Kw,join as FH}from"node:path";async function SH($){let I=FH($,W4,"_version.json");if(!jH(I))return null;try{let U=Dw(I,"utf-8");return JSON.parse(U).version||null}catch{return null}}async function wH($,I){let U=FH($,W4,"_version.json"),_=Kw(U);if(!jH(_))Bw(_,{recursive:!0});Mw(U,JSON.stringify({version:I},null,2),"utf-8")}async function EH(){let $=`https://raw.githubusercontent.com/${R$}/main/prompt-manifest.json`,I=await fetch($);if(!I.ok)throw Error("Failed to fetch remote manifest");return await I.json()}dG();s4();oG();function Rw($){if(!$)return{intro:(U)=>V$(U),outro:(U)=>d(U),note:(U,_)=>k(U,_),logError:(U)=>o.error(U),spinnerStart:(U)=>{let _=I4();return _.start(U),_}};let I={start(U){},stop(U){if(U)console.log(U)},message(U){console.log(U)}};return{intro:(U)=>console.log(U),outro:(U)=>console.log(U),note:(U,_)=>console.log(U),logError:(U)=>console.error(U),spinnerStart:(U)=>{return console.log(U),I}}}async function fH($=!1,I=!1){if(!I&&process.stdout.isTTY)console.clear();let U=Rw(I);U.intro(p$.default.bgMagenta(p$.default.white(" \uD83D\uDEF8 oh-my-agent update ")));let _=process.cwd(),u=z2(_);if(u.length>0)U.note(u.map((v)=>`${p$.default.green("✓")} ${v}`).join(`
414
- `),"Migration");if(!I)await _2(_);let g=await SH(_);if(g===null){U.note("oh-my-agent is not installed in this project. Running install...","Not initialized");let{install:v}=await Promise.resolve().then(() => (eG(),dT));await v();return}let z;try{z=U.spinnerStart("Checking for updates...");let v=await EH();if(g===v.version){let X=n0(_);if(X.length>0)U.note(X.map((G)=>`${p$.default.green("✓")} ${G}`).join(`
415
- `),"Shared layout migration");z.stop(p$.default.green("Already up to date!")),U.outro(`Current version: ${p$.default.cyan(g)}`);return}z.message(`Downloading ${p$.default.cyan(v.version)}...`);let{dir:J,cleanup:N}=await v2();try{z.message("Copying files...");let X=d$(_,".agents","config","user-preferences.yaml"),G=d$(_,".agents","mcp.json"),q=!$&&H1(X)?X9(X):null,T=!$&&H1(G)?X9(G):null,H=d$(Lw(),`oma-stack-backup-${Date.now()}`),Q=d$(_,".agents","skills","oma-backend","stack"),Y=!$&&H1(Q);if(Y)T2(H,{recursive:!0}),Q2(Q,d$(H,"oma-backend"),{recursive:!0});let K=["snippets.md","tech-stack.md","api-template.py"],L=d$(_,".agents","skills","oma-backend","resources"),P=!$&&!Y&&K.some((A)=>H1(d$(L,A)));if(Q2(d$(J,".agents"),d$(_,".agents"),{recursive:!0,force:!0}),q)H2(X,q);if(T)H2(G,T);if(Y)try{T2(Q,{recursive:!0}),Q2(d$(H,"oma-backend"),Q,{recursive:!0,force:!0})}finally{CH(H,{recursive:!0,force:!0})}if(P){let A=d$(J,".agents","skills","oma-backend","variants","python");if(H1(A))T2(Q,{recursive:!0}),Q2(A,Q,{recursive:!0,force:!0}),H2(d$(Q,"stack.yaml"),`language: python
410
+ `)),WH(q,T.sessions,T.hourly,u,null);let Q=u9(U,q);p(P$.default.dim(`Snapshot saved: ${Q}`));return}let z;try{z=$9($)}catch(X){k(["Usage: oma retro [window]",""," oma retro last 7 days (default)"," oma retro 24h last 24 hours"," oma retro 14d last 14 days"," oma retro 30d last 30 days"," oma retro 2w last 2 weeks"," oma retro --compare compare current vs prior period"," oma retro --compare 14d"].join(`
411
+ `),"Usage"),p(P$.default.dim(X.message));return}_.start(`Analyzing ${z.label} window...`);let g=q2(U,z),v=_9(U,z);if(_.stop(`Analysis complete (${g.metrics.commits} commits)`),g.metrics.commits===0){k(P$.default.yellow("No commits found in this window."),"Empty"),p(P$.default.dim("Try a wider window: oma retro 30d"));return}if(I.json){console.log(JSON.stringify(g,null,2));return}let J=vH(U);WH(g,v.sessions,v.hourly,u,J);let N=u9(U,g);p(P$.default.dim(`Snapshot saved: ${N}`))}U4();QI();s4();var E6=q$(b$(),1);import{execSync as Qw,spawnSync as ZH}from"node:child_process";import{platform as Tw}from"node:os";function Hw(){let $=Tw();if($==="darwin")return"brew install gh";if($==="win32")return"winget install GitHub.cli";return"sudo apt install gh"}async function AH(){if(console.clear(),V$(E6.default.bgMagenta(E6.default.white(" ⭐ oh-my-agent star "))),!N1()){let I=Hw(),U=await O$({message:`GitHub CLI (gh) is not installed. Install with ${E6.default.cyan(I)}?`});if(e(U)||!U){p("Install gh manually and try again.");return}let _=u4();_.start("Installing GitHub CLI...");let u=ZH(I,{shell:!0,stdio:"pipe"});if(u.status!==0){_.stop("Installation failed"),d.error(u.stderr?.toString()||"Unknown error"),p("Please install gh manually.");return}_.stop("GitHub CLI installed!")}if(!r4()){d.warn("GitHub CLI is not authenticated.");let I=await O$({message:`Run ${E6.default.cyan("gh auth login")} now?`});if(e(I)||!I){p("Authenticate and try again.");return}if(ZH("gh",["auth","login"],{stdio:"inherit"}),!r4()){p("Authentication was not completed. Try again.");return}d.success("Authenticated!")}if(G1()){p(`Already starred ${E6.default.cyan(L$)}! Thank you! \uD83D\uDE4F`);return}let $=await O$({message:`Star ${E6.default.cyan(L$)} on GitHub?`});if(e($)||!$){p("Maybe next time!");return}try{Qw(`gh api -X PUT /user/starred/${L$}`,{stdio:"ignore"}),p(`Starred ${E6.default.cyan(L$)}! Thank you! \uD83C\uDF1F`)}catch{d.error("Failed to star the repository."),p("Please try again later.")}}U4();g9();w0();var P4=q$(b$(),1);import{existsSync as T2,mkdirSync as Yw,readdirSync as Ow,readFileSync as Vw,writeFileSync as bH}from"node:fs";import{dirname as Bw,join as jH}from"node:path";function G9($){return jH($,".serena","metrics.json")}function N9(){return{sessions:0,skillsUsed:{},tasksCompleted:0,totalSessionTime:0,filesChanged:0,linesAdded:0,linesRemoved:0,lastUpdated:new Date().toISOString(),startDate:new Date().toISOString()}}function Dw($){let I=G9($);if(T2(I))try{return JSON.parse(Vw(I,"utf-8"))}catch{return N9()}return N9()}function Mw($,I){let U=G9($),_=Bw(U);if(!T2(_))Yw(_,{recursive:!0});I.lastUpdated=new Date().toISOString(),bH(U,JSON.stringify(I,null,2),"utf-8")}function Kw($){let I=jH($,".serena","memories"),U={};if(!T2(I))return U;try{let _=Ow(I);for(let u of _){let z=u.match(/(?:progress|result)-(\w+)/);if(z?.[1]){let g=z[1];U[g]=(U[g]||0)+1}}}catch{}return U}async function FH($=!1,I=!1){let U=process.cwd(),_=G9(U);if(I){if(T2(_))bH(_,JSON.stringify(N9(),null,2),"utf-8");if($)console.log(JSON.stringify({reset:!0}));else console.log(P4.default.green("✅ Metrics reset successfully."));return}let u=Dw(U),z=Q2(U),g=Kw(U),v=R7(U),J=S_(U),N=J.startedAt?new Date(J.startedAt):null,X=N&&!Number.isNaN(N.getTime())?Math.max(0,Math.floor((Date.now()-N.getTime())/1000)):0;for(let[Q,Y]of Object.entries(g))u.skillsUsed[Q]=(u.skillsUsed[Q]||0)+Y;if(v>u.tasksCompleted)u.tasksCompleted=v;if(J.id){if(["completed","failed","aborted"].includes(J.status||"")&&(u.lastSessionId!==J.id||u.lastSessionStatus!==J.status)&&X>0)u.totalSessionTime+=X;u.lastSessionId=J.id,u.lastSessionStatus=J.status,u.lastSessionStarted=J.startedAt,u.lastSessionDuration=X}u.filesChanged+=z.filesChanged,u.linesAdded+=z.linesAdded,u.linesRemoved+=z.linesRemoved,u.sessions+=1,Mw(U,u);let G=Math.max(1,Math.ceil((Date.now()-new Date(u.startDate).getTime())/86400000)),q=u.sessions>0?Math.round(u.totalSessionTime/u.sessions):0;if($){console.log(JSON.stringify({...u,gitStats:z,daysSinceStart:G,avgSessionTime:q},null,2));return}console.clear(),V$(P4.default.bgMagenta(P4.default.white(" \uD83D\uDCCA oh-my-agent stats ")));let T=[P4.default.bold(`\uD83D\uDCC8 Productivity Metrics (${G} days)`),"┌─────────────────────┬──────────────┐",`│ ${P4.default.bold("Metric")} │ ${P4.default.bold("Value")} │`,"├─────────────────────┼──────────────┤",`│ Sessions │ ${String(u.sessions).padEnd(12)} │`,`│ Tasks Completed │ ${String(u.tasksCompleted).padEnd(12)} │`,`│ Files Changed │ ${String(u.filesChanged).padEnd(12)} │`,`│ Lines Added │ ${P4.default.green(`+${u.linesAdded}`).padEnd(12)} │`,`│ Lines Removed │ ${P4.default.red(`-${u.linesRemoved}`).padEnd(12)} │`,"└─────────────────────┴──────────────┘"].join(`
412
+ `);k(T,"Overview");let H=Object.entries(u.skillsUsed).sort(([,Q],[,Y])=>Y-Q).slice(0,5);if(H.length>0){let Q=[P4.default.bold("\uD83C\uDFC6 Top Skills Used"),...H.map(([Y,M],L)=>` ${L+1}. ${Y} (${M})`)].join(`
413
+ `);k(Q,"Skills")}p(P4.default.dim(`Data stored in: ${_}`))}U4();pG();QI();var p$=q$(b$(),1);import{execSync as H1}from"node:child_process";import{cpSync as H2,existsSync as Y1,mkdirSync as Y2,readFileSync as X9,rmSync as xH,writeFileSync as O2}from"node:fs";import{tmpdir as Zw}from"node:os";import{join as d$}from"node:path";s4();import{existsSync as SH,mkdirSync as Rw,readFileSync as Lw,writeFileSync as Ww}from"node:fs";import{dirname as Pw,join as wH}from"node:path";async function EH($){let I=wH($,W4,"_version.json");if(!SH(I))return null;try{let U=Lw(I,"utf-8");return JSON.parse(U).version||null}catch{return null}}async function CH($,I){let U=wH($,W4,"_version.json"),_=Pw(U);if(!SH(_))Rw(_,{recursive:!0});Ww(U,JSON.stringify({version:I},null,2),"utf-8")}async function fH(){let $=`https://raw.githubusercontent.com/${L$}/main/prompt-manifest.json`,I=await fetch($);if(!I.ok)throw Error("Failed to fetch remote manifest");return await I.json()}oG();s4();aG();function Aw($){if(!$)return{intro:(U)=>V$(U),outro:(U)=>p(U),note:(U,_)=>k(U,_),logError:(U)=>d.error(U),spinnerStart:(U)=>{let _=u4();return _.start(U),_}};let I={start(U){},stop(U){if(U)console.log(U)},message(U){console.log(U)}};return{intro:(U)=>console.log(U),outro:(U)=>console.log(U),note:(U,_)=>console.log(U),logError:(U)=>console.error(U),spinnerStart:(U)=>{return console.log(U),I}}}async function kH($=!1,I=!1){if(!I&&process.stdout.isTTY)console.clear();let U=Aw(I);U.intro(p$.default.bgMagenta(p$.default.white(" \uD83D\uDEF8 oh-my-agent update ")));let _=process.cwd(),u=v2(_);if(u.length>0)U.note(u.map((v)=>`${p$.default.green("✓")} ${v}`).join(`
414
+ `),"Migration");if(!I)await z2(_);let z=await EH(_);if(z===null){U.note("oh-my-agent is not installed in this project. Running install...","Not initialized");let{install:v}=await Promise.resolve().then(() => (eG(),oT));await v();return}let g;try{g=U.spinnerStart("Checking for updates...");let v=await fH();if(z===v.version){let X=l0(_);if(X.length>0)U.note(X.map((G)=>`${p$.default.green("✓")} ${G}`).join(`
415
+ `),"Shared layout migration");g.stop(p$.default.green("Already up to date!")),U.outro(`Current version: ${p$.default.cyan(z)}`);return}g.message(`Downloading ${p$.default.cyan(v.version)}...`);let{dir:J,cleanup:N}=await J2();try{g.message("Copying files...");let X=d$(_,".agents","config","user-preferences.yaml"),G=d$(_,".agents","mcp.json"),q=!$&&Y1(X)?X9(X):null,T=!$&&Y1(G)?X9(G):null,H=d$(Zw(),`oma-stack-backup-${Date.now()}`),Q=d$(_,".agents","skills","oma-backend","stack"),Y=!$&&Y1(Q);if(Y)Y2(H,{recursive:!0}),H2(Q,d$(H,"oma-backend"),{recursive:!0});let M=["snippets.md","tech-stack.md","api-template.py"],L=d$(_,".agents","skills","oma-backend","resources"),P=!$&&!Y&&M.some((A)=>Y1(d$(L,A)));if(H2(d$(J,".agents"),d$(_,".agents"),{recursive:!0,force:!0}),q)O2(X,q);if(T)O2(G,T);if(Y)try{Y2(Q,{recursive:!0}),H2(d$(H,"oma-backend"),Q,{recursive:!0,force:!0})}finally{xH(H,{recursive:!0,force:!0})}if(P){let A=d$(J,".agents","skills","oma-backend","variants","python");if(Y1(A))Y2(Q,{recursive:!0}),H2(A,Q,{recursive:!0,force:!0}),O2(d$(Q,"stack.yaml"),`language: python
416
416
  framework: fastapi
417
417
  orm: sqlalchemy
418
418
  source: migrated
419
- `)}let O=d$(_,".agents","skills","oma-backend","variants");if(H1(O))CH(O,{recursive:!0,force:!0});let B=n0(_);if(B.length>0)U.note(B.map((A)=>`${p$.default.green("✓")} ${A}`).join(`
420
- `),"Shared layout migration");await wH(_,v.version),s_(J,_,["claude","codex","gemini","qwen"]);let R=process.env.HOME||process.env.USERPROFILE||"",D=!1;try{T1("claude --version",{stdio:"ignore"}),D=!0}catch{}let M=d$(R,".claude","settings.json");if(D)try{let A={};if(H1(M))A=JSON.parse(X9(M,"utf-8"));if((A.env?.cleanupPeriodDays??0)<180||(A.env?.CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS??0)<1e5||(A.env?.CLAUDE_AUTOCOMPACT_PCT_OVERRIDE??0)<80||!A.attribution?.commit||!A.attribution?.pr||A.env?.DISABLE_TELEMETRY!=="1"||A.env?.DISABLE_ERROR_REPORTING!=="1"||A.env?.CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY!=="1"){let b=I;if(!I){let u$=await O$({message:"Apply recommended Claude Code settings?",initialValue:!0});b=!e(u$)&&u$}if(b)T2(d$(R,".claude"),{recursive:!0}),A.env={...A.env||{},cleanupPeriodDays:180,CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS:1e5,CLAUDE_AUTOCOMPACT_PCT_OVERRIDE:80,DISABLE_TELEMETRY:"1",DISABLE_ERROR_REPORTING:"1",CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY:"1"},A.attribution={commit:`Generated with oh-my-agent
419
+ `)}let R=d$(_,".agents","skills","oma-backend","variants");if(Y1(R))xH(R,{recursive:!0,force:!0});let K=l0(_);if(K.length>0)U.note(K.map((A)=>`${p$.default.green("✓")} ${A}`).join(`
420
+ `),"Shared layout migration");await CH(_,v.version),$2(J,_,["claude","codex","gemini","qwen"]);let V=process.env.HOME||process.env.USERPROFILE||"",B=!1;try{H1("claude --version",{stdio:"ignore"}),B=!0}catch{}let O=d$(V,".claude","settings.json");if(B)try{let A={};if(Y1(O))A=JSON.parse(X9(O,"utf-8"));if((A.env?.cleanupPeriodDays??0)<180||(A.env?.CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS??0)<1e5||(A.env?.CLAUDE_AUTOCOMPACT_PCT_OVERRIDE??0)<80||!A.attribution?.commit||!A.attribution?.pr||A.env?.DISABLE_TELEMETRY!=="1"||A.env?.DISABLE_ERROR_REPORTING!=="1"||A.env?.CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY!=="1"){let j=I;if(!I){let u$=await O$({message:"Apply recommended Claude Code settings?",initialValue:!0});j=!e(u$)&&u$}if(j)Y2(d$(V,".claude"),{recursive:!0}),A.env={...A.env||{},cleanupPeriodDays:180,CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS:1e5,CLAUDE_AUTOCOMPACT_PCT_OVERRIDE:80,DISABLE_TELEMETRY:"1",DISABLE_ERROR_REPORTING:"1",CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY:"1"},A.attribution={commit:`Generated with oh-my-agent
421
421
 
422
- Co-Authored-By: First Fluke <our.first.fluke@gmail.com>`,pr:"Generated with [oh-my-agent](https://github.com/first-fluke/oh-my-agent)"},H2(M,`${JSON.stringify(A,null,2)}
423
- `)}}catch{}if(D){let A=!1;try{T1("codex --version",{stdio:"ignore"}),A=!0}catch{}if(A){let f=!1;try{f=T1("claude plugin list",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).includes("codex@openai-codex")}catch{}if(f)try{T1("claude plugin update codex@openai-codex",{stdio:"ignore"})}catch{}else try{T1("claude plugin marketplace add openai/codex-plugin-cc",{stdio:"ignore"}),T1("claude plugin install codex@openai-codex",{stdio:"ignore"})}catch{}}}let F=AT(_);if(z.stop(`Updated to version ${p$.default.cyan(v.version)}!`),F.length>0){let A=ZT(_);if(A.length>0){let{created:f}=$2(_,F,A);if(f.length>0)U.note(f.map((b)=>`${p$.default.green("→")} ${b}`).join(`
424
- `),"Symlinks updated")}}if(U.outro(`${v.metadata?.totalFiles??0} files updated successfully`),!I&&J1()&&r4()&&!N1()){let A=await O$({message:`${p$.default.yellow("⭐")} Star ${p$.default.cyan(R$)} on GitHub? It helps a lot!`});if(!e(A)&&A)try{T1(`gh api -X PUT /user/starred/${R$}`,{stdio:"ignore"}),o.success(`Starred ${p$.default.cyan(R$)}! Thank you! \uD83C\uDF1F`)}catch{o.warn(`Could not star automatically. Try: ${p$.default.dim(`gh api --method PUT /user/starred/${R$}`)}`)}}}finally{N()}}catch(v){if(z?.stop("Update failed"),U.logError(v instanceof Error?v.message:String(v)),I)throw v;process.exit(1)}}u4();var Q$=q$(b$(),1);var xH=30;function iH($){let I=Math.round($/100*xH),U=xH-I,_;if($>60)_=Q$.default.green;else if($>30)_=Q$.default.yellow;else _=Q$.default.red;let u=_("█".repeat(I)),g=Q$.default.dim("░".repeat(U));return`${u}${g}`}function kH($){let I=$.remainingPercent.toFixed(0).padStart(4),U=iH($.remainingPercent),_=$.supportsImages?Q$.default.dim(" img"):"",u=$.label.padEnd(26),g=$.isExhausted?Q$.default.red(`resets ${$.timeUntilReset}`):$.timeUntilReset!=="Ready"?Q$.default.dim(`resets ${$.timeUntilReset}`):"";return` ${u} ${U} ${I}%${_} ${g}`}function yH($,I){let U=iH(I.remainingPercent),_=I.remainingPercent.toFixed(0).padStart(4),u=`${I.available.toLocaleString()} / ${I.monthly.toLocaleString()}`;return[` ${U} ${_}%`,` ${Q$.default.dim(u)}`].join(`
425
- `)}function Ww($){console.clear(),V$(Q$.default.bgCyan(Q$.default.black(" oh-my-agent usage ")));let I=[`${Q$.default.bold("User")} ${$.userName}${$.email?` (${Q$.default.dim($.email)})`:""}`,`${Q$.default.bold("Plan")} ${$.planName}${$.tierName?` ${Q$.default.dim(`(${$.tierName})`)}`:""}`];if($.defaultModel){let U=$.models.find((_)=>_.modelId===$.defaultModel)?.label;if(U)I.push(`${Q$.default.bold("Default")} ${U}`)}if(k(I.join(`
426
- `),"Account"),$.promptCredits||$.flowCredits){let U=[];if($.promptCredits)U.push(Q$.default.bold(" Prompt"),yH("Prompt",$.promptCredits));if($.flowCredits){if(U.length>0)U.push("");U.push(Q$.default.bold(" Flow"),yH("Flow",$.flowCredits))}k(U.join(`
427
- `),"Credits")}if($.models.length===0)k(Q$.default.dim(" No model quota data available"),"Models");else{let U=[...$.models].sort((z,v)=>z.label.localeCompare(v.label)),_=U.filter((z)=>z.isExhausted),u=U.filter((z)=>!z.isExhausted),g=[];if(u.length>0)for(let z of u)g.push(kH(z));if(_.length>0){if(g.length>0)g.push("");g.push(Q$.default.red(" ── Exhausted ──"));for(let z of _)g.push(kH(z))}k(g.join(`
428
- `),`Models (${$.models.length})`)}d(Q$.default.dim(`Updated ${$.timestamp.toLocaleTimeString()}`))}async function nH($=!1,I=!1){if(I){let _=await YT();if(!_)console.error("Failed to connect to Antigravity"),process.exit(1);console.log(JSON.stringify(_,null,2));return}if(!$){let _=I4();_.start("Connecting to Antigravity...");let u=await k0();if(_.stop(u?"Connected":Q$.default.red("Failed to connect to Antigravity")),!u)k([`${Q$.default.yellow("Antigravity IDE must be running locally.")}`,"",Q$.default.dim("Make sure the language_server process is active."),Q$.default.dim("Try opening a project in Antigravity first.")].join(`
429
- `),"Connection Failed"),process.exit(1);Ww(u);return}let U=await k0();if(!U)console.log(JSON.stringify({error:"Failed to connect"})),process.exit(1);console.log(JSON.stringify({userName:U.userName,email:U.email,planName:U.planName,tierName:U.tierName||null,promptCredits:U.promptCredits??null,flowCredits:U.flowCredits??null,defaultModel:U.defaultModel,models:[...U.models].sort((_,u)=>_.label.localeCompare(u.label)).map((_)=>({label:_.label,modelId:_.modelId,remainingPercent:_.remainingPercent,isExhausted:_.isExhausted,supportsImages:_.supportsImages,resetTime:_.resetTime?.toISOString()??null,timeUntilReset:_.timeUntilReset})),timestamp:U.timestamp.toISOString()},null,2))}u4();var i$=q$(b$(),1);import{execSync as Pw}from"node:child_process";import{existsSync as U6,readFileSync as q9}from"node:fs";import{join as w6}from"node:path";var rH=["backend","frontend","mobile","qa","debug","pm"];function l($,I,U){return{name:$,status:I,message:U}}function F$($,I){try{return Pw($,{encoding:"utf-8",cwd:I,stdio:["pipe","pipe","pipe"]}).trim()}catch{return null}}function Zw($,I){let U=w6($,".agents","plan.json");if(!U6(U))return l("Scope Check","skip","No plan.json found");let _;try{_=JSON.parse(q9(U,"utf-8"))}catch{return l("Scope Check","skip","Invalid plan.json")}let u=_.tasks?.filter((N)=>N.agent?.toLowerCase()===I);if(!u||u.length===0)return l("Scope Check","skip","No tasks for this agent");let g=u.flatMap((N)=>N.scope??[]);if(g.length===0)return l("Scope Check","skip","No scope defined in plan");let z=F$("git diff --name-only HEAD 2>/dev/null || git diff --name-only --cached 2>/dev/null",$);if(!z)return l("Scope Check","pass","No files changed");let v=z.split(`
430
- `).filter(Boolean),J=[];for(let N of v)if(!g.some((G)=>N.startsWith(G)))J.push(N);if(J.length>0)return l("Scope Check","fail",`${J.length} out-of-scope: ${J[0]}${J.length>1?` +${J.length-1}`:""}`);return l("Scope Check","pass",`All ${v.length} files in scope`)}function Aw($,I){let U=w6($,".serena","memories",`result-${I}.md`);if(!U6(U))return l("Charter Preflight","skip","Result file not found");let _=q9(U,"utf-8");if(!_.includes("CHARTER_CHECK:"))return l("Charter Preflight","warn","Block missing from result");if(/\{[^}]+\}/.test(_.split("CHARTER_CHECK:")[1]?.split("```")[0]||""))return l("Charter Preflight","warn","Contains unfilled placeholders");return l("Charter Preflight","pass","Properly filled")}function bw($){let I=["*.py","*.ts","*.tsx","*.js","*.dart"],U=`(password|secret|api_key|token)\\s*=\\s*['"][^'"]{8,}`;for(let _ of I){let u=F$(`grep -rn --include="${_}" -E "(password|secret|api_key|token)\\s*=\\s*['"][^'"]{8,}" . 2>/dev/null | grep -v test | grep -v example | grep -v node_modules | head -1`,$);if(u)return l("Hardcoded Secrets","fail",`Found in: ${u.split(":")[0]}`)}return l("Hardcoded Secrets","pass","None detected")}function jw($){let I=F$('grep -rn --include="*.py" --include="*.ts" --include="*.tsx" --include="*.js" --include="*.dart" -E "TODO|FIXME|HACK|XXX" . 2>/dev/null | grep -v node_modules | grep -v ".agents/" | wc -l',$),U=Number.parseInt(I||"0",10);if(U>0)return l("TODO/FIXME Comments","warn",`${U} found`);return l("TODO/FIXME Comments","pass","None found")}function Fw($){if(!F$("which uv",$))return l("Python Syntax","skip","uv not available");let U=F$('find . -name "*.py" -not -path "*/node_modules/*" -not -path "*/.venv/*" -exec uv run python -m py_compile {} \\; 2>&1 | head -5',$);if(U&&U.length>0)return l("Python Syntax","fail","Syntax errors found");return l("Python Syntax","pass","Valid")}function Sw($){if(F$(`grep -rn --include="*.py" -E "f['"].*SELECT|f['"].*INSERT|f['"].*UPDATE|f['"].*DELETE" . 2>/dev/null | grep -v test | grep -v node_modules | head -1`,$))return l("SQL Injection","fail","f-string with SQL keywords detected");return l("SQL Injection","pass","None detected")}function lH($){let I=F$("which uv",$),U=U6(w6($,"pyproject.toml"));if(!I||!U)return l("Python Tests","skip",!I?"uv not available":"pyproject.toml not found");let _=F$("uv run pytest -q --tb=no 2>&1",$);if(_?.includes("passed")||_?.includes("no tests ran"))return l("Python Tests","pass","Tests pass");return l("Python Tests","fail","Tests failing")}function ww($){if(!U6(w6($,"tsconfig.json")))return l("TypeScript","skip","Not configured");let I=F$("npx tsc --noEmit 2>&1",$);if(I===null||I==="")return l("TypeScript","pass","Compilation clean");if(I.includes("error"))return l("TypeScript","fail","Type errors found");return l("TypeScript","pass","Compilation clean")}function Ew($){let I=F$(`grep -rn --include="*.tsx" --include="*.jsx" 'style={{' . 2>/dev/null | grep -v node_modules | wc -l`,$),U=Number.parseInt(I||"0",10);if(U>0)return l("Inline Styles","warn",`${U} found (prefer Tailwind)`);return l("Inline Styles","pass","None found")}function Cw($){let I=F$(`grep -rn --include="*.ts" --include="*.tsx" ': any' . 2>/dev/null | grep -v node_modules | grep -v ".d.ts" | wc -l`,$),U=Number.parseInt(I||"0",10);if(U>3)return l("Any Types","fail",`${U} found (limit: 3)`);if(U>0)return l("Any Types","warn",`${U} found`);return l("Any Types","pass","None found")}function mH($){if(!U6(w6($,"package.json")))return l("Frontend Tests","skip","No package.json");let I=F$("npx vitest run --reporter=verbose 2>&1",$);if(I?.includes("passed")||I?.includes("✓"))return l("Frontend Tests","pass","Tests pass");return l("Frontend Tests","warn","Tests failed or vitest not configured")}function fw($){if(!F$("which flutter",$)){if(!F$("which dart",$))return l("Flutter/Dart Analysis","skip","Not available");if(F$("dart analyze 2>&1",$)?.includes("No issues found"))return l("Dart Analysis","pass","Clean");return l("Dart Analysis","fail","Issues found")}if(F$("flutter analyze 2>&1",$)?.includes("No issues found"))return l("Flutter Analysis","pass","Clean");return l("Flutter Analysis","fail","Issues found")}function xw($){if(!F$("which flutter",$))return l("Flutter Tests","skip","Flutter not available");if(F$("flutter test 2>&1",$)?.includes("All tests passed"))return l("Flutter Tests","pass","All tests pass");return l("Flutter Tests","fail","Tests failed")}function kw($){let I=w6($,".agents","plan.json");if(!U6(I))return l("PM Plan","warn","plan.json not found");try{return JSON.parse(q9(I,"utf-8")),l("PM Plan","pass","Valid JSON")}catch{return l("PM Plan","fail","Invalid JSON")}}function yw($,I){let U=[];switch($){case"backend":U.push(Fw(I)),U.push(Sw(I)),U.push(lH(I));break;case"frontend":U.push(ww(I)),U.push(Ew(I)),U.push(Cw(I)),U.push(mH(I));break;case"mobile":U.push(fw(I)),U.push(xw(I));break;case"qa":U.push(l("QA Report","pass","Verified by self-check.md"));break;case"debug":if(U6(w6(I,"pyproject.toml")))U.push(lH(I));else if(U6(w6(I,"package.json")))U.push(mH(I));else U.push(l("Debug Tests","skip","No test runner detected"));break;case"pm":U.push(kw(I));break}return U}async function hH($,I,U=!1){let _=$.toLowerCase();if(!rH.includes(_)){let q=`Invalid agent type: ${$}. Valid types: ${rH.join(", ")}`;if(U)console.log(JSON.stringify({ok:!1,error:q}));else o.error(q);process.exit(2)}let u=I||process.cwd();if(!U6(u)){let q=`Workspace not found: ${u}`;if(U)console.log(JSON.stringify({ok:!1,error:q}));else o.error(q);process.exit(2)}let g=[];g.push(Zw(u,_)),g.push(Aw(u,_)),g.push(bw(u)),g.push(jw(u)),g.push(...yw(_,u));let z=g.filter((q)=>q.status==="pass").length,v=g.filter((q)=>q.status==="fail").length,J=g.filter((q)=>q.status==="warn").length,N={ok:v===0,agent:_,workspace:u,checks:g,summary:{passed:z,failed:v,warned:J}};if(U)console.log(JSON.stringify(N,null,2)),process.exit(v>0?1:0);console.clear(),V$(i$.default.bgCyan(i$.default.white(` \uD83D\uDD0D Verify: ${_} agent `))),k(i$.default.dim(u),"Workspace");let X=["┌────────────────────────────┬────────┬─────────────────────────────┐",`│ ${i$.default.bold("Check")} │ ${i$.default.bold("Status")} │ ${i$.default.bold("Details")} │`,"├────────────────────────────┼────────┼─────────────────────────────┤",...g.map((q)=>{let T;switch(q.status){case"pass":T=i$.default.green("PASS");break;case"fail":T=i$.default.red("FAIL");break;case"warn":T=i$.default.yellow("WARN");break;default:T=i$.default.dim("SKIP")}let H=q.name.padEnd(26),Q=T.padEnd(6),Y=(q.message||"-").slice(0,27).padEnd(27);return`│ ${H} │ ${Q} │ ${Y} │`}),"└────────────────────────────┴────────┴─────────────────────────────┘"].join(`
431
- `);console.log(X),console.log();let G=`${i$.default.green(`${z} passed`)}, ${i$.default.red(`${v} failed`)}, ${i$.default.yellow(`${J} warnings`)}`;if(v>0)d(i$.default.red(`❌ Verification failed: ${G}`)),process.exit(1);d(i$.default.green(`✅ Verification passed: ${G}`)),process.exit(0)}s4();var T$=q$(b$(),1);import{existsSync as iw,readdirSync as cH,readFileSync as nw}from"node:fs";import{join as Z4}from"node:path";var dH=Object.fromEntries(Object.entries(O4).map(([$,I])=>[$,I.map((U)=>U.name)])),rw={"backend-engineer":"oma-backend","frontend-engineer":"oma-frontend","db-engineer":"oma-db","mobile-engineer":"oma-mobile","pm-planner":"oma-pm","qa-reviewer":"oma-qa","debug-investigator":"oma-debug"};function Q9($){let I=new Set;for(let U of $.matchAll(/_shared\/((?:[a-z][a-z0-9_-]*\/)*[a-z][a-z0-9_-]*)(?:\.md)?(?=[`)\s/}]|$)/gi))if(U[1])I.add(U[1]);return[...I]}function Y2($){try{return nw($,"utf-8")}catch{return""}}function T9($){try{return cH($).filter((I)=>!I.startsWith("."))}catch{return[]}}function lw($){try{return cH($,{withFileTypes:!0}).filter((I)=>!I.name.startsWith("."))}catch{return[]}}function pH($,I=""){let U=[];for(let _ of lw($)){let u=I?`${I}/${_.name}`:_.name;if(_.isDirectory()){U.push({path:u,isDirectory:!0}),U.push(...pH(Z4($,_.name),u));continue}if(!_.name.endsWith(".md"))continue;U.push({path:u.replace(/\.md$/,""),isDirectory:!1})}return U}function oH($){let I=[{id:"root",label:"oh-my-agent",category:"root"}],U=new Set,_=[];function u(G,q,T){let H=`${G}|${q}`;if(U.has(H))return;U.add(H),_.push({from:G,to:q,type:T})}let g=Z4($,".agents","skills");for(let[G,q]of Object.entries(dH))for(let T of q){let H=Z4(g,T);if(!iw(H))continue;let Q=`skill:${T}`;I.push({id:Q,label:T,category:"skill",group:"Skills",subgroup:G});let Y=[Y2(Z4(H,"SKILL.md")),Y2(Z4(H,"resources","execution-protocol.md"))].join(`
432
- `);for(let K of Q9(Y))u(Q,`shared:${K}`,"references")}let z=Z4($,".agents","workflows");for(let G of T9(z).filter((q)=>q.endsWith(".md"))){let q=G.replace(".md",""),T=`workflow:${q}`;I.push({id:T,label:q,category:"workflow",group:"Workflows"});for(let H of Q9(Y2(Z4(z,G))))u(T,`shared:${H}`,"references")}let v=Z4(g,"_shared");for(let G of pH(v)){let q=`shared:${G.path}`;if(I.push({id:q,label:G.path,category:"shared",group:"Shared"}),!G.isDirectory){for(let T of Q9(Y2(Z4(v,`${G.path}.md`))))if(T!==G.path)u(q,`shared:${T}`,"references")}}let J=Z4($,".claude","agents");for(let G of T9(J).filter((q)=>q.endsWith(".md"))){let q=G.replace(".md",""),T=`agent:${q}`;I.push({id:T,label:q,category:"agent",group:"Claude Agents"});let H=rw[q];if(H)u(T,`skill:${H}`,"implements")}let N=Z4($,".serena","memories");for(let G of T9(N).filter((q)=>q.endsWith(".md")))I.push({id:`memory:${G.replace(".md","")}`,label:G.replace(".md",""),category:"memory",group:"Serena Memories"});let X=new Set(I.map((G)=>G.id));return{nodes:I,edges:_.filter((G)=>X.has(G.from)&&X.has(G.to))}}var mw={root:($)=>T$.default.bold(T$.default.white($)),skill:T$.default.green,workflow:T$.default.blue,shared:T$.default.yellow,agent:T$.default.magenta,memory:T$.default.cyan};function N4($,I){return(mw[I]??T$.default.white)($)}function l4(...$){let I=$.sort((u,g)=>u[0]-g[0]),U="",_=0;for(let[u,g,z]of I){if(u>_)U+=" ".repeat(u-_);U+=g,_=u+z}return U}function hw($){let I=[],U=$.nodes.filter((b)=>b.category==="skill").length,_=$.nodes.filter((b)=>b.category==="workflow").length,u=$.nodes.filter((b)=>b.category==="shared").length,g=$.nodes.filter((b)=>b.category==="agent").length,z=$.nodes.filter((b)=>b.category==="memory").length,v=$.edges.filter((b)=>b.from.startsWith("skill:")&&b.to.startsWith("shared:")).length,J=$.edges.filter((b)=>b.from.startsWith("workflow:")&&b.to.startsWith("shared:")).length,N=$.edges.filter((b)=>b.type==="implements").length,X=$.edges.filter((b)=>b.from.startsWith("shared:")&&b.to.startsWith("shared:")).length,G=`Skills (${U})`,q=`Workflows (${_})`,T=`Shared (${u})`,H=`Agents (${g})`,Q=`Memories (${z})`,Y=10,K=29,L=48,P=19;I.push(l4([24,N4("oh-my-agent","root"),11])),I.push(l4([29,"│",1]));let O=Array(49).fill(" ");O[10]="┌",O[29]="┼",O[48]="┐";for(let b=11;b<48;b++)if(b!==29)O[b]="─";I.push(O.join("")),I.push(l4([10,"▼",1],[29,"▼",1],[48,"▼",1])),I.push(l4([10-(G.length>>1),N4(G,"skill"),G.length],[29-(q.length>>1),N4(q,"workflow"),q.length],[48-(Q.length>>1),N4(Q,"memory"),Q.length])),I.push(l4([10,"│",1],[29,"│",1]));let B=`${v} refs`,R=`${J} refs`;I.push(l4([10-(B.length>>1),T$.default.dim(B),B.length],[29-(R.length>>1),T$.default.dim(R),R.length])),I.push(l4([10,"│",1],[29,"│",1]));let D=Array(30).fill(" ");D[10]="└",D[19]="┬",D[29]="┘";for(let b=11;b<29;b++)if(b!==19)D[b]="─";I.push(D.join("")),I.push(l4([19,"▼",1]));let M=19-(T.length>>1),F=l4([M,N4(T,"shared"),T.length]);if(X>0)F+=` ${T$.default.dim(`◂── ${X} internal`)}`;I.push(F),I.push("");let A=10-(H.length>>1),f=`──[${N} implements]──▸`;return I.push(l4([A,N4(H,"agent"),H.length])+` ${T$.default.dim(f)} ${N4("Skills","skill")}`),I}function tH($){let I=[];I.push(...hw($)),I.push(""),I.push(T$.default.dim("─".repeat(56))),I.push("");let U=new Map,_=new Map;for(let G of $.edges){if(!U.has(G.from))U.set(G.from,[]);if(U.get(G.from)?.push(G),G.to.startsWith("shared:"))_.set(G.to,(_.get(G.to)??0)+1)}function u(G){let q=U.get(G);if(!q?.length)return"";let T=q.map((Q)=>$.nodes.find((Y)=>Y.id===Q.to)?.label.replace(/\.md$/,"")??Q.to.split(":")[1]),H=T.length>4?`${T.slice(0,3).join(", ")} +${T.length-3}`:T.join(", ");return` ${T$.default.dim("──▸")} ${T$.default.dim(H)}`}let g=$.nodes.filter((G)=>G.category==="skill"),z=Object.keys(dH);I.push(T$.default.bold(`Skills (${g.length})`));for(let G=0;G<z.length;G++){let q=z[G],T=g.filter((Y)=>Y.subgroup===q);if(!T.length)continue;let H=G===z.length-1;I.push(`${H?"└─":"├─"} ${T$.default.dim(q)}`);let Q=H?" ":"│ ";for(let Y of T){let K=Y===T.at(-1)?"└─":"├─";I.push(`${Q}${K} ${N4(Y.label,"skill")}${u(Y.id)}`)}}I.push("");let v=$.nodes.filter((G)=>G.category==="workflow");I.push(T$.default.bold(`Workflows (${v.length})`));for(let G of v){let q=G===v.at(-1)?"└─":"├─";I.push(`${q} ${N4(G.label,"workflow")}${u(G.id)}`)}I.push("");let J=[...$.nodes.filter((G)=>G.category==="shared")].sort((G,q)=>(_.get(q.id)??0)-(_.get(G.id)??0));I.push(T$.default.bold(`Shared (${J.length})`));for(let G of J){let q=G===J.at(-1)?"└─":"├─",T=_.get(G.id)??0,H=T>0?T$.default.dim(` (${T} refs)`):"";I.push(`${q} ${N4(G.label,"shared")}${H}${u(G.id)}`)}I.push("");let N=$.nodes.filter((G)=>G.category==="agent");I.push(T$.default.bold(`Claude Agents (${N.length})`));for(let G of N){let q=G===N.at(-1)?"└─":"├─",T=$.edges.find((Q)=>Q.from===G.id&&Q.type==="implements"),H=T?` ${T$.default.dim("──▸")} ${N4(T.to.split(":")[1]??"","skill")}`:"";I.push(`${q} ${N4(G.label,"agent")}${H}`)}I.push("");let X=$.nodes.filter((G)=>G.category==="memory");if(I.push(T$.default.bold(`Serena Memories (${X.length})`)),!X.length)I.push(`└─ ${T$.default.dim("(none)")}`);else for(let G of X){let q=G===X.at(-1)?"└─":"├─";I.push(`${q} ${N4(G.label,"memory")}`)}return I.join(`
433
- `)}async function aH($){let I=oH(process.cwd());if($.json){console.log(JSON.stringify(I,null,2));return}console.log(tH(I))}import{existsSync as zf,mkdirSync as vf,readdirSync as s0,readFileSync as Jf,statSync as l9}from"node:fs";import{createServer as Nf}from"node:http";import{basename as RO,join as j4}from"node:path";import{EventEmitter as ME}from"node:events";import{stat as KE,Stats as qm}from"node:fs";import{readdir as LE,stat as RE}from"node:fs/promises";import*as a from"node:path";import{lstat as eH,readdir as cw,realpath as dw,stat as pw}from"node:fs/promises";import{join as ow,relative as tw,resolve as sH,sep as aw}from"node:path";import{Readable as ew}from"node:stream";var G4={FILE_TYPE:"files",DIR_TYPE:"directories",FILE_DIR_TYPE:"files_directories",EVERYTHING_TYPE:"all"},H9={root:".",fileFilter:($)=>!0,directoryFilter:($)=>!0,type:G4.FILE_TYPE,lstat:!1,depth:2147483648,alwaysStat:!1,highWaterMark:4096};Object.freeze(H9);var UY="READDIRP_RECURSIVE_ERROR",sw=new Set(["ENOENT","EPERM","EACCES","ELOOP",UY]),$Y=[G4.DIR_TYPE,G4.EVERYTHING_TYPE,G4.FILE_DIR_TYPE,G4.FILE_TYPE],$E=new Set([G4.DIR_TYPE,G4.EVERYTHING_TYPE,G4.FILE_DIR_TYPE]),IE=new Set([G4.EVERYTHING_TYPE,G4.FILE_DIR_TYPE,G4.FILE_TYPE]),uE=($)=>sw.has($.code),UE=process.platform==="win32",IY=($)=>!0,uY=($)=>{if($===void 0)return IY;if(typeof $==="function")return $;if(typeof $==="string"){let I=$.trim();return(U)=>U.basename===I}if(Array.isArray($)){let I=$.map((U)=>U.trim());return(U)=>I.some((_)=>U.basename===_)}return IY};class Y9 extends ew{parents;reading;parent;_stat;_maxDepth;_wantsDir;_wantsFile;_wantsEverything;_root;_isDirent;_statsProp;_rdOptions;_fileFilter;_directoryFilter;constructor($={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:$.highWaterMark});let I={...H9,...$},{root:U,type:_}=I;this._fileFilter=uY(I.fileFilter),this._directoryFilter=uY(I.directoryFilter);let u=I.lstat?eH:pw;if(UE)this._stat=(g)=>u(g,{bigint:!0});else this._stat=u;this._maxDepth=I.depth!=null&&Number.isSafeInteger(I.depth)?I.depth:H9.depth,this._wantsDir=_?$E.has(_):!1,this._wantsFile=_?IE.has(_):!1,this._wantsEverything=_===G4.EVERYTHING_TYPE,this._root=sH(U),this._isDirent=!I.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(U,1)],this.reading=!1,this.parent=void 0}async _read($){if(this.reading)return;this.reading=!0;try{while(!this.destroyed&&$>0){let I=this.parent,U=I&&I.files;if(U&&U.length>0){let{path:_,depth:u}=I,g=U.splice(0,$).map((v)=>this._formatEntry(v,_)),z=await Promise.all(g);for(let v of z){if(!v)continue;if(this.destroyed)return;let J=await this._getEntryType(v);if(J==="directory"&&this._directoryFilter(v)){if(u<=this._maxDepth)this.parents.push(this._exploreDir(v.fullPath,u+1));if(this._wantsDir)this.push(v),$--}else if((J==="file"||this._includeAsFile(v))&&this._fileFilter(v)){if(this._wantsFile)this.push(v),$--}}}else{let _=this.parents.pop();if(!_){this.push(null);break}if(this.parent=await _,this.destroyed)return}}}catch(I){this.destroy(I)}finally{this.reading=!1}}async _exploreDir($,I){let U;try{U=await cw($,this._rdOptions)}catch(_){this._onError(_)}return{files:U,depth:I,path:$}}async _formatEntry($,I){let U,_=this._isDirent?$.name:$;try{let u=sH(ow(I,_));U={path:tw(this._root,u),fullPath:u,basename:_},U[this._statsProp]=this._isDirent?$:await this._stat(u)}catch(u){this._onError(u);return}return U}_onError($){if(uE($)&&!this.destroyed)this.emit("warn",$);else this.destroy($)}async _getEntryType($){if(!$&&this._statsProp in $)return"";let I=$[this._statsProp];if(I.isFile())return"file";if(I.isDirectory())return"directory";if(I&&I.isSymbolicLink()){let U=$.fullPath;try{let _=await dw(U),u=await eH(_);if(u.isFile())return"file";if(u.isDirectory()){let g=_.length;if(U.startsWith(_)&&U.substr(g,1)===aw){let z=Error(`Circular symlink detected: "${U}" points to "${_}"`);return z.code=UY,this._onError(z)}return"directory"}}catch(_){return this._onError(_),""}}}_includeAsFile($){let I=$&&$[this._statsProp];return I&&this._wantsEverything&&!I.isDirectory()}}function _Y($,I={}){let U=I.entryType||I.type;if(U==="both")U=G4.FILE_DIR_TYPE;if(U)I.type=U;if(!$)throw Error("readdirp: root argument is required. Usage: readdirp(root, options)");else if(typeof $!=="string")throw TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");else if(U&&!$Y.includes(U))throw Error(`readdirp: Invalid type passed. Use one of ${$Y.join(", ")}`);return I.root=$,new Y9(I)}import{watch as _E,unwatchFile as gY,watchFile as gE}from"node:fs";import{realpath as O9,lstat as zE,open as vE,stat as vY}from"node:fs/promises";import{type as JE}from"node:os";import*as B$ from"node:path";var NE="data",D9="end",JY="close",D2=()=>{};var M2=process.platform,M9=M2==="win32",GE=M2==="darwin",XE=M2==="linux",qE=M2==="freebsd",NY=JE()==="OS400",H$={ALL:"all",READY:"ready",ADD:"add",CHANGE:"change",ADD_DIR:"addDir",UNLINK:"unlink",UNLINK_DIR:"unlinkDir",RAW:"raw",ERROR:"error"},A4=H$,QE="watch",TE={lstat:zE,stat:vY},Y1="listeners",O2="errHandlers",YI="rawEmitters",HE=[Y1,O2,YI],YE=new Set(["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),OE=($)=>YE.has(B$.extname($).slice(1).toLowerCase()),B9=($,I)=>{if($ instanceof Set)$.forEach(I);else I($)},l0=($,I,U)=>{let _=$[I];if(!(_ instanceof Set))$[I]=_=new Set([_]);_.add(U)},VE=($)=>(I)=>{let U=$[I];if(U instanceof Set)U.clear();else delete $[I]},m0=($,I,U)=>{let _=$[I];if(_ instanceof Set)_.delete(U);else if(_===U)delete $[I]},GY=($)=>$ instanceof Set?$.size===0:!$,V2=new Map;function zY($,I,U,_,u){let g=(z,v)=>{if(U($),u(z,v,{watchedPath:$}),v&&$!==v)B2(B$.resolve($,v),Y1,B$.join($,v))};try{return _E($,{persistent:I.persistent},g)}catch(z){_(z);return}}var B2=($,I,U,_,u)=>{let g=V2.get($);if(!g)return;B9(g[I],(z)=>{z(U,_,u)})},BE=($,I,U,_)=>{let{listener:u,errHandler:g,rawEmitter:z}=_,v=V2.get(I),J;if(!U.persistent){if(J=zY($,U,u,g,z),!J)return;return J.close.bind(J)}if(v)l0(v,Y1,u),l0(v,O2,g),l0(v,YI,z);else{if(J=zY($,U,B2.bind(null,I,Y1),g,B2.bind(null,I,YI)),!J)return;J.on(A4.ERROR,async(N)=>{let X=B2.bind(null,I,O2);if(v)v.watcherUnusable=!0;if(M9&&N.code==="EPERM")try{await(await vE($,"r")).close(),X(N)}catch(G){}else X(N)}),v={listeners:u,errHandlers:g,rawEmitters:z,watcher:J},V2.set(I,v)}return()=>{if(m0(v,Y1,u),m0(v,O2,g),m0(v,YI,z),GY(v.listeners))v.watcher.close(),V2.delete(I),HE.forEach(VE(v)),v.watcher=void 0,Object.freeze(v)}},V9=new Map,DE=($,I,U,_)=>{let{listener:u,rawEmitter:g}=_,z=V9.get(I),v=z&&z.options;if(v&&(v.persistent<U.persistent||v.interval>U.interval))gY(I),z=void 0;if(z)l0(z,Y1,u),l0(z,YI,g);else z={listeners:u,rawEmitters:g,options:U,watcher:gE(I,U,(J,N)=>{B9(z.rawEmitters,(G)=>{G(A4.CHANGE,I,{curr:J,prev:N})});let X=J.mtimeMs;if(J.size!==N.size||X>N.mtimeMs||X===0)B9(z.listeners,(G)=>G($,J))})},V9.set(I,z);return()=>{if(m0(z,Y1,u),m0(z,YI,g),GY(z.listeners))V9.delete(I),gY(I),z.options=z.watcher=void 0,Object.freeze(z)}};class K9{fsw;_boundHandleError;constructor($){this.fsw=$,this._boundHandleError=(I)=>$._handleError(I)}_watchWithNodeFs($,I){let U=this.fsw.options,_=B$.dirname($),u=B$.basename($);this.fsw._getWatchedDir(_).add(u);let z=B$.resolve($),v={persistent:U.persistent};if(!I)I=D2;let J;if(U.usePolling){let N=U.interval!==U.binaryInterval;v.interval=N&&OE(u)?U.binaryInterval:U.interval,J=DE($,z,v,{listener:I,rawEmitter:this.fsw._emitRaw})}else J=BE($,z,v,{listener:I,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw});return J}_handleFile($,I,U){if(this.fsw.closed)return;let _=B$.dirname($),u=B$.basename($),g=this.fsw._getWatchedDir(_),z=I;if(g.has(u))return;let v=async(N,X)=>{if(!this.fsw._throttle(QE,$,5))return;if(!X||X.mtimeMs===0)try{let G=await vY($);if(this.fsw.closed)return;let{atimeMs:q,mtimeMs:T}=G;if(!q||q<=T||T!==z.mtimeMs)this.fsw._emit(A4.CHANGE,$,G);if((GE||XE||qE)&&z.ino!==G.ino){this.fsw._closeFile(N),z=G;let H=this._watchWithNodeFs($,v);if(H)this.fsw._addPathCloser(N,H)}else z=G}catch(G){this.fsw._remove(_,u)}else if(g.has(u)){let{atimeMs:G,mtimeMs:q}=X;if(!G||G<=q||q!==z.mtimeMs)this.fsw._emit(A4.CHANGE,$,X);z=X}},J=this._watchWithNodeFs($,v);if(!(U&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored($)){if(!this.fsw._throttle(A4.ADD,$,0))return;this.fsw._emit(A4.ADD,$,I)}return J}async _handleSymlink($,I,U,_){if(this.fsw.closed)return;let u=$.fullPath,g=this.fsw._getWatchedDir(I);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let z;try{z=await O9(U)}catch(v){return this.fsw._emitReady(),!0}if(this.fsw.closed)return;if(g.has(_)){if(this.fsw._symlinkPaths.get(u)!==z)this.fsw._symlinkPaths.set(u,z),this.fsw._emit(A4.CHANGE,U,$.stats)}else g.add(_),this.fsw._symlinkPaths.set(u,z),this.fsw._emit(A4.ADD,U,$.stats);return this.fsw._emitReady(),!0}if(this.fsw._symlinkPaths.has(u))return!0;this.fsw._symlinkPaths.set(u,!0)}_handleRead($,I,U,_,u,g,z){$=B$.join($,"");let v=_?`${$}:${_}`:$;if(z=this.fsw._throttle("readdir",v,1000),!z)return;let J=this.fsw._getWatchedDir(U.path),N=new Set,X=this.fsw._readdirp($,{fileFilter:(G)=>U.filterPath(G),directoryFilter:(G)=>U.filterDir(G)});if(!X)return;return X.on(NE,async(G)=>{if(this.fsw.closed){X=void 0;return}let q=G.path,T=B$.join($,q);if(N.add(q),G.stats.isSymbolicLink()&&await this._handleSymlink(G,$,T,q))return;if(this.fsw.closed){X=void 0;return}if(q===_||!_&&!J.has(q))this.fsw._incrReadyCount(),T=B$.join(u,B$.relative(u,T)),this._addToNodeFs(T,I,U,g+1)}).on(A4.ERROR,this._boundHandleError),new Promise((G,q)=>{if(!X)return q();X.once(D9,()=>{if(this.fsw.closed){X=void 0;return}let T=z?z.clear():!1;if(G(void 0),J.getChildren().filter((H)=>{return H!==$&&!N.has(H)}).forEach((H)=>{this.fsw._remove($,H)}),X=void 0,T)this._handleRead($,!1,U,_,u,g,z)})})}async _handleDir($,I,U,_,u,g,z){let v=this.fsw._getWatchedDir(B$.dirname($)),J=v.has(B$.basename($));if(!(U&&this.fsw.options.ignoreInitial)&&!u&&!J)this.fsw._emit(A4.ADD_DIR,$,I);v.add(B$.basename($)),this.fsw._getWatchedDir($);let N,X,G=this.fsw.options.depth;if((G==null||_<=G)&&!this.fsw._symlinkPaths.has(z)){if(!u){if(await this._handleRead($,U,g,u,$,_,N),this.fsw.closed)return}X=this._watchWithNodeFs($,(q,T)=>{if(T&&T.mtimeMs===0)return;this._handleRead(q,!1,g,u,$,_,N)})}return X}async _addToNodeFs($,I,U,_,u){let g=this.fsw._emitReady;if(this.fsw._isIgnored($)||this.fsw.closed)return g(),!1;let z=this.fsw._getWatchHelpers($);if(U)z.filterPath=(v)=>U.filterPath(v),z.filterDir=(v)=>U.filterDir(v);try{let v=await TE[z.statMethod](z.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(z.watchPath,v))return g(),!1;let J=this.fsw.options.followSymlinks,N;if(v.isDirectory()){let X=B$.resolve($),G=J?await O9($):$;if(this.fsw.closed)return;if(N=await this._handleDir(z.watchPath,v,I,_,u,z,G),this.fsw.closed)return;if(X!==G&&G!==void 0)this.fsw._symlinkPaths.set(X,G)}else if(v.isSymbolicLink()){let X=J?await O9($):$;if(this.fsw.closed)return;let G=B$.dirname(z.watchPath);if(this.fsw._getWatchedDir(G).add(z.watchPath),this.fsw._emit(A4.ADD,z.watchPath,v),N=await this._handleDir(G,v,I,_,$,z,X),this.fsw.closed)return;if(X!==void 0)this.fsw._symlinkPaths.set(B$.resolve($),X)}else N=this._handleFile(z.watchPath,v,I);if(g(),N)this.fsw._addPathCloser($,N);return!1}catch(v){if(this.fsw._handleError(v))return g(),$}}}/*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */var L9="/",WE="//",HY=".",PE="..",ZE="string",AE=/\\/g,YY=/\/\//g,bE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,jE=/^\.[/\\]/;function K2($){return Array.isArray($)?$:[$]}var R9=($)=>typeof $==="object"&&$!==null&&!($ instanceof RegExp);function FE($){if(typeof $==="function")return $;if(typeof $==="string")return(I)=>$===I;if($ instanceof RegExp)return(I)=>$.test(I);if(typeof $==="object"&&$!==null)return(I)=>{if($.path===I)return!0;if($.recursive){let U=a.relative($.path,I);if(!U)return!1;return!U.startsWith("..")&&!a.isAbsolute(U)}return!1};return()=>!1}function SE($){if(typeof $!=="string")throw Error("string expected");$=a.normalize($),$=$.replace(/\\/g,"/");let I=!1;if($.startsWith("//"))I=!0;if($=$.replace(YY,"/"),I)$="/"+$;return $}function XY($,I,U){let _=SE(I);for(let u=0;u<$.length;u++){let g=$[u];if(g(_,U))return!0}return!1}function wE($,I){if($==null)throw TypeError("anymatch: specify first argument");let _=K2($).map((u)=>FE(u));if(I==null)return(u,g)=>{return XY(_,u,g)};return XY(_,I)}var qY=($)=>{let I=K2($).flat();if(!I.every((U)=>typeof U===ZE))throw TypeError(`Non-string provided as watch path: ${I}`);return I.map(OY)},QY=($)=>{let I=$.replace(AE,L9),U=!1;if(I.startsWith(WE))U=!0;if(I=I.replace(YY,L9),U)I=L9+I;return I},OY=($)=>QY(a.normalize(QY($))),TY=($="")=>(I)=>{if(typeof I==="string")return OY(a.isAbsolute(I)?I:a.join($,I));else return I},EE=($,I)=>{if(a.isAbsolute($))return $;return a.join(I,$)},CE=Object.freeze(new Set);class VY{path;_removeWatcher;items;constructor($,I){this.path=$,this._removeWatcher=I,this.items=new Set}add($){let{items:I}=this;if(!I)return;if($!==HY&&$!==PE)I.add($)}async remove($){let{items:I}=this;if(!I)return;if(I.delete($),I.size>0)return;let U=this.path;try{await LE(U)}catch(_){if(this._removeWatcher)this._removeWatcher(a.dirname(U),a.basename(U))}}has($){let{items:I}=this;if(!I)return;return I.has($)}getChildren(){let{items:$}=this;if(!$)return[];return[...$.values()]}dispose(){this.items.clear(),this.path="",this._removeWatcher=D2,this.items=CE,Object.freeze(this)}}var fE="stat",xE="lstat";class BY{fsw;path;watchPath;fullWatchPath;dirParts;followSymlinks;statMethod;constructor($,I,U){this.fsw=U;let _=$;this.path=$=$.replace(jE,""),this.watchPath=_,this.fullWatchPath=a.resolve(_),this.dirParts=[],this.dirParts.forEach((u)=>{if(u.length>1)u.pop()}),this.followSymlinks=I,this.statMethod=I?fE:xE}entryPath($){return a.join(this.watchPath,a.relative(this.watchPath,$.fullPath))}filterPath($){let{stats:I}=$;if(I&&I.isSymbolicLink())return this.filterDir($);let U=this.entryPath($);return this.fsw._isntIgnored(U,I)&&this.fsw._hasReadPermissions(I)}filterDir($){return this.fsw._isntIgnored(this.entryPath($),$.stats)}}class DY extends ME{closed;options;_closers;_ignoredPaths;_throttled;_streams;_symlinkPaths;_watched;_pendingWrites;_pendingUnlinks;_readyCount;_emitReady;_closePromise;_userIgnored;_readyEmitted;_emitRaw;_boundRemove;_nodeFsHandler;constructor($={}){super();this.closed=!1,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._streams=new Set,this._symlinkPaths=new Map,this._watched=new Map,this._pendingWrites=new Map,this._pendingUnlinks=new Map,this._readyCount=0,this._readyEmitted=!1;let I=$.awaitWriteFinish,U={stabilityThreshold:2000,pollInterval:100},_={persistent:!0,ignoreInitial:!1,ignorePermissionErrors:!1,interval:100,binaryInterval:300,followSymlinks:!0,usePolling:!1,atomic:!0,...$,ignored:$.ignored?K2($.ignored):K2([]),awaitWriteFinish:I===!0?U:typeof I==="object"?{...U,...I}:!1};if(NY)_.usePolling=!0;if(_.atomic===void 0)_.atomic=!_.usePolling;let u=process.env.CHOKIDAR_USEPOLLING;if(u!==void 0){let v=u.toLowerCase();if(v==="false"||v==="0")_.usePolling=!1;else if(v==="true"||v==="1")_.usePolling=!0;else _.usePolling=!!v}let g=process.env.CHOKIDAR_INTERVAL;if(g)_.interval=Number.parseInt(g,10);let z=0;this._emitReady=()=>{if(z++,z>=this._readyCount)this._emitReady=D2,this._readyEmitted=!0,process.nextTick(()=>this.emit(H$.READY))},this._emitRaw=(...v)=>this.emit(H$.RAW,...v),this._boundRemove=this._remove.bind(this),this.options=_,this._nodeFsHandler=new K9(this),Object.freeze(_)}_addIgnoredPath($){if(R9($)){for(let I of this._ignoredPaths)if(R9(I)&&I.path===$.path&&I.recursive===$.recursive)return}this._ignoredPaths.add($)}_removeIgnoredPath($){if(this._ignoredPaths.delete($),typeof $==="string"){for(let I of this._ignoredPaths)if(R9(I)&&I.path===$)this._ignoredPaths.delete(I)}}add($,I,U){let{cwd:_}=this.options;this.closed=!1,this._closePromise=void 0;let u=qY($);if(_)u=u.map((g)=>{return EE(g,_)});if(u.forEach((g)=>{this._removeIgnoredPath(g)}),this._userIgnored=void 0,!this._readyCount)this._readyCount=0;return this._readyCount+=u.length,Promise.all(u.map(async(g)=>{let z=await this._nodeFsHandler._addToNodeFs(g,!U,void 0,0,I);if(z)this._emitReady();return z})).then((g)=>{if(this.closed)return;g.forEach((z)=>{if(z)this.add(a.dirname(z),a.basename(I||z))})}),this}unwatch($){if(this.closed)return this;let I=qY($),{cwd:U}=this.options;return I.forEach((_)=>{if(!a.isAbsolute(_)&&!this._closers.has(_)){if(U)_=a.join(U,_);_=a.resolve(_)}if(this._closePath(_),this._addIgnoredPath(_),this._watched.has(_))this._addIgnoredPath({path:_,recursive:!0});this._userIgnored=void 0}),this}close(){if(this._closePromise)return this._closePromise;this.closed=!0,this.removeAllListeners();let $=[];return this._closers.forEach((I)=>I.forEach((U)=>{let _=U();if(_ instanceof Promise)$.push(_)})),this._streams.forEach((I)=>I.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach((I)=>I.dispose()),this._closers.clear(),this._watched.clear(),this._streams.clear(),this._symlinkPaths.clear(),this._throttled.clear(),this._closePromise=$.length?Promise.all($).then(()=>{return}):Promise.resolve(),this._closePromise}getWatched(){let $={};return this._watched.forEach((I,U)=>{let u=(this.options.cwd?a.relative(this.options.cwd,U):U)||HY;$[u]=I.getChildren().sort()}),$}emitWithAll($,I){if(this.emit($,...I),$!==H$.ERROR)this.emit(H$.ALL,$,...I)}async _emit($,I,U){if(this.closed)return;let _=this.options;if(M9)I=a.normalize(I);if(_.cwd)I=a.relative(_.cwd,I);let u=[I];if(U!=null)u.push(U);let g=_.awaitWriteFinish,z;if(g&&(z=this._pendingWrites.get(I)))return z.lastChange=new Date,this;if(_.atomic){if($===H$.UNLINK)return this._pendingUnlinks.set(I,[$,...u]),setTimeout(()=>{this._pendingUnlinks.forEach((v,J)=>{this.emit(...v),this.emit(H$.ALL,...v),this._pendingUnlinks.delete(J)})},typeof _.atomic==="number"?_.atomic:100),this;if($===H$.ADD&&this._pendingUnlinks.has(I))$=H$.CHANGE,this._pendingUnlinks.delete(I)}if(g&&($===H$.ADD||$===H$.CHANGE)&&this._readyEmitted){let v=(J,N)=>{if(J)$=H$.ERROR,u[0]=J,this.emitWithAll($,u);else if(N){if(u.length>1)u[1]=N;else u.push(N);this.emitWithAll($,u)}};return this._awaitWriteFinish(I,g.stabilityThreshold,$,v),this}if($===H$.CHANGE){if(!this._throttle(H$.CHANGE,I,50))return this}if(_.alwaysStat&&U===void 0&&($===H$.ADD||$===H$.ADD_DIR||$===H$.CHANGE)){let v=_.cwd?a.join(_.cwd,I):I,J;try{J=await RE(v)}catch(N){}if(!J||this.closed)return;u.push(J)}return this.emitWithAll($,u),this}_handleError($){let I=$&&$.code;if($&&I!=="ENOENT"&&I!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||I!=="EPERM"&&I!=="EACCES"))this.emit(H$.ERROR,$);return $||this.closed}_throttle($,I,U){if(!this._throttled.has($))this._throttled.set($,new Map);let _=this._throttled.get($);if(!_)throw Error("invalid throttle");let u=_.get(I);if(u)return u.count++,!1;let g,z=()=>{let J=_.get(I),N=J?J.count:0;if(_.delete(I),clearTimeout(g),J)clearTimeout(J.timeoutObject);return N};g=setTimeout(z,U);let v={timeoutObject:g,clear:z,count:0};return _.set(I,v),v}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish($,I,U,_){let u=this.options.awaitWriteFinish;if(typeof u!=="object")return;let g=u.pollInterval,z,v=$;if(this.options.cwd&&!a.isAbsolute($))v=a.join(this.options.cwd,$);let J=new Date,N=this._pendingWrites;function X(G){KE(v,(q,T)=>{if(q||!N.has($)){if(q&&q.code!=="ENOENT")_(q);return}let H=Number(new Date);if(G&&T.size!==G.size)N.get($).lastChange=H;let Q=N.get($);if(H-Q.lastChange>=I)N.delete($),_(void 0,T);else z=setTimeout(X,g,T)})}if(!N.has($))N.set($,{lastChange:J,cancelWait:()=>{return N.delete($),clearTimeout(z),U}}),z=setTimeout(X,g)}_isIgnored($,I){if(this.options.atomic&&bE.test($))return!0;if(!this._userIgnored){let{cwd:U}=this.options,u=(this.options.ignored||[]).map(TY(U)),z=[...[...this._ignoredPaths].map(TY(U)),...u];this._userIgnored=wE(z,void 0)}return this._userIgnored($,I)}_isntIgnored($,I){return!this._isIgnored($,I)}_getWatchHelpers($){return new BY($,this.options.followSymlinks,this)}_getWatchedDir($){let I=a.resolve($);if(!this._watched.has(I))this._watched.set(I,new VY(I,this._boundRemove));return this._watched.get(I)}_hasReadPermissions($){if(this.options.ignorePermissionErrors)return!0;return Boolean(Number($.mode)&256)}_remove($,I,U){let _=a.join($,I),u=a.resolve(_);if(U=U!=null?U:this._watched.has(_)||this._watched.has(u),!this._throttle("remove",_,100))return;if(!U&&this._watched.size===1)this.add($,I,!0);this._getWatchedDir(_).getChildren().forEach((G)=>this._remove(_,G));let v=this._getWatchedDir($),J=v.has(I);if(v.remove(I),this._symlinkPaths.has(u))this._symlinkPaths.delete(u);let N=_;if(this.options.cwd)N=a.relative(this.options.cwd,_);if(this.options.awaitWriteFinish&&this._pendingWrites.has(N)){if(this._pendingWrites.get(N).cancelWait()===H$.ADD)return}this._watched.delete(_),this._watched.delete(u);let X=U?H$.UNLINK_DIR:H$.UNLINK;if(J&&!this._isIgnored(_))this._emit(X,_);this._closePath(_)}_closePath($){this._closeFile($);let I=a.dirname($);this._getWatchedDir(I).remove(a.basename($))}_closeFile($){let I=this._closers.get($);if(!I)return;I.forEach((U)=>U()),this._closers.delete($)}_addPathCloser($,I){if(!I)return;let U=this._closers.get($);if(!U)U=[],this._closers.set($,U);U.push(I)}_readdirp($,I){if(this.closed)return;let U={type:H$.ALL,alwaysStat:!0,lstat:!0,...I,depth:0},_=_Y($,U);return this._streams.add(_),_.once(JY,()=>{_=void 0}),_.once(D9,()=>{if(_)this._streams.delete(_),_=void 0}),_}}function L2($,I={}){let U=new DY(I);return U.add($),U}var RI=q$(b$(),1);var Uf=q$(HO(),1),_f=q$(j9(),1),gf=q$(S9(),1),y9=q$(E2(),1),i9=q$(KO(),1);var LO=process.env.DASHBOARD_PORT?parseInt(process.env.DASHBOARD_PORT||"9847",10):9847;function Gf(){if(process.env.MEMORIES_DIR)return process.env.MEMORIES_DIR;let $=process.argv[3];if($)return j4($,".serena","memories");return j4(process.cwd(),".serena","memories")}function $u($){try{return Jf($,"utf-8")}catch{return""}}function Xf($){try{let I=s0($);if(I.includes("orchestrator-session.md"))return j4($,"orchestrator-session.md");let U=I.filter((_)=>/^session-.*\.md$/.test(_)).map((_)=>({name:_,mtime:l9(j4($,_)).mtimeMs})).sort((_,u)=>u.mtime-_.mtime);if(U.length>0&&U[0])return j4($,U[0].name)}catch{}return null}function qf($){let I=Xf($);if(!I)return{id:"N/A",status:"UNKNOWN"};let U=$u(I);if(!U)return{id:"N/A",status:"UNKNOWN"};let _=(U.match(/session-id:\s*(.+)/i)||[])[1]||(U.match(/# Session:\s*(.+)/i)||[])[1]||U.match(/(session-\d{8}-\d{6})/)?.[1]||RO(I,".md")||"N/A",u="UNKNOWN";if(/IN PROGRESS|RUNNING|## Active|\[IN PROGRESS\]/i.test(U))u="RUNNING";else if(/COMPLETED|DONE|## Completed|\[COMPLETED\]/i.test(U))u="COMPLETED";else if(/FAILED|ERROR|## Failed|\[FAILED\]/i.test(U))u="FAILED";else if(/Step \d+:.*\[/i.test(U))u="RUNNING";return{id:_.trim(),status:u}}function Qf($){let I=$u(j4($,"task-board.md"));if(!I)return[];let U=[],_=I.split(`
434
- `);for(let u of _){if(!u.startsWith("|")||/^\|\s*-+/.test(u))continue;let g=u.split("|").map((v)=>v.trim()).filter(Boolean),z=g[0];if(g.length<2||!z||/^agent$/i.test(z))continue;U.push({agent:g[0]||"",status:g[1]||"pending",task:g[2]||""})}return U}function r9($,I){try{let U=s0($).filter((g)=>g.startsWith(`progress-${I}`)&&g.endsWith(".md")).sort().reverse();if(U.length===0)return null;let u=(U[0]?$u(j4($,U[0])):"").match(/turn[:\s]*(\d+)/i);return u?.[1]?parseInt(u[1],10):null}catch{return null}}function Tf($){try{return s0($).filter((U)=>U.endsWith(".md")&&U!==".gitkeep").map((U)=>({name:U,mtime:l9(j4($,U)).mtimeMs})).sort((U,_)=>_.mtime-U.mtime).slice(0,5).map((U)=>{let _=U.name.replace(/^(progress|result|session|debug|task)-?/,"").replace(/[-_]agent/,"").replace(/[-_]completion/,"").replace(/\.md$/,"").replace(/[-_]/g," ").trim()||U.name.replace(/\.md$/,""),g=$u(j4($,U.name)).split(`
435
- `).map((v)=>v.trim()).filter((v)=>v&&!v.startsWith("---")&&v.length>3),z="";for(let v=g.length-1;v>=0;v--){let J=g[v];if(!J)continue;if(/^\*\*|^#+|^-|^\d+\.|Status|Result|Action|Step/i.test(J)){if(z=J.replace(/^[#*\-\d.]+\s*/,"").replace(/\*\*/g,"").trim(),z.length>5)break}}if(z.length>80)z=`${z.substring(0,77)}...`;return{agent:_,message:z,file:U.name}}).filter((U)=>U.message)}catch{return[]}}function Hf($){let I=[],U=new Set;try{let _=s0($).filter((u)=>u.endsWith(".md")&&u!==".gitkeep").map((u)=>({name:u,mtime:l9(j4($,u)).mtimeMs})).sort((u,g)=>g.mtime-u.mtime);for(let u of _){let g=$u(j4($,u.name)),z=g.match(/\*\*Agent\*\*:\s*(.+)/i)||g.match(/Agent:\s*(.+)/i)||g.match(/^#+\s*(.+?)\s*Agent/im),v=null;if(z?.[1])v=z[1].trim();else if(/_agent|agent_|-agent/i.test(u.name))v=u.name.replace(/\.md$/,"").replace(/[-_]completion|[-_]progress|[-_]result/gi,"").replace(/[-_]/g," ").trim();if(v&&!U.has(v.toLowerCase())){U.add(v.toLowerCase());let J="unknown";if(/\[COMPLETED\]|## Completed|## Results/i.test(g))J="completed";else if(/\[IN PROGRESS\]|## Progress|IN PROGRESS/i.test(g))J="running";else if(/\[FAILED\]|## Failed|ERROR/i.test(g))J="failed";let N=g.match(/## Task\s*\n+(.+)/i)||g.match(/\*\*Task\*\*:\s*(.+)/i),X=N?.[1]?N[1].trim().substring(0,60):"";I.push({agent:v,status:J,task:X,turn:r9($,v)})}}}catch{}return I}function n9($){let I=qf($),_=Qf($).map((u)=>({...u,turn:r9($,u.agent)}));if(_.length===0)_=Hf($);if(_.length===0)try{let u=s0($).filter((g)=>g.startsWith("progress-")&&g.endsWith(".md"));for(let g of u){let z=g.replace(/^progress-/,"").replace(/\.md$/,"");_.push({agent:z,status:"running",task:"",turn:r9($,z)})}}catch{}return{session:I,agents:_,activity:Tf($),memoriesDir:$,updatedAt:new Date().toISOString()}}var Yf=`<!DOCTYPE html>
422
+ Co-Authored-By: First Fluke <our.first.fluke@gmail.com>`,pr:"Generated with [oh-my-agent](https://github.com/first-fluke/oh-my-agent)"},O2(O,`${JSON.stringify(A,null,2)}
423
+ `)}}catch{}if(B){let A=!1;try{H1("codex --version",{stdio:"ignore"}),A=!0}catch{}if(A){let f=!1;try{f=H1("claude plugin list",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).includes("codex@openai-codex")}catch{}if(f)try{H1("claude plugin update codex@openai-codex",{stdio:"ignore"})}catch{}else try{H1("claude plugin marketplace add openai/codex-plugin-cc",{stdio:"ignore"}),H1("claude plugin install codex@openai-codex",{stdio:"ignore"})}catch{}}}let b=AT(_);if(g.stop(`Updated to version ${p$.default.cyan(v.version)}!`),b.length>0){let A=ZT(_);if(A.length>0){let{created:f}=I2(_,b,A);if(f.length>0)U.note(f.map((j)=>`${p$.default.green("→")} ${j}`).join(`
424
+ `),"Symlinks updated")}}if(U.outro(`${v.metadata?.totalFiles??0} files updated successfully`),!I&&N1()&&r4()&&!G1()){let A=await O$({message:`${p$.default.yellow("⭐")} Star ${p$.default.cyan(L$)} on GitHub? It helps a lot!`});if(!e(A)&&A)try{H1(`gh api -X PUT /user/starred/${L$}`,{stdio:"ignore"}),d.success(`Starred ${p$.default.cyan(L$)}! Thank you! \uD83C\uDF1F`)}catch{d.warn(`Could not star automatically. Try: ${p$.default.dim(`gh api --method PUT /user/starred/${L$}`)}`)}}}finally{N()}}catch(v){if(g?.stop("Update failed"),U.logError(v instanceof Error?v.message:String(v)),I)throw v;process.exit(1)}}U4();var Q$=q$(b$(),1);var yH=30;function rH($){let I=Math.round($/100*yH),U=yH-I,_;if($>60)_=Q$.default.green;else if($>30)_=Q$.default.yellow;else _=Q$.default.red;let u=_("█".repeat(I)),z=Q$.default.dim("░".repeat(U));return`${u}${z}`}function iH($){let I=$.remainingPercent.toFixed(0).padStart(4),U=rH($.remainingPercent),_=$.supportsImages?Q$.default.dim(" img"):"",u=$.label.padEnd(26),z=$.isExhausted?Q$.default.red(`resets ${$.timeUntilReset}`):$.timeUntilReset!=="Ready"?Q$.default.dim(`resets ${$.timeUntilReset}`):"";return` ${u} ${U} ${I}%${_} ${z}`}function nH($,I){let U=rH(I.remainingPercent),_=I.remainingPercent.toFixed(0).padStart(4),u=`${I.available.toLocaleString()} / ${I.monthly.toLocaleString()}`;return[` ${U} ${_}%`,` ${Q$.default.dim(u)}`].join(`
425
+ `)}function bw($){console.clear(),V$(Q$.default.bgCyan(Q$.default.black(" oh-my-agent usage ")));let I=[`${Q$.default.bold("User")} ${$.userName}${$.email?` (${Q$.default.dim($.email)})`:""}`,`${Q$.default.bold("Plan")} ${$.planName}${$.tierName?` ${Q$.default.dim(`(${$.tierName})`)}`:""}`];if($.defaultModel){let U=$.models.find((_)=>_.modelId===$.defaultModel)?.label;if(U)I.push(`${Q$.default.bold("Default")} ${U}`)}if(k(I.join(`
426
+ `),"Account"),$.promptCredits||$.flowCredits){let U=[];if($.promptCredits)U.push(Q$.default.bold(" Prompt"),nH("Prompt",$.promptCredits));if($.flowCredits){if(U.length>0)U.push("");U.push(Q$.default.bold(" Flow"),nH("Flow",$.flowCredits))}k(U.join(`
427
+ `),"Credits")}if($.models.length===0)k(Q$.default.dim(" No model quota data available"),"Models");else{let U=[...$.models].sort((g,v)=>g.label.localeCompare(v.label)),_=U.filter((g)=>g.isExhausted),u=U.filter((g)=>!g.isExhausted),z=[];if(u.length>0)for(let g of u)z.push(iH(g));if(_.length>0){if(z.length>0)z.push("");z.push(Q$.default.red(" ── Exhausted ──"));for(let g of _)z.push(iH(g))}k(z.join(`
428
+ `),`Models (${$.models.length})`)}p(Q$.default.dim(`Updated ${$.timestamp.toLocaleTimeString()}`))}async function lH($=!1,I=!1){if(I){let _=await YT();if(!_)console.error("Failed to connect to Antigravity"),process.exit(1);console.log(JSON.stringify(_,null,2));return}if(!$){let _=u4();_.start("Connecting to Antigravity...");let u=await i0();if(_.stop(u?"Connected":Q$.default.red("Failed to connect to Antigravity")),!u)k([`${Q$.default.yellow("Antigravity IDE must be running locally.")}`,"",Q$.default.dim("Make sure the language_server process is active."),Q$.default.dim("Try opening a project in Antigravity first.")].join(`
429
+ `),"Connection Failed"),process.exit(1);bw(u);return}let U=await i0();if(!U)console.log(JSON.stringify({error:"Failed to connect"})),process.exit(1);console.log(JSON.stringify({userName:U.userName,email:U.email,planName:U.planName,tierName:U.tierName||null,promptCredits:U.promptCredits??null,flowCredits:U.flowCredits??null,defaultModel:U.defaultModel,models:[...U.models].sort((_,u)=>_.label.localeCompare(u.label)).map((_)=>({label:_.label,modelId:_.modelId,remainingPercent:_.remainingPercent,isExhausted:_.isExhausted,supportsImages:_.supportsImages,resetTime:_.resetTime?.toISOString()??null,timeUntilReset:_.timeUntilReset})),timestamp:U.timestamp.toISOString()},null,2))}U4();var y$=q$(b$(),1);import{execSync as jw}from"node:child_process";import{existsSync as U6,readFileSync as q9}from"node:fs";import{join as C6}from"node:path";var mH=["backend","frontend","mobile","qa","debug","pm"];function l($,I,U){return{name:$,status:I,message:U}}function F$($,I){try{return jw($,{encoding:"utf-8",cwd:I,stdio:["pipe","pipe","pipe"]}).trim()}catch{return null}}function Fw($,I){let U=C6($,".agents","plan.json");if(!U6(U))return l("Scope Check","skip","No plan.json found");let _;try{_=JSON.parse(q9(U,"utf-8"))}catch{return l("Scope Check","skip","Invalid plan.json")}let u=_.tasks?.filter((N)=>N.agent?.toLowerCase()===I);if(!u||u.length===0)return l("Scope Check","skip","No tasks for this agent");let z=u.flatMap((N)=>N.scope??[]);if(z.length===0)return l("Scope Check","skip","No scope defined in plan");let g=F$("git diff --name-only HEAD 2>/dev/null || git diff --name-only --cached 2>/dev/null",$);if(!g)return l("Scope Check","pass","No files changed");let v=g.split(`
430
+ `).filter(Boolean),J=[];for(let N of v)if(!z.some((G)=>N.startsWith(G)))J.push(N);if(J.length>0)return l("Scope Check","fail",`${J.length} out-of-scope: ${J[0]}${J.length>1?` +${J.length-1}`:""}`);return l("Scope Check","pass",`All ${v.length} files in scope`)}function Sw($,I){let U=C6($,".serena","memories",`result-${I}.md`);if(!U6(U))return l("Charter Preflight","skip","Result file not found");let _=q9(U,"utf-8");if(!_.includes("CHARTER_CHECK:"))return l("Charter Preflight","warn","Block missing from result");if(/\{[^}]+\}/.test(_.split("CHARTER_CHECK:")[1]?.split("```")[0]||""))return l("Charter Preflight","warn","Contains unfilled placeholders");return l("Charter Preflight","pass","Properly filled")}function ww($){let I=["*.py","*.ts","*.tsx","*.js","*.dart"],U=`(password|secret|api_key|token)\\s*=\\s*['"][^'"]{8,}`;for(let _ of I){let u=F$(`grep -rn --include="${_}" -E "(password|secret|api_key|token)\\s*=\\s*['"][^'"]{8,}" . 2>/dev/null | grep -v test | grep -v example | grep -v node_modules | head -1`,$);if(u)return l("Hardcoded Secrets","fail",`Found in: ${u.split(":")[0]}`)}return l("Hardcoded Secrets","pass","None detected")}function Ew($){let I=F$('grep -rn --include="*.py" --include="*.ts" --include="*.tsx" --include="*.js" --include="*.dart" -E "TODO|FIXME|HACK|XXX" . 2>/dev/null | grep -v node_modules | grep -v ".agents/" | wc -l',$),U=Number.parseInt(I||"0",10);if(U>0)return l("TODO/FIXME Comments","warn",`${U} found`);return l("TODO/FIXME Comments","pass","None found")}function Cw($){if(!F$("which uv",$))return l("Python Syntax","skip","uv not available");let U=F$('find . -name "*.py" -not -path "*/node_modules/*" -not -path "*/.venv/*" -exec uv run python -m py_compile {} \\; 2>&1 | head -5',$);if(U&&U.length>0)return l("Python Syntax","fail","Syntax errors found");return l("Python Syntax","pass","Valid")}function fw($){if(F$(`grep -rn --include="*.py" -E "f['"].*SELECT|f['"].*INSERT|f['"].*UPDATE|f['"].*DELETE" . 2>/dev/null | grep -v test | grep -v node_modules | head -1`,$))return l("SQL Injection","fail","f-string with SQL keywords detected");return l("SQL Injection","pass","None detected")}function hH($){let I=F$("which uv",$),U=U6(C6($,"pyproject.toml"));if(!I||!U)return l("Python Tests","skip",!I?"uv not available":"pyproject.toml not found");let _=F$("uv run pytest -q --tb=no 2>&1",$);if(_?.includes("passed")||_?.includes("no tests ran"))return l("Python Tests","pass","Tests pass");return l("Python Tests","fail","Tests failing")}function xw($){if(!U6(C6($,"tsconfig.json")))return l("TypeScript","skip","Not configured");let I=F$("npx tsc --noEmit 2>&1",$);if(I===null||I==="")return l("TypeScript","pass","Compilation clean");if(I.includes("error"))return l("TypeScript","fail","Type errors found");return l("TypeScript","pass","Compilation clean")}function kw($){let I=F$(`grep -rn --include="*.tsx" --include="*.jsx" 'style={{' . 2>/dev/null | grep -v node_modules | wc -l`,$),U=Number.parseInt(I||"0",10);if(U>0)return l("Inline Styles","warn",`${U} found (prefer Tailwind)`);return l("Inline Styles","pass","None found")}function yw($){let I=F$(`grep -rn --include="*.ts" --include="*.tsx" ': any' . 2>/dev/null | grep -v node_modules | grep -v ".d.ts" | wc -l`,$),U=Number.parseInt(I||"0",10);if(U>3)return l("Any Types","fail",`${U} found (limit: 3)`);if(U>0)return l("Any Types","warn",`${U} found`);return l("Any Types","pass","None found")}function cH($){if(!U6(C6($,"package.json")))return l("Frontend Tests","skip","No package.json");let I=F$("npx vitest run --reporter=verbose 2>&1",$);if(I?.includes("passed")||I?.includes("✓"))return l("Frontend Tests","pass","Tests pass");return l("Frontend Tests","warn","Tests failed or vitest not configured")}function iw($){if(!F$("which flutter",$)){if(!F$("which dart",$))return l("Flutter/Dart Analysis","skip","Not available");if(F$("dart analyze 2>&1",$)?.includes("No issues found"))return l("Dart Analysis","pass","Clean");return l("Dart Analysis","fail","Issues found")}if(F$("flutter analyze 2>&1",$)?.includes("No issues found"))return l("Flutter Analysis","pass","Clean");return l("Flutter Analysis","fail","Issues found")}function nw($){if(!F$("which flutter",$))return l("Flutter Tests","skip","Flutter not available");if(F$("flutter test 2>&1",$)?.includes("All tests passed"))return l("Flutter Tests","pass","All tests pass");return l("Flutter Tests","fail","Tests failed")}function rw($){let I=C6($,".agents","plan.json");if(!U6(I))return l("PM Plan","warn","plan.json not found");try{return JSON.parse(q9(I,"utf-8")),l("PM Plan","pass","Valid JSON")}catch{return l("PM Plan","fail","Invalid JSON")}}function lw($,I){let U=[];switch($){case"backend":U.push(Cw(I)),U.push(fw(I)),U.push(hH(I));break;case"frontend":U.push(xw(I)),U.push(kw(I)),U.push(yw(I)),U.push(cH(I));break;case"mobile":U.push(iw(I)),U.push(nw(I));break;case"qa":U.push(l("QA Report","pass","Verified by self-check.md"));break;case"debug":if(U6(C6(I,"pyproject.toml")))U.push(hH(I));else if(U6(C6(I,"package.json")))U.push(cH(I));else U.push(l("Debug Tests","skip","No test runner detected"));break;case"pm":U.push(rw(I));break}return U}async function dH($,I,U=!1){let _=$.toLowerCase();if(!mH.includes(_)){let q=`Invalid agent type: ${$}. Valid types: ${mH.join(", ")}`;if(U)console.log(JSON.stringify({ok:!1,error:q}));else d.error(q);process.exit(2)}let u=I||process.cwd();if(!U6(u)){let q=`Workspace not found: ${u}`;if(U)console.log(JSON.stringify({ok:!1,error:q}));else d.error(q);process.exit(2)}let z=[];z.push(Fw(u,_)),z.push(Sw(u,_)),z.push(ww(u)),z.push(Ew(u)),z.push(...lw(_,u));let g=z.filter((q)=>q.status==="pass").length,v=z.filter((q)=>q.status==="fail").length,J=z.filter((q)=>q.status==="warn").length,N={ok:v===0,agent:_,workspace:u,checks:z,summary:{passed:g,failed:v,warned:J}};if(U)console.log(JSON.stringify(N,null,2)),process.exit(v>0?1:0);console.clear(),V$(y$.default.bgCyan(y$.default.white(` \uD83D\uDD0D Verify: ${_} agent `))),k(y$.default.dim(u),"Workspace");let X=["┌────────────────────────────┬────────┬─────────────────────────────┐",`│ ${y$.default.bold("Check")} │ ${y$.default.bold("Status")} │ ${y$.default.bold("Details")} │`,"├────────────────────────────┼────────┼─────────────────────────────┤",...z.map((q)=>{let T;switch(q.status){case"pass":T=y$.default.green("PASS");break;case"fail":T=y$.default.red("FAIL");break;case"warn":T=y$.default.yellow("WARN");break;default:T=y$.default.dim("SKIP")}let H=q.name.padEnd(26),Q=T.padEnd(6),Y=(q.message||"-").slice(0,27).padEnd(27);return`│ ${H} │ ${Q} │ ${Y} │`}),"└────────────────────────────┴────────┴─────────────────────────────┘"].join(`
431
+ `);console.log(X),console.log();let G=`${y$.default.green(`${g} passed`)}, ${y$.default.red(`${v} failed`)}, ${y$.default.yellow(`${J} warnings`)}`;if(v>0)p(y$.default.red(`❌ Verification failed: ${G}`)),process.exit(1);p(y$.default.green(`✅ Verification passed: ${G}`)),process.exit(0)}s4();var T$=q$(b$(),1);import{existsSync as mw,readdirSync as pH,readFileSync as hw}from"node:fs";import{join as Z4}from"node:path";var oH=Object.fromEntries(Object.entries(O4).map(([$,I])=>[$,I.map((U)=>U.name)])),cw={"backend-engineer":"oma-backend","frontend-engineer":"oma-frontend","db-engineer":"oma-db","mobile-engineer":"oma-mobile","pm-planner":"oma-pm","qa-reviewer":"oma-qa","debug-investigator":"oma-debug"};function Q9($){let I=new Set;for(let U of $.matchAll(/_shared\/((?:[a-z][a-z0-9_-]*\/)*[a-z][a-z0-9_-]*)(?:\.md)?(?=[`)\s/}]|$)/gi))if(U[1])I.add(U[1]);return[...I]}function V2($){try{return hw($,"utf-8")}catch{return""}}function T9($){try{return pH($).filter((I)=>!I.startsWith("."))}catch{return[]}}function dw($){try{return pH($,{withFileTypes:!0}).filter((I)=>!I.name.startsWith("."))}catch{return[]}}function tH($,I=""){let U=[];for(let _ of dw($)){let u=I?`${I}/${_.name}`:_.name;if(_.isDirectory()){U.push({path:u,isDirectory:!0}),U.push(...tH(Z4($,_.name),u));continue}if(!_.name.endsWith(".md"))continue;U.push({path:u.replace(/\.md$/,""),isDirectory:!1})}return U}function aH($){let I=[{id:"root",label:"oh-my-agent",category:"root"}],U=new Set,_=[];function u(G,q,T){let H=`${G}|${q}`;if(U.has(H))return;U.add(H),_.push({from:G,to:q,type:T})}let z=Z4($,".agents","skills");for(let[G,q]of Object.entries(oH))for(let T of q){let H=Z4(z,T);if(!mw(H))continue;let Q=`skill:${T}`;I.push({id:Q,label:T,category:"skill",group:"Skills",subgroup:G});let Y=[V2(Z4(H,"SKILL.md")),V2(Z4(H,"resources","execution-protocol.md"))].join(`
432
+ `);for(let M of Q9(Y))u(Q,`shared:${M}`,"references")}let g=Z4($,".agents","workflows");for(let G of T9(g).filter((q)=>q.endsWith(".md"))){let q=G.replace(".md",""),T=`workflow:${q}`;I.push({id:T,label:q,category:"workflow",group:"Workflows"});for(let H of Q9(V2(Z4(g,G))))u(T,`shared:${H}`,"references")}let v=Z4(z,"_shared");for(let G of tH(v)){let q=`shared:${G.path}`;if(I.push({id:q,label:G.path,category:"shared",group:"Shared"}),!G.isDirectory){for(let T of Q9(V2(Z4(v,`${G.path}.md`))))if(T!==G.path)u(q,`shared:${T}`,"references")}}let J=Z4($,".claude","agents");for(let G of T9(J).filter((q)=>q.endsWith(".md"))){let q=G.replace(".md",""),T=`agent:${q}`;I.push({id:T,label:q,category:"agent",group:"Claude Agents"});let H=cw[q];if(H)u(T,`skill:${H}`,"implements")}let N=Z4($,".serena","memories");for(let G of T9(N).filter((q)=>q.endsWith(".md")))I.push({id:`memory:${G.replace(".md","")}`,label:G.replace(".md",""),category:"memory",group:"Serena Memories"});let X=new Set(I.map((G)=>G.id));return{nodes:I,edges:_.filter((G)=>X.has(G.from)&&X.has(G.to))}}var pw={root:($)=>T$.default.bold(T$.default.white($)),skill:T$.default.green,workflow:T$.default.blue,shared:T$.default.yellow,agent:T$.default.magenta,memory:T$.default.cyan};function N4($,I){return(pw[I]??T$.default.white)($)}function l4(...$){let I=$.sort((u,z)=>u[0]-z[0]),U="",_=0;for(let[u,z,g]of I){if(u>_)U+=" ".repeat(u-_);U+=z,_=u+g}return U}function ow($){let I=[],U=$.nodes.filter((j)=>j.category==="skill").length,_=$.nodes.filter((j)=>j.category==="workflow").length,u=$.nodes.filter((j)=>j.category==="shared").length,z=$.nodes.filter((j)=>j.category==="agent").length,g=$.nodes.filter((j)=>j.category==="memory").length,v=$.edges.filter((j)=>j.from.startsWith("skill:")&&j.to.startsWith("shared:")).length,J=$.edges.filter((j)=>j.from.startsWith("workflow:")&&j.to.startsWith("shared:")).length,N=$.edges.filter((j)=>j.type==="implements").length,X=$.edges.filter((j)=>j.from.startsWith("shared:")&&j.to.startsWith("shared:")).length,G=`Skills (${U})`,q=`Workflows (${_})`,T=`Shared (${u})`,H=`Agents (${z})`,Q=`Memories (${g})`,Y=10,M=29,L=48,P=19;I.push(l4([24,N4("oh-my-agent","root"),11])),I.push(l4([29,"│",1]));let R=Array(49).fill(" ");R[10]="┌",R[29]="┼",R[48]="┐";for(let j=11;j<48;j++)if(j!==29)R[j]="─";I.push(R.join("")),I.push(l4([10,"▼",1],[29,"▼",1],[48,"▼",1])),I.push(l4([10-(G.length>>1),N4(G,"skill"),G.length],[29-(q.length>>1),N4(q,"workflow"),q.length],[48-(Q.length>>1),N4(Q,"memory"),Q.length])),I.push(l4([10,"│",1],[29,"│",1]));let K=`${v} refs`,V=`${J} refs`;I.push(l4([10-(K.length>>1),T$.default.dim(K),K.length],[29-(V.length>>1),T$.default.dim(V),V.length])),I.push(l4([10,"│",1],[29,"│",1]));let B=Array(30).fill(" ");B[10]="└",B[19]="┬",B[29]="┘";for(let j=11;j<29;j++)if(j!==19)B[j]="─";I.push(B.join("")),I.push(l4([19,"▼",1]));let O=19-(T.length>>1),b=l4([O,N4(T,"shared"),T.length]);if(X>0)b+=` ${T$.default.dim(`◂── ${X} internal`)}`;I.push(b),I.push("");let A=10-(H.length>>1),f=`──[${N} implements]──▸`;return I.push(l4([A,N4(H,"agent"),H.length])+` ${T$.default.dim(f)} ${N4("Skills","skill")}`),I}function eH($){let I=[];I.push(...ow($)),I.push(""),I.push(T$.default.dim("─".repeat(56))),I.push("");let U=new Map,_=new Map;for(let G of $.edges){if(!U.has(G.from))U.set(G.from,[]);if(U.get(G.from)?.push(G),G.to.startsWith("shared:"))_.set(G.to,(_.get(G.to)??0)+1)}function u(G){let q=U.get(G);if(!q?.length)return"";let T=q.map((Q)=>$.nodes.find((Y)=>Y.id===Q.to)?.label.replace(/\.md$/,"")??Q.to.split(":")[1]),H=T.length>4?`${T.slice(0,3).join(", ")} +${T.length-3}`:T.join(", ");return` ${T$.default.dim("──▸")} ${T$.default.dim(H)}`}let z=$.nodes.filter((G)=>G.category==="skill"),g=Object.keys(oH);I.push(T$.default.bold(`Skills (${z.length})`));for(let G=0;G<g.length;G++){let q=g[G],T=z.filter((Y)=>Y.subgroup===q);if(!T.length)continue;let H=G===g.length-1;I.push(`${H?"└─":"├─"} ${T$.default.dim(q)}`);let Q=H?" ":"│ ";for(let Y of T){let M=Y===T.at(-1)?"└─":"├─";I.push(`${Q}${M} ${N4(Y.label,"skill")}${u(Y.id)}`)}}I.push("");let v=$.nodes.filter((G)=>G.category==="workflow");I.push(T$.default.bold(`Workflows (${v.length})`));for(let G of v){let q=G===v.at(-1)?"└─":"├─";I.push(`${q} ${N4(G.label,"workflow")}${u(G.id)}`)}I.push("");let J=[...$.nodes.filter((G)=>G.category==="shared")].sort((G,q)=>(_.get(q.id)??0)-(_.get(G.id)??0));I.push(T$.default.bold(`Shared (${J.length})`));for(let G of J){let q=G===J.at(-1)?"└─":"├─",T=_.get(G.id)??0,H=T>0?T$.default.dim(` (${T} refs)`):"";I.push(`${q} ${N4(G.label,"shared")}${H}${u(G.id)}`)}I.push("");let N=$.nodes.filter((G)=>G.category==="agent");I.push(T$.default.bold(`Claude Agents (${N.length})`));for(let G of N){let q=G===N.at(-1)?"└─":"├─",T=$.edges.find((Q)=>Q.from===G.id&&Q.type==="implements"),H=T?` ${T$.default.dim("──▸")} ${N4(T.to.split(":")[1]??"","skill")}`:"";I.push(`${q} ${N4(G.label,"agent")}${H}`)}I.push("");let X=$.nodes.filter((G)=>G.category==="memory");if(I.push(T$.default.bold(`Serena Memories (${X.length})`)),!X.length)I.push(`└─ ${T$.default.dim("(none)")}`);else for(let G of X){let q=G===X.at(-1)?"└─":"├─";I.push(`${q} ${N4(G.label,"memory")}`)}return I.join(`
433
+ `)}async function sH($){let I=aH(process.cwd());if($.json){console.log(JSON.stringify(I,null,2));return}console.log(eH(I))}import{existsSync as Gf,mkdirSync as Xf,readdirSync as $u,readFileSync as qf,statSync as l9}from"node:fs";import{createServer as Qf}from"node:http";import{basename as PO,join as j4}from"node:path";import{EventEmitter as WE}from"node:events";import{stat as PE,Stats as Ym}from"node:fs";import{readdir as ZE,stat as AE}from"node:fs/promises";import*as a from"node:path";import{lstat as $Y,readdir as tw,realpath as aw,stat as ew}from"node:fs/promises";import{join as sw,relative as $E,resolve as IY,sep as IE}from"node:path";import{Readable as uE}from"node:stream";var G4={FILE_TYPE:"files",DIR_TYPE:"directories",FILE_DIR_TYPE:"files_directories",EVERYTHING_TYPE:"all"},H9={root:".",fileFilter:($)=>!0,directoryFilter:($)=>!0,type:G4.FILE_TYPE,lstat:!1,depth:2147483648,alwaysStat:!1,highWaterMark:4096};Object.freeze(H9);var zY="READDIRP_RECURSIVE_ERROR",UE=new Set(["ENOENT","EPERM","EACCES","ELOOP",zY]),uY=[G4.DIR_TYPE,G4.EVERYTHING_TYPE,G4.FILE_DIR_TYPE,G4.FILE_TYPE],_E=new Set([G4.DIR_TYPE,G4.EVERYTHING_TYPE,G4.FILE_DIR_TYPE]),zE=new Set([G4.EVERYTHING_TYPE,G4.FILE_DIR_TYPE,G4.FILE_TYPE]),gE=($)=>UE.has($.code),vE=process.platform==="win32",UY=($)=>!0,_Y=($)=>{if($===void 0)return UY;if(typeof $==="function")return $;if(typeof $==="string"){let I=$.trim();return(U)=>U.basename===I}if(Array.isArray($)){let I=$.map((U)=>U.trim());return(U)=>I.some((_)=>U.basename===_)}return UY};class Y9 extends uE{parents;reading;parent;_stat;_maxDepth;_wantsDir;_wantsFile;_wantsEverything;_root;_isDirent;_statsProp;_rdOptions;_fileFilter;_directoryFilter;constructor($={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:$.highWaterMark});let I={...H9,...$},{root:U,type:_}=I;this._fileFilter=_Y(I.fileFilter),this._directoryFilter=_Y(I.directoryFilter);let u=I.lstat?$Y:ew;if(vE)this._stat=(z)=>u(z,{bigint:!0});else this._stat=u;this._maxDepth=I.depth!=null&&Number.isSafeInteger(I.depth)?I.depth:H9.depth,this._wantsDir=_?_E.has(_):!1,this._wantsFile=_?zE.has(_):!1,this._wantsEverything=_===G4.EVERYTHING_TYPE,this._root=IY(U),this._isDirent=!I.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(U,1)],this.reading=!1,this.parent=void 0}async _read($){if(this.reading)return;this.reading=!0;try{while(!this.destroyed&&$>0){let I=this.parent,U=I&&I.files;if(U&&U.length>0){let{path:_,depth:u}=I,z=U.splice(0,$).map((v)=>this._formatEntry(v,_)),g=await Promise.all(z);for(let v of g){if(!v)continue;if(this.destroyed)return;let J=await this._getEntryType(v);if(J==="directory"&&this._directoryFilter(v)){if(u<=this._maxDepth)this.parents.push(this._exploreDir(v.fullPath,u+1));if(this._wantsDir)this.push(v),$--}else if((J==="file"||this._includeAsFile(v))&&this._fileFilter(v)){if(this._wantsFile)this.push(v),$--}}}else{let _=this.parents.pop();if(!_){this.push(null);break}if(this.parent=await _,this.destroyed)return}}}catch(I){this.destroy(I)}finally{this.reading=!1}}async _exploreDir($,I){let U;try{U=await tw($,this._rdOptions)}catch(_){this._onError(_)}return{files:U,depth:I,path:$}}async _formatEntry($,I){let U,_=this._isDirent?$.name:$;try{let u=IY(sw(I,_));U={path:$E(this._root,u),fullPath:u,basename:_},U[this._statsProp]=this._isDirent?$:await this._stat(u)}catch(u){this._onError(u);return}return U}_onError($){if(gE($)&&!this.destroyed)this.emit("warn",$);else this.destroy($)}async _getEntryType($){if(!$&&this._statsProp in $)return"";let I=$[this._statsProp];if(I.isFile())return"file";if(I.isDirectory())return"directory";if(I&&I.isSymbolicLink()){let U=$.fullPath;try{let _=await aw(U),u=await $Y(_);if(u.isFile())return"file";if(u.isDirectory()){let z=_.length;if(U.startsWith(_)&&U.substr(z,1)===IE){let g=Error(`Circular symlink detected: "${U}" points to "${_}"`);return g.code=zY,this._onError(g)}return"directory"}}catch(_){return this._onError(_),""}}}_includeAsFile($){let I=$&&$[this._statsProp];return I&&this._wantsEverything&&!I.isDirectory()}}function gY($,I={}){let U=I.entryType||I.type;if(U==="both")U=G4.FILE_DIR_TYPE;if(U)I.type=U;if(!$)throw Error("readdirp: root argument is required. Usage: readdirp(root, options)");else if(typeof $!=="string")throw TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");else if(U&&!uY.includes(U))throw Error(`readdirp: Invalid type passed. Use one of ${uY.join(", ")}`);return I.root=$,new Y9(I)}import{watch as JE,unwatchFile as vY,watchFile as NE}from"node:fs";import{realpath as O9,lstat as GE,open as XE,stat as NY}from"node:fs/promises";import{type as qE}from"node:os";import*as B$ from"node:path";var QE="data",D9="end",GY="close",K2=()=>{};var R2=process.platform,M9=R2==="win32",TE=R2==="darwin",HE=R2==="linux",YE=R2==="freebsd",XY=qE()==="OS400",H$={ALL:"all",READY:"ready",ADD:"add",CHANGE:"change",ADD_DIR:"addDir",UNLINK:"unlink",UNLINK_DIR:"unlinkDir",RAW:"raw",ERROR:"error"},A4=H$,OE="watch",VE={lstat:GE,stat:NY},O1="listeners",B2="errHandlers",VI="rawEmitters",BE=[O1,B2,VI],DE=new Set(["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),ME=($)=>DE.has(B$.extname($).slice(1).toLowerCase()),B9=($,I)=>{if($ instanceof Set)$.forEach(I);else I($)},m0=($,I,U)=>{let _=$[I];if(!(_ instanceof Set))$[I]=_=new Set([_]);_.add(U)},KE=($)=>(I)=>{let U=$[I];if(U instanceof Set)U.clear();else delete $[I]},h0=($,I,U)=>{let _=$[I];if(_ instanceof Set)_.delete(U);else if(_===U)delete $[I]},qY=($)=>$ instanceof Set?$.size===0:!$,D2=new Map;function JY($,I,U,_,u){let z=(g,v)=>{if(U($),u(g,v,{watchedPath:$}),v&&$!==v)M2(B$.resolve($,v),O1,B$.join($,v))};try{return JE($,{persistent:I.persistent},z)}catch(g){_(g);return}}var M2=($,I,U,_,u)=>{let z=D2.get($);if(!z)return;B9(z[I],(g)=>{g(U,_,u)})},RE=($,I,U,_)=>{let{listener:u,errHandler:z,rawEmitter:g}=_,v=D2.get(I),J;if(!U.persistent){if(J=JY($,U,u,z,g),!J)return;return J.close.bind(J)}if(v)m0(v,O1,u),m0(v,B2,z),m0(v,VI,g);else{if(J=JY($,U,M2.bind(null,I,O1),z,M2.bind(null,I,VI)),!J)return;J.on(A4.ERROR,async(N)=>{let X=M2.bind(null,I,B2);if(v)v.watcherUnusable=!0;if(M9&&N.code==="EPERM")try{await(await XE($,"r")).close(),X(N)}catch(G){}else X(N)}),v={listeners:u,errHandlers:z,rawEmitters:g,watcher:J},D2.set(I,v)}return()=>{if(h0(v,O1,u),h0(v,B2,z),h0(v,VI,g),qY(v.listeners))v.watcher.close(),D2.delete(I),BE.forEach(KE(v)),v.watcher=void 0,Object.freeze(v)}},V9=new Map,LE=($,I,U,_)=>{let{listener:u,rawEmitter:z}=_,g=V9.get(I),v=g&&g.options;if(v&&(v.persistent<U.persistent||v.interval>U.interval))vY(I),g=void 0;if(g)m0(g,O1,u),m0(g,VI,z);else g={listeners:u,rawEmitters:z,options:U,watcher:NE(I,U,(J,N)=>{B9(g.rawEmitters,(G)=>{G(A4.CHANGE,I,{curr:J,prev:N})});let X=J.mtimeMs;if(J.size!==N.size||X>N.mtimeMs||X===0)B9(g.listeners,(G)=>G($,J))})},V9.set(I,g);return()=>{if(h0(g,O1,u),h0(g,VI,z),qY(g.listeners))V9.delete(I),vY(I),g.options=g.watcher=void 0,Object.freeze(g)}};class K9{fsw;_boundHandleError;constructor($){this.fsw=$,this._boundHandleError=(I)=>$._handleError(I)}_watchWithNodeFs($,I){let U=this.fsw.options,_=B$.dirname($),u=B$.basename($);this.fsw._getWatchedDir(_).add(u);let g=B$.resolve($),v={persistent:U.persistent};if(!I)I=K2;let J;if(U.usePolling){let N=U.interval!==U.binaryInterval;v.interval=N&&ME(u)?U.binaryInterval:U.interval,J=LE($,g,v,{listener:I,rawEmitter:this.fsw._emitRaw})}else J=RE($,g,v,{listener:I,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw});return J}_handleFile($,I,U){if(this.fsw.closed)return;let _=B$.dirname($),u=B$.basename($),z=this.fsw._getWatchedDir(_),g=I;if(z.has(u))return;let v=async(N,X)=>{if(!this.fsw._throttle(OE,$,5))return;if(!X||X.mtimeMs===0)try{let G=await NY($);if(this.fsw.closed)return;let{atimeMs:q,mtimeMs:T}=G;if(!q||q<=T||T!==g.mtimeMs)this.fsw._emit(A4.CHANGE,$,G);if((TE||HE||YE)&&g.ino!==G.ino){this.fsw._closeFile(N),g=G;let H=this._watchWithNodeFs($,v);if(H)this.fsw._addPathCloser(N,H)}else g=G}catch(G){this.fsw._remove(_,u)}else if(z.has(u)){let{atimeMs:G,mtimeMs:q}=X;if(!G||G<=q||q!==g.mtimeMs)this.fsw._emit(A4.CHANGE,$,X);g=X}},J=this._watchWithNodeFs($,v);if(!(U&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored($)){if(!this.fsw._throttle(A4.ADD,$,0))return;this.fsw._emit(A4.ADD,$,I)}return J}async _handleSymlink($,I,U,_){if(this.fsw.closed)return;let u=$.fullPath,z=this.fsw._getWatchedDir(I);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let g;try{g=await O9(U)}catch(v){return this.fsw._emitReady(),!0}if(this.fsw.closed)return;if(z.has(_)){if(this.fsw._symlinkPaths.get(u)!==g)this.fsw._symlinkPaths.set(u,g),this.fsw._emit(A4.CHANGE,U,$.stats)}else z.add(_),this.fsw._symlinkPaths.set(u,g),this.fsw._emit(A4.ADD,U,$.stats);return this.fsw._emitReady(),!0}if(this.fsw._symlinkPaths.has(u))return!0;this.fsw._symlinkPaths.set(u,!0)}_handleRead($,I,U,_,u,z,g){$=B$.join($,"");let v=_?`${$}:${_}`:$;if(g=this.fsw._throttle("readdir",v,1000),!g)return;let J=this.fsw._getWatchedDir(U.path),N=new Set,X=this.fsw._readdirp($,{fileFilter:(G)=>U.filterPath(G),directoryFilter:(G)=>U.filterDir(G)});if(!X)return;return X.on(QE,async(G)=>{if(this.fsw.closed){X=void 0;return}let q=G.path,T=B$.join($,q);if(N.add(q),G.stats.isSymbolicLink()&&await this._handleSymlink(G,$,T,q))return;if(this.fsw.closed){X=void 0;return}if(q===_||!_&&!J.has(q))this.fsw._incrReadyCount(),T=B$.join(u,B$.relative(u,T)),this._addToNodeFs(T,I,U,z+1)}).on(A4.ERROR,this._boundHandleError),new Promise((G,q)=>{if(!X)return q();X.once(D9,()=>{if(this.fsw.closed){X=void 0;return}let T=g?g.clear():!1;if(G(void 0),J.getChildren().filter((H)=>{return H!==$&&!N.has(H)}).forEach((H)=>{this.fsw._remove($,H)}),X=void 0,T)this._handleRead($,!1,U,_,u,z,g)})})}async _handleDir($,I,U,_,u,z,g){let v=this.fsw._getWatchedDir(B$.dirname($)),J=v.has(B$.basename($));if(!(U&&this.fsw.options.ignoreInitial)&&!u&&!J)this.fsw._emit(A4.ADD_DIR,$,I);v.add(B$.basename($)),this.fsw._getWatchedDir($);let N,X,G=this.fsw.options.depth;if((G==null||_<=G)&&!this.fsw._symlinkPaths.has(g)){if(!u){if(await this._handleRead($,U,z,u,$,_,N),this.fsw.closed)return}X=this._watchWithNodeFs($,(q,T)=>{if(T&&T.mtimeMs===0)return;this._handleRead(q,!1,z,u,$,_,N)})}return X}async _addToNodeFs($,I,U,_,u){let z=this.fsw._emitReady;if(this.fsw._isIgnored($)||this.fsw.closed)return z(),!1;let g=this.fsw._getWatchHelpers($);if(U)g.filterPath=(v)=>U.filterPath(v),g.filterDir=(v)=>U.filterDir(v);try{let v=await VE[g.statMethod](g.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(g.watchPath,v))return z(),!1;let J=this.fsw.options.followSymlinks,N;if(v.isDirectory()){let X=B$.resolve($),G=J?await O9($):$;if(this.fsw.closed)return;if(N=await this._handleDir(g.watchPath,v,I,_,u,g,G),this.fsw.closed)return;if(X!==G&&G!==void 0)this.fsw._symlinkPaths.set(X,G)}else if(v.isSymbolicLink()){let X=J?await O9($):$;if(this.fsw.closed)return;let G=B$.dirname(g.watchPath);if(this.fsw._getWatchedDir(G).add(g.watchPath),this.fsw._emit(A4.ADD,g.watchPath,v),N=await this._handleDir(G,v,I,_,$,g,X),this.fsw.closed)return;if(X!==void 0)this.fsw._symlinkPaths.set(B$.resolve($),X)}else N=this._handleFile(g.watchPath,v,I);if(z(),N)this.fsw._addPathCloser($,N);return!1}catch(v){if(this.fsw._handleError(v))return z(),$}}}/*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */var R9="/",bE="//",OY=".",jE="..",FE="string",SE=/\\/g,VY=/\/\//g,wE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,EE=/^\.[/\\]/;function L2($){return Array.isArray($)?$:[$]}var L9=($)=>typeof $==="object"&&$!==null&&!($ instanceof RegExp);function CE($){if(typeof $==="function")return $;if(typeof $==="string")return(I)=>$===I;if($ instanceof RegExp)return(I)=>$.test(I);if(typeof $==="object"&&$!==null)return(I)=>{if($.path===I)return!0;if($.recursive){let U=a.relative($.path,I);if(!U)return!1;return!U.startsWith("..")&&!a.isAbsolute(U)}return!1};return()=>!1}function fE($){if(typeof $!=="string")throw Error("string expected");$=a.normalize($),$=$.replace(/\\/g,"/");let I=!1;if($.startsWith("//"))I=!0;if($=$.replace(VY,"/"),I)$="/"+$;return $}function QY($,I,U){let _=fE(I);for(let u=0;u<$.length;u++){let z=$[u];if(z(_,U))return!0}return!1}function xE($,I){if($==null)throw TypeError("anymatch: specify first argument");let _=L2($).map((u)=>CE(u));if(I==null)return(u,z)=>{return QY(_,u,z)};return QY(_,I)}var TY=($)=>{let I=L2($).flat();if(!I.every((U)=>typeof U===FE))throw TypeError(`Non-string provided as watch path: ${I}`);return I.map(BY)},HY=($)=>{let I=$.replace(SE,R9),U=!1;if(I.startsWith(bE))U=!0;if(I=I.replace(VY,R9),U)I=R9+I;return I},BY=($)=>HY(a.normalize(HY($))),YY=($="")=>(I)=>{if(typeof I==="string")return BY(a.isAbsolute(I)?I:a.join($,I));else return I},kE=($,I)=>{if(a.isAbsolute($))return $;return a.join(I,$)},yE=Object.freeze(new Set);class DY{path;_removeWatcher;items;constructor($,I){this.path=$,this._removeWatcher=I,this.items=new Set}add($){let{items:I}=this;if(!I)return;if($!==OY&&$!==jE)I.add($)}async remove($){let{items:I}=this;if(!I)return;if(I.delete($),I.size>0)return;let U=this.path;try{await ZE(U)}catch(_){if(this._removeWatcher)this._removeWatcher(a.dirname(U),a.basename(U))}}has($){let{items:I}=this;if(!I)return;return I.has($)}getChildren(){let{items:$}=this;if(!$)return[];return[...$.values()]}dispose(){this.items.clear(),this.path="",this._removeWatcher=K2,this.items=yE,Object.freeze(this)}}var iE="stat",nE="lstat";class MY{fsw;path;watchPath;fullWatchPath;dirParts;followSymlinks;statMethod;constructor($,I,U){this.fsw=U;let _=$;this.path=$=$.replace(EE,""),this.watchPath=_,this.fullWatchPath=a.resolve(_),this.dirParts=[],this.dirParts.forEach((u)=>{if(u.length>1)u.pop()}),this.followSymlinks=I,this.statMethod=I?iE:nE}entryPath($){return a.join(this.watchPath,a.relative(this.watchPath,$.fullPath))}filterPath($){let{stats:I}=$;if(I&&I.isSymbolicLink())return this.filterDir($);let U=this.entryPath($);return this.fsw._isntIgnored(U,I)&&this.fsw._hasReadPermissions(I)}filterDir($){return this.fsw._isntIgnored(this.entryPath($),$.stats)}}class KY extends WE{closed;options;_closers;_ignoredPaths;_throttled;_streams;_symlinkPaths;_watched;_pendingWrites;_pendingUnlinks;_readyCount;_emitReady;_closePromise;_userIgnored;_readyEmitted;_emitRaw;_boundRemove;_nodeFsHandler;constructor($={}){super();this.closed=!1,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._streams=new Set,this._symlinkPaths=new Map,this._watched=new Map,this._pendingWrites=new Map,this._pendingUnlinks=new Map,this._readyCount=0,this._readyEmitted=!1;let I=$.awaitWriteFinish,U={stabilityThreshold:2000,pollInterval:100},_={persistent:!0,ignoreInitial:!1,ignorePermissionErrors:!1,interval:100,binaryInterval:300,followSymlinks:!0,usePolling:!1,atomic:!0,...$,ignored:$.ignored?L2($.ignored):L2([]),awaitWriteFinish:I===!0?U:typeof I==="object"?{...U,...I}:!1};if(XY)_.usePolling=!0;if(_.atomic===void 0)_.atomic=!_.usePolling;let u=process.env.CHOKIDAR_USEPOLLING;if(u!==void 0){let v=u.toLowerCase();if(v==="false"||v==="0")_.usePolling=!1;else if(v==="true"||v==="1")_.usePolling=!0;else _.usePolling=!!v}let z=process.env.CHOKIDAR_INTERVAL;if(z)_.interval=Number.parseInt(z,10);let g=0;this._emitReady=()=>{if(g++,g>=this._readyCount)this._emitReady=K2,this._readyEmitted=!0,process.nextTick(()=>this.emit(H$.READY))},this._emitRaw=(...v)=>this.emit(H$.RAW,...v),this._boundRemove=this._remove.bind(this),this.options=_,this._nodeFsHandler=new K9(this),Object.freeze(_)}_addIgnoredPath($){if(L9($)){for(let I of this._ignoredPaths)if(L9(I)&&I.path===$.path&&I.recursive===$.recursive)return}this._ignoredPaths.add($)}_removeIgnoredPath($){if(this._ignoredPaths.delete($),typeof $==="string"){for(let I of this._ignoredPaths)if(L9(I)&&I.path===$)this._ignoredPaths.delete(I)}}add($,I,U){let{cwd:_}=this.options;this.closed=!1,this._closePromise=void 0;let u=TY($);if(_)u=u.map((z)=>{return kE(z,_)});if(u.forEach((z)=>{this._removeIgnoredPath(z)}),this._userIgnored=void 0,!this._readyCount)this._readyCount=0;return this._readyCount+=u.length,Promise.all(u.map(async(z)=>{let g=await this._nodeFsHandler._addToNodeFs(z,!U,void 0,0,I);if(g)this._emitReady();return g})).then((z)=>{if(this.closed)return;z.forEach((g)=>{if(g)this.add(a.dirname(g),a.basename(I||g))})}),this}unwatch($){if(this.closed)return this;let I=TY($),{cwd:U}=this.options;return I.forEach((_)=>{if(!a.isAbsolute(_)&&!this._closers.has(_)){if(U)_=a.join(U,_);_=a.resolve(_)}if(this._closePath(_),this._addIgnoredPath(_),this._watched.has(_))this._addIgnoredPath({path:_,recursive:!0});this._userIgnored=void 0}),this}close(){if(this._closePromise)return this._closePromise;this.closed=!0,this.removeAllListeners();let $=[];return this._closers.forEach((I)=>I.forEach((U)=>{let _=U();if(_ instanceof Promise)$.push(_)})),this._streams.forEach((I)=>I.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach((I)=>I.dispose()),this._closers.clear(),this._watched.clear(),this._streams.clear(),this._symlinkPaths.clear(),this._throttled.clear(),this._closePromise=$.length?Promise.all($).then(()=>{return}):Promise.resolve(),this._closePromise}getWatched(){let $={};return this._watched.forEach((I,U)=>{let u=(this.options.cwd?a.relative(this.options.cwd,U):U)||OY;$[u]=I.getChildren().sort()}),$}emitWithAll($,I){if(this.emit($,...I),$!==H$.ERROR)this.emit(H$.ALL,$,...I)}async _emit($,I,U){if(this.closed)return;let _=this.options;if(M9)I=a.normalize(I);if(_.cwd)I=a.relative(_.cwd,I);let u=[I];if(U!=null)u.push(U);let z=_.awaitWriteFinish,g;if(z&&(g=this._pendingWrites.get(I)))return g.lastChange=new Date,this;if(_.atomic){if($===H$.UNLINK)return this._pendingUnlinks.set(I,[$,...u]),setTimeout(()=>{this._pendingUnlinks.forEach((v,J)=>{this.emit(...v),this.emit(H$.ALL,...v),this._pendingUnlinks.delete(J)})},typeof _.atomic==="number"?_.atomic:100),this;if($===H$.ADD&&this._pendingUnlinks.has(I))$=H$.CHANGE,this._pendingUnlinks.delete(I)}if(z&&($===H$.ADD||$===H$.CHANGE)&&this._readyEmitted){let v=(J,N)=>{if(J)$=H$.ERROR,u[0]=J,this.emitWithAll($,u);else if(N){if(u.length>1)u[1]=N;else u.push(N);this.emitWithAll($,u)}};return this._awaitWriteFinish(I,z.stabilityThreshold,$,v),this}if($===H$.CHANGE){if(!this._throttle(H$.CHANGE,I,50))return this}if(_.alwaysStat&&U===void 0&&($===H$.ADD||$===H$.ADD_DIR||$===H$.CHANGE)){let v=_.cwd?a.join(_.cwd,I):I,J;try{J=await AE(v)}catch(N){}if(!J||this.closed)return;u.push(J)}return this.emitWithAll($,u),this}_handleError($){let I=$&&$.code;if($&&I!=="ENOENT"&&I!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||I!=="EPERM"&&I!=="EACCES"))this.emit(H$.ERROR,$);return $||this.closed}_throttle($,I,U){if(!this._throttled.has($))this._throttled.set($,new Map);let _=this._throttled.get($);if(!_)throw Error("invalid throttle");let u=_.get(I);if(u)return u.count++,!1;let z,g=()=>{let J=_.get(I),N=J?J.count:0;if(_.delete(I),clearTimeout(z),J)clearTimeout(J.timeoutObject);return N};z=setTimeout(g,U);let v={timeoutObject:z,clear:g,count:0};return _.set(I,v),v}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish($,I,U,_){let u=this.options.awaitWriteFinish;if(typeof u!=="object")return;let z=u.pollInterval,g,v=$;if(this.options.cwd&&!a.isAbsolute($))v=a.join(this.options.cwd,$);let J=new Date,N=this._pendingWrites;function X(G){PE(v,(q,T)=>{if(q||!N.has($)){if(q&&q.code!=="ENOENT")_(q);return}let H=Number(new Date);if(G&&T.size!==G.size)N.get($).lastChange=H;let Q=N.get($);if(H-Q.lastChange>=I)N.delete($),_(void 0,T);else g=setTimeout(X,z,T)})}if(!N.has($))N.set($,{lastChange:J,cancelWait:()=>{return N.delete($),clearTimeout(g),U}}),g=setTimeout(X,z)}_isIgnored($,I){if(this.options.atomic&&wE.test($))return!0;if(!this._userIgnored){let{cwd:U}=this.options,u=(this.options.ignored||[]).map(YY(U)),g=[...[...this._ignoredPaths].map(YY(U)),...u];this._userIgnored=xE(g,void 0)}return this._userIgnored($,I)}_isntIgnored($,I){return!this._isIgnored($,I)}_getWatchHelpers($){return new MY($,this.options.followSymlinks,this)}_getWatchedDir($){let I=a.resolve($);if(!this._watched.has(I))this._watched.set(I,new DY(I,this._boundRemove));return this._watched.get(I)}_hasReadPermissions($){if(this.options.ignorePermissionErrors)return!0;return Boolean(Number($.mode)&256)}_remove($,I,U){let _=a.join($,I),u=a.resolve(_);if(U=U!=null?U:this._watched.has(_)||this._watched.has(u),!this._throttle("remove",_,100))return;if(!U&&this._watched.size===1)this.add($,I,!0);this._getWatchedDir(_).getChildren().forEach((G)=>this._remove(_,G));let v=this._getWatchedDir($),J=v.has(I);if(v.remove(I),this._symlinkPaths.has(u))this._symlinkPaths.delete(u);let N=_;if(this.options.cwd)N=a.relative(this.options.cwd,_);if(this.options.awaitWriteFinish&&this._pendingWrites.has(N)){if(this._pendingWrites.get(N).cancelWait()===H$.ADD)return}this._watched.delete(_),this._watched.delete(u);let X=U?H$.UNLINK_DIR:H$.UNLINK;if(J&&!this._isIgnored(_))this._emit(X,_);this._closePath(_)}_closePath($){this._closeFile($);let I=a.dirname($);this._getWatchedDir(I).remove(a.basename($))}_closeFile($){let I=this._closers.get($);if(!I)return;I.forEach((U)=>U()),this._closers.delete($)}_addPathCloser($,I){if(!I)return;let U=this._closers.get($);if(!U)U=[],this._closers.set($,U);U.push(I)}_readdirp($,I){if(this.closed)return;let U={type:H$.ALL,alwaysStat:!0,lstat:!0,...I,depth:0},_=gY($,U);return this._streams.add(_),_.once(GY,()=>{_=void 0}),_.once(D9,()=>{if(_)this._streams.delete(_),_=void 0}),_}}function W2($,I={}){let U=new KY(I);return U.add($),U}var PI=q$(b$(),1);var vf=q$(OO(),1),Jf=q$(j9(),1),Nf=q$(S9(),1),y9=q$(f2(),1),i9=q$(LO(),1);var WO=process.env.DASHBOARD_PORT?parseInt(process.env.DASHBOARD_PORT||"9847",10):9847;function Tf(){if(process.env.MEMORIES_DIR)return process.env.MEMORIES_DIR;let $=process.argv[3];if($)return j4($,".serena","memories");return j4(process.cwd(),".serena","memories")}function Iu($){try{return qf($,"utf-8")}catch{return""}}function Hf($){try{let I=$u($);if(I.includes("orchestrator-session.md"))return j4($,"orchestrator-session.md");let U=I.filter((_)=>/^session-.*\.md$/.test(_)).map((_)=>({name:_,mtime:l9(j4($,_)).mtimeMs})).sort((_,u)=>u.mtime-_.mtime);if(U.length>0&&U[0])return j4($,U[0].name)}catch{}return null}function Yf($){let I=Hf($);if(!I)return{id:"N/A",status:"UNKNOWN"};let U=Iu(I);if(!U)return{id:"N/A",status:"UNKNOWN"};let _=(U.match(/session-id:\s*(.+)/i)||[])[1]||(U.match(/# Session:\s*(.+)/i)||[])[1]||U.match(/(session-\d{8}-\d{6})/)?.[1]||PO(I,".md")||"N/A",u="UNKNOWN";if(/IN PROGRESS|RUNNING|## Active|\[IN PROGRESS\]/i.test(U))u="RUNNING";else if(/COMPLETED|DONE|## Completed|\[COMPLETED\]/i.test(U))u="COMPLETED";else if(/FAILED|ERROR|## Failed|\[FAILED\]/i.test(U))u="FAILED";else if(/Step \d+:.*\[/i.test(U))u="RUNNING";return{id:_.trim(),status:u}}function Of($){let I=Iu(j4($,"task-board.md"));if(!I)return[];let U=[],_=I.split(`
434
+ `);for(let u of _){if(!u.startsWith("|")||/^\|\s*-+/.test(u))continue;let z=u.split("|").map((v)=>v.trim()).filter(Boolean),g=z[0];if(z.length<2||!g||/^agent$/i.test(g))continue;U.push({agent:z[0]||"",status:z[1]||"pending",task:z[2]||""})}return U}function r9($,I){try{let U=$u($).filter((z)=>z.startsWith(`progress-${I}`)&&z.endsWith(".md")).sort().reverse();if(U.length===0)return null;let u=(U[0]?Iu(j4($,U[0])):"").match(/turn[:\s]*(\d+)/i);return u?.[1]?parseInt(u[1],10):null}catch{return null}}function Vf($){try{return $u($).filter((U)=>U.endsWith(".md")&&U!==".gitkeep").map((U)=>({name:U,mtime:l9(j4($,U)).mtimeMs})).sort((U,_)=>_.mtime-U.mtime).slice(0,5).map((U)=>{let _=U.name.replace(/^(progress|result|session|debug|task)-?/,"").replace(/[-_]agent/,"").replace(/[-_]completion/,"").replace(/\.md$/,"").replace(/[-_]/g," ").trim()||U.name.replace(/\.md$/,""),z=Iu(j4($,U.name)).split(`
435
+ `).map((v)=>v.trim()).filter((v)=>v&&!v.startsWith("---")&&v.length>3),g="";for(let v=z.length-1;v>=0;v--){let J=z[v];if(!J)continue;if(/^\*\*|^#+|^-|^\d+\.|Status|Result|Action|Step/i.test(J)){if(g=J.replace(/^[#*\-\d.]+\s*/,"").replace(/\*\*/g,"").trim(),g.length>5)break}}if(g.length>80)g=`${g.substring(0,77)}...`;return{agent:_,message:g,file:U.name}}).filter((U)=>U.message)}catch{return[]}}function Bf($){let I=[],U=new Set;try{let _=$u($).filter((u)=>u.endsWith(".md")&&u!==".gitkeep").map((u)=>({name:u,mtime:l9(j4($,u)).mtimeMs})).sort((u,z)=>z.mtime-u.mtime);for(let u of _){let z=Iu(j4($,u.name)),g=z.match(/\*\*Agent\*\*:\s*(.+)/i)||z.match(/Agent:\s*(.+)/i)||z.match(/^#+\s*(.+?)\s*Agent/im),v=null;if(g?.[1])v=g[1].trim();else if(/_agent|agent_|-agent/i.test(u.name))v=u.name.replace(/\.md$/,"").replace(/[-_]completion|[-_]progress|[-_]result/gi,"").replace(/[-_]/g," ").trim();if(v&&!U.has(v.toLowerCase())){U.add(v.toLowerCase());let J="unknown";if(/\[COMPLETED\]|## Completed|## Results/i.test(z))J="completed";else if(/\[IN PROGRESS\]|## Progress|IN PROGRESS/i.test(z))J="running";else if(/\[FAILED\]|## Failed|ERROR/i.test(z))J="failed";let N=z.match(/## Task\s*\n+(.+)/i)||z.match(/\*\*Task\*\*:\s*(.+)/i),X=N?.[1]?N[1].trim().substring(0,60):"";I.push({agent:v,status:J,task:X,turn:r9($,v)})}}}catch{}return I}function n9($){let I=Yf($),_=Of($).map((u)=>({...u,turn:r9($,u.agent)}));if(_.length===0)_=Bf($);if(_.length===0)try{let u=$u($).filter((z)=>z.startsWith("progress-")&&z.endsWith(".md"));for(let z of u){let g=z.replace(/^progress-/,"").replace(/\.md$/,"");_.push({agent:g,status:"running",task:"",turn:r9($,g)})}}catch{}return{session:I,agents:_,activity:Vf($),memoriesDir:$,updatedAt:new Date().toISOString()}}var Df=`<!DOCTYPE html>
436
436
  <html lang="en">
437
437
  <head>
438
438
  <meta charset="UTF-8">
@@ -489,15 +489,15 @@ Co-Authored-By: First Fluke <our.first.fluke@gmail.com>`,pr:"Generated with [oh-
489
489
  fetch('/api/state').then(r=>r.json()).then(renderState).catch(()=>{});connect();
490
490
  </script>
491
491
  </body>
492
- </html>`;function WO(){let $=Gf();if(!zf($))vf($,{recursive:!0});let I=Nf((z,v)=>{if(z.url==="/api/state")v.writeHead(200,{"Content-Type":"application/json"}),v.end(JSON.stringify(n9($)));else v.writeHead(200,{"Content-Type":"text/html"}),v.end(Yf)}),U=new i9.default({server:I}),_=null;function u(z,v){if(_)clearTimeout(_);_=setTimeout(()=>{let J=JSON.stringify({type:"update",event:z,file:v,data:n9($)});U.clients.forEach((N)=>{if(N.readyState===y9.default.OPEN)N.send(J)})},100)}let g=L2($,{persistent:!0,ignoreInitial:!0,awaitWriteFinish:{stabilityThreshold:200,pollInterval:50}});g.on("all",(z,v)=>u(z,RO(v))),U.on("connection",(z)=>{z.send(JSON.stringify({type:"full",data:n9($)})),z.on("error",()=>z.terminate())}),process.on("SIGINT",()=>{console.log(`
493
- Shutting down...`),g.close(),U.clients.forEach((z)=>{z.terminate()}),U.close(()=>I.close(()=>process.exit(0))),setTimeout(()=>process.exit(1),3000).unref()}),process.on("SIGTERM",()=>process.emit("SIGINT")),I.listen(LO,()=>{console.log(RI.magenta(`
494
- \uD83D\uDEF8 Serena Memory Dashboard`)),console.log(RI.white(` http://localhost:${LO}`)),console.log(RI.dim(` Watching: ${$}
495
- `))})}var PO={name:"oh-my-agent",version:"4.20.1",description:"Portable multi-agent harness for .agents-based skills and workflows across Antigravity, Claude Code, Codex, OpenCode, and more",type:"module",bin:{"oh-my-ag":"./bin/cli.js",oma:"./bin/cli.js"},files:["bin"],keywords:["oh-my-agent","antigravity",".agents","agent","skills","agent-skills","multi-agent","orchestrator","claude","claude-code","codex","opencode","copilot","cursor","chatgpt","pm","frontend","backend","mobile","qa","debug","terraform","database","workflow","bug-fixing","gemini"],author:"our.first.fluke <our.first.fluke@gmail.com>",contributors:["gracefullight <gracefullight.dev@gmail.com>","gahyun-git <go4it.gh@gmail.com>"],license:"MIT",funding:[{type:"github",url:"https://github.com/sponsors/first-fluke"},{type:"buymeacoffee",url:"https://buymeacoffee.com/firstfluke"}],scripts:{"sync:readme":"node ./scripts/sync-readme.mjs",build:"bun run sync:readme && bun build cli.ts --outfile bin/cli.js --target node --minify",dev:"bun run cli.ts",lint:"biome check --write --unsafe .",test:"vitest run",prepublishOnly:"bun run build"},dependencies:{"@clack/prompts":"^1.1.0",chokidar:"^5.0.0",commander:"^14.0.3","p-map":"^7.0.4",picocolors:"^1.1.1",ws:"^8.18.0",yaml:"^2.8.2",zod:"^4.3.6"},devDependencies:{"@biomejs/biome":"2.4.5","@types/bun":"^1.3.10","@types/ws":"^8.18.1",vitest:"^4.0.18"},peerDependencies:{typescript:"^6"},repository:{type:"git",url:"https://github.com/first-fluke/oh-my-agent"},antigravity:{skillsPath:".agents/skills",skills:["oma-brainstorm","oma-coordination","oma-pm","oma-frontend","oma-backend","oma-db","oma-mobile","oma-qa","oma-debug","oma-orchestrator","oma-dev-workflow","oma-tf-infra","oma-commit"]}};import{existsSync as Vf,mkdirSync as Bf,readdirSync as Iu,readFileSync as Df,statSync as h9}from"node:fs";import{basename as Mf,join as F4}from"node:path";var n$=q$(b$(),1),Kf="●",Lf="✓",Rf="✗",Wf="○",Pf="◌";function Zf(){if(process.env.MEMORIES_DIR)return process.env.MEMORIES_DIR;let $=process.argv[3];if($)return F4($,".serena","memories");return F4(process.cwd(),".serena","memories")}function uu($){try{return Df($,"utf-8")}catch{return""}}function Af($){try{let I=Iu($);if(I.includes("orchestrator-session.md"))return F4($,"orchestrator-session.md");let U=I.filter((_)=>/^session-.*\.md$/.test(_)).map((_)=>({name:_,mtime:h9(F4($,_)).mtimeMs})).sort((_,u)=>u.mtime-_.mtime);if(U.length>0&&U[0])return F4($,U[0].name)}catch{}return null}function bf($){let I=Af($);if(!I)return{id:"N/A",status:"UNKNOWN"};let U=uu(I);if(!U)return{id:"N/A",status:"UNKNOWN"};let _=(U.match(/session-id:\s*(.+)/i)||[])[1]||(U.match(/# Session:\s*(.+)/i)||[])[1]||U.match(/(session-\d{8}-\d{6})/)?.[1]||Mf(I,".md"),u="UNKNOWN";if(/IN PROGRESS|RUNNING|## Active|\[IN PROGRESS\]/i.test(U))u="RUNNING";else if(/COMPLETED|DONE|## Completed|\[COMPLETED\]/i.test(U))u="COMPLETED";else if(/FAILED|ERROR|## Failed|\[FAILED\]/i.test(U))u="FAILED";else if(/Step \d+:.*\[/i.test(U))u="RUNNING";return{id:(_||"N/A").trim(),status:u}}function jf($){let I=uu(F4($,"task-board.md"));if(!I)return[];let U=[],_=I.split(`
496
- `);for(let u of _){if(!u.startsWith("|")||/^\|\s*-+/.test(u))continue;let g=u.split("|").map((N)=>N.trim()).filter(Boolean),z=g[0];if(g.length<2||!z||/^agent$/i.test(z))continue;let v=g[1],J=g[2];U.push({agent:z,status:v||"pending",task:J||""})}return U}function m9($,I){try{let U=Iu($).filter((g)=>g.startsWith(`progress-${I}`)&&g.endsWith(".md")).sort().reverse();if(U.length===0||!U[0])return null;let u=uu(F4($,U[0])).match(/turn[:\s]*(\d+)/i);return u?.[1]?parseInt(u[1],10):null}catch{return null}}function Ff($){try{let I=Iu($).filter((_)=>_.endsWith(".md")&&_!==".gitkeep").map((_)=>({name:_,mtime:h9(F4($,_)).mtimeMs})).sort((_,u)=>u.mtime-_.mtime).slice(0,5),U=[];for(let _ of I){let u=_.name.replace(/^(progress|result|session|debug|task)-?/,"").replace(/[-_]agent/,"").replace(/[-_]completion/,"").replace(/\.md$/,"").replace(/[-_]/g," ").trim()||_.name.replace(/\.md$/,""),z=uu(F4($,_.name)).split(`
497
- `).map((J)=>J.trim()).filter((J)=>J&&!J.startsWith("---")&&J.length>3),v="";for(let J=z.length-1;J>=0;J--){let N=z[J];if(!N)continue;if(/^\*\*|^#+|^-|^\d+\.|Status|Result|Action|Step/i.test(N)){if(v=N.replace(/^[#*\-\d.]+\s*/,"").replace(/\*\*/g,"").trim(),v.length>5)break}}if(v.length>52)v=`${v.substring(0,49)}...`;if(v)U.push({agent:u,message:v})}return U}catch{return[]}}function Sf($){let I=[],U=new Set;try{let _=Iu($).filter((u)=>u.endsWith(".md")&&u!==".gitkeep").map((u)=>({name:u,mtime:h9(F4($,u)).mtimeMs})).sort((u,g)=>g.mtime-u.mtime);for(let u of _){let g=uu(F4($,u.name)),z=g.match(/\*\*Agent\*\*:\s*(.+)/i)||g.match(/Agent:\s*(.+)/i)||g.match(/^#+\s*(.+?)\s*Agent/im),v=null;if(z?.[1])v=z[1].trim();else if(/_agent|agent_|-agent/i.test(u.name))v=u.name.replace(/\.md$/,"").replace(/[-_]completion|[-_]progress|[-_]result/gi,"").replace(/[-_]/g," ").trim();if(v&&!U.has(v.toLowerCase())){U.add(v.toLowerCase());let J="unknown";if(/\[COMPLETED\]|## Completed|## Results/i.test(g))J="completed";else if(/\[IN PROGRESS\]|## Progress|IN PROGRESS/i.test(g))J="running";else if(/\[FAILED\]|## Failed|ERROR/i.test(g))J="failed";let N=g.match(/## Task\s*\n+(.+)/i)||g.match(/\*\*Task\*\*:\s*(.+)/i),X=N?.[1]?N[1].trim().substring(0,20):"";I.push({agent:v,status:J,task:X,turn:m9($,v)})}}}catch{}return I}function wf($){let I=$.toLowerCase();if(["running","active","in_progress","in-progress"].includes(I))return`${n$.default.green(Kf)} running`;else if(["completed","done","finished"].includes(I))return`${n$.default.cyan(Lf)} completed`;else if(["failed","error"].includes(I))return`${n$.default.red(Rf)} failed`;else if(["blocked","waiting"].includes(I))return`${n$.default.yellow(Wf)} blocked`;return`${n$.default.dim(Pf)} pending`}function ZO($){console.clear();let I=bf($),_=jf($).map((Q)=>({...Q,turn:m9($,Q.agent)}));if(_.length===0)_=Sf($);if(_.length===0)try{let Q=Iu($).filter((Y)=>Y.startsWith("progress-")&&Y.endsWith(".md"));for(let Y of Q){let K=Y.replace(/^progress-/,"").replace(/\.md$/,"");_.push({agent:K,status:"running",task:"",turn:m9($,K)})}}catch{}let u=56,g="═".repeat(u),z=(Q)=>" ".repeat(Math.max(0,Q)),v=(Q)=>n$.default.magenta(Q),J=(Q)=>n$.default.bold(Q),N=(Q)=>n$.default.dim(Q),X=n$.default.yellow;if(I.status==="RUNNING")X=n$.default.green;else if(I.status==="COMPLETED")X=n$.default.cyan;else if(I.status==="FAILED")X=n$.default.red;console.log(`${v(`╔${g}╗`)}`),console.log(`${v("║")} ${J(v("Serena Memory Dashboard"))}${z(u-25)}${v("║")}`);let G=`Session: ${J(I.id.padEnd(20))} [${X(I.status)}]`;if(console.log(`${v("║")} ${G}${z(u-4-G.length-9)}${v("║")}`),console.log(`${v(`╠${g}╣`)}`),console.log(`${v("║")} ${J(`${"Agent".padEnd(12)} ${"Status".padEnd(12)} ${"Turn".padEnd(6)} ${"Task".padEnd(20)}`)} ${v("║")}`),console.log(`${v("║")} ${N(`${"──────────".padEnd(12)} ${"──────────".padEnd(12)} ${"────".padEnd(6)} ${"──────────────────".padEnd(20)}`)} ${v("║")}`),_.length===0)console.log(`${v("║")} ${N(`No agents detected yet${z(32)}`)}${v("║")}`);else for(let Q of _){let Y=wf(Q.status),K=Q.turn!=null?String(Q.turn):"-",L=Q.task.substring(0,20);console.log(`${v("║")} ${Q.agent.padEnd(12)} ${Y.padEnd(22)} ${K.padEnd(6)} ${L.padEnd(20)}${v("║")}`)}console.log(`${v(`╠${g}╣`)}`),console.log(`${v("║")} ${J("Latest Activity:")}${z(u-18)}${v("║")}`);let q=Ff($);if(q.length===0)console.log(`${v("║")} ${N(`No activity yet${z(38)}`)}${v("║")}`);else for(let Q of q){let Y=`[${Q.agent}] ${Q.message}`;console.log(`${v("║")} ${N(Y.substring(0,52).padEnd(52))}${v("║")}`)}console.log(`${v(`╠${g}╣`)}`);let H=`Updated: ${new Date().toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})} | Ctrl+C to exit`;console.log(`${v("║")} ${N(H)}${z(u-4-H.length)}${v("║")}`),console.log(`${v(`╚${g}╝`)}`)}async function AO(){let $=Zf();if(!Vf($))Bf($,{recursive:!0}),console.log(n$.default.yellow(`Created ${$} — waiting for memory files...`));console.log(n$.default.magenta(`
498
- \uD83D\uDEF8 Serena Terminal Dashboard`)),console.log(n$.default.dim(` Watching: ${$}
499
- `)),ZO($);let I=L2($,{persistent:!0,ignoreInitial:!0,awaitWriteFinish:{stabilityThreshold:200,pollInterval:50}});return I.on("all",()=>ZO($)),new Promise((U)=>{process.on("SIGINT",()=>{console.log(`
500
- `),I.close(),U(),process.exit(0)}),process.on("SIGTERM",()=>process.emit("SIGINT"))})}var SO=PO.version,wO="OH_MY_AG_OUTPUT_FORMAT",Uu=["text","json"],bO=["gemini","claude","codex","qwen"],jO=["backend","frontend","mobile","qa","debug","pm"];function v6($,I="Output as JSON"){return $.option("--json",I).option("--output <format>","Output format (text/json)",(U)=>{let _=U.trim().toLowerCase();if(!Uu.includes(_))throw Error(`Invalid output format: ${U}. Expected one of ${Uu.join(", ")}`);return _})}function Ef($){if($?.json)return"json";let I=$?.output?.trim().toLowerCase();if(I&&Uu.includes(I))return I;if(process.env[wO]?.trim().toLowerCase()==="json")return"json";return"text"}function h4($){return Ef($)==="json"}function EO($){let I=$.at(-1);return I instanceof c2?I:null}function Cf($){let I=EO($);if(I)return I.opts();let U=$.at(-1);return U&&typeof U==="object"?U:{}}function ff($){if($ instanceof Error)return $.message;return String($)}function k6($){throw Error($)}function d9($,I){for(let U of $){let _=U.charCodeAt(0);if(_>=0&&_<=31||_===127)k6(`${I} must not contain control characters`)}}function xf($,I){if(d9($,I),/[?#%]/.test($))k6(`${I} must not contain ?, #, or %`);if($.includes(".."))k6(`${I} must not contain '..'`)}function kf($,I){d9($,I);try{new URL($)}catch{k6(`${I} must be a valid absolute URL`)}}function c9($,I,U="text"){if(typeof $==="string"){if(U==="identifier"){xf($,I);return}if(U==="url"){kf($,I);return}d9($,I);return}if(Array.isArray($))for(let[_,u]of $.entries())c9(u,`${I}[${_}]`,U)}function FO($){let I=$.toLowerCase();if(I==="url"||I.endsWith("url"))return"url";if(I.includes("id")||I.includes("type")||I.includes("vendor")||I.includes("session"))return"identifier";return"text"}function yf($){let I=$.vendor;if(typeof I==="string"&&!bO.includes(I))k6(`vendor must be one of ${bO.join(", ")}`);let U=$.output;if(typeof U==="string"&&!Uu.includes(U))k6(`output must be one of ${Uu.join(", ")}`)}function nf($){let I=$.processedArgs??$.args??[];($.registeredArguments??[]).forEach((u,g)=>{let z=u.name?.()||String(g),v=I[g];if(c9(v,z,FO(z)),z==="agent-type"&&typeof v==="string"&&!jO.includes(v))k6(`agent-type must be one of ${jO.join(", ")}`)});let _=$.opts();yf(_);for(let[u,g]of Object.entries(_))c9(g,u,FO(u))}function rf($){return($.registeredArguments??[]).map((I)=>({name:I.name?.()||"",required:!!I.required,variadic:!!I.variadic}))}function lf($){return $.options.map((I)=>({flags:I.flags,long:I.long||void 0,short:I.short||void 0,description:I.description||"",required:!!I.required||!!I.mandatory,optional:!!I.optional,defaultValue:I.defaultValue}))}function CO($){let I=[],U=$;while(U?.parent)I.unshift(U.name()),U=U.parent;return I.join(" ")}function mf($){return $.options.some((I)=>I.long==="--json"||I.long==="--output")}function hf($){return $.options.some((I)=>I.long==="--dry-run")}function fO($){return{name:$.name(),path:CO($),summary:$.summary()||void 0,description:$.description(),arguments:rf($),options:lf($),supportsJsonOutput:mf($),supportsDryRun:hf($),subcommands:$.commands.map((I)=>fO(I))}}function cf($,I){if(!I)return $;let U=I.trim();if(!U)return $;let _=[...$.commands];while(_.length>0){let u=_.shift();if(!u)continue;if(u.name()===U||CO(u)===U)return u;_.push(...u.commands)}return null}function df($,I){let U=cf($,I);if(!U)k6(`Unknown command: ${I}`);let _={name:$.name(),version:$.version(),description:$.description(),env:{[wO]:"Set to json to force machine-readable output on commands that support it."},command:fO(U)};console.log(JSON.stringify(_,null,2))}function K$($,I={}){return async(...U)=>{let _=EO(U),u=Cf(U);try{if(_)nf(_);await $(...U)}catch(g){let z=ff(g);if(I.supportsJsonOutput&&h4(u))console.log(JSON.stringify({error:z},null,2));else console.error(z);process.exitCode=1}}}var X$=new c2;X$.name("oh-my-agent").description("Multi-Agent Orchestrator for AI IDEs").version(SO).showSuggestionAfterError().showHelpAfterError().addHelpText("after",`
492
+ </html>`;function ZO(){let $=Tf();if(!Gf($))Xf($,{recursive:!0});let I=Qf((g,v)=>{if(g.url==="/api/state")v.writeHead(200,{"Content-Type":"application/json"}),v.end(JSON.stringify(n9($)));else v.writeHead(200,{"Content-Type":"text/html"}),v.end(Df)}),U=new i9.default({server:I}),_=null;function u(g,v){if(_)clearTimeout(_);_=setTimeout(()=>{let J=JSON.stringify({type:"update",event:g,file:v,data:n9($)});U.clients.forEach((N)=>{if(N.readyState===y9.default.OPEN)N.send(J)})},100)}let z=W2($,{persistent:!0,ignoreInitial:!0,awaitWriteFinish:{stabilityThreshold:200,pollInterval:50}});z.on("all",(g,v)=>u(g,PO(v))),U.on("connection",(g)=>{g.send(JSON.stringify({type:"full",data:n9($)})),g.on("error",()=>g.terminate())}),process.on("SIGINT",()=>{console.log(`
493
+ Shutting down...`),z.close(),U.clients.forEach((g)=>{g.terminate()}),U.close(()=>I.close(()=>process.exit(0))),setTimeout(()=>process.exit(1),3000).unref()}),process.on("SIGTERM",()=>process.emit("SIGINT")),I.listen(WO,()=>{console.log(PI.magenta(`
494
+ \uD83D\uDEF8 Serena Memory Dashboard`)),console.log(PI.white(` http://localhost:${WO}`)),console.log(PI.dim(` Watching: ${$}
495
+ `))})}var AO={name:"oh-my-agent",version:"4.21.0",description:"Portable multi-agent harness for .agents-based skills and workflows across Antigravity, Claude Code, Codex, OpenCode, and more",type:"module",bin:{"oh-my-ag":"./bin/cli.js",oma:"./bin/cli.js"},files:["bin"],keywords:["oh-my-agent","antigravity",".agents","agent","skills","agent-skills","multi-agent","orchestrator","claude","claude-code","codex","opencode","copilot","cursor","chatgpt","pm","frontend","backend","mobile","qa","debug","terraform","database","workflow","bug-fixing","gemini"],author:"our.first.fluke <our.first.fluke@gmail.com>",contributors:["gracefullight <gracefullight.dev@gmail.com>","gahyun-git <go4it.gh@gmail.com>"],license:"MIT",funding:[{type:"github",url:"https://github.com/sponsors/first-fluke"},{type:"buymeacoffee",url:"https://buymeacoffee.com/firstfluke"}],scripts:{"sync:readme":"node ./scripts/sync-readme.mjs",build:"bun run sync:readme && bun build cli.ts --outfile bin/cli.js --target node --minify",dev:"bun run cli.ts",lint:"biome check --write --unsafe .",test:"vitest run",prepublishOnly:"bun run build"},dependencies:{"@clack/prompts":"^1.1.0",chokidar:"^5.0.0",commander:"^14.0.3","p-map":"^7.0.4",picocolors:"^1.1.1",ws:"^8.18.0",yaml:"^2.8.2",zod:"^4.3.6"},devDependencies:{"@biomejs/biome":"2.4.5","@types/bun":"^1.3.10","@types/ws":"^8.18.1",vitest:"^4.0.18"},peerDependencies:{typescript:"^6"},repository:{type:"git",url:"https://github.com/first-fluke/oh-my-agent"},antigravity:{skillsPath:".agents/skills",skills:["oma-brainstorm","oma-coordination","oma-pm","oma-frontend","oma-backend","oma-db","oma-mobile","oma-qa","oma-debug","oma-orchestrator","oma-dev-workflow","oma-tf-infra","oma-commit"]}};import{existsSync as Kf,mkdirSync as Rf,readdirSync as uu,readFileSync as Lf,statSync as h9}from"node:fs";import{basename as Wf,join as F4}from"node:path";var i$=q$(b$(),1),Pf="●",Zf="✓",Af="✗",bf="○",jf="◌";function Ff(){if(process.env.MEMORIES_DIR)return process.env.MEMORIES_DIR;let $=process.argv[3];if($)return F4($,".serena","memories");return F4(process.cwd(),".serena","memories")}function Uu($){try{return Lf($,"utf-8")}catch{return""}}function Sf($){try{let I=uu($);if(I.includes("orchestrator-session.md"))return F4($,"orchestrator-session.md");let U=I.filter((_)=>/^session-.*\.md$/.test(_)).map((_)=>({name:_,mtime:h9(F4($,_)).mtimeMs})).sort((_,u)=>u.mtime-_.mtime);if(U.length>0&&U[0])return F4($,U[0].name)}catch{}return null}function wf($){let I=Sf($);if(!I)return{id:"N/A",status:"UNKNOWN"};let U=Uu(I);if(!U)return{id:"N/A",status:"UNKNOWN"};let _=(U.match(/session-id:\s*(.+)/i)||[])[1]||(U.match(/# Session:\s*(.+)/i)||[])[1]||U.match(/(session-\d{8}-\d{6})/)?.[1]||Wf(I,".md"),u="UNKNOWN";if(/IN PROGRESS|RUNNING|## Active|\[IN PROGRESS\]/i.test(U))u="RUNNING";else if(/COMPLETED|DONE|## Completed|\[COMPLETED\]/i.test(U))u="COMPLETED";else if(/FAILED|ERROR|## Failed|\[FAILED\]/i.test(U))u="FAILED";else if(/Step \d+:.*\[/i.test(U))u="RUNNING";return{id:(_||"N/A").trim(),status:u}}function Ef($){let I=Uu(F4($,"task-board.md"));if(!I)return[];let U=[],_=I.split(`
496
+ `);for(let u of _){if(!u.startsWith("|")||/^\|\s*-+/.test(u))continue;let z=u.split("|").map((N)=>N.trim()).filter(Boolean),g=z[0];if(z.length<2||!g||/^agent$/i.test(g))continue;let v=z[1],J=z[2];U.push({agent:g,status:v||"pending",task:J||""})}return U}function m9($,I){try{let U=uu($).filter((z)=>z.startsWith(`progress-${I}`)&&z.endsWith(".md")).sort().reverse();if(U.length===0||!U[0])return null;let u=Uu(F4($,U[0])).match(/turn[:\s]*(\d+)/i);return u?.[1]?parseInt(u[1],10):null}catch{return null}}function Cf($){try{let I=uu($).filter((_)=>_.endsWith(".md")&&_!==".gitkeep").map((_)=>({name:_,mtime:h9(F4($,_)).mtimeMs})).sort((_,u)=>u.mtime-_.mtime).slice(0,5),U=[];for(let _ of I){let u=_.name.replace(/^(progress|result|session|debug|task)-?/,"").replace(/[-_]agent/,"").replace(/[-_]completion/,"").replace(/\.md$/,"").replace(/[-_]/g," ").trim()||_.name.replace(/\.md$/,""),g=Uu(F4($,_.name)).split(`
497
+ `).map((J)=>J.trim()).filter((J)=>J&&!J.startsWith("---")&&J.length>3),v="";for(let J=g.length-1;J>=0;J--){let N=g[J];if(!N)continue;if(/^\*\*|^#+|^-|^\d+\.|Status|Result|Action|Step/i.test(N)){if(v=N.replace(/^[#*\-\d.]+\s*/,"").replace(/\*\*/g,"").trim(),v.length>5)break}}if(v.length>52)v=`${v.substring(0,49)}...`;if(v)U.push({agent:u,message:v})}return U}catch{return[]}}function ff($){let I=[],U=new Set;try{let _=uu($).filter((u)=>u.endsWith(".md")&&u!==".gitkeep").map((u)=>({name:u,mtime:h9(F4($,u)).mtimeMs})).sort((u,z)=>z.mtime-u.mtime);for(let u of _){let z=Uu(F4($,u.name)),g=z.match(/\*\*Agent\*\*:\s*(.+)/i)||z.match(/Agent:\s*(.+)/i)||z.match(/^#+\s*(.+?)\s*Agent/im),v=null;if(g?.[1])v=g[1].trim();else if(/_agent|agent_|-agent/i.test(u.name))v=u.name.replace(/\.md$/,"").replace(/[-_]completion|[-_]progress|[-_]result/gi,"").replace(/[-_]/g," ").trim();if(v&&!U.has(v.toLowerCase())){U.add(v.toLowerCase());let J="unknown";if(/\[COMPLETED\]|## Completed|## Results/i.test(z))J="completed";else if(/\[IN PROGRESS\]|## Progress|IN PROGRESS/i.test(z))J="running";else if(/\[FAILED\]|## Failed|ERROR/i.test(z))J="failed";let N=z.match(/## Task\s*\n+(.+)/i)||z.match(/\*\*Task\*\*:\s*(.+)/i),X=N?.[1]?N[1].trim().substring(0,20):"";I.push({agent:v,status:J,task:X,turn:m9($,v)})}}}catch{}return I}function xf($){let I=$.toLowerCase();if(["running","active","in_progress","in-progress"].includes(I))return`${i$.default.green(Pf)} running`;else if(["completed","done","finished"].includes(I))return`${i$.default.cyan(Zf)} completed`;else if(["failed","error"].includes(I))return`${i$.default.red(Af)} failed`;else if(["blocked","waiting"].includes(I))return`${i$.default.yellow(bf)} blocked`;return`${i$.default.dim(jf)} pending`}function bO($){console.clear();let I=wf($),_=Ef($).map((Q)=>({...Q,turn:m9($,Q.agent)}));if(_.length===0)_=ff($);if(_.length===0)try{let Q=uu($).filter((Y)=>Y.startsWith("progress-")&&Y.endsWith(".md"));for(let Y of Q){let M=Y.replace(/^progress-/,"").replace(/\.md$/,"");_.push({agent:M,status:"running",task:"",turn:m9($,M)})}}catch{}let u=56,z="═".repeat(u),g=(Q)=>" ".repeat(Math.max(0,Q)),v=(Q)=>i$.default.magenta(Q),J=(Q)=>i$.default.bold(Q),N=(Q)=>i$.default.dim(Q),X=i$.default.yellow;if(I.status==="RUNNING")X=i$.default.green;else if(I.status==="COMPLETED")X=i$.default.cyan;else if(I.status==="FAILED")X=i$.default.red;console.log(`${v(`╔${z}╗`)}`),console.log(`${v("║")} ${J(v("Serena Memory Dashboard"))}${g(u-25)}${v("║")}`);let G=`Session: ${J(I.id.padEnd(20))} [${X(I.status)}]`;if(console.log(`${v("║")} ${G}${g(u-4-G.length-9)}${v("║")}`),console.log(`${v(`╠${z}╣`)}`),console.log(`${v("║")} ${J(`${"Agent".padEnd(12)} ${"Status".padEnd(12)} ${"Turn".padEnd(6)} ${"Task".padEnd(20)}`)} ${v("║")}`),console.log(`${v("║")} ${N(`${"──────────".padEnd(12)} ${"──────────".padEnd(12)} ${"────".padEnd(6)} ${"──────────────────".padEnd(20)}`)} ${v("║")}`),_.length===0)console.log(`${v("║")} ${N(`No agents detected yet${g(32)}`)}${v("║")}`);else for(let Q of _){let Y=xf(Q.status),M=Q.turn!=null?String(Q.turn):"-",L=Q.task.substring(0,20);console.log(`${v("║")} ${Q.agent.padEnd(12)} ${Y.padEnd(22)} ${M.padEnd(6)} ${L.padEnd(20)}${v("║")}`)}console.log(`${v(`╠${z}╣`)}`),console.log(`${v("║")} ${J("Latest Activity:")}${g(u-18)}${v("║")}`);let q=Cf($);if(q.length===0)console.log(`${v("║")} ${N(`No activity yet${g(38)}`)}${v("║")}`);else for(let Q of q){let Y=`[${Q.agent}] ${Q.message}`;console.log(`${v("║")} ${N(Y.substring(0,52).padEnd(52))}${v("║")}`)}console.log(`${v(`╠${z}╣`)}`);let H=`Updated: ${new Date().toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})} | Ctrl+C to exit`;console.log(`${v("║")} ${N(H)}${g(u-4-H.length)}${v("║")}`),console.log(`${v(`╚${z}╝`)}`)}async function jO(){let $=Ff();if(!Kf($))Rf($,{recursive:!0}),console.log(i$.default.yellow(`Created ${$} — waiting for memory files...`));console.log(i$.default.magenta(`
498
+ \uD83D\uDEF8 Serena Terminal Dashboard`)),console.log(i$.default.dim(` Watching: ${$}
499
+ `)),bO($);let I=W2($,{persistent:!0,ignoreInitial:!0,awaitWriteFinish:{stabilityThreshold:200,pollInterval:50}});return I.on("all",()=>bO($)),new Promise((U)=>{process.on("SIGINT",()=>{console.log(`
500
+ `),I.close(),U(),process.exit(0)}),process.on("SIGTERM",()=>process.emit("SIGINT"))})}var EO=AO.version,CO="OH_MY_AG_OUTPUT_FORMAT",_u=["text","json"],FO=["gemini","claude","codex","qwen"],SO=["backend","frontend","mobile","qa","debug","pm"];function v6($,I="Output as JSON"){return $.option("--json",I).option("--output <format>","Output format (text/json)",(U)=>{let _=U.trim().toLowerCase();if(!_u.includes(_))throw Error(`Invalid output format: ${U}. Expected one of ${_u.join(", ")}`);return _})}function kf($){if($?.json)return"json";let I=$?.output?.trim().toLowerCase();if(I&&_u.includes(I))return I;if(process.env[CO]?.trim().toLowerCase()==="json")return"json";return"text"}function h4($){return kf($)==="json"}function fO($){let I=$.at(-1);return I instanceof p2?I:null}function yf($){let I=fO($);if(I)return I.opts();let U=$.at(-1);return U&&typeof U==="object"?U:{}}function nf($){if($ instanceof Error)return $.message;return String($)}function i6($){throw Error($)}function d9($,I){for(let U of $){let _=U.charCodeAt(0);if(_>=0&&_<=31||_===127)i6(`${I} must not contain control characters`)}}function rf($,I){if(d9($,I),/[?#%]/.test($))i6(`${I} must not contain ?, #, or %`);if($.includes(".."))i6(`${I} must not contain '..'`)}function lf($,I){d9($,I);try{new URL($)}catch{i6(`${I} must be a valid absolute URL`)}}function c9($,I,U="text"){if(typeof $==="string"){if(U==="identifier"){rf($,I);return}if(U==="url"){lf($,I);return}d9($,I);return}if(Array.isArray($))for(let[_,u]of $.entries())c9(u,`${I}[${_}]`,U)}function wO($){let I=$.toLowerCase();if(I==="url"||I.endsWith("url"))return"url";if(I.includes("id")||I.includes("type")||I.includes("vendor")||I.includes("session"))return"identifier";return"text"}function mf($){let I=$.vendor;if(typeof I==="string"&&!FO.includes(I))i6(`vendor must be one of ${FO.join(", ")}`);let U=$.output;if(typeof U==="string"&&!_u.includes(U))i6(`output must be one of ${_u.join(", ")}`)}function hf($){let I=$.processedArgs??$.args??[];($.registeredArguments??[]).forEach((u,z)=>{let g=u.name?.()||String(z),v=I[z];if(c9(v,g,wO(g)),g==="agent-type"&&typeof v==="string"&&!SO.includes(v))i6(`agent-type must be one of ${SO.join(", ")}`)});let _=$.opts();mf(_);for(let[u,z]of Object.entries(_))c9(z,u,wO(u))}function cf($){return($.registeredArguments??[]).map((I)=>({name:I.name?.()||"",required:!!I.required,variadic:!!I.variadic}))}function df($){return $.options.map((I)=>({flags:I.flags,long:I.long||void 0,short:I.short||void 0,description:I.description||"",required:!!I.required||!!I.mandatory,optional:!!I.optional,defaultValue:I.defaultValue}))}function xO($){let I=[],U=$;while(U?.parent)I.unshift(U.name()),U=U.parent;return I.join(" ")}function pf($){return $.options.some((I)=>I.long==="--json"||I.long==="--output")}function of($){return $.options.some((I)=>I.long==="--dry-run")}function kO($){return{name:$.name(),path:xO($),summary:$.summary()||void 0,description:$.description(),arguments:cf($),options:df($),supportsJsonOutput:pf($),supportsDryRun:of($),subcommands:$.commands.map((I)=>kO(I))}}function tf($,I){if(!I)return $;let U=I.trim();if(!U)return $;let _=[...$.commands];while(_.length>0){let u=_.shift();if(!u)continue;if(u.name()===U||xO(u)===U)return u;_.push(...u.commands)}return null}function af($,I){let U=tf($,I);if(!U)i6(`Unknown command: ${I}`);let _={name:$.name(),version:$.version(),description:$.description(),env:{[CO]:"Set to json to force machine-readable output on commands that support it."},command:kO(U)};console.log(JSON.stringify(_,null,2))}function K$($,I={}){return async(...U)=>{let _=fO(U),u=yf(U);try{if(_)hf(_);await $(...U)}catch(z){let g=nf(z);if(I.supportsJsonOutput&&h4(u))console.log(JSON.stringify({error:g},null,2));else console.error(g);process.exitCode=1}}}var X$=new p2;X$.name("oh-my-agent").description("Multi-Agent Orchestrator for AI IDEs").version(EO).showSuggestionAfterError().showHelpAfterError().addHelpText("after",`
501
501
  Aliases:
502
502
  oma Alias for oh-my-agent after global installation.
503
- `).action(K$(async()=>{await N2()}));X$.command("install").description("Install oh-my-agent skills and configurations").action(K$(async()=>{await N2()}));X$.command("describe [command-path]").description("Describe CLI commands as JSON for runtime introspection").action(K$(($)=>{df(X$,$)},{supportsJsonOutput:!0}));X$.command("dashboard").description("Start terminal dashboard (real-time agent monitoring)").action(K$(async()=>{await AO()}));X$.command("dashboard:web").description("Start web dashboard on http://localhost:9847").action(K$(()=>{WO()}));v6(X$.command("auth:status").description("Check authentication status of all supported CLIs")).action(K$(async($)=>{await jT(h4($))},{supportsJsonOutput:!0}));v6(X$.command("usage:anti").description("Show model usage quotas (connects to local Antigravity IDE)").option("--raw","Dump raw RPC response")).action(K$(async($)=>{await nH(h4($),$.raw)},{supportsJsonOutput:!0}));X$.command("update").description("Update skills to latest version from registry").option("-f, --force","Overwrite user-customized config files").option("--ci","Run in non-interactive CI mode (skip prompts)").action(K$(async($)=>{await fH($.force??!1,$.ci??!1)}));v6(X$.command("doctor").description("Check CLI installations, MCP configs, and skill status"),"Output as JSON for CI/CD").action(K$(async($)=>{await iT(h4($))},{supportsJsonOutput:!0}));v6(X$.command("stats").description("View productivity metrics").option("--reset","Reset metrics data")).action(K$(async($)=>{await bH(h4($),$.reset)},{supportsJsonOutput:!0}));v6(X$.command("retro [window]").description("Engineering retrospective with metrics & trends").option("--interactive","Interactive mode (manual entry)").option("--compare","Compare current window vs prior same-length window")).action(K$(async($,I)=>{await RH($,{json:h4(I),compare:I.compare,interactive:I.interactive})},{supportsJsonOutput:!0}));v6(X$.command("cleanup").description("Clean up orphaned subagent processes and temp files").option("--dry-run","Show what would be cleaned without making changes").option("-y, --yes","Skip confirmation prompts and clean everything")).action(K$(async($)=>{await kT($.dryRun,h4($),$.yes)},{supportsJsonOutput:!0}));X$.command("bridge [url]").description("Bridge MCP stdio to Streamable HTTP (for Serena)").action(K$(async($)=>{await fT($)}));X$.command("agent:spawn <agent-id> <prompt> <session-id>").description("Spawn a subagent (prompt can be inline text or a file path)").option("-m, --model <vendor>","CLI vendor override (gemini/claude/codex/qwen)").option("-w, --workspace <path>","Working directory for the agent (auto-detected if omitted)").action(K$(async($,I,U,_)=>{await C7($,I,U,_.workspace||".",_.model)}));X$.command("agent:status <session-id> [agent-ids...]").description("Check status of subagents").option("-r, --root <path>","Root path for memory checks",process.cwd()).action(K$(async($,I,U)=>{await f7($,I,U.root)}));X$.command("agent:parallel [tasks...]").description("Run multiple sub-agents in parallel").option("-m, --model <vendor>","CLI vendor override (gemini/claude/codex/qwen)").option("-i, --inline","Inline mode: specify tasks as agent:task arguments").option("--no-wait","Don't wait for completion (background mode)").action(K$(async($,I)=>{await x7($,{vendor:I.model,inline:I.inline,noWait:!I.wait})}));X$.command("agent:review").description("Run code review using external CLI (codex/claude/gemini)").option("-m, --model <vendor>","CLI vendor (codex/claude/gemini)").option("-p, --prompt <prompt>","Custom review prompt").option("-w, --workspace <path>","Working directory (default: current)").option("--no-uncommitted","Review committed changes only").action(K$(async($)=>{await k7({prompt:$.prompt,model:$.model,workspace:$.workspace,uncommitted:$.uncommitted})}));v6(X$.command("memory:init").description("Initialize Serena memory schema in .serena/memories").option("--force","Overwrite empty or existing schema files")).action(K$(async($)=>{await pT(h4($),$.force)},{supportsJsonOutput:!0}));v6(X$.command("verify <agent-type>").description("Verify subagent output (backend/frontend/mobile/qa/debug/pm)").option("-w, --workspace <path>","Workspace path",process.cwd())).action(K$(async($,I)=>{await hH($,I.workspace,h4(I))},{supportsJsonOutput:!0}));X$.command("star").description("Star oh-my-agent on GitHub").action(K$(async()=>{await PH()}));v6(X$.command("visualize").alias("viz").description("Visualize project structure as a dependency graph")).action(K$(async($)=>{await aH({json:h4($)})},{supportsJsonOutput:!0}));X$.command("help").description("Show help information").action(K$(()=>{X$.help()}));X$.command("version").description("Show version number").action(K$(()=>{console.log(SO)}));X$.parse();
503
+ `).action(K$(async()=>{await X2()}));X$.command("install").description("Install oh-my-agent skills and configurations").action(K$(async()=>{await X2()}));X$.command("describe [command-path]").description("Describe CLI commands as JSON for runtime introspection").action(K$(($)=>{af(X$,$)},{supportsJsonOutput:!0}));X$.command("dashboard").description("Start terminal dashboard (real-time agent monitoring)").action(K$(async()=>{await jO()}));X$.command("dashboard:web").description("Start web dashboard on http://localhost:9847").action(K$(()=>{ZO()}));v6(X$.command("auth:status").description("Check authentication status of all supported CLIs")).action(K$(async($)=>{await jT(h4($))},{supportsJsonOutput:!0}));v6(X$.command("usage:anti").description("Show model usage quotas (connects to local Antigravity IDE)").option("--raw","Dump raw RPC response")).action(K$(async($)=>{await lH(h4($),$.raw)},{supportsJsonOutput:!0}));X$.command("update").description("Update skills to latest version from registry").option("-f, --force","Overwrite user-customized config files").option("--ci","Run in non-interactive CI mode (skip prompts)").action(K$(async($)=>{await kH($.force??!1,$.ci??!1)}));v6(X$.command("doctor").description("Check CLI installations, MCP configs, and skill status"),"Output as JSON for CI/CD").action(K$(async($)=>{await iT(h4($))},{supportsJsonOutput:!0}));v6(X$.command("stats").description("View productivity metrics").option("--reset","Reset metrics data")).action(K$(async($)=>{await FH(h4($),$.reset)},{supportsJsonOutput:!0}));v6(X$.command("retro [window]").description("Engineering retrospective with metrics & trends").option("--interactive","Interactive mode (manual entry)").option("--compare","Compare current window vs prior same-length window")).action(K$(async($,I)=>{await PH($,{json:h4(I),compare:I.compare,interactive:I.interactive})},{supportsJsonOutput:!0}));v6(X$.command("cleanup").description("Clean up orphaned subagent processes and temp files").option("--dry-run","Show what would be cleaned without making changes").option("-y, --yes","Skip confirmation prompts and clean everything")).action(K$(async($)=>{await kT($.dryRun,h4($),$.yes)},{supportsJsonOutput:!0}));X$.command("bridge [url]").description("Bridge MCP stdio to Streamable HTTP (for Serena)").action(K$(async($)=>{await fT($)}));X$.command("agent:spawn <agent-id> <prompt> <session-id>").description("Spawn a subagent (prompt can be inline text or a file path)").option("-m, --model <vendor>","CLI vendor override (gemini/claude/codex/qwen)").option("-w, --workspace <path>","Working directory for the agent (auto-detected if omitted)").action(K$(async($,I,U,_)=>{await C7($,I,U,_.workspace||".",_.model)}));X$.command("agent:status <session-id> [agent-ids...]").description("Check status of subagents").option("-r, --root <path>","Root path for memory checks",process.cwd()).action(K$(async($,I,U)=>{await f7($,I,U.root)}));X$.command("agent:parallel [tasks...]").description("Run multiple sub-agents in parallel").option("-m, --model <vendor>","CLI vendor override (gemini/claude/codex/qwen)").option("-i, --inline","Inline mode: specify tasks as agent:task arguments").option("--no-wait","Don't wait for completion (background mode)").action(K$(async($,I)=>{await x7($,{vendor:I.model,inline:I.inline,noWait:!I.wait})}));X$.command("agent:review").description("Run code review using external CLI (codex/claude/gemini)").option("-m, --model <vendor>","CLI vendor (codex/claude/gemini)").option("-p, --prompt <prompt>","Custom review prompt").option("-w, --workspace <path>","Working directory (default: current)").option("--no-uncommitted","Review committed changes only").action(K$(async($)=>{await k7({prompt:$.prompt,model:$.model,workspace:$.workspace,uncommitted:$.uncommitted})}));v6(X$.command("memory:init").description("Initialize Serena memory schema in .serena/memories").option("--force","Overwrite empty or existing schema files")).action(K$(async($)=>{await tT(h4($),$.force)},{supportsJsonOutput:!0}));v6(X$.command("verify <agent-type>").description("Verify subagent output (backend/frontend/mobile/qa/debug/pm)").option("-w, --workspace <path>","Workspace path",process.cwd())).action(K$(async($,I)=>{await dH($,I.workspace,h4(I))},{supportsJsonOutput:!0}));X$.command("star").description("Star oh-my-agent on GitHub").action(K$(async()=>{await AH()}));v6(X$.command("visualize").alias("viz").description("Visualize project structure as a dependency graph")).action(K$(async($)=>{await sH({json:h4($)})},{supportsJsonOutput:!0}));X$.command("help").description("Show help information").action(K$(()=>{X$.help()}));X$.command("version").description("Show version number").action(K$(()=>{console.log(EO)}));X$.parse();