oh-my-agent 4.14.0 → 4.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +240 -240
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -1,100 +1,100 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{createRequire as
|
|
3
|
-
`)}displayWidth($){return
|
|
2
|
+
import{createRequire as mO}from"node:module";var CO=Object.create;var{getPrototypeOf:fO,defineProperty:w2,getOwnPropertyNames:xO}=Object;var kO=Object.prototype.hasOwnProperty;function yO($){return this[$]}var iO,nO,q$=($,I,U)=>{var _=$!=null&&typeof $==="object";if(_){var u=I?iO??=new WeakMap:nO??=new WeakMap,g=u.get($);if(g)return g}U=$!=null?CO(fO($)):{};let z=I||!$||!$.__esModule?w2(U,"default",{value:$,enumerable:!0}):U;for(let v of xO($))if(!kO.call(z,v))w2(z,v,{get:yO.bind($,v),enumerable:!0});if(_)u.set($,z);return z};var E=($,I)=>()=>(I||$((I={exports:{}}).exports,I),I.exports);var rO=($)=>$;function lO($,I){this[$]=rO.bind(null,I)}var O4=($,I)=>{for(var U in I)w2($,U,{get:I[U],enumerable:!0,configurable:!0,set:lO.bind(I,U)})};var $4=($,I)=>()=>($&&(I=$($=0)),I);var g$=mO(import.meta.url);var MI=E((hO)=>{class E2 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 h9 extends E2{constructor($){super(1,"commander.invalidArgument",$);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}hO.CommanderError=E2;hO.InvalidArgumentError=h9});var s0=E((tO)=>{var{InvalidArgumentError:pO}=MI();class c9{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 pO(`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 oO($){let I=$.name()+($.variadic===!0?"...":"");return $.required?"<"+I+">":"["+I+"]"}tO.Argument=c9;tO.humanReadableArgName=oO});var C2=E(($D)=>{var{humanReadableArgName:sO}=s0();class d9{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)=>sO(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 p9($).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
4
|
`+" ".repeat(I+v));return g+z+" ".repeat(v)+X.replace(/\n/g,`
|
|
5
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
|
|
6
|
+
`)}}function p9($){let I=/\x1b\[\d*(;\d*)*m/g;return $.replace(I,"")}$D.Help=d9;$D.stripColor=p9});var f2=E((gD)=>{var{InvalidArgumentError:UD}=MI();class t9{constructor($,I){this.flags=$,this.description=I||"",this.required=$.includes("<"),this.optional=$.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test($),this.mandatory=!1;let U=_D($);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 UD(`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 o9(this.name().replace(/^no-/,""));return o9(this.name())}helpGroup($){return this.helpGroupHeading=$,this}is($){return this.short===$||this.long===$}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class a9{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 o9($){return $.split("-").reduce((I,U)=>{return I+U[0].toUpperCase()+U.slice(1)})}function _D($){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}
|
|
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
9
|
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`);if(_.test(z))throw Error(`${v}
|
|
10
10
|
- too many short flags`);if(u.test(z))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}}
|
|
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}}gD.Option=t9;gD.DualOptions=a9});var e9=E((GD)=>{function JD($,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 ND($,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=JD($,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`
|
|
13
13
|
(Did you mean one of ${_.join(", ")}?)`;if(_.length===1)return`
|
|
14
|
-
(Did you mean ${_[0]}?)`;return""}
|
|
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
|
|
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
|
|
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
|
|
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(
|
|
14
|
+
(Did you mean ${_[0]}?)`;return""}GD.suggestSimilar=ND});var uX=E((DD)=>{var qD=g$("node:events").EventEmitter,x2=g$("node:child_process"),l4=g$("node:path"),$u=g$("node:fs"),U$=g$("node:process"),{Argument:QD,humanReadableArgName:TD}=s0(),{CommanderError:k2}=MI(),{Help:HD,stripColor:YD}=C2(),{Option:s9,DualOptions:OD}=f2(),{suggestSimilar:$X}=e9();class i2 extends qD{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:()=>y2()??(U$.stdout.isTTY&&U$.stdout.hasColors?.()),getErrHasColors:()=>y2()??(U$.stderr.isTTY&&U$.stderr.hasColors?.()),stripColor:(I)=>YD(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 i2($)}createHelp(){return Object.assign(new HD,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 QD($,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 k2($,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 s9($,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 s9)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($u.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=
|
|
21
|
+
- ${_}`;throw Error(u)}_executeSubCommand($,I){I=I.slice();let U=!1,_=[".js",".ts",".tsx",".mjs",".cjs"];function u(N,X){let G=l4.resolve(N,X);if($u.existsSync(G))return G;if(_.includes(l4.extname(X)))return;let q=_.find((T)=>$u.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=$u.realpathSync(this._scriptPath)}catch{N=this._scriptPath}z=l4.resolve(l4.dirname(N),z)}if(z){let N=u(z,g);if(!N&&!$._executableFile&&this._scriptPath){let X=l4.basename(this._scriptPath,l4.extname(this._scriptPath));if(X!==this._name)N=u(z,`${X}-${$._name}`)}g=N||g}U=_.includes(l4.extname(g));let v;if(U$.platform!=="win32")if(U)I.unshift(g),I=IX(U$.execArgv).concat(I),v=x2.spawn(U$.argv[0],I,{stdio:"inherit"});else v=x2.spawn(g,I,{stdio:"inherit"});else this._checkForMissingExecutable(g,z,$._name),I.unshift(g),I=IX(U$.execArgv).concat(I),v=x2.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 k2(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 k2(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(`${$}
|
|
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
|
|
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
|
|
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 OD(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 TD(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=l4.basename($,l4.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
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
|
|
28
|
-
`)}}
|
|
29
|
-
`)?
|
|
27
|
+
`)}),this}_outputHelpIfRequested($){let I=this._getHelpOption();if(I&&$.find((_)=>I.is(_)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function IX($){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 y2(){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}DD.Command=i2;DD.useColor=y2});var zX=E((KD)=>{var{Argument:UX}=s0(),{Command:n2}=uX(),{CommanderError:MD,InvalidArgumentError:_X}=MI(),{Help:RD}=C2(),{Option:gX}=f2();KD.program=new n2;KD.createCommand=($)=>new n2($);KD.createOption=($,I)=>new gX($,I);KD.createArgument=($,I)=>new UX($,I);KD.Command=n2;KD.Option=gX;KD.Argument=UX;KD.Help=RD;KD.CommanderError=MD;KD.InvalidArgumentError=_X;KD.InvalidOptionArgumentError=_X});var b$=E((qx,l2)=>{var uu=process||{},JX=uu.argv||[],Iu=uu.env||{},CD=!(!!Iu.NO_COLOR||JX.includes("--no-color"))&&(!!Iu.FORCE_COLOR||JX.includes("--color")||uu.platform==="win32"||(uu.stdout||{}).isTTY&&Iu.TERM!=="dumb"||!!Iu.CI),fD=($,I,U=$)=>(_)=>{let u=""+_,g=u.indexOf(I,$.length);return~g?$+xD(u,I,U,g)+I:$+u+I},xD=($,I,U,_)=>{let u="",g=0;do u+=$.substring(g,_)+U,g=_+I.length,_=$.indexOf(I,g);while(~_);return u+$.substring(g)},NX=($=CD)=>{let I=$?fD:()=>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")}};l2.exports=NX();l2.exports.createColors=NX});var $$=E((hD)=>{var m2=Symbol.for("yaml.alias"),GX=Symbol.for("yaml.document"),Uu=Symbol.for("yaml.map"),XX=Symbol.for("yaml.pair"),h2=Symbol.for("yaml.scalar"),_u=Symbol.for("yaml.seq"),m4=Symbol.for("yaml.node.type"),kD=($)=>!!$&&typeof $==="object"&&$[m4]===m2,yD=($)=>!!$&&typeof $==="object"&&$[m4]===GX,iD=($)=>!!$&&typeof $==="object"&&$[m4]===Uu,nD=($)=>!!$&&typeof $==="object"&&$[m4]===XX,qX=($)=>!!$&&typeof $==="object"&&$[m4]===h2,rD=($)=>!!$&&typeof $==="object"&&$[m4]===_u;function QX($){if($&&typeof $==="object")switch($[m4]){case Uu:case _u:return!0}return!1}function lD($){if($&&typeof $==="object")switch($[m4]){case m2:case Uu:case h2:case _u:return!0}return!1}var mD=($)=>(qX($)||QX($))&&!!$.anchor;hD.ALIAS=m2;hD.DOC=GX;hD.MAP=Uu;hD.NODE_TYPE=m4;hD.PAIR=XX;hD.SCALAR=h2;hD.SEQ=_u;hD.hasAnchor=mD;hD.isAlias=kD;hD.isCollection=QX;hD.isDocument=yD;hD.isMap=iD;hD.isNode=lD;hD.isPair=nD;hD.isScalar=qX;hD.isSeq=rD});var RI=E((JV)=>{var Z$=$$(),d$=Symbol("break visit"),TX=Symbol("skip children"),j4=Symbol("remove node");function gu($,I){let U=HX(I);if(Z$.isDocument($)){if(D1(null,$.contents,U,Object.freeze([$]))===j4)$.contents=null}else D1(null,$,U,Object.freeze([]))}gu.BREAK=d$;gu.SKIP=TX;gu.REMOVE=j4;function D1($,I,U,_){let u=YX($,I,U,_);if(Z$.isNode(u)||Z$.isPair(u))return OX($,_,u),D1($,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=D1(g,I.items[g],U,_);if(typeof z==="number")g=z-1;else if(z===d$)return d$;else if(z===j4)I.items.splice(g,1),g-=1}}else if(Z$.isPair(I)){_=Object.freeze(_.concat(I));let g=D1("key",I.key,U,_);if(g===d$)return d$;else if(g===j4)I.key=null;let z=D1("value",I.value,U,_);if(z===d$)return d$;else if(z===j4)I.value=null}}return u}async function zu($,I){let U=HX(I);if(Z$.isDocument($)){if(await V1(null,$.contents,U,Object.freeze([$]))===j4)$.contents=null}else await V1(null,$,U,Object.freeze([]))}zu.BREAK=d$;zu.SKIP=TX;zu.REMOVE=j4;async function V1($,I,U,_){let u=await YX($,I,U,_);if(Z$.isNode(u)||Z$.isPair(u))return OX($,_,u),V1($,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 V1(g,I.items[g],U,_);if(typeof z==="number")g=z-1;else if(z===d$)return d$;else if(z===j4)I.items.splice(g,1),g-=1}}else if(Z$.isPair(I)){_=Object.freeze(_.concat(I));let g=await V1("key",I.key,U,_);if(g===d$)return d$;else if(g===j4)I.key=null;let z=await V1("value",I.value,U,_);if(z===d$)return d$;else if(z===j4)I.value=null}}return u}function HX($){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 YX($,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 OX($,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`)}}JV.visit=gu;JV.visitAsync=zu});var c2=E((TV)=>{var DX=$$(),XV=RI(),qV={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},QV=($)=>$.replace(/[!,[\]{}]/g,(I)=>qV[I]);class N4{constructor($,I){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},N4.defaultYaml,$),this.tags=Object.assign({},N4.defaultTags,I)}clone(){let $=new N4(this.yaml,this.tags);return $.docStart=this.docStart,$}atDocument(){let $=new N4(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:N4.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},N4.defaultTags);break}return $}add($,I){if(this.atNextDocument)this.yaml={explicit:N4.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},N4.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+QV($.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&&DX.isNode($.contents)){let u={};XV.visit($.contents,(g,z)=>{if(DX.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
|
+
`)}}N4.defaultYaml={explicit:!1,version:"1.2"};N4.defaultTags={"!!":"tag:yaml.org,2002:"};TV.Directives=N4});var vu=E((VV)=>{var VX=$$(),YV=RI();function OV($){if(/[\x00-\x19\s,[\]{}]/.test($)){let U=`Anchor must not contain whitespace or control characters: ${JSON.stringify($)}`;throw Error(U)}return!0}function BX($){let I=new Set;return YV.visit($,{Value(U,_){if(_.anchor)I.add(_.anchor)}}),I}function MX($,I){for(let U=1;;++U){let _=`${$}${U}`;if(!I.has(_))return _}}function DV($,I){let U=[],_=new Map,u=null;return{onAnchor:(g)=>{U.push(g),u??(u=BX($));let z=MX(I,u);return u.add(z),z},setAnchors:()=>{for(let g of U){let z=_.get(g);if(typeof z==="object"&&z.anchor&&(VX.isScalar(z.node)||VX.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:_}}VV.anchorIsValid=OV;VV.anchorNames=BX;VV.createNodeAnchors=DV;VV.findNewAnchor=MX});var d2=E((LV)=>{function KI($,I,U,_){if(_&&typeof _==="object")if(Array.isArray(_))for(let u=0,g=_.length;u<g;++u){let z=_[u],v=KI($,_,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=KI($,_,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=KI($,_,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=KI($,_,u,g);if(z===void 0)delete _[u];else if(z!==g)_[u]=z}return $.call(I,U,_)}LV.applyReviver=KI});var v6=E((ZV)=>{var WV=$$();function RX($,I,U){if(Array.isArray($))return $.map((_,u)=>RX(_,String(u),U));if($&&typeof $.toJSON==="function"){if(!U||!WV.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 $}ZV.toJS=RX});var Ju=E((FV)=>{var bV=d2(),KX=$$(),jV=v6();class LX{constructor($){Object.defineProperty(this,KX.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(!KX.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=jV.toJS(this,"",g);if(typeof _==="function")for(let{count:v,res:J}of g.anchors.values())_(J,v);return typeof u==="function"?bV.applyReviver(u,{"":z},"",z):z}}FV.NodeBase=LX});var LI=E((xV)=>{var wV=vu(),EV=RI(),B1=$$(),CV=Ju(),fV=v6();class PX extends CV.NodeBase{constructor($){super(B1.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=[],EV.visit($,{Node:(u,g)=>{if(B1.isAlias(g)||B1.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)fV.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=Nu(_,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(wV.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 Nu($,I,U){if(B1.isAlias(I)){let _=I.resolve($),u=U&&_&&U.get(_);return u?u.count*u.aliasCount:0}else if(B1.isCollection(I)){let _=0;for(let u of I.items){let g=Nu($,u,U);if(g>_)_=g}return _}else if(B1.isPair(I)){let _=Nu($,I.key,U),u=Nu($,I.value,U);return Math.max(_,u)}return 1}xV.Alias=PX});var P$=E((lV)=>{var yV=$$(),iV=Ju(),nV=v6(),rV=($)=>!$||typeof $!=="function"&&typeof $!=="object";class f6 extends iV.NodeBase{constructor($){super(yV.SCALAR);this.value=$}toJSON($,I){return I?.keep?this.value:nV.toJS(this.value,$,I)}toString(){return String(this.value)}}f6.BLOCK_FOLDED="BLOCK_FOLDED";f6.BLOCK_LITERAL="BLOCK_LITERAL";f6.PLAIN="PLAIN";f6.QUOTE_DOUBLE="QUOTE_DOUBLE";f6.QUOTE_SINGLE="QUOTE_SINGLE";lV.Scalar=f6;lV.isScalarValue=rV});var PI=E((tV)=>{var cV=LI(),x6=$$(),WX=P$(),dV="tag:yaml.org,2002:";function pV($,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 oV($,I,U){if(x6.isDocument($))$=$.contents;if(x6.isNode($))return $;if(x6.isPair($)){let G=U.schema[x6.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 cV.Alias(J.anchor);else J={anchor:null,node:null},v.set($,J);if(I?.startsWith("!!"))I=dV+I.slice(2);let N=pV($,I,z.tags);if(!N){if($&&typeof $.toJSON==="function")$=$.toJSON();if(!$||typeof $!=="object"){let G=new WX.Scalar($);if(J)J.node=G;return G}N=$ instanceof Map?z[x6.MAP]:(Symbol.iterator in Object($))?z[x6.SEQ]:z[x6.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 WX.Scalar($);if(I)X.tag=I;else if(!N.default)X.tag=N.tag;if(J)J.node=X;return X}tV.createNode=oV});var Gu=E(($B)=>{var eV=PI(),F4=$$(),sV=Ju();function p2($,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 eV.createNode(_,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:$,sourceObjects:new Map})}var ZX=($)=>$==null||typeof $==="object"&&!!$[Symbol.iterator]().next().done;class AX extends sV.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)=>F4.isNode(U)||F4.isPair(U)?U.clone($):U),this.range)I.range=this.range.slice();return I}addIn($,I){if(ZX($))this.add(I);else{let[U,..._]=$,u=this.get(U,!0);if(F4.isCollection(u))u.addIn(_,I);else if(u===void 0&&this.schema)this.set(U,p2(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(F4.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&&F4.isScalar(u)?u.value:u;else return F4.isCollection(u)?u.getIn(_,I):void 0}hasAllNullValues($){return this.items.every((I)=>{if(!F4.isPair(I))return!1;let U=I.value;return U==null||$&&F4.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 F4.isCollection(_)?_.hasIn(U):!1}setIn($,I){let[U,..._]=$;if(_.length===0)this.set(U,I);else{let u=this.get(U,!0);if(F4.isCollection(u))u.setIn(_,I);else if(u===void 0&&this.schema)this.set(U,p2(this.schema,_,I));else throw Error(`Expected YAML collection at ${U}. Remaining path: ${_}`)}}}$B.Collection=AX;$B.collectionFromPath=p2;$B.isEmptyPath=ZX});var WI=E((zB)=>{var _B=($)=>$.replace(/^(?!$)(?: $)?/gm,"#");function o2($,I){if(/^\n+$/.test($))return $.substring(1);return I?$.replace(/^(?! *$)/gm,I):$}var gB=($,I,U)=>$.endsWith(`
|
|
29
|
+
`)?o2(U,I):U.includes(`
|
|
30
30
|
`)?`
|
|
31
|
-
`+
|
|
32
|
-
`){if(U==="block")Q=
|
|
31
|
+
`+o2(U,I):($.endsWith(" ")?"":" ")+U;zB.indentComment=o2;zB.lineComment=gB;zB.stringifyComment=_B});var jX=E((XB)=>{function GB($,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,R=-1;if(U==="block"){if(Q=bX($,Q,I.length),Q!==-1)G=Q+J}for(let W;W=$[Q+=1];){if(U==="quoted"&&W==="\\"){switch(Y=Q,$[Q+1]){case"x":Q+=3;break;case"u":Q+=5;break;case"U":Q+=9;break;default:Q+=1}R=Q}if(W===`
|
|
32
|
+
`){if(U==="block")Q=bX($,Q,I.length);G=Q+I.length+J,q=void 0}else{if(W===" "&&T&&T!==" "&&T!==`
|
|
33
33
|
`&&T!=="\t"){let O=$[Q+1];if(O&&O!==" "&&O!==`
|
|
34
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=W,W=$[Q+=1],H=!0;let O=Q>R+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=W}if(H&&v)v();if(N.length===0)return $;if(z)z();let K=$.slice(0,N[0]);for(let W=0;W<N.length;++W){let O=N[W],V=N[W+1]||$.length;if(O===0)K=`
|
|
35
35
|
${I}${$.slice(0,V)}`;else{if(U==="quoted"&&X[O])K+=`${$[O]}\\`;K+=`
|
|
36
|
-
${I}${$.slice(O+1,V)}`}}return K}function
|
|
37
|
-
`);_=I,u=I+1,g=$[u]}return _}
|
|
38
|
-
`){if(g-z>_)return!0;if(z=g+1,u-z<=_)return!1}return!0}function
|
|
36
|
+
${I}${$.slice(O+1,V)}`}}return K}function bX($,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 _}XB.FOLD_BLOCK="block";XB.FOLD_FLOW="flow";XB.FOLD_QUOTED="quoted";XB.foldFlowLines=GB});var AI=E((VB)=>{var D4=P$(),J6=jX(),qu=($,I)=>({indentAtStart:I?$.indent.length:$.indentAtStart,lineWidth:$.options.lineWidth,minContentWidth:$.options.minContentWidth}),Qu=($)=>/^(%|---|\.\.\.)/m.test($);function YB($,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 ZI($,I){let U=JSON.stringify($);if(I.options.doubleQuotedAsJSON)return U;let{implicitKey:_}=I,u=I.options.doubleQuotedMinMultiLineLength,g=I.indent||(Qu($)?" ":""),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)+`
|
|
39
39
|
|
|
40
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:
|
|
42
|
-
`)||/[ \t]\n|\n[ \t]/.test($))return
|
|
43
|
-
${U}`)+"'";return I.implicitKey?_:
|
|
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:J6.foldFlowLines(z,g,J6.FOLD_QUOTED,qu(I,!1))}function t2($,I){if(I.options.singleQuote===!1||I.implicitKey&&$.includes(`
|
|
42
|
+
`)||/[ \t]\n|\n[ \t]/.test($))return ZI($,I);let U=I.indent||(Qu($)?" ":""),_="'"+$.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
43
|
+
${U}`)+"'";return I.implicitKey?_:J6.foldFlowLines(_,U,J6.FOLD_FLOW,qu(I,!1))}function M1($,I){let{singleQuote:U}=I.options,_;if(U===!1)_=ZI;else{let u=$.includes('"'),g=$.includes("'");if(u&&!g)_=t2;else if(g&&!u)_=ZI;else _=U?t2:ZI}return _($,I)}var a2;try{a2=new RegExp(`(^|(?<!
|
|
44
44
|
))
|
|
45
45
|
+(?!
|
|
46
|
-
|$)`,"g")}catch{
|
|
46
|
+
|$)`,"g")}catch{a2=/\n+(?!\n|$)/g}function Xu({comment:$,type:I,value:U},_,u,g){let{blockQuote:z,commentString:v,lineWidth:J}=_.options;if(!z||/\n[\t ]+$/.test(U))return M1(U,_);let N=_.indent||(_.forceBlockIndent||Qu(U)?" ":""),X=z==="literal"?!0:z==="folded"||I===D4.Scalar.BLOCK_FOLDED?!1:I===D4.Scalar.BLOCK_LITERAL?!0:!YB(U,J,N.length);if(!U)return X?`|
|
|
47
47
|
`:`>
|
|
48
48
|
`;let G,q;for(q=U.length;q>0;--q){let V=U[q-1];if(V!==`
|
|
49
49
|
`&&V!=="\t"&&V!==" ")break}let T=U.substring(q),H=T.indexOf(`
|
|
50
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(
|
|
51
|
+
`)T=T.slice(0,-1);T=T.replace(a2,`$&${N}`)}let Q=!1,Y,R=-1;for(Y=0;Y<U.length;++Y){let V=U[Y];if(V===" ")Q=!0;else if(V===`
|
|
52
52
|
`)R=Y;else break}let K=U.substring(0,R<Y?R+1:Y);if(K)U=U.substring(K.length),K=K.replace(/\n+/g,`$&${N}`);let O=(Q?N?"2":"1":"")+G;if($){if(O+=" "+v($.replace(/ ?[\r\n]+/g," ")),u)u()}if(!X){let V=U.replace(/\n+/g,`
|
|
53
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${N}`),P=!1,B=
|
|
53
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${N}`),P=!1,B=qu(_,!0);if(z!=="folded"&&I!==D4.Scalar.BLOCK_FOLDED)B.onOverflow=()=>{P=!0};let M=J6.foldFlowLines(`${K}${V}${T}`,N,J6.FOLD_BLOCK,B);if(!P)return`>${O}
|
|
54
54
|
${N}${M}`}return U=U.replace(/\n+/g,`$&${N}`),`|${O}
|
|
55
|
-
${N}${K}${U}${T}`}function
|
|
56
|
-
`)||X&&/[[\]{},]/.test(g))return
|
|
57
|
-
`)?
|
|
58
|
-
`))return
|
|
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
|
|
60
|
-
${I.indent}${v}`}
|
|
61
|
-
${v}:`}else if(Y=`${Y}:`,q)Y+=
|
|
55
|
+
${N}${K}${U}${T}`}function OB($,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 M1(g,I);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(g))return v||X||!g.includes(`
|
|
57
|
+
`)?M1(g,I):Xu($,I,U,_);if(!v&&!X&&u!==D4.Scalar.PLAIN&&g.includes(`
|
|
58
|
+
`))return Xu($,I,U,_);if(Qu(g)){if(J==="")return I.forceBlockIndent=!0,Xu($,I,U,_);else if(v&&J===N)return M1(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 M1(g,I)}return v?G:J6.foldFlowLines(G,J,J6.FOLD_FLOW,qu(I,!1))}function DB($,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?M1(z.value,I):Xu(z,I,U,_);case D4.Scalar.QUOTE_DOUBLE:return ZI(z.value,I);case D4.Scalar.QUOTE_SINGLE:return t2(z.value,I);case D4.Scalar.PLAIN:return OB(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}VB.stringifyString=DB});var bI=E((AB)=>{var MB=vu(),N6=$$(),RB=WI(),KB=AI();function LB($,I){let U=Object.assign({blockQuote:!0,commentString:RB.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 PB($,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(N6.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 WB($,I,{anchors:U,doc:_}){if(!_.directives)return"";let u=[],g=(N6.isScalar($)||N6.isCollection($))&&$.anchor;if(g&&MB.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 ZB($,I,U,_){if(N6.isPair($))return $.toString(I,U,_);if(N6.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=N6.isNode($)?$:I.doc.createNode($,{onTagObj:(J)=>u=J});u??(u=PB(I.doc.schema.tags,g));let z=WB(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,_):N6.isScalar(g)?KB.stringifyString(g,I,U,_):g.toString(I,U,_);if(!z)return v;return N6.isScalar(g)||v[0]==="{"||v[0]==="["?`${z} ${v}`:`${z}
|
|
60
|
+
${I.indent}${v}`}AB.createStringifyContext=LB;AB.stringify=ZB});var wX=E((SB)=>{var h4=$$(),FX=P$(),SX=bI(),jI=WI();function FB({key:$,value:I},U,_,u){let{allNullValues:g,doc:z,indent:v,indentStep:J,options:{commentString:N,indentSeq:X,simpleKeys:G}}=U,q=h4.isNode($)&&$.comment||null;if(G){if(q)throw Error("With simple keys, key nodes cannot have comments");if(h4.isCollection($)||!h4.isNode($)&&typeof $==="object")throw Error("With simple keys, collection cannot be used as a key value")}let T=!G&&(!$||q&&I==null&&!U.inFlow||h4.isCollection($)||(h4.isScalar($)?$.type===FX.Scalar.BLOCK_FOLDED||$.type===FX.Scalar.BLOCK_LITERAL:typeof $==="object"));U=Object.assign({},U,{allNullValues:!1,implicitKey:!T&&(G||!g),indent:v+J});let H=!1,Q=!1,Y=SX.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+=jI.lineComment(Y,U.indent,N(q));else if(Q&&u)u();return Y}if(H)q=null;if(T){if(q)Y+=jI.lineComment(Y,U.indent,N(q));Y=`? ${Y}
|
|
61
|
+
${v}:`}else if(Y=`${Y}:`,q)Y+=jI.lineComment(Y,U.indent,N(q));let R,K,W;if(h4.isNode(I))R=!!I.spaceBefore,K=I.commentBefore,W=I.comment;else if(R=!1,K=null,W=null,I&&typeof I==="object")I=z.createNode(I);if(U.implicitKey=!1,!T&&!q&&h4.isScalar(I))U.indentAtStart=Y.length+1;if(Q=!1,!X&&J.length>=2&&!U.inFlow&&!T&&h4.isSeq(I)&&!I.flow&&!I.tag&&!I.anchor)U.indent=U.indent.substring(2);let O=!1,V=SX.stringify(I,U,()=>O=!0,()=>Q=!0),P=" ";if(q||R||K){if(P=R?`
|
|
62
62
|
`:"",K){let B=N(K);P+=`
|
|
63
|
-
${
|
|
63
|
+
${jI.indentComment(B,U.indent)}`}if(V===""&&!U.inFlow){if(P===`
|
|
64
64
|
`&&W)P=`
|
|
65
65
|
|
|
66
66
|
`}else P+=`
|
|
67
|
-
${U.indent}`}else if(!T&&
|
|
67
|
+
${U.indent}`}else if(!T&&h4.isCollection(I)){let B=V[0],M=V.indexOf(`
|
|
68
68
|
`),F=M!==-1,A=U.inFlow??I.flow??I.items.length===0;if(F||!A){let x=!1;if(F&&(B==="&"||B==="!")){let b=V.indexOf(" ");if(B==="&"&&b!==-1&&b<M&&V[b+1]==="!")b=V.indexOf(" ",b+1);if(b===-1||M<b)x=!0}if(!x)P=`
|
|
69
69
|
${U.indent}`}}else if(V===""||V[0]===`
|
|
70
|
-
`)P="";if(Y+=P+V,U.inFlow){if(O&&_)_()}else if(W&&!O)Y+=
|
|
70
|
+
`)P="";if(Y+=P+V,U.inFlow){if(O&&_)_()}else if(W&&!O)Y+=jI.lineComment(Y,U.indent,N(W));else if(Q&&u)u();return Y}SB.stringifyPair=FB});var e2=E((fB)=>{var EX=g$("process");function EB($,...I){if($==="debug")console.log(...I)}function CB($,I){if($==="debug"||$==="warn")if(typeof EX.emitWarning==="function")EX.emitWarning(I);else console.warn(I)}fB.debug=EB;fB.warn=CB});var Yu=E((iB)=>{var FI=$$(),CX=P$(),Tu="<<",Hu={identify:($)=>$===Tu||typeof $==="symbol"&&$.description===Tu,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new CX.Scalar(Symbol(Tu)),{addToJSMap:fX}),stringify:()=>Tu},yB=($,I)=>(Hu.identify(I)||FI.isScalar(I)&&(!I.type||I.type===CX.Scalar.PLAIN)&&Hu.identify(I.value))&&$?.doc.schema.tags.some((U)=>U.tag===Hu.tag&&U.default);function fX($,I,U){if(U=$&&FI.isAlias(U)?U.resolve($.doc):U,FI.isSeq(U))for(let _ of U.items)s2($,I,_);else if(Array.isArray(U))for(let _ of U)s2($,I,_);else s2($,I,U)}function s2($,I,U){let _=$&&FI.isAlias(U)?U.resolve($.doc):U;if(!FI.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}iB.addMergeToJSMap=fX;iB.isMergeKey=yB;iB.merge=Hu});var Ig=E((pB)=>{var mB=e2(),xX=Yu(),hB=bI(),kX=$$(),$g=v6();function cB($,I,{key:U,value:_}){if(kX.isNode(U)&&U.addToJSMap)U.addToJSMap($,I,_);else if(xX.isMergeKey($,U))xX.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=dB(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 dB($,I,U){if(I===null)return"";if(typeof I!=="object")return String(I);if(kX.isNode($)&&U?.doc){let _=hB.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)+'..."';mB.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)}pB.addPairToJSMap=cB});var G6=E((sB)=>{var yX=PI(),tB=wX(),aB=Ig(),Ou=$$();function eB($,I,U){let _=yX.createNode($,void 0,U),u=yX.createNode(I,void 0,U);return new Du(_,u)}class Du{constructor($,I=null){Object.defineProperty(this,Ou.NODE_TYPE,{value:Ou.PAIR}),this.key=$,this.value=I}clone($){let{key:I,value:U}=this;if(Ou.isNode(I))I=I.clone($);if(Ou.isNode(U))U=U.clone($);return new Du(I,U)}toJSON($,I){let U=I?.mapAsMap?new Map:{};return aB.addPairToJSMap(I,U,this)}toString($,I,U){return $?.doc?tB.stringifyPair(this,$,I,U):JSON.stringify(this)}}sB.Pair=Du;sB.createPair=eB});var ug=E((gM)=>{var k6=$$(),iX=bI(),Vu=WI();function uM($,I,U){return(I.inFlow??$.flow?_M:UM)($,I,U)}function UM({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(k6.isNode(Q)){if(!G&&Q.spaceBefore)q.push("");if(Bu(U,q,Q.commentBefore,G),Q.comment)Y=Q.comment}else if(k6.isPair(Q)){let K=k6.isNode(Q.key)?Q.key:null;if(K){if(!G&&K.spaceBefore)q.push("");Bu(U,q,K.commentBefore,G)}}G=!1;let R=iX.stringify(Q,X,()=>Y=null,()=>G=!0);if(Y)R+=Vu.lineComment(R,g,N(Y));if(G&&Y)G=!1;q.push(_+R)}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
|
-
`+
|
|
73
|
+
`+Vu.indentComment(N($),J),v)v()}else if(G&&z)z();return T}function _M({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(k6.isNode(Q)){if(Q.spaceBefore)G.push("");if(Bu(I,G,Q.commentBefore,!1),Q.comment)Y=Q.comment}else if(k6.isPair(Q)){let K=k6.isNode(Q.key)?Q.key:null;if(K){if(K.spaceBefore)G.push("");if(Bu(I,G,K.commentBefore,!1),K.comment)N=!0}let W=k6.isNode(Q.value)?Q.value:null;if(W){if(W.comment)Y=W.comment;if(W.commentBefore)N=!0}else if(Q.value==null&&K?.comment)Y=K.comment}if(Y)N=!0;let R=iX.stringify(Q,J,()=>Y=null);if(H<$.length-1)R+=",";if(Y)R+=Vu.lineComment(R,_,v(Y));if(!N&&(G.length>X||R.includes(`
|
|
74
74
|
`)))N=!0;G.push(R),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
75
|
${g}${u}${Q}`:`
|
|
76
76
|
`;return`${H}
|
|
77
|
-
${u}${T}`}else return`${q}${z}${G.join(" ")}${z}${T}`}}function
|
|
78
|
-
`:" ")}return
|
|
77
|
+
${u}${T}`}else return`${q}${z}${G.join(" ")}${z}${T}`}}function Bu({indent:$,options:{commentString:I}},U,_,u){if(_&&u)_=_.replace(/^\n+/,"");if(_){let g=Vu.indentComment(I(_),$);U.push(g.trimStart())}}gM.stringifyCollection=uM});var q6=E((XM)=>{var vM=ug(),JM=Ig(),NM=Gu(),X6=$$(),Mu=G6(),GM=P$();function SI($,I){let U=X6.isScalar(I)?I.value:I;for(let _ of $)if(X6.isPair(_)){if(_.key===I||_.key===U)return _;if(X6.isScalar(_.key)&&_.key.value===U)return _}return}class nX extends NM.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor($){super(X6.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(Mu.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(X6.isPair($))U=$;else if(!$||typeof $!=="object"||!("key"in $))U=new Mu.Pair($,$?.value);else U=new Mu.Pair($.key,$.value);let _=SI(this.items,U.key),u=this.schema?.sortMapEntries;if(_){if(!I)throw Error(`Key ${U.key} already set`);if(X6.isScalar(_.value)&&GM.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=SI(this.items,$);if(!I)return!1;return this.items.splice(this.items.indexOf(I),1).length>0}get($,I){let _=SI(this.items,$)?.value;return(!I&&X6.isScalar(_)?_.value:_)??void 0}has($){return!!SI(this.items,$)}set($,I){this.add(new Mu.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)JM.addPairToJSMap(I,_,u);return _}toString($,I,U){if(!$)return JSON.stringify(this);for(let _ of this.items)if(!X6.isPair(_))throw Error(`Map items must all be pairs; found ${JSON.stringify(_)} instead`);if(!$.allNullValues&&this.hasAllNullValues(!1))$=Object.assign({},$,{allNullValues:!0});return vM.stringifyCollection(this,$,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:$.indent||"",onChompKeep:U,onComment:I})}}XM.YAMLMap=nX;XM.findPair=SI});var R1=E((YM)=>{var TM=$$(),rX=q6(),HM={collection:"map",default:!0,nodeClass:rX.YAMLMap,tag:"tag:yaml.org,2002:map",resolve($,I){if(!TM.isMap($))I("Expected a mapping for this tag");return $},createNode:($,I,U)=>rX.YAMLMap.from($,I,U)};YM.map=HM});var Q6=E((KM)=>{var DM=PI(),VM=ug(),BM=Gu(),Ku=$$(),MM=P$(),RM=v6();class lX extends BM.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor($){super(Ku.SEQ,$);this.items=[]}add($){this.items.push($)}delete($){let I=Ru($);if(typeof I!=="number")return!1;return this.items.splice(I,1).length>0}get($,I){let U=Ru($);if(typeof U!=="number")return;let _=this.items[U];return!I&&Ku.isScalar(_)?_.value:_}has($){let I=Ru($);return typeof I==="number"&&I<this.items.length}set($,I){let U=Ru($);if(typeof U!=="number")throw Error(`Expected a valid index, not ${$}.`);let _=this.items[U];if(Ku.isScalar(_)&&MM.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 VM.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 Ru($){let I=Ku.isScalar($)?$.value:$;if(I&&typeof I==="string")I=Number(I);return typeof I==="number"&&Number.isInteger(I)&&I>=0?I:null}KM.YAMLSeq=lX});var K1=E((ZM)=>{var PM=$$(),mX=Q6(),WM={collection:"seq",default:!0,nodeClass:mX.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve($,I){if(!PM.isSeq($))I("Expected a sequence for this tag");return $},createNode:($,I,U)=>mX.YAMLSeq.from($,I,U)};ZM.seq=WM});var wI=E((FM)=>{var bM=AI(),jM={identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify($,I,U,_){return I=Object.assign({actualString:!0},I),bM.stringifyString($,I,U,_)}};FM.string=jM});var Lu=E((wM)=>{var hX=P$(),cX={identify:($)=>$==null,createNode:()=>new hX.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new hX.Scalar(null),stringify:({source:$},I)=>typeof $==="string"&&cX.test.test($)?$:I.options.nullStr};wM.nullTag=cX});var Ug=E((fM)=>{var CM=P$(),dX={identify:($)=>typeof $==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:($)=>new CM.Scalar($[0]==="t"||$[0]==="T"),stringify({source:$,value:I},U){if($&&dX.test.test($)){let _=$[0]==="t"||$[0]==="T";if(I===_)return $}return I?U.options.trueStr:U.options.falseStr}};fM.boolTag=dX});var L1=E((yM)=>{function kM({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}yM.stringifyNumber=kM});var gg=E((hM)=>{var nM=P$(),_g=L1(),rM={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:_g.stringifyNumber},lM={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():_g.stringifyNumber($)}},mM={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve($){let I=new nM.Scalar(parseFloat($)),U=$.indexOf(".");if(U!==-1&&$[$.length-1]==="0")I.minFractionDigits=$.length-U-1;return I},stringify:_g.stringifyNumber};hM.float=mM;hM.floatExp=lM;hM.floatNaN=rM});var vg=E((eM)=>{var pX=L1(),Pu=($)=>typeof $==="bigint"||Number.isInteger($),zg=($,I,U,{intAsBigInt:_})=>_?BigInt($):parseInt($.substring(I),U);function oX($,I,U){let{value:_}=$;if(Pu(_)&&_>=0)return U+_.toString(I);return pX.stringifyNumber($)}var oM={identify:($)=>Pu($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:($,I,U)=>zg($,2,8,U),stringify:($)=>oX($,8,"0o")},tM={identify:Pu,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:($,I,U)=>zg($,0,10,U),stringify:pX.stringifyNumber},aM={identify:($)=>Pu($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:($,I,U)=>zg($,2,16,U),stringify:($)=>oX($,16,"0x")};eM.int=tM;eM.intHex=aM;eM.intOct=oM});var tX=E((JR)=>{var uR=R1(),UR=Lu(),_R=K1(),gR=wI(),zR=Ug(),Jg=gg(),Ng=vg(),vR=[uR.map,_R.seq,gR.string,UR.nullTag,zR.boolTag,Ng.intOct,Ng.int,Ng.intHex,Jg.floatNaN,Jg.floatExp,Jg.float];JR.schema=vR});var eX=E((YR)=>{var GR=P$(),XR=R1(),qR=K1();function aX($){return typeof $==="bigint"||Number.isInteger($)}var Wu=({value:$})=>JSON.stringify($),QR=[{identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify:Wu},{identify:($)=>$==null,createNode:()=>new GR.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:aX,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:($,I,{intAsBigInt:U})=>U?BigInt($):parseInt($,10),stringify:({value:$})=>aX($)?$.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}],TR={default:!0,tag:"",test:/^/,resolve($,I){return I(`Unresolved plain scalar ${JSON.stringify($)}`),$}},HR=[XR.map,qR.seq].concat(QR,TR);YR.schema=HR});var Xg=E((BR)=>{var EI=g$("buffer"),Gg=P$(),DR=AI(),VR={identify:($)=>$ instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve($,I){if(typeof EI.Buffer==="function")return EI.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 EI.Buffer==="function")v=z instanceof EI.Buffer?z.toString("base64"):EI.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=Gg.Scalar.BLOCK_LITERAL),I!==Gg.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===Gg.Scalar.BLOCK_LITERAL?`
|
|
78
|
+
`:" ")}return DR.stringifyString({comment:$,type:I,value:v},_,u,g)}};BR.binary=VR});var Au=E((PR)=>{var Zu=$$(),qg=G6(),RR=P$(),KR=Q6();function sX($,I){if(Zu.isSeq($))for(let U=0;U<$.items.length;++U){let _=$.items[U];if(Zu.isPair(_))continue;else if(Zu.isMap(_)){if(_.items.length>1)I("Each pair must have its own sequence indicator");let u=_.items[0]||new qg.Pair(new RR.Scalar(null));if(_.commentBefore)u.key.commentBefore=u.key.commentBefore?`${_.commentBefore}
|
|
79
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]=Pu.isPair(_)?_:new Ng.Pair(_)}else I("Expected a sequence for this tag");return $}function cX($,I,U){let{replacer:_}=U,u=new TR.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(Ng.createPair(v,J,U))}return u}var HR={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:hX,createNode:cX};YR.createPairs=cX;YR.pairs=HR;YR.resolvePairs=hX});var Xg=E((RR)=>{var dX=$$(),Gg=g6(),wI=G6(),BR=X6(),pX=Wu();class x6 extends BR.YAMLSeq{constructor(){super();this.add=wI.YAMLMap.prototype.add.bind(this),this.delete=wI.YAMLMap.prototype.delete.bind(this),this.get=wI.YAMLMap.prototype.get.bind(this),this.has=wI.YAMLMap.prototype.has.bind(this),this.set=wI.YAMLMap.prototype.set.bind(this),this.tag=x6.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(dX.isPair(_))u=Gg.toJS(_.key,"",I),g=Gg.toJS(_.value,u,I);else u=Gg.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 _=pX.createPairs($,I,U),u=new this;return u.items=_.items,u}}x6.tag="tag:yaml.org,2002:omap";var MR={collection:"seq",identify:($)=>$ instanceof Map,nodeClass:x6,default:!1,tag:"tag:yaml.org,2002:omap",resolve($,I){let U=pX.resolvePairs($,I),_=[];for(let{key:u}of U.items)if(dX.isScalar(u))if(_.includes(u.value))I(`Ordered maps must not include duplicate keys: ${u.value}`);else _.push(u.value);return Object.assign(new x6,U)},createNode:($,I,U)=>x6.from($,I,U)};RR.YAMLOMap=x6;RR.omap=MR});var sX=E((PR)=>{var oX=P$();function tX({value:$,source:I},U){if(I&&($?aX:eX).test.test(I))return I;return $?U.options.trueStr:U.options.falseStr}var aX={identify:($)=>$===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new oX.Scalar(!0),stringify:tX},eX={identify:($)=>$===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new oX.Scalar(!1),stringify:tX};PR.falseTag=eX;PR.trueTag=aX});var $q=E((SR)=>{var AR=P$(),qg=R1(),bR={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:qg.stringifyNumber},jR={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():qg.stringifyNumber($)}},FR={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve($){let I=new AR.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:qg.stringifyNumber};SR.float=FR;SR.floatExp=jR;SR.floatNaN=bR});var uq=E((iR)=>{var Iq=R1(),EI=($)=>typeof $==="bigint"||Number.isInteger($);function Zu($,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 Qg($,I,U){let{value:_}=$;if(EI(_)){let u=_.toString(I);return _<0?"-"+U+u.substr(1):U+u}return Iq.stringifyNumber($)}var fR={identify:EI,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:($,I,U)=>Zu($,2,2,U),stringify:($)=>Qg($,2,"0b")},xR={identify:EI,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:($,I,U)=>Zu($,1,8,U),stringify:($)=>Qg($,8,"0")},kR={identify:EI,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:($,I,U)=>Zu($,0,10,U),stringify:Iq.stringifyNumber},yR={identify:EI,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:($,I,U)=>Zu($,2,16,U),stringify:($)=>Qg($,16,"0x")};iR.int=kR;iR.intBin=fR;iR.intHex=yR;iR.intOct=xR});var Tg=E((cR)=>{var ju=$$(),Au=J6(),bu=G6();class k6 extends bu.YAMLMap{constructor($){super($);this.tag=k6.tag}add($){let I;if(ju.isPair($))I=$;else if($&&typeof $==="object"&&"key"in $&&"value"in $&&$.value===null)I=new Au.Pair($.key,null);else I=new Au.Pair($,null);if(!bu.findPair(this.items,I.key))this.items.push(I)}get($,I){let U=bu.findPair(this.items,$);return!I&&ju.isPair(U)?ju.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=bu.findPair(this.items,$);if(U&&!I)this.items.splice(this.items.indexOf(U),1);else if(!U&&I)this.items.push(new Au.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(Au.createPair(g,null,U))}return u}}k6.tag="tag:yaml.org,2002:set";var hR={collection:"map",identify:($)=>$ instanceof Set,nodeClass:k6,default:!1,tag:"tag:yaml.org,2002:set",createNode:($,I,U)=>k6.from($,I,U),resolve($,I){if(ju.isMap($))if($.hasAllNullValues(!0))return Object.assign(new k6,$);else I("Set items must all have null values");else I("Expected a mapping for this tag");return $}};cR.YAMLSet=k6;cR.set=hR});var Yg=E((eR)=>{var oR=R1();function Hg($,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 Uq($){let{value:I}=$,U=(z)=>z;if(typeof I==="bigint")U=(z)=>BigInt(z);else if(isNaN(I)||!isFinite(I))return oR.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 tR={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})=>Hg($,U),stringify:Uq},aR={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:($)=>Hg($,!1),stringify:Uq},_q={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(_q.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=Hg(X,!1);if(Math.abs(G)<30)G*=60;N-=60000*G}return new Date(N)},stringify:({value:$})=>$?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};eR.floatTime=aR;eR.intTime=tR;eR.timestamp=_q});var zq=E((qK)=>{var uK=B1(),UK=Ru(),_K=M1(),gK=FI(),zK=Jg(),gq=sX(),Og=$q(),Fu=uq(),vK=Tu(),JK=Xg(),NK=Wu(),GK=Tg(),Dg=Yg(),XK=[uK.map,_K.seq,gK.string,UK.nullTag,gq.trueTag,gq.falseTag,Fu.intBin,Fu.intOct,Fu.int,Fu.intHex,Og.floatNaN,Og.floatExp,Og.float,zK.binary,vK.merge,JK.omap,NK.pairs,GK.set,Dg.intTime,Dg.floatTime,Dg.timestamp];qK.schema=XK});var Yq=E((MK)=>{var Gq=B1(),TK=Ru(),Xq=M1(),HK=FI(),YK=$g(),Vg=ug(),Bg=_g(),OK=rX(),DK=mX(),qq=Jg(),CI=Tu(),Qq=Xg(),Tq=Wu(),vq=zq(),Hq=Tg(),Su=Yg(),Jq=new Map([["core",OK.schema],["failsafe",[Gq.map,Xq.seq,HK.string]],["json",DK.schema],["yaml11",vq.schema],["yaml-1.1",vq.schema]]),Nq={binary:qq.binary,bool:YK.boolTag,float:Vg.float,floatExp:Vg.floatExp,floatNaN:Vg.floatNaN,floatTime:Su.floatTime,int:Bg.int,intHex:Bg.intHex,intOct:Bg.intOct,intTime:Su.intTime,map:Gq.map,merge:CI.merge,null:TK.nullTag,omap:Qq.omap,pairs:Tq.pairs,seq:Xq.seq,set:Hq.set,timestamp:Su.timestamp},VK={"tag:yaml.org,2002:binary":qq.binary,"tag:yaml.org,2002:merge":CI.merge,"tag:yaml.org,2002:omap":Qq.omap,"tag:yaml.org,2002:pairs":Tq.pairs,"tag:yaml.org,2002:set":Hq.set,"tag:yaml.org,2002:timestamp":Su.timestamp};function BK($,I,U){let _=Jq.get(I);if(_&&!$)return U&&!_.includes(CI.merge)?_.concat(CI.merge):_.slice();let u=_;if(!u)if(Array.isArray($))u=[];else{let g=Array.from(Jq.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(CI.merge);return u.reduce((g,z)=>{let v=typeof z==="string"?Nq[z]:z;if(!v){let J=JSON.stringify(z),N=Object.keys(Nq).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},[])}MK.coreKnownTags=VK;MK.getTags=BK});var Kg=E((AK)=>{var Mg=$$(),LK=B1(),PK=M1(),WK=FI(),wu=Yq(),ZK=($,I)=>$.key<I.key?-1:$.key>I.key?1:0;class Rg{constructor({compat:$,customTags:I,merge:U,resolveKnownTags:_,schema:u,sortMapEntries:g,toStringDefaults:z}){this.compat=Array.isArray($)?wu.getTags($,"compat"):$?wu.getTags(null,$):null,this.name=typeof u==="string"&&u||"core",this.knownTags=_?wu.coreKnownTags:{},this.tags=wu.getTags(I,this.name,U),this.toStringOptions=z??null,Object.defineProperty(this,Mg.MAP,{value:LK.map}),Object.defineProperty(this,Mg.SCALAR,{value:WK.string}),Object.defineProperty(this,Mg.SEQ,{value:PK.seq}),this.sortMapEntries=typeof g==="function"?g:g===!0?ZK:null}clone(){let $=Object.create(Rg.prototype,Object.getOwnPropertyDescriptors(this));return $.tags=this.tags.slice(),$}}AK.Schema=Rg});var Oq=E((SK)=>{var jK=$$(),Lg=ZI(),fI=LI();function FK($,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=Lg.createStringifyContext($,I),{commentString:g}=u.options;if($.commentBefore){if(U.length!==1)U.unshift("");let J=g($.commentBefore);U.unshift(fI.indentComment(J,""))}let z=!1,v=null;if($.contents){if(jK.isNode($.contents)){if($.contents.spaceBefore&&_)U.push("");if($.contents.commentBefore){let X=g($.contents.commentBefore);U.push(fI.indentComment(X,""))}u.forceBlockIndent=!!$.comment,v=$.contents.comment}let J=v?void 0:()=>z=!0,N=Lg.stringify($.contents,u,()=>v=null,J);if(v)N+=fI.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(Lg.stringify($.contents,u));if($.directives?.docEnd)if($.comment){let J=g($.comment);if(J.includes(`
|
|
81
|
-
`))U.push("..."),U.push(
|
|
80
|
+
${g.comment}`:_.comment}_=u}$.items[U]=Zu.isPair(_)?_:new qg.Pair(_)}else I("Expected a sequence for this tag");return $}function $q($,I,U){let{replacer:_}=U,u=new KR.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(qg.createPair(v,J,U))}return u}var LR={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:sX,createNode:$q};PR.createPairs=$q;PR.pairs=LR;PR.resolvePairs=sX});var Tg=E((FR)=>{var Iq=$$(),Qg=v6(),CI=q6(),bR=Q6(),uq=Au();class y6 extends bR.YAMLSeq{constructor(){super();this.add=CI.YAMLMap.prototype.add.bind(this),this.delete=CI.YAMLMap.prototype.delete.bind(this),this.get=CI.YAMLMap.prototype.get.bind(this),this.has=CI.YAMLMap.prototype.has.bind(this),this.set=CI.YAMLMap.prototype.set.bind(this),this.tag=y6.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(Iq.isPair(_))u=Qg.toJS(_.key,"",I),g=Qg.toJS(_.value,u,I);else u=Qg.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 _=uq.createPairs($,I,U),u=new this;return u.items=_.items,u}}y6.tag="tag:yaml.org,2002:omap";var jR={collection:"seq",identify:($)=>$ instanceof Map,nodeClass:y6,default:!1,tag:"tag:yaml.org,2002:omap",resolve($,I){let U=uq.resolvePairs($,I),_=[];for(let{key:u}of U.items)if(Iq.isScalar(u))if(_.includes(u.value))I(`Ordered maps must not include duplicate keys: ${u.value}`);else _.push(u.value);return Object.assign(new y6,U)},createNode:($,I,U)=>y6.from($,I,U)};FR.YAMLOMap=y6;FR.omap=jR});var vq=E((ER)=>{var Uq=P$();function _q({value:$,source:I},U){if(I&&($?gq:zq).test.test(I))return I;return $?U.options.trueStr:U.options.falseStr}var gq={identify:($)=>$===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Uq.Scalar(!0),stringify:_q},zq={identify:($)=>$===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Uq.Scalar(!1),stringify:_q};ER.falseTag=zq;ER.trueTag=gq});var Jq=E((nR)=>{var xR=P$(),Hg=L1(),kR={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:Hg.stringifyNumber},yR={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():Hg.stringifyNumber($)}},iR={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve($){let I=new xR.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:Hg.stringifyNumber};nR.float=iR;nR.floatExp=yR;nR.floatNaN=kR});var Gq=E((oR)=>{var Nq=L1(),fI=($)=>typeof $==="bigint"||Number.isInteger($);function bu($,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 Yg($,I,U){let{value:_}=$;if(fI(_)){let u=_.toString(I);return _<0?"-"+U+u.substr(1):U+u}return Nq.stringifyNumber($)}var hR={identify:fI,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:($,I,U)=>bu($,2,2,U),stringify:($)=>Yg($,2,"0b")},cR={identify:fI,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:($,I,U)=>bu($,1,8,U),stringify:($)=>Yg($,8,"0")},dR={identify:fI,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:($,I,U)=>bu($,0,10,U),stringify:Nq.stringifyNumber},pR={identify:fI,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:($,I,U)=>bu($,2,16,U),stringify:($)=>Yg($,16,"0x")};oR.int=dR;oR.intBin=hR;oR.intHex=pR;oR.intOct=cR});var Og=E((IK)=>{var Su=$$(),ju=G6(),Fu=q6();class i6 extends Fu.YAMLMap{constructor($){super($);this.tag=i6.tag}add($){let I;if(Su.isPair($))I=$;else if($&&typeof $==="object"&&"key"in $&&"value"in $&&$.value===null)I=new ju.Pair($.key,null);else I=new ju.Pair($,null);if(!Fu.findPair(this.items,I.key))this.items.push(I)}get($,I){let U=Fu.findPair(this.items,$);return!I&&Su.isPair(U)?Su.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=Fu.findPair(this.items,$);if(U&&!I)this.items.splice(this.items.indexOf(U),1);else if(!U&&I)this.items.push(new ju.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(ju.createPair(g,null,U))}return u}}i6.tag="tag:yaml.org,2002:set";var $K={collection:"map",identify:($)=>$ instanceof Set,nodeClass:i6,default:!1,tag:"tag:yaml.org,2002:set",createNode:($,I,U)=>i6.from($,I,U),resolve($,I){if(Su.isMap($))if($.hasAllNullValues(!0))return Object.assign(new i6,$);else I("Set items must all have null values");else I("Expected a mapping for this tag");return $}};IK.YAMLSet=i6;IK.set=$K});var Vg=E((vK)=>{var _K=L1();function Dg($,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 Xq($){let{value:I}=$,U=(z)=>z;if(typeof I==="bigint")U=(z)=>BigInt(z);else if(isNaN(I)||!isFinite(I))return _K.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 gK={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})=>Dg($,U),stringify:Xq},zK={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:($)=>Dg($,!1),stringify:Xq},qq={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(qq.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=Dg(X,!1);if(Math.abs(G)<30)G*=60;N-=60000*G}return new Date(N)},stringify:({value:$})=>$?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};vK.floatTime=zK;vK.intTime=gK;vK.timestamp=qq});var Tq=E((MK)=>{var XK=R1(),qK=Lu(),QK=K1(),TK=wI(),HK=Xg(),Qq=vq(),Bg=Jq(),wu=Gq(),YK=Yu(),OK=Tg(),DK=Au(),VK=Og(),Mg=Vg(),BK=[XK.map,QK.seq,TK.string,qK.nullTag,Qq.trueTag,Qq.falseTag,wu.intBin,wu.intOct,wu.int,wu.intHex,Bg.floatNaN,Bg.floatExp,Bg.float,HK.binary,YK.merge,OK.omap,DK.pairs,VK.set,Mg.intTime,Mg.floatTime,Mg.timestamp];MK.schema=BK});var Lq=E((jK)=>{var Dq=R1(),KK=Lu(),Vq=K1(),LK=wI(),PK=Ug(),Rg=gg(),Kg=vg(),WK=tX(),ZK=eX(),Bq=Xg(),xI=Yu(),Mq=Tg(),Rq=Au(),Hq=Tq(),Kq=Og(),Eu=Vg(),Yq=new Map([["core",WK.schema],["failsafe",[Dq.map,Vq.seq,LK.string]],["json",ZK.schema],["yaml11",Hq.schema],["yaml-1.1",Hq.schema]]),Oq={binary:Bq.binary,bool:PK.boolTag,float:Rg.float,floatExp:Rg.floatExp,floatNaN:Rg.floatNaN,floatTime:Eu.floatTime,int:Kg.int,intHex:Kg.intHex,intOct:Kg.intOct,intTime:Eu.intTime,map:Dq.map,merge:xI.merge,null:KK.nullTag,omap:Mq.omap,pairs:Rq.pairs,seq:Vq.seq,set:Kq.set,timestamp:Eu.timestamp},AK={"tag:yaml.org,2002:binary":Bq.binary,"tag:yaml.org,2002:merge":xI.merge,"tag:yaml.org,2002:omap":Mq.omap,"tag:yaml.org,2002:pairs":Rq.pairs,"tag:yaml.org,2002:set":Kq.set,"tag:yaml.org,2002:timestamp":Eu.timestamp};function bK($,I,U){let _=Yq.get(I);if(_&&!$)return U&&!_.includes(xI.merge)?_.concat(xI.merge):_.slice();let u=_;if(!u)if(Array.isArray($))u=[];else{let g=Array.from(Yq.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(xI.merge);return u.reduce((g,z)=>{let v=typeof z==="string"?Oq[z]:z;if(!v){let J=JSON.stringify(z),N=Object.keys(Oq).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},[])}jK.coreKnownTags=AK;jK.getTags=bK});var Wg=E((xK)=>{var Lg=$$(),wK=R1(),EK=K1(),CK=wI(),Cu=Lq(),fK=($,I)=>$.key<I.key?-1:$.key>I.key?1:0;class Pg{constructor({compat:$,customTags:I,merge:U,resolveKnownTags:_,schema:u,sortMapEntries:g,toStringDefaults:z}){this.compat=Array.isArray($)?Cu.getTags($,"compat"):$?Cu.getTags(null,$):null,this.name=typeof u==="string"&&u||"core",this.knownTags=_?Cu.coreKnownTags:{},this.tags=Cu.getTags(I,this.name,U),this.toStringOptions=z??null,Object.defineProperty(this,Lg.MAP,{value:wK.map}),Object.defineProperty(this,Lg.SCALAR,{value:CK.string}),Object.defineProperty(this,Lg.SEQ,{value:EK.seq}),this.sortMapEntries=typeof g==="function"?g:g===!0?fK:null}clone(){let $=Object.create(Pg.prototype,Object.getOwnPropertyDescriptors(this));return $.tags=this.tags.slice(),$}}xK.Schema=Pg});var Pq=E((nK)=>{var yK=$$(),Zg=bI(),kI=WI();function iK($,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=Zg.createStringifyContext($,I),{commentString:g}=u.options;if($.commentBefore){if(U.length!==1)U.unshift("");let J=g($.commentBefore);U.unshift(kI.indentComment(J,""))}let z=!1,v=null;if($.contents){if(yK.isNode($.contents)){if($.contents.spaceBefore&&_)U.push("");if($.contents.commentBefore){let X=g($.contents.commentBefore);U.push(kI.indentComment(X,""))}u.forceBlockIndent=!!$.comment,v=$.contents.comment}let J=v?void 0:()=>z=!0,N=Zg.stringify($.contents,u,()=>v=null,J);if(v)N+=kI.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(Zg.stringify($.contents,u));if($.directives?.docEnd)if($.comment){let J=g($.comment);if(J.includes(`
|
|
81
|
+
`))U.push("..."),U.push(kI.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(kI.indentComment(g(J),""))}}return U.join(`
|
|
82
82
|
`)+`
|
|
83
|
-
`}
|
|
83
|
+
`}nK.stringifyDocument=iK});var yI=E((tK)=>{var lK=LI(),P1=Gu(),G4=$$(),mK=G6(),hK=v6(),cK=Wg(),dK=Pq(),Ag=vu(),pK=d2(),oK=PI(),bg=c2();class jg{constructor($,I,U){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,G4.NODE_TYPE,{value:G4.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 bg.Directives({version:g});this.setSchema(g,U),this.contents=$===void 0?null:this.createNode($,_,U)}clone(){let $=Object.create(jg.prototype,{[G4.NODE_TYPE]:{value:G4.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=G4.isNode(this.contents)?this.contents.clone($.schema):this.contents,this.range)$.range=this.range.slice();return $}add($){if(W1(this.contents))this.contents.add($)}addIn($,I){if(W1(this.contents))this.contents.addIn($,I)}createAlias($,I){if(!$.anchor){let U=Ag.anchorNames(this);$.anchor=!I||U.has(I)?Ag.findNewAnchor(I||"a",U):I}return new lK.Alias($.anchor)}createNode($,I,U){let _=void 0;if(typeof I==="function")$=I.call({"":$},"",$),_=I;else if(Array.isArray(I)){let Q=(R)=>typeof R==="number"||R instanceof String||R 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}=Ag.createNodeAnchors(this,g||"a"),T={aliasDuplicateObjects:u??!0,keepUndefined:v??!1,onAnchor:X,onTagObj:J,replacer:_,schema:this.schema,sourceObjects:q},H=oK.createNode($,N,T);if(z&&G4.isCollection(H))H.flow=!0;return G(),H}createPair($,I,U={}){let _=this.createNode($,null,U),u=this.createNode(I,null,U);return new mK.Pair(_,u)}delete($){return W1(this.contents)?this.contents.delete($):!1}deleteIn($){if(P1.isEmptyPath($)){if(this.contents==null)return!1;return this.contents=null,!0}return W1(this.contents)?this.contents.deleteIn($):!1}get($,I){return G4.isCollection(this.contents)?this.contents.get($,I):void 0}getIn($,I){if(P1.isEmptyPath($))return!I&&G4.isScalar(this.contents)?this.contents.value:this.contents;return G4.isCollection(this.contents)?this.contents.getIn($,I):void 0}has($){return G4.isCollection(this.contents)?this.contents.has($):!1}hasIn($){if(P1.isEmptyPath($))return this.contents!==void 0;return G4.isCollection(this.contents)?this.contents.hasIn($):!1}set($,I){if(this.contents==null)this.contents=P1.collectionFromPath(this.schema,[$],I);else if(W1(this.contents))this.contents.set($,I)}setIn($,I){if(P1.isEmptyPath($))this.contents=I;else if(this.contents==null)this.contents=P1.collectionFromPath(this.schema,Array.from($),I);else if(W1(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 bg.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 bg.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 cK.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=hK.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"?pK.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 dK.stringifyDocument(this,$)}}function W1($){if(G4.isCollection($))return!0;throw Error("Expected a YAML collection as document contents")}tK.Document=jg});var iI=E((sK)=>{class fu extends Error{constructor($,I,U,_){super();this.name=$,this.code=U,this.message=_,this.pos=I}}class Wq extends fu{constructor($,I,U){super("YAMLParseError",$,I,U)}}class Zq extends fu{constructor($,I,U){super("YAMLWarning",$,I,U)}}var eK=($,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
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+=`:
|
|
85
85
|
|
|
86
86
|
${z}
|
|
87
87
|
${N}
|
|
88
|
-
`}};
|
|
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(
|
|
90
|
-
`+Q.comment;else v.comment=Q.comment;continue}if(Q.newlineAfterProp||
|
|
91
|
-
`+W.comment;else K.comment=W.comment;let O=new
|
|
92
|
-
`+P.comment;else N.comment=P.comment;G=P.end;continue}if(!z&&U.options.strict&&
|
|
93
|
-
`+B;else M.comment=B;P.comment=P.comment.substring(B.length+1)}}}if(!z&&!O&&!P.found){let B=V?$(U,V,P,u):I(U,P.end,O,null,P,u);if(N.items.push(B),G=B.range[2],
|
|
94
|
-
`+F.comment;else M.comment=F.comment;let x=new
|
|
95
|
-
`+Y.comment;else N.comment=Y.comment;N.range=[_.offset,Q,Y.offset]}else N.range=[_.offset,Q,Q];return N}
|
|
88
|
+
`}};sK.YAMLError=fu;sK.YAMLParseError=Wq;sK.YAMLWarning=Zq;sK.prettifyError=eK});var nI=E((gL)=>{function _L($,{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,R=null,K=null,W=null,O=null,V=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||R)K=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,V??(V=M.offset),N=!1,X=!1,H=!0;break;case"tag":{if(R)g(M,"MULTIPLE_TAGS","A node can have at most one tag");R=M,V??(V=M.offset),N=!1,X=!1,H=!0;break}case U:if(Y||R)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(W)g(M,"UNEXPECTED_TOKEN",`Unexpected , in ${I}`);W=M,N=!1,X=!1;break}default:g(M,"UNEXPECTED_TOKEN",`Unexpected ${M.type} token`),N=!1,X=!1}}let P=$[$.length-1],B=P?P.offset+P.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:W,found:O,spaceBefore:J,comment:G,hasNewline:T,anchor:Y,tag:R,newlineAfterProp:K,end:B,start:V??B}}gL.resolveProps=_L});var xu=E((vL)=>{function Fg($){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(Fg(I.key)||Fg(I.value))return!0}return!1;default:return!0}}vL.containsNewline=Fg});var Sg=E((XL)=>{var NL=xu();function GL($,I,U){if(I?.type==="flow-collection"){let _=I.end[0];if(_.indent===$&&(_.source==="]"||_.source==="}")&&NL.containsNewline(I))U(_,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}XL.flowIndentCheck=GL});var wg=E((TL)=>{var Aq=$$();function QL($,I,U){let{uniqueKeys:_}=$.options;if(_===!1)return!1;let u=typeof _==="function"?_:(g,z)=>g===z||Aq.isScalar(g)&&Aq.isScalar(z)&&g.value===z.value;return I.some((g)=>u(g.key,U))}TL.mapIncludes=QL});var wq=E((BL)=>{var bq=G6(),YL=q6(),jq=nI(),OL=xu(),Fq=Sg(),DL=wg(),Sq="All mapping items must start at the same column";function VL({composeNode:$,composeEmptyNode:I},U,_,u,g){let v=new(g?.nodeClass??YL.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=jq.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",Sq)}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||OL.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",Sq);U.atKey=!0;let R=Q.end,K=q?$(U,q,Q,u):I(U,R,G,null,Q,u);if(U.schema.compat)Fq.flowIndentCheck(_.indent,q,u);if(U.atKey=!1,DL.mapIncludes(U,v.items,K))u(R,"DUPLICATE_KEY","Map keys must be unique");let W=jq.resolveProps(T??[],{indicator:"map-value-ind",next:H,offset:K.range[2],onError:u,parentIndent:_.indent,startOnNewline:!q||q.type==="block-scalar"});if(J=W.end,W.found){if(Y){if(H?.type==="block-map"&&!W.hasNewline)u(J,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(U.options.strict&&Q.start<W.found.offset-1024)u(K.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,W,u):I(U,J,T,null,W,u);if(U.schema.compat)Fq.flowIndentCheck(_.indent,H,u);J=O.range[2];let V=new bq.Pair(K,O);if(U.options.keepSourceTokens)V.srcToken=X;v.items.push(V)}else{if(Y)u(K.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(W.comment)if(K.comment)K.comment+=`
|
|
91
|
+
`+W.comment;else K.comment=W.comment;let O=new bq.Pair(K);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}BL.resolveBlockMap=VL});var Eq=E((WL)=>{var RL=Q6(),KL=nI(),LL=Sg();function PL({composeNode:$,composeEmptyNode:I},U,_,u,g){let v=new(g?.nodeClass??RL.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=KL.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)LL.flowIndentCheck(_.indent,G,u);J=T.range[2],v.items.push(T)}return v.range=[_.offset,J,N??J],v}WL.resolveBlockSeq=PL});var Z1=E((bL)=>{function AL($,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}}bL.resolveEnd=AL});var xq=E((kL)=>{var FL=$$(),SL=G6(),Cq=q6(),wL=Q6(),EL=Z1(),fq=nI(),CL=xu(),fL=wg(),Eg="Block collections are not allowed within flow collections",Cg=($)=>$&&($.type==="block-map"||$.type==="block-seq");function xL({composeNode:$,composeEmptyNode:I},U,_,u,g){let z=_.start.source==="{",v=z?"flow map":"flow sequence",N=new(g?.nodeClass??(z?Cq.YAMLMap:wL.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 R=_.items[Y],{start:K,key:W,sep:O,value:V}=R,P=fq.resolveProps(K,{flow:v,indicator:"explicit-key-ind",next:W??O?.[0],offset:G,onError:u,parentIndent:_.indent,startOnNewline:!1});if(!P.found){if(!P.anchor&&!P.tag&&!O&&!V){if(Y===0&&P.comma)u(P.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${v}`);else if(Y<_.items.length-1)u(P.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${v}`);if(P.comment)if(N.comment)N.comment+=`
|
|
92
|
+
`+P.comment;else N.comment=P.comment;G=P.end;continue}if(!z&&U.options.strict&&CL.containsNewline(W))u(W,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(Y===0){if(P.comma)u(P.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${v}`)}else{if(!P.comma)u(P.start,"MISSING_CHAR",`Missing , between ${v} items`);if(P.comment){let B="";$:for(let M of K)switch(M.type){case"comma":case"space":break;case"comment":B=M.source.substring(1);break $;default:break $}if(B){let M=N.items[N.items.length-1];if(FL.isPair(M))M=M.value??M.key;if(M.comment)M.comment+=`
|
|
93
|
+
`+B;else M.comment=B;P.comment=P.comment.substring(B.length+1)}}}if(!z&&!O&&!P.found){let B=V?$(U,V,P,u):I(U,P.end,O,null,P,u);if(N.items.push(B),G=B.range[2],Cg(V))u(B.range,"BLOCK_IN_FLOW",Eg)}else{U.atKey=!0;let B=P.end,M=W?$(U,W,P,u):I(U,B,K,null,P,u);if(Cg(W))u(M.range,"BLOCK_IN_FLOW",Eg);U.atKey=!1;let F=fq.resolveProps(O??[],{flow:v,indicator:"map-value-ind",next:V,offset:M.range[2],onError:u,parentIndent:_.indent,startOnNewline:!1});if(F.found){if(!z&&!P.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(P.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(V)if("source"in V&&V.source?.[0]===":")u(V,"MISSING_CHAR",`Missing space after : in ${v}`);else u(F.start,"MISSING_CHAR",`Missing , or : between ${v} items`);let A=V?$(U,V,F,u):F.found?I(U,F.end,O,null,F,u):null;if(A){if(Cg(V))u(A.range,"BLOCK_IN_FLOW",Eg)}else if(F.comment)if(M.comment)M.comment+=`
|
|
94
|
+
`+F.comment;else M.comment=F.comment;let x=new SL.Pair(M,A);if(U.options.keepSourceTokens)x.srcToken=R;if(z){let b=N;if(fL.mapIncludes(U,b.items,M))u(B,"DUPLICATE_KEY","Map keys must be unique");b.items.push(x)}else{let b=new Cq.YAMLMap(U.schema);b.flow=!0,b.items.push(x);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),R=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",R),T&&T.source.length!==1)H.unshift(T)}if(H.length>0){let Y=EL.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}kL.resolveFlowCollection=xL});var kq=E((pL)=>{var iL=$$(),nL=P$(),rL=q6(),lL=Q6(),mL=wq(),hL=Eq(),cL=xq();function fg($,I,U,_,u,g){let z=U.type==="block-map"?mL.resolveBlockMap($,I,U,_,g):U.type==="block-seq"?hL.resolveBlockSeq($,I,U,_,g):cL.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 dL($,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===rL.YAMLMap.tagName&&v==="map"||z===lL.YAMLSeq.tagName&&v==="seq")return fg($,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 fg($,I,U,u,z)}}let N=fg($,I,U,u,z,J),X=J.resolve?.(N,(q)=>u(g,"TAG_RESOLVE_FAILED",q),I.options)??N,G=iL.isNode(X)?X:new nL.Scalar(X);if(G.range=N.range,G.tag=z,J?.format)G.format=J.format;return G}pL.composeCollection=dL});var kg=E((sL)=>{var xg=P$();function tL($,I,U){let _=I.offset,u=aL(I,$.options.strict,U);if(!u)return{value:"",type:null,comment:"",range:[_,_,_]};let g=u.mode===">"?xg.Scalar.BLOCK_FOLDED:xg.Scalar.BLOCK_LITERAL,z=I.source?eL(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
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,R]=z[Q];if(R===""||R==="\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+R.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,R]=z[Q];N+=Y.length+R.length+1;let K=R[R.length-1]==="\r";if(K)R=R.slice(0,-1);if(R&&Y.length<J){let O=`Block scalar lines must not be less indented than their ${u.indent?"explicit indentation indicator":"first line"}`;U(N-R.length-(K?2:1),"BAD_INDENT",O),Y=""}if(g===
|
|
97
|
+
`;for(let Q=X;Q<v;++Q){let[Y,R]=z[Q];N+=Y.length+R.length+1;let K=R[R.length-1]==="\r";if(K)R=R.slice(0,-1);if(R&&Y.length<J){let O=`Block scalar lines must not be less indented than their ${u.indent?"explicit indentation indicator":"first line"}`;U(N-R.length-(K?2:1),"BAD_INDENT",O),Y=""}if(g===xg.Scalar.BLOCK_LITERAL)G+=q+Y.slice(J)+R,q=`
|
|
98
98
|
`;else if(Y.length>J||R[0]==="\t"){if(q===" ")q=`
|
|
99
99
|
`;else if(!T&&q===`
|
|
100
100
|
`)q=`
|
|
@@ -107,172 +107,197 @@ ${N}
|
|
|
107
107
|
`+z[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
|
|
110
|
+
`}let H=_+u.length+I.source.length;return{value:G,type:g,comment:u.comment,range:[_,H,H]}}function aL({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 eL($){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}sL.resolveBlockScalar=tL});var ig=E((NP)=>{var yg=P$(),IP=Z1();function uP($,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=yg.Scalar.PLAIN,J=UP(g,N);break;case"single-quoted-scalar":v=yg.Scalar.QUOTE_SINGLE,J=_P(g,N);break;case"double-quoted-scalar":v=yg.Scalar.QUOTE_DOUBLE,J=gP(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=IP.resolveEnd(z,X,I,U);return{value:J,type:v,comment:G.comment,range:[_,X,G.offset]}}function UP($,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 yq($)}function _P($,I){if($[$.length-1]!=="'"||$.length===1)I($.length,"MISSING_CHAR","Missing closing 'quote");return yq($.slice(1,-1)).replace(/''/g,"'")}function yq($){let I,U;try{I=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
111
111
|
`,"sy"),U=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
112
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
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
|
|
114
|
+
`;else u+=g+_[1],g=" ";z=U.lastIndex}let v=/[ \t]*(.*)/sy;return v.lastIndex=z,_=v.exec($),u+g+(_?.[1]??"")}function gP($,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}=
|
|
116
|
+
`){let{fold:g,offset:z}=zP($,_);U+=g,_=z}else if(u==="\\"){let g=$[++_],z=vP[g];if(z)U+=z;else if(g===`
|
|
117
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+=
|
|
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+=JP($,_+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
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
|
|
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 zP($,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
|
|
125
|
-
`,r:"\r",t:"\t",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function
|
|
124
|
+
`;I+=1,_=$[I+1]}if(!U)U=" ";return{fold:U,offset:I}}var vP={"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 JP($,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)}NP.resolveFlowScalar=uP});var nq=E((YP)=>{var n6=$$(),iq=P$(),XP=kg(),qP=ig();function QP($,I,U,_){let{value:u,type:g,comment:z,range:v}=I.type==="block-scalar"?XP.resolveBlockScalar($,I,_):qP.resolveFlowScalar(I,$.options.strict,_),J=U?$.directives.tagName(U.source,(G)=>_(U,"TAG_RESOLVE_FAILED",G)):null,N;if($.options.stringKeys&&$.atKey)N=$.schema[n6.SCALAR];else if(J)N=TP($.schema,u,J,U,_);else if(I.type==="scalar")N=HP($,u,I,_);else N=$.schema[n6.SCALAR];let X;try{let G=N.resolve(u,(q)=>_(U??I,"TAG_RESOLVE_FAILED",q),$.options);X=n6.isScalar(G)?G:new iq.Scalar(G)}catch(G){let q=G instanceof Error?G.message:String(G);_(U??I,"TAG_RESOLVE_FAILED",q),X=new iq.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 TP($,I,U,_,u){if(U==="!")return $[n6.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"),$[n6.SCALAR]}function HP({atKey:$,directives:I,schema:U},_,u,g){let z=U.tags.find((v)=>(v.default===!0||$&&v.default==="key")&&v.test?.test(_))||U[n6.SCALAR];if(U.compat){let v=U.compat.find((J)=>J.default&&J.test?.test(_))??U[n6.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}YP.composeScalar=QP});var rq=E((VP)=>{function DP($,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 $}VP.emptyScalarPosition=DP});var hq=E((AP)=>{var MP=LI(),RP=$$(),KP=kq(),lq=nq(),LP=Z1(),PP=rq(),WP={composeNode:mq,composeEmptyNode:ng};function mq($,I,U,_){let u=$.atKey,{spaceBefore:g,comment:z,anchor:v,tag:J}=U,N,X=!0;switch(I.type){case"alias":if(N=ZP($,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=lq.composeScalar($,I,J,_),v)N.anchor=v.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":if(N=KP.composeCollection(WP,$,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=ng($,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&&(!RP.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 ng($,I,U,_,{spaceBefore:u,comment:g,anchor:z,tag:v,end:J},N){let X={type:"scalar",offset:PP.emptyScalarPosition(I,U,_),indent:-1,source:""},G=lq.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 ZP({options:$},{offset:I,source:U,end:_},u){let g=new MP.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=LP.resolveEnd(_,z,$.strict,u);if(g.range=[I,z,v.offset],v.comment)g.comment=v.comment;return g}AP.composeEmptyNode=ng;AP.composeNode=mq});var dq=E((CP)=>{var FP=yI(),cq=hq(),SP=Z1(),wP=nI();function EP($,I,{offset:U,start:_,value:u,end:g},z){let v=Object.assign({_directives:I},$),J=new FP.Document(void 0,v),N={atKey:!1,atRoot:!0,directives:J.directives,options:J.options,schema:J.schema},X=wP.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?cq.composeNode(N,u,X,z):cq.composeEmptyNode(N,X.end,_,null,X,z);let G=J.contents.range[2],q=SP.resolveEnd(g,G,!1,z);if(q.comment)J.comment=q.comment;return J.range=[U,G,q.offset],J}CP.composeDoc=EP});var rg=E((rP)=>{var xP=g$("process"),kP=c2(),yP=yI(),rI=iI(),pq=$$(),iP=dq(),nP=Z1();function lI($){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 oq($){let I="",U=!1,_=!1;for(let u=0;u<$.length;++u){let g=$[u];switch(g[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
|
|
129
|
-
${U}`:U;else if(_||$.directives.docStart||!u)$.commentBefore=U;else if(
|
|
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 tq{constructor($={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(I,U,_,u)=>{let g=lI(I);if(u)this.warnings.push(new rI.YAMLWarning(g,U,_));else this.errors.push(new rI.YAMLParseError(g,U,_))},this.directives=new kP.Directives({version:$.version||"1.2"}),this.options=$}decorate($,I){let{comment:U,afterEmptyLine:_}=oq(this.prelude);if(U){let u=$.contents;if(I)$.comment=$.comment?`${$.comment}
|
|
129
|
+
${U}`:U;else if(_||$.directives.docStart||!u)$.commentBefore=U;else if(pq.isCollection(u)&&!u.flow&&u.items.length>0){let g=u.items[0];if(pq.isPair(g))g=g.key;let z=g.commentBefore;g.commentBefore=z?`${U}
|
|
130
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:
|
|
132
|
-
${I.comment}`:I.comment}this.doc.range[2]=I.offset;break}default:this.errors.push(new
|
|
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:oq(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(xP.env.LOG_STREAM)console.dir($,{depth:null});switch($.type){case"directive":this.directives.add($.source,(I,U,_)=>{let u=lI($);u[0]+=I,this.onError(u,"BAD_DIRECTIVE",U,_)}),this.prelude.push($.source),this.atDirectives=!0;break;case"document":{let I=iP.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 rI.YAMLParseError(lI($),"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 rI.YAMLParseError(lI($),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let I=nP.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 rI.YAMLParseError(lI($),"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 yP.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 _}}}rP.Composer=tq});var sq=E((aP)=>{var mP=kg(),hP=ig(),cP=iI(),aq=AI();function dP($,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 cP.YAMLParseError([v,v+1],g,z)};switch($.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return hP.resolveFlowScalar($,I,_);case"block-scalar":return mP.resolveBlockScalar({options:{strict:I}},$,_)}}return null}function pP($,I){let{implicitKey:U=!1,indent:_,inFlow:u=!1,offset:g=-1,type:z="PLAIN"}=I,v=aq.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:`
|
|
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(!
|
|
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
|
|
135
|
+
`,q=[{type:"block-scalar-header",offset:g,indent:_,source:X}];if(!eq(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 oP($,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=aq.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">":tP($,J);break;case'"':lg($,J,"double-quoted-scalar");break;case"'":lg($,J,"single-quoted-scalar");break;default:lg($,J,"scalar")}}function tP($,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(!
|
|
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
|
|
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})}}}
|
|
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(!eq(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 eq($,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 lg($,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})}}}aP.createScalarToken=pP;aP.resolveAsScalar=dP;aP.setScalarValue=oP});var $5=E((uW)=>{var IW=($)=>("type"in $)?yu($):ku($);function yu($){switch($.type){case"block-scalar":{let I="";for(let U of $.props)I+=yu(U);return I+$.source}case"block-map":case"block-seq":{let I="";for(let U of $.items)I+=ku(U);return I}case"flow-collection":{let I=$.start.source;for(let U of $.items)I+=ku(U);for(let U of $.end)I+=U.source;return I}case"document":{let I=ku($);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 ku({start:$,key:I,sep:U,value:_}){let u="";for(let g of $)u+=g.source;if(I)u+=yu(I);if(U)for(let g of U)u+=g.source;if(_)u+=yu(_);return u}uW.stringify=IW});var U5=E((gW)=>{var mg=Symbol("break visit"),_W=Symbol("skip children"),I5=Symbol("remove item");function r6($,I){if("type"in $&&$.type==="document")$={start:$.start,value:$.value};u5(Object.freeze([]),$,I)}r6.BREAK=mg;r6.SKIP=_W;r6.REMOVE=I5;r6.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};r6.parentCollection=($,I)=>{let U=r6.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 u5($,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=u5(Object.freeze($.concat([[u,z]])),g.items[z],U);if(typeof v==="number")z=v-1;else if(v===mg)return mg;else if(v===I5)g.items.splice(z,1),z-=1}if(typeof _==="function"&&u==="key")_=_(I,$)}}return typeof _==="function"?_(I,$):_}gW.visit=r6});var iu=E((QW)=>{var hg=sq(),vW=$5(),JW=U5(),cg="\uFEFF",dg="\x02",pg="\x18",og="\x1F",NW=($)=>!!$&&("items"in $),GW=($)=>!!$&&($.type==="scalar"||$.type==="single-quoted-scalar"||$.type==="double-quoted-scalar"||$.type==="block-scalar");function XW($){switch($){case cg:return"<BOM>";case dg:return"<DOC>";case pg:return"<FLOW_END>";case og:return"<SCALAR>";default:return JSON.stringify($)}}function qW($){switch($){case cg:return"byte-order-mark";case dg:return"doc-mode";case pg:return"flow-error-end";case og: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}
|
|
143
|
-
`:case"\r":case"\t":return!0;default:return!1}}var
|
|
144
|
-
\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}QW.createScalarToken=hg.createScalarToken;QW.resolveAsScalar=hg.resolveAsScalar;QW.setScalarValue=hg.setScalarValue;QW.stringify=vW.stringify;QW.visit=JW.visit;QW.BOM=cg;QW.DOCUMENT=dg;QW.FLOW_END=pg;QW.SCALAR=og;QW.isCollection=NW;QW.isScalar=GW;QW.prettyToken=XW;QW.tokenType=qW});var ag=E((bW)=>{var mI=iu();function V4($){switch($){case void 0:case" ":case`
|
|
143
|
+
`:case"\r":case"\t":return!0;default:return!1}}var _5=new Set("0123456789ABCDEFabcdef"),ZW=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),nu=new Set(",[]{}"),AW=new Set(` ,[]{}
|
|
144
|
+
\r `),tg=($)=>!$||AW.has($);class g5{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
|
-
`||U>=this.indentNext||!I&&!this.atEnd?$+U:-1}if(I==="-"||I==="."){let U=this.buffer.substr($,3);if((U==="---"||U==="...")&&
|
|
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]===
|
|
148
|
+
`||U>=this.indentNext||!I&&!this.atEnd?$+U:-1}if(I==="-"||I==="."){let U=this.buffer.substr($,3);if((U==="---"||U==="...")&&V4(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]===mI.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 mI.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==="...")&&V4(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&&!V4(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(($==="-"||$==="?"||$===":")&&V4(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(tg),"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("..."))&&V4(_[3])){if(!(U===this.indentNext-1&&this.flowLevel===1&&(_[0]==="]"||_[0]==="}")))return this.flowLevel=0,yield mI.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(tg),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let g=this.charAt(1);if(this.flowKey||V4(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(`
|
|
150
150
|
`,this.pos);if(_!==-1){while(_!==-1){let u=this.continueScalar(_+1);if(u===-1)break;_=U.indexOf(`
|
|
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)=>
|
|
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)=>V4(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
152
|
`:$=u,I=0;break;case"\r":{let g=this.buffer[u+1];if(!g&&!this.atEnd)return this.setNext("block-scalar");if(g===`
|
|
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
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
|
|
156
|
+
`&&u>=this.pos&&u+1+I>z)$=u;else break}while(!0);return yield mI.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(V4(u)||$&&nu.has(u))break;I=U}else if(V4(_)){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==="#"||$&&
|
|
159
|
-
`){let g=this.continueScalar(U+1);if(g===-1)break;U=Math.max(U,g-2)}}else{if($&&
|
|
158
|
+
`,u=this.buffer[U+1];else I=U;if(u==="#"||$&&nu.has(u))break;if(_===`
|
|
159
|
+
`){let g=this.continueScalar(U+1);if(g===-1)break;U=Math.max(U,g-2)}}else{if($&&nu.has(_))break;I=U}if(!_&&!this.atEnd)return this.setNext("plain-scalar");return yield mI.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(tg))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let $=this.flowLevel>0,I=this.charAt(1);if(V4(I)||$&&nu.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(!V4(I)&&I!==">")I=this.buffer[++$];return yield*this.pushToIndex(I===">"?$+1:$,!1)}else{let $=this.pos+1,I=this.buffer[$];while(I)if(ZW.has(I))I=this.buffer[++$];else if(I==="%"&&_5.has(this.buffer[$+1])&&_5.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)}}
|
|
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)}}bW.Lexer=g5});var eg=E((FW)=>{class z5{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}}}}FW.LineCounter=z5});var sg=E((CW)=>{var wW=g$("process"),v5=iu(),EW=ag();function T6($,I){for(let U=0;U<$.length;++U)if($[U].type===I)return!0;return!1}function J5($){for(let I=0;I<$.length;++I)switch($[I].type){case"space":case"comment":case"newline":break;default:return I}return-1}function G5($){switch($?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function ru($){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 A1($){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 N5($){if($.start.type==="flow-seq-start"){for(let I of $.items)if(I.sep&&!I.value&&!T6(I.start,"explicit-key-ind")&&!T6(I.sep,"map-value-ind")){if(I.key)I.value=I.key;if(delete I.key,G5(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 X5{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 EW.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=$,wW.env.LOG_TOKENS)console.log("|",v5.prettyToken($));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=$.length;return}let I=v5.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")N5(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&&J5(_.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(J5($.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=ru(this.peek(2)),U=A1(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(
|
|
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(T6(I.start,"newline"))Object.assign(I,{key:null,sep:[this.sourceToken]});else{let g=A1(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(T6(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(G5(I.key)&&!T6(I.sep,"newline")){let g=A1(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(T6(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&&!T6(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||T6(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 _=ru(U),u=A1(_);N5($);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(`
|
|
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=
|
|
166
|
-
`)}function
|
|
167
|
-
`)}function
|
|
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=
|
|
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=
|
|
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=ru($),U=A1(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=ru($),U=A1(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()}}}CW.Parser=X5});var Y5=E((mW)=>{var q5=rg(),xW=yI(),hI=iI(),kW=e2(),yW=$$(),iW=eg(),Q5=sg();function T5($){let I=$.prettyErrors!==!1;return{lineCounter:$.lineCounter||I&&new iW.LineCounter||null,prettyErrors:I}}function nW($,I={}){let{lineCounter:U,prettyErrors:_}=T5(I),u=new Q5.Parser(U?.addNewLine),g=new q5.Composer(I),z=Array.from(g.compose(u.parse($)));if(_&&U)for(let v of z)v.errors.forEach(hI.prettifyError($,U)),v.warnings.forEach(hI.prettifyError($,U));if(z.length>0)return z;return Object.assign([],{empty:!0},g.streamInfo())}function H5($,I={}){let{lineCounter:U,prettyErrors:_}=T5(I),u=new Q5.Parser(U?.addNewLine),g=new q5.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 hI.YAMLParseError(v.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(_&&U)z.errors.forEach(hI.prettifyError($,U)),z.warnings.forEach(hI.prettifyError($,U));return z}function rW($,I,U){let _=void 0;if(typeof I==="function")_=I;else if(U===void 0&&I&&typeof I==="object")U=I;let u=H5($,U);if(!u)return null;if(u.warnings.forEach((g)=>kW.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 lW($,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(yW.isDocument($)&&!_)return $.toString(U);return new xW.Document($,_,U).toString(U)}mW.parse=rW;mW.parseAllDocuments=nW;mW.parseDocument=H5;mW.stringify=lW});var oW,tW,aW,$z,eW,H6,sW,$Z,IZ,uZ,jk,UZ,_Z,gZ,lu,O5,zZ,vZ,JZ,NZ,GZ,XZ,qZ,QZ,TZ,HZ,YZ,OZ,DZ,VZ,BZ,MZ,RZ,KZ,LZ,PZ,WZ,ZZ,l6,AZ,bZ,jZ,FZ,SZ;var Iz=$4(()=>{oW=rg(),tW=yI(),aW=Wg(),$z=iI(),eW=LI(),H6=$$(),sW=G6(),$Z=P$(),IZ=q6(),uZ=Q6(),jk=iu(),UZ=ag(),_Z=eg(),gZ=sg(),lu=Y5(),O5=RI();zZ=oW.Composer,vZ=tW.Document,JZ=aW.Schema,NZ=$z.YAMLError,GZ=$z.YAMLParseError,XZ=$z.YAMLWarning,qZ=eW.Alias,QZ=H6.isAlias,TZ=H6.isCollection,HZ=H6.isDocument,YZ=H6.isMap,OZ=H6.isNode,DZ=H6.isPair,VZ=H6.isScalar,BZ=H6.isSeq,MZ=sW.Pair,RZ=$Z.Scalar,KZ=IZ.YAMLMap,LZ=uZ.YAMLSeq,PZ=UZ.Lexer,WZ=_Z.LineCounter,ZZ=gZ.Parser,l6=lu.parse,AZ=lu.parseAllDocuments,bZ=lu.parseDocument,jZ=lu.stringify,FZ=O5.visit,SZ=O5.visitAsync});import{existsSync as $1,mkdirSync as Vj,readdirSync as Bj,readFileSync as L_,writeFileSync as Y7}from"node:fs";import{join as M4}from"node:path";function gI($){return M4($,".serena","memories")}function s6($){try{return L_($,"utf-8")}catch{return""}}function p3($){return($.match(/##\s*ID:\s*(.+)/i)||[])[1]||($.match(/session-id:\s*(.+)/i)||[])[1]||$.match(/(session-\d{8}-\d{6})/)?.[1]}function Mj($){let I=$.trim();return I===""||I==="---"}function o3($){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 Kj($){return["# Task Board",`## Session: ${$}`,"","| Agent | Status | Task |","|-------|--------|------|",""].join(`
|
|
167
|
+
`)}function t3($){let I=gI($);if(!$1(I))return[];try{return Bj(I).filter((U)=>U.endsWith(".md")&&U!==".gitkeep")}catch{return[]}}function O7($,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 D7($){let I=gI($),U={agents:[],activities:[],completedTasks:[],inProgressTasks:[]};if(!$1(I))return U;let _=t3($);for(let u of _){if(u==="orchestrator-session.md"){try{let z=L_(M4(I,u),"utf-8").match(/session[:\s]+(\S+)/i);if(z)U.sessionId=z[1]}catch{}continue}try{let g=L_(M4(I,u),"utf-8"),z=O7(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 P_($){let I=gI($),U=M4(I,"orchestrator-session.md");if(!$1(U))return{};let _=s6(U);if(!_)return{};let u=p3(_)?.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 V7($){let I=gI($);if(!$1(I))return 0;let U=0,_=t3($);for(let z of _){if(!z.startsWith("result-"))continue;let v=s6(M4(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=s6(M4(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=s6(M4(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 B7($,I){let U=[],_=gI($);if(!$1(_))return U;let u=I?new Date(I).getTime():0,g=t3($);for(let z of g){if(z==="orchestrator-session.md")continue;try{let v=M4(_,z),J=L_(v,"utf-8"),N=O7(z,J);if(N)U.push(N)}catch{}}return U}function M7($){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 R7($,I={}){let U=gI($);if(!$1(U))Vj(U,{recursive:!0});let _=s6(M4(U,"orchestrator-session.md")),u=s6(M4(U,"task-board.md")),g=p3(_)||p3(u)||o3(new Date),z=new Date().toISOString(),v=Rj(g,z),J=Kj(g),N=[],X=[],G=[],q=(T,H)=>{let Q=M4(U,T);if(!$1(Q)){Y7(Q,H,"utf-8"),N.push(T);return}let Y=s6(Q);if(I.force||Mj(Y)){Y7(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 Z0=()=>{};var IG=E((Fn,C7)=>{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"},tj={up:($=1)=>"\x1B[S".repeat($),down:($=1)=>"\x1B[T".repeat($)},aj={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}};C7.exports={cursor:$G,scroll:tj,erase:aj,beep:"\x07"}});import{styleText as gG}from"node:util";import{stdout as JG,stdin as i7}from"node:process";import*as P6 from"node:readline";import ej from"node:readline";import{ReadStream as f7}from"node:tty";function o4($,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?o4(g,I<0?-1:1,U):g}function zG($,I,U){return String($).normalize().replaceAll(`\r
|
|
170
170
|
`,`
|
|
171
171
|
`).split(`
|
|
172
|
-
`).map((_)=>
|
|
173
|
-
`)}function
|
|
172
|
+
`).map((_)=>GF(_,I,U)).join(`
|
|
173
|
+
`)}function XG($,I){if(typeof $=="string")return E$.aliases.get($)===I;for(let U of $)if(U!==void 0&&XG(U,I))return!0;return!1}function qF($,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 $===
|
|
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 $===vG}function F_($,I){let U=$;U.isTTY&&U.setRawMode(I)}function h7({input:$=i7,output:I=JG,overwrite:U=!0,hideCursor:_=!0}={}){let u=P6.createInterface({input:$,output:I,prompt:"",tabSize:1});P6.emitKeypressEvents($,u),$ instanceof f7&&$.isTTY&&$.setRawMode(!0);let g=(z,{name:v,sequence:J})=>{let N=String(z);if(XG([N,v,J],"cancel")){_&&I.write(x$.cursor.show),process.exit(0);return}if(!U)return;P6.moveCursor(I,v==="return"?0:-1,v==="return"?-1:0,()=>{P6.clearLine(I,1,()=>{$.once("keypress",g)})})};return _&&I.write(x$.cursor.hide),$.once("keypress",g),()=>{$.off("keypress",g),_&&I.write(x$.cursor.show),$ instanceof f7&&$.isTTY&&!QF&&$.setRawMode(!1),u.terminal=!1,u.close()}}function I1($,I,U,_=U){let u=b0($??JG);return zG(I,u-U.length,{hard:!0,trim:!1}).split(`
|
|
176
176
|
`).map((g,z)=>`${z===0?_:U}${g}`).join(`
|
|
177
|
-
`)}class
|
|
178
|
-
`),
|
|
179
|
-
`).length-1;this.output.write(x$.cursor.move(-999,$*-1))}render(){let $=
|
|
177
|
+
`)}class u1{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=i7,output:_=JG,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(),$(vG);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}this.rl=ej.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),$(vG)})})}_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")}XG([$,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 $=zG(this._prevFrame,process.stdout.columns,{hard:!0,trim:!1}).split(`
|
|
179
|
+
`).length-1;this.output.write(x$.cursor.move(-999,$*-1))}render(){let $=zG(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=qF(this._prevFrame,$),U=qG(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
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
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
|
|
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===
|
|
184
|
-
`?(g&&(_+=
|
|
185
|
-
`&&(u&&Y&&(_+=
|
|
182
|
+
`)),this._prevFrame=$;return}}this.output.write(x$.erase.down())}this.output.write($),this.state==="initial"&&(this.state="active"),this._prevFrame=$}}}function TF($,I){if($===void 0||I.length===0)return 0;let U=I.findIndex((_)=>_.value===$);return U!==-1?U:0}function HF($,I){return(I.label??String(I.value)).toLowerCase().includes($.toLowerCase())}function YF($,I){if(I)return $?I:I[0]}var x$,sj=($)=>$===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,IF=($)=>$>=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,uG,A_,b_,UG,j_,uF,UF,n7=($,I={},U={})=>{let _=I.limit??1/0,u=I.ellipsis??"",g=I?.ellipsisWidth??(u?n7(u,UF,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,R=0,K=!1,W=Y,O=Math.max(0,_-g),V=0,P=0,B=0,M=0;$:for(;;){if(P>V||Q>=Y&&Q>H){let F=$.slice(V,P)||$.slice(H,Q);R=0;for(let A of F.replaceAll(uF,"")){let x=A.codePointAt(0)||0;if($F(x)?M=G:IF(x)?M=T:N!==q&&sj(x)?M=N:M=q,B+M>O&&(W=Math.min(W,Math.max(V,H)+R)),B+M>_){K=!0;break $}R+=A.length,B+=M}V=P=0}if(Q>=Y)break;if(j_.lastIndex=Q,j_.test($)){if(R=j_.lastIndex-Q,M=R*q,B+M>O&&(W=Math.min(W,Q+Math.floor((O-B)/q))),B+M>_){K=!0;break}B+=M,V=H,P=Q,Q=H=j_.lastIndex;continue}if(uG.lastIndex=Q,uG.test($)){if(B+z>O&&(W=Math.min(W,Q)),B+z>_){K=!0;break}B+=z,V=H,P=Q,Q=H=uG.lastIndex;continue}if(A_.lastIndex=Q,A_.test($)){if(R=A_.lastIndex-Q,M=R*v,B+M>O&&(W=Math.min(W,Q+Math.floor((O-B)/v))),B+M>_){K=!0;break}B+=M,V=H,P=Q,Q=H=A_.lastIndex;continue}if(b_.lastIndex=Q,b_.test($)){if(R=b_.lastIndex-Q,M=R*J,B+M>O&&(W=Math.min(W,Q+Math.floor((O-B)/J))),B+M>_){K=!0;break}B+=M,V=H,P=Q,Q=H=b_.lastIndex;continue}if(UG.lastIndex=Q,UG.test($)){if(B+X>O&&(W=Math.min(W,Q)),B+X>_){K=!0;break}B+=X,V=H,P=Q,Q=H=UG.lastIndex;continue}Q+=1}return{width:K?O:B,index:K?W:Y,truncated:K,ellipsed:K&&_>=g}},_F,A0=($,I={})=>n7($,_F,I).width,S_="\x1B",r7="",gF=39,NG="\x07",l7="[",zF="]",m7="m",GG,x7,vF=($)=>{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},k7=($)=>`${S_}${l7}${$}${m7}`,y7=($)=>`${S_}${GG}${$}${NG}`,JF=($)=>$.map((I)=>A0(I)),_G=($,I,U)=>{let _=I[Symbol.iterator](),u=!1,g=!1,z=$.at(-1),v=z===void 0?0:A0(z),J=_.next(),N=_.next(),X=0;for(;!J.done;){let G=J.value,q=A0(G);v+q<=U?$[$.length-1]+=G:($.push(G),v=0),(G===S_||G===r7)&&(u=!0,g=I.startsWith(GG,X+1)),u?g?G===NG&&(u=!1,g=!1):G===m7&&(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())},NF=($)=>{let I=$.split(" "),U=I.length;for(;U>0&&!(A0(I[U-1])>0);)U--;return U===I.length?$:I.slice(0,U).join(" ")+I.slice(U).join("")},GF=($,I,U={})=>{if(U.trim!==!1&&$.trim()==="")return"";let _="",u,g,z=$.split(" "),v=JF(z),J=[""];for(let[H,Q]of z.entries()){U.trim!==!1&&(J[J.length-1]=(J.at(-1)??"").trimStart());let Y=A0(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 R=I-Y,K=1+Math.floor((v[H]-R-1)/I);Math.floor((v[H]-1)/I)<K&&J.push(""),_G(J,Q,I);continue}if(Y+v[H]>I&&Y>0&&v[H]>0){if(U.wordWrap===!1&&Y<I){_G(J,Q,I);continue}J.push("")}if(Y+v[H]>I&&U.wordWrap===!1){_G(J,Q,I);continue}J[J.length-1]+=Q}U.trim!==!1&&(J=J.map((H)=>NF(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===S_||H===r7){x7.lastIndex=T+1;let R=x7.exec(N)?.groups;if(R?.code!==void 0){let K=Number.parseFloat(R.code);u=K===gF?void 0:K}else R?.uri!==void 0&&(g=R.uri.length===0?void 0:R.uri)}let Y=u?vF(u):void 0;Q===`
|
|
184
|
+
`?(g&&(_+=y7("")),u&&Y&&(_+=k7(Y))):H===`
|
|
185
|
+
`&&(u&&Y&&(_+=k7(u)),g&&(_+=y7(g))),T+=H.length,G=q,q=X.next()}return _},XF,E$,QF,vG,b0=($)=>("columns"in $)&&typeof $.columns=="number"?$.columns:80,qG=($)=>("rows"in $)&&typeof $.rows=="number"?$.rows:20,c7,QG,d7,p7,TG,HG;var YG=$4(()=>{x$=q$(IG(),1);uG=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,A_=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,b_=/\t{1,1000}/y,UG=/[\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,j_=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,uF=/\p{M}+/gu,UF={limit:1/0,ellipsis:""},_F={limit:1/0,ellipsis:"",ellipsisWidth:0},GG=`${zF}8;;`,x7=new RegExp(`(?:\\${l7}(?<code>\\d+)m|\\${GG}(?<uri>.*)${NG})`,"y");XF=["up","down","left","right","space","enter","cancel"],E$={actions:new Set(XF),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["\x03","cancel"],["escape","cancel"]]),messages:{cancel:"Canceled",error:"Something went wrong"},withGuide:!0};QF=globalThis.process.platform.startsWith("win"),vG=Symbol("clack:cancel");c7=class c7 extends u1{filteredOptions;multiple;isNavigating=!1;selectedValues=[];focusedValue;#$=0;#u="";#U;#I;get cursor(){return this.#$}get userInputWithCursor(){if(!this.userInput)return gG(["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`${$}${gG("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??HF;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.#$=o4(this.#$,U?-1:1,this.filteredOptions),this.focusedValue=this.filteredOptions[this.#$]?.value,this.multiple||(this.selectedValues=[this.focusedValue]),this.isNavigating=!0):u?this.value=YF(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=TF(this.focusedValue,this.filteredOptions);this.#$=o4(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())}}};QG=class QG extends u1{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})}};d7=class d7 extends u1{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}})}};p7=class extends u1{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?o4(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=o4(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=o4(this.cursor,1,this.options);break;case"space":this.toggleValue();break}})}};TG=class TG extends u1{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?o4(U,1,this.options):U,this.changeValue(),this.on("cursor",(_)=>{switch(_){case"left":case"up":this.cursor=o4(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=o4(this.cursor,1,this.options);break}this.changeValue()})}};HG=class HG extends u1{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}${gG("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 mn}from"node:util";import Q4 from"node:process";function OF(){return Q4.platform!=="win32"?Q4.env.TERM!=="linux":!!Q4.env.CI||!!Q4.env.WT_SESSION||!!Q4.env.TERMINUS_SUBLIME||Q4.env.ConEmuTask==="{cmd::Cmder}"||Q4.env.TERM_PROGRAM==="Terminus-Sublime"||Q4.env.TERM_PROGRAM==="vscode"||Q4.env.TERM==="xterm-256color"||Q4.env.TERM==="alacritty"||Q4.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}function S0($,I,U){return String($).normalize().replaceAll(`\r
|
|
186
186
|
`,`
|
|
187
187
|
`).split(`
|
|
188
|
-
`).map((_)=>
|
|
189
|
-
`)}var
|
|
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===
|
|
191
|
-
`?(g&&(_
|
|
192
|
-
`&&(u&&Y&&(_+=
|
|
193
|
-
`);Y.push(P),R+=P.length}if(R>X){let V=0,P=0,B=R,M=$-K,F=(A,x)=>
|
|
194
|
-
`:""}${
|
|
188
|
+
`).map((_)=>nF(_,I,U)).join(`
|
|
189
|
+
`)}var F0,BG,DF=()=>process.env.CI==="true",N$=($,I)=>BG?$:I,VF,IT,uT,k_,BF,s,W6,cn,dn,MG,x_,MF,o7,t7,pn,a7,RF,KF,LF,PF,on,WF,ZF,AF,bF,y_=($)=>{switch($){case"initial":case"active":return Z("cyan",VF);case"cancel":return Z("red",IT);case"error":return Z("yellow",uT);case"submit":return Z("green",k_)}},UT=($)=>{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)}},jF=($)=>$===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,FF=($)=>$===12288||$>=65281&&$<=65376||$>=65504&&$<=65510,SF=($)=>$>=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,OG,w_,E_,DG,C_,wF,EF,_T=($,I={},U={})=>{let _=I.limit??1/0,u=I.ellipsis??"",g=I?.ellipsisWidth??(u?_T(u,EF,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,R=0,K=!1,W=Y,O=Math.max(0,_-g),V=0,P=0,B=0,M=0;$:for(;;){if(P>V||Q>=Y&&Q>H){let F=$.slice(V,P)||$.slice(H,Q);R=0;for(let A of F.replaceAll(wF,"")){let x=A.codePointAt(0)||0;if(FF(x)?M=G:SF(x)?M=T:N!==q&&jF(x)?M=N:M=q,B+M>O&&(W=Math.min(W,Math.max(V,H)+R)),B+M>_){K=!0;break $}R+=A.length,B+=M}V=P=0}if(Q>=Y)break;if(C_.lastIndex=Q,C_.test($)){if(R=C_.lastIndex-Q,M=R*q,B+M>O&&(W=Math.min(W,Q+Math.floor((O-B)/q))),B+M>_){K=!0;break}B+=M,V=H,P=Q,Q=H=C_.lastIndex;continue}if(OG.lastIndex=Q,OG.test($)){if(B+z>O&&(W=Math.min(W,Q)),B+z>_){K=!0;break}B+=z,V=H,P=Q,Q=H=OG.lastIndex;continue}if(w_.lastIndex=Q,w_.test($)){if(R=w_.lastIndex-Q,M=R*v,B+M>O&&(W=Math.min(W,Q+Math.floor((O-B)/v))),B+M>_){K=!0;break}B+=M,V=H,P=Q,Q=H=w_.lastIndex;continue}if(E_.lastIndex=Q,E_.test($)){if(R=E_.lastIndex-Q,M=R*J,B+M>O&&(W=Math.min(W,Q+Math.floor((O-B)/J))),B+M>_){K=!0;break}B+=M,V=H,P=Q,Q=H=E_.lastIndex;continue}if(DG.lastIndex=Q,DG.test($)){if(B+X>O&&(W=Math.min(W,Q)),B+X>_){K=!0;break}B+=X,V=H,P=Q,Q=H=DG.lastIndex;continue}Q+=1}return{width:K?O:B,index:K?W:Y,truncated:K,ellipsed:K&&_>=g}},CF,x4=($,I={})=>_T($,CF,I).width,i_="\x1B",gT="",fF=39,KG="\x07",zT="[",xF="]",vT="m",LG,e7,kF=($)=>{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},s7=($)=>`${i_}${zT}${$}${vT}`,$T=($)=>`${i_}${LG}${$}${KG}`,yF=($)=>$.map((I)=>x4(I)),VG=($,I,U)=>{let _=I[Symbol.iterator](),u=!1,g=!1,z=$.at(-1),v=z===void 0?0:x4(z),J=_.next(),N=_.next(),X=0;for(;!J.done;){let G=J.value,q=x4(G);v+q<=U?$[$.length-1]+=G:($.push(G),v=0),(G===i_||G===gT)&&(u=!0,g=I.startsWith(LG,X+1)),u?g?G===KG&&(u=!1,g=!1):G===vT&&(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())},iF=($)=>{let I=$.split(" "),U=I.length;for(;U>0&&!(x4(I[U-1])>0);)U--;return U===I.length?$:I.slice(0,U).join(" ")+I.slice(U).join("")},nF=($,I,U={})=>{if(U.trim!==!1&&$.trim()==="")return"";let _="",u,g,z=$.split(" "),v=yF(z),J=[""];for(let[H,Q]of z.entries()){U.trim!==!1&&(J[J.length-1]=(J.at(-1)??"").trimStart());let Y=x4(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 R=I-Y,K=1+Math.floor((v[H]-R-1)/I);Math.floor((v[H]-1)/I)<K&&J.push(""),VG(J,Q,I);continue}if(Y+v[H]>I&&Y>0&&v[H]>0){if(U.wordWrap===!1&&Y<I){VG(J,Q,I);continue}J.push("")}if(Y+v[H]>I&&U.wordWrap===!1){VG(J,Q,I);continue}J[J.length-1]+=Q}U.trim!==!1&&(J=J.map((H)=>iF(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===i_||H===gT){e7.lastIndex=T+1;let R=e7.exec(N)?.groups;if(R?.code!==void 0){let K=Number.parseFloat(R.code);u=K===fF?void 0:K}else R?.uri!==void 0&&(g=R.uri.length===0?void 0:R.uri)}let Y=u?kF(u):void 0;Q===`
|
|
191
|
+
`?(g&&(_+=$T("")),u&&Y&&(_+=s7(Y))):H===`
|
|
192
|
+
`&&(u&&Y&&(_+=s7(u)),g&&(_+=$T(g))),T+=H.length,G=q,q=X.next()}return _},rF=($,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}},RG=({cursor:$,options:I,style:U,output:_=process.stdout,maxItems:u=Number.POSITIVE_INFINITY,columnPadding:g=0,rowPadding:z=4})=>{let v=b0(_)-g,J=qG(_),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=[],R=0;T&&R++,H&&R++;let K=q+(T?1:0),W=Q-(H?1:0);for(let V=K;V<W;V++){let P=S0(U(I[V],V===$),v,{hard:!0,trim:!1}).split(`
|
|
193
|
+
`);Y.push(P),R+=P.length}if(R>X){let V=0,P=0,B=R,M=$-K,F=(A,x)=>rF(Y,B,A,x,X);T?({lineCount:B,removals:V}=F(0,M),B>X&&({lineCount:B,removals:P}=F(M+1,Y.length))):({lineCount:B,removals:P}=F(M+1,Y.length),B>X&&({lineCount:B,removals:V}=F(0,M))),V>0&&(T=!0,Y.splice(0,V)),P>0&&(H=!0,Y.splice(Y.length-P,P))}let O=[];T&&O.push(N);for(let V of Y)for(let P of V)O.push(P);return H&&O.push(N),O},O$=($)=>{let I=$.active??"Yes",U=$.inactive??"No";return new QG({active:I,inactive:U,signal:$.signal,input:$.input,output:$.output,initialValue:$.initialValue??!0,render(){let _=$.withGuide??E$.withGuide,u=`${_?`${Z("gray",s)}
|
|
194
|
+
`:""}${y_(this.state)} ${$.message}
|
|
195
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",
|
|
196
|
+
${Z("gray",s)}`:""}`}default:{let z=_?`${Z("cyan",s)} `:"",v=_?Z("cyan",W6):"";return`${u}${z}${this.value?`${Z("green",MG)} ${I}`:`${Z("dim",x_)} ${Z("dim",I)}`}${$.vertical?_?`
|
|
197
197
|
${Z("cyan",s)} `:`
|
|
198
|
-
`:` ${Z("dim","/")} `}${this.value?`${Z("dim",
|
|
198
|
+
`:` ${Z("dim","/")} `}${this.value?`${Z("dim",x_)} ${Z("dim",U)}`:`${Z("green",MG)} ${U}`}
|
|
199
199
|
${v}
|
|
200
|
-
`}}}}).prompt()},t,
|
|
200
|
+
`}}}}).prompt()},t,U4=($="",I)=>{let U=I?.output??process.stdout,_=I?.withGuide??E$.withGuide?`${Z("gray",W6)} `:"";U.write(`${_}${Z("red",$)}
|
|
201
201
|
|
|
202
|
-
`)},D$=($="",I)=>{let U=I?.output??process.stdout,_=I?.withGuide??E$.withGuide?`${Z("gray",
|
|
202
|
+
`)},D$=($="",I)=>{let U=I?.output??process.stdout,_=I?.withGuide??E$.withGuide?`${Z("gray",BF)} `:"";U.write(`${_}${$}
|
|
203
203
|
`)},d=($="",I)=>{let U=I?.output??process.stdout,_=I?.withGuide??E$.withGuide?`${Z("gray",s)}
|
|
204
|
-
${Z("gray",
|
|
204
|
+
${Z("gray",W6)} `:"";U.write(`${_}${$}
|
|
205
205
|
|
|
206
|
-
`)},
|
|
206
|
+
`)},j0=($,I)=>$.split(`
|
|
207
207
|
`).map((U)=>I(U)).join(`
|
|
208
|
-
`),
|
|
209
|
-
${Z("reset",Z("dim",`Press ${Z(["gray","bgWhite","inverse"]," space ")} to select, ${Z("gray",Z("bgWhite",Z("inverse"," enter ")))} to submit`))}`},render(){let _=
|
|
208
|
+
`),n_=($)=>{let I=(_,u)=>{let g=_.label??String(_.value);return u==="disabled"?`${Z("gray",t7)} ${j0(g,(z)=>Z(["strikethrough","gray"],z))}${_.hint?` ${Z("dim",`(${_.hint??"disabled"})`)}`:""}`:u==="active"?`${Z("cyan",MF)} ${g}${_.hint?` ${Z("dim",`(${_.hint})`)}`:""}`:u==="selected"?`${Z("green",o7)} ${j0(g,(z)=>Z("dim",z))}${_.hint?` ${Z("dim",`(${_.hint})`)}`:""}`:u==="cancelled"?`${j0(g,(z)=>Z(["strikethrough","dim"],z))}`:u==="active-selected"?`${Z("green",o7)} ${g}${_.hint?` ${Z("dim",`(${_.hint})`)}`:""}`:u==="submitted"?`${j0(g,(z)=>Z("dim",z))}`:`${Z("dim",t7)} ${j0(g,(z)=>Z("dim",z))}`},U=$.required??!0;return new p7({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 _=I1($.output,$.message,`${UT(this.state)} `,`${y_(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=
|
|
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=I1($.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=I1($.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
|
-
`).map((G,q)=>q===0?`${Z("yellow",
|
|
213
|
+
`).map((G,q)=>q===0?`${Z("yellow",W6)} ${Z("yellow",G)}`:` ${G}`).join(`
|
|
214
214
|
`),N=u.split(`
|
|
215
215
|
`).length,X=J.split(`
|
|
216
|
-
`).length+1;return`${u}${v}${
|
|
216
|
+
`).length+1;return`${u}${v}${RG({output:$.output,options:this.options,cursor:this.cursor,maxItems:$.maxItems,columnPadding:v.length,rowPadding:N+X,style:z}).join(`
|
|
217
217
|
${v}`)}
|
|
218
218
|
${J}
|
|
219
219
|
`}default:{let v=`${Z("cyan",s)} `,J=u.split(`
|
|
220
|
-
`).length;return`${u}${v}${
|
|
220
|
+
`).length;return`${u}${v}${RG({output:$.output,options:this.options,cursor:this.cursor,maxItems:$.maxItems,columnPadding:v.length,rowPadding:J+2,style:z}).join(`
|
|
221
221
|
${v}`)}
|
|
222
|
-
${Z("cyan",
|
|
223
|
-
`}}}}).prompt()},
|
|
224
|
-
`),g=u.reduce((J,N)=>Math.max(
|
|
225
|
-
`).map(g),""],v=
|
|
222
|
+
${Z("cyan",W6)}
|
|
223
|
+
`}}}}).prompt()},lF=($)=>Z("dim",$),mF=($,I,U)=>{let _={hard:!0,trim:!1},u=S0($,I,_).split(`
|
|
224
|
+
`),g=u.reduce((J,N)=>Math.max(x4(N),J),0),z=u.map(U).reduce((J,N)=>Math.max(x4(N),J),0),v=I-(z-g);return S0($,v,_)},k=($="",I="",U)=>{let _=U?.output??Q4.stdout,u=U?.withGuide??E$.withGuide,g=U?.format??lF,z=["",...mF($,b0(_)-6,g).split(`
|
|
225
|
+
`).map(g),""],v=x4(I),J=Math.max(z.reduce((q,T)=>{let H=x4(T);return H>q?H:q},0),v)+2,N=z.map((q)=>`${Z("gray",s)} ${q}${" ".repeat(J-x4(q))}${Z("gray",s)}`).join(`
|
|
226
226
|
`),X=u?`${Z("gray",s)}
|
|
227
|
-
`:"",G=u?
|
|
227
|
+
`:"",G=u?KF:PF;_.write(`${X}${Z("green",k_)} ${Z("reset",I)} ${Z("gray",a7.repeat(Math.max(J-v-1,1))+RF)}
|
|
228
228
|
${N}
|
|
229
|
-
${Z("gray",G+
|
|
230
|
-
`)},
|
|
231
|
-
`);let o=
|
|
232
|
-
`);o.length>1&&U.write(
|
|
233
|
-
`);let Y$=0,h$=0;P(),G=setInterval(()=>{if(N&&H===Q)return;M(),Q=H;let c$=K(g[Y$]),
|
|
229
|
+
${Z("gray",G+a7.repeat(J+2)+LF)}
|
|
230
|
+
`)},hF=($)=>Z("magenta",$),a$=({indicator:$="dots",onCancel:I,output:U=process.stdout,cancelMessage:_,errorMessage:u,frames:g=BG?["◒","◐","◓","◑"]:["•","o","O","0"],delay:z=BG?80:120,signal:v,...J}={})=>{let N=DF(),X,G,q=!1,T=!1,H="",Q,Y=performance.now(),R=b0(U),K=J?.styleFrame??hF,W=(o)=>{let Y$=o>1?u??E$.messages.error:_??E$.messages.cancel;T=o===1,q&&(u$(Y$,o),T&&typeof I=="function"&&I())},O=()=>W(2),V=()=>W(1),P=()=>{process.on("uncaughtExceptionMonitor",O),process.on("unhandledRejection",O),process.on("SIGINT",V),process.on("SIGTERM",V),process.on("exit",W),v&&v.addEventListener("abort",V)},B=()=>{process.removeListener("uncaughtExceptionMonitor",O),process.removeListener("unhandledRejection",O),process.removeListener("SIGINT",V),process.removeListener("SIGTERM",V),process.removeListener("exit",W),v&&v.removeEventListener("abort",V)},M=()=>{if(Q===void 0)return;N&&U.write(`
|
|
231
|
+
`);let o=S0(Q,R,{hard:!0,trim:!1}).split(`
|
|
232
|
+
`);o.length>1&&U.write(F0.cursor.up(o.length-1)),U.write(F0.cursor.to(0)),U.write(F0.erase.down())},F=(o)=>o.replace(/\.+$/,""),A=(o)=>{let Y$=(performance.now()-o)/1000,h$=Math.floor(Y$/60),c$=Math.floor(Y$%60);return h$>0?`[${h$}m ${c$}s]`:`[${c$}s]`},x=J.withGuide??E$.withGuide,b=(o="")=>{q=!0,X=h7({output:U}),H=F(o),Y=performance.now(),x&&U.write(`${Z("gray",s)}
|
|
233
|
+
`);let Y$=0,h$=0;P(),G=setInterval(()=>{if(N&&H===Q)return;M(),Q=H;let c$=K(g[Y$]),b4;if(N)b4=`${c$} ${H}...`;else if($==="timer")b4=`${c$} ${H} ${A(Y)}`;else{let z6=".".repeat(Math.floor(h$)).slice(0,3);b4=`${c$} ${H}${z6}`}let S2=S0(b4,R,{hard:!0,trim:!1});U.write(S2),Y$=Y$+1<g.length?Y$+1:0,h$=h$<4?h$+0.125:0},z)},u$=(o="",Y$=0,h$=!1)=>{if(!q)return;q=!1,clearInterval(G),M();let c$=Y$===0?Z("green",k_):Y$===1?Z("red",IT):Z("red",uT);H=o??H,h$||($==="timer"?U.write(`${c$} ${H} ${A(Y)}
|
|
234
234
|
`):U.write(`${c$} ${H}
|
|
235
|
-
`)),B(),X()};return{start:b,stop:(o="")=>u$(o,0),message:(o="")=>{H=F(o??H)},cancel:(o="")=>u$(o,1),error:(o="")=>u$(o,2),clear:()=>u$("",0,!0),get isCancelled(){return T}}},
|
|
235
|
+
`)),B(),X()};return{start:b,stop:(o="")=>u$(o,0),message:(o="")=>{H=F(o??H)},cancel:(o="")=>u$(o,1),error:(o="")=>u$(o,2),clear:()=>u$("",0,!0),get isCancelled(){return T}}},tn,f_=($,I)=>$.includes(`
|
|
236
236
|
`)?$.split(`
|
|
237
237
|
`).map((U)=>I(U)).join(`
|
|
238
|
-
`):I($),
|
|
238
|
+
`):I($),U1=($)=>{let I=(U,_)=>{let u=U.label??String(U.value);switch(_){case"disabled":return`${Z("gray",x_)} ${f_(u,(g)=>Z("gray",g))}${U.hint?` ${Z("dim",`(${U.hint??"disabled"})`)}`:""}`;case"selected":return`${f_(u,(g)=>Z("dim",g))}`;case"active":return`${Z("green",MG)} ${u}${U.hint?` ${Z("dim",`(${U.hint})`)}`:""}`;case"cancelled":return`${f_(u,(g)=>Z(["strikethrough","dim"],g))}`;default:return`${Z("dim",x_)} ${f_(u,(g)=>Z("dim",g))}`}};return new TG({options:$.options,signal:$.signal,input:$.input,output:$.output,initialValue:$.initialValue,render(){let U=$.withGuide??E$.withGuide,_=`${y_(this.state)} `,u=`${UT(this.state)} `,g=I1($.output,$.message,u,_),z=`${U?`${Z("gray",s)}
|
|
239
239
|
`:""}${g}
|
|
240
|
-
`;switch(this.state){case"submit":{let v=U?`${Z("gray",s)} `:"",J=
|
|
241
|
-
${Z("gray",s)}`:""}`}default:{let v=U?`${Z("cyan",s)} `:"",J=U?Z("cyan",
|
|
242
|
-
`).length,X=U?2:1;return`${z}${v}${
|
|
240
|
+
`;switch(this.state){case"submit":{let v=U?`${Z("gray",s)} `:"",J=I1($.output,I(this.options[this.cursor],"selected"),v);return`${z}${J}`}case"cancel":{let v=U?`${Z("gray",s)} `:"",J=I1($.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",W6):"",N=z.split(`
|
|
242
|
+
`).length,X=U?2:1;return`${z}${v}${RG({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()},
|
|
246
|
-
`:""}${
|
|
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",
|
|
245
|
+
`}}}}).prompt()},an,r_=($)=>new HG({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
|
+
`:""}${y_(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",W6):"";return`${U.trim()}
|
|
248
248
|
${v}${u}
|
|
249
249
|
${J}${z}
|
|
250
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",
|
|
251
|
+
${v}`:""}`}default:{let z=I?`${Z("cyan",s)} `:"",v=I?Z("cyan",W6):"";return`${U}${z}${u}
|
|
252
252
|
${v}
|
|
253
|
-
`}}}}).prompt();var e
|
|
253
|
+
`}}}}).prompt();var e$=$4(()=>{YG();YG();F0=q$(IG(),1);BG=OF(),VF=N$("◆","*"),IT=N$("■","x"),uT=N$("▲","x"),k_=N$("◇","o"),BF=N$("┌","T"),s=N$("│","|"),W6=N$("└","—"),cn=N$("┐","T"),dn=N$("┘","—"),MG=N$("●",">"),x_=N$("○"," "),MF=N$("◻","[•]"),o7=N$("◼","[+]"),t7=N$("◻","[ ]"),pn=N$("▪","•"),a7=N$("─","-"),RF=N$("╮","+"),KF=N$("├","+"),LF=N$("╯","+"),PF=N$("╰","+"),on=N$("╭","+"),WF=N$("●","•"),ZF=N$("◆","*"),AF=N$("▲","!"),bF=N$("■","x"),OG=/[\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,DG=/[\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,wF=/\p{M}+/gu,EF={limit:1/0,ellipsis:""},CF={limit:1/0,ellipsis:"",ellipsisWidth:0},LG=`${xF}8;;`,e7=new RegExp(`(?:\\${zT}(?<code>\\d+)m|\\${LG}(?<uri>.*)${KG})`,"y");t={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
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(`
|
|
255
255
|
`)}
|
|
256
|
-
`)},info:($,I)=>{t.message($,{...I,symbol:Z("blue",
|
|
257
|
-
|
|
258
|
-
`).
|
|
259
|
-
`)
|
|
260
|
-
|
|
261
|
-
`)
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
256
|
+
`)},info:($,I)=>{t.message($,{...I,symbol:Z("blue",WF)})},success:($,I)=>{t.message($,{...I,symbol:Z("green",ZF)})},step:($,I)=>{t.message($,{...I,symbol:Z("green",k_)})},warn:($,I)=>{t.message($,{...I,symbol:Z("yellow",AF)})},warning:($,I)=>{t.warn($,I)},error:($,I)=>{t.message($,{...I,symbol:Z("red",bF)})}},tn={light:N$("─","-"),heavy:N$("━","="),block:N$("█","#")},an=`${Z("gray",s)} `});function WG($){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=l6(_);return{frontmatter:g&&typeof g==="object"?g:{},body:u}}catch{return{frontmatter:{},body:u}}}function ZG($,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 QT=$4(()=>{Iz()});import{cpSync as t4,existsSync as K$,lstatSync as HT,mkdirSync as H4,readdirSync as l_,readFileSync as zI,readlinkSync as sF,rmSync as $S,symlinkSync as IS,unlinkSync as YT,writeFileSync as k4}from"node:fs";import{dirname as OT,join as m,relative as uS,resolve as AG}from"node:path";function m_($){try{if(!HT($).isDirectory())YT($)}catch{}}function h_($,I,U,_){let u=m($,".agents","skills",I);if(!K$(u))return!1;let g=m(U,R4,I);m_(g),H4(g,{recursive:!0}),t4(u,g,{recursive:!0,force:!0});let z=m(u,"variants"),v=m(g,"stack");if(_&&K$(m(z,_)))H4(v,{recursive:!0}),t4(m(z,_),v,{recursive:!0,force:!0}),k4(m(v,"stack.yaml"),`language: ${_}
|
|
260
|
+
source: preset
|
|
261
|
+
`);let J=m(g,"variants");if(K$(J))$S(J,{recursive:!0,force:!0});return!0}function c_($,I){let U=m($,".agents","skills","_shared");if(!K$(U))return;let _=m(I,R4,"_shared");m_(_),H4(_,{recursive:!0}),t4(U,_,{recursive:!0,force:!0})}function VT($,I){let U=m($,".agents","workflows");if(!K$(U))return;let _=m(I,".agents","workflows");m_(_),H4(_,{recursive:!0}),t4(U,_,{recursive:!0,force:!0})}function BT($,I,U=!1){let _=m($,".agents","config");if(K$(_)){let g=m(I,".agents","config");if(H4(g,{recursive:!0}),U)t4(_,g,{recursive:!0,force:!0});else for(let z of l_(_,{withFileTypes:!0})){let v=m(g,z.name);if(!K$(v))t4(m(_,z.name),v,z.isDirectory()?{recursive:!0}:{})}}let u=m($,".agents","mcp.json");if(K$(u)){let g=m(I,".agents");H4(g,{recursive:!0});let z=m(g,"mcp.json");if(U||!K$(z))t4(u,z)}}function MT($){let I=process.env.HOME||process.env.USERPROFILE||"",U=m(I,".gemini","antigravity","global_workflows"),_=m($,".agents","workflows");if(!K$(_))return;H4(U,{recursive:!0}),t4(_,U,{recursive:!0,force:!0})}function _S($,I){if(!K$($))return;let U=m(I,".claude","agents");H4(U,{recursive:!0});for(let _ of l_($,{withFileTypes:!0})){if(!_.isFile()||!_.name.endsWith(".md"))continue;let u=_.name,g=zI(m($,u),"utf-8"),{frontmatter:z,body:v}=WG(g),J=z.name||u.replace(".md",""),N=US[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(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}`;k4(m(U,u),ZG(X,q))}}function gS($,I){if(!K$($))return;for(let U of l_($,{withFileTypes:!0})){if(!U.isFile()||!U.name.endsWith(".md")||U.name.startsWith("_"))continue;let _=U.name,u=zI(m($,_),"utf-8"),{frontmatter:g}=WG(u),z=_.replace(".md",""),v=g.description||z,J=m(I,".claude","skills",z);m_(J);let N=ZG({name:z,description:v,"disable-model-invocation":!0},`# /${z}
|
|
263
|
+
|
|
264
|
+
Read and follow \`.agents/workflows/${_}\` step by step.
|
|
265
|
+
`);H4(J,{recursive:!0}),k4(m(J,"SKILL.md"),N)}}function d_($,I){let U=m($,".claude","hooks");if(!K$(U))return;H4(I,{recursive:!0}),t4(U,I,{recursive:!0,force:!0})}function p_($,I,U){let _={};if(K$($))try{_=JSON.parse(zI($,"utf-8"))}catch{}if(_.hooks={..._.hooks||{},...I},U)Object.assign(_,U);k4($,`${JSON.stringify(_,null,2)}
|
|
266
|
+
`)}function _1($,I,U){return`bun "$${$}/${I}/hooks/${U}"`}function zS($,I){d_($,m(I,".claude","hooks")),p_(m(I,".claude","settings.json"),{UserPromptSubmit:[{hooks:[{type:"command",command:_1("CLAUDE_PROJECT_DIR",".claude","keyword-detector.ts"),timeout:5}]}],Stop:[{hooks:[{type:"command",command:_1("CLAUDE_PROJECT_DIR",".claude","persistent-mode.ts"),timeout:5}]}]},{statusLine:{type:"command",command:_1("CLAUDE_PROJECT_DIR",".claude","hud.ts")}})}function vS($,I){let U=m(I,".codex","hooks");d_($,U),p_(m(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}]}]}),JS(m(I,".codex","config.toml"))}function JS($){H4(OT($),{recursive:!0});let I="";if(K$($))I=zI($,"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"),k4($,I);return}if(/\[features\]/i.test(I)){I=I.replace(/(\[features\][^[]*)/i,`$1codex_hooks = true
|
|
267
|
+
`),k4($,I);return}let U=`
|
|
268
|
+
[features]
|
|
269
|
+
codex_hooks = true
|
|
270
|
+
`;k4($,I.trimEnd()+U)}function NS($,I){let U=m(I,".gemini","hooks");d_($,U),p_(m(I,".gemini","settings.json"),{BeforeAgent:[{matcher:"*",hooks:[{type:"command",command:_1("GEMINI_PROJECT_DIR",".gemini","keyword-detector.ts"),timeout:5}]}],AfterAgent:[{matcher:"*",hooks:[{type:"command",command:_1("GEMINI_PROJECT_DIR",".gemini","persistent-mode.ts"),timeout:5}]}]})}function GS($,I){let U=m(I,".qwen","hooks");d_($,U),p_(m(I,".qwen","settings.json"),{UserPromptSubmit:[{hooks:[{type:"command",command:_1("QWEN_PROJECT_DIR",".qwen","keyword-detector.ts"),timeout:5}]}],Stop:[{hooks:[{type:"command",command:_1("QWEN_PROJECT_DIR",".qwen","persistent-mode.ts"),timeout:5}]}]})}function qS($){let I=m($,".claude","CLAUDE.md.template");if(!K$(I))return;let U=process.env.HOME||process.env.USERPROFILE||"",_=zI(I,"utf-8").trim(),u=m(U,".claude","CLAUDE.md");if(K$(u)){let g=zI(u,"utf-8"),z=g.indexOf(XS),v=g.indexOf(TT);if(z!==-1&&v!==-1){let J=g.slice(0,z),N=g.slice(v+TT.length);k4(u,`${J}${_}${N}`)}else k4(u,`${g.trimEnd()}
|
|
271
|
+
|
|
272
|
+
${_}
|
|
273
|
+
`)}else k4(u,`${_}
|
|
274
|
+
`)}function o_($,I,U){let _=m($,".agents","agents"),u=m($,".agents","workflows");for(let g of U)switch(g){case"claude":_S(_,I),gS(u,I),zS($,I),qS($);break;case"codex":vS($,I);break;case"gemini":NS($,I);break;case"qwen":GS($,I);break}}function vI(){return[...T4.domain,...T4.design,...T4.coordination,...T4.utility,...T4.infrastructure]}function t_($,I,U){let _=[],u=[],g=AG($,R4);for(let z of I){let v=RT[z],J=m($,v);if(!K$(J))H4(J,{recursive:!0});for(let N of U){let X=m(g,N),G=m(J,N);if(!K$(X)){u.push(`${v}/${N} (source missing)`);continue}try{if(HT(G).isSymbolicLink()){if(AG(OT(G),sF(G))===AG(X)){u.push(`${v}/${N} (already linked)`);continue}YT(G)}else{u.push(`${v}/${N} (real dir exists)`);continue}}catch(T){}let q=uS(J,X);IS(q,G,"dir"),_.push(`${v}/${N}`)}}return{created:_,skipped:u}}function KT($){let I=m($,R4);if(!K$(I))return[];return l_(I,{withFileTypes:!0}).filter((U)=>U.isDirectory()&&!U.name.startsWith("_")).map((U)=>U.name)}function LT($){let I=[];for(let[U,_]of Object.entries(RT))if(K$(m($,_)))I.push(U);return I}var L$="first-fluke/oh-my-agent",R4=".agents/skills",T4,DT,US,XS="<!-- OMA:START",TT="<!-- OMA:END -->",RT;var a4=$4(()=>{QT();T4={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"}]},DT={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:[...T4.domain,...T4.design,...T4.coordination,...T4.utility,...T4.infrastructure].map(($)=>$.name)};US={"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}};RT={claude:".claude/skills",copilot:".github/skills"}});import{execSync as bG}from"node:child_process";function g1(){try{return bG("gh --version",{stdio:"ignore"}),!0}catch{return!1}}function y4(){try{return bG("gh auth status",{stdio:"ignore"}),!0}catch{return!1}}function z1(){try{return bG(`gh api user/starred/${L$}`,{stdio:"ignore"}),!0}catch{return!1}}function PT(){return g1()&&y4()&&z1()}var JI=$4(()=>{a4()});import{execSync as xT}from"node:child_process";import{existsSync as N1,readFileSync as iG,rmSync as bS,writeFileSync as jS}from"node:fs";import{join as GI}from"node:path";function FS($){let I=process.env.HOME||process.env.USERPROFILE||"",U=[],_=GI($,".omc"),u=GI(I,".claude","CLAUDE.md"),g=N1(_);if(!g&&N1(u))try{g=iG(u,"utf-8").includes("OMC:START")}catch{}if(g)U.push({name:"omc",displayName:"oh-my-claudecode",uninstall:()=>{xT("curl -fsSL https://raw.githubusercontent.com/Yeachan-Heo/oh-my-claudecode/main/scripts/uninstall.sh | bash",{stdio:"pipe",timeout:60000})}});for(let N of["opencode.json","opencode.jsonc"]){let X=GI(I,".config","opencode",N);if(!N1(X))continue;try{let q=iG(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=iG(X,"utf-8").replace(/\/\/.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"").replace(/,\s*([\]}])/g,"$1"),Y=JSON.parse(Q);Y.plugin=Y.plugin.filter((R)=>R!=="oh-my-opencode"),jS(X,JSON.stringify(Y,null,2))}});break}}catch{}}let z=GI(I,".agents","skills","superpowers"),v=GI(I,".codex","superpowers");if(N1(z)||N1(v))U.push({name:"superpowers",displayName:"superpowers",uninstall:()=>{for(let N of[z,v])if(N1(N))bS(N,{recursive:!0,force:!0})}});let J=GI($,".omx");if(N1(J))U.push({name:"omx",displayName:"oh-my-codex",uninstall:()=>{xT("npx -y oh-my-codex@latest uninstall --yes",{stdio:"pipe",timeout:60000})}});return U}async function $2($){let I=FS($);if(I.length===0)return[];let U=I.map((z)=>z.name),_=await O$({message:`${s_.default.yellow(U.join(", "))} detected. Remove all?`,initialValue:!0});if(e(_)||!_)return[];let u=[],g=a$();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")?`${s_.default.red("✗")} ${z}`:`${s_.default.green("✓")} ${z}`).join(`
|
|
275
|
+
`)),u}var s_;var nG=$4(()=>{e$();s_=q$(b$(),1)});import{existsSync as A$,lstatSync as kT,mkdirSync as yT,readdirSync as I2,readFileSync as iT,renameSync as E0,rmSync as XI,unlinkSync as nT,writeFileSync as SS}from"node:fs";import{dirname as rT,join as C$}from"node:path";function u2($){let I=[],U=C$($,".agent"),_=C$($,".agents");if(A$(U)&&!A$(_))E0(U,_),I.push(".agent/ → .agents/ (renamed)");else if(A$(U)&&A$(_))try{let J=I2(U);for(let N of J){let X=C$(U,N),G=C$(_,N);if(!A$(G))E0(X,G),I.push(`.agent/${N} → .agents/${N} (merged)`)}XI(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(kT(N).isSymbolicLink())nT(N),I.push(`${J} (removed symlink)`);else{let G=I2(N),q=0;for(let H of G){let Q=C$(N,H);if(kT(Q).isSymbolicLink())nT(Q),q++}if(I2(N).length===0)XI(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))E0(X,G),I.push(`skills/${J} → skills/${N}`);else if(A$(X)&&A$(G))XI(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))E0(X,G),I.push(`agents/${J} → agents/${N}`);else if(A$(X)&&A$(G))XI(X),I.push(`agents/${J} (removed, replaced by ${N})`)}return I}function CS($,I){let U=I.replace(/^\.agents\//,"");return C$($,".agents",".migration-backup","shared-layout-v2",U)}function fS($){return C$(".agents",".migration-backup","shared-layout-v2",$.replace(/^\.agents\//,""))}function C0($){let I=[];for(let U of wS){let _=C$($,U.from),u=C$($,U.to);if(!A$(_))continue;if(!A$(u)){yT(rT(u),{recursive:!0}),E0(_,u),I.push(`${U.from} → ${U.to}`);continue}let g=iT(_,"utf-8"),z=iT(u,"utf-8");if(g!==z){let v=CS($,U.from),J=fS(U.from);yT(rT(v),{recursive:!0}),SS(v,g,"utf-8"),I.push(`${U.from} → ${J} (backup)`)}XI(_,{force:!0}),I.push(`${U.from} (removed legacy path)`)}for(let U of ES){let _=C$($,U);if(!A$(_))continue;try{if(I2(_).length===0)XI(_,{recursive:!0,force:!0}),I.push(`${U} (removed empty dir)`)}catch{}}return I}var wS,ES;var rG=$4(()=>{wS=[{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"}],ES=[".agents/skills/_shared/api-contracts",".agents/skills/_shared/execution-protocols"]});import{execSync as xS}from"node:child_process";import{mkdtempSync as kS,rmSync as lG,writeFileSync as yS}from"node:fs";import{tmpdir as iS}from"node:os";import{join as lT}from"node:path";async function U2(){let $=kS(lT(iS(),"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 _=lT($,"repo.tar.gz");yS(_,Buffer.from(await U.arrayBuffer())),xS(`tar -xzf "${_}" -C "${$}" --strip-components=1`,{stdio:"pipe",timeout:30000}),lG(_)}catch(I){throw lG($,{recursive:!0,force:!0}),Error(`Failed to download repository archive: ${I instanceof Error?I.message:I}`)}return{dir:$,cleanup:()=>lG($,{recursive:!0,force:!0})}}var mG=$4(()=>{a4()});var mT={};O4(mT,{install:()=>z2});import{execSync as _2}from"node:child_process";import{existsSync as g2,readFileSync as hG,writeFileSync as cG}from"node:fs";import{join as f0}from"node:path";async function z2(){console.clear(),D$(M$.default.bgMagenta(M$.default.white(" \uD83D\uDEF8 oh-my-agent ")));let $=u2(process.cwd());if($.length>0)k($.map((J)=>`${M$.default.green("✓")} ${J}`).join(`
|
|
276
|
+
`),"Migration");await $2(process.cwd());let I=await U1({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))U4("Cancelled."),process.exit(0);let U;if(I==="custom"){let J=vI(),N=await n_({message:"Select skills:",options:J.map((X)=>({value:X.name,label:X.name,hint:X.desc})),required:!0});if(e(N))U4("Cancelled."),process.exit(0);U=N}else U=DT[I]??[];let _=process.cwd(),u={};if(U.includes("oma-backend")){let J=await U1({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))U4("Cancelled."),process.exit(0);if(J!=="other")u["oma-backend"]=J}let g=["claude"];if(g2(f0(_,".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=a$();v.start("Downloading...");try{let{dir:J,cleanup:N}=await U2();try{v.message("Installing skills..."),c_(J,_),VT(J,_),BT(J,_),MT(J);for(let V of U)v.message(`Installing ${M$.default.cyan(V)}...`),h_(J,V,_,u[V]);v.stop("Skills installed!"),v.start("Installing vendor adaptations..."),o_(J,_,["claude","codex","gemini","qwen"]),v.stop("Vendor adaptations installed!");let O=C0(_);if(O.length>0)k(O.map((V)=>`${M$.default.green("✓")} ${V}`).join(`
|
|
277
|
+
`),"Shared layout migration")}finally{N()}let X=t_(_,g,U);k([...U.map((O)=>`${M$.default.green("✓")} ${O}`),"",M$.default.dim(`Location: ${f0(_,R4)}`),...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(`
|
|
278
|
+
`),"Installed");try{if(_2("git config --get rerere.enabled",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim()==="true")t.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{_2("git config --global rerere.enabled true"),t.success(M$.default.green("git rerere enabled globally!"))}catch(V){t.error(`Failed to enable git rerere: ${V}`)}}let G=process.env.HOME||process.env.USERPROFILE||"",q=!1;try{_2("claude --version",{stdio:"ignore"}),q=!0}catch{}let T=f0(G,".claude","settings.json");if(q)try{let O={};if(g2(T))O=JSON.parse(hG(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 P=await O$({message:"Apply recommended Claude Code settings?",initialValue:!0});if(!e(P)&&P)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
|
|
279
|
+
|
|
280
|
+
Co-Authored-By: First Fluke <our.first.fluke@gmail.com>`,pr:"Generated with [oh-my-agent](https://github.com/first-fluke/oh-my-agent)"},cG(T,`${JSON.stringify(O,null,2)}
|
|
281
|
+
`),t.success(M$.default.green("Claude Code recommended settings applied!"))}}catch(O){t.warn(`Could not configure Claude Code settings: ${O}`)}let H=f0(G,".gemini","antigravity","mcp_config.json"),Q=null,Y=!1;try{if(g2(H)){let O=hG(H,"utf-8");Q=JSON.parse(O),Y=!0}}catch(O){}if(Y&&Q&&Q.mcpServers){let O=Q.mcpServers.serena,V="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 B=await O$({message:"Configure Serena MCP with bridge? (Required for full functionality)",initialValue:!0});if(e(B));else if(B){Q.mcpServers.serena={command:"npx",args:["-y","oh-my-agent@latest","bridge","http://localhost:12341/mcp"],disabled:!1};try{cG(H,JSON.stringify(Q,null,2)),t.success(M$.default.green("Serena MCP configured successfully!"))}catch(M){t.error(`Failed to update MCP config: ${M}`)}}}}let R=f0(G,".gemini","settings.json"),K=null,W=!1;try{if(g2(R)){let O=hG(R,"utf-8");K=JSON.parse(O),W=!0}}catch(O){}if(W&&K&&K.mcpServers){let O=K.mcpServers.serena;if(!(O&&O.url==="http://localhost:12341/mcp")){let P=await O$({message:"Configure Serena for Gemini CLI? (HTTP Mode)",initialValue:!0});if(e(P));else if(P){K.mcpServers.serena={url:"http://localhost:12341/mcp"};try{cG(R,JSON.stringify(K,null,2)),t.success(M$.default.green("Gemini CLI configured successfully!"))}catch(B){t.error(`Failed to update Gemini config: ${B}`)}}}}if(d(M$.default.green("Done! Open your project in your IDE to use the skills.")),g1()&&y4()&&!z1()){let O=await O$({message:`${M$.default.yellow("⭐")} Star ${M$.default.cyan(L$)} on GitHub? It helps a lot!`});if(!e(O)&&O)try{_2(`gh api -X PUT /user/starred/${L$}`,{stdio:"ignore"}),t.success(`Starred ${M$.default.cyan(L$)}! Thank you! \uD83C\uDF1F`)}catch{t.warn(`Could not star automatically. Try: ${M$.default.dim(`gh api --method PUT /user/starred/${L$}`)}`)}}}catch(J){v.stop("Installation failed"),t.error(J instanceof Error?J.message:String(J)),process.exit(1)}}var M$;var dG=$4(()=>{e$();nG();JI();rG();a4();mG();M$=q$(b$(),1)});import{execSync as G1}from"node:child_process";function J2($){try{let U=G1("git diff --stat HEAD~10 2>/dev/null || git diff --stat",{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
|
|
282
|
+
`),_=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 qH($,I=5){try{return G1(`git log --oneline -${I} 2>/dev/null`,{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
|
|
283
|
+
`).filter(Boolean)}catch{return[]}}function $9($){try{return G1("git diff --name-only HEAD~5 2>/dev/null || git diff --name-only",{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
|
|
284
|
+
`).filter(Boolean).slice(0,10)}catch{return[]}}function XH($,I=10){try{return G1(`git log --format="%s" -${I} 2>/dev/null`,{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
|
|
285
|
+
`).filter(Boolean)}catch{return[]}}function QH($){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 TH($){try{let I=`${$}/.serena/retrospectives`,U=G1(`ls -t "${I}"/*.json 2>/dev/null | head -1`,{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim();if(!U)return null;let _=G1(`cat "${U}"`,{encoding:"utf-8",stdio:["pipe","pipe","ignore"]});return JSON.parse(_).date||null}catch{return null}}function HH($,I){if(!I)return XH($,10);try{let _=new Date(I).toISOString().split("T")[0];return G1(`git log --format="%s" --since="${_}" 2>/dev/null`,{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
|
|
286
|
+
`).filter(Boolean)}catch{return XH($,10)}}var I9=()=>{};var DH={};O4(DH,{retro:()=>zw});import{existsSync as OH,mkdirSync as $w,readdirSync as Iw,readFileSync as uw,writeFileSync as Uw}from"node:fs";import{join as u9}from"node:path";function U9($){return u9($,".serena","retrospectives")}function _w($){let I=U9($);if(!OH(I))return[];try{return Iw(I).filter((_)=>_.endsWith(".json")).sort().reverse().slice(0,10).map((_)=>JSON.parse(uw(u9(I,_),"utf-8")))}catch{return[]}}function YH($,I){let U=U9($);if(!OH(U))$w(U,{recursive:!0});let _=`${I.date.replace(/[:.]/g,"-")}_${I.id}.json`;Uw(u9(U,_),JSON.stringify(I,null,2),"utf-8")}function gw($){let I=TH($),U=HH($,I),_=QH(U),u=J2($),g=D7($),z=B7($,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=M7(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 zw(){let $=process.cwd(),I=U9($),U=_w($);console.clear(),D$(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(`
|
|
287
|
+
`),"Previous Session");let u=await U1({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(`
|
|
288
|
+
`);k(G,`Past Retrospectives (${U.length})`)}d(j$.default.dim(`Stored in: ${I}`));return}if(u==="auto"){let{summary:G,learnings:q,nextSteps:T}=gw($),H=$9($);k([j$.default.bold("Auto-generated Content"),"",j$.default.bold("Summary:"),G,"",j$.default.bold("Key Learnings:"),...q.map((R)=>` - ${R}`),"",j$.default.bold("Next Steps:"),...T.map((R)=>` > ${R}`)].join(`
|
|
289
|
+
`),"Preview");let Q=await O$({message:"Save this retrospective?",initialValue:!0});if(e(Q)||!Q){U4("Cancelled.");return}let Y={id:Math.random().toString(36).slice(2,8),date:new Date().toISOString(),summary:G,keyLearnings:q,filesChanged:H,nextSteps:T};YH($,Y),k(j$.default.green("Retrospective saved!"),"Done"),d(j$.default.dim(`Stored in: ${I}`));return}let g=qH($),z=$9($);if(g.length>0)k(g.join(`
|
|
265
290
|
`),"Recent Commits");if(z.length>0)k(z.join(`
|
|
266
|
-
`),"Changed Files");let v=await i_({message:"What did you accomplish in this session?",placeholder:"e.g., Implemented user authentication flow"});if(e(v)){u4("Cancelled.");return}let J=await i_({message:"Key learnings? (comma-separated)",placeholder:"e.g., JWT needs refresh token, bcrypt is slow"});if(e(J)){u4("Cancelled.");return}let N=await i_({message:"Next steps? (comma-separated)",placeholder:"e.g., Add password reset, Write tests"});if(e(N)){u4("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)};vH($,X),k(j$.default.green("Retrospective saved!"),"Done"),d(j$.default.dim(`Stored in: ${I}`))}var j$;var GH=DI(()=>{e$();dG();P0();j$=X$(b$(),1)});var $6=E((vm,qY)=>{var GY=["nodebuffer","arraybuffer","fragments"],XY=typeof Blob<"u";if(XY)GY.push("blob");qY.exports={BINARY_TYPES:GY,CLOSE_TIMEOUT:30000,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:XY,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var x0=E((Jm,O2)=>{var{EMPTY_BUFFER:ZE}=$6(),Q9=Buffer[Symbol.species];function AE($,I){if($.length===0)return ZE;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 Q9(U.buffer,U.byteOffset,_);return U}function QY($,I,U,_,u){for(let g=0;g<u;g++)U[_+g]=$[g]^I[g&3]}function TY($,I){for(let U=0;U<$.length;U++)$[U]^=I[U&3]}function bE($){if($.length===$.buffer.byteLength)return $.buffer;return $.buffer.slice($.byteOffset,$.byteOffset+$.length)}function T9($){if(T9.readOnly=!0,Buffer.isBuffer($))return $;let I;if($ instanceof ArrayBuffer)I=new Q9($);else if(ArrayBuffer.isView($))I=new Q9($.buffer,$.byteOffset,$.byteLength);else I=Buffer.from($),T9.readOnly=!1;return I}O2.exports={concat:AE,mask:QY,toArrayBuffer:bE,toBuffer:T9,unmask:TY};if(!process.env.WS_NO_BUFFER_UTIL)try{let $=(()=>{throw new Error("Cannot require module "+"bufferutil");})();O2.exports.mask=function(I,U,_,u,g){if(g<48)QY(I,U,_,u,g);else $.mask(I,U,_,u,g)},O2.exports.unmask=function(I,U){if(I.length<32)TY(I,U);else $.unmask(I,U)}}catch($){}});var DY=E((Nm,OY)=>{var HY=Symbol("kDone"),H9=Symbol("kRun");class YY{constructor($){this[HY]=()=>{this.pending--,this[H9]()},this.concurrency=$||1/0,this.jobs=[],this.pending=0}add($){this.jobs.push($),this[H9]()}[H9](){if(this.pending===this.concurrency)return;if(this.jobs.length){let $=this.jobs.shift();this.pending++,$(this[HY])}}}OY.exports=YY});var y0=E((Gm,KY)=>{var k0=g$("zlib"),VY=x0(),jE=DY(),{kStatusCode:BY}=$6(),FE=Buffer[Symbol.species],SE=Buffer.from([0,0,255,255]),V2=Symbol("permessage-deflate"),I6=Symbol("total-length"),GI=Symbol("callback"),b6=Symbol("buffers"),XI=Symbol("error"),D2;class MY{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,!D2){let _=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;D2=new jE(_)}}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[GI];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){D2.add((_)=>{this._decompress($,I,(u,g)=>{_(),U(u,g)})})}compress($,I,U){D2.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"?k0.Z_DEFAULT_WINDOWBITS:this.params[u];this._inflate=k0.createInflateRaw({...this._options.zlibInflateOptions,windowBits:g}),this._inflate[V2]=this,this._inflate[I6]=0,this._inflate[b6]=[],this._inflate.on("error",EE),this._inflate.on("data",RY)}if(this._inflate[GI]=U,this._inflate.write($),I)this._inflate.write(SE);this._inflate.flush(()=>{let u=this._inflate[XI];if(u){this._inflate.close(),this._inflate=null,U(u);return}let g=VY.concat(this._inflate[b6],this._inflate[I6]);if(this._inflate._readableState.endEmitted)this._inflate.close(),this._inflate=null;else if(this._inflate[I6]=0,this._inflate[b6]=[],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"?k0.Z_DEFAULT_WINDOWBITS:this.params[u];this._deflate=k0.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:g}),this._deflate[I6]=0,this._deflate[b6]=[],this._deflate.on("data",wE)}this._deflate[GI]=U,this._deflate.write($),this._deflate.flush(k0.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let u=VY.concat(this._deflate[b6],this._deflate[I6]);if(I)u=new FE(u.buffer,u.byteOffset,u.length-4);if(this._deflate[GI]=null,this._deflate[I6]=0,this._deflate[b6]=[],I&&this.params[`${_}_no_context_takeover`])this._deflate.reset();U(null,u)})}}KY.exports=MY;function wE($){this[b6].push($),this[I6]+=$.length}function RY($){if(this[I6]+=$.length,this[V2]._maxPayload<1||this[I6]<=this[V2]._maxPayload){this[b6].push($);return}this[XI]=RangeError("Max payload size exceeded"),this[XI].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[XI][BY]=1009,this.removeListener("data",RY),this.reset()}function EE($){if(this[V2]._inflate=null,this[XI]){this[GI](this[XI]);return}$[BY]=1007,this[GI]($)}});var qI=E((Xm,B2)=>{var{isUtf8:LY}=g$("buffer"),{hasBlob:CE}=$6(),fE=[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 xE($){return $>=1000&&$<=1014&&$!==1004&&$!==1005&&$!==1006||$>=3000&&$<=4999}function Y9($){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 kE($){return CE&&typeof $==="object"&&typeof $.arrayBuffer==="function"&&typeof $.type==="string"&&typeof $.stream==="function"&&($[Symbol.toStringTag]==="Blob"||$[Symbol.toStringTag]==="File")}B2.exports={isBlob:kE,isValidStatusCode:xE,isValidUTF8:Y9,tokenChars:fE};if(LY)B2.exports.isValidUTF8=function($){return $.length<24?Y9($):LY($)};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?Y9(I):$(I)}}catch($){}});var D9=E((qm,bY)=>{var{Writable:yE}=g$("stream"),PY=y0(),{BINARY_TYPES:iE,EMPTY_BUFFER:WY,kStatusCode:nE,kWebSocket:rE}=$6(),{concat:O9,toArrayBuffer:lE,unmask:mE}=x0(),{isValidStatusCode:hE,isValidUTF8:ZY}=qI(),M2=Buffer[Symbol.species];class AY extends yE{constructor($={}){super();this._allowSynchronousEvents=$.allowSynchronousEvents!==void 0?$.allowSynchronousEvents:!0,this._binaryType=$.binaryType||iE[0],this._extensions=$.extensions||{},this._isServer=!!$.isServer,this._maxPayload=$.maxPayload|0,this._skipUTF8Validation=!!$.skipUTF8Validation,this[rE]=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 M2(U.buffer,U.byteOffset+$,U.length-$),new M2(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 M2(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[PY.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=WY;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)mE(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[PY.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")_=O9(U,I);else if(this._binaryType==="arraybuffer")_=lE(O9(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 _=O9(U,I);if(!this._skipUTF8Validation&&!ZY(_)){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,WY),this.end();else{let U=$.readUInt16BE(0);if(!hE(U)){let u=this.createError(RangeError,`invalid status code ${U}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");I(u);return}let _=new M2($.buffer,$.byteOffset+2,$.length-2);if(!this._skipUTF8Validation&&!ZY(_)){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[nE]=_,g}}bY.exports=AY});var B9=E((Tm,SY)=>{var{Duplex:Qm}=g$("stream"),{randomFillSync:cE}=g$("crypto"),jY=y0(),{EMPTY_BUFFER:dE,kWebSocket:pE,NOOP:oE}=$6(),{isBlob:QI,isValidStatusCode:tE}=qI(),{mask:FY,toBuffer:X1}=x0(),H4=Symbol("kByteLength"),aE=Buffer.alloc(4),q1,TI=8192,L4=0,eE=1,sE=2;class j6{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=L4,this.onerror=oE,this[pE]=void 0}static frame($,I){let U,_=!1,u=2,g=!1;if(I.mask){if(U=I.maskBuffer||aE,I.generateMask)I.generateMask(U);else{if(TI===8192){if(q1===void 0)q1=Buffer.alloc(8192);cE(q1,0,8192),TI=0}U[0]=q1[TI++],U[1]=q1[TI++],U[2]=q1[TI++],U[3]=q1[TI++]}g=(U[0]|U[1]|U[2]|U[3])===0,u=6}let z;if(typeof $==="string")if((!I.mask||g)&&I[H4]!==void 0)z=I[H4];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 FY($,U,J,u,z),[J];return FY($,U,$,0,z),[J,$]}close($,I,U,_){let u;if($===void 0)u=dE;else if(typeof $!=="number"||!tE($))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={[H4]:u.length,fin:!0,generateMask:this._generateMask,mask:U,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};if(this._state!==L4)this.enqueue([this.dispatch,u,!1,g,_]);else this.sendFrame(j6.frame(u,g),_)}ping($,I,U){let _,u;if(typeof $==="string")_=Buffer.byteLength($),u=!1;else if(QI($))_=$.size,u=!1;else $=X1($),_=$.length,u=X1.readOnly;if(_>125)throw RangeError("The data size must not be greater than 125 bytes");let g={[H4]:_,fin:!0,generateMask:this._generateMask,mask:I,maskBuffer:this._maskBuffer,opcode:9,readOnly:u,rsv1:!1};if(QI($))if(this._state!==L4)this.enqueue([this.getBlobData,$,!1,g,U]);else this.getBlobData($,!1,g,U);else if(this._state!==L4)this.enqueue([this.dispatch,$,!1,g,U]);else this.sendFrame(j6.frame($,g),U)}pong($,I,U){let _,u;if(typeof $==="string")_=Buffer.byteLength($),u=!1;else if(QI($))_=$.size,u=!1;else $=X1($),_=$.length,u=X1.readOnly;if(_>125)throw RangeError("The data size must not be greater than 125 bytes");let g={[H4]:_,fin:!0,generateMask:this._generateMask,mask:I,maskBuffer:this._maskBuffer,opcode:10,readOnly:u,rsv1:!1};if(QI($))if(this._state!==L4)this.enqueue([this.getBlobData,$,!1,g,U]);else this.getBlobData($,!1,g,U);else if(this._state!==L4)this.enqueue([this.dispatch,$,!1,g,U]);else this.sendFrame(j6.frame($,g),U)}send($,I,U){let _=this._extensions[jY.extensionName],u=I.binary?2:1,g=I.compress,z,v;if(typeof $==="string")z=Buffer.byteLength($),v=!1;else if(QI($))z=$.size,v=!1;else $=X1($),z=$.length,v=X1.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={[H4]:z,fin:I.fin,generateMask:this._generateMask,mask:I.mask,maskBuffer:this._maskBuffer,opcode:u,readOnly:v,rsv1:g};if(QI($))if(this._state!==L4)this.enqueue([this.getBlobData,$,this._compress,J,U]);else this.getBlobData($,this._compress,J,U);else if(this._state!==L4)this.enqueue([this.dispatch,$,this._compress,J,U]);else this.dispatch($,this._compress,J,U)}getBlobData($,I,U,_){this._bufferedBytes+=U[H4],this._state=sE,$.arrayBuffer().then((u)=>{if(this._socket.destroyed){let z=Error("The socket was closed while the blob was being read");process.nextTick(V9,this,z,_);return}this._bufferedBytes-=U[H4];let g=X1(u);if(!I)this._state=L4,this.sendFrame(j6.frame(g,U),_),this.dequeue();else this.dispatch(g,I,U,_)}).catch((u)=>{process.nextTick($C,this,u,_)})}dispatch($,I,U,_){if(!I){this.sendFrame(j6.frame($,U),_);return}let u=this._extensions[jY.extensionName];this._bufferedBytes+=U[H4],this._state=eE,u.compress($,U.fin,(g,z)=>{if(this._socket.destroyed){let v=Error("The socket was closed while data was being compressed");V9(this,v,_);return}this._bufferedBytes-=U[H4],this._state=L4,U.readOnly=!1,this.sendFrame(j6.frame(z,U),_),this.dequeue()})}dequeue(){while(this._state===L4&&this._queue.length){let $=this._queue.shift();this._bufferedBytes-=$[3][H4],Reflect.apply($[0],this,$.slice(1))}}enqueue($){this._bufferedBytes+=$[3][H4],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)}}SY.exports=j6;function V9($,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 $C($,I,U){V9($,I,U),$.onerror(I)}});var nY=E((Hm,iY)=>{var{kForOnEventAttribute:i0,kListener:M9}=$6(),wY=Symbol("kCode"),EY=Symbol("kData"),CY=Symbol("kError"),fY=Symbol("kMessage"),xY=Symbol("kReason"),HI=Symbol("kTarget"),kY=Symbol("kType"),yY=Symbol("kWasClean");class F6{constructor($){this[HI]=null,this[kY]=$}get target(){return this[HI]}get type(){return this[kY]}}Object.defineProperty(F6.prototype,"target",{enumerable:!0});Object.defineProperty(F6.prototype,"type",{enumerable:!0});class YI extends F6{constructor($,I={}){super($);this[wY]=I.code===void 0?0:I.code,this[xY]=I.reason===void 0?"":I.reason,this[yY]=I.wasClean===void 0?!1:I.wasClean}get code(){return this[wY]}get reason(){return this[xY]}get wasClean(){return this[yY]}}Object.defineProperty(YI.prototype,"code",{enumerable:!0});Object.defineProperty(YI.prototype,"reason",{enumerable:!0});Object.defineProperty(YI.prototype,"wasClean",{enumerable:!0});class n0 extends F6{constructor($,I={}){super($);this[CY]=I.error===void 0?null:I.error,this[fY]=I.message===void 0?"":I.message}get error(){return this[CY]}get message(){return this[fY]}}Object.defineProperty(n0.prototype,"error",{enumerable:!0});Object.defineProperty(n0.prototype,"message",{enumerable:!0});class K2 extends F6{constructor($,I={}){super($);this[EY]=I.data===void 0?null:I.data}get data(){return this[EY]}}Object.defineProperty(K2.prototype,"data",{enumerable:!0});var IC={addEventListener($,I,U={}){for(let u of this.listeners($))if(!U[i0]&&u[M9]===I&&!u[i0])return;let _;if($==="message")_=function(g,z){let v=new K2("message",{data:z?g:g.toString()});v[HI]=this,R2(I,this,v)};else if($==="close")_=function(g,z){let v=new YI("close",{code:g,reason:z.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});v[HI]=this,R2(I,this,v)};else if($==="error")_=function(g){let z=new n0("error",{error:g,message:g.message});z[HI]=this,R2(I,this,z)};else if($==="open")_=function(){let g=new F6("open");g[HI]=this,R2(I,this,g)};else return;if(_[i0]=!!U[i0],_[M9]=I,U.once)this.once($,_);else this.on($,_)},removeEventListener($,I){for(let U of this.listeners($))if(U[M9]===I&&!U[i0]){this.removeListener($,U);break}}};iY.exports={CloseEvent:YI,ErrorEvent:n0,Event:F6,EventTarget:IC,MessageEvent:K2};function R2($,I,U){if(typeof $==="object"&&$.handleEvent)$.handleEvent.call($,U);else $.call(I,U)}});var R9=E((Ym,rY)=>{var{tokenChars:r0}=qI();function i4($,I,U){if($[I]===void 0)$[I]=[U];else $[I].push(U)}function uC($){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&&r0[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)i4(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&&r0[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(i4(U,$.slice(J,X),!0),N===44)i4(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(r0[N]!==1)throw SyntaxError(`Unexpected character at index ${G}`);if(J===-1)J=G;else if(!_)_=!0;u=!1}else if(g)if(r0[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&&r0[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(i4(U,v,T),N===44)i4(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)i4(I,q,U);else{if(v===void 0)i4(U,q,!0);else if(_)i4(U,v,q.replace(/\\/g,""));else i4(U,v,q);i4(I,z,U)}return I}function UC($){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(", ")}rY.exports={format:UC,parse:uC}});var Z2=E((Vm,$O)=>{var _C=g$("events"),gC=g$("https"),zC=g$("http"),hY=g$("net"),vC=g$("tls"),{randomBytes:JC,createHash:NC}=g$("crypto"),{Duplex:Om,Readable:Dm}=g$("stream"),{URL:K9}=g$("url"),S6=y0(),GC=D9(),XC=B9(),{isBlob:qC}=qI(),{BINARY_TYPES:lY,CLOSE_TIMEOUT:QC,EMPTY_BUFFER:L2,GUID:TC,kForOnEventAttribute:L9,kListener:HC,kStatusCode:YC,kWebSocket:S$,NOOP:cY}=$6(),{EventTarget:{addEventListener:OC,removeEventListener:DC}}=nY(),{format:VC,parse:BC}=R9(),{toBuffer:MC}=x0(),dY=Symbol("kAborted"),P9=[8,13],u6=["CONNECTING","OPEN","CLOSING","CLOSED"],RC=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class h extends _C{constructor($,I,U){super();if(this._binaryType=lY[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=L2,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];pY(this,$,I,U)}else this._autoPong=U.autoPong,this._closeTimeout=U.closeTimeout,this._isServer=!0}get binaryType(){return this._binaryType}set binaryType($){if(!lY.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 GC({allowSynchronousEvents:U.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:U.maxPayload,skipUTF8Validation:U.skipUTF8Validation}),u=new XC($,this._extensions,U.generateMask);if(this._receiver=_,this._sender=u,this._socket=$,_[S$]=this,u[S$]=this,$[S$]=this,_.on("conclude",PC),_.on("drain",WC),_.on("error",ZC),_.on("message",AC),_.on("ping",bC),_.on("pong",jC),u.onerror=FC,$.setTimeout)$.setTimeout(0);if($.setNoDelay)$.setNoDelay();if(I.length>0)$.unshift(I);$.on("close",aY),$.on("data",W2),$.on("end",eY),$.on("error",sY),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[S6.extensionName])this._extensions[S6.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){v4(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()}),tY(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){W9(this,$,U);return}if(I===void 0)I=!this._isServer;this._sender.ping($||L2,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){W9(this,$,U);return}if(I===void 0)I=!this._isServer;this._sender.pong($||L2,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){W9(this,$,U);return}let _={binary:typeof $!=="string",mask:!this._isServer,compress:!0,fin:!0,...I};if(!this._extensions[S6.extensionName])_.compress=!1;this._sender.send($||L2,_,U)}terminate(){if(this.readyState===h.CLOSED)return;if(this.readyState===h.CONNECTING){v4(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:u6.indexOf("CONNECTING")});Object.defineProperty(h.prototype,"CONNECTING",{enumerable:!0,value:u6.indexOf("CONNECTING")});Object.defineProperty(h,"OPEN",{enumerable:!0,value:u6.indexOf("OPEN")});Object.defineProperty(h.prototype,"OPEN",{enumerable:!0,value:u6.indexOf("OPEN")});Object.defineProperty(h,"CLOSING",{enumerable:!0,value:u6.indexOf("CLOSING")});Object.defineProperty(h.prototype,"CLOSING",{enumerable:!0,value:u6.indexOf("CLOSING")});Object.defineProperty(h,"CLOSED",{enumerable:!0,value:u6.indexOf("CLOSED")});Object.defineProperty(h.prototype,"CLOSED",{enumerable:!0,value:u6.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[L9])return I[HC];return null},set(I){for(let U of this.listeners($))if(U[L9]){this.removeListener($,U);break}if(typeof I!=="function")return;this.addEventListener($,I,{[L9]:!0})}})});h.prototype.addEventListener=OC;h.prototype.removeEventListener=DC;$O.exports=h;function pY($,I,U,_){let u={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:QC,protocolVersion:P9[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,!P9.includes(u.protocolVersion))throw RangeError(`Unsupported protocol version: ${u.protocolVersion} (supported versions: ${P9.join(", ")})`);let g;if(I instanceof K9)g=I;else try{g=new K9(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{P2($,Q);return}}let N=z?443:80,X=JC(16).toString("base64"),G=z?gC.request:zC.request,q=new Set,T;if(u.createConnection=u.createConnection||(z?LC:KC),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 S6(u.perMessageDeflate!==!0?u.perMessageDeflate:{},!1,u.maxPayload),u.headers["Sec-WebSocket-Extensions"]=VC({[S6.extensionName]:T.offer()});if(U.length){for(let Q of U){if(typeof Q!=="string"||!RC.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,R]of Object.entries(Q))_.headers[Y.toLowerCase()]=R}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",()=>{v4($,H,"Opening handshake has timed out")});if(H.on("error",(Q)=>{if(H===null||H[dY])return;H=$._req=null,P2($,Q)}),H.on("response",(Q)=>{let Y=Q.headers.location,R=Q.statusCode;if(Y&&u.followRedirects&&R>=300&&R<400){if(++$._redirects>u.maxRedirects){v4($,H,"Maximum redirects exceeded");return}H.abort();let K;try{K=new K9(Y,I)}catch(W){let O=SyntaxError(`Invalid URL: ${Y}`);P2($,O);return}pY($,K,U,_)}else if(!$.emit("unexpected-response",H,Q))v4($,H,`Unexpected server response: ${Q.statusCode}`)}),H.on("upgrade",(Q,Y,R)=>{if($.emit("upgrade",Q),$.readyState!==h.CONNECTING)return;H=$._req=null;let K=Q.headers.upgrade;if(K===void 0||K.toLowerCase()!=="websocket"){v4($,Y,"Invalid Upgrade header");return}let W=NC("sha1").update(X+TC).digest("base64");if(Q.headers["sec-websocket-accept"]!==W){v4($,Y,"Invalid Sec-WebSocket-Accept header");return}let O=Q.headers["sec-websocket-protocol"],V;if(O!==void 0){if(!q.size)V="Server sent a subprotocol but none was requested";else if(!q.has(O))V="Server sent an invalid subprotocol"}else if(q.size)V="Server sent no subprotocol";if(V){v4($,Y,V);return}if(O)$._protocol=O;let P=Q.headers["sec-websocket-extensions"];if(P!==void 0){if(!T){v4($,Y,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let B;try{B=BC(P)}catch(F){v4($,Y,"Invalid Sec-WebSocket-Extensions header");return}let M=Object.keys(B);if(M.length!==1||M[0]!==S6.extensionName){v4($,Y,"Server indicated an extension that was not requested");return}try{T.accept(B[S6.extensionName])}catch(F){v4($,Y,"Invalid Sec-WebSocket-Extensions header");return}$._extensions[S6.extensionName]=T}$.setSocket(Y,R,{allowSynchronousEvents:u.allowSynchronousEvents,generateMask:u.generateMask,maxPayload:u.maxPayload,skipUTF8Validation:u.skipUTF8Validation})}),u.finishRequest)u.finishRequest(H,$);else H.end()}function P2($,I){$._readyState=h.CLOSING,$._errorEmitted=!0,$.emit("error",I),$.emitClose()}function KC($){return $.path=$.socketPath,hY.connect($)}function LC($){if($.path=void 0,!$.servername&&$.servername!=="")$.servername=hY.isIP($.host)?"":$.host;return vC.connect($)}function v4($,I,U){$._readyState=h.CLOSING;let _=Error(U);if(Error.captureStackTrace(_,v4),I.setHeader){if(I[dY]=!0,I.abort(),I.socket&&!I.socket.destroyed)I.socket.destroy();process.nextTick(P2,$,_)}else I.destroy(_),I.once("error",$.emit.bind($,"error")),I.once("close",$.emitClose.bind($))}function W9($,I,U){if(I){let _=qC(I)?I.size:MC(I).length;if($._socket)$._sender._bufferedBytes+=_;else $._bufferedAmount+=_}if(U){let _=Error(`WebSocket is not open: readyState ${$.readyState} (${u6[$.readyState]})`);process.nextTick(U,_)}}function PC($,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(oY,U._socket),$===1005)U.close();else U.close($,I)}function WC(){let $=this[S$];if(!$.isPaused)$._socket.resume()}function ZC($){let I=this[S$];if(I._socket[S$]!==void 0)I._socket.removeListener("data",W2),process.nextTick(oY,I._socket),I.close($[YC]);if(!I._errorEmitted)I._errorEmitted=!0,I.emit("error",$)}function mY(){this[S$].emitClose()}function AC($,I){this[S$].emit("message",$,I)}function bC($){let I=this[S$];if(I._autoPong)I.pong($,!this._isServer,cY);I.emit("ping",$)}function jC($){this[S$].emit("pong",$)}function oY($){$.resume()}function FC($){let I=this[S$];if(I.readyState===h.CLOSED)return;if(I.readyState===h.OPEN)I._readyState=h.CLOSING,tY(I);if(this._socket.end(),!I._errorEmitted)I._errorEmitted=!0,I.emit("error",$)}function tY($){$._closeTimer=setTimeout($._socket.destroy.bind($._socket),$._closeTimeout)}function aY(){let $=this[S$];if(this.removeListener("close",aY),this.removeListener("data",W2),this.removeListener("end",eY),$._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",mY),$._receiver.on("finish",mY)}function W2($){if(!this[S$]._receiver.write($))this.pause()}function eY(){let $=this[S$];$._readyState=h.CLOSING,$._receiver.end(),this.end()}function sY(){let $=this[S$];if(this.removeListener("error",sY),this.on("error",cY),$)$._readyState=h.CLOSING,this.destroy()}});var _O=E((Mm,UO)=>{var Bm=Z2(),{Duplex:SC}=g$("stream");function IO($){$.emit("close")}function wC(){if(!this.destroyed&&this._writableState.finished)this.destroy()}function uO($){if(this.removeListener("error",uO),this.destroy(),this.listenerCount("error")===0)this.emit("error",$)}function EC($,I){let U=!0,_=new SC({...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(IO,_);return}let z=!1;if($.once("error",function(J){z=!0,g(J)}),$.once("close",function(){if(!z)g(u);process.nextTick(IO,_)}),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",wC),_.on("error",uO),_}UO.exports=EC});var zO=E((Rm,gO)=>{var{tokenChars:CC}=qI();function fC($){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}gO.exports={parse:fC}});var XO=E((Lm,GO)=>{var xC=g$("events"),A2=g$("http"),{Duplex:Km}=g$("stream"),{createHash:kC}=g$("crypto"),vO=R9(),Q1=y0(),yC=zO(),iC=Z2(),{CLOSE_TIMEOUT:nC,GUID:rC,kWebSocket:lC}=$6(),mC=/^[+/0-9A-Za-z]{22}==$/;class NO extends xC{constructor($,I){super();if($={allowSynchronousEvents:!0,autoPong:!0,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:nC,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:iC,...$},$.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=A2.createServer((U,_)=>{let u=A2.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=hC(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(l0,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(l0,this);else this._shouldEmitClose=!0;else process.nextTick(l0,this)}else{let I=this._server;this._removeListeners(),this._removeListeners=this._server=null,I.close(()=>{l0(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",JO);let u=$.headers["sec-websocket-key"],g=$.headers.upgrade,z=+$.headers["sec-websocket-version"];if($.method!=="GET"){T1(this,$,I,405,"Invalid HTTP method");return}if(g===void 0||g.toLowerCase()!=="websocket"){T1(this,$,I,400,"Invalid Upgrade header");return}if(u===void 0||!mC.test(u)){T1(this,$,I,400,"Missing or invalid Sec-WebSocket-Key header");return}if(z!==13&&z!==8){T1(this,$,I,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle($)){m0(I,400);return}let v=$.headers["sec-websocket-protocol"],J=new Set;if(v!==void 0)try{J=yC.parse(v)}catch(G){T1(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 Q1(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let q=vO.parse(N);if(q[Q1.extensionName])G.accept(q[Q1.extensionName]),X[Q1.extensionName]=G}catch(q){T1(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 m0(I,T||401,H,Q);this.completeUpgrade(X,u,J,$,I,U,_)});return}if(!this.options.verifyClient(G))return m0(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[lC])throw Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>0)return m0(u,503);let J=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${kC("sha1").update(I+rC).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($[Q1.extensionName]){let X=$[Q1.extensionName].params,G=vO.format({[Q1.extensionName]:[X]});J.push(`Sec-WebSocket-Extensions: ${G}`),N._extensions=$}if(this.emit("headers",J,_),u.write(J.concat(`\r
|
|
291
|
+
`),"Changed Files");let v=await r_({message:"What did you accomplish in this session?",placeholder:"e.g., Implemented user authentication flow"});if(e(v)){U4("Cancelled.");return}let J=await r_({message:"Key learnings? (comma-separated)",placeholder:"e.g., JWT needs refresh token, bcrypt is slow"});if(e(J)){U4("Cancelled.");return}let N=await r_({message:"Next steps? (comma-separated)",placeholder:"e.g., Add password reset, Write tests"});if(e(N)){U4("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)};YH($,X),k(j$.default.green("Retrospective saved!"),"Done"),d(j$.default.dim(`Stored in: ${I}`))}var j$;var VH=$4(()=>{e$();I9();Z0();j$=q$(b$(),1)});var u6=E((Hm,MY)=>{var VY=["nodebuffer","arraybuffer","fragments"],BY=typeof Blob<"u";if(BY)VY.push("blob");MY.exports={BINARY_TYPES:VY,CLOSE_TIMEOUT:30000,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:BY,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var y0=E((Ym,B2)=>{var{EMPTY_BUFFER:fE}=u6(),M9=Buffer[Symbol.species];function xE($,I){if($.length===0)return fE;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 M9(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 KY($,I){for(let U=0;U<$.length;U++)$[U]^=I[U&3]}function kE($){if($.length===$.buffer.byteLength)return $.buffer;return $.buffer.slice($.byteOffset,$.byteOffset+$.length)}function R9($){if(R9.readOnly=!0,Buffer.isBuffer($))return $;let I;if($ instanceof ArrayBuffer)I=new M9($);else if(ArrayBuffer.isView($))I=new M9($.buffer,$.byteOffset,$.byteLength);else I=Buffer.from($),R9.readOnly=!1;return I}B2.exports={concat:xE,mask:RY,toArrayBuffer:kE,toBuffer:R9,unmask:KY};if(!process.env.WS_NO_BUFFER_UTIL)try{let $=(()=>{throw new Error("Cannot require module "+"bufferutil");})();B2.exports.mask=function(I,U,_,u,g){if(g<48)RY(I,U,_,u,g);else $.mask(I,U,_,u,g)},B2.exports.unmask=function(I,U){if(I.length<32)KY(I,U);else $.unmask(I,U)}}catch($){}});var ZY=E((Om,WY)=>{var LY=Symbol("kDone"),K9=Symbol("kRun");class PY{constructor($){this[LY]=()=>{this.pending--,this[K9]()},this.concurrency=$||1/0,this.jobs=[],this.pending=0}add($){this.jobs.push($),this[K9]()}[K9](){if(this.pending===this.concurrency)return;if(this.jobs.length){let $=this.jobs.shift();this.pending++,$(this[LY])}}}WY.exports=PY});var n0=E((Dm,SY)=>{var i0=g$("zlib"),AY=y0(),yE=ZY(),{kStatusCode:bY}=u6(),iE=Buffer[Symbol.species],nE=Buffer.from([0,0,255,255]),R2=Symbol("permessage-deflate"),U6=Symbol("total-length"),QI=Symbol("callback"),F6=Symbol("buffers"),TI=Symbol("error"),M2;class jY{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,!M2){let _=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;M2=new yE(_)}}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[QI];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){M2.add((_)=>{this._decompress($,I,(u,g)=>{_(),U(u,g)})})}compress($,I,U){M2.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"?i0.Z_DEFAULT_WINDOWBITS:this.params[u];this._inflate=i0.createInflateRaw({...this._options.zlibInflateOptions,windowBits:g}),this._inflate[R2]=this,this._inflate[U6]=0,this._inflate[F6]=[],this._inflate.on("error",lE),this._inflate.on("data",FY)}if(this._inflate[QI]=U,this._inflate.write($),I)this._inflate.write(nE);this._inflate.flush(()=>{let u=this._inflate[TI];if(u){this._inflate.close(),this._inflate=null,U(u);return}let g=AY.concat(this._inflate[F6],this._inflate[U6]);if(this._inflate._readableState.endEmitted)this._inflate.close(),this._inflate=null;else if(this._inflate[U6]=0,this._inflate[F6]=[],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"?i0.Z_DEFAULT_WINDOWBITS:this.params[u];this._deflate=i0.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:g}),this._deflate[U6]=0,this._deflate[F6]=[],this._deflate.on("data",rE)}this._deflate[QI]=U,this._deflate.write($),this._deflate.flush(i0.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let u=AY.concat(this._deflate[F6],this._deflate[U6]);if(I)u=new iE(u.buffer,u.byteOffset,u.length-4);if(this._deflate[QI]=null,this._deflate[U6]=0,this._deflate[F6]=[],I&&this.params[`${_}_no_context_takeover`])this._deflate.reset();U(null,u)})}}SY.exports=jY;function rE($){this[F6].push($),this[U6]+=$.length}function FY($){if(this[U6]+=$.length,this[R2]._maxPayload<1||this[U6]<=this[R2]._maxPayload){this[F6].push($);return}this[TI]=RangeError("Max payload size exceeded"),this[TI].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[TI][bY]=1009,this.removeListener("data",FY),this.reset()}function lE($){if(this[R2]._inflate=null,this[TI]){this[QI](this[TI]);return}$[bY]=1007,this[QI]($)}});var HI=E((Vm,K2)=>{var{isUtf8:wY}=g$("buffer"),{hasBlob:mE}=u6(),hE=[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 cE($){return $>=1000&&$<=1014&&$!==1004&&$!==1005&&$!==1006||$>=3000&&$<=4999}function L9($){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 dE($){return mE&&typeof $==="object"&&typeof $.arrayBuffer==="function"&&typeof $.type==="string"&&typeof $.stream==="function"&&($[Symbol.toStringTag]==="Blob"||$[Symbol.toStringTag]==="File")}K2.exports={isBlob:dE,isValidStatusCode:cE,isValidUTF8:L9,tokenChars:hE};if(wY)K2.exports.isValidUTF8=function($){return $.length<24?L9($):wY($)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let $=(()=>{throw new Error("Cannot require module "+"utf-8-validate");})();K2.exports.isValidUTF8=function(I){return I.length<32?L9(I):$(I)}}catch($){}});var W9=E((Bm,kY)=>{var{Writable:pE}=g$("stream"),EY=n0(),{BINARY_TYPES:oE,EMPTY_BUFFER:CY,kStatusCode:tE,kWebSocket:aE}=u6(),{concat:P9,toArrayBuffer:eE,unmask:sE}=y0(),{isValidStatusCode:$C,isValidUTF8:fY}=HI(),L2=Buffer[Symbol.species];class xY extends pE{constructor($={}){super();this._allowSynchronousEvents=$.allowSynchronousEvents!==void 0?$.allowSynchronousEvents:!0,this._binaryType=$.binaryType||oE[0],this._extensions=$.extensions||{},this._isServer=!!$.isServer,this._maxPayload=$.maxPayload|0,this._skipUTF8Validation=!!$.skipUTF8Validation,this[aE]=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 L2(U.buffer,U.byteOffset+$,U.length-$),new L2(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 L2(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[EY.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=CY;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)sE(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[EY.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")_=P9(U,I);else if(this._binaryType==="arraybuffer")_=eE(P9(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 _=P9(U,I);if(!this._skipUTF8Validation&&!fY(_)){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,CY),this.end();else{let U=$.readUInt16BE(0);if(!$C(U)){let u=this.createError(RangeError,`invalid status code ${U}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");I(u);return}let _=new L2($.buffer,$.byteOffset+2,$.length-2);if(!this._skipUTF8Validation&&!fY(_)){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[tE]=_,g}}kY.exports=xY});var A9=E((Rm,nY)=>{var{Duplex:Mm}=g$("stream"),{randomFillSync:IC}=g$("crypto"),yY=n0(),{EMPTY_BUFFER:uC,kWebSocket:UC,NOOP:_C}=u6(),{isBlob:YI,isValidStatusCode:gC}=HI(),{mask:iY,toBuffer:Q1}=y0(),Y4=Symbol("kByteLength"),zC=Buffer.alloc(4),T1,OI=8192,W4=0,vC=1,JC=2;class S6{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=W4,this.onerror=_C,this[UC]=void 0}static frame($,I){let U,_=!1,u=2,g=!1;if(I.mask){if(U=I.maskBuffer||zC,I.generateMask)I.generateMask(U);else{if(OI===8192){if(T1===void 0)T1=Buffer.alloc(8192);IC(T1,0,8192),OI=0}U[0]=T1[OI++],U[1]=T1[OI++],U[2]=T1[OI++],U[3]=T1[OI++]}g=(U[0]|U[1]|U[2]|U[3])===0,u=6}let z;if(typeof $==="string")if((!I.mask||g)&&I[Y4]!==void 0)z=I[Y4];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 iY($,U,J,u,z),[J];return iY($,U,$,0,z),[J,$]}close($,I,U,_){let u;if($===void 0)u=uC;else if(typeof $!=="number"||!gC($))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={[Y4]:u.length,fin:!0,generateMask:this._generateMask,mask:U,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};if(this._state!==W4)this.enqueue([this.dispatch,u,!1,g,_]);else this.sendFrame(S6.frame(u,g),_)}ping($,I,U){let _,u;if(typeof $==="string")_=Buffer.byteLength($),u=!1;else if(YI($))_=$.size,u=!1;else $=Q1($),_=$.length,u=Q1.readOnly;if(_>125)throw RangeError("The data size must not be greater than 125 bytes");let g={[Y4]:_,fin:!0,generateMask:this._generateMask,mask:I,maskBuffer:this._maskBuffer,opcode:9,readOnly:u,rsv1:!1};if(YI($))if(this._state!==W4)this.enqueue([this.getBlobData,$,!1,g,U]);else this.getBlobData($,!1,g,U);else if(this._state!==W4)this.enqueue([this.dispatch,$,!1,g,U]);else this.sendFrame(S6.frame($,g),U)}pong($,I,U){let _,u;if(typeof $==="string")_=Buffer.byteLength($),u=!1;else if(YI($))_=$.size,u=!1;else $=Q1($),_=$.length,u=Q1.readOnly;if(_>125)throw RangeError("The data size must not be greater than 125 bytes");let g={[Y4]:_,fin:!0,generateMask:this._generateMask,mask:I,maskBuffer:this._maskBuffer,opcode:10,readOnly:u,rsv1:!1};if(YI($))if(this._state!==W4)this.enqueue([this.getBlobData,$,!1,g,U]);else this.getBlobData($,!1,g,U);else if(this._state!==W4)this.enqueue([this.dispatch,$,!1,g,U]);else this.sendFrame(S6.frame($,g),U)}send($,I,U){let _=this._extensions[yY.extensionName],u=I.binary?2:1,g=I.compress,z,v;if(typeof $==="string")z=Buffer.byteLength($),v=!1;else if(YI($))z=$.size,v=!1;else $=Q1($),z=$.length,v=Q1.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={[Y4]:z,fin:I.fin,generateMask:this._generateMask,mask:I.mask,maskBuffer:this._maskBuffer,opcode:u,readOnly:v,rsv1:g};if(YI($))if(this._state!==W4)this.enqueue([this.getBlobData,$,this._compress,J,U]);else this.getBlobData($,this._compress,J,U);else if(this._state!==W4)this.enqueue([this.dispatch,$,this._compress,J,U]);else this.dispatch($,this._compress,J,U)}getBlobData($,I,U,_){this._bufferedBytes+=U[Y4],this._state=JC,$.arrayBuffer().then((u)=>{if(this._socket.destroyed){let z=Error("The socket was closed while the blob was being read");process.nextTick(Z9,this,z,_);return}this._bufferedBytes-=U[Y4];let g=Q1(u);if(!I)this._state=W4,this.sendFrame(S6.frame(g,U),_),this.dequeue();else this.dispatch(g,I,U,_)}).catch((u)=>{process.nextTick(NC,this,u,_)})}dispatch($,I,U,_){if(!I){this.sendFrame(S6.frame($,U),_);return}let u=this._extensions[yY.extensionName];this._bufferedBytes+=U[Y4],this._state=vC,u.compress($,U.fin,(g,z)=>{if(this._socket.destroyed){let v=Error("The socket was closed while data was being compressed");Z9(this,v,_);return}this._bufferedBytes-=U[Y4],this._state=W4,U.readOnly=!1,this.sendFrame(S6.frame(z,U),_),this.dequeue()})}dequeue(){while(this._state===W4&&this._queue.length){let $=this._queue.shift();this._bufferedBytes-=$[3][Y4],Reflect.apply($[0],this,$.slice(1))}}enqueue($){this._bufferedBytes+=$[3][Y4],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)}}nY.exports=S6;function Z9($,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 NC($,I,U){Z9($,I,U),$.onerror(I)}});var tY=E((Km,oY)=>{var{kForOnEventAttribute:r0,kListener:b9}=u6(),rY=Symbol("kCode"),lY=Symbol("kData"),mY=Symbol("kError"),hY=Symbol("kMessage"),cY=Symbol("kReason"),DI=Symbol("kTarget"),dY=Symbol("kType"),pY=Symbol("kWasClean");class w6{constructor($){this[DI]=null,this[dY]=$}get target(){return this[DI]}get type(){return this[dY]}}Object.defineProperty(w6.prototype,"target",{enumerable:!0});Object.defineProperty(w6.prototype,"type",{enumerable:!0});class VI extends w6{constructor($,I={}){super($);this[rY]=I.code===void 0?0:I.code,this[cY]=I.reason===void 0?"":I.reason,this[pY]=I.wasClean===void 0?!1:I.wasClean}get code(){return this[rY]}get reason(){return this[cY]}get wasClean(){return this[pY]}}Object.defineProperty(VI.prototype,"code",{enumerable:!0});Object.defineProperty(VI.prototype,"reason",{enumerable:!0});Object.defineProperty(VI.prototype,"wasClean",{enumerable:!0});class l0 extends w6{constructor($,I={}){super($);this[mY]=I.error===void 0?null:I.error,this[hY]=I.message===void 0?"":I.message}get error(){return this[mY]}get message(){return this[hY]}}Object.defineProperty(l0.prototype,"error",{enumerable:!0});Object.defineProperty(l0.prototype,"message",{enumerable:!0});class W2 extends w6{constructor($,I={}){super($);this[lY]=I.data===void 0?null:I.data}get data(){return this[lY]}}Object.defineProperty(W2.prototype,"data",{enumerable:!0});var GC={addEventListener($,I,U={}){for(let u of this.listeners($))if(!U[r0]&&u[b9]===I&&!u[r0])return;let _;if($==="message")_=function(g,z){let v=new W2("message",{data:z?g:g.toString()});v[DI]=this,P2(I,this,v)};else if($==="close")_=function(g,z){let v=new VI("close",{code:g,reason:z.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});v[DI]=this,P2(I,this,v)};else if($==="error")_=function(g){let z=new l0("error",{error:g,message:g.message});z[DI]=this,P2(I,this,z)};else if($==="open")_=function(){let g=new w6("open");g[DI]=this,P2(I,this,g)};else return;if(_[r0]=!!U[r0],_[b9]=I,U.once)this.once($,_);else this.on($,_)},removeEventListener($,I){for(let U of this.listeners($))if(U[b9]===I&&!U[r0]){this.removeListener($,U);break}}};oY.exports={CloseEvent:VI,ErrorEvent:l0,Event:w6,EventTarget:GC,MessageEvent:W2};function P2($,I,U){if(typeof $==="object"&&$.handleEvent)$.handleEvent.call($,U);else $.call(I,U)}});var j9=E((Lm,aY)=>{var{tokenChars:m0}=HI();function n4($,I,U){if($[I]===void 0)$[I]=[U];else $[I].push(U)}function XC($){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&&m0[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)n4(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&&m0[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(n4(U,$.slice(J,X),!0),N===44)n4(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(m0[N]!==1)throw SyntaxError(`Unexpected character at index ${G}`);if(J===-1)J=G;else if(!_)_=!0;u=!1}else if(g)if(m0[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&&m0[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(n4(U,v,T),N===44)n4(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)n4(I,q,U);else{if(v===void 0)n4(U,q,!0);else if(_)n4(U,v,q.replace(/\\/g,""));else n4(U,v,q);n4(I,z,U)}return I}function qC($){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(", ")}aY.exports={format:qC,parse:XC}});var j2=E((Zm,NO)=>{var QC=g$("events"),TC=g$("https"),HC=g$("http"),$O=g$("net"),YC=g$("tls"),{randomBytes:OC,createHash:DC}=g$("crypto"),{Duplex:Pm,Readable:Wm}=g$("stream"),{URL:F9}=g$("url"),E6=n0(),VC=W9(),BC=A9(),{isBlob:MC}=HI(),{BINARY_TYPES:eY,CLOSE_TIMEOUT:RC,EMPTY_BUFFER:Z2,GUID:KC,kForOnEventAttribute:S9,kListener:LC,kStatusCode:PC,kWebSocket:S$,NOOP:IO}=u6(),{EventTarget:{addEventListener:WC,removeEventListener:ZC}}=tY(),{format:AC,parse:bC}=j9(),{toBuffer:jC}=y0(),uO=Symbol("kAborted"),w9=[8,13],_6=["CONNECTING","OPEN","CLOSING","CLOSED"],FC=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class h extends QC{constructor($,I,U){super();if(this._binaryType=eY[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Z2,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];UO(this,$,I,U)}else this._autoPong=U.autoPong,this._closeTimeout=U.closeTimeout,this._isServer=!0}get binaryType(){return this._binaryType}set binaryType($){if(!eY.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 VC({allowSynchronousEvents:U.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:U.maxPayload,skipUTF8Validation:U.skipUTF8Validation}),u=new BC($,this._extensions,U.generateMask);if(this._receiver=_,this._sender=u,this._socket=$,_[S$]=this,u[S$]=this,$[S$]=this,_.on("conclude",EC),_.on("drain",CC),_.on("error",fC),_.on("message",xC),_.on("ping",kC),_.on("pong",yC),u.onerror=iC,$.setTimeout)$.setTimeout(0);if($.setNoDelay)$.setNoDelay();if(I.length>0)$.unshift(I);$.on("close",zO),$.on("data",b2),$.on("end",vO),$.on("error",JO),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[E6.extensionName])this._extensions[E6.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){J4(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()}),gO(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){E9(this,$,U);return}if(I===void 0)I=!this._isServer;this._sender.ping($||Z2,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){E9(this,$,U);return}if(I===void 0)I=!this._isServer;this._sender.pong($||Z2,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){E9(this,$,U);return}let _={binary:typeof $!=="string",mask:!this._isServer,compress:!0,fin:!0,...I};if(!this._extensions[E6.extensionName])_.compress=!1;this._sender.send($||Z2,_,U)}terminate(){if(this.readyState===h.CLOSED)return;if(this.readyState===h.CONNECTING){J4(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:_6.indexOf("CONNECTING")});Object.defineProperty(h.prototype,"CONNECTING",{enumerable:!0,value:_6.indexOf("CONNECTING")});Object.defineProperty(h,"OPEN",{enumerable:!0,value:_6.indexOf("OPEN")});Object.defineProperty(h.prototype,"OPEN",{enumerable:!0,value:_6.indexOf("OPEN")});Object.defineProperty(h,"CLOSING",{enumerable:!0,value:_6.indexOf("CLOSING")});Object.defineProperty(h.prototype,"CLOSING",{enumerable:!0,value:_6.indexOf("CLOSING")});Object.defineProperty(h,"CLOSED",{enumerable:!0,value:_6.indexOf("CLOSED")});Object.defineProperty(h.prototype,"CLOSED",{enumerable:!0,value:_6.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[S9])return I[LC];return null},set(I){for(let U of this.listeners($))if(U[S9]){this.removeListener($,U);break}if(typeof I!=="function")return;this.addEventListener($,I,{[S9]:!0})}})});h.prototype.addEventListener=WC;h.prototype.removeEventListener=ZC;NO.exports=h;function UO($,I,U,_){let u={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:RC,protocolVersion:w9[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,!w9.includes(u.protocolVersion))throw RangeError(`Unsupported protocol version: ${u.protocolVersion} (supported versions: ${w9.join(", ")})`);let g;if(I instanceof F9)g=I;else try{g=new F9(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{A2($,Q);return}}let N=z?443:80,X=OC(16).toString("base64"),G=z?TC.request:HC.request,q=new Set,T;if(u.createConnection=u.createConnection||(z?wC:SC),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 E6(u.perMessageDeflate!==!0?u.perMessageDeflate:{},!1,u.maxPayload),u.headers["Sec-WebSocket-Extensions"]=AC({[E6.extensionName]:T.offer()});if(U.length){for(let Q of U){if(typeof Q!=="string"||!FC.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,R]of Object.entries(Q))_.headers[Y.toLowerCase()]=R}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",()=>{J4($,H,"Opening handshake has timed out")});if(H.on("error",(Q)=>{if(H===null||H[uO])return;H=$._req=null,A2($,Q)}),H.on("response",(Q)=>{let Y=Q.headers.location,R=Q.statusCode;if(Y&&u.followRedirects&&R>=300&&R<400){if(++$._redirects>u.maxRedirects){J4($,H,"Maximum redirects exceeded");return}H.abort();let K;try{K=new F9(Y,I)}catch(W){let O=SyntaxError(`Invalid URL: ${Y}`);A2($,O);return}UO($,K,U,_)}else if(!$.emit("unexpected-response",H,Q))J4($,H,`Unexpected server response: ${Q.statusCode}`)}),H.on("upgrade",(Q,Y,R)=>{if($.emit("upgrade",Q),$.readyState!==h.CONNECTING)return;H=$._req=null;let K=Q.headers.upgrade;if(K===void 0||K.toLowerCase()!=="websocket"){J4($,Y,"Invalid Upgrade header");return}let W=DC("sha1").update(X+KC).digest("base64");if(Q.headers["sec-websocket-accept"]!==W){J4($,Y,"Invalid Sec-WebSocket-Accept header");return}let O=Q.headers["sec-websocket-protocol"],V;if(O!==void 0){if(!q.size)V="Server sent a subprotocol but none was requested";else if(!q.has(O))V="Server sent an invalid subprotocol"}else if(q.size)V="Server sent no subprotocol";if(V){J4($,Y,V);return}if(O)$._protocol=O;let P=Q.headers["sec-websocket-extensions"];if(P!==void 0){if(!T){J4($,Y,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let B;try{B=bC(P)}catch(F){J4($,Y,"Invalid Sec-WebSocket-Extensions header");return}let M=Object.keys(B);if(M.length!==1||M[0]!==E6.extensionName){J4($,Y,"Server indicated an extension that was not requested");return}try{T.accept(B[E6.extensionName])}catch(F){J4($,Y,"Invalid Sec-WebSocket-Extensions header");return}$._extensions[E6.extensionName]=T}$.setSocket(Y,R,{allowSynchronousEvents:u.allowSynchronousEvents,generateMask:u.generateMask,maxPayload:u.maxPayload,skipUTF8Validation:u.skipUTF8Validation})}),u.finishRequest)u.finishRequest(H,$);else H.end()}function A2($,I){$._readyState=h.CLOSING,$._errorEmitted=!0,$.emit("error",I),$.emitClose()}function SC($){return $.path=$.socketPath,$O.connect($)}function wC($){if($.path=void 0,!$.servername&&$.servername!=="")$.servername=$O.isIP($.host)?"":$.host;return YC.connect($)}function J4($,I,U){$._readyState=h.CLOSING;let _=Error(U);if(Error.captureStackTrace(_,J4),I.setHeader){if(I[uO]=!0,I.abort(),I.socket&&!I.socket.destroyed)I.socket.destroy();process.nextTick(A2,$,_)}else I.destroy(_),I.once("error",$.emit.bind($,"error")),I.once("close",$.emitClose.bind($))}function E9($,I,U){if(I){let _=MC(I)?I.size:jC(I).length;if($._socket)$._sender._bufferedBytes+=_;else $._bufferedAmount+=_}if(U){let _=Error(`WebSocket is not open: readyState ${$.readyState} (${_6[$.readyState]})`);process.nextTick(U,_)}}function EC($,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",b2),process.nextTick(_O,U._socket),$===1005)U.close();else U.close($,I)}function CC(){let $=this[S$];if(!$.isPaused)$._socket.resume()}function fC($){let I=this[S$];if(I._socket[S$]!==void 0)I._socket.removeListener("data",b2),process.nextTick(_O,I._socket),I.close($[PC]);if(!I._errorEmitted)I._errorEmitted=!0,I.emit("error",$)}function sY(){this[S$].emitClose()}function xC($,I){this[S$].emit("message",$,I)}function kC($){let I=this[S$];if(I._autoPong)I.pong($,!this._isServer,IO);I.emit("ping",$)}function yC($){this[S$].emit("pong",$)}function _O($){$.resume()}function iC($){let I=this[S$];if(I.readyState===h.CLOSED)return;if(I.readyState===h.OPEN)I._readyState=h.CLOSING,gO(I);if(this._socket.end(),!I._errorEmitted)I._errorEmitted=!0,I.emit("error",$)}function gO($){$._closeTimer=setTimeout($._socket.destroy.bind($._socket),$._closeTimeout)}function zO(){let $=this[S$];if(this.removeListener("close",zO),this.removeListener("data",b2),this.removeListener("end",vO),$._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",sY),$._receiver.on("finish",sY)}function b2($){if(!this[S$]._receiver.write($))this.pause()}function vO(){let $=this[S$];$._readyState=h.CLOSING,$._receiver.end(),this.end()}function JO(){let $=this[S$];if(this.removeListener("error",JO),this.on("error",IO),$)$._readyState=h.CLOSING,this.destroy()}});var QO=E((bm,qO)=>{var Am=j2(),{Duplex:nC}=g$("stream");function GO($){$.emit("close")}function rC(){if(!this.destroyed&&this._writableState.finished)this.destroy()}function XO($){if(this.removeListener("error",XO),this.destroy(),this.listenerCount("error")===0)this.emit("error",$)}function lC($,I){let U=!0,_=new nC({...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(GO,_);return}let z=!1;if($.once("error",function(J){z=!0,g(J)}),$.once("close",function(){if(!z)g(u);process.nextTick(GO,_)}),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",rC),_.on("error",XO),_}qO.exports=lC});var HO=E((jm,TO)=>{var{tokenChars:mC}=HI();function hC($){let I=new Set,U=-1,_=-1,u=0;for(u;u<$.length;u++){let z=$.charCodeAt(u);if(_===-1&&mC[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}TO.exports={parse:hC}});var BO=E((Sm,VO)=>{var cC=g$("events"),F2=g$("http"),{Duplex:Fm}=g$("stream"),{createHash:dC}=g$("crypto"),YO=j9(),H1=n0(),pC=HO(),oC=j2(),{CLOSE_TIMEOUT:tC,GUID:aC,kWebSocket:eC}=u6(),sC=/^[+/0-9A-Za-z]{22}==$/;class DO extends cC{constructor($,I){super();if($={allowSynchronousEvents:!0,autoPong:!0,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:tC,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:oC,...$},$.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=F2.createServer((U,_)=>{let u=F2.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=$f(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(h0,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(h0,this);else this._shouldEmitClose=!0;else process.nextTick(h0,this)}else{let I=this._server;this._removeListeners(),this._removeListeners=this._server=null,I.close(()=>{h0(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",OO);let u=$.headers["sec-websocket-key"],g=$.headers.upgrade,z=+$.headers["sec-websocket-version"];if($.method!=="GET"){Y1(this,$,I,405,"Invalid HTTP method");return}if(g===void 0||g.toLowerCase()!=="websocket"){Y1(this,$,I,400,"Invalid Upgrade header");return}if(u===void 0||!sC.test(u)){Y1(this,$,I,400,"Missing or invalid Sec-WebSocket-Key header");return}if(z!==13&&z!==8){Y1(this,$,I,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle($)){c0(I,400);return}let v=$.headers["sec-websocket-protocol"],J=new Set;if(v!==void 0)try{J=pC.parse(v)}catch(G){Y1(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 H1(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let q=YO.parse(N);if(q[H1.extensionName])G.accept(q[H1.extensionName]),X[H1.extensionName]=G}catch(q){Y1(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 c0(I,T||401,H,Q);this.completeUpgrade(X,u,J,$,I,U,_)});return}if(!this.options.verifyClient(G))return c0(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[eC])throw Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>0)return c0(u,503);let J=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${dC("sha1").update(I+aC).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($[H1.extensionName]){let X=$[H1.extensionName].params,G=YO.format({[H1.extensionName]:[X]});J.push(`Sec-WebSocket-Extensions: ${G}`),N._extensions=$}if(this.emit("headers",J,_),u.write(J.concat(`\r
|
|
267
292
|
`).join(`\r
|
|
268
|
-
`)),u.removeListener("error",
|
|
293
|
+
`)),u.removeListener("error",OO),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(h0,this)});z(N,_)}}VO.exports=DO;function $f($,I){for(let U of Object.keys(I))$.on(U,I[U]);return function(){for(let _ of Object.keys(I))$.removeListener(_,I[_])}}function h0($){$._state=2,$.emit("close")}function OO(){this.destroy()}function c0($,I,U,_){U=U||F2.STATUS_CODES[I],_={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(U),..._},$.once("finish",$.destroy),$.end(`HTTP/1.1 ${I} ${F2.STATUS_CODES[I]}\r
|
|
269
294
|
`+Object.keys(_).map((u)=>`${u}: ${_[u]}`).join(`\r
|
|
270
295
|
`)+`\r
|
|
271
296
|
\r
|
|
272
|
-
`+U)}function T1($,I,U,_,u,g){if($.listenerCount("wsClientError")){let z=Error(u);Error.captureStackTrace(z,T1),$.emit("wsClientError",z,U,I)}else m0(U,_,u,g)}});var s9=X$(e9(),1),{program:cf,createCommand:df,createArgument:pf,createOption:of,CommanderError:tf,InvalidArgumentError:af,InvalidOptionArgumentError:ef,Command:y2,Argument:sf,Option:$x,Help:Ix}=s9.default;var n=X$(b$(),1);import{execSync as Hj,spawn as d3}from"node:child_process";import y from"node:fs";import{tmpdir as L_}from"node:os";import I$ from"node:path";var iW=yg(),nW=xI(),rW=Kg(),ag=kI(),lW=RI(),Q6=$$(),mW=J6(),hW=P$(),cW=G6(),dW=X6(),Mk=ku(),pW=pg(),oW=og(),tW=tg(),nu=J5(),N5=BI();var aW=iW.Composer,eW=nW.Document,sW=rW.Schema,$Z=ag.YAMLError,IZ=ag.YAMLParseError,uZ=ag.YAMLWarning,UZ=lW.Alias,_Z=Q6.isAlias,gZ=Q6.isCollection,zZ=Q6.isDocument,vZ=Q6.isMap,JZ=Q6.isNode,NZ=Q6.isPair,GZ=Q6.isScalar,XZ=Q6.isSeq,qZ=mW.Pair,QZ=hW.Scalar,TZ=cW.YAMLMap,HZ=dW.YAMLSeq;var YZ=pW.Lexer,OZ=oW.LineCounter,DZ=tW.Parser,n6=nu.parse,VZ=nu.parseAllDocuments,BZ=nu.parseDocument,MZ=nu.stringify,RZ=N5.visit,KZ=N5.visitAsync;var z$={};A4(z$,{xor:()=>fQ,xid:()=>gQ,void:()=>jQ,uuidv7:()=>a5,uuidv6:()=>t5,uuidv4:()=>o5,uuid:()=>p5,util:()=>w,url:()=>e5,uppercase:()=>k1,unknown:()=>o6,union:()=>H_,undefined:()=>AQ,ulid:()=>_Q,uint64:()=>WQ,uint32:()=>KQ,tuple:()=>T3,trim:()=>m1,treeifyError:()=>Nz,transform:()=>O_,toUpperCase:()=>c1,toLowerCase:()=>h1,toJSONSchema:()=>rU,templateLiteral:()=>oQ,symbol:()=>ZQ,superRefine:()=>n3,success:()=>cQ,stringbool:()=>U7,stringFormat:()=>YQ,string:()=>pU,strictObject:()=>EQ,startsWith:()=>i1,slugify:()=>d1,size:()=>c6,setErrorMap:()=>$j,set:()=>nQ,safeParseAsync:()=>r8,safeParse:()=>n8,safeEncodeAsync:()=>o8,safeEncode:()=>d8,safeDecodeAsync:()=>t8,safeDecode:()=>p8,registry:()=>QU,regexes:()=>X4,regex:()=>f1,refine:()=>i3,record:()=>H3,readonly:()=>E3,property:()=>kU,promise:()=>tQ,prettifyError:()=>Gz,preprocess:()=>g7,prefault:()=>Z3,positive:()=>EU,pipe:()=>O0,partialRecord:()=>kQ,parseAsync:()=>i8,parse:()=>y8,overwrite:()=>D4,optional:()=>H0,object:()=>wQ,number:()=>e8,nullish:()=>hQ,nullable:()=>Y0,null:()=>U3,normalize:()=>l1,nonpositive:()=>fU,nonoptional:()=>A3,nonnegative:()=>xU,never:()=>T_,negative:()=>CU,nativeEnum:()=>rQ,nanoid:()=>IQ,nan:()=>dQ,multipleOf:()=>D6,minSize:()=>E4,minLength:()=>c4,mime:()=>r1,meta:()=>I7,maxSize:()=>V6,maxLength:()=>d6,map:()=>iQ,mac:()=>JQ,lte:()=>I4,lt:()=>S4,lowercase:()=>x1,looseRecord:()=>yQ,looseObject:()=>CQ,locales:()=>G0,literal:()=>lQ,length:()=>p6,lazy:()=>x3,ksuid:()=>zQ,keyof:()=>SQ,jwt:()=>HQ,json:()=>_7,iso:()=>t1,ipv6:()=>NQ,ipv4:()=>vQ,intersection:()=>q3,int64:()=>PQ,int32:()=>RQ,int:()=>oU,instanceof:()=>u7,includes:()=>y1,httpUrl:()=>s5,hostname:()=>OQ,hex:()=>DQ,hash:()=>VQ,guid:()=>d5,gte:()=>r$,gt:()=>w4,globalRegistry:()=>w$,getErrorMap:()=>Ij,function:()=>aQ,fromJSONSchema:()=>v7,formatError:()=>sI,float64:()=>MQ,float32:()=>BQ,flattenError:()=>eI,file:()=>mQ,exactOptional:()=>R3,enum:()=>Y_,endsWith:()=>n1,encodeAsync:()=>h8,encode:()=>l8,emoji:()=>$Q,email:()=>c5,e164:()=>TQ,discriminatedUnion:()=>xQ,describe:()=>$7,decodeAsync:()=>c8,decode:()=>m8,date:()=>FQ,custom:()=>sQ,cuid2:()=>UQ,cuid:()=>uQ,core:()=>d4,config:()=>R$,coerce:()=>l3,codec:()=>pQ,clone:()=>n$,cidrv6:()=>XQ,cidrv4:()=>GQ,check:()=>eQ,catch:()=>F3,boolean:()=>s8,bigint:()=>LQ,base64url:()=>QQ,base64:()=>qQ,array:()=>B0,any:()=>bQ,_function:()=>aQ,_default:()=>P3,_ZodString:()=>tU,ZodXor:()=>N3,ZodXID:()=>U_,ZodVoid:()=>v3,ZodUnknown:()=>g3,ZodUnion:()=>R0,ZodUndefined:()=>I3,ZodUUID:()=>C4,ZodURL:()=>D0,ZodULID:()=>u_,ZodType:()=>c,ZodTuple:()=>Q3,ZodTransform:()=>B3,ZodTemplateLiteral:()=>C3,ZodSymbol:()=>$3,ZodSuccess:()=>b3,ZodStringFormat:()=>J$,ZodString:()=>e1,ZodSet:()=>O3,ZodRecord:()=>K0,ZodRealError:()=>t$,ZodReadonly:()=>w3,ZodPromise:()=>k3,ZodPrefault:()=>W3,ZodPipe:()=>B_,ZodOptional:()=>D_,ZodObject:()=>M0,ZodNumberFormat:()=>t6,ZodNumber:()=>$I,ZodNullable:()=>K3,ZodNull:()=>u3,ZodNonOptional:()=>V_,ZodNever:()=>z3,ZodNanoID:()=>sU,ZodNaN:()=>S3,ZodMap:()=>Y3,ZodMAC:()=>a8,ZodLiteral:()=>D3,ZodLazy:()=>f3,ZodKSUID:()=>__,ZodJWT:()=>q_,ZodIssueCode:()=>sb,ZodIntersection:()=>X3,ZodISOTime:()=>cU,ZodISODuration:()=>dU,ZodISODateTime:()=>mU,ZodISODate:()=>hU,ZodIPv6:()=>z_,ZodIPv4:()=>g_,ZodGUID:()=>T0,ZodFunction:()=>y3,ZodFirstPartyTypeKind:()=>r3,ZodFile:()=>V3,ZodExactOptional:()=>M3,ZodError:()=>ab,ZodEnum:()=>a1,ZodEmoji:()=>eU,ZodEmail:()=>aU,ZodE164:()=>X_,ZodDiscriminatedUnion:()=>G3,ZodDefault:()=>L3,ZodDate:()=>V0,ZodCustomStringFormat:()=>s1,ZodCustom:()=>L0,ZodCodec:()=>M_,ZodCatch:()=>j3,ZodCUID2:()=>I_,ZodCUID:()=>$_,ZodCIDRv6:()=>J_,ZodCIDRv4:()=>v_,ZodBoolean:()=>II,ZodBigIntFormat:()=>Q_,ZodBigInt:()=>uI,ZodBase64URL:()=>G_,ZodBase64:()=>N_,ZodArray:()=>J3,ZodAny:()=>_3,TimePrecision:()=>TN,NEVER:()=>eg,$output:()=>JN,$input:()=>NN,$brand:()=>sg});var d4={};A4(d4,{version:()=>gv,util:()=>w,treeifyError:()=>Nz,toJSONSchema:()=>rU,toDotPath:()=>H5,safeParseAsync:()=>qz,safeParse:()=>Xz,safeEncodeAsync:()=>uA,safeEncode:()=>$A,safeDecodeAsync:()=>UA,safeDecode:()=>IA,registry:()=>QU,regexes:()=>X4,process:()=>_$,prettifyError:()=>Gz,parseAsync:()=>hu,parse:()=>mu,meta:()=>pN,locales:()=>G0,isValidJWT:()=>E5,isValidBase64URL:()=>w5,isValidBase64:()=>Zv,initializeContext:()=>B6,globalRegistry:()=>w$,globalConfig:()=>mI,formatError:()=>sI,flattenError:()=>eI,finalize:()=>R6,extractDefs:()=>M6,encodeAsync:()=>eZ,encode:()=>tZ,describe:()=>dN,decodeAsync:()=>sZ,decode:()=>aZ,createToJSONSchemaMethod:()=>tN,createStandardJSONSchemaMethod:()=>o1,config:()=>R$,clone:()=>n$,_xor:()=>Zb,_xid:()=>LU,_void:()=>kN,_uuidv7:()=>DU,_uuidv6:()=>OU,_uuidv4:()=>YU,_uuid:()=>HU,_url:()=>q0,_uppercase:()=>k1,_unknown:()=>fN,_union:()=>Wb,_undefined:()=>wN,_ulid:()=>KU,_uint64:()=>FN,_uint32:()=>PN,_tuple:()=>jb,_trim:()=>m1,_transform:()=>xb,_toUpperCase:()=>c1,_toLowerCase:()=>h1,_templateLiteral:()=>cb,_symbol:()=>SN,_superRefine:()=>cN,_success:()=>rb,_stringbool:()=>oN,_stringFormat:()=>p1,_string:()=>XN,_startsWith:()=>i1,_slugify:()=>d1,_size:()=>c6,_set:()=>wb,_safeParseAsync:()=>w1,_safeParse:()=>S1,_safeEncodeAsync:()=>eu,_safeEncode:()=>tu,_safeDecodeAsync:()=>su,_safeDecode:()=>au,_regex:()=>f1,_refine:()=>hN,_record:()=>Fb,_readonly:()=>hb,_property:()=>kU,_promise:()=>pb,_positive:()=>EU,_pipe:()=>mb,_parseAsync:()=>F1,_parse:()=>j1,_overwrite:()=>D4,_optional:()=>kb,_number:()=>VN,_nullable:()=>yb,_null:()=>EN,_normalize:()=>l1,_nonpositive:()=>fU,_nonoptional:()=>nb,_nonnegative:()=>xU,_never:()=>xN,_negative:()=>CU,_nativeEnum:()=>Cb,_nanoid:()=>BU,_nan:()=>nN,_multipleOf:()=>D6,_minSize:()=>E4,_minLength:()=>c4,_min:()=>r$,_mime:()=>r1,_maxSize:()=>V6,_maxLength:()=>d6,_max:()=>I4,_map:()=>Sb,_mac:()=>QN,_lte:()=>I4,_lt:()=>S4,_lowercase:()=>x1,_literal:()=>fb,_length:()=>p6,_lazy:()=>db,_ksuid:()=>PU,_jwt:()=>wU,_isoTime:()=>ON,_isoDuration:()=>DN,_isoDateTime:()=>HN,_isoDate:()=>YN,_ipv6:()=>ZU,_ipv4:()=>WU,_intersection:()=>bb,_int64:()=>jN,_int32:()=>LN,_int:()=>MN,_includes:()=>y1,_guid:()=>X0,_gte:()=>r$,_gt:()=>w4,_float64:()=>KN,_float32:()=>RN,_file:()=>lN,_enum:()=>Eb,_endsWith:()=>n1,_encodeAsync:()=>pu,_encode:()=>cu,_emoji:()=>VU,_email:()=>TU,_e164:()=>SU,_discriminatedUnion:()=>Ab,_default:()=>ib,_decodeAsync:()=>ou,_decode:()=>du,_date:()=>yN,_custom:()=>mN,_cuid2:()=>RU,_cuid:()=>MU,_coercedString:()=>qN,_coercedNumber:()=>BN,_coercedDate:()=>iN,_coercedBoolean:()=>ZN,_coercedBigint:()=>bN,_cidrv6:()=>bU,_cidrv4:()=>AU,_check:()=>l5,_catch:()=>lb,_boolean:()=>WN,_bigint:()=>AN,_base64url:()=>FU,_base64:()=>jU,_array:()=>rN,_any:()=>CN,TimePrecision:()=>TN,NEVER:()=>eg,JSONSchemaGenerator:()=>E8,JSONSchema:()=>m5,Doc:()=>UU,$output:()=>JN,$input:()=>NN,$constructor:()=>D,$brand:()=>sg,$ZodXor:()=>hv,$ZodXID:()=>Yv,$ZodVoid:()=>nv,$ZodUnknown:()=>yv,$ZodUnion:()=>_0,$ZodUndefined:()=>fv,$ZodUUID:()=>Jv,$ZodURL:()=>Gv,$ZodULID:()=>Hv,$ZodType:()=>l,$ZodTuple:()=>XU,$ZodTransform:()=>$J,$ZodTemplateLiteral:()=>XJ,$ZodSymbol:()=>Cv,$ZodSuccess:()=>zJ,$ZodStringFormat:()=>v$,$ZodString:()=>h6,$ZodSet:()=>tv,$ZodRegistry:()=>GN,$ZodRecord:()=>pv,$ZodRealError:()=>o$,$ZodReadonly:()=>GJ,$ZodPromise:()=>QJ,$ZodPrefault:()=>_J,$ZodPipe:()=>NJ,$ZodOptional:()=>qU,$ZodObjectJIT:()=>mv,$ZodObject:()=>x5,$ZodNumberFormat:()=>wv,$ZodNumber:()=>NU,$ZodNullable:()=>uJ,$ZodNull:()=>xv,$ZodNonOptional:()=>gJ,$ZodNever:()=>iv,$ZodNanoID:()=>qv,$ZodNaN:()=>JJ,$ZodMap:()=>ov,$ZodMAC:()=>Lv,$ZodLiteral:()=>ev,$ZodLazy:()=>TJ,$ZodKSUID:()=>Ov,$ZodJWT:()=>Fv,$ZodIntersection:()=>dv,$ZodISOTime:()=>Bv,$ZodISODuration:()=>Mv,$ZodISODateTime:()=>Dv,$ZodISODate:()=>Vv,$ZodIPv6:()=>Kv,$ZodIPv4:()=>Rv,$ZodGUID:()=>vv,$ZodFunction:()=>qJ,$ZodFile:()=>sv,$ZodExactOptional:()=>IJ,$ZodError:()=>aI,$ZodEnum:()=>av,$ZodEncodeError:()=>r6,$ZodEmoji:()=>Xv,$ZodEmail:()=>Nv,$ZodE164:()=>jv,$ZodDiscriminatedUnion:()=>cv,$ZodDefault:()=>UJ,$ZodDate:()=>rv,$ZodCustomStringFormat:()=>Sv,$ZodCustom:()=>HJ,$ZodCodec:()=>g0,$ZodCheckUpperCase:()=>ez,$ZodCheckStringFormat:()=>E1,$ZodCheckStartsWith:()=>$v,$ZodCheckSizeEquals:()=>cz,$ZodCheckRegex:()=>tz,$ZodCheckProperty:()=>uv,$ZodCheckOverwrite:()=>_v,$ZodCheckNumberFormat:()=>rz,$ZodCheckMultipleOf:()=>nz,$ZodCheckMinSize:()=>hz,$ZodCheckMinLength:()=>pz,$ZodCheckMimeType:()=>Uv,$ZodCheckMaxSize:()=>mz,$ZodCheckMaxLength:()=>dz,$ZodCheckLowerCase:()=>az,$ZodCheckLessThan:()=>IU,$ZodCheckLengthEquals:()=>oz,$ZodCheckIncludes:()=>sz,$ZodCheckGreaterThan:()=>uU,$ZodCheckEndsWith:()=>Iv,$ZodCheckBigIntFormat:()=>lz,$ZodCheck:()=>G$,$ZodCatch:()=>vJ,$ZodCUID2:()=>Tv,$ZodCUID:()=>Qv,$ZodCIDRv6:()=>Wv,$ZodCIDRv4:()=>Pv,$ZodBoolean:()=>U0,$ZodBigIntFormat:()=>Ev,$ZodBigInt:()=>GU,$ZodBase64URL:()=>bv,$ZodBase64:()=>Av,$ZodAsyncError:()=>F4,$ZodArray:()=>lv,$ZodAny:()=>kv});var eg=Object.freeze({status:"aborted"});function D($,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 sg=Symbol("zod_brand");class F4 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class r6 extends Error{constructor($){super(`Encountered unidirectional transform during encode: ${$}`);this.name="ZodEncodeError"}}var mI={};function R$($){if($)Object.assign(mI,$);return mI}var w={};A4(w,{unwrapMessage:()=>hI,uint8ArrayToHex:()=>pZ,uint8ArrayToBase64url:()=>cZ,uint8ArrayToBase64:()=>q5,stringifyPrimitive:()=>j,slugify:()=>uz,shallowClone:()=>_z,safeExtend:()=>iZ,required:()=>lZ,randomString:()=>wZ,propertyKeyTypes:()=>pI,promiseAllObject:()=>SZ,primitiveTypes:()=>gz,prefixIssues:()=>$4,pick:()=>xZ,partial:()=>rZ,parsedType:()=>S,optionalKeys:()=>zz,omit:()=>kZ,objectClone:()=>bZ,numKeys:()=>EZ,nullish:()=>T6,normalizeParams:()=>C,mergeDefs:()=>h4,merge:()=>nZ,jsonStringifyReplacer:()=>Z1,joinValues:()=>L,issue:()=>b1,isPlainObject:()=>Y6,isObject:()=>l6,hexToUint8Array:()=>dZ,getSizableOrigin:()=>oI,getParsedType:()=>CZ,getLengthableOrigin:()=>tI,getEnumValues:()=>cI,getElementAtPath:()=>FZ,floatSafeRemainder:()=>Iz,finalizeIssue:()=>p$,extend:()=>yZ,escapeRegex:()=>G4,esc:()=>ru,defineLazy:()=>p,createTransparentProxy:()=>fZ,cloneDef:()=>jZ,clone:()=>n$,cleanRegex:()=>dI,cleanEnum:()=>mZ,captureStackTrace:()=>lu,cached:()=>A1,base64urlToUint8Array:()=>hZ,base64ToUint8Array:()=>X5,assignProp:()=>H6,assertNotEqual:()=>PZ,assertNever:()=>ZZ,assertIs:()=>WZ,assertEqual:()=>LZ,assert:()=>AZ,allowsEval:()=>Uz,aborted:()=>O6,NUMBER_FORMAT_RANGES:()=>vz,Class:()=>Q5,BIGINT_FORMAT_RANGES:()=>Jz});function LZ($){return $}function PZ($){return $}function WZ($){}function ZZ($){throw Error("Unexpected value in exhaustive check")}function AZ($){}function cI($){let I=Object.values($).filter((_)=>typeof _==="number");return Object.entries($).filter(([_,u])=>I.indexOf(+_)===-1).map(([_,u])=>u)}function L($,I="|"){return $.map((U)=>j(U)).join(I)}function Z1($,I){if(typeof I==="bigint")return I.toString();return I}function A1($){return{get value(){{let U=$();return Object.defineProperty(this,"value",{value:U}),U}throw Error("cached value already set")}}}function T6($){return $===null||$===void 0}function dI($){let I=$.startsWith("^")?1:0,U=$.endsWith("$")?$.length-1:$.length;return $.slice(I,U)}function Iz($,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 G5=Symbol("evaluating");function p($,I,U){let _=void 0;Object.defineProperty($,I,{get(){if(_===G5)return;if(_===void 0)_=G5,_=U();return _},set(u){Object.defineProperty($,I,{value:u})},configurable:!0})}function bZ($){return Object.create(Object.getPrototypeOf($),Object.getOwnPropertyDescriptors($))}function H6($,I,U){Object.defineProperty($,I,{value:U,writable:!0,enumerable:!0,configurable:!0})}function h4(...$){let I={};for(let U of $){let _=Object.getOwnPropertyDescriptors(U);Object.assign(I,_)}return Object.defineProperties({},I)}function jZ($){return h4($._zod.def)}function FZ($,I){if(!I)return $;return I.reduce((U,_)=>U?.[_],$)}function SZ($){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 wZ($=10){let U="";for(let _=0;_<$;_++)U+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return U}function ru($){return JSON.stringify($)}function uz($){return $.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var lu="captureStackTrace"in Error?Error.captureStackTrace:(...$)=>{};function l6($){return typeof $==="object"&&$!==null&&!Array.isArray($)}var Uz=A1(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch($){return!1}});function Y6($){if(l6($)===!1)return!1;let I=$.constructor;if(I===void 0)return!0;if(typeof I!=="function")return!0;let U=I.prototype;if(l6(U)===!1)return!1;if(Object.prototype.hasOwnProperty.call(U,"isPrototypeOf")===!1)return!1;return!0}function _z($){if(Y6($))return{...$};if(Array.isArray($))return[...$];return $}function EZ($){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}`)}},pI=new Set(["string","number","symbol"]),gz=new Set(["string","number","bigint","boolean","symbol","undefined"]);function G4($){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 fZ($){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 zz($){return Object.keys($).filter((I)=>{return $[I]._zod.optin==="optional"&&$[I]._zod.optout==="optional"})}var vz={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]},Jz={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function xZ($,I){let U=$._zod.def,_=U.checks;if(_&&_.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let g=h4($._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 H6(this,"shape",z),z},checks:[]});return n$($,g)}function kZ($,I){let U=$._zod.def,_=U.checks;if(_&&_.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let g=h4($._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 H6(this,"shape",z),z},checks:[]});return n$($,g)}function yZ($,I){if(!Y6(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=h4($._zod.def,{get shape(){let g={...$._zod.def.shape,...I};return H6(this,"shape",g),g}});return n$($,u)}function iZ($,I){if(!Y6(I))throw Error("Invalid input to safeExtend: expected a plain object");let U=h4($._zod.def,{get shape(){let _={...$._zod.def.shape,...I};return H6(this,"shape",_),_}});return n$($,U)}function nZ($,I){let U=h4($._zod.def,{get shape(){let _={...$._zod.def.shape,...I._zod.def.shape};return H6(this,"shape",_),_},get catchall(){return I._zod.def.catchall},checks:[]});return n$($,U)}function rZ($,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=h4(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 H6(this,"shape",J),J},checks:[]});return n$(I,z)}function lZ($,I,U){let _=h4(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 H6(this,"shape",g),g}});return n$(I,_)}function O6($,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 hI($){return typeof $==="string"?$:$?.message}function p$($,I,U){let _={...$,path:$.path??[]};if(!$.message){let u=hI($.inst?._zod.def?.error?.($))??hI(I?.error?.($))??hI(U.customError?.($))??hI(U.localeError?.($))??"Invalid input";_.message=u}if(delete _.inst,delete _.continue,!I?.reportInput)delete _.input;return _}function oI($){if($ instanceof Set)return"set";if($ instanceof Map)return"map";if($ instanceof File)return"file";return"unknown"}function tI($){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 b1(...$){let[I,U,_]=$;if(typeof I==="string")return{message:I,code:"custom",input:U,inst:_};return{...I}}function mZ($){return Object.entries($).filter(([I,U])=>{return Number.isNaN(Number.parseInt(I,10))}).map((I)=>I[1])}function X5($){let I=atob($),U=new Uint8Array(I.length);for(let _=0;_<I.length;_++)U[_]=I.charCodeAt(_);return U}function q5($){let I="";for(let U=0;U<$.length;U++)I+=String.fromCharCode($[U]);return btoa(I)}function hZ($){let I=$.replace(/-/g,"+").replace(/_/g,"/"),U="=".repeat((4-I.length%4)%4);return X5(I+U)}function cZ($){return q5($).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function dZ($){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 pZ($){return Array.from($).map((I)=>I.toString(16).padStart(2,"0")).join("")}class Q5{constructor(...$){}}var T5=($,I)=>{$.name="$ZodError",Object.defineProperty($,"_zod",{value:$._zod,enumerable:!1}),Object.defineProperty($,"issues",{value:I,enumerable:!1}),$.message=JSON.stringify(I,Z1,2),Object.defineProperty($,"toString",{value:()=>$.message,enumerable:!1})},aI=D("$ZodError",T5),o$=D("$ZodError",T5,{Parent:Error});function eI($,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 sI($,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 Nz($,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 H5($){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 Gz($){let I=[],U=[...$.issues].sort((_,u)=>(_.path??[]).length-(u.path??[]).length);for(let _ of U)if(I.push(`✖ ${_.message}`),_.path?.length)I.push(` → at ${H5(_.path)}`);return I.join(`
|
|
273
|
-
`)}var j1=($)=>(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 F4;if(z.issues.length){let v=new(u?.Err??$)(z.issues.map((J)=>p$(J,g,R$())));throw lu(v,u?.callee),v}return z.value},mu=j1(o$),F1=($)=>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)=>p$(J,g,R$())));throw lu(v,u?.callee),v}return z.value},hu=F1(o$),S1=($)=>(I,U,_)=>{let u=_?{..._,async:!1}:{async:!1},g=I._zod.run({value:U,issues:[]},u);if(g instanceof Promise)throw new F4;return g.issues.length?{success:!1,error:new($??aI)(g.issues.map((z)=>p$(z,u,R$())))}:{success:!0,data:g.value}},Xz=S1(o$),w1=($)=>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)=>p$(z,u,R$())))}:{success:!0,data:g.value}},qz=w1(o$),cu=($)=>(I,U,_)=>{let u=_?Object.assign(_,{direction:"backward"}):{direction:"backward"};return j1($)(I,U,u)},tZ=cu(o$),du=($)=>(I,U,_)=>{return j1($)(I,U,_)},aZ=du(o$),pu=($)=>async(I,U,_)=>{let u=_?Object.assign(_,{direction:"backward"}):{direction:"backward"};return F1($)(I,U,u)},eZ=pu(o$),ou=($)=>async(I,U,_)=>{return F1($)(I,U,_)},sZ=ou(o$),tu=($)=>(I,U,_)=>{let u=_?Object.assign(_,{direction:"backward"}):{direction:"backward"};return S1($)(I,U,u)},$A=tu(o$),au=($)=>(I,U,_)=>{return S1($)(I,U,_)},IA=au(o$),eu=($)=>async(I,U,_)=>{let u=_?Object.assign(_,{direction:"backward"}):{direction:"backward"};return w1($)(I,U,u)},uA=eu(o$),su=($)=>async(I,U,_)=>{return w1($)(I,U,_)},UA=su(o$);var X4={};A4(X4,{xid:()=>Yz,uuid7:()=>vA,uuid6:()=>zA,uuid4:()=>gA,uuid:()=>m6,uppercase:()=>iz,unicodeEmail:()=>Y5,undefined:()=>kz,ulid:()=>Hz,time:()=>Fz,string:()=>wz,sha512_hex:()=>AA,sha512_base64url:()=>jA,sha512_base64:()=>bA,sha384_hex:()=>PA,sha384_base64url:()=>ZA,sha384_base64:()=>WA,sha256_hex:()=>RA,sha256_base64url:()=>LA,sha256_base64:()=>KA,sha1_hex:()=>VA,sha1_base64url:()=>MA,sha1_base64:()=>BA,rfc5322Email:()=>NA,number:()=>$0,null:()=>xz,nanoid:()=>Dz,md5_hex:()=>YA,md5_base64url:()=>DA,md5_base64:()=>OA,mac:()=>Pz,lowercase:()=>yz,ksuid:()=>Oz,ipv6:()=>Lz,ipv4:()=>Kz,integer:()=>Cz,idnEmail:()=>GA,html5Email:()=>JA,hostname:()=>QA,hex:()=>HA,guid:()=>Bz,extendedDuration:()=>_A,emoji:()=>Rz,email:()=>Mz,e164:()=>bz,duration:()=>Vz,domain:()=>TA,datetime:()=>Sz,date:()=>jz,cuid2:()=>Tz,cuid:()=>Qz,cidrv6:()=>Zz,cidrv4:()=>Wz,browserEmail:()=>XA,boolean:()=>fz,bigint:()=>Ez,base64url:()=>$U,base64:()=>Az});var Qz=/^[cC][^\s-]{8,}$/,Tz=/^[0-9a-z]+$/,Hz=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Yz=/^[0-9a-vA-V]{20}$/,Oz=/^[A-Za-z0-9]{27}$/,Dz=/^[a-zA-Z0-9_-]{21}$/,Vz=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,_A=/^[-+]?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)?)??$/,Bz=/^([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})$/,m6=($)=>{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})$`)},gA=m6(4),zA=m6(6),vA=m6(7),Mz=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,JA=/^[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])?)*$/,NA=/^(([^<>()\[\]\\.,;:\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,}))$/,Y5=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,GA=Y5,XA=/^[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])?)*$/,qA="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Rz(){return new RegExp(qA,"u")}var Kz=/^(?:(?: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])$/,Lz=/^(([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}|:))$/,Pz=($)=>{let I=G4($??":");return new RegExp(`^(?:[0-9A-F]{2}${I}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${I}){5}[0-9a-f]{2}$`)},Wz=/^((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])$/,Zz=/^(([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])$/,Az=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,$U=/^[A-Za-z0-9_-]*$/,QA=/^(?=.{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])?)*\.?$/,TA=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,bz=/^\+[1-9]\d{6,14}$/,O5="(?:(?:\\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])))",jz=new RegExp(`^${O5}$`);function D5($){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 Fz($){return new RegExp(`^${D5($)}$`)}function Sz($){let I=D5({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(`^${O5}T(?:${_})$`)}var wz=($)=>{let I=$?`[\\s\\S]{${$?.minimum??0},${$?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${I}$`)},Ez=/^-?\d+n?$/,Cz=/^-?\d+$/,$0=/^-?\d+(?:\.\d+)?$/,fz=/^(?:true|false)$/i,xz=/^null$/i;var kz=/^undefined$/i;var yz=/^[^A-Z]*$/,iz=/^[^a-z]*$/,HA=/^[0-9a-fA-F]*$/;function I0($,I){return new RegExp(`^[A-Za-z0-9+/]{${$}}${I}$`)}function u0($){return new RegExp(`^[A-Za-z0-9_-]{${$}}$`)}var YA=/^[0-9a-fA-F]{32}$/,OA=I0(22,"=="),DA=u0(22),VA=/^[0-9a-fA-F]{40}$/,BA=I0(27,"="),MA=u0(27),RA=/^[0-9a-fA-F]{64}$/,KA=I0(43,"="),LA=u0(43),PA=/^[0-9a-fA-F]{96}$/,WA=I0(64,""),ZA=u0(64),AA=/^[0-9a-fA-F]{128}$/,bA=I0(86,"=="),jA=u0(86);var G$=D("$ZodCheck",($,I)=>{var U;$._zod??($._zod={}),$._zod.def=I,(U=$._zod).onattach??(U.onattach=[])}),B5={number:"number",bigint:"bigint",object:"date"},IU=D("$ZodCheckLessThan",($,I)=>{G$.init($,I);let U=B5[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})}}),uU=D("$ZodCheckGreaterThan",($,I)=>{G$.init($,I);let U=B5[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})}}),nz=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):Iz(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})}}),rz=D("$ZodCheckNumberFormat",($,I)=>{G$.init($,I),I.format=I.format||"float64";let U=I.format?.includes("int"),_=U?"int":"number",[u,g]=vz[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=Cz}),$._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})}}),lz=D("$ZodCheckBigIntFormat",($,I)=>{G$.init($,I);let[U,_]=Jz[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})}}),mz=D("$ZodCheckMaxSize",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!T6(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:oI(u),code:"too_big",maximum:I.maximum,inclusive:!0,input:u,inst:$,continue:!I.abort})}}),hz=D("$ZodCheckMinSize",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!T6(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:oI(u),code:"too_small",minimum:I.minimum,inclusive:!0,input:u,inst:$,continue:!I.abort})}}),cz=D("$ZodCheckSizeEquals",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!T6(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:oI(u),...z?{code:"too_big",maximum:I.size}:{code:"too_small",minimum:I.size},inclusive:!0,exact:!0,input:_.value,inst:$,continue:!I.abort})}}),dz=D("$ZodCheckMaxLength",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!T6(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=tI(u);_.issues.push({origin:z,code:"too_big",maximum:I.maximum,inclusive:!0,input:u,inst:$,continue:!I.abort})}}),pz=D("$ZodCheckMinLength",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!T6(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=tI(u);_.issues.push({origin:z,code:"too_small",minimum:I.minimum,inclusive:!0,input:u,inst:$,continue:!I.abort})}}),oz=D("$ZodCheckLengthEquals",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!T6(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=tI(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})}}),E1=D("$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=()=>{})}),tz=D("$ZodCheckRegex",($,I)=>{E1.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})}}),az=D("$ZodCheckLowerCase",($,I)=>{I.pattern??(I.pattern=yz),E1.init($,I)}),ez=D("$ZodCheckUpperCase",($,I)=>{I.pattern??(I.pattern=iz),E1.init($,I)}),sz=D("$ZodCheckIncludes",($,I)=>{G$.init($,I);let U=G4(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})}}),$v=D("$ZodCheckStartsWith",($,I)=>{G$.init($,I);let U=new RegExp(`^${G4(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})}}),Iv=D("$ZodCheckEndsWith",($,I)=>{G$.init($,I);let U=new RegExp(`.*${G4(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 V5($,I,U){if($.issues.length)I.issues.push(...$4(U,$.issues))}var uv=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)=>V5(u,U,I.property));V5(_,U,I.property);return}}),Uv=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})}}),_v=D("$ZodCheckOverwrite",($,I)=>{G$.init($,I),$._zod.check=(U)=>{U.value=I.tx(U.value)}});class UU{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(`
|
|
297
|
+
`+U)}function Y1($,I,U,_,u,g){if($.listenerCount("wsClientError")){let z=Error(u);Error.captureStackTrace(z,Y1),$.emit("wsClientError",z,U,I)}else c0(U,_,u,g)}});var vX=q$(zX(),1),{program:Ix,createCommand:ux,createArgument:Ux,createOption:_x,CommanderError:gx,InvalidArgumentError:zx,InvalidOptionArgumentError:vx,Command:r2,Argument:Jx,Option:Nx,Help:Gx}=vX.default;Iz();var n=q$(b$(),1);import{execSync as Lj,spawn as a3}from"node:child_process";import y from"node:fs";import{tmpdir as W_}from"node:os";import I$ from"node:path";var z$={};O4(z$,{xor:()=>mQ,xid:()=>QQ,void:()=>kQ,uuidv7:()=>gQ,uuidv6:()=>_Q,uuidv4:()=>UQ,uuid:()=>uQ,util:()=>w,url:()=>zQ,uppercase:()=>i1,unknown:()=>a6,union:()=>O_,undefined:()=>fQ,ulid:()=>qQ,uint64:()=>EQ,uint32:()=>FQ,tuple:()=>D3,trim:()=>c1,treeifyError:()=>Qz,transform:()=>V_,toUpperCase:()=>p1,toLowerCase:()=>d1,toJSONSchema:()=>mU,templateLiteral:()=>U7,symbol:()=>CQ,superRefine:()=>h3,success:()=>$7,stringbool:()=>X7,stringFormat:()=>LQ,string:()=>tU,strictObject:()=>rQ,startsWith:()=>r1,slugify:()=>o1,size:()=>p6,setErrorMap:()=>Nj,set:()=>oQ,safeParseAsync:()=>c8,safeParse:()=>h8,safeEncodeAsync:()=>s8,safeEncode:()=>a8,safeDecodeAsync:()=>$3,safeDecode:()=>e8,registry:()=>HU,regexes:()=>q4,regex:()=>k1,refine:()=>m3,record:()=>V3,readonly:()=>k3,property:()=>iU,promise:()=>_7,prettifyError:()=>Tz,preprocess:()=>Q7,prefault:()=>F3,positive:()=>fU,pipe:()=>V0,partialRecord:()=>cQ,parseAsync:()=>m8,parse:()=>l8,overwrite:()=>B4,optional:()=>O0,object:()=>nQ,number:()=>u3,nullish:()=>sQ,nullable:()=>D0,null:()=>v3,normalize:()=>h1,nonpositive:()=>kU,nonoptional:()=>S3,nonnegative:()=>yU,never:()=>Y_,negative:()=>xU,nativeEnum:()=>tQ,nanoid:()=>NQ,nan:()=>I7,multipleOf:()=>B6,minSize:()=>C4,minLength:()=>d4,mime:()=>m1,meta:()=>N7,maxSize:()=>M6,maxLength:()=>o6,map:()=>pQ,mac:()=>YQ,lte:()=>u4,lt:()=>w4,lowercase:()=>y1,looseRecord:()=>dQ,looseObject:()=>lQ,locales:()=>q0,literal:()=>aQ,length:()=>t6,lazy:()=>n3,ksuid:()=>TQ,keyof:()=>iQ,jwt:()=>KQ,json:()=>q7,iso:()=>e1,ipv6:()=>OQ,ipv4:()=>HQ,intersection:()=>Y3,int64:()=>wQ,int32:()=>jQ,int:()=>aU,instanceof:()=>G7,includes:()=>n1,httpUrl:()=>vQ,hostname:()=>PQ,hex:()=>WQ,hash:()=>ZQ,guid:()=>IQ,gte:()=>r$,gt:()=>E4,globalRegistry:()=>w$,getErrorMap:()=>Gj,function:()=>g7,fromJSONSchema:()=>H7,formatError:()=>I0,float64:()=>bQ,float32:()=>AQ,flattenError:()=>$0,file:()=>eQ,exactOptional:()=>W3,enum:()=>D_,endsWith:()=>l1,encodeAsync:()=>o8,encode:()=>d8,emoji:()=>JQ,email:()=>$Q,e164:()=>RQ,discriminatedUnion:()=>hQ,describe:()=>J7,decodeAsync:()=>t8,decode:()=>p8,date:()=>yQ,custom:()=>v7,cuid2:()=>XQ,cuid:()=>GQ,core:()=>p4,config:()=>R$,coerce:()=>d3,codec:()=>u7,clone:()=>n$,cidrv6:()=>VQ,cidrv4:()=>DQ,check:()=>z7,catch:()=>C3,boolean:()=>U3,bigint:()=>SQ,base64url:()=>MQ,base64:()=>BQ,array:()=>R0,any:()=>xQ,_function:()=>g7,_default:()=>b3,_ZodString:()=>eU,ZodXor:()=>Q3,ZodXID:()=>g_,ZodVoid:()=>X3,ZodUnknown:()=>N3,ZodUnion:()=>L0,ZodUndefined:()=>g3,ZodUUID:()=>f4,ZodURL:()=>B0,ZodULID:()=>__,ZodType:()=>c,ZodTuple:()=>O3,ZodTransform:()=>L3,ZodTemplateLiteral:()=>y3,ZodSymbol:()=>_3,ZodSuccess:()=>w3,ZodStringFormat:()=>J$,ZodString:()=>$I,ZodSet:()=>M3,ZodRecord:()=>P0,ZodRealError:()=>t$,ZodReadonly:()=>x3,ZodPromise:()=>r3,ZodPrefault:()=>j3,ZodPipe:()=>R_,ZodOptional:()=>B_,ZodObject:()=>K0,ZodNumberFormat:()=>e6,ZodNumber:()=>uI,ZodNullable:()=>Z3,ZodNull:()=>z3,ZodNonOptional:()=>M_,ZodNever:()=>G3,ZodNanoID:()=>I_,ZodNaN:()=>f3,ZodMap:()=>B3,ZodMAC:()=>I3,ZodLiteral:()=>R3,ZodLazy:()=>i3,ZodKSUID:()=>z_,ZodJWT:()=>T_,ZodIssueCode:()=>Jj,ZodIntersection:()=>H3,ZodISOTime:()=>pU,ZodISODuration:()=>oU,ZodISODateTime:()=>cU,ZodISODate:()=>dU,ZodIPv6:()=>J_,ZodIPv4:()=>v_,ZodGUID:()=>Y0,ZodFunction:()=>l3,ZodFirstPartyTypeKind:()=>c3,ZodFile:()=>K3,ZodExactOptional:()=>P3,ZodError:()=>zj,ZodEnum:()=>s1,ZodEmoji:()=>$_,ZodEmail:()=>sU,ZodE164:()=>Q_,ZodDiscriminatedUnion:()=>T3,ZodDefault:()=>A3,ZodDate:()=>M0,ZodCustomStringFormat:()=>II,ZodCustom:()=>W0,ZodCodec:()=>K_,ZodCatch:()=>E3,ZodCUID2:()=>U_,ZodCUID:()=>u_,ZodCIDRv6:()=>G_,ZodCIDRv4:()=>N_,ZodBoolean:()=>UI,ZodBigIntFormat:()=>H_,ZodBigInt:()=>_I,ZodBase64URL:()=>q_,ZodBase64:()=>X_,ZodArray:()=>q3,ZodAny:()=>J3,TimePrecision:()=>DN,NEVER:()=>uz,$output:()=>qN,$input:()=>QN,$brand:()=>Uz});var p4={};O4(p4,{version:()=>Nv,util:()=>w,treeifyError:()=>Qz,toJSONSchema:()=>mU,toDotPath:()=>K5,safeParseAsync:()=>Yz,safeParse:()=>Hz,safeEncodeAsync:()=>XA,safeEncode:()=>NA,safeDecodeAsync:()=>qA,safeDecode:()=>GA,registry:()=>HU,regexes:()=>q4,process:()=>_$,prettifyError:()=>Tz,parseAsync:()=>du,parse:()=>cu,meta:()=>eN,locales:()=>q0,isValidJWT:()=>r5,isValidBase64URL:()=>n5,isValidBase64:()=>Fv,initializeContext:()=>R6,globalRegistry:()=>w$,globalConfig:()=>cI,formatError:()=>I0,flattenError:()=>$0,finalize:()=>L6,extractDefs:()=>K6,encodeAsync:()=>vA,encode:()=>gA,describe:()=>aN,decodeAsync:()=>JA,decode:()=>zA,createToJSONSchemaMethod:()=>$8,createStandardJSONSchemaMethod:()=>a1,config:()=>R$,clone:()=>n$,_xor:()=>fb,_xid:()=>WU,_void:()=>rN,_uuidv7:()=>BU,_uuidv6:()=>VU,_uuidv4:()=>DU,_uuid:()=>OU,_url:()=>T0,_uppercase:()=>i1,_unknown:()=>iN,_union:()=>Cb,_undefined:()=>xN,_ulid:()=>PU,_uint64:()=>CN,_uint32:()=>bN,_tuple:()=>yb,_trim:()=>c1,_transform:()=>cb,_toUpperCase:()=>p1,_toLowerCase:()=>d1,_templateLiteral:()=>Ij,_symbol:()=>fN,_superRefine:()=>tN,_success:()=>ab,_stringbool:()=>sN,_stringFormat:()=>t1,_string:()=>HN,_startsWith:()=>r1,_slugify:()=>o1,_size:()=>p6,_set:()=>rb,_safeParseAsync:()=>C1,_safeParse:()=>E1,_safeEncodeAsync:()=>$U,_safeEncode:()=>eu,_safeDecodeAsync:()=>IU,_safeDecode:()=>su,_regex:()=>k1,_refine:()=>oN,_record:()=>ib,_readonly:()=>$j,_property:()=>iU,_promise:()=>Uj,_positive:()=>fU,_pipe:()=>sb,_parseAsync:()=>w1,_parse:()=>S1,_overwrite:()=>B4,_optional:()=>db,_number:()=>KN,_nullable:()=>pb,_null:()=>kN,_normalize:()=>h1,_nonpositive:()=>kU,_nonoptional:()=>tb,_nonnegative:()=>yU,_never:()=>nN,_negative:()=>xU,_nativeEnum:()=>mb,_nanoid:()=>RU,_nan:()=>hN,_multipleOf:()=>B6,_minSize:()=>C4,_minLength:()=>d4,_min:()=>r$,_mime:()=>m1,_maxSize:()=>M6,_maxLength:()=>o6,_max:()=>u4,_map:()=>nb,_mac:()=>ON,_lte:()=>u4,_lt:()=>w4,_lowercase:()=>y1,_literal:()=>hb,_length:()=>t6,_lazy:()=>uj,_ksuid:()=>ZU,_jwt:()=>CU,_isoTime:()=>MN,_isoDuration:()=>RN,_isoDateTime:()=>VN,_isoDate:()=>BN,_ipv6:()=>bU,_ipv4:()=>AU,_intersection:()=>kb,_int64:()=>EN,_int32:()=>AN,_int:()=>PN,_includes:()=>n1,_guid:()=>Q0,_gte:()=>r$,_gt:()=>E4,_float64:()=>ZN,_float32:()=>WN,_file:()=>dN,_enum:()=>lb,_endsWith:()=>l1,_encodeAsync:()=>tu,_encode:()=>pu,_emoji:()=>MU,_email:()=>YU,_e164:()=>EU,_discriminatedUnion:()=>xb,_default:()=>ob,_decodeAsync:()=>au,_decode:()=>ou,_date:()=>lN,_custom:()=>pN,_cuid2:()=>LU,_cuid:()=>KU,_coercedString:()=>YN,_coercedNumber:()=>LN,_coercedDate:()=>mN,_coercedBoolean:()=>FN,_coercedBigint:()=>wN,_cidrv6:()=>FU,_cidrv4:()=>jU,_check:()=>a5,_catch:()=>eb,_boolean:()=>jN,_bigint:()=>SN,_base64url:()=>wU,_base64:()=>SU,_array:()=>cN,_any:()=>yN,TimePrecision:()=>DN,NEVER:()=>uz,JSONSchemaGenerator:()=>k8,JSONSchema:()=>e5,Doc:()=>gU,$output:()=>qN,$input:()=>QN,$constructor:()=>D,$brand:()=>Uz,$ZodXor:()=>ov,$ZodXID:()=>Bv,$ZodVoid:()=>hv,$ZodUnknown:()=>lv,$ZodUnion:()=>z0,$ZodUndefined:()=>iv,$ZodUUID:()=>qv,$ZodURL:()=>Tv,$ZodULID:()=>Vv,$ZodType:()=>l,$ZodTuple:()=>QU,$ZodTransform:()=>_J,$ZodTemplateLiteral:()=>HJ,$ZodSymbol:()=>yv,$ZodSuccess:()=>GJ,$ZodStringFormat:()=>v$,$ZodString:()=>d6,$ZodSet:()=>$J,$ZodRegistry:()=>TN,$ZodRecord:()=>ev,$ZodRealError:()=>o$,$ZodReadonly:()=>TJ,$ZodPromise:()=>OJ,$ZodPrefault:()=>JJ,$ZodPipe:()=>QJ,$ZodOptional:()=>TU,$ZodObjectJIT:()=>pv,$ZodObject:()=>h5,$ZodNumberFormat:()=>xv,$ZodNumber:()=>XU,$ZodNullable:()=>zJ,$ZodNull:()=>nv,$ZodNonOptional:()=>NJ,$ZodNever:()=>mv,$ZodNanoID:()=>Yv,$ZodNaN:()=>qJ,$ZodMap:()=>sv,$ZodMAC:()=>Av,$ZodLiteral:()=>uJ,$ZodLazy:()=>DJ,$ZodKSUID:()=>Mv,$ZodJWT:()=>Cv,$ZodIntersection:()=>av,$ZodISOTime:()=>Lv,$ZodISODuration:()=>Pv,$ZodISODateTime:()=>Rv,$ZodISODate:()=>Kv,$ZodIPv6:()=>Zv,$ZodIPv4:()=>Wv,$ZodGUID:()=>Xv,$ZodFunction:()=>YJ,$ZodFile:()=>UJ,$ZodExactOptional:()=>gJ,$ZodError:()=>sI,$ZodEnum:()=>IJ,$ZodEncodeError:()=>m6,$ZodEmoji:()=>Hv,$ZodEmail:()=>Qv,$ZodE164:()=>Ev,$ZodDiscriminatedUnion:()=>tv,$ZodDefault:()=>vJ,$ZodDate:()=>cv,$ZodCustomStringFormat:()=>fv,$ZodCustom:()=>VJ,$ZodCodec:()=>v0,$ZodCheckUpperCase:()=>uv,$ZodCheckStringFormat:()=>f1,$ZodCheckStartsWith:()=>_v,$ZodCheckSizeEquals:()=>tz,$ZodCheckRegex:()=>$v,$ZodCheckProperty:()=>zv,$ZodCheckOverwrite:()=>Jv,$ZodCheckNumberFormat:()=>cz,$ZodCheckMultipleOf:()=>hz,$ZodCheckMinSize:()=>oz,$ZodCheckMinLength:()=>ez,$ZodCheckMimeType:()=>vv,$ZodCheckMaxSize:()=>pz,$ZodCheckMaxLength:()=>az,$ZodCheckLowerCase:()=>Iv,$ZodCheckLessThan:()=>UU,$ZodCheckLengthEquals:()=>sz,$ZodCheckIncludes:()=>Uv,$ZodCheckGreaterThan:()=>_U,$ZodCheckEndsWith:()=>gv,$ZodCheckBigIntFormat:()=>dz,$ZodCheck:()=>G$,$ZodCatch:()=>XJ,$ZodCUID2:()=>Dv,$ZodCUID:()=>Ov,$ZodCIDRv6:()=>jv,$ZodCIDRv4:()=>bv,$ZodBoolean:()=>g0,$ZodBigIntFormat:()=>kv,$ZodBigInt:()=>qU,$ZodBase64URL:()=>wv,$ZodBase64:()=>Sv,$ZodAsyncError:()=>S4,$ZodArray:()=>dv,$ZodAny:()=>rv});var uz=Object.freeze({status:"aborted"});function D($,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 Uz=Symbol("zod_brand");class S4 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class m6 extends Error{constructor($){super(`Encountered unidirectional transform during encode: ${$}`);this.name="ZodEncodeError"}}var cI={};function R$($){if($)Object.assign(cI,$);return cI}var w={};O4(w,{unwrapMessage:()=>dI,uint8ArrayToHex:()=>UA,uint8ArrayToBase64url:()=>IA,uint8ArrayToBase64:()=>B5,stringifyPrimitive:()=>j,slugify:()=>zz,shallowClone:()=>Jz,safeExtend:()=>oZ,required:()=>eZ,randomString:()=>rZ,propertyKeyTypes:()=>tI,promiseAllObject:()=>nZ,primitiveTypes:()=>Nz,prefixIssues:()=>I4,pick:()=>cZ,partial:()=>aZ,parsedType:()=>S,optionalKeys:()=>Gz,omit:()=>dZ,objectClone:()=>kZ,numKeys:()=>lZ,nullish:()=>Y6,normalizeParams:()=>C,mergeDefs:()=>c4,merge:()=>tZ,jsonStringifyReplacer:()=>b1,joinValues:()=>L,issue:()=>F1,isPlainObject:()=>D6,isObject:()=>h6,hexToUint8Array:()=>uA,getSizableOrigin:()=>aI,getParsedType:()=>mZ,getLengthableOrigin:()=>eI,getEnumValues:()=>pI,getElementAtPath:()=>iZ,floatSafeRemainder:()=>gz,finalizeIssue:()=>p$,extend:()=>pZ,escapeRegex:()=>X4,esc:()=>mu,defineLazy:()=>p,createTransparentProxy:()=>hZ,cloneDef:()=>yZ,clone:()=>n$,cleanRegex:()=>oI,cleanEnum:()=>sZ,captureStackTrace:()=>hu,cached:()=>j1,base64urlToUint8Array:()=>$A,base64ToUint8Array:()=>V5,assignProp:()=>O6,assertNotEqual:()=>EZ,assertNever:()=>fZ,assertIs:()=>CZ,assertEqual:()=>wZ,assert:()=>xZ,allowsEval:()=>vz,aborted:()=>V6,NUMBER_FORMAT_RANGES:()=>Xz,Class:()=>M5,BIGINT_FORMAT_RANGES:()=>qz});function wZ($){return $}function EZ($){return $}function CZ($){}function fZ($){throw Error("Unexpected value in exhaustive check")}function xZ($){}function pI($){let I=Object.values($).filter((_)=>typeof _==="number");return Object.entries($).filter(([_,u])=>I.indexOf(+_)===-1).map(([_,u])=>u)}function L($,I="|"){return $.map((U)=>j(U)).join(I)}function b1($,I){if(typeof I==="bigint")return I.toString();return I}function j1($){return{get value(){{let U=$();return Object.defineProperty(this,"value",{value:U}),U}throw Error("cached value already set")}}}function Y6($){return $===null||$===void 0}function oI($){let I=$.startsWith("^")?1:0,U=$.endsWith("$")?$.length-1:$.length;return $.slice(I,U)}function gz($,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 D5=Symbol("evaluating");function p($,I,U){let _=void 0;Object.defineProperty($,I,{get(){if(_===D5)return;if(_===void 0)_=D5,_=U();return _},set(u){Object.defineProperty($,I,{value:u})},configurable:!0})}function kZ($){return Object.create(Object.getPrototypeOf($),Object.getOwnPropertyDescriptors($))}function O6($,I,U){Object.defineProperty($,I,{value:U,writable:!0,enumerable:!0,configurable:!0})}function c4(...$){let I={};for(let U of $){let _=Object.getOwnPropertyDescriptors(U);Object.assign(I,_)}return Object.defineProperties({},I)}function yZ($){return c4($._zod.def)}function iZ($,I){if(!I)return $;return I.reduce((U,_)=>U?.[_],$)}function nZ($){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 rZ($=10){let U="";for(let _=0;_<$;_++)U+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return U}function mu($){return JSON.stringify($)}function zz($){return $.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var hu="captureStackTrace"in Error?Error.captureStackTrace:(...$)=>{};function h6($){return typeof $==="object"&&$!==null&&!Array.isArray($)}var vz=j1(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch($){return!1}});function D6($){if(h6($)===!1)return!1;let I=$.constructor;if(I===void 0)return!0;if(typeof I!=="function")return!0;let U=I.prototype;if(h6(U)===!1)return!1;if(Object.prototype.hasOwnProperty.call(U,"isPrototypeOf")===!1)return!1;return!0}function Jz($){if(D6($))return{...$};if(Array.isArray($))return[...$];return $}function lZ($){let I=0;for(let U in $)if(Object.prototype.hasOwnProperty.call($,U))I++;return I}var mZ=($)=>{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}`)}},tI=new Set(["string","number","symbol"]),Nz=new Set(["string","number","bigint","boolean","symbol","undefined"]);function X4($){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 hZ($){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 Gz($){return Object.keys($).filter((I)=>{return $[I]._zod.optin==="optional"&&$[I]._zod.optout==="optional"})}var Xz={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]},qz={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function cZ($,I){let U=$._zod.def,_=U.checks;if(_&&_.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let g=c4($._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 O6(this,"shape",z),z},checks:[]});return n$($,g)}function dZ($,I){let U=$._zod.def,_=U.checks;if(_&&_.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let g=c4($._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 O6(this,"shape",z),z},checks:[]});return n$($,g)}function pZ($,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=c4($._zod.def,{get shape(){let g={...$._zod.def.shape,...I};return O6(this,"shape",g),g}});return n$($,u)}function oZ($,I){if(!D6(I))throw Error("Invalid input to safeExtend: expected a plain object");let U=c4($._zod.def,{get shape(){let _={...$._zod.def.shape,...I};return O6(this,"shape",_),_}});return n$($,U)}function tZ($,I){let U=c4($._zod.def,{get shape(){let _={...$._zod.def.shape,...I._zod.def.shape};return O6(this,"shape",_),_},get catchall(){return I._zod.def.catchall},checks:[]});return n$($,U)}function aZ($,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=c4(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 O6(this,"shape",J),J},checks:[]});return n$(I,z)}function eZ($,I,U){let _=c4(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 O6(this,"shape",g),g}});return n$(I,_)}function V6($,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 I4($,I){return I.map((U)=>{var _;return(_=U).path??(_.path=[]),U.path.unshift($),U})}function dI($){return typeof $==="string"?$:$?.message}function p$($,I,U){let _={...$,path:$.path??[]};if(!$.message){let u=dI($.inst?._zod.def?.error?.($))??dI(I?.error?.($))??dI(U.customError?.($))??dI(U.localeError?.($))??"Invalid input";_.message=u}if(delete _.inst,delete _.continue,!I?.reportInput)delete _.input;return _}function aI($){if($ instanceof Set)return"set";if($ instanceof Map)return"map";if($ instanceof File)return"file";return"unknown"}function eI($){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 sZ($){return Object.entries($).filter(([I,U])=>{return Number.isNaN(Number.parseInt(I,10))}).map((I)=>I[1])}function V5($){let I=atob($),U=new Uint8Array(I.length);for(let _=0;_<I.length;_++)U[_]=I.charCodeAt(_);return U}function B5($){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 V5(I+U)}function IA($){return B5($).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function uA($){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 UA($){return Array.from($).map((I)=>I.toString(16).padStart(2,"0")).join("")}class M5{constructor(...$){}}var R5=($,I)=>{$.name="$ZodError",Object.defineProperty($,"_zod",{value:$._zod,enumerable:!1}),Object.defineProperty($,"issues",{value:I,enumerable:!1}),$.message=JSON.stringify(I,b1,2),Object.defineProperty($,"toString",{value:()=>$.message,enumerable:!1})},sI=D("$ZodError",R5),o$=D("$ZodError",R5,{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 I0($,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 Qz($,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 K5($){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 Tz($){let I=[],U=[...$.issues].sort((_,u)=>(_.path??[]).length-(u.path??[]).length);for(let _ of U)if(I.push(`✖ ${_.message}`),_.path?.length)I.push(` → at ${K5(_.path)}`);return I.join(`
|
|
298
|
+
`)}var S1=($)=>(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 S4;if(z.issues.length){let v=new(u?.Err??$)(z.issues.map((J)=>p$(J,g,R$())));throw hu(v,u?.callee),v}return z.value},cu=S1(o$),w1=($)=>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)=>p$(J,g,R$())));throw hu(v,u?.callee),v}return z.value},du=w1(o$),E1=($)=>(I,U,_)=>{let u=_?{..._,async:!1}:{async:!1},g=I._zod.run({value:U,issues:[]},u);if(g instanceof Promise)throw new S4;return g.issues.length?{success:!1,error:new($??sI)(g.issues.map((z)=>p$(z,u,R$())))}:{success:!0,data:g.value}},Hz=E1(o$),C1=($)=>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)=>p$(z,u,R$())))}:{success:!0,data:g.value}},Yz=C1(o$),pu=($)=>(I,U,_)=>{let u=_?Object.assign(_,{direction:"backward"}):{direction:"backward"};return S1($)(I,U,u)},gA=pu(o$),ou=($)=>(I,U,_)=>{return S1($)(I,U,_)},zA=ou(o$),tu=($)=>async(I,U,_)=>{let u=_?Object.assign(_,{direction:"backward"}):{direction:"backward"};return w1($)(I,U,u)},vA=tu(o$),au=($)=>async(I,U,_)=>{return w1($)(I,U,_)},JA=au(o$),eu=($)=>(I,U,_)=>{let u=_?Object.assign(_,{direction:"backward"}):{direction:"backward"};return E1($)(I,U,u)},NA=eu(o$),su=($)=>(I,U,_)=>{return E1($)(I,U,_)},GA=su(o$),$U=($)=>async(I,U,_)=>{let u=_?Object.assign(_,{direction:"backward"}):{direction:"backward"};return C1($)(I,U,u)},XA=$U(o$),IU=($)=>async(I,U,_)=>{return C1($)(I,U,_)},qA=IU(o$);var q4={};O4(q4,{xid:()=>Bz,uuid7:()=>YA,uuid6:()=>HA,uuid4:()=>TA,uuid:()=>c6,uppercase:()=>mz,unicodeEmail:()=>L5,undefined:()=>rz,ulid:()=>Vz,time:()=>Cz,string:()=>xz,sha512_hex:()=>xA,sha512_base64url:()=>yA,sha512_base64:()=>kA,sha384_hex:()=>EA,sha384_base64url:()=>fA,sha384_base64:()=>CA,sha256_hex:()=>FA,sha256_base64url:()=>wA,sha256_base64:()=>SA,sha1_hex:()=>AA,sha1_base64url:()=>jA,sha1_base64:()=>bA,rfc5322Email:()=>DA,number:()=>u0,null:()=>nz,nanoid:()=>Rz,md5_hex:()=>PA,md5_base64url:()=>ZA,md5_base64:()=>WA,mac:()=>bz,lowercase:()=>lz,ksuid:()=>Mz,ipv6:()=>Az,ipv4:()=>Zz,integer:()=>yz,idnEmail:()=>VA,html5Email:()=>OA,hostname:()=>RA,hex:()=>LA,guid:()=>Lz,extendedDuration:()=>QA,emoji:()=>Wz,email:()=>Pz,e164:()=>wz,duration:()=>Kz,domain:()=>KA,datetime:()=>fz,date:()=>Ez,cuid2:()=>Dz,cuid:()=>Oz,cidrv6:()=>Fz,cidrv4:()=>jz,browserEmail:()=>BA,boolean:()=>iz,bigint:()=>kz,base64url:()=>uU,base64:()=>Sz});var Oz=/^[cC][^\s-]{8,}$/,Dz=/^[0-9a-z]+$/,Vz=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Bz=/^[0-9a-vA-V]{20}$/,Mz=/^[A-Za-z0-9]{27}$/,Rz=/^[a-zA-Z0-9_-]{21}$/,Kz=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,QA=/^[-+]?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)?)??$/,Lz=/^([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})$/,c6=($)=>{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})$`)},TA=c6(4),HA=c6(6),YA=c6(7),Pz=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,OA=/^[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,}))$/,L5=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,VA=L5,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])?)*$/,MA="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Wz(){return new RegExp(MA,"u")}var Zz=/^(?:(?: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])$/,Az=/^(([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}|:))$/,bz=($)=>{let I=X4($??":");return new RegExp(`^(?:[0-9A-F]{2}${I}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${I}){5}[0-9a-f]{2}$`)},jz=/^((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])$/,Fz=/^(([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])$/,Sz=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,uU=/^[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])?)*\.?$/,KA=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,wz=/^\+[1-9]\d{6,14}$/,P5="(?:(?:\\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])))",Ez=new RegExp(`^${P5}$`);function W5($){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 Cz($){return new RegExp(`^${W5($)}$`)}function fz($){let I=W5({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(`^${P5}T(?:${_})$`)}var xz=($)=>{let I=$?`[\\s\\S]{${$?.minimum??0},${$?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${I}$`)},kz=/^-?\d+n?$/,yz=/^-?\d+$/,u0=/^-?\d+(?:\.\d+)?$/,iz=/^(?:true|false)$/i,nz=/^null$/i;var rz=/^undefined$/i;var lz=/^[^A-Z]*$/,mz=/^[^a-z]*$/,LA=/^[0-9a-fA-F]*$/;function U0($,I){return new RegExp(`^[A-Za-z0-9+/]{${$}}${I}$`)}function _0($){return new RegExp(`^[A-Za-z0-9_-]{${$}}$`)}var PA=/^[0-9a-fA-F]{32}$/,WA=U0(22,"=="),ZA=_0(22),AA=/^[0-9a-fA-F]{40}$/,bA=U0(27,"="),jA=_0(27),FA=/^[0-9a-fA-F]{64}$/,SA=U0(43,"="),wA=_0(43),EA=/^[0-9a-fA-F]{96}$/,CA=U0(64,""),fA=_0(64),xA=/^[0-9a-fA-F]{128}$/,kA=U0(86,"=="),yA=_0(86);var G$=D("$ZodCheck",($,I)=>{var U;$._zod??($._zod={}),$._zod.def=I,(U=$._zod).onattach??(U.onattach=[])}),A5={number:"number",bigint:"bigint",object:"date"},UU=D("$ZodCheckLessThan",($,I)=>{G$.init($,I);let U=A5[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})}}),_U=D("$ZodCheckGreaterThan",($,I)=>{G$.init($,I);let U=A5[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})}}),hz=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):gz(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})}}),cz=D("$ZodCheckNumberFormat",($,I)=>{G$.init($,I),I.format=I.format||"float64";let U=I.format?.includes("int"),_=U?"int":"number",[u,g]=Xz[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=yz}),$._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})}}),dz=D("$ZodCheckBigIntFormat",($,I)=>{G$.init($,I);let[U,_]=qz[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})}}),pz=D("$ZodCheckMaxSize",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!Y6(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:aI(u),code:"too_big",maximum:I.maximum,inclusive:!0,input:u,inst:$,continue:!I.abort})}}),oz=D("$ZodCheckMinSize",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!Y6(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:aI(u),code:"too_small",minimum:I.minimum,inclusive:!0,input:u,inst:$,continue:!I.abort})}}),tz=D("$ZodCheckSizeEquals",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!Y6(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:aI(u),...z?{code:"too_big",maximum:I.size}:{code:"too_small",minimum:I.size},inclusive:!0,exact:!0,input:_.value,inst:$,continue:!I.abort})}}),az=D("$ZodCheckMaxLength",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!Y6(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=eI(u);_.issues.push({origin:z,code:"too_big",maximum:I.maximum,inclusive:!0,input:u,inst:$,continue:!I.abort})}}),ez=D("$ZodCheckMinLength",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!Y6(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=eI(u);_.issues.push({origin:z,code:"too_small",minimum:I.minimum,inclusive:!0,input:u,inst:$,continue:!I.abort})}}),sz=D("$ZodCheckLengthEquals",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!Y6(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=eI(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})}}),f1=D("$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=D("$ZodCheckRegex",($,I)=>{f1.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})}}),Iv=D("$ZodCheckLowerCase",($,I)=>{I.pattern??(I.pattern=lz),f1.init($,I)}),uv=D("$ZodCheckUpperCase",($,I)=>{I.pattern??(I.pattern=mz),f1.init($,I)}),Uv=D("$ZodCheckIncludes",($,I)=>{G$.init($,I);let U=X4(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})}}),_v=D("$ZodCheckStartsWith",($,I)=>{G$.init($,I);let U=new RegExp(`^${X4(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})}}),gv=D("$ZodCheckEndsWith",($,I)=>{G$.init($,I);let U=new RegExp(`.*${X4(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 Z5($,I,U){if($.issues.length)I.issues.push(...I4(U,$.issues))}var zv=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)=>Z5(u,U,I.property));Z5(_,U,I.property);return}}),vv=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})}}),Jv=D("$ZodCheckOverwrite",($,I)=>{G$.init($,I),$._zod.check=(U)=>{U.value=I.tx(U.value)}});class gU{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(`
|
|
274
299
|
`).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(`
|
|
275
|
-
`))}}var gv={major:4,minor:3,patch:6};var l=D("$ZodType",($,I)=>{var U;$??($={}),$._zod.def=I,$._zod.bag=$._zod.bag||{},$._zod.version=gv;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=O6(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 F4;if(X||T instanceof Promise)X=(X??Promise.resolve()).then(async()=>{if(await T,z.issues.length===q)return;if(!N)N=O6(z,q)});else{if(z.issues.length===q)continue;if(!N)N=O6(z,q)}}if(X)return X.then(()=>{return z});return z},g=(z,v,J)=>{if(O6(z))return z.aborted=!0,z;let N=u(v,_,J);if(N instanceof Promise){if(J.async===!1)throw new F4;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 F4;return J.then((N)=>u(N,_,v))}return u(J,_,v)}}p($,"~standard",()=>({validate:(u)=>{try{let g=Xz($,u);return g.success?{value:g.data}:{issues:g.error?.issues}}catch(g){return qz($,u).then((z)=>z.success?{value:z.data}:{issues:z.error?.issues})}},vendor:"zod",version:1}))}),h6=D("$ZodString",($,I)=>{l.init($,I),$._zod.pattern=[...$?._zod.bag?.patterns??[]].pop()??wz($._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)=>{E1.init($,I),h6.init($,I)}),vv=D("$ZodGUID",($,I)=>{I.pattern??(I.pattern=Bz),v$.init($,I)}),Jv=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=m6(_))}else I.pattern??(I.pattern=m6());v$.init($,I)}),Nv=D("$ZodEmail",($,I)=>{I.pattern??(I.pattern=Mz),v$.init($,I)}),Gv=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})}}}),Xv=D("$ZodEmoji",($,I)=>{I.pattern??(I.pattern=Rz()),v$.init($,I)}),qv=D("$ZodNanoID",($,I)=>{I.pattern??(I.pattern=Dz),v$.init($,I)}),Qv=D("$ZodCUID",($,I)=>{I.pattern??(I.pattern=Qz),v$.init($,I)}),Tv=D("$ZodCUID2",($,I)=>{I.pattern??(I.pattern=Tz),v$.init($,I)}),Hv=D("$ZodULID",($,I)=>{I.pattern??(I.pattern=Hz),v$.init($,I)}),Yv=D("$ZodXID",($,I)=>{I.pattern??(I.pattern=Yz),v$.init($,I)}),Ov=D("$ZodKSUID",($,I)=>{I.pattern??(I.pattern=Oz),v$.init($,I)}),Dv=D("$ZodISODateTime",($,I)=>{I.pattern??(I.pattern=Sz(I)),v$.init($,I)}),Vv=D("$ZodISODate",($,I)=>{I.pattern??(I.pattern=jz),v$.init($,I)}),Bv=D("$ZodISOTime",($,I)=>{I.pattern??(I.pattern=Fz(I)),v$.init($,I)}),Mv=D("$ZodISODuration",($,I)=>{I.pattern??(I.pattern=Vz),v$.init($,I)}),Rv=D("$ZodIPv4",($,I)=>{I.pattern??(I.pattern=Kz),v$.init($,I),$._zod.bag.format="ipv4"}),Kv=D("$ZodIPv6",($,I)=>{I.pattern??(I.pattern=Lz),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})}}}),Lv=D("$ZodMAC",($,I)=>{I.pattern??(I.pattern=Pz(I.delimiter)),v$.init($,I),$._zod.bag.format="mac"}),Pv=D("$ZodCIDRv4",($,I)=>{I.pattern??(I.pattern=Wz),v$.init($,I)}),Wv=D("$ZodCIDRv6",($,I)=>{I.pattern??(I.pattern=Zz),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 Zv($){if($==="")return!0;if($.length%4!==0)return!1;try{return atob($),!0}catch{return!1}}var Av=D("$ZodBase64",($,I)=>{I.pattern??(I.pattern=Az),v$.init($,I),$._zod.bag.contentEncoding="base64",$._zod.check=(U)=>{if(Zv(U.value))return;U.issues.push({code:"invalid_format",format:"base64",input:U.value,inst:$,continue:!I.abort})}});function w5($){if(!$U.test($))return!1;let I=$.replace(/[-_]/g,(_)=>_==="-"?"+":"/"),U=I.padEnd(Math.ceil(I.length/4)*4,"=");return Zv(U)}var bv=D("$ZodBase64URL",($,I)=>{I.pattern??(I.pattern=$U),v$.init($,I),$._zod.bag.contentEncoding="base64url",$._zod.check=(U)=>{if(w5(U.value))return;U.issues.push({code:"invalid_format",format:"base64url",input:U.value,inst:$,continue:!I.abort})}}),jv=D("$ZodE164",($,I)=>{I.pattern??(I.pattern=bz),v$.init($,I)});function E5($,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 Fv=D("$ZodJWT",($,I)=>{v$.init($,I),$._zod.check=(U)=>{if(E5(U.value,I.alg))return;U.issues.push({code:"invalid_format",format:"jwt",input:U.value,inst:$,continue:!I.abort})}}),Sv=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})}}),NU=D("$ZodNumber",($,I)=>{l.init($,I),$._zod.pattern=$._zod.bag.pattern??$0,$._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}}),wv=D("$ZodNumberFormat",($,I)=>{rz.init($,I),NU.init($,I)}),U0=D("$ZodBoolean",($,I)=>{l.init($,I),$._zod.pattern=fz,$._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}}),GU=D("$ZodBigInt",($,I)=>{l.init($,I),$._zod.pattern=Ez,$._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}}),Ev=D("$ZodBigIntFormat",($,I)=>{lz.init($,I),GU.init($,I)}),Cv=D("$ZodSymbol",($,I)=>{l.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}}),fv=D("$ZodUndefined",($,I)=>{l.init($,I),$._zod.pattern=kz,$._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}}),xv=D("$ZodNull",($,I)=>{l.init($,I),$._zod.pattern=xz,$._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}}),kv=D("$ZodAny",($,I)=>{l.init($,I),$._zod.parse=(U)=>U}),yv=D("$ZodUnknown",($,I)=>{l.init($,I),$._zod.parse=(U)=>U}),iv=D("$ZodNever",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{return U.issues.push({expected:"never",code:"invalid_type",input:U.value,inst:$}),U}}),nv=D("$ZodVoid",($,I)=>{l.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}}),rv=D("$ZodDate",($,I)=>{l.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 R5($,I,U){if($.issues.length)I.issues.push(...$4(U,$.issues));I.value[U]=$.value}var lv=D("$ZodArray",($,I)=>{l.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)=>R5(N,U,z)));else R5(J,U,z)}if(g.length)return Promise.all(g).then(()=>U);return U}});function JU($,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 C5($){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=zz($.shape);return{...$,keys:I,keySet:new Set(I),numKeys:I.length,optionalKeys:new Set(U)}}function f5($,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)=>JU(T,U,G,I,X)));else JU(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 x5=D("$ZodObject",($,I)=>{if(l.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 _=A1(()=>C5(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=l6,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)=>JU(Y,v,q,N,H)));else JU(Q,v,q,N,H)}if(!g)return X.length?Promise.all(X).then(()=>v):v;return f5(X,N,v,J,_.value,$)}}),mv=D("$ZodObjectJIT",($,I)=>{x5.init($,I);let U=$._zod.parse,_=A1(()=>C5(I)),u=(q)=>{let T=new UU(["shape","payload","ctx"]),H=_.value,Q=(W)=>{let O=ru(W);return`shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`};T.write("const input = payload.value;");let Y=Object.create(null),R=0;for(let W of H.keys)Y[W]=`key_${R++}`;T.write("const newResult = {};");for(let W of H.keys){let O=Y[W],V=ru(W),B=q[W]?._zod?.optout==="optional";if(T.write(`const ${O} = ${Q(W)};`),B)T.write(`
|
|
300
|
+
`))}}var Nv={major:4,minor:3,patch:6};var l=D("$ZodType",($,I)=>{var U;$??($={}),$._zod.def=I,$._zod.bag=$._zod.bag||{},$._zod.version=Nv;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=V6(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 S4;if(X||T instanceof Promise)X=(X??Promise.resolve()).then(async()=>{if(await T,z.issues.length===q)return;if(!N)N=V6(z,q)});else{if(z.issues.length===q)continue;if(!N)N=V6(z,q)}}if(X)return X.then(()=>{return z});return z},g=(z,v,J)=>{if(V6(z))return z.aborted=!0,z;let N=u(v,_,J);if(N instanceof Promise){if(J.async===!1)throw new S4;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 S4;return J.then((N)=>u(N,_,v))}return u(J,_,v)}}p($,"~standard",()=>({validate:(u)=>{try{let g=Hz($,u);return g.success?{value:g.data}:{issues:g.error?.issues}}catch(g){return Yz($,u).then((z)=>z.success?{value:z.data}:{issues:z.error?.issues})}},vendor:"zod",version:1}))}),d6=D("$ZodString",($,I)=>{l.init($,I),$._zod.pattern=[...$?._zod.bag?.patterns??[]].pop()??xz($._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)=>{f1.init($,I),d6.init($,I)}),Xv=D("$ZodGUID",($,I)=>{I.pattern??(I.pattern=Lz),v$.init($,I)}),qv=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=c6(_))}else I.pattern??(I.pattern=c6());v$.init($,I)}),Qv=D("$ZodEmail",($,I)=>{I.pattern??(I.pattern=Pz),v$.init($,I)}),Tv=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})}}}),Hv=D("$ZodEmoji",($,I)=>{I.pattern??(I.pattern=Wz()),v$.init($,I)}),Yv=D("$ZodNanoID",($,I)=>{I.pattern??(I.pattern=Rz),v$.init($,I)}),Ov=D("$ZodCUID",($,I)=>{I.pattern??(I.pattern=Oz),v$.init($,I)}),Dv=D("$ZodCUID2",($,I)=>{I.pattern??(I.pattern=Dz),v$.init($,I)}),Vv=D("$ZodULID",($,I)=>{I.pattern??(I.pattern=Vz),v$.init($,I)}),Bv=D("$ZodXID",($,I)=>{I.pattern??(I.pattern=Bz),v$.init($,I)}),Mv=D("$ZodKSUID",($,I)=>{I.pattern??(I.pattern=Mz),v$.init($,I)}),Rv=D("$ZodISODateTime",($,I)=>{I.pattern??(I.pattern=fz(I)),v$.init($,I)}),Kv=D("$ZodISODate",($,I)=>{I.pattern??(I.pattern=Ez),v$.init($,I)}),Lv=D("$ZodISOTime",($,I)=>{I.pattern??(I.pattern=Cz(I)),v$.init($,I)}),Pv=D("$ZodISODuration",($,I)=>{I.pattern??(I.pattern=Kz),v$.init($,I)}),Wv=D("$ZodIPv4",($,I)=>{I.pattern??(I.pattern=Zz),v$.init($,I),$._zod.bag.format="ipv4"}),Zv=D("$ZodIPv6",($,I)=>{I.pattern??(I.pattern=Az),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})}}}),Av=D("$ZodMAC",($,I)=>{I.pattern??(I.pattern=bz(I.delimiter)),v$.init($,I),$._zod.bag.format="mac"}),bv=D("$ZodCIDRv4",($,I)=>{I.pattern??(I.pattern=jz),v$.init($,I)}),jv=D("$ZodCIDRv6",($,I)=>{I.pattern??(I.pattern=Fz),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 Fv($){if($==="")return!0;if($.length%4!==0)return!1;try{return atob($),!0}catch{return!1}}var Sv=D("$ZodBase64",($,I)=>{I.pattern??(I.pattern=Sz),v$.init($,I),$._zod.bag.contentEncoding="base64",$._zod.check=(U)=>{if(Fv(U.value))return;U.issues.push({code:"invalid_format",format:"base64",input:U.value,inst:$,continue:!I.abort})}});function n5($){if(!uU.test($))return!1;let I=$.replace(/[-_]/g,(_)=>_==="-"?"+":"/"),U=I.padEnd(Math.ceil(I.length/4)*4,"=");return Fv(U)}var wv=D("$ZodBase64URL",($,I)=>{I.pattern??(I.pattern=uU),v$.init($,I),$._zod.bag.contentEncoding="base64url",$._zod.check=(U)=>{if(n5(U.value))return;U.issues.push({code:"invalid_format",format:"base64url",input:U.value,inst:$,continue:!I.abort})}}),Ev=D("$ZodE164",($,I)=>{I.pattern??(I.pattern=wz),v$.init($,I)});function r5($,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 Cv=D("$ZodJWT",($,I)=>{v$.init($,I),$._zod.check=(U)=>{if(r5(U.value,I.alg))return;U.issues.push({code:"invalid_format",format:"jwt",input:U.value,inst:$,continue:!I.abort})}}),fv=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})}}),XU=D("$ZodNumber",($,I)=>{l.init($,I),$._zod.pattern=$._zod.bag.pattern??u0,$._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}}),xv=D("$ZodNumberFormat",($,I)=>{cz.init($,I),XU.init($,I)}),g0=D("$ZodBoolean",($,I)=>{l.init($,I),$._zod.pattern=iz,$._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}}),qU=D("$ZodBigInt",($,I)=>{l.init($,I),$._zod.pattern=kz,$._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}}),kv=D("$ZodBigIntFormat",($,I)=>{dz.init($,I),qU.init($,I)}),yv=D("$ZodSymbol",($,I)=>{l.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}}),iv=D("$ZodUndefined",($,I)=>{l.init($,I),$._zod.pattern=rz,$._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}}),nv=D("$ZodNull",($,I)=>{l.init($,I),$._zod.pattern=nz,$._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}}),rv=D("$ZodAny",($,I)=>{l.init($,I),$._zod.parse=(U)=>U}),lv=D("$ZodUnknown",($,I)=>{l.init($,I),$._zod.parse=(U)=>U}),mv=D("$ZodNever",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{return U.issues.push({expected:"never",code:"invalid_type",input:U.value,inst:$}),U}}),hv=D("$ZodVoid",($,I)=>{l.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}}),cv=D("$ZodDate",($,I)=>{l.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 j5($,I,U){if($.issues.length)I.issues.push(...I4(U,$.issues));I.value[U]=$.value}var dv=D("$ZodArray",($,I)=>{l.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)=>j5(N,U,z)));else j5(J,U,z)}if(g.length)return Promise.all(g).then(()=>U);return U}});function GU($,I,U,_,u){if($.issues.length){if(u&&!(U in _))return;I.issues.push(...I4(U,$.issues))}if($.value===void 0){if(U in _)I.value[U]=void 0}else I.value[U]=$.value}function l5($){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=Gz($.shape);return{...$,keys:I,keySet:new Set(I),numKeys:I.length,optionalKeys:new Set(U)}}function m5($,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)=>GU(T,U,G,I,X)));else GU(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 h5=D("$ZodObject",($,I)=>{if(l.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 _=j1(()=>l5(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=h6,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)=>GU(Y,v,q,N,H)));else GU(Q,v,q,N,H)}if(!g)return X.length?Promise.all(X).then(()=>v):v;return m5(X,N,v,J,_.value,$)}}),pv=D("$ZodObjectJIT",($,I)=>{h5.init($,I);let U=$._zod.parse,_=j1(()=>l5(I)),u=(q)=>{let T=new gU(["shape","payload","ctx"]),H=_.value,Q=(W)=>{let O=mu(W);return`shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`};T.write("const input = payload.value;");let Y=Object.create(null),R=0;for(let W of H.keys)Y[W]=`key_${R++}`;T.write("const newResult = {};");for(let W of H.keys){let O=Y[W],V=mu(W),B=q[W]?._zod?.optout==="optional";if(T.write(`const ${O} = ${Q(W)};`),B)T.write(`
|
|
276
301
|
if (${O}.issues.length) {
|
|
277
302
|
if (${V} in input) {
|
|
278
303
|
payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
|
|
@@ -306,131 +331,106 @@ ${v}
|
|
|
306
331
|
newResult[${V}] = ${O}.value;
|
|
307
332
|
}
|
|
308
333
|
|
|
309
|
-
`)}T.write("payload.value = newResult;"),T.write("return payload;");let K=T.compile();return(W,O)=>K(q,W,O)},g,z=l6,v=!mI.jitless,N=v&&Uz.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 f5([],H,q,T,G,$)}return U(q,T)}});function K5($,I,U,_){for(let g of $)if(g.issues.length===0)return I.value=g.value,I;let u=$.filter((g)=>!O6(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)=>p$(z,_,R$())))}),I}var _0=D("$ZodUnion",($,I)=>{l.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)=>dI(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 K5(v,u,$,g);return Promise.all(v).then((J)=>{return K5(J,u,$,g)})}});function L5($,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)=>p$(z,_,R$())))});else I.issues.push({code:"invalid_union",input:I.value,inst:U,errors:[],inclusive:!1});return I}var hv=D("$ZodXor",($,I)=>{_0.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 L5(v,u,$,g);return Promise.all(v).then((J)=>{return L5(J,u,$,g)})}}),cv=D("$ZodDiscriminatedUnion",($,I)=>{I.inclusive=!1,_0.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 _=A1(()=>{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(!l6(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}}),dv=D("$ZodIntersection",($,I)=>{l.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 P5(U,J,N)});return P5(U,g,z)}});function zv($,I){if($===I)return{valid:!0,data:$};if($ instanceof Date&&I instanceof Date&&+$===+I)return{valid:!0,data:$};if(Y6($)&&Y6(I)){let U=Object.keys(I),_=Object.keys($).filter((g)=>U.indexOf(g)!==-1),u={...$,...I};for(let g of _){let z=zv($[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=zv(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 P5($,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(O6($))return $;let z=zv(I.value,U.value);if(!z.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(z.mergeErrorPath)}`);return $.value=z.data,$}var XU=D("$ZodTuple",($,I)=>{l.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)=>_U(q,_,N)));else _U(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)=>_U(T,_,N)));else _U(q,_,N)}}if(z.length)return Promise.all(z).then(()=>_);return _}});function _U($,I,U){if($.issues.length)I.issues.push(...$4(U,$.issues));I.value[U]=$.value}var pv=D("$ZodRecord",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{let u=U.value;if(!Y6(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"&&$0.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)=>p$(G,_,R$())),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}}),ov=D("$ZodMap",($,I)=>{l.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])=>{W5(X,G,U,z,u,$,_)}));else W5(J,N,U,z,u,$,_)}if(g.length)return Promise.all(g).then(()=>U);return U}});function W5($,I,U,_,u,g,z){if($.issues.length)if(pI.has(typeof _))U.issues.push(...$4(_,$.issues));else U.issues.push({code:"invalid_key",origin:"map",input:u,inst:g,issues:$.issues.map((v)=>p$(v,z,R$()))});if(I.issues.length)if(pI.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)=>p$(v,z,R$()))});U.value.set($.value,I.value)}var tv=D("$ZodSet",($,I)=>{l.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)=>Z5(J,U)));else Z5(v,U)}if(g.length)return Promise.all(g).then(()=>U);return U}});function Z5($,I){if($.issues.length)I.issues.push(...$.issues);I.value.add($.value)}var av=D("$ZodEnum",($,I)=>{l.init($,I);let U=cI(I.entries),_=new Set(U);$._zod.values=_,$._zod.pattern=new RegExp(`^(${U.filter((u)=>pI.has(typeof u)).map((u)=>typeof u==="string"?G4(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}}),ev=D("$ZodLiteral",($,I)=>{if(l.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"?G4(_):_?G4(_.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:$}),_}}),sv=D("$ZodFile",($,I)=>{l.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}}),$J=D("$ZodTransform",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{if(_.direction==="backward")throw new r6($.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 F4;return U.value=u,U}});function A5($,I){if($.issues.length&&I===void 0)return{issues:[],value:void 0};return $}var qU=D("$ZodOptional",($,I)=>{l.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(`^(${dI(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)=>A5(g,U.value));return A5(u,U.value)}if(U.value===void 0)return U;return I.innerType._zod.run(U,_)}}),IJ=D("$ZodExactOptional",($,I)=>{qU.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,_)}}),uJ=D("$ZodNullable",($,I)=>{l.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(`^(${dI(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,_)}}),UJ=D("$ZodDefault",($,I)=>{l.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)=>b5(g,I));return b5(u,I)}});function b5($,I){if($.value===void 0)$.value=I.defaultValue;return $}var _J=D("$ZodPrefault",($,I)=>{l.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,_)}}),gJ=D("$ZodNonOptional",($,I)=>{l.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)=>j5(g,$));return j5(u,$)}});function j5($,I){if(!$.issues.length&&$.value===void 0)$.issues.push({code:"invalid_type",expected:"nonoptional",input:$.value,inst:I});return $}var zJ=D("$ZodSuccess",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{if(_.direction==="backward")throw new r6("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}}),vJ=D("$ZodCatch",($,I)=>{l.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)=>p$(z,_,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((g)=>p$(g,_,R$()))},input:U.value}),U.issues=[];return U}}),JJ=D("$ZodNaN",($,I)=>{l.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}}),NJ=D("$ZodPipe",($,I)=>{l.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)=>gU(z,I.in,_));return gU(g,I.in,_)}let u=I.in._zod.run(U,_);if(u instanceof Promise)return u.then((g)=>gU(g,I.out,_));return gU(u,I.out,_)}});function gU($,I,U){if($.issues.length)return $.aborted=!0,$;return I._zod.run({value:$.value,issues:$.issues},U)}var g0=D("$ZodCodec",($,I)=>{l.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)=>zU(z,I,_));return zU(g,I,_)}else{let g=I.out._zod.run(U,_);if(g instanceof Promise)return g.then((z)=>zU(z,I,_));return zU(g,I,_)}}});function zU($,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)=>vU($,g,I.out,U));return vU($,u,I.out,U)}else{let u=I.reverseTransform($.value,$);if(u instanceof Promise)return u.then((g)=>vU($,g,I.in,U));return vU($,u,I.in,U)}}function vU($,I,U,_){if($.issues.length)return $.aborted=!0,$;return U._zod.run({value:I,issues:$.issues},_)}var GJ=D("$ZodReadonly",($,I)=>{l.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(F5);return F5(u)}});function F5($){return $.value=Object.freeze($.value),$}var XJ=D("$ZodTemplateLiteral",($,I)=>{l.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||gz.has(typeof _))U.push(G4(`${_}`));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 _}}),qJ=D("$ZodFunction",($,I)=>{return l.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?mu($._def.input,_):_,g=Reflect.apply(U,this,u);if($._def.output)return mu($._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 hu($._def.input,_):_,g=await Reflect.apply(U,this,u);if($._def.output)return await hu($._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 XU({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})},$}),QJ=D("$ZodPromise",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{return Promise.resolve(U.value).then((u)=>I.innerType._zod.run({value:u,issues:[]},_))}}),TJ=D("$ZodLazy",($,I)=>{l.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,_)}}),HJ=D("$ZodCustom",($,I)=>{G$.init($,I),l.init($,I),$._zod.parse=(U,_)=>{return U},$._zod.check=(U)=>{let _=U.value,u=I.fn(_);if(u instanceof Promise)return u.then((g)=>S5(g,U,_,$));S5(u,U,_,$);return}});function S5($,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(b1(u))}}var G0={};A4(G0,{zhTW:()=>zN,zhCN:()=>gN,yo:()=>vN,vi:()=>_N,uz:()=>UN,ur:()=>uN,uk:()=>N0,ua:()=>IN,tr:()=>$N,th:()=>sJ,ta:()=>eJ,sv:()=>aJ,sl:()=>tJ,ru:()=>oJ,pt:()=>pJ,ps:()=>cJ,pl:()=>dJ,ota:()=>hJ,no:()=>mJ,nl:()=>lJ,ms:()=>rJ,mk:()=>nJ,lt:()=>iJ,ko:()=>yJ,km:()=>v0,kh:()=>kJ,ka:()=>xJ,ja:()=>fJ,it:()=>CJ,is:()=>EJ,id:()=>wJ,hy:()=>SJ,hu:()=>FJ,he:()=>jJ,frCA:()=>bJ,fr:()=>AJ,fi:()=>ZJ,fa:()=>WJ,es:()=>PJ,eo:()=>LJ,en:()=>z0,de:()=>KJ,da:()=>RJ,cs:()=>MJ,ca:()=>BJ,bg:()=>VJ,be:()=>DJ,az:()=>OJ,ar:()=>YJ});var SA=()=>{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`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${L(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?"ة":""}: ${L(u.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${u.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${u.origin}`;default:return"مدخل غير مقبول"}}};function YJ(){return{localeError:SA()}}var wA=()=>{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: ${L(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":""}: ${L(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 OJ(){return{localeError:wA()}}function k5($,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 EA=()=>{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`Няправільны варыянт: чакаўся адзін з ${L(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z){let v=Number(u.maximum),J=k5(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=k5(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?"ключы":"ключ"}: ${L(u.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${u.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${u.origin}`;default:return"Няправільны ўвод"}}};function DJ(){return{localeError:EA()}}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`Невалидна опция: очаквано едно от ${L(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?"ове":""}: ${L(u.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${u.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${u.origin}`;default:return"Невалиден вход"}}};function VJ(){return{localeError:CA()}}var fA=()=>{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 ${L(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":""}: ${L(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 BJ(){return{localeError:fA()}}var xA=()=>{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 ${L(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: ${L(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 MJ(){return{localeError:xA()}}var kA=()=>{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 ${L(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"}: ${L(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 RJ(){return{localeError:kA()}}var yA=()=>{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 ${L(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"}: ${L(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 KJ(){return{localeError:yA()}}var iA=()=>{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 ${L(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":""}: ${L(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 z0(){return{localeError:iA()}}var nA=()=>{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 ${L(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":""}: ${L(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 LJ(){return{localeError:nA()}}var rA=()=>{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 ${L(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":""}: ${L(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 PJ(){return{localeError:rA()}}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:"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`گزینه نامعتبر: میبایست یکی از ${L(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?"های":""} ناشناس: ${L(u.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${u.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${u.origin}`;default:return"ورودی نامعتبر"}}};function WJ(){return{localeError:lA()}}var mA=()=>{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: ${L(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"}: ${L(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 ZJ(){return{localeError:mA()}}var hA=()=>{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 ${L(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":""} : ${L(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 AJ(){return{localeError:hA()}}var cA=()=>{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 ${L(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":""} : ${L(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 bJ(){return{localeError:cA()}}var dA=()=>{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?"ים":"ה"}: ${L(N.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${u(N.origin??"array")}`;default:return"קלט לא תקין"}}};function jJ(){return{localeError:dA()}}var pA=()=>{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 ${L(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":""}: ${L(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 FJ(){return{localeError:pA()}}function y5($,I,U){return Math.abs($)===1?I:U}function C1($){if(!$)return"";let I=["ա","ե","ը","ի","ո","ու","օ"],U=$[$.length-1];return $+(I.includes(U)?"ն":"ը")}var oA=()=>{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`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${L(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z){let v=Number(u.maximum),J=y5(v,z.unit.one,z.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${C1(u.origin??"արժեք")} կունենա ${g}${u.maximum.toString()} ${J}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${C1(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=y5(v,z.unit.one,z.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${C1(u.origin)} կունենա ${g}${u.minimum.toString()} ${J}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${C1(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?"ներ":""}. ${L(u.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${C1(u.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${C1(u.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};function SJ(){return{localeError:oA()}}var tA=()=>{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 ${L(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":""}: ${L(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 wJ(){return{localeError:tA()}}var aA=()=>{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 ${L(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"}: ${L(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 EJ(){return{localeError:aA()}}var eA=()=>{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 ${L(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"}: ${L(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 CJ(){return{localeError:eA()}}var sA=()=>{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`無効な選択: ${L(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?"群":""}: ${L(u.keys,"、")}`;case"invalid_key":return`${u.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${u.origin}内の無効な値`;default:return"無効な入力"}}};function fJ(){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-კოდირებული სტრინგი",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`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${L(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?"ები":"ი"}: ${L(u.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${u.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${u.origin}-ში`;default:return"არასწორი შეყვანა"}}};function xJ(){return{localeError:$b()}}var Ib=()=>{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`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${L(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`រកឃើញសោមិនស្គាល់៖ ${L(u.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${u.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${u.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function v0(){return{localeError:Ib()}}function kJ(){return v0()}var ub=()=>{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`잘못된 옵션: ${L(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`인식할 수 없는 키: ${L(u.keys,", ")}`;case"invalid_key":return`잘못된 키: ${u.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${u.origin}`;default:return"잘못된 입력"}}};function yJ(){return{localeError:ub()}}var J0=($)=>{return $.charAt(0).toUpperCase()+$.slice(1)};function i5($){let I=Math.abs($),U=I%10,_=I%100;if(_>=11&&_<=19||U===0)return"many";if(U===1)return"one";return"few"}var Ub=()=>{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š ${L(u.values,"|")} pasirinkimų`;case"too_big":{let g=_[u.origin]??u.origin,z=I(u.origin,i5(Number(u.maximum)),u.inclusive??!1,"smaller");if(z?.verb)return`${J0(g??u.origin??"reikšmė")} ${z.verb} ${u.maximum.toString()} ${z.unit??"elementų"}`;let v=u.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${J0(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,i5(Number(u.minimum)),u.inclusive??!1,"bigger");if(z?.verb)return`${J0(g??u.origin??"reikšmė")} ${z.verb} ${u.minimum.toString()} ${z.unit??"elementų"}`;let v=u.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${J0(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"}: ${L(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`${J0(g??u.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function iJ(){return{localeError:Ub()}}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:"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`Грешана опција: се очекува една ${L(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?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${L(u.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${u.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${u.origin}`;default:return"Грешен внес"}}};function nJ(){return{localeError:_b()}}var gb=()=>{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 ${L(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: ${L(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 rJ(){return{localeError:gb()}}var zb=()=>{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 ${L(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":""}: ${L(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 lJ(){return{localeError:zb()}}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 ${L(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"}: ${L(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 mJ(){return{localeError:vb()}}var Jb=()=>{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 ${L(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":""}: ${L(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 hJ(){return{localeError:Jb()}}var Nb=()=>{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`ناسم انتخاب: باید یو له ${L(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?"کلیډونه":"کلیډ"}: ${L(u.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${u.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${u.origin} کې`;default:return"ناسمه ورودي"}}};function cJ(){return{localeError:Nb()}}var Gb=()=>{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 ${L(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":""}: ${L(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 dJ(){return{localeError:Gb()}}var Xb=()=>{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 ${L(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":""}: ${L(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 pJ(){return{localeError:Xb()}}function n5($,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 qb=()=>{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`Неверный вариант: ожидалось одно из ${L(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z){let v=Number(u.maximum),J=n5(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=n5(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?"и":""}: ${L(u.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${u.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${u.origin}`;default:return"Неверные входные данные"}}};function oJ(){return{localeError:qb()}}var Qb=()=>{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 ${L(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č"}: ${L(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 tJ(){return{localeError:Qb()}}var Tb=()=>{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 ${L(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"}: ${L(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 aJ(){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:"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`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${L(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?"கள்":""}: ${L(u.keys,", ")}`;case"invalid_key":return`${u.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${u.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function eJ(){return{localeError:Hb()}}var Yb=()=>{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`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${L(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`พบคีย์ที่ไม่รู้จัก: ${L(u.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${u.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${u.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function sJ(){return{localeError:Yb()}}var Ob=()=>{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ı: ${L(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":""}: ${L(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 $N(){return{localeError:Ob()}}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:"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`Неправильна опція: очікується одне з ${L(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?"і":""}: ${L(u.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${u.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${u.origin}`;default:return"Неправильні вхідні дані"}}};function N0(){return{localeError:Db()}}function IN(){return N0()}var Vb=()=>{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`غلط آپشن: ${L(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?"ز":""}: ${L(u.keys,"، ")}`;case"invalid_key":return`${u.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${u.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function uN(){return{localeError:Vb()}}var Bb=()=>{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 ${L(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":""}: ${L(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 UN(){return{localeError:Bb()}}var Mb=()=>{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ị ${L(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: ${L(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 _N(){return{localeError:Mb()}}var Rb=()=>{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`无效选项:期望以下之一 ${L(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): ${L(u.keys,", ")}`;case"invalid_key":return`${u.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${u.origin} 中包含无效值(value)`;default:return"无效输入"}}};function gN(){return{localeError:Rb()}}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:"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`無效的選項:預期為以下其中之一 ${L(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?"們":""}:${L(u.keys,"、")}`;case"invalid_key":return`${u.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${u.origin} 中有無效的值`;default:return"無效的輸入值"}}};function zN(){return{localeError:Kb()}}var Lb=()=>{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 ${L(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ọ̀: ${L(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 vN(){return{localeError:Lb()}}var r5,JN=Symbol("ZodOutput"),NN=Symbol("ZodInput");class GN{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 QU(){return new GN}(r5=globalThis).__zod_globalRegistry??(r5.__zod_globalRegistry=QU());var w$=globalThis.__zod_globalRegistry;function XN($,I){return new $({type:"string",...C(I)})}function qN($,I){return new $({type:"string",coerce:!0,...C(I)})}function TU($,I){return new $({type:"string",format:"email",check:"string_format",abort:!1,...C(I)})}function X0($,I){return new $({type:"string",format:"guid",check:"string_format",abort:!1,...C(I)})}function HU($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,...C(I)})}function YU($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...C(I)})}function OU($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...C(I)})}function DU($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...C(I)})}function q0($,I){return new $({type:"string",format:"url",check:"string_format",abort:!1,...C(I)})}function VU($,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 MU($,I){return new $({type:"string",format:"cuid",check:"string_format",abort:!1,...C(I)})}function RU($,I){return new $({type:"string",format:"cuid2",check:"string_format",abort:!1,...C(I)})}function KU($,I){return new $({type:"string",format:"ulid",check:"string_format",abort:!1,...C(I)})}function LU($,I){return new $({type:"string",format:"xid",check:"string_format",abort:!1,...C(I)})}function PU($,I){return new $({type:"string",format:"ksuid",check:"string_format",abort:!1,...C(I)})}function WU($,I){return new $({type:"string",format:"ipv4",check:"string_format",abort:!1,...C(I)})}function ZU($,I){return new $({type:"string",format:"ipv6",check:"string_format",abort:!1,...C(I)})}function QN($,I){return new $({type:"string",format:"mac",check:"string_format",abort:!1,...C(I)})}function AU($,I){return new $({type:"string",format:"cidrv4",check:"string_format",abort:!1,...C(I)})}function bU($,I){return new $({type:"string",format:"cidrv6",check:"string_format",abort:!1,...C(I)})}function jU($,I){return new $({type:"string",format:"base64",check:"string_format",abort:!1,...C(I)})}function FU($,I){return new $({type:"string",format:"base64url",check:"string_format",abort:!1,...C(I)})}function SU($,I){return new $({type:"string",format:"e164",check:"string_format",abort:!1,...C(I)})}function wU($,I){return new $({type:"string",format:"jwt",check:"string_format",abort:!1,...C(I)})}var TN={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function HN($,I){return new $({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...C(I)})}function YN($,I){return new $({type:"string",format:"date",check:"string_format",...C(I)})}function ON($,I){return new $({type:"string",format:"time",check:"string_format",precision:null,...C(I)})}function DN($,I){return new $({type:"string",format:"duration",check:"string_format",...C(I)})}function VN($,I){return new $({type:"number",checks:[],...C(I)})}function BN($,I){return new $({type:"number",coerce:!0,checks:[],...C(I)})}function MN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"safeint",...C(I)})}function RN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"float32",...C(I)})}function KN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"float64",...C(I)})}function LN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"int32",...C(I)})}function PN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"uint32",...C(I)})}function WN($,I){return new $({type:"boolean",...C(I)})}function ZN($,I){return new $({type:"boolean",coerce:!0,...C(I)})}function AN($,I){return new $({type:"bigint",...C(I)})}function bN($,I){return new $({type:"bigint",coerce:!0,...C(I)})}function jN($,I){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...C(I)})}function FN($,I){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...C(I)})}function SN($,I){return new $({type:"symbol",...C(I)})}function wN($,I){return new $({type:"undefined",...C(I)})}function EN($,I){return new $({type:"null",...C(I)})}function CN($){return new $({type:"any"})}function fN($){return new $({type:"unknown"})}function xN($,I){return new $({type:"never",...C(I)})}function kN($,I){return new $({type:"void",...C(I)})}function yN($,I){return new $({type:"date",...C(I)})}function iN($,I){return new $({type:"date",coerce:!0,...C(I)})}function nN($,I){return new $({type:"nan",...C(I)})}function S4($,I){return new IU({check:"less_than",...C(I),value:$,inclusive:!1})}function I4($,I){return new IU({check:"less_than",...C(I),value:$,inclusive:!0})}function w4($,I){return new uU({check:"greater_than",...C(I),value:$,inclusive:!1})}function r$($,I){return new uU({check:"greater_than",...C(I),value:$,inclusive:!0})}function EU($){return w4(0,$)}function CU($){return S4(0,$)}function fU($){return I4(0,$)}function xU($){return r$(0,$)}function D6($,I){return new nz({check:"multiple_of",...C(I),value:$})}function V6($,I){return new mz({check:"max_size",...C(I),maximum:$})}function E4($,I){return new hz({check:"min_size",...C(I),minimum:$})}function c6($,I){return new cz({check:"size_equals",...C(I),size:$})}function d6($,I){return new dz({check:"max_length",...C(I),maximum:$})}function c4($,I){return new pz({check:"min_length",...C(I),minimum:$})}function p6($,I){return new oz({check:"length_equals",...C(I),length:$})}function f1($,I){return new tz({check:"string_format",format:"regex",...C(I),pattern:$})}function x1($){return new az({check:"string_format",format:"lowercase",...C($)})}function k1($){return new ez({check:"string_format",format:"uppercase",...C($)})}function y1($,I){return new sz({check:"string_format",format:"includes",...C(I),includes:$})}function i1($,I){return new $v({check:"string_format",format:"starts_with",...C(I),prefix:$})}function n1($,I){return new Iv({check:"string_format",format:"ends_with",...C(I),suffix:$})}function kU($,I,U){return new uv({check:"property",property:$,schema:I,...C(U)})}function r1($,I){return new Uv({check:"mime_type",mime:$,...C(I)})}function D4($){return new _v({check:"overwrite",tx:$})}function l1($){return D4((I)=>I.normalize($))}function m1(){return D4(($)=>$.trim())}function h1(){return D4(($)=>$.toLowerCase())}function c1(){return D4(($)=>$.toUpperCase())}function d1(){return D4(($)=>uz($))}function rN($,I,U){return new $({type:"array",element:I,...C(U)})}function Wb($,I,U){return new $({type:"union",options:I,...C(U)})}function Zb($,I,U){return new $({type:"union",options:I,inclusive:!1,...C(U)})}function Ab($,I,U,_){return new $({type:"union",options:U,discriminator:I,...C(_)})}function bb($,I,U){return new $({type:"intersection",left:I,right:U})}function jb($,I,U,_){let u=U instanceof l;return new $({type:"tuple",items:I,rest:u?U:null,...C(u?_:U)})}function Fb($,I,U,_){return new $({type:"record",keyType:I,valueType:U,...C(_)})}function Sb($,I,U,_){return new $({type:"map",keyType:I,valueType:U,...C(_)})}function wb($,I,U){return new $({type:"set",valueType:I,...C(U)})}function Eb($,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 fb($,I,U){return new $({type:"literal",values:Array.isArray(I)?I:[I],...C(U)})}function lN($,I){return new $({type:"file",...C(I)})}function xb($,I){return new $({type:"transform",transform:I})}function kb($,I){return new $({type:"optional",innerType:I})}function yb($,I){return new $({type:"nullable",innerType:I})}function ib($,I,U){return new $({type:"default",innerType:I,get defaultValue(){return typeof U==="function"?U():_z(U)}})}function nb($,I,U){return new $({type:"nonoptional",innerType:I,...C(U)})}function rb($,I){return new $({type:"success",innerType:I})}function lb($,I,U){return new $({type:"catch",innerType:I,catchValue:typeof U==="function"?U:()=>U})}function mb($,I,U){return new $({type:"pipe",in:I,out:U})}function hb($,I){return new $({type:"readonly",innerType:I})}function cb($,I,U){return new $({type:"template_literal",parts:I,...C(U)})}function db($,I){return new $({type:"lazy",getter:I})}function pb($,I){return new $({type:"promise",innerType:I})}function mN($,I,U){let _=C(U);return _.abort??(_.abort=!0),new $({type:"custom",check:"custom",fn:I,..._})}function hN($,I,U){return new $({type:"custom",check:"custom",fn:I,...C(U)})}function cN($){let I=l5((U)=>{return U.addIssue=(_)=>{if(typeof _==="string")U.issues.push(b1(_,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(b1(u))}},$(U.value,U)});return I}function l5($,I){let U=new G$({check:"custom",...C(I)});return U._zod.check=$,U}function dN($){let I=new G$({check:"describe"});return I._zod.onattach=[(U)=>{let _=w$.get(U)??{};w$.add(U,{..._,description:$})}],I._zod.check=()=>{},I}function pN($){let I=new G$({check:"meta"});return I._zod.onattach=[(U)=>{let _=w$.get(U)??{};w$.add(U,{..._,...$})}],I._zod.check=()=>{},I}function oN($,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??g0,J=$.Boolean??U0,X=new($.String??h6)({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 p1($,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 B6($){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"&&l$($))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 M6($,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>
|
|
334
|
+
`)}T.write("payload.value = newResult;"),T.write("return payload;");let K=T.compile();return(W,O)=>K(q,W,O)},g,z=h6,v=!cI.jitless,N=v&&vz.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 m5([],H,q,T,G,$)}return U(q,T)}});function F5($,I,U,_){for(let g of $)if(g.issues.length===0)return I.value=g.value,I;let u=$.filter((g)=>!V6(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)=>p$(z,_,R$())))}),I}var z0=D("$ZodUnion",($,I)=>{l.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)=>oI(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 F5(v,u,$,g);return Promise.all(v).then((J)=>{return F5(J,u,$,g)})}});function S5($,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)=>p$(z,_,R$())))});else I.issues.push({code:"invalid_union",input:I.value,inst:U,errors:[],inclusive:!1});return I}var ov=D("$ZodXor",($,I)=>{z0.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 S5(v,u,$,g);return Promise.all(v).then((J)=>{return S5(J,u,$,g)})}}),tv=D("$ZodDiscriminatedUnion",($,I)=>{I.inclusive=!1,z0.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 _=j1(()=>{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(!h6(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}}),av=D("$ZodIntersection",($,I)=>{l.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 w5(U,J,N)});return w5(U,g,z)}});function Gv($,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=Gv($[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=Gv(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 w5($,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(V6($))return $;let z=Gv(I.value,U.value);if(!z.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(z.mergeErrorPath)}`);return $.value=z.data,$}var QU=D("$ZodTuple",($,I)=>{l.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)=>zU(q,_,N)));else zU(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)=>zU(T,_,N)));else zU(q,_,N)}}if(z.length)return Promise.all(z).then(()=>_);return _}});function zU($,I,U){if($.issues.length)I.issues.push(...I4(U,$.issues));I.value[U]=$.value}var ev=D("$ZodRecord",($,I)=>{l.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(...I4(N,G.issues));U.value[N]=G.value}));else{if(X.issues.length)U.issues.push(...I4(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"&&u0.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)=>p$(G,_,R$())),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(...I4(v,G.issues));U.value[J.value]=G.value}));else{if(X.issues.length)U.issues.push(...I4(v,X.issues));U.value[J.value]=X.value}}}if(g.length)return Promise.all(g).then(()=>U);return U}}),sv=D("$ZodMap",($,I)=>{l.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])=>{E5(X,G,U,z,u,$,_)}));else E5(J,N,U,z,u,$,_)}if(g.length)return Promise.all(g).then(()=>U);return U}});function E5($,I,U,_,u,g,z){if($.issues.length)if(tI.has(typeof _))U.issues.push(...I4(_,$.issues));else U.issues.push({code:"invalid_key",origin:"map",input:u,inst:g,issues:$.issues.map((v)=>p$(v,z,R$()))});if(I.issues.length)if(tI.has(typeof _))U.issues.push(...I4(_,I.issues));else U.issues.push({origin:"map",code:"invalid_element",input:u,inst:g,key:_,issues:I.issues.map((v)=>p$(v,z,R$()))});U.value.set($.value,I.value)}var $J=D("$ZodSet",($,I)=>{l.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)=>C5(J,U)));else C5(v,U)}if(g.length)return Promise.all(g).then(()=>U);return U}});function C5($,I){if($.issues.length)I.issues.push(...$.issues);I.value.add($.value)}var IJ=D("$ZodEnum",($,I)=>{l.init($,I);let U=pI(I.entries),_=new Set(U);$._zod.values=_,$._zod.pattern=new RegExp(`^(${U.filter((u)=>tI.has(typeof u)).map((u)=>typeof u==="string"?X4(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}}),uJ=D("$ZodLiteral",($,I)=>{if(l.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"?X4(_):_?X4(_.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:$}),_}}),UJ=D("$ZodFile",($,I)=>{l.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}}),_J=D("$ZodTransform",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{if(_.direction==="backward")throw new m6($.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 S4;return U.value=u,U}});function f5($,I){if($.issues.length&&I===void 0)return{issues:[],value:void 0};return $}var TU=D("$ZodOptional",($,I)=>{l.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(`^(${oI(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)=>f5(g,U.value));return f5(u,U.value)}if(U.value===void 0)return U;return I.innerType._zod.run(U,_)}}),gJ=D("$ZodExactOptional",($,I)=>{TU.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,_)}}),zJ=D("$ZodNullable",($,I)=>{l.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(`^(${oI(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,_)}}),vJ=D("$ZodDefault",($,I)=>{l.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)=>x5(g,I));return x5(u,I)}});function x5($,I){if($.value===void 0)$.value=I.defaultValue;return $}var JJ=D("$ZodPrefault",($,I)=>{l.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,_)}}),NJ=D("$ZodNonOptional",($,I)=>{l.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)=>k5(g,$));return k5(u,$)}});function k5($,I){if(!$.issues.length&&$.value===void 0)$.issues.push({code:"invalid_type",expected:"nonoptional",input:$.value,inst:I});return $}var GJ=D("$ZodSuccess",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{if(_.direction==="backward")throw new m6("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}}),XJ=D("$ZodCatch",($,I)=>{l.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)=>p$(z,_,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((g)=>p$(g,_,R$()))},input:U.value}),U.issues=[];return U}}),qJ=D("$ZodNaN",($,I)=>{l.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}}),QJ=D("$ZodPipe",($,I)=>{l.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)=>vU(z,I.in,_));return vU(g,I.in,_)}let u=I.in._zod.run(U,_);if(u instanceof Promise)return u.then((g)=>vU(g,I.out,_));return vU(u,I.out,_)}});function vU($,I,U){if($.issues.length)return $.aborted=!0,$;return I._zod.run({value:$.value,issues:$.issues},U)}var v0=D("$ZodCodec",($,I)=>{l.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)=>JU(z,I,_));return JU(g,I,_)}else{let g=I.out._zod.run(U,_);if(g instanceof Promise)return g.then((z)=>JU(z,I,_));return JU(g,I,_)}}});function JU($,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)=>NU($,g,I.out,U));return NU($,u,I.out,U)}else{let u=I.reverseTransform($.value,$);if(u instanceof Promise)return u.then((g)=>NU($,g,I.in,U));return NU($,u,I.in,U)}}function NU($,I,U,_){if($.issues.length)return $.aborted=!0,$;return U._zod.run({value:I,issues:$.issues},_)}var TJ=D("$ZodReadonly",($,I)=>{l.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(y5);return y5(u)}});function y5($){return $.value=Object.freeze($.value),$}var HJ=D("$ZodTemplateLiteral",($,I)=>{l.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||Nz.has(typeof _))U.push(X4(`${_}`));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 _}}),YJ=D("$ZodFunction",($,I)=>{return l.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?cu($._def.input,_):_,g=Reflect.apply(U,this,u);if($._def.output)return cu($._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 du($._def.input,_):_,g=await Reflect.apply(U,this,u);if($._def.output)return await du($._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 QU({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})},$}),OJ=D("$ZodPromise",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{return Promise.resolve(U.value).then((u)=>I.innerType._zod.run({value:u,issues:[]},_))}}),DJ=D("$ZodLazy",($,I)=>{l.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,_)}}),VJ=D("$ZodCustom",($,I)=>{G$.init($,I),l.init($,I),$._zod.parse=(U,_)=>{return U},$._zod.check=(U)=>{let _=U.value,u=I.fn(_);if(u instanceof Promise)return u.then((g)=>i5(g,U,_,$));i5(u,U,_,$);return}});function i5($,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 q0={};O4(q0,{zhTW:()=>GN,zhCN:()=>NN,yo:()=>XN,vi:()=>JN,uz:()=>vN,ur:()=>zN,uk:()=>X0,ua:()=>gN,tr:()=>_N,th:()=>UN,ta:()=>uN,sv:()=>IN,sl:()=>$N,ru:()=>sJ,pt:()=>eJ,ps:()=>tJ,pl:()=>aJ,ota:()=>oJ,no:()=>pJ,nl:()=>dJ,ms:()=>cJ,mk:()=>hJ,lt:()=>mJ,ko:()=>lJ,km:()=>N0,kh:()=>rJ,ka:()=>nJ,ja:()=>iJ,it:()=>yJ,is:()=>kJ,id:()=>xJ,hy:()=>fJ,hu:()=>CJ,he:()=>EJ,frCA:()=>wJ,fr:()=>SJ,fi:()=>FJ,fa:()=>jJ,es:()=>bJ,eo:()=>AJ,en:()=>J0,de:()=>ZJ,da:()=>WJ,cs:()=>PJ,ca:()=>LJ,bg:()=>KJ,be:()=>RJ,az:()=>MJ,ar:()=>BJ});var nA=()=>{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`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${L(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?"ة":""}: ${L(u.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${u.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${u.origin}`;default:return"مدخل غير مقبول"}}};function BJ(){return{localeError:nA()}}var rA=()=>{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: ${L(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":""}: ${L(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 MJ(){return{localeError:rA()}}function c5($,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 lA=()=>{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`Няправільны варыянт: чакаўся адзін з ${L(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z){let v=Number(u.maximum),J=c5(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=c5(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?"ключы":"ключ"}: ${L(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:"символа",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`Невалидна опция: очаквано едно от ${L(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?"ове":""}: ${L(u.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${u.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${u.origin}`;default:return"Невалиден вход"}}};function KJ(){return{localeError:mA()}}var hA=()=>{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 ${L(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":""}: ${L(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 LJ(){return{localeError:hA()}}var cA=()=>{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 ${L(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: ${L(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 PJ(){return{localeError:cA()}}var dA=()=>{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 ${L(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"}: ${L(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 WJ(){return{localeError:dA()}}var pA=()=>{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 ${L(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"}: ${L(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 ZJ(){return{localeError:pA()}}var oA=()=>{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 ${L(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":""}: ${L(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 J0(){return{localeError:oA()}}var tA=()=>{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 ${L(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":""}: ${L(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 AJ(){return{localeError:tA()}}var aA=()=>{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 ${L(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":""}: ${L(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 bJ(){return{localeError:aA()}}var eA=()=>{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`گزینه نامعتبر: میبایست یکی از ${L(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?"های":""} ناشناس: ${L(u.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${u.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${u.origin}`;default:return"ورودی نامعتبر"}}};function jJ(){return{localeError:eA()}}var sA=()=>{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: ${L(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"}: ${L(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 FJ(){return{localeError:sA()}}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 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 ${L(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":""} : ${L(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 SJ(){return{localeError:$b()}}var Ib=()=>{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 ${L(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":""} : ${L(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 wJ(){return{localeError:Ib()}}var ub=()=>{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?"ים":"ה"}: ${L(N.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${u(N.origin??"array")}`;default:return"קלט לא תקין"}}};function EJ(){return{localeError:ub()}}var Ub=()=>{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 ${L(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":""}: ${L(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 CJ(){return{localeError:Ub()}}function d5($,I,U){return Math.abs($)===1?I:U}function x1($){if(!$)return"";let I=["ա","ե","ը","ի","ո","ու","օ"],U=$[$.length-1];return $+(I.includes(U)?"ն":"ը")}var _b=()=>{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`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${L(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z){let v=Number(u.maximum),J=d5(v,z.unit.one,z.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${x1(u.origin??"արժեք")} կունենա ${g}${u.maximum.toString()} ${J}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${x1(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=d5(v,z.unit.one,z.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${x1(u.origin)} կունենա ${g}${u.minimum.toString()} ${J}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${x1(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?"ներ":""}. ${L(u.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${x1(u.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${x1(u.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};function fJ(){return{localeError:_b()}}var gb=()=>{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 ${L(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":""}: ${L(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 xJ(){return{localeError:gb()}}var zb=()=>{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 ${L(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"}: ${L(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 kJ(){return{localeError:zb()}}var vb=()=>{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 ${L(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"}: ${L(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 yJ(){return{localeError:vb()}}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:"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`無効な選択: ${L(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?"群":""}: ${L(u.keys,"、")}`;case"invalid_key":return`${u.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${u.origin}内の無効な値`;default:return"無効な入力"}}};function iJ(){return{localeError:Jb()}}var Nb=()=>{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`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${L(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?"ები":"ი"}: ${L(u.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${u.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${u.origin}-ში`;default:return"არასწორი შეყვანა"}}};function nJ(){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:"អារេ (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`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${L(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`រកឃើញសោមិនស្គាល់៖ ${L(u.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${u.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${u.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function N0(){return{localeError:Gb()}}function rJ(){return N0()}var Xb=()=>{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`잘못된 옵션: ${L(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`인식할 수 없는 키: ${L(u.keys,", ")}`;case"invalid_key":return`잘못된 키: ${u.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${u.origin}`;default:return"잘못된 입력"}}};function lJ(){return{localeError:Xb()}}var G0=($)=>{return $.charAt(0).toUpperCase()+$.slice(1)};function p5($){let I=Math.abs($),U=I%10,_=I%100;if(_>=11&&_<=19||U===0)return"many";if(U===1)return"one";return"few"}var qb=()=>{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š ${L(u.values,"|")} pasirinkimų`;case"too_big":{let g=_[u.origin]??u.origin,z=I(u.origin,p5(Number(u.maximum)),u.inclusive??!1,"smaller");if(z?.verb)return`${G0(g??u.origin??"reikšmė")} ${z.verb} ${u.maximum.toString()} ${z.unit??"elementų"}`;let v=u.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${G0(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,p5(Number(u.minimum)),u.inclusive??!1,"bigger");if(z?.verb)return`${G0(g??u.origin??"reikšmė")} ${z.verb} ${u.minimum.toString()} ${z.unit??"elementų"}`;let v=u.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${G0(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"}: ${L(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`${G0(g??u.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function mJ(){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:"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`Грешана опција: се очекува една ${L(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?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${L(u.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${u.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${u.origin}`;default:return"Грешен внес"}}};function hJ(){return{localeError:Qb()}}var Tb=()=>{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 ${L(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: ${L(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 cJ(){return{localeError:Tb()}}var Hb=()=>{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 ${L(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":""}: ${L(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 dJ(){return{localeError:Hb()}}var Yb=()=>{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 ${L(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"}: ${L(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 pJ(){return{localeError:Yb()}}var Ob=()=>{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 ${L(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":""}: ${L(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 oJ(){return{localeError:Ob()}}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`ناسم انتخاب: باید یو له ${L(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?"کلیډونه":"کلیډ"}: ${L(u.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${u.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${u.origin} کې`;default:return"ناسمه ورودي"}}};function tJ(){return{localeError:Db()}}var Vb=()=>{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 ${L(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":""}: ${L(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 aJ(){return{localeError:Vb()}}var Bb=()=>{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 ${L(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":""}: ${L(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 eJ(){return{localeError:Bb()}}function o5($,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 Mb=()=>{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`Неверный вариант: ожидалось одно из ${L(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z){let v=Number(u.maximum),J=o5(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=o5(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?"и":""}: ${L(u.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${u.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${u.origin}`;default:return"Неверные входные данные"}}};function sJ(){return{localeError:Mb()}}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 ${L(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č"}: ${L(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 Kb=()=>{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 ${L(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"}: ${L(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 IN(){return{localeError:Kb()}}var Lb=()=>{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`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${L(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?"கள்":""}: ${L(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 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:"อิโมจิ",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`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${L(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`พบคีย์ที่ไม่รู้จัก: ${L(u.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${u.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${u.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function UN(){return{localeError:Pb()}}var Wb=()=>{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ı: ${L(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":""}: ${L(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 _N(){return{localeError:Wb()}}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:"діапазон 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`Неправильна опція: очікується одне з ${L(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?"і":""}: ${L(u.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${u.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${u.origin}`;default:return"Неправильні вхідні дані"}}};function X0(){return{localeError:Zb()}}function gN(){return X0()}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:"یو آر ایل",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`غلط آپشن: ${L(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?"ز":""}: ${L(u.keys,"، ")}`;case"invalid_key":return`${u.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${u.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function zN(){return{localeError:Ab()}}var bb=()=>{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 ${L(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":""}: ${L(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 vN(){return{localeError:bb()}}var jb=()=>{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ị ${L(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: ${L(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 JN(){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:"数组",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`无效选项:期望以下之一 ${L(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): ${L(u.keys,", ")}`;case"invalid_key":return`${u.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${u.origin} 中包含无效值(value)`;default:return"无效输入"}}};function NN(){return{localeError:Fb()}}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:"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`無效的選項:預期為以下其中之一 ${L(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?"們":""}:${L(u.keys,"、")}`;case"invalid_key":return`${u.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${u.origin} 中有無效的值`;default:return"無效的輸入值"}}};function GN(){return{localeError:Sb()}}var wb=()=>{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 ${L(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ọ̀: ${L(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 XN(){return{localeError:wb()}}var t5,qN=Symbol("ZodOutput"),QN=Symbol("ZodInput");class TN{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 HU(){return new TN}(t5=globalThis).__zod_globalRegistry??(t5.__zod_globalRegistry=HU());var w$=globalThis.__zod_globalRegistry;function HN($,I){return new $({type:"string",...C(I)})}function YN($,I){return new $({type:"string",coerce:!0,...C(I)})}function YU($,I){return new $({type:"string",format:"email",check:"string_format",abort:!1,...C(I)})}function Q0($,I){return new $({type:"string",format:"guid",check:"string_format",abort:!1,...C(I)})}function OU($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,...C(I)})}function DU($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...C(I)})}function VU($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...C(I)})}function BU($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...C(I)})}function T0($,I){return new $({type:"string",format:"url",check:"string_format",abort:!1,...C(I)})}function MU($,I){return new $({type:"string",format:"emoji",check:"string_format",abort:!1,...C(I)})}function RU($,I){return new $({type:"string",format:"nanoid",check:"string_format",abort:!1,...C(I)})}function KU($,I){return new $({type:"string",format:"cuid",check:"string_format",abort:!1,...C(I)})}function LU($,I){return new $({type:"string",format:"cuid2",check:"string_format",abort:!1,...C(I)})}function PU($,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 ZU($,I){return new $({type:"string",format:"ksuid",check:"string_format",abort:!1,...C(I)})}function AU($,I){return new $({type:"string",format:"ipv4",check:"string_format",abort:!1,...C(I)})}function bU($,I){return new $({type:"string",format:"ipv6",check:"string_format",abort:!1,...C(I)})}function ON($,I){return new $({type:"string",format:"mac",check:"string_format",abort:!1,...C(I)})}function jU($,I){return new $({type:"string",format:"cidrv4",check:"string_format",abort:!1,...C(I)})}function FU($,I){return new $({type:"string",format:"cidrv6",check:"string_format",abort:!1,...C(I)})}function SU($,I){return new $({type:"string",format:"base64",check:"string_format",abort:!1,...C(I)})}function wU($,I){return new $({type:"string",format:"base64url",check:"string_format",abort:!1,...C(I)})}function EU($,I){return new $({type:"string",format:"e164",check:"string_format",abort:!1,...C(I)})}function CU($,I){return new $({type:"string",format:"jwt",check:"string_format",abort:!1,...C(I)})}var DN={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function VN($,I){return new $({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...C(I)})}function BN($,I){return new $({type:"string",format:"date",check:"string_format",...C(I)})}function MN($,I){return new $({type:"string",format:"time",check:"string_format",precision:null,...C(I)})}function RN($,I){return new $({type:"string",format:"duration",check:"string_format",...C(I)})}function KN($,I){return new $({type:"number",checks:[],...C(I)})}function LN($,I){return new $({type:"number",coerce:!0,checks:[],...C(I)})}function PN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"safeint",...C(I)})}function WN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"float32",...C(I)})}function ZN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"float64",...C(I)})}function AN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"int32",...C(I)})}function bN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"uint32",...C(I)})}function jN($,I){return new $({type:"boolean",...C(I)})}function FN($,I){return new $({type:"boolean",coerce:!0,...C(I)})}function SN($,I){return new $({type:"bigint",...C(I)})}function wN($,I){return new $({type:"bigint",coerce:!0,...C(I)})}function EN($,I){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...C(I)})}function CN($,I){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...C(I)})}function fN($,I){return new $({type:"symbol",...C(I)})}function xN($,I){return new $({type:"undefined",...C(I)})}function kN($,I){return new $({type:"null",...C(I)})}function yN($){return new $({type:"any"})}function iN($){return new $({type:"unknown"})}function nN($,I){return new $({type:"never",...C(I)})}function rN($,I){return new $({type:"void",...C(I)})}function lN($,I){return new $({type:"date",...C(I)})}function mN($,I){return new $({type:"date",coerce:!0,...C(I)})}function hN($,I){return new $({type:"nan",...C(I)})}function w4($,I){return new UU({check:"less_than",...C(I),value:$,inclusive:!1})}function u4($,I){return new UU({check:"less_than",...C(I),value:$,inclusive:!0})}function E4($,I){return new _U({check:"greater_than",...C(I),value:$,inclusive:!1})}function r$($,I){return new _U({check:"greater_than",...C(I),value:$,inclusive:!0})}function fU($){return E4(0,$)}function xU($){return w4(0,$)}function kU($){return u4(0,$)}function yU($){return r$(0,$)}function B6($,I){return new hz({check:"multiple_of",...C(I),value:$})}function M6($,I){return new pz({check:"max_size",...C(I),maximum:$})}function C4($,I){return new oz({check:"min_size",...C(I),minimum:$})}function p6($,I){return new tz({check:"size_equals",...C(I),size:$})}function o6($,I){return new az({check:"max_length",...C(I),maximum:$})}function d4($,I){return new ez({check:"min_length",...C(I),minimum:$})}function t6($,I){return new sz({check:"length_equals",...C(I),length:$})}function k1($,I){return new $v({check:"string_format",format:"regex",...C(I),pattern:$})}function y1($){return new Iv({check:"string_format",format:"lowercase",...C($)})}function i1($){return new uv({check:"string_format",format:"uppercase",...C($)})}function n1($,I){return new Uv({check:"string_format",format:"includes",...C(I),includes:$})}function r1($,I){return new _v({check:"string_format",format:"starts_with",...C(I),prefix:$})}function l1($,I){return new gv({check:"string_format",format:"ends_with",...C(I),suffix:$})}function iU($,I,U){return new zv({check:"property",property:$,schema:I,...C(U)})}function m1($,I){return new vv({check:"mime_type",mime:$,...C(I)})}function B4($){return new Jv({check:"overwrite",tx:$})}function h1($){return B4((I)=>I.normalize($))}function c1(){return B4(($)=>$.trim())}function d1(){return B4(($)=>$.toLowerCase())}function p1(){return B4(($)=>$.toUpperCase())}function o1(){return B4(($)=>zz($))}function cN($,I,U){return new $({type:"array",element:I,...C(U)})}function Cb($,I,U){return new $({type:"union",options:I,...C(U)})}function fb($,I,U){return new $({type:"union",options:I,inclusive:!1,...C(U)})}function xb($,I,U,_){return new $({type:"union",options:U,discriminator:I,...C(_)})}function kb($,I,U){return new $({type:"intersection",left:I,right:U})}function yb($,I,U,_){let u=U instanceof l;return new $({type:"tuple",items:I,rest:u?U:null,...C(u?_:U)})}function ib($,I,U,_){return new $({type:"record",keyType:I,valueType:U,...C(_)})}function nb($,I,U,_){return new $({type:"map",keyType:I,valueType:U,...C(_)})}function rb($,I,U){return new $({type:"set",valueType:I,...C(U)})}function lb($,I,U){let _=Array.isArray(I)?Object.fromEntries(I.map((u)=>[u,u])):I;return new $({type:"enum",entries:_,...C(U)})}function mb($,I,U){return new $({type:"enum",entries:I,...C(U)})}function hb($,I,U){return new $({type:"literal",values:Array.isArray(I)?I:[I],...C(U)})}function dN($,I){return new $({type:"file",...C(I)})}function cb($,I){return new $({type:"transform",transform:I})}function db($,I){return new $({type:"optional",innerType:I})}function pb($,I){return new $({type:"nullable",innerType:I})}function ob($,I,U){return new $({type:"default",innerType:I,get defaultValue(){return typeof U==="function"?U():Jz(U)}})}function tb($,I,U){return new $({type:"nonoptional",innerType:I,...C(U)})}function ab($,I){return new $({type:"success",innerType:I})}function eb($,I,U){return new $({type:"catch",innerType:I,catchValue:typeof U==="function"?U:()=>U})}function sb($,I,U){return new $({type:"pipe",in:I,out:U})}function $j($,I){return new $({type:"readonly",innerType:I})}function Ij($,I,U){return new $({type:"template_literal",parts:I,...C(U)})}function uj($,I){return new $({type:"lazy",getter:I})}function Uj($,I){return new $({type:"promise",innerType:I})}function pN($,I,U){let _=C(U);return _.abort??(_.abort=!0),new $({type:"custom",check:"custom",fn:I,..._})}function oN($,I,U){return new $({type:"custom",check:"custom",fn:I,...C(U)})}function tN($){let I=a5((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 a5($,I){let U=new G$({check:"custom",...C(I)});return U._zod.check=$,U}function aN($){let I=new G$({check:"describe"});return I._zod.onattach=[(U)=>{let _=w$.get(U)??{};w$.add(U,{..._,description:$})}],I._zod.check=()=>{},I}function eN($){let I=new G$({check:"meta"});return I._zod.onattach=[(U)=>{let _=w$.get(U)??{};w$.add(U,{..._,...$})}],I._zod.check=()=>{},I}function sN($,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??v0,J=$.Boolean??g0,X=new($.String??d6)({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 t1($,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"&&l$($))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 K6($,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>
|
|
310
335
|
|
|
311
|
-
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 R6($,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:o1(I,"input",$.processors),output:o1(I,"output",$.processors)}},enumerable:!1,writable:!1}),z}catch(z){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 tN=($,I={})=>(U)=>{let _=B6({...U,processors:I});return _$($,_),M6(_,$),R6(_,$)},o1=($,I,U={})=>(_)=>{let{libraryOptions:u,target:g}=_??{},z=B6({...u??{},target:g,io:I,processors:U});return _$($,z),M6(z,$),R6(z,$)};var ob={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},aN=($,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=ob[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}))]}},eN=($,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},sN=($,I,U,_)=>{U.type="boolean"},$8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},I8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},u8=($,I,U,_)=>{if(I.target==="openapi-3.0")U.type="string",U.nullable=!0,U.enum=[null];else U.type="null"},U8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},_8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},g8=($,I,U,_)=>{U.not={}},z8=($,I,U,_)=>{},v8=($,I,U,_)=>{},J8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},N8=($,I,U,_)=>{let u=$._zod.def,g=cI(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},G8=($,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}},X8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},q8=($,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},Q8=($,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)},T8=($,I,U,_)=>{U.type="boolean"},H8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},Y8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},O8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},D8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},V8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},B8=($,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"]})},M8=($,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"]})},iU=($,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},R8=($,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},K8=($,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},L8=($,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}},P8=($,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"}]},W8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let g=I.seen.get($);g.ref=u.innerType},Z8=($,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))},A8=($,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))},b8=($,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},j8=($,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},F8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let g=I.seen.get($);g.ref=u.innerType,U.readOnly=!0},S8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let g=I.seen.get($);g.ref=u.innerType},nU=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let g=I.seen.get($);g.ref=u.innerType},w8=($,I,U,_)=>{let u=$._zod.innerType;_$(u,I,_);let g=I.seen.get($);g.ref=u},yU={string:aN,number:eN,boolean:sN,bigint:$8,symbol:I8,null:u8,undefined:U8,void:_8,never:g8,any:z8,unknown:v8,date:J8,enum:N8,literal:G8,nan:X8,template_literal:q8,file:Q8,success:T8,custom:H8,function:Y8,transform:O8,map:D8,set:V8,array:B8,object:M8,union:iU,intersection:R8,tuple:K8,record:L8,nullable:P8,nonoptional:W8,default:Z8,prefault:A8,catch:b8,pipe:j8,readonly:F8,promise:S8,optional:nU,lazy:w8};function rU($,I){if("_idmap"in $){let _=$,u=B6({...I,processors:yU}),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;M6(u,X),z[N]=R6(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=B6({...I,processors:yU});return _$($,U),M6(U,$),R6(U,$)}class E8{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=B6({processors:yU,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}M6(this.ctx,$);let U=R6(this.ctx,$),{"~standard":_,...u}=U;return u}}var m5={};var Q0={};A4(Q0,{xor:()=>fQ,xid:()=>gQ,void:()=>jQ,uuidv7:()=>a5,uuidv6:()=>t5,uuidv4:()=>o5,uuid:()=>p5,url:()=>e5,unknown:()=>o6,union:()=>H_,undefined:()=>AQ,ulid:()=>_Q,uint64:()=>WQ,uint32:()=>KQ,tuple:()=>T3,transform:()=>O_,templateLiteral:()=>oQ,symbol:()=>ZQ,superRefine:()=>n3,success:()=>cQ,stringbool:()=>U7,stringFormat:()=>YQ,string:()=>pU,strictObject:()=>EQ,set:()=>nQ,refine:()=>i3,record:()=>H3,readonly:()=>E3,promise:()=>tQ,preprocess:()=>g7,prefault:()=>Z3,pipe:()=>O0,partialRecord:()=>kQ,optional:()=>H0,object:()=>wQ,number:()=>e8,nullish:()=>hQ,nullable:()=>Y0,null:()=>U3,nonoptional:()=>A3,never:()=>T_,nativeEnum:()=>rQ,nanoid:()=>IQ,nan:()=>dQ,meta:()=>I7,map:()=>iQ,mac:()=>JQ,looseRecord:()=>yQ,looseObject:()=>CQ,literal:()=>lQ,lazy:()=>x3,ksuid:()=>zQ,keyof:()=>SQ,jwt:()=>HQ,json:()=>_7,ipv6:()=>NQ,ipv4:()=>vQ,intersection:()=>q3,int64:()=>PQ,int32:()=>RQ,int:()=>oU,instanceof:()=>u7,httpUrl:()=>s5,hostname:()=>OQ,hex:()=>DQ,hash:()=>VQ,guid:()=>d5,function:()=>aQ,float64:()=>MQ,float32:()=>BQ,file:()=>mQ,exactOptional:()=>R3,enum:()=>Y_,emoji:()=>$Q,email:()=>c5,e164:()=>TQ,discriminatedUnion:()=>xQ,describe:()=>$7,date:()=>FQ,custom:()=>sQ,cuid2:()=>UQ,cuid:()=>uQ,codec:()=>pQ,cidrv6:()=>XQ,cidrv4:()=>GQ,check:()=>eQ,catch:()=>F3,boolean:()=>s8,bigint:()=>LQ,base64url:()=>QQ,base64:()=>qQ,array:()=>B0,any:()=>bQ,_function:()=>aQ,_default:()=>P3,_ZodString:()=>tU,ZodXor:()=>N3,ZodXID:()=>U_,ZodVoid:()=>v3,ZodUnknown:()=>g3,ZodUnion:()=>R0,ZodUndefined:()=>I3,ZodUUID:()=>C4,ZodURL:()=>D0,ZodULID:()=>u_,ZodType:()=>c,ZodTuple:()=>Q3,ZodTransform:()=>B3,ZodTemplateLiteral:()=>C3,ZodSymbol:()=>$3,ZodSuccess:()=>b3,ZodStringFormat:()=>J$,ZodString:()=>e1,ZodSet:()=>O3,ZodRecord:()=>K0,ZodReadonly:()=>w3,ZodPromise:()=>k3,ZodPrefault:()=>W3,ZodPipe:()=>B_,ZodOptional:()=>D_,ZodObject:()=>M0,ZodNumberFormat:()=>t6,ZodNumber:()=>$I,ZodNullable:()=>K3,ZodNull:()=>u3,ZodNonOptional:()=>V_,ZodNever:()=>z3,ZodNanoID:()=>sU,ZodNaN:()=>S3,ZodMap:()=>Y3,ZodMAC:()=>a8,ZodLiteral:()=>D3,ZodLazy:()=>f3,ZodKSUID:()=>__,ZodJWT:()=>q_,ZodIntersection:()=>X3,ZodIPv6:()=>z_,ZodIPv4:()=>g_,ZodGUID:()=>T0,ZodFunction:()=>y3,ZodFile:()=>V3,ZodExactOptional:()=>M3,ZodEnum:()=>a1,ZodEmoji:()=>eU,ZodEmail:()=>aU,ZodE164:()=>X_,ZodDiscriminatedUnion:()=>G3,ZodDefault:()=>L3,ZodDate:()=>V0,ZodCustomStringFormat:()=>s1,ZodCustom:()=>L0,ZodCodec:()=>M_,ZodCatch:()=>j3,ZodCUID2:()=>I_,ZodCUID:()=>$_,ZodCIDRv6:()=>J_,ZodCIDRv4:()=>v_,ZodBoolean:()=>II,ZodBigIntFormat:()=>Q_,ZodBigInt:()=>uI,ZodBase64URL:()=>G_,ZodBase64:()=>N_,ZodArray:()=>J3,ZodAny:()=>_3});var lU={};A4(lU,{uppercase:()=>k1,trim:()=>m1,toUpperCase:()=>c1,toLowerCase:()=>h1,startsWith:()=>i1,slugify:()=>d1,size:()=>c6,regex:()=>f1,property:()=>kU,positive:()=>EU,overwrite:()=>D4,normalize:()=>l1,nonpositive:()=>fU,nonnegative:()=>xU,negative:()=>CU,multipleOf:()=>D6,minSize:()=>E4,minLength:()=>c4,mime:()=>r1,maxSize:()=>V6,maxLength:()=>d6,lte:()=>I4,lt:()=>S4,lowercase:()=>x1,length:()=>p6,includes:()=>y1,gte:()=>r$,gt:()=>w4,endsWith:()=>n1});var t1={};A4(t1,{time:()=>x8,duration:()=>k8,datetime:()=>C8,date:()=>f8,ZodISOTime:()=>cU,ZodISODuration:()=>dU,ZodISODateTime:()=>mU,ZodISODate:()=>hU});var mU=D("ZodISODateTime",($,I)=>{Dv.init($,I),J$.init($,I)});function C8($){return HN(mU,$)}var hU=D("ZodISODate",($,I)=>{Vv.init($,I),J$.init($,I)});function f8($){return YN(hU,$)}var cU=D("ZodISOTime",($,I)=>{Bv.init($,I),J$.init($,I)});function x8($){return ON(cU,$)}var dU=D("ZodISODuration",($,I)=>{Mv.init($,I),J$.init($,I)});function k8($){return DN(dU,$)}var h5=($,I)=>{aI.init($,I),$.name="ZodError",Object.defineProperties($,{format:{value:(U)=>sI($,U)},flatten:{value:(U)=>eI($,U)},addIssue:{value:(U)=>{$.issues.push(U),$.message=JSON.stringify($.issues,Z1,2)}},addIssues:{value:(U)=>{$.issues.push(...U),$.message=JSON.stringify($.issues,Z1,2)}},isEmpty:{get(){return $.issues.length===0}}})},ab=D("ZodError",h5),t$=D("ZodError",h5,{Parent:Error});var y8=j1(t$),i8=F1(t$),n8=S1(t$),r8=w1(t$),l8=cu(t$),m8=du(t$),h8=pu(t$),c8=ou(t$),d8=tu(t$),p8=au(t$),o8=eu(t$),t8=su(t$);var c=D("ZodType",($,I)=>{return l.init($,I),Object.assign($["~standard"],{jsonSchema:{input:o1($,"input"),output:o1($,"output")}}),$.toJSONSchema=tN($,{}),$.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,_)=>y8($,U,_,{callee:$.parse}),$.safeParse=(U,_)=>n8($,U,_),$.parseAsync=async(U,_)=>i8($,U,_,{callee:$.parseAsync}),$.safeParseAsync=async(U,_)=>r8($,U,_),$.spa=$.safeParseAsync,$.encode=(U,_)=>l8($,U,_),$.decode=(U,_)=>m8($,U,_),$.encodeAsync=async(U,_)=>h8($,U,_),$.decodeAsync=async(U,_)=>c8($,U,_),$.safeEncode=(U,_)=>d8($,U,_),$.safeDecode=(U,_)=>p8($,U,_),$.safeEncodeAsync=async(U,_)=>o8($,U,_),$.safeDecodeAsync=async(U,_)=>t8($,U,_),$.refine=(U,_)=>$.check(i3(U,_)),$.superRefine=(U)=>$.check(n3(U)),$.overwrite=(U)=>$.check(D4(U)),$.optional=()=>H0($),$.exactOptional=()=>R3($),$.nullable=()=>Y0($),$.nullish=()=>H0(Y0($)),$.nonoptional=(U)=>A3($,U),$.array=()=>B0($),$.or=(U)=>H_([$,U]),$.and=(U)=>q3($,U),$.transform=(U)=>O0($,O_(U)),$.default=(U)=>P3($,U),$.prefault=(U)=>Z3($,U),$.catch=(U)=>F3($,U),$.pipe=(U)=>O0($,U),$.readonly=()=>E3($),$.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($),$}),tU=D("_ZodString",($,I)=>{h6.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,g)=>aN($,_,u,g);let U=$._zod.bag;$.format=U.format??null,$.minLength=U.minimum??null,$.maxLength=U.maximum??null,$.regex=(..._)=>$.check(f1(..._)),$.includes=(..._)=>$.check(y1(..._)),$.startsWith=(..._)=>$.check(i1(..._)),$.endsWith=(..._)=>$.check(n1(..._)),$.min=(..._)=>$.check(c4(..._)),$.max=(..._)=>$.check(d6(..._)),$.length=(..._)=>$.check(p6(..._)),$.nonempty=(..._)=>$.check(c4(1,..._)),$.lowercase=(_)=>$.check(x1(_)),$.uppercase=(_)=>$.check(k1(_)),$.trim=()=>$.check(m1()),$.normalize=(..._)=>$.check(l1(..._)),$.toLowerCase=()=>$.check(h1()),$.toUpperCase=()=>$.check(c1()),$.slugify=()=>$.check(d1())}),e1=D("ZodString",($,I)=>{h6.init($,I),tU.init($,I),$.email=(U)=>$.check(TU(aU,U)),$.url=(U)=>$.check(q0(D0,U)),$.jwt=(U)=>$.check(wU(q_,U)),$.emoji=(U)=>$.check(VU(eU,U)),$.guid=(U)=>$.check(X0(T0,U)),$.uuid=(U)=>$.check(HU(C4,U)),$.uuidv4=(U)=>$.check(YU(C4,U)),$.uuidv6=(U)=>$.check(OU(C4,U)),$.uuidv7=(U)=>$.check(DU(C4,U)),$.nanoid=(U)=>$.check(BU(sU,U)),$.guid=(U)=>$.check(X0(T0,U)),$.cuid=(U)=>$.check(MU($_,U)),$.cuid2=(U)=>$.check(RU(I_,U)),$.ulid=(U)=>$.check(KU(u_,U)),$.base64=(U)=>$.check(jU(N_,U)),$.base64url=(U)=>$.check(FU(G_,U)),$.xid=(U)=>$.check(LU(U_,U)),$.ksuid=(U)=>$.check(PU(__,U)),$.ipv4=(U)=>$.check(WU(g_,U)),$.ipv6=(U)=>$.check(ZU(z_,U)),$.cidrv4=(U)=>$.check(AU(v_,U)),$.cidrv6=(U)=>$.check(bU(J_,U)),$.e164=(U)=>$.check(SU(X_,U)),$.datetime=(U)=>$.check(C8(U)),$.date=(U)=>$.check(f8(U)),$.time=(U)=>$.check(x8(U)),$.duration=(U)=>$.check(k8(U))});function pU($){return XN(e1,$)}var J$=D("ZodStringFormat",($,I)=>{v$.init($,I),tU.init($,I)}),aU=D("ZodEmail",($,I)=>{Nv.init($,I),J$.init($,I)});function c5($){return TU(aU,$)}var T0=D("ZodGUID",($,I)=>{vv.init($,I),J$.init($,I)});function d5($){return X0(T0,$)}var C4=D("ZodUUID",($,I)=>{Jv.init($,I),J$.init($,I)});function p5($){return HU(C4,$)}function o5($){return YU(C4,$)}function t5($){return OU(C4,$)}function a5($){return DU(C4,$)}var D0=D("ZodURL",($,I)=>{Gv.init($,I),J$.init($,I)});function e5($){return q0(D0,$)}function s5($){return q0(D0,{protocol:/^https?$/,hostname:X4.domain,...w.normalizeParams($)})}var eU=D("ZodEmoji",($,I)=>{Xv.init($,I),J$.init($,I)});function $Q($){return VU(eU,$)}var sU=D("ZodNanoID",($,I)=>{qv.init($,I),J$.init($,I)});function IQ($){return BU(sU,$)}var $_=D("ZodCUID",($,I)=>{Qv.init($,I),J$.init($,I)});function uQ($){return MU($_,$)}var I_=D("ZodCUID2",($,I)=>{Tv.init($,I),J$.init($,I)});function UQ($){return RU(I_,$)}var u_=D("ZodULID",($,I)=>{Hv.init($,I),J$.init($,I)});function _Q($){return KU(u_,$)}var U_=D("ZodXID",($,I)=>{Yv.init($,I),J$.init($,I)});function gQ($){return LU(U_,$)}var __=D("ZodKSUID",($,I)=>{Ov.init($,I),J$.init($,I)});function zQ($){return PU(__,$)}var g_=D("ZodIPv4",($,I)=>{Rv.init($,I),J$.init($,I)});function vQ($){return WU(g_,$)}var a8=D("ZodMAC",($,I)=>{Lv.init($,I),J$.init($,I)});function JQ($){return QN(a8,$)}var z_=D("ZodIPv6",($,I)=>{Kv.init($,I),J$.init($,I)});function NQ($){return ZU(z_,$)}var v_=D("ZodCIDRv4",($,I)=>{Pv.init($,I),J$.init($,I)});function GQ($){return AU(v_,$)}var J_=D("ZodCIDRv6",($,I)=>{Wv.init($,I),J$.init($,I)});function XQ($){return bU(J_,$)}var N_=D("ZodBase64",($,I)=>{Av.init($,I),J$.init($,I)});function qQ($){return jU(N_,$)}var G_=D("ZodBase64URL",($,I)=>{bv.init($,I),J$.init($,I)});function QQ($){return FU(G_,$)}var X_=D("ZodE164",($,I)=>{jv.init($,I),J$.init($,I)});function TQ($){return SU(X_,$)}var q_=D("ZodJWT",($,I)=>{Fv.init($,I),J$.init($,I)});function HQ($){return wU(q_,$)}var s1=D("ZodCustomStringFormat",($,I)=>{Sv.init($,I),J$.init($,I)});function YQ($,I,U={}){return p1(s1,$,I,U)}function OQ($){return p1(s1,"hostname",X4.hostname,$)}function DQ($){return p1(s1,"hex",X4.hex,$)}function VQ($,I){let U=I?.enc??"hex",_=`${$}_${U}`,u=X4[_];if(!u)throw Error(`Unrecognized hash format: ${_}`);return p1(s1,_,u,I)}var $I=D("ZodNumber",($,I)=>{NU.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,g)=>eN($,_,u,g),$.gt=(_,u)=>$.check(w4(_,u)),$.gte=(_,u)=>$.check(r$(_,u)),$.min=(_,u)=>$.check(r$(_,u)),$.lt=(_,u)=>$.check(S4(_,u)),$.lte=(_,u)=>$.check(I4(_,u)),$.max=(_,u)=>$.check(I4(_,u)),$.int=(_)=>$.check(oU(_)),$.safe=(_)=>$.check(oU(_)),$.positive=(_)=>$.check(w4(0,_)),$.nonnegative=(_)=>$.check(r$(0,_)),$.negative=(_)=>$.check(S4(0,_)),$.nonpositive=(_)=>$.check(I4(0,_)),$.multipleOf=(_,u)=>$.check(D6(_,u)),$.step=(_,u)=>$.check(D6(_,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 e8($){return VN($I,$)}var t6=D("ZodNumberFormat",($,I)=>{wv.init($,I),$I.init($,I)});function oU($){return MN(t6,$)}function BQ($){return RN(t6,$)}function MQ($){return KN(t6,$)}function RQ($){return LN(t6,$)}function KQ($){return PN(t6,$)}var II=D("ZodBoolean",($,I)=>{U0.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>sN($,U,_,u)});function s8($){return WN(II,$)}var uI=D("ZodBigInt",($,I)=>{GU.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,g)=>$8($,_,u,g),$.gte=(_,u)=>$.check(r$(_,u)),$.min=(_,u)=>$.check(r$(_,u)),$.gt=(_,u)=>$.check(w4(_,u)),$.gte=(_,u)=>$.check(r$(_,u)),$.min=(_,u)=>$.check(r$(_,u)),$.lt=(_,u)=>$.check(S4(_,u)),$.lte=(_,u)=>$.check(I4(_,u)),$.max=(_,u)=>$.check(I4(_,u)),$.positive=(_)=>$.check(w4(BigInt(0),_)),$.negative=(_)=>$.check(S4(BigInt(0),_)),$.nonpositive=(_)=>$.check(I4(BigInt(0),_)),$.nonnegative=(_)=>$.check(r$(BigInt(0),_)),$.multipleOf=(_,u)=>$.check(D6(_,u));let U=$._zod.bag;$.minValue=U.minimum??null,$.maxValue=U.maximum??null,$.format=U.format??null});function LQ($){return AN(uI,$)}var Q_=D("ZodBigIntFormat",($,I)=>{Ev.init($,I),uI.init($,I)});function PQ($){return jN(Q_,$)}function WQ($){return FN(Q_,$)}var $3=D("ZodSymbol",($,I)=>{Cv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>I8($,U,_,u)});function ZQ($){return SN($3,$)}var I3=D("ZodUndefined",($,I)=>{fv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>U8($,U,_,u)});function AQ($){return wN(I3,$)}var u3=D("ZodNull",($,I)=>{xv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>u8($,U,_,u)});function U3($){return EN(u3,$)}var _3=D("ZodAny",($,I)=>{kv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>z8($,U,_,u)});function bQ(){return CN(_3)}var g3=D("ZodUnknown",($,I)=>{yv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>v8($,U,_,u)});function o6(){return fN(g3)}var z3=D("ZodNever",($,I)=>{iv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>g8($,U,_,u)});function T_($){return xN(z3,$)}var v3=D("ZodVoid",($,I)=>{nv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>_8($,U,_,u)});function jQ($){return kN(v3,$)}var V0=D("ZodDate",($,I)=>{rv.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,g)=>J8($,_,u,g),$.min=(_,u)=>$.check(r$(_,u)),$.max=(_,u)=>$.check(I4(_,u));let U=$._zod.bag;$.minDate=U.minimum?new Date(U.minimum):null,$.maxDate=U.maximum?new Date(U.maximum):null});function FQ($){return yN(V0,$)}var J3=D("ZodArray",($,I)=>{lv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>B8($,U,_,u),$.element=I.element,$.min=(U,_)=>$.check(c4(U,_)),$.nonempty=(U)=>$.check(c4(1,U)),$.max=(U,_)=>$.check(d6(U,_)),$.length=(U,_)=>$.check(p6(U,_)),$.unwrap=()=>$.element});function B0($,I){return rN(J3,$,I)}function SQ($){let I=$._zod.def.shape;return Y_(Object.keys(I))}var M0=D("ZodObject",($,I)=>{mv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>M8($,U,_,u),w.defineLazy($,"shape",()=>{return I.shape}),$.keyof=()=>Y_(Object.keys($._zod.def.shape)),$.catchall=(U)=>$.clone({...$._zod.def,catchall:U}),$.passthrough=()=>$.clone({...$._zod.def,catchall:o6()}),$.loose=()=>$.clone({...$._zod.def,catchall:o6()}),$.strict=()=>$.clone({...$._zod.def,catchall:T_()}),$.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(D_,$,U[0]),$.required=(...U)=>w.required(V_,$,U[0])});function wQ($,I){let U={type:"object",shape:$??{},...w.normalizeParams(I)};return new M0(U)}function EQ($,I){return new M0({type:"object",shape:$,catchall:T_(),...w.normalizeParams(I)})}function CQ($,I){return new M0({type:"object",shape:$,catchall:o6(),...w.normalizeParams(I)})}var R0=D("ZodUnion",($,I)=>{_0.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>iU($,U,_,u),$.options=I.options});function H_($,I){return new R0({type:"union",options:$,...w.normalizeParams(I)})}var N3=D("ZodXor",($,I)=>{R0.init($,I),hv.init($,I),$._zod.processJSONSchema=(U,_,u)=>iU($,U,_,u),$.options=I.options});function fQ($,I){return new N3({type:"union",options:$,inclusive:!1,...w.normalizeParams(I)})}var G3=D("ZodDiscriminatedUnion",($,I)=>{R0.init($,I),cv.init($,I)});function xQ($,I,U){return new G3({type:"union",options:I,discriminator:$,...w.normalizeParams(U)})}var X3=D("ZodIntersection",($,I)=>{dv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>R8($,U,_,u)});function q3($,I){return new X3({type:"intersection",left:$,right:I})}var Q3=D("ZodTuple",($,I)=>{XU.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>K8($,U,_,u),$.rest=(U)=>$.clone({...$._zod.def,rest:U})});function T3($,I,U){let _=I instanceof l,u=_?U:I;return new Q3({type:"tuple",items:$,rest:_?I:null,...w.normalizeParams(u)})}var K0=D("ZodRecord",($,I)=>{pv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>L8($,U,_,u),$.keyType=I.keyType,$.valueType=I.valueType});function H3($,I,U){return new K0({type:"record",keyType:$,valueType:I,...w.normalizeParams(U)})}function kQ($,I,U){let _=n$($);return _._zod.values=void 0,new K0({type:"record",keyType:_,valueType:I,...w.normalizeParams(U)})}function yQ($,I,U){return new K0({type:"record",keyType:$,valueType:I,mode:"loose",...w.normalizeParams(U)})}var Y3=D("ZodMap",($,I)=>{ov.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>D8($,U,_,u),$.keyType=I.keyType,$.valueType=I.valueType,$.min=(...U)=>$.check(E4(...U)),$.nonempty=(U)=>$.check(E4(1,U)),$.max=(...U)=>$.check(V6(...U)),$.size=(...U)=>$.check(c6(...U))});function iQ($,I,U){return new Y3({type:"map",keyType:$,valueType:I,...w.normalizeParams(U)})}var O3=D("ZodSet",($,I)=>{tv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>V8($,U,_,u),$.min=(...U)=>$.check(E4(...U)),$.nonempty=(U)=>$.check(E4(1,U)),$.max=(...U)=>$.check(V6(...U)),$.size=(...U)=>$.check(c6(...U))});function nQ($,I){return new O3({type:"set",valueType:$,...w.normalizeParams(I)})}var a1=D("ZodEnum",($,I)=>{av.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,g)=>N8($,_,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 a1({...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 a1({...I,checks:[],...w.normalizeParams(u),entries:g})}});function Y_($,I){let U=Array.isArray($)?Object.fromEntries($.map((_)=>[_,_])):$;return new a1({type:"enum",entries:U,...w.normalizeParams(I)})}function rQ($,I){return new a1({type:"enum",entries:$,...w.normalizeParams(I)})}var D3=D("ZodLiteral",($,I)=>{ev.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>G8($,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 lQ($,I){return new D3({type:"literal",values:Array.isArray($)?$:[$],...w.normalizeParams(I)})}var V3=D("ZodFile",($,I)=>{sv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>Q8($,U,_,u),$.min=(U,_)=>$.check(E4(U,_)),$.max=(U,_)=>$.check(V6(U,_)),$.mime=(U,_)=>$.check(r1(Array.isArray(U)?U:[U],_))});function mQ($){return lN(V3,$)}var B3=D("ZodTransform",($,I)=>{$J.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>O8($,U,_,u),$._zod.parse=(U,_)=>{if(_.direction==="backward")throw new r6($.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 O_($){return new B3({type:"transform",transform:$})}var D_=D("ZodOptional",($,I)=>{qU.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>nU($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function H0($){return new D_({type:"optional",innerType:$})}var M3=D("ZodExactOptional",($,I)=>{IJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>nU($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function R3($){return new M3({type:"optional",innerType:$})}var K3=D("ZodNullable",($,I)=>{uJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>P8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function Y0($){return new K3({type:"nullable",innerType:$})}function hQ($){return H0(Y0($))}var L3=D("ZodDefault",($,I)=>{UJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>Z8($,U,_,u),$.unwrap=()=>$._zod.def.innerType,$.removeDefault=$.unwrap});function P3($,I){return new L3({type:"default",innerType:$,get defaultValue(){return typeof I==="function"?I():w.shallowClone(I)}})}var W3=D("ZodPrefault",($,I)=>{_J.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>A8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function Z3($,I){return new W3({type:"prefault",innerType:$,get defaultValue(){return typeof I==="function"?I():w.shallowClone(I)}})}var V_=D("ZodNonOptional",($,I)=>{gJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>W8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function A3($,I){return new V_({type:"nonoptional",innerType:$,...w.normalizeParams(I)})}var b3=D("ZodSuccess",($,I)=>{zJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>T8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function cQ($){return new b3({type:"success",innerType:$})}var j3=D("ZodCatch",($,I)=>{vJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>b8($,U,_,u),$.unwrap=()=>$._zod.def.innerType,$.removeCatch=$.unwrap});function F3($,I){return new j3({type:"catch",innerType:$,catchValue:typeof I==="function"?I:()=>I})}var S3=D("ZodNaN",($,I)=>{JJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>X8($,U,_,u)});function dQ($){return nN(S3,$)}var B_=D("ZodPipe",($,I)=>{NJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>j8($,U,_,u),$.in=I.in,$.out=I.out});function O0($,I){return new B_({type:"pipe",in:$,out:I})}var M_=D("ZodCodec",($,I)=>{B_.init($,I),g0.init($,I)});function pQ($,I,U){return new M_({type:"pipe",in:$,out:I,transform:U.decode,reverseTransform:U.encode})}var w3=D("ZodReadonly",($,I)=>{GJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>F8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function E3($){return new w3({type:"readonly",innerType:$})}var C3=D("ZodTemplateLiteral",($,I)=>{XJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>q8($,U,_,u)});function oQ($,I){return new C3({type:"template_literal",parts:$,...w.normalizeParams(I)})}var f3=D("ZodLazy",($,I)=>{TJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>w8($,U,_,u),$.unwrap=()=>$._zod.def.getter()});function x3($){return new f3({type:"lazy",getter:$})}var k3=D("ZodPromise",($,I)=>{QJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>S8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function tQ($){return new k3({type:"promise",innerType:$})}var y3=D("ZodFunction",($,I)=>{qJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>Y8($,U,_,u)});function aQ($){return new y3({type:"function",input:Array.isArray($?.input)?T3($?.input):$?.input??B0(o6()),output:$?.output??o6()})}var L0=D("ZodCustom",($,I)=>{HJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>H8($,U,_,u)});function eQ($){let I=new G$({check:"custom"});return I._zod.check=$,I}function sQ($,I){return mN(L0,$??(()=>!0),I)}function i3($,I={}){return hN(L0,$,I)}function n3($){return cN($)}var $7=dN,I7=pN;function u7($,I={}){let U=new L0({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 U7=(...$)=>oN({Codec:M_,Boolean:II,String:e1},...$);function _7($){let I=x3(()=>{return H_([pU($),e8(),s8(),U3(),B0(I),H3(pU(),I)])});return I}function g7($,I){return O0(O_($),I)}var sb={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 $j($){R$({customError:$})}function Ij(){return R$().customError}var r3;(function($){})(r3||(r3={}));var f={...Q0,...lU,iso:t1},uj=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 Uj($,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 _j($,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 z7($,I){if($.not!==void 0){if(typeof $.not==="object"&&Object.keys($.not).length===0)return f.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 f.lazy(()=>{if(!I.refs.has(u))throw Error(`Circular reference not resolved: ${u}`);return I.refs.get(u)});I.processing.add(u);let g=_j(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 f.null();if(u.length===0)return f.never();if(u.length===1)return f.literal(u[0]);if(u.every((z)=>typeof z==="string"))return f.enum(u);let g=u.map((z)=>f.literal(z));if(g.length<2)return g[0];return f.union([g[0],g[1],...g.slice(2)])}if($.const!==void 0)return f.literal($.const);let U=$.type;if(Array.isArray(U)){let u=U.map((g)=>{let z={...$,type:g};return z7(z,I)});if(u.length===0)return f.never();if(u.length===1)return u[0];return f.union(u)}if(!U)return f.any();let _;switch(U){case"string":{let u=f.string();if($.format){let g=$.format;if(g==="email")u=u.check(f.email());else if(g==="uri"||g==="uri-reference")u=u.check(f.url());else if(g==="uuid"||g==="guid")u=u.check(f.uuid());else if(g==="date-time")u=u.check(f.iso.datetime());else if(g==="date")u=u.check(f.iso.date());else if(g==="time")u=u.check(f.iso.time());else if(g==="duration")u=u.check(f.iso.duration());else if(g==="ipv4")u=u.check(f.ipv4());else if(g==="ipv6")u=u.check(f.ipv6());else if(g==="mac")u=u.check(f.mac());else if(g==="cidr")u=u.check(f.cidrv4());else if(g==="cidr-v6")u=u.check(f.cidrv6());else if(g==="base64")u=u.check(f.base64());else if(g==="base64url")u=u.check(f.base64url());else if(g==="e164")u=u.check(f.e164());else if(g==="jwt")u=u.check(f.jwt());else if(g==="emoji")u=u.check(f.emoji());else if(g==="nanoid")u=u.check(f.nanoid());else if(g==="cuid")u=u.check(f.cuid());else if(g==="cuid2")u=u.check(f.cuid2());else if(g==="ulid")u=u.check(f.ulid());else if(g==="xid")u=u.check(f.xid());else if(g==="ksuid")u=u.check(f.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"?f.number().int():f.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":{_=f.boolean();break}case"null":{_=f.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):f.any();if(Object.keys(u).length===0){_=f.record(J,N);break}let X=f.object(u).passthrough(),G=f.looseRecord(J,N);_=f.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=f.string().regex(new RegExp(q));X.push(f.looseRecord(H,T))}let G=[];if(Object.keys(u).length>0)G.push(f.object(u).passthrough());if(G.push(...X),G.length===0)_=f.object({}).passthrough();else if(G.length===1)_=G[0];else{let q=f.intersection(G[0],G[1]);for(let T=2;T<G.length;T++)q=f.intersection(q,G[T]);_=q}break}let v=f.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)_=f.tuple(z).rest(v);else _=f.tuple(z);if(typeof $.minItems==="number")_=_.check(f.minLength($.minItems));if(typeof $.maxItems==="number")_=_.check(f.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)_=f.tuple(z).rest(v);else _=f.tuple(z);if(typeof $.minItems==="number")_=_.check(f.minLength($.minItems));if(typeof $.maxItems==="number")_=_.check(f.maxLength($.maxItems))}else if(g!==void 0){let z=f$(g,I),v=f.array(z);if(typeof $.minItems==="number")v=v.min($.minItems);if(typeof $.maxItems==="number")v=v.max($.maxItems);_=v}else _=f.array(f.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 $?f.any():f.never();let U=z7($,I),_=$.type||$.enum!==void 0||$.const!==void 0;if($.anyOf&&Array.isArray($.anyOf)){let v=$.anyOf.map((N)=>f$(N,I)),J=f.union(v);U=_?f.intersection(U,J):J}if($.oneOf&&Array.isArray($.oneOf)){let v=$.oneOf.map((N)=>f$(N,I)),J=f.xor(v);U=_?f.intersection(U,J):J}if($.allOf&&Array.isArray($.allOf))if($.allOf.length===0)U=_?U:f.any();else{let v=_?U:f$($.allOf[0],I),J=_?0:1;for(let N=J;N<$.allOf.length;N++)v=f.intersection(v,f$($.allOf[N],I));U=v}if($.nullable===!0&&I.version==="openapi-3.0")U=f.nullable(U);if($.readOnly===!0)U=f.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(!uj.has(v))u[v]=$[v];if(Object.keys(u).length>0)I.registry.add(U,u);return U}function v7($,I){if(typeof $==="boolean")return $?f.any():f.never();let U=Uj($,I?.defaultTarget),_=$.$defs||$.definitions||{},u={version:U,defs:_,refs:new Map,processing:new Set,rootSchema:$,registry:I?.registry??w$};return f$($,u)}var l3={};A4(l3,{string:()=>gj,number:()=>zj,date:()=>Nj,boolean:()=>vj,bigint:()=>Jj});function gj($){return qN(e1,$)}function zj($){return BN($I,$)}function vj($){return ZN(II,$)}function Jj($){return bN(uI,$)}function Nj($){return iN(V0,$)}R$(z0());P0();function P_($){try{return process.kill($,0),!0}catch(I){return!1}}function H7($){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 Yj=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??{}})),Oj=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})),Dj=z$.object({active_vendor:z$.string().optional(),vendors:z$.record(z$.string(),Oj).optional()}).passthrough().transform(($)=>({active_vendor:$.active_vendor,vendors:$.vendors??{}}));function Y7($){try{return n6($)}catch{return null}}function Vj($){let I=Y7($),U=Yj.safeParse(I);if(!U.success)return{};return U.data}function Bj($){let I=Y7($),U=Dj.safeParse(I);if(!U.success)return{vendors:{}};return{active_vendor:U.data.active_vendor,vendors:U.data.vendors}}function p3($,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 Mj($){let I=p3($,I$.join(".agents","config","user-preferences.yaml"));if(!I)return null;try{let U=y.readFileSync(I,"utf-8");return Vj(U)}catch{return null}}function Rj($){let I=p3($,I$.join(".agents","skills","oma-orchestrator","config","cli-config.yaml"));if(!I)return null;try{let U=y.readFileSync(I,"utf-8");return Bj(U)}catch{return null}}function o3($,I){let U=process.cwd(),_=Mj(U),u=Rj(U),g=$.replace(/-agent$/i,""),z=_?.agent_cli_mapping?.[$]||_?.agent_cli_mapping?.[g];return{vendor:(I||z||_?.default_cli||u?.active_vendor||"gemini").toLowerCase(),config:u}}function O7($,I){if(I!==void 0)return I;return{gemini:"-p",claude:"-p",qwen:"-p",codex:null}[$]??"-p"}var Kj={frontend:["web","frontend","client","ui","app","dashboard","admin","portal"],backend:["api","backend","server","service","gateway","core"],mobile:["mobile","ios","android","native","rn","expo"]},Lj={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 D7($,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 Pj($){let I=I$.join($,"pnpm-workspace.yaml");if(!y.existsSync(I))return[];try{let U=y.readFileSync(I,"utf-8");return n6(U)?.packages??[]}catch{return[]}}function V7($){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 Wj($){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 Zj($){let I=I$.join($,"nx.json");if(!y.existsSync(I))return[];return["apps/*","libs/*","packages/*"].flatMap((_)=>D7(_,$))}function Aj($){let I=I$.join($,"turbo.json");if(!y.existsSync(I))return[];return V7($)}function bj($){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 jj($){let I=new Set,U=[Pj($),V7($),Wj($),Zj($),Aj($),bj($)];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 D7(u,$))_.add(g);return[..._]}function Fj($,I){let U=Kj[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 B7($){let I=process.cwd(),U=jj(I);if(U.length>0){let u=U.map((g)=>({workspace:g,score:Fj(g,$)})).filter((g)=>g.score>0).sort((g,z)=>z.score-g.score);if(u.length>0&&u[0])return u[0].workspace}let _=Lj[$];if(_)for(let u of _){let g=I$.resolve(u);if(y.existsSync(g)&&y.statSync(g).isDirectory())return u}return"."}function M7($){let I=I$.resolve($);if(y.existsSync(I)&&y.statSync(I).isFile())return y.readFileSync(I,"utf-8");return $}function R7($,I){let U=p3(I,I$.join(".agents","skills","_shared","runtime","execution-protocols",`${$}.md`));if(!U)return"";try{return y.readFileSync(U,"utf-8")}catch{return""}}async function K7($,I,U,_,u){let g=_==="."?B7($):_,z=I$.resolve(g);if(!y.existsSync(z))y.mkdirSync(z,{recursive:!0}),console.log(n.default.dim(`[${$}] Created workspace: ${z}`));else if(g!==_)console.log(n.default.blue(`[${$}] Auto-detected workspace: ${g}`));let v=L_(),J=I$.join(v,`subagent-${U}-${$}.log`),N=I$.join(v,`subagent-${U}-${$}.pid`),X=M7(I),{vendor:G,config:q}=o3($,u),T=R7(G,process.cwd()),H=T?`${X}
|
|
336
|
+
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 L6($,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:a1(I,"input",$.processors),output:a1(I,"output",$.processors)}},enumerable:!1,writable:!1}),z}catch(z){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 $8=($,I={})=>(U)=>{let _=R6({...U,processors:I});return _$($,_),K6(_,$),L6(_,$)},a1=($,I,U={})=>(_)=>{let{libraryOptions:u,target:g}=_??{},z=R6({...u??{},target:g,io:I,processors:U});return _$($,z),K6(z,$),L6(z,$)};var _j={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},I8=($,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=_j[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}))]}},u8=($,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},U8=($,I,U,_)=>{U.type="boolean"},_8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},g8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},z8=($,I,U,_)=>{if(I.target==="openapi-3.0")U.type="string",U.nullable=!0,U.enum=[null];else U.type="null"},v8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},J8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},N8=($,I,U,_)=>{U.not={}},G8=($,I,U,_)=>{},X8=($,I,U,_)=>{},q8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},Q8=($,I,U,_)=>{let u=$._zod.def,g=pI(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},T8=($,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}},H8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},Y8=($,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},O8=($,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)},D8=($,I,U,_)=>{U.type="boolean"},V8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},B8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},M8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},R8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},K8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},L8=($,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"]})},P8=($,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"]})},rU=($,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},W8=($,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},Z8=($,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},A8=($,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}},b8=($,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"}]},j8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let g=I.seen.get($);g.ref=u.innerType},F8=($,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))},S8=($,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))},w8=($,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},E8=($,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},C8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let g=I.seen.get($);g.ref=u.innerType,U.readOnly=!0},f8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let g=I.seen.get($);g.ref=u.innerType},lU=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let g=I.seen.get($);g.ref=u.innerType},x8=($,I,U,_)=>{let u=$._zod.innerType;_$(u,I,_);let g=I.seen.get($);g.ref=u},nU={string:I8,number:u8,boolean:U8,bigint:_8,symbol:g8,null:z8,undefined:v8,void:J8,never:N8,any:G8,unknown:X8,date:q8,enum:Q8,literal:T8,nan:H8,template_literal:Y8,file:O8,success:D8,custom:V8,function:B8,transform:M8,map:R8,set:K8,array:L8,object:P8,union:rU,intersection:W8,tuple:Z8,record:A8,nullable:b8,nonoptional:j8,default:F8,prefault:S8,catch:w8,pipe:E8,readonly:C8,promise:f8,optional:lU,lazy:x8};function mU($,I){if("_idmap"in $){let _=$,u=R6({...I,processors:nU}),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;K6(u,X),z[N]=L6(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:nU});return _$($,U),K6(U,$),L6(U,$)}class k8{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:nU,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}K6(this.ctx,$);let U=L6(this.ctx,$),{"~standard":_,...u}=U;return u}}var e5={};var H0={};O4(H0,{xor:()=>mQ,xid:()=>QQ,void:()=>kQ,uuidv7:()=>gQ,uuidv6:()=>_Q,uuidv4:()=>UQ,uuid:()=>uQ,url:()=>zQ,unknown:()=>a6,union:()=>O_,undefined:()=>fQ,ulid:()=>qQ,uint64:()=>EQ,uint32:()=>FQ,tuple:()=>D3,transform:()=>V_,templateLiteral:()=>U7,symbol:()=>CQ,superRefine:()=>h3,success:()=>$7,stringbool:()=>X7,stringFormat:()=>LQ,string:()=>tU,strictObject:()=>rQ,set:()=>oQ,refine:()=>m3,record:()=>V3,readonly:()=>k3,promise:()=>_7,preprocess:()=>Q7,prefault:()=>F3,pipe:()=>V0,partialRecord:()=>cQ,optional:()=>O0,object:()=>nQ,number:()=>u3,nullish:()=>sQ,nullable:()=>D0,null:()=>v3,nonoptional:()=>S3,never:()=>Y_,nativeEnum:()=>tQ,nanoid:()=>NQ,nan:()=>I7,meta:()=>N7,map:()=>pQ,mac:()=>YQ,looseRecord:()=>dQ,looseObject:()=>lQ,literal:()=>aQ,lazy:()=>n3,ksuid:()=>TQ,keyof:()=>iQ,jwt:()=>KQ,json:()=>q7,ipv6:()=>OQ,ipv4:()=>HQ,intersection:()=>Y3,int64:()=>wQ,int32:()=>jQ,int:()=>aU,instanceof:()=>G7,httpUrl:()=>vQ,hostname:()=>PQ,hex:()=>WQ,hash:()=>ZQ,guid:()=>IQ,function:()=>g7,float64:()=>bQ,float32:()=>AQ,file:()=>eQ,exactOptional:()=>W3,enum:()=>D_,emoji:()=>JQ,email:()=>$Q,e164:()=>RQ,discriminatedUnion:()=>hQ,describe:()=>J7,date:()=>yQ,custom:()=>v7,cuid2:()=>XQ,cuid:()=>GQ,codec:()=>u7,cidrv6:()=>VQ,cidrv4:()=>DQ,check:()=>z7,catch:()=>C3,boolean:()=>U3,bigint:()=>SQ,base64url:()=>MQ,base64:()=>BQ,array:()=>R0,any:()=>xQ,_function:()=>g7,_default:()=>b3,_ZodString:()=>eU,ZodXor:()=>Q3,ZodXID:()=>g_,ZodVoid:()=>X3,ZodUnknown:()=>N3,ZodUnion:()=>L0,ZodUndefined:()=>g3,ZodUUID:()=>f4,ZodURL:()=>B0,ZodULID:()=>__,ZodType:()=>c,ZodTuple:()=>O3,ZodTransform:()=>L3,ZodTemplateLiteral:()=>y3,ZodSymbol:()=>_3,ZodSuccess:()=>w3,ZodStringFormat:()=>J$,ZodString:()=>$I,ZodSet:()=>M3,ZodRecord:()=>P0,ZodReadonly:()=>x3,ZodPromise:()=>r3,ZodPrefault:()=>j3,ZodPipe:()=>R_,ZodOptional:()=>B_,ZodObject:()=>K0,ZodNumberFormat:()=>e6,ZodNumber:()=>uI,ZodNullable:()=>Z3,ZodNull:()=>z3,ZodNonOptional:()=>M_,ZodNever:()=>G3,ZodNanoID:()=>I_,ZodNaN:()=>f3,ZodMap:()=>B3,ZodMAC:()=>I3,ZodLiteral:()=>R3,ZodLazy:()=>i3,ZodKSUID:()=>z_,ZodJWT:()=>T_,ZodIntersection:()=>H3,ZodIPv6:()=>J_,ZodIPv4:()=>v_,ZodGUID:()=>Y0,ZodFunction:()=>l3,ZodFile:()=>K3,ZodExactOptional:()=>P3,ZodEnum:()=>s1,ZodEmoji:()=>$_,ZodEmail:()=>sU,ZodE164:()=>Q_,ZodDiscriminatedUnion:()=>T3,ZodDefault:()=>A3,ZodDate:()=>M0,ZodCustomStringFormat:()=>II,ZodCustom:()=>W0,ZodCodec:()=>K_,ZodCatch:()=>E3,ZodCUID2:()=>U_,ZodCUID:()=>u_,ZodCIDRv6:()=>G_,ZodCIDRv4:()=>N_,ZodBoolean:()=>UI,ZodBigIntFormat:()=>H_,ZodBigInt:()=>_I,ZodBase64URL:()=>q_,ZodBase64:()=>X_,ZodArray:()=>q3,ZodAny:()=>J3});var hU={};O4(hU,{uppercase:()=>i1,trim:()=>c1,toUpperCase:()=>p1,toLowerCase:()=>d1,startsWith:()=>r1,slugify:()=>o1,size:()=>p6,regex:()=>k1,property:()=>iU,positive:()=>fU,overwrite:()=>B4,normalize:()=>h1,nonpositive:()=>kU,nonnegative:()=>yU,negative:()=>xU,multipleOf:()=>B6,minSize:()=>C4,minLength:()=>d4,mime:()=>m1,maxSize:()=>M6,maxLength:()=>o6,lte:()=>u4,lt:()=>w4,lowercase:()=>y1,length:()=>t6,includes:()=>n1,gte:()=>r$,gt:()=>E4,endsWith:()=>l1});var e1={};O4(e1,{time:()=>n8,duration:()=>r8,datetime:()=>y8,date:()=>i8,ZodISOTime:()=>pU,ZodISODuration:()=>oU,ZodISODateTime:()=>cU,ZodISODate:()=>dU});var cU=D("ZodISODateTime",($,I)=>{Rv.init($,I),J$.init($,I)});function y8($){return VN(cU,$)}var dU=D("ZodISODate",($,I)=>{Kv.init($,I),J$.init($,I)});function i8($){return BN(dU,$)}var pU=D("ZodISOTime",($,I)=>{Lv.init($,I),J$.init($,I)});function n8($){return MN(pU,$)}var oU=D("ZodISODuration",($,I)=>{Pv.init($,I),J$.init($,I)});function r8($){return RN(oU,$)}var s5=($,I)=>{sI.init($,I),$.name="ZodError",Object.defineProperties($,{format:{value:(U)=>I0($,U)},flatten:{value:(U)=>$0($,U)},addIssue:{value:(U)=>{$.issues.push(U),$.message=JSON.stringify($.issues,b1,2)}},addIssues:{value:(U)=>{$.issues.push(...U),$.message=JSON.stringify($.issues,b1,2)}},isEmpty:{get(){return $.issues.length===0}}})},zj=D("ZodError",s5),t$=D("ZodError",s5,{Parent:Error});var l8=S1(t$),m8=w1(t$),h8=E1(t$),c8=C1(t$),d8=pu(t$),p8=ou(t$),o8=tu(t$),t8=au(t$),a8=eu(t$),e8=su(t$),s8=$U(t$),$3=IU(t$);var c=D("ZodType",($,I)=>{return l.init($,I),Object.assign($["~standard"],{jsonSchema:{input:a1($,"input"),output:a1($,"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,_)=>n$($,U,_),$.brand=()=>$,$.register=(U,_)=>{return U.add($,_),$},$.parse=(U,_)=>l8($,U,_,{callee:$.parse}),$.safeParse=(U,_)=>h8($,U,_),$.parseAsync=async(U,_)=>m8($,U,_,{callee:$.parseAsync}),$.safeParseAsync=async(U,_)=>c8($,U,_),$.spa=$.safeParseAsync,$.encode=(U,_)=>d8($,U,_),$.decode=(U,_)=>p8($,U,_),$.encodeAsync=async(U,_)=>o8($,U,_),$.decodeAsync=async(U,_)=>t8($,U,_),$.safeEncode=(U,_)=>a8($,U,_),$.safeDecode=(U,_)=>e8($,U,_),$.safeEncodeAsync=async(U,_)=>s8($,U,_),$.safeDecodeAsync=async(U,_)=>$3($,U,_),$.refine=(U,_)=>$.check(m3(U,_)),$.superRefine=(U)=>$.check(h3(U)),$.overwrite=(U)=>$.check(B4(U)),$.optional=()=>O0($),$.exactOptional=()=>W3($),$.nullable=()=>D0($),$.nullish=()=>O0(D0($)),$.nonoptional=(U)=>S3($,U),$.array=()=>R0($),$.or=(U)=>O_([$,U]),$.and=(U)=>Y3($,U),$.transform=(U)=>V0($,V_(U)),$.default=(U)=>b3($,U),$.prefault=(U)=>F3($,U),$.catch=(U)=>C3($,U),$.pipe=(U)=>V0($,U),$.readonly=()=>k3($),$.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($),$}),eU=D("_ZodString",($,I)=>{d6.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,g)=>I8($,_,u,g);let U=$._zod.bag;$.format=U.format??null,$.minLength=U.minimum??null,$.maxLength=U.maximum??null,$.regex=(..._)=>$.check(k1(..._)),$.includes=(..._)=>$.check(n1(..._)),$.startsWith=(..._)=>$.check(r1(..._)),$.endsWith=(..._)=>$.check(l1(..._)),$.min=(..._)=>$.check(d4(..._)),$.max=(..._)=>$.check(o6(..._)),$.length=(..._)=>$.check(t6(..._)),$.nonempty=(..._)=>$.check(d4(1,..._)),$.lowercase=(_)=>$.check(y1(_)),$.uppercase=(_)=>$.check(i1(_)),$.trim=()=>$.check(c1()),$.normalize=(..._)=>$.check(h1(..._)),$.toLowerCase=()=>$.check(d1()),$.toUpperCase=()=>$.check(p1()),$.slugify=()=>$.check(o1())}),$I=D("ZodString",($,I)=>{d6.init($,I),eU.init($,I),$.email=(U)=>$.check(YU(sU,U)),$.url=(U)=>$.check(T0(B0,U)),$.jwt=(U)=>$.check(CU(T_,U)),$.emoji=(U)=>$.check(MU($_,U)),$.guid=(U)=>$.check(Q0(Y0,U)),$.uuid=(U)=>$.check(OU(f4,U)),$.uuidv4=(U)=>$.check(DU(f4,U)),$.uuidv6=(U)=>$.check(VU(f4,U)),$.uuidv7=(U)=>$.check(BU(f4,U)),$.nanoid=(U)=>$.check(RU(I_,U)),$.guid=(U)=>$.check(Q0(Y0,U)),$.cuid=(U)=>$.check(KU(u_,U)),$.cuid2=(U)=>$.check(LU(U_,U)),$.ulid=(U)=>$.check(PU(__,U)),$.base64=(U)=>$.check(SU(X_,U)),$.base64url=(U)=>$.check(wU(q_,U)),$.xid=(U)=>$.check(WU(g_,U)),$.ksuid=(U)=>$.check(ZU(z_,U)),$.ipv4=(U)=>$.check(AU(v_,U)),$.ipv6=(U)=>$.check(bU(J_,U)),$.cidrv4=(U)=>$.check(jU(N_,U)),$.cidrv6=(U)=>$.check(FU(G_,U)),$.e164=(U)=>$.check(EU(Q_,U)),$.datetime=(U)=>$.check(y8(U)),$.date=(U)=>$.check(i8(U)),$.time=(U)=>$.check(n8(U)),$.duration=(U)=>$.check(r8(U))});function tU($){return HN($I,$)}var J$=D("ZodStringFormat",($,I)=>{v$.init($,I),eU.init($,I)}),sU=D("ZodEmail",($,I)=>{Qv.init($,I),J$.init($,I)});function $Q($){return YU(sU,$)}var Y0=D("ZodGUID",($,I)=>{Xv.init($,I),J$.init($,I)});function IQ($){return Q0(Y0,$)}var f4=D("ZodUUID",($,I)=>{qv.init($,I),J$.init($,I)});function uQ($){return OU(f4,$)}function UQ($){return DU(f4,$)}function _Q($){return VU(f4,$)}function gQ($){return BU(f4,$)}var B0=D("ZodURL",($,I)=>{Tv.init($,I),J$.init($,I)});function zQ($){return T0(B0,$)}function vQ($){return T0(B0,{protocol:/^https?$/,hostname:q4.domain,...w.normalizeParams($)})}var $_=D("ZodEmoji",($,I)=>{Hv.init($,I),J$.init($,I)});function JQ($){return MU($_,$)}var I_=D("ZodNanoID",($,I)=>{Yv.init($,I),J$.init($,I)});function NQ($){return RU(I_,$)}var u_=D("ZodCUID",($,I)=>{Ov.init($,I),J$.init($,I)});function GQ($){return KU(u_,$)}var U_=D("ZodCUID2",($,I)=>{Dv.init($,I),J$.init($,I)});function XQ($){return LU(U_,$)}var __=D("ZodULID",($,I)=>{Vv.init($,I),J$.init($,I)});function qQ($){return PU(__,$)}var g_=D("ZodXID",($,I)=>{Bv.init($,I),J$.init($,I)});function QQ($){return WU(g_,$)}var z_=D("ZodKSUID",($,I)=>{Mv.init($,I),J$.init($,I)});function TQ($){return ZU(z_,$)}var v_=D("ZodIPv4",($,I)=>{Wv.init($,I),J$.init($,I)});function HQ($){return AU(v_,$)}var I3=D("ZodMAC",($,I)=>{Av.init($,I),J$.init($,I)});function YQ($){return ON(I3,$)}var J_=D("ZodIPv6",($,I)=>{Zv.init($,I),J$.init($,I)});function OQ($){return bU(J_,$)}var N_=D("ZodCIDRv4",($,I)=>{bv.init($,I),J$.init($,I)});function DQ($){return jU(N_,$)}var G_=D("ZodCIDRv6",($,I)=>{jv.init($,I),J$.init($,I)});function VQ($){return FU(G_,$)}var X_=D("ZodBase64",($,I)=>{Sv.init($,I),J$.init($,I)});function BQ($){return SU(X_,$)}var q_=D("ZodBase64URL",($,I)=>{wv.init($,I),J$.init($,I)});function MQ($){return wU(q_,$)}var Q_=D("ZodE164",($,I)=>{Ev.init($,I),J$.init($,I)});function RQ($){return EU(Q_,$)}var T_=D("ZodJWT",($,I)=>{Cv.init($,I),J$.init($,I)});function KQ($){return CU(T_,$)}var II=D("ZodCustomStringFormat",($,I)=>{fv.init($,I),J$.init($,I)});function LQ($,I,U={}){return t1(II,$,I,U)}function PQ($){return t1(II,"hostname",q4.hostname,$)}function WQ($){return t1(II,"hex",q4.hex,$)}function ZQ($,I){let U=I?.enc??"hex",_=`${$}_${U}`,u=q4[_];if(!u)throw Error(`Unrecognized hash format: ${_}`);return t1(II,_,u,I)}var uI=D("ZodNumber",($,I)=>{XU.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,g)=>u8($,_,u,g),$.gt=(_,u)=>$.check(E4(_,u)),$.gte=(_,u)=>$.check(r$(_,u)),$.min=(_,u)=>$.check(r$(_,u)),$.lt=(_,u)=>$.check(w4(_,u)),$.lte=(_,u)=>$.check(u4(_,u)),$.max=(_,u)=>$.check(u4(_,u)),$.int=(_)=>$.check(aU(_)),$.safe=(_)=>$.check(aU(_)),$.positive=(_)=>$.check(E4(0,_)),$.nonnegative=(_)=>$.check(r$(0,_)),$.negative=(_)=>$.check(w4(0,_)),$.nonpositive=(_)=>$.check(u4(0,_)),$.multipleOf=(_,u)=>$.check(B6(_,u)),$.step=(_,u)=>$.check(B6(_,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 u3($){return KN(uI,$)}var e6=D("ZodNumberFormat",($,I)=>{xv.init($,I),uI.init($,I)});function aU($){return PN(e6,$)}function AQ($){return WN(e6,$)}function bQ($){return ZN(e6,$)}function jQ($){return AN(e6,$)}function FQ($){return bN(e6,$)}var UI=D("ZodBoolean",($,I)=>{g0.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>U8($,U,_,u)});function U3($){return jN(UI,$)}var _I=D("ZodBigInt",($,I)=>{qU.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,g)=>_8($,_,u,g),$.gte=(_,u)=>$.check(r$(_,u)),$.min=(_,u)=>$.check(r$(_,u)),$.gt=(_,u)=>$.check(E4(_,u)),$.gte=(_,u)=>$.check(r$(_,u)),$.min=(_,u)=>$.check(r$(_,u)),$.lt=(_,u)=>$.check(w4(_,u)),$.lte=(_,u)=>$.check(u4(_,u)),$.max=(_,u)=>$.check(u4(_,u)),$.positive=(_)=>$.check(E4(BigInt(0),_)),$.negative=(_)=>$.check(w4(BigInt(0),_)),$.nonpositive=(_)=>$.check(u4(BigInt(0),_)),$.nonnegative=(_)=>$.check(r$(BigInt(0),_)),$.multipleOf=(_,u)=>$.check(B6(_,u));let U=$._zod.bag;$.minValue=U.minimum??null,$.maxValue=U.maximum??null,$.format=U.format??null});function SQ($){return SN(_I,$)}var H_=D("ZodBigIntFormat",($,I)=>{kv.init($,I),_I.init($,I)});function wQ($){return EN(H_,$)}function EQ($){return CN(H_,$)}var _3=D("ZodSymbol",($,I)=>{yv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>g8($,U,_,u)});function CQ($){return fN(_3,$)}var g3=D("ZodUndefined",($,I)=>{iv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>v8($,U,_,u)});function fQ($){return xN(g3,$)}var z3=D("ZodNull",($,I)=>{nv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>z8($,U,_,u)});function v3($){return kN(z3,$)}var J3=D("ZodAny",($,I)=>{rv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>G8($,U,_,u)});function xQ(){return yN(J3)}var N3=D("ZodUnknown",($,I)=>{lv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>X8($,U,_,u)});function a6(){return iN(N3)}var G3=D("ZodNever",($,I)=>{mv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>N8($,U,_,u)});function Y_($){return nN(G3,$)}var X3=D("ZodVoid",($,I)=>{hv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>J8($,U,_,u)});function kQ($){return rN(X3,$)}var M0=D("ZodDate",($,I)=>{cv.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,g)=>q8($,_,u,g),$.min=(_,u)=>$.check(r$(_,u)),$.max=(_,u)=>$.check(u4(_,u));let U=$._zod.bag;$.minDate=U.minimum?new Date(U.minimum):null,$.maxDate=U.maximum?new Date(U.maximum):null});function yQ($){return lN(M0,$)}var q3=D("ZodArray",($,I)=>{dv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>L8($,U,_,u),$.element=I.element,$.min=(U,_)=>$.check(d4(U,_)),$.nonempty=(U)=>$.check(d4(1,U)),$.max=(U,_)=>$.check(o6(U,_)),$.length=(U,_)=>$.check(t6(U,_)),$.unwrap=()=>$.element});function R0($,I){return cN(q3,$,I)}function iQ($){let I=$._zod.def.shape;return D_(Object.keys(I))}var K0=D("ZodObject",($,I)=>{pv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>P8($,U,_,u),w.defineLazy($,"shape",()=>{return I.shape}),$.keyof=()=>D_(Object.keys($._zod.def.shape)),$.catchall=(U)=>$.clone({...$._zod.def,catchall:U}),$.passthrough=()=>$.clone({...$._zod.def,catchall:a6()}),$.loose=()=>$.clone({...$._zod.def,catchall:a6()}),$.strict=()=>$.clone({...$._zod.def,catchall:Y_()}),$.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(B_,$,U[0]),$.required=(...U)=>w.required(M_,$,U[0])});function nQ($,I){let U={type:"object",shape:$??{},...w.normalizeParams(I)};return new K0(U)}function rQ($,I){return new K0({type:"object",shape:$,catchall:Y_(),...w.normalizeParams(I)})}function lQ($,I){return new K0({type:"object",shape:$,catchall:a6(),...w.normalizeParams(I)})}var L0=D("ZodUnion",($,I)=>{z0.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>rU($,U,_,u),$.options=I.options});function O_($,I){return new L0({type:"union",options:$,...w.normalizeParams(I)})}var Q3=D("ZodXor",($,I)=>{L0.init($,I),ov.init($,I),$._zod.processJSONSchema=(U,_,u)=>rU($,U,_,u),$.options=I.options});function mQ($,I){return new Q3({type:"union",options:$,inclusive:!1,...w.normalizeParams(I)})}var T3=D("ZodDiscriminatedUnion",($,I)=>{L0.init($,I),tv.init($,I)});function hQ($,I,U){return new T3({type:"union",options:I,discriminator:$,...w.normalizeParams(U)})}var H3=D("ZodIntersection",($,I)=>{av.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>W8($,U,_,u)});function Y3($,I){return new H3({type:"intersection",left:$,right:I})}var O3=D("ZodTuple",($,I)=>{QU.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>Z8($,U,_,u),$.rest=(U)=>$.clone({...$._zod.def,rest:U})});function D3($,I,U){let _=I instanceof l,u=_?U:I;return new O3({type:"tuple",items:$,rest:_?I:null,...w.normalizeParams(u)})}var P0=D("ZodRecord",($,I)=>{ev.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>A8($,U,_,u),$.keyType=I.keyType,$.valueType=I.valueType});function V3($,I,U){return new P0({type:"record",keyType:$,valueType:I,...w.normalizeParams(U)})}function cQ($,I,U){let _=n$($);return _._zod.values=void 0,new P0({type:"record",keyType:_,valueType:I,...w.normalizeParams(U)})}function dQ($,I,U){return new P0({type:"record",keyType:$,valueType:I,mode:"loose",...w.normalizeParams(U)})}var B3=D("ZodMap",($,I)=>{sv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>R8($,U,_,u),$.keyType=I.keyType,$.valueType=I.valueType,$.min=(...U)=>$.check(C4(...U)),$.nonempty=(U)=>$.check(C4(1,U)),$.max=(...U)=>$.check(M6(...U)),$.size=(...U)=>$.check(p6(...U))});function pQ($,I,U){return new B3({type:"map",keyType:$,valueType:I,...w.normalizeParams(U)})}var M3=D("ZodSet",($,I)=>{$J.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>K8($,U,_,u),$.min=(...U)=>$.check(C4(...U)),$.nonempty=(U)=>$.check(C4(1,U)),$.max=(...U)=>$.check(M6(...U)),$.size=(...U)=>$.check(p6(...U))});function oQ($,I){return new M3({type:"set",valueType:$,...w.normalizeParams(I)})}var s1=D("ZodEnum",($,I)=>{IJ.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,g)=>Q8($,_,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 s1({...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 s1({...I,checks:[],...w.normalizeParams(u),entries:g})}});function D_($,I){let U=Array.isArray($)?Object.fromEntries($.map((_)=>[_,_])):$;return new s1({type:"enum",entries:U,...w.normalizeParams(I)})}function tQ($,I){return new s1({type:"enum",entries:$,...w.normalizeParams(I)})}var R3=D("ZodLiteral",($,I)=>{uJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>T8($,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 aQ($,I){return new R3({type:"literal",values:Array.isArray($)?$:[$],...w.normalizeParams(I)})}var K3=D("ZodFile",($,I)=>{UJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>O8($,U,_,u),$.min=(U,_)=>$.check(C4(U,_)),$.max=(U,_)=>$.check(M6(U,_)),$.mime=(U,_)=>$.check(m1(Array.isArray(U)?U:[U],_))});function eQ($){return dN(K3,$)}var L3=D("ZodTransform",($,I)=>{_J.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>M8($,U,_,u),$._zod.parse=(U,_)=>{if(_.direction==="backward")throw new m6($.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 V_($){return new L3({type:"transform",transform:$})}var B_=D("ZodOptional",($,I)=>{TU.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>lU($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function O0($){return new B_({type:"optional",innerType:$})}var P3=D("ZodExactOptional",($,I)=>{gJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>lU($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function W3($){return new P3({type:"optional",innerType:$})}var Z3=D("ZodNullable",($,I)=>{zJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>b8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function D0($){return new Z3({type:"nullable",innerType:$})}function sQ($){return O0(D0($))}var A3=D("ZodDefault",($,I)=>{vJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>F8($,U,_,u),$.unwrap=()=>$._zod.def.innerType,$.removeDefault=$.unwrap});function b3($,I){return new A3({type:"default",innerType:$,get defaultValue(){return typeof I==="function"?I():w.shallowClone(I)}})}var j3=D("ZodPrefault",($,I)=>{JJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>S8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function F3($,I){return new j3({type:"prefault",innerType:$,get defaultValue(){return typeof I==="function"?I():w.shallowClone(I)}})}var M_=D("ZodNonOptional",($,I)=>{NJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>j8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function S3($,I){return new M_({type:"nonoptional",innerType:$,...w.normalizeParams(I)})}var w3=D("ZodSuccess",($,I)=>{GJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>D8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function $7($){return new w3({type:"success",innerType:$})}var E3=D("ZodCatch",($,I)=>{XJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>w8($,U,_,u),$.unwrap=()=>$._zod.def.innerType,$.removeCatch=$.unwrap});function C3($,I){return new E3({type:"catch",innerType:$,catchValue:typeof I==="function"?I:()=>I})}var f3=D("ZodNaN",($,I)=>{qJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>H8($,U,_,u)});function I7($){return hN(f3,$)}var R_=D("ZodPipe",($,I)=>{QJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>E8($,U,_,u),$.in=I.in,$.out=I.out});function V0($,I){return new R_({type:"pipe",in:$,out:I})}var K_=D("ZodCodec",($,I)=>{R_.init($,I),v0.init($,I)});function u7($,I,U){return new K_({type:"pipe",in:$,out:I,transform:U.decode,reverseTransform:U.encode})}var x3=D("ZodReadonly",($,I)=>{TJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>C8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function k3($){return new x3({type:"readonly",innerType:$})}var y3=D("ZodTemplateLiteral",($,I)=>{HJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>Y8($,U,_,u)});function U7($,I){return new y3({type:"template_literal",parts:$,...w.normalizeParams(I)})}var i3=D("ZodLazy",($,I)=>{DJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>x8($,U,_,u),$.unwrap=()=>$._zod.def.getter()});function n3($){return new i3({type:"lazy",getter:$})}var r3=D("ZodPromise",($,I)=>{OJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>f8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function _7($){return new r3({type:"promise",innerType:$})}var l3=D("ZodFunction",($,I)=>{YJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>B8($,U,_,u)});function g7($){return new l3({type:"function",input:Array.isArray($?.input)?D3($?.input):$?.input??R0(a6()),output:$?.output??a6()})}var W0=D("ZodCustom",($,I)=>{VJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>V8($,U,_,u)});function z7($){let I=new G$({check:"custom"});return I._zod.check=$,I}function v7($,I){return pN(W0,$??(()=>!0),I)}function m3($,I={}){return oN(W0,$,I)}function h3($){return tN($)}var J7=aN,N7=eN;function G7($,I={}){let U=new W0({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 X7=(...$)=>sN({Codec:K_,Boolean:UI,String:$I},...$);function q7($){let I=n3(()=>{return O_([tU($),u3(),U3(),v3(),R0(I),V3(tU(),I)])});return I}function Q7($,I){return V0(V_($),I)}var Jj={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 Nj($){R$({customError:$})}function Gj(){return R$().customError}var c3;(function($){})(c3||(c3={}));var f={...H0,...hU,iso:e1},Xj=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 qj($,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 Qj($,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 T7($,I){if($.not!==void 0){if(typeof $.not==="object"&&Object.keys($.not).length===0)return f.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 f.lazy(()=>{if(!I.refs.has(u))throw Error(`Circular reference not resolved: ${u}`);return I.refs.get(u)});I.processing.add(u);let g=Qj(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 f.null();if(u.length===0)return f.never();if(u.length===1)return f.literal(u[0]);if(u.every((z)=>typeof z==="string"))return f.enum(u);let g=u.map((z)=>f.literal(z));if(g.length<2)return g[0];return f.union([g[0],g[1],...g.slice(2)])}if($.const!==void 0)return f.literal($.const);let U=$.type;if(Array.isArray(U)){let u=U.map((g)=>{let z={...$,type:g};return T7(z,I)});if(u.length===0)return f.never();if(u.length===1)return u[0];return f.union(u)}if(!U)return f.any();let _;switch(U){case"string":{let u=f.string();if($.format){let g=$.format;if(g==="email")u=u.check(f.email());else if(g==="uri"||g==="uri-reference")u=u.check(f.url());else if(g==="uuid"||g==="guid")u=u.check(f.uuid());else if(g==="date-time")u=u.check(f.iso.datetime());else if(g==="date")u=u.check(f.iso.date());else if(g==="time")u=u.check(f.iso.time());else if(g==="duration")u=u.check(f.iso.duration());else if(g==="ipv4")u=u.check(f.ipv4());else if(g==="ipv6")u=u.check(f.ipv6());else if(g==="mac")u=u.check(f.mac());else if(g==="cidr")u=u.check(f.cidrv4());else if(g==="cidr-v6")u=u.check(f.cidrv6());else if(g==="base64")u=u.check(f.base64());else if(g==="base64url")u=u.check(f.base64url());else if(g==="e164")u=u.check(f.e164());else if(g==="jwt")u=u.check(f.jwt());else if(g==="emoji")u=u.check(f.emoji());else if(g==="nanoid")u=u.check(f.nanoid());else if(g==="cuid")u=u.check(f.cuid());else if(g==="cuid2")u=u.check(f.cuid2());else if(g==="ulid")u=u.check(f.ulid());else if(g==="xid")u=u.check(f.xid());else if(g==="ksuid")u=u.check(f.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"?f.number().int():f.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":{_=f.boolean();break}case"null":{_=f.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):f.any();if(Object.keys(u).length===0){_=f.record(J,N);break}let X=f.object(u).passthrough(),G=f.looseRecord(J,N);_=f.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=f.string().regex(new RegExp(q));X.push(f.looseRecord(H,T))}let G=[];if(Object.keys(u).length>0)G.push(f.object(u).passthrough());if(G.push(...X),G.length===0)_=f.object({}).passthrough();else if(G.length===1)_=G[0];else{let q=f.intersection(G[0],G[1]);for(let T=2;T<G.length;T++)q=f.intersection(q,G[T]);_=q}break}let v=f.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)_=f.tuple(z).rest(v);else _=f.tuple(z);if(typeof $.minItems==="number")_=_.check(f.minLength($.minItems));if(typeof $.maxItems==="number")_=_.check(f.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)_=f.tuple(z).rest(v);else _=f.tuple(z);if(typeof $.minItems==="number")_=_.check(f.minLength($.minItems));if(typeof $.maxItems==="number")_=_.check(f.maxLength($.maxItems))}else if(g!==void 0){let z=f$(g,I),v=f.array(z);if(typeof $.minItems==="number")v=v.min($.minItems);if(typeof $.maxItems==="number")v=v.max($.maxItems);_=v}else _=f.array(f.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 $?f.any():f.never();let U=T7($,I),_=$.type||$.enum!==void 0||$.const!==void 0;if($.anyOf&&Array.isArray($.anyOf)){let v=$.anyOf.map((N)=>f$(N,I)),J=f.union(v);U=_?f.intersection(U,J):J}if($.oneOf&&Array.isArray($.oneOf)){let v=$.oneOf.map((N)=>f$(N,I)),J=f.xor(v);U=_?f.intersection(U,J):J}if($.allOf&&Array.isArray($.allOf))if($.allOf.length===0)U=_?U:f.any();else{let v=_?U:f$($.allOf[0],I),J=_?0:1;for(let N=J;N<$.allOf.length;N++)v=f.intersection(v,f$($.allOf[N],I));U=v}if($.nullable===!0&&I.version==="openapi-3.0")U=f.nullable(U);if($.readOnly===!0)U=f.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(!Xj.has(v))u[v]=$[v];if(Object.keys(u).length>0)I.registry.add(U,u);return U}function H7($,I){if(typeof $==="boolean")return $?f.any():f.never();let U=qj($,I?.defaultTarget),_=$.$defs||$.definitions||{},u={version:U,defs:_,refs:new Map,processing:new Set,rootSchema:$,registry:I?.registry??w$};return f$($,u)}var d3={};O4(d3,{string:()=>Tj,number:()=>Hj,date:()=>Dj,boolean:()=>Yj,bigint:()=>Oj});function Tj($){return YN($I,$)}function Hj($){return LN(uI,$)}function Yj($){return FN(UI,$)}function Oj($){return wN(_I,$)}function Dj($){return mN(M0,$)}R$(J0());Z0();function Z_($){try{return process.kill($,0),!0}catch(I){return!1}}function K7($){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 Pj=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??{}})),Wj=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})),Zj=z$.object({active_vendor:z$.string().optional(),vendors:z$.record(z$.string(),Wj).optional()}).passthrough().transform(($)=>({active_vendor:$.active_vendor,vendors:$.vendors??{}}));function L7($){try{return l6($)}catch{return null}}function Aj($){let I=L7($),U=Pj.safeParse(I);if(!U.success)return{};return U.data}function bj($){let I=L7($),U=Zj.safeParse(I);if(!U.success)return{vendors:{}};return{active_vendor:U.data.active_vendor,vendors:U.data.vendors}}function e3($,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 jj($){let I=e3($,I$.join(".agents","config","user-preferences.yaml"));if(!I)return null;try{let U=y.readFileSync(I,"utf-8");return Aj(U)}catch{return null}}function Fj($){let I=e3($,I$.join(".agents","skills","oma-orchestrator","config","cli-config.yaml"));if(!I)return null;try{let U=y.readFileSync(I,"utf-8");return bj(U)}catch{return null}}function s3($,I){let U=process.cwd(),_=jj(U),u=Fj(U),g=$.replace(/-agent$/i,""),z=_?.agent_cli_mapping?.[$]||_?.agent_cli_mapping?.[g];return{vendor:(I||z||_?.default_cli||u?.active_vendor||"gemini").toLowerCase(),config:u}}function P7($,I){if(I!==void 0)return I;return{gemini:"-p",claude:"-p",qwen:"-p",codex:null}[$]??"-p"}var Sj={frontend:["web","frontend","client","ui","app","dashboard","admin","portal"],backend:["api","backend","server","service","gateway","core"],mobile:["mobile","ios","android","native","rn","expo"]},wj={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 W7($,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 Ej($){let I=I$.join($,"pnpm-workspace.yaml");if(!y.existsSync(I))return[];try{let U=y.readFileSync(I,"utf-8");return l6(U)?.packages??[]}catch{return[]}}function Z7($){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 Cj($){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 fj($){let I=I$.join($,"nx.json");if(!y.existsSync(I))return[];return["apps/*","libs/*","packages/*"].flatMap((_)=>W7(_,$))}function xj($){let I=I$.join($,"turbo.json");if(!y.existsSync(I))return[];return Z7($)}function kj($){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 yj($){let I=new Set,U=[Ej($),Z7($),Cj($),fj($),xj($),kj($)];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 W7(u,$))_.add(g);return[..._]}function ij($,I){let U=Sj[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 A7($){let I=process.cwd(),U=yj(I);if(U.length>0){let u=U.map((g)=>({workspace:g,score:ij(g,$)})).filter((g)=>g.score>0).sort((g,z)=>z.score-g.score);if(u.length>0&&u[0])return u[0].workspace}let _=wj[$];if(_)for(let u of _){let g=I$.resolve(u);if(y.existsSync(g)&&y.statSync(g).isDirectory())return u}return"."}function b7($){let I=I$.resolve($);if(y.existsSync(I)&&y.statSync(I).isFile())return y.readFileSync(I,"utf-8");return $}function j7($,I){let U=e3(I,I$.join(".agents","skills","_shared","runtime","execution-protocols",`${$}.md`));if(!U)return"";try{return y.readFileSync(U,"utf-8")}catch{return""}}async function F7($,I,U,_,u){let g=_==="."?A7($):_,z=I$.resolve(g);if(!y.existsSync(z))y.mkdirSync(z,{recursive:!0}),console.log(n.default.dim(`[${$}] Created workspace: ${z}`));else if(g!==_)console.log(n.default.blue(`[${$}] Auto-detected workspace: ${g}`));let v=W_(),J=I$.join(v,`subagent-${U}-${$}.log`),N=I$.join(v,`subagent-${U}-${$}.pid`),X=b7(I),{vendor:G,config:q}=s3($,u),T=j7(G,process.cwd()),H=T?`${X}
|
|
312
337
|
|
|
313
|
-
${T}`:X,Q=q?.vendors?.[G]||{},Y=Q.command||G,R=Q.subcommand,K=y.openSync(J,"w");console.log(n.default.blue(`[${$}] Spawning subagent...`)),console.log(n.default.dim(` Vendor: ${G}`)),console.log(n.default.dim(` Workspace: ${z}`)),console.log(n.default.dim(` Log: ${J}`));let W=[],O=
|
|
338
|
+
${T}`:X,Q=q?.vendors?.[G]||{},Y=Q.command||G,R=Q.subcommand,K=y.openSync(J,"w");console.log(n.default.blue(`[${$}] Spawning subagent...`)),console.log(n.default.dim(` Vendor: ${G}`)),console.log(n.default.dim(` Workspace: ${z}`)),console.log(n.default.dim(` Log: ${J}`));let W=[],O=P7(G,Q.prompt_flag);if(Q.output_format_flag&&Q.output_format)W.push(Q.output_format_flag,Q.output_format);else if(Q.output_format_flag)W.push(Q.output_format_flag);if(Q.model_flag&&Q.default_model)W.push(Q.model_flag,Q.default_model);if(Q.isolation_flags)W.push(...K7(Q.isolation_flags));if(Q.auto_approve_flag)W.push(Q.auto_approve_flag);else{let x={gemini:"--approval-mode=yolo",codex:"--full-auto",qwen:"--yolo"}[G];if(x)W.push(x)}if(O)W.push(O,H);let V=[];if(R)V.push(R);if(V.push(...W),!O)V.push(H);let P={...process.env};if(Q.isolation_env){let[A,...x]=Q.isolation_env.split("="),b=x.join("=");if(A&&b){let u$=b.replace("$$",String(process.pid));if(P[A]=u$,u$.startsWith("/")&&!y.existsSync(u$))y.mkdirSync(u$,{recursive:!0})}}let B=a3(Y,V,{cwd:z,stdio:["ignore",K,K],detached:!1,env:P});if(!B.pid)console.error(n.default.red(`[${$}] Failed to spawn process`)),process.exit(1);y.writeFileSync(N,B.pid.toString()),console.log(n.default.green(`[${$}] Started with PID ${B.pid}`));let M=()=>{try{if(y.existsSync(N))y.unlinkSync(N);if(y.existsSync(J))y.unlinkSync(J)}catch(A){}},F=()=>{if(B.pid&&Z_(B.pid))process.kill(B.pid);M(),process.exit()};process.on("SIGINT",F),process.on("SIGTERM",F),B.on("exit",(A)=>{if(console.log(n.default.blue(`[${$}] Exited with code ${A}`)),A!==0&&y.existsSync(J)){let x=y.readFileSync(J,"utf-8").trim();if(x)console.log(n.default.red(`[${$}] Log output:`)),console.log(x)}M(),process.exit(A??0)})}async function S7($,I,U=process.cwd()){let _={};for(let u of I){let g=I$.join(U,".serena","memories",`result-${u}.md`),z=I$.join(W_(),`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 _[u]="completed"}else if(y.existsSync(z)){let v=y.readFileSync(z,"utf-8").trim(),J=parseInt(v,10);if(!Number.isNaN(J)&&Z_(J))_[u]="running";else _[u]="crashed"}else _[u]="crashed"}for(let[u,g]of Object.entries(_))console.log(`${u}:${g}`)}var nj=z$.object({agent:z$.string(),task:z$.string(),workspace:z$.string().optional()}),rj=z$.object({tasks:z$.array(nj)});function lj($){if(!y.existsSync($))throw Error(`Tasks file not found: ${$}`);let I=y.readFileSync($,"utf-8"),U=l6(I),_=rj.safeParse(U);if(!_.success)throw Error(`Invalid tasks file format: ${_.error.message}`);return _.data.tasks}function mj($){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 w7($,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(n.default.red("Error: No tasks specified")),console.log('Usage: oh-my-ag agent:parallel --inline "agent:task" "agent:task" ...'),process.exit(1);v=mj($)}else{if($.length===0)console.error(n.default.red("Error: No tasks file specified")),console.log("Usage: oh-my-ag agent:parallel <tasks-file.yaml>"),process.exit(1);let T=$[0];if(!T)console.error(n.default.red("Error: No tasks file specified")),process.exit(1);v=lj(T)}}catch(T){console.error(n.default.red(`Error: ${T.message}`)),process.exit(1)}console.log(n.default.cyan("======================================")),console.log(n.default.cyan(" Parallel SubAgent Execution")),console.log(n.default.cyan("======================================")),console.log(""),console.log(n.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:R="."}=H,K=R==="."?A7(Q):R,W=I$.resolve(K),O=I$.join(g,`${Q}-${T}.log`);if(console.log(`${n.default.blue(`[${T}]`)} Spawning ${n.default.yellow(Q)} agent...`),console.log(` Task: ${Y.slice(0,60)}${Y.length>60?"...":""}`),console.log(` Workspace: ${K}`),!y.existsSync(W))y.mkdirSync(W,{recursive:!0});let{vendor:V,config:P}=s3(Q,I.vendor),B=P?.vendors?.[V]||{},M=B.command||V,F=B.subcommand,A=[],x=P7(V,B.prompt_flag),b=b7(Y),u$=j7(V,U),o=u$?`${b}
|
|
314
339
|
|
|
315
|
-
${u$}`:b;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(...
|
|
316
|
-
`);let
|
|
340
|
+
${u$}`:b;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(...K7(B.isolation_flags));if(B.auto_approve_flag)A.push(B.auto_approve_flag);else{let O1={gemini:"--approval-mode=yolo",codex:"--full-auto",qwen:"--yolo"}[V];if(O1)A.push(O1)}if(x)A.push(x,o);let Y$=[];if(F)Y$.push(F);if(Y$.push(...A),!x)Y$.push(o);let h$={...process.env};if(B.isolation_env){let[z6,...O1]=B.isolation_env.split("="),m9=O1.join("=");if(z6&&m9){let e0=m9.replace("$$",String(process.pid));if(h$[z6]=e0,e0.startsWith("/")&&!y.existsSync(e0))y.mkdirSync(e0,{recursive:!0})}}let c$=y.openSync(O,"w"),b4=a3(M,Y$,{cwd:W,stdio:["ignore",c$,c$],detached:!1,env:h$});if(!b4.pid){console.error(n.default.red(`[${T}] Failed to spawn ${Q} process`));continue}y.appendFileSync(z,`${b4.pid}:${Q}
|
|
341
|
+
`);let S2=new Promise((z6)=>{b4.on("exit",(O1)=>{y.closeSync(c$),z6(O1)}),b4.on("error",()=>{y.closeSync(c$),z6(null)})});J.push({pid:b4.pid,agent:Q,idx:T,promise:S2})}if(console.log(""),console.log(n.default.blue("[Parallel]")+` Started ${n.default.yellow(String(J.length))} agents`),I.noWait){console.log(`${n.default.blue("[Parallel]")} Running in background mode`),console.log(`${n.default.blue("[Parallel]")} Results will be in: ${g}`),console.log(`${n.default.blue("[Parallel]")} PID list: ${z}`);return}console.log(`${n.default.blue("[Parallel]")} Waiting for completion...`),console.log("");let N=()=>{console.log(""),console.log(`${n.default.yellow("[Parallel]")} Cleaning up child processes...`);for(let{pid:T,agent:H}of J)if(Z_(T))try{process.kill(T),console.log(`${n.default.yellow("[Parallel]")} Killed PID ${T} (${H})`)}catch{}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(`${n.default.green("[DONE]")} ${T} agent (${H}) completed`),X++;else console.log(n.default.red("[FAIL]")+` ${T} agent (${H}) failed (exit code: ${Y})`),G++}try{if(y.existsSync(z))y.unlinkSync(z)}catch{}console.log(""),console.log(n.default.cyan("======================================")),console.log(n.default.cyan(" Execution Summary")),console.log(n.default.cyan("======================================")),console.log(`Total: ${J.length}`),console.log(`Completed: ${n.default.green(String(X))}`),console.log(`Failed: ${n.default.red(String(G))}`),console.log(`Results: ${g}`),console.log(n.default.cyan("======================================")),console.log(""),console.log(n.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 hj(){let $=P_(process.cwd());if($.id&&$.status!=="completed"&&$.status!=="failed")return $.id;return o3(new Date)}var cj="codex",dj=["codex","claude","gemini","qwen"];function pj($,I,U){if(I)return`Review the uncommitted changes (git diff) in this repository. ${$}`;try{let _=Lj("git diff HEAD~1",{cwd:U,encoding:"utf-8"}).trim();if(!_)return`No committed changes found. ${$}`;return`Review the following committed diff:
|
|
317
342
|
|
|
318
343
|
\`\`\`diff
|
|
319
344
|
${_}
|
|
320
345
|
\`\`\`
|
|
321
346
|
|
|
322
|
-
${$}`}catch{return`Review the latest committed changes. ${$}`}}function
|
|
323
|
-
`))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
|
|
324
|
-
`).slice(1)){let u=_.match(/:(\d+)\s+\(LISTEN\)/);if(u?.[1])U.push(Number.parseInt(u[1],10))}return U}catch{}return[]}function
|
|
325
|
-
|
|
326
|
-
`);U.push(`${_}: ${z?JSON.stringify(g):g}`)}}return U.push("---"),U.push(""),U.join(`
|
|
327
|
-
`)+I}var L$="first-fluke/oh-my-agent",B4=".agents/skills",Q4={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"}]},NT={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:[...Q4.domain,...Q4.design,...Q4.coordination,...Q4.utility,...Q4.infrastructure].map(($)=>$.name)};function r_($){try{if(!zT($).isDirectory())vT($)}catch{}}function l_($,I,U,_){let u=m($,".agents","skills",I);if(!K$(u))return!1;let g=m(U,B4,I);r_(g),T4(g,{recursive:!0}),o4(u,g,{recursive:!0,force:!0});let z=m(u,"variants"),v=m(g,"stack");if(_&&K$(m(z,_)))T4(v,{recursive:!0}),o4(m(z,_),v,{recursive:!0,force:!0}),x4(m(v,"stack.yaml"),`language: ${_}
|
|
328
|
-
source: preset
|
|
329
|
-
`);let J=m(g,"variants");if(K$(J))hF(J,{recursive:!0,force:!0});return!0}function m_($,I){let U=m($,".agents","skills","_shared");if(!K$(U))return;let _=m(I,B4,"_shared");r_(_),T4(_,{recursive:!0}),o4(U,_,{recursive:!0,force:!0})}function GT($,I){let U=m($,".agents","workflows");if(!K$(U))return;let _=m(I,".agents","workflows");r_(_),T4(_,{recursive:!0}),o4(U,_,{recursive:!0,force:!0})}function XT($,I,U=!1){let _=m($,".agents","config");if(K$(_)){let g=m(I,".agents","config");if(T4(g,{recursive:!0}),U)o4(_,g,{recursive:!0,force:!0});else for(let z of n_(_,{withFileTypes:!0})){let v=m(g,z.name);if(!K$(v))o4(m(_,z.name),v,z.isDirectory()?{recursive:!0}:{})}}let u=m($,".agents","mcp.json");if(K$(u)){let g=m(I,".agents");T4(g,{recursive:!0});let z=m(g,"mcp.json");if(U||!K$(z))o4(u,z)}}function qT($){let I=process.env.HOME||process.env.USERPROFILE||"",U=m(I,".gemini","antigravity","global_workflows"),_=m($,".agents","workflows");if(!K$(_))return;T4(U,{recursive:!0}),o4(_,U,{recursive:!0,force:!0})}var pF={"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}};function oF($,I){if(!K$($))return;let U=m(I,".claude","agents");T4(U,{recursive:!0});for(let _ of n_($,{withFileTypes:!0})){if(!_.isFile()||!_.name.endsWith(".md"))continue;let u=_.name,g=_I(m($,u),"utf-8"),{frontmatter:z,body:v}=RG(g),J=z.name||u.replace(".md",""),N=pF[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(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} -->
|
|
330
|
-
${G}`;x4(m(U,u),KG(X,q))}}function tF($,I){if(!K$($))return;for(let U of n_($,{withFileTypes:!0})){if(!U.isFile()||!U.name.endsWith(".md")||U.name.startsWith("_"))continue;let _=U.name,u=_I(m($,_),"utf-8"),{frontmatter:g}=RG(u),z=_.replace(".md",""),v=g.description||z,J=m(I,".claude","skills",z);r_(J);let N=KG({name:z,description:v,"disable-model-invocation":!0},`# /${z}
|
|
331
|
-
|
|
332
|
-
Read and follow \`.agents/workflows/${_}\` step by step.
|
|
333
|
-
`);T4(J,{recursive:!0}),x4(m(J,"SKILL.md"),N)}}function h_($,I){let U=m($,".claude","hooks");if(!K$(U))return;T4(I,{recursive:!0}),o4(U,I,{recursive:!0,force:!0})}function c_($,I,U){let _={};if(K$($))try{_=JSON.parse(_I($,"utf-8"))}catch{}if(_.hooks={..._.hooks||{},...I},U)Object.assign(_,U);x4($,`${JSON.stringify(_,null,2)}
|
|
334
|
-
`)}function u1($,I,U){return`bun "$${$}/${I}/hooks/${U}"`}function aF($,I){h_($,m(I,".claude","hooks")),c_(m(I,".claude","settings.json"),{UserPromptSubmit:[{hooks:[{type:"command",command:u1("CLAUDE_PROJECT_DIR",".claude","keyword-detector.ts"),timeout:5}]}],Stop:[{hooks:[{type:"command",command:u1("CLAUDE_PROJECT_DIR",".claude","persistent-mode.ts"),timeout:5}]}]},{statusLine:{type:"command",command:u1("CLAUDE_PROJECT_DIR",".claude","hud.ts")}})}function eF($,I){let U=m(I,".codex","hooks");h_($,U),c_(m(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}]}]}),sF(m(I,".codex","config.toml"))}function sF($){T4(JT($),{recursive:!0});let I="";if(K$($))I=_I($,"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"),x4($,I);return}if(/\[features\]/i.test(I)){I=I.replace(/(\[features\][^[]*)/i,`$1codex_hooks = true
|
|
335
|
-
`),x4($,I);return}let U=`
|
|
336
|
-
[features]
|
|
337
|
-
codex_hooks = true
|
|
338
|
-
`;x4($,I.trimEnd()+U)}function $S($,I){let U=m(I,".gemini","hooks");h_($,U),c_(m(I,".gemini","settings.json"),{BeforeAgent:[{matcher:"*",hooks:[{type:"command",command:u1("GEMINI_PROJECT_DIR",".gemini","keyword-detector.ts"),timeout:5}]}],AfterAgent:[{matcher:"*",hooks:[{type:"command",command:u1("GEMINI_PROJECT_DIR",".gemini","persistent-mode.ts"),timeout:5}]}]})}function IS($,I){let U=m(I,".qwen","hooks");h_($,U),c_(m(I,".qwen","settings.json"),{UserPromptSubmit:[{hooks:[{type:"command",command:u1("QWEN_PROJECT_DIR",".qwen","keyword-detector.ts"),timeout:5}]}],Stop:[{hooks:[{type:"command",command:u1("QWEN_PROJECT_DIR",".qwen","persistent-mode.ts"),timeout:5}]}]})}var uS="<!-- OMA:START",gT="<!-- OMA:END -->";function US($){let I=m($,".claude","CLAUDE.md.template");if(!K$(I))return;let U=process.env.HOME||process.env.USERPROFILE||"",_=_I(I,"utf-8").trim(),u=m(U,".claude","CLAUDE.md");if(K$(u)){let g=_I(u,"utf-8"),z=g.indexOf(uS),v=g.indexOf(gT);if(z!==-1&&v!==-1){let J=g.slice(0,z),N=g.slice(v+gT.length);x4(u,`${J}${_}${N}`)}else x4(u,`${g.trimEnd()}
|
|
339
|
-
|
|
340
|
-
${_}
|
|
341
|
-
`)}else x4(u,`${_}
|
|
342
|
-
`)}function d_($,I,U){let _=m($,".agents","agents"),u=m($,".agents","workflows");for(let g of U)switch(g){case"claude":oF(_,I),tF(u,I),aF($,I),US($);break;case"codex":eF($,I);break;case"gemini":$S($,I);break;case"qwen":IS($,I);break}}function gI(){return[...Q4.domain,...Q4.design,...Q4.coordination,...Q4.utility,...Q4.infrastructure]}var QT={claude:".claude/skills",copilot:".github/skills"};function p_($,I,U){let _=[],u=[],g=LG($,B4);for(let z of I){let v=QT[z],J=m($,v);if(!K$(J))T4(J,{recursive:!0});for(let N of U){let X=m(g,N),G=m(J,N);if(!K$(X)){u.push(`${v}/${N} (source missing)`);continue}try{if(zT(G).isSymbolicLink()){if(LG(JT(G),mF(G))===LG(X)){u.push(`${v}/${N} (already linked)`);continue}vT(G)}else{u.push(`${v}/${N} (real dir exists)`);continue}}catch(T){}let q=dF(J,X);cF(q,G,"dir"),_.push(`${v}/${N}`)}}return{created:_,skipped:u}}function TT($){let I=m($,B4);if(!K$(I))return[];return n_(I,{withFileTypes:!0}).filter((U)=>U.isDirectory()&&!U.name.startsWith("_")).map((U)=>U.name)}function HT($){let I=[];for(let[U,_]of Object.entries(QT))if(K$(m($,_)))I.push(U);return I}function U1(){try{return PG("gh --version",{stdio:"ignore"}),!0}catch{return!1}}function k4(){try{return PG("gh auth status",{stdio:"ignore"}),!0}catch{return!1}}function _1(){try{return PG(`gh api user/starred/${L$}`,{stdio:"ignore"}),!0}catch{return!1}}function YT(){return U1()&&k4()&&_1()}function jG(){try{let $=_S("claude auth status",{stdio:["pipe","pipe","ignore"],encoding:"utf-8"});return JSON.parse($).loggedIn===!0}catch{return!1}}function FG(){let $=bG(AG(),".gemini","oauth_creds.json");if(!WG($))return!1;try{let I=JSON.parse(ZG($,"utf-8"));return!!(I.access_token&&I.refresh_token)}catch{return!1}}function SG(){let $=bG(AG(),".codex","auth.json");if(!WG($))return!1;try{return!!JSON.parse(ZG($,"utf-8")).tokens?.access_token}catch{return!1}}function wG(){let $=bG(AG(),".qwen","settings.json");if(!WG($))return!1;try{return!!JSON.parse(ZG($,"utf-8")).security?.auth?.selectedType}catch{return!1}}async function OT($=!1){let[I,U]=await Promise.all([k4(),F0().then((G)=>!!G)]),_=FG(),u=jG(),g=SG(),z=wG(),v={github:I,gemini:_,claude:u,codex:g,qwen:z,antigravity:U};if($){console.log(JSON.stringify(v,null,2));return}D$(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(`
|
|
343
|
-
`),"Authentication Status"),d(`Use ${g1.default.cyan("gemini auth")}, ${g1.default.cyan("claude auth")}, etc. to login.`)}import{spawn as gS}from"node:child_process";import{existsSync as DT,readFileSync as VT,writeFileSync as zS}from"node:fs";import vS from"node:http";import JS from"node:https";import{homedir as NS}from"node:os";import{join as BT}from"node:path";var GS="http://localhost:12341/mcp",MT=1000,XS=Number.parseInt(process.env.OH_MY_AG_BRIDGE_PROBE_TIMEOUT_MS??"2000",10),qS=Number.parseInt(process.env.OH_MY_AG_BRIDGE_STARTUP_TIMEOUT_MS??"120000",10),P6={};function RT(){if(P6.stdinData)process.stdin.off("data",P6.stdinData);if(P6.sigint)process.off("SIGINT",P6.sigint);if(P6.sigterm)process.off("SIGTERM",P6.sigterm);P6={}}function QS(){let $=BT(NS(),".serena","serena_config.yml");if(!DT($))return;try{let U=VT($,"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=BT(g,".serena","project.yml");if(!DT(z))continue;let v=VT(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)}
|
|
347
|
+
${$}`}catch{return`Review the latest committed changes. ${$}`}}function oj($,I,U,_,u){let g=I.command||$;if($==="codex")return _?[g,"review","--uncommitted"]:[g,"review"];let z=pj(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 E7($){let I=hj(),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}=s3("review",$.model),J=dj.includes(z)?z:cj;if(J!==z)console.log(n.default.yellow(`[review] "${z}" has no review mode, falling back to ${J}`));let N=v?.vendors?.[J]||{},X=$.uncommitted??!0,G=oj(J,N,U,X,g),q=G[0],T=G.slice(1),H=I$.join(W_(),`review-${I}.log`),Q=I$.join(W_(),`review-${I}.pid`);console.log(n.default.dim(` Session: ${I}`)),console.log(n.default.blue("[review] Starting review...")),console.log(n.default.dim(` Vendor: ${J}`)),console.log(n.default.dim(` Command: ${q} ${T.slice(0,2).join(" ")}...`));let Y=y.openSync(H,"w"),R=a3(q,T,{cwd:g,stdio:["ignore",Y,Y],detached:!1});if(!R.pid)console.error(n.default.red("[review] Failed to spawn process")),process.exit(1);y.writeFileSync(Q,R.pid.toString()),console.log(n.default.green(`[review] Started with PID ${R.pid}`));let K=()=>{try{if(y.existsSync(Q))y.unlinkSync(Q);if(y.existsSync(H))y.unlinkSync(H)}catch(O){}},W=()=>{if(R.pid&&Z_(R.pid))process.kill(R.pid);K(),process.exit()};process.on("SIGINT",W),process.on("SIGTERM",W),R.on("exit",(O)=>{if(y.existsSync(H)){let V=y.readFileSync(H,"utf-8").trim();if(V)console.log(""),console.log(V)}console.log(O===0?n.default.green("[review] Done"):n.default.red(`[review] Exited with code ${O}`)),K(),process.exit(O??0)})}e$();var v1=q$(b$(),1);import{execSync as QS}from"node:child_process";import{existsSync as jG,readFileSync as FG}from"node:fs";import{homedir as SG}from"node:os";import{join as wG}from"node:path";import{execSync as PG}from"node:child_process";import NT from"node:https";function cF(){try{let $=PG("pgrep -fl language_server",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]});for(let I of $.split(`
|
|
348
|
+
`))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 dF($){try{return PG(`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 pF($){try{let I=PG(`lsof -nP -a -iTCP -sTCP:LISTEN -p ${$}`,{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}),U=[];for(let _ of I.split(`
|
|
349
|
+
`).slice(1)){let u=_.match(/:(\d+)\s+\(LISTEN\)/);if(u?.[1])U.push(Number.parseInt(u[1],10))}return U}catch{}return[]}function GT($,I,U,_){return new Promise((u,g)=>{let z=JSON.stringify(_),v=NT.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 oF($,I){return new Promise((U)=>{let _=NT.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 tF($){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 JT($,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 aF($){let I=$.userStatus??{},U=I.planStatus?.planInfo??{},_=JT(U.monthlyPromptCredits,I.planStatus?.availablePromptCredits),u=JT(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:tF(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 XT(){let $=cF();if(!$)return null;let I=dF($);if(!I)return null;let U=pF($);for(let _ of U)if(await oF(_,I))return{pid:$,csrfToken:I,port:_};return null}async function eF($){try{let I=await GT($.port,"/exa.language_server_pb.LanguageServerService/GetUserStatus",$.csrfToken,{metadata:{ideName:"antigravity",extensionName:"antigravity",locale:"en"}});return aF(I)}catch{return null}}async function qT(){let $=await XT();if(!$)return null;try{return await GT($.port,"/exa.language_server_pb.LanguageServerService/GetUserStatus",$.csrfToken,{metadata:{ideName:"antigravity",extensionName:"antigravity",locale:"en"}})}catch{return null}}async function w0(){let $=await XT();if(!$)return null;return eF($)}JI();function EG(){try{let $=QS("claude auth status",{stdio:["pipe","pipe","ignore"],encoding:"utf-8"});return JSON.parse($).loggedIn===!0}catch{return!1}}function CG(){let $=wG(SG(),".gemini","oauth_creds.json");if(!jG($))return!1;try{let I=JSON.parse(FG($,"utf-8"));return!!(I.access_token&&I.refresh_token)}catch{return!1}}function fG(){let $=wG(SG(),".codex","auth.json");if(!jG($))return!1;try{return!!JSON.parse(FG($,"utf-8")).tokens?.access_token}catch{return!1}}function xG(){let $=wG(SG(),".qwen","settings.json");if(!jG($))return!1;try{return!!JSON.parse(FG($,"utf-8")).security?.auth?.selectedType}catch{return!1}}async function WT($=!1){let[I,U]=await Promise.all([y4(),w0().then((G)=>!!G)]),_=CG(),u=EG(),g=fG(),z=xG(),v={github:I,gemini:_,claude:u,codex:g,qwen:z,antigravity:U};if($){console.log(JSON.stringify(v,null,2));return}D$(v1.default.bgMagenta(v1.default.white(" \uD83D\uDD10 oh-my-agent auth status ")));let J=(G)=>G?"✅":"❌",N=(G)=>G?v1.default.green("Authenticated"):v1.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(`
|
|
350
|
+
`),"Authentication Status"),d(`Use ${v1.default.cyan("gemini auth")}, ${v1.default.cyan("claude auth")}, etc. to login.`)}import{spawn as TS}from"node:child_process";import{existsSync as ZT,readFileSync as AT,writeFileSync as HS}from"node:fs";import YS from"node:http";import OS from"node:https";import{homedir as DS}from"node:os";import{join as bT}from"node:path";var VS="http://localhost:12341/mcp",jT=1000,BS=Number.parseInt(process.env.OH_MY_AG_BRIDGE_PROBE_TIMEOUT_MS??"2000",10),MS=Number.parseInt(process.env.OH_MY_AG_BRIDGE_STARTUP_TIMEOUT_MS??"120000",10),Z6={};function FT(){if(Z6.stdinData)process.stdin.off("data",Z6.stdinData);if(Z6.sigint)process.off("SIGINT",Z6.sigint);if(Z6.sigterm)process.off("SIGTERM",Z6.sigterm);Z6={}}function RS(){let $=bT(DS(),".serena","serena_config.yml");if(!ZT($))return;try{let U=AT($,"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=bT(g,".serena","project.yml");if(!ZT(z))continue;let v=AT(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)}
|
|
344
351
|
|
|
345
352
|
languages:
|
|
346
353
|
- python
|
|
347
354
|
- typescript
|
|
348
355
|
- dart
|
|
349
|
-
- terraform${v.slice(J)}`;
|
|
356
|
+
- terraform${v.slice(J)}`;HS(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 ST($){FT();let I=$||VS,U=new URL(I),u=U.protocol==="https:"?OS:YS,g=null,z=!1,v=null,J=!1;async function N(){let B=U.hostname==="localhost"?[I,I.replace("localhost","127.0.0.1")]:[I];for(let M of B)if(await new Promise((A)=>{let x=u.get(M,(b)=>{A(!0),x.destroy()});x.setTimeout(BS,()=>{x.destroy(),A(!1)}),x.on("error",()=>{A(!1)}),x.end()}))return!0;return!1}async function X(){let B=U.port||"12341",M=U.hostname||"0.0.0.0";console.error(`Starting Serena server on ${M}:${B}...`),g=TS("uvx",["--from","git+https://github.com/oraios/serena","serena-mcp-server","--transport","streamable-http","--host",M,"--port",B,"--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 x=Math.max(1,Math.ceil(MS/jT));for(let b=0;b<x;b++){if(await N()){console.error("Serena server is ready!");return}await new Promise((u$)=>setTimeout(u$,jT))}console.error("Timed out waiting for Serena server to start."),process.exit(1)}function G(B,M){let F=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 x={hostname:F.hostname,port:F.port,path:F.pathname,method:"POST",headers:A},b=u.request(x,M);b.on("error",(u$)=>{console.error("POST error:",u$.message)}),b.write(B),b.end()}function q(B,M){let F="";B.on("data",(A)=>{F+=A.toString(),F=F.replace(/\r\n/g,`
|
|
350
357
|
`);let x=F.split(`
|
|
351
358
|
|
|
352
359
|
`);F=x.pop()||"";for(let b of x){let u$=b.split(`
|
|
353
360
|
`),o="";for(let Y$ of u$)if(Y$.startsWith("data:"))o+=Y$.slice(5).trim();if(o)M(o)}})}function T(){if(!v||J)return;J=!0;let B=new URL(I),M={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}},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,(x)=>{process.stdout.write(`${x}
|
|
354
|
-
`)}),A.on("end",()=>{if(J=!1,!z)console.error("Server stream closed, reconnecting..."),setTimeout(T,1000)}),A.on("error",(x)=>{if(J=!1,console.error("Server stream error:",x.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(
|
|
361
|
+
`)}),A.on("end",()=>{if(J=!1,!z)console.error("Server stream closed, reconnecting..."),setTimeout(T,1000)}),A.on("error",(x)=>{if(J=!1,console.error("Server stream error:",x.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(RS(),!await N())await X();else console.error(`Connected to existing Serena server at ${I}`);let Q="",Y=!1,R=[];process.stdin.setEncoding("utf8");let K=(B)=>{Q+=B.toString();let M=Q.split(`
|
|
355
362
|
`);Q=M.pop()||"";for(let F of M)if(F.trim())W(F.trim())};process.stdin.on("data",K);function W(B){if(Y){R.push(B);return}V(B)}function O(){while(R.length>0){let B=R.shift();if(B)V(B)}}function V(B){try{let M=JSON.parse(B),F=M.method==="initialize";if(F)Y=!0;let A=JSON.stringify(M);G(A,(x)=>{let b=x.headers["mcp-session-id"];if(b)v=b;if(x.statusCode===202){if(x.resume(),F)Y=!1,O();return}if((x.headers["content-type"]||"").includes("text/event-stream"))q(x,(o)=>{process.stdout.write(`${o}
|
|
356
363
|
`)}),x.on("end",()=>{if(F){if(Y=!1,v)T();O()}});else{let o="";x.on("data",(Y$)=>{o+=Y$.toString()}),x.on("end",()=>{if(o.trim())process.stdout.write(`${o}
|
|
357
|
-
`);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 P=()=>{if(z=!0,
|
|
364
|
+
`);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 P=()=>{if(z=!0,FT(),g)console.error("Stopping Serena server..."),g.kill("SIGTERM");process.exit(0)};Z6={stdinData:K,sigint:P,sigterm:P},process.on("SIGINT",P),process.on("SIGTERM",P)}e$();var g4=q$(b$(),1);import{existsSync as e4,readdirSync as NI,readFileSync as kG,rmSync as wT}from"node:fs";import{tmpdir as KS}from"node:os";import{join as k$}from"node:path";async function LS($,I,U){let _=k$($,".gemini","antigravity"),u=k$(_,"brain"),g=k$(_,"implicit"),z=k$(_,"knowledge"),v=e4(u),J=e4(g),N=e4(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(`
|
|
358
365
|
`),G=U?!0:await O$({message:`Clean up IDE garbage?
|
|
359
|
-
${X}`,initialValue:!0});if(e(G)||!G)return{shouldCleanupBrain:!1,shouldCleanupImplicit:!1,shouldCleanupKnowledge:!1};return{shouldCleanupBrain:v,shouldCleanupImplicit:J,shouldCleanupKnowledge:N}}async function
|
|
360
|
-
`).filter((O)=>O.trim()),W=!1;for(let O of K){let[V,P]=O.split(":"),B=parseInt(V?.trim()||"",10);if(Number.isNaN(B))continue;if(G(B))W=!0,J(`Killing orphaned parallel agent PID=${B} (${P?.trim()||"unknown"})`),await q(B),X(Y)}if(!W)J(`Removing stale PID list: ${Y}`),X(Y);else if(!$){await new Promise((O)=>setTimeout(O,1000));try{
|
|
361
|
-
`);k(H,"Details")}let T=[
|
|
362
|
-
`);if(k(T,"Results"),$)d(
|
|
366
|
+
${X}`,initialValue:!0});if(e(G)||!G)return{shouldCleanupBrain:!1,shouldCleanupImplicit:!1,shouldCleanupKnowledge:!1};return{shouldCleanupBrain:v,shouldCleanupImplicit:J,shouldCleanupKnowledge:N}}async function ET($=!1,I=!1,U=!1){let _=process.cwd(),u=k$(_,".agents","results"),g=KS(),z={cleaned:0,skipped:0,details:[]},v=await LS(_,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{wT(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=NI(g).filter((Q)=>Q.startsWith("subagent-")&&Q.endsWith(".pid"));for(let Q of H){let Y=k$(g,Q),R=kG(Y,"utf-8").trim();if(!R){J(`Removing empty PID file: ${Y}`),X(Y);continue}let K=parseInt(R,10);if(Number.isNaN(K)){J(`Removing invalid PID file: ${Y}`),X(Y);continue}if(G(K))J(`Killing orphaned process PID=${K} (from ${Y})`),await q(K),X(Y);else J(`Removing stale PID file (process gone): ${Y}`),X(Y)}}catch{}try{let H=NI(g).filter((Q)=>Q.startsWith("subagent-")&&Q.endsWith(".log"));for(let Q of H){let Y=k$(g,Q),R=Q.replace(".log",".pid"),K=k$(g,R);if(e4(K))try{let W=kG(K,"utf-8").trim(),O=parseInt(W,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(e4(u))try{let H=NI(u).filter((Q)=>Q.startsWith("parallel-"));for(let Q of H){let Y=k$(u,Q,"pids.txt");if(!e4(Y))continue;let K=kG(Y,"utf-8").split(`
|
|
367
|
+
`).filter((O)=>O.trim()),W=!1;for(let O of K){let[V,P]=O.split(":"),B=parseInt(V?.trim()||"",10);if(Number.isNaN(B))continue;if(G(B))W=!0,J(`Killing orphaned parallel agent PID=${B} (${P?.trim()||"unknown"})`),await q(B),X(Y)}if(!W)J(`Removing stale PID list: ${Y}`),X(Y);else if(!$){await new Promise((O)=>setTimeout(O,1000));try{wT(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(e4(Q)){let Y=NI(Q);for(let R of Y){let K=k$(Q,R);J(`Removing brain file: ${K}`),X(K)}}}catch{}}if(v.shouldCleanupImplicit){let Q=k$(H,"implicit");try{if(e4(Q)){let Y=NI(Q);for(let R of Y){let K=k$(Q,R);J(`Removing implicit file: ${K}`),X(K)}}}catch{}}if(v.shouldCleanupKnowledge){let Q=k$(H,"knowledge");try{if(e4(Q)){let Y=NI(Q);for(let R of Y){let K=k$(Q,R);J(`Removing knowledge file: ${K}`),X(K)}}}catch{}}}if(I){console.log(JSON.stringify(z,null,2));return}if(console.clear(),D$(g4.default.bgMagenta(g4.default.white(" \uD83E\uDDF9 oh-my-agent cleanup "))),$)k(g4.default.yellow("Dry-run mode — no changes will be made"),"Mode");if(z.details.length>0){let H=[g4.default.bold("Cleanup Details"),...z.details.map((Q)=>{if(Q.startsWith("[DRY-RUN]"))return g4.default.yellow(Q);if(Q.startsWith("[CLEAN]"))return g4.default.green(Q);return g4.default.cyan(Q)})].join(`
|
|
368
|
+
`);k(H,"Details")}let T=[g4.default.bold("Summary"),"┌─────────┬────────┐",`│ ${g4.default.bold("Action")} │ ${g4.default.bold("Count")} │`,"├─────────┼────────┤",`│ Cleaned │ ${String(z.cleaned).padEnd(6)} │`,`│ Skipped │ ${String(z.skipped).padEnd(6)} │`,"└─────────┴────────┘"].join(`
|
|
369
|
+
`);if(k(T,"Results"),$)d(g4.default.yellow("Run without --dry-run to apply changes"));else d(g4.default.green("Cleanup complete!"))}e$();JI();a4();var i=q$(b$(),1);import{execSync as yG}from"node:child_process";import{existsSync as s4,readdirSync as CT,readFileSync as e_,writeFileSync as PS}from"node:fs";import{join as J1}from"node:path";async function a_($,I,U){try{let _=yG(`${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 WS($){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(s4(_.path))try{let u=e_(_.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 ZS(){let $=J1(process.cwd(),R4);if(!s4($))return[];let I=vI(),U=[];for(let _ of I){let u=J1($,_.name),g=J1(u,"SKILL.md");U.push({name:_.name,installed:s4(u),hasSkillMd:s4(g)})}return U}async function AS(){let $=process.env.HOME||process.env.USERPROFILE||"",I=J1($,".gemini","antigravity","global_workflows");if(!s4(I))return{installed:!1,count:0};try{return{installed:!0,count:CT(I).filter((_)=>_.endsWith(".md")).length}}catch{return{installed:!1,count:0}}}async function fT($=!1){let I=process.cwd(),U=process.env.HOME||process.env.USERPROFILE||"",_=await Promise.all([a_("gemini","gemini","bun install --global @google/gemini-cli"),a_("claude","claude","bun install --global @anthropic-ai/claude-code"),a_("codex","codex","bun install --global @openai/codex"),a_("qwen","qwen","bun install --global @qwen-code/qwen-code")]),u={gemini:CG,claude:EG,codex:fG,qwen:xG},g=await Promise.all(_.filter((V)=>V.installed).map(async(V)=>{let P=await WS(V.name);return{...V,mcp:P}})),z=await ZS(),v=await AS(),J=!1;try{J=yG("git config --get rerere.enabled",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim()==="true"}catch{}let N=_.some((V)=>V.name==="claude"&&V.installed),X=!1,G=!1,q=J1(U,".claude","settings.json"),T=J1(U,".claude","CLAUDE.md");if(N)try{if(s4(q)){let V=JSON.parse(e_(q,"utf-8"));X=(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"}}catch{}try{if(s4(T))G=e_(T,"utf-8").includes("<!-- OMA:START")}catch{}let H=J1(I,".serena","memories"),Q=s4(H),Y=0;if(Q)try{Y=CT(H).length}catch{}let R=_.filter((V)=>!V.installed),K=z.length>0?z.filter((V)=>!V.installed||!V.hasSkillMd):vI().map((V)=>({name:V.name,installed:!1,hasSkillMd:!1})),W=R.length+K.length+(v.installed?0:1)+(J?0:1)+(N&&!X?1:0)+(N&&!G?1:0);if($){let V={ok:W===0,issues:W,clis:_.map((P)=>({name:P.name,installed:P.installed,version:P.version||null,authenticated:P.installed?u[P.name]?.()??!1:!1})),mcp:g.map((P)=>({name:P.name,configured:P.mcp.configured,path:P.mcp.path||null})),skills:z.length>0?z.map((P)=>({name:P.name,installed:P.installed,complete:P.hasSkillMd})):[],missingSkills:K.map((P)=>P.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(V,null,2)),process.exit(W===0?0:1)}console.clear(),D$(i.default.bgMagenta(i.default.white(" \uD83E\uDE7A oh-my-agent doctor ")));let O=a$();try{let V=_.map((M)=>{let F=M.installed?i.default.green("✅"):i.default.red("❌"),A=M.version||"-",x=M.installed?u[M.name]?.()?i.default.green("✅"):i.default.red("❌"):i.default.dim("-");return`${F} ${M.name.padEnd(8)} ${A.padEnd(12)} ${x}`});if(k([`${"CLI".padEnd(11)} ${"Version".padEnd(12)} Auth`,...V].join(`
|
|
363
370
|
`),"CLI Status"),R.length>0)k(R.map((M)=>`${i.default.yellow("→")} ${M.name}: ${i.default.dim(M.installCmd)}`).join(`
|
|
364
371
|
`),"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"),x=F.mcp.path?F.mcp.path.split("/").pop()||"":"-";return`│ ${F.name.padEnd(7)} │ ${A.padEnd(8)} │ ${x.padEnd(19)} │`}),"└─────────┴──────────┴─────────────────────┘"].join(`
|
|
365
372
|
`);k(M,"MCP Status")}let P=z.filter((M)=>M.installed).length,B=z.filter((M)=>M.hasSkillMd).length;if(z.length>0){let M=[i.default.bold(`\uD83D\uDCE6 Skills (${P}/${z.length} installed, ${B} 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("❌"),x=F.hasSkillMd?i.default.green("✅"):i.default.red("❌");return`│ ${F.name.padEnd(18)} │ ${A.padEnd(8)} │ ${x.padEnd(11)} │`}),"└────────────────────┴──────────┴─────────────┘"].join(`
|
|
366
|
-
`);k(M,"Skills Status")}else k(i.default.yellow("No skills installed."),"Skills Status");if(K.length>0){let M=await O$({message:`Found ${K.length} missing/incomplete skill(s). Install them?`,initialValue:!0});if(e(M))
|
|
373
|
+
`);k(M,"Skills Status")}else k(i.default.yellow("No skills installed."),"Skills Status");if(K.length>0){let M=await O$({message:`Found ${K.length} missing/incomplete skill(s). Install them?`,initialValue:!0});if(e(M))U4("Cancelled."),process.exit(0);if(M){let F=K.map((b)=>b.name),A=await U1({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))U4("Cancelled."),process.exit(0);let x;if(A==="select"){let b=vI(),u$=await n_({message:"Select skills to install:",options:K.map((o)=>{let Y$=b.find((h$)=>h$.name===o.name);return{value:o.name,label:o.name,hint:Y$?.desc||""}}),required:!0});if(e(u$))U4("Cancelled."),process.exit(0);x=u$}else x=F;O.start("Installing skills...");try{c_(I,I);for(let b of x)O.message(`Installing ${i.default.cyan(b)}...`),h_(I,b,I);O.stop(`Installed ${x.length} skill(s)!`),k(x.map((b)=>`${i.default.green("✓")} ${b}`).join(`
|
|
367
374
|
`),"Installed Skills")}catch(b){O.stop("Installation failed"),t.error(b instanceof Error?b.message:String(b))}}}if(Q)k(`${i.default.green("✅")} Serena memory directory exists
|
|
368
375
|
${i.default.dim(`${Y} memory files found`)}`,"Serena Memory");else k(`${i.default.yellow("⚠️")} Serena memory directory not found
|
|
369
376
|
${i.default.dim("Dashboard will show 'No agents detected'")}`,"Serena Memory");if(v.installed)k(`${i.default.green("✅")} Global workflows installed
|
|
370
377
|
${i.default.dim(`${v.count} workflow files found`)}`,"Global Workflows");else k(`${i.default.red("❌")} Global workflows missing
|
|
371
|
-
${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{
|
|
372
|
-
${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(
|
|
378
|
+
${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{yG("git config --global rerere.enabled true"),t.success(i.default.green("git rerere enabled globally!"))}catch(F){t.error(`Failed to enable git rerere: ${F}`)}else k(`${i.default.yellow("⚠️")} git rerere is not enabled
|
|
379
|
+
${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(s4(q))F=JSON.parse(e_(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
|
|
373
380
|
|
|
374
|
-
Co-Authored-By: First Fluke <our.first.fluke@gmail.com>`,pr:"Generated with [oh-my-agent](https://github.com/first-fluke/oh-my-agent)"},
|
|
381
|
+
Co-Authored-By: First Fluke <our.first.fluke@gmail.com>`,pr:"Generated with [oh-my-agent](https://github.com/first-fluke/oh-my-agent)"},PS(q,`${JSON.stringify(F,null,2)}
|
|
375
382
|
`),t.success(i.default.green("Claude Code recommended settings applied!"))}catch(F){t.error(`Failed to apply Claude Code settings: ${F}`)}else k(`${i.default.yellow("⚠️")} Claude Code recommended settings not applied
|
|
376
383
|
${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
|
|
377
|
-
${i.default.dim("Run 'oh-my-agent' to install or reinstall")}`,"CLAUDE.md")}if(W===0)d(i.default.green("✅ All checks passed! Ready to use."));else d(i.default.yellow(`⚠️ Found ${W} issue(s). See details above.`));if(
|
|
384
|
+
${i.default.dim("Run 'oh-my-agent' to install or reinstall")}`,"CLAUDE.md")}if(W===0)d(i.default.green("✅ All checks passed! Ready to use."));else d(i.default.yellow(`⚠️ Found ${W} issue(s). See details above.`));if(PT())k(`${i.default.green("⭐")} Thank you for starring oh-my-agent!
|
|
378
385
|
${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!
|
|
379
386
|
${i.default.dim("gh api --method PUT /user/starred/first-fluke/oh-my-agent")}
|
|
380
|
-
${i.default.dim("https://github.com/sponsors/first-fluke")}`,"Support")}catch(V){if(O)O.stop("Check failed");t.error(V instanceof Error?V.message:String(V)),process.exit(1)}}
|
|
381
|
-
`)
|
|
382
|
-
`)
|
|
383
|
-
`),"Shared layout migration")}finally{N()}let X=p_(_,g,U);k([...U.map((O)=>`${B$.default.green("✓")} ${O}`),"",B$.default.dim(`Location: ${E0(_,B4)}`),...X.created.length>0?["",B$.default.cyan("Symlinks:"),...X.created.map((O)=>`${B$.default.green("→")} ${O}`)]:[],...X.skipped.length>0?["",B$.default.dim("Skipped:"),...X.skipped.map((O)=>B$.default.dim(` ${O}`))]:[]].join(`
|
|
384
|
-
`),"Installed");try{if(u2("git config --get rerere.enabled",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim()==="true")t.success(B$.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{u2("git config --global rerere.enabled true"),t.success(B$.default.green("git rerere enabled globally!"))}catch(V){t.error(`Failed to enable git rerere: ${V}`)}}let G=process.env.HOME||process.env.USERPROFILE||"",q=!1;try{u2("claude --version",{stdio:"ignore"}),q=!0}catch{}let T=E0(G,".claude","settings.json");if(q)try{let O={};if(U2(T))O=JSON.parse(kG(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 P=await O$({message:"Apply recommended Claude Code settings?",initialValue:!0});if(!e(P)&&P)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
|
|
385
|
-
|
|
386
|
-
Co-Authored-By: First Fluke <our.first.fluke@gmail.com>`,pr:"Generated with [oh-my-agent](https://github.com/first-fluke/oh-my-agent)"},yG(T,`${JSON.stringify(O,null,2)}
|
|
387
|
-
`),t.success(B$.default.green("Claude Code recommended settings applied!"))}}catch(O){t.warn(`Could not configure Claude Code settings: ${O}`)}let H=E0(G,".gemini","antigravity","mcp_config.json"),Q=null,Y=!1;try{if(U2(H)){let O=kG(H,"utf-8");Q=JSON.parse(O),Y=!0}}catch(O){}if(Y&&Q&&Q.mcpServers){let O=Q.mcpServers.serena,V="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 B=await O$({message:"Configure Serena MCP with bridge? (Required for full functionality)",initialValue:!0});if(e(B));else if(B){Q.mcpServers.serena={command:"npx",args:["-y","oh-my-agent@latest","bridge","http://localhost:12341/mcp"],disabled:!1};try{yG(H,JSON.stringify(Q,null,2)),t.success(B$.default.green("Serena MCP configured successfully!"))}catch(M){t.error(`Failed to update MCP config: ${M}`)}}}}let R=E0(G,".gemini","settings.json"),K=null,W=!1;try{if(U2(R)){let O=kG(R,"utf-8");K=JSON.parse(O),W=!0}}catch(O){}if(W&&K&&K.mcpServers){let O=K.mcpServers.serena;if(!(O&&O.url==="http://localhost:12341/mcp")){let P=await O$({message:"Configure Serena for Gemini CLI? (HTTP Mode)",initialValue:!0});if(e(P));else if(P){K.mcpServers.serena={url:"http://localhost:12341/mcp"};try{yG(R,JSON.stringify(K,null,2)),t.success(B$.default.green("Gemini CLI configured successfully!"))}catch(B){t.error(`Failed to update Gemini config: ${B}`)}}}}if(d(B$.default.green("Done! Open your project in your IDE to use the skills.")),U1()&&k4()&&!_1()){let O=await O$({message:`${B$.default.yellow("⭐")} Star ${B$.default.cyan(L$)} on GitHub? It helps a lot!`});if(!e(O)&&O)try{u2(`gh api -X PUT /user/starred/${L$}`,{stdio:"ignore"}),t.success(`Starred ${B$.default.cyan(L$)}! Thank you! \uD83C\uDF1F`)}catch{t.warn(`Could not star automatically. Try: ${B$.default.dim(`gh api --method PUT /user/starred/${L$}`)}`)}}}catch(J){v.stop("Installation failed"),t.error(J instanceof Error?J.message:String(J)),process.exit(1)}}e$();P0();var e4=X$(b$(),1);async function fT($=!1,I=!1){let U=process.cwd(),_=T7(U,{force:I});if($){console.log(JSON.stringify(_,null,2));return}console.clear(),D$(e4.default.bgMagenta(e4.default.white(" \uD83E\uDDE0 oh-my-agent memory:init ")));let u=[`Memories dir: ${e4.default.cyan(_.memoriesDir)}`,`Session ID: ${e4.default.cyan(_.sessionId)}`,"",e4.default.bold("Created:"),_.created.length>0?_.created.map((g)=>` + ${g}`).join(`
|
|
388
|
-
`):" (none)","",e4.default.bold("Updated:"),_.updated.length>0?_.updated.map((g)=>` ~ ${g}`).join(`
|
|
389
|
-
`):" (none)","",e4.default.bold("Skipped:"),_.skipped.length>0?_.skipped.map((g)=>` - ${g}`).join(`
|
|
387
|
+
${i.default.dim("https://github.com/sponsors/first-fluke")}`,"Support")}catch(V){if(O)O.stop("Check failed");t.error(V instanceof Error?V.message:String(V)),process.exit(1)}}dG();e$();Z0();var $6=q$(b$(),1);async function hT($=!1,I=!1){let U=process.cwd(),_=R7(U,{force:I});if($){console.log(JSON.stringify(_,null,2));return}console.clear(),D$($6.default.bgMagenta($6.default.white(" \uD83E\uDDE0 oh-my-agent memory:init ")));let u=[`Memories dir: ${$6.default.cyan(_.memoriesDir)}`,`Session ID: ${$6.default.cyan(_.sessionId)}`,"",$6.default.bold("Created:"),_.created.length>0?_.created.map((g)=>` + ${g}`).join(`
|
|
388
|
+
`):" (none)","",$6.default.bold("Updated:"),_.updated.length>0?_.updated.map((g)=>` ~ ${g}`).join(`
|
|
389
|
+
`):" (none)","",$6.default.bold("Skipped:"),_.skipped.length>0?_.skipped.map((g)=>` - ${g}`).join(`
|
|
390
390
|
`):" (none)"].join(`
|
|
391
|
-
`);k(u,"Memory Schema"),d(
|
|
392
|
-
`))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
|
|
393
|
-
`))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
|
|
394
|
-
`).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
|
|
395
|
-
`).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
|
|
396
|
-
`):" (no commits)"}function
|
|
397
|
-
`)}function
|
|
398
|
-
`)}function
|
|
399
|
-
`)}function
|
|
400
|
-
`)}function
|
|
401
|
-
`)}function
|
|
402
|
-
`)}function
|
|
391
|
+
`);k(u,"Memory Schema"),d($6.default.green("Memory schema ready!"))}e$();var W$=q$(b$(),1);import{execSync as nS}from"node:child_process";import{existsSync as cT,mkdirSync as rS,readdirSync as dT,readFileSync as lS,writeFileSync as mS}from"node:fs";import{join as pG}from"node:path";function oG($){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 pT($){let I=oG($);return{current:I,previous:{since:`${I.days*2} days ago`,until:`${I.days} days ago`,label:I.label,days:I.days}}}function A6($,I){try{return nS(I,{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"],maxBuffer:10485760}).trim()}catch{return""}}function oT($){A6($,"git fetch origin --quiet 2>/dev/null || true")}function tT($){return A6($,"git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's|refs/remotes/origin/||'")||"main"}function aT($){return A6($,"git config user.name")||"Unknown"}function eT($,I,U){let _=I.until?` --until="${I.until}"`:"",u=A6($,`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(`
|
|
392
|
+
`))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 hS($,I,U){let _=I.until?` --until="${I.until}"`:"",u=A6($,`git log ${U} --since="${I.since}"${_} --format="COMMIT:%H|%aN" --numstat`);if(!u)return[];let g=[],z="";for(let v of u.split(`
|
|
393
|
+
`))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 cS($,I,U,_=10){let u=I.until?` --until="${I.until}"`:"",g=A6($,`git log ${U} --since="${I.since}"${u} --format="" --name-only | grep -v '^$' | sort | uniq -c | sort -rn | head -${_}`);if(!g)return[];return g.split(`
|
|
394
|
+
`).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 dS($,I,U){let _=U?` --author="${U}"`:"",u=A6($,`git log ${I}${_} --format="%ad" --date=format:"%Y-%m-%d" | sort -u`);if(!u)return 0;let g=u.split(`
|
|
395
|
+
`).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 pS($,I,U){let _=I.until?` --until="${I.until}"`:"",u=A6($,`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 oS=/(?:test|spec|__tests__|\.test\.|\.spec\.)/i;function tG($){return oS.test($)}function sT($,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 $H($){let I=Array(24).fill(0);for(let U of $){let _=new Date(U.timestamp*1000).getHours();I[_]=(I[_]||0)+1}return I}function tS($){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 aS($){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 eS($,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&&tG(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 IH($){return pG($,".serena","retrospectives")}function aG($,I){let U=IH($);if(!cT(U))rS(U,{recursive:!0});let _=I.date.split("T")[0]||I.date,u=dT(U).filter((v)=>v.startsWith(_)).length,g=`${_}-${u+1}.json`,z=pG(U,g);return mS(z,JSON.stringify(I,null,2),"utf-8"),z}function uH($){let I=IH($);if(!cT(I))return null;try{let U=dT(I).filter((g)=>g.endsWith(".json")).sort().reverse();if(U.length===0)return null;let _=lS(pG(I,U[0]||""),"utf-8"),u=JSON.parse(_);if(u.metrics)return u;return null}catch{return null}}function UH($,I,U=30){if(I===0)return"";let _=Math.round($/I*U);return"█".repeat(_)}function sS($,I,U,_=25){let u=U>0?Math.round(I/U*100):0,g=UH(I,U,_);return` ${$.padEnd(12)} ${String(I).padStart(4)} (${String(u).padStart(2)}%) ${g}`}function _H($){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)} ${UH(u,I,20)}`)}return U.length>0?U.join(`
|
|
396
|
+
`):" (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(`
|
|
397
|
+
`)}function zH($,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(`
|
|
398
|
+
`)}function eG($,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(`
|
|
399
|
+
`)}function vH($){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(`
|
|
400
|
+
`)}function JH($){if($.length===0)return" (no file changes)";return $.map((I,U)=>{let _=I.count>=5?" [churn]":"",u=tG(I.file)?" [test]":"";return` ${String(U+1).padStart(2)}. ${I.file} (${I.count}x)${u}${_}`}).join(`
|
|
401
|
+
`)}function NH($,I){if(I===0)return" (no commits)";return Object.entries($).sort(([,U],[,_])=>_-U).map(([U,_])=>sS(U,_,I)).join(`
|
|
402
|
+
`)}function GH($){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 v2($,I){let U=`origin/${tT($)}`,_=eT($,I,U),u=hS($,I,U),g=cS($,I,U),z=eS(_,u),v=sT(_),J=$H(_),N=tS(_),X=aS(u),G=dS($,U),q=pS($,I,U),T=0;for(let P of u)if(tG(P.file))T+=P.insertions;let H=_.reduce((P,B)=>P+B.insertions,0),Q=_.reduce((P,B)=>P+B.deletions,0),Y=new Set(_.map((P)=>new Date(P.timestamp*1000).toISOString().split("T")[0])).size,R=v.reduce((P,B)=>P+B.durationMinutes,0),K=R/60,W=K>0?Math.round((H+Q)/K/50)*50:0,O=J.indexOf(Math.max(...J)),V={};for(let[P,B]of Object.entries(z)){let M=B.insertions>0?Math.round(B.testInsertions/B.insertions*100):0;V[P]={commits:B.commits,insertions:B.insertions,deletions:B.deletions,testRatio:M,topArea:B.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((P)=>P.type==="deep").length,avgSessionMinutes:v.length>0?Math.round(R/v.length):0,locPerSessionHour:W,peakHour:O,focusScore:X.score,focusArea:X.area,streakDays:G,aiAssistedCommits:q},authors:V,commitTypes:N,hotspots:g}}function sG($,I){let U=`origin/${tT($)}`,_=eT($,I,U);return{sessions:sT(_),hourly:$H(_)}}function BH($,I,U,_,u){if(console.log(W$.default.bold(W$.default.cyan(GH($)))),console.log(),k(gH($.metrics),"Summary"),u)k(eG($,u),"Trends vs Last Retro");if($.metrics.contributors>0)k(zH($.authors,_),"Contributors");if(k(_H(U),"Commit Time Distribution"),I.length>0)k(vH(I),"Work Sessions");if(k(NH($.commitTypes,$.metrics.commits),"Commit Types"),$.hotspots.length>0){let J=$.metrics.commits>0?Math.round(($.commitTypes.fix||0)/$.metrics.commits*100):0,N=JH($.hotspots);if(J>50)N+=`
|
|
403
403
|
|
|
404
|
-
${W$.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?W$.default.green:g>=40?W$.default.yellow:W$.default.red;if(k(` ${v(`${g}%`)} — primary area: ${W$.default.bold(z)}`,"Focus Score"),k(` ${W$.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
|
|
404
|
+
${W$.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?W$.default.green:g>=40?W$.default.yellow:W$.default.red;if(k(` ${v(`${g}%`)} — primary area: ${W$.default.bold(z)}`,"Focus Score"),k(` ${W$.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 MH($,I={}){let U=process.cwd();if(I.interactive){let{retro:X}=await Promise.resolve().then(() => (VH(),DH));await X();return}console.clear(),D$(W$.default.bgMagenta(W$.default.white(" retro ")));let _=a$();_.start("Fetching origin..."),oT(U),_.stop("Origin fetched");let u=aT(U);if(I.compare){let{current:X,previous:G}=pT($);_.start(`Analyzing current window (${X.label})...`);let q=v2(U,X),T=sG(U,X);_.stop("Current window analyzed"),_.start(`Analyzing previous window (${G.label})...`);let H=v2(U,G);if(_.stop("Previous window analyzed"),q.metrics.commits===0&&H.metrics.commits===0){k(W$.default.yellow("No commits found in either window."),"Empty"),d(W$.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(W$.default.bold(`
|
|
405
405
|
Comparing: ${X.label} (current) vs ${G.label} (prior)
|
|
406
|
-
`)),k(
|
|
406
|
+
`)),k(eG(q,H),"Period Comparison"),console.log(W$.default.bold(`
|
|
407
407
|
--- Current Period ---
|
|
408
|
-
`)),
|
|
409
|
-
`),"Usage"),d(W$.default.dim(X.message));return}_.start(`Analyzing ${g.label} window...`);let z=
|
|
410
|
-
`);k(T,"Overview");let H=Object.entries(u.skillsUsed).sort(([,Q],[,Y])=>Y-Q).slice(0,5);if(H.length>0){let Q=[
|
|
411
|
-
`);k(Q,"Skills")}d(
|
|
412
|
-
`),"Migration");if(!I)await
|
|
413
|
-
`),"Shared layout migration");
|
|
408
|
+
`)),BH(q,T.sessions,T.hourly,u,null);let Q=aG(U,q);d(W$.default.dim(`Snapshot saved: ${Q}`));return}let g;try{g=oG($)}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(`
|
|
409
|
+
`),"Usage"),d(W$.default.dim(X.message));return}_.start(`Analyzing ${g.label} window...`);let z=v2(U,g),v=sG(U,g);if(_.stop(`Analysis complete (${z.metrics.commits} commits)`),z.metrics.commits===0){k(W$.default.yellow("No commits found in this window."),"Empty"),d(W$.default.dim("Try a wider window: oma retro 30d"));return}if(I.json){console.log(JSON.stringify(z,null,2));return}let J=uH(U);BH(z,v.sessions,v.hourly,u,J);let N=aG(U,z);d(W$.default.dim(`Snapshot saved: ${N}`))}e$();JI();a4();var b6=q$(b$(),1);import{execSync as vw,spawnSync as RH}from"node:child_process";import{platform as Jw}from"node:os";function Nw(){let $=Jw();if($==="darwin")return"brew install gh";if($==="win32")return"winget install GitHub.cli";return"sudo apt install gh"}async function KH(){if(console.clear(),D$(b6.default.bgMagenta(b6.default.white(" ⭐ oh-my-agent star "))),!g1()){let I=Nw(),U=await O$({message:`GitHub CLI (gh) is not installed. Install with ${b6.default.cyan(I)}?`});if(e(U)||!U){d("Install gh manually and try again.");return}let _=a$();_.start("Installing GitHub CLI...");let u=RH(I,{shell:!0,stdio:"pipe"});if(u.status!==0){_.stop("Installation failed"),t.error(u.stderr?.toString()||"Unknown error"),d("Please install gh manually.");return}_.stop("GitHub CLI installed!")}if(!y4()){t.warn("GitHub CLI is not authenticated.");let I=await O$({message:`Run ${b6.default.cyan("gh auth login")} now?`});if(e(I)||!I){d("Authenticate and try again.");return}if(RH("gh",["auth","login"],{stdio:"inherit"}),!y4()){d("Authentication was not completed. Try again.");return}t.success("Authenticated!")}if(z1()){d(`Already starred ${b6.default.cyan(L$)}! Thank you! \uD83D\uDE4F`);return}let $=await O$({message:`Star ${b6.default.cyan(L$)} on GitHub?`});if(e($)||!$){d("Maybe next time!");return}try{vw(`gh api -X PUT /user/starred/${L$}`,{stdio:"ignore"}),d(`Starred ${b6.default.cyan(L$)}! Thank you! \uD83C\uDF1F`)}catch{t.error("Failed to star the repository."),d("Please try again later.")}}e$();I9();Z0();var K4=q$(b$(),1);import{existsSync as N2,mkdirSync as Gw,readdirSync as Xw,readFileSync as qw,writeFileSync as LH}from"node:fs";import{dirname as Qw,join as PH}from"node:path";function g9($){return PH($,".serena","metrics.json")}function _9(){return{sessions:0,skillsUsed:{},tasksCompleted:0,totalSessionTime:0,filesChanged:0,linesAdded:0,linesRemoved:0,lastUpdated:new Date().toISOString(),startDate:new Date().toISOString()}}function Tw($){let I=g9($);if(N2(I))try{return JSON.parse(qw(I,"utf-8"))}catch{return _9()}return _9()}function Hw($,I){let U=g9($),_=Qw(U);if(!N2(_))Gw(_,{recursive:!0});I.lastUpdated=new Date().toISOString(),LH(U,JSON.stringify(I,null,2),"utf-8")}function Yw($){let I=PH($,".serena","memories"),U={};if(!N2(I))return U;try{let _=Xw(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 WH($=!1,I=!1){let U=process.cwd(),_=g9(U);if(I){if(N2(_))LH(_,JSON.stringify(_9(),null,2),"utf-8");if($)console.log(JSON.stringify({reset:!0}));else console.log(K4.default.green("✅ Metrics reset successfully."));return}let u=Tw(U),g=J2(U),z=Yw(U),v=V7(U),J=P_(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,Hw(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(),D$(K4.default.bgMagenta(K4.default.white(" \uD83D\uDCCA oh-my-agent stats ")));let T=[K4.default.bold(`\uD83D\uDCC8 Productivity Metrics (${G} days)`),"┌─────────────────────┬──────────────┐",`│ ${K4.default.bold("Metric")} │ ${K4.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 │ ${K4.default.green(`+${u.linesAdded}`).padEnd(12)} │`,`│ Lines Removed │ ${K4.default.red(`-${u.linesRemoved}`).padEnd(12)} │`,"└─────────────────────┴──────────────┘"].join(`
|
|
410
|
+
`);k(T,"Overview");let H=Object.entries(u.skillsUsed).sort(([,Q],[,Y])=>Y-Q).slice(0,5);if(H.length>0){let Q=[K4.default.bold("\uD83C\uDFC6 Top Skills Used"),...H.map(([Y,R],K)=>` ${K+1}. ${Y} (${R})`)].join(`
|
|
411
|
+
`);k(Q,"Skills")}d(K4.default.dim(`Data stored in: ${_}`))}e$();nG();JI();var m$=q$(b$(),1);import{execSync as SH}from"node:child_process";import{cpSync as G2,existsSync as X1,mkdirSync as z9,readFileSync as v9,rmSync as wH,writeFileSync as X2}from"node:fs";import{tmpdir as Mw}from"node:os";import{join as s$}from"node:path";a4();import{existsSync as ZH,mkdirSync as Ow,readFileSync as Dw,writeFileSync as Vw}from"node:fs";import{dirname as Bw,join as AH}from"node:path";async function bH($){let I=AH($,R4,"_version.json");if(!ZH(I))return null;try{let U=Dw(I,"utf-8");return JSON.parse(U).version||null}catch{return null}}async function jH($,I){let U=AH($,R4,"_version.json"),_=Bw(U);if(!ZH(_))Ow(_,{recursive:!0});Vw(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()}rG();a4();mG();function Rw($){if(!$)return{intro:(U)=>D$(U),outro:(U)=>d(U),note:(U,_)=>k(U,_),logError:(U)=>t.error(U),spinnerStart:(U)=>{let _=a$();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 EH($=!1,I=!1){if(!I&&process.stdout.isTTY)console.clear();let U=Rw(I);U.intro(m$.default.bgMagenta(m$.default.white(" \uD83D\uDEF8 oh-my-agent update ")));let _=process.cwd(),u=u2(_);if(u.length>0)U.note(u.map((v)=>`${m$.default.green("✓")} ${v}`).join(`
|
|
412
|
+
`),"Migration");if(!I)await $2(_);let g=await bH(_);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(() => (dG(),mT));await v();return}let z;try{z=U.spinnerStart("Checking for updates...");let v=await FH();if(g===v.version){let X=C0(_);if(X.length>0)U.note(X.map((G)=>`${m$.default.green("✓")} ${G}`).join(`
|
|
413
|
+
`),"Shared layout migration");z.stop(m$.default.green("Already up to date!")),U.outro(`Current version: ${m$.default.cyan(g)}`);return}z.message(`Downloading ${m$.default.cyan(v.version)}...`);let{dir:J,cleanup:N}=await U2();try{z.message("Copying files...");let X=s$(_,".agents","config","user-preferences.yaml"),G=s$(_,".agents","mcp.json"),q=!$&&X1(X)?v9(X):null,T=!$&&X1(G)?v9(G):null,H=s$(Mw(),`oma-stack-backup-${Date.now()}`),Q=s$(_,".agents","skills","oma-backend","stack"),Y=!$&&X1(Q);if(Y)z9(H,{recursive:!0}),G2(Q,s$(H,"oma-backend"),{recursive:!0});let R=["snippets.md","tech-stack.md","api-template.py"],K=s$(_,".agents","skills","oma-backend","resources"),W=!$&&!Y&&R.some((A)=>X1(s$(K,A)));if(G2(s$(J,".agents"),s$(_,".agents"),{recursive:!0,force:!0}),q)X2(X,q);if(T)X2(G,T);if(Y)try{z9(Q,{recursive:!0}),G2(s$(H,"oma-backend"),Q,{recursive:!0,force:!0})}finally{wH(H,{recursive:!0,force:!0})}if(W){let A=s$(J,".agents","skills","oma-backend","variants","python");if(X1(A))z9(Q,{recursive:!0}),G2(A,Q,{recursive:!0,force:!0}),X2(s$(Q,"stack.yaml"),`language: python
|
|
414
414
|
framework: fastapi
|
|
415
415
|
orm: sqlalchemy
|
|
416
416
|
source: migrated
|
|
417
|
-
`)}let O=s$(_,".agents","skills","oma-backend","variants");if(
|
|
418
|
-
`),"Shared layout migration");await
|
|
417
|
+
`)}let O=s$(_,".agents","skills","oma-backend","variants");if(X1(O))wH(O,{recursive:!0,force:!0});let V=C0(_);if(V.length>0)U.note(V.map((A)=>`${m$.default.green("✓")} ${A}`).join(`
|
|
418
|
+
`),"Shared layout migration");await jH(_,v.version),o_(J,_,["claude","codex","gemini","qwen"]);let P=process.env.HOME||process.env.USERPROFILE||"",B=!1;try{SH("claude --version",{stdio:"ignore"}),B=!0}catch{}let M=s$(P,".claude","settings.json");if(B)try{let A={};if(X1(M))A=JSON.parse(v9(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)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
419
|
|
|
420
|
-
Co-Authored-By: First Fluke <our.first.fluke@gmail.com>`,pr:"Generated with [oh-my-agent](https://github.com/first-fluke/oh-my-agent)"},
|
|
421
|
-
`)}}catch{}let F=
|
|
422
|
-
`),"Symlinks updated")}}if(U.outro(`${
|
|
423
|
-
`)}function
|
|
424
|
-
`),"Account"),$.promptCredits||$.flowCredits){let U=[];if($.promptCredits)U.push(
|
|
425
|
-
`),"Credits")}if($.models.length===0)k(
|
|
426
|
-
`),`Models (${$.models.length})`)}d(
|
|
427
|
-
`),"Connection Failed"),process.exit(1);
|
|
428
|
-
`).filter(Boolean),J=[];for(let N of v)if(!g.some((G)=>N.startsWith(G)))J.push(N);if(J.length>0)return r("Scope Check","fail",`${J.length} out-of-scope: ${J[0]}${J.length>1?` +${J.length-1}`:""}`);return r("Scope Check","pass",`All ${v.length} files in scope`)}function
|
|
429
|
-
`);console.log(X),console.log();let G=`${y$.default.green(`${z} passed`)}, ${y$.default.red(`${v} failed`)}, ${y$.default.yellow(`${J} warnings`)}`;if(v>0)d(y$.default.red(`❌ Verification failed: ${G}`)),process.exit(1);d(y$.default.green(`✅ Verification passed: ${G}`)),process.exit(0)}var
|
|
430
|
-
`);for(let R of
|
|
431
|
-
`)}async function iH($){let I=kH(process.cwd());if($.json){console.log(JSON.stringify(I,null,2));return}console.log(yH(I))}import{existsSync as oC,mkdirSync as tC,readdirSync as h0,readFileSync as aC,statSync as F9}from"node:fs";import{createServer as eC}from"node:http";import{basename as QO,join as P4}from"node:path";import{EventEmitter as GE}from"node:events";import{stat as XE,Stats as um}from"node:fs";import{readdir as qE,stat as QE}from"node:fs/promises";import*as a from"node:path";import{lstat as nH,readdir as Cw,realpath as fw,stat as xw}from"node:fs/promises";import{join as kw,relative as yw,resolve as rH,sep as iw}from"node:path";import{Readable as nw}from"node:stream";var z4={FILE_TYPE:"files",DIR_TYPE:"directories",FILE_DIR_TYPE:"files_directories",EVERYTHING_TYPE:"all"},U9={root:".",fileFilter:($)=>!0,directoryFilter:($)=>!0,type:z4.FILE_TYPE,lstat:!1,depth:2147483648,alwaysStat:!1,highWaterMark:4096};Object.freeze(U9);var cH="READDIRP_RECURSIVE_ERROR",rw=new Set(["ENOENT","EPERM","EACCES","ELOOP",cH]),lH=[z4.DIR_TYPE,z4.EVERYTHING_TYPE,z4.FILE_DIR_TYPE,z4.FILE_TYPE],lw=new Set([z4.DIR_TYPE,z4.EVERYTHING_TYPE,z4.FILE_DIR_TYPE]),mw=new Set([z4.EVERYTHING_TYPE,z4.FILE_DIR_TYPE,z4.FILE_TYPE]),hw=($)=>rw.has($.code),cw=process.platform==="win32",mH=($)=>!0,hH=($)=>{if($===void 0)return mH;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 mH};class _9 extends nw{parents;reading;parent;_stat;_maxDepth;_wantsDir;_wantsFile;_wantsEverything;_root;_isDirent;_statsProp;_rdOptions;_fileFilter;_directoryFilter;constructor($={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:$.highWaterMark});let I={...U9,...$},{root:U,type:_}=I;this._fileFilter=hH(I.fileFilter),this._directoryFilter=hH(I.directoryFilter);let u=I.lstat?nH:xw;if(cw)this._stat=(g)=>u(g,{bigint:!0});else this._stat=u;this._maxDepth=I.depth!=null&&Number.isSafeInteger(I.depth)?I.depth:U9.depth,this._wantsDir=_?lw.has(_):!1,this._wantsFile=_?mw.has(_):!1,this._wantsEverything=_===z4.EVERYTHING_TYPE,this._root=rH(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=rH(kw(I,_));U={path:yw(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(hw($)&&!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 fw(U),u=await nH(_);if(u.isFile())return"file";if(u.isDirectory()){let g=_.length;if(U.startsWith(_)&&U.substr(g,1)===iw){let z=Error(`Circular symlink detected: "${U}" points to "${_}"`);return z.code=cH,this._onError(z)}return"directory"}}catch(_){return this._onError(_),""}}}_includeAsFile($){let I=$&&$[this._statsProp];return I&&this._wantsEverything&&!I.isDirectory()}}function dH($,I={}){let U=I.entryType||I.type;if(U==="both")U=z4.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&&!lH.includes(U))throw Error(`readdirp: Invalid type passed. Use one of ${lH.join(", ")}`);return I.root=$,new _9(I)}import{watch as dw,unwatchFile as pH,watchFile as pw}from"node:fs";import{realpath as g9,lstat as ow,open as tw,stat as tH}from"node:fs/promises";import{type as aw}from"node:os";import*as V$ from"node:path";var ew="data",J9="end",aH="close",Q2=()=>{};var T2=process.platform,N9=T2==="win32",sw=T2==="darwin",$E=T2==="linux",IE=T2==="freebsd",eH=aw()==="OS400",T$={ALL:"all",READY:"ready",ADD:"add",CHANGE:"change",ADD_DIR:"addDir",UNLINK:"unlink",UNLINK_DIR:"unlinkDir",RAW:"raw",ERROR:"error"},K4=T$,uE="watch",UE={lstat:ow,stat:tH},G1="listeners",G2="errHandlers",NI="rawEmitters",_E=[G1,G2,NI],gE=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"]),zE=($)=>gE.has(V$.extname($).slice(1).toLowerCase()),v9=($,I)=>{if($ instanceof Set)$.forEach(I);else I($)},C0=($,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]},f0=($,I,U)=>{let _=$[I];if(_ instanceof Set)_.delete(U);else if(_===U)delete $[I]},sH=($)=>$ instanceof Set?$.size===0:!$,X2=new Map;function oH($,I,U,_,u){let g=(z,v)=>{if(U($),u(z,v,{watchedPath:$}),v&&$!==v)q2(V$.resolve($,v),G1,V$.join($,v))};try{return dw($,{persistent:I.persistent},g)}catch(z){_(z);return}}var q2=($,I,U,_,u)=>{let g=X2.get($);if(!g)return;v9(g[I],(z)=>{z(U,_,u)})},JE=($,I,U,_)=>{let{listener:u,errHandler:g,rawEmitter:z}=_,v=X2.get(I),J;if(!U.persistent){if(J=oH($,U,u,g,z),!J)return;return J.close.bind(J)}if(v)C0(v,G1,u),C0(v,G2,g),C0(v,NI,z);else{if(J=oH($,U,q2.bind(null,I,G1),g,q2.bind(null,I,NI)),!J)return;J.on(K4.ERROR,async(N)=>{let X=q2.bind(null,I,G2);if(v)v.watcherUnusable=!0;if(N9&&N.code==="EPERM")try{await(await tw($,"r")).close(),X(N)}catch(G){}else X(N)}),v={listeners:u,errHandlers:g,rawEmitters:z,watcher:J},X2.set(I,v)}return()=>{if(f0(v,G1,u),f0(v,G2,g),f0(v,NI,z),sH(v.listeners))v.watcher.close(),X2.delete(I),_E.forEach(vE(v)),v.watcher=void 0,Object.freeze(v)}},z9=new Map,NE=($,I,U,_)=>{let{listener:u,rawEmitter:g}=_,z=z9.get(I),v=z&&z.options;if(v&&(v.persistent<U.persistent||v.interval>U.interval))pH(I),z=void 0;if(z)C0(z,G1,u),C0(z,NI,g);else z={listeners:u,rawEmitters:g,options:U,watcher:pw(I,U,(J,N)=>{v9(z.rawEmitters,(G)=>{G(K4.CHANGE,I,{curr:J,prev:N})});let X=J.mtimeMs;if(J.size!==N.size||X>N.mtimeMs||X===0)v9(z.listeners,(G)=>G($,J))})},z9.set(I,z);return()=>{if(f0(z,G1,u),f0(z,NI,g),sH(z.listeners))z9.delete(I),pH(I),z.options=z.watcher=void 0,Object.freeze(z)}};class G9{fsw;_boundHandleError;constructor($){this.fsw=$,this._boundHandleError=(I)=>$._handleError(I)}_watchWithNodeFs($,I){let U=this.fsw.options,_=V$.dirname($),u=V$.basename($);this.fsw._getWatchedDir(_).add(u);let z=V$.resolve($),v={persistent:U.persistent};if(!I)I=Q2;let J;if(U.usePolling){let N=U.interval!==U.binaryInterval;v.interval=N&&zE(u)?U.binaryInterval:U.interval,J=NE($,z,v,{listener:I,rawEmitter:this.fsw._emitRaw})}else J=JE($,z,v,{listener:I,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw});return J}_handleFile($,I,U){if(this.fsw.closed)return;let _=V$.dirname($),u=V$.basename($),g=this.fsw._getWatchedDir(_),z=I;if(g.has(u))return;let v=async(N,X)=>{if(!this.fsw._throttle(uE,$,5))return;if(!X||X.mtimeMs===0)try{let G=await tH($);if(this.fsw.closed)return;let{atimeMs:q,mtimeMs:T}=G;if(!q||q<=T||T!==z.mtimeMs)this.fsw._emit(K4.CHANGE,$,G);if((sw||$E||IE)&&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(K4.CHANGE,$,X);z=X}},J=this._watchWithNodeFs($,v);if(!(U&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored($)){if(!this.fsw._throttle(K4.ADD,$,0))return;this.fsw._emit(K4.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 g9(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(K4.CHANGE,U,$.stats)}else g.add(_),this.fsw._symlinkPaths.set(u,z),this.fsw._emit(K4.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){$=V$.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(ew,async(G)=>{if(this.fsw.closed){X=void 0;return}let q=G.path,T=V$.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=V$.join(u,V$.relative(u,T)),this._addToNodeFs(T,I,U,g+1)}).on(K4.ERROR,this._boundHandleError),new Promise((G,q)=>{if(!X)return q();X.once(J9,()=>{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(V$.dirname($)),J=v.has(V$.basename($));if(!(U&&this.fsw.options.ignoreInitial)&&!u&&!J)this.fsw._emit(K4.ADD_DIR,$,I);v.add(V$.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 UE[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=V$.resolve($),G=J?await g9($):$;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 g9($):$;if(this.fsw.closed)return;let G=V$.dirname(z.watchPath);if(this.fsw._getWatchedDir(G).add(z.watchPath),this.fsw._emit(K4.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(V$.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 X9="/",TE="//",_Y=".",HE="..",YE="string",OE=/\\/g,gY=/\/\//g,DE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,VE=/^\.[/\\]/;function H2($){return Array.isArray($)?$:[$]}var q9=($)=>typeof $==="object"&&$!==null&&!($ instanceof RegExp);function BE($){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 ME($){if(typeof $!=="string")throw Error("string expected");$=a.normalize($),$=$.replace(/\\/g,"/");let I=!1;if($.startsWith("//"))I=!0;if($=$.replace(gY,"/"),I)$="/"+$;return $}function $Y($,I,U){let _=ME(I);for(let u=0;u<$.length;u++){let g=$[u];if(g(_,U))return!0}return!1}function RE($,I){if($==null)throw TypeError("anymatch: specify first argument");let _=H2($).map((u)=>BE(u));if(I==null)return(u,g)=>{return $Y(_,u,g)};return $Y(_,I)}var IY=($)=>{let I=H2($).flat();if(!I.every((U)=>typeof U===YE))throw TypeError(`Non-string provided as watch path: ${I}`);return I.map(zY)},uY=($)=>{let I=$.replace(OE,X9),U=!1;if(I.startsWith(TE))U=!0;if(I=I.replace(gY,X9),U)I=X9+I;return I},zY=($)=>uY(a.normalize(uY($))),UY=($="")=>(I)=>{if(typeof I==="string")return zY(a.isAbsolute(I)?I:a.join($,I));else return I},KE=($,I)=>{if(a.isAbsolute($))return $;return a.join(I,$)},LE=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($!==_Y&&$!==HE)I.add($)}async remove($){let{items:I}=this;if(!I)return;if(I.delete($),I.size>0)return;let U=this.path;try{await qE(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=Q2,this.items=LE,Object.freeze(this)}}var PE="stat",WE="lstat";class JY{fsw;path;watchPath;fullWatchPath;dirParts;followSymlinks;statMethod;constructor($,I,U){this.fsw=U;let _=$;this.path=$=$.replace(VE,""),this.watchPath=_,this.fullWatchPath=a.resolve(_),this.dirParts=[],this.dirParts.forEach((u)=>{if(u.length>1)u.pop()}),this.followSymlinks=I,this.statMethod=I?PE:WE}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 NY extends GE{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?H2($.ignored):H2([]),awaitWriteFinish:I===!0?U:typeof I==="object"?{...U,...I}:!1};if(eH)_.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=Q2,this._readyEmitted=!0,process.nextTick(()=>this.emit(T$.READY))},this._emitRaw=(...v)=>this.emit(T$.RAW,...v),this._boundRemove=this._remove.bind(this),this.options=_,this._nodeFsHandler=new G9(this),Object.freeze(_)}_addIgnoredPath($){if(q9($)){for(let I of this._ignoredPaths)if(q9(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(q9(I)&&I.path===$)this._ignoredPaths.delete(I)}}add($,I,U){let{cwd:_}=this.options;this.closed=!1,this._closePromise=void 0;let u=IY($);if(_)u=u.map((g)=>{return KE(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=IY($),{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)||_Y;$[u]=I.getChildren().sort()}),$}emitWithAll($,I){if(this.emit($,...I),$!==T$.ERROR)this.emit(T$.ALL,$,...I)}async _emit($,I,U){if(this.closed)return;let _=this.options;if(N9)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($===T$.UNLINK)return this._pendingUnlinks.set(I,[$,...u]),setTimeout(()=>{this._pendingUnlinks.forEach((v,J)=>{this.emit(...v),this.emit(T$.ALL,...v),this._pendingUnlinks.delete(J)})},typeof _.atomic==="number"?_.atomic:100),this;if($===T$.ADD&&this._pendingUnlinks.has(I))$=T$.CHANGE,this._pendingUnlinks.delete(I)}if(g&&($===T$.ADD||$===T$.CHANGE)&&this._readyEmitted){let v=(J,N)=>{if(J)$=T$.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($===T$.CHANGE){if(!this._throttle(T$.CHANGE,I,50))return this}if(_.alwaysStat&&U===void 0&&($===T$.ADD||$===T$.ADD_DIR||$===T$.CHANGE)){let v=_.cwd?a.join(_.cwd,I):I,J;try{J=await QE(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(T$.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){XE(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&&DE.test($))return!0;if(!this._userIgnored){let{cwd:U}=this.options,u=(this.options.ignored||[]).map(UY(U)),z=[...[...this._ignoredPaths].map(UY(U)),...u];this._userIgnored=RE(z,void 0)}return this._userIgnored($,I)}_isntIgnored($,I){return!this._isIgnored($,I)}_getWatchHelpers($){return new JY($,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()===T$.ADD)return}this._watched.delete(_),this._watched.delete(u);let X=U?T$.UNLINK_DIR:T$.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:T$.ALL,alwaysStat:!0,lstat:!0,...I,depth:0},_=dH($,U);return this._streams.add(_),_.once(aH,()=>{_=void 0}),_.once(J9,()=>{if(_)this._streams.delete(_),_=void 0}),_}}function Y2($,I={}){let U=new NY(I);return U.add($),U}var OI=X$(b$(),1);var cC=X$(_O(),1),dC=X$(D9(),1),pC=X$(B9(),1),Z9=X$(Z2(),1),A9=X$(XO(),1);var qO=process.env.DASHBOARD_PORT?parseInt(process.env.DASHBOARD_PORT||"9847",10):9847;function sC(){if(process.env.MEMORIES_DIR)return process.env.MEMORIES_DIR;let $=process.argv[3];if($)return P4($,".serena","memories");return P4(process.cwd(),".serena","memories")}function c0($){try{return aC($,"utf-8")}catch{return""}}function $f($){try{let I=h0($);if(I.includes("orchestrator-session.md"))return P4($,"orchestrator-session.md");let U=I.filter((_)=>/^session-.*\.md$/.test(_)).map((_)=>({name:_,mtime:F9(P4($,_)).mtimeMs})).sort((_,u)=>u.mtime-_.mtime);if(U.length>0&&U[0])return P4($,U[0].name)}catch{}return null}function If($){let I=$f($);if(!I)return{id:"N/A",status:"UNKNOWN"};let U=c0(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]||QO(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 uf($){let I=c0(P4($,"task-board.md"));if(!I)return[];let U=[],_=I.split(`
|
|
432
|
-
`);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
|
|
433
|
-
`).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
|
|
420
|
+
Co-Authored-By: First Fluke <our.first.fluke@gmail.com>`,pr:"Generated with [oh-my-agent](https://github.com/first-fluke/oh-my-agent)"},X2(M,`${JSON.stringify(A,null,2)}
|
|
421
|
+
`)}}catch{}let F=LT(_);if(z.stop(`Updated to version ${m$.default.cyan(v.version)}!`),F.length>0){let A=KT(_);if(A.length>0){let{created:x}=t_(_,F,A);if(x.length>0)U.note(x.map((b)=>`${m$.default.green("→")} ${b}`).join(`
|
|
422
|
+
`),"Symlinks updated")}}if(U.outro(`${v.metadata?.totalFiles??0} files updated successfully`),!I&&g1()&&y4()&&!z1()){let A=await O$({message:`${m$.default.yellow("⭐")} Star ${m$.default.cyan(L$)} on GitHub? It helps a lot!`});if(!e(A)&&A)try{SH(`gh api -X PUT /user/starred/${L$}`,{stdio:"ignore"}),t.success(`Starred ${m$.default.cyan(L$)}! Thank you! \uD83C\uDF1F`)}catch{t.warn(`Could not star automatically. Try: ${m$.default.dim(`gh api --method PUT /user/starred/${L$}`)}`)}}}finally{N()}}catch(v){if(z?.stop("Update failed"),U.logError(v instanceof Error?v.message:String(v)),I)throw v;process.exit(1)}}e$();var Q$=q$(b$(),1);var CH=30;function kH($){let I=Math.round($/100*CH),U=CH-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 fH($){let I=$.remainingPercent.toFixed(0).padStart(4),U=kH($.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 xH($,I){let U=kH(I.remainingPercent),_=I.remainingPercent.toFixed(0).padStart(4),u=`${I.available.toLocaleString()} / ${I.monthly.toLocaleString()}`;return[` ${U} ${_}%`,` ${Q$.default.dim(u)}`].join(`
|
|
423
|
+
`)}function Kw($){console.clear(),D$(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(`
|
|
424
|
+
`),"Account"),$.promptCredits||$.flowCredits){let U=[];if($.promptCredits)U.push(Q$.default.bold(" Prompt"),xH("Prompt",$.promptCredits));if($.flowCredits){if(U.length>0)U.push("");U.push(Q$.default.bold(" Flow"),xH("Flow",$.flowCredits))}k(U.join(`
|
|
425
|
+
`),"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(fH(z));if(_.length>0){if(g.length>0)g.push("");g.push(Q$.default.red(" ── Exhausted ──"));for(let z of _)g.push(fH(z))}k(g.join(`
|
|
426
|
+
`),`Models (${$.models.length})`)}d(Q$.default.dim(`Updated ${$.timestamp.toLocaleTimeString()}`))}async function yH($=!1,I=!1){if(I){let _=await qT();if(!_)console.error("Failed to connect to Antigravity"),process.exit(1);console.log(JSON.stringify(_,null,2));return}if(!$){let _=a$();_.start("Connecting to Antigravity...");let u=await w0();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(`
|
|
427
|
+
`),"Connection Failed"),process.exit(1);Kw(u);return}let U=await w0();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))}e$();var y$=q$(b$(),1);import{execSync as Lw}from"node:child_process";import{existsSync as I6,readFileSync as J9}from"node:fs";import{join as j6}from"node:path";var iH=["backend","frontend","mobile","qa","debug","pm"];function r($,I,U){return{name:$,status:I,message:U}}function F$($,I){try{return Lw($,{encoding:"utf-8",cwd:I,stdio:["pipe","pipe","pipe"]}).trim()}catch{return null}}function Pw($,I){let U=j6($,".agents","plan.json");if(!I6(U))return r("Scope Check","skip","No plan.json found");let _;try{_=JSON.parse(J9(U,"utf-8"))}catch{return r("Scope Check","skip","Invalid plan.json")}let u=_.tasks?.filter((N)=>N.agent?.toLowerCase()===I);if(!u||u.length===0)return r("Scope Check","skip","No tasks for this agent");let g=u.flatMap((N)=>N.scope??[]);if(g.length===0)return r("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 r("Scope Check","pass","No files changed");let v=z.split(`
|
|
428
|
+
`).filter(Boolean),J=[];for(let N of v)if(!g.some((G)=>N.startsWith(G)))J.push(N);if(J.length>0)return r("Scope Check","fail",`${J.length} out-of-scope: ${J[0]}${J.length>1?` +${J.length-1}`:""}`);return r("Scope Check","pass",`All ${v.length} files in scope`)}function Ww($,I){let U=j6($,".serena","memories",`result-${I}.md`);if(!I6(U))return r("Charter Preflight","skip","Result file not found");let _=J9(U,"utf-8");if(!_.includes("CHARTER_CHECK:"))return r("Charter Preflight","warn","Block missing from result");if(/\{[^}]+\}/.test(_.split("CHARTER_CHECK:")[1]?.split("```")[0]||""))return r("Charter Preflight","warn","Contains unfilled placeholders");return r("Charter Preflight","pass","Properly filled")}function Zw($){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 r("Hardcoded Secrets","fail",`Found in: ${u.split(":")[0]}`)}return r("Hardcoded Secrets","pass","None detected")}function Aw($){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 r("TODO/FIXME Comments","warn",`${U} found`);return r("TODO/FIXME Comments","pass","None found")}function bw($){if(!F$("which uv",$))return r("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 r("Python Syntax","fail","Syntax errors found");return r("Python Syntax","pass","Valid")}function jw($){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 r("SQL Injection","fail","f-string with SQL keywords detected");return r("SQL Injection","pass","None detected")}function nH($){let I=F$("which uv",$),U=I6(j6($,"pyproject.toml"));if(!I||!U)return r("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 r("Python Tests","pass","Tests pass");return r("Python Tests","fail","Tests failing")}function Fw($){if(!I6(j6($,"tsconfig.json")))return r("TypeScript","skip","Not configured");let I=F$("npx tsc --noEmit 2>&1",$);if(I===null||I==="")return r("TypeScript","pass","Compilation clean");if(I.includes("error"))return r("TypeScript","fail","Type errors found");return r("TypeScript","pass","Compilation clean")}function Sw($){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 r("Inline Styles","warn",`${U} found (prefer Tailwind)`);return r("Inline Styles","pass","None found")}function ww($){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 r("Any Types","fail",`${U} found (limit: 3)`);if(U>0)return r("Any Types","warn",`${U} found`);return r("Any Types","pass","None found")}function rH($){if(!I6(j6($,"package.json")))return r("Frontend Tests","skip","No package.json");let I=F$("npx vitest run --reporter=verbose 2>&1",$);if(I?.includes("passed")||I?.includes("✓"))return r("Frontend Tests","pass","Tests pass");return r("Frontend Tests","warn","Tests failed or vitest not configured")}function Ew($){if(!F$("which flutter",$)){if(!F$("which dart",$))return r("Flutter/Dart Analysis","skip","Not available");if(F$("dart analyze 2>&1",$)?.includes("No issues found"))return r("Dart Analysis","pass","Clean");return r("Dart Analysis","fail","Issues found")}if(F$("flutter analyze 2>&1",$)?.includes("No issues found"))return r("Flutter Analysis","pass","Clean");return r("Flutter Analysis","fail","Issues found")}function Cw($){if(!F$("which flutter",$))return r("Flutter Tests","skip","Flutter not available");if(F$("flutter test 2>&1",$)?.includes("All tests passed"))return r("Flutter Tests","pass","All tests pass");return r("Flutter Tests","fail","Tests failed")}function fw($){let I=j6($,".agents","plan.json");if(!I6(I))return r("PM Plan","warn","plan.json not found");try{return JSON.parse(J9(I,"utf-8")),r("PM Plan","pass","Valid JSON")}catch{return r("PM Plan","fail","Invalid JSON")}}function xw($,I){let U=[];switch($){case"backend":U.push(bw(I)),U.push(jw(I)),U.push(nH(I));break;case"frontend":U.push(Fw(I)),U.push(Sw(I)),U.push(ww(I)),U.push(rH(I));break;case"mobile":U.push(Ew(I)),U.push(Cw(I));break;case"qa":U.push(r("QA Report","pass","Verified by self-check.md"));break;case"debug":if(I6(j6(I,"pyproject.toml")))U.push(nH(I));else if(I6(j6(I,"package.json")))U.push(rH(I));else U.push(r("Debug Tests","skip","No test runner detected"));break;case"pm":U.push(fw(I));break}return U}async function lH($,I,U=!1){let _=$.toLowerCase();if(!iH.includes(_)){let q=`Invalid agent type: ${$}. Valid types: ${iH.join(", ")}`;if(U)console.log(JSON.stringify({ok:!1,error:q}));else t.error(q);process.exit(2)}let u=I||process.cwd();if(!I6(u)){let q=`Workspace not found: ${u}`;if(U)console.log(JSON.stringify({ok:!1,error:q}));else t.error(q);process.exit(2)}let g=[];g.push(Pw(u,_)),g.push(Ww(u,_)),g.push(Zw(u)),g.push(Aw(u)),g.push(...xw(_,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(),D$(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")} │`,"├────────────────────────────┼────────┼─────────────────────────────┤",...g.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(`
|
|
429
|
+
`);console.log(X),console.log();let G=`${y$.default.green(`${z} passed`)}, ${y$.default.red(`${v} failed`)}, ${y$.default.yellow(`${J} warnings`)}`;if(v>0)d(y$.default.red(`❌ Verification failed: ${G}`)),process.exit(1);d(y$.default.green(`✅ Verification passed: ${G}`)),process.exit(0)}a4();var T$=q$(b$(),1);import{existsSync as kw,readdirSync as mH,readFileSync as yw}from"node:fs";import{join as L4}from"node:path";var hH=Object.fromEntries(Object.entries(T4).map(([$,I])=>[$,I.map((U)=>U.name)])),iw={"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 N9($){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 q2($){try{return yw($,"utf-8")}catch{return""}}function G9($){try{return mH($).filter((I)=>!I.startsWith("."))}catch{return[]}}function nw($){try{return mH($,{withFileTypes:!0}).filter((I)=>!I.name.startsWith("."))}catch{return[]}}function cH($,I=""){let U=[];for(let _ of nw($)){let u=I?`${I}/${_.name}`:_.name;if(_.isDirectory()){U.push({path:u,isDirectory:!0}),U.push(...cH(L4($,_.name),u));continue}if(!_.name.endsWith(".md"))continue;U.push({path:u.replace(/\.md$/,""),isDirectory:!1})}return U}function dH($){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=L4($,".agents","skills");for(let[G,q]of Object.entries(hH))for(let T of q){let H=L4(g,T);if(!kw(H))continue;let Q=`skill:${T}`;I.push({id:Q,label:T,category:"skill",group:"Skills",subgroup:G});let Y=[q2(L4(H,"SKILL.md")),q2(L4(H,"resources","execution-protocol.md"))].join(`
|
|
430
|
+
`);for(let R of N9(Y))u(Q,`shared:${R}`,"references")}let z=L4($,".agents","workflows");for(let G of G9(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 N9(q2(L4(z,G))))u(T,`shared:${H}`,"references")}let v=L4(g,"_shared");for(let G of cH(v)){let q=`shared:${G.path}`;if(I.push({id:q,label:G.path,category:"shared",group:"Shared"}),!G.isDirectory){for(let T of N9(q2(L4(v,`${G.path}.md`))))if(T!==G.path)u(q,`shared:${T}`,"references")}}let J=L4($,".claude","agents");for(let G of G9(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=iw[q];if(H)u(T,`skill:${H}`,"implements")}let N=L4($,".serena","memories");for(let G of G9(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 rw={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 z4($,I){return(rw[I]??T$.default.white)($)}function i4(...$){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 lw($){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,R=29,K=48,W=19;I.push(i4([24,z4("oh-my-agent","root"),11])),I.push(i4([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(i4([10,"▼",1],[29,"▼",1],[48,"▼",1])),I.push(i4([10-(G.length>>1),z4(G,"skill"),G.length],[29-(q.length>>1),z4(q,"workflow"),q.length],[48-(Q.length>>1),z4(Q,"memory"),Q.length])),I.push(i4([10,"│",1],[29,"│",1]));let V=`${v} refs`,P=`${J} refs`;I.push(i4([10-(V.length>>1),T$.default.dim(V),V.length],[29-(P.length>>1),T$.default.dim(P),P.length])),I.push(i4([10,"│",1],[29,"│",1]));let B=Array(30).fill(" ");B[10]="└",B[19]="┬",B[29]="┘";for(let b=11;b<29;b++)if(b!==19)B[b]="─";I.push(B.join("")),I.push(i4([19,"▼",1]));let M=19-(T.length>>1),F=i4([M,z4(T,"shared"),T.length]);if(X>0)F+=` ${T$.default.dim(`◂── ${X} internal`)}`;I.push(F),I.push("");let A=10-(H.length>>1),x=`──[${N} implements]──▸`;return I.push(i4([A,z4(H,"agent"),H.length])+` ${T$.default.dim(x)} ${z4("Skills","skill")}`),I}function pH($){let I=[];I.push(...lw($)),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(hH);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 R=Y===T.at(-1)?"└─":"├─";I.push(`${Q}${R} ${z4(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} ${z4(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} ${z4(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("──▸")} ${z4(T.to.split(":")[1]??"","skill")}`:"";I.push(`${q} ${z4(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} ${z4(G.label,"memory")}`)}return I.join(`
|
|
431
|
+
`)}async function oH($){let I=dH(process.cwd());if($.json){console.log(JSON.stringify(I,null,2));return}console.log(pH(I))}import{existsSync as _f,mkdirSync as gf,readdirSync as d0,readFileSync as zf,statSync as y9}from"node:fs";import{createServer as vf}from"node:http";import{basename as RO,join as Z4}from"node:path";import{EventEmitter as VE}from"node:events";import{stat as BE,Stats as Gm}from"node:fs";import{readdir as ME,stat as RE}from"node:fs/promises";import*as a from"node:path";import{lstat as tH,readdir as mw,realpath as hw,stat as cw}from"node:fs/promises";import{join as dw,relative as pw,resolve as aH,sep as ow}from"node:path";import{Readable as tw}from"node:stream";var v4={FILE_TYPE:"files",DIR_TYPE:"directories",FILE_DIR_TYPE:"files_directories",EVERYTHING_TYPE:"all"},X9={root:".",fileFilter:($)=>!0,directoryFilter:($)=>!0,type:v4.FILE_TYPE,lstat:!1,depth:2147483648,alwaysStat:!1,highWaterMark:4096};Object.freeze(X9);var IY="READDIRP_RECURSIVE_ERROR",aw=new Set(["ENOENT","EPERM","EACCES","ELOOP",IY]),eH=[v4.DIR_TYPE,v4.EVERYTHING_TYPE,v4.FILE_DIR_TYPE,v4.FILE_TYPE],ew=new Set([v4.DIR_TYPE,v4.EVERYTHING_TYPE,v4.FILE_DIR_TYPE]),sw=new Set([v4.EVERYTHING_TYPE,v4.FILE_DIR_TYPE,v4.FILE_TYPE]),$E=($)=>aw.has($.code),IE=process.platform==="win32",sH=($)=>!0,$Y=($)=>{if($===void 0)return sH;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 sH};class q9 extends tw{parents;reading;parent;_stat;_maxDepth;_wantsDir;_wantsFile;_wantsEverything;_root;_isDirent;_statsProp;_rdOptions;_fileFilter;_directoryFilter;constructor($={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:$.highWaterMark});let I={...X9,...$},{root:U,type:_}=I;this._fileFilter=$Y(I.fileFilter),this._directoryFilter=$Y(I.directoryFilter);let u=I.lstat?tH:cw;if(IE)this._stat=(g)=>u(g,{bigint:!0});else this._stat=u;this._maxDepth=I.depth!=null&&Number.isSafeInteger(I.depth)?I.depth:X9.depth,this._wantsDir=_?ew.has(_):!1,this._wantsFile=_?sw.has(_):!1,this._wantsEverything=_===v4.EVERYTHING_TYPE,this._root=aH(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 mw($,this._rdOptions)}catch(_){this._onError(_)}return{files:U,depth:I,path:$}}async _formatEntry($,I){let U,_=this._isDirent?$.name:$;try{let u=aH(dw(I,_));U={path:pw(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($E($)&&!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 hw(U),u=await tH(_);if(u.isFile())return"file";if(u.isDirectory()){let g=_.length;if(U.startsWith(_)&&U.substr(g,1)===ow){let z=Error(`Circular symlink detected: "${U}" points to "${_}"`);return z.code=IY,this._onError(z)}return"directory"}}catch(_){return this._onError(_),""}}}_includeAsFile($){let I=$&&$[this._statsProp];return I&&this._wantsEverything&&!I.isDirectory()}}function uY($,I={}){let U=I.entryType||I.type;if(U==="both")U=v4.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&&!eH.includes(U))throw Error(`readdirp: Invalid type passed. Use one of ${eH.join(", ")}`);return I.root=$,new q9(I)}import{watch as uE,unwatchFile as UY,watchFile as UE}from"node:fs";import{realpath as Q9,lstat as _E,open as gE,stat as gY}from"node:fs/promises";import{type as zE}from"node:os";import*as V$ from"node:path";var vE="data",Y9="end",zY="close",Y2=()=>{};var O2=process.platform,O9=O2==="win32",JE=O2==="darwin",NE=O2==="linux",GE=O2==="freebsd",vY=zE()==="OS400",H$={ALL:"all",READY:"ready",ADD:"add",CHANGE:"change",ADD_DIR:"addDir",UNLINK:"unlink",UNLINK_DIR:"unlinkDir",RAW:"raw",ERROR:"error"},P4=H$,XE="watch",qE={lstat:_E,stat:gY},q1="listeners",Q2="errHandlers",qI="rawEmitters",QE=[q1,Q2,qI],TE=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"]),HE=($)=>TE.has(V$.extname($).slice(1).toLowerCase()),H9=($,I)=>{if($ instanceof Set)$.forEach(I);else I($)},x0=($,I,U)=>{let _=$[I];if(!(_ instanceof Set))$[I]=_=new Set([_]);_.add(U)},YE=($)=>(I)=>{let U=$[I];if(U instanceof Set)U.clear();else delete $[I]},k0=($,I,U)=>{let _=$[I];if(_ instanceof Set)_.delete(U);else if(_===U)delete $[I]},JY=($)=>$ instanceof Set?$.size===0:!$,T2=new Map;function _Y($,I,U,_,u){let g=(z,v)=>{if(U($),u(z,v,{watchedPath:$}),v&&$!==v)H2(V$.resolve($,v),q1,V$.join($,v))};try{return uE($,{persistent:I.persistent},g)}catch(z){_(z);return}}var H2=($,I,U,_,u)=>{let g=T2.get($);if(!g)return;H9(g[I],(z)=>{z(U,_,u)})},OE=($,I,U,_)=>{let{listener:u,errHandler:g,rawEmitter:z}=_,v=T2.get(I),J;if(!U.persistent){if(J=_Y($,U,u,g,z),!J)return;return J.close.bind(J)}if(v)x0(v,q1,u),x0(v,Q2,g),x0(v,qI,z);else{if(J=_Y($,U,H2.bind(null,I,q1),g,H2.bind(null,I,qI)),!J)return;J.on(P4.ERROR,async(N)=>{let X=H2.bind(null,I,Q2);if(v)v.watcherUnusable=!0;if(O9&&N.code==="EPERM")try{await(await gE($,"r")).close(),X(N)}catch(G){}else X(N)}),v={listeners:u,errHandlers:g,rawEmitters:z,watcher:J},T2.set(I,v)}return()=>{if(k0(v,q1,u),k0(v,Q2,g),k0(v,qI,z),JY(v.listeners))v.watcher.close(),T2.delete(I),QE.forEach(YE(v)),v.watcher=void 0,Object.freeze(v)}},T9=new Map,DE=($,I,U,_)=>{let{listener:u,rawEmitter:g}=_,z=T9.get(I),v=z&&z.options;if(v&&(v.persistent<U.persistent||v.interval>U.interval))UY(I),z=void 0;if(z)x0(z,q1,u),x0(z,qI,g);else z={listeners:u,rawEmitters:g,options:U,watcher:UE(I,U,(J,N)=>{H9(z.rawEmitters,(G)=>{G(P4.CHANGE,I,{curr:J,prev:N})});let X=J.mtimeMs;if(J.size!==N.size||X>N.mtimeMs||X===0)H9(z.listeners,(G)=>G($,J))})},T9.set(I,z);return()=>{if(k0(z,q1,u),k0(z,qI,g),JY(z.listeners))T9.delete(I),UY(I),z.options=z.watcher=void 0,Object.freeze(z)}};class D9{fsw;_boundHandleError;constructor($){this.fsw=$,this._boundHandleError=(I)=>$._handleError(I)}_watchWithNodeFs($,I){let U=this.fsw.options,_=V$.dirname($),u=V$.basename($);this.fsw._getWatchedDir(_).add(u);let z=V$.resolve($),v={persistent:U.persistent};if(!I)I=Y2;let J;if(U.usePolling){let N=U.interval!==U.binaryInterval;v.interval=N&&HE(u)?U.binaryInterval:U.interval,J=DE($,z,v,{listener:I,rawEmitter:this.fsw._emitRaw})}else J=OE($,z,v,{listener:I,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw});return J}_handleFile($,I,U){if(this.fsw.closed)return;let _=V$.dirname($),u=V$.basename($),g=this.fsw._getWatchedDir(_),z=I;if(g.has(u))return;let v=async(N,X)=>{if(!this.fsw._throttle(XE,$,5))return;if(!X||X.mtimeMs===0)try{let G=await gY($);if(this.fsw.closed)return;let{atimeMs:q,mtimeMs:T}=G;if(!q||q<=T||T!==z.mtimeMs)this.fsw._emit(P4.CHANGE,$,G);if((JE||NE||GE)&&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(P4.CHANGE,$,X);z=X}},J=this._watchWithNodeFs($,v);if(!(U&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored($)){if(!this.fsw._throttle(P4.ADD,$,0))return;this.fsw._emit(P4.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 Q9(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(P4.CHANGE,U,$.stats)}else g.add(_),this.fsw._symlinkPaths.set(u,z),this.fsw._emit(P4.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){$=V$.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(vE,async(G)=>{if(this.fsw.closed){X=void 0;return}let q=G.path,T=V$.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=V$.join(u,V$.relative(u,T)),this._addToNodeFs(T,I,U,g+1)}).on(P4.ERROR,this._boundHandleError),new Promise((G,q)=>{if(!X)return q();X.once(Y9,()=>{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(V$.dirname($)),J=v.has(V$.basename($));if(!(U&&this.fsw.options.ignoreInitial)&&!u&&!J)this.fsw._emit(P4.ADD_DIR,$,I);v.add(V$.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 qE[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=V$.resolve($),G=J?await Q9($):$;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 Q9($):$;if(this.fsw.closed)return;let G=V$.dirname(z.watchPath);if(this.fsw._getWatchedDir(G).add(z.watchPath),this.fsw._emit(P4.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(V$.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 V9="/",KE="//",QY=".",LE="..",PE="string",WE=/\\/g,TY=/\/\//g,ZE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,AE=/^\.[/\\]/;function D2($){return Array.isArray($)?$:[$]}var B9=($)=>typeof $==="object"&&$!==null&&!($ instanceof RegExp);function bE($){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 jE($){if(typeof $!=="string")throw Error("string expected");$=a.normalize($),$=$.replace(/\\/g,"/");let I=!1;if($.startsWith("//"))I=!0;if($=$.replace(TY,"/"),I)$="/"+$;return $}function NY($,I,U){let _=jE(I);for(let u=0;u<$.length;u++){let g=$[u];if(g(_,U))return!0}return!1}function FE($,I){if($==null)throw TypeError("anymatch: specify first argument");let _=D2($).map((u)=>bE(u));if(I==null)return(u,g)=>{return NY(_,u,g)};return NY(_,I)}var GY=($)=>{let I=D2($).flat();if(!I.every((U)=>typeof U===PE))throw TypeError(`Non-string provided as watch path: ${I}`);return I.map(HY)},XY=($)=>{let I=$.replace(WE,V9),U=!1;if(I.startsWith(KE))U=!0;if(I=I.replace(TY,V9),U)I=V9+I;return I},HY=($)=>XY(a.normalize(XY($))),qY=($="")=>(I)=>{if(typeof I==="string")return HY(a.isAbsolute(I)?I:a.join($,I));else return I},SE=($,I)=>{if(a.isAbsolute($))return $;return a.join(I,$)},wE=Object.freeze(new Set);class YY{path;_removeWatcher;items;constructor($,I){this.path=$,this._removeWatcher=I,this.items=new Set}add($){let{items:I}=this;if(!I)return;if($!==QY&&$!==LE)I.add($)}async remove($){let{items:I}=this;if(!I)return;if(I.delete($),I.size>0)return;let U=this.path;try{await ME(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=Y2,this.items=wE,Object.freeze(this)}}var EE="stat",CE="lstat";class OY{fsw;path;watchPath;fullWatchPath;dirParts;followSymlinks;statMethod;constructor($,I,U){this.fsw=U;let _=$;this.path=$=$.replace(AE,""),this.watchPath=_,this.fullWatchPath=a.resolve(_),this.dirParts=[],this.dirParts.forEach((u)=>{if(u.length>1)u.pop()}),this.followSymlinks=I,this.statMethod=I?EE:CE}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 VE{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?D2($.ignored):D2([]),awaitWriteFinish:I===!0?U:typeof I==="object"?{...U,...I}:!1};if(vY)_.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=Y2,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 D9(this),Object.freeze(_)}_addIgnoredPath($){if(B9($)){for(let I of this._ignoredPaths)if(B9(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(B9(I)&&I.path===$)this._ignoredPaths.delete(I)}}add($,I,U){let{cwd:_}=this.options;this.closed=!1,this._closePromise=void 0;let u=GY($);if(_)u=u.map((g)=>{return SE(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=GY($),{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)||QY;$[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(O9)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){BE(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&&ZE.test($))return!0;if(!this._userIgnored){let{cwd:U}=this.options,u=(this.options.ignored||[]).map(qY(U)),z=[...[...this._ignoredPaths].map(qY(U)),...u];this._userIgnored=FE(z,void 0)}return this._userIgnored($,I)}_isntIgnored($,I){return!this._isIgnored($,I)}_getWatchHelpers($){return new OY($,this.options.followSymlinks,this)}_getWatchedDir($){let I=a.resolve($);if(!this._watched.has(I))this._watched.set(I,new YY(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},_=uY($,U);return this._streams.add(_),_.once(zY,()=>{_=void 0}),_.once(Y9,()=>{if(_)this._streams.delete(_),_=void 0}),_}}function V2($,I={}){let U=new DY(I);return U.add($),U}var BI=q$(b$(),1);var If=q$(QO(),1),uf=q$(W9(),1),Uf=q$(A9(),1),C9=q$(j2(),1),f9=q$(BO(),1);var MO=process.env.DASHBOARD_PORT?parseInt(process.env.DASHBOARD_PORT||"9847",10):9847;function Jf(){if(process.env.MEMORIES_DIR)return process.env.MEMORIES_DIR;let $=process.argv[3];if($)return Z4($,".serena","memories");return Z4(process.cwd(),".serena","memories")}function p0($){try{return zf($,"utf-8")}catch{return""}}function Nf($){try{let I=d0($);if(I.includes("orchestrator-session.md"))return Z4($,"orchestrator-session.md");let U=I.filter((_)=>/^session-.*\.md$/.test(_)).map((_)=>({name:_,mtime:y9(Z4($,_)).mtimeMs})).sort((_,u)=>u.mtime-_.mtime);if(U.length>0&&U[0])return Z4($,U[0].name)}catch{}return null}function Gf($){let I=Nf($);if(!I)return{id:"N/A",status:"UNKNOWN"};let U=p0(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 Xf($){let I=p0(Z4($,"task-board.md"));if(!I)return[];let U=[],_=I.split(`
|
|
432
|
+
`);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 k9($,I){try{let U=d0($).filter((g)=>g.startsWith(`progress-${I}`)&&g.endsWith(".md")).sort().reverse();if(U.length===0)return null;let u=(U[0]?p0(Z4($,U[0])):"").match(/turn[:\s]*(\d+)/i);return u?.[1]?parseInt(u[1],10):null}catch{return null}}function qf($){try{return d0($).filter((U)=>U.endsWith(".md")&&U!==".gitkeep").map((U)=>({name:U,mtime:y9(Z4($,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=p0(Z4($,U.name)).split(`
|
|
433
|
+
`).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 Qf($){let I=[],U=new Set;try{let _=d0($).filter((u)=>u.endsWith(".md")&&u!==".gitkeep").map((u)=>({name:u,mtime:y9(Z4($,u)).mtimeMs})).sort((u,g)=>g.mtime-u.mtime);for(let u of _){let g=p0(Z4($,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:k9($,v)})}}}catch{}return I}function x9($){let I=Gf($),_=Xf($).map((u)=>({...u,turn:k9($,u.agent)}));if(_.length===0)_=Qf($);if(_.length===0)try{let u=d0($).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:k9($,z)})}}catch{}return{session:I,agents:_,activity:qf($),memoriesDir:$,updatedAt:new Date().toISOString()}}var Tf=`<!DOCTYPE html>
|
|
434
434
|
<html lang="en">
|
|
435
435
|
<head>
|
|
436
436
|
<meta charset="UTF-8">
|
|
@@ -487,15 +487,15 @@ Co-Authored-By: First Fluke <our.first.fluke@gmail.com>`,pr:"Generated with [oh-
|
|
|
487
487
|
fetch('/api/state').then(r=>r.json()).then(renderState).catch(()=>{});connect();
|
|
488
488
|
</script>
|
|
489
489
|
</body>
|
|
490
|
-
</html>`;function
|
|
491
|
-
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(
|
|
492
|
-
\uD83D\uDEF8 Serena Memory Dashboard`)),console.log(
|
|
493
|
-
`))})}var
|
|
494
|
-
`);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
|
|
495
|
-
`).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
|
|
490
|
+
</html>`;function KO(){let $=Jf();if(!_f($))gf($,{recursive:!0});let I=vf((z,v)=>{if(z.url==="/api/state")v.writeHead(200,{"Content-Type":"application/json"}),v.end(JSON.stringify(x9($)));else v.writeHead(200,{"Content-Type":"text/html"}),v.end(Tf)}),U=new f9.default({server:I}),_=null;function u(z,v){if(_)clearTimeout(_);_=setTimeout(()=>{let J=JSON.stringify({type:"update",event:z,file:v,data:x9($)});U.clients.forEach((N)=>{if(N.readyState===C9.default.OPEN)N.send(J)})},100)}let g=V2($,{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:x9($)})),z.on("error",()=>z.terminate())}),process.on("SIGINT",()=>{console.log(`
|
|
491
|
+
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(MO,()=>{console.log(BI.magenta(`
|
|
492
|
+
\uD83D\uDEF8 Serena Memory Dashboard`)),console.log(BI.white(` http://localhost:${MO}`)),console.log(BI.dim(` Watching: ${$}
|
|
493
|
+
`))})}var LO={name:"oh-my-agent",version:"4.15.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 Yf,mkdirSync as Of,readdirSync as o0,readFileSync as Df,statSync as n9}from"node:fs";import{basename as Vf,join as A4}from"node:path";var i$=q$(b$(),1),Bf="●",Mf="✓",Rf="✗",Kf="○",Lf="◌";function Pf(){if(process.env.MEMORIES_DIR)return process.env.MEMORIES_DIR;let $=process.argv[3];if($)return A4($,".serena","memories");return A4(process.cwd(),".serena","memories")}function t0($){try{return Df($,"utf-8")}catch{return""}}function Wf($){try{let I=o0($);if(I.includes("orchestrator-session.md"))return A4($,"orchestrator-session.md");let U=I.filter((_)=>/^session-.*\.md$/.test(_)).map((_)=>({name:_,mtime:n9(A4($,_)).mtimeMs})).sort((_,u)=>u.mtime-_.mtime);if(U.length>0&&U[0])return A4($,U[0].name)}catch{}return null}function Zf($){let I=Wf($);if(!I)return{id:"N/A",status:"UNKNOWN"};let U=t0(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]||Vf(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 Af($){let I=t0(A4($,"task-board.md"));if(!I)return[];let U=[],_=I.split(`
|
|
494
|
+
`);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 i9($,I){try{let U=o0($).filter((g)=>g.startsWith(`progress-${I}`)&&g.endsWith(".md")).sort().reverse();if(U.length===0||!U[0])return null;let u=t0(A4($,U[0])).match(/turn[:\s]*(\d+)/i);return u?.[1]?parseInt(u[1],10):null}catch{return null}}function bf($){try{let I=o0($).filter((_)=>_.endsWith(".md")&&_!==".gitkeep").map((_)=>({name:_,mtime:n9(A4($,_)).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=t0(A4($,_.name)).split(`
|
|
495
|
+
`).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 jf($){let I=[],U=new Set;try{let _=o0($).filter((u)=>u.endsWith(".md")&&u!==".gitkeep").map((u)=>({name:u,mtime:n9(A4($,u)).mtimeMs})).sort((u,g)=>g.mtime-u.mtime);for(let u of _){let g=t0(A4($,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:i9($,v)})}}}catch{}return I}function Ff($){let I=$.toLowerCase();if(["running","active","in_progress","in-progress"].includes(I))return`${i$.default.green(Bf)} running`;else if(["completed","done","finished"].includes(I))return`${i$.default.cyan(Mf)} completed`;else if(["failed","error"].includes(I))return`${i$.default.red(Rf)} failed`;else if(["blocked","waiting"].includes(I))return`${i$.default.yellow(Kf)} blocked`;return`${i$.default.dim(Lf)} pending`}function PO($){console.clear();let I=Zf($),_=Af($).map((Q)=>({...Q,turn:i9($,Q.agent)}));if(_.length===0)_=jf($);if(_.length===0)try{let Q=o0($).filter((Y)=>Y.startsWith("progress-")&&Y.endsWith(".md"));for(let Y of Q){let R=Y.replace(/^progress-/,"").replace(/\.md$/,"");_.push({agent:R,status:"running",task:"",turn:i9($,R)})}}catch{}let u=56,g="═".repeat(u),z=(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(`╔${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=Ff(Q.status),R=Q.turn!=null?String(Q.turn):"-",K=Q.task.substring(0,20);console.log(`${v("║")} ${Q.agent.padEnd(12)} ${Y.padEnd(22)} ${R.padEnd(6)} ${K.padEnd(20)}${v("║")}`)}console.log(`${v(`╠${g}╣`)}`),console.log(`${v("║")} ${J("Latest Activity:")}${z(u-18)}${v("║")}`);let q=bf($);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 WO(){let $=Pf();if(!Yf($))Of($,{recursive:!0}),console.log(i$.default.yellow(`Created ${$} — waiting for memory files...`));console.log(i$.default.magenta(`
|
|
496
496
|
\uD83D\uDEF8 Serena Terminal Dashboard`)),console.log(i$.default.dim(` Watching: ${$}
|
|
497
|
-
`)),
|
|
498
|
-
`),I.close(),U(),process.exit(0)}),process.on("SIGTERM",()=>process.emit("SIGINT"))})}var
|
|
497
|
+
`)),PO($);let I=V2($,{persistent:!0,ignoreInitial:!0,awaitWriteFinish:{stabilityThreshold:200,pollInterval:50}});return I.on("all",()=>PO($)),new Promise((U)=>{process.on("SIGINT",()=>{console.log(`
|
|
498
|
+
`),I.close(),U(),process.exit(0)}),process.on("SIGTERM",()=>process.emit("SIGINT"))})}var jO=LO.version,FO="OH_MY_AG_OUTPUT_FORMAT",a0=["text","json"],ZO=["gemini","claude","codex","qwen"],AO=["backend","frontend","mobile","qa","debug","pm"];function g6($,I="Output as JSON"){return $.option("--json",I).option("--output <format>","Output format (text/json)",(U)=>{let _=U.trim().toLowerCase();if(!a0.includes(_))throw Error(`Invalid output format: ${U}. Expected one of ${a0.join(", ")}`);return _})}function Sf($){if($?.json)return"json";let I=$?.output?.trim().toLowerCase();if(I&&a0.includes(I))return I;if(process.env[FO]?.trim().toLowerCase()==="json")return"json";return"text"}function r4($){return Sf($)==="json"}function SO($){let I=$.at(-1);return I instanceof r2?I:null}function wf($){let I=SO($);if(I)return I.opts();let U=$.at(-1);return U&&typeof U==="object"?U:{}}function Ef($){if($ instanceof Error)return $.message;return String($)}function C6($){throw Error($)}function l9($,I){for(let U of $){let _=U.charCodeAt(0);if(_>=0&&_<=31||_===127)C6(`${I} must not contain control characters`)}}function Cf($,I){if(l9($,I),/[?#%]/.test($))C6(`${I} must not contain ?, #, or %`);if($.includes(".."))C6(`${I} must not contain '..'`)}function ff($,I){l9($,I);try{new URL($)}catch{C6(`${I} must be a valid absolute URL`)}}function r9($,I,U="text"){if(typeof $==="string"){if(U==="identifier"){Cf($,I);return}if(U==="url"){ff($,I);return}l9($,I);return}if(Array.isArray($))for(let[_,u]of $.entries())r9(u,`${I}[${_}]`,U)}function bO($){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 xf($){let I=$.vendor;if(typeof I==="string"&&!ZO.includes(I))C6(`vendor must be one of ${ZO.join(", ")}`);let U=$.output;if(typeof U==="string"&&!a0.includes(U))C6(`output must be one of ${a0.join(", ")}`)}function kf($){let I=$.processedArgs??$.args??[];($.registeredArguments??[]).forEach((u,g)=>{let z=u.name?.()||String(g),v=I[g];if(r9(v,z,bO(z)),z==="agent-type"&&typeof v==="string"&&!AO.includes(v))C6(`agent-type must be one of ${AO.join(", ")}`)});let _=$.opts();xf(_);for(let[u,g]of Object.entries(_))r9(g,u,bO(u))}function yf($){return($.registeredArguments??[]).map((I)=>({name:I.name?.()||"",required:!!I.required,variadic:!!I.variadic}))}function nf($){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 wO($){let I=[],U=$;while(U?.parent)I.unshift(U.name()),U=U.parent;return I.join(" ")}function rf($){return $.options.some((I)=>I.long==="--json"||I.long==="--output")}function lf($){return $.options.some((I)=>I.long==="--dry-run")}function EO($){return{name:$.name(),path:wO($),summary:$.summary()||void 0,description:$.description(),arguments:yf($),options:nf($),supportsJsonOutput:rf($),supportsDryRun:lf($),subcommands:$.commands.map((I)=>EO(I))}}function mf($,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||wO(u)===U)return u;_.push(...u.commands)}return null}function hf($,I){let U=mf($,I);if(!U)C6(`Unknown command: ${I}`);let _={name:$.name(),version:$.version(),description:$.description(),env:{[FO]:"Set to json to force machine-readable output on commands that support it."},command:EO(U)};console.log(JSON.stringify(_,null,2))}function B$($,I={}){return async(...U)=>{let _=SO(U),u=wf(U);try{if(_)kf(_);await $(...U)}catch(g){let z=Ef(g);if(I.supportsJsonOutput&&r4(u))console.log(JSON.stringify({error:z},null,2));else console.error(z);process.exitCode=1}}}var X$=new r2;X$.name("oh-my-ag").description("Multi-Agent Orchestrator for AI IDEs").version(jO).showSuggestionAfterError().showHelpAfterError().addHelpText("after",`
|
|
499
499
|
Aliases:
|
|
500
500
|
oma Alias for oh-my-ag after global installation.
|
|
501
|
-
`).action(
|
|
501
|
+
`).action(B$(async()=>{await z2()}));X$.command("install").description("Install oh-my-agent skills and configurations").action(B$(async()=>{await z2()}));X$.command("describe [command-path]").description("Describe CLI commands as JSON for runtime introspection").action(B$(($)=>{hf(X$,$)},{supportsJsonOutput:!0}));X$.command("dashboard").description("Start terminal dashboard (real-time agent monitoring)").action(B$(async()=>{await WO()}));X$.command("dashboard:web").description("Start web dashboard on http://localhost:9847").action(B$(()=>{KO()}));g6(X$.command("auth:status").description("Check authentication status of all supported CLIs")).action(B$(async($)=>{await WT(r4($))},{supportsJsonOutput:!0}));g6(X$.command("usage:anti").description("Show model usage quotas (connects to local Antigravity IDE)").option("--raw","Dump raw RPC response")).action(B$(async($)=>{await yH(r4($),$.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(B$(async($)=>{await EH($.force??!1,$.ci??!1)}));g6(X$.command("doctor").description("Check CLI installations, MCP configs, and skill status"),"Output as JSON for CI/CD").action(B$(async($)=>{await fT(r4($))},{supportsJsonOutput:!0}));g6(X$.command("stats").description("View productivity metrics").option("--reset","Reset metrics data")).action(B$(async($)=>{await WH(r4($),$.reset)},{supportsJsonOutput:!0}));g6(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(B$(async($,I)=>{await MH($,{json:r4(I),compare:I.compare,interactive:I.interactive})},{supportsJsonOutput:!0}));g6(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(B$(async($)=>{await ET($.dryRun,r4($),$.yes)},{supportsJsonOutput:!0}));X$.command("bridge [url]").description("Bridge MCP stdio to Streamable HTTP (for Serena)").action(B$(async($)=>{await ST($)}));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(B$(async($,I,U,_)=>{await F7($,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(B$(async($,I,U)=>{await S7($,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(B$(async($,I)=>{await w7($,{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(B$(async($)=>{await E7({prompt:$.prompt,model:$.model,workspace:$.workspace,uncommitted:$.uncommitted})}));g6(X$.command("memory:init").description("Initialize Serena memory schema in .serena/memories").option("--force","Overwrite empty or existing schema files")).action(B$(async($)=>{await hT(r4($),$.force)},{supportsJsonOutput:!0}));g6(X$.command("verify <agent-type>").description("Verify subagent output (backend/frontend/mobile/qa/debug/pm)").option("-w, --workspace <path>","Workspace path",process.cwd())).action(B$(async($,I)=>{await lH($,I.workspace,r4(I))},{supportsJsonOutput:!0}));X$.command("star").description("Star oh-my-agent on GitHub").action(B$(async()=>{await KH()}));g6(X$.command("visualize").alias("viz").description("Visualize project structure as a dependency graph")).action(B$(async($)=>{await oH({json:r4($)})},{supportsJsonOutput:!0}));X$.command("help").description("Show help information").action(B$(()=>{X$.help()}));X$.command("version").description("Show version number").action(B$(()=>{console.log(jO)}));X$.parse();
|