oh-my-agent 4.26.0 → 4.26.3
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 +317 -317
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -1,405 +1,405 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{createRequire as
|
|
3
|
-
`)}displayWidth($){return
|
|
4
|
-
`+" ".repeat(I+
|
|
5
|
-
${z}`)}boxWrap($,I){if(I<this.minWidthToWrap)return $;let _=$.split(/\r\n|\n/),u=/[\s]*[^\s]+/g,U=[];return _.forEach((z)=>{let
|
|
6
|
-
`)}}function
|
|
2
|
+
import{createRequire as FB}from"node:module";var LB=Object.create;var{getPrototypeOf:VB,defineProperty:tu,getOwnPropertyNames:ZB}=Object;var WB=Object.prototype.hasOwnProperty;function RB($){return this[$]}var PB,bB,H$=($,I,_)=>{var u=$!=null&&typeof $==="object";if(u){var U=I?PB??=new WeakMap:bB??=new WeakMap,z=U.get($);if(z)return z}_=$!=null?LB(VB($)):{};let J=I||!$||!$.__esModule?tu(_,"default",{value:$,enumerable:!0}):_;for(let G of ZB($))if(!WB.call(J,G))tu(J,G,{get:RB.bind($,G),enumerable:!0});if(u)U.set($,J);return J};var w=($,I)=>()=>(I||$((I={exports:{}}).exports,I),I.exports);var AB=($)=>$;function jB($,I){this[$]=AB.bind(null,I)}var S4=($,I)=>{for(var _ in I)tu($,_,{get:I[_],enumerable:!0,configurable:!0,set:jB.bind(I,_)})};var w0=($,I)=>()=>($&&(I=$($=0)),I);var J$=FB(import.meta.url);var E0=w((SB)=>{class au extends Error{constructor($,I,_){super(_);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=I,this.exitCode=$,this.nestedError=void 0}}class N5 extends au{constructor($){super(1,"commander.invalidArgument",$);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}SB.CommanderError=au;SB.InvalidArgumentError=N5});var TU=w((xB)=>{var{InvalidArgumentError:CB}=E0();class Q5{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,_)=>{if(!this.argChoices.includes(I))throw new CB(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._collectValue(I,_);return I},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}}function fB($){let I=$.name()+($.variadic===!0?"...":"");return $.required?"<"+I+">":"["+I+"]"}xB.Argument=Q5;xB.humanReadableArgName=fB});var eu=w((lB)=>{var{humanReadableArgName:iB}=TU();class v5{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((u)=>!u._hidden),_=$._getHelpCommand();if(_&&!_._hidden)I.push(_);if(this.sortSubcommands)I.sort((u,U)=>{return u.name().localeCompare(U.name())});return I}compareOptions($,I){let _=(u)=>{return u.short?u.short.replace(/^-/,""):u.long.replace(/^--/,"")};return _($).localeCompare(_(I))}visibleOptions($){let I=$.options.filter((u)=>!u.hidden),_=$._getHelpOption();if(_&&!_.hidden){let u=_.short&&$._findOption(_.short),U=_.long&&$._findOption(_.long);if(!u&&!U)I.push(_);else if(_.long&&!U)I.push($.createOption(_.long,_.description));else if(_.short&&!u)I.push($.createOption(_.short,_.description))}if(this.sortOptions)I.sort(this.compareOptions);return I}visibleGlobalOptions($){if(!this.showGlobalOptions)return[];let I=[];for(let _=$.parent;_;_=_.parent){let u=_.options.filter((U)=>!U.hidden);I.push(...u)}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((_)=>iB(_)).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(_,this.displayWidth(I.styleSubcommandTerm(I.subcommandTerm(u))))},0)}longestOptionTermLength($,I){return I.visibleOptions($).reduce((_,u)=>{return Math.max(_,this.displayWidth(I.styleOptionTerm(I.optionTerm(u))))},0)}longestGlobalOptionTermLength($,I){return I.visibleGlobalOptions($).reduce((_,u)=>{return Math.max(_,this.displayWidth(I.styleOptionTerm(I.optionTerm(u))))},0)}longestArgumentTermLength($,I){return I.visibleArguments($).reduce((_,u)=>{return Math.max(_,this.displayWidth(I.styleArgumentTerm(I.argumentTerm(u))))},0)}commandUsage($){let I=$._name;if($._aliases[0])I=I+"|"+$._aliases[0];let _="";for(let u=$.parent;u;u=u.parent)_=u.name()+" "+_;return _+I+" "+$.usage()}commandDescription($){return $.description()}subcommandDescription($){return $.summary()||$.description()}optionDescription($){let I=[];if($.argChoices)I.push(`choices: ${$.argChoices.map((_)=>JSON.stringify(_)).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 _=`(${I.join(", ")})`;if($.description)return`${$.description} ${_}`;return _}return $.description}argumentDescription($){let I=[];if($.argChoices)I.push(`choices: ${$.argChoices.map((_)=>JSON.stringify(_)).join(", ")}`);if($.defaultValue!==void 0)I.push(`default: ${$.defaultValueDescription||JSON.stringify($.defaultValue)}`);if(I.length>0){let _=`(${I.join(", ")})`;if($.description)return`${$.description} ${_}`;return _}return $.description}formatItemList($,I,_){if(I.length===0)return[];return[_.styleTitle($),...I,""]}groupItems($,I,_){let u=new Map;return $.forEach((U)=>{let z=_(U);if(!u.has(z))u.set(z,[])}),I.forEach((U)=>{let z=_(U);if(!u.has(z))u.set(z,[]);u.get(z).push(U)}),u}formatHelp($,I){let _=I.padWidth($,I),u=I.helpWidth??80;function U(N,X){return I.formatItem(N,_,X,I)}let z=[`${I.styleTitle("Usage:")} ${I.styleUsage(I.commandUsage($))}`,""],J=I.commandDescription($);if(J.length>0)z=z.concat([I.boxWrap(I.styleCommandDescription(J),u),""]);let G=I.visibleArguments($).map((N)=>{return U(I.styleArgumentTerm(I.argumentTerm(N)),I.styleArgumentDescription(I.argumentDescription(N)))});if(z=z.concat(this.formatItemList("Arguments:",G,I)),this.groupItems($.options,I.visibleOptions($),(N)=>N.helpGroupHeading??"Options:").forEach((N,X)=>{let Q=N.map((H)=>{return U(I.styleOptionTerm(I.optionTerm(H)),I.styleOptionDescription(I.optionDescription(H)))});z=z.concat(this.formatItemList(X,Q,I))}),I.showGlobalOptions){let N=I.visibleGlobalOptions($).map((X)=>{return U(I.styleOptionTerm(I.optionTerm(X)),I.styleOptionDescription(I.optionDescription(X)))});z=z.concat(this.formatItemList("Global Options:",N,I))}return this.groupItems($.commands,I.visibleCommands($),(N)=>N.helpGroup()||"Commands:").forEach((N,X)=>{let Q=N.map((H)=>{return U(I.styleSubcommandTerm(I.subcommandTerm(H)),I.styleSubcommandDescription(I.subcommandDescription(H)))});z=z.concat(this.formatItemList(X,Q,I))}),z.join(`
|
|
3
|
+
`)}displayWidth($){return H5($).length}styleTitle($){return $}styleUsage($){return $.split(" ").map((I)=>{if(I==="[options]")return this.styleOptionText(I);if(I==="[command]")return this.styleSubcommandText(I);if(I[0]==="["||I[0]==="<")return this.styleArgumentText(I);return this.styleCommandText(I)}).join(" ")}styleCommandDescription($){return this.styleDescriptionText($)}styleOptionDescription($){return this.styleDescriptionText($)}styleSubcommandDescription($){return this.styleDescriptionText($)}styleArgumentDescription($){return this.styleDescriptionText($)}styleDescriptionText($){return $}styleOptionTerm($){return this.styleOptionText($)}styleSubcommandTerm($){return $.split(" ").map((I)=>{if(I==="[options]")return this.styleOptionText(I);if(I[0]==="["||I[0]==="<")return this.styleArgumentText(I);return this.styleSubcommandText(I)}).join(" ")}styleArgumentTerm($){return this.styleArgumentText($)}styleOptionText($){return $}styleArgumentText($){return $}styleSubcommandText($){return $}styleCommandText($){return $}padWidth($,I){return Math.max(I.longestOptionTermLength($,I),I.longestGlobalOptionTermLength($,I),I.longestSubcommandTermLength($,I),I.longestArgumentTermLength($,I))}preformatted($){return/\n[^\S\r\n]/.test($)}formatItem($,I,_,u){let z=" ".repeat(2);if(!_)return z+$;let J=$.padEnd(I+$.length-u.displayWidth($)),G=2,q=(this.helpWidth??80)-I-G-2,N;if(q<this.minWidthToWrap||u.preformatted(_))N=_;else N=u.boxWrap(_,q).replace(/\n/g,`
|
|
4
|
+
`+" ".repeat(I+G));return z+J+" ".repeat(G)+N.replace(/\n/g,`
|
|
5
|
+
${z}`)}boxWrap($,I){if(I<this.minWidthToWrap)return $;let _=$.split(/\r\n|\n/),u=/[\s]*[^\s]+/g,U=[];return _.forEach((z)=>{let J=z.match(u);if(J===null){U.push("");return}let G=[J.shift()],g=this.displayWidth(G[0]);J.forEach((q)=>{let N=this.displayWidth(q);if(g+N<=I){G.push(q),g+=N;return}U.push(G.join(""));let X=q.trimStart();G=[X],g=this.displayWidth(X)}),U.push(G.join(""))}),U.join(`
|
|
6
|
+
`)}}function H5($){let I=/\x1b\[\d*(;\d*)*m/g;return $.replace(I,"")}lB.Help=v5;lB.stripColor=H5});var su=w((dB)=>{var{InvalidArgumentError:nB}=E0();class O5{constructor($,I){this.flags=$,this.description=I||"",this.required=$.includes("<"),this.optional=$.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test($),this.mandatory=!1;let _=hB($);if(this.short=_.shortFlag,this.long=_.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,_)=>{if(!this.argChoices.includes(I))throw new nB(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._collectValue(I,_);return I},this}name(){if(this.long)return this.long.replace(/^--/,"");return this.short.replace(/^-/,"")}attributeName(){if(this.negate)return Y5(this.name().replace(/^no-/,""));return Y5(this.name())}helpGroup($){return this.helpGroupHeading=$,this}is($){return this.short===$||this.long===$}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class T5{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,_)=>{if(this.positiveOptions.has(_))this.dualOptions.add(_)})}valueFromOption($,I){let _=I.attributeName();if(!this.dualOptions.has(_))return!0;let u=this.negativeOptions.get(_).presetArg,U=u!==void 0?u:!1;return I.negate===(U===$)}}function Y5($){return $.split("-").reduce((I,_)=>{return I+_[0].toUpperCase()+_.slice(1)})}function hB($){let I,_,u=/^-[^-]$/,U=/^--[^-]/,z=$.split(/[ |,]+/).concat("guard");if(u.test(z[0]))I=z.shift();if(U.test(z[0]))_=z.shift();if(!I&&u.test(z[0]))I=z.shift();if(!I&&U.test(z[0]))I=_,_=z.shift();if(z[0].startsWith("-")){let J=z[0],G=`option creation failed due to '${J}' in option flags '${$}'`;if(/^-[^-][^-]/.test(J))throw Error(`${G}
|
|
7
7
|
- a short flag is a single dash and a single character
|
|
8
8
|
- either use a single dash and a single character (for a short flag)
|
|
9
|
-
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`);if(u.test(
|
|
10
|
-
- too many short flags`);if(U.test(
|
|
11
|
-
- too many long flags`);throw Error(`${
|
|
12
|
-
- unrecognised flag format`)}if(I===void 0&&_===void 0)throw Error(`option creation failed due to no flags found in '${$}'.`);return{shortFlag:I,longFlag:_}}
|
|
9
|
+
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`);if(u.test(J))throw Error(`${G}
|
|
10
|
+
- too many short flags`);if(U.test(J))throw Error(`${G}
|
|
11
|
+
- too many long flags`);throw Error(`${G}
|
|
12
|
+
- unrecognised flag format`)}if(I===void 0&&_===void 0)throw Error(`option creation failed due to no flags found in '${$}'.`);return{shortFlag:I,longFlag:_}}dB.Option=O5;dB.DualOptions=T5});var B5=w((aB)=>{function oB($,I){if(Math.abs($.length-I.length)>3)return Math.max($.length,I.length);let _=[];for(let u=0;u<=$.length;u++)_[u]=[u];for(let u=0;u<=I.length;u++)_[0][u]=u;for(let u=1;u<=I.length;u++)for(let U=1;U<=$.length;U++){let z=1;if($[U-1]===I[u-1])z=0;else z=1;if(_[U][u]=Math.min(_[U-1][u]+1,_[U][u-1]+1,_[U-1][u-1]+z),U>1&&u>1&&$[U-1]===I[u-2]&&$[U-2]===I[u-1])_[U][u]=Math.min(_[U][u],_[U-2][u-2]+1)}return _[$.length][I.length]}function tB($,I){if(!I||I.length===0)return"";I=Array.from(new Set(I));let _=$.startsWith("--");if(_)$=$.slice(2),I=I.map((J)=>J.slice(2));let u=[],U=3,z=0.4;if(I.forEach((J)=>{if(J.length<=1)return;let G=oB($,J),g=Math.max($.length,J.length);if((g-G)/g>z){if(G<U)U=G,u=[J];else if(G===U)u.push(J)}}),u.sort((J,G)=>J.localeCompare(G)),_)u=u.map((J)=>`--${J}`);if(u.length>1)return`
|
|
13
13
|
(Did you mean one of ${u.join(", ")}?)`;if(u.length===1)return`
|
|
14
|
-
(Did you mean ${u[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 '${_.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,_){if(this._exitCallback)this._exitCallback(new Iz($,I,_));
|
|
17
|
-
- already used by option '${I.flags}'`)}this._initOptionGroup($),this.options.push($)}_registerCommand($){let I=(u)=>{return[u.name()].concat(u.aliases())},_=I($).find((u)=>this._findCommand(u));if(_){let u=I(this._findCommand(_)).join("|"),U=I($).join("|");throw Error(`cannot add command '${U}' as already have command '${u}'`)}this._initCommandGroup($),this.commands.push($)}addOption($){this._registerOption($);let I=$.name(),_=$.attributeName();if($.negate){let U=$.long.replace(/^--no-/,"--");if(!this._findOption(U))this.setOptionValueWithSource(_,$.defaultValue===void 0?!0:$.defaultValue,"default")}else if($.defaultValue!==void 0)this.setOptionValueWithSource(_,$.defaultValue,"default");let u=(U,z,
|
|
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,_){if(
|
|
14
|
+
(Did you mean ${u[0]}?)`;return""}aB.suggestSimilar=tB});var L5=w((zM)=>{var sB=J$("node:events").EventEmitter,$z=J$("node:child_process"),p4=J$("node:path"),BU=J$("node:fs"),_$=J$("node:process"),{Argument:$M,humanReadableArgName:IM}=TU(),{CommanderError:Iz}=E0(),{Help:UM,stripColor:_M}=eu(),{Option:M5,DualOptions:uM}=su(),{suggestSimilar:K5}=B5();class _z extends sB{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)=>_$.stdout.write(I),writeErr:(I)=>_$.stderr.write(I),outputError:(I,_)=>_(I),getOutHelpWidth:()=>_$.stdout.isTTY?_$.stdout.columns:void 0,getErrHelpWidth:()=>_$.stderr.isTTY?_$.stderr.columns:void 0,getOutHasColors:()=>Uz()??(_$.stdout.isTTY&&_$.stdout.hasColors?.()),getErrHasColors:()=>Uz()??(_$.stderr.isTTY&&_$.stderr.hasColors?.()),stripColor:(I)=>_M(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,_){let u=I,U=_;if(typeof u==="object"&&u!==null)U=u,u=null;U=U||{};let[,z,J]=$.match(/([^ ]+) *(.*)/),G=this.createCommand(z);if(u)G.description(u),G._executableHandler=!0;if(U.isDefault)this._defaultCommandName=G._name;if(G._hidden=!!(U.noHelp||U.hidden),G._executableFile=U.executableFile||null,J)G.arguments(J);if(this._registerCommand(G),G.parent=this,G.copyInheritedSettings(this),u)return this;return G}createCommand($){return new _z($)}createHelp(){return Object.assign(new UM,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 $M($,I)}argument($,I,_,u){let U=this.createArgument($,I);if(typeof _==="function")U.default(u).argParser(_);else U.default(_);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 _=$??"help [command]",[,u,U]=_.match(/([^ ]+) *(.*)/),z=I??"display help for command",J=this.createCommand(u);if(J.helpOption(!1),U)J.arguments(U);if(z)J.description(z);if(this._addImplicitHelpCommand=!0,this._helpCommand=J,$||I)this._initCommandGroup(J);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 _=["preSubcommand","preAction","postAction"];if(!_.includes($))throw Error(`Unexpected value for event passed to hook : '${$}'.
|
|
16
|
+
Expecting one of '${_.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,_){if(this._exitCallback)this._exitCallback(new Iz($,I,_));_$.exit($)}action($){let I=(_)=>{let u=this.registeredArguments.length,U=_.slice(0,u);if(this._storeOptionsAsProperties)U[u]=this;else U[u]=this.opts();return U.push(this),$.apply(this,U)};return this._actionHandler=I,this}createOption($,I){return new M5($,I)}_callParseArg($,I,_,u){try{return $.parseArg(I,_)}catch(U){if(U.code==="commander.invalidArgument"){let z=`${u} ${U.message}`;this.error(z,{exitCode:U.exitCode,code:U.code})}throw U}}_registerOption($){let I=$.short&&this._findOption($.short)||$.long&&this._findOption($.long);if(I){let _=$.long&&this._findOption($.long)?$.long:$.short;throw Error(`Cannot add option '${$.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${_}'
|
|
17
|
+
- already used by option '${I.flags}'`)}this._initOptionGroup($),this.options.push($)}_registerCommand($){let I=(u)=>{return[u.name()].concat(u.aliases())},_=I($).find((u)=>this._findCommand(u));if(_){let u=I(this._findCommand(_)).join("|"),U=I($).join("|");throw Error(`cannot add command '${U}' as already have command '${u}'`)}this._initCommandGroup($),this.commands.push($)}addOption($){this._registerOption($);let I=$.name(),_=$.attributeName();if($.negate){let U=$.long.replace(/^--no-/,"--");if(!this._findOption(U))this.setOptionValueWithSource(_,$.defaultValue===void 0?!0:$.defaultValue,"default")}else if($.defaultValue!==void 0)this.setOptionValueWithSource(_,$.defaultValue,"default");let u=(U,z,J)=>{if(U==null&&$.presetArg!==void 0)U=$.presetArg;let G=this.getOptionValue(_);if(U!==null&&$.parseArg)U=this._callParseArg($,U,G,z);else if(U!==null&&$.variadic)U=$._collectValue(U,G);if(U==null)if($.negate)U=!1;else if($.isBoolean()||$.optional)U=!0;else U="";this.setOptionValueWithSource(_,U,J)};if(this.on("option:"+I,(U)=>{let z=`error: option '${$.flags}' argument '${U}' is invalid.`;u(U,z,"cli")}),$.envVar)this.on("optionEnv:"+I,(U)=>{let z=`error: option '${$.flags}' value '${U}' from env '${$.envVar}' is invalid.`;u(U,z,"env")});return this}_optionEx($,I,_,u,U){if(typeof I==="object"&&I instanceof M5)throw Error("To add an Option object use addOption() instead of option() or requiredOption()");let z=this.createOption(I,_);if(z.makeOptionMandatory(!!$.mandatory),typeof u==="function")z.default(U).argParser(u);else if(u instanceof RegExp){let J=u;u=(G,g)=>{let q=J.exec(G);return q?q[0]:g},z.default(U).argParser(u)}else z.default(u);return this.addOption(z)}option($,I,_,u){return this._optionEx({},$,I,_,u)}requiredOption($,I,_,u){return this._optionEx({mandatory:!0},$,I,_,u)}combineFlagAndOptionalValue($=!0){return this._combineFlagAndOptionalValue=!!$,this}allowUnknownOption($=!0){return this._allowUnknownOption=!!$,this}allowExcessArguments($=!0){return this._allowExcessArguments=!!$,this}enablePositionalOptions($=!0){return this._enablePositionalOptions=!!$,this}passThroughOptions($=!0){return this._passThroughOptions=!!$,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties($=!0){if(this.options.length)throw Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!$,this}getOptionValue($){if(this._storeOptionsAsProperties)return this[$];return this._optionValues[$]}setOptionValue($,I){return this.setOptionValueWithSource($,I,void 0)}setOptionValueWithSource($,I,_){if(this._storeOptionsAsProperties)this[$]=I;else this._optionValues[$]=I;return this._optionValueSources[$]=_,this}getOptionValueSource($){return this._optionValueSources[$]}getOptionValueSourceWithGlobals($){let I;return this._getCommandAndAncestors().forEach((_)=>{if(_.getOptionValueSource($)!==void 0)I=_.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(_$.versions?.electron)I.from="electron";let u=_$.execArgv??[];if(u.includes("-e")||u.includes("--eval")||u.includes("-p")||u.includes("--print"))I.from="eval"}if($===void 0)$=_$.argv;this.rawArgs=$.slice();let _;switch(I.from){case void 0:case"node":this._scriptPath=$[1],_=$.slice(2);break;case"electron":if(_$.defaultApp)this._scriptPath=$[1],_=$.slice(2);else _=$.slice(1);break;case"user":_=$.slice(0);break;case"eval":_=$.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",_}parse($,I){this._prepareForParse();let _=this._prepareUserArgs($,I);return this._parseCommand([],_),this}async parseAsync($,I){this._prepareForParse();let _=this._prepareUserArgs($,I);return await this._parseCommand([],_),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,_){if(BU.existsSync($))return;let u=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 '${_}' 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
|
-
- ${u}`;throw Error(U)}_executeSubCommand($,I){I=I.slice();let _=!1,u=[".js",".ts",".tsx",".mjs",".cjs"];function U(q,N){let X=p4.resolve(q,N);if(
|
|
21
|
+
- ${u}`;throw Error(U)}_executeSubCommand($,I){I=I.slice();let _=!1,u=[".js",".ts",".tsx",".mjs",".cjs"];function U(q,N){let X=p4.resolve(q,N);if(BU.existsSync(X))return X;if(u.includes(p4.extname(N)))return;let Q=u.find((H)=>BU.existsSync(`${X}${H}`));if(Q)return`${X}${Q}`;return}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let z=$._executableFile||`${this._name}-${$._name}`,J=this._executableDir||"";if(this._scriptPath){let q;try{q=BU.realpathSync(this._scriptPath)}catch{q=this._scriptPath}J=p4.resolve(p4.dirname(q),J)}if(J){let q=U(J,z);if(!q&&!$._executableFile&&this._scriptPath){let N=p4.basename(this._scriptPath,p4.extname(this._scriptPath));if(N!==this._name)q=U(J,`${N}-${$._name}`)}z=q||z}_=u.includes(p4.extname(z));let G;if(_$.platform!=="win32")if(_)I.unshift(z),I=D5(_$.execArgv).concat(I),G=$z.spawn(_$.argv[0],I,{stdio:"inherit"});else G=$z.spawn(z,I,{stdio:"inherit"});else this._checkForMissingExecutable(z,J,$._name),I.unshift(z),I=D5(_$.execArgv).concat(I),G=$z.spawn(_$.execPath,I,{stdio:"inherit"});if(!G.killed)["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((N)=>{_$.on(N,()=>{if(G.killed===!1&&G.exitCode===null)G.kill(N)})});let g=this._exitCallback;G.on("close",(q)=>{if(q=q??1,!g)_$.exit(q);else g(new Iz(q,"commander.executeSubCommandAsync","(close)"))}),G.on("error",(q)=>{if(q.code==="ENOENT")this._checkForMissingExecutable(z,J,$._name);else if(q.code==="EACCES")throw Error(`'${z}' not executable`);if(!g)_$.exit(1);else{let N=new Iz(1,"commander.executeSubCommandAsync","(error)");N.nestedError=q,g(N)}}),this.runningCommand=G}_dispatchSubcommand($,I,_){let u=this._findCommand($);if(!u)this.help({error:!0});u._prepareForParse();let U;return U=this._chainOrCallSubCommandHook(U,u,"preSubcommand"),U=this._chainOrCall(U,()=>{if(u._executableHandler)this._executeSubCommand(u,I.concat(_));else return u._parseCommand(I,_)}),U}_dispatchHelpCommand($){if(!$)this.help();let I=this._findCommand($);if(I&&!I._executableHandler)I.help();return this._dispatchSubcommand($,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){if(this.registeredArguments.forEach(($,I)=>{if($.required&&this.args[I]==null)this.missingArgument($.name())}),this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)return;if(this.args.length>this.registeredArguments.length)this._excessArguments(this.args)}_processArguments(){let $=(_,u,U)=>{let z=u;if(u!==null&&_.parseArg){let J=`error: command-argument value '${u}' is invalid for argument '${_.name()}'.`;z=this._callParseArg(_,u,U,J)}return z};this._checkNumberOfArguments();let I=[];this.registeredArguments.forEach((_,u)=>{let U=_.defaultValue;if(_.variadic){if(u<this.args.length){if(U=this.args.slice(u),_.parseArg)U=U.reduce((z,J)=>{return $(_,J,z)},_.defaultValue)}else if(U===void 0)U=[]}else if(u<this.args.length){if(U=this.args[u],_.parseArg)U=$(_,U,_.defaultValue)}I[u]=U}),this.processedArgs=I}_chainOrCall($,I){if($?.then&&typeof $.then==="function")return $.then(()=>I());return I()}_chainOrCallHooks($,I){let _=$,u=[];if(this._getCommandAndAncestors().reverse().filter((U)=>U._lifeCycleHooks[I]!==void 0).forEach((U)=>{U._lifeCycleHooks[I].forEach((z)=>{u.push({hookedCommand:U,callback:z})})}),I==="postAction")u.reverse();return u.forEach((U)=>{_=this._chainOrCall(_,()=>{return U.callback(U.hookedCommand,this)})}),_}_chainOrCallSubCommandHook($,I,_){let u=$;if(this._lifeCycleHooks[_]!==void 0)this._lifeCycleHooks[_].forEach((U)=>{u=this._chainOrCall(u,()=>{return U(this,I)})});return u}_parseCommand($,I){let _=this.parseOptions(I);if(this._parseOptionsEnv(),this._parseOptionsImplied(),$=$.concat(_.operands),I=_.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(_.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let u=()=>{if(_.unknown.length>0)this.unknownOption(_.unknown[0])},U=`command:${this.name()}`;if(this._actionHandler){u(),this._processArguments();let z;if(z=this._chainOrCallHooks(z,"preAction"),z=this._chainOrCall(z,()=>this._actionHandler(this.processedArgs)),this.parent)z=this._chainOrCall(z,()=>{this.parent.emit(U,$,I)});return z=this._chainOrCallHooks(z,"postAction"),z}if(this.parent?.listenerCount(U))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 u(),this._processArguments()}else if(this.commands.length)u(),this.help({error:!0});else u(),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((_)=>{let u=_.attributeName();if(this.getOptionValue(u)===void 0)return!1;return this.getOptionValueSource(u)!=="default"});$.filter((_)=>_.conflictsWith.length>0).forEach((_)=>{let u=$.find((U)=>_.conflictsWith.includes(U.attributeName()));if(u)this._conflictingOption(_,u)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(($)=>{$._checkForConflictingLocalOptions()})}parseOptions($){let I=[],_=[],u=I;function U(q){return q.length>1&&q[0]==="-"}let z=(q)=>{if(!/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(q))return!1;return!this._getCommandAndAncestors().some((N)=>N.options.map((X)=>X.short).some((X)=>/^-\d$/.test(X)))},J=null,G=null,g=0;while(g<$.length||G){let q=G??$[g++];if(G=null,q==="--"){if(u===_)u.push(q);u.push(...$.slice(g));break}if(J&&(!U(q)||z(q))){this.emit(`option:${J.name()}`,q);continue}if(J=null,U(q)){let N=this._findOption(q);if(N){if(N.required){let X=$[g++];if(X===void 0)this.optionMissingArgument(N);this.emit(`option:${N.name()}`,X)}else if(N.optional){let X=null;if(g<$.length&&(!U($[g])||z($[g])))X=$[g++];this.emit(`option:${N.name()}`,X)}else this.emit(`option:${N.name()}`);J=N.variadic?N:null;continue}}if(q.length>2&&q[0]==="-"&&q[1]!=="-"){let N=this._findOption(`-${q[1]}`);if(N){if(N.required||N.optional&&this._combineFlagAndOptionalValue)this.emit(`option:${N.name()}`,q.slice(2));else this.emit(`option:${N.name()}`),G=`-${q.slice(2)}`;continue}}if(/^--[^=]+=/.test(q)){let N=q.indexOf("="),X=this._findOption(q.slice(0,N));if(X&&(X.required||X.optional)){this.emit(`option:${X.name()}`,q.slice(N+1));continue}}if(u===I&&U(q)&&!(this.commands.length===0&&z(q)))u=_;if((this._enablePositionalOptions||this._passThroughOptions)&&I.length===0&&_.length===0){if(this._findCommand(q)){I.push(q),_.push(...$.slice(g));break}else if(this._getHelpCommand()&&q===this._getHelpCommand().name()){I.push(q,...$.slice(g));break}else if(this._defaultCommandName){_.push(q,...$.slice(g));break}}if(this._passThroughOptions){u.push(q,...$.slice(g));break}u.push(q)}return{operands:I,unknown:_}}opts(){if(this._storeOptionsAsProperties){let $={},I=this.options.length;for(let _=0;_<I;_++){let u=this.options[_].attributeName();$[u]=u===this._versionOptionName?this._version:this[u]}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 _=I||{},u=_.exitCode||1,U=_.code||"commander.error";this._exit(u,U,$)}_parseOptionsEnv(){this.options.forEach(($)=>{if($.envVar&&$.envVar in
|
|
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 _=this.parent?._findCommand($);if(_){let u=[_.name()].concat(_.aliases()).join("|");throw Error(`cannot add alias '${$}' to command '${this.name()}' as already have command '${u}'`)}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((_)=>{return
|
|
24
|
+
`),this.outputHelp({error:!0});let _=I||{},u=_.exitCode||1,U=_.code||"commander.error";this._exit(u,U,$)}_parseOptionsEnv(){this.options.forEach(($)=>{if($.envVar&&$.envVar in _$.env){let I=$.attributeName();if(this.getOptionValue(I)===void 0||["default","config","env"].includes(this.getOptionValueSource(I)))if($.required||$.optional)this.emit(`optionEnv:${$.name()}`,_$.env[$.envVar]);else this.emit(`optionEnv:${$.name()}`)}})}_parseOptionsImplied(){let $=new uM(this.options),I=(_)=>{return this.getOptionValue(_)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(_))};this.options.filter((_)=>_.implied!==void 0&&I(_.attributeName())&&$.valueFromOption(this.getOptionValue(_.attributeName()),_)).forEach((_)=>{Object.keys(_.implied).filter((u)=>!I(u)).forEach((u)=>{this.setOptionValueWithSource(u,_.implied[u],"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 _=(z)=>{let J=z.attributeName(),G=this.getOptionValue(J),g=this.options.find((N)=>N.negate&&J===N.attributeName()),q=this.options.find((N)=>!N.negate&&J===N.attributeName());if(g&&(g.presetArg===void 0&&G===!1||g.presetArg!==void 0&&G===g.presetArg))return g;return q||z},u=(z)=>{let J=_(z),G=J.attributeName();if(this.getOptionValueSource(G)==="env")return`environment variable '${J.envVar}'`;return`option '${J.flags}'`},U=`error: ${u($)} cannot be used with ${u(I)}`;this.error(U,{code:"commander.conflictingOption"})}unknownOption($){if(this._allowUnknownOption)return;let I="";if($.startsWith("--")&&this._showSuggestionAfterError){let u=[],U=this;do{let z=U.createHelp().visibleOptions(U).filter((J)=>J.long).map((J)=>J.long);u=u.concat(z),U=U.parent}while(U&&!U._enablePositionalOptions);I=K5($,u)}let _=`error: unknown option '${$}'${I}`;this.error(_,{code:"commander.unknownOption"})}_excessArguments($){if(this._allowExcessArguments)return;let I=this.registeredArguments.length,_=I===1?"":"s",U=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${I} argument${_} but got ${$.length}.`;this.error(U,{code:"commander.excessArguments"})}unknownCommand(){let $=this.args[0],I="";if(this._showSuggestionAfterError){let u=[];this.createHelp().visibleCommands(this).forEach((U)=>{if(u.push(U.name()),U.alias())u.push(U.alias())}),I=K5($,u)}let _=`error: unknown command '${$}'${I}`;this.error(_,{code:"commander.unknownCommand"})}version($,I,_){if($===void 0)return this._version;this._version=$,I=I||"-V, --version",_=_||"output the version number";let u=this.createOption(I,_);return this._versionOptionName=u.attributeName(),this._registerOption(u),this.on("option:"+u.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 _=this.parent?._findCommand($);if(_){let u=[_.name()].concat(_.aliases()).join("|");throw Error(`cannot add alias '${$}' to command '${this.name()}' as already have command '${u}'`)}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((_)=>{return IM(_)});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=p4.basename($,p4.extname($)),this}executableDir($){if($===void 0)return this._executableDir;return this._executableDir=$,this}helpInformation($){let I=this.createHelp(),_=this._getOutputContext($);I.prepareContext({error:_.error,helpWidth:_.helpWidth,outputHasColors:_.hasColors});let u=I.formatHelp(this,I);if(_.hasColors)return u;return this._outputConfiguration.stripColor(u)}_getOutputContext($){$=$||{};let I=!!$.error,_,u,U;if(I)_=(J)=>this._outputConfiguration.writeErr(J),u=this._outputConfiguration.getErrHasColors(),U=this._outputConfiguration.getErrHelpWidth();else _=(J)=>this._outputConfiguration.writeOut(J),u=this._outputConfiguration.getOutHasColors(),U=this._outputConfiguration.getOutHelpWidth();return{error:I,write:(J)=>{if(!u)J=this._outputConfiguration.stripColor(J);return _(J)},hasColors:u,helpWidth:U}}outputHelp($){let I;if(typeof $==="function")I=$,$=void 0;let _=this._getOutputContext($),u={error:_.error,write:_.write,command:this};this._getCommandAndAncestors().reverse().forEach((z)=>z.emit("beforeAllHelp",u)),this.emit("beforeHelp",u);let U=this.helpInformation({error:_.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(_.write(U),this._getHelpOption()?.long)this.emit(this._getHelpOption().long);this.emit("afterHelp",u),this._getCommandAndAncestors().forEach((z)=>z.emit("afterAllHelp",u))}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(_$.exitCode??0);if(I===0&&$&&typeof $!=="function"&&$.error)I=1;this._exit(I,"commander.help","(outputHelp)")}addHelpText($,I){let _=["beforeAll","before","after","afterAll"];if(!_.includes($))throw Error(`Unexpected value for position to addHelpText.
|
|
26
26
|
Expecting one of '${_.join("', '")}'`);let u=`${$}Help`;return this.on(u,(U)=>{let z;if(typeof I==="function")z=I({error:U.error,command:U.command});else z=I;if(z)U.write(`${z}
|
|
27
|
-
`)}),this}_outputHelpIfRequested($){let I=this._getHelpOption();if(I&&$.find((u)=>I.is(u)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function
|
|
28
|
-
`)}}
|
|
27
|
+
`)}),this}_outputHelpIfRequested($){let I=this._getHelpOption();if(I&&$.find((u)=>I.is(u)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function D5($){return $.map((I)=>{if(!I.startsWith("--inspect"))return I;let _,u="127.0.0.1",U="9229",z;if((z=I.match(/^(--inspect(-brk)?)$/))!==null)_=z[1];else if((z=I.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(_=z[1],/^\d+$/.test(z[3]))U=z[3];else u=z[3];else if((z=I.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)_=z[1],u=z[3],U=z[4];if(_&&U!=="0")return`${_}=${u}:${parseInt(U)+1}`;return I})}function Uz(){if(_$.env.NO_COLOR||_$.env.FORCE_COLOR==="0"||_$.env.FORCE_COLOR==="false")return!1;if(_$.env.FORCE_COLOR||_$.env.CLICOLOR_FORCE!==void 0)return!0;return}zM.Command=_z;zM.useColor=Uz});var R5=w((XM)=>{var{Argument:V5}=TU(),{Command:uz}=L5(),{CommanderError:gM,InvalidArgumentError:Z5}=E0(),{Help:qM}=eu(),{Option:W5}=su();XM.program=new uz;XM.createCommand=($)=>new uz($);XM.createOption=($,I)=>new W5($,I);XM.createArgument=($,I)=>new V5($,I);XM.Command=uz;XM.Option=W5;XM.Argument=V5;XM.Help=qM;XM.CommanderError=gM;XM.InvalidArgumentError=Z5;XM.InvalidOptionArgumentError=Z5});var b$=w((Fk,Jz)=>{var KU=process||{},b5=KU.argv||[],MU=KU.env||{},LM=!(!!MU.NO_COLOR||b5.includes("--no-color"))&&(!!MU.FORCE_COLOR||b5.includes("--color")||KU.platform==="win32"||(KU.stdout||{}).isTTY&&MU.TERM!=="dumb"||!!MU.CI),VM=($,I,_=$)=>(u)=>{let U=""+u,z=U.indexOf(I,$.length);return~z?$+ZM(U,I,_,z)+I:$+U+I},ZM=($,I,_,u)=>{let U="",z=0;do U+=$.substring(z,u)+_,z=u+I.length,u=$.indexOf(I,z);while(~u);return U+$.substring(z)},A5=($=LM)=>{let I=$?VM:()=>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")}};Jz.exports=A5();Jz.exports.createColors=A5});var I$=w((SM)=>{var Gz=Symbol.for("yaml.alias"),j5=Symbol.for("yaml.document"),DU=Symbol.for("yaml.map"),F5=Symbol.for("yaml.pair"),gz=Symbol.for("yaml.scalar"),LU=Symbol.for("yaml.seq"),o4=Symbol.for("yaml.node.type"),WM=($)=>!!$&&typeof $==="object"&&$[o4]===Gz,RM=($)=>!!$&&typeof $==="object"&&$[o4]===j5,PM=($)=>!!$&&typeof $==="object"&&$[o4]===DU,bM=($)=>!!$&&typeof $==="object"&&$[o4]===F5,S5=($)=>!!$&&typeof $==="object"&&$[o4]===gz,AM=($)=>!!$&&typeof $==="object"&&$[o4]===LU;function w5($){if($&&typeof $==="object")switch($[o4]){case DU:case LU:return!0}return!1}function jM($){if($&&typeof $==="object")switch($[o4]){case Gz:case DU:case gz:case LU:return!0}return!1}var FM=($)=>(S5($)||w5($))&&!!$.anchor;SM.ALIAS=Gz;SM.DOC=j5;SM.MAP=DU;SM.NODE_TYPE=o4;SM.PAIR=F5;SM.SCALAR=gz;SM.SEQ=LU;SM.hasAnchor=FM;SM.isAlias=WM;SM.isCollection=w5;SM.isDocument=RM;SM.isMap=PM;SM.isNode=jM;SM.isPair=bM;SM.isScalar=S5;SM.isSeq=AM});var C0=w((oM)=>{var A$=I$(),t$=Symbol("break visit"),E5=Symbol("skip children"),w4=Symbol("remove node");function VU($,I){let _=C5(I);if(A$.isDocument($)){if(R1(null,$.contents,_,Object.freeze([$]))===w4)$.contents=null}else R1(null,$,_,Object.freeze([]))}VU.BREAK=t$;VU.SKIP=E5;VU.REMOVE=w4;function R1($,I,_,u){let U=f5($,I,_,u);if(A$.isNode(U)||A$.isPair(U))return x5($,u,U),R1($,U,_,u);if(typeof U!=="symbol"){if(A$.isCollection(I)){u=Object.freeze(u.concat(I));for(let z=0;z<I.items.length;++z){let J=R1(z,I.items[z],_,u);if(typeof J==="number")z=J-1;else if(J===t$)return t$;else if(J===w4)I.items.splice(z,1),z-=1}}else if(A$.isPair(I)){u=Object.freeze(u.concat(I));let z=R1("key",I.key,_,u);if(z===t$)return t$;else if(z===w4)I.key=null;let J=R1("value",I.value,_,u);if(J===t$)return t$;else if(J===w4)I.value=null}}return U}async function ZU($,I){let _=C5(I);if(A$.isDocument($)){if(await P1(null,$.contents,_,Object.freeze([$]))===w4)$.contents=null}else await P1(null,$,_,Object.freeze([]))}ZU.BREAK=t$;ZU.SKIP=E5;ZU.REMOVE=w4;async function P1($,I,_,u){let U=await f5($,I,_,u);if(A$.isNode(U)||A$.isPair(U))return x5($,u,U),P1($,U,_,u);if(typeof U!=="symbol"){if(A$.isCollection(I)){u=Object.freeze(u.concat(I));for(let z=0;z<I.items.length;++z){let J=await P1(z,I.items[z],_,u);if(typeof J==="number")z=J-1;else if(J===t$)return t$;else if(J===w4)I.items.splice(z,1),z-=1}}else if(A$.isPair(I)){u=Object.freeze(u.concat(I));let z=await P1("key",I.key,_,u);if(z===t$)return t$;else if(z===w4)I.key=null;let J=await P1("value",I.value,_,u);if(J===t$)return t$;else if(J===w4)I.value=null}}return U}function C5($){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 f5($,I,_,u){if(typeof _==="function")return _($,I,u);if(A$.isMap(I))return _.Map?.($,I,u);if(A$.isSeq(I))return _.Seq?.($,I,u);if(A$.isPair(I))return _.Pair?.($,I,u);if(A$.isScalar(I))return _.Scalar?.($,I,u);if(A$.isAlias(I))return _.Alias?.($,I,u);return}function x5($,I,_){let u=I[I.length-1];if(A$.isCollection(u))u.items[$]=_;else if(A$.isPair(u))if($==="key")u.key=_;else u.value=_;else if(A$.isDocument(u))u.contents=_;else{let U=A$.isAlias(u)?"alias":"scalar";throw Error(`Cannot replace node with ${U} parent`)}}oM.visit=VU;oM.visitAsync=ZU});var qz=w((IK)=>{var k5=I$(),eM=C0(),sM={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},$K=($)=>$.replace(/[!,[\]{}]/g,(I)=>sM[I]);class Q4{constructor($,I){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Q4.defaultYaml,$),this.tags=Object.assign({},Q4.defaultTags,I)}clone(){let $=new Q4(this.yaml,this.tags);return $.docStart=this.docStart,$}atDocument(){let $=new Q4(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Q4.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Q4.defaultTags);break}return $}add($,I){if(this.atNextDocument)this.yaml={explicit:Q4.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Q4.defaultTags),this.atNextDocument=!1;let _=$.trim().split(/[ \t]+/),u=_.shift();switch(u){case"%TAG":{if(_.length!==2){if(I(0,"%TAG directive should contain exactly two parts"),_.length<2)return!1}let[U,z]=_;return this.tags[U]=z,!0}case"%YAML":{if(this.yaml.explicit=!0,_.length!==1)return I(0,"%YAML directive should contain exactly one part"),!1;let[U]=_;if(U==="1.1"||U==="1.2")return this.yaml.version=U,!0;else{let z=/^\d+\.\d+$/.test(U);return I(6,`Unsupported YAML version ${U}`,z),!1}}default:return I(0,`Unknown directive ${u}`,!0),!1}}tagName($,I){if($==="!")return"!";if($[0]!=="!")return I(`Not a valid tag: ${$}`),null;if($[1]==="<"){let z=$.slice(2,-1);if(z==="!"||z==="!!")return I(`Verbatim tags aren't resolved, so ${$} is invalid.`),null;if($[$.length-1]!==">")I("Verbatim tags must end with a >");return z}let[,_,u]=$.match(/^(.*!)([^!]*)$/s);if(!u)I(`The ${$} tag has no suffix`);let U=this.tags[_];if(U)try{return U+decodeURIComponent(u)}catch(z){return I(String(z)),null}if(_==="!")return $;return I(`Could not resolve tag: ${$}`),null}tagString($){for(let[I,_]of Object.entries(this.tags))if($.startsWith(_))return I+$K($.substring(_.length));return $[0]==="!"?$:`!<${$}>`}toString($){let I=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],_=Object.entries(this.tags),u;if($&&_.length>0&&k5.isNode($.contents)){let U={};eM.visit($.contents,(z,J)=>{if(k5.isNode(J)&&J.tag)U[J.tag]=!0}),u=Object.keys(U)}else u=[];for(let[U,z]of _){if(U==="!!"&&z==="tag:yaml.org,2002:")continue;if(!$||u.some((J)=>J.startsWith(z)))I.push(`%TAG ${U} ${z}`)}return I.join(`
|
|
28
|
+
`)}}Q4.defaultYaml={explicit:!1,version:"1.2"};Q4.defaultTags={"!!":"tag:yaml.org,2002:"};IK.Directives=Q4});var WU=w((JK)=>{var y5=I$(),_K=C0();function uK($){if(/[\x00-\x19\s,[\]{}]/.test($)){let _=`Anchor must not contain whitespace or control characters: ${JSON.stringify($)}`;throw Error(_)}return!0}function i5($){let I=new Set;return _K.visit($,{Value(_,u){if(u.anchor)I.add(u.anchor)}}),I}function l5($,I){for(let _=1;;++_){let u=`${$}${_}`;if(!I.has(u))return u}}function zK($,I){let _=[],u=new Map,U=null;return{onAnchor:(z)=>{_.push(z),U??(U=i5($));let J=l5(I,U);return U.add(J),J},setAnchors:()=>{for(let z of _){let J=u.get(z);if(typeof J==="object"&&J.anchor&&(y5.isScalar(J.node)||y5.isCollection(J.node)))J.node.anchor=J.anchor;else{let G=Error("Failed to resolve repeated object (this should not happen)");throw G.source=z,G}}},sourceObjects:u}}JK.anchorIsValid=uK;JK.anchorNames=i5;JK.createNodeAnchors=zK;JK.findNewAnchor=l5});var Xz=w((NK)=>{function f0($,I,_,u){if(u&&typeof u==="object")if(Array.isArray(u))for(let U=0,z=u.length;U<z;++U){let J=u[U],G=f0($,u,String(U),J);if(G===void 0)delete u[U];else if(G!==J)u[U]=G}else if(u instanceof Map)for(let U of Array.from(u.keys())){let z=u.get(U),J=f0($,u,U,z);if(J===void 0)u.delete(U);else if(J!==z)u.set(U,J)}else if(u instanceof Set)for(let U of Array.from(u)){let z=f0($,u,U,U);if(z===void 0)u.delete(U);else if(z!==U)u.delete(U),u.add(z)}else for(let[U,z]of Object.entries(u)){let J=f0($,u,U,z);if(J===void 0)delete u[U];else if(J!==z)u[U]=J}return $.call(I,_,u)}NK.applyReviver=f0});var N6=w((HK)=>{var vK=I$();function m5($,I,_){if(Array.isArray($))return $.map((u,U)=>m5(u,String(U),_));if($&&typeof $.toJSON==="function"){if(!_||!vK.hasAnchor($))return $.toJSON(I,_);let u={aliasCount:0,count:1,res:void 0};_.anchors.set($,u),_.onCreate=(z)=>{u.res=z,delete _.onCreate};let U=$.toJSON(I,_);if(_.onCreate)_.onCreate(U);return U}if(typeof $==="bigint"&&!_?.keep)return Number($);return $}HK.toJS=m5});var RU=w((BK)=>{var OK=Xz(),r5=I$(),TK=N6();class n5{constructor($){Object.defineProperty(this,r5.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:_,onAnchor:u,reviver:U}={}){if(!r5.isDocument($))throw TypeError("A document argument is required");let z={anchors:new Map,doc:$,keep:!0,mapAsMap:I===!0,mapKeyWarned:!1,maxAliasCount:typeof _==="number"?_:100},J=TK.toJS(this,"",z);if(typeof u==="function")for(let{count:G,res:g}of z.anchors.values())u(g,G);return typeof U==="function"?OK.applyReviver(U,{"":J},"",J):J}}BK.NodeBase=n5});var x0=w((ZK)=>{var KK=WU(),DK=C0(),b1=I$(),LK=RU(),VK=N6();class h5 extends LK.NodeBase{constructor($){super(b1.ALIAS);this.source=$,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve($,I){let _;if(I?.aliasResolveCache)_=I.aliasResolveCache;else if(_=[],DK.visit($,{Node:(U,z)=>{if(b1.isAlias(z)||b1.hasAnchor(z))_.push(z)}}),I)I.aliasResolveCache=_;let u=void 0;for(let U of _){if(U===this)break;if(U.anchor===this.source)u=U}return u}toJSON($,I){if(!I)return{source:this.source};let{anchors:_,doc:u,maxAliasCount:U}=I,z=this.resolve(u,I);if(!z){let G=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(G)}let J=_.get(z);if(!J)VK.toJS(z,null,I),J=_.get(z);if(J?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(U>=0){if(J.count+=1,J.aliasCount===0)J.aliasCount=PU(u,z,_);if(J.count*J.aliasCount>U)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return J.res}toString($,I,_){let u=`*${this.source}`;if($){if(KK.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`${u} `}return u}}function PU($,I,_){if(b1.isAlias(I)){let u=I.resolve($),U=_&&u&&_.get(u);return U?U.count*U.aliasCount:0}else if(b1.isCollection(I)){let u=0;for(let U of I.items){let z=PU($,U,_);if(z>u)u=z}return u}else if(b1.isPair(I)){let u=PU($,I.key,_),U=PU($,I.value,_);return Math.max(u,U)}return 1}ZK.Alias=h5});var R$=w((jK)=>{var RK=I$(),PK=RU(),bK=N6(),AK=($)=>!$||typeof $!=="function"&&typeof $!=="object";class n6 extends PK.NodeBase{constructor($){super(RK.SCALAR);this.value=$}toJSON($,I){return I?.keep?this.value:bK.toJS(this.value,$,I)}toString(){return String(this.value)}}n6.BLOCK_FOLDED="BLOCK_FOLDED";n6.BLOCK_LITERAL="BLOCK_LITERAL";n6.PLAIN="PLAIN";n6.QUOTE_DOUBLE="QUOTE_DOUBLE";n6.QUOTE_SINGLE="QUOTE_SINGLE";jK.Scalar=n6;jK.isScalarValue=AK});var k0=w((xK)=>{var wK=x0(),h6=I$(),d5=R$(),EK="tag:yaml.org,2002:";function CK($,I,_){if(I){let u=_.filter((z)=>z.tag===I),U=u.find((z)=>!z.format)??u[0];if(!U)throw Error(`Tag ${I} not found`);return U}return _.find((u)=>u.identify?.($)&&!u.format)}function fK($,I,_){if(h6.isDocument($))$=$.contents;if(h6.isNode($))return $;if(h6.isPair($)){let X=_.schema[h6.MAP].createNode?.(_.schema,null,_);return X.items.push($),X}if($ instanceof String||$ instanceof Number||$ instanceof Boolean||typeof BigInt<"u"&&$ instanceof BigInt)$=$.valueOf();let{aliasDuplicateObjects:u,onAnchor:U,onTagObj:z,schema:J,sourceObjects:G}=_,g=void 0;if(u&&$&&typeof $==="object")if(g=G.get($),g)return g.anchor??(g.anchor=U($)),new wK.Alias(g.anchor);else g={anchor:null,node:null},G.set($,g);if(I?.startsWith("!!"))I=EK+I.slice(2);let q=CK($,I,J.tags);if(!q){if($&&typeof $.toJSON==="function")$=$.toJSON();if(!$||typeof $!=="object"){let X=new d5.Scalar($);if(g)g.node=X;return X}q=$ instanceof Map?J[h6.MAP]:(Symbol.iterator in Object($))?J[h6.SEQ]:J[h6.MAP]}if(z)z(q),delete _.onTagObj;let N=q?.createNode?q.createNode(_.schema,$,_):typeof q?.nodeClass?.from==="function"?q.nodeClass.from(_.schema,$,_):new d5.Scalar($);if(I)N.tag=I;else if(!q.default)N.tag=q.tag;if(g)g.node=N;return N}xK.createNode=fK});var bU=w((lK)=>{var yK=k0(),E4=I$(),iK=RU();function Nz($,I,_){let u=_;for(let U=I.length-1;U>=0;--U){let z=I[U];if(typeof z==="number"&&Number.isInteger(z)&&z>=0){let J=[];J[z]=u,u=J}else u=new Map([[z,u]])}return yK.createNode(u,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:$,sourceObjects:new Map})}var c5=($)=>$==null||typeof $==="object"&&!!$[Symbol.iterator]().next().done;class p5 extends iK.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((_)=>E4.isNode(_)||E4.isPair(_)?_.clone($):_),this.range)I.range=this.range.slice();return I}addIn($,I){if(c5($))this.add(I);else{let[_,...u]=$,U=this.get(_,!0);if(E4.isCollection(U))U.addIn(u,I);else if(U===void 0&&this.schema)this.set(_,Nz(this.schema,u,I));else throw Error(`Expected YAML collection at ${_}. Remaining path: ${u}`)}}deleteIn($){let[I,..._]=$;if(_.length===0)return this.delete(I);let u=this.get(I,!0);if(E4.isCollection(u))return u.deleteIn(_);else throw Error(`Expected YAML collection at ${I}. Remaining path: ${_}`)}getIn($,I){let[_,...u]=$,U=this.get(_,!0);if(u.length===0)return!I&&E4.isScalar(U)?U.value:U;else return E4.isCollection(U)?U.getIn(u,I):void 0}hasAllNullValues($){return this.items.every((I)=>{if(!E4.isPair(I))return!1;let _=I.value;return _==null||$&&E4.isScalar(_)&&_.value==null&&!_.commentBefore&&!_.comment&&!_.tag})}hasIn($){let[I,..._]=$;if(_.length===0)return this.has(I);let u=this.get(I,!0);return E4.isCollection(u)?u.hasIn(_):!1}setIn($,I){let[_,...u]=$;if(u.length===0)this.set(_,I);else{let U=this.get(_,!0);if(E4.isCollection(U))U.setIn(u,I);else if(U===void 0&&this.schema)this.set(_,Nz(this.schema,u,I));else throw Error(`Expected YAML collection at ${_}. Remaining path: ${u}`)}}}lK.Collection=p5;lK.collectionFromPath=Nz;lK.isEmptyPath=c5});var y0=w((cK)=>{var hK=($)=>$.replace(/^(?!$)(?: $)?/gm,"#");function Qz($,I){if(/^\n+$/.test($))return $.substring(1);return I?$.replace(/^(?! *$)/gm,I):$}var dK=($,I,_)=>$.endsWith(`
|
|
29
29
|
`)?Qz(_,I):_.includes(`
|
|
30
30
|
`)?`
|
|
31
|
-
`+Qz(_,I):($.endsWith(" ")?"":" ")+_;
|
|
32
|
-
`){if(_==="block")v=
|
|
33
|
-
`&&H!=="\t"){let
|
|
34
|
-
`&&
|
|
35
|
-
${I}${$.slice(0,
|
|
36
|
-
${I}${$.slice(
|
|
37
|
-
`);u=I,U=I+1,z=$[U]}return u}
|
|
38
|
-
`){if(z-
|
|
31
|
+
`+Qz(_,I):($.endsWith(" ")?"":" ")+_;cK.indentComment=Qz;cK.lineComment=dK;cK.stringifyComment=hK});var t5=w((eK)=>{function aK($,I,_="flow",{indentAtStart:u,lineWidth:U=80,minContentWidth:z=20,onFold:J,onOverflow:G}={}){if(!U||U<0)return $;if(U<z)z=0;let g=Math.max(1+z,1+U-I.length);if($.length<=g)return $;let q=[],N={},X=U-I.length;if(typeof u==="number")if(u>U-Math.max(2,z))q.push(0);else X=U-u;let Q=void 0,H=void 0,Y=!1,v=-1,O=-1,T=-1;if(_==="block"){if(v=o5($,v,I.length),v!==-1)X=v+g}for(let W;W=$[v+=1];){if(_==="quoted"&&W==="\\"){switch(O=v,$[v+1]){case"x":v+=3;break;case"u":v+=5;break;case"U":v+=9;break;default:v+=1}T=v}if(W===`
|
|
32
|
+
`){if(_==="block")v=o5($,v,I.length);X=v+I.length+g,Q=void 0}else{if(W===" "&&H&&H!==" "&&H!==`
|
|
33
|
+
`&&H!=="\t"){let K=$[v+1];if(K&&K!==" "&&K!==`
|
|
34
|
+
`&&K!=="\t")Q=v}if(v>=X)if(Q)q.push(Q),X=Q+g,Q=void 0;else if(_==="quoted"){while(H===" "||H==="\t")H=W,W=$[v+=1],Y=!0;let K=v>T+1?v-2:O-1;if(N[K])return $;q.push(K),N[K]=!0,X=K+g,Q=void 0}else Y=!0}H=W}if(Y&&G)G();if(q.length===0)return $;if(J)J();let V=$.slice(0,q[0]);for(let W=0;W<q.length;++W){let K=q[W],D=q[W+1]||$.length;if(K===0)V=`
|
|
35
|
+
${I}${$.slice(0,D)}`;else{if(_==="quoted"&&N[K])V+=`${$[K]}\\`;V+=`
|
|
36
|
+
${I}${$.slice(K+1,D)}`}}return V}function o5($,I,_){let u=I,U=I+1,z=$[U];while(z===" "||z==="\t")if(I<U+_)z=$[++I];else{do z=$[++I];while(z&&z!==`
|
|
37
|
+
`);u=I,U=I+1,z=$[U]}return u}eK.FOLD_BLOCK="block";eK.FOLD_FLOW="flow";eK.FOLD_QUOTED="quoted";eK.foldFlowLines=aK});var l0=w((JD)=>{var K4=R$(),Q6=t5(),jU=($,I)=>({indentAtStart:I?$.indent.length:$.indentAtStart,lineWidth:$.options.lineWidth,minContentWidth:$.options.minContentWidth}),FU=($)=>/^(%|---|\.\.\.)/m.test($);function _D($,I,_){if(!I||I<0)return!1;let u=I-_,U=$.length;if(U<=u)return!1;for(let z=0,J=0;z<U;++z)if($[z]===`
|
|
38
|
+
`){if(z-J>u)return!0;if(J=z+1,U-J<=u)return!1}return!0}function i0($,I){let _=JSON.stringify($);if(I.options.doubleQuotedAsJSON)return _;let{implicitKey:u}=I,U=I.options.doubleQuotedMinMultiLineLength,z=I.indent||(FU($)?" ":""),J="",G=0;for(let g=0,q=_[g];q;q=_[++g]){if(q===" "&&_[g+1]==="\\"&&_[g+2]==="n")J+=_.slice(G,g)+"\\ ",g+=1,G=g,q="\\";if(q==="\\")switch(_[g+1]){case"u":{J+=_.slice(G,g);let N=_.substr(g+2,4);switch(N){case"0000":J+="\\0";break;case"0007":J+="\\a";break;case"000b":J+="\\v";break;case"001b":J+="\\e";break;case"0085":J+="\\N";break;case"00a0":J+="\\_";break;case"2028":J+="\\L";break;case"2029":J+="\\P";break;default:if(N.substr(0,2)==="00")J+="\\x"+N.substr(2);else J+=_.substr(g,6)}g+=5,G=g+1}break;case"n":if(u||_[g+2]==='"'||_.length<U)g+=1;else{J+=_.slice(G,g)+`
|
|
39
39
|
|
|
40
|
-
`;while(_[
|
|
41
|
-
`,
|
|
42
|
-
`)||/[ \t]\n|\n[ \t]/.test($))return i0($,I);let _=I.indent||(
|
|
43
|
-
${_}`)+"'";return I.implicitKey?u:Q6.foldFlowLines(u,_,Q6.FOLD_FLOW,
|
|
40
|
+
`;while(_[g+2]==="\\"&&_[g+3]==="n"&&_[g+4]!=='"')J+=`
|
|
41
|
+
`,g+=2;if(J+=z,_[g+2]===" ")J+="\\";g+=1,G=g+1}break;default:g+=1}}return J=G?J+_.slice(G):_,u?J:Q6.foldFlowLines(J,z,Q6.FOLD_QUOTED,jU(I,!1))}function vz($,I){if(I.options.singleQuote===!1||I.implicitKey&&$.includes(`
|
|
42
|
+
`)||/[ \t]\n|\n[ \t]/.test($))return i0($,I);let _=I.indent||(FU($)?" ":""),u="'"+$.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
43
|
+
${_}`)+"'";return I.implicitKey?u:Q6.foldFlowLines(u,_,Q6.FOLD_FLOW,jU(I,!1))}function A1($,I){let{singleQuote:_}=I.options,u;if(_===!1)u=i0;else{let U=$.includes('"'),z=$.includes("'");if(U&&!z)u=vz;else if(z&&!U)u=i0;else u=_?vz:i0}return u($,I)}var Hz;try{Hz=new RegExp(`(^|(?<!
|
|
44
44
|
))
|
|
45
45
|
+(?!
|
|
46
|
-
|$)`,"g")}catch{Hz=/\n+(?!\n|$)/g}function
|
|
46
|
+
|$)`,"g")}catch{Hz=/\n+(?!\n|$)/g}function AU({comment:$,type:I,value:_},u,U,z){let{blockQuote:J,commentString:G,lineWidth:g}=u.options;if(!J||/\n[\t ]+$/.test(_))return A1(_,u);let q=u.indent||(u.forceBlockIndent||FU(_)?" ":""),N=J==="literal"?!0:J==="folded"||I===K4.Scalar.BLOCK_FOLDED?!1:I===K4.Scalar.BLOCK_LITERAL?!0:!_D(_,g,q.length);if(!_)return N?`|
|
|
47
47
|
`:`>
|
|
48
|
-
`;let X,Q;for(Q=_.length;Q>0;--Q){let
|
|
49
|
-
`&&
|
|
48
|
+
`;let X,Q;for(Q=_.length;Q>0;--Q){let D=_[Q-1];if(D!==`
|
|
49
|
+
`&&D!=="\t"&&D!==" ")break}let H=_.substring(Q),Y=H.indexOf(`
|
|
50
50
|
`);if(Y===-1)X="-";else if(_===H||Y!==H.length-1){if(X="+",z)z()}else X="";if(H){if(_=_.slice(0,-H.length),H[H.length-1]===`
|
|
51
|
-
`)H=H.slice(0,-1);H=H.replace(Hz,`$&${q}`)}let v=!1,O,T=-1;for(O=0;O<_.length;++O){let
|
|
52
|
-
`)T=O;else break}let V=_.substring(0,T<O?T+1:O);if(V)_=_.substring(V.length),V=V.replace(/\n+/g,`$&${q}`);let
|
|
53
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${q}`),Z=!1,B=
|
|
54
|
-
${q}${
|
|
55
|
-
${q}${V}${_}${H}`}function
|
|
56
|
-
`)||N&&/[[\]{},]/.test(z))return A1(z,I);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(z))return
|
|
57
|
-
`)?A1(z,I):
|
|
58
|
-
`))return
|
|
59
|
-
${
|
|
60
|
-
${I.indent}${
|
|
61
|
-
${
|
|
51
|
+
`)H=H.slice(0,-1);H=H.replace(Hz,`$&${q}`)}let v=!1,O,T=-1;for(O=0;O<_.length;++O){let D=_[O];if(D===" ")v=!0;else if(D===`
|
|
52
|
+
`)T=O;else break}let V=_.substring(0,T<O?T+1:O);if(V)_=_.substring(V.length),V=V.replace(/\n+/g,`$&${q}`);let K=(v?q?"2":"1":"")+X;if($){if(K+=" "+G($.replace(/ ?[\r\n]+/g," ")),U)U()}if(!N){let D=_.replace(/\n+/g,`
|
|
53
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${q}`),Z=!1,B=jU(u,!0);if(J!=="folded"&&I!==K4.Scalar.BLOCK_FOLDED)B.onOverflow=()=>{Z=!0};let L=Q6.foldFlowLines(`${V}${D}${H}`,q,Q6.FOLD_BLOCK,B);if(!Z)return`>${K}
|
|
54
|
+
${q}${L}`}return _=_.replace(/\n+/g,`$&${q}`),`|${K}
|
|
55
|
+
${q}${V}${_}${H}`}function uD($,I,_,u){let{type:U,value:z}=$,{actualString:J,implicitKey:G,indent:g,indentStep:q,inFlow:N}=I;if(G&&z.includes(`
|
|
56
|
+
`)||N&&/[[\]{},]/.test(z))return A1(z,I);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(z))return G||N||!z.includes(`
|
|
57
|
+
`)?A1(z,I):AU($,I,_,u);if(!G&&!N&&U!==K4.Scalar.PLAIN&&z.includes(`
|
|
58
|
+
`))return AU($,I,_,u);if(FU(z)){if(g==="")return I.forceBlockIndent=!0,AU($,I,_,u);else if(G&&g===q)return A1(z,I)}let X=z.replace(/\n+/g,`$&
|
|
59
|
+
${g}`);if(J){let Q=(v)=>v.default&&v.tag!=="tag:yaml.org,2002:str"&&v.test?.test(X),{compat:H,tags:Y}=I.doc.schema;if(Y.some(Q)||H?.some(Q))return A1(z,I)}return G?X:Q6.foldFlowLines(X,g,Q6.FOLD_FLOW,jU(I,!1))}function zD($,I,_,u){let{implicitKey:U,inFlow:z}=I,J=typeof $.value==="string"?$:Object.assign({},$,{value:String($.value)}),{type:G}=$;if(G!==K4.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(J.value))G=K4.Scalar.QUOTE_DOUBLE}let g=(N)=>{switch(N){case K4.Scalar.BLOCK_FOLDED:case K4.Scalar.BLOCK_LITERAL:return U||z?A1(J.value,I):AU(J,I,_,u);case K4.Scalar.QUOTE_DOUBLE:return i0(J.value,I);case K4.Scalar.QUOTE_SINGLE:return vz(J.value,I);case K4.Scalar.PLAIN:return uD(J,I,_,u);default:return null}},q=g(G);if(q===null){let{defaultKeyType:N,defaultStringType:X}=I.options,Q=U&&N||X;if(q=g(Q),q===null)throw Error(`Unsupported default string type ${Q}`)}return q}JD.stringifyString=zD});var m0=w((YD)=>{var gD=WU(),v6=I$(),qD=y0(),XD=l0();function ND($,I){let _=Object.assign({blockQuote:!0,commentString:qD.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),u;switch(_.collectionStyle){case"block":u=!1;break;case"flow":u=!0;break;default:u=null}return{anchors:new Set,doc:$,flowCollectionPadding:_.flowCollectionPadding?" ":"",indent:"",indentStep:typeof _.indent==="number"?" ".repeat(_.indent):" ",inFlow:u,options:_}}function QD($,I){if(I.tag){let U=$.filter((z)=>z.tag===I.tag);if(U.length>0)return U.find((z)=>z.format===I.format)??U[0]}let _=void 0,u;if(v6.isScalar(I)){u=I.value;let U=$.filter((z)=>z.identify?.(u));if(U.length>1){let z=U.filter((J)=>J.test);if(z.length>0)U=z}_=U.find((z)=>z.format===I.format)??U.find((z)=>!z.format)}else u=I,_=$.find((U)=>U.nodeClass&&u instanceof U.nodeClass);if(!_){let U=u?.constructor?.name??(u===null?"null":typeof u);throw Error(`Tag not resolved for ${U} value`)}return _}function vD($,I,{anchors:_,doc:u}){if(!u.directives)return"";let U=[],z=(v6.isScalar($)||v6.isCollection($))&&$.anchor;if(z&&gD.anchorIsValid(z))_.add(z),U.push(`&${z}`);let J=$.tag??(I.default?null:I.tag);if(J)U.push(u.directives.tagString(J));return U.join(" ")}function HD($,I,_,u){if(v6.isPair($))return $.toString(I,_,u);if(v6.isAlias($)){if(I.doc.directives)return $.toString(I);if(I.resolvedAliases?.has($))throw TypeError("Cannot stringify circular structure without alias nodes");else{if(I.resolvedAliases)I.resolvedAliases.add($);else I.resolvedAliases=new Set([$]);$=$.resolve(I.doc)}}let U=void 0,z=v6.isNode($)?$:I.doc.createNode($,{onTagObj:(g)=>U=g});U??(U=QD(I.doc.schema.tags,z));let J=vD(z,U,I);if(J.length>0)I.indentAtStart=(I.indentAtStart??0)+J.length+1;let G=typeof U.stringify==="function"?U.stringify(z,I,_,u):v6.isScalar(z)?XD.stringifyString(z,I,_,u):z.toString(I,_,u);if(!J)return G;return v6.isScalar(z)||G[0]==="{"||G[0]==="["?`${J} ${G}`:`${J}
|
|
60
|
+
${I.indent}${G}`}YD.createStringifyContext=ND;YD.stringify=HD});var s5=w((MD)=>{var t4=I$(),a5=R$(),e5=m0(),r0=y0();function BD({key:$,value:I},_,u,U){let{allNullValues:z,doc:J,indent:G,indentStep:g,options:{commentString:q,indentSeq:N,simpleKeys:X}}=_,Q=t4.isNode($)&&$.comment||null;if(X){if(Q)throw Error("With simple keys, key nodes cannot have comments");if(t4.isCollection($)||!t4.isNode($)&&typeof $==="object")throw Error("With simple keys, collection cannot be used as a key value")}let H=!X&&(!$||Q&&I==null&&!_.inFlow||t4.isCollection($)||(t4.isScalar($)?$.type===a5.Scalar.BLOCK_FOLDED||$.type===a5.Scalar.BLOCK_LITERAL:typeof $==="object"));_=Object.assign({},_,{allNullValues:!1,implicitKey:!H&&(X||!z),indent:G+g});let Y=!1,v=!1,O=e5.stringify($,_,()=>Y=!0,()=>v=!0);if(!H&&!_.inFlow&&O.length>1024){if(X)throw Error("With simple keys, single line scalar must not span more than 1024 characters");H=!0}if(_.inFlow){if(z||I==null){if(Y&&u)u();return O===""?"?":H?`? ${O}`:O}}else if(z&&!X||I==null&&H){if(O=`? ${O}`,Q&&!Y)O+=r0.lineComment(O,_.indent,q(Q));else if(v&&U)U();return O}if(Y)Q=null;if(H){if(Q)O+=r0.lineComment(O,_.indent,q(Q));O=`? ${O}
|
|
61
|
+
${G}:`}else if(O=`${O}:`,Q)O+=r0.lineComment(O,_.indent,q(Q));let T,V,W;if(t4.isNode(I))T=!!I.spaceBefore,V=I.commentBefore,W=I.comment;else if(T=!1,V=null,W=null,I&&typeof I==="object")I=J.createNode(I);if(_.implicitKey=!1,!H&&!Q&&t4.isScalar(I))_.indentAtStart=O.length+1;if(v=!1,!N&&g.length>=2&&!_.inFlow&&!H&&t4.isSeq(I)&&!I.flow&&!I.tag&&!I.anchor)_.indent=_.indent.substring(2);let K=!1,D=e5.stringify(I,_,()=>K=!0,()=>v=!0),Z=" ";if(Q||T||V){if(Z=T?`
|
|
62
62
|
`:"",V){let B=q(V);Z+=`
|
|
63
|
-
${r0.indentComment(B,_.indent)}`}if(
|
|
64
|
-
`&&
|
|
63
|
+
${r0.indentComment(B,_.indent)}`}if(D===""&&!_.inFlow){if(Z===`
|
|
64
|
+
`&&W)Z=`
|
|
65
65
|
|
|
66
66
|
`}else Z+=`
|
|
67
|
-
${_.indent}`}else if(!H&&t4.isCollection(I)){let B=
|
|
68
|
-
`),
|
|
69
|
-
${_.indent}`}}else if(
|
|
70
|
-
`)Z="";if(O+=Z+
|
|
71
|
-
${
|
|
67
|
+
${_.indent}`}else if(!H&&t4.isCollection(I)){let B=D[0],L=D.indexOf(`
|
|
68
|
+
`),A=L!==-1,C=_.inFlow??I.flow??I.items.length===0;if(A||!C){let x=!1;if(A&&(B==="&"||B==="!")){let j=D.indexOf(" ");if(B==="&"&&j!==-1&&j<L&&D[j+1]==="!")j=D.indexOf(" ",j+1);if(j===-1||L<j)x=!0}if(!x)Z=`
|
|
69
|
+
${_.indent}`}}else if(D===""||D[0]===`
|
|
70
|
+
`)Z="";if(O+=Z+D,_.inFlow){if(K&&u)u()}else if(W&&!K)O+=r0.lineComment(O,_.indent,q(W));else if(v&&U)U();return O}MD.stringifyPair=BD});var Yz=w((VD)=>{var $N=J$("process");function DD($,...I){if($==="debug")console.log(...I)}function LD($,I){if($==="debug"||$==="warn")if(typeof $N.emitWarning==="function")$N.emitWarning(I);else console.warn(I)}VD.debug=DD;VD.warn=LD});var EU=w((PD)=>{var n0=I$(),IN=R$(),SU="<<",wU={identify:($)=>$===SU||typeof $==="symbol"&&$.description===SU,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new IN.Scalar(Symbol(SU)),{addToJSMap:UN}),stringify:()=>SU},RD=($,I)=>(wU.identify(I)||n0.isScalar(I)&&(!I.type||I.type===IN.Scalar.PLAIN)&&wU.identify(I.value))&&$?.doc.schema.tags.some((_)=>_.tag===wU.tag&&_.default);function UN($,I,_){if(_=$&&n0.isAlias(_)?_.resolve($.doc):_,n0.isSeq(_))for(let u of _.items)Oz($,I,u);else if(Array.isArray(_))for(let u of _)Oz($,I,u);else Oz($,I,_)}function Oz($,I,_){let u=$&&n0.isAlias(_)?_.resolve($.doc):_;if(!n0.isMap(u))throw Error("Merge sources must be maps or map aliases");let U=u.toJSON(null,$,Map);for(let[z,J]of U)if(I instanceof Map){if(!I.has(z))I.set(z,J)}else if(I instanceof Set)I.add(z);else if(!Object.prototype.hasOwnProperty.call(I,z))Object.defineProperty(I,z,{value:J,writable:!0,enumerable:!0,configurable:!0});return I}PD.addMergeToJSMap=UN;PD.isMergeKey=RD;PD.merge=wU});var Bz=w((CD)=>{var FD=Yz(),_N=EU(),SD=m0(),uN=I$(),Tz=N6();function wD($,I,{key:_,value:u}){if(uN.isNode(_)&&_.addToJSMap)_.addToJSMap($,I,u);else if(_N.isMergeKey($,_))_N.addMergeToJSMap($,I,u);else{let U=Tz.toJS(_,"",$);if(I instanceof Map)I.set(U,Tz.toJS(u,U,$));else if(I instanceof Set)I.add(U);else{let z=ED(_,U,$),J=Tz.toJS(u,z,$);if(z in I)Object.defineProperty(I,z,{value:J,writable:!0,enumerable:!0,configurable:!0});else I[z]=J}}return I}function ED($,I,_){if(I===null)return"";if(typeof I!=="object")return String(I);if(uN.isNode($)&&_?.doc){let u=SD.createStringifyContext(_.doc,{});u.anchors=new Set;for(let z of _.anchors.keys())u.anchors.add(z.anchor);u.inFlow=!0,u.inStringifyKey=!0;let U=$.toString(u);if(!_.mapKeyWarned){let z=JSON.stringify(U);if(z.length>40)z=z.substring(0,36)+'..."';FD.warn(_.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${z}. Set mapAsMap: true to use object keys.`),_.mapKeyWarned=!0}return U}return JSON.stringify(I)}CD.addPairToJSMap=wD});var H6=w((iD)=>{var zN=k0(),xD=s5(),kD=Bz(),CU=I$();function yD($,I,_){let u=zN.createNode($,void 0,_),U=zN.createNode(I,void 0,_);return new fU(u,U)}class fU{constructor($,I=null){Object.defineProperty(this,CU.NODE_TYPE,{value:CU.PAIR}),this.key=$,this.value=I}clone($){let{key:I,value:_}=this;if(CU.isNode(I))I=I.clone($);if(CU.isNode(_))_=_.clone($);return new fU(I,_)}toJSON($,I){let _=I?.mapAsMap?new Map:{};return kD.addPairToJSMap(I,_,this)}toString($,I,_){return $?.doc?xD.stringifyPair(this,$,I,_):JSON.stringify(this)}}iD.Pair=fU;iD.createPair=yD});var Mz=w((dD)=>{var d6=I$(),JN=m0(),xU=y0();function rD($,I,_){return(I.inFlow??$.flow?hD:nD)($,I,_)}function nD({comment:$,items:I},_,{blockItemPrefix:u,flowChars:U,itemIndent:z,onChompKeep:J,onComment:G}){let{indent:g,options:{commentString:q}}=_,N=Object.assign({},_,{indent:z,type:null}),X=!1,Q=[];for(let Y=0;Y<I.length;++Y){let v=I[Y],O=null;if(d6.isNode(v)){if(!X&&v.spaceBefore)Q.push("");if(kU(_,Q,v.commentBefore,X),v.comment)O=v.comment}else if(d6.isPair(v)){let V=d6.isNode(v.key)?v.key:null;if(V){if(!X&&V.spaceBefore)Q.push("");kU(_,Q,V.commentBefore,X)}}X=!1;let T=JN.stringify(v,N,()=>O=null,()=>X=!0);if(O)T+=xU.lineComment(T,z,q(O));if(X&&O)X=!1;Q.push(u+T)}let H;if(Q.length===0)H=U.start+U.end;else{H=Q[0];for(let Y=1;Y<Q.length;++Y){let v=Q[Y];H+=v?`
|
|
71
|
+
${g}${v}`:`
|
|
72
72
|
`}}if($){if(H+=`
|
|
73
|
-
`+
|
|
73
|
+
`+xU.indentComment(q($),g),G)G()}else if(X&&J)J();return H}function hD({items:$},I,{flowChars:_,itemIndent:u}){let{indent:U,indentStep:z,flowCollectionPadding:J,options:{commentString:G}}=I;u+=z;let g=Object.assign({},I,{indent:u,inFlow:!0,type:null}),q=!1,N=0,X=[];for(let Y=0;Y<$.length;++Y){let v=$[Y],O=null;if(d6.isNode(v)){if(v.spaceBefore)X.push("");if(kU(I,X,v.commentBefore,!1),v.comment)O=v.comment}else if(d6.isPair(v)){let V=d6.isNode(v.key)?v.key:null;if(V){if(V.spaceBefore)X.push("");if(kU(I,X,V.commentBefore,!1),V.comment)q=!0}let W=d6.isNode(v.value)?v.value:null;if(W){if(W.comment)O=W.comment;if(W.commentBefore)q=!0}else if(v.value==null&&V?.comment)O=V.comment}if(O)q=!0;let T=JN.stringify(v,g,()=>O=null);if(Y<$.length-1)T+=",";if(O)T+=xU.lineComment(T,u,G(O));if(!q&&(X.length>N||T.includes(`
|
|
74
74
|
`)))q=!0;X.push(T),N=X.length}let{start:Q,end:H}=_;if(X.length===0)return Q+H;else{if(!q){let Y=X.reduce((v,O)=>v+O.length+2,2);q=I.options.lineWidth>0&&Y>I.options.lineWidth}if(q){let Y=Q;for(let v of X)Y+=v?`
|
|
75
75
|
${z}${U}${v}`:`
|
|
76
76
|
`;return`${Y}
|
|
77
|
-
${U}${H}`}else return`${Q}${
|
|
78
|
-
`:" ")}return
|
|
77
|
+
${U}${H}`}else return`${Q}${J}${X.join(" ")}${J}${H}`}}function kU({indent:$,options:{commentString:I}},_,u,U){if(u&&U)u=u.replace(/^\n+/,"");if(u){let z=xU.indentComment(I(u),$);_.push(z.trimStart())}}dD.stringifyCollection=rD});var O6=w((eD)=>{var pD=Mz(),oD=Bz(),tD=bU(),Y6=I$(),yU=H6(),aD=R$();function h0($,I){let _=Y6.isScalar(I)?I.value:I;for(let u of $)if(Y6.isPair(u)){if(u.key===I||u.key===_)return u;if(Y6.isScalar(u.key)&&u.key.value===_)return u}return}class GN extends tD.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor($){super(Y6.MAP,$);this.items=[]}static from($,I,_){let{keepUndefined:u,replacer:U}=_,z=new this($),J=(G,g)=>{if(typeof U==="function")g=U.call(I,G,g);else if(Array.isArray(U)&&!U.includes(G))return;if(g!==void 0||u)z.items.push(yU.createPair(G,g,_))};if(I instanceof Map)for(let[G,g]of I)J(G,g);else if(I&&typeof I==="object")for(let G of Object.keys(I))J(G,I[G]);if(typeof $.sortMapEntries==="function")z.items.sort($.sortMapEntries);return z}add($,I){let _;if(Y6.isPair($))_=$;else if(!$||typeof $!=="object"||!("key"in $))_=new yU.Pair($,$?.value);else _=new yU.Pair($.key,$.value);let u=h0(this.items,_.key),U=this.schema?.sortMapEntries;if(u){if(!I)throw Error(`Key ${_.key} already set`);if(Y6.isScalar(u.value)&&aD.isScalarValue(_.value))u.value.value=_.value;else u.value=_.value}else if(U){let z=this.items.findIndex((J)=>U(_,J)<0);if(z===-1)this.items.push(_);else this.items.splice(z,0,_)}else this.items.push(_)}delete($){let I=h0(this.items,$);if(!I)return!1;return this.items.splice(this.items.indexOf(I),1).length>0}get($,I){let u=h0(this.items,$)?.value;return(!I&&Y6.isScalar(u)?u.value:u)??void 0}has($){return!!h0(this.items,$)}set($,I){this.add(new yU.Pair($,I),!0)}toJSON($,I,_){let u=_?new _:I?.mapAsMap?new Map:{};if(I?.onCreate)I.onCreate(u);for(let U of this.items)oD.addPairToJSMap(I,u,U);return u}toString($,I,_){if(!$)return JSON.stringify(this);for(let u of this.items)if(!Y6.isPair(u))throw Error(`Map items must all be pairs; found ${JSON.stringify(u)} instead`);if(!$.allNullValues&&this.hasAllNullValues(!1))$=Object.assign({},$,{allNullValues:!0});return pD.stringifyCollection(this,$,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:$.indent||"",onChompKeep:_,onComment:I})}}eD.YAMLMap=GN;eD.findPair=h0});var j1=w((_L)=>{var IL=I$(),gN=O6(),UL={collection:"map",default:!0,nodeClass:gN.YAMLMap,tag:"tag:yaml.org,2002:map",resolve($,I){if(!IL.isMap($))I("Expected a mapping for this tag");return $},createNode:($,I,_)=>gN.YAMLMap.from($,I,_)};_L.map=UL});var T6=w((XL)=>{var zL=k0(),JL=Mz(),GL=bU(),lU=I$(),gL=R$(),qL=N6();class qN extends GL.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor($){super(lU.SEQ,$);this.items=[]}add($){this.items.push($)}delete($){let I=iU($);if(typeof I!=="number")return!1;return this.items.splice(I,1).length>0}get($,I){let _=iU($);if(typeof _!=="number")return;let u=this.items[_];return!I&&lU.isScalar(u)?u.value:u}has($){let I=iU($);return typeof I==="number"&&I<this.items.length}set($,I){let _=iU($);if(typeof _!=="number")throw Error(`Expected a valid index, not ${$}.`);let u=this.items[_];if(lU.isScalar(u)&&gL.isScalarValue(I))u.value=I;else this.items[_]=I}toJSON($,I){let _=[];if(I?.onCreate)I.onCreate(_);let u=0;for(let U of this.items)_.push(qL.toJS(U,String(u++),I));return _}toString($,I,_){if(!$)return JSON.stringify(this);return JL.stringifyCollection(this,$,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:($.indent||"")+" ",onChompKeep:_,onComment:I})}static from($,I,_){let{replacer:u}=_,U=new this($);if(I&&Symbol.iterator in Object(I)){let z=0;for(let J of I){if(typeof u==="function"){let G=I instanceof Set?J:String(z++);J=u.call(I,G,J)}U.items.push(zL.createNode(J,void 0,_))}}return U}}function iU($){let I=lU.isScalar($)?$.value:$;if(I&&typeof I==="string")I=Number(I);return typeof I==="number"&&Number.isInteger(I)&&I>=0?I:null}XL.YAMLSeq=qN});var F1=w((HL)=>{var QL=I$(),XN=T6(),vL={collection:"seq",default:!0,nodeClass:XN.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve($,I){if(!QL.isSeq($))I("Expected a sequence for this tag");return $},createNode:($,I,_)=>XN.YAMLSeq.from($,I,_)};HL.seq=vL});var d0=w((BL)=>{var OL=l0(),TL={identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify($,I,_,u){return I=Object.assign({actualString:!0},I),OL.stringifyString($,I,_,u)}};BL.string=TL});var mU=w((KL)=>{var NN=R$(),QN={identify:($)=>$==null,createNode:()=>new NN.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new NN.Scalar(null),stringify:({source:$},I)=>typeof $==="string"&&QN.test.test($)?$:I.options.nullStr};KL.nullTag=QN});var Kz=w((VL)=>{var LL=R$(),vN={identify:($)=>typeof $==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:($)=>new LL.Scalar($[0]==="t"||$[0]==="T"),stringify({source:$,value:I},_){if($&&vN.test.test($)){let u=$[0]==="t"||$[0]==="T";if(I===u)return $}return I?_.options.trueStr:_.options.falseStr}};VL.boolTag=vN});var S1=w((RL)=>{function WL({format:$,minFractionDigits:I,tag:_,value:u}){if(typeof u==="bigint")return String(u);let U=typeof u==="number"?u:Number(u);if(!isFinite(U))return isNaN(U)?".nan":U<0?"-.inf":".inf";let z=Object.is(u,-0)?"-0":JSON.stringify(u);if(!$&&I&&(!_||_==="tag:yaml.org,2002:float")&&/^\d/.test(z)){let J=z.indexOf(".");if(J<0)J=z.length,z+=".";let G=I-(z.length-J-1);while(G-- >0)z+="0"}return z}RL.stringifyNumber=WL});var Lz=w((SL)=>{var bL=R$(),Dz=S1(),AL={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:Dz.stringifyNumber},jL={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():Dz.stringifyNumber($)}},FL={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve($){let I=new bL.Scalar(parseFloat($)),_=$.indexOf(".");if(_!==-1&&$[$.length-1]==="0")I.minFractionDigits=$.length-_-1;return I},stringify:Dz.stringifyNumber};SL.float=FL;SL.floatExp=jL;SL.floatNaN=AL});var Zz=w((yL)=>{var HN=S1(),rU=($)=>typeof $==="bigint"||Number.isInteger($),Vz=($,I,_,{intAsBigInt:u})=>u?BigInt($):parseInt($.substring(I),_);function YN($,I,_){let{value:u}=$;if(rU(u)&&u>=0)return _+u.toString(I);return HN.stringifyNumber($)}var fL={identify:($)=>rU($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:($,I,_)=>Vz($,2,8,_),stringify:($)=>YN($,8,"0o")},xL={identify:rU,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:($,I,_)=>Vz($,0,10,_),stringify:HN.stringifyNumber},kL={identify:($)=>rU($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:($,I,_)=>Vz($,2,16,_),stringify:($)=>YN($,16,"0x")};yL.int=xL;yL.intHex=kL;yL.intOct=fL});var ON=w((oL)=>{var rL=j1(),nL=mU(),hL=F1(),dL=d0(),cL=Kz(),Wz=Lz(),Rz=Zz(),pL=[rL.map,hL.seq,dL.string,nL.nullTag,cL.boolTag,Rz.intOct,Rz.int,Rz.intHex,Wz.floatNaN,Wz.floatExp,Wz.float];oL.schema=pL});var BN=w((_V)=>{var aL=R$(),eL=j1(),sL=F1();function TN($){return typeof $==="bigint"||Number.isInteger($)}var nU=({value:$})=>JSON.stringify($),$V=[{identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify:nU},{identify:($)=>$==null,createNode:()=>new aL.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:nU},{identify:($)=>typeof $==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:($)=>$==="true",stringify:nU},{identify:TN,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:($,I,{intAsBigInt:_})=>_?BigInt($):parseInt($,10),stringify:({value:$})=>TN($)?$.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:nU}],IV={default:!0,tag:"",test:/^/,resolve($,I){return I(`Unresolved plain scalar ${JSON.stringify($)}`),$}},UV=[eL.map,sL.seq].concat($V,IV);_V.schema=UV});var bz=w((GV)=>{var c0=J$("buffer"),Pz=R$(),zV=l0(),JV={identify:($)=>$ instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve($,I){if(typeof c0.Buffer==="function")return c0.Buffer.from($,"base64");else if(typeof atob==="function"){let _=atob($.replace(/[\n\r]/g,"")),u=new Uint8Array(_.length);for(let U=0;U<_.length;++U)u[U]=_.charCodeAt(U);return u}else return I("This environment does not support reading binary tags; either Buffer or atob is required"),$},stringify({comment:$,type:I,value:_},u,U,z){if(!_)return"";let J=_,G;if(typeof c0.Buffer==="function")G=J instanceof c0.Buffer?J.toString("base64"):c0.Buffer.from(J.buffer).toString("base64");else if(typeof btoa==="function"){let g="";for(let q=0;q<J.length;++q)g+=String.fromCharCode(J[q]);G=btoa(g)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(I??(I=Pz.Scalar.BLOCK_LITERAL),I!==Pz.Scalar.QUOTE_DOUBLE){let g=Math.max(u.options.lineWidth-u.indent.length,u.options.minContentWidth),q=Math.ceil(G.length/g),N=Array(q);for(let X=0,Q=0;X<q;++X,Q+=g)N[X]=G.substr(Q,g);G=N.join(I===Pz.Scalar.BLOCK_LITERAL?`
|
|
78
|
+
`:" ")}return zV.stringifyString({comment:$,type:I,value:G},u,U,z)}};GV.binary=JV});var dU=w((QV)=>{var hU=I$(),Az=H6(),qV=R$(),XV=T6();function MN($,I){if(hU.isSeq($))for(let _=0;_<$.items.length;++_){let u=$.items[_];if(hU.isPair(u))continue;else if(hU.isMap(u)){if(u.items.length>1)I("Each pair must have its own sequence indicator");let U=u.items[0]||new Az.Pair(new qV.Scalar(null));if(u.commentBefore)U.key.commentBefore=U.key.commentBefore?`${u.commentBefore}
|
|
79
79
|
${U.key.commentBefore}`:u.commentBefore;if(u.comment){let z=U.value??U.key;z.comment=z.comment?`${u.comment}
|
|
80
|
-
${z.comment}`:u.comment}u=U}$.items[_]=nU.isPair(u)?u:new Az.Pair(u)}else I("Expected a sequence for this tag");return $}function TN($,I,_){let{replacer:u}=_,U=new gV.YAMLSeq($);U.tag="tag:yaml.org,2002:pairs";let z=0;if(I&&Symbol.iterator in Object(I))for(let g of I){if(typeof u==="function")g=u.call(I,String(z++),g);let J,G;if(Array.isArray(g))if(g.length===2)J=g[0],G=g[1];else throw TypeError(`Expected [key, value] tuple: ${g}`);else if(g&&g instanceof Object){let q=Object.keys(g);if(q.length===1)J=q[0],G=g[J];else throw TypeError(`Expected tuple with one key, not ${q.length} keys`)}else J=g;U.items.push(Az.createPair(J,G,_))}return U}var JV={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:ON,createNode:TN};GV.createPairs=TN;GV.pairs=JV;GV.resolvePairs=ON});var Fz=w((HV)=>{var BN=I$(),jz=N6(),p0=O6(),QV=T6(),MN=hU();class h6 extends QV.YAMLSeq{constructor(){super();this.add=p0.YAMLMap.prototype.add.bind(this),this.delete=p0.YAMLMap.prototype.delete.bind(this),this.get=p0.YAMLMap.prototype.get.bind(this),this.has=p0.YAMLMap.prototype.has.bind(this),this.set=p0.YAMLMap.prototype.set.bind(this),this.tag=h6.tag}toJSON($,I){if(!I)return super.toJSON($);let _=new Map;if(I?.onCreate)I.onCreate(_);for(let u of this.items){let U,z;if(BN.isPair(u))U=jz.toJS(u.key,"",I),z=jz.toJS(u.value,U,I);else U=jz.toJS(u,"",I);if(_.has(U))throw Error("Ordered maps must not include duplicate keys");_.set(U,z)}return _}static from($,I,_){let u=MN.createPairs($,I,_),U=new this;return U.items=u.items,U}}h6.tag="tag:yaml.org,2002:omap";var vV={collection:"seq",identify:($)=>$ instanceof Map,nodeClass:h6,default:!1,tag:"tag:yaml.org,2002:omap",resolve($,I){let _=MN.resolvePairs($,I),u=[];for(let{key:U}of _.items)if(BN.isScalar(U))if(u.includes(U.value))I(`Ordered maps must not include duplicate keys: ${U.value}`);else u.push(U.value);return Object.assign(new h6,_)},createNode:($,I,_)=>h6.from($,I,_)};HV.YAMLOMap=h6;HV.omap=vV});var ZN=w((TV)=>{var KN=Z$();function DN({value:$,source:I},_){if(I&&($?LN:VN).test.test(I))return I;return $?_.options.trueStr:_.options.falseStr}var LN={identify:($)=>$===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new KN.Scalar(!0),stringify:DN},VN={identify:($)=>$===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new KN.Scalar(!1),stringify:DN};TV.falseTag=VN;TV.trueTag=LN});var WN=w((ZV)=>{var KV=Z$(),Sz=S1(),DV={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:Sz.stringifyNumber},LV={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():Sz.stringifyNumber($)}},VV={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve($){let I=new KV.Scalar(parseFloat($.replace(/_/g,""))),_=$.indexOf(".");if(_!==-1){let u=$.substring(_+1).replace(/_/g,"");if(u[u.length-1]==="0")I.minFractionDigits=u.length}return I},stringify:Sz.stringifyNumber};ZV.float=VV;ZV.floatExp=LV;ZV.floatNaN=DV});var PN=w((SV)=>{var RN=S1(),o0=($)=>typeof $==="bigint"||Number.isInteger($);function dU($,I,_,{intAsBigInt:u}){let U=$[0];if(U==="-"||U==="+")I+=1;if($=$.substring(I).replace(/_/g,""),u){switch(_){case 2:$=`0b${$}`;break;case 8:$=`0o${$}`;break;case 16:$=`0x${$}`;break}let g=BigInt($);return U==="-"?BigInt(-1)*g:g}let z=parseInt($,_);return U==="-"?-1*z:z}function wz($,I,_){let{value:u}=$;if(o0(u)){let U=u.toString(I);return u<0?"-"+_+U.substr(1):_+U}return RN.stringifyNumber($)}var bV={identify:o0,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:($,I,_)=>dU($,2,2,_),stringify:($)=>wz($,2,"0b")},AV={identify:o0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:($,I,_)=>dU($,1,8,_),stringify:($)=>wz($,8,"0")},jV={identify:o0,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:($,I,_)=>dU($,0,10,_),stringify:RN.stringifyNumber},FV={identify:o0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:($,I,_)=>dU($,2,16,_),stringify:($)=>wz($,16,"0x")};SV.int=jV;SV.intBin=bV;SV.intHex=FV;SV.intOct=AV});var Ez=w((kV)=>{var oU=I$(),cU=H6(),pU=O6();class d6 extends pU.YAMLMap{constructor($){super($);this.tag=d6.tag}add($){let I;if(oU.isPair($))I=$;else if($&&typeof $==="object"&&"key"in $&&"value"in $&&$.value===null)I=new cU.Pair($.key,null);else I=new cU.Pair($,null);if(!pU.findPair(this.items,I.key))this.items.push(I)}get($,I){let _=pU.findPair(this.items,$);return!I&&oU.isPair(_)?oU.isScalar(_.key)?_.key.value:_.key:_}set($,I){if(typeof I!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof I}`);let _=pU.findPair(this.items,$);if(_&&!I)this.items.splice(this.items.indexOf(_),1);else if(!_&&I)this.items.push(new cU.Pair($))}toJSON($,I){return super.toJSON($,I,Set)}toString($,I,_){if(!$)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},$,{allNullValues:!0}),I,_);else throw Error("Set items must all have null values")}static from($,I,_){let{replacer:u}=_,U=new this($);if(I&&Symbol.iterator in Object(I))for(let z of I){if(typeof u==="function")z=u.call(I,z,z);U.items.push(cU.createPair(z,null,_))}return U}}d6.tag="tag:yaml.org,2002:set";var xV={collection:"map",identify:($)=>$ instanceof Set,nodeClass:d6,default:!1,tag:"tag:yaml.org,2002:set",createNode:($,I,_)=>d6.from($,I,_),resolve($,I){if(oU.isMap($))if($.hasAllNullValues(!0))return Object.assign(new d6,$);else I("Set items must all have null values");else I("Expected a mapping for this tag");return $}};kV.YAMLSet=d6;kV.set=xV});var fz=w((nV)=>{var lV=S1();function Cz($,I){let _=$[0],u=_==="-"||_==="+"?$.substring(1):$,U=(g)=>I?BigInt(g):Number(g),z=u.replace(/_/g,"").split(":").reduce((g,J)=>g*U(60)+U(J),U(0));return _==="-"?U(-1)*z:z}function bN($){let{value:I}=$,_=(g)=>g;if(typeof I==="bigint")_=(g)=>BigInt(g);else if(isNaN(I)||!isFinite(I))return lV.stringifyNumber($);let u="";if(I<0)u="-",I*=_(-1);let U=_(60),z=[I%U];if(I<60)z.unshift(0);else if(I=(I-z[0])/U,z.unshift(I%U),I>=60)I=(I-z[0])/U,z.unshift(I);return u+z.map((g)=>String(g).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var mV={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:_})=>Cz($,_),stringify:bN},rV={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:($)=>Cz($,!1),stringify:bN},AN={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(AN.test);if(!I)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,_,u,U,z,g,J]=I.map(Number),G=I[7]?Number((I[7]+"00").substr(1,3)):0,q=Date.UTC(_,u-1,U,z||0,g||0,J||0,G),N=I[8];if(N&&N!=="Z"){let X=Cz(N,!1);if(Math.abs(X)<30)X*=60;q-=60000*X}return new Date(q)},stringify:({value:$})=>$?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};nV.floatTime=rV;nV.intTime=mV;nV.timestamp=AN});var FN=w((uZ)=>{var pV=j1(),oV=lU(),tV=F1(),aV=d0(),eV=bz(),jN=ZN(),xz=WN(),tU=PN(),sV=wU(),$Z=Fz(),IZ=hU(),UZ=Ez(),kz=fz(),_Z=[pV.map,tV.seq,aV.string,oV.nullTag,jN.trueTag,jN.falseTag,tU.intBin,tU.intOct,tU.int,tU.intHex,xz.floatNaN,xz.floatExp,xz.float,eV.binary,sV.merge,$Z.omap,IZ.pairs,UZ.set,kz.intTime,kz.floatTime,kz.timestamp];uZ.schema=_Z});var lN=w((vZ)=>{var CN=j1(),gZ=lU(),fN=F1(),JZ=d0(),GZ=Kz(),yz=Lz(),iz=Zz(),qZ=vN(),XZ=YN(),xN=bz(),t0=wU(),kN=Fz(),yN=hU(),SN=FN(),iN=Ez(),aU=fz(),wN=new Map([["core",qZ.schema],["failsafe",[CN.map,fN.seq,JZ.string]],["json",XZ.schema],["yaml11",SN.schema],["yaml-1.1",SN.schema]]),EN={binary:xN.binary,bool:GZ.boolTag,float:yz.float,floatExp:yz.floatExp,floatNaN:yz.floatNaN,floatTime:aU.floatTime,int:iz.int,intHex:iz.intHex,intOct:iz.intOct,intTime:aU.intTime,map:CN.map,merge:t0.merge,null:gZ.nullTag,omap:kN.omap,pairs:yN.pairs,seq:fN.seq,set:iN.set,timestamp:aU.timestamp},NZ={"tag:yaml.org,2002:binary":xN.binary,"tag:yaml.org,2002:merge":t0.merge,"tag:yaml.org,2002:omap":kN.omap,"tag:yaml.org,2002:pairs":yN.pairs,"tag:yaml.org,2002:set":iN.set,"tag:yaml.org,2002:timestamp":aU.timestamp};function QZ($,I,_){let u=wN.get(I);if(u&&!$)return _&&!u.includes(t0.merge)?u.concat(t0.merge):u.slice();let U=u;if(!U)if(Array.isArray($))U=[];else{let z=Array.from(wN.keys()).filter((g)=>g!=="yaml11").map((g)=>JSON.stringify(g)).join(", ");throw Error(`Unknown schema "${I}"; use one of ${z} or define customTags array`)}if(Array.isArray($))for(let z of $)U=U.concat(z);else if(typeof $==="function")U=$(U.slice());if(_)U=U.concat(t0.merge);return U.reduce((z,g)=>{let J=typeof g==="string"?EN[g]:g;if(!J){let G=JSON.stringify(g),q=Object.keys(EN).map((N)=>JSON.stringify(N)).join(", ");throw Error(`Unknown custom tag ${G}; use one of ${q}`)}if(!z.includes(J))z.push(J);return z},[])}vZ.coreKnownTags=NZ;vZ.getTags=QZ});var rz=w((KZ)=>{var lz=I$(),OZ=j1(),TZ=F1(),BZ=d0(),eU=lN(),MZ=($,I)=>$.key<I.key?-1:$.key>I.key?1:0;class mz{constructor({compat:$,customTags:I,merge:_,resolveKnownTags:u,schema:U,sortMapEntries:z,toStringDefaults:g}){this.compat=Array.isArray($)?eU.getTags($,"compat"):$?eU.getTags(null,$):null,this.name=typeof U==="string"&&U||"core",this.knownTags=u?eU.coreKnownTags:{},this.tags=eU.getTags(I,this.name,_),this.toStringOptions=g??null,Object.defineProperty(this,lz.MAP,{value:OZ.map}),Object.defineProperty(this,lz.SCALAR,{value:BZ.string}),Object.defineProperty(this,lz.SEQ,{value:TZ.seq}),this.sortMapEntries=typeof z==="function"?z:z===!0?MZ:null}clone(){let $=Object.create(mz.prototype,Object.getOwnPropertyDescriptors(this));return $.tags=this.tags.slice(),$}}KZ.Schema=mz});var mN=w((ZZ)=>{var LZ=I$(),nz=m0(),a0=y0();function VZ($,I){let _=[],u=I.directives===!0;if(I.directives!==!1&&$.directives){let G=$.directives.toString($);if(G)_.push(G),u=!0;else if($.directives.docStart)u=!0}if(u)_.push("---");let U=nz.createStringifyContext($,I),{commentString:z}=U.options;if($.commentBefore){if(_.length!==1)_.unshift("");let G=z($.commentBefore);_.unshift(a0.indentComment(G,""))}let g=!1,J=null;if($.contents){if(LZ.isNode($.contents)){if($.contents.spaceBefore&&u)_.push("");if($.contents.commentBefore){let N=z($.contents.commentBefore);_.push(a0.indentComment(N,""))}U.forceBlockIndent=!!$.comment,J=$.contents.comment}let G=J?void 0:()=>g=!0,q=nz.stringify($.contents,U,()=>J=null,G);if(J)q+=a0.lineComment(q,"",z(J));if((q[0]==="|"||q[0]===">")&&_[_.length-1]==="---")_[_.length-1]=`--- ${q}`;else _.push(q)}else _.push(nz.stringify($.contents,U));if($.directives?.docEnd)if($.comment){let G=z($.comment);if(G.includes(`
|
|
81
|
-
`))_.push("..."),_.push(a0.indentComment(
|
|
80
|
+
${z.comment}`:u.comment}u=U}$.items[_]=hU.isPair(u)?u:new Az.Pair(u)}else I("Expected a sequence for this tag");return $}function KN($,I,_){let{replacer:u}=_,U=new XV.YAMLSeq($);U.tag="tag:yaml.org,2002:pairs";let z=0;if(I&&Symbol.iterator in Object(I))for(let J of I){if(typeof u==="function")J=u.call(I,String(z++),J);let G,g;if(Array.isArray(J))if(J.length===2)G=J[0],g=J[1];else throw TypeError(`Expected [key, value] tuple: ${J}`);else if(J&&J instanceof Object){let q=Object.keys(J);if(q.length===1)G=q[0],g=J[G];else throw TypeError(`Expected tuple with one key, not ${q.length} keys`)}else G=J;U.items.push(Az.createPair(G,g,_))}return U}var NV={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:MN,createNode:KN};QV.createPairs=KN;QV.pairs=NV;QV.resolvePairs=MN});var Fz=w((BV)=>{var DN=I$(),jz=N6(),p0=O6(),OV=T6(),LN=dU();class c6 extends OV.YAMLSeq{constructor(){super();this.add=p0.YAMLMap.prototype.add.bind(this),this.delete=p0.YAMLMap.prototype.delete.bind(this),this.get=p0.YAMLMap.prototype.get.bind(this),this.has=p0.YAMLMap.prototype.has.bind(this),this.set=p0.YAMLMap.prototype.set.bind(this),this.tag=c6.tag}toJSON($,I){if(!I)return super.toJSON($);let _=new Map;if(I?.onCreate)I.onCreate(_);for(let u of this.items){let U,z;if(DN.isPair(u))U=jz.toJS(u.key,"",I),z=jz.toJS(u.value,U,I);else U=jz.toJS(u,"",I);if(_.has(U))throw Error("Ordered maps must not include duplicate keys");_.set(U,z)}return _}static from($,I,_){let u=LN.createPairs($,I,_),U=new this;return U.items=u.items,U}}c6.tag="tag:yaml.org,2002:omap";var TV={collection:"seq",identify:($)=>$ instanceof Map,nodeClass:c6,default:!1,tag:"tag:yaml.org,2002:omap",resolve($,I){let _=LN.resolvePairs($,I),u=[];for(let{key:U}of _.items)if(DN.isScalar(U))if(u.includes(U.value))I(`Ordered maps must not include duplicate keys: ${U.value}`);else u.push(U.value);return Object.assign(new c6,_)},createNode:($,I,_)=>c6.from($,I,_)};BV.YAMLOMap=c6;BV.omap=TV});var PN=w((DV)=>{var VN=R$();function ZN({value:$,source:I},_){if(I&&($?WN:RN).test.test(I))return I;return $?_.options.trueStr:_.options.falseStr}var WN={identify:($)=>$===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new VN.Scalar(!0),stringify:ZN},RN={identify:($)=>$===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new VN.Scalar(!1),stringify:ZN};DV.falseTag=RN;DV.trueTag=WN});var bN=w((bV)=>{var ZV=R$(),Sz=S1(),WV={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:Sz.stringifyNumber},RV={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():Sz.stringifyNumber($)}},PV={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve($){let I=new ZV.Scalar(parseFloat($.replace(/_/g,""))),_=$.indexOf(".");if(_!==-1){let u=$.substring(_+1).replace(/_/g,"");if(u[u.length-1]==="0")I.minFractionDigits=u.length}return I},stringify:Sz.stringifyNumber};bV.float=PV;bV.floatExp=RV;bV.floatNaN=WV});var jN=w((fV)=>{var AN=S1(),o0=($)=>typeof $==="bigint"||Number.isInteger($);function cU($,I,_,{intAsBigInt:u}){let U=$[0];if(U==="-"||U==="+")I+=1;if($=$.substring(I).replace(/_/g,""),u){switch(_){case 2:$=`0b${$}`;break;case 8:$=`0o${$}`;break;case 16:$=`0x${$}`;break}let J=BigInt($);return U==="-"?BigInt(-1)*J:J}let z=parseInt($,_);return U==="-"?-1*z:z}function wz($,I,_){let{value:u}=$;if(o0(u)){let U=u.toString(I);return u<0?"-"+_+U.substr(1):_+U}return AN.stringifyNumber($)}var SV={identify:o0,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:($,I,_)=>cU($,2,2,_),stringify:($)=>wz($,2,"0b")},wV={identify:o0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:($,I,_)=>cU($,1,8,_),stringify:($)=>wz($,8,"0")},EV={identify:o0,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:($,I,_)=>cU($,0,10,_),stringify:AN.stringifyNumber},CV={identify:o0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:($,I,_)=>cU($,2,16,_),stringify:($)=>wz($,16,"0x")};fV.int=EV;fV.intBin=SV;fV.intHex=CV;fV.intOct=wV});var Ez=w((mV)=>{var tU=I$(),pU=H6(),oU=O6();class p6 extends oU.YAMLMap{constructor($){super($);this.tag=p6.tag}add($){let I;if(tU.isPair($))I=$;else if($&&typeof $==="object"&&"key"in $&&"value"in $&&$.value===null)I=new pU.Pair($.key,null);else I=new pU.Pair($,null);if(!oU.findPair(this.items,I.key))this.items.push(I)}get($,I){let _=oU.findPair(this.items,$);return!I&&tU.isPair(_)?tU.isScalar(_.key)?_.key.value:_.key:_}set($,I){if(typeof I!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof I}`);let _=oU.findPair(this.items,$);if(_&&!I)this.items.splice(this.items.indexOf(_),1);else if(!_&&I)this.items.push(new pU.Pair($))}toJSON($,I){return super.toJSON($,I,Set)}toString($,I,_){if(!$)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},$,{allNullValues:!0}),I,_);else throw Error("Set items must all have null values")}static from($,I,_){let{replacer:u}=_,U=new this($);if(I&&Symbol.iterator in Object(I))for(let z of I){if(typeof u==="function")z=u.call(I,z,z);U.items.push(pU.createPair(z,null,_))}return U}}p6.tag="tag:yaml.org,2002:set";var lV={collection:"map",identify:($)=>$ instanceof Set,nodeClass:p6,default:!1,tag:"tag:yaml.org,2002:set",createNode:($,I,_)=>p6.from($,I,_),resolve($,I){if(tU.isMap($))if($.hasAllNullValues(!0))return Object.assign(new p6,$);else I("Set items must all have null values");else I("Expected a mapping for this tag");return $}};mV.YAMLSet=p6;mV.set=lV});var fz=w((pV)=>{var hV=S1();function Cz($,I){let _=$[0],u=_==="-"||_==="+"?$.substring(1):$,U=(J)=>I?BigInt(J):Number(J),z=u.replace(/_/g,"").split(":").reduce((J,G)=>J*U(60)+U(G),U(0));return _==="-"?U(-1)*z:z}function FN($){let{value:I}=$,_=(J)=>J;if(typeof I==="bigint")_=(J)=>BigInt(J);else if(isNaN(I)||!isFinite(I))return hV.stringifyNumber($);let u="";if(I<0)u="-",I*=_(-1);let U=_(60),z=[I%U];if(I<60)z.unshift(0);else if(I=(I-z[0])/U,z.unshift(I%U),I>=60)I=(I-z[0])/U,z.unshift(I);return u+z.map((J)=>String(J).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var dV={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:_})=>Cz($,_),stringify:FN},cV={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:($)=>Cz($,!1),stringify:FN},SN={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(SN.test);if(!I)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,_,u,U,z,J,G]=I.map(Number),g=I[7]?Number((I[7]+"00").substr(1,3)):0,q=Date.UTC(_,u-1,U,z||0,J||0,G||0,g),N=I[8];if(N&&N!=="Z"){let X=Cz(N,!1);if(Math.abs(X)<30)X*=60;q-=60000*X}return new Date(q)},stringify:({value:$})=>$?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};pV.floatTime=cV;pV.intTime=dV;pV.timestamp=SN});var EN=w((gZ)=>{var eV=j1(),sV=mU(),$Z=F1(),IZ=d0(),UZ=bz(),wN=PN(),xz=bN(),aU=jN(),_Z=EU(),uZ=Fz(),zZ=dU(),JZ=Ez(),kz=fz(),GZ=[eV.map,$Z.seq,IZ.string,sV.nullTag,wN.trueTag,wN.falseTag,aU.intBin,aU.intOct,aU.int,aU.intHex,xz.floatNaN,xz.floatExp,xz.float,UZ.binary,_Z.merge,uZ.omap,zZ.pairs,JZ.set,kz.intTime,kz.floatTime,kz.timestamp];gZ.schema=GZ});var nN=w((TZ)=>{var kN=j1(),XZ=mU(),yN=F1(),NZ=d0(),QZ=Kz(),yz=Lz(),iz=Zz(),vZ=ON(),HZ=BN(),iN=bz(),t0=EU(),lN=Fz(),mN=dU(),CN=EN(),rN=Ez(),eU=fz(),fN=new Map([["core",vZ.schema],["failsafe",[kN.map,yN.seq,NZ.string]],["json",HZ.schema],["yaml11",CN.schema],["yaml-1.1",CN.schema]]),xN={binary:iN.binary,bool:QZ.boolTag,float:yz.float,floatExp:yz.floatExp,floatNaN:yz.floatNaN,floatTime:eU.floatTime,int:iz.int,intHex:iz.intHex,intOct:iz.intOct,intTime:eU.intTime,map:kN.map,merge:t0.merge,null:XZ.nullTag,omap:lN.omap,pairs:mN.pairs,seq:yN.seq,set:rN.set,timestamp:eU.timestamp},YZ={"tag:yaml.org,2002:binary":iN.binary,"tag:yaml.org,2002:merge":t0.merge,"tag:yaml.org,2002:omap":lN.omap,"tag:yaml.org,2002:pairs":mN.pairs,"tag:yaml.org,2002:set":rN.set,"tag:yaml.org,2002:timestamp":eU.timestamp};function OZ($,I,_){let u=fN.get(I);if(u&&!$)return _&&!u.includes(t0.merge)?u.concat(t0.merge):u.slice();let U=u;if(!U)if(Array.isArray($))U=[];else{let z=Array.from(fN.keys()).filter((J)=>J!=="yaml11").map((J)=>JSON.stringify(J)).join(", ");throw Error(`Unknown schema "${I}"; use one of ${z} or define customTags array`)}if(Array.isArray($))for(let z of $)U=U.concat(z);else if(typeof $==="function")U=$(U.slice());if(_)U=U.concat(t0.merge);return U.reduce((z,J)=>{let G=typeof J==="string"?xN[J]:J;if(!G){let g=JSON.stringify(J),q=Object.keys(xN).map((N)=>JSON.stringify(N)).join(", ");throw Error(`Unknown custom tag ${g}; use one of ${q}`)}if(!z.includes(G))z.push(G);return z},[])}TZ.coreKnownTags=YZ;TZ.getTags=OZ});var rz=w((ZZ)=>{var lz=I$(),KZ=j1(),DZ=F1(),LZ=d0(),sU=nN(),VZ=($,I)=>$.key<I.key?-1:$.key>I.key?1:0;class mz{constructor({compat:$,customTags:I,merge:_,resolveKnownTags:u,schema:U,sortMapEntries:z,toStringDefaults:J}){this.compat=Array.isArray($)?sU.getTags($,"compat"):$?sU.getTags(null,$):null,this.name=typeof U==="string"&&U||"core",this.knownTags=u?sU.coreKnownTags:{},this.tags=sU.getTags(I,this.name,_),this.toStringOptions=J??null,Object.defineProperty(this,lz.MAP,{value:KZ.map}),Object.defineProperty(this,lz.SCALAR,{value:LZ.string}),Object.defineProperty(this,lz.SEQ,{value:DZ.seq}),this.sortMapEntries=typeof z==="function"?z:z===!0?VZ:null}clone(){let $=Object.create(mz.prototype,Object.getOwnPropertyDescriptors(this));return $.tags=this.tags.slice(),$}}ZZ.Schema=mz});var hN=w((bZ)=>{var RZ=I$(),nz=m0(),a0=y0();function PZ($,I){let _=[],u=I.directives===!0;if(I.directives!==!1&&$.directives){let g=$.directives.toString($);if(g)_.push(g),u=!0;else if($.directives.docStart)u=!0}if(u)_.push("---");let U=nz.createStringifyContext($,I),{commentString:z}=U.options;if($.commentBefore){if(_.length!==1)_.unshift("");let g=z($.commentBefore);_.unshift(a0.indentComment(g,""))}let J=!1,G=null;if($.contents){if(RZ.isNode($.contents)){if($.contents.spaceBefore&&u)_.push("");if($.contents.commentBefore){let N=z($.contents.commentBefore);_.push(a0.indentComment(N,""))}U.forceBlockIndent=!!$.comment,G=$.contents.comment}let g=G?void 0:()=>J=!0,q=nz.stringify($.contents,U,()=>G=null,g);if(G)q+=a0.lineComment(q,"",z(G));if((q[0]==="|"||q[0]===">")&&_[_.length-1]==="---")_[_.length-1]=`--- ${q}`;else _.push(q)}else _.push(nz.stringify($.contents,U));if($.directives?.docEnd)if($.comment){let g=z($.comment);if(g.includes(`
|
|
81
|
+
`))_.push("..."),_.push(a0.indentComment(g,""));else _.push(`... ${g}`)}else _.push("...");else{let g=$.comment;if(g&&J)g=g.replace(/^\n+/,"");if(g){if((!J||G)&&_[_.length-1]!=="")_.push("");_.push(a0.indentComment(z(g),""))}}return _.join(`
|
|
82
82
|
`)+`
|
|
83
|
-
`}
|
|
84
|
-
`;
|
|
83
|
+
`}bZ.stringifyDocument=PZ});var e0=w((xZ)=>{var jZ=x0(),w1=bU(),v4=I$(),FZ=H6(),SZ=N6(),wZ=rz(),EZ=hN(),hz=WU(),CZ=Xz(),fZ=k0(),dz=qz();class cz{constructor($,I,_){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,v4.NODE_TYPE,{value:v4.DOC});let u=null;if(typeof I==="function"||Array.isArray(I))u=I;else if(_===void 0&&I)_=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"},_);this.options=U;let{version:z}=U;if(_?._directives){if(this.directives=_._directives.atDocument(),this.directives.yaml.explicit)z=this.directives.yaml.version}else this.directives=new dz.Directives({version:z});this.setSchema(z,_),this.contents=$===void 0?null:this.createNode($,u,_)}clone(){let $=Object.create(cz.prototype,{[v4.NODE_TYPE]:{value:v4.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=v4.isNode(this.contents)?this.contents.clone($.schema):this.contents,this.range)$.range=this.range.slice();return $}add($){if(E1(this.contents))this.contents.add($)}addIn($,I){if(E1(this.contents))this.contents.addIn($,I)}createAlias($,I){if(!$.anchor){let _=hz.anchorNames(this);$.anchor=!I||_.has(I)?hz.findNewAnchor(I||"a",_):I}return new jZ.Alias($.anchor)}createNode($,I,_){let u=void 0;if(typeof I==="function")$=I.call({"":$},"",$),u=I;else if(Array.isArray(I)){let v=(T)=>typeof T==="number"||T instanceof String||T instanceof Number,O=I.filter(v).map(String);if(O.length>0)I=I.concat(O);u=I}else if(_===void 0&&I)_=I,I=void 0;let{aliasDuplicateObjects:U,anchorPrefix:z,flow:J,keepUndefined:G,onTagObj:g,tag:q}=_??{},{onAnchor:N,setAnchors:X,sourceObjects:Q}=hz.createNodeAnchors(this,z||"a"),H={aliasDuplicateObjects:U??!0,keepUndefined:G??!1,onAnchor:N,onTagObj:g,replacer:u,schema:this.schema,sourceObjects:Q},Y=fZ.createNode($,q,H);if(J&&v4.isCollection(Y))Y.flow=!0;return X(),Y}createPair($,I,_={}){let u=this.createNode($,null,_),U=this.createNode(I,null,_);return new FZ.Pair(u,U)}delete($){return E1(this.contents)?this.contents.delete($):!1}deleteIn($){if(w1.isEmptyPath($)){if(this.contents==null)return!1;return this.contents=null,!0}return E1(this.contents)?this.contents.deleteIn($):!1}get($,I){return v4.isCollection(this.contents)?this.contents.get($,I):void 0}getIn($,I){if(w1.isEmptyPath($))return!I&&v4.isScalar(this.contents)?this.contents.value:this.contents;return v4.isCollection(this.contents)?this.contents.getIn($,I):void 0}has($){return v4.isCollection(this.contents)?this.contents.has($):!1}hasIn($){if(w1.isEmptyPath($))return this.contents!==void 0;return v4.isCollection(this.contents)?this.contents.hasIn($):!1}set($,I){if(this.contents==null)this.contents=w1.collectionFromPath(this.schema,[$],I);else if(E1(this.contents))this.contents.set($,I)}setIn($,I){if(w1.isEmptyPath($))this.contents=I;else if(this.contents==null)this.contents=w1.collectionFromPath(this.schema,Array.from($),I);else if(E1(this.contents))this.contents.setIn($,I)}setSchema($,I={}){if(typeof $==="number")$=String($);let _;switch($){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new dz.Directives({version:"1.1"});_={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=$;else this.directives=new dz.Directives({version:$});_={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;_=null;break;default:{let u=JSON.stringify($);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${u}`)}}if(I.schema instanceof Object)this.schema=I.schema;else if(_)this.schema=new wZ.Schema(Object.assign(_,I));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:$,jsonArg:I,mapAsMap:_,maxAliasCount:u,onAnchor:U,reviver:z}={}){let J={anchors:new Map,doc:this,keep:!$,mapAsMap:_===!0,mapKeyWarned:!1,maxAliasCount:typeof u==="number"?u:100},G=SZ.toJS(this.contents,I??"",J);if(typeof U==="function")for(let{count:g,res:q}of J.anchors.values())U(q,g);return typeof z==="function"?CZ.applyReviver(z,{"":G},"",G):G}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 EZ.stringifyDocument(this,$)}}function E1($){if(v4.isCollection($))return!0;throw Error("Expected a YAML collection as document contents")}xZ.Document=cz});var s0=w((iZ)=>{class $_ extends Error{constructor($,I,_,u){super();this.name=$,this.code=_,this.message=u,this.pos=I}}class dN extends $_{constructor($,I,_){super("YAMLParseError",$,I,_)}}class cN extends $_{constructor($,I,_){super("YAMLWarning",$,I,_)}}var yZ=($,I)=>(_)=>{if(_.pos[0]===-1)return;_.linePos=_.pos.map((G)=>I.linePos(G));let{line:u,col:U}=_.linePos[0];_.message+=` at line ${u}, column ${U}`;let z=U-1,J=$.substring(I.lineStarts[u-1],I.lineStarts[u]).replace(/[\n\r]+$/,"");if(z>=60&&J.length>80){let G=Math.min(z-39,J.length-79);J="…"+J.substring(G),z-=G-1}if(J.length>80)J=J.substring(0,79)+"…";if(u>1&&/^ *$/.test(J.substring(0,z))){let G=$.substring(I.lineStarts[u-2],I.lineStarts[u-1]);if(G.length>80)G=G.substring(0,79)+`…
|
|
84
|
+
`;J=G+J}if(/[^ ]/.test(J)){let G=1,g=_.linePos[1];if(g?.line===u&&g.col>U)G=Math.max(1,Math.min(g.col-U,80-z));let q=" ".repeat(z)+"^".repeat(G);_.message+=`:
|
|
85
85
|
|
|
86
|
-
${
|
|
86
|
+
${J}
|
|
87
87
|
${q}
|
|
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 _ of I.start)if(_.type==="newline")return!0;if(I.sep){for(let _ of I.sep)if(_.type==="newline")return!0}if(pz(I.key)||pz(I.value))return!0}return!1;default:return!0}}
|
|
90
|
-
`+v.comment;else
|
|
91
|
-
`+
|
|
92
|
-
`+Z.comment;else q.comment=Z.comment;X=Z.end;continue}if(!
|
|
93
|
-
`+B;else
|
|
94
|
-
`+
|
|
95
|
-
`+O.comment;else q.comment=O.comment;q.range=[u.offset,v,O.offset]}else q.range=[u.offset,v,v];return q}
|
|
96
|
-
`.repeat(Math.max(1,
|
|
97
|
-
`;for(let v=N;v<
|
|
98
|
-
`;else if(O.length>
|
|
88
|
+
`}};iZ.YAMLError=$_;iZ.YAMLParseError=dN;iZ.YAMLWarning=cN;iZ.prettifyError=yZ});var $I=w((dZ)=>{function hZ($,{flow:I,indicator:_,next:u,offset:U,onError:z,parentIndent:J,startOnNewline:G}){let g=!1,q=G,N=G,X="",Q="",H=!1,Y=!1,v=null,O=null,T=null,V=null,W=null,K=null,D=null;for(let L of $){if(Y){if(L.type!=="space"&&L.type!=="newline"&&L.type!=="comma")z(L.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");Y=!1}if(v){if(q&&L.type!=="comment"&&L.type!=="newline")z(v,"TAB_AS_INDENT","Tabs are not allowed as indentation");v=null}switch(L.type){case"space":if(!I&&(_!=="doc-start"||u?.type!=="flow-collection")&&L.source.includes("\t"))v=L;N=!0;break;case"comment":{if(!N)z(L,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let A=L.source.substring(1)||" ";if(!X)X=A;else X+=Q+A;Q="",q=!1;break}case"newline":if(q){if(X)X+=L.source;else if(!K||_!=="seq-item-ind")g=!0}else Q+=L.source;if(q=!0,H=!0,O||T)V=L;N=!0;break;case"anchor":if(O)z(L,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(L.source.endsWith(":"))z(L.offset+L.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);O=L,D??(D=L.offset),q=!1,N=!1,Y=!0;break;case"tag":{if(T)z(L,"MULTIPLE_TAGS","A node can have at most one tag");T=L,D??(D=L.offset),q=!1,N=!1,Y=!0;break}case _:if(O||T)z(L,"BAD_PROP_ORDER",`Anchors and tags must be after the ${L.source} indicator`);if(K)z(L,"UNEXPECTED_TOKEN",`Unexpected ${L.source} in ${I??"collection"}`);K=L,q=_==="seq-item-ind"||_==="explicit-key-ind",N=!1;break;case"comma":if(I){if(W)z(L,"UNEXPECTED_TOKEN",`Unexpected , in ${I}`);W=L,q=!1,N=!1;break}default:z(L,"UNEXPECTED_TOKEN",`Unexpected ${L.type} token`),q=!1,N=!1}}let Z=$[$.length-1],B=Z?Z.offset+Z.source.length:U;if(Y&&u&&u.type!=="space"&&u.type!=="newline"&&u.type!=="comma"&&(u.type!=="scalar"||u.source!==""))z(u.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(v&&(q&&v.indent<=J||u?.type==="block-map"||u?.type==="block-seq"))z(v,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:W,found:K,spaceBefore:g,comment:X,hasNewline:H,anchor:O,tag:T,newlineAfterProp:V,end:B,start:D??B}}dZ.resolveProps=hZ});var I_=w((pZ)=>{function pz($){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 _ of I.start)if(_.type==="newline")return!0;if(I.sep){for(let _ of I.sep)if(_.type==="newline")return!0}if(pz(I.key)||pz(I.value))return!0}return!1;default:return!0}}pZ.containsNewline=pz});var oz=w((eZ)=>{var tZ=I_();function aZ($,I,_){if(I?.type==="flow-collection"){let u=I.end[0];if(u.indent===$&&(u.source==="]"||u.source==="}")&&tZ.containsNewline(I))_(u,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}eZ.flowIndentCheck=aZ});var tz=w((IW)=>{var pN=I$();function $W($,I,_){let{uniqueKeys:u}=$.options;if(u===!1)return!1;let U=typeof u==="function"?u:(z,J)=>z===J||pN.isScalar(z)&&pN.isScalar(J)&&z.value===J.value;return I.some((z)=>U(z.key,_))}IW.mapIncludes=$W});var sN=w((GW)=>{var oN=H6(),_W=O6(),tN=$I(),uW=I_(),aN=oz(),zW=tz(),eN="All mapping items must start at the same column";function JW({composeNode:$,composeEmptyNode:I},_,u,U,z){let G=new(z?.nodeClass??_W.YAMLMap)(_.schema);if(_.atRoot)_.atRoot=!1;let g=u.offset,q=null;for(let N of u.items){let{start:X,key:Q,sep:H,value:Y}=N,v=tN.resolveProps(X,{indicator:"explicit-key-ind",next:Q??H?.[0],offset:g,onError:U,parentIndent:u.indent,startOnNewline:!0}),O=!v.found;if(O){if(Q){if(Q.type==="block-seq")U(g,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in Q&&Q.indent!==u.indent)U(g,"BAD_INDENT",eN)}if(!v.anchor&&!v.tag&&!H){if(q=v.end,v.comment)if(G.comment)G.comment+=`
|
|
90
|
+
`+v.comment;else G.comment=v.comment;continue}if(v.newlineAfterProp||uW.containsNewline(Q))U(Q??X[X.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(v.found?.indent!==u.indent)U(g,"BAD_INDENT",eN);_.atKey=!0;let T=v.end,V=Q?$(_,Q,v,U):I(_,T,X,null,v,U);if(_.schema.compat)aN.flowIndentCheck(u.indent,Q,U);if(_.atKey=!1,zW.mapIncludes(_,G.items,V))U(T,"DUPLICATE_KEY","Map keys must be unique");let W=tN.resolveProps(H??[],{indicator:"map-value-ind",next:Y,offset:V.range[2],onError:U,parentIndent:u.indent,startOnNewline:!Q||Q.type==="block-scalar"});if(g=W.end,W.found){if(O){if(Y?.type==="block-map"&&!W.hasNewline)U(g,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(_.options.strict&&v.start<W.found.offset-1024)U(V.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let K=Y?$(_,Y,W,U):I(_,g,H,null,W,U);if(_.schema.compat)aN.flowIndentCheck(u.indent,Y,U);g=K.range[2];let D=new oN.Pair(V,K);if(_.options.keepSourceTokens)D.srcToken=N;G.items.push(D)}else{if(O)U(V.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(W.comment)if(V.comment)V.comment+=`
|
|
91
|
+
`+W.comment;else V.comment=W.comment;let K=new oN.Pair(V);if(_.options.keepSourceTokens)K.srcToken=N;G.items.push(K)}}if(q&&q<g)U(q,"IMPOSSIBLE","Map comment with trailing content");return G.range=[u.offset,g,q??g],G}GW.resolveBlockMap=JW});var $Q=w((vW)=>{var qW=T6(),XW=$I(),NW=oz();function QW({composeNode:$,composeEmptyNode:I},_,u,U,z){let G=new(z?.nodeClass??qW.YAMLSeq)(_.schema);if(_.atRoot)_.atRoot=!1;if(_.atKey)_.atKey=!1;let g=u.offset,q=null;for(let{start:N,value:X}of u.items){let Q=XW.resolveProps(N,{indicator:"seq-item-ind",next:X,offset:g,onError:U,parentIndent:u.indent,startOnNewline:!0});if(!Q.found)if(Q.anchor||Q.tag||X)if(X?.type==="block-seq")U(Q.end,"BAD_INDENT","All sequence items must start at the same column");else U(g,"MISSING_CHAR","Sequence item without - indicator");else{if(q=Q.end,Q.comment)G.comment=Q.comment;continue}let H=X?$(_,X,Q,U):I(_,Q.end,N,null,Q,U);if(_.schema.compat)NW.flowIndentCheck(u.indent,X,U);g=H.range[2],G.items.push(H)}return G.range=[u.offset,g,q??g],G}vW.resolveBlockSeq=QW});var C1=w((OW)=>{function YW($,I,_,u){let U="";if($){let z=!1,J="";for(let G of $){let{source:g,type:q}=G;switch(q){case"space":z=!0;break;case"comment":{if(_&&!z)u(G,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let N=g.substring(1)||" ";if(!U)U=N;else U+=J+N;J="";break}case"newline":if(U)J+=g;z=!0;break;default:u(G,"UNEXPECTED_TOKEN",`Unexpected ${q} at node end`)}I+=g.length}}return{comment:U,offset:I}}OW.resolveEnd=YW});var _Q=w((WW)=>{var BW=I$(),MW=H6(),IQ=O6(),KW=T6(),DW=C1(),UQ=$I(),LW=I_(),VW=tz(),az="Block collections are not allowed within flow collections",ez=($)=>$&&($.type==="block-map"||$.type==="block-seq");function ZW({composeNode:$,composeEmptyNode:I},_,u,U,z){let J=u.start.source==="{",G=J?"flow map":"flow sequence",q=new(z?.nodeClass??(J?IQ.YAMLMap:KW.YAMLSeq))(_.schema);q.flow=!0;let N=_.atRoot;if(N)_.atRoot=!1;if(_.atKey)_.atKey=!1;let X=u.offset+u.start.source.length;for(let O=0;O<u.items.length;++O){let T=u.items[O],{start:V,key:W,sep:K,value:D}=T,Z=UQ.resolveProps(V,{flow:G,indicator:"explicit-key-ind",next:W??K?.[0],offset:X,onError:U,parentIndent:u.indent,startOnNewline:!1});if(!Z.found){if(!Z.anchor&&!Z.tag&&!K&&!D){if(O===0&&Z.comma)U(Z.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${G}`);else if(O<u.items.length-1)U(Z.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${G}`);if(Z.comment)if(q.comment)q.comment+=`
|
|
92
|
+
`+Z.comment;else q.comment=Z.comment;X=Z.end;continue}if(!J&&_.options.strict&&LW.containsNewline(W))U(W,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(O===0){if(Z.comma)U(Z.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${G}`)}else{if(!Z.comma)U(Z.start,"MISSING_CHAR",`Missing , between ${G} items`);if(Z.comment){let B="";$:for(let L of V)switch(L.type){case"comma":case"space":break;case"comment":B=L.source.substring(1);break $;default:break $}if(B){let L=q.items[q.items.length-1];if(BW.isPair(L))L=L.value??L.key;if(L.comment)L.comment+=`
|
|
93
|
+
`+B;else L.comment=B;Z.comment=Z.comment.substring(B.length+1)}}}if(!J&&!K&&!Z.found){let B=D?$(_,D,Z,U):I(_,Z.end,K,null,Z,U);if(q.items.push(B),X=B.range[2],ez(D))U(B.range,"BLOCK_IN_FLOW",az)}else{_.atKey=!0;let B=Z.end,L=W?$(_,W,Z,U):I(_,B,V,null,Z,U);if(ez(W))U(L.range,"BLOCK_IN_FLOW",az);_.atKey=!1;let A=UQ.resolveProps(K??[],{flow:G,indicator:"map-value-ind",next:D,offset:L.range[2],onError:U,parentIndent:u.indent,startOnNewline:!1});if(A.found){if(!J&&!Z.found&&_.options.strict){if(K)for(let j of K){if(j===A.found)break;if(j.type==="newline"){U(j,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(Z.start<A.found.offset-1024)U(A.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(D)if("source"in D&&D.source?.[0]===":")U(D,"MISSING_CHAR",`Missing space after : in ${G}`);else U(A.start,"MISSING_CHAR",`Missing , or : between ${G} items`);let C=D?$(_,D,A,U):A.found?I(_,A.end,K,null,A,U):null;if(C){if(ez(D))U(C.range,"BLOCK_IN_FLOW",az)}else if(A.comment)if(L.comment)L.comment+=`
|
|
94
|
+
`+A.comment;else L.comment=A.comment;let x=new MW.Pair(L,C);if(_.options.keepSourceTokens)x.srcToken=T;if(J){let j=q;if(VW.mapIncludes(_,j.items,L))U(B,"DUPLICATE_KEY","Map keys must be unique");j.items.push(x)}else{let j=new IQ.YAMLMap(_.schema);j.flow=!0,j.items.push(x);let U$=(C??L).range;j.range=[L.range[0],U$[1],U$[2]],q.items.push(j)}X=C?C.range[2]:A.end}}let Q=J?"}":"]",[H,...Y]=u.end,v=X;if(H?.source===Q)v=H.offset+H.source.length;else{let O=G[0].toUpperCase()+G.substring(1),T=N?`${O} must end with a ${Q}`:`${O} in block collection must be sufficiently indented and end with a ${Q}`;if(U(X,N?"MISSING_CHAR":"BAD_INDENT",T),H&&H.source.length!==1)Y.unshift(H)}if(Y.length>0){let O=DW.resolveEnd(Y,v,_.options.strict,U);if(O.comment)if(q.comment)q.comment+=`
|
|
95
|
+
`+O.comment;else q.comment=O.comment;q.range=[u.offset,v,O.offset]}else q.range=[u.offset,v,v];return q}WW.resolveFlowCollection=ZW});var uQ=w((CW)=>{var PW=I$(),bW=R$(),AW=O6(),jW=T6(),FW=sN(),SW=$Q(),wW=_Q();function sz($,I,_,u,U,z){let J=_.type==="block-map"?FW.resolveBlockMap($,I,_,u,z):_.type==="block-seq"?SW.resolveBlockSeq($,I,_,u,z):wW.resolveFlowCollection($,I,_,u,z),G=J.constructor;if(U==="!"||U===G.tagName)return J.tag=G.tagName,J;if(U)J.tag=U;return J}function EW($,I,_,u,U){let z=u.tag,J=!z?null:I.directives.tagName(z.source,(Q)=>U(z,"TAG_RESOLVE_FAILED",Q));if(_.type==="block-seq"){let{anchor:Q,newlineAfterProp:H}=u,Y=Q&&z?Q.offset>z.offset?Q:z:Q??z;if(Y&&(!H||H.offset<Y.offset))U(Y,"MISSING_CHAR","Missing newline after block sequence props")}let G=_.type==="block-map"?"map":_.type==="block-seq"?"seq":_.start.source==="{"?"map":"seq";if(!z||!J||J==="!"||J===AW.YAMLMap.tagName&&G==="map"||J===jW.YAMLSeq.tagName&&G==="seq")return sz($,I,_,U,J);let g=I.schema.tags.find((Q)=>Q.tag===J&&Q.collection===G);if(!g){let Q=I.schema.knownTags[J];if(Q?.collection===G)I.schema.tags.push(Object.assign({},Q,{default:!1})),g=Q;else{if(Q)U(z,"BAD_COLLECTION_TYPE",`${Q.tag} used for ${G} collection, but expects ${Q.collection??"scalar"}`,!0);else U(z,"TAG_RESOLVE_FAILED",`Unresolved tag: ${J}`,!0);return sz($,I,_,U,J)}}let q=sz($,I,_,U,J,g),N=g.resolve?.(q,(Q)=>U(z,"TAG_RESOLVE_FAILED",Q),I.options)??q,X=PW.isNode(N)?N:new bW.Scalar(N);if(X.range=q.range,X.tag=J,g?.format)X.format=g.format;return X}CW.composeCollection=EW});var IJ=w((iW)=>{var $J=R$();function xW($,I,_){let u=I.offset,U=kW(I,$.options.strict,_);if(!U)return{value:"",type:null,comment:"",range:[u,u,u]};let z=U.mode===">"?$J.Scalar.BLOCK_FOLDED:$J.Scalar.BLOCK_LITERAL,J=I.source?yW(I.source):[],G=J.length;for(let v=J.length-1;v>=0;--v){let O=J[v][1];if(O===""||O==="\r")G=v;else break}if(G===0){let v=U.chomp==="+"&&J.length>0?`
|
|
96
|
+
`.repeat(Math.max(1,J.length-1)):"",O=u+U.length;if(I.source)O+=I.source.length;return{value:v,type:z,comment:U.comment,range:[u,O,O]}}let g=I.indent+U.indent,q=I.offset+U.length,N=0;for(let v=0;v<G;++v){let[O,T]=J[v];if(T===""||T==="\r"){if(U.indent===0&&O.length>g)g=O.length}else{if(O.length<g)_(q+O.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator");if(U.indent===0)g=O.length;if(N=v,g===0&&!$.atRoot)_(q,"BAD_INDENT","Block scalar values in collections must be indented");break}q+=O.length+T.length+1}for(let v=J.length-1;v>=G;--v)if(J[v][0].length>g)G=v+1;let X="",Q="",H=!1;for(let v=0;v<N;++v)X+=J[v][0].slice(g)+`
|
|
97
|
+
`;for(let v=N;v<G;++v){let[O,T]=J[v];q+=O.length+T.length+1;let V=T[T.length-1]==="\r";if(V)T=T.slice(0,-1);if(T&&O.length<g){let K=`Block scalar lines must not be less indented than their ${U.indent?"explicit indentation indicator":"first line"}`;_(q-T.length-(V?2:1),"BAD_INDENT",K),O=""}if(z===$J.Scalar.BLOCK_LITERAL)X+=Q+O.slice(g)+T,Q=`
|
|
98
|
+
`;else if(O.length>g||T[0]==="\t"){if(Q===" ")Q=`
|
|
99
99
|
`;else if(!H&&Q===`
|
|
100
100
|
`)Q=`
|
|
101
101
|
|
|
102
|
-
`;X+=Q+O.slice(
|
|
102
|
+
`;X+=Q+O.slice(g)+T,Q=`
|
|
103
103
|
`,H=!0}else if(T==="")if(Q===`
|
|
104
104
|
`)X+=`
|
|
105
105
|
`;else Q=`
|
|
106
|
-
`;else X+=Q+T,Q=" ",H=!1}switch(U.chomp){case"-":break;case"+":for(let v=
|
|
107
|
-
`+
|
|
106
|
+
`;else X+=Q+T,Q=" ",H=!1}switch(U.chomp){case"-":break;case"+":for(let v=G;v<J.length;++v)X+=`
|
|
107
|
+
`+J[v][0].slice(g);if(X[X.length-1]!==`
|
|
108
108
|
`)X+=`
|
|
109
109
|
`;break;default:X+=`
|
|
110
|
-
`}let Y=u+U.length+I.source.length;return{value:X,type:z,comment:U.comment,range:[u,Y,Y]}}function
|
|
110
|
+
`}let Y=u+U.length+I.source.length;return{value:X,type:z,comment:U.comment,range:[u,Y,Y]}}function kW({offset:$,props:I},_,u){if(I[0].type!=="block-scalar-header")return u(I[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:U}=I[0],z=U[0],J=0,G="",g=-1;for(let Q=1;Q<U.length;++Q){let H=U[Q];if(!G&&(H==="-"||H==="+"))G=H;else{let Y=Number(H);if(!J&&Y)J=Y;else if(g===-1)g=$+Q}}if(g!==-1)u(g,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${U}`);let q=!1,N="",X=U.length;for(let Q=1;Q<I.length;++Q){let H=I[Q];switch(H.type){case"space":q=!0;case"newline":X+=H.source.length;break;case"comment":if(_&&!q)u(H,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");X+=H.source.length,N=H.source.substring(1);break;case"error":u(H,"UNEXPECTED_TOKEN",H.message),X+=H.source.length;break;default:{let Y=`Unexpected token in block scalar header: ${H.type}`;u(H,"UNEXPECTED_TOKEN",Y);let v=H.source;if(v&&typeof v==="string")X+=v.length}}}return{mode:z,indent:J,chomp:G,comment:N,length:X}}function yW($){let I=$.split(/\n( *)/),_=I[0],u=_.match(/^( *)/),z=[u?.[1]?[u[1],_.slice(u[1].length)]:["",_]];for(let J=1;J<I.length;J+=2)z.push([I[J],I[J+1]]);return z}iW.resolveBlockScalar=xW});var _J=w((tW)=>{var UJ=R$(),mW=C1();function rW($,I,_){let{offset:u,type:U,source:z,end:J}=$,G,g,q=(Q,H,Y)=>_(u+Q,H,Y);switch(U){case"scalar":G=UJ.Scalar.PLAIN,g=nW(z,q);break;case"single-quoted-scalar":G=UJ.Scalar.QUOTE_SINGLE,g=hW(z,q);break;case"double-quoted-scalar":G=UJ.Scalar.QUOTE_DOUBLE,g=dW(z,q);break;default:return _($,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${U}`),{value:"",type:null,comment:"",range:[u,u+z.length,u+z.length]}}let N=u+z.length,X=mW.resolveEnd(J,N,I,_);return{value:g,type:G,comment:X.comment,range:[u,N,X.offset]}}function nW($,I){let _="";switch($[0]){case"\t":_="a tab character";break;case",":_="flow indicator character ,";break;case"%":_="directive indicator character %";break;case"|":case">":{_=`block scalar indicator ${$[0]}`;break}case"@":case"`":{_=`reserved character ${$[0]}`;break}}if(_)I(0,"BAD_SCALAR_START",`Plain value cannot start with ${_}`);return zQ($)}function hW($,I){if($[$.length-1]!=="'"||$.length===1)I($.length,"MISSING_CHAR","Missing closing 'quote");return zQ($.slice(1,-1)).replace(/''/g,"'")}function zQ($){let I,_;try{I=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
111
111
|
`,"sy"),_=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
112
|
-
`,"sy")}catch{I=/(.*?)[ \t]*\r?\n/sy,_=/[ \t]*(.*?)[ \t]*\r?\n/sy}let u=I.exec($);if(!u)return $;let U=u[1],z=" ",
|
|
112
|
+
`,"sy")}catch{I=/(.*?)[ \t]*\r?\n/sy,_=/[ \t]*(.*?)[ \t]*\r?\n/sy}let u=I.exec($);if(!u)return $;let U=u[1],z=" ",J=I.lastIndex;_.lastIndex=J;while(u=_.exec($)){if(u[1]==="")if(z===`
|
|
113
113
|
`)U+=z;else z=`
|
|
114
|
-
`;else U+=z+u[1],z=" ";
|
|
114
|
+
`;else U+=z+u[1],z=" ";J=_.lastIndex}let G=/[ \t]*(.*)/sy;return G.lastIndex=J,u=G.exec($),U+z+(u?.[1]??"")}function dW($,I){let _="";for(let u=1;u<$.length-1;++u){let U=$[u];if(U==="\r"&&$[u+1]===`
|
|
115
115
|
`)continue;if(U===`
|
|
116
|
-
`){let{fold:z,offset:
|
|
116
|
+
`){let{fold:z,offset:J}=cW($,u);_+=z,u=J}else if(U==="\\"){let z=$[++u],J=pW[z];if(J)_+=J;else if(z===`
|
|
117
117
|
`){z=$[u+1];while(z===" "||z==="\t")z=$[++u+1]}else if(z==="\r"&&$[u+1]===`
|
|
118
|
-
`){z=$[++u+1];while(z===" "||z==="\t")z=$[++u+1]}else if(z==="x"||z==="u"||z==="U"){let
|
|
119
|
-
`&&!(
|
|
120
|
-
`))_+=u>z?$.slice(z,u+1):U}else _+=U}if($[$.length-1]!=='"'||$.length===1)I($.length,"MISSING_CHAR",'Missing closing "quote');return _}function
|
|
118
|
+
`){z=$[++u+1];while(z===" "||z==="\t")z=$[++u+1]}else if(z==="x"||z==="u"||z==="U"){let G={x:2,u:4,U:8}[z];_+=oW($,u+1,G,I),u+=G}else{let G=$.substr(u-1,2);I(u-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${G}`),_+=G}}else if(U===" "||U==="\t"){let z=u,J=$[u+1];while(J===" "||J==="\t")J=$[++u+1];if(J!==`
|
|
119
|
+
`&&!(J==="\r"&&$[u+2]===`
|
|
120
|
+
`))_+=u>z?$.slice(z,u+1):U}else _+=U}if($[$.length-1]!=='"'||$.length===1)I($.length,"MISSING_CHAR",'Missing closing "quote');return _}function cW($,I){let _="",u=$[I+1];while(u===" "||u==="\t"||u===`
|
|
121
121
|
`||u==="\r"){if(u==="\r"&&$[I+2]!==`
|
|
122
122
|
`)break;if(u===`
|
|
123
123
|
`)_+=`
|
|
124
|
-
`;I+=1,u=$[I+1]}if(!_)_=" ";return{fold:_,offset:I}}var
|
|
125
|
-
`,r:"\r",t:"\t",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function
|
|
124
|
+
`;I+=1,u=$[I+1]}if(!_)_=" ";return{fold:_,offset:I}}var pW={"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 oW($,I,_,u){let U=$.substr(I,_),J=U.length===_&&/^[0-9a-fA-F]+$/.test(U)?parseInt(U,16):NaN;if(isNaN(J)){let G=$.substr(I-2,_+2);return u(I-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${G}`),G}return String.fromCodePoint(J)}tW.resolveFlowScalar=rW});var GQ=w((_R)=>{var o6=I$(),JQ=R$(),eW=IJ(),sW=_J();function $R($,I,_,u){let{value:U,type:z,comment:J,range:G}=I.type==="block-scalar"?eW.resolveBlockScalar($,I,u):sW.resolveFlowScalar(I,$.options.strict,u),g=_?$.directives.tagName(_.source,(X)=>u(_,"TAG_RESOLVE_FAILED",X)):null,q;if($.options.stringKeys&&$.atKey)q=$.schema[o6.SCALAR];else if(g)q=IR($.schema,U,g,_,u);else if(I.type==="scalar")q=UR($,U,I,u);else q=$.schema[o6.SCALAR];let N;try{let X=q.resolve(U,(Q)=>u(_??I,"TAG_RESOLVE_FAILED",Q),$.options);N=o6.isScalar(X)?X:new JQ.Scalar(X)}catch(X){let Q=X instanceof Error?X.message:String(X);u(_??I,"TAG_RESOLVE_FAILED",Q),N=new JQ.Scalar(U)}if(N.range=G,N.source=U,z)N.type=z;if(g)N.tag=g;if(q.format)N.format=q.format;if(J)N.comment=J;return N}function IR($,I,_,u,U){if(_==="!")return $[o6.SCALAR];let z=[];for(let G of $.tags)if(!G.collection&&G.tag===_)if(G.default&&G.test)z.push(G);else return G;for(let G of z)if(G.test?.test(I))return G;let J=$.knownTags[_];if(J&&!J.collection)return $.tags.push(Object.assign({},J,{default:!1,test:void 0})),J;return U(u,"TAG_RESOLVE_FAILED",`Unresolved tag: ${_}`,_!=="tag:yaml.org,2002:str"),$[o6.SCALAR]}function UR({atKey:$,directives:I,schema:_},u,U,z){let J=_.tags.find((G)=>(G.default===!0||$&&G.default==="key")&&G.test?.test(u))||_[o6.SCALAR];if(_.compat){let G=_.compat.find((g)=>g.default&&g.test?.test(u))??_[o6.SCALAR];if(J.tag!==G.tag){let g=I.tagString(J.tag),q=I.tagString(G.tag),N=`Value may be parsed as either ${g} or ${q}`;z(U,"TAG_RESOLVE_FAILED",N,!0)}}return J}_R.composeScalar=$R});var gQ=w((JR)=>{function zR($,I,_){if(I){_??(_=I.length);for(let u=_-1;u>=0;--u){let U=I[u];switch(U.type){case"space":case"comment":case"newline":$-=U.source.length;continue}U=I[++u];while(U?.type==="space")$+=U.source.length,U=I[++u];break}}return $}JR.emptyScalarPosition=zR});var NQ=w((YR)=>{var gR=x0(),qR=I$(),XR=uQ(),qQ=GQ(),NR=C1(),QR=gQ(),vR={composeNode:XQ,composeEmptyNode:uJ};function XQ($,I,_,u){let U=$.atKey,{spaceBefore:z,comment:J,anchor:G,tag:g}=_,q,N=!0;switch(I.type){case"alias":if(q=HR($,I,u),G||g)u(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(q=qQ.composeScalar($,I,g,u),G)q.anchor=G.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":if(q=XR.composeCollection(vR,$,I,_,u),G)q.anchor=G.source.substring(1);break;default:{let X=I.type==="error"?I.message:`Unsupported token (type: ${I.type})`;u(I,"UNEXPECTED_TOKEN",X),q=uJ($,I.offset,void 0,null,_,u),N=!1}}if(G&&q.anchor==="")u(G,"BAD_ALIAS","Anchor cannot be an empty string");if(U&&$.options.stringKeys&&(!qR.isScalar(q)||typeof q.value!=="string"||q.tag&&q.tag!=="tag:yaml.org,2002:str"))u(g??I,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(z)q.spaceBefore=!0;if(J)if(I.type==="scalar"&&I.source==="")q.comment=J;else q.commentBefore=J;if($.options.keepSourceTokens&&N)q.srcToken=I;return q}function uJ($,I,_,u,{spaceBefore:U,comment:z,anchor:J,tag:G,end:g},q){let N={type:"scalar",offset:QR.emptyScalarPosition(I,_,u),indent:-1,source:""},X=qQ.composeScalar($,N,G,q);if(J){if(X.anchor=J.source.substring(1),X.anchor==="")q(J,"BAD_ALIAS","Anchor cannot be an empty string")}if(U)X.spaceBefore=!0;if(z)X.comment=z,X.range[2]=g;return X}function HR({options:$},{offset:I,source:_,end:u},U){let z=new gR.Alias(_.substring(1));if(z.source==="")U(I,"BAD_ALIAS","Alias cannot be an empty string");if(z.source.endsWith(":"))U(I+_.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let J=I+_.length,G=NR.resolveEnd(u,J,$.strict,U);if(z.range=[I,J,G.offset],G.comment)z.comment=G.comment;return z}YR.composeEmptyNode=uJ;YR.composeNode=XQ});var vQ=w((LR)=>{var BR=e0(),QQ=NQ(),MR=C1(),KR=$I();function DR($,I,{offset:_,start:u,value:U,end:z},J){let G=Object.assign({_directives:I},$),g=new BR.Document(void 0,G),q={atKey:!1,atRoot:!0,directives:g.directives,options:g.options,schema:g.schema},N=KR.resolveProps(u,{indicator:"doc-start",next:U??z?.[0],offset:_,onError:J,parentIndent:0,startOnNewline:!0});if(N.found){if(g.directives.docStart=!0,U&&(U.type==="block-map"||U.type==="block-seq")&&!N.hasNewline)J(N.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}g.contents=U?QQ.composeNode(q,U,N,J):QQ.composeEmptyNode(q,N.end,u,null,N,J);let X=g.contents.range[2],Q=MR.resolveEnd(z,X,!1,J);if(Q.comment)g.comment=Q.comment;return g.range=[_,X,Q.offset],g}LR.composeDoc=DR});var zJ=w((AR)=>{var ZR=J$("process"),WR=qz(),RR=e0(),II=s0(),HQ=I$(),PR=vQ(),bR=C1();function UI($){if(typeof $==="number")return[$,$+1];if(Array.isArray($))return $.length===2?$:[$[0],$[1]];let{offset:I,source:_}=$;return[I,I+(typeof _==="string"?_.length:1)]}function YQ($){let I="",_=!1,u=!1;for(let U=0;U<$.length;++U){let z=$[U];switch(z[0]){case"#":I+=(I===""?"":u?`
|
|
126
126
|
|
|
127
127
|
`:`
|
|
128
|
-
`)+(z.substring(1)||" "),_=!0,u=!1;break;case"%":if($[U+1]?.[0]!=="#")U+=1;_=!1;break;default:if(!_)u=!0;_=!1}}return{comment:I,afterEmptyLine:u}}class
|
|
129
|
-
${_}`:_;else if(u||$.directives.docStart||!U)$.commentBefore=_;else if(
|
|
130
|
-
${
|
|
131
|
-
${z}`:_}}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 II.YAMLParseError(UI($),"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 _=Object.assign({_directives:this.directives},this.options),u=new
|
|
133
|
-
`}];switch(
|
|
134
|
-
`),N=
|
|
135
|
-
`,Q=[{type:"block-scalar-header",offset:z,indent:u,source:N}];if(!
|
|
136
|
-
`});return{type:"block-scalar",offset:z,indent:u,props:Q,source:X}}case'"':return{type:"double-quoted-scalar",offset:z,indent:u,source:
|
|
128
|
+
`)+(z.substring(1)||" "),_=!0,u=!1;break;case"%":if($[U+1]?.[0]!=="#")U+=1;_=!1;break;default:if(!_)u=!0;_=!1}}return{comment:I,afterEmptyLine:u}}class OQ{constructor($={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(I,_,u,U)=>{let z=UI(I);if(U)this.warnings.push(new II.YAMLWarning(z,_,u));else this.errors.push(new II.YAMLParseError(z,_,u))},this.directives=new WR.Directives({version:$.version||"1.2"}),this.options=$}decorate($,I){let{comment:_,afterEmptyLine:u}=YQ(this.prelude);if(_){let U=$.contents;if(I)$.comment=$.comment?`${$.comment}
|
|
129
|
+
${_}`:_;else if(u||$.directives.docStart||!U)$.commentBefore=_;else if(HQ.isCollection(U)&&!U.flow&&U.items.length>0){let z=U.items[0];if(HQ.isPair(z))z=z.key;let J=z.commentBefore;z.commentBefore=J?`${_}
|
|
130
|
+
${J}`:_}else{let z=U.commentBefore;U.commentBefore=z?`${_}
|
|
131
|
+
${z}`:_}}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:YQ(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose($,I=!1,_=-1){for(let u of $)yield*this.next(u);yield*this.end(I,_)}*next($){if(ZR.env.LOG_STREAM)console.dir($,{depth:null});switch($.type){case"directive":this.directives.add($.source,(I,_,u)=>{let U=UI($);U[0]+=I,this.onError(U,"BAD_DIRECTIVE",_,u)}),this.prelude.push($.source),this.atDirectives=!0;break;case"document":{let I=PR.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,_=new II.YAMLParseError(UI($),"UNEXPECTED_TOKEN",I);if(this.atDirectives||!this.doc)this.errors.push(_);else this.doc.errors.push(_);break}case"doc-end":{if(!this.doc){this.errors.push(new II.YAMLParseError(UI($),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let I=bR.resolveEnd($.end,$.offset+$.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),I.comment){let _=this.doc.comment;this.doc.comment=_?`${_}
|
|
132
|
+
${I.comment}`:I.comment}this.doc.range[2]=I.offset;break}default:this.errors.push(new II.YAMLParseError(UI($),"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 _=Object.assign({_directives:this.directives},this.options),u=new RR.Document(void 0,_);if(this.atDirectives)this.onError(I,"MISSING_CHAR","Missing directives-end indicator line");u.range=[0,I,I],this.decorate(u,!1),yield u}}}AR.Composer=OQ});var MQ=w((kR)=>{var FR=IJ(),SR=_J(),wR=s0(),TQ=l0();function ER($,I=!0,_){if($){let u=(U,z,J)=>{let G=typeof U==="number"?U:Array.isArray(U)?U[0]:U.offset;if(_)_(G,z,J);else throw new wR.YAMLParseError([G,G+1],z,J)};switch($.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return SR.resolveFlowScalar($,I,u);case"block-scalar":return FR.resolveBlockScalar({options:{strict:I}},$,u)}}return null}function CR($,I){let{implicitKey:_=!1,indent:u,inFlow:U=!1,offset:z=-1,type:J="PLAIN"}=I,G=TQ.stringifyString({type:J,value:$},{implicitKey:_,indent:u>0?" ".repeat(u):"",inFlow:U,options:{blockQuote:!0,lineWidth:-1}}),g=I.end??[{type:"newline",offset:-1,indent:u,source:`
|
|
133
|
+
`}];switch(G[0]){case"|":case">":{let q=G.indexOf(`
|
|
134
|
+
`),N=G.substring(0,q),X=G.substring(q+1)+`
|
|
135
|
+
`,Q=[{type:"block-scalar-header",offset:z,indent:u,source:N}];if(!BQ(Q,g))Q.push({type:"newline",offset:-1,indent:u,source:`
|
|
136
|
+
`});return{type:"block-scalar",offset:z,indent:u,props:Q,source:X}}case'"':return{type:"double-quoted-scalar",offset:z,indent:u,source:G,end:g};case"'":return{type:"single-quoted-scalar",offset:z,indent:u,source:G,end:g};default:return{type:"scalar",offset:z,indent:u,source:G,end:g}}}function fR($,I,_={}){let{afterKey:u=!1,implicitKey:U=!1,inFlow:z=!1,type:J}=_,G="indent"in $?$.indent:null;if(u&&typeof G==="number")G+=2;if(!J)switch($.type){case"single-quoted-scalar":J="QUOTE_SINGLE";break;case"double-quoted-scalar":J="QUOTE_DOUBLE";break;case"block-scalar":{let q=$.props[0];if(q.type!=="block-scalar-header")throw Error("Invalid block scalar header");J=q.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:J="PLAIN"}let g=TQ.stringifyString({type:J,value:I},{implicitKey:U||G===null,indent:G!==null&&G>0?" ".repeat(G):"",inFlow:z,options:{blockQuote:!0,lineWidth:-1}});switch(g[0]){case"|":case">":xR($,g);break;case'"':JJ($,g,"double-quoted-scalar");break;case"'":JJ($,g,"single-quoted-scalar");break;default:JJ($,g,"scalar")}}function xR($,I){let _=I.indexOf(`
|
|
137
137
|
`),u=I.substring(0,_),U=I.substring(_+1)+`
|
|
138
|
-
`;if($.type==="block-scalar"){let z=$.props[0];if(z.type!=="block-scalar-header")throw Error("Invalid block scalar header");z.source=u,$.source=U}else{let{offset:z}=$,
|
|
139
|
-
`});for(let
|
|
140
|
-
`};delete $.items,Object.assign($,{type:_,source:I,end:[U]});break}default:{let u="indent"in $?$.indent:-1,U="end"in $&&Array.isArray($.end)?$.end.filter((z)=>z.type==="space"||z.type==="comment"||z.type==="newline"):[];for(let z of Object.keys($))if(z!=="type"&&z!=="offset")delete $[z];Object.assign($,{type:_,indent:u,source:I,end:U})}}}
|
|
138
|
+
`;if($.type==="block-scalar"){let z=$.props[0];if(z.type!=="block-scalar-header")throw Error("Invalid block scalar header");z.source=u,$.source=U}else{let{offset:z}=$,J="indent"in $?$.indent:-1,G=[{type:"block-scalar-header",offset:z,indent:J,source:u}];if(!BQ(G,"end"in $?$.end:void 0))G.push({type:"newline",offset:-1,indent:J,source:`
|
|
139
|
+
`});for(let g of Object.keys($))if(g!=="type"&&g!=="offset")delete $[g];Object.assign($,{type:"block-scalar",indent:J,props:G,source:U})}}function BQ($,I){if(I)for(let _ of I)switch(_.type){case"space":case"comment":$.push(_);break;case"newline":return $.push(_),!0}return!1}function JJ($,I,_){switch($.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":$.type=_,$.source=I;break;case"block-scalar":{let u=$.props.slice(1),U=I.length;if($.props[0].type==="block-scalar-header")U-=$.props[0].source.length;for(let z of u)z.offset+=U;delete $.props,Object.assign($,{type:_,source:I,end:u});break}case"block-map":case"block-seq":{let U={type:"newline",offset:$.offset+I.length,indent:$.indent,source:`
|
|
140
|
+
`};delete $.items,Object.assign($,{type:_,source:I,end:[U]});break}default:{let u="indent"in $?$.indent:-1,U="end"in $&&Array.isArray($.end)?$.end.filter((z)=>z.type==="space"||z.type==="comment"||z.type==="newline"):[];for(let z of Object.keys($))if(z!=="type"&&z!=="offset")delete $[z];Object.assign($,{type:_,indent:u,source:I,end:U})}}}kR.createScalarToken=CR;kR.resolveAsScalar=ER;kR.setScalarValue=fR});var KQ=w((rR)=>{var mR=($)=>("type"in $)?__($):U_($);function __($){switch($.type){case"block-scalar":{let I="";for(let _ of $.props)I+=__(_);return I+$.source}case"block-map":case"block-seq":{let I="";for(let _ of $.items)I+=U_(_);return I}case"flow-collection":{let I=$.start.source;for(let _ of $.items)I+=U_(_);for(let _ of $.end)I+=_.source;return I}case"document":{let I=U_($);if($.end)for(let _ of $.end)I+=_.source;return I}default:{let I=$.source;if("end"in $&&$.end)for(let _ of $.end)I+=_.source;return I}}}function U_({start:$,key:I,sep:_,value:u}){let U="";for(let z of $)U+=z.source;if(I)U+=__(I);if(_)for(let z of _)U+=z.source;if(u)U+=__(u);return U}rR.stringify=mR});var VQ=w((dR)=>{var GJ=Symbol("break visit"),hR=Symbol("skip children"),DQ=Symbol("remove item");function t6($,I){if("type"in $&&$.type==="document")$={start:$.start,value:$.value};LQ(Object.freeze([]),$,I)}t6.BREAK=GJ;t6.SKIP=hR;t6.REMOVE=DQ;t6.itemAtPath=($,I)=>{let _=$;for(let[u,U]of I){let z=_?.[u];if(z&&"items"in z)_=z.items[U];else return}return _};t6.parentCollection=($,I)=>{let _=t6.itemAtPath($,I.slice(0,-1)),u=I[I.length-1][0],U=_?.[u];if(U&&"items"in U)return U;throw Error("Parent collection not found")};function LQ($,I,_){let u=_(I,$);if(typeof u==="symbol")return u;for(let U of["key","value"]){let z=I[U];if(z&&"items"in z){for(let J=0;J<z.items.length;++J){let G=LQ(Object.freeze($.concat([[U,J]])),z.items[J],_);if(typeof G==="number")J=G-1;else if(G===GJ)return GJ;else if(G===DQ)z.items.splice(J,1),J-=1}if(typeof u==="function"&&U==="key")u=u(I,$)}}return typeof u==="function"?u(I,$):u}dR.visit=t6});var u_=w(($P)=>{var gJ=MQ(),pR=KQ(),oR=VQ(),qJ="\uFEFF",XJ="\x02",NJ="\x18",QJ="\x1F",tR=($)=>!!$&&("items"in $),aR=($)=>!!$&&($.type==="scalar"||$.type==="single-quoted-scalar"||$.type==="double-quoted-scalar"||$.type==="block-scalar");function eR($){switch($){case qJ:return"<BOM>";case XJ:return"<DOC>";case NJ:return"<FLOW_END>";case QJ:return"<SCALAR>";default:return JSON.stringify($)}}function sR($){switch($){case qJ:return"byte-order-mark";case XJ:return"doc-mode";case NJ:return"flow-error-end";case QJ: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}$P.createScalarToken=gJ.createScalarToken;$P.resolveAsScalar=gJ.resolveAsScalar;$P.setScalarValue=gJ.setScalarValue;$P.stringify=pR.stringify;$P.visit=oR.visit;$P.BOM=qJ;$P.DOCUMENT=XJ;$P.FLOW_END=NJ;$P.SCALAR=QJ;$P.isCollection=tR;$P.isScalar=aR;$P.prettyToken=eR;$P.tokenType=sR});var HJ=w((OP)=>{var _I=u_();function D4($){switch($){case void 0:case" ":case`
|
|
143
|
+
`:case"\r":case"\t":return!0;default:return!1}}var ZQ=new Set("0123456789ABCDEFabcdef"),HP=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),z_=new Set(",[]{}"),YP=new Set(` ,[]{}
|
|
144
|
+
\r `),vJ=($)=>!$||YP.has($);class WQ{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 _=this.next??"stream";while(_&&(I||this.hasChars(1)))_=yield*this.parseNext(_)}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 _=0;while(I===" ")I=this.buffer[++_+$];if(I==="\r"){let u=this.buffer[_+$+1];if(u===`
|
|
147
147
|
`||!u&&!this.atEnd)return $+_+1}return I===`
|
|
148
|
-
`||_>=this.indentNext||!I&&!this.atEnd?$+_:-1}if(I==="-"||I==="."){let _=this.buffer.substr($,3);if((_==="---"||_==="...")&&
|
|
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]===_I.BOM)yield*this.pushCount(1),$=$.substring(1);if($[0]==="%"){let I=$.length,_=$.indexOf("#");while(_!==-1){let U=$[_-1];if(U===" "||U==="\t"){I=_-1;break}else _=$.indexOf("#",_+1)}while(!0){let U=$[I-1];if(U===" "||U==="\t")I-=1;else break}let u=(yield*this.pushCount(I))+(yield*this.pushSpaces(!0));return yield*this.pushCount($.length-u),this.pushNewline(),"stream"}if(this.atLineEnd()){let I=yield*this.pushSpaces(!0);return yield*this.pushCount($.length-I),yield*this.pushNewline(),"stream"}return yield _I.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==="...")&&
|
|
148
|
+
`||_>=this.indentNext||!I&&!this.atEnd?$+_:-1}if(I==="-"||I==="."){let _=this.buffer.substr($,3);if((_==="---"||_==="...")&&D4(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]===_I.BOM)yield*this.pushCount(1),$=$.substring(1);if($[0]==="%"){let I=$.length,_=$.indexOf("#");while(_!==-1){let U=$[_-1];if(U===" "||U==="\t"){I=_-1;break}else _=$.indexOf("#",_+1)}while(!0){let U=$[I-1];if(U===" "||U==="\t")I-=1;else break}let u=(yield*this.pushCount(I))+(yield*this.pushSpaces(!0));return yield*this.pushCount($.length-u),this.pushNewline(),"stream"}if(this.atLineEnd()){let I=yield*this.pushSpaces(!0);return yield*this.pushCount($.length-I),yield*this.pushNewline(),"stream"}return yield _I.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==="...")&&D4(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&&!D4(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(($==="-"||$==="?"||$===":")&&D4(I)){let _=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=_,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(vJ),"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,_=-1;do{if($=yield*this.pushNewline(),$>0)I=yield*this.pushSpaces(!1),this.indentValue=_=I;else I=0;I+=yield*this.pushSpaces(!0)}while($+I>0);let u=this.getLine();if(u===null)return this.setNext("flow");if(_!==-1&&_<this.indentNext&&u[0]!=="#"||_===0&&(u.startsWith("---")||u.startsWith("..."))&&D4(u[3])){if(!(_===this.indentNext-1&&this.flowLevel===1&&(u[0]==="]"||u[0]==="}")))return this.flowLevel=0,yield _I.FLOW_END,yield*this.parseLineStart()}let U=0;while(u[U]===",")U+=yield*this.pushCount(1),U+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(U+=yield*this.pushIndicators(),u[U]){case void 0:return"flow";case"#":return yield*this.pushCount(u.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(vJ),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let z=this.charAt(1);if(this.flowKey||D4(z)||z===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let $=this.charAt(0),I=this.buffer.indexOf($,this.pos+1);if($==="'")while(I!==-1&&this.buffer[I+1]==="'")I=this.buffer.indexOf("'",I+2);else while(I!==-1){let U=0;while(this.buffer[I-1-U]==="\\")U+=1;if(U%2===0)break;I=this.buffer.indexOf('"',I+1)}let _=this.buffer.substring(0,I),u=_.indexOf(`
|
|
150
150
|
`,this.pos);if(u!==-1){while(u!==-1){let U=this.continueScalar(u+1);if(U===-1)break;u=_.indexOf(`
|
|
151
|
-
`,U)}if(u!==-1)I=u-(_[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(u!==-1)I=u-(_[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)=>D4(I)||I==="#")}*parseBlockScalar(){let $=this.pos-1,I=0,_;$:for(let U=this.pos;_=this.buffer[U];++U)switch(_){case" ":I+=1;break;case`
|
|
152
152
|
`:$=U,I=0;break;case"\r":{let z=this.buffer[U+1];if(!z&&!this.atEnd)return this.setNext("block-scalar");if(z===`
|
|
153
153
|
`)break}default:break $}if(!_&&!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 u=$+1;_=this.buffer[u];while(_===" ")_=this.buffer[++u];if(_==="\t"){while(_==="\t"||_===" "||_==="\r"||_===`
|
|
155
|
-
`)_=this.buffer[++u];$=u-1}else if(!this.blockScalarKeep)do{let U=$-1,z=this.buffer[U];if(z==="\r")z=this.buffer[--U];let
|
|
156
|
-
`&&U>=this.pos&&U+1+I>
|
|
155
|
+
`)_=this.buffer[++u];$=u-1}else if(!this.blockScalarKeep)do{let U=$-1,z=this.buffer[U];if(z==="\r")z=this.buffer[--U];let J=U;while(z===" ")z=this.buffer[--U];if(z===`
|
|
156
|
+
`&&U>=this.pos&&U+1+I>J)$=U;else break}while(!0);return yield _I.SCALAR,yield*this.pushToIndex($+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let $=this.flowLevel>0,I=this.pos-1,_=this.pos-1,u;while(u=this.buffer[++_])if(u===":"){let U=this.buffer[_+1];if(D4(U)||$&&z_.has(U))break;I=_}else if(D4(u)){let U=this.buffer[_+1];if(u==="\r")if(U===`
|
|
157
157
|
`)_+=1,u=`
|
|
158
|
-
`,U=this.buffer[_+1];else I=_;if(U==="#"||$&&
|
|
159
|
-
`){let z=this.continueScalar(_+1);if(z===-1)break;_=Math.max(_,z-2)}}else{if($&&
|
|
158
|
+
`,U=this.buffer[_+1];else I=_;if(U==="#"||$&&z_.has(U))break;if(u===`
|
|
159
|
+
`){let z=this.continueScalar(_+1);if(z===-1)break;_=Math.max(_,z-2)}}else{if($&&z_.has(u))break;I=_}if(!u&&!this.atEnd)return this.setNext("plain-scalar");return yield _I.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 _=this.buffer.slice(this.pos,$);if(_)return yield _,this.pos+=_.length,_.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(vJ))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let $=this.flowLevel>0,I=this.charAt(1);if(D4(I)||$&&z_.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(!D4(I)&&I!==">")I=this.buffer[++$];return yield*this.pushToIndex(I===">"?$+1:$,!1)}else{let $=this.pos+1,I=this.buffer[$];while(I)if(HP.has(I))I=this.buffer[++$];else if(I==="%"&&ZQ.has(this.buffer[$+1])&&ZQ.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,_;do _=this.buffer[++I];while(_===" "||$&&_==="\t");let u=I-this.pos;if(u>0)yield this.buffer.substr(this.pos,u),this.pos=I;return u}*pushUntil($){let I=this.pos,_=this.buffer[I];while(!$(_))_=this.buffer[++I];return yield*this.pushToIndex(I,!1)}}
|
|
161
|
+
`)return yield*this.pushCount(2);else return 0}*pushSpaces($){let I=this.pos-1,_;do _=this.buffer[++I];while(_===" "||$&&_==="\t");let u=I-this.pos;if(u>0)yield this.buffer.substr(this.pos,u),this.pos=I;return u}*pushUntil($){let I=this.pos,_=this.buffer[I];while(!$(_))_=this.buffer[++I];return yield*this.pushToIndex(I,!1)}}OP.Lexer=WQ});var YJ=w((BP)=>{class RQ{constructor(){this.lineStarts=[],this.addNewLine=($)=>this.lineStarts.push($),this.linePos=($)=>{let I=0,_=this.lineStarts.length;while(I<_){let U=I+_>>1;if(this.lineStarts[U]<$)I=U+1;else _=U}if(this.lineStarts[I]===$)return{line:I+1,col:1};if(I===0)return{line:0,col:$};let u=this.lineStarts[I-1];return{line:I,col:$-u+1}}}}BP.LineCounter=RQ});var OJ=w((LP)=>{var KP=J$("process"),PQ=u_(),DP=HJ();function B6($,I){for(let _=0;_<$.length;++_)if($[_].type===I)return!0;return!1}function bQ($){for(let I=0;I<$.length;++I)switch($[I].type){case"space":case"comment":case"newline":break;default:return I}return-1}function jQ($){switch($?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function J_($){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 f1($){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 AQ($){if($.start.type==="flow-seq-start"){for(let I of $.items)if(I.sep&&!I.value&&!B6(I.start,"explicit-key-ind")&&!B6(I.sep,"map-value-ind")){if(I.key)I.value=I.key;if(delete I.key,jQ(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 FQ{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 DP.Lexer,this.onNewLine=$}*parse($,I=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let _ of this.lexer.lex($,I))yield*this.next(_);if(!I)yield*this.end()}*next($){if(this.source=$,KP.env.LOG_TOKENS)console.log("|",PQ.prettyToken($));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=$.length;return}let I=PQ.tokenType($);if(!I){let _=`Not a YAML token: ${$}`;yield*this.pop({type:"error",offset:this.offset,message:_,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 _=this.peek(1);if(I.type==="block-scalar")I.indent="indent"in _?_.indent:0;else if(I.type==="flow-collection"&&_.type==="document")I.indent=0;if(I.type==="flow-collection")AQ(I);switch(_.type){case"document":_.value=I;break;case"block-scalar":_.props.push(I);break;case"block-map":{let u=_.items[_.items.length-1];if(u.value){_.items.push({start:[],key:I,sep:[]}),this.onKeyLine=!0;return}else if(u.sep)u.value=I;else{Object.assign(u,{key:I,sep:[]}),this.onKeyLine=!u.explicitKey;return}break}case"block-seq":{let u=_.items[_.items.length-1];if(u.value)_.items.push({start:[],value:I});else u.value=I;break}case"flow-collection":{let u=_.items[_.items.length-1];if(!u||u.value)_.items.push({start:[],key:I,sep:[]});else if(u.sep)u.value=I;else Object.assign(u,{key:I,sep:[]});return}default:yield*this.pop(),yield*this.pop(I)}if((_.type==="document"||_.type==="block-map"||_.type==="block-seq")&&(I.type==="block-map"||I.type==="block-seq")){let u=I.items[I.items.length-1];if(u&&!u.sep&&!u.value&&u.start.length>0&&bQ(u.start)===-1&&(I.indent===0||u.start.every((U)=>U.type!=="comment"||U.indent<I.indent))){if(_.type==="document")_.end=u.start;else _.items.push({start:u.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(bQ($.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=J_(this.peek(2)),_=f1(I),u;if($.end)u=$.end,u.push(this.sourceToken),delete $.end;else u=[this.sourceToken];let U={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:_,key:$,sep:u}]};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 _="end"in I.value?I.value.end:void 0;if((Array.isArray(_)?_[_.length-1]:void 0)?.type==="comment")_?.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 u=$.items[$.items.length-2]?.value?.end;if(Array.isArray(u)){Array.prototype.push.apply(u,I.start),u.push(this.sourceToken),$.items.pop();return}}I.start.push(this.sourceToken)}return}if(this.indent>=$.indent){let _=!this.onKeyLine&&this.indent===$.indent,u=_&&(I.sep||I.explicitKey)&&this.type!=="seq-item-ind",U=[];if(u&&I.sep&&!I.value){let z=[];for(let
|
|
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 _="end"in I.value?I.value.end:void 0;if((Array.isArray(_)?_[_.length-1]:void 0)?.type==="comment")_?.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 u=$.items[$.items.length-2]?.value?.end;if(Array.isArray(u)){Array.prototype.push.apply(u,I.start),u.push(this.sourceToken),$.items.pop();return}}I.start.push(this.sourceToken)}return}if(this.indent>=$.indent){let _=!this.onKeyLine&&this.indent===$.indent,u=_&&(I.sep||I.explicitKey)&&this.type!=="seq-item-ind",U=[];if(u&&I.sep&&!I.value){let z=[];for(let J=0;J<I.sep.length;++J){let G=I.sep[J];switch(G.type){case"newline":z.push(J);break;case"space":break;case"comment":if(G.indent>$.indent)z.length=0;break;default:z.length=0}}if(z.length>=2)U=I.sep.splice(z[1])}switch(this.type){case"anchor":case"tag":if(u||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(u||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(B6(I.start,"newline"))Object.assign(I,{key:null,sep:[this.sourceToken]});else{let z=f1(I.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:z,key:null,sep:[this.sourceToken]}]})}else if(I.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(B6(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(jQ(I.key)&&!B6(I.sep,"newline")){let z=f1(I.start),J=I.key,G=I.sep;G.push(this.sourceToken),delete I.key,delete I.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:z,key:J,sep:G}]})}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||u)$.items.push({start:U,key:null,sep:[this.sourceToken]});else if(B6(I.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else I.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let z=this.flowScalar(this.type);if(u||I.value)$.items.push({start:U,key:z,sep:[]}),this.onKeyLine=!0;else if(I.sep)this.stack.push(z);else Object.assign(I,{key:z,sep:[]}),this.onKeyLine=!0;return}default:{let z=this.startBlockValue($);if(z){if(z.type==="block-seq"){if(!I.explicitKey&&I.sep&&!B6(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(_)$.items.push({start:U});this.stack.push(z);return}}}}yield*this.pop(),yield*this.step()}*blockSequence($){let I=$.items[$.items.length-1];switch(this.type){case"newline":if(I.value){let _="end"in I.value?I.value.end:void 0;if((Array.isArray(_)?_[_.length-1]:void 0)?.type==="comment")_?.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 u=$.items[$.items.length-2]?.value?.end;if(Array.isArray(u)){Array.prototype.push.apply(u,I.start),u.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||B6(I.start,"seq-item-ind"))$.items.push({start:[this.sourceToken]});else I.start.push(this.sourceToken);return}if(this.indent>$.indent){let _=this.startBlockValue($);if(_){this.stack.push(_);return}}yield*this.pop(),yield*this.step()}*flowCollection($){let I=$.items[$.items.length-1];if(this.type==="flow-error-end"){let _;do yield*this.pop(),_=this.peek(1);while(_?.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 u=this.flowScalar(this.type);if(!I||I.value)$.items.push({start:[],key:u,sep:[]});else if(I.sep)this.stack.push(u);else Object.assign(I,{key:u,sep:[]});return}case"flow-map-end":case"flow-seq-end":$.end.push(this.sourceToken);return}let _=this.startBlockValue($);if(_)this.stack.push(_);else yield*this.pop(),yield*this.step()}else{let _=this.peek(2);if(_.type==="block-map"&&(this.type==="map-value-ind"&&_.indent===$.indent||this.type==="newline"&&!_.items[_.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&_.type!=="flow-collection"){let u=J_(_),U=f1(u);AQ($);let z=$.end.splice(1,$.end.length);z.push(this.sourceToken);let J={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:U,key:$,sep:z}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=J}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 Qq($){let I=v0($);if(!g1(I))return[];try{return
|
|
168
|
-
`).map((q)=>q.trim()).find((q)=>/^##\s*Status:/i.test(q)||/^Status:/i.test(q));if(
|
|
169
|
-
`).map((
|
|
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=J_($),_=f1(I);return _.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:_,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let I=J_($),_=f1(I);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:_,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment($,I){if(this.type!=="comment")return!1;if(this.indent<=I)return!1;return $.every((_)=>_.type==="newline"||_.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()}}}LP.Parser=FQ});var fQ=w((FP)=>{var SQ=zJ(),ZP=e0(),uI=s0(),WP=Yz(),RP=I$(),PP=YJ(),wQ=OJ();function EQ($){let I=$.prettyErrors!==!1;return{lineCounter:$.lineCounter||I&&new PP.LineCounter||null,prettyErrors:I}}function bP($,I={}){let{lineCounter:_,prettyErrors:u}=EQ(I),U=new wQ.Parser(_?.addNewLine),z=new SQ.Composer(I),J=Array.from(z.compose(U.parse($)));if(u&&_)for(let G of J)G.errors.forEach(uI.prettifyError($,_)),G.warnings.forEach(uI.prettifyError($,_));if(J.length>0)return J;return Object.assign([],{empty:!0},z.streamInfo())}function CQ($,I={}){let{lineCounter:_,prettyErrors:u}=EQ(I),U=new wQ.Parser(_?.addNewLine),z=new SQ.Composer(I),J=null;for(let G of z.compose(U.parse($),!0,$.length))if(!J)J=G;else if(J.options.logLevel!=="silent"){J.errors.push(new uI.YAMLParseError(G.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(u&&_)J.errors.forEach(uI.prettifyError($,_)),J.warnings.forEach(uI.prettifyError($,_));return J}function AP($,I,_){let u=void 0;if(typeof I==="function")u=I;else if(_===void 0&&I&&typeof I==="object")_=I;let U=CQ($,_);if(!U)return null;if(U.warnings.forEach((z)=>WP.warn(U.options.logLevel,z)),U.errors.length>0)if(U.options.logLevel!=="silent")throw U.errors[0];else U.errors=[];return U.toJS(Object.assign({reviver:u},_))}function jP($,I,_){let u=null;if(typeof I==="function"||Array.isArray(I))u=I;else if(_===void 0&&I)_=I;if(typeof _==="string")_=_.length;if(typeof _==="number"){let U=Math.round(_);_=U<1?void 0:U>8?{indent:8}:{indent:U}}if($===void 0){let{keepUndefined:U}=_??I??{};if(!U)return}if(RP.isDocument($)&&!u)return $.toString(_);return new ZP.Document($,u,_).toString(_)}FP.parse=AP;FP.parseAllDocuments=bP;FP.parseDocument=CQ;FP.stringify=jP});import{existsSync as g1,mkdirSync as JF,readdirSync as GF,readFileSync as m2,writeFileSync as fv}from"node:fs";import{join as V4}from"node:path";function v0($){return V4($,".serena","memories")}function G1($){try{return m2($,"utf-8")}catch{return""}}function Xq($){return($.match(/##\s*ID:\s*(.+)/i)||[])[1]||($.match(/session-id:\s*(.+)/i)||[])[1]||$.match(/(session-\d{8}-\d{6})/)?.[1]}function gF($){let I=$.trim();return I===""||I==="---"}function Nq($){let I=(g)=>String(g).padStart(2,"0"),_=$.getFullYear(),u=I($.getMonth()+1),U=I($.getDate()),z=I($.getHours()),J=I($.getMinutes()),G=I($.getSeconds());return`session-${_}${u}${U}-${z}${J}${G}`}function qF($,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 XF($){return["# Task Board",`## Session: ${$}`,"","| Agent | Status | Task |","|-------|--------|------|",""].join(`
|
|
167
|
+
`)}function Qq($){let I=v0($);if(!g1(I))return[];try{return GF(I).filter((_)=>_.endsWith(".md")&&_!==".gitkeep")}catch{return[]}}function xv($,I){let _=$.match(/^progress-(\w+)(?:-[\w-]+)?\.md$/),u=$.match(/^result-(\w+)(?:-[\w-]+)?\.md$/);if(_?.[1])return{agent:_[1],type:"progress",content:I.slice(0,500)};if(u?.[1])return{agent:u[1],type:"result",content:I.slice(0,500)};return null}function kv($){let I=v0($),_={agents:[],activities:[],completedTasks:[],inProgressTasks:[]};if(!g1(I))return _;let u=Qq($);for(let U of u){if(U==="orchestrator-session.md"){try{let J=m2(V4(I,U),"utf-8").match(/session[:\s]+(\S+)/i);if(J)_.sessionId=J[1]}catch{}continue}try{let z=m2(V4(I,U),"utf-8"),J=xv(U,z);if(J){if(_.activities.push(J),!_.agents.includes(J.agent))_.agents.push(J.agent);if(J.type==="result"){let G=z.match(/task[:\s]+(.+)/i)||z.match(/##\s*(.+)/);if(G?.[1])_.completedTasks.push(G[1].trim())}else if(J.type==="progress"){let G=z.match(/current[:\s]+(.+)/i)||z.match(/working on[:\s]+(.+)/i);if(G?.[1]&&!_.completedTasks.includes(G[1].trim()))_.inProgressTasks.push(G[1].trim())}}}catch{}}return _}function r2($){let I=v0($),_=V4(I,"orchestrator-session.md");if(!g1(_))return{};let u=G1(_);if(!u)return{};let U=Xq(u)?.trim(),z=(u.match(/##\s*Status:\s*(.+)/i)||[])[1]||(u.match(/status:\s*(running|completed|failed|aborted)/i)||[])[1],J=(u.match(/##\s*Started:\s*(.+)/i)||[])[1]||(u.match(/started:\s*(.+)/i)||[])[1];return{id:U,status:z?.trim().toLowerCase(),startedAt:J?.trim()}}function yv($){let I=v0($);if(!g1(I))return 0;let _=0,u=Qq($);for(let J of u){if(!J.startsWith("result-"))continue;let G=G1(V4(I,J));if(!G)continue;let g=G.split(`
|
|
168
|
+
`).map((q)=>q.trim()).find((q)=>/^##\s*Status:/i.test(q)||/^Status:/i.test(q));if(g){if(g.match(/status[^:]*:\s*([a-z_]+)/i)?.[1]?.toLowerCase()==="completed")_+=1}}let U=G1(V4(I,"task-board.md"));if(U){let J=U.split(`
|
|
169
|
+
`).map((G)=>G.trim()).filter((G)=>/status/i.test(G)).reduce((G,g)=>{if(g.match(/status[^:]*:\s*([a-z_]+)/i)?.[1]?.toLowerCase()==="completed")return G+1;return G},0);_=Math.max(_,J)}let z=G1(V4(I,"orchestrator-session.md"));if(z){let J=z.match(/Completed:\s*(\d+)/i);if(J?.[1]){let G=parseInt(J[1],10);if(!Number.isNaN(G))_=Math.max(_,G)}}return _}function iv($,I){let _=[],u=v0($);if(!g1(u))return _;let U=I?new Date(I).getTime():0,z=Qq($);for(let J of z){if(J==="orchestrator-session.md")continue;try{let G=V4(u,J),g=m2(G,"utf-8"),q=xv(J,g);if(q)_.push(q)}catch{}}return _}function lv($){let I=[];for(let _ of $){let u=_.content.toLowerCase();if(u.includes("error")||u.includes("fail"))I.push(`${_.agent}: Error handling improved`);if(u.includes("refactor"))I.push(`${_.agent}: Code structure refactored`);if(u.includes("test"))I.push(`${_.agent}: Test coverage added`);if(u.includes("performance")||u.includes("optimize"))I.push(`${_.agent}: Performance optimized`)}return[...new Set(I)].slice(0,5)}function mv($,I={}){let _=v0($);if(!g1(_))JF(_,{recursive:!0});let u=G1(V4(_,"orchestrator-session.md")),U=G1(V4(_,"task-board.md")),z=Xq(u)||Xq(U)||Nq(new Date),J=new Date().toISOString(),G=qF(z,J),g=XF(z),q=[],N=[],X=[],Q=(H,Y)=>{let v=V4(_,H);if(!g1(v)){fv(v,Y,"utf-8"),q.push(H);return}let O=G1(v);if(I.force||gF(O)){fv(v,Y,"utf-8"),N.push(H);return}X.push(H)};return Q("orchestrator-session.md",G),Q("task-board.md",g),Q(".gitkeep",""),{memoriesDir:_,sessionId:z,created:q,updated:N,skipped:X}}var iI=()=>{};var Tq=w((tm,IH)=>{var Oq={to($,I){if(!I)return`\x1B[${$+1}G`;return`\x1B[${I+1};${$+1}H`},move($,I){let _="";if($<0)_+=`\x1B[${-$}D`;else if($>0)_+=`\x1B[${$}C`;if(I<0)_+=`\x1B[${-I}A`;else if(I>0)_+=`\x1B[${I}B`;return _},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"},kF={up:($=1)=>"\x1B[S".repeat($),down:($=1)=>"\x1B[T".repeat($)},yF={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 _=0;_<$;_++)I+=this.line+(_<$-1?Oq.up():"");if($)I+=Oq.left;return I}};IH.exports={cursor:Oq,scroll:kF,erase:yF,beep:"\x07"}});import{styleText as Dq}from"node:util";import{stdout as Zq,stdin as JH}from"node:process";import*as A6 from"node:readline";import iF from"node:readline";import{ReadStream as UH}from"node:tty";function $6($,I,_){if(!_.some((J)=>!J.disabled))return $;let u=$+I,U=Math.max(_.length-1,0),z=u<0?U:u>U?0:u;return _[z].disabled?$6(z,I<0?-1:1,_):z}function Lq($,I,_){return String($).normalize().replaceAll(`\r
|
|
170
170
|
`,`
|
|
171
171
|
`).split(`
|
|
172
|
-
`).map((u)=>
|
|
173
|
-
`)}function Pq($,I){if(typeof $=="string")return
|
|
172
|
+
`).map((u)=>eF(u,I,_)).join(`
|
|
173
|
+
`)}function Pq($,I){if(typeof $=="string")return C$.aliases.get($)===I;for(let _ of $)if(_!==void 0&&Pq(_,I))return!0;return!1}function $S($,I){if($===I)return;let _=$.split(`
|
|
174
174
|
`),u=I.split(`
|
|
175
|
-
`),U=Math.max(_.length,u.length),z=[];for(let
|
|
176
|
-
`).map((z,
|
|
177
|
-
`)}class
|
|
178
|
-
`),
|
|
179
|
-
`).length-1;this.output.write(
|
|
180
|
-
`);this.output.write(
|
|
181
|
-
`).slice(z);this.output.write(
|
|
182
|
-
`)),this._prevFrame=$;return}}this.output.write(
|
|
183
|
-
`),N=q[Symbol.iterator](),X=N.next(),Q=N.next(),H=0;for(;!X.done;){let Y=X.value,v=Q.value;if(u+=Y,Y===
|
|
184
|
-
`?(z&&(u+=
|
|
185
|
-
`&&(U&&O&&(u+=
|
|
175
|
+
`),U=Math.max(_.length,u.length),z=[];for(let J=0;J<U;J++)_[J]!==u[J]&&z.push(J);return{lines:z,numLinesBefore:_.length,numLinesAfter:u.length,numLines:U}}function u$($){return $===Vq}function p2($,I){let _=$;_.isTTY&&_.setRawMode(I)}function NH({input:$=JH,output:I=Zq,overwrite:_=!0,hideCursor:u=!0}={}){let U=A6.createInterface({input:$,output:I,prompt:"",tabSize:1});A6.emitKeypressEvents($,U),$ instanceof UH&&$.isTTY&&$.setRawMode(!0);let z=(J,{name:G,sequence:g})=>{let q=String(J);if(Pq([q,G,g],"cancel")){u&&I.write(x$.cursor.show),process.exit(0);return}if(!_)return;A6.moveCursor(I,G==="return"?0:-1,G==="return"?-1:0,()=>{A6.clearLine(I,1,()=>{$.once("keypress",z)})})};return u&&I.write(x$.cursor.hide),$.once("keypress",z),()=>{$.off("keypress",z),u&&I.write(x$.cursor.show),$ instanceof UH&&$.isTTY&&!IS&&$.setRawMode(!1),U.terminal=!1,U.close()}}function q1($,I,_,u=_){let U=rI($??Zq);return Lq(I,U-_.length,{hard:!0,trim:!1}).split(`
|
|
176
|
+
`).map((z,J)=>`${J===0?u:_}${z}`).join(`
|
|
177
|
+
`)}class X1{input;output;_abortSignal;rl;opts;_render;_track=!1;_prevFrame="";_subscribers=new Map;_cursor=0;state="initial";error="";value;userInput="";constructor($,I=!0){let{input:_=JH,output:u=Zq,render:U,signal:z,...J}=$;this.opts=J,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=U.bind(this),this._track=I,this._abortSignal=z,this.input=_,this.output=u}unsubscribe(){this._subscribers.clear()}setSubscriber($,I){let _=this._subscribers.get($)??[];_.push(I),this._subscribers.set($,_)}on($,I){this.setSubscriber($,{cb:I})}once($,I){this.setSubscriber($,{cb:I,once:!0})}emit($,...I){let _=this._subscribers.get($)??[],u=[];for(let U of _)U.cb(...I),U.once&&u.push(()=>_.splice(_.indexOf(U),1));for(let U of u)U()}prompt(){return new Promise(($)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),$(Vq);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}this.rl=iF.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),p2(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),p2(this.input,!1),$(this.value)}),this.once("cancel",()=>{this.output.write(x$.cursor.show),this.output.off("resize",this.render),p2(this.input,!1),$(Vq)})})}_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&&C$.aliases.has(I.name)&&this.emit("cursor",C$.aliases.get(I.name)),C$.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 _=this.opts.validate(this.value);_&&(this.error=_ instanceof Error?_.message:_,this.state="error",this.rl?.write(this.userInput))}this.state!=="error"&&(this.state="submit")}Pq([$,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
|
+
`),p2(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let $=Lq(this._prevFrame,process.stdout.columns,{hard:!0,trim:!1}).split(`
|
|
179
|
+
`).length-1;this.output.write(x$.cursor.move(-999,$*-1))}render(){let $=Lq(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=$S(this._prevFrame,$),_=bq(this.output);if(this.restoreCursor(),I){let u=Math.max(0,I.numLinesAfter-_),U=Math.max(0,I.numLinesBefore-_),z=I.lines.find((J)=>J>=u);if(z===void 0){this._prevFrame=$;return}if(I.lines.length===1){this.output.write(x$.cursor.move(0,z-U)),this.output.write(x$.erase.lines(1));let J=$.split(`
|
|
180
|
+
`);this.output.write(J[z]),this._prevFrame=$,this.output.write(x$.cursor.move(0,J.length-z-1));return}else if(I.lines.length>1){if(u<U)z=u;else{let G=z-U;G>0&&this.output.write(x$.cursor.move(0,G))}this.output.write(x$.erase.down());let J=$.split(`
|
|
181
|
+
`).slice(z);this.output.write(J.join(`
|
|
182
|
+
`)),this._prevFrame=$;return}}this.output.write(x$.erase.down())}this.output.write($),this.state==="initial"&&(this.state="active"),this._prevFrame=$}}}function US($,I){if($===void 0||I.length===0)return 0;let _=I.findIndex((u)=>u.value===$);return _!==-1?_:0}function _S($,I){return(I.label??String(I.value)).toLowerCase().includes($.toLowerCase())}function uS($,I){if(I)return $?I:I[0]}var x$,lF=($)=>$===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,mF=($)=>$===12288||$>=65281&&$<=65376||$>=65504&&$<=65510,rF=($)=>$>=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,Bq,h2,d2,Mq,c2,nF,hF,GH=($,I={},_={})=>{let u=I.limit??1/0,U=I.ellipsis??"",z=I?.ellipsisWidth??(U?GH(U,hF,_).width:0),J=_.ansiWidth??0,G=_.controlWidth??0,g=_.tabWidth??8,q=_.ambiguousWidth??1,N=_.emojiWidth??2,X=_.fullWidthWidth??2,Q=_.regularWidth??1,H=_.wideWidth??2,Y=0,v=0,O=$.length,T=0,V=!1,W=O,K=Math.max(0,u-z),D=0,Z=0,B=0,L=0;$:for(;;){if(Z>D||v>=O&&v>Y){let A=$.slice(D,Z)||$.slice(Y,v);T=0;for(let C of A.replaceAll(nF,"")){let x=C.codePointAt(0)||0;if(mF(x)?L=X:rF(x)?L=H:q!==Q&&lF(x)?L=q:L=Q,B+L>K&&(W=Math.min(W,Math.max(D,Y)+T)),B+L>u){V=!0;break $}T+=C.length,B+=L}D=Z=0}if(v>=O)break;if(c2.lastIndex=v,c2.test($)){if(T=c2.lastIndex-v,L=T*Q,B+L>K&&(W=Math.min(W,v+Math.floor((K-B)/Q))),B+L>u){V=!0;break}B+=L,D=Y,Z=v,v=Y=c2.lastIndex;continue}if(Bq.lastIndex=v,Bq.test($)){if(B+J>K&&(W=Math.min(W,v)),B+J>u){V=!0;break}B+=J,D=Y,Z=v,v=Y=Bq.lastIndex;continue}if(h2.lastIndex=v,h2.test($)){if(T=h2.lastIndex-v,L=T*G,B+L>K&&(W=Math.min(W,v+Math.floor((K-B)/G))),B+L>u){V=!0;break}B+=L,D=Y,Z=v,v=Y=h2.lastIndex;continue}if(d2.lastIndex=v,d2.test($)){if(T=d2.lastIndex-v,L=T*g,B+L>K&&(W=Math.min(W,v+Math.floor((K-B)/g))),B+L>u){V=!0;break}B+=L,D=Y,Z=v,v=Y=d2.lastIndex;continue}if(Mq.lastIndex=v,Mq.test($)){if(B+N>K&&(W=Math.min(W,v)),B+N>u){V=!0;break}B+=N,D=Y,Z=v,v=Y=Mq.lastIndex;continue}v+=1}return{width:V?K:B,index:V?W:O,truncated:V,ellipsed:V&&u>=z}},dF,mI=($,I={})=>GH($,dF,I).width,o2="\x1B",gH="",cF=39,Wq="\x07",qH="[",pF="]",XH="m",Rq,_H,oF=($)=>{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},uH=($)=>`${o2}${qH}${$}${XH}`,zH=($)=>`${o2}${Rq}${$}${Wq}`,tF=($)=>$.map((I)=>mI(I)),Kq=($,I,_)=>{let u=I[Symbol.iterator](),U=!1,z=!1,J=$.at(-1),G=J===void 0?0:mI(J),g=u.next(),q=u.next(),N=0;for(;!g.done;){let X=g.value,Q=mI(X);G+Q<=_?$[$.length-1]+=X:($.push(X),G=0),(X===o2||X===gH)&&(U=!0,z=I.startsWith(Rq,N+1)),U?z?X===Wq&&(U=!1,z=!1):X===XH&&(U=!1):(G+=Q,G===_&&!q.done&&($.push(""),G=0)),g=q,q=u.next(),N+=X.length}J=$.at(-1),!G&&J!==void 0&&J.length>0&&$.length>1&&($[$.length-2]+=$.pop())},aF=($)=>{let I=$.split(" "),_=I.length;for(;_>0&&!(mI(I[_-1])>0);)_--;return _===I.length?$:I.slice(0,_).join(" ")+I.slice(_).join("")},eF=($,I,_={})=>{if(_.trim!==!1&&$.trim()==="")return"";let u="",U,z,J=$.split(" "),G=tF(J),g=[""];for(let[Y,v]of J.entries()){_.trim!==!1&&(g[g.length-1]=(g.at(-1)??"").trimStart());let O=mI(g.at(-1)??"");if(Y!==0&&(O>=I&&(_.wordWrap===!1||_.trim===!1)&&(g.push(""),O=0),(O>0||_.trim===!1)&&(g[g.length-1]+=" ",O++)),_.hard&&G[Y]>I){let T=I-O,V=1+Math.floor((G[Y]-T-1)/I);Math.floor((G[Y]-1)/I)<V&&g.push(""),Kq(g,v,I);continue}if(O+G[Y]>I&&O>0&&G[Y]>0){if(_.wordWrap===!1&&O<I){Kq(g,v,I);continue}g.push("")}if(O+G[Y]>I&&_.wordWrap===!1){Kq(g,v,I);continue}g[g.length-1]+=v}_.trim!==!1&&(g=g.map((Y)=>aF(Y)));let q=g.join(`
|
|
183
|
+
`),N=q[Symbol.iterator](),X=N.next(),Q=N.next(),H=0;for(;!X.done;){let Y=X.value,v=Q.value;if(u+=Y,Y===o2||Y===gH){_H.lastIndex=H+1;let T=_H.exec(q)?.groups;if(T?.code!==void 0){let V=Number.parseFloat(T.code);U=V===cF?void 0:V}else T?.uri!==void 0&&(z=T.uri.length===0?void 0:T.uri)}let O=U?oF(U):void 0;v===`
|
|
184
|
+
`?(z&&(u+=zH("")),U&&O&&(u+=uH(O))):Y===`
|
|
185
|
+
`&&(U&&O&&(u+=uH(U)),z&&(u+=zH(z))),H+=Y.length,X=Q,Q=N.next()}return u},sF,C$,IS,Vq,rI=($)=>("columns"in $)&&typeof $.columns=="number"?$.columns:80,bq=($)=>("rows"in $)&&typeof $.rows=="number"?$.rows:20,QH,Aq,vH,HH,jq,Fq;var Sq=w0(()=>{x$=H$(Tq(),1);Bq=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,h2=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,d2=/\t{1,1000}/y,Mq=/[\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,c2=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,nF=/\p{M}+/gu,hF={limit:1/0,ellipsis:""},dF={limit:1/0,ellipsis:"",ellipsisWidth:0},Rq=`${pF}8;;`,_H=new RegExp(`(?:\\${qH}(?<code>\\d+)m|\\${Rq}(?<uri>.*)${Wq})`,"y");sF=["up","down","left","right","space","enter","cancel"],C$={actions:new Set(sF),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["\x03","cancel"],["escape","cancel"]]),messages:{cancel:"Canceled",error:"Something went wrong"},withGuide:!0};IS=globalThis.process.platform.startsWith("win"),Vq=Symbol("clack:cancel");QH=class QH extends X1{filteredOptions;multiple;isNavigating=!1;selectedValues=[];focusedValue;#$=0;#U="";#_;#I;get cursor(){return this.#$}get userInputWithCursor(){if(!this.userInput)return Dq(["inverse","hidden"],"_");if(this._cursor>=this.userInput.length)return`${this.userInput}█`;let $=this.userInput.slice(0,this._cursor),[I,..._]=this.userInput.slice(this._cursor);return`${$}${Dq("inverse",I)}${_.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.#_=$.filter??_S;let _;if($.initialValue&&Array.isArray($.initialValue)?this.multiple?_=$.initialValue:_=$.initialValue.slice(0,1):!this.multiple&&this.options.length>0&&(_=[this.options[0].value]),_)for(let u of _){let U=I.findIndex((z)=>z.value===u);U!==-1&&(this.toggleSelected(u),this.#$=U)}this.focusedValue=this.options[this.#$]?.value,this.on("key",(u,U)=>this.#u(u,U)),this.on("userInput",(u)=>this.#z(u))}_isActionKey($,I){return $==="\t"||this.multiple&&this.isNavigating&&I.name==="space"&&$!==void 0&&$!==""}#u($,I){let _=I.name==="up",u=I.name==="down",U=I.name==="return";_||u?(this.#$=$6(this.#$,_?-1:1,this.filteredOptions),this.focusedValue=this.filteredOptions[this.#$]?.value,this.multiple||(this.selectedValues=[this.focusedValue]),this.isNavigating=!0):U?this.value=uS(this.multiple,this.selectedValues):this.multiple?this.focusedValue!==void 0&&(I.name==="tab"||this.isNavigating&&I.name==="space")?this.toggleSelected(this.focusedValue):this.isNavigating=!1:(this.focusedValue&&(this.selectedValues=[this.focusedValue]),this.isNavigating=!1)}deselectAll(){this.selectedValues=[]}toggleSelected($){this.filteredOptions.length!==0&&(this.multiple?this.selectedValues.includes($)?this.selectedValues=this.selectedValues.filter((I)=>I!==$):this.selectedValues=[...this.selectedValues,$]:this.selectedValues=[$])}#z($){if($!==this.#U){this.#U=$;let I=this.options;$?this.filteredOptions=I.filter((U)=>this.#_($,U)):this.filteredOptions=[...I];let _=US(this.focusedValue,this.filteredOptions);this.#$=$6(_,0,this.filteredOptions);let u=this.filteredOptions[this.#$];u&&!u.disabled?this.focusedValue=u.value:this.focusedValue=void 0,this.multiple||(this.focusedValue!==void 0?this.toggleSelected(this.focusedValue):this.deselectAll())}}};Aq=class Aq extends X1{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})}};vH=class vH extends X1{options;cursor=0;#$;getGroupItems($){return this.options.filter((I)=>I.group===$)}isGroupSelected($){let I=this.getGroupItems($),_=this.value;return _===void 0?!1:I.every((u)=>_.includes(u.value))}toggleValue(){let $=this.options[this.cursor];if(this.value===void 0&&(this.value=[]),$.group===!0){let I=$.value,_=this.getGroupItems(I);this.isGroupSelected(I)?this.value=this.value.filter((u)=>_.findIndex((U)=>U.value===u)===-1):this.value=[...this.value,..._.map((u)=>u.value)],this.value=Array.from(new Set(this.value))}else{let I=this.value.includes($.value);this.value=I?this.value.filter((_)=>_!==$.value):[...this.value,$.value]}}constructor($){super($,!1);let{options:I}=$;this.#$=$.selectableGroups!==!1,this.options=Object.entries(I).flatMap(([_,u])=>[{value:_,group:!0,label:_},...u.map((U)=>({...U,group:_}))]),this.value=[...$.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:_})=>_===$.cursorAt),this.#$?0:1),this.on("cursor",(_)=>{switch(_){case"left":case"up":{this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;let u=this.options[this.cursor]?.group===!0;!this.#$&&u&&(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 u=this.options[this.cursor]?.group===!0;!this.#$&&u&&(this.cursor=this.cursor===this.options.length-1?0:this.cursor+1);break}case"space":this.toggleValue();break}})}};HH=class extends X1{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((_)=>_.value)}toggleInvert(){let $=this.value;if(!$)return;let I=this._enabledOptions.filter((_)=>!$.includes(_.value));this.value=I.map((_)=>_.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:_})=>_===$.cursorAt),0);this.cursor=this.options[I].disabled?$6(I,1,this.options):I,this.on("key",(_)=>{_==="a"&&this.toggleAll(),_==="i"&&this.toggleInvert()}),this.on("cursor",(_)=>{switch(_){case"left":case"up":this.cursor=$6(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=$6(this.cursor,1,this.options);break;case"space":this.toggleValue();break}})}};jq=class jq extends X1{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:u})=>u===$.initialValue),_=I===-1?0:I;this.cursor=this.options[_].disabled?$6(_,1,this.options):_,this.changeValue(),this.on("cursor",(u)=>{switch(u){case"left":case"up":this.cursor=$6(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=$6(this.cursor,1,this.options);break}this.changeValue()})}};Fq=class Fq extends X1{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}${Dq("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 P,stripVTControlCharacters as gr}from"node:util";import O4 from"node:process";function zS(){return O4.platform!=="win32"?O4.env.TERM!=="linux":!!O4.env.CI||!!O4.env.WT_SESSION||!!O4.env.TERMINUS_SUBLIME||O4.env.ConEmuTask==="{cmd::Cmder}"||O4.env.TERM_PROGRAM==="Terminus-Sublime"||O4.env.TERM_PROGRAM==="vscode"||O4.env.TERM==="xterm-256color"||O4.env.TERM==="alacritty"||O4.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}function dI($,I,_){return String($).normalize().replaceAll(`\r
|
|
186
186
|
`,`
|
|
187
187
|
`).split(`
|
|
188
|
-
`).map((u)=>
|
|
189
|
-
`)}var hI,fq,
|
|
190
|
-
`),N=q[Symbol.iterator](),X=N.next(),Q=N.next(),H=0;for(;!X.done;){let Y=X.value,v=Q.value;if(u+=Y,Y===
|
|
191
|
-
`?(z&&(u+=
|
|
192
|
-
`&&(U&&O&&(u+=
|
|
193
|
-
`);O.push(Z),T+=Z.length}if(T>N){let
|
|
194
|
-
`:""}${
|
|
195
|
-
`,z=this.value?I:_;switch(this.state){case"submit":{let
|
|
196
|
-
${P("gray",$$)}`:""}`}default:{let
|
|
188
|
+
`).map((u)=>AS(u,I,_)).join(`
|
|
189
|
+
`)}var hI,fq,JS=()=>process.env.CI==="true",X$=($,I)=>fq?$:I,GS,DH,LH,Iu,gS,$$,j6,Xr,Nr,xq,$u,qS,YH,OH,Qr,TH,XS,NS,QS,vS,vr,HS,YS,OS,TS,Uu=($)=>{switch($){case"initial":case"active":return P("cyan",GS);case"cancel":return P("red",DH);case"error":return P("yellow",LH);case"submit":return P("green",Iu)}},VH=($)=>{switch($){case"initial":case"active":return P("cyan",$$);case"cancel":return P("red",$$);case"error":return P("yellow",$$);case"submit":return P("green",$$)}},BS=($)=>$===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,MS=($)=>$===12288||$>=65281&&$<=65376||$>=65504&&$<=65510,KS=($)=>$>=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,wq,t2,a2,Eq,e2,DS,LS,ZH=($,I={},_={})=>{let u=I.limit??1/0,U=I.ellipsis??"",z=I?.ellipsisWidth??(U?ZH(U,LS,_).width:0),J=_.ansiWidth??0,G=_.controlWidth??0,g=_.tabWidth??8,q=_.ambiguousWidth??1,N=_.emojiWidth??2,X=_.fullWidthWidth??2,Q=_.regularWidth??1,H=_.wideWidth??2,Y=0,v=0,O=$.length,T=0,V=!1,W=O,K=Math.max(0,u-z),D=0,Z=0,B=0,L=0;$:for(;;){if(Z>D||v>=O&&v>Y){let A=$.slice(D,Z)||$.slice(Y,v);T=0;for(let C of A.replaceAll(DS,"")){let x=C.codePointAt(0)||0;if(MS(x)?L=X:KS(x)?L=H:q!==Q&&BS(x)?L=q:L=Q,B+L>K&&(W=Math.min(W,Math.max(D,Y)+T)),B+L>u){V=!0;break $}T+=C.length,B+=L}D=Z=0}if(v>=O)break;if(e2.lastIndex=v,e2.test($)){if(T=e2.lastIndex-v,L=T*Q,B+L>K&&(W=Math.min(W,v+Math.floor((K-B)/Q))),B+L>u){V=!0;break}B+=L,D=Y,Z=v,v=Y=e2.lastIndex;continue}if(wq.lastIndex=v,wq.test($)){if(B+J>K&&(W=Math.min(W,v)),B+J>u){V=!0;break}B+=J,D=Y,Z=v,v=Y=wq.lastIndex;continue}if(t2.lastIndex=v,t2.test($)){if(T=t2.lastIndex-v,L=T*G,B+L>K&&(W=Math.min(W,v+Math.floor((K-B)/G))),B+L>u){V=!0;break}B+=L,D=Y,Z=v,v=Y=t2.lastIndex;continue}if(a2.lastIndex=v,a2.test($)){if(T=a2.lastIndex-v,L=T*g,B+L>K&&(W=Math.min(W,v+Math.floor((K-B)/g))),B+L>u){V=!0;break}B+=L,D=Y,Z=v,v=Y=a2.lastIndex;continue}if(Eq.lastIndex=v,Eq.test($)){if(B+N>K&&(W=Math.min(W,v)),B+N>u){V=!0;break}B+=N,D=Y,Z=v,v=Y=Eq.lastIndex;continue}v+=1}return{width:V?K:B,index:V?W:O,truncated:V,ellipsed:V&&u>=z}},VS,i4=($,I={})=>ZH($,VS,I).width,_u="\x1B",WH="",ZS=39,yq="\x07",RH="[",WS="]",PH="m",iq,BH,RS=($)=>{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},MH=($)=>`${_u}${RH}${$}${PH}`,KH=($)=>`${_u}${iq}${$}${yq}`,PS=($)=>$.map((I)=>i4(I)),Cq=($,I,_)=>{let u=I[Symbol.iterator](),U=!1,z=!1,J=$.at(-1),G=J===void 0?0:i4(J),g=u.next(),q=u.next(),N=0;for(;!g.done;){let X=g.value,Q=i4(X);G+Q<=_?$[$.length-1]+=X:($.push(X),G=0),(X===_u||X===WH)&&(U=!0,z=I.startsWith(iq,N+1)),U?z?X===yq&&(U=!1,z=!1):X===PH&&(U=!1):(G+=Q,G===_&&!q.done&&($.push(""),G=0)),g=q,q=u.next(),N+=X.length}J=$.at(-1),!G&&J!==void 0&&J.length>0&&$.length>1&&($[$.length-2]+=$.pop())},bS=($)=>{let I=$.split(" "),_=I.length;for(;_>0&&!(i4(I[_-1])>0);)_--;return _===I.length?$:I.slice(0,_).join(" ")+I.slice(_).join("")},AS=($,I,_={})=>{if(_.trim!==!1&&$.trim()==="")return"";let u="",U,z,J=$.split(" "),G=PS(J),g=[""];for(let[Y,v]of J.entries()){_.trim!==!1&&(g[g.length-1]=(g.at(-1)??"").trimStart());let O=i4(g.at(-1)??"");if(Y!==0&&(O>=I&&(_.wordWrap===!1||_.trim===!1)&&(g.push(""),O=0),(O>0||_.trim===!1)&&(g[g.length-1]+=" ",O++)),_.hard&&G[Y]>I){let T=I-O,V=1+Math.floor((G[Y]-T-1)/I);Math.floor((G[Y]-1)/I)<V&&g.push(""),Cq(g,v,I);continue}if(O+G[Y]>I&&O>0&&G[Y]>0){if(_.wordWrap===!1&&O<I){Cq(g,v,I);continue}g.push("")}if(O+G[Y]>I&&_.wordWrap===!1){Cq(g,v,I);continue}g[g.length-1]+=v}_.trim!==!1&&(g=g.map((Y)=>bS(Y)));let q=g.join(`
|
|
190
|
+
`),N=q[Symbol.iterator](),X=N.next(),Q=N.next(),H=0;for(;!X.done;){let Y=X.value,v=Q.value;if(u+=Y,Y===_u||Y===WH){BH.lastIndex=H+1;let T=BH.exec(q)?.groups;if(T?.code!==void 0){let V=Number.parseFloat(T.code);U=V===ZS?void 0:V}else T?.uri!==void 0&&(z=T.uri.length===0?void 0:T.uri)}let O=U?RS(U):void 0;v===`
|
|
191
|
+
`?(z&&(u+=KH("")),U&&O&&(u+=MH(O))):Y===`
|
|
192
|
+
`&&(U&&O&&(u+=MH(U)),z&&(u+=KH(z))),H+=Y.length,X=Q,Q=N.next()}return u},jS=($,I,_,u,U)=>{let z=I,J=0;for(let G=_;G<u;G++){let g=$[G];if(z=z-g.length,J++,z<=U)break}return{lineCount:z,removals:J}},kq=({cursor:$,options:I,style:_,output:u=process.stdout,maxItems:U=Number.POSITIVE_INFINITY,columnPadding:z=0,rowPadding:J=4})=>{let G=rI(u)-z,g=bq(u),q=P("dim","..."),N=Math.max(g-J,0),X=Math.max(Math.min(U,N),5),Q=0;$>=X-3&&(Q=Math.max(Math.min($-X+3,I.length-X),0));let H=X<I.length&&Q>0,Y=X<I.length&&Q+X<I.length,v=Math.min(Q+X,I.length),O=[],T=0;H&&T++,Y&&T++;let V=Q+(H?1:0),W=v-(Y?1:0);for(let D=V;D<W;D++){let Z=dI(_(I[D],D===$),G,{hard:!0,trim:!1}).split(`
|
|
193
|
+
`);O.push(Z),T+=Z.length}if(T>N){let D=0,Z=0,B=T,L=$-V,A=(C,x)=>jS(O,B,C,x,N);H?({lineCount:B,removals:D}=A(0,L),B>N&&({lineCount:B,removals:Z}=A(L+1,O.length))):({lineCount:B,removals:Z}=A(L+1,O.length),B>N&&({lineCount:B,removals:D}=A(0,L))),D>0&&(H=!0,O.splice(0,D)),Z>0&&(Y=!0,O.splice(O.length-Z,Z))}let K=[];H&&K.push(q);for(let D of O)for(let Z of D)K.push(Z);return Y&&K.push(q),K},j$=($)=>{let I=$.active??"Yes",_=$.inactive??"No";return new Aq({active:I,inactive:_,signal:$.signal,input:$.input,output:$.output,initialValue:$.initialValue??!0,render(){let u=$.withGuide??C$.withGuide,U=`${u?`${P("gray",$$)}
|
|
194
|
+
`:""}${Uu(this.state)} ${$.message}
|
|
195
|
+
`,z=this.value?I:_;switch(this.state){case"submit":{let J=u?`${P("gray",$$)} `:"";return`${U}${J}${P("dim",z)}`}case"cancel":{let J=u?`${P("gray",$$)} `:"";return`${U}${J}${P(["strikethrough","dim"],z)}${u?`
|
|
196
|
+
${P("gray",$$)}`:""}`}default:{let J=u?`${P("cyan",$$)} `:"",G=u?P("cyan",j6):"";return`${U}${J}${this.value?`${P("green",xq)} ${I}`:`${P("dim",$u)} ${P("dim",I)}`}${$.vertical?u?`
|
|
197
197
|
${P("cyan",$$)} `:`
|
|
198
|
-
`:` ${P("dim","/")} `}${this.value?`${P("dim"
|
|
199
|
-
${
|
|
200
|
-
`}}}}).prompt()},a,
|
|
198
|
+
`:` ${P("dim","/")} `}${this.value?`${P("dim",$u)} ${P("dim",_)}`:`${P("green",xq)} ${_}`}
|
|
199
|
+
${G}
|
|
200
|
+
`}}}}).prompt()},a,c$=($="",I)=>{let _=I?.output??process.stdout,u=I?.withGuide??C$.withGuide?`${P("gray",j6)} `:"";_.write(`${u}${P("red",$)}
|
|
201
201
|
|
|
202
|
-
`)},
|
|
203
|
-
`)},o=($="",I)=>{let _=I?.output??process.stdout,u=I?.withGuide??
|
|
202
|
+
`)},D$=($="",I)=>{let _=I?.output??process.stdout,u=I?.withGuide??C$.withGuide?`${P("gray",gS)} `:"";_.write(`${u}${$}
|
|
203
|
+
`)},o=($="",I)=>{let _=I?.output??process.stdout,u=I?.withGuide??C$.withGuide?`${P("gray",$$)}
|
|
204
204
|
${P("gray",j6)} `:"";_.write(`${u}${$}
|
|
205
205
|
|
|
206
206
|
`)},nI=($,I)=>$.split(`
|
|
207
207
|
`).map((_)=>I(_)).join(`
|
|
208
|
-
`),cI=($)=>{let I=(u,U)=>{let z=u.label??String(u.value);return U==="disabled"?`${P("gray",
|
|
209
|
-
${P("reset",P("dim",`Press ${P(["gray","bgWhite","inverse"]," space ")} to select, ${P("gray",P("bgWhite",P("inverse"," enter ")))} to submit`))}`},render(){let u=
|
|
208
|
+
`),cI=($)=>{let I=(u,U)=>{let z=u.label??String(u.value);return U==="disabled"?`${P("gray",OH)} ${nI(z,(J)=>P(["strikethrough","gray"],J))}${u.hint?` ${P("dim",`(${u.hint??"disabled"})`)}`:""}`:U==="active"?`${P("cyan",qS)} ${z}${u.hint?` ${P("dim",`(${u.hint})`)}`:""}`:U==="selected"?`${P("green",YH)} ${nI(z,(J)=>P("dim",J))}${u.hint?` ${P("dim",`(${u.hint})`)}`:""}`:U==="cancelled"?`${nI(z,(J)=>P(["strikethrough","dim"],J))}`:U==="active-selected"?`${P("green",YH)} ${z}${u.hint?` ${P("dim",`(${u.hint})`)}`:""}`:U==="submitted"?`${nI(z,(J)=>P("dim",J))}`:`${P("dim",OH)} ${nI(z,(J)=>P("dim",J))}`},_=$.required??!0;return new HH({options:$.options,signal:$.signal,input:$.input,output:$.output,initialValues:$.initialValues,required:_,cursorAt:$.cursorAt,validate(u){if(_&&(u===void 0||u.length===0))return`Please select at least one option.
|
|
209
|
+
${P("reset",P("dim",`Press ${P(["gray","bgWhite","inverse"]," space ")} to select, ${P("gray",P("bgWhite",P("inverse"," enter ")))} to submit`))}`},render(){let u=q1($.output,$.message,`${VH(this.state)} `,`${Uu(this.state)} `),U=`${P("gray",$$)}
|
|
210
210
|
${u}
|
|
211
|
-
`,z=this.value??[],
|
|
212
|
-
${P("gray",$$)}`}case"error":{let
|
|
211
|
+
`,z=this.value??[],J=(G,g)=>{if(G.disabled)return I(G,"disabled");let q=z.includes(G.value);return g&&q?I(G,"active-selected"):q?I(G,"selected"):I(G,g?"active":"inactive")};switch(this.state){case"submit":{let G=this.options.filter(({value:q})=>z.includes(q)).map((q)=>I(q,"submitted")).join(P("dim",", "))||P("dim","none"),g=q1($.output,G,`${P("gray",$$)} `);return`${U}${g}`}case"cancel":{let G=this.options.filter(({value:q})=>z.includes(q)).map((q)=>I(q,"cancelled")).join(P("dim",", "));if(G.trim()==="")return`${U}${P("gray",$$)}`;let g=q1($.output,G,`${P("gray",$$)} `);return`${U}${g}
|
|
212
|
+
${P("gray",$$)}`}case"error":{let G=`${P("yellow",$$)} `,g=this.error.split(`
|
|
213
213
|
`).map((X,Q)=>Q===0?`${P("yellow",j6)} ${P("yellow",X)}`:` ${X}`).join(`
|
|
214
214
|
`),q=U.split(`
|
|
215
|
-
`).length,N=
|
|
216
|
-
`).length+1;return`${U}${
|
|
217
|
-
${
|
|
218
|
-
${
|
|
219
|
-
`}default:{let
|
|
220
|
-
`).length;return`${U}${
|
|
221
|
-
${
|
|
215
|
+
`).length,N=g.split(`
|
|
216
|
+
`).length+1;return`${U}${G}${kq({output:$.output,options:this.options,cursor:this.cursor,maxItems:$.maxItems,columnPadding:G.length,rowPadding:q+N,style:J}).join(`
|
|
217
|
+
${G}`)}
|
|
218
|
+
${g}
|
|
219
|
+
`}default:{let G=`${P("cyan",$$)} `,g=U.split(`
|
|
220
|
+
`).length;return`${U}${G}${kq({output:$.output,options:this.options,cursor:this.cursor,maxItems:$.maxItems,columnPadding:G.length,rowPadding:g+2,style:J}).join(`
|
|
221
|
+
${G}`)}
|
|
222
222
|
${P("cyan",j6)}
|
|
223
|
-
`}}}}).prompt()},
|
|
224
|
-
`),z=U.reduce((
|
|
225
|
-
`).map(z),""],
|
|
223
|
+
`}}}}).prompt()},FS=($)=>P("dim",$),SS=($,I,_)=>{let u={hard:!0,trim:!1},U=dI($,I,u).split(`
|
|
224
|
+
`),z=U.reduce((g,q)=>Math.max(i4(q),g),0),J=U.map(_).reduce((g,q)=>Math.max(i4(q),g),0),G=I-(J-z);return dI($,G,u)},y=($="",I="",_)=>{let u=_?.output??O4.stdout,U=_?.withGuide??C$.withGuide,z=_?.format??FS,J=["",...SS($,rI(u)-6,z).split(`
|
|
225
|
+
`).map(z),""],G=i4(I),g=Math.max(J.reduce((Q,H)=>{let Y=i4(H);return Y>Q?Y:Q},0),G)+2,q=J.map((Q)=>`${P("gray",$$)} ${Q}${" ".repeat(g-i4(Q))}${P("gray",$$)}`).join(`
|
|
226
226
|
`),N=U?`${P("gray",$$)}
|
|
227
|
-
`:"",X=U?
|
|
227
|
+
`:"",X=U?NS:vS;u.write(`${N}${P("green",Iu)} ${P("reset",I)} ${P("gray",TH.repeat(Math.max(g-G-1,1))+XS)}
|
|
228
228
|
${q}
|
|
229
|
-
${P("gray",X+
|
|
230
|
-
`)},
|
|
231
|
-
`);let
|
|
232
|
-
`);
|
|
233
|
-
`);let
|
|
234
|
-
`):_.write(`${
|
|
235
|
-
`)),B(),N()};return{start:
|
|
229
|
+
${P("gray",X+TH.repeat(g+2)+QS)}
|
|
230
|
+
`)},wS=($)=>P("magenta",$),$4=({indicator:$="dots",onCancel:I,output:_=process.stdout,cancelMessage:u,errorMessage:U,frames:z=fq?["◒","◐","◓","◑"]:["•","o","O","0"],delay:J=fq?80:120,signal:G,...g}={})=>{let q=JS(),N,X,Q=!1,H=!1,Y="",v,O=performance.now(),T=rI(_),V=g?.styleFrame??wS,W=(d)=>{let N$=d>1?U??C$.messages.error:u??C$.messages.cancel;H=d===1,Q&&(U$(N$,d),H&&typeof I=="function"&&I())},K=()=>W(2),D=()=>W(1),Z=()=>{process.on("uncaughtExceptionMonitor",K),process.on("unhandledRejection",K),process.on("SIGINT",D),process.on("SIGTERM",D),process.on("exit",W),G&&G.addEventListener("abort",D)},B=()=>{process.removeListener("uncaughtExceptionMonitor",K),process.removeListener("unhandledRejection",K),process.removeListener("SIGINT",D),process.removeListener("SIGTERM",D),process.removeListener("exit",W),G&&G.removeEventListener("abort",D)},L=()=>{if(v===void 0)return;q&&_.write(`
|
|
231
|
+
`);let d=dI(v,T,{hard:!0,trim:!1}).split(`
|
|
232
|
+
`);d.length>1&&_.write(hI.cursor.up(d.length-1)),_.write(hI.cursor.to(0)),_.write(hI.erase.down())},A=(d)=>d.replace(/\.+$/,""),C=(d)=>{let N$=(performance.now()-d)/1000,p=Math.floor(N$/60),O$=Math.floor(N$%60);return p>0?`[${p}m ${O$}s]`:`[${O$}s]`},x=g.withGuide??C$.withGuide,j=(d="")=>{Q=!0,N=NH({output:_}),Y=A(d),O=performance.now(),x&&_.write(`${P("gray",$$)}
|
|
233
|
+
`);let N$=0,p=0;Z(),X=setInterval(()=>{if(q&&Y===v)return;L(),v=Y;let O$=V(z[N$]),N4;if(q)N4=`${O$} ${Y}...`;else if($==="timer")N4=`${O$} ${Y} ${C(O)}`;else{let X6=".".repeat(Math.floor(p)).slice(0,3);N4=`${O$} ${Y}${X6}`}let ou=dI(N4,T,{hard:!0,trim:!1});_.write(ou),N$=N$+1<z.length?N$+1:0,p=p<4?p+0.125:0},J)},U$=(d="",N$=0,p=!1)=>{if(!Q)return;Q=!1,clearInterval(X),L();let O$=N$===0?P("green",Iu):N$===1?P("red",DH):P("red",LH);Y=d??Y,p||($==="timer"?_.write(`${O$} ${Y} ${C(O)}
|
|
234
|
+
`):_.write(`${O$} ${Y}
|
|
235
|
+
`)),B(),N()};return{start:j,stop:(d="")=>U$(d,0),message:(d="")=>{Y=A(d??Y)},cancel:(d="")=>U$(d,1),error:(d="")=>U$(d,2),clear:()=>U$("",0,!0),get isCancelled(){return H}}},Hr,s2=($,I)=>$.includes(`
|
|
236
236
|
`)?$.split(`
|
|
237
237
|
`).map((_)=>I(_)).join(`
|
|
238
|
-
`):I($),F6=($)=>{let I=(_,u)=>{let U=_.label??String(_.value);switch(u){case"disabled":return`${P("gray"
|
|
238
|
+
`):I($),F6=($)=>{let I=(_,u)=>{let U=_.label??String(_.value);switch(u){case"disabled":return`${P("gray",$u)} ${s2(U,(z)=>P("gray",z))}${_.hint?` ${P("dim",`(${_.hint??"disabled"})`)}`:""}`;case"selected":return`${s2(U,(z)=>P("dim",z))}`;case"active":return`${P("green",xq)} ${U}${_.hint?` ${P("dim",`(${_.hint})`)}`:""}`;case"cancelled":return`${s2(U,(z)=>P(["strikethrough","dim"],z))}`;default:return`${P("dim",$u)} ${s2(U,(z)=>P("dim",z))}`}};return new jq({options:$.options,signal:$.signal,input:$.input,output:$.output,initialValue:$.initialValue,render(){let _=$.withGuide??C$.withGuide,u=`${Uu(this.state)} `,U=`${VH(this.state)} `,z=q1($.output,$.message,U,u),J=`${_?`${P("gray",$$)}
|
|
239
239
|
`:""}${z}
|
|
240
|
-
`;switch(this.state){case"submit":{let
|
|
241
|
-
${P("gray",$$)}`:""}`}default:{let
|
|
242
|
-
`).length,N=_?2:1;return`${
|
|
243
|
-
${
|
|
240
|
+
`;switch(this.state){case"submit":{let G=_?`${P("gray",$$)} `:"",g=q1($.output,I(this.options[this.cursor],"selected"),G);return`${J}${g}`}case"cancel":{let G=_?`${P("gray",$$)} `:"",g=q1($.output,I(this.options[this.cursor],"cancelled"),G);return`${J}${g}${_?`
|
|
241
|
+
${P("gray",$$)}`:""}`}default:{let G=_?`${P("cyan",$$)} `:"",g=_?P("cyan",j6):"",q=J.split(`
|
|
242
|
+
`).length,N=_?2:1;return`${J}${G}${kq({output:$.output,cursor:this.cursor,options:this.options,maxItems:$.maxItems,columnPadding:G.length,rowPadding:q+N,style:(X,Q)=>I(X,X.disabled?"disabled":Q?"active":"inactive")}).join(`
|
|
243
|
+
${G}`)}
|
|
244
|
+
${g}
|
|
245
|
+
`}}}}).prompt()},Yr,uu=($)=>new Fq({validate:$.validate,placeholder:$.placeholder,defaultValue:$.defaultValue,initialValue:$.initialValue,output:$.output,signal:$.signal,input:$.input,render(){let I=$?.withGuide??C$.withGuide,_=`${`${I?`${P("gray",$$)}
|
|
246
|
+
`:""}${Uu(this.state)} `}${$.message}
|
|
247
|
+
`,u=$.placeholder?P("inverse",$.placeholder[0])+P("dim",$.placeholder.slice(1)):P(["inverse","hidden"],"_"),U=this.userInput?this.userInputWithCursor:u,z=this.value??"";switch(this.state){case"error":{let J=this.error?` ${P("yellow",this.error)}`:"",G=I?`${P("yellow",$$)} `:"",g=I?P("yellow",j6):"";return`${_.trim()}
|
|
248
|
+
${G}${U}
|
|
249
|
+
${g}${J}
|
|
250
|
+
`}case"submit":{let J=z?` ${P("dim",z)}`:"",G=I?P("gray",$$):"";return`${_}${G}${J}`}case"cancel":{let J=z?` ${P(["strikethrough","dim"],z)}`:"",G=I?P("gray",$$):"";return`${_}${G}${J}${z.trim()?`
|
|
251
|
+
${G}`:""}`}default:{let J=I?`${P("cyan",$$)} `:"",G=I?P("cyan",j6):"";return`${_}${J}${U}
|
|
244
252
|
${G}
|
|
245
|
-
`}}}}).prompt()
|
|
246
|
-
|
|
247
|
-
`,u=$.placeholder?P("inverse",$.placeholder[0])+P("dim",$.placeholder.slice(1)):P(["inverse","hidden"],"_"),U=this.userInput?this.userInputWithCursor:u,z=this.value??"";switch(this.state){case"error":{let g=this.error?` ${P("yellow",this.error)}`:"",J=I?`${P("yellow",$$)} `:"",G=I?P("yellow",j6):"";return`${_.trim()}
|
|
248
|
-
${J}${U}
|
|
249
|
-
${G}${g}
|
|
250
|
-
`}case"submit":{let g=z?` ${P("dim",z)}`:"",J=I?P("gray",$$):"";return`${_}${J}${g}`}case"cancel":{let g=z?` ${P(["strikethrough","dim"],z)}`:"",J=I?P("gray",$$):"";return`${_}${J}${g}${z.trim()?`
|
|
251
|
-
${J}`:""}`}default:{let g=I?`${P("cyan",$$)} `:"",J=I?P("cyan",j6):"";return`${_}${g}${U}
|
|
252
|
-
${J}
|
|
253
|
-
`}}}}).prompt();var $4=w0(()=>{Sq();Sq();hI=v$(Tq(),1);fq=IS(),_S=q$("◆","*"),BH=q$("■","x"),MH=q$("▲","x"),$u=q$("◇","o"),uS=q$("┌","T"),$$=q$("│","|"),j6=q$("└","—"),qr=q$("┐","T"),Xr=q$("┘","—"),xq=q$("●",">"),s2=q$("○"," "),zS=q$("◻","[•]"),QH=q$("◼","[+]"),vH=q$("◻","[ ]"),Nr=q$("▪","•"),HH=q$("─","-"),gS=q$("╮","+"),JS=q$("├","+"),GS=q$("╯","+"),qS=q$("╰","+"),Qr=q$("╭","+"),XS=q$("●","•"),NS=q$("◆","*"),QS=q$("▲","!"),vS=q$("■","x"),wq=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,o2=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,t2=/\t{1,1000}/y,Eq=/[\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,a2=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,TS=/\p{M}+/gu,BS={limit:1/0,ellipsis:""},MS={limit:1/0,ellipsis:"",ellipsisWidth:0},iq=`${DS}8;;`,YH=new RegExp(`(?:\\${VH}(?<code>\\d+)m|\\${iq}(?<uri>.*)${yq})`,"y");a={message:($=[],{symbol:I=P("gray",$$),secondarySymbol:_=P("gray",$$),output:u=process.stdout,spacing:U=1,withGuide:z}={})=>{let g=[],J=z??w$.withGuide,G=J?_:"",q=J?`${I} `:"",N=J?`${_} `:"";for(let Q=0;Q<U;Q++)g.push(G);let X=Array.isArray($)?$:$.split(`
|
|
254
|
-
`);if(X.length>0){let[Q,...H]=X;Q.length>0?g.push(`${q}${Q}`):g.push(J?I:"");for(let Y of H)Y.length>0?g.push(`${N}${Y}`):g.push(J?_:"")}u.write(`${g.join(`
|
|
253
|
+
`}}}}).prompt();var I4=w0(()=>{Sq();Sq();hI=H$(Tq(),1);fq=zS(),GS=X$("◆","*"),DH=X$("■","x"),LH=X$("▲","x"),Iu=X$("◇","o"),gS=X$("┌","T"),$$=X$("│","|"),j6=X$("└","—"),Xr=X$("┐","T"),Nr=X$("┘","—"),xq=X$("●",">"),$u=X$("○"," "),qS=X$("◻","[•]"),YH=X$("◼","[+]"),OH=X$("◻","[ ]"),Qr=X$("▪","•"),TH=X$("─","-"),XS=X$("╮","+"),NS=X$("├","+"),QS=X$("╯","+"),vS=X$("╰","+"),vr=X$("╭","+"),HS=X$("●","•"),YS=X$("◆","*"),OS=X$("▲","!"),TS=X$("■","x"),wq=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,t2=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,a2=/\t{1,1000}/y,Eq=/[\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,e2=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,DS=/\p{M}+/gu,LS={limit:1/0,ellipsis:""},VS={limit:1/0,ellipsis:"",ellipsisWidth:0},iq=`${WS}8;;`,BH=new RegExp(`(?:\\${RH}(?<code>\\d+)m|\\${iq}(?<uri>.*)${yq})`,"y");a={message:($=[],{symbol:I=P("gray",$$),secondarySymbol:_=P("gray",$$),output:u=process.stdout,spacing:U=1,withGuide:z}={})=>{let J=[],G=z??C$.withGuide,g=G?_:"",q=G?`${I} `:"",N=G?`${_} `:"";for(let Q=0;Q<U;Q++)J.push(g);let X=Array.isArray($)?$:$.split(`
|
|
254
|
+
`);if(X.length>0){let[Q,...H]=X;Q.length>0?J.push(`${q}${Q}`):J.push(G?I:"");for(let Y of H)Y.length>0?J.push(`${N}${Y}`):J.push(G?_:"")}u.write(`${J.join(`
|
|
255
255
|
`)}
|
|
256
|
-
`)},info:($,I)=>{a.message($,{...I,symbol:P("blue",
|
|
257
|
-
`),u=_[_.length-1]||"",U=u.match(/(\d+) files? changed/),z=u.match(/(\d+) insertions?\(\+\)/),
|
|
258
|
-
`).filter(Boolean)}catch{return[]}}function
|
|
259
|
-
`).filter(Boolean).slice(0,10)}catch{return[]}}function
|
|
260
|
-
`).filter(Boolean)}catch{return[]}}function
|
|
261
|
-
`).filter(Boolean)}catch{return
|
|
262
|
-
`),"Previous Session");let U=await F6({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(
|
|
263
|
-
`);y(X,`Past Retrospectives (${_.length})`)}o(
|
|
264
|
-
`),"Preview");let v=await
|
|
265
|
-
`),"Recent Commits");if(
|
|
266
|
-
`),"Changed Files");let J=await _u({message:"What did you accomplish in this session?",placeholder:"e.g., Implemented user authentication flow"});if(_$(J)){r$("Cancelled.");return}let G=await _u({message:"Key learnings? (comma-separated)",placeholder:"e.g., JWT needs refresh token, bcrypt is slow"});if(_$(G)){r$("Cancelled.");return}let q=await _u({message:"Next steps? (comma-separated)",placeholder:"e.g., Add password reset, Write tests"});if(_$(q)){r$("Cancelled.");return}let N={id:Math.random().toString(36).slice(2,8),date:new Date().toISOString(),summary:J,keyLearnings:G.split(",").map((X)=>X.trim()).filter(Boolean),filesChanged:g,nextSteps:q.split(",").map((X)=>X.trim()).filter(Boolean)};_O($,N),y(A$.default.green("Retrospective saved!"),"Done"),o(A$.default.dim(`Stored in: ${I}`))}var A$;var gO=w0(()=>{$4();MX();iI();A$=v$(R$(),1)});var J6=w((Yd,uT)=>{var UT=["nodebuffer","arraybuffer","fragments"],_T=typeof Blob<"u";if(_T)UT.push("blob");uT.exports={BINARY_TYPES:UT,CLOSE_TIMEOUT:30000,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:_T,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var UU=w((Od,xu)=>{var{EMPTY_BUFFER:$f}=J6(),kX=Buffer[Symbol.species];function If($,I){if($.length===0)return $f;if($.length===1)return $[0];let _=Buffer.allocUnsafe(I),u=0;for(let U=0;U<$.length;U++){let z=$[U];_.set(z,u),u+=z.length}if(u<I)return new kX(_.buffer,_.byteOffset,u);return _}function zT($,I,_,u,U){for(let z=0;z<U;z++)_[u+z]=$[z]^I[z&3]}function gT($,I){for(let _=0;_<$.length;_++)$[_]^=I[_&3]}function Uf($){if($.length===$.buffer.byteLength)return $.buffer;return $.buffer.slice($.byteOffset,$.byteOffset+$.length)}function yX($){if(yX.readOnly=!0,Buffer.isBuffer($))return $;let I;if($ instanceof ArrayBuffer)I=new kX($);else if(ArrayBuffer.isView($))I=new kX($.buffer,$.byteOffset,$.byteLength);else I=Buffer.from($),yX.readOnly=!1;return I}xu.exports={concat:If,mask:zT,toArrayBuffer:Uf,toBuffer:yX,unmask:gT};if(!process.env.WS_NO_BUFFER_UTIL)try{let $=(()=>{throw new Error("Cannot require module "+"bufferutil");})();xu.exports.mask=function(I,_,u,U,z){if(z<48)zT(I,_,u,U,z);else $.mask(I,_,u,U,z)},xu.exports.unmask=function(I,_){if(I.length<32)gT(I,_);else $.unmask(I,_)}}catch($){}});var XT=w((Td,qT)=>{var JT=Symbol("kDone"),iX=Symbol("kRun");class GT{constructor($){this[JT]=()=>{this.pending--,this[iX]()},this.concurrency=$||1/0,this.jobs=[],this.pending=0}add($){this.jobs.push($),this[iX]()}[iX](){if(this.pending===this.concurrency)return;if(this.jobs.length){let $=this.jobs.shift();this.pending++,$(this[JT])}}}qT.exports=GT});var uU=w((Bd,YT)=>{var _U=z$("zlib"),NT=UU(),_f=XT(),{kStatusCode:QT}=J6(),uf=Buffer[Symbol.species],zf=Buffer.from([0,0,255,255]),yu=Symbol("permessage-deflate"),G6=Symbol("total-length"),W0=Symbol("callback"),x6=Symbol("buffers"),R0=Symbol("error"),ku;class vT{constructor($,I,_){if(this._maxPayload=_|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,!ku){let u=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;ku=new _f(u)}}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[W0];if(this._deflate.close(),this._deflate=null,$)$(Error("The deflate stream was closed while data was being processed"))}}acceptAsServer($){let I=this._options,_=$.find((u)=>{if(I.serverNoContextTakeover===!1&&u.server_no_context_takeover||u.server_max_window_bits&&(I.serverMaxWindowBits===!1||typeof I.serverMaxWindowBits==="number"&&I.serverMaxWindowBits>u.server_max_window_bits)||typeof I.clientMaxWindowBits==="number"&&!u.client_max_window_bits)return!1;return!0});if(!_)throw Error("None of the extension offers can be accepted");if(I.serverNoContextTakeover)_.server_no_context_takeover=!0;if(I.clientNoContextTakeover)_.client_no_context_takeover=!0;if(typeof I.serverMaxWindowBits==="number")_.server_max_window_bits=I.serverMaxWindowBits;if(typeof I.clientMaxWindowBits==="number")_.client_max_window_bits=I.clientMaxWindowBits;else if(_.client_max_window_bits===!0||I.clientMaxWindowBits===!1)delete _.client_max_window_bits;return _}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((_)=>{let u=I[_];if(u.length>1)throw Error(`Parameter "${_}" must have only a single value`);if(u=u[0],_==="client_max_window_bits"){if(u!==!0){let U=+u;if(!Number.isInteger(U)||U<8||U>15)throw TypeError(`Invalid value for parameter "${_}": ${u}`);u=U}else if(!this._isServer)throw TypeError(`Invalid value for parameter "${_}": ${u}`)}else if(_==="server_max_window_bits"){let U=+u;if(!Number.isInteger(U)||U<8||U>15)throw TypeError(`Invalid value for parameter "${_}": ${u}`);u=U}else if(_==="client_no_context_takeover"||_==="server_no_context_takeover"){if(u!==!0)throw TypeError(`Invalid value for parameter "${_}": ${u}`)}else throw Error(`Unknown parameter "${_}"`);I[_]=u})}),$}decompress($,I,_){ku.add((u)=>{this._decompress($,I,(U,z)=>{u(),_(U,z)})})}compress($,I,_){ku.add((u)=>{this._compress($,I,(U,z)=>{u(),_(U,z)})})}_decompress($,I,_){let u=this._isServer?"client":"server";if(!this._inflate){let U=`${u}_max_window_bits`,z=typeof this.params[U]!=="number"?_U.Z_DEFAULT_WINDOWBITS:this.params[U];this._inflate=_U.createInflateRaw({...this._options.zlibInflateOptions,windowBits:z}),this._inflate[yu]=this,this._inflate[G6]=0,this._inflate[x6]=[],this._inflate.on("error",Jf),this._inflate.on("data",HT)}if(this._inflate[W0]=_,this._inflate.write($),I)this._inflate.write(zf);this._inflate.flush(()=>{let U=this._inflate[R0];if(U){this._inflate.close(),this._inflate=null,_(U);return}let z=NT.concat(this._inflate[x6],this._inflate[G6]);if(this._inflate._readableState.endEmitted)this._inflate.close(),this._inflate=null;else if(this._inflate[G6]=0,this._inflate[x6]=[],I&&this.params[`${u}_no_context_takeover`])this._inflate.reset();_(null,z)})}_compress($,I,_){let u=this._isServer?"server":"client";if(!this._deflate){let U=`${u}_max_window_bits`,z=typeof this.params[U]!=="number"?_U.Z_DEFAULT_WINDOWBITS:this.params[U];this._deflate=_U.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:z}),this._deflate[G6]=0,this._deflate[x6]=[],this._deflate.on("data",gf)}this._deflate[W0]=_,this._deflate.write($),this._deflate.flush(_U.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let U=NT.concat(this._deflate[x6],this._deflate[G6]);if(I)U=new uf(U.buffer,U.byteOffset,U.length-4);if(this._deflate[W0]=null,this._deflate[G6]=0,this._deflate[x6]=[],I&&this.params[`${u}_no_context_takeover`])this._deflate.reset();_(null,U)})}}YT.exports=vT;function gf($){this[x6].push($),this[G6]+=$.length}function HT($){if(this[G6]+=$.length,this[yu]._maxPayload<1||this[G6]<=this[yu]._maxPayload){this[x6].push($);return}this[R0]=RangeError("Max payload size exceeded"),this[R0].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[R0][QT]=1009,this.removeListener("data",HT),this.reset()}function Jf($){if(this[yu]._inflate=null,this[R0]){this[W0](this[R0]);return}$[QT]=1007,this[W0]($)}});var P0=w((Md,iu)=>{var{isUtf8:OT}=z$("buffer"),{hasBlob:Gf}=J6(),qf=[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 Xf($){return $>=1000&&$<=1014&&$!==1004&&$!==1005&&$!==1006||$>=3000&&$<=4999}function lX($){let I=$.length,_=0;while(_<I)if(($[_]&128)===0)_++;else if(($[_]&224)===192){if(_+1===I||($[_+1]&192)!==128||($[_]&254)===192)return!1;_+=2}else if(($[_]&240)===224){if(_+2>=I||($[_+1]&192)!==128||($[_+2]&192)!==128||$[_]===224&&($[_+1]&224)===128||$[_]===237&&($[_+1]&224)===160)return!1;_+=3}else if(($[_]&248)===240){if(_+3>=I||($[_+1]&192)!==128||($[_+2]&192)!==128||($[_+3]&192)!==128||$[_]===240&&($[_+1]&240)===128||$[_]===244&&$[_+1]>143||$[_]>244)return!1;_+=4}else return!1;return!0}function Nf($){return Gf&&typeof $==="object"&&typeof $.arrayBuffer==="function"&&typeof $.type==="string"&&typeof $.stream==="function"&&($[Symbol.toStringTag]==="Blob"||$[Symbol.toStringTag]==="File")}iu.exports={isBlob:Nf,isValidStatusCode:Xf,isValidUTF8:lX,tokenChars:qf};if(OT)iu.exports.isValidUTF8=function($){return $.length<24?lX($):OT($)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let $=(()=>{throw new Error("Cannot require module "+"utf-8-validate");})();iu.exports.isValidUTF8=function(I){return I.length<32?lX(I):$(I)}}catch($){}});var rX=w((Kd,DT)=>{var{Writable:Qf}=z$("stream"),TT=uU(),{BINARY_TYPES:vf,EMPTY_BUFFER:BT,kStatusCode:Hf,kWebSocket:Yf}=J6(),{concat:mX,toArrayBuffer:Of,unmask:Tf}=UU(),{isValidStatusCode:Bf,isValidUTF8:MT}=P0(),lu=Buffer[Symbol.species];class KT extends Qf{constructor($={}){super();this._allowSynchronousEvents=$.allowSynchronousEvents!==void 0?$.allowSynchronousEvents:!0,this._binaryType=$.binaryType||vf[0],this._extensions=$.extensions||{},this._isServer=!!$.isServer,this._maxPayload=$.maxPayload|0,this._skipUTF8Validation=!!$.skipUTF8Validation,this[Yf]=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,_){if(this._opcode===8&&this._state==0)return _();this._bufferedBytes+=$.length,this._buffers.push($),this.startLoop(_)}consume($){if(this._bufferedBytes-=$,$===this._buffers[0].length)return this._buffers.shift();if($<this._buffers[0].length){let _=this._buffers[0];return this._buffers[0]=new lu(_.buffer,_.byteOffset+$,_.length-$),new lu(_.buffer,_.byteOffset,$)}let I=Buffer.allocUnsafe($);do{let _=this._buffers[0],u=I.length-$;if($>=_.length)I.set(this._buffers.shift(),u);else I.set(new Uint8Array(_.buffer,_.byteOffset,$),u),this._buffers[0]=new lu(_.buffer,_.byteOffset+$,_.length-$);$-=_.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 u=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");$(u);return}let _=(I[0]&64)===64;if(_&&!this._extensions[TT.extensionName]){let u=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");$(u);return}if(this._fin=(I[0]&128)===128,this._opcode=I[0]&15,this._payloadLength=I[1]&127,this._opcode===0){if(_){let u=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");$(u);return}if(!this._fragmented){let u=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");$(u);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let u=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");$(u);return}this._compressed=_}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let u=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");$(u);return}if(_){let u=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");$(u);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let u=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");$(u);return}}else{let u=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");$(u);return}if(!this._fin&&!this._fragmented)this._fragmented=this._opcode;if(this._masked=(I[1]&128)===128,this._isServer){if(!this._masked){let u=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");$(u);return}}else if(this._masked){let u=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");$(u);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),_=I.readUInt32BE(0);if(_>Math.pow(2,21)-1){let u=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");$(u);return}this._payloadLength=_*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=BT;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)Tf(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[TT.extensionName].decompress($,this._fin,(u,U)=>{if(u)return I(u);if(U.length){if(this._messageLength+=U.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let z=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");I(z);return}this._fragments.push(U)}if(this.dataMessage(I),this._state===0)this.startLoop(I)})}dataMessage($){if(!this._fin){this._state=0;return}let I=this._messageLength,_=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let u;if(this._binaryType==="nodebuffer")u=mX(_,I);else if(this._binaryType==="arraybuffer")u=Of(mX(_,I));else if(this._binaryType==="blob")u=new Blob(_);else u=_;if(this._allowSynchronousEvents)this.emit("message",u,!0),this._state=0;else this._state=6,setImmediate(()=>{this.emit("message",u,!0),this._state=0,this.startLoop($)})}else{let u=mX(_,I);if(!this._skipUTF8Validation&&!MT(u)){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",u,!1),this._state=0;else this._state=6,setImmediate(()=>{this.emit("message",u,!1),this._state=0,this.startLoop($)})}}controlMessage($,I){if(this._opcode===8){if($.length===0)this._loop=!1,this.emit("conclude",1005,BT),this.end();else{let _=$.readUInt16BE(0);if(!Bf(_)){let U=this.createError(RangeError,`invalid status code ${_}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");I(U);return}let u=new lu($.buffer,$.byteOffset+2,$.length-2);if(!this._skipUTF8Validation&&!MT(u)){let U=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");I(U);return}this._loop=!1,this.emit("conclude",_,u),this.end()}this._state=0;return}if(this._allowSynchronousEvents)this.emit(this._opcode===9?"ping":"pong",$),this._state=0;else this._state=6,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",$),this._state=0,this.startLoop(I)})}createError($,I,_,u,U){this._loop=!1,this._errored=!0;let z=new $(_?`Invalid WebSocket frame: ${I}`:I);return Error.captureStackTrace(z,this.createError),z.code=U,z[Hf]=u,z}}DT.exports=KT});var hX=w((Ld,ZT)=>{var{Duplex:Dd}=z$("stream"),{randomFillSync:Mf}=z$("crypto"),LT=uU(),{EMPTY_BUFFER:Kf,kWebSocket:Df,NOOP:Lf}=J6(),{isBlob:b0,isValidStatusCode:Vf}=P0(),{mask:VT,toBuffer:D1}=UU(),B4=Symbol("kByteLength"),Zf=Buffer.alloc(4),L1,A0=8192,P4=0,Wf=1,Rf=2;class k6{constructor($,I,_){if(this._extensions=I||{},_)this._generateMask=_,this._maskBuffer=Buffer.alloc(4);this._socket=$,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=P4,this.onerror=Lf,this[Df]=void 0}static frame($,I){let _,u=!1,U=2,z=!1;if(I.mask){if(_=I.maskBuffer||Zf,I.generateMask)I.generateMask(_);else{if(A0===8192){if(L1===void 0)L1=Buffer.alloc(8192);Mf(L1,0,8192),A0=0}_[0]=L1[A0++],_[1]=L1[A0++],_[2]=L1[A0++],_[3]=L1[A0++]}z=(_[0]|_[1]|_[2]|_[3])===0,U=6}let g;if(typeof $==="string")if((!I.mask||z)&&I[B4]!==void 0)g=I[B4];else $=Buffer.from($),g=$.length;else g=$.length,u=I.mask&&I.readOnly&&!z;let J=g;if(g>=65536)U+=8,J=127;else if(g>125)U+=2,J=126;let G=Buffer.allocUnsafe(u?g+U:U);if(G[0]=I.fin?I.opcode|128:I.opcode,I.rsv1)G[0]|=64;if(G[1]=J,J===126)G.writeUInt16BE(g,2);else if(J===127)G[2]=G[3]=0,G.writeUIntBE(g,4,6);if(!I.mask)return[G,$];if(G[1]|=128,G[U-4]=_[0],G[U-3]=_[1],G[U-2]=_[2],G[U-1]=_[3],z)return[G,$];if(u)return VT($,_,G,U,g),[G];return VT($,_,$,0,g),[G,$]}close($,I,_,u){let U;if($===void 0)U=Kf;else if(typeof $!=="number"||!Vf($))throw TypeError("First argument must be a valid error code number");else if(I===void 0||!I.length)U=Buffer.allocUnsafe(2),U.writeUInt16BE($,0);else{let g=Buffer.byteLength(I);if(g>123)throw RangeError("The message must not be greater than 123 bytes");if(U=Buffer.allocUnsafe(2+g),U.writeUInt16BE($,0),typeof I==="string")U.write(I,2);else U.set(I,2)}let z={[B4]:U.length,fin:!0,generateMask:this._generateMask,mask:_,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};if(this._state!==P4)this.enqueue([this.dispatch,U,!1,z,u]);else this.sendFrame(k6.frame(U,z),u)}ping($,I,_){let u,U;if(typeof $==="string")u=Buffer.byteLength($),U=!1;else if(b0($))u=$.size,U=!1;else $=D1($),u=$.length,U=D1.readOnly;if(u>125)throw RangeError("The data size must not be greater than 125 bytes");let z={[B4]:u,fin:!0,generateMask:this._generateMask,mask:I,maskBuffer:this._maskBuffer,opcode:9,readOnly:U,rsv1:!1};if(b0($))if(this._state!==P4)this.enqueue([this.getBlobData,$,!1,z,_]);else this.getBlobData($,!1,z,_);else if(this._state!==P4)this.enqueue([this.dispatch,$,!1,z,_]);else this.sendFrame(k6.frame($,z),_)}pong($,I,_){let u,U;if(typeof $==="string")u=Buffer.byteLength($),U=!1;else if(b0($))u=$.size,U=!1;else $=D1($),u=$.length,U=D1.readOnly;if(u>125)throw RangeError("The data size must not be greater than 125 bytes");let z={[B4]:u,fin:!0,generateMask:this._generateMask,mask:I,maskBuffer:this._maskBuffer,opcode:10,readOnly:U,rsv1:!1};if(b0($))if(this._state!==P4)this.enqueue([this.getBlobData,$,!1,z,_]);else this.getBlobData($,!1,z,_);else if(this._state!==P4)this.enqueue([this.dispatch,$,!1,z,_]);else this.sendFrame(k6.frame($,z),_)}send($,I,_){let u=this._extensions[LT.extensionName],U=I.binary?2:1,z=I.compress,g,J;if(typeof $==="string")g=Buffer.byteLength($),J=!1;else if(b0($))g=$.size,J=!1;else $=D1($),g=$.length,J=D1.readOnly;if(this._firstFragment){if(this._firstFragment=!1,z&&u&&u.params[u._isServer?"server_no_context_takeover":"client_no_context_takeover"])z=g>=u._threshold;this._compress=z}else z=!1,U=0;if(I.fin)this._firstFragment=!0;let G={[B4]:g,fin:I.fin,generateMask:this._generateMask,mask:I.mask,maskBuffer:this._maskBuffer,opcode:U,readOnly:J,rsv1:z};if(b0($))if(this._state!==P4)this.enqueue([this.getBlobData,$,this._compress,G,_]);else this.getBlobData($,this._compress,G,_);else if(this._state!==P4)this.enqueue([this.dispatch,$,this._compress,G,_]);else this.dispatch($,this._compress,G,_)}getBlobData($,I,_,u){this._bufferedBytes+=_[B4],this._state=Rf,$.arrayBuffer().then((U)=>{if(this._socket.destroyed){let g=Error("The socket was closed while the blob was being read");process.nextTick(nX,this,g,u);return}this._bufferedBytes-=_[B4];let z=D1(U);if(!I)this._state=P4,this.sendFrame(k6.frame(z,_),u),this.dequeue();else this.dispatch(z,I,_,u)}).catch((U)=>{process.nextTick(Pf,this,U,u)})}dispatch($,I,_,u){if(!I){this.sendFrame(k6.frame($,_),u);return}let U=this._extensions[LT.extensionName];this._bufferedBytes+=_[B4],this._state=Wf,U.compress($,_.fin,(z,g)=>{if(this._socket.destroyed){let J=Error("The socket was closed while data was being compressed");nX(this,J,u);return}this._bufferedBytes-=_[B4],this._state=P4,_.readOnly=!1,this.sendFrame(k6.frame(g,_),u),this.dequeue()})}dequeue(){while(this._state===P4&&this._queue.length){let $=this._queue.shift();this._bufferedBytes-=$[3][B4],Reflect.apply($[0],this,$.slice(1))}}enqueue($){this._bufferedBytes+=$[3][B4],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)}}ZT.exports=k6;function nX($,I,_){if(typeof _==="function")_(I);for(let u=0;u<$._queue.length;u++){let U=$._queue[u],z=U[U.length-1];if(typeof z==="function")z(I)}}function Pf($,I,_){nX($,I,_),$.onerror(I)}});var wT=w((Vd,ST)=>{var{kForOnEventAttribute:zU,kListener:dX}=J6(),WT=Symbol("kCode"),RT=Symbol("kData"),PT=Symbol("kError"),bT=Symbol("kMessage"),AT=Symbol("kReason"),j0=Symbol("kTarget"),jT=Symbol("kType"),FT=Symbol("kWasClean");class y6{constructor($){this[j0]=null,this[jT]=$}get target(){return this[j0]}get type(){return this[jT]}}Object.defineProperty(y6.prototype,"target",{enumerable:!0});Object.defineProperty(y6.prototype,"type",{enumerable:!0});class F0 extends y6{constructor($,I={}){super($);this[WT]=I.code===void 0?0:I.code,this[AT]=I.reason===void 0?"":I.reason,this[FT]=I.wasClean===void 0?!1:I.wasClean}get code(){return this[WT]}get reason(){return this[AT]}get wasClean(){return this[FT]}}Object.defineProperty(F0.prototype,"code",{enumerable:!0});Object.defineProperty(F0.prototype,"reason",{enumerable:!0});Object.defineProperty(F0.prototype,"wasClean",{enumerable:!0});class gU extends y6{constructor($,I={}){super($);this[PT]=I.error===void 0?null:I.error,this[bT]=I.message===void 0?"":I.message}get error(){return this[PT]}get message(){return this[bT]}}Object.defineProperty(gU.prototype,"error",{enumerable:!0});Object.defineProperty(gU.prototype,"message",{enumerable:!0});class ru extends y6{constructor($,I={}){super($);this[RT]=I.data===void 0?null:I.data}get data(){return this[RT]}}Object.defineProperty(ru.prototype,"data",{enumerable:!0});var bf={addEventListener($,I,_={}){for(let U of this.listeners($))if(!_[zU]&&U[dX]===I&&!U[zU])return;let u;if($==="message")u=function(z,g){let J=new ru("message",{data:g?z:z.toString()});J[j0]=this,mu(I,this,J)};else if($==="close")u=function(z,g){let J=new F0("close",{code:z,reason:g.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});J[j0]=this,mu(I,this,J)};else if($==="error")u=function(z){let g=new gU("error",{error:z,message:z.message});g[j0]=this,mu(I,this,g)};else if($==="open")u=function(){let z=new y6("open");z[j0]=this,mu(I,this,z)};else return;if(u[zU]=!!_[zU],u[dX]=I,_.once)this.once($,u);else this.on($,u)},removeEventListener($,I){for(let _ of this.listeners($))if(_[dX]===I&&!_[zU]){this.removeListener($,_);break}}};ST.exports={CloseEvent:F0,ErrorEvent:gU,Event:y6,EventTarget:bf,MessageEvent:ru};function mu($,I,_){if(typeof $==="object"&&$.handleEvent)$.handleEvent.call($,_);else $.call(I,_)}});var cX=w((Zd,ET)=>{var{tokenChars:JU}=P0();function d4($,I,_){if($[I]===void 0)$[I]=[_];else $[I].push(_)}function Af($){let I=Object.create(null),_=Object.create(null),u=!1,U=!1,z=!1,g,J,G=-1,q=-1,N=-1,X=0;for(;X<$.length;X++)if(q=$.charCodeAt(X),g===void 0)if(N===-1&&JU[q]===1){if(G===-1)G=X}else if(X!==0&&(q===32||q===9)){if(N===-1&&G!==-1)N=X}else if(q===59||q===44){if(G===-1)throw SyntaxError(`Unexpected character at index ${X}`);if(N===-1)N=X;let H=$.slice(G,N);if(q===44)d4(I,H,_),_=Object.create(null);else g=H;G=N=-1}else throw SyntaxError(`Unexpected character at index ${X}`);else if(J===void 0)if(N===-1&&JU[q]===1){if(G===-1)G=X}else if(q===32||q===9){if(N===-1&&G!==-1)N=X}else if(q===59||q===44){if(G===-1)throw SyntaxError(`Unexpected character at index ${X}`);if(N===-1)N=X;if(d4(_,$.slice(G,N),!0),q===44)d4(I,g,_),_=Object.create(null),g=void 0;G=N=-1}else if(q===61&&G!==-1&&N===-1)J=$.slice(G,X),G=N=-1;else throw SyntaxError(`Unexpected character at index ${X}`);else if(U){if(JU[q]!==1)throw SyntaxError(`Unexpected character at index ${X}`);if(G===-1)G=X;else if(!u)u=!0;U=!1}else if(z)if(JU[q]===1){if(G===-1)G=X}else if(q===34&&G!==-1)z=!1,N=X;else if(q===92)U=!0;else throw SyntaxError(`Unexpected character at index ${X}`);else if(q===34&&$.charCodeAt(X-1)===61)z=!0;else if(N===-1&&JU[q]===1){if(G===-1)G=X}else if(G!==-1&&(q===32||q===9)){if(N===-1)N=X}else if(q===59||q===44){if(G===-1)throw SyntaxError(`Unexpected character at index ${X}`);if(N===-1)N=X;let H=$.slice(G,N);if(u)H=H.replace(/\\/g,""),u=!1;if(d4(_,J,H),q===44)d4(I,g,_),_=Object.create(null),g=void 0;J=void 0,G=N=-1}else throw SyntaxError(`Unexpected character at index ${X}`);if(G===-1||z||q===32||q===9)throw SyntaxError("Unexpected end of input");if(N===-1)N=X;let Q=$.slice(G,N);if(g===void 0)d4(I,Q,_);else{if(J===void 0)d4(_,Q,!0);else if(u)d4(_,J,Q.replace(/\\/g,""));else d4(_,J,Q);d4(I,g,_)}return I}function jf($){return Object.keys($).map((I)=>{let _=$[I];if(!Array.isArray(_))_=[_];return _.map((u)=>{return[I].concat(Object.keys(u).map((U)=>{let z=u[U];if(!Array.isArray(z))z=[z];return z.map((g)=>g===!0?U:`${U}=${g}`).join("; ")})).join("; ")}).join(", ")}).join(", ")}ET.exports={format:jf,parse:Af}});var cu=w((Pd,dT)=>{var Ff=z$("events"),Sf=z$("https"),wf=z$("http"),xT=z$("net"),Ef=z$("tls"),{randomBytes:Cf,createHash:ff}=z$("crypto"),{Duplex:Wd,Readable:Rd}=z$("stream"),{URL:pX}=z$("url"),i6=uU(),xf=rX(),kf=hX(),{isBlob:yf}=P0(),{BINARY_TYPES:CT,CLOSE_TIMEOUT:lf,EMPTY_BUFFER:nu,GUID:mf,kForOnEventAttribute:oX,kListener:rf,kStatusCode:nf,kWebSocket:F$,NOOP:kT}=J6(),{EventTarget:{addEventListener:hf,removeEventListener:df}}=wT(),{format:cf,parse:pf}=cX(),{toBuffer:of}=UU(),yT=Symbol("kAborted"),tX=[8,13],q6=["CONNECTING","OPEN","CLOSING","CLOSED"],tf=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class c extends Ff{constructor($,I,_){super();if(this._binaryType=CT[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=nu,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=c.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)_=I,I=[];else I=[I];iT(this,$,I,_)}else this._autoPong=_.autoPong,this._closeTimeout=_.closeTimeout,this._isServer=!0}get binaryType(){return this._binaryType}set binaryType($){if(!CT.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,_){let u=new xf({allowSynchronousEvents:_.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:_.maxPayload,skipUTF8Validation:_.skipUTF8Validation}),U=new kf($,this._extensions,_.generateMask);if(this._receiver=u,this._sender=U,this._socket=$,u[F$]=this,U[F$]=this,$[F$]=this,u.on("conclude",sf),u.on("drain",$x),u.on("error",Ix),u.on("message",Ux),u.on("ping",_x),u.on("pong",ux),U.onerror=zx,$.setTimeout)$.setTimeout(0);if($.setNoDelay)$.setNoDelay();if(I.length>0)$.unshift(I);$.on("close",rT),$.on("data",du),$.on("end",nT),$.on("error",hT),this._readyState=c.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=c.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}if(this._extensions[i6.extensionName])this._extensions[i6.extensionName].cleanup();this._receiver.removeAllListeners(),this._readyState=c.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close($,I){if(this.readyState===c.CLOSED)return;if(this.readyState===c.CONNECTING){q4(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===c.CLOSING){if(this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted))this._socket.end();return}this._readyState=c.CLOSING,this._sender.close($,I,!this._isServer,(_)=>{if(_)return;if(this._closeFrameSent=!0,this._closeFrameReceived||this._receiver._writableState.errorEmitted)this._socket.end()}),mT(this)}pause(){if(this.readyState===c.CONNECTING||this.readyState===c.CLOSED)return;this._paused=!0,this._socket.pause()}ping($,I,_){if(this.readyState===c.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof $==="function")_=$,$=I=void 0;else if(typeof I==="function")_=I,I=void 0;if(typeof $==="number")$=$.toString();if(this.readyState!==c.OPEN){aX(this,$,_);return}if(I===void 0)I=!this._isServer;this._sender.ping($||nu,I,_)}pong($,I,_){if(this.readyState===c.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof $==="function")_=$,$=I=void 0;else if(typeof I==="function")_=I,I=void 0;if(typeof $==="number")$=$.toString();if(this.readyState!==c.OPEN){aX(this,$,_);return}if(I===void 0)I=!this._isServer;this._sender.pong($||nu,I,_)}resume(){if(this.readyState===c.CONNECTING||this.readyState===c.CLOSED)return;if(this._paused=!1,!this._receiver._writableState.needDrain)this._socket.resume()}send($,I,_){if(this.readyState===c.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof I==="function")_=I,I={};if(typeof $==="number")$=$.toString();if(this.readyState!==c.OPEN){aX(this,$,_);return}let u={binary:typeof $!=="string",mask:!this._isServer,compress:!0,fin:!0,...I};if(!this._extensions[i6.extensionName])u.compress=!1;this._sender.send($||nu,u,_)}terminate(){if(this.readyState===c.CLOSED)return;if(this.readyState===c.CONNECTING){q4(this,this._req,"WebSocket was closed before the connection was established");return}if(this._socket)this._readyState=c.CLOSING,this._socket.destroy()}}Object.defineProperty(c,"CONNECTING",{enumerable:!0,value:q6.indexOf("CONNECTING")});Object.defineProperty(c.prototype,"CONNECTING",{enumerable:!0,value:q6.indexOf("CONNECTING")});Object.defineProperty(c,"OPEN",{enumerable:!0,value:q6.indexOf("OPEN")});Object.defineProperty(c.prototype,"OPEN",{enumerable:!0,value:q6.indexOf("OPEN")});Object.defineProperty(c,"CLOSING",{enumerable:!0,value:q6.indexOf("CLOSING")});Object.defineProperty(c.prototype,"CLOSING",{enumerable:!0,value:q6.indexOf("CLOSING")});Object.defineProperty(c,"CLOSED",{enumerable:!0,value:q6.indexOf("CLOSED")});Object.defineProperty(c.prototype,"CLOSED",{enumerable:!0,value:q6.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(($)=>{Object.defineProperty(c.prototype,$,{enumerable:!0})});["open","error","close","message"].forEach(($)=>{Object.defineProperty(c.prototype,`on${$}`,{enumerable:!0,get(){for(let I of this.listeners($))if(I[oX])return I[rf];return null},set(I){for(let _ of this.listeners($))if(_[oX]){this.removeListener($,_);break}if(typeof I!=="function")return;this.addEventListener($,I,{[oX]:!0})}})});c.prototype.addEventListener=hf;c.prototype.removeEventListener=df;dT.exports=c;function iT($,I,_,u){let U={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:lf,protocolVersion:tX[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...u,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,!tX.includes(U.protocolVersion))throw RangeError(`Unsupported protocol version: ${U.protocolVersion} (supported versions: ${tX.join(", ")})`);let z;if(I instanceof pX)z=I;else try{z=new pX(I)}catch(v){throw SyntaxError(`Invalid URL: ${I}`)}if(z.protocol==="http:")z.protocol="ws:";else if(z.protocol==="https:")z.protocol="wss:";$._url=z.href;let g=z.protocol==="wss:",J=z.protocol==="ws+unix:",G;if(z.protocol!=="ws:"&&!g&&!J)G=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`;else if(J&&!z.pathname)G="The URL's pathname is empty";else if(z.hash)G="The URL contains a fragment identifier";if(G){let v=SyntaxError(G);if($._redirects===0)throw v;else{hu($,v);return}}let q=g?443:80,N=Cf(16).toString("base64"),X=g?Sf.request:wf.request,Q=new Set,H;if(U.createConnection=U.createConnection||(g?ef:af),U.defaultPort=U.defaultPort||q,U.port=z.port||q,U.host=z.hostname.startsWith("[")?z.hostname.slice(1,-1):z.hostname,U.headers={...U.headers,"Sec-WebSocket-Version":U.protocolVersion,"Sec-WebSocket-Key":N,Connection:"Upgrade",Upgrade:"websocket"},U.path=z.pathname+z.search,U.timeout=U.handshakeTimeout,U.perMessageDeflate)H=new i6(U.perMessageDeflate!==!0?U.perMessageDeflate:{},!1,U.maxPayload),U.headers["Sec-WebSocket-Extensions"]=cf({[i6.extensionName]:H.offer()});if(_.length){for(let v of _){if(typeof v!=="string"||!tf.test(v)||Q.has(v))throw SyntaxError("An invalid or duplicated subprotocol was specified");Q.add(v)}U.headers["Sec-WebSocket-Protocol"]=_.join(",")}if(U.origin)if(U.protocolVersion<13)U.headers["Sec-WebSocket-Origin"]=U.origin;else U.headers.Origin=U.origin;if(z.username||z.password)U.auth=`${z.username}:${z.password}`;if(J){let v=U.path.split(":");U.socketPath=v[0],U.path=v[1]}let Y;if(U.followRedirects){if($._redirects===0){$._originalIpc=J,$._originalSecure=g,$._originalHostOrSocketPath=J?U.socketPath:z.host;let v=u&&u.headers;if(u={...u,headers:{}},v)for(let[O,T]of Object.entries(v))u.headers[O.toLowerCase()]=T}else if($.listenerCount("redirect")===0){let v=J?$._originalIpc?U.socketPath===$._originalHostOrSocketPath:!1:$._originalIpc?!1:z.host===$._originalHostOrSocketPath;if(!v||$._originalSecure&&!g){if(delete U.headers.authorization,delete U.headers.cookie,!v)delete U.headers.host;U.auth=void 0}}if(U.auth&&!u.headers.authorization)u.headers.authorization="Basic "+Buffer.from(U.auth).toString("base64");if(Y=$._req=X(U),$._redirects)$.emit("redirect",$.url,Y)}else Y=$._req=X(U);if(U.timeout)Y.on("timeout",()=>{q4($,Y,"Opening handshake has timed out")});if(Y.on("error",(v)=>{if(Y===null||Y[yT])return;Y=$._req=null,hu($,v)}),Y.on("response",(v)=>{let O=v.headers.location,T=v.statusCode;if(O&&U.followRedirects&&T>=300&&T<400){if(++$._redirects>U.maxRedirects){q4($,Y,"Maximum redirects exceeded");return}Y.abort();let V;try{V=new pX(O,I)}catch(R){let L=SyntaxError(`Invalid URL: ${O}`);hu($,L);return}iT($,V,_,u)}else if(!$.emit("unexpected-response",Y,v))q4($,Y,`Unexpected server response: ${v.statusCode}`)}),Y.on("upgrade",(v,O,T)=>{if($.emit("upgrade",v),$.readyState!==c.CONNECTING)return;Y=$._req=null;let V=v.headers.upgrade;if(V===void 0||V.toLowerCase()!=="websocket"){q4($,O,"Invalid Upgrade header");return}let R=ff("sha1").update(N+mf).digest("base64");if(v.headers["sec-websocket-accept"]!==R){q4($,O,"Invalid Sec-WebSocket-Accept header");return}let L=v.headers["sec-websocket-protocol"],K;if(L!==void 0){if(!Q.size)K="Server sent a subprotocol but none was requested";else if(!Q.has(L))K="Server sent an invalid subprotocol"}else if(Q.size)K="Server sent no subprotocol";if(K){q4($,O,K);return}if(L)$._protocol=L;let Z=v.headers["sec-websocket-extensions"];if(Z!==void 0){if(!H){q4($,O,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let B;try{B=pf(Z)}catch(F){q4($,O,"Invalid Sec-WebSocket-Extensions header");return}let D=Object.keys(B);if(D.length!==1||D[0]!==i6.extensionName){q4($,O,"Server indicated an extension that was not requested");return}try{H.accept(B[i6.extensionName])}catch(F){q4($,O,"Invalid Sec-WebSocket-Extensions header");return}$._extensions[i6.extensionName]=H}$.setSocket(O,T,{allowSynchronousEvents:U.allowSynchronousEvents,generateMask:U.generateMask,maxPayload:U.maxPayload,skipUTF8Validation:U.skipUTF8Validation})}),U.finishRequest)U.finishRequest(Y,$);else Y.end()}function hu($,I){$._readyState=c.CLOSING,$._errorEmitted=!0,$.emit("error",I),$.emitClose()}function af($){return $.path=$.socketPath,xT.connect($)}function ef($){if($.path=void 0,!$.servername&&$.servername!=="")$.servername=xT.isIP($.host)?"":$.host;return Ef.connect($)}function q4($,I,_){$._readyState=c.CLOSING;let u=Error(_);if(Error.captureStackTrace(u,q4),I.setHeader){if(I[yT]=!0,I.abort(),I.socket&&!I.socket.destroyed)I.socket.destroy();process.nextTick(hu,$,u)}else I.destroy(u),I.once("error",$.emit.bind($,"error")),I.once("close",$.emitClose.bind($))}function aX($,I,_){if(I){let u=yf(I)?I.size:of(I).length;if($._socket)$._sender._bufferedBytes+=u;else $._bufferedAmount+=u}if(_){let u=Error(`WebSocket is not open: readyState ${$.readyState} (${q6[$.readyState]})`);process.nextTick(_,u)}}function sf($,I){let _=this[F$];if(_._closeFrameReceived=!0,_._closeMessage=I,_._closeCode=$,_._socket[F$]===void 0)return;if(_._socket.removeListener("data",du),process.nextTick(lT,_._socket),$===1005)_.close();else _.close($,I)}function $x(){let $=this[F$];if(!$.isPaused)$._socket.resume()}function Ix($){let I=this[F$];if(I._socket[F$]!==void 0)I._socket.removeListener("data",du),process.nextTick(lT,I._socket),I.close($[nf]);if(!I._errorEmitted)I._errorEmitted=!0,I.emit("error",$)}function fT(){this[F$].emitClose()}function Ux($,I){this[F$].emit("message",$,I)}function _x($){let I=this[F$];if(I._autoPong)I.pong($,!this._isServer,kT);I.emit("ping",$)}function ux($){this[F$].emit("pong",$)}function lT($){$.resume()}function zx($){let I=this[F$];if(I.readyState===c.CLOSED)return;if(I.readyState===c.OPEN)I._readyState=c.CLOSING,mT(I);if(this._socket.end(),!I._errorEmitted)I._errorEmitted=!0,I.emit("error",$)}function mT($){$._closeTimer=setTimeout($._socket.destroy.bind($._socket),$._closeTimeout)}function rT(){let $=this[F$];if(this.removeListener("close",rT),this.removeListener("data",du),this.removeListener("end",nT),$._readyState=c.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[F$]=void 0,clearTimeout($._closeTimer),$._receiver._writableState.finished||$._receiver._writableState.errorEmitted)$.emitClose();else $._receiver.on("error",fT),$._receiver.on("finish",fT)}function du($){if(!this[F$]._receiver.write($))this.pause()}function nT(){let $=this[F$];$._readyState=c.CLOSING,$._receiver.end(),this.end()}function hT(){let $=this[F$];if(this.removeListener("error",hT),this.on("error",kT),$)$._readyState=c.CLOSING,this.destroy()}});var tT=w((Ad,oT)=>{var bd=cu(),{Duplex:gx}=z$("stream");function cT($){$.emit("close")}function Jx(){if(!this.destroyed&&this._writableState.finished)this.destroy()}function pT($){if(this.removeListener("error",pT),this.destroy(),this.listenerCount("error")===0)this.emit("error",$)}function Gx($,I){let _=!0,u=new gx({...I,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return $.on("message",function(z,g){let J=!g&&u._readableState.objectMode?z.toString():z;if(!u.push(J))$.pause()}),$.once("error",function(z){if(u.destroyed)return;_=!1,u.destroy(z)}),$.once("close",function(){if(u.destroyed)return;u.push(null)}),u._destroy=function(U,z){if($.readyState===$.CLOSED){z(U),process.nextTick(cT,u);return}let g=!1;if($.once("error",function(G){g=!0,z(G)}),$.once("close",function(){if(!g)z(U);process.nextTick(cT,u)}),_)$.terminate()},u._final=function(U){if($.readyState===$.CONNECTING){$.once("open",function(){u._final(U)});return}if($._socket===null)return;if($._socket._writableState.finished){if(U(),u._readableState.endEmitted)u.destroy()}else $._socket.once("finish",function(){U()}),$.close()},u._read=function(){if($.isPaused)$.resume()},u._write=function(U,z,g){if($.readyState===$.CONNECTING){$.once("open",function(){u._write(U,z,g)});return}$.send(U,g)},u.on("end",Jx),u.on("error",pT),u}oT.exports=Gx});var eT=w((jd,aT)=>{var{tokenChars:qx}=P0();function Xx($){let I=new Set,_=-1,u=-1,U=0;for(U;U<$.length;U++){let g=$.charCodeAt(U);if(u===-1&&qx[g]===1){if(_===-1)_=U}else if(U!==0&&(g===32||g===9)){if(u===-1&&_!==-1)u=U}else if(g===44){if(_===-1)throw SyntaxError(`Unexpected character at index ${U}`);if(u===-1)u=U;let J=$.slice(_,u);if(I.has(J))throw SyntaxError(`The "${J}" subprotocol is duplicated`);I.add(J),_=u=-1}else throw SyntaxError(`Unexpected character at index ${U}`)}if(_===-1||u!==-1)throw SyntaxError("Unexpected end of input");let z=$.slice(_,U);if(I.has(z))throw SyntaxError(`The "${z}" subprotocol is duplicated`);return I.add(z),I}aT.exports={parse:Xx}});var _B=w((Sd,UB)=>{var Nx=z$("events"),pu=z$("http"),{Duplex:Fd}=z$("stream"),{createHash:Qx}=z$("crypto"),sT=cX(),V1=uU(),vx=eT(),Hx=cu(),{CLOSE_TIMEOUT:Yx,GUID:Ox,kWebSocket:Tx}=J6(),Bx=/^[+/0-9A-Za-z]{22}==$/;class IB extends Nx{constructor($,I){super();if($={allowSynchronousEvents:!0,autoPong:!0,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:Yx,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:Hx,...$},$.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=pu.createServer((_,u)=>{let U=pu.STATUS_CODES[426];u.writeHead(426,{"Content-Length":U.length,"Content-Type":"text/plain"}),u.end(U)}),this._server.listen($.port,$.host,$.backlog,I);else if($.server)this._server=$.server;if(this._server){let _=this.emit.bind(this,"connection");this._removeListeners=Mx(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(u,U,z)=>{this.handleUpgrade(u,U,z,_)}})}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(GU,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(GU,this);else this._shouldEmitClose=!0;else process.nextTick(GU,this)}else{let I=this._server;this._removeListeners(),this._removeListeners=this._server=null,I.close(()=>{GU(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",$B);let U=$.headers["sec-websocket-key"],z=$.headers.upgrade,g=+$.headers["sec-websocket-version"];if($.method!=="GET"){Z1(this,$,I,405,"Invalid HTTP method");return}if(z===void 0||z.toLowerCase()!=="websocket"){Z1(this,$,I,400,"Invalid Upgrade header");return}if(U===void 0||!Bx.test(U)){Z1(this,$,I,400,"Missing or invalid Sec-WebSocket-Key header");return}if(g!==13&&g!==8){Z1(this,$,I,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle($)){qU(I,400);return}let J=$.headers["sec-websocket-protocol"],G=new Set;if(J!==void 0)try{G=vx.parse(J)}catch(X){Z1(this,$,I,400,"Invalid Sec-WebSocket-Protocol header");return}let q=$.headers["sec-websocket-extensions"],N={};if(this.options.perMessageDeflate&&q!==void 0){let X=new V1(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let Q=sT.parse(q);if(Q[V1.extensionName])X.accept(Q[V1.extensionName]),N[V1.extensionName]=X}catch(Q){Z1(this,$,I,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let X={origin:$.headers[`${g===8?"sec-websocket-origin":"origin"}`],secure:!!($.socket.authorized||$.socket.encrypted),req:$};if(this.options.verifyClient.length===2){this.options.verifyClient(X,(Q,H,Y,v)=>{if(!Q)return qU(I,H||401,Y,v);this.completeUpgrade(N,U,G,$,I,_,u)});return}if(!this.options.verifyClient(X))return qU(I,401)}this.completeUpgrade(N,U,G,$,I,_,u)}completeUpgrade($,I,_,u,U,z,g){if(!U.readable||!U.writable)return U.destroy();if(U[Tx])throw Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>0)return qU(U,503);let G=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${Qx("sha1").update(I+Ox).digest("base64")}`],q=new this.options.WebSocket(null,void 0,this.options);if(_.size){let N=this.options.handleProtocols?this.options.handleProtocols(_,u):_.values().next().value;if(N)G.push(`Sec-WebSocket-Protocol: ${N}`),q._protocol=N}if($[V1.extensionName]){let N=$[V1.extensionName].params,X=sT.format({[V1.extensionName]:[N]});G.push(`Sec-WebSocket-Extensions: ${X}`),q._extensions=$}if(this.emit("headers",G,u),U.write(G.concat(`\r
|
|
256
|
+
`)},info:($,I)=>{a.message($,{...I,symbol:P("blue",HS)})},success:($,I)=>{a.message($,{...I,symbol:P("green",YS)})},step:($,I)=>{a.message($,{...I,symbol:P("green",Iu)})},warn:($,I)=>{a.message($,{...I,symbol:P("yellow",OS)})},warning:($,I)=>{a.warn($,I)},error:($,I)=>{a.message($,{...I,symbol:P("red",TS)})}},Hr={light:X$("─","-"),heavy:X$("━","="),block:X$("█","#")},Yr=`${P("gray",$$)} `});import{execSync as M1}from"node:child_process";function Zu($){try{let _=M1("git diff --stat HEAD~10 2>/dev/null || git diff --stat",{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
|
|
257
|
+
`),u=_[_.length-1]||"",U=u.match(/(\d+) files? changed/),z=u.match(/(\d+) insertions?\(\+\)/),J=u.match(/(\d+) deletions?\(-\)/);return{filesChanged:U?.[1]?parseInt(U[1],10):0,linesAdded:z?.[1]?parseInt(z[1],10):0,linesRemoved:J?.[1]?parseInt(J[1],10):0}}catch{return{filesChanged:0,linesAdded:0,linesRemoved:0}}}function uO($,I=5){try{return M1(`git log --oneline -${I} 2>/dev/null`,{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
|
|
258
|
+
`).filter(Boolean)}catch{return[]}}function KX($){try{return M1("git diff --name-only HEAD~5 2>/dev/null || git diff --name-only",{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
|
|
259
|
+
`).filter(Boolean).slice(0,10)}catch{return[]}}function _O($,I=10){try{return M1(`git log --format="%s" -${I} 2>/dev/null`,{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
|
|
260
|
+
`).filter(Boolean)}catch{return[]}}function zO($){let I={},_=/^(feat|fix|docs|style|refactor|test|chore|build|ci|perf)(\(.+\))?:/;for(let u of $){let U=u.match(_);if(U){let z=U[1];if(z)I[z]=(I[z]||0)+1}}return I}function JO($){try{let I=`${$}/.serena/retrospectives`,_=M1(`ls -t "${I}"/*.json 2>/dev/null | head -1`,{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim();if(!_)return null;let u=M1(`cat "${_}"`,{encoding:"utf-8",stdio:["pipe","pipe","ignore"]});return JSON.parse(u).date||null}catch{return null}}function GO($,I){if(!I)return _O($,10);try{let u=new Date(I).toISOString().split("T")[0];return M1(`git log --format="%s" --since="${u}" 2>/dev/null`,{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
|
|
261
|
+
`).filter(Boolean)}catch{return _O($,10)}}var DX=()=>{};var XO={};S4(XO,{retro:()=>PE});import{existsSync as qO,mkdirSync as DE,readdirSync as LE,readFileSync as VE,writeFileSync as ZE}from"node:fs";import{join as LX}from"node:path";function VX($){return LX($,".serena","retrospectives")}function WE($){let I=VX($);if(!qO(I))return[];try{return LE(I).filter((u)=>u.endsWith(".json")).sort().reverse().slice(0,10).map((u)=>JSON.parse(VE(LX(I,u),"utf-8")))}catch{return[]}}function gO($,I){let _=VX($);if(!qO(_))DE(_,{recursive:!0});let u=`${I.date.replace(/[:.]/g,"-")}_${I.id}.json`;ZE(LX(_,u),JSON.stringify(I,null,2),"utf-8")}function RE($){let I=JO($),_=GO($,I),u=zO(_),U=Zu($),z=kv($),J=iv($,I||void 0),G=Object.entries(u).sort(([,X],[,Q])=>Q-X)[0],g="Development session";if(G){let[X]=G;g={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"}[X]||"Development session"}if(U.filesChanged>0)g+=` (${U.filesChanged} files, +${U.linesAdded}/-${U.linesRemoved})`;if(z.agents.length>0)g+=` with ${z.agents.join(", ")}`;let q=lv(J);if(_.length>0&&q.length===0){if(u.refactor||u.perf)q.push("Code quality and performance improvements");if(u.test)q.push("Enhanced test coverage");if(u.fix)q.push("Issue resolution and stability improvements")}let N=[];if(z.inProgressTasks.length>0)N.push(...z.inProgressTasks.slice(0,3));if(_.length>0){let X=_[0]?.toLowerCase()||"";if(X.includes("wip")||X.includes("todo"))N.push("Complete work-in-progress items")}if(N.length===0)N.push("Continue development","Review and test changes");return{summary:g,learnings:q.slice(0,5),nextSteps:N.slice(0,5)}}async function PE(){let $=process.cwd(),I=VX($),_=WE($);console.clear(),D$(F$.default.bgMagenta(F$.default.white(" retro (interactive) ")));let u=_[0];if(u)y([F$.default.bold("Last Retrospective"),`Date: ${u.date}`,"",F$.default.bold("Summary:"),u.summary,"",F$.default.bold("Key Learnings:"),...u.keyLearnings.map((X)=>` - ${X}`),"",F$.default.bold("Next Steps:"),...u.nextSteps.map((X)=>` > ${X}`)].join(`
|
|
262
|
+
`),"Previous Session");let U=await F6({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(u$(U)||U==="exit"){o(F$.default.dim("Goodbye!"));return}if(U==="list"){if(_.length===0)y(F$.default.yellow("No retrospectives found."),"History");else{let X=_.map((Q,H)=>`${H+1}. [${Q.date.split("T")[0]}] ${Q.summary.slice(0,50)}...`).join(`
|
|
263
|
+
`);y(X,`Past Retrospectives (${_.length})`)}o(F$.default.dim(`Stored in: ${I}`));return}if(U==="auto"){let{summary:X,learnings:Q,nextSteps:H}=RE($),Y=KX($);y([F$.default.bold("Auto-generated Content"),"",F$.default.bold("Summary:"),X,"",F$.default.bold("Key Learnings:"),...Q.map((T)=>` - ${T}`),"",F$.default.bold("Next Steps:"),...H.map((T)=>` > ${T}`)].join(`
|
|
264
|
+
`),"Preview");let v=await j$({message:"Save this retrospective?",initialValue:!0});if(u$(v)||!v){c$("Cancelled.");return}let O={id:Math.random().toString(36).slice(2,8),date:new Date().toISOString(),summary:X,keyLearnings:Q,filesChanged:Y,nextSteps:H};gO($,O),y(F$.default.green("Retrospective saved!"),"Done"),o(F$.default.dim(`Stored in: ${I}`));return}let z=uO($),J=KX($);if(z.length>0)y(z.join(`
|
|
265
|
+
`),"Recent Commits");if(J.length>0)y(J.join(`
|
|
266
|
+
`),"Changed Files");let G=await uu({message:"What did you accomplish in this session?",placeholder:"e.g., Implemented user authentication flow"});if(u$(G)){c$("Cancelled.");return}let g=await uu({message:"Key learnings? (comma-separated)",placeholder:"e.g., JWT needs refresh token, bcrypt is slow"});if(u$(g)){c$("Cancelled.");return}let q=await uu({message:"Next steps? (comma-separated)",placeholder:"e.g., Add password reset, Write tests"});if(u$(q)){c$("Cancelled.");return}let N={id:Math.random().toString(36).slice(2,8),date:new Date().toISOString(),summary:G,keyLearnings:g.split(",").map((X)=>X.trim()).filter(Boolean),filesChanged:J,nextSteps:q.split(",").map((X)=>X.trim()).filter(Boolean)};gO($,N),y(F$.default.green("Retrospective saved!"),"Done"),o(F$.default.dim(`Stored in: ${I}`))}var F$;var NO=w0(()=>{I4();DX();iI();F$=H$(b$(),1)});var G6=w((Od,gT)=>{var JT=["nodebuffer","arraybuffer","fragments"],GT=typeof Blob<"u";if(GT)JT.push("blob");gT.exports={BINARY_TYPES:JT,CLOSE_TIMEOUT:30000,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:GT,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var _U=w((Td,xu)=>{var{EMPTY_BUFFER:If}=G6(),lX=Buffer[Symbol.species];function Uf($,I){if($.length===0)return If;if($.length===1)return $[0];let _=Buffer.allocUnsafe(I),u=0;for(let U=0;U<$.length;U++){let z=$[U];_.set(z,u),u+=z.length}if(u<I)return new lX(_.buffer,_.byteOffset,u);return _}function qT($,I,_,u,U){for(let z=0;z<U;z++)_[u+z]=$[z]^I[z&3]}function XT($,I){for(let _=0;_<$.length;_++)$[_]^=I[_&3]}function _f($){if($.length===$.buffer.byteLength)return $.buffer;return $.buffer.slice($.byteOffset,$.byteOffset+$.length)}function mX($){if(mX.readOnly=!0,Buffer.isBuffer($))return $;let I;if($ instanceof ArrayBuffer)I=new lX($);else if(ArrayBuffer.isView($))I=new lX($.buffer,$.byteOffset,$.byteLength);else I=Buffer.from($),mX.readOnly=!1;return I}xu.exports={concat:Uf,mask:qT,toArrayBuffer:_f,toBuffer:mX,unmask:XT};if(!process.env.WS_NO_BUFFER_UTIL)try{let $=(()=>{throw new Error("Cannot require module "+"bufferutil");})();xu.exports.mask=function(I,_,u,U,z){if(z<48)qT(I,_,u,U,z);else $.mask(I,_,u,U,z)},xu.exports.unmask=function(I,_){if(I.length<32)XT(I,_);else $.unmask(I,_)}}catch($){}});var HT=w((Bd,vT)=>{var NT=Symbol("kDone"),rX=Symbol("kRun");class QT{constructor($){this[NT]=()=>{this.pending--,this[rX]()},this.concurrency=$||1/0,this.jobs=[],this.pending=0}add($){this.jobs.push($),this[rX]()}[rX](){if(this.pending===this.concurrency)return;if(this.jobs.length){let $=this.jobs.shift();this.pending++,$(this[NT])}}}vT.exports=QT});var zU=w((Md,MT)=>{var uU=J$("zlib"),YT=_U(),uf=HT(),{kStatusCode:OT}=G6(),zf=Buffer[Symbol.species],Jf=Buffer.from([0,0,255,255]),yu=Symbol("permessage-deflate"),g6=Symbol("total-length"),W0=Symbol("callback"),y6=Symbol("buffers"),R0=Symbol("error"),ku;class TT{constructor($,I,_){if(this._maxPayload=_|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,!ku){let u=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;ku=new uf(u)}}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[W0];if(this._deflate.close(),this._deflate=null,$)$(Error("The deflate stream was closed while data was being processed"))}}acceptAsServer($){let I=this._options,_=$.find((u)=>{if(I.serverNoContextTakeover===!1&&u.server_no_context_takeover||u.server_max_window_bits&&(I.serverMaxWindowBits===!1||typeof I.serverMaxWindowBits==="number"&&I.serverMaxWindowBits>u.server_max_window_bits)||typeof I.clientMaxWindowBits==="number"&&!u.client_max_window_bits)return!1;return!0});if(!_)throw Error("None of the extension offers can be accepted");if(I.serverNoContextTakeover)_.server_no_context_takeover=!0;if(I.clientNoContextTakeover)_.client_no_context_takeover=!0;if(typeof I.serverMaxWindowBits==="number")_.server_max_window_bits=I.serverMaxWindowBits;if(typeof I.clientMaxWindowBits==="number")_.client_max_window_bits=I.clientMaxWindowBits;else if(_.client_max_window_bits===!0||I.clientMaxWindowBits===!1)delete _.client_max_window_bits;return _}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((_)=>{let u=I[_];if(u.length>1)throw Error(`Parameter "${_}" must have only a single value`);if(u=u[0],_==="client_max_window_bits"){if(u!==!0){let U=+u;if(!Number.isInteger(U)||U<8||U>15)throw TypeError(`Invalid value for parameter "${_}": ${u}`);u=U}else if(!this._isServer)throw TypeError(`Invalid value for parameter "${_}": ${u}`)}else if(_==="server_max_window_bits"){let U=+u;if(!Number.isInteger(U)||U<8||U>15)throw TypeError(`Invalid value for parameter "${_}": ${u}`);u=U}else if(_==="client_no_context_takeover"||_==="server_no_context_takeover"){if(u!==!0)throw TypeError(`Invalid value for parameter "${_}": ${u}`)}else throw Error(`Unknown parameter "${_}"`);I[_]=u})}),$}decompress($,I,_){ku.add((u)=>{this._decompress($,I,(U,z)=>{u(),_(U,z)})})}compress($,I,_){ku.add((u)=>{this._compress($,I,(U,z)=>{u(),_(U,z)})})}_decompress($,I,_){let u=this._isServer?"client":"server";if(!this._inflate){let U=`${u}_max_window_bits`,z=typeof this.params[U]!=="number"?uU.Z_DEFAULT_WINDOWBITS:this.params[U];this._inflate=uU.createInflateRaw({...this._options.zlibInflateOptions,windowBits:z}),this._inflate[yu]=this,this._inflate[g6]=0,this._inflate[y6]=[],this._inflate.on("error",gf),this._inflate.on("data",BT)}if(this._inflate[W0]=_,this._inflate.write($),I)this._inflate.write(Jf);this._inflate.flush(()=>{let U=this._inflate[R0];if(U){this._inflate.close(),this._inflate=null,_(U);return}let z=YT.concat(this._inflate[y6],this._inflate[g6]);if(this._inflate._readableState.endEmitted)this._inflate.close(),this._inflate=null;else if(this._inflate[g6]=0,this._inflate[y6]=[],I&&this.params[`${u}_no_context_takeover`])this._inflate.reset();_(null,z)})}_compress($,I,_){let u=this._isServer?"server":"client";if(!this._deflate){let U=`${u}_max_window_bits`,z=typeof this.params[U]!=="number"?uU.Z_DEFAULT_WINDOWBITS:this.params[U];this._deflate=uU.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:z}),this._deflate[g6]=0,this._deflate[y6]=[],this._deflate.on("data",Gf)}this._deflate[W0]=_,this._deflate.write($),this._deflate.flush(uU.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let U=YT.concat(this._deflate[y6],this._deflate[g6]);if(I)U=new zf(U.buffer,U.byteOffset,U.length-4);if(this._deflate[W0]=null,this._deflate[g6]=0,this._deflate[y6]=[],I&&this.params[`${u}_no_context_takeover`])this._deflate.reset();_(null,U)})}}MT.exports=TT;function Gf($){this[y6].push($),this[g6]+=$.length}function BT($){if(this[g6]+=$.length,this[yu]._maxPayload<1||this[g6]<=this[yu]._maxPayload){this[y6].push($);return}this[R0]=RangeError("Max payload size exceeded"),this[R0].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[R0][OT]=1009,this.removeListener("data",BT),this.reset()}function gf($){if(this[yu]._inflate=null,this[R0]){this[W0](this[R0]);return}$[OT]=1007,this[W0]($)}});var P0=w((Kd,iu)=>{var{isUtf8:KT}=J$("buffer"),{hasBlob:qf}=G6(),Xf=[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 Nf($){return $>=1000&&$<=1014&&$!==1004&&$!==1005&&$!==1006||$>=3000&&$<=4999}function nX($){let I=$.length,_=0;while(_<I)if(($[_]&128)===0)_++;else if(($[_]&224)===192){if(_+1===I||($[_+1]&192)!==128||($[_]&254)===192)return!1;_+=2}else if(($[_]&240)===224){if(_+2>=I||($[_+1]&192)!==128||($[_+2]&192)!==128||$[_]===224&&($[_+1]&224)===128||$[_]===237&&($[_+1]&224)===160)return!1;_+=3}else if(($[_]&248)===240){if(_+3>=I||($[_+1]&192)!==128||($[_+2]&192)!==128||($[_+3]&192)!==128||$[_]===240&&($[_+1]&240)===128||$[_]===244&&$[_+1]>143||$[_]>244)return!1;_+=4}else return!1;return!0}function Qf($){return qf&&typeof $==="object"&&typeof $.arrayBuffer==="function"&&typeof $.type==="string"&&typeof $.stream==="function"&&($[Symbol.toStringTag]==="Blob"||$[Symbol.toStringTag]==="File")}iu.exports={isBlob:Qf,isValidStatusCode:Nf,isValidUTF8:nX,tokenChars:Xf};if(KT)iu.exports.isValidUTF8=function($){return $.length<24?nX($):KT($)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let $=(()=>{throw new Error("Cannot require module "+"utf-8-validate");})();iu.exports.isValidUTF8=function(I){return I.length<32?nX(I):$(I)}}catch($){}});var dX=w((Dd,WT)=>{var{Writable:vf}=J$("stream"),DT=zU(),{BINARY_TYPES:Hf,EMPTY_BUFFER:LT,kStatusCode:Yf,kWebSocket:Of}=G6(),{concat:hX,toArrayBuffer:Tf,unmask:Bf}=_U(),{isValidStatusCode:Mf,isValidUTF8:VT}=P0(),lu=Buffer[Symbol.species];class ZT extends vf{constructor($={}){super();this._allowSynchronousEvents=$.allowSynchronousEvents!==void 0?$.allowSynchronousEvents:!0,this._binaryType=$.binaryType||Hf[0],this._extensions=$.extensions||{},this._isServer=!!$.isServer,this._maxPayload=$.maxPayload|0,this._skipUTF8Validation=!!$.skipUTF8Validation,this[Of]=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,_){if(this._opcode===8&&this._state==0)return _();this._bufferedBytes+=$.length,this._buffers.push($),this.startLoop(_)}consume($){if(this._bufferedBytes-=$,$===this._buffers[0].length)return this._buffers.shift();if($<this._buffers[0].length){let _=this._buffers[0];return this._buffers[0]=new lu(_.buffer,_.byteOffset+$,_.length-$),new lu(_.buffer,_.byteOffset,$)}let I=Buffer.allocUnsafe($);do{let _=this._buffers[0],u=I.length-$;if($>=_.length)I.set(this._buffers.shift(),u);else I.set(new Uint8Array(_.buffer,_.byteOffset,$),u),this._buffers[0]=new lu(_.buffer,_.byteOffset+$,_.length-$);$-=_.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 u=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");$(u);return}let _=(I[0]&64)===64;if(_&&!this._extensions[DT.extensionName]){let u=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");$(u);return}if(this._fin=(I[0]&128)===128,this._opcode=I[0]&15,this._payloadLength=I[1]&127,this._opcode===0){if(_){let u=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");$(u);return}if(!this._fragmented){let u=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");$(u);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let u=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");$(u);return}this._compressed=_}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let u=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");$(u);return}if(_){let u=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");$(u);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let u=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");$(u);return}}else{let u=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");$(u);return}if(!this._fin&&!this._fragmented)this._fragmented=this._opcode;if(this._masked=(I[1]&128)===128,this._isServer){if(!this._masked){let u=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");$(u);return}}else if(this._masked){let u=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");$(u);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),_=I.readUInt32BE(0);if(_>Math.pow(2,21)-1){let u=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");$(u);return}this._payloadLength=_*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=LT;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)Bf(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[DT.extensionName].decompress($,this._fin,(u,U)=>{if(u)return I(u);if(U.length){if(this._messageLength+=U.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let z=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");I(z);return}this._fragments.push(U)}if(this.dataMessage(I),this._state===0)this.startLoop(I)})}dataMessage($){if(!this._fin){this._state=0;return}let I=this._messageLength,_=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let u;if(this._binaryType==="nodebuffer")u=hX(_,I);else if(this._binaryType==="arraybuffer")u=Tf(hX(_,I));else if(this._binaryType==="blob")u=new Blob(_);else u=_;if(this._allowSynchronousEvents)this.emit("message",u,!0),this._state=0;else this._state=6,setImmediate(()=>{this.emit("message",u,!0),this._state=0,this.startLoop($)})}else{let u=hX(_,I);if(!this._skipUTF8Validation&&!VT(u)){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",u,!1),this._state=0;else this._state=6,setImmediate(()=>{this.emit("message",u,!1),this._state=0,this.startLoop($)})}}controlMessage($,I){if(this._opcode===8){if($.length===0)this._loop=!1,this.emit("conclude",1005,LT),this.end();else{let _=$.readUInt16BE(0);if(!Mf(_)){let U=this.createError(RangeError,`invalid status code ${_}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");I(U);return}let u=new lu($.buffer,$.byteOffset+2,$.length-2);if(!this._skipUTF8Validation&&!VT(u)){let U=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");I(U);return}this._loop=!1,this.emit("conclude",_,u),this.end()}this._state=0;return}if(this._allowSynchronousEvents)this.emit(this._opcode===9?"ping":"pong",$),this._state=0;else this._state=6,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",$),this._state=0,this.startLoop(I)})}createError($,I,_,u,U){this._loop=!1,this._errored=!0;let z=new $(_?`Invalid WebSocket frame: ${I}`:I);return Error.captureStackTrace(z,this.createError),z.code=U,z[Yf]=u,z}}WT.exports=ZT});var pX=w((Vd,bT)=>{var{Duplex:Ld}=J$("stream"),{randomFillSync:Kf}=J$("crypto"),RT=zU(),{EMPTY_BUFFER:Df,kWebSocket:Lf,NOOP:Vf}=G6(),{isBlob:b0,isValidStatusCode:Zf}=P0(),{mask:PT,toBuffer:D1}=_U(),M4=Symbol("kByteLength"),Wf=Buffer.alloc(4),L1,A0=8192,b4=0,Rf=1,Pf=2;class i6{constructor($,I,_){if(this._extensions=I||{},_)this._generateMask=_,this._maskBuffer=Buffer.alloc(4);this._socket=$,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=b4,this.onerror=Vf,this[Lf]=void 0}static frame($,I){let _,u=!1,U=2,z=!1;if(I.mask){if(_=I.maskBuffer||Wf,I.generateMask)I.generateMask(_);else{if(A0===8192){if(L1===void 0)L1=Buffer.alloc(8192);Kf(L1,0,8192),A0=0}_[0]=L1[A0++],_[1]=L1[A0++],_[2]=L1[A0++],_[3]=L1[A0++]}z=(_[0]|_[1]|_[2]|_[3])===0,U=6}let J;if(typeof $==="string")if((!I.mask||z)&&I[M4]!==void 0)J=I[M4];else $=Buffer.from($),J=$.length;else J=$.length,u=I.mask&&I.readOnly&&!z;let G=J;if(J>=65536)U+=8,G=127;else if(J>125)U+=2,G=126;let g=Buffer.allocUnsafe(u?J+U:U);if(g[0]=I.fin?I.opcode|128:I.opcode,I.rsv1)g[0]|=64;if(g[1]=G,G===126)g.writeUInt16BE(J,2);else if(G===127)g[2]=g[3]=0,g.writeUIntBE(J,4,6);if(!I.mask)return[g,$];if(g[1]|=128,g[U-4]=_[0],g[U-3]=_[1],g[U-2]=_[2],g[U-1]=_[3],z)return[g,$];if(u)return PT($,_,g,U,J),[g];return PT($,_,$,0,J),[g,$]}close($,I,_,u){let U;if($===void 0)U=Df;else if(typeof $!=="number"||!Zf($))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 J=Buffer.byteLength(I);if(J>123)throw RangeError("The message must not be greater than 123 bytes");if(U=Buffer.allocUnsafe(2+J),U.writeUInt16BE($,0),typeof I==="string")U.write(I,2);else U.set(I,2)}let z={[M4]:U.length,fin:!0,generateMask:this._generateMask,mask:_,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};if(this._state!==b4)this.enqueue([this.dispatch,U,!1,z,u]);else this.sendFrame(i6.frame(U,z),u)}ping($,I,_){let u,U;if(typeof $==="string")u=Buffer.byteLength($),U=!1;else if(b0($))u=$.size,U=!1;else $=D1($),u=$.length,U=D1.readOnly;if(u>125)throw RangeError("The data size must not be greater than 125 bytes");let z={[M4]:u,fin:!0,generateMask:this._generateMask,mask:I,maskBuffer:this._maskBuffer,opcode:9,readOnly:U,rsv1:!1};if(b0($))if(this._state!==b4)this.enqueue([this.getBlobData,$,!1,z,_]);else this.getBlobData($,!1,z,_);else if(this._state!==b4)this.enqueue([this.dispatch,$,!1,z,_]);else this.sendFrame(i6.frame($,z),_)}pong($,I,_){let u,U;if(typeof $==="string")u=Buffer.byteLength($),U=!1;else if(b0($))u=$.size,U=!1;else $=D1($),u=$.length,U=D1.readOnly;if(u>125)throw RangeError("The data size must not be greater than 125 bytes");let z={[M4]:u,fin:!0,generateMask:this._generateMask,mask:I,maskBuffer:this._maskBuffer,opcode:10,readOnly:U,rsv1:!1};if(b0($))if(this._state!==b4)this.enqueue([this.getBlobData,$,!1,z,_]);else this.getBlobData($,!1,z,_);else if(this._state!==b4)this.enqueue([this.dispatch,$,!1,z,_]);else this.sendFrame(i6.frame($,z),_)}send($,I,_){let u=this._extensions[RT.extensionName],U=I.binary?2:1,z=I.compress,J,G;if(typeof $==="string")J=Buffer.byteLength($),G=!1;else if(b0($))J=$.size,G=!1;else $=D1($),J=$.length,G=D1.readOnly;if(this._firstFragment){if(this._firstFragment=!1,z&&u&&u.params[u._isServer?"server_no_context_takeover":"client_no_context_takeover"])z=J>=u._threshold;this._compress=z}else z=!1,U=0;if(I.fin)this._firstFragment=!0;let g={[M4]:J,fin:I.fin,generateMask:this._generateMask,mask:I.mask,maskBuffer:this._maskBuffer,opcode:U,readOnly:G,rsv1:z};if(b0($))if(this._state!==b4)this.enqueue([this.getBlobData,$,this._compress,g,_]);else this.getBlobData($,this._compress,g,_);else if(this._state!==b4)this.enqueue([this.dispatch,$,this._compress,g,_]);else this.dispatch($,this._compress,g,_)}getBlobData($,I,_,u){this._bufferedBytes+=_[M4],this._state=Pf,$.arrayBuffer().then((U)=>{if(this._socket.destroyed){let J=Error("The socket was closed while the blob was being read");process.nextTick(cX,this,J,u);return}this._bufferedBytes-=_[M4];let z=D1(U);if(!I)this._state=b4,this.sendFrame(i6.frame(z,_),u),this.dequeue();else this.dispatch(z,I,_,u)}).catch((U)=>{process.nextTick(bf,this,U,u)})}dispatch($,I,_,u){if(!I){this.sendFrame(i6.frame($,_),u);return}let U=this._extensions[RT.extensionName];this._bufferedBytes+=_[M4],this._state=Rf,U.compress($,_.fin,(z,J)=>{if(this._socket.destroyed){let G=Error("The socket was closed while data was being compressed");cX(this,G,u);return}this._bufferedBytes-=_[M4],this._state=b4,_.readOnly=!1,this.sendFrame(i6.frame(J,_),u),this.dequeue()})}dequeue(){while(this._state===b4&&this._queue.length){let $=this._queue.shift();this._bufferedBytes-=$[3][M4],Reflect.apply($[0],this,$.slice(1))}}enqueue($){this._bufferedBytes+=$[3][M4],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)}}bT.exports=i6;function cX($,I,_){if(typeof _==="function")_(I);for(let u=0;u<$._queue.length;u++){let U=$._queue[u],z=U[U.length-1];if(typeof z==="function")z(I)}}function bf($,I,_){cX($,I,_),$.onerror(I)}});var xT=w((Zd,fT)=>{var{kForOnEventAttribute:JU,kListener:oX}=G6(),AT=Symbol("kCode"),jT=Symbol("kData"),FT=Symbol("kError"),ST=Symbol("kMessage"),wT=Symbol("kReason"),j0=Symbol("kTarget"),ET=Symbol("kType"),CT=Symbol("kWasClean");class l6{constructor($){this[j0]=null,this[ET]=$}get target(){return this[j0]}get type(){return this[ET]}}Object.defineProperty(l6.prototype,"target",{enumerable:!0});Object.defineProperty(l6.prototype,"type",{enumerable:!0});class F0 extends l6{constructor($,I={}){super($);this[AT]=I.code===void 0?0:I.code,this[wT]=I.reason===void 0?"":I.reason,this[CT]=I.wasClean===void 0?!1:I.wasClean}get code(){return this[AT]}get reason(){return this[wT]}get wasClean(){return this[CT]}}Object.defineProperty(F0.prototype,"code",{enumerable:!0});Object.defineProperty(F0.prototype,"reason",{enumerable:!0});Object.defineProperty(F0.prototype,"wasClean",{enumerable:!0});class GU extends l6{constructor($,I={}){super($);this[FT]=I.error===void 0?null:I.error,this[ST]=I.message===void 0?"":I.message}get error(){return this[FT]}get message(){return this[ST]}}Object.defineProperty(GU.prototype,"error",{enumerable:!0});Object.defineProperty(GU.prototype,"message",{enumerable:!0});class ru extends l6{constructor($,I={}){super($);this[jT]=I.data===void 0?null:I.data}get data(){return this[jT]}}Object.defineProperty(ru.prototype,"data",{enumerable:!0});var Af={addEventListener($,I,_={}){for(let U of this.listeners($))if(!_[JU]&&U[oX]===I&&!U[JU])return;let u;if($==="message")u=function(z,J){let G=new ru("message",{data:J?z:z.toString()});G[j0]=this,mu(I,this,G)};else if($==="close")u=function(z,J){let G=new F0("close",{code:z,reason:J.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});G[j0]=this,mu(I,this,G)};else if($==="error")u=function(z){let J=new GU("error",{error:z,message:z.message});J[j0]=this,mu(I,this,J)};else if($==="open")u=function(){let z=new l6("open");z[j0]=this,mu(I,this,z)};else return;if(u[JU]=!!_[JU],u[oX]=I,_.once)this.once($,u);else this.on($,u)},removeEventListener($,I){for(let _ of this.listeners($))if(_[oX]===I&&!_[JU]){this.removeListener($,_);break}}};fT.exports={CloseEvent:F0,ErrorEvent:GU,Event:l6,EventTarget:Af,MessageEvent:ru};function mu($,I,_){if(typeof $==="object"&&$.handleEvent)$.handleEvent.call($,_);else $.call(I,_)}});var tX=w((Wd,kT)=>{var{tokenChars:gU}=P0();function d4($,I,_){if($[I]===void 0)$[I]=[_];else $[I].push(_)}function jf($){let I=Object.create(null),_=Object.create(null),u=!1,U=!1,z=!1,J,G,g=-1,q=-1,N=-1,X=0;for(;X<$.length;X++)if(q=$.charCodeAt(X),J===void 0)if(N===-1&&gU[q]===1){if(g===-1)g=X}else if(X!==0&&(q===32||q===9)){if(N===-1&&g!==-1)N=X}else if(q===59||q===44){if(g===-1)throw SyntaxError(`Unexpected character at index ${X}`);if(N===-1)N=X;let H=$.slice(g,N);if(q===44)d4(I,H,_),_=Object.create(null);else J=H;g=N=-1}else throw SyntaxError(`Unexpected character at index ${X}`);else if(G===void 0)if(N===-1&&gU[q]===1){if(g===-1)g=X}else if(q===32||q===9){if(N===-1&&g!==-1)N=X}else if(q===59||q===44){if(g===-1)throw SyntaxError(`Unexpected character at index ${X}`);if(N===-1)N=X;if(d4(_,$.slice(g,N),!0),q===44)d4(I,J,_),_=Object.create(null),J=void 0;g=N=-1}else if(q===61&&g!==-1&&N===-1)G=$.slice(g,X),g=N=-1;else throw SyntaxError(`Unexpected character at index ${X}`);else if(U){if(gU[q]!==1)throw SyntaxError(`Unexpected character at index ${X}`);if(g===-1)g=X;else if(!u)u=!0;U=!1}else if(z)if(gU[q]===1){if(g===-1)g=X}else if(q===34&&g!==-1)z=!1,N=X;else if(q===92)U=!0;else throw SyntaxError(`Unexpected character at index ${X}`);else if(q===34&&$.charCodeAt(X-1)===61)z=!0;else if(N===-1&&gU[q]===1){if(g===-1)g=X}else if(g!==-1&&(q===32||q===9)){if(N===-1)N=X}else if(q===59||q===44){if(g===-1)throw SyntaxError(`Unexpected character at index ${X}`);if(N===-1)N=X;let H=$.slice(g,N);if(u)H=H.replace(/\\/g,""),u=!1;if(d4(_,G,H),q===44)d4(I,J,_),_=Object.create(null),J=void 0;G=void 0,g=N=-1}else throw SyntaxError(`Unexpected character at index ${X}`);if(g===-1||z||q===32||q===9)throw SyntaxError("Unexpected end of input");if(N===-1)N=X;let Q=$.slice(g,N);if(J===void 0)d4(I,Q,_);else{if(G===void 0)d4(_,Q,!0);else if(u)d4(_,G,Q.replace(/\\/g,""));else d4(_,G,Q);d4(I,J,_)}return I}function Ff($){return Object.keys($).map((I)=>{let _=$[I];if(!Array.isArray(_))_=[_];return _.map((u)=>{return[I].concat(Object.keys(u).map((U)=>{let z=u[U];if(!Array.isArray(z))z=[z];return z.map((J)=>J===!0?U:`${U}=${J}`).join("; ")})).join("; ")}).join(", ")}).join(", ")}kT.exports={format:Ff,parse:jf}});var cu=w((bd,tT)=>{var Sf=J$("events"),wf=J$("https"),Ef=J$("http"),lT=J$("net"),Cf=J$("tls"),{randomBytes:ff,createHash:xf}=J$("crypto"),{Duplex:Rd,Readable:Pd}=J$("stream"),{URL:aX}=J$("url"),m6=zU(),kf=dX(),yf=pX(),{isBlob:lf}=P0(),{BINARY_TYPES:yT,CLOSE_TIMEOUT:mf,EMPTY_BUFFER:nu,GUID:rf,kForOnEventAttribute:eX,kListener:nf,kStatusCode:hf,kWebSocket:w$,NOOP:mT}=G6(),{EventTarget:{addEventListener:df,removeEventListener:cf}}=xT(),{format:pf,parse:of}=tX(),{toBuffer:tf}=_U(),rT=Symbol("kAborted"),sX=[8,13],q6=["CONNECTING","OPEN","CLOSING","CLOSED"],af=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class h extends Sf{constructor($,I,_){super();if(this._binaryType=yT[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=nu,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)_=I,I=[];else I=[I];nT(this,$,I,_)}else this._autoPong=_.autoPong,this._closeTimeout=_.closeTimeout,this._isServer=!0}get binaryType(){return this._binaryType}set binaryType($){if(!yT.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,_){let u=new kf({allowSynchronousEvents:_.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:_.maxPayload,skipUTF8Validation:_.skipUTF8Validation}),U=new yf($,this._extensions,_.generateMask);if(this._receiver=u,this._sender=U,this._socket=$,u[w$]=this,U[w$]=this,$[w$]=this,u.on("conclude",$x),u.on("drain",Ix),u.on("error",Ux),u.on("message",_x),u.on("ping",ux),u.on("pong",zx),U.onerror=Jx,$.setTimeout)$.setTimeout(0);if($.setNoDelay)$.setNoDelay();if(I.length>0)$.unshift(I);$.on("close",cT),$.on("data",du),$.on("end",pT),$.on("error",oT),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[m6.extensionName])this._extensions[m6.extensionName].cleanup();this._receiver.removeAllListeners(),this._readyState=h.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close($,I){if(this.readyState===h.CLOSED)return;if(this.readyState===h.CONNECTING){X4(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===h.CLOSING){if(this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted))this._socket.end();return}this._readyState=h.CLOSING,this._sender.close($,I,!this._isServer,(_)=>{if(_)return;if(this._closeFrameSent=!0,this._closeFrameReceived||this._receiver._writableState.errorEmitted)this._socket.end()}),dT(this)}pause(){if(this.readyState===h.CONNECTING||this.readyState===h.CLOSED)return;this._paused=!0,this._socket.pause()}ping($,I,_){if(this.readyState===h.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof $==="function")_=$,$=I=void 0;else if(typeof I==="function")_=I,I=void 0;if(typeof $==="number")$=$.toString();if(this.readyState!==h.OPEN){$5(this,$,_);return}if(I===void 0)I=!this._isServer;this._sender.ping($||nu,I,_)}pong($,I,_){if(this.readyState===h.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof $==="function")_=$,$=I=void 0;else if(typeof I==="function")_=I,I=void 0;if(typeof $==="number")$=$.toString();if(this.readyState!==h.OPEN){$5(this,$,_);return}if(I===void 0)I=!this._isServer;this._sender.pong($||nu,I,_)}resume(){if(this.readyState===h.CONNECTING||this.readyState===h.CLOSED)return;if(this._paused=!1,!this._receiver._writableState.needDrain)this._socket.resume()}send($,I,_){if(this.readyState===h.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof I==="function")_=I,I={};if(typeof $==="number")$=$.toString();if(this.readyState!==h.OPEN){$5(this,$,_);return}let u={binary:typeof $!=="string",mask:!this._isServer,compress:!0,fin:!0,...I};if(!this._extensions[m6.extensionName])u.compress=!1;this._sender.send($||nu,u,_)}terminate(){if(this.readyState===h.CLOSED)return;if(this.readyState===h.CONNECTING){X4(this,this._req,"WebSocket was closed before the connection was established");return}if(this._socket)this._readyState=h.CLOSING,this._socket.destroy()}}Object.defineProperty(h,"CONNECTING",{enumerable:!0,value:q6.indexOf("CONNECTING")});Object.defineProperty(h.prototype,"CONNECTING",{enumerable:!0,value:q6.indexOf("CONNECTING")});Object.defineProperty(h,"OPEN",{enumerable:!0,value:q6.indexOf("OPEN")});Object.defineProperty(h.prototype,"OPEN",{enumerable:!0,value:q6.indexOf("OPEN")});Object.defineProperty(h,"CLOSING",{enumerable:!0,value:q6.indexOf("CLOSING")});Object.defineProperty(h.prototype,"CLOSING",{enumerable:!0,value:q6.indexOf("CLOSING")});Object.defineProperty(h,"CLOSED",{enumerable:!0,value:q6.indexOf("CLOSED")});Object.defineProperty(h.prototype,"CLOSED",{enumerable:!0,value:q6.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[eX])return I[nf];return null},set(I){for(let _ of this.listeners($))if(_[eX]){this.removeListener($,_);break}if(typeof I!=="function")return;this.addEventListener($,I,{[eX]:!0})}})});h.prototype.addEventListener=df;h.prototype.removeEventListener=cf;tT.exports=h;function nT($,I,_,u){let U={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:mf,protocolVersion:sX[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...u,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,!sX.includes(U.protocolVersion))throw RangeError(`Unsupported protocol version: ${U.protocolVersion} (supported versions: ${sX.join(", ")})`);let z;if(I instanceof aX)z=I;else try{z=new aX(I)}catch(v){throw SyntaxError(`Invalid URL: ${I}`)}if(z.protocol==="http:")z.protocol="ws:";else if(z.protocol==="https:")z.protocol="wss:";$._url=z.href;let J=z.protocol==="wss:",G=z.protocol==="ws+unix:",g;if(z.protocol!=="ws:"&&!J&&!G)g=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`;else if(G&&!z.pathname)g="The URL's pathname is empty";else if(z.hash)g="The URL contains a fragment identifier";if(g){let v=SyntaxError(g);if($._redirects===0)throw v;else{hu($,v);return}}let q=J?443:80,N=ff(16).toString("base64"),X=J?wf.request:Ef.request,Q=new Set,H;if(U.createConnection=U.createConnection||(J?sf:ef),U.defaultPort=U.defaultPort||q,U.port=z.port||q,U.host=z.hostname.startsWith("[")?z.hostname.slice(1,-1):z.hostname,U.headers={...U.headers,"Sec-WebSocket-Version":U.protocolVersion,"Sec-WebSocket-Key":N,Connection:"Upgrade",Upgrade:"websocket"},U.path=z.pathname+z.search,U.timeout=U.handshakeTimeout,U.perMessageDeflate)H=new m6(U.perMessageDeflate!==!0?U.perMessageDeflate:{},!1,U.maxPayload),U.headers["Sec-WebSocket-Extensions"]=pf({[m6.extensionName]:H.offer()});if(_.length){for(let v of _){if(typeof v!=="string"||!af.test(v)||Q.has(v))throw SyntaxError("An invalid or duplicated subprotocol was specified");Q.add(v)}U.headers["Sec-WebSocket-Protocol"]=_.join(",")}if(U.origin)if(U.protocolVersion<13)U.headers["Sec-WebSocket-Origin"]=U.origin;else U.headers.Origin=U.origin;if(z.username||z.password)U.auth=`${z.username}:${z.password}`;if(G){let v=U.path.split(":");U.socketPath=v[0],U.path=v[1]}let Y;if(U.followRedirects){if($._redirects===0){$._originalIpc=G,$._originalSecure=J,$._originalHostOrSocketPath=G?U.socketPath:z.host;let v=u&&u.headers;if(u={...u,headers:{}},v)for(let[O,T]of Object.entries(v))u.headers[O.toLowerCase()]=T}else if($.listenerCount("redirect")===0){let v=G?$._originalIpc?U.socketPath===$._originalHostOrSocketPath:!1:$._originalIpc?!1:z.host===$._originalHostOrSocketPath;if(!v||$._originalSecure&&!J){if(delete U.headers.authorization,delete U.headers.cookie,!v)delete U.headers.host;U.auth=void 0}}if(U.auth&&!u.headers.authorization)u.headers.authorization="Basic "+Buffer.from(U.auth).toString("base64");if(Y=$._req=X(U),$._redirects)$.emit("redirect",$.url,Y)}else Y=$._req=X(U);if(U.timeout)Y.on("timeout",()=>{X4($,Y,"Opening handshake has timed out")});if(Y.on("error",(v)=>{if(Y===null||Y[rT])return;Y=$._req=null,hu($,v)}),Y.on("response",(v)=>{let O=v.headers.location,T=v.statusCode;if(O&&U.followRedirects&&T>=300&&T<400){if(++$._redirects>U.maxRedirects){X4($,Y,"Maximum redirects exceeded");return}Y.abort();let V;try{V=new aX(O,I)}catch(W){let K=SyntaxError(`Invalid URL: ${O}`);hu($,K);return}nT($,V,_,u)}else if(!$.emit("unexpected-response",Y,v))X4($,Y,`Unexpected server response: ${v.statusCode}`)}),Y.on("upgrade",(v,O,T)=>{if($.emit("upgrade",v),$.readyState!==h.CONNECTING)return;Y=$._req=null;let V=v.headers.upgrade;if(V===void 0||V.toLowerCase()!=="websocket"){X4($,O,"Invalid Upgrade header");return}let W=xf("sha1").update(N+rf).digest("base64");if(v.headers["sec-websocket-accept"]!==W){X4($,O,"Invalid Sec-WebSocket-Accept header");return}let K=v.headers["sec-websocket-protocol"],D;if(K!==void 0){if(!Q.size)D="Server sent a subprotocol but none was requested";else if(!Q.has(K))D="Server sent an invalid subprotocol"}else if(Q.size)D="Server sent no subprotocol";if(D){X4($,O,D);return}if(K)$._protocol=K;let Z=v.headers["sec-websocket-extensions"];if(Z!==void 0){if(!H){X4($,O,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let B;try{B=of(Z)}catch(A){X4($,O,"Invalid Sec-WebSocket-Extensions header");return}let L=Object.keys(B);if(L.length!==1||L[0]!==m6.extensionName){X4($,O,"Server indicated an extension that was not requested");return}try{H.accept(B[m6.extensionName])}catch(A){X4($,O,"Invalid Sec-WebSocket-Extensions header");return}$._extensions[m6.extensionName]=H}$.setSocket(O,T,{allowSynchronousEvents:U.allowSynchronousEvents,generateMask:U.generateMask,maxPayload:U.maxPayload,skipUTF8Validation:U.skipUTF8Validation})}),U.finishRequest)U.finishRequest(Y,$);else Y.end()}function hu($,I){$._readyState=h.CLOSING,$._errorEmitted=!0,$.emit("error",I),$.emitClose()}function ef($){return $.path=$.socketPath,lT.connect($)}function sf($){if($.path=void 0,!$.servername&&$.servername!=="")$.servername=lT.isIP($.host)?"":$.host;return Cf.connect($)}function X4($,I,_){$._readyState=h.CLOSING;let u=Error(_);if(Error.captureStackTrace(u,X4),I.setHeader){if(I[rT]=!0,I.abort(),I.socket&&!I.socket.destroyed)I.socket.destroy();process.nextTick(hu,$,u)}else I.destroy(u),I.once("error",$.emit.bind($,"error")),I.once("close",$.emitClose.bind($))}function $5($,I,_){if(I){let u=lf(I)?I.size:tf(I).length;if($._socket)$._sender._bufferedBytes+=u;else $._bufferedAmount+=u}if(_){let u=Error(`WebSocket is not open: readyState ${$.readyState} (${q6[$.readyState]})`);process.nextTick(_,u)}}function $x($,I){let _=this[w$];if(_._closeFrameReceived=!0,_._closeMessage=I,_._closeCode=$,_._socket[w$]===void 0)return;if(_._socket.removeListener("data",du),process.nextTick(hT,_._socket),$===1005)_.close();else _.close($,I)}function Ix(){let $=this[w$];if(!$.isPaused)$._socket.resume()}function Ux($){let I=this[w$];if(I._socket[w$]!==void 0)I._socket.removeListener("data",du),process.nextTick(hT,I._socket),I.close($[hf]);if(!I._errorEmitted)I._errorEmitted=!0,I.emit("error",$)}function iT(){this[w$].emitClose()}function _x($,I){this[w$].emit("message",$,I)}function ux($){let I=this[w$];if(I._autoPong)I.pong($,!this._isServer,mT);I.emit("ping",$)}function zx($){this[w$].emit("pong",$)}function hT($){$.resume()}function Jx($){let I=this[w$];if(I.readyState===h.CLOSED)return;if(I.readyState===h.OPEN)I._readyState=h.CLOSING,dT(I);if(this._socket.end(),!I._errorEmitted)I._errorEmitted=!0,I.emit("error",$)}function dT($){$._closeTimer=setTimeout($._socket.destroy.bind($._socket),$._closeTimeout)}function cT(){let $=this[w$];if(this.removeListener("close",cT),this.removeListener("data",du),this.removeListener("end",pT),$._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[w$]=void 0,clearTimeout($._closeTimer),$._receiver._writableState.finished||$._receiver._writableState.errorEmitted)$.emitClose();else $._receiver.on("error",iT),$._receiver.on("finish",iT)}function du($){if(!this[w$]._receiver.write($))this.pause()}function pT(){let $=this[w$];$._readyState=h.CLOSING,$._receiver.end(),this.end()}function oT(){let $=this[w$];if(this.removeListener("error",oT),this.on("error",mT),$)$._readyState=h.CLOSING,this.destroy()}});var $B=w((jd,sT)=>{var Ad=cu(),{Duplex:Gx}=J$("stream");function aT($){$.emit("close")}function gx(){if(!this.destroyed&&this._writableState.finished)this.destroy()}function eT($){if(this.removeListener("error",eT),this.destroy(),this.listenerCount("error")===0)this.emit("error",$)}function qx($,I){let _=!0,u=new Gx({...I,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return $.on("message",function(z,J){let G=!J&&u._readableState.objectMode?z.toString():z;if(!u.push(G))$.pause()}),$.once("error",function(z){if(u.destroyed)return;_=!1,u.destroy(z)}),$.once("close",function(){if(u.destroyed)return;u.push(null)}),u._destroy=function(U,z){if($.readyState===$.CLOSED){z(U),process.nextTick(aT,u);return}let J=!1;if($.once("error",function(g){J=!0,z(g)}),$.once("close",function(){if(!J)z(U);process.nextTick(aT,u)}),_)$.terminate()},u._final=function(U){if($.readyState===$.CONNECTING){$.once("open",function(){u._final(U)});return}if($._socket===null)return;if($._socket._writableState.finished){if(U(),u._readableState.endEmitted)u.destroy()}else $._socket.once("finish",function(){U()}),$.close()},u._read=function(){if($.isPaused)$.resume()},u._write=function(U,z,J){if($.readyState===$.CONNECTING){$.once("open",function(){u._write(U,z,J)});return}$.send(U,J)},u.on("end",gx),u.on("error",eT),u}sT.exports=qx});var UB=w((Fd,IB)=>{var{tokenChars:Xx}=P0();function Nx($){let I=new Set,_=-1,u=-1,U=0;for(U;U<$.length;U++){let J=$.charCodeAt(U);if(u===-1&&Xx[J]===1){if(_===-1)_=U}else if(U!==0&&(J===32||J===9)){if(u===-1&&_!==-1)u=U}else if(J===44){if(_===-1)throw SyntaxError(`Unexpected character at index ${U}`);if(u===-1)u=U;let G=$.slice(_,u);if(I.has(G))throw SyntaxError(`The "${G}" subprotocol is duplicated`);I.add(G),_=u=-1}else throw SyntaxError(`Unexpected character at index ${U}`)}if(_===-1||u!==-1)throw SyntaxError("Unexpected end of input");let z=$.slice(_,U);if(I.has(z))throw SyntaxError(`The "${z}" subprotocol is duplicated`);return I.add(z),I}IB.exports={parse:Nx}});var GB=w((wd,JB)=>{var Qx=J$("events"),pu=J$("http"),{Duplex:Sd}=J$("stream"),{createHash:vx}=J$("crypto"),_B=tX(),V1=zU(),Hx=UB(),Yx=cu(),{CLOSE_TIMEOUT:Ox,GUID:Tx,kWebSocket:Bx}=G6(),Mx=/^[+/0-9A-Za-z]{22}==$/;class zB extends Qx{constructor($,I){super();if($={allowSynchronousEvents:!0,autoPong:!0,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:Ox,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:Yx,...$},$.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=pu.createServer((_,u)=>{let U=pu.STATUS_CODES[426];u.writeHead(426,{"Content-Length":U.length,"Content-Type":"text/plain"}),u.end(U)}),this._server.listen($.port,$.host,$.backlog,I);else if($.server)this._server=$.server;if(this._server){let _=this.emit.bind(this,"connection");this._removeListeners=Kx(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(u,U,z)=>{this.handleUpgrade(u,U,z,_)}})}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(qU,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(qU,this);else this._shouldEmitClose=!0;else process.nextTick(qU,this)}else{let I=this._server;this._removeListeners(),this._removeListeners=this._server=null,I.close(()=>{qU(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",uB);let U=$.headers["sec-websocket-key"],z=$.headers.upgrade,J=+$.headers["sec-websocket-version"];if($.method!=="GET"){Z1(this,$,I,405,"Invalid HTTP method");return}if(z===void 0||z.toLowerCase()!=="websocket"){Z1(this,$,I,400,"Invalid Upgrade header");return}if(U===void 0||!Mx.test(U)){Z1(this,$,I,400,"Missing or invalid Sec-WebSocket-Key header");return}if(J!==13&&J!==8){Z1(this,$,I,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle($)){XU(I,400);return}let G=$.headers["sec-websocket-protocol"],g=new Set;if(G!==void 0)try{g=Hx.parse(G)}catch(X){Z1(this,$,I,400,"Invalid Sec-WebSocket-Protocol header");return}let q=$.headers["sec-websocket-extensions"],N={};if(this.options.perMessageDeflate&&q!==void 0){let X=new V1(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let Q=_B.parse(q);if(Q[V1.extensionName])X.accept(Q[V1.extensionName]),N[V1.extensionName]=X}catch(Q){Z1(this,$,I,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let X={origin:$.headers[`${J===8?"sec-websocket-origin":"origin"}`],secure:!!($.socket.authorized||$.socket.encrypted),req:$};if(this.options.verifyClient.length===2){this.options.verifyClient(X,(Q,H,Y,v)=>{if(!Q)return XU(I,H||401,Y,v);this.completeUpgrade(N,U,g,$,I,_,u)});return}if(!this.options.verifyClient(X))return XU(I,401)}this.completeUpgrade(N,U,g,$,I,_,u)}completeUpgrade($,I,_,u,U,z,J){if(!U.readable||!U.writable)return U.destroy();if(U[Bx])throw Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>0)return XU(U,503);let g=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${vx("sha1").update(I+Tx).digest("base64")}`],q=new this.options.WebSocket(null,void 0,this.options);if(_.size){let N=this.options.handleProtocols?this.options.handleProtocols(_,u):_.values().next().value;if(N)g.push(`Sec-WebSocket-Protocol: ${N}`),q._protocol=N}if($[V1.extensionName]){let N=$[V1.extensionName].params,X=_B.format({[V1.extensionName]:[N]});g.push(`Sec-WebSocket-Extensions: ${X}`),q._extensions=$}if(this.emit("headers",g,u),U.write(g.concat(`\r
|
|
267
267
|
`).join(`\r
|
|
268
|
-
`)),U.removeListener("error"
|
|
268
|
+
`)),U.removeListener("error",uB),q.setSocket(U,z,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients)this.clients.add(q),q.on("close",()=>{if(this.clients.delete(q),this._shouldEmitClose&&!this.clients.size)process.nextTick(qU,this)});J(q,u)}}JB.exports=zB;function Kx($,I){for(let _ of Object.keys(I))$.on(_,I[_]);return function(){for(let u of Object.keys(I))$.removeListener(u,I[u])}}function qU($){$._state=2,$.emit("close")}function uB(){this.destroy()}function XU($,I,_,u){_=_||pu.STATUS_CODES[I],u={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(_),...u},$.once("finish",$.destroy),$.end(`HTTP/1.1 ${I} ${pu.STATUS_CODES[I]}\r
|
|
269
269
|
`+Object.keys(u).map((U)=>`${U}: ${u[U]}`).join(`\r
|
|
270
270
|
`)+`\r
|
|
271
271
|
\r
|
|
272
|
-
`+_)}function Z1($,I,_,u,U,z){if($.listenerCount("wsClientError")){let g=Error(U);Error.captureStackTrace(g,Z1),$.emit("wsClientError",g,_,I)}else qU(_,u,U,z)}});var Z5=v$(V5(),1),{program:Mk,createCommand:Kk,createArgument:Dk,createOption:Lk,CommanderError:Vk,InvalidArgumentError:Zk,InvalidOptionArgumentError:Wk,Command:zz,Argument:Rk,Option:Pk,Help:bk}=Z5.default;var r=v$(R$(),1);import{execSync as JF,spawn as vq}from"node:child_process";import k from"node:fs";import{tmpdir as r2}from"node:os";import s from"node:path";var SP=zg(),wP=e0(),EP=rz(),Tg=s0(),CP=x0(),M6=I$(),fP=H6(),xP=Z$(),kP=O6(),yP=T6(),py=__(),iP=Hg(),lP=Yg(),mP=Og(),g_=wQ(),EQ=C0();var rP=SP.Composer,nP=wP.Document,hP=EP.Schema,dP=Tg.YAMLError,cP=Tg.YAMLParseError,pP=Tg.YAMLWarning,oP=CP.Alias,tP=M6.isAlias,aP=M6.isCollection,eP=M6.isDocument,sP=M6.isMap,$b=M6.isNode,Ib=M6.isPair,Ub=M6.isScalar,_b=M6.isSeq,ub=fP.Pair,zb=xP.Scalar,gb=kP.YAMLMap,Jb=yP.YAMLSeq;var Gb=iP.Lexer,qb=lP.LineCounter,Xb=mP.Parser,o6=g_.parse,Nb=g_.parseAllDocuments,Qb=g_.parseDocument,vb=g_.stringify,Hb=EQ.visit,Yb=EQ.visitAsync;var g$={};S4(g$,{xor:()=>Jv,xid:()=>j7,void:()=>Iv,uuidv7:()=>L7,uuidv6:()=>D7,uuidv4:()=>K7,uuid:()=>M7,util:()=>S,url:()=>V7,uppercase:()=>p1,unknown:()=>_1,union:()=>E2,undefined:()=>s7,ulid:()=>A7,uint64:()=>a7,uint32:()=>p7,tuple:()=>EG,trim:()=>$0,treeifyError:()=>Ag,transform:()=>f2,toUpperCase:()=>U0,toLowerCase:()=>I0,toJSONSchema:()=>J2,templateLiteral:()=>Kv,symbol:()=>e7,superRefine:()=>Jq,success:()=>Tv,stringbool:()=>bv,stringFormat:()=>l7,string:()=>v2,strictObject:()=>zv,startsWith:()=>t1,slugify:()=>_0,size:()=>$1,setErrorMap:()=>dj,set:()=>Qv,safeParseAsync:()=>GG,safeParse:()=>JG,safeEncodeAsync:()=>YG,safeEncode:()=>vG,safeDecodeAsync:()=>OG,safeDecode:()=>HG,registry:()=>S_,regexes:()=>v4,regex:()=>d1,refine:()=>gq,record:()=>CG,readonly:()=>$q,property:()=>_2,promise:()=>Dv,prettifyError:()=>jg,preprocess:()=>jv,prefault:()=>cG,positive:()=>s_,pipe:()=>SI,partialRecord:()=>qv,parseAsync:()=>gG,parse:()=>zG,overwrite:()=>D4,optional:()=>jI,object:()=>uv,number:()=>BG,nullish:()=>Ov,nullable:()=>FI,null:()=>VG,normalize:()=>s1,nonpositive:()=>I2,nonoptional:()=>pG,nonnegative:()=>U2,never:()=>w2,negative:()=>$2,nativeEnum:()=>vv,nanoid:()=>R7,nan:()=>Bv,multipleOf:()=>Z6,minSize:()=>k4,minLength:()=>e4,mime:()=>e1,meta:()=>Rv,maxSize:()=>W6,maxLength:()=>I1,map:()=>Nv,mac:()=>w7,lte:()=>_4,lt:()=>f4,lowercase:()=>c1,looseRecord:()=>Xv,looseObject:()=>gv,locales:()=>WI,literal:()=>Hv,length:()=>U1,lazy:()=>_q,ksuid:()=>F7,keyof:()=>_v,jwt:()=>i7,json:()=>Av,iso:()=>g0,ipv6:()=>E7,ipv4:()=>S7,intersection:()=>SG,int64:()=>t7,int32:()=>c7,int:()=>H2,instanceof:()=>Pv,includes:()=>o1,httpUrl:()=>Z7,hostname:()=>m7,hex:()=>r7,hash:()=>n7,guid:()=>B7,gte:()=>l$,gt:()=>x4,globalRegistry:()=>S$,getErrorMap:()=>cj,function:()=>Lv,fromJSONSchema:()=>Sv,formatError:()=>HI,float64:()=>d7,float32:()=>h7,flattenError:()=>vI,file:()=>Yv,exactOptional:()=>mG,enum:()=>C2,endsWith:()=>a1,encodeAsync:()=>NG,encode:()=>qG,emoji:()=>W7,email:()=>T7,e164:()=>y7,discriminatedUnion:()=>Gv,describe:()=>Wv,decodeAsync:()=>QG,decode:()=>XG,date:()=>Uv,custom:()=>Zv,cuid2:()=>b7,cuid:()=>P7,core:()=>s4,config:()=>L$,coerce:()=>qq,codec:()=>Mv,clone:()=>i$,cidrv6:()=>f7,cidrv4:()=>C7,check:()=>Vv,catch:()=>aG,boolean:()=>MG,bigint:()=>o7,base64url:()=>k7,base64:()=>x7,array:()=>CI,any:()=>$v,_function:()=>Lv,_default:()=>hG,_ZodString:()=>Y2,ZodXor:()=>AG,ZodXID:()=>L2,ZodVoid:()=>PG,ZodUnknown:()=>WG,ZodUnion:()=>xI,ZodUndefined:()=>DG,ZodUUID:()=>y4,ZodURL:()=>wI,ZodULID:()=>D2,ZodType:()=>p,ZodTuple:()=>wG,ZodTransform:()=>iG,ZodTemplateLiteral:()=>Iq,ZodSymbol:()=>KG,ZodSuccess:()=>oG,ZodStringFormat:()=>G$,ZodString:()=>G0,ZodSet:()=>xG,ZodRecord:()=>kI,ZodRealError:()=>e$,ZodReadonly:()=>sG,ZodPromise:()=>uq,ZodPrefault:()=>dG,ZodPipe:()=>y2,ZodOptional:()=>x2,ZodObject:()=>fI,ZodNumberFormat:()=>u1,ZodNumber:()=>X0,ZodNullable:()=>rG,ZodNull:()=>LG,ZodNonOptional:()=>k2,ZodNever:()=>RG,ZodNanoID:()=>B2,ZodNaN:()=>eG,ZodMap:()=>fG,ZodMAC:()=>TG,ZodLiteral:()=>kG,ZodLazy:()=>Uq,ZodKSUID:()=>V2,ZodJWT:()=>F2,ZodIssueCode:()=>hj,ZodIntersection:()=>FG,ZodISOTime:()=>N2,ZodISODuration:()=>Q2,ZodISODateTime:()=>q2,ZodISODate:()=>X2,ZodIPv6:()=>W2,ZodIPv4:()=>Z2,ZodGUID:()=>AI,ZodFunction:()=>zq,ZodFirstPartyTypeKind:()=>Gq,ZodFile:()=>yG,ZodExactOptional:()=>lG,ZodError:()=>rj,ZodEnum:()=>J0,ZodEmoji:()=>T2,ZodEmail:()=>O2,ZodE164:()=>j2,ZodDiscriminatedUnion:()=>jG,ZodDefault:()=>nG,ZodDate:()=>EI,ZodCustomStringFormat:()=>q0,ZodCustom:()=>yI,ZodCodec:()=>i2,ZodCatch:()=>tG,ZodCUID2:()=>K2,ZodCUID:()=>M2,ZodCIDRv6:()=>P2,ZodCIDRv4:()=>R2,ZodBoolean:()=>N0,ZodBigIntFormat:()=>S2,ZodBigInt:()=>Q0,ZodBase64URL:()=>A2,ZodBase64:()=>b2,ZodArray:()=>bG,ZodAny:()=>ZG,TimePrecision:()=>E3,NEVER:()=>Bg,$output:()=>b3,$input:()=>A3,$brand:()=>Mg});var s4={};S4(s4,{version:()=>WJ,util:()=>S,treeifyError:()=>Ag,toJSONSchema:()=>J2,toDotPath:()=>iQ,safeParseAsync:()=>Sg,safeParse:()=>Fg,safeEncodeAsync:()=>pb,safeEncode:()=>db,safeDecodeAsync:()=>ob,safeDecode:()=>cb,registry:()=>S_,regexes:()=>v4,process:()=>u$,prettifyError:()=>jg,parseAsync:()=>X_,parse:()=>q_,meta:()=>H9,locales:()=>WI,isValidJWT:()=>z7,isValidBase64URL:()=>u7,isValidBase64:()=>cJ,initializeContext:()=>R6,globalRegistry:()=>S$,globalConfig:()=>zI,formatError:()=>HI,flattenError:()=>vI,finalize:()=>b6,extractDefs:()=>P6,encodeAsync:()=>nb,encode:()=>mb,describe:()=>v9,decodeAsync:()=>hb,decode:()=>rb,createToJSONSchemaMethod:()=>O9,createStandardJSONSchemaMethod:()=>z0,config:()=>L$,clone:()=>i$,_xor:()=>Mj,_xid:()=>r_,_void:()=>u9,_uuidv7:()=>x_,_uuidv6:()=>f_,_uuidv4:()=>C_,_uuid:()=>E_,_url:()=>PI,_uppercase:()=>p1,_unknown:()=>U9,_union:()=>Bj,_undefined:()=>s3,_ulid:()=>m_,_uint64:()=>a3,_uint32:()=>h3,_tuple:()=>Lj,_trim:()=>$0,_transform:()=>Aj,_toUpperCase:()=>U0,_toLowerCase:()=>I0,_templateLiteral:()=>kj,_symbol:()=>e3,_superRefine:()=>Q9,_success:()=>Ej,_stringbool:()=>Y9,_stringFormat:()=>u0,_string:()=>F3,_startsWith:()=>t1,_slugify:()=>_0,_size:()=>$1,_set:()=>Wj,_safeParseAsync:()=>r1,_safeParse:()=>m1,_safeEncodeAsync:()=>T_,_safeEncode:()=>Y_,_safeDecodeAsync:()=>B_,_safeDecode:()=>O_,_regex:()=>d1,_refine:()=>N9,_record:()=>Vj,_readonly:()=>xj,_property:()=>_2,_promise:()=>ij,_positive:()=>s_,_pipe:()=>fj,_parseAsync:()=>l1,_parse:()=>i1,_overwrite:()=>D4,_optional:()=>jj,_number:()=>y3,_nullable:()=>Fj,_null:()=>$9,_normalize:()=>s1,_nonpositive:()=>I2,_nonoptional:()=>wj,_nonnegative:()=>U2,_never:()=>_9,_negative:()=>$2,_nativeEnum:()=>Pj,_nanoid:()=>y_,_nan:()=>J9,_multipleOf:()=>Z6,_minSize:()=>k4,_minLength:()=>e4,_min:()=>l$,_mime:()=>e1,_maxSize:()=>W6,_maxLength:()=>I1,_max:()=>_4,_map:()=>Zj,_mac:()=>w3,_lte:()=>_4,_lt:()=>f4,_lowercase:()=>c1,_literal:()=>bj,_length:()=>U1,_lazy:()=>yj,_ksuid:()=>n_,_jwt:()=>e_,_isoTime:()=>x3,_isoDuration:()=>k3,_isoDateTime:()=>C3,_isoDate:()=>f3,_ipv6:()=>d_,_ipv4:()=>h_,_intersection:()=>Dj,_int64:()=>t3,_int32:()=>n3,_int:()=>l3,_includes:()=>o1,_guid:()=>RI,_gte:()=>l$,_gt:()=>x4,_float64:()=>r3,_float32:()=>m3,_file:()=>q9,_enum:()=>Rj,_endsWith:()=>a1,_encodeAsync:()=>v_,_encode:()=>N_,_emoji:()=>k_,_email:()=>w_,_e164:()=>a_,_discriminatedUnion:()=>Kj,_default:()=>Sj,_decodeAsync:()=>H_,_decode:()=>Q_,_date:()=>z9,_custom:()=>X9,_cuid2:()=>l_,_cuid:()=>i_,_coercedString:()=>S3,_coercedNumber:()=>i3,_coercedDate:()=>g9,_coercedBoolean:()=>c3,_coercedBigint:()=>o3,_cidrv6:()=>p_,_cidrv4:()=>c_,_check:()=>H7,_catch:()=>Cj,_boolean:()=>d3,_bigint:()=>p3,_base64url:()=>t_,_base64:()=>o_,_array:()=>G9,_any:()=>I9,TimePrecision:()=>E3,NEVER:()=>Bg,JSONSchemaGenerator:()=>$G,JSONSchema:()=>Y7,Doc:()=>L_,$output:()=>b3,$input:()=>A3,$constructor:()=>M,$brand:()=>Mg,$ZodXor:()=>N8,$ZodXID:()=>fJ,$ZodVoid:()=>J8,$ZodUnknown:()=>z8,$ZodUnion:()=>MI,$ZodUndefined:()=>U8,$ZodUUID:()=>bJ,$ZodURL:()=>jJ,$ZodULID:()=>CJ,$ZodType:()=>d,$ZodTuple:()=>j_,$ZodTransform:()=>K8,$ZodTemplateLiteral:()=>F8,$ZodSymbol:()=>I8,$ZodSuccess:()=>R8,$ZodStringFormat:()=>J$,$ZodString:()=>s6,$ZodSet:()=>O8,$ZodRegistry:()=>j3,$ZodRecord:()=>H8,$ZodRealError:()=>a$,$ZodReadonly:()=>j8,$ZodPromise:()=>w8,$ZodPrefault:()=>Z8,$ZodPipe:()=>A8,$ZodOptional:()=>F_,$ZodObjectJIT:()=>X8,$ZodObject:()=>G7,$ZodNumberFormat:()=>sJ,$ZodNumber:()=>b_,$ZodNullable:()=>L8,$ZodNull:()=>_8,$ZodNonOptional:()=>W8,$ZodNever:()=>g8,$ZodNanoID:()=>SJ,$ZodNaN:()=>b8,$ZodMap:()=>Y8,$ZodMAC:()=>nJ,$ZodLiteral:()=>B8,$ZodLazy:()=>E8,$ZodKSUID:()=>xJ,$ZodJWT:()=>aJ,$ZodIntersection:()=>v8,$ZodISOTime:()=>iJ,$ZodISODuration:()=>lJ,$ZodISODateTime:()=>kJ,$ZodISODate:()=>yJ,$ZodIPv6:()=>rJ,$ZodIPv4:()=>mJ,$ZodGUID:()=>PJ,$ZodFunction:()=>S8,$ZodFile:()=>M8,$ZodExactOptional:()=>D8,$ZodError:()=>QI,$ZodEnum:()=>T8,$ZodEncodeError:()=>t6,$ZodEmoji:()=>FJ,$ZodEmail:()=>AJ,$ZodE164:()=>tJ,$ZodDiscriminatedUnion:()=>Q8,$ZodDefault:()=>V8,$ZodDate:()=>G8,$ZodCustomStringFormat:()=>eJ,$ZodCustom:()=>C8,$ZodCodec:()=>KI,$ZodCheckUpperCase:()=>BJ,$ZodCheckStringFormat:()=>n1,$ZodCheckStartsWith:()=>KJ,$ZodCheckSizeEquals:()=>QJ,$ZodCheckRegex:()=>OJ,$ZodCheckProperty:()=>LJ,$ZodCheckOverwrite:()=>ZJ,$ZodCheckNumberFormat:()=>GJ,$ZodCheckMultipleOf:()=>JJ,$ZodCheckMinSize:()=>NJ,$ZodCheckMinLength:()=>HJ,$ZodCheckMimeType:()=>VJ,$ZodCheckMaxSize:()=>XJ,$ZodCheckMaxLength:()=>vJ,$ZodCheckLowerCase:()=>TJ,$ZodCheckLessThan:()=>K_,$ZodCheckLengthEquals:()=>YJ,$ZodCheckIncludes:()=>MJ,$ZodCheckGreaterThan:()=>D_,$ZodCheckEndsWith:()=>DJ,$ZodCheckBigIntFormat:()=>qJ,$ZodCheck:()=>X$,$ZodCatch:()=>P8,$ZodCUID2:()=>EJ,$ZodCUID:()=>wJ,$ZodCIDRv6:()=>dJ,$ZodCIDRv4:()=>hJ,$ZodBoolean:()=>BI,$ZodBigIntFormat:()=>$8,$ZodBigInt:()=>A_,$ZodBase64URL:()=>oJ,$ZodBase64:()=>pJ,$ZodAsyncError:()=>C4,$ZodArray:()=>q8,$ZodAny:()=>u8});var Bg=Object.freeze({status:"aborted"});function M($,I,_){function u(J,G){if(!J._zod)Object.defineProperty(J,"_zod",{value:{def:G,constr:g,traits:new Set},enumerable:!1});if(J._zod.traits.has($))return;J._zod.traits.add($),I(J,G);let q=g.prototype,N=Object.keys(q);for(let X=0;X<N.length;X++){let Q=N[X];if(!(Q in J))J[Q]=q[Q].bind(J)}}let U=_?.Parent??Object;class z extends U{}Object.defineProperty(z,"name",{value:$});function g(J){var G;let q=_?.Parent?new z:this;u(q,J),(G=q._zod).deferred??(G.deferred=[]);for(let N of q._zod.deferred)N();return q}return Object.defineProperty(g,"init",{value:u}),Object.defineProperty(g,Symbol.hasInstance,{value:(J)=>{if(_?.Parent&&J instanceof _.Parent)return!0;return J?._zod?.traits?.has($)}}),Object.defineProperty(g,"name",{value:$}),g}var Mg=Symbol("zod_brand");class C4 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class t6 extends Error{constructor($){super(`Encountered unidirectional transform during encode: ${$}`);this.name="ZodEncodeError"}}var zI={};function L$($){if($)Object.assign(zI,$);return zI}var S={};S4(S,{unwrapMessage:()=>gI,uint8ArrayToHex:()=>ib,uint8ArrayToBase64url:()=>kb,uint8ArrayToBase64:()=>xQ,stringifyPrimitive:()=>b,slugify:()=>Lg,shallowClone:()=>Zg,safeExtend:()=>Sb,required:()=>Cb,randomString:()=>Wb,propertyKeyTypes:()=>qI,promiseAllObject:()=>Zb,primitiveTypes:()=>Wg,prefixIssues:()=>U4,pick:()=>Ab,partial:()=>Eb,parsedType:()=>j,optionalKeys:()=>Rg,omit:()=>jb,objectClone:()=>Db,numKeys:()=>Rb,nullish:()=>K6,normalizeParams:()=>E,mergeDefs:()=>a4,merge:()=>wb,jsonStringifyReplacer:()=>x1,joinValues:()=>W,issue:()=>y1,isPlainObject:()=>L6,isObject:()=>a6,hexToUint8Array:()=>yb,getSizableOrigin:()=>XI,getParsedType:()=>Pb,getLengthableOrigin:()=>NI,getEnumValues:()=>JI,getElementAtPath:()=>Vb,floatSafeRemainder:()=>Dg,finalizeIssue:()=>t$,extend:()=>Fb,escapeRegex:()=>Q4,esc:()=>J_,defineLazy:()=>t,createTransparentProxy:()=>bb,cloneDef:()=>Lb,clone:()=>i$,cleanRegex:()=>GI,cleanEnum:()=>fb,captureStackTrace:()=>G_,cached:()=>k1,base64urlToUint8Array:()=>xb,base64ToUint8Array:()=>fQ,assignProp:()=>D6,assertNotEqual:()=>Tb,assertNever:()=>Mb,assertIs:()=>Bb,assertEqual:()=>Ob,assert:()=>Kb,allowsEval:()=>Vg,aborted:()=>V6,NUMBER_FORMAT_RANGES:()=>Pg,Class:()=>kQ,BIGINT_FORMAT_RANGES:()=>bg});function Ob($){return $}function Tb($){return $}function Bb($){}function Mb($){throw Error("Unexpected value in exhaustive check")}function Kb($){}function JI($){let I=Object.values($).filter((u)=>typeof u==="number");return Object.entries($).filter(([u,U])=>I.indexOf(+u)===-1).map(([u,U])=>U)}function W($,I="|"){return $.map((_)=>b(_)).join(I)}function x1($,I){if(typeof I==="bigint")return I.toString();return I}function k1($){return{get value(){{let _=$();return Object.defineProperty(this,"value",{value:_}),_}throw Error("cached value already set")}}}function K6($){return $===null||$===void 0}function GI($){let I=$.startsWith("^")?1:0,_=$.endsWith("$")?$.length-1:$.length;return $.slice(I,_)}function Dg($,I){let _=($.toString().split(".")[1]||"").length,u=I.toString(),U=(u.split(".")[1]||"").length;if(U===0&&/\d?e-\d?/.test(u)){let G=u.match(/\d?e-(\d?)/);if(G?.[1])U=Number.parseInt(G[1])}let z=_>U?_:U,g=Number.parseInt($.toFixed(z).replace(".","")),J=Number.parseInt(I.toFixed(z).replace(".",""));return g%J/10**z}var CQ=Symbol("evaluating");function t($,I,_){let u=void 0;Object.defineProperty($,I,{get(){if(u===CQ)return;if(u===void 0)u=CQ,u=_();return u},set(U){Object.defineProperty($,I,{value:U})},configurable:!0})}function Db($){return Object.create(Object.getPrototypeOf($),Object.getOwnPropertyDescriptors($))}function D6($,I,_){Object.defineProperty($,I,{value:_,writable:!0,enumerable:!0,configurable:!0})}function a4(...$){let I={};for(let _ of $){let u=Object.getOwnPropertyDescriptors(_);Object.assign(I,u)}return Object.defineProperties({},I)}function Lb($){return a4($._zod.def)}function Vb($,I){if(!I)return $;return I.reduce((_,u)=>_?.[u],$)}function Zb($){let I=Object.keys($),_=I.map((u)=>$[u]);return Promise.all(_).then((u)=>{let U={};for(let z=0;z<I.length;z++)U[I[z]]=u[z];return U})}function Wb($=10){let _="";for(let u=0;u<$;u++)_+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return _}function J_($){return JSON.stringify($)}function Lg($){return $.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var G_="captureStackTrace"in Error?Error.captureStackTrace:(...$)=>{};function a6($){return typeof $==="object"&&$!==null&&!Array.isArray($)}var Vg=k1(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch($){return!1}});function L6($){if(a6($)===!1)return!1;let I=$.constructor;if(I===void 0)return!0;if(typeof I!=="function")return!0;let _=I.prototype;if(a6(_)===!1)return!1;if(Object.prototype.hasOwnProperty.call(_,"isPrototypeOf")===!1)return!1;return!0}function Zg($){if(L6($))return{...$};if(Array.isArray($))return[...$];return $}function Rb($){let I=0;for(let _ in $)if(Object.prototype.hasOwnProperty.call($,_))I++;return I}var Pb=($)=>{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}`)}},qI=new Set(["string","number","symbol"]),Wg=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Q4($){return $.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function i$($,I,_){let u=new $._zod.constr(I??$._zod.def);if(!I||_?.parent)u._zod.parent=$;return u}function E($){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 bb($){let I;return new Proxy({},{get(_,u,U){return I??(I=$()),Reflect.get(I,u,U)},set(_,u,U,z){return I??(I=$()),Reflect.set(I,u,U,z)},has(_,u){return I??(I=$()),Reflect.has(I,u)},deleteProperty(_,u){return I??(I=$()),Reflect.deleteProperty(I,u)},ownKeys(_){return I??(I=$()),Reflect.ownKeys(I)},getOwnPropertyDescriptor(_,u){return I??(I=$()),Reflect.getOwnPropertyDescriptor(I,u)},defineProperty(_,u,U){return I??(I=$()),Reflect.defineProperty(I,u,U)}})}function b($){if(typeof $==="bigint")return $.toString()+"n";if(typeof $==="string")return`"${$}"`;return`${$}`}function Rg($){return Object.keys($).filter((I)=>{return $[I]._zod.optin==="optional"&&$[I]._zod.optout==="optional"})}var Pg={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]},bg={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Ab($,I){let _=$._zod.def,u=_.checks;if(u&&u.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let z=a4($._zod.def,{get shape(){let g={};for(let J in I){if(!(J in _.shape))throw Error(`Unrecognized key: "${J}"`);if(!I[J])continue;g[J]=_.shape[J]}return D6(this,"shape",g),g},checks:[]});return i$($,z)}function jb($,I){let _=$._zod.def,u=_.checks;if(u&&u.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let z=a4($._zod.def,{get shape(){let g={...$._zod.def.shape};for(let J in I){if(!(J in _.shape))throw Error(`Unrecognized key: "${J}"`);if(!I[J])continue;delete g[J]}return D6(this,"shape",g),g},checks:[]});return i$($,z)}function Fb($,I){if(!L6(I))throw Error("Invalid input to extend: expected a plain object");let _=$._zod.def.checks;if(_&&_.length>0){let z=$._zod.def.shape;for(let g in I)if(Object.getOwnPropertyDescriptor(z,g)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let U=a4($._zod.def,{get shape(){let z={...$._zod.def.shape,...I};return D6(this,"shape",z),z}});return i$($,U)}function Sb($,I){if(!L6(I))throw Error("Invalid input to safeExtend: expected a plain object");let _=a4($._zod.def,{get shape(){let u={...$._zod.def.shape,...I};return D6(this,"shape",u),u}});return i$($,_)}function wb($,I){let _=a4($._zod.def,{get shape(){let u={...$._zod.def.shape,...I._zod.def.shape};return D6(this,"shape",u),u},get catchall(){return I._zod.def.catchall},checks:[]});return i$($,_)}function Eb($,I,_){let U=I._zod.def.checks;if(U&&U.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let g=a4(I._zod.def,{get shape(){let J=I._zod.def.shape,G={...J};if(_)for(let q in _){if(!(q in J))throw Error(`Unrecognized key: "${q}"`);if(!_[q])continue;G[q]=$?new $({type:"optional",innerType:J[q]}):J[q]}else for(let q in J)G[q]=$?new $({type:"optional",innerType:J[q]}):J[q];return D6(this,"shape",G),G},checks:[]});return i$(I,g)}function Cb($,I,_){let u=a4(I._zod.def,{get shape(){let U=I._zod.def.shape,z={...U};if(_)for(let g in _){if(!(g in z))throw Error(`Unrecognized key: "${g}"`);if(!_[g])continue;z[g]=new $({type:"nonoptional",innerType:U[g]})}else for(let g in U)z[g]=new $({type:"nonoptional",innerType:U[g]});return D6(this,"shape",z),z}});return i$(I,u)}function V6($,I=0){if($.aborted===!0)return!0;for(let _=I;_<$.issues.length;_++)if($.issues[_]?.continue!==!0)return!0;return!1}function U4($,I){return I.map((_)=>{var u;return(u=_).path??(u.path=[]),_.path.unshift($),_})}function gI($){return typeof $==="string"?$:$?.message}function t$($,I,_){let u={...$,path:$.path??[]};if(!$.message){let U=gI($.inst?._zod.def?.error?.($))??gI(I?.error?.($))??gI(_.customError?.($))??gI(_.localeError?.($))??"Invalid input";u.message=U}if(delete u.inst,delete u.continue,!I?.reportInput)delete u.input;return u}function XI($){if($ instanceof Set)return"set";if($ instanceof Map)return"map";if($ instanceof File)return"file";return"unknown"}function NI($){if(Array.isArray($))return"array";if(typeof $==="string")return"string";return"unknown"}function j($){let I=typeof $;switch(I){case"number":return Number.isNaN($)?"nan":"number";case"object":{if($===null)return"null";if(Array.isArray($))return"array";let _=$;if(_&&Object.getPrototypeOf(_)!==Object.prototype&&"constructor"in _&&_.constructor)return _.constructor.name}}return I}function y1(...$){let[I,_,u]=$;if(typeof I==="string")return{message:I,code:"custom",input:_,inst:u};return{...I}}function fb($){return Object.entries($).filter(([I,_])=>{return Number.isNaN(Number.parseInt(I,10))}).map((I)=>I[1])}function fQ($){let I=atob($),_=new Uint8Array(I.length);for(let u=0;u<I.length;u++)_[u]=I.charCodeAt(u);return _}function xQ($){let I="";for(let _=0;_<$.length;_++)I+=String.fromCharCode($[_]);return btoa(I)}function xb($){let I=$.replace(/-/g,"+").replace(/_/g,"/"),_="=".repeat((4-I.length%4)%4);return fQ(I+_)}function kb($){return xQ($).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function yb($){let I=$.replace(/^0x/,"");if(I.length%2!==0)throw Error("Invalid hex string length");let _=new Uint8Array(I.length/2);for(let u=0;u<I.length;u+=2)_[u/2]=Number.parseInt(I.slice(u,u+2),16);return _}function ib($){return Array.from($).map((I)=>I.toString(16).padStart(2,"0")).join("")}class kQ{constructor(...$){}}var yQ=($,I)=>{$.name="$ZodError",Object.defineProperty($,"_zod",{value:$._zod,enumerable:!1}),Object.defineProperty($,"issues",{value:I,enumerable:!1}),$.message=JSON.stringify(I,x1,2),Object.defineProperty($,"toString",{value:()=>$.message,enumerable:!1})},QI=M("$ZodError",yQ),a$=M("$ZodError",yQ,{Parent:Error});function vI($,I=(_)=>_.message){let _={},u=[];for(let U of $.issues)if(U.path.length>0)_[U.path[0]]=_[U.path[0]]||[],_[U.path[0]].push(I(U));else u.push(I(U));return{formErrors:u,fieldErrors:_}}function HI($,I=(_)=>_.message){let _={_errors:[]},u=(U)=>{for(let z of U.issues)if(z.code==="invalid_union"&&z.errors.length)z.errors.map((g)=>u({issues:g}));else if(z.code==="invalid_key")u({issues:z.issues});else if(z.code==="invalid_element")u({issues:z.issues});else if(z.path.length===0)_._errors.push(I(z));else{let g=_,J=0;while(J<z.path.length){let G=z.path[J];if(J!==z.path.length-1)g[G]=g[G]||{_errors:[]};else g[G]=g[G]||{_errors:[]},g[G]._errors.push(I(z));g=g[G],J++}}};return u($),_}function Ag($,I=(_)=>_.message){let _={errors:[]},u=(U,z=[])=>{var g,J;for(let G of U.issues)if(G.code==="invalid_union"&&G.errors.length)G.errors.map((q)=>u({issues:q},G.path));else if(G.code==="invalid_key")u({issues:G.issues},G.path);else if(G.code==="invalid_element")u({issues:G.issues},G.path);else{let q=[...z,...G.path];if(q.length===0){_.errors.push(I(G));continue}let N=_,X=0;while(X<q.length){let Q=q[X],H=X===q.length-1;if(typeof Q==="string")N.properties??(N.properties={}),(g=N.properties)[Q]??(g[Q]={errors:[]}),N=N.properties[Q];else N.items??(N.items=[]),(J=N.items)[Q]??(J[Q]={errors:[]}),N=N.items[Q];if(H)N.errors.push(I(G));X++}}};return u($),_}function iQ($){let I=[],_=$.map((u)=>typeof u==="object"?u.key:u);for(let u of _)if(typeof u==="number")I.push(`[${u}]`);else if(typeof u==="symbol")I.push(`[${JSON.stringify(String(u))}]`);else if(/[^\w$]/.test(u))I.push(`[${JSON.stringify(u)}]`);else{if(I.length)I.push(".");I.push(u)}return I.join("")}function jg($){let I=[],_=[...$.issues].sort((u,U)=>(u.path??[]).length-(U.path??[]).length);for(let u of _)if(I.push(`✖ ${u.message}`),u.path?.length)I.push(` → at ${iQ(u.path)}`);return I.join(`
|
|
273
|
-
`)}var i1=($)=>(I,_,u,U)=>{let z=u?Object.assign(u,{async:!1}):{async:!1},g=I._zod.run({value:_,issues:[]},z);if(g instanceof Promise)throw new C4;if(g.issues.length){let J=new(U?.Err??$)(g.issues.map((G)=>t$(G,z,L$())));throw G_(J,U?.callee),J}return g.value},q_=i1(a$),l1=($)=>async(I,_,u,U)=>{let z=u?Object.assign(u,{async:!0}):{async:!0},g=I._zod.run({value:_,issues:[]},z);if(g instanceof Promise)g=await g;if(g.issues.length){let J=new(U?.Err??$)(g.issues.map((G)=>t$(G,z,L$())));throw G_(J,U?.callee),J}return g.value},X_=l1(a$),m1=($)=>(I,_,u)=>{let U=u?{...u,async:!1}:{async:!1},z=I._zod.run({value:_,issues:[]},U);if(z instanceof Promise)throw new C4;return z.issues.length?{success:!1,error:new($??QI)(z.issues.map((g)=>t$(g,U,L$())))}:{success:!0,data:z.value}},Fg=m1(a$),r1=($)=>async(I,_,u)=>{let U=u?Object.assign(u,{async:!0}):{async:!0},z=I._zod.run({value:_,issues:[]},U);if(z instanceof Promise)z=await z;return z.issues.length?{success:!1,error:new $(z.issues.map((g)=>t$(g,U,L$())))}:{success:!0,data:z.value}},Sg=r1(a$),N_=($)=>(I,_,u)=>{let U=u?Object.assign(u,{direction:"backward"}):{direction:"backward"};return i1($)(I,_,U)},mb=N_(a$),Q_=($)=>(I,_,u)=>{return i1($)(I,_,u)},rb=Q_(a$),v_=($)=>async(I,_,u)=>{let U=u?Object.assign(u,{direction:"backward"}):{direction:"backward"};return l1($)(I,_,U)},nb=v_(a$),H_=($)=>async(I,_,u)=>{return l1($)(I,_,u)},hb=H_(a$),Y_=($)=>(I,_,u)=>{let U=u?Object.assign(u,{direction:"backward"}):{direction:"backward"};return m1($)(I,_,U)},db=Y_(a$),O_=($)=>(I,_,u)=>{return m1($)(I,_,u)},cb=O_(a$),T_=($)=>async(I,_,u)=>{let U=u?Object.assign(u,{direction:"backward"}):{direction:"backward"};return r1($)(I,_,U)},pb=T_(a$),B_=($)=>async(I,_,u)=>{return r1($)(I,_,u)},ob=B_(a$);var v4={};S4(v4,{xid:()=>fg,uuid7:()=>sb,uuid6:()=>eb,uuid4:()=>ab,uuid:()=>e6,uppercase:()=>gJ,unicodeEmail:()=>lQ,undefined:()=>uJ,ulid:()=>Cg,time:()=>ag,string:()=>sg,sha512_hex:()=>KA,sha512_base64url:()=>LA,sha512_base64:()=>DA,sha384_hex:()=>TA,sha384_base64url:()=>MA,sha384_base64:()=>BA,sha256_hex:()=>HA,sha256_base64url:()=>OA,sha256_base64:()=>YA,sha1_hex:()=>NA,sha1_base64url:()=>vA,sha1_base64:()=>QA,rfc5322Email:()=>IA,number:()=>YI,null:()=>_J,nanoid:()=>kg,md5_hex:()=>GA,md5_base64url:()=>XA,md5_base64:()=>qA,mac:()=>hg,lowercase:()=>zJ,ksuid:()=>xg,ipv6:()=>ng,ipv4:()=>rg,integer:()=>IJ,idnEmail:()=>UA,html5Email:()=>$A,hostname:()=>zA,hex:()=>JA,guid:()=>ig,extendedDuration:()=>tb,emoji:()=>mg,email:()=>lg,e164:()=>og,duration:()=>yg,domain:()=>gA,datetime:()=>eg,date:()=>tg,cuid2:()=>Eg,cuid:()=>wg,cidrv6:()=>cg,cidrv4:()=>dg,browserEmail:()=>_A,boolean:()=>UJ,bigint:()=>$J,base64url:()=>M_,base64:()=>pg});var wg=/^[cC][^\s-]{8,}$/,Eg=/^[0-9a-z]+$/,Cg=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,fg=/^[0-9a-vA-V]{20}$/,xg=/^[A-Za-z0-9]{27}$/,kg=/^[a-zA-Z0-9_-]{21}$/,yg=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,tb=/^[-+]?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)?)??$/,ig=/^([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})$/,e6=($)=>{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})$`)},ab=e6(4),eb=e6(6),sb=e6(7),lg=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,$A=/^[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])?)*$/,IA=/^(([^<>()\[\]\\.,;:\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,}))$/,lQ=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,UA=lQ,_A=/^[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])?)*$/,uA="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function mg(){return new RegExp(uA,"u")}var rg=/^(?:(?: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])$/,ng=/^(([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}|:))$/,hg=($)=>{let I=Q4($??":");return new RegExp(`^(?:[0-9A-F]{2}${I}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${I}){5}[0-9a-f]{2}$`)},dg=/^((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])$/,cg=/^(([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])$/,pg=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,M_=/^[A-Za-z0-9_-]*$/,zA=/^(?=.{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])?)*\.?$/,gA=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,og=/^\+[1-9]\d{6,14}$/,mQ="(?:(?:\\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])))",tg=new RegExp(`^${mQ}$`);function rQ($){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 ag($){return new RegExp(`^${rQ($)}$`)}function eg($){let I=rQ({precision:$.precision}),_=["Z"];if($.local)_.push("");if($.offset)_.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let u=`${I}(?:${_.join("|")})`;return new RegExp(`^${mQ}T(?:${u})$`)}var sg=($)=>{let I=$?`[\\s\\S]{${$?.minimum??0},${$?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${I}$`)},$J=/^-?\d+n?$/,IJ=/^-?\d+$/,YI=/^-?\d+(?:\.\d+)?$/,UJ=/^(?:true|false)$/i,_J=/^null$/i;var uJ=/^undefined$/i;var zJ=/^[^A-Z]*$/,gJ=/^[^a-z]*$/,JA=/^[0-9a-fA-F]*$/;function OI($,I){return new RegExp(`^[A-Za-z0-9+/]{${$}}${I}$`)}function TI($){return new RegExp(`^[A-Za-z0-9_-]{${$}}$`)}var GA=/^[0-9a-fA-F]{32}$/,qA=OI(22,"=="),XA=TI(22),NA=/^[0-9a-fA-F]{40}$/,QA=OI(27,"="),vA=TI(27),HA=/^[0-9a-fA-F]{64}$/,YA=OI(43,"="),OA=TI(43),TA=/^[0-9a-fA-F]{96}$/,BA=OI(64,""),MA=TI(64),KA=/^[0-9a-fA-F]{128}$/,DA=OI(86,"=="),LA=TI(86);var X$=M("$ZodCheck",($,I)=>{var _;$._zod??($._zod={}),$._zod.def=I,(_=$._zod).onattach??(_.onattach=[])}),hQ={number:"number",bigint:"bigint",object:"date"},K_=M("$ZodCheckLessThan",($,I)=>{X$.init($,I);let _=hQ[typeof I.value];$._zod.onattach.push((u)=>{let U=u._zod.bag,z=(I.inclusive?U.maximum:U.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(I.value<z)if(I.inclusive)U.maximum=I.value;else U.exclusiveMaximum=I.value}),$._zod.check=(u)=>{if(I.inclusive?u.value<=I.value:u.value<I.value)return;u.issues.push({origin:_,code:"too_big",maximum:typeof I.value==="object"?I.value.getTime():I.value,input:u.value,inclusive:I.inclusive,inst:$,continue:!I.abort})}}),D_=M("$ZodCheckGreaterThan",($,I)=>{X$.init($,I);let _=hQ[typeof I.value];$._zod.onattach.push((u)=>{let U=u._zod.bag,z=(I.inclusive?U.minimum:U.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(I.value>z)if(I.inclusive)U.minimum=I.value;else U.exclusiveMinimum=I.value}),$._zod.check=(u)=>{if(I.inclusive?u.value>=I.value:u.value>I.value)return;u.issues.push({origin:_,code:"too_small",minimum:typeof I.value==="object"?I.value.getTime():I.value,input:u.value,inclusive:I.inclusive,inst:$,continue:!I.abort})}}),JJ=M("$ZodCheckMultipleOf",($,I)=>{X$.init($,I),$._zod.onattach.push((_)=>{var u;(u=_._zod.bag).multipleOf??(u.multipleOf=I.value)}),$._zod.check=(_)=>{if(typeof _.value!==typeof I.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof _.value==="bigint"?_.value%I.value===BigInt(0):Dg(_.value,I.value)===0)return;_.issues.push({origin:typeof _.value,code:"not_multiple_of",divisor:I.value,input:_.value,inst:$,continue:!I.abort})}}),GJ=M("$ZodCheckNumberFormat",($,I)=>{X$.init($,I),I.format=I.format||"float64";let _=I.format?.includes("int"),u=_?"int":"number",[U,z]=Pg[I.format];$._zod.onattach.push((g)=>{let J=g._zod.bag;if(J.format=I.format,J.minimum=U,J.maximum=z,_)J.pattern=IJ}),$._zod.check=(g)=>{let J=g.value;if(_){if(!Number.isInteger(J)){g.issues.push({expected:u,format:I.format,code:"invalid_type",continue:!1,input:J,inst:$});return}if(!Number.isSafeInteger(J)){if(J>0)g.issues.push({input:J,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:u,inclusive:!0,continue:!I.abort});else g.issues.push({input:J,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:u,inclusive:!0,continue:!I.abort});return}}if(J<U)g.issues.push({origin:"number",input:J,code:"too_small",minimum:U,inclusive:!0,inst:$,continue:!I.abort});if(J>z)g.issues.push({origin:"number",input:J,code:"too_big",maximum:z,inclusive:!0,inst:$,continue:!I.abort})}}),qJ=M("$ZodCheckBigIntFormat",($,I)=>{X$.init($,I);let[_,u]=bg[I.format];$._zod.onattach.push((U)=>{let z=U._zod.bag;z.format=I.format,z.minimum=_,z.maximum=u}),$._zod.check=(U)=>{let z=U.value;if(z<_)U.issues.push({origin:"bigint",input:z,code:"too_small",minimum:_,inclusive:!0,inst:$,continue:!I.abort});if(z>u)U.issues.push({origin:"bigint",input:z,code:"too_big",maximum:u,inclusive:!0,inst:$,continue:!I.abort})}}),XJ=M("$ZodCheckMaxSize",($,I)=>{var _;X$.init($,I),(_=$._zod.def).when??(_.when=(u)=>{let U=u.value;return!K6(U)&&U.size!==void 0}),$._zod.onattach.push((u)=>{let U=u._zod.bag.maximum??Number.POSITIVE_INFINITY;if(I.maximum<U)u._zod.bag.maximum=I.maximum}),$._zod.check=(u)=>{let U=u.value;if(U.size<=I.maximum)return;u.issues.push({origin:XI(U),code:"too_big",maximum:I.maximum,inclusive:!0,input:U,inst:$,continue:!I.abort})}}),NJ=M("$ZodCheckMinSize",($,I)=>{var _;X$.init($,I),(_=$._zod.def).when??(_.when=(u)=>{let U=u.value;return!K6(U)&&U.size!==void 0}),$._zod.onattach.push((u)=>{let U=u._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(I.minimum>U)u._zod.bag.minimum=I.minimum}),$._zod.check=(u)=>{let U=u.value;if(U.size>=I.minimum)return;u.issues.push({origin:XI(U),code:"too_small",minimum:I.minimum,inclusive:!0,input:U,inst:$,continue:!I.abort})}}),QJ=M("$ZodCheckSizeEquals",($,I)=>{var _;X$.init($,I),(_=$._zod.def).when??(_.when=(u)=>{let U=u.value;return!K6(U)&&U.size!==void 0}),$._zod.onattach.push((u)=>{let U=u._zod.bag;U.minimum=I.size,U.maximum=I.size,U.size=I.size}),$._zod.check=(u)=>{let U=u.value,z=U.size;if(z===I.size)return;let g=z>I.size;u.issues.push({origin:XI(U),...g?{code:"too_big",maximum:I.size}:{code:"too_small",minimum:I.size},inclusive:!0,exact:!0,input:u.value,inst:$,continue:!I.abort})}}),vJ=M("$ZodCheckMaxLength",($,I)=>{var _;X$.init($,I),(_=$._zod.def).when??(_.when=(u)=>{let U=u.value;return!K6(U)&&U.length!==void 0}),$._zod.onattach.push((u)=>{let U=u._zod.bag.maximum??Number.POSITIVE_INFINITY;if(I.maximum<U)u._zod.bag.maximum=I.maximum}),$._zod.check=(u)=>{let U=u.value;if(U.length<=I.maximum)return;let g=NI(U);u.issues.push({origin:g,code:"too_big",maximum:I.maximum,inclusive:!0,input:U,inst:$,continue:!I.abort})}}),HJ=M("$ZodCheckMinLength",($,I)=>{var _;X$.init($,I),(_=$._zod.def).when??(_.when=(u)=>{let U=u.value;return!K6(U)&&U.length!==void 0}),$._zod.onattach.push((u)=>{let U=u._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(I.minimum>U)u._zod.bag.minimum=I.minimum}),$._zod.check=(u)=>{let U=u.value;if(U.length>=I.minimum)return;let g=NI(U);u.issues.push({origin:g,code:"too_small",minimum:I.minimum,inclusive:!0,input:U,inst:$,continue:!I.abort})}}),YJ=M("$ZodCheckLengthEquals",($,I)=>{var _;X$.init($,I),(_=$._zod.def).when??(_.when=(u)=>{let U=u.value;return!K6(U)&&U.length!==void 0}),$._zod.onattach.push((u)=>{let U=u._zod.bag;U.minimum=I.length,U.maximum=I.length,U.length=I.length}),$._zod.check=(u)=>{let U=u.value,z=U.length;if(z===I.length)return;let g=NI(U),J=z>I.length;u.issues.push({origin:g,...J?{code:"too_big",maximum:I.length}:{code:"too_small",minimum:I.length},inclusive:!0,exact:!0,input:u.value,inst:$,continue:!I.abort})}}),n1=M("$ZodCheckStringFormat",($,I)=>{var _,u;if(X$.init($,I),$._zod.onattach.push((U)=>{let z=U._zod.bag;if(z.format=I.format,I.pattern)z.patterns??(z.patterns=new Set),z.patterns.add(I.pattern)}),I.pattern)(_=$._zod).check??(_.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(u=$._zod).check??(u.check=()=>{})}),OJ=M("$ZodCheckRegex",($,I)=>{n1.init($,I),$._zod.check=(_)=>{if(I.pattern.lastIndex=0,I.pattern.test(_.value))return;_.issues.push({origin:"string",code:"invalid_format",format:"regex",input:_.value,pattern:I.pattern.toString(),inst:$,continue:!I.abort})}}),TJ=M("$ZodCheckLowerCase",($,I)=>{I.pattern??(I.pattern=zJ),n1.init($,I)}),BJ=M("$ZodCheckUpperCase",($,I)=>{I.pattern??(I.pattern=gJ),n1.init($,I)}),MJ=M("$ZodCheckIncludes",($,I)=>{X$.init($,I);let _=Q4(I.includes),u=new RegExp(typeof I.position==="number"?`^.{${I.position}}${_}`:_);I.pattern=u,$._zod.onattach.push((U)=>{let z=U._zod.bag;z.patterns??(z.patterns=new Set),z.patterns.add(u)}),$._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})}}),KJ=M("$ZodCheckStartsWith",($,I)=>{X$.init($,I);let _=new RegExp(`^${Q4(I.prefix)}.*`);I.pattern??(I.pattern=_),$._zod.onattach.push((u)=>{let U=u._zod.bag;U.patterns??(U.patterns=new Set),U.patterns.add(_)}),$._zod.check=(u)=>{if(u.value.startsWith(I.prefix))return;u.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:I.prefix,input:u.value,inst:$,continue:!I.abort})}}),DJ=M("$ZodCheckEndsWith",($,I)=>{X$.init($,I);let _=new RegExp(`.*${Q4(I.suffix)}$`);I.pattern??(I.pattern=_),$._zod.onattach.push((u)=>{let U=u._zod.bag;U.patterns??(U.patterns=new Set),U.patterns.add(_)}),$._zod.check=(u)=>{if(u.value.endsWith(I.suffix))return;u.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:I.suffix,input:u.value,inst:$,continue:!I.abort})}});function nQ($,I,_){if($.issues.length)I.issues.push(...U4(_,$.issues))}var LJ=M("$ZodCheckProperty",($,I)=>{X$.init($,I),$._zod.check=(_)=>{let u=I.schema._zod.run({value:_.value[I.property],issues:[]},{});if(u instanceof Promise)return u.then((U)=>nQ(U,_,I.property));nQ(u,_,I.property);return}}),VJ=M("$ZodCheckMimeType",($,I)=>{X$.init($,I);let _=new Set(I.mime);$._zod.onattach.push((u)=>{u._zod.bag.mime=I.mime}),$._zod.check=(u)=>{if(_.has(u.value.type))return;u.issues.push({code:"invalid_value",values:I.mime,input:u.value.type,inst:$,continue:!I.abort})}}),ZJ=M("$ZodCheckOverwrite",($,I)=>{X$.init($,I),$._zod.check=(_)=>{_.value=I.tx(_.value)}});class L_{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 _=$.split(`
|
|
272
|
+
`+_)}function Z1($,I,_,u,U,z){if($.listenerCount("wsClientError")){let J=Error(U);Error.captureStackTrace(J,Z1),$.emit("wsClientError",J,_,I)}else XU(_,u,U,z)}});var P5=H$(R5(),1),{program:Kk,createCommand:Dk,createArgument:Lk,createOption:Vk,CommanderError:Zk,InvalidArgumentError:Wk,InvalidOptionArgumentError:Rk,Command:zz,Argument:Pk,Option:bk,Help:Ak}=P5.default;var l=H$(b$(),1);import{execSync as NF,spawn as vq}from"node:child_process";import k from"node:fs";import{tmpdir as n2}from"node:os";import s from"node:path";var fP=zJ(),xP=e0(),kP=rz(),TJ=s0(),yP=x0(),M6=I$(),iP=H6(),lP=R$(),mP=O6(),rP=T6(),oy=u_(),nP=HJ(),hP=YJ(),dP=OJ(),G_=fQ(),xQ=C0();var cP=fP.Composer,pP=xP.Document,oP=kP.Schema,tP=TJ.YAMLError,aP=TJ.YAMLParseError,eP=TJ.YAMLWarning,sP=yP.Alias,$b=M6.isAlias,Ib=M6.isCollection,Ub=M6.isDocument,_b=M6.isMap,ub=M6.isNode,zb=M6.isPair,Jb=M6.isScalar,Gb=M6.isSeq,gb=iP.Pair,qb=lP.Scalar,Xb=mP.YAMLMap,Nb=rP.YAMLSeq;var Qb=nP.Lexer,vb=hP.LineCounter,Hb=dP.Parser,a6=G_.parse,Yb=G_.parseAllDocuments,Ob=G_.parseDocument,Tb=G_.stringify,Bb=xQ.visit,Mb=xQ.visitAsync;var G$={};S4(G$,{xor:()=>Xv,xid:()=>w7,void:()=>uv,uuidv7:()=>W7,uuidv6:()=>Z7,uuidv4:()=>V7,uuid:()=>L7,util:()=>S,url:()=>R7,uppercase:()=>p1,unknown:()=>z1,union:()=>C2,undefined:()=>Uv,ulid:()=>S7,uint64:()=>$v,uint32:()=>a7,tuple:()=>Eg,trim:()=>$0,treeifyError:()=>AJ,transform:()=>x2,toUpperCase:()=>U0,toLowerCase:()=>I0,toJSONSchema:()=>g2,templateLiteral:()=>Vv,symbol:()=>Iv,superRefine:()=>Gq,success:()=>Kv,stringbool:()=>Fv,stringFormat:()=>n7,string:()=>H2,strictObject:()=>gv,startsWith:()=>t1,slugify:()=>_0,size:()=>U1,setErrorMap:()=>tj,set:()=>Yv,safeParseAsync:()=>gg,safeParse:()=>Gg,safeEncodeAsync:()=>Yg,safeEncode:()=>vg,safeDecodeAsync:()=>Og,safeDecode:()=>Hg,registry:()=>w_,regexes:()=>Y4,regex:()=>d1,refine:()=>Jq,record:()=>Cg,readonly:()=>$q,property:()=>u2,promise:()=>Zv,prettifyError:()=>jJ,preprocess:()=>wv,prefault:()=>cg,positive:()=>$2,pipe:()=>SI,partialRecord:()=>Qv,parseAsync:()=>Jg,parse:()=>zg,overwrite:()=>L4,optional:()=>jI,object:()=>Gv,number:()=>Bg,nullish:()=>Mv,nullable:()=>FI,null:()=>Vg,normalize:()=>s1,nonpositive:()=>U2,nonoptional:()=>pg,nonnegative:()=>_2,never:()=>E2,negative:()=>I2,nativeEnum:()=>Ov,nanoid:()=>A7,nan:()=>Dv,multipleOf:()=>Z6,minSize:()=>k4,minLength:()=>e4,mime:()=>e1,meta:()=>Av,maxSize:()=>W6,maxLength:()=>_1,map:()=>Hv,mac:()=>f7,lte:()=>u4,lt:()=>f4,lowercase:()=>c1,looseRecord:()=>vv,looseObject:()=>qv,locales:()=>WI,literal:()=>Tv,length:()=>u1,lazy:()=>_q,ksuid:()=>E7,keyof:()=>Jv,jwt:()=>r7,json:()=>Sv,iso:()=>J0,ipv6:()=>x7,ipv4:()=>C7,intersection:()=>Sg,int64:()=>s7,int32:()=>t7,int:()=>Y2,instanceof:()=>jv,includes:()=>o1,httpUrl:()=>P7,hostname:()=>h7,hex:()=>d7,hash:()=>c7,guid:()=>D7,gte:()=>h$,gt:()=>x4,globalRegistry:()=>E$,getErrorMap:()=>aj,function:()=>Wv,fromJSONSchema:()=>Cv,formatError:()=>HI,float64:()=>o7,float32:()=>p7,flattenError:()=>vI,file:()=>Bv,exactOptional:()=>mg,enum:()=>f2,endsWith:()=>a1,encodeAsync:()=>Ng,encode:()=>qg,emoji:()=>b7,email:()=>K7,e164:()=>m7,discriminatedUnion:()=>Nv,describe:()=>bv,decodeAsync:()=>Qg,decode:()=>Xg,date:()=>zv,custom:()=>Pv,cuid2:()=>F7,cuid:()=>j7,core:()=>s4,config:()=>Z$,coerce:()=>qq,codec:()=>Lv,clone:()=>n$,cidrv6:()=>y7,cidrv4:()=>k7,check:()=>Rv,catch:()=>ag,boolean:()=>Mg,bigint:()=>e7,base64url:()=>l7,base64:()=>i7,array:()=>CI,any:()=>_v,_function:()=>Wv,_default:()=>hg,_ZodString:()=>O2,ZodXor:()=>Ag,ZodXID:()=>V2,ZodVoid:()=>Pg,ZodUnknown:()=>Wg,ZodUnion:()=>xI,ZodUndefined:()=>Dg,ZodUUID:()=>y4,ZodURL:()=>wI,ZodULID:()=>L2,ZodType:()=>c,ZodTuple:()=>wg,ZodTransform:()=>ig,ZodTemplateLiteral:()=>Iq,ZodSymbol:()=>Kg,ZodSuccess:()=>og,ZodStringFormat:()=>q$,ZodString:()=>g0,ZodSet:()=>xg,ZodRecord:()=>kI,ZodRealError:()=>s$,ZodReadonly:()=>sg,ZodPromise:()=>uq,ZodPrefault:()=>dg,ZodPipe:()=>i2,ZodOptional:()=>k2,ZodObject:()=>fI,ZodNumberFormat:()=>J1,ZodNumber:()=>X0,ZodNullable:()=>rg,ZodNull:()=>Lg,ZodNonOptional:()=>y2,ZodNever:()=>Rg,ZodNanoID:()=>M2,ZodNaN:()=>eg,ZodMap:()=>fg,ZodMAC:()=>Tg,ZodLiteral:()=>kg,ZodLazy:()=>Uq,ZodKSUID:()=>Z2,ZodJWT:()=>S2,ZodIssueCode:()=>oj,ZodIntersection:()=>Fg,ZodISOTime:()=>Q2,ZodISODuration:()=>v2,ZodISODateTime:()=>X2,ZodISODate:()=>N2,ZodIPv6:()=>R2,ZodIPv4:()=>W2,ZodGUID:()=>AI,ZodFunction:()=>zq,ZodFirstPartyTypeKind:()=>gq,ZodFile:()=>yg,ZodExactOptional:()=>lg,ZodError:()=>cj,ZodEnum:()=>G0,ZodEmoji:()=>B2,ZodEmail:()=>T2,ZodE164:()=>F2,ZodDiscriminatedUnion:()=>jg,ZodDefault:()=>ng,ZodDate:()=>EI,ZodCustomStringFormat:()=>q0,ZodCustom:()=>yI,ZodCodec:()=>l2,ZodCatch:()=>tg,ZodCUID2:()=>D2,ZodCUID:()=>K2,ZodCIDRv6:()=>b2,ZodCIDRv4:()=>P2,ZodBoolean:()=>N0,ZodBigIntFormat:()=>w2,ZodBigInt:()=>Q0,ZodBase64URL:()=>j2,ZodBase64:()=>A2,ZodArray:()=>bg,ZodAny:()=>Zg,TimePrecision:()=>E9,NEVER:()=>BJ,$output:()=>b9,$input:()=>A9,$brand:()=>MJ});var s4={};S4(s4,{version:()=>W8,util:()=>S,treeifyError:()=>AJ,toJSONSchema:()=>g2,toDotPath:()=>rQ,safeParseAsync:()=>SJ,safeParse:()=>FJ,safeEncodeAsync:()=>eb,safeEncode:()=>tb,safeDecodeAsync:()=>sb,safeDecode:()=>ab,registry:()=>w_,regexes:()=>Y4,process:()=>z$,prettifyError:()=>jJ,parseAsync:()=>N_,parse:()=>X_,meta:()=>HG,locales:()=>WI,isValidJWT:()=>g7,isValidBase64URL:()=>G7,isValidBase64:()=>c8,initializeContext:()=>R6,globalRegistry:()=>E$,globalConfig:()=>zI,formatError:()=>HI,flattenError:()=>vI,finalize:()=>b6,extractDefs:()=>P6,encodeAsync:()=>pb,encode:()=>db,describe:()=>vG,decodeAsync:()=>ob,decode:()=>cb,createToJSONSchemaMethod:()=>OG,createStandardJSONSchemaMethod:()=>z0,config:()=>Z$,clone:()=>n$,_xor:()=>Vj,_xid:()=>n_,_void:()=>uG,_uuidv7:()=>k_,_uuidv6:()=>x_,_uuidv4:()=>f_,_uuid:()=>C_,_url:()=>PI,_uppercase:()=>p1,_unknown:()=>UG,_union:()=>Lj,_undefined:()=>s9,_ulid:()=>r_,_uint64:()=>a9,_uint32:()=>h9,_tuple:()=>Rj,_trim:()=>$0,_transform:()=>wj,_toUpperCase:()=>U0,_toLowerCase:()=>I0,_templateLiteral:()=>mj,_symbol:()=>e9,_superRefine:()=>QG,_success:()=>kj,_stringbool:()=>YG,_stringFormat:()=>u0,_string:()=>F9,_startsWith:()=>t1,_slugify:()=>_0,_size:()=>U1,_set:()=>Aj,_safeParseAsync:()=>r1,_safeParse:()=>m1,_safeEncodeAsync:()=>B_,_safeEncode:()=>O_,_safeDecodeAsync:()=>M_,_safeDecode:()=>T_,_regex:()=>d1,_refine:()=>NG,_record:()=>Pj,_readonly:()=>lj,_property:()=>u2,_promise:()=>nj,_positive:()=>$2,_pipe:()=>ij,_parseAsync:()=>l1,_parse:()=>i1,_overwrite:()=>L4,_optional:()=>Ej,_number:()=>y9,_nullable:()=>Cj,_null:()=>$G,_normalize:()=>s1,_nonpositive:()=>U2,_nonoptional:()=>xj,_nonnegative:()=>_2,_never:()=>_G,_negative:()=>I2,_nativeEnum:()=>Fj,_nanoid:()=>i_,_nan:()=>GG,_multipleOf:()=>Z6,_minSize:()=>k4,_minLength:()=>e4,_min:()=>h$,_mime:()=>e1,_maxSize:()=>W6,_maxLength:()=>_1,_max:()=>u4,_map:()=>bj,_mac:()=>w9,_lte:()=>u4,_lt:()=>f4,_lowercase:()=>c1,_literal:()=>Sj,_length:()=>u1,_lazy:()=>rj,_ksuid:()=>h_,_jwt:()=>s_,_isoTime:()=>x9,_isoDuration:()=>k9,_isoDateTime:()=>C9,_isoDate:()=>f9,_ipv6:()=>c_,_ipv4:()=>d_,_intersection:()=>Wj,_int64:()=>t9,_int32:()=>n9,_int:()=>l9,_includes:()=>o1,_guid:()=>RI,_gte:()=>h$,_gt:()=>x4,_float64:()=>r9,_float32:()=>m9,_file:()=>qG,_enum:()=>jj,_endsWith:()=>a1,_encodeAsync:()=>H_,_encode:()=>Q_,_emoji:()=>y_,_email:()=>E_,_e164:()=>e_,_discriminatedUnion:()=>Zj,_default:()=>fj,_decodeAsync:()=>Y_,_decode:()=>v_,_date:()=>zG,_custom:()=>XG,_cuid2:()=>m_,_cuid:()=>l_,_coercedString:()=>S9,_coercedNumber:()=>i9,_coercedDate:()=>JG,_coercedBoolean:()=>c9,_coercedBigint:()=>o9,_cidrv6:()=>o_,_cidrv4:()=>p_,_check:()=>T7,_catch:()=>yj,_boolean:()=>d9,_bigint:()=>p9,_base64url:()=>a_,_base64:()=>t_,_array:()=>gG,_any:()=>IG,TimePrecision:()=>E9,NEVER:()=>BJ,JSONSchemaGenerator:()=>$g,JSONSchema:()=>B7,Doc:()=>V_,$output:()=>b9,$input:()=>A9,$constructor:()=>M,$brand:()=>MJ,$ZodXor:()=>N3,$ZodXID:()=>f8,$ZodVoid:()=>G3,$ZodUnknown:()=>z3,$ZodUnion:()=>MI,$ZodUndefined:()=>U3,$ZodUUID:()=>b8,$ZodURL:()=>j8,$ZodULID:()=>C8,$ZodType:()=>n,$ZodTuple:()=>F_,$ZodTransform:()=>K3,$ZodTemplateLiteral:()=>F3,$ZodSymbol:()=>I3,$ZodSuccess:()=>R3,$ZodStringFormat:()=>g$,$ZodString:()=>I1,$ZodSet:()=>O3,$ZodRegistry:()=>j9,$ZodRecord:()=>H3,$ZodRealError:()=>e$,$ZodReadonly:()=>j3,$ZodPromise:()=>w3,$ZodPrefault:()=>Z3,$ZodPipe:()=>A3,$ZodOptional:()=>S_,$ZodObjectJIT:()=>X3,$ZodObject:()=>N7,$ZodNumberFormat:()=>s8,$ZodNumber:()=>A_,$ZodNullable:()=>L3,$ZodNull:()=>_3,$ZodNonOptional:()=>W3,$ZodNever:()=>J3,$ZodNanoID:()=>S8,$ZodNaN:()=>b3,$ZodMap:()=>Y3,$ZodMAC:()=>n8,$ZodLiteral:()=>B3,$ZodLazy:()=>E3,$ZodKSUID:()=>x8,$ZodJWT:()=>a8,$ZodIntersection:()=>v3,$ZodISOTime:()=>i8,$ZodISODuration:()=>l8,$ZodISODateTime:()=>k8,$ZodISODate:()=>y8,$ZodIPv6:()=>r8,$ZodIPv4:()=>m8,$ZodGUID:()=>P8,$ZodFunction:()=>S3,$ZodFile:()=>M3,$ZodExactOptional:()=>D3,$ZodError:()=>QI,$ZodEnum:()=>T3,$ZodEncodeError:()=>e6,$ZodEmoji:()=>F8,$ZodEmail:()=>A8,$ZodE164:()=>t8,$ZodDiscriminatedUnion:()=>Q3,$ZodDefault:()=>V3,$ZodDate:()=>g3,$ZodCustomStringFormat:()=>e8,$ZodCustom:()=>C3,$ZodCodec:()=>KI,$ZodCheckUpperCase:()=>B8,$ZodCheckStringFormat:()=>n1,$ZodCheckStartsWith:()=>K8,$ZodCheckSizeEquals:()=>Q8,$ZodCheckRegex:()=>O8,$ZodCheckProperty:()=>L8,$ZodCheckOverwrite:()=>Z8,$ZodCheckNumberFormat:()=>g8,$ZodCheckMultipleOf:()=>G8,$ZodCheckMinSize:()=>N8,$ZodCheckMinLength:()=>H8,$ZodCheckMimeType:()=>V8,$ZodCheckMaxSize:()=>X8,$ZodCheckMaxLength:()=>v8,$ZodCheckLowerCase:()=>T8,$ZodCheckLessThan:()=>D_,$ZodCheckLengthEquals:()=>Y8,$ZodCheckIncludes:()=>M8,$ZodCheckGreaterThan:()=>L_,$ZodCheckEndsWith:()=>D8,$ZodCheckBigIntFormat:()=>q8,$ZodCheck:()=>Q$,$ZodCatch:()=>P3,$ZodCUID2:()=>E8,$ZodCUID:()=>w8,$ZodCIDRv6:()=>d8,$ZodCIDRv4:()=>h8,$ZodBoolean:()=>BI,$ZodBigIntFormat:()=>$3,$ZodBigInt:()=>j_,$ZodBase64URL:()=>o8,$ZodBase64:()=>p8,$ZodAsyncError:()=>C4,$ZodArray:()=>q3,$ZodAny:()=>u3});var BJ=Object.freeze({status:"aborted"});function M($,I,_){function u(G,g){if(!G._zod)Object.defineProperty(G,"_zod",{value:{def:g,constr:J,traits:new Set},enumerable:!1});if(G._zod.traits.has($))return;G._zod.traits.add($),I(G,g);let q=J.prototype,N=Object.keys(q);for(let X=0;X<N.length;X++){let Q=N[X];if(!(Q in G))G[Q]=q[Q].bind(G)}}let U=_?.Parent??Object;class z extends U{}Object.defineProperty(z,"name",{value:$});function J(G){var g;let q=_?.Parent?new z:this;u(q,G),(g=q._zod).deferred??(g.deferred=[]);for(let N of q._zod.deferred)N();return q}return Object.defineProperty(J,"init",{value:u}),Object.defineProperty(J,Symbol.hasInstance,{value:(G)=>{if(_?.Parent&&G instanceof _.Parent)return!0;return G?._zod?.traits?.has($)}}),Object.defineProperty(J,"name",{value:$}),J}var MJ=Symbol("zod_brand");class C4 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class e6 extends Error{constructor($){super(`Encountered unidirectional transform during encode: ${$}`);this.name="ZodEncodeError"}}var zI={};function Z$($){if($)Object.assign(zI,$);return zI}var S={};S4(S,{unwrapMessage:()=>JI,uint8ArrayToHex:()=>nb,uint8ArrayToBase64url:()=>mb,uint8ArrayToBase64:()=>iQ,stringifyPrimitive:()=>b,slugify:()=>LJ,shallowClone:()=>ZJ,safeExtend:()=>fb,required:()=>yb,randomString:()=>Ab,propertyKeyTypes:()=>qI,promiseAllObject:()=>bb,primitiveTypes:()=>WJ,prefixIssues:()=>_4,pick:()=>wb,partial:()=>kb,parsedType:()=>F,optionalKeys:()=>RJ,omit:()=>Eb,objectClone:()=>Wb,numKeys:()=>jb,nullish:()=>K6,normalizeParams:()=>E,mergeDefs:()=>a4,merge:()=>xb,jsonStringifyReplacer:()=>x1,joinValues:()=>R,issue:()=>y1,isPlainObject:()=>L6,isObject:()=>s6,hexToUint8Array:()=>rb,getSizableOrigin:()=>XI,getParsedType:()=>Fb,getLengthableOrigin:()=>NI,getEnumValues:()=>GI,getElementAtPath:()=>Pb,floatSafeRemainder:()=>DJ,finalizeIssue:()=>a$,extend:()=>Cb,escapeRegex:()=>H4,esc:()=>g_,defineLazy:()=>t,createTransparentProxy:()=>Sb,cloneDef:()=>Rb,clone:()=>n$,cleanRegex:()=>gI,cleanEnum:()=>ib,captureStackTrace:()=>q_,cached:()=>k1,base64urlToUint8Array:()=>lb,base64ToUint8Array:()=>yQ,assignProp:()=>D6,assertNotEqual:()=>Db,assertNever:()=>Vb,assertIs:()=>Lb,assertEqual:()=>Kb,assert:()=>Zb,allowsEval:()=>VJ,aborted:()=>V6,NUMBER_FORMAT_RANGES:()=>PJ,Class:()=>lQ,BIGINT_FORMAT_RANGES:()=>bJ});function Kb($){return $}function Db($){return $}function Lb($){}function Vb($){throw Error("Unexpected value in exhaustive check")}function Zb($){}function GI($){let I=Object.values($).filter((u)=>typeof u==="number");return Object.entries($).filter(([u,U])=>I.indexOf(+u)===-1).map(([u,U])=>U)}function R($,I="|"){return $.map((_)=>b(_)).join(I)}function x1($,I){if(typeof I==="bigint")return I.toString();return I}function k1($){return{get value(){{let _=$();return Object.defineProperty(this,"value",{value:_}),_}throw Error("cached value already set")}}}function K6($){return $===null||$===void 0}function gI($){let I=$.startsWith("^")?1:0,_=$.endsWith("$")?$.length-1:$.length;return $.slice(I,_)}function DJ($,I){let _=($.toString().split(".")[1]||"").length,u=I.toString(),U=(u.split(".")[1]||"").length;if(U===0&&/\d?e-\d?/.test(u)){let g=u.match(/\d?e-(\d?)/);if(g?.[1])U=Number.parseInt(g[1])}let z=_>U?_:U,J=Number.parseInt($.toFixed(z).replace(".","")),G=Number.parseInt(I.toFixed(z).replace(".",""));return J%G/10**z}var kQ=Symbol("evaluating");function t($,I,_){let u=void 0;Object.defineProperty($,I,{get(){if(u===kQ)return;if(u===void 0)u=kQ,u=_();return u},set(U){Object.defineProperty($,I,{value:U})},configurable:!0})}function Wb($){return Object.create(Object.getPrototypeOf($),Object.getOwnPropertyDescriptors($))}function D6($,I,_){Object.defineProperty($,I,{value:_,writable:!0,enumerable:!0,configurable:!0})}function a4(...$){let I={};for(let _ of $){let u=Object.getOwnPropertyDescriptors(_);Object.assign(I,u)}return Object.defineProperties({},I)}function Rb($){return a4($._zod.def)}function Pb($,I){if(!I)return $;return I.reduce((_,u)=>_?.[u],$)}function bb($){let I=Object.keys($),_=I.map((u)=>$[u]);return Promise.all(_).then((u)=>{let U={};for(let z=0;z<I.length;z++)U[I[z]]=u[z];return U})}function Ab($=10){let _="";for(let u=0;u<$;u++)_+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return _}function g_($){return JSON.stringify($)}function LJ($){return $.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var q_="captureStackTrace"in Error?Error.captureStackTrace:(...$)=>{};function s6($){return typeof $==="object"&&$!==null&&!Array.isArray($)}var VJ=k1(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch($){return!1}});function L6($){if(s6($)===!1)return!1;let I=$.constructor;if(I===void 0)return!0;if(typeof I!=="function")return!0;let _=I.prototype;if(s6(_)===!1)return!1;if(Object.prototype.hasOwnProperty.call(_,"isPrototypeOf")===!1)return!1;return!0}function ZJ($){if(L6($))return{...$};if(Array.isArray($))return[...$];return $}function jb($){let I=0;for(let _ in $)if(Object.prototype.hasOwnProperty.call($,_))I++;return I}var Fb=($)=>{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}`)}},qI=new Set(["string","number","symbol"]),WJ=new Set(["string","number","bigint","boolean","symbol","undefined"]);function H4($){return $.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function n$($,I,_){let u=new $._zod.constr(I??$._zod.def);if(!I||_?.parent)u._zod.parent=$;return u}function E($){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 Sb($){let I;return new Proxy({},{get(_,u,U){return I??(I=$()),Reflect.get(I,u,U)},set(_,u,U,z){return I??(I=$()),Reflect.set(I,u,U,z)},has(_,u){return I??(I=$()),Reflect.has(I,u)},deleteProperty(_,u){return I??(I=$()),Reflect.deleteProperty(I,u)},ownKeys(_){return I??(I=$()),Reflect.ownKeys(I)},getOwnPropertyDescriptor(_,u){return I??(I=$()),Reflect.getOwnPropertyDescriptor(I,u)},defineProperty(_,u,U){return I??(I=$()),Reflect.defineProperty(I,u,U)}})}function b($){if(typeof $==="bigint")return $.toString()+"n";if(typeof $==="string")return`"${$}"`;return`${$}`}function RJ($){return Object.keys($).filter((I)=>{return $[I]._zod.optin==="optional"&&$[I]._zod.optout==="optional"})}var PJ={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]},bJ={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function wb($,I){let _=$._zod.def,u=_.checks;if(u&&u.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let z=a4($._zod.def,{get shape(){let J={};for(let G in I){if(!(G in _.shape))throw Error(`Unrecognized key: "${G}"`);if(!I[G])continue;J[G]=_.shape[G]}return D6(this,"shape",J),J},checks:[]});return n$($,z)}function Eb($,I){let _=$._zod.def,u=_.checks;if(u&&u.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let z=a4($._zod.def,{get shape(){let J={...$._zod.def.shape};for(let G in I){if(!(G in _.shape))throw Error(`Unrecognized key: "${G}"`);if(!I[G])continue;delete J[G]}return D6(this,"shape",J),J},checks:[]});return n$($,z)}function Cb($,I){if(!L6(I))throw Error("Invalid input to extend: expected a plain object");let _=$._zod.def.checks;if(_&&_.length>0){let z=$._zod.def.shape;for(let J in I)if(Object.getOwnPropertyDescriptor(z,J)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let U=a4($._zod.def,{get shape(){let z={...$._zod.def.shape,...I};return D6(this,"shape",z),z}});return n$($,U)}function fb($,I){if(!L6(I))throw Error("Invalid input to safeExtend: expected a plain object");let _=a4($._zod.def,{get shape(){let u={...$._zod.def.shape,...I};return D6(this,"shape",u),u}});return n$($,_)}function xb($,I){let _=a4($._zod.def,{get shape(){let u={...$._zod.def.shape,...I._zod.def.shape};return D6(this,"shape",u),u},get catchall(){return I._zod.def.catchall},checks:[]});return n$($,_)}function kb($,I,_){let U=I._zod.def.checks;if(U&&U.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let J=a4(I._zod.def,{get shape(){let G=I._zod.def.shape,g={...G};if(_)for(let q in _){if(!(q in G))throw Error(`Unrecognized key: "${q}"`);if(!_[q])continue;g[q]=$?new $({type:"optional",innerType:G[q]}):G[q]}else for(let q in G)g[q]=$?new $({type:"optional",innerType:G[q]}):G[q];return D6(this,"shape",g),g},checks:[]});return n$(I,J)}function yb($,I,_){let u=a4(I._zod.def,{get shape(){let U=I._zod.def.shape,z={...U};if(_)for(let J in _){if(!(J in z))throw Error(`Unrecognized key: "${J}"`);if(!_[J])continue;z[J]=new $({type:"nonoptional",innerType:U[J]})}else for(let J in U)z[J]=new $({type:"nonoptional",innerType:U[J]});return D6(this,"shape",z),z}});return n$(I,u)}function V6($,I=0){if($.aborted===!0)return!0;for(let _=I;_<$.issues.length;_++)if($.issues[_]?.continue!==!0)return!0;return!1}function _4($,I){return I.map((_)=>{var u;return(u=_).path??(u.path=[]),_.path.unshift($),_})}function JI($){return typeof $==="string"?$:$?.message}function a$($,I,_){let u={...$,path:$.path??[]};if(!$.message){let U=JI($.inst?._zod.def?.error?.($))??JI(I?.error?.($))??JI(_.customError?.($))??JI(_.localeError?.($))??"Invalid input";u.message=U}if(delete u.inst,delete u.continue,!I?.reportInput)delete u.input;return u}function XI($){if($ instanceof Set)return"set";if($ instanceof Map)return"map";if($ instanceof File)return"file";return"unknown"}function NI($){if(Array.isArray($))return"array";if(typeof $==="string")return"string";return"unknown"}function F($){let I=typeof $;switch(I){case"number":return Number.isNaN($)?"nan":"number";case"object":{if($===null)return"null";if(Array.isArray($))return"array";let _=$;if(_&&Object.getPrototypeOf(_)!==Object.prototype&&"constructor"in _&&_.constructor)return _.constructor.name}}return I}function y1(...$){let[I,_,u]=$;if(typeof I==="string")return{message:I,code:"custom",input:_,inst:u};return{...I}}function ib($){return Object.entries($).filter(([I,_])=>{return Number.isNaN(Number.parseInt(I,10))}).map((I)=>I[1])}function yQ($){let I=atob($),_=new Uint8Array(I.length);for(let u=0;u<I.length;u++)_[u]=I.charCodeAt(u);return _}function iQ($){let I="";for(let _=0;_<$.length;_++)I+=String.fromCharCode($[_]);return btoa(I)}function lb($){let I=$.replace(/-/g,"+").replace(/_/g,"/"),_="=".repeat((4-I.length%4)%4);return yQ(I+_)}function mb($){return iQ($).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function rb($){let I=$.replace(/^0x/,"");if(I.length%2!==0)throw Error("Invalid hex string length");let _=new Uint8Array(I.length/2);for(let u=0;u<I.length;u+=2)_[u/2]=Number.parseInt(I.slice(u,u+2),16);return _}function nb($){return Array.from($).map((I)=>I.toString(16).padStart(2,"0")).join("")}class lQ{constructor(...$){}}var mQ=($,I)=>{$.name="$ZodError",Object.defineProperty($,"_zod",{value:$._zod,enumerable:!1}),Object.defineProperty($,"issues",{value:I,enumerable:!1}),$.message=JSON.stringify(I,x1,2),Object.defineProperty($,"toString",{value:()=>$.message,enumerable:!1})},QI=M("$ZodError",mQ),e$=M("$ZodError",mQ,{Parent:Error});function vI($,I=(_)=>_.message){let _={},u=[];for(let U of $.issues)if(U.path.length>0)_[U.path[0]]=_[U.path[0]]||[],_[U.path[0]].push(I(U));else u.push(I(U));return{formErrors:u,fieldErrors:_}}function HI($,I=(_)=>_.message){let _={_errors:[]},u=(U)=>{for(let z of U.issues)if(z.code==="invalid_union"&&z.errors.length)z.errors.map((J)=>u({issues:J}));else if(z.code==="invalid_key")u({issues:z.issues});else if(z.code==="invalid_element")u({issues:z.issues});else if(z.path.length===0)_._errors.push(I(z));else{let J=_,G=0;while(G<z.path.length){let g=z.path[G];if(G!==z.path.length-1)J[g]=J[g]||{_errors:[]};else J[g]=J[g]||{_errors:[]},J[g]._errors.push(I(z));J=J[g],G++}}};return u($),_}function AJ($,I=(_)=>_.message){let _={errors:[]},u=(U,z=[])=>{var J,G;for(let g of U.issues)if(g.code==="invalid_union"&&g.errors.length)g.errors.map((q)=>u({issues:q},g.path));else if(g.code==="invalid_key")u({issues:g.issues},g.path);else if(g.code==="invalid_element")u({issues:g.issues},g.path);else{let q=[...z,...g.path];if(q.length===0){_.errors.push(I(g));continue}let N=_,X=0;while(X<q.length){let Q=q[X],H=X===q.length-1;if(typeof Q==="string")N.properties??(N.properties={}),(J=N.properties)[Q]??(J[Q]={errors:[]}),N=N.properties[Q];else N.items??(N.items=[]),(G=N.items)[Q]??(G[Q]={errors:[]}),N=N.items[Q];if(H)N.errors.push(I(g));X++}}};return u($),_}function rQ($){let I=[],_=$.map((u)=>typeof u==="object"?u.key:u);for(let u of _)if(typeof u==="number")I.push(`[${u}]`);else if(typeof u==="symbol")I.push(`[${JSON.stringify(String(u))}]`);else if(/[^\w$]/.test(u))I.push(`[${JSON.stringify(u)}]`);else{if(I.length)I.push(".");I.push(u)}return I.join("")}function jJ($){let I=[],_=[...$.issues].sort((u,U)=>(u.path??[]).length-(U.path??[]).length);for(let u of _)if(I.push(`✖ ${u.message}`),u.path?.length)I.push(` → at ${rQ(u.path)}`);return I.join(`
|
|
273
|
+
`)}var i1=($)=>(I,_,u,U)=>{let z=u?Object.assign(u,{async:!1}):{async:!1},J=I._zod.run({value:_,issues:[]},z);if(J instanceof Promise)throw new C4;if(J.issues.length){let G=new(U?.Err??$)(J.issues.map((g)=>a$(g,z,Z$())));throw q_(G,U?.callee),G}return J.value},X_=i1(e$),l1=($)=>async(I,_,u,U)=>{let z=u?Object.assign(u,{async:!0}):{async:!0},J=I._zod.run({value:_,issues:[]},z);if(J instanceof Promise)J=await J;if(J.issues.length){let G=new(U?.Err??$)(J.issues.map((g)=>a$(g,z,Z$())));throw q_(G,U?.callee),G}return J.value},N_=l1(e$),m1=($)=>(I,_,u)=>{let U=u?{...u,async:!1}:{async:!1},z=I._zod.run({value:_,issues:[]},U);if(z instanceof Promise)throw new C4;return z.issues.length?{success:!1,error:new($??QI)(z.issues.map((J)=>a$(J,U,Z$())))}:{success:!0,data:z.value}},FJ=m1(e$),r1=($)=>async(I,_,u)=>{let U=u?Object.assign(u,{async:!0}):{async:!0},z=I._zod.run({value:_,issues:[]},U);if(z instanceof Promise)z=await z;return z.issues.length?{success:!1,error:new $(z.issues.map((J)=>a$(J,U,Z$())))}:{success:!0,data:z.value}},SJ=r1(e$),Q_=($)=>(I,_,u)=>{let U=u?Object.assign(u,{direction:"backward"}):{direction:"backward"};return i1($)(I,_,U)},db=Q_(e$),v_=($)=>(I,_,u)=>{return i1($)(I,_,u)},cb=v_(e$),H_=($)=>async(I,_,u)=>{let U=u?Object.assign(u,{direction:"backward"}):{direction:"backward"};return l1($)(I,_,U)},pb=H_(e$),Y_=($)=>async(I,_,u)=>{return l1($)(I,_,u)},ob=Y_(e$),O_=($)=>(I,_,u)=>{let U=u?Object.assign(u,{direction:"backward"}):{direction:"backward"};return m1($)(I,_,U)},tb=O_(e$),T_=($)=>(I,_,u)=>{return m1($)(I,_,u)},ab=T_(e$),B_=($)=>async(I,_,u)=>{let U=u?Object.assign(u,{direction:"backward"}):{direction:"backward"};return r1($)(I,_,U)},eb=B_(e$),M_=($)=>async(I,_,u)=>{return r1($)(I,_,u)},sb=M_(e$);var Y4={};S4(Y4,{xid:()=>fJ,uuid7:()=>_A,uuid6:()=>UA,uuid4:()=>IA,uuid:()=>$1,uppercase:()=>J8,unicodeEmail:()=>nQ,undefined:()=>u8,ulid:()=>CJ,time:()=>aJ,string:()=>sJ,sha512_hex:()=>ZA,sha512_base64url:()=>RA,sha512_base64:()=>WA,sha384_hex:()=>DA,sha384_base64url:()=>VA,sha384_base64:()=>LA,sha256_hex:()=>BA,sha256_base64url:()=>KA,sha256_base64:()=>MA,sha1_hex:()=>YA,sha1_base64url:()=>TA,sha1_base64:()=>OA,rfc5322Email:()=>zA,number:()=>YI,null:()=>_8,nanoid:()=>kJ,md5_hex:()=>QA,md5_base64url:()=>HA,md5_base64:()=>vA,mac:()=>hJ,lowercase:()=>z8,ksuid:()=>xJ,ipv6:()=>nJ,ipv4:()=>rJ,integer:()=>I8,idnEmail:()=>JA,html5Email:()=>uA,hostname:()=>qA,hex:()=>NA,guid:()=>iJ,extendedDuration:()=>$A,emoji:()=>mJ,email:()=>lJ,e164:()=>oJ,duration:()=>yJ,domain:()=>XA,datetime:()=>eJ,date:()=>tJ,cuid2:()=>EJ,cuid:()=>wJ,cidrv6:()=>cJ,cidrv4:()=>dJ,browserEmail:()=>GA,boolean:()=>U8,bigint:()=>$8,base64url:()=>K_,base64:()=>pJ});var wJ=/^[cC][^\s-]{8,}$/,EJ=/^[0-9a-z]+$/,CJ=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,fJ=/^[0-9a-vA-V]{20}$/,xJ=/^[A-Za-z0-9]{27}$/,kJ=/^[a-zA-Z0-9_-]{21}$/,yJ=/^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)?)??$/,iJ=/^([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})$/,$1=($)=>{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})$`)},IA=$1(4),UA=$1(6),_A=$1(7),lJ=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,uA=/^[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])?)*$/,zA=/^(([^<>()\[\]\\.,;:\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,}))$/,nQ=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,JA=nQ,GA=/^[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])?)*$/,gA="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function mJ(){return new RegExp(gA,"u")}var rJ=/^(?:(?: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])$/,nJ=/^(([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}|:))$/,hJ=($)=>{let I=H4($??":");return new RegExp(`^(?:[0-9A-F]{2}${I}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${I}){5}[0-9a-f]{2}$`)},dJ=/^((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])$/,cJ=/^(([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])$/,pJ=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,K_=/^[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])?)*\.?$/,XA=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,oJ=/^\+[1-9]\d{6,14}$/,hQ="(?:(?:\\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])))",tJ=new RegExp(`^${hQ}$`);function dQ($){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 aJ($){return new RegExp(`^${dQ($)}$`)}function eJ($){let I=dQ({precision:$.precision}),_=["Z"];if($.local)_.push("");if($.offset)_.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let u=`${I}(?:${_.join("|")})`;return new RegExp(`^${hQ}T(?:${u})$`)}var sJ=($)=>{let I=$?`[\\s\\S]{${$?.minimum??0},${$?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${I}$`)},$8=/^-?\d+n?$/,I8=/^-?\d+$/,YI=/^-?\d+(?:\.\d+)?$/,U8=/^(?:true|false)$/i,_8=/^null$/i;var u8=/^undefined$/i;var z8=/^[^A-Z]*$/,J8=/^[^a-z]*$/,NA=/^[0-9a-fA-F]*$/;function OI($,I){return new RegExp(`^[A-Za-z0-9+/]{${$}}${I}$`)}function TI($){return new RegExp(`^[A-Za-z0-9_-]{${$}}$`)}var QA=/^[0-9a-fA-F]{32}$/,vA=OI(22,"=="),HA=TI(22),YA=/^[0-9a-fA-F]{40}$/,OA=OI(27,"="),TA=TI(27),BA=/^[0-9a-fA-F]{64}$/,MA=OI(43,"="),KA=TI(43),DA=/^[0-9a-fA-F]{96}$/,LA=OI(64,""),VA=TI(64),ZA=/^[0-9a-fA-F]{128}$/,WA=OI(86,"=="),RA=TI(86);var Q$=M("$ZodCheck",($,I)=>{var _;$._zod??($._zod={}),$._zod.def=I,(_=$._zod).onattach??(_.onattach=[])}),pQ={number:"number",bigint:"bigint",object:"date"},D_=M("$ZodCheckLessThan",($,I)=>{Q$.init($,I);let _=pQ[typeof I.value];$._zod.onattach.push((u)=>{let U=u._zod.bag,z=(I.inclusive?U.maximum:U.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(I.value<z)if(I.inclusive)U.maximum=I.value;else U.exclusiveMaximum=I.value}),$._zod.check=(u)=>{if(I.inclusive?u.value<=I.value:u.value<I.value)return;u.issues.push({origin:_,code:"too_big",maximum:typeof I.value==="object"?I.value.getTime():I.value,input:u.value,inclusive:I.inclusive,inst:$,continue:!I.abort})}}),L_=M("$ZodCheckGreaterThan",($,I)=>{Q$.init($,I);let _=pQ[typeof I.value];$._zod.onattach.push((u)=>{let U=u._zod.bag,z=(I.inclusive?U.minimum:U.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(I.value>z)if(I.inclusive)U.minimum=I.value;else U.exclusiveMinimum=I.value}),$._zod.check=(u)=>{if(I.inclusive?u.value>=I.value:u.value>I.value)return;u.issues.push({origin:_,code:"too_small",minimum:typeof I.value==="object"?I.value.getTime():I.value,input:u.value,inclusive:I.inclusive,inst:$,continue:!I.abort})}}),G8=M("$ZodCheckMultipleOf",($,I)=>{Q$.init($,I),$._zod.onattach.push((_)=>{var u;(u=_._zod.bag).multipleOf??(u.multipleOf=I.value)}),$._zod.check=(_)=>{if(typeof _.value!==typeof I.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof _.value==="bigint"?_.value%I.value===BigInt(0):DJ(_.value,I.value)===0)return;_.issues.push({origin:typeof _.value,code:"not_multiple_of",divisor:I.value,input:_.value,inst:$,continue:!I.abort})}}),g8=M("$ZodCheckNumberFormat",($,I)=>{Q$.init($,I),I.format=I.format||"float64";let _=I.format?.includes("int"),u=_?"int":"number",[U,z]=PJ[I.format];$._zod.onattach.push((J)=>{let G=J._zod.bag;if(G.format=I.format,G.minimum=U,G.maximum=z,_)G.pattern=I8}),$._zod.check=(J)=>{let G=J.value;if(_){if(!Number.isInteger(G)){J.issues.push({expected:u,format:I.format,code:"invalid_type",continue:!1,input:G,inst:$});return}if(!Number.isSafeInteger(G)){if(G>0)J.issues.push({input:G,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:u,inclusive:!0,continue:!I.abort});else J.issues.push({input:G,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:u,inclusive:!0,continue:!I.abort});return}}if(G<U)J.issues.push({origin:"number",input:G,code:"too_small",minimum:U,inclusive:!0,inst:$,continue:!I.abort});if(G>z)J.issues.push({origin:"number",input:G,code:"too_big",maximum:z,inclusive:!0,inst:$,continue:!I.abort})}}),q8=M("$ZodCheckBigIntFormat",($,I)=>{Q$.init($,I);let[_,u]=bJ[I.format];$._zod.onattach.push((U)=>{let z=U._zod.bag;z.format=I.format,z.minimum=_,z.maximum=u}),$._zod.check=(U)=>{let z=U.value;if(z<_)U.issues.push({origin:"bigint",input:z,code:"too_small",minimum:_,inclusive:!0,inst:$,continue:!I.abort});if(z>u)U.issues.push({origin:"bigint",input:z,code:"too_big",maximum:u,inclusive:!0,inst:$,continue:!I.abort})}}),X8=M("$ZodCheckMaxSize",($,I)=>{var _;Q$.init($,I),(_=$._zod.def).when??(_.when=(u)=>{let U=u.value;return!K6(U)&&U.size!==void 0}),$._zod.onattach.push((u)=>{let U=u._zod.bag.maximum??Number.POSITIVE_INFINITY;if(I.maximum<U)u._zod.bag.maximum=I.maximum}),$._zod.check=(u)=>{let U=u.value;if(U.size<=I.maximum)return;u.issues.push({origin:XI(U),code:"too_big",maximum:I.maximum,inclusive:!0,input:U,inst:$,continue:!I.abort})}}),N8=M("$ZodCheckMinSize",($,I)=>{var _;Q$.init($,I),(_=$._zod.def).when??(_.when=(u)=>{let U=u.value;return!K6(U)&&U.size!==void 0}),$._zod.onattach.push((u)=>{let U=u._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(I.minimum>U)u._zod.bag.minimum=I.minimum}),$._zod.check=(u)=>{let U=u.value;if(U.size>=I.minimum)return;u.issues.push({origin:XI(U),code:"too_small",minimum:I.minimum,inclusive:!0,input:U,inst:$,continue:!I.abort})}}),Q8=M("$ZodCheckSizeEquals",($,I)=>{var _;Q$.init($,I),(_=$._zod.def).when??(_.when=(u)=>{let U=u.value;return!K6(U)&&U.size!==void 0}),$._zod.onattach.push((u)=>{let U=u._zod.bag;U.minimum=I.size,U.maximum=I.size,U.size=I.size}),$._zod.check=(u)=>{let U=u.value,z=U.size;if(z===I.size)return;let J=z>I.size;u.issues.push({origin:XI(U),...J?{code:"too_big",maximum:I.size}:{code:"too_small",minimum:I.size},inclusive:!0,exact:!0,input:u.value,inst:$,continue:!I.abort})}}),v8=M("$ZodCheckMaxLength",($,I)=>{var _;Q$.init($,I),(_=$._zod.def).when??(_.when=(u)=>{let U=u.value;return!K6(U)&&U.length!==void 0}),$._zod.onattach.push((u)=>{let U=u._zod.bag.maximum??Number.POSITIVE_INFINITY;if(I.maximum<U)u._zod.bag.maximum=I.maximum}),$._zod.check=(u)=>{let U=u.value;if(U.length<=I.maximum)return;let J=NI(U);u.issues.push({origin:J,code:"too_big",maximum:I.maximum,inclusive:!0,input:U,inst:$,continue:!I.abort})}}),H8=M("$ZodCheckMinLength",($,I)=>{var _;Q$.init($,I),(_=$._zod.def).when??(_.when=(u)=>{let U=u.value;return!K6(U)&&U.length!==void 0}),$._zod.onattach.push((u)=>{let U=u._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(I.minimum>U)u._zod.bag.minimum=I.minimum}),$._zod.check=(u)=>{let U=u.value;if(U.length>=I.minimum)return;let J=NI(U);u.issues.push({origin:J,code:"too_small",minimum:I.minimum,inclusive:!0,input:U,inst:$,continue:!I.abort})}}),Y8=M("$ZodCheckLengthEquals",($,I)=>{var _;Q$.init($,I),(_=$._zod.def).when??(_.when=(u)=>{let U=u.value;return!K6(U)&&U.length!==void 0}),$._zod.onattach.push((u)=>{let U=u._zod.bag;U.minimum=I.length,U.maximum=I.length,U.length=I.length}),$._zod.check=(u)=>{let U=u.value,z=U.length;if(z===I.length)return;let J=NI(U),G=z>I.length;u.issues.push({origin:J,...G?{code:"too_big",maximum:I.length}:{code:"too_small",minimum:I.length},inclusive:!0,exact:!0,input:u.value,inst:$,continue:!I.abort})}}),n1=M("$ZodCheckStringFormat",($,I)=>{var _,u;if(Q$.init($,I),$._zod.onattach.push((U)=>{let z=U._zod.bag;if(z.format=I.format,I.pattern)z.patterns??(z.patterns=new Set),z.patterns.add(I.pattern)}),I.pattern)(_=$._zod).check??(_.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(u=$._zod).check??(u.check=()=>{})}),O8=M("$ZodCheckRegex",($,I)=>{n1.init($,I),$._zod.check=(_)=>{if(I.pattern.lastIndex=0,I.pattern.test(_.value))return;_.issues.push({origin:"string",code:"invalid_format",format:"regex",input:_.value,pattern:I.pattern.toString(),inst:$,continue:!I.abort})}}),T8=M("$ZodCheckLowerCase",($,I)=>{I.pattern??(I.pattern=z8),n1.init($,I)}),B8=M("$ZodCheckUpperCase",($,I)=>{I.pattern??(I.pattern=J8),n1.init($,I)}),M8=M("$ZodCheckIncludes",($,I)=>{Q$.init($,I);let _=H4(I.includes),u=new RegExp(typeof I.position==="number"?`^.{${I.position}}${_}`:_);I.pattern=u,$._zod.onattach.push((U)=>{let z=U._zod.bag;z.patterns??(z.patterns=new Set),z.patterns.add(u)}),$._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})}}),K8=M("$ZodCheckStartsWith",($,I)=>{Q$.init($,I);let _=new RegExp(`^${H4(I.prefix)}.*`);I.pattern??(I.pattern=_),$._zod.onattach.push((u)=>{let U=u._zod.bag;U.patterns??(U.patterns=new Set),U.patterns.add(_)}),$._zod.check=(u)=>{if(u.value.startsWith(I.prefix))return;u.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:I.prefix,input:u.value,inst:$,continue:!I.abort})}}),D8=M("$ZodCheckEndsWith",($,I)=>{Q$.init($,I);let _=new RegExp(`.*${H4(I.suffix)}$`);I.pattern??(I.pattern=_),$._zod.onattach.push((u)=>{let U=u._zod.bag;U.patterns??(U.patterns=new Set),U.patterns.add(_)}),$._zod.check=(u)=>{if(u.value.endsWith(I.suffix))return;u.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:I.suffix,input:u.value,inst:$,continue:!I.abort})}});function cQ($,I,_){if($.issues.length)I.issues.push(..._4(_,$.issues))}var L8=M("$ZodCheckProperty",($,I)=>{Q$.init($,I),$._zod.check=(_)=>{let u=I.schema._zod.run({value:_.value[I.property],issues:[]},{});if(u instanceof Promise)return u.then((U)=>cQ(U,_,I.property));cQ(u,_,I.property);return}}),V8=M("$ZodCheckMimeType",($,I)=>{Q$.init($,I);let _=new Set(I.mime);$._zod.onattach.push((u)=>{u._zod.bag.mime=I.mime}),$._zod.check=(u)=>{if(_.has(u.value.type))return;u.issues.push({code:"invalid_value",values:I.mime,input:u.value.type,inst:$,continue:!I.abort})}}),Z8=M("$ZodCheckOverwrite",($,I)=>{Q$.init($,I),$._zod.check=(_)=>{_.value=I.tx(_.value)}});class V_{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 _=$.split(`
|
|
274
274
|
`).filter((z)=>z),u=Math.min(..._.map((z)=>z.length-z.trimStart().length)),U=_.map((z)=>z.slice(u)).map((z)=>" ".repeat(this.indent*2)+z);for(let z of U)this.content.push(z)}compile(){let $=Function,I=this?.args,u=[...(this?.content??[""]).map((U)=>` ${U}`)];return new $(...I,u.join(`
|
|
275
|
-
`))}}var WJ={major:4,minor:3,patch:6};var d=M("$ZodType",($,I)=>{var _;$??($={}),$._zod.def=I,$._zod.bag=$._zod.bag||{},$._zod.version=WJ;let u=[...$._zod.def.checks??[]];if($._zod.traits.has("$ZodCheck"))u.unshift($);for(let U of u)for(let z of U._zod.onattach)z($);if(u.length===0)(_=$._zod).deferred??(_.deferred=[]),$._zod.deferred?.push(()=>{$._zod.run=$._zod.parse});else{let U=(g,J,G)=>{let q=V6(g),N;for(let X of J){if(X._zod.def.when){if(!X._zod.def.when(g))continue}else if(q)continue;let Q=g.issues.length,H=X._zod.check(g);if(H instanceof Promise&&G?.async===!1)throw new C4;if(N||H instanceof Promise)N=(N??Promise.resolve()).then(async()=>{if(await H,g.issues.length===Q)return;if(!q)q=V6(g,Q)});else{if(g.issues.length===Q)continue;if(!q)q=V6(g,Q)}}if(N)return N.then(()=>{return g});return g},z=(g,J,G)=>{if(V6(g))return g.aborted=!0,g;let q=U(J,u,G);if(q instanceof Promise){if(G.async===!1)throw new C4;return q.then((N)=>$._zod.parse(N,G))}return $._zod.parse(q,G)};$._zod.run=(g,J)=>{if(J.skipChecks)return $._zod.parse(g,J);if(J.direction==="backward"){let q=$._zod.parse({value:g.value,issues:[]},{...J,skipChecks:!0});if(q instanceof Promise)return q.then((N)=>{return z(N,g,J)});return z(q,g,J)}let G=$._zod.parse(g,J);if(G instanceof Promise){if(J.async===!1)throw new C4;return G.then((q)=>U(q,u,J))}return U(G,u,J)}}t($,"~standard",()=>({validate:(U)=>{try{let z=Fg($,U);return z.success?{value:z.data}:{issues:z.error?.issues}}catch(z){return Sg($,U).then((g)=>g.success?{value:g.data}:{issues:g.error?.issues})}},vendor:"zod",version:1}))}),s6=M("$ZodString",($,I)=>{d.init($,I),$._zod.pattern=[...$?._zod.bag?.patterns??[]].pop()??sg($._zod.bag),$._zod.parse=(_,u)=>{if(I.coerce)try{_.value=String(_.value)}catch(U){}if(typeof _.value==="string")return _;return _.issues.push({expected:"string",code:"invalid_type",input:_.value,inst:$}),_}}),J$=M("$ZodStringFormat",($,I)=>{n1.init($,I),s6.init($,I)}),PJ=M("$ZodGUID",($,I)=>{I.pattern??(I.pattern=ig),J$.init($,I)}),bJ=M("$ZodUUID",($,I)=>{if(I.version){let u={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[I.version];if(u===void 0)throw Error(`Invalid UUID version: "${I.version}"`);I.pattern??(I.pattern=e6(u))}else I.pattern??(I.pattern=e6());J$.init($,I)}),AJ=M("$ZodEmail",($,I)=>{I.pattern??(I.pattern=lg),J$.init($,I)}),jJ=M("$ZodURL",($,I)=>{J$.init($,I),$._zod.check=(_)=>{try{let u=_.value.trim(),U=new URL(u);if(I.hostname){if(I.hostname.lastIndex=0,!I.hostname.test(U.hostname))_.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:I.hostname.source,input:_.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))_.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:I.protocol.source,input:_.value,inst:$,continue:!I.abort})}if(I.normalize)_.value=U.href;else _.value=u;return}catch(u){_.issues.push({code:"invalid_format",format:"url",input:_.value,inst:$,continue:!I.abort})}}}),FJ=M("$ZodEmoji",($,I)=>{I.pattern??(I.pattern=mg()),J$.init($,I)}),SJ=M("$ZodNanoID",($,I)=>{I.pattern??(I.pattern=kg),J$.init($,I)}),wJ=M("$ZodCUID",($,I)=>{I.pattern??(I.pattern=wg),J$.init($,I)}),EJ=M("$ZodCUID2",($,I)=>{I.pattern??(I.pattern=Eg),J$.init($,I)}),CJ=M("$ZodULID",($,I)=>{I.pattern??(I.pattern=Cg),J$.init($,I)}),fJ=M("$ZodXID",($,I)=>{I.pattern??(I.pattern=fg),J$.init($,I)}),xJ=M("$ZodKSUID",($,I)=>{I.pattern??(I.pattern=xg),J$.init($,I)}),kJ=M("$ZodISODateTime",($,I)=>{I.pattern??(I.pattern=eg(I)),J$.init($,I)}),yJ=M("$ZodISODate",($,I)=>{I.pattern??(I.pattern=tg),J$.init($,I)}),iJ=M("$ZodISOTime",($,I)=>{I.pattern??(I.pattern=ag(I)),J$.init($,I)}),lJ=M("$ZodISODuration",($,I)=>{I.pattern??(I.pattern=yg),J$.init($,I)}),mJ=M("$ZodIPv4",($,I)=>{I.pattern??(I.pattern=rg),J$.init($,I),$._zod.bag.format="ipv4"}),rJ=M("$ZodIPv6",($,I)=>{I.pattern??(I.pattern=ng),J$.init($,I),$._zod.bag.format="ipv6",$._zod.check=(_)=>{try{new URL(`http://[${_.value}]`)}catch{_.issues.push({code:"invalid_format",format:"ipv6",input:_.value,inst:$,continue:!I.abort})}}}),nJ=M("$ZodMAC",($,I)=>{I.pattern??(I.pattern=hg(I.delimiter)),J$.init($,I),$._zod.bag.format="mac"}),hJ=M("$ZodCIDRv4",($,I)=>{I.pattern??(I.pattern=dg),J$.init($,I)}),dJ=M("$ZodCIDRv6",($,I)=>{I.pattern??(I.pattern=cg),J$.init($,I),$._zod.check=(_)=>{let u=_.value.split("/");try{if(u.length!==2)throw Error();let[U,z]=u;if(!z)throw Error();let g=Number(z);if(`${g}`!==z)throw Error();if(g<0||g>128)throw Error();new URL(`http://[${U}]`)}catch{_.issues.push({code:"invalid_format",format:"cidrv6",input:_.value,inst:$,continue:!I.abort})}}});function cJ($){if($==="")return!0;if($.length%4!==0)return!1;try{return atob($),!0}catch{return!1}}var pJ=M("$ZodBase64",($,I)=>{I.pattern??(I.pattern=pg),J$.init($,I),$._zod.bag.contentEncoding="base64",$._zod.check=(_)=>{if(cJ(_.value))return;_.issues.push({code:"invalid_format",format:"base64",input:_.value,inst:$,continue:!I.abort})}});function u7($){if(!M_.test($))return!1;let I=$.replace(/[-_]/g,(u)=>u==="-"?"+":"/"),_=I.padEnd(Math.ceil(I.length/4)*4,"=");return cJ(_)}var oJ=M("$ZodBase64URL",($,I)=>{I.pattern??(I.pattern=M_),J$.init($,I),$._zod.bag.contentEncoding="base64url",$._zod.check=(_)=>{if(u7(_.value))return;_.issues.push({code:"invalid_format",format:"base64url",input:_.value,inst:$,continue:!I.abort})}}),tJ=M("$ZodE164",($,I)=>{I.pattern??(I.pattern=og),J$.init($,I)});function z7($,I=null){try{let _=$.split(".");if(_.length!==3)return!1;let[u]=_;if(!u)return!1;let U=JSON.parse(atob(u));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 aJ=M("$ZodJWT",($,I)=>{J$.init($,I),$._zod.check=(_)=>{if(z7(_.value,I.alg))return;_.issues.push({code:"invalid_format",format:"jwt",input:_.value,inst:$,continue:!I.abort})}}),eJ=M("$ZodCustomStringFormat",($,I)=>{J$.init($,I),$._zod.check=(_)=>{if(I.fn(_.value))return;_.issues.push({code:"invalid_format",format:I.format,input:_.value,inst:$,continue:!I.abort})}}),b_=M("$ZodNumber",($,I)=>{d.init($,I),$._zod.pattern=$._zod.bag.pattern??YI,$._zod.parse=(_,u)=>{if(I.coerce)try{_.value=Number(_.value)}catch(g){}let U=_.value;if(typeof U==="number"&&!Number.isNaN(U)&&Number.isFinite(U))return _;let z=typeof U==="number"?Number.isNaN(U)?"NaN":!Number.isFinite(U)?"Infinity":void 0:void 0;return _.issues.push({expected:"number",code:"invalid_type",input:U,inst:$,...z?{received:z}:{}}),_}}),sJ=M("$ZodNumberFormat",($,I)=>{GJ.init($,I),b_.init($,I)}),BI=M("$ZodBoolean",($,I)=>{d.init($,I),$._zod.pattern=UJ,$._zod.parse=(_,u)=>{if(I.coerce)try{_.value=Boolean(_.value)}catch(z){}let U=_.value;if(typeof U==="boolean")return _;return _.issues.push({expected:"boolean",code:"invalid_type",input:U,inst:$}),_}}),A_=M("$ZodBigInt",($,I)=>{d.init($,I),$._zod.pattern=$J,$._zod.parse=(_,u)=>{if(I.coerce)try{_.value=BigInt(_.value)}catch(U){}if(typeof _.value==="bigint")return _;return _.issues.push({expected:"bigint",code:"invalid_type",input:_.value,inst:$}),_}}),$8=M("$ZodBigIntFormat",($,I)=>{qJ.init($,I),A_.init($,I)}),I8=M("$ZodSymbol",($,I)=>{d.init($,I),$._zod.parse=(_,u)=>{let U=_.value;if(typeof U==="symbol")return _;return _.issues.push({expected:"symbol",code:"invalid_type",input:U,inst:$}),_}}),U8=M("$ZodUndefined",($,I)=>{d.init($,I),$._zod.pattern=uJ,$._zod.values=new Set([void 0]),$._zod.optin="optional",$._zod.optout="optional",$._zod.parse=(_,u)=>{let U=_.value;if(typeof U>"u")return _;return _.issues.push({expected:"undefined",code:"invalid_type",input:U,inst:$}),_}}),_8=M("$ZodNull",($,I)=>{d.init($,I),$._zod.pattern=_J,$._zod.values=new Set([null]),$._zod.parse=(_,u)=>{let U=_.value;if(U===null)return _;return _.issues.push({expected:"null",code:"invalid_type",input:U,inst:$}),_}}),u8=M("$ZodAny",($,I)=>{d.init($,I),$._zod.parse=(_)=>_}),z8=M("$ZodUnknown",($,I)=>{d.init($,I),$._zod.parse=(_)=>_}),g8=M("$ZodNever",($,I)=>{d.init($,I),$._zod.parse=(_,u)=>{return _.issues.push({expected:"never",code:"invalid_type",input:_.value,inst:$}),_}}),J8=M("$ZodVoid",($,I)=>{d.init($,I),$._zod.parse=(_,u)=>{let U=_.value;if(typeof U>"u")return _;return _.issues.push({expected:"void",code:"invalid_type",input:U,inst:$}),_}}),G8=M("$ZodDate",($,I)=>{d.init($,I),$._zod.parse=(_,u)=>{if(I.coerce)try{_.value=new Date(_.value)}catch(J){}let U=_.value,z=U instanceof Date;if(z&&!Number.isNaN(U.getTime()))return _;return _.issues.push({expected:"date",code:"invalid_type",input:U,...z?{received:"Invalid Date"}:{},inst:$}),_}});function cQ($,I,_){if($.issues.length)I.issues.push(...U4(_,$.issues));I.value[_]=$.value}var q8=M("$ZodArray",($,I)=>{d.init($,I),$._zod.parse=(_,u)=>{let U=_.value;if(!Array.isArray(U))return _.issues.push({expected:"array",code:"invalid_type",input:U,inst:$}),_;_.value=Array(U.length);let z=[];for(let g=0;g<U.length;g++){let J=U[g],G=I.element._zod.run({value:J,issues:[]},u);if(G instanceof Promise)z.push(G.then((q)=>cQ(q,_,g)));else cQ(G,_,g)}if(z.length)return Promise.all(z).then(()=>_);return _}});function P_($,I,_,u,U){if($.issues.length){if(U&&!(_ in u))return;I.issues.push(...U4(_,$.issues))}if($.value===void 0){if(_ in u)I.value[_]=void 0}else I.value[_]=$.value}function g7($){let I=Object.keys($.shape);for(let u of I)if(!$.shape?.[u]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${u}": expected a Zod schema`);let _=Rg($.shape);return{...$,keys:I,keySet:new Set(I),numKeys:I.length,optionalKeys:new Set(_)}}function J7($,I,_,u,U,z){let g=[],J=U.keySet,G=U.catchall._zod,q=G.def.type,N=G.optout==="optional";for(let X in I){if(J.has(X))continue;if(q==="never"){g.push(X);continue}let Q=G.run({value:I[X],issues:[]},u);if(Q instanceof Promise)$.push(Q.then((H)=>P_(H,_,X,I,N)));else P_(Q,_,X,I,N)}if(g.length)_.issues.push({code:"unrecognized_keys",keys:g,input:I,inst:z});if(!$.length)return _;return Promise.all($).then(()=>{return _})}var G7=M("$ZodObject",($,I)=>{if(d.init($,I),!Object.getOwnPropertyDescriptor(I,"shape")?.get){let J=I.shape;Object.defineProperty(I,"shape",{get:()=>{let G={...J};return Object.defineProperty(I,"shape",{value:G}),G}})}let u=k1(()=>g7(I));t($._zod,"propValues",()=>{let J=I.shape,G={};for(let q in J){let N=J[q]._zod;if(N.values){G[q]??(G[q]=new Set);for(let X of N.values)G[q].add(X)}}return G});let U=a6,z=I.catchall,g;$._zod.parse=(J,G)=>{g??(g=u.value);let q=J.value;if(!U(q))return J.issues.push({expected:"object",code:"invalid_type",input:q,inst:$}),J;J.value={};let N=[],X=g.shape;for(let Q of g.keys){let H=X[Q],Y=H._zod.optout==="optional",v=H._zod.run({value:q[Q],issues:[]},G);if(v instanceof Promise)N.push(v.then((O)=>P_(O,J,Q,q,Y)));else P_(v,J,Q,q,Y)}if(!z)return N.length?Promise.all(N).then(()=>J):J;return J7(N,q,J,G,u.value,$)}}),X8=M("$ZodObjectJIT",($,I)=>{G7.init($,I);let _=$._zod.parse,u=k1(()=>g7(I)),U=(Q)=>{let H=new L_(["shape","payload","ctx"]),Y=u.value,v=(R)=>{let L=J_(R);return`shape[${L}]._zod.run({ value: input[${L}], issues: [] }, ctx)`};H.write("const input = payload.value;");let O=Object.create(null),T=0;for(let R of Y.keys)O[R]=`key_${T++}`;H.write("const newResult = {};");for(let R of Y.keys){let L=O[R],K=J_(R),B=Q[R]?._zod?.optout==="optional";if(H.write(`const ${L} = ${v(R)};`),B)H.write(`
|
|
276
|
-
if (${
|
|
277
|
-
if (${
|
|
278
|
-
payload.issues = payload.issues.concat(${
|
|
275
|
+
`))}}var W8={major:4,minor:3,patch:6};var n=M("$ZodType",($,I)=>{var _;$??($={}),$._zod.def=I,$._zod.bag=$._zod.bag||{},$._zod.version=W8;let u=[...$._zod.def.checks??[]];if($._zod.traits.has("$ZodCheck"))u.unshift($);for(let U of u)for(let z of U._zod.onattach)z($);if(u.length===0)(_=$._zod).deferred??(_.deferred=[]),$._zod.deferred?.push(()=>{$._zod.run=$._zod.parse});else{let U=(J,G,g)=>{let q=V6(J),N;for(let X of G){if(X._zod.def.when){if(!X._zod.def.when(J))continue}else if(q)continue;let Q=J.issues.length,H=X._zod.check(J);if(H instanceof Promise&&g?.async===!1)throw new C4;if(N||H instanceof Promise)N=(N??Promise.resolve()).then(async()=>{if(await H,J.issues.length===Q)return;if(!q)q=V6(J,Q)});else{if(J.issues.length===Q)continue;if(!q)q=V6(J,Q)}}if(N)return N.then(()=>{return J});return J},z=(J,G,g)=>{if(V6(J))return J.aborted=!0,J;let q=U(G,u,g);if(q instanceof Promise){if(g.async===!1)throw new C4;return q.then((N)=>$._zod.parse(N,g))}return $._zod.parse(q,g)};$._zod.run=(J,G)=>{if(G.skipChecks)return $._zod.parse(J,G);if(G.direction==="backward"){let q=$._zod.parse({value:J.value,issues:[]},{...G,skipChecks:!0});if(q instanceof Promise)return q.then((N)=>{return z(N,J,G)});return z(q,J,G)}let g=$._zod.parse(J,G);if(g instanceof Promise){if(G.async===!1)throw new C4;return g.then((q)=>U(q,u,G))}return U(g,u,G)}}t($,"~standard",()=>({validate:(U)=>{try{let z=FJ($,U);return z.success?{value:z.data}:{issues:z.error?.issues}}catch(z){return SJ($,U).then((J)=>J.success?{value:J.data}:{issues:J.error?.issues})}},vendor:"zod",version:1}))}),I1=M("$ZodString",($,I)=>{n.init($,I),$._zod.pattern=[...$?._zod.bag?.patterns??[]].pop()??sJ($._zod.bag),$._zod.parse=(_,u)=>{if(I.coerce)try{_.value=String(_.value)}catch(U){}if(typeof _.value==="string")return _;return _.issues.push({expected:"string",code:"invalid_type",input:_.value,inst:$}),_}}),g$=M("$ZodStringFormat",($,I)=>{n1.init($,I),I1.init($,I)}),P8=M("$ZodGUID",($,I)=>{I.pattern??(I.pattern=iJ),g$.init($,I)}),b8=M("$ZodUUID",($,I)=>{if(I.version){let u={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[I.version];if(u===void 0)throw Error(`Invalid UUID version: "${I.version}"`);I.pattern??(I.pattern=$1(u))}else I.pattern??(I.pattern=$1());g$.init($,I)}),A8=M("$ZodEmail",($,I)=>{I.pattern??(I.pattern=lJ),g$.init($,I)}),j8=M("$ZodURL",($,I)=>{g$.init($,I),$._zod.check=(_)=>{try{let u=_.value.trim(),U=new URL(u);if(I.hostname){if(I.hostname.lastIndex=0,!I.hostname.test(U.hostname))_.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:I.hostname.source,input:_.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))_.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:I.protocol.source,input:_.value,inst:$,continue:!I.abort})}if(I.normalize)_.value=U.href;else _.value=u;return}catch(u){_.issues.push({code:"invalid_format",format:"url",input:_.value,inst:$,continue:!I.abort})}}}),F8=M("$ZodEmoji",($,I)=>{I.pattern??(I.pattern=mJ()),g$.init($,I)}),S8=M("$ZodNanoID",($,I)=>{I.pattern??(I.pattern=kJ),g$.init($,I)}),w8=M("$ZodCUID",($,I)=>{I.pattern??(I.pattern=wJ),g$.init($,I)}),E8=M("$ZodCUID2",($,I)=>{I.pattern??(I.pattern=EJ),g$.init($,I)}),C8=M("$ZodULID",($,I)=>{I.pattern??(I.pattern=CJ),g$.init($,I)}),f8=M("$ZodXID",($,I)=>{I.pattern??(I.pattern=fJ),g$.init($,I)}),x8=M("$ZodKSUID",($,I)=>{I.pattern??(I.pattern=xJ),g$.init($,I)}),k8=M("$ZodISODateTime",($,I)=>{I.pattern??(I.pattern=eJ(I)),g$.init($,I)}),y8=M("$ZodISODate",($,I)=>{I.pattern??(I.pattern=tJ),g$.init($,I)}),i8=M("$ZodISOTime",($,I)=>{I.pattern??(I.pattern=aJ(I)),g$.init($,I)}),l8=M("$ZodISODuration",($,I)=>{I.pattern??(I.pattern=yJ),g$.init($,I)}),m8=M("$ZodIPv4",($,I)=>{I.pattern??(I.pattern=rJ),g$.init($,I),$._zod.bag.format="ipv4"}),r8=M("$ZodIPv6",($,I)=>{I.pattern??(I.pattern=nJ),g$.init($,I),$._zod.bag.format="ipv6",$._zod.check=(_)=>{try{new URL(`http://[${_.value}]`)}catch{_.issues.push({code:"invalid_format",format:"ipv6",input:_.value,inst:$,continue:!I.abort})}}}),n8=M("$ZodMAC",($,I)=>{I.pattern??(I.pattern=hJ(I.delimiter)),g$.init($,I),$._zod.bag.format="mac"}),h8=M("$ZodCIDRv4",($,I)=>{I.pattern??(I.pattern=dJ),g$.init($,I)}),d8=M("$ZodCIDRv6",($,I)=>{I.pattern??(I.pattern=cJ),g$.init($,I),$._zod.check=(_)=>{let u=_.value.split("/");try{if(u.length!==2)throw Error();let[U,z]=u;if(!z)throw Error();let J=Number(z);if(`${J}`!==z)throw Error();if(J<0||J>128)throw Error();new URL(`http://[${U}]`)}catch{_.issues.push({code:"invalid_format",format:"cidrv6",input:_.value,inst:$,continue:!I.abort})}}});function c8($){if($==="")return!0;if($.length%4!==0)return!1;try{return atob($),!0}catch{return!1}}var p8=M("$ZodBase64",($,I)=>{I.pattern??(I.pattern=pJ),g$.init($,I),$._zod.bag.contentEncoding="base64",$._zod.check=(_)=>{if(c8(_.value))return;_.issues.push({code:"invalid_format",format:"base64",input:_.value,inst:$,continue:!I.abort})}});function G7($){if(!K_.test($))return!1;let I=$.replace(/[-_]/g,(u)=>u==="-"?"+":"/"),_=I.padEnd(Math.ceil(I.length/4)*4,"=");return c8(_)}var o8=M("$ZodBase64URL",($,I)=>{I.pattern??(I.pattern=K_),g$.init($,I),$._zod.bag.contentEncoding="base64url",$._zod.check=(_)=>{if(G7(_.value))return;_.issues.push({code:"invalid_format",format:"base64url",input:_.value,inst:$,continue:!I.abort})}}),t8=M("$ZodE164",($,I)=>{I.pattern??(I.pattern=oJ),g$.init($,I)});function g7($,I=null){try{let _=$.split(".");if(_.length!==3)return!1;let[u]=_;if(!u)return!1;let U=JSON.parse(atob(u));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 a8=M("$ZodJWT",($,I)=>{g$.init($,I),$._zod.check=(_)=>{if(g7(_.value,I.alg))return;_.issues.push({code:"invalid_format",format:"jwt",input:_.value,inst:$,continue:!I.abort})}}),e8=M("$ZodCustomStringFormat",($,I)=>{g$.init($,I),$._zod.check=(_)=>{if(I.fn(_.value))return;_.issues.push({code:"invalid_format",format:I.format,input:_.value,inst:$,continue:!I.abort})}}),A_=M("$ZodNumber",($,I)=>{n.init($,I),$._zod.pattern=$._zod.bag.pattern??YI,$._zod.parse=(_,u)=>{if(I.coerce)try{_.value=Number(_.value)}catch(J){}let U=_.value;if(typeof U==="number"&&!Number.isNaN(U)&&Number.isFinite(U))return _;let z=typeof U==="number"?Number.isNaN(U)?"NaN":!Number.isFinite(U)?"Infinity":void 0:void 0;return _.issues.push({expected:"number",code:"invalid_type",input:U,inst:$,...z?{received:z}:{}}),_}}),s8=M("$ZodNumberFormat",($,I)=>{g8.init($,I),A_.init($,I)}),BI=M("$ZodBoolean",($,I)=>{n.init($,I),$._zod.pattern=U8,$._zod.parse=(_,u)=>{if(I.coerce)try{_.value=Boolean(_.value)}catch(z){}let U=_.value;if(typeof U==="boolean")return _;return _.issues.push({expected:"boolean",code:"invalid_type",input:U,inst:$}),_}}),j_=M("$ZodBigInt",($,I)=>{n.init($,I),$._zod.pattern=$8,$._zod.parse=(_,u)=>{if(I.coerce)try{_.value=BigInt(_.value)}catch(U){}if(typeof _.value==="bigint")return _;return _.issues.push({expected:"bigint",code:"invalid_type",input:_.value,inst:$}),_}}),$3=M("$ZodBigIntFormat",($,I)=>{q8.init($,I),j_.init($,I)}),I3=M("$ZodSymbol",($,I)=>{n.init($,I),$._zod.parse=(_,u)=>{let U=_.value;if(typeof U==="symbol")return _;return _.issues.push({expected:"symbol",code:"invalid_type",input:U,inst:$}),_}}),U3=M("$ZodUndefined",($,I)=>{n.init($,I),$._zod.pattern=u8,$._zod.values=new Set([void 0]),$._zod.optin="optional",$._zod.optout="optional",$._zod.parse=(_,u)=>{let U=_.value;if(typeof U>"u")return _;return _.issues.push({expected:"undefined",code:"invalid_type",input:U,inst:$}),_}}),_3=M("$ZodNull",($,I)=>{n.init($,I),$._zod.pattern=_8,$._zod.values=new Set([null]),$._zod.parse=(_,u)=>{let U=_.value;if(U===null)return _;return _.issues.push({expected:"null",code:"invalid_type",input:U,inst:$}),_}}),u3=M("$ZodAny",($,I)=>{n.init($,I),$._zod.parse=(_)=>_}),z3=M("$ZodUnknown",($,I)=>{n.init($,I),$._zod.parse=(_)=>_}),J3=M("$ZodNever",($,I)=>{n.init($,I),$._zod.parse=(_,u)=>{return _.issues.push({expected:"never",code:"invalid_type",input:_.value,inst:$}),_}}),G3=M("$ZodVoid",($,I)=>{n.init($,I),$._zod.parse=(_,u)=>{let U=_.value;if(typeof U>"u")return _;return _.issues.push({expected:"void",code:"invalid_type",input:U,inst:$}),_}}),g3=M("$ZodDate",($,I)=>{n.init($,I),$._zod.parse=(_,u)=>{if(I.coerce)try{_.value=new Date(_.value)}catch(G){}let U=_.value,z=U instanceof Date;if(z&&!Number.isNaN(U.getTime()))return _;return _.issues.push({expected:"date",code:"invalid_type",input:U,...z?{received:"Invalid Date"}:{},inst:$}),_}});function tQ($,I,_){if($.issues.length)I.issues.push(..._4(_,$.issues));I.value[_]=$.value}var q3=M("$ZodArray",($,I)=>{n.init($,I),$._zod.parse=(_,u)=>{let U=_.value;if(!Array.isArray(U))return _.issues.push({expected:"array",code:"invalid_type",input:U,inst:$}),_;_.value=Array(U.length);let z=[];for(let J=0;J<U.length;J++){let G=U[J],g=I.element._zod.run({value:G,issues:[]},u);if(g instanceof Promise)z.push(g.then((q)=>tQ(q,_,J)));else tQ(g,_,J)}if(z.length)return Promise.all(z).then(()=>_);return _}});function b_($,I,_,u,U){if($.issues.length){if(U&&!(_ in u))return;I.issues.push(..._4(_,$.issues))}if($.value===void 0){if(_ in u)I.value[_]=void 0}else I.value[_]=$.value}function q7($){let I=Object.keys($.shape);for(let u of I)if(!$.shape?.[u]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${u}": expected a Zod schema`);let _=RJ($.shape);return{...$,keys:I,keySet:new Set(I),numKeys:I.length,optionalKeys:new Set(_)}}function X7($,I,_,u,U,z){let J=[],G=U.keySet,g=U.catchall._zod,q=g.def.type,N=g.optout==="optional";for(let X in I){if(G.has(X))continue;if(q==="never"){J.push(X);continue}let Q=g.run({value:I[X],issues:[]},u);if(Q instanceof Promise)$.push(Q.then((H)=>b_(H,_,X,I,N)));else b_(Q,_,X,I,N)}if(J.length)_.issues.push({code:"unrecognized_keys",keys:J,input:I,inst:z});if(!$.length)return _;return Promise.all($).then(()=>{return _})}var N7=M("$ZodObject",($,I)=>{if(n.init($,I),!Object.getOwnPropertyDescriptor(I,"shape")?.get){let G=I.shape;Object.defineProperty(I,"shape",{get:()=>{let g={...G};return Object.defineProperty(I,"shape",{value:g}),g}})}let u=k1(()=>q7(I));t($._zod,"propValues",()=>{let G=I.shape,g={};for(let q in G){let N=G[q]._zod;if(N.values){g[q]??(g[q]=new Set);for(let X of N.values)g[q].add(X)}}return g});let U=s6,z=I.catchall,J;$._zod.parse=(G,g)=>{J??(J=u.value);let q=G.value;if(!U(q))return G.issues.push({expected:"object",code:"invalid_type",input:q,inst:$}),G;G.value={};let N=[],X=J.shape;for(let Q of J.keys){let H=X[Q],Y=H._zod.optout==="optional",v=H._zod.run({value:q[Q],issues:[]},g);if(v instanceof Promise)N.push(v.then((O)=>b_(O,G,Q,q,Y)));else b_(v,G,Q,q,Y)}if(!z)return N.length?Promise.all(N).then(()=>G):G;return X7(N,q,G,g,u.value,$)}}),X3=M("$ZodObjectJIT",($,I)=>{N7.init($,I);let _=$._zod.parse,u=k1(()=>q7(I)),U=(Q)=>{let H=new V_(["shape","payload","ctx"]),Y=u.value,v=(W)=>{let K=g_(W);return`shape[${K}]._zod.run({ value: input[${K}], issues: [] }, ctx)`};H.write("const input = payload.value;");let O=Object.create(null),T=0;for(let W of Y.keys)O[W]=`key_${T++}`;H.write("const newResult = {};");for(let W of Y.keys){let K=O[W],D=g_(W),B=Q[W]?._zod?.optout==="optional";if(H.write(`const ${K} = ${v(W)};`),B)H.write(`
|
|
276
|
+
if (${K}.issues.length) {
|
|
277
|
+
if (${D} in input) {
|
|
278
|
+
payload.issues = payload.issues.concat(${K}.issues.map(iss => ({
|
|
279
279
|
...iss,
|
|
280
|
-
path: iss.path ? [${
|
|
280
|
+
path: iss.path ? [${D}, ...iss.path] : [${D}]
|
|
281
281
|
})));
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
-
if (${
|
|
286
|
-
if (${
|
|
287
|
-
newResult[${
|
|
285
|
+
if (${K}.value === undefined) {
|
|
286
|
+
if (${D} in input) {
|
|
287
|
+
newResult[${D}] = undefined;
|
|
288
288
|
}
|
|
289
289
|
} else {
|
|
290
|
-
newResult[${
|
|
290
|
+
newResult[${D}] = ${K}.value;
|
|
291
291
|
}
|
|
292
292
|
|
|
293
293
|
`);else H.write(`
|
|
294
|
-
if (${
|
|
295
|
-
payload.issues = payload.issues.concat(${
|
|
294
|
+
if (${K}.issues.length) {
|
|
295
|
+
payload.issues = payload.issues.concat(${K}.issues.map(iss => ({
|
|
296
296
|
...iss,
|
|
297
|
-
path: iss.path ? [${
|
|
297
|
+
path: iss.path ? [${D}, ...iss.path] : [${D}]
|
|
298
298
|
})));
|
|
299
299
|
}
|
|
300
300
|
|
|
301
|
-
if (${
|
|
302
|
-
if (${
|
|
303
|
-
newResult[${
|
|
301
|
+
if (${K}.value === undefined) {
|
|
302
|
+
if (${D} in input) {
|
|
303
|
+
newResult[${D}] = undefined;
|
|
304
304
|
}
|
|
305
305
|
} else {
|
|
306
|
-
newResult[${
|
|
306
|
+
newResult[${D}] = ${K}.value;
|
|
307
307
|
}
|
|
308
308
|
|
|
309
|
-
`)}H.write("payload.value = newResult;"),H.write("return payload;");let V=H.compile();return(R,L)=>V(Q,R,L)},z,g=a6,J=!zI.jitless,q=J&&Vg.value,N=I.catchall,X;$._zod.parse=(Q,H)=>{X??(X=u.value);let Y=Q.value;if(!g(Y))return Q.issues.push({expected:"object",code:"invalid_type",input:Y,inst:$}),Q;if(J&&q&&H?.async===!1&&H.jitless!==!0){if(!z)z=U(I.shape);if(Q=z(Q,H),!N)return Q;return J7([],Y,Q,H,X,$)}return _(Q,H)}});function pQ($,I,_,u){for(let z of $)if(z.issues.length===0)return I.value=z.value,I;let U=$.filter((z)=>!V6(z));if(U.length===1)return I.value=U[0].value,U[0];return I.issues.push({code:"invalid_union",input:I.value,inst:_,errors:$.map((z)=>z.issues.map((g)=>t$(g,u,L$())))}),I}var MI=M("$ZodUnion",($,I)=>{d.init($,I),t($._zod,"optin",()=>I.options.some((U)=>U._zod.optin==="optional")?"optional":void 0),t($._zod,"optout",()=>I.options.some((U)=>U._zod.optout==="optional")?"optional":void 0),t($._zod,"values",()=>{if(I.options.every((U)=>U._zod.values))return new Set(I.options.flatMap((U)=>Array.from(U._zod.values)));return}),t($._zod,"pattern",()=>{if(I.options.every((U)=>U._zod.pattern)){let U=I.options.map((z)=>z._zod.pattern);return new RegExp(`^(${U.map((z)=>GI(z.source)).join("|")})$`)}return});let _=I.options.length===1,u=I.options[0]._zod.run;$._zod.parse=(U,z)=>{if(_)return u(U,z);let g=!1,J=[];for(let G of I.options){let q=G._zod.run({value:U.value,issues:[]},z);if(q instanceof Promise)J.push(q),g=!0;else{if(q.issues.length===0)return q;J.push(q)}}if(!g)return pQ(J,U,$,z);return Promise.all(J).then((G)=>{return pQ(G,U,$,z)})}});function oQ($,I,_,u){let U=$.filter((z)=>z.issues.length===0);if(U.length===1)return I.value=U[0].value,I;if(U.length===0)I.issues.push({code:"invalid_union",input:I.value,inst:_,errors:$.map((z)=>z.issues.map((g)=>t$(g,u,L$())))});else I.issues.push({code:"invalid_union",input:I.value,inst:_,errors:[],inclusive:!1});return I}var N8=M("$ZodXor",($,I)=>{MI.init($,I),I.inclusive=!1;let _=I.options.length===1,u=I.options[0]._zod.run;$._zod.parse=(U,z)=>{if(_)return u(U,z);let g=!1,J=[];for(let G of I.options){let q=G._zod.run({value:U.value,issues:[]},z);if(q instanceof Promise)J.push(q),g=!0;else J.push(q)}if(!g)return oQ(J,U,$,z);return Promise.all(J).then((G)=>{return oQ(G,U,$,z)})}}),Q8=M("$ZodDiscriminatedUnion",($,I)=>{I.inclusive=!1,MI.init($,I);let _=$._zod.parse;t($._zod,"propValues",()=>{let U={};for(let z of I.options){let g=z._zod.propValues;if(!g||Object.keys(g).length===0)throw Error(`Invalid discriminated union option at index "${I.options.indexOf(z)}"`);for(let[J,G]of Object.entries(g)){if(!U[J])U[J]=new Set;for(let q of G)U[J].add(q)}}return U});let u=k1(()=>{let U=I.options,z=new Map;for(let g of U){let J=g._zod.propValues?.[I.discriminator];if(!J||J.size===0)throw Error(`Invalid discriminated union option at index "${I.options.indexOf(g)}"`);for(let G of J){if(z.has(G))throw Error(`Duplicate discriminator value "${String(G)}"`);z.set(G,g)}}return z});$._zod.parse=(U,z)=>{let g=U.value;if(!a6(g))return U.issues.push({code:"invalid_type",expected:"object",input:g,inst:$}),U;let J=u.value.get(g?.[I.discriminator]);if(J)return J._zod.run(U,z);if(I.unionFallback)return _(U,z);return U.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:I.discriminator,input:g,path:[I.discriminator],inst:$}),U}}),v8=M("$ZodIntersection",($,I)=>{d.init($,I),$._zod.parse=(_,u)=>{let U=_.value,z=I.left._zod.run({value:U,issues:[]},u),g=I.right._zod.run({value:U,issues:[]},u);if(z instanceof Promise||g instanceof Promise)return Promise.all([z,g]).then(([G,q])=>{return tQ(_,G,q)});return tQ(_,z,g)}});function RJ($,I){if($===I)return{valid:!0,data:$};if($ instanceof Date&&I instanceof Date&&+$===+I)return{valid:!0,data:$};if(L6($)&&L6(I)){let _=Object.keys(I),u=Object.keys($).filter((z)=>_.indexOf(z)!==-1),U={...$,...I};for(let z of u){let g=RJ($[z],I[z]);if(!g.valid)return{valid:!1,mergeErrorPath:[z,...g.mergeErrorPath]};U[z]=g.data}return{valid:!0,data:U}}if(Array.isArray($)&&Array.isArray(I)){if($.length!==I.length)return{valid:!1,mergeErrorPath:[]};let _=[];for(let u=0;u<$.length;u++){let U=$[u],z=I[u],g=RJ(U,z);if(!g.valid)return{valid:!1,mergeErrorPath:[u,...g.mergeErrorPath]};_.push(g.data)}return{valid:!0,data:_}}return{valid:!1,mergeErrorPath:[]}}function tQ($,I,_){let u=new Map,U;for(let J of I.issues)if(J.code==="unrecognized_keys"){U??(U=J);for(let G of J.keys){if(!u.has(G))u.set(G,{});u.get(G).l=!0}}else $.issues.push(J);for(let J of _.issues)if(J.code==="unrecognized_keys")for(let G of J.keys){if(!u.has(G))u.set(G,{});u.get(G).r=!0}else $.issues.push(J);let z=[...u].filter(([,J])=>J.l&&J.r).map(([J])=>J);if(z.length&&U)$.issues.push({...U,keys:z});if(V6($))return $;let g=RJ(I.value,_.value);if(!g.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(g.mergeErrorPath)}`);return $.value=g.data,$}var j_=M("$ZodTuple",($,I)=>{d.init($,I);let _=I.items;$._zod.parse=(u,U)=>{let z=u.value;if(!Array.isArray(z))return u.issues.push({input:z,inst:$,expected:"tuple",code:"invalid_type"}),u;u.value=[];let g=[],J=[..._].reverse().findIndex((N)=>N._zod.optin!=="optional"),G=J===-1?0:_.length-J;if(!I.rest){let N=z.length>_.length,X=z.length<G-1;if(N||X)return u.issues.push({...N?{code:"too_big",maximum:_.length,inclusive:!0}:{code:"too_small",minimum:_.length},input:z,inst:$,origin:"array"}),u}let q=-1;for(let N of _){if(q++,q>=z.length){if(q>=G)continue}let X=N._zod.run({value:z[q],issues:[]},U);if(X instanceof Promise)g.push(X.then((Q)=>V_(Q,u,q)));else V_(X,u,q)}if(I.rest){let N=z.slice(_.length);for(let X of N){q++;let Q=I.rest._zod.run({value:X,issues:[]},U);if(Q instanceof Promise)g.push(Q.then((H)=>V_(H,u,q)));else V_(Q,u,q)}}if(g.length)return Promise.all(g).then(()=>u);return u}});function V_($,I,_){if($.issues.length)I.issues.push(...U4(_,$.issues));I.value[_]=$.value}var H8=M("$ZodRecord",($,I)=>{d.init($,I),$._zod.parse=(_,u)=>{let U=_.value;if(!L6(U))return _.issues.push({expected:"record",code:"invalid_type",input:U,inst:$}),_;let z=[],g=I.keyType._zod.values;if(g){_.value={};let J=new Set;for(let q of g)if(typeof q==="string"||typeof q==="number"||typeof q==="symbol"){J.add(typeof q==="number"?q.toString():q);let N=I.valueType._zod.run({value:U[q],issues:[]},u);if(N instanceof Promise)z.push(N.then((X)=>{if(X.issues.length)_.issues.push(...U4(q,X.issues));_.value[q]=X.value}));else{if(N.issues.length)_.issues.push(...U4(q,N.issues));_.value[q]=N.value}}let G;for(let q in U)if(!J.has(q))G=G??[],G.push(q);if(G&&G.length>0)_.issues.push({code:"unrecognized_keys",input:U,inst:$,keys:G})}else{_.value={};for(let J of Reflect.ownKeys(U)){if(J==="__proto__")continue;let G=I.keyType._zod.run({value:J,issues:[]},u);if(G instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof J==="string"&&YI.test(J)&&G.issues.length){let X=I.keyType._zod.run({value:Number(J),issues:[]},u);if(X instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(X.issues.length===0)G=X}if(G.issues.length){if(I.mode==="loose")_.value[J]=U[J];else _.issues.push({code:"invalid_key",origin:"record",issues:G.issues.map((X)=>t$(X,u,L$())),input:J,path:[J],inst:$});continue}let N=I.valueType._zod.run({value:U[J],issues:[]},u);if(N instanceof Promise)z.push(N.then((X)=>{if(X.issues.length)_.issues.push(...U4(J,X.issues));_.value[G.value]=X.value}));else{if(N.issues.length)_.issues.push(...U4(J,N.issues));_.value[G.value]=N.value}}}if(z.length)return Promise.all(z).then(()=>_);return _}}),Y8=M("$ZodMap",($,I)=>{d.init($,I),$._zod.parse=(_,u)=>{let U=_.value;if(!(U instanceof Map))return _.issues.push({expected:"map",code:"invalid_type",input:U,inst:$}),_;let z=[];_.value=new Map;for(let[g,J]of U){let G=I.keyType._zod.run({value:g,issues:[]},u),q=I.valueType._zod.run({value:J,issues:[]},u);if(G instanceof Promise||q instanceof Promise)z.push(Promise.all([G,q]).then(([N,X])=>{aQ(N,X,_,g,U,$,u)}));else aQ(G,q,_,g,U,$,u)}if(z.length)return Promise.all(z).then(()=>_);return _}});function aQ($,I,_,u,U,z,g){if($.issues.length)if(qI.has(typeof u))_.issues.push(...U4(u,$.issues));else _.issues.push({code:"invalid_key",origin:"map",input:U,inst:z,issues:$.issues.map((J)=>t$(J,g,L$()))});if(I.issues.length)if(qI.has(typeof u))_.issues.push(...U4(u,I.issues));else _.issues.push({origin:"map",code:"invalid_element",input:U,inst:z,key:u,issues:I.issues.map((J)=>t$(J,g,L$()))});_.value.set($.value,I.value)}var O8=M("$ZodSet",($,I)=>{d.init($,I),$._zod.parse=(_,u)=>{let U=_.value;if(!(U instanceof Set))return _.issues.push({input:U,inst:$,expected:"set",code:"invalid_type"}),_;let z=[];_.value=new Set;for(let g of U){let J=I.valueType._zod.run({value:g,issues:[]},u);if(J instanceof Promise)z.push(J.then((G)=>eQ(G,_)));else eQ(J,_)}if(z.length)return Promise.all(z).then(()=>_);return _}});function eQ($,I){if($.issues.length)I.issues.push(...$.issues);I.value.add($.value)}var T8=M("$ZodEnum",($,I)=>{d.init($,I);let _=JI(I.entries),u=new Set(_);$._zod.values=u,$._zod.pattern=new RegExp(`^(${_.filter((U)=>qI.has(typeof U)).map((U)=>typeof U==="string"?Q4(U):U.toString()).join("|")})$`),$._zod.parse=(U,z)=>{let g=U.value;if(u.has(g))return U;return U.issues.push({code:"invalid_value",values:_,input:g,inst:$}),U}}),B8=M("$ZodLiteral",($,I)=>{if(d.init($,I),I.values.length===0)throw Error("Cannot create literal schema with no valid values");let _=new Set(I.values);$._zod.values=_,$._zod.pattern=new RegExp(`^(${I.values.map((u)=>typeof u==="string"?Q4(u):u?Q4(u.toString()):String(u)).join("|")})$`),$._zod.parse=(u,U)=>{let z=u.value;if(_.has(z))return u;return u.issues.push({code:"invalid_value",values:I.values,input:z,inst:$}),u}}),M8=M("$ZodFile",($,I)=>{d.init($,I),$._zod.parse=(_,u)=>{let U=_.value;if(U instanceof File)return _;return _.issues.push({expected:"file",code:"invalid_type",input:U,inst:$}),_}}),K8=M("$ZodTransform",($,I)=>{d.init($,I),$._zod.parse=(_,u)=>{if(u.direction==="backward")throw new t6($.constructor.name);let U=I.transform(_.value,_);if(u.async)return(U instanceof Promise?U:Promise.resolve(U)).then((g)=>{return _.value=g,_});if(U instanceof Promise)throw new C4;return _.value=U,_}});function sQ($,I){if($.issues.length&&I===void 0)return{issues:[],value:void 0};return $}var F_=M("$ZodOptional",($,I)=>{d.init($,I),$._zod.optin="optional",$._zod.optout="optional",t($._zod,"values",()=>{return I.innerType._zod.values?new Set([...I.innerType._zod.values,void 0]):void 0}),t($._zod,"pattern",()=>{let _=I.innerType._zod.pattern;return _?new RegExp(`^(${GI(_.source)})?$`):void 0}),$._zod.parse=(_,u)=>{if(I.innerType._zod.optin==="optional"){let U=I.innerType._zod.run(_,u);if(U instanceof Promise)return U.then((z)=>sQ(z,_.value));return sQ(U,_.value)}if(_.value===void 0)return _;return I.innerType._zod.run(_,u)}}),D8=M("$ZodExactOptional",($,I)=>{F_.init($,I),t($._zod,"values",()=>I.innerType._zod.values),t($._zod,"pattern",()=>I.innerType._zod.pattern),$._zod.parse=(_,u)=>{return I.innerType._zod.run(_,u)}}),L8=M("$ZodNullable",($,I)=>{d.init($,I),t($._zod,"optin",()=>I.innerType._zod.optin),t($._zod,"optout",()=>I.innerType._zod.optout),t($._zod,"pattern",()=>{let _=I.innerType._zod.pattern;return _?new RegExp(`^(${GI(_.source)}|null)$`):void 0}),t($._zod,"values",()=>{return I.innerType._zod.values?new Set([...I.innerType._zod.values,null]):void 0}),$._zod.parse=(_,u)=>{if(_.value===null)return _;return I.innerType._zod.run(_,u)}}),V8=M("$ZodDefault",($,I)=>{d.init($,I),$._zod.optin="optional",t($._zod,"values",()=>I.innerType._zod.values),$._zod.parse=(_,u)=>{if(u.direction==="backward")return I.innerType._zod.run(_,u);if(_.value===void 0)return _.value=I.defaultValue,_;let U=I.innerType._zod.run(_,u);if(U instanceof Promise)return U.then((z)=>$7(z,I));return $7(U,I)}});function $7($,I){if($.value===void 0)$.value=I.defaultValue;return $}var Z8=M("$ZodPrefault",($,I)=>{d.init($,I),$._zod.optin="optional",t($._zod,"values",()=>I.innerType._zod.values),$._zod.parse=(_,u)=>{if(u.direction==="backward")return I.innerType._zod.run(_,u);if(_.value===void 0)_.value=I.defaultValue;return I.innerType._zod.run(_,u)}}),W8=M("$ZodNonOptional",($,I)=>{d.init($,I),t($._zod,"values",()=>{let _=I.innerType._zod.values;return _?new Set([..._].filter((u)=>u!==void 0)):void 0}),$._zod.parse=(_,u)=>{let U=I.innerType._zod.run(_,u);if(U instanceof Promise)return U.then((z)=>I7(z,$));return I7(U,$)}});function I7($,I){if(!$.issues.length&&$.value===void 0)$.issues.push({code:"invalid_type",expected:"nonoptional",input:$.value,inst:I});return $}var R8=M("$ZodSuccess",($,I)=>{d.init($,I),$._zod.parse=(_,u)=>{if(u.direction==="backward")throw new t6("ZodSuccess");let U=I.innerType._zod.run(_,u);if(U instanceof Promise)return U.then((z)=>{return _.value=z.issues.length===0,_});return _.value=U.issues.length===0,_}}),P8=M("$ZodCatch",($,I)=>{d.init($,I),t($._zod,"optin",()=>I.innerType._zod.optin),t($._zod,"optout",()=>I.innerType._zod.optout),t($._zod,"values",()=>I.innerType._zod.values),$._zod.parse=(_,u)=>{if(u.direction==="backward")return I.innerType._zod.run(_,u);let U=I.innerType._zod.run(_,u);if(U instanceof Promise)return U.then((z)=>{if(_.value=z.value,z.issues.length)_.value=I.catchValue({..._,error:{issues:z.issues.map((g)=>t$(g,u,L$()))},input:_.value}),_.issues=[];return _});if(_.value=U.value,U.issues.length)_.value=I.catchValue({..._,error:{issues:U.issues.map((z)=>t$(z,u,L$()))},input:_.value}),_.issues=[];return _}}),b8=M("$ZodNaN",($,I)=>{d.init($,I),$._zod.parse=(_,u)=>{if(typeof _.value!=="number"||!Number.isNaN(_.value))return _.issues.push({input:_.value,inst:$,expected:"nan",code:"invalid_type"}),_;return _}}),A8=M("$ZodPipe",($,I)=>{d.init($,I),t($._zod,"values",()=>I.in._zod.values),t($._zod,"optin",()=>I.in._zod.optin),t($._zod,"optout",()=>I.out._zod.optout),t($._zod,"propValues",()=>I.in._zod.propValues),$._zod.parse=(_,u)=>{if(u.direction==="backward"){let z=I.out._zod.run(_,u);if(z instanceof Promise)return z.then((g)=>Z_(g,I.in,u));return Z_(z,I.in,u)}let U=I.in._zod.run(_,u);if(U instanceof Promise)return U.then((z)=>Z_(z,I.out,u));return Z_(U,I.out,u)}});function Z_($,I,_){if($.issues.length)return $.aborted=!0,$;return I._zod.run({value:$.value,issues:$.issues},_)}var KI=M("$ZodCodec",($,I)=>{d.init($,I),t($._zod,"values",()=>I.in._zod.values),t($._zod,"optin",()=>I.in._zod.optin),t($._zod,"optout",()=>I.out._zod.optout),t($._zod,"propValues",()=>I.in._zod.propValues),$._zod.parse=(_,u)=>{if((u.direction||"forward")==="forward"){let z=I.in._zod.run(_,u);if(z instanceof Promise)return z.then((g)=>W_(g,I,u));return W_(z,I,u)}else{let z=I.out._zod.run(_,u);if(z instanceof Promise)return z.then((g)=>W_(g,I,u));return W_(z,I,u)}}});function W_($,I,_){if($.issues.length)return $.aborted=!0,$;if((_.direction||"forward")==="forward"){let U=I.transform($.value,$);if(U instanceof Promise)return U.then((z)=>R_($,z,I.out,_));return R_($,U,I.out,_)}else{let U=I.reverseTransform($.value,$);if(U instanceof Promise)return U.then((z)=>R_($,z,I.in,_));return R_($,U,I.in,_)}}function R_($,I,_,u){if($.issues.length)return $.aborted=!0,$;return _._zod.run({value:I,issues:$.issues},u)}var j8=M("$ZodReadonly",($,I)=>{d.init($,I),t($._zod,"propValues",()=>I.innerType._zod.propValues),t($._zod,"values",()=>I.innerType._zod.values),t($._zod,"optin",()=>I.innerType?._zod?.optin),t($._zod,"optout",()=>I.innerType?._zod?.optout),$._zod.parse=(_,u)=>{if(u.direction==="backward")return I.innerType._zod.run(_,u);let U=I.innerType._zod.run(_,u);if(U instanceof Promise)return U.then(U7);return U7(U)}});function U7($){return $.value=Object.freeze($.value),$}var F8=M("$ZodTemplateLiteral",($,I)=>{d.init($,I);let _=[];for(let u of I.parts)if(typeof u==="object"&&u!==null){if(!u._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...u._zod.traits].shift()}`);let U=u._zod.pattern instanceof RegExp?u._zod.pattern.source:u._zod.pattern;if(!U)throw Error(`Invalid template literal part: ${u._zod.traits}`);let z=U.startsWith("^")?1:0,g=U.endsWith("$")?U.length-1:U.length;_.push(U.slice(z,g))}else if(u===null||Wg.has(typeof u))_.push(Q4(`${u}`));else throw Error(`Invalid template literal part: ${u}`);$._zod.pattern=new RegExp(`^${_.join("")}$`),$._zod.parse=(u,U)=>{if(typeof u.value!=="string")return u.issues.push({input:u.value,inst:$,expected:"string",code:"invalid_type"}),u;if($._zod.pattern.lastIndex=0,!$._zod.pattern.test(u.value))return u.issues.push({input:u.value,inst:$,code:"invalid_format",format:I.format??"template_literal",pattern:$._zod.pattern.source}),u;return u}}),S8=M("$ZodFunction",($,I)=>{return d.init($,I),$._def=I,$._zod.def=I,$.implement=(_)=>{if(typeof _!=="function")throw Error("implement() must be called with a function");return function(...u){let U=$._def.input?q_($._def.input,u):u,z=Reflect.apply(_,this,U);if($._def.output)return q_($._def.output,z);return z}},$.implementAsync=(_)=>{if(typeof _!=="function")throw Error("implementAsync() must be called with a function");return async function(...u){let U=$._def.input?await X_($._def.input,u):u,z=await Reflect.apply(_,this,U);if($._def.output)return await X_($._def.output,z);return z}},$._zod.parse=(_,u)=>{if(typeof _.value!=="function")return _.issues.push({code:"invalid_type",expected:"function",input:_.value,inst:$}),_;if($._def.output&&$._def.output._zod.def.type==="promise")_.value=$.implementAsync(_.value);else _.value=$.implement(_.value);return _},$.input=(..._)=>{let u=$.constructor;if(Array.isArray(_[0]))return new u({type:"function",input:new j_({type:"tuple",items:_[0],rest:_[1]}),output:$._def.output});return new u({type:"function",input:_[0],output:$._def.output})},$.output=(_)=>{return new $.constructor({type:"function",input:$._def.input,output:_})},$}),w8=M("$ZodPromise",($,I)=>{d.init($,I),$._zod.parse=(_,u)=>{return Promise.resolve(_.value).then((U)=>I.innerType._zod.run({value:U,issues:[]},u))}}),E8=M("$ZodLazy",($,I)=>{d.init($,I),t($._zod,"innerType",()=>I.getter()),t($._zod,"pattern",()=>$._zod.innerType?._zod?.pattern),t($._zod,"propValues",()=>$._zod.innerType?._zod?.propValues),t($._zod,"optin",()=>$._zod.innerType?._zod?.optin??void 0),t($._zod,"optout",()=>$._zod.innerType?._zod?.optout??void 0),$._zod.parse=(_,u)=>{return $._zod.innerType._zod.run(_,u)}}),C8=M("$ZodCustom",($,I)=>{X$.init($,I),d.init($,I),$._zod.parse=(_,u)=>{return _},$._zod.check=(_)=>{let u=_.value,U=I.fn(u);if(U instanceof Promise)return U.then((z)=>_7(z,_,u,$));_7(U,_,u,$);return}});function _7($,I,_,u){if(!$){let U={code:"custom",input:_,inst:u,path:[...u._zod.def.path??[]],continue:!u._zod.def.abort};if(u._zod.def.params)U.params=u._zod.def.params;I.issues.push(y1(U))}}var WI={};S4(WI,{zhTW:()=>R3,zhCN:()=>W3,yo:()=>P3,vi:()=>Z3,uz:()=>V3,ur:()=>L3,uk:()=>ZI,ua:()=>D3,tr:()=>K3,th:()=>M3,ta:()=>B3,sv:()=>T3,sl:()=>O3,ru:()=>Y3,pt:()=>H3,ps:()=>Q3,pl:()=>v3,ota:()=>N3,no:()=>X3,nl:()=>q3,ms:()=>G3,mk:()=>J3,lt:()=>g3,ko:()=>z3,km:()=>LI,kh:()=>u3,ka:()=>_3,ja:()=>U3,it:()=>I3,is:()=>$3,id:()=>s8,hy:()=>e8,hu:()=>a8,he:()=>t8,frCA:()=>o8,fr:()=>p8,fi:()=>c8,fa:()=>d8,es:()=>h8,eo:()=>n8,en:()=>DI,de:()=>r8,da:()=>m8,cs:()=>l8,ca:()=>i8,bg:()=>y8,be:()=>k8,az:()=>x8,ar:()=>f8});var ZA=()=>{let $={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function I(U){return $[U]??null}let _={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:"مدخل"},u={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`مدخلات غير مقبولة: يفترض إدخال instanceof ${U.expected}، ولكن تم إدخال ${J}`;return`مدخلات غير مقبولة: يفترض إدخال ${z}، ولكن تم إدخال ${J}`}case"invalid_value":if(U.values.length===1)return`مدخلات غير مقبولة: يفترض إدخال ${b(U.values[0])}`;return`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return` أكبر من اللازم: يفترض أن تكون ${U.origin??"القيمة"} ${z} ${U.maximum.toString()} ${g.unit??"عنصر"}`;return`أكبر من اللازم: يفترض أن تكون ${U.origin??"القيمة"} ${z} ${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`أصغر من اللازم: يفترض لـ ${U.origin} أن يكون ${z} ${U.minimum.toString()} ${g.unit}`;return`أصغر من اللازم: يفترض لـ ${U.origin} أن يكون ${z} ${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`نَص غير مقبول: يجب أن يبدأ بـ "${U.prefix}"`;if(z.format==="ends_with")return`نَص غير مقبول: يجب أن ينتهي بـ "${z.suffix}"`;if(z.format==="includes")return`نَص غير مقبول: يجب أن يتضمَّن "${z.includes}"`;if(z.format==="regex")return`نَص غير مقبول: يجب أن يطابق النمط ${z.pattern}`;return`${_[z.format]??U.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${U.divisor}`;case"unrecognized_keys":return`معرف${U.keys.length>1?"ات":""} غريب${U.keys.length>1?"ة":""}: ${W(U.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${U.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${U.origin}`;default:return"مدخل غير مقبول"}}};function f8(){return{localeError:ZA()}}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 _={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"},u={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Yanlış dəyər: gözlənilən instanceof ${U.expected}, daxil olan ${J}`;return`Yanlış dəyər: gözlənilən ${z}, daxil olan ${J}`}case"invalid_value":if(U.values.length===1)return`Yanlış dəyər: gözlənilən ${b(U.values[0])}`;return`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`Çox böyük: gözlənilən ${U.origin??"dəyər"} ${z}${U.maximum.toString()} ${g.unit??"element"}`;return`Çox böyük: gözlənilən ${U.origin??"dəyər"} ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`Çox kiçik: gözlənilən ${U.origin} ${z}${U.minimum.toString()} ${g.unit}`;return`Çox kiçik: gözlənilən ${U.origin} ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Yanlış mətn: "${z.prefix}" ilə başlamalıdır`;if(z.format==="ends_with")return`Yanlış mətn: "${z.suffix}" ilə bitməlidir`;if(z.format==="includes")return`Yanlış mətn: "${z.includes}" daxil olmalıdır`;if(z.format==="regex")return`Yanlış mətn: ${z.pattern} şablonuna uyğun olmalıdır`;return`Yanlış ${_[z.format]??U.format}`}case"not_multiple_of":return`Yanlış ədəd: ${U.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${U.keys.length>1?"lar":""}: ${W(U.keys,", ")}`;case"invalid_key":return`${U.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${U.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function x8(){return{localeError:WA()}}function q7($,I,_,u){let U=Math.abs($),z=U%10,g=U%100;if(g>=11&&g<=19)return u;if(z===1)return I;if(z>=2&&z<=4)return _;return u}var RA=()=>{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 _={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:"увод"},u={nan:"NaN",number:"лік",array:"масіў"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Няправільны ўвод: чакаўся instanceof ${U.expected}, атрымана ${J}`;return`Няправільны ўвод: чакаўся ${z}, атрымана ${J}`}case"invalid_value":if(U.values.length===1)return`Няправільны ўвод: чакалася ${b(U.values[0])}`;return`Няправільны варыянт: чакаўся адзін з ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g){let J=Number(U.maximum),G=q7(J,g.unit.one,g.unit.few,g.unit.many);return`Занадта вялікі: чакалася, што ${U.origin??"значэнне"} павінна ${g.verb} ${z}${U.maximum.toString()} ${G}`}return`Занадта вялікі: чакалася, што ${U.origin??"значэнне"} павінна быць ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g){let J=Number(U.minimum),G=q7(J,g.unit.one,g.unit.few,g.unit.many);return`Занадта малы: чакалася, што ${U.origin} павінна ${g.verb} ${z}${U.minimum.toString()} ${G}`}return`Занадта малы: чакалася, што ${U.origin} павінна быць ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Няправільны радок: павінен пачынацца з "${z.prefix}"`;if(z.format==="ends_with")return`Няправільны радок: павінен заканчвацца на "${z.suffix}"`;if(z.format==="includes")return`Няправільны радок: павінен змяшчаць "${z.includes}"`;if(z.format==="regex")return`Няправільны радок: павінен адпавядаць шаблону ${z.pattern}`;return`Няправільны ${_[z.format]??U.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${U.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${U.keys.length>1?"ключы":"ключ"}: ${W(U.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${U.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${U.origin}`;default:return"Няправільны ўвод"}}};function k8(){return{localeError:RA()}}var PA=()=>{let $={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function I(U){return $[U]??null}let _={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:"вход"},u={nan:"NaN",number:"число",array:"масив"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Невалиден вход: очакван instanceof ${U.expected}, получен ${J}`;return`Невалиден вход: очакван ${z}, получен ${J}`}case"invalid_value":if(U.values.length===1)return`Невалиден вход: очакван ${b(U.values[0])}`;return`Невалидна опция: очаквано едно от ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`Твърде голямо: очаква се ${U.origin??"стойност"} да съдържа ${z}${U.maximum.toString()} ${g.unit??"елемента"}`;return`Твърде голямо: очаква се ${U.origin??"стойност"} да бъде ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`Твърде малко: очаква се ${U.origin} да съдържа ${z}${U.minimum.toString()} ${g.unit}`;return`Твърде малко: очаква се ${U.origin} да бъде ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Невалиден низ: трябва да започва с "${z.prefix}"`;if(z.format==="ends_with")return`Невалиден низ: трябва да завършва с "${z.suffix}"`;if(z.format==="includes")return`Невалиден низ: трябва да включва "${z.includes}"`;if(z.format==="regex")return`Невалиден низ: трябва да съвпада с ${z.pattern}`;let g="Невалиден";if(z.format==="emoji")g="Невалидно";if(z.format==="datetime")g="Невалидно";if(z.format==="date")g="Невалидна";if(z.format==="time")g="Невалидно";if(z.format==="duration")g="Невалидна";return`${g} ${_[z.format]??U.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${U.divisor}`;case"unrecognized_keys":return`Неразпознат${U.keys.length>1?"и":""} ключ${U.keys.length>1?"ове":""}: ${W(U.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${U.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${U.origin}`;default:return"Невалиден вход"}}};function y8(){return{localeError:PA()}}var bA=()=>{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 _={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"},u={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Tipus invàlid: s'esperava instanceof ${U.expected}, s'ha rebut ${J}`;return`Tipus invàlid: s'esperava ${z}, s'ha rebut ${J}`}case"invalid_value":if(U.values.length===1)return`Valor invàlid: s'esperava ${b(U.values[0])}`;return`Opció invàlida: s'esperava una de ${W(U.values," o ")}`;case"too_big":{let z=U.inclusive?"com a màxim":"menys de",g=I(U.origin);if(g)return`Massa gran: s'esperava que ${U.origin??"el valor"} contingués ${z} ${U.maximum.toString()} ${g.unit??"elements"}`;return`Massa gran: s'esperava que ${U.origin??"el valor"} fos ${z} ${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?"com a mínim":"més de",g=I(U.origin);if(g)return`Massa petit: s'esperava que ${U.origin} contingués ${z} ${U.minimum.toString()} ${g.unit}`;return`Massa petit: s'esperava que ${U.origin} fos ${z} ${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Format invàlid: ha de començar amb "${z.prefix}"`;if(z.format==="ends_with")return`Format invàlid: ha d'acabar amb "${z.suffix}"`;if(z.format==="includes")return`Format invàlid: ha d'incloure "${z.includes}"`;if(z.format==="regex")return`Format invàlid: ha de coincidir amb el patró ${z.pattern}`;return`Format invàlid per a ${_[z.format]??U.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${U.divisor}`;case"unrecognized_keys":return`Clau${U.keys.length>1?"s":""} no reconeguda${U.keys.length>1?"s":""}: ${W(U.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${U.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${U.origin}`;default:return"Entrada invàlida"}}};function i8(){return{localeError:bA()}}var AA=()=>{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 _={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"},u={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Neplatný vstup: očekáváno instanceof ${U.expected}, obdrženo ${J}`;return`Neplatný vstup: očekáváno ${z}, obdrženo ${J}`}case"invalid_value":if(U.values.length===1)return`Neplatný vstup: očekáváno ${b(U.values[0])}`;return`Neplatná možnost: očekávána jedna z hodnot ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`Hodnota je příliš velká: ${U.origin??"hodnota"} musí mít ${z}${U.maximum.toString()} ${g.unit??"prvků"}`;return`Hodnota je příliš velká: ${U.origin??"hodnota"} musí být ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`Hodnota je příliš malá: ${U.origin??"hodnota"} musí mít ${z}${U.minimum.toString()} ${g.unit??"prvků"}`;return`Hodnota je příliš malá: ${U.origin??"hodnota"} musí být ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Neplatný řetězec: musí začínat na "${z.prefix}"`;if(z.format==="ends_with")return`Neplatný řetězec: musí končit na "${z.suffix}"`;if(z.format==="includes")return`Neplatný řetězec: musí obsahovat "${z.includes}"`;if(z.format==="regex")return`Neplatný řetězec: musí odpovídat vzoru ${z.pattern}`;return`Neplatný formát ${_[z.format]??U.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${U.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${W(U.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${U.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${U.origin}`;default:return"Neplatný vstup"}}};function l8(){return{localeError:AA()}}var jA=()=>{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 _={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"},u={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Ugyldigt input: forventede instanceof ${U.expected}, fik ${J}`;return`Ugyldigt input: forventede ${z}, fik ${J}`}case"invalid_value":if(U.values.length===1)return`Ugyldig værdi: forventede ${b(U.values[0])}`;return`Ugyldigt valg: forventede en af følgende ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin),J=u[U.origin]??U.origin;if(g)return`For stor: forventede ${J??"value"} ${g.verb} ${z} ${U.maximum.toString()} ${g.unit??"elementer"}`;return`For stor: forventede ${J??"value"} havde ${z} ${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin),J=u[U.origin]??U.origin;if(g)return`For lille: forventede ${J} ${g.verb} ${z} ${U.minimum.toString()} ${g.unit}`;return`For lille: forventede ${J} havde ${z} ${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Ugyldig streng: skal starte med "${z.prefix}"`;if(z.format==="ends_with")return`Ugyldig streng: skal ende med "${z.suffix}"`;if(z.format==="includes")return`Ugyldig streng: skal indeholde "${z.includes}"`;if(z.format==="regex")return`Ugyldig streng: skal matche mønsteret ${z.pattern}`;return`Ugyldig ${_[z.format]??U.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${U.divisor}`;case"unrecognized_keys":return`${U.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${W(U.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${U.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${U.origin}`;default:return"Ugyldigt input"}}};function m8(){return{localeError:jA()}}var FA=()=>{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 _={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"},u={nan:"NaN",number:"Zahl",array:"Array"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Ungültige Eingabe: erwartet instanceof ${U.expected}, erhalten ${J}`;return`Ungültige Eingabe: erwartet ${z}, erhalten ${J}`}case"invalid_value":if(U.values.length===1)return`Ungültige Eingabe: erwartet ${b(U.values[0])}`;return`Ungültige Option: erwartet eine von ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`Zu groß: erwartet, dass ${U.origin??"Wert"} ${z}${U.maximum.toString()} ${g.unit??"Elemente"} hat`;return`Zu groß: erwartet, dass ${U.origin??"Wert"} ${z}${U.maximum.toString()} ist`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`Zu klein: erwartet, dass ${U.origin} ${z}${U.minimum.toString()} ${g.unit} hat`;return`Zu klein: erwartet, dass ${U.origin} ${z}${U.minimum.toString()} ist`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Ungültiger String: muss mit "${z.prefix}" beginnen`;if(z.format==="ends_with")return`Ungültiger String: muss mit "${z.suffix}" enden`;if(z.format==="includes")return`Ungültiger String: muss "${z.includes}" enthalten`;if(z.format==="regex")return`Ungültiger String: muss dem Muster ${z.pattern} entsprechen`;return`Ungültig: ${_[z.format]??U.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${U.divisor} sein`;case"unrecognized_keys":return`${U.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${W(U.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${U.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${U.origin}`;default:return"Ungültige Eingabe"}}};function r8(){return{localeError:FA()}}var SA=()=>{let $={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function I(U){return $[U]??null}let _={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"},u={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;return`Invalid input: expected ${z}, received ${J}`}case"invalid_value":if(U.values.length===1)return`Invalid input: expected ${b(U.values[0])}`;return`Invalid option: expected one of ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`Too big: expected ${U.origin??"value"} to have ${z}${U.maximum.toString()} ${g.unit??"elements"}`;return`Too big: expected ${U.origin??"value"} to be ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`Too small: expected ${U.origin} to have ${z}${U.minimum.toString()} ${g.unit}`;return`Too small: expected ${U.origin} to be ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Invalid string: must start with "${z.prefix}"`;if(z.format==="ends_with")return`Invalid string: must end with "${z.suffix}"`;if(z.format==="includes")return`Invalid string: must include "${z.includes}"`;if(z.format==="regex")return`Invalid string: must match pattern ${z.pattern}`;return`Invalid ${_[z.format]??U.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${U.divisor}`;case"unrecognized_keys":return`Unrecognized key${U.keys.length>1?"s":""}: ${W(U.keys,", ")}`;case"invalid_key":return`Invalid key in ${U.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${U.origin}`;default:return"Invalid input"}}};function DI(){return{localeError:SA()}}var wA=()=>{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 _={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"},u={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Nevalida enigo: atendiĝis instanceof ${U.expected}, riceviĝis ${J}`;return`Nevalida enigo: atendiĝis ${z}, riceviĝis ${J}`}case"invalid_value":if(U.values.length===1)return`Nevalida enigo: atendiĝis ${b(U.values[0])}`;return`Nevalida opcio: atendiĝis unu el ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`Tro granda: atendiĝis ke ${U.origin??"valoro"} havu ${z}${U.maximum.toString()} ${g.unit??"elementojn"}`;return`Tro granda: atendiĝis ke ${U.origin??"valoro"} havu ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`Tro malgranda: atendiĝis ke ${U.origin} havu ${z}${U.minimum.toString()} ${g.unit}`;return`Tro malgranda: atendiĝis ke ${U.origin} estu ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Nevalida karaktraro: devas komenciĝi per "${z.prefix}"`;if(z.format==="ends_with")return`Nevalida karaktraro: devas finiĝi per "${z.suffix}"`;if(z.format==="includes")return`Nevalida karaktraro: devas inkluzivi "${z.includes}"`;if(z.format==="regex")return`Nevalida karaktraro: devas kongrui kun la modelo ${z.pattern}`;return`Nevalida ${_[z.format]??U.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${U.divisor}`;case"unrecognized_keys":return`Nekonata${U.keys.length>1?"j":""} ŝlosilo${U.keys.length>1?"j":""}: ${W(U.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${U.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${U.origin}`;default:return"Nevalida enigo"}}};function n8(){return{localeError:wA()}}var EA=()=>{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 _={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"},u={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Entrada inválida: se esperaba instanceof ${U.expected}, recibido ${J}`;return`Entrada inválida: se esperaba ${z}, recibido ${J}`}case"invalid_value":if(U.values.length===1)return`Entrada inválida: se esperaba ${b(U.values[0])}`;return`Opción inválida: se esperaba una de ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin),J=u[U.origin]??U.origin;if(g)return`Demasiado grande: se esperaba que ${J??"valor"} tuviera ${z}${U.maximum.toString()} ${g.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${J??"valor"} fuera ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin),J=u[U.origin]??U.origin;if(g)return`Demasiado pequeño: se esperaba que ${J} tuviera ${z}${U.minimum.toString()} ${g.unit}`;return`Demasiado pequeño: se esperaba que ${J} fuera ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Cadena inválida: debe comenzar con "${z.prefix}"`;if(z.format==="ends_with")return`Cadena inválida: debe terminar en "${z.suffix}"`;if(z.format==="includes")return`Cadena inválida: debe incluir "${z.includes}"`;if(z.format==="regex")return`Cadena inválida: debe coincidir con el patrón ${z.pattern}`;return`Inválido ${_[z.format]??U.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${U.divisor}`;case"unrecognized_keys":return`Llave${U.keys.length>1?"s":""} desconocida${U.keys.length>1?"s":""}: ${W(U.keys,", ")}`;case"invalid_key":return`Llave inválida en ${u[U.origin]??U.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${u[U.origin]??U.origin}`;default:return"Entrada inválida"}}};function h8(){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 _={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:"ورودی"},u={nan:"NaN",number:"عدد",array:"آرایه"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`ورودی نامعتبر: میبایست instanceof ${U.expected} میبود، ${J} دریافت شد`;return`ورودی نامعتبر: میبایست ${z} میبود، ${J} دریافت شد`}case"invalid_value":if(U.values.length===1)return`ورودی نامعتبر: میبایست ${b(U.values[0])} میبود`;return`گزینه نامعتبر: میبایست یکی از ${W(U.values,"|")} میبود`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`خیلی بزرگ: ${U.origin??"مقدار"} باید ${z}${U.maximum.toString()} ${g.unit??"عنصر"} باشد`;return`خیلی بزرگ: ${U.origin??"مقدار"} باید ${z}${U.maximum.toString()} باشد`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`خیلی کوچک: ${U.origin} باید ${z}${U.minimum.toString()} ${g.unit} باشد`;return`خیلی کوچک: ${U.origin} باید ${z}${U.minimum.toString()} باشد`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`رشته نامعتبر: باید با "${z.prefix}" شروع شود`;if(z.format==="ends_with")return`رشته نامعتبر: باید با "${z.suffix}" تمام شود`;if(z.format==="includes")return`رشته نامعتبر: باید شامل "${z.includes}" باشد`;if(z.format==="regex")return`رشته نامعتبر: باید با الگوی ${z.pattern} مطابقت داشته باشد`;return`${_[z.format]??U.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${U.divisor} باشد`;case"unrecognized_keys":return`کلید${U.keys.length>1?"های":""} ناشناس: ${W(U.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${U.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${U.origin}`;default:return"ورودی نامعتبر"}}};function d8(){return{localeError:CA()}}var fA=()=>{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 _={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"},u={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Virheellinen tyyppi: odotettiin instanceof ${U.expected}, oli ${J}`;return`Virheellinen tyyppi: odotettiin ${z}, oli ${J}`}case"invalid_value":if(U.values.length===1)return`Virheellinen syöte: täytyy olla ${b(U.values[0])}`;return`Virheellinen valinta: täytyy olla yksi seuraavista: ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`Liian suuri: ${g.subject} täytyy olla ${z}${U.maximum.toString()} ${g.unit}`.trim();return`Liian suuri: arvon täytyy olla ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`Liian pieni: ${g.subject} täytyy olla ${z}${U.minimum.toString()} ${g.unit}`.trim();return`Liian pieni: arvon täytyy olla ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Virheellinen syöte: täytyy alkaa "${z.prefix}"`;if(z.format==="ends_with")return`Virheellinen syöte: täytyy loppua "${z.suffix}"`;if(z.format==="includes")return`Virheellinen syöte: täytyy sisältää "${z.includes}"`;if(z.format==="regex")return`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${z.pattern}`;return`Virheellinen ${_[z.format]??U.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${U.divisor} monikerta`;case"unrecognized_keys":return`${U.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${W(U.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function c8(){return{localeError:fA()}}var xA=()=>{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 _={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"},u={nan:"NaN",number:"nombre",array:"tableau"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Entrée invalide : instanceof ${U.expected} attendu, ${J} reçu`;return`Entrée invalide : ${z} attendu, ${J} reçu`}case"invalid_value":if(U.values.length===1)return`Entrée invalide : ${b(U.values[0])} attendu`;return`Option invalide : une valeur parmi ${W(U.values,"|")} attendue`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`Trop grand : ${U.origin??"valeur"} doit ${g.verb} ${z}${U.maximum.toString()} ${g.unit??"élément(s)"}`;return`Trop grand : ${U.origin??"valeur"} doit être ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`Trop petit : ${U.origin} doit ${g.verb} ${z}${U.minimum.toString()} ${g.unit}`;return`Trop petit : ${U.origin} doit être ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Chaîne invalide : doit commencer par "${z.prefix}"`;if(z.format==="ends_with")return`Chaîne invalide : doit se terminer par "${z.suffix}"`;if(z.format==="includes")return`Chaîne invalide : doit inclure "${z.includes}"`;if(z.format==="regex")return`Chaîne invalide : doit correspondre au modèle ${z.pattern}`;return`${_[z.format]??U.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${U.divisor}`;case"unrecognized_keys":return`Clé${U.keys.length>1?"s":""} non reconnue${U.keys.length>1?"s":""} : ${W(U.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${U.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${U.origin}`;default:return"Entrée invalide"}}};function p8(){return{localeError:xA()}}var kA=()=>{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 _={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"},u={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Entrée invalide : attendu instanceof ${U.expected}, reçu ${J}`;return`Entrée invalide : attendu ${z}, reçu ${J}`}case"invalid_value":if(U.values.length===1)return`Entrée invalide : attendu ${b(U.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"≤":"<",g=I(U.origin);if(g)return`Trop grand : attendu que ${U.origin??"la valeur"} ait ${z}${U.maximum.toString()} ${g.unit}`;return`Trop grand : attendu que ${U.origin??"la valeur"} soit ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?"≥":">",g=I(U.origin);if(g)return`Trop petit : attendu que ${U.origin} ait ${z}${U.minimum.toString()} ${g.unit}`;return`Trop petit : attendu que ${U.origin} soit ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Chaîne invalide : doit commencer par "${z.prefix}"`;if(z.format==="ends_with")return`Chaîne invalide : doit se terminer par "${z.suffix}"`;if(z.format==="includes")return`Chaîne invalide : doit inclure "${z.includes}"`;if(z.format==="regex")return`Chaîne invalide : doit correspondre au motif ${z.pattern}`;return`${_[z.format]??U.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${U.divisor}`;case"unrecognized_keys":return`Clé${U.keys.length>1?"s":""} non reconnue${U.keys.length>1?"s":""} : ${W(U.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${U.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${U.origin}`;default:return"Entrée invalide"}}};function o8(){return{localeError:kA()}}var yA=()=>{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:"גדול"}},_=(q)=>q?$[q]:void 0,u=(q)=>{let N=_(q);if(N)return N.label;return q??$.unknown.label},U=(q)=>`ה${u(q)}`,z=(q)=>{return(_(q)?.gender??"m")==="f"?"צריכה להיות":"צריך להיות"},g=(q)=>{if(!q)return null;return I[q]??null},J={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"}},G={nan:"NaN"};return(q)=>{switch(q.code){case"invalid_type":{let N=q.expected,X=G[N??""]??u(N),Q=j(q.input),H=G[Q]??$[Q]?.label??Q;if(/^[A-Z]/.test(q.expected))return`קלט לא תקין: צריך להיות instanceof ${q.expected}, התקבל ${H}`;return`קלט לא תקין: צריך להיות ${X}, התקבל ${H}`}case"invalid_value":{if(q.values.length===1)return`ערך לא תקין: הערך חייב להיות ${b(q.values[0])}`;let N=q.values.map((H)=>b(H));if(q.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${N[0]} או ${N[1]}`;let X=N[N.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${N.slice(0,-1).join(", ")} או ${X}`}case"too_big":{let N=g(q.origin),X=U(q.origin??"value");if(q.origin==="string")return`${N?.longLabel??"ארוך"} מדי: ${X} צריכה להכיל ${q.maximum.toString()} ${N?.unit??""} ${q.inclusive?"או פחות":"לכל היותר"}`.trim();if(q.origin==="number"){let Y=q.inclusive?`קטן או שווה ל-${q.maximum}`:`קטן מ-${q.maximum}`;return`גדול מדי: ${X} צריך להיות ${Y}`}if(q.origin==="array"||q.origin==="set"){let Y=q.origin==="set"?"צריכה":"צריך",v=q.inclusive?`${q.maximum} ${N?.unit??""} או פחות`:`פחות מ-${q.maximum} ${N?.unit??""}`;return`גדול מדי: ${X} ${Y} להכיל ${v}`.trim()}let Q=q.inclusive?"<=":"<",H=z(q.origin??"value");if(N?.unit)return`${N.longLabel} מדי: ${X} ${H} ${Q}${q.maximum.toString()} ${N.unit}`;return`${N?.longLabel??"גדול"} מדי: ${X} ${H} ${Q}${q.maximum.toString()}`}case"too_small":{let N=g(q.origin),X=U(q.origin??"value");if(q.origin==="string")return`${N?.shortLabel??"קצר"} מדי: ${X} צריכה להכיל ${q.minimum.toString()} ${N?.unit??""} ${q.inclusive?"או יותר":"לפחות"}`.trim();if(q.origin==="number"){let Y=q.inclusive?`גדול או שווה ל-${q.minimum}`:`גדול מ-${q.minimum}`;return`קטן מדי: ${X} צריך להיות ${Y}`}if(q.origin==="array"||q.origin==="set"){let Y=q.origin==="set"?"צריכה":"צריך";if(q.minimum===1&&q.inclusive){let O=q.origin==="set"?"לפחות פריט אחד":"לפחות פריט אחד";return`קטן מדי: ${X} ${Y} להכיל ${O}`}let v=q.inclusive?`${q.minimum} ${N?.unit??""} או יותר`:`יותר מ-${q.minimum} ${N?.unit??""}`;return`קטן מדי: ${X} ${Y} להכיל ${v}`.trim()}let Q=q.inclusive?">=":">",H=z(q.origin??"value");if(N?.unit)return`${N.shortLabel} מדי: ${X} ${H} ${Q}${q.minimum.toString()} ${N.unit}`;return`${N?.shortLabel??"קטן"} מדי: ${X} ${H} ${Q}${q.minimum.toString()}`}case"invalid_format":{let N=q;if(N.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${N.prefix}"`;if(N.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${N.suffix}"`;if(N.format==="includes")return`המחרוזת חייבת לכלול "${N.includes}"`;if(N.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${N.pattern}`;let X=J[N.format],Q=X?.label??N.format,Y=(X?.gender??"m")==="f"?"תקינה":"תקין";return`${Q} לא ${Y}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${q.divisor}`;case"unrecognized_keys":return`מפתח${q.keys.length>1?"ות":""} לא מזוה${q.keys.length>1?"ים":"ה"}: ${W(q.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${U(q.origin??"array")}`;default:return"קלט לא תקין"}}};function t8(){return{localeError:yA()}}var iA=()=>{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 _={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"},u={nan:"NaN",number:"szám",array:"tömb"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Érvénytelen bemenet: a várt érték instanceof ${U.expected}, a kapott érték ${J}`;return`Érvénytelen bemenet: a várt érték ${z}, a kapott érték ${J}`}case"invalid_value":if(U.values.length===1)return`Érvénytelen bemenet: a várt érték ${b(U.values[0])}`;return`Érvénytelen opció: valamelyik érték várt ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`Túl nagy: ${U.origin??"érték"} mérete túl nagy ${z}${U.maximum.toString()} ${g.unit??"elem"}`;return`Túl nagy: a bemeneti érték ${U.origin??"érték"} túl nagy: ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`Túl kicsi: a bemeneti érték ${U.origin} mérete túl kicsi ${z}${U.minimum.toString()} ${g.unit}`;return`Túl kicsi: a bemeneti érték ${U.origin} túl kicsi ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Érvénytelen string: "${z.prefix}" értékkel kell kezdődnie`;if(z.format==="ends_with")return`Érvénytelen string: "${z.suffix}" értékkel kell végződnie`;if(z.format==="includes")return`Érvénytelen string: "${z.includes}" értéket kell tartalmaznia`;if(z.format==="regex")return`Érvénytelen string: ${z.pattern} mintának kell megfelelnie`;return`Érvénytelen ${_[z.format]??U.format}`}case"not_multiple_of":return`Érvénytelen szám: ${U.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${U.keys.length>1?"s":""}: ${W(U.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${U.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${U.origin}`;default:return"Érvénytelen bemenet"}}};function a8(){return{localeError:iA()}}function X7($,I,_){return Math.abs($)===1?I:_}function h1($){if(!$)return"";let I=["ա","ե","ը","ի","ո","ու","օ"],_=$[$.length-1];return $+(I.includes(_)?"ն":"ը")}var lA=()=>{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 _={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:"մուտք"},u={nan:"NaN",number:"թիվ",array:"զանգված"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Սխալ մուտքագրում․ սպասվում էր instanceof ${U.expected}, ստացվել է ${J}`;return`Սխալ մուտքագրում․ սպասվում էր ${z}, ստացվել է ${J}`}case"invalid_value":if(U.values.length===1)return`Սխալ մուտքագրում․ սպասվում էր ${b(U.values[1])}`;return`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g){let J=Number(U.maximum),G=X7(J,g.unit.one,g.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${h1(U.origin??"արժեք")} կունենա ${z}${U.maximum.toString()} ${G}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${h1(U.origin??"արժեք")} լինի ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g){let J=Number(U.minimum),G=X7(J,g.unit.one,g.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${h1(U.origin)} կունենա ${z}${U.minimum.toString()} ${G}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${h1(U.origin)} լինի ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Սխալ տող․ պետք է սկսվի "${z.prefix}"-ով`;if(z.format==="ends_with")return`Սխալ տող․ պետք է ավարտվի "${z.suffix}"-ով`;if(z.format==="includes")return`Սխալ տող․ պետք է պարունակի "${z.includes}"`;if(z.format==="regex")return`Սխալ տող․ պետք է համապատասխանի ${z.pattern} ձևաչափին`;return`Սխալ ${_[z.format]??U.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${U.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${U.keys.length>1?"ներ":""}. ${W(U.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${h1(U.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${h1(U.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};function e8(){return{localeError:lA()}}var mA=()=>{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 _={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"},u={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Input tidak valid: diharapkan instanceof ${U.expected}, diterima ${J}`;return`Input tidak valid: diharapkan ${z}, diterima ${J}`}case"invalid_value":if(U.values.length===1)return`Input tidak valid: diharapkan ${b(U.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`Terlalu besar: diharapkan ${U.origin??"value"} memiliki ${z}${U.maximum.toString()} ${g.unit??"elemen"}`;return`Terlalu besar: diharapkan ${U.origin??"value"} menjadi ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`Terlalu kecil: diharapkan ${U.origin} memiliki ${z}${U.minimum.toString()} ${g.unit}`;return`Terlalu kecil: diharapkan ${U.origin} menjadi ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`String tidak valid: harus dimulai dengan "${z.prefix}"`;if(z.format==="ends_with")return`String tidak valid: harus berakhir dengan "${z.suffix}"`;if(z.format==="includes")return`String tidak valid: harus menyertakan "${z.includes}"`;if(z.format==="regex")return`String tidak valid: harus sesuai pola ${z.pattern}`;return`${_[z.format]??U.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${U.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${U.keys.length>1?"s":""}: ${W(U.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${U.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${U.origin}`;default:return"Input tidak valid"}}};function s8(){return{localeError:mA()}}var rA=()=>{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 _={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"},u={nan:"NaN",number:"númer",array:"fylki"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Rangt gildi: Þú slóst inn ${J} þar sem á að vera instanceof ${U.expected}`;return`Rangt gildi: Þú slóst inn ${J} þar sem á að vera ${z}`}case"invalid_value":if(U.values.length===1)return`Rangt gildi: gert ráð fyrir ${b(U.values[0])}`;return`Ógilt val: má vera eitt af eftirfarandi ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`Of stórt: gert er ráð fyrir að ${U.origin??"gildi"} hafi ${z}${U.maximum.toString()} ${g.unit??"hluti"}`;return`Of stórt: gert er ráð fyrir að ${U.origin??"gildi"} sé ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`Of lítið: gert er ráð fyrir að ${U.origin} hafi ${z}${U.minimum.toString()} ${g.unit}`;return`Of lítið: gert er ráð fyrir að ${U.origin} sé ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Ógildur strengur: verður að byrja á "${z.prefix}"`;if(z.format==="ends_with")return`Ógildur strengur: verður að enda á "${z.suffix}"`;if(z.format==="includes")return`Ógildur strengur: verður að innihalda "${z.includes}"`;if(z.format==="regex")return`Ógildur strengur: verður að fylgja mynstri ${z.pattern}`;return`Rangt ${_[z.format]??U.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${U.divisor}`;case"unrecognized_keys":return`Óþekkt ${U.keys.length>1?"ir lyklar":"ur lykill"}: ${W(U.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${U.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${U.origin}`;default:return"Rangt gildi"}}};function $3(){return{localeError:rA()}}var nA=()=>{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 _={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"},u={nan:"NaN",number:"numero",array:"vettore"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Input non valido: atteso instanceof ${U.expected}, ricevuto ${J}`;return`Input non valido: atteso ${z}, ricevuto ${J}`}case"invalid_value":if(U.values.length===1)return`Input non valido: atteso ${b(U.values[0])}`;return`Opzione non valida: atteso uno tra ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`Troppo grande: ${U.origin??"valore"} deve avere ${z}${U.maximum.toString()} ${g.unit??"elementi"}`;return`Troppo grande: ${U.origin??"valore"} deve essere ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`Troppo piccolo: ${U.origin} deve avere ${z}${U.minimum.toString()} ${g.unit}`;return`Troppo piccolo: ${U.origin} deve essere ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Stringa non valida: deve iniziare con "${z.prefix}"`;if(z.format==="ends_with")return`Stringa non valida: deve terminare con "${z.suffix}"`;if(z.format==="includes")return`Stringa non valida: deve includere "${z.includes}"`;if(z.format==="regex")return`Stringa non valida: deve corrispondere al pattern ${z.pattern}`;return`Invalid ${_[z.format]??U.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${U.divisor}`;case"unrecognized_keys":return`Chiav${U.keys.length>1?"i":"e"} non riconosciut${U.keys.length>1?"e":"a"}: ${W(U.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${U.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${U.origin}`;default:return"Input non valido"}}};function I3(){return{localeError:nA()}}var hA=()=>{let $={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function I(U){return $[U]??null}let _={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:"入力値"},u={nan:"NaN",number:"数値",array:"配列"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`無効な入力: instanceof ${U.expected}が期待されましたが、${J}が入力されました`;return`無効な入力: ${z}が期待されましたが、${J}が入力されました`}case"invalid_value":if(U.values.length===1)return`無効な入力: ${b(U.values[0])}が期待されました`;return`無効な選択: ${W(U.values,"、")}のいずれかである必要があります`;case"too_big":{let z=U.inclusive?"以下である":"より小さい",g=I(U.origin);if(g)return`大きすぎる値: ${U.origin??"値"}は${U.maximum.toString()}${g.unit??"要素"}${z}必要があります`;return`大きすぎる値: ${U.origin??"値"}は${U.maximum.toString()}${z}必要があります`}case"too_small":{let z=U.inclusive?"以上である":"より大きい",g=I(U.origin);if(g)return`小さすぎる値: ${U.origin}は${U.minimum.toString()}${g.unit}${z}必要があります`;return`小さすぎる値: ${U.origin}は${U.minimum.toString()}${z}必要があります`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`無効な文字列: "${z.prefix}"で始まる必要があります`;if(z.format==="ends_with")return`無効な文字列: "${z.suffix}"で終わる必要があります`;if(z.format==="includes")return`無効な文字列: "${z.includes}"を含む必要があります`;if(z.format==="regex")return`無効な文字列: パターン${z.pattern}に一致する必要があります`;return`無効な${_[z.format]??U.format}`}case"not_multiple_of":return`無効な数値: ${U.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${U.keys.length>1?"群":""}: ${W(U.keys,"、")}`;case"invalid_key":return`${U.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${U.origin}内の無効な値`;default:return"無効な入力"}}};function U3(){return{localeError:hA()}}var dA=()=>{let $={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function I(U){return $[U]??null}let _={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:"შეყვანა"},u={nan:"NaN",number:"რიცხვი",string:"სტრინგი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`არასწორი შეყვანა: მოსალოდნელი instanceof ${U.expected}, მიღებული ${J}`;return`არასწორი შეყვანა: მოსალოდნელი ${z}, მიღებული ${J}`}case"invalid_value":if(U.values.length===1)return`არასწორი შეყვანა: მოსალოდნელი ${b(U.values[0])}`;return`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${W(U.values,"|")}-დან`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`ზედმეტად დიდი: მოსალოდნელი ${U.origin??"მნიშვნელობა"} ${g.verb} ${z}${U.maximum.toString()} ${g.unit}`;return`ზედმეტად დიდი: მოსალოდნელი ${U.origin??"მნიშვნელობა"} იყოს ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`ზედმეტად პატარა: მოსალოდნელი ${U.origin} ${g.verb} ${z}${U.minimum.toString()} ${g.unit}`;return`ზედმეტად პატარა: მოსალოდნელი ${U.origin} იყოს ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`არასწორი სტრინგი: უნდა იწყებოდეს "${z.prefix}"-ით`;if(z.format==="ends_with")return`არასწორი სტრინგი: უნდა მთავრდებოდეს "${z.suffix}"-ით`;if(z.format==="includes")return`არასწორი სტრინგი: უნდა შეიცავდეს "${z.includes}"-ს`;if(z.format==="regex")return`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${z.pattern}`;return`არასწორი ${_[z.format]??U.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${U.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${U.keys.length>1?"ები":"ი"}: ${W(U.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${U.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${U.origin}-ში`;default:return"არასწორი შეყვანა"}}};function _3(){return{localeError:dA()}}var cA=()=>{let $={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function I(U){return $[U]??null}let _={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:"ទិន្នន័យបញ្ចូល"},u={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${U.expected} ប៉ុន្តែទទួលបាន ${J}`;return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${z} ប៉ុន្តែទទួលបាន ${J}`}case"invalid_value":if(U.values.length===1)return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${b(U.values[0])}`;return`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`ធំពេក៖ ត្រូវការ ${U.origin??"តម្លៃ"} ${z} ${U.maximum.toString()} ${g.unit??"ធាតុ"}`;return`ធំពេក៖ ត្រូវការ ${U.origin??"តម្លៃ"} ${z} ${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`តូចពេក៖ ត្រូវការ ${U.origin} ${z} ${U.minimum.toString()} ${g.unit}`;return`តូចពេក៖ ត្រូវការ ${U.origin} ${z} ${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${z.prefix}"`;if(z.format==="ends_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${z.suffix}"`;if(z.format==="includes")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${z.includes}"`;if(z.format==="regex")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${z.pattern}`;return`មិនត្រឹមត្រូវ៖ ${_[z.format]??U.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${U.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${W(U.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${U.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${U.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function LI(){return{localeError:cA()}}function u3(){return LI()}var pA=()=>{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 _={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:"입력"},u={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`잘못된 입력: 예상 타입은 instanceof ${U.expected}, 받은 타입은 ${J}입니다`;return`잘못된 입력: 예상 타입은 ${z}, 받은 타입은 ${J}입니다`}case"invalid_value":if(U.values.length===1)return`잘못된 입력: 값은 ${b(U.values[0])} 이어야 합니다`;return`잘못된 옵션: ${W(U.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let z=U.inclusive?"이하":"미만",g=z==="미만"?"이어야 합니다":"여야 합니다",J=I(U.origin),G=J?.unit??"요소";if(J)return`${U.origin??"값"}이 너무 큽니다: ${U.maximum.toString()}${G} ${z}${g}`;return`${U.origin??"값"}이 너무 큽니다: ${U.maximum.toString()} ${z}${g}`}case"too_small":{let z=U.inclusive?"이상":"초과",g=z==="이상"?"이어야 합니다":"여야 합니다",J=I(U.origin),G=J?.unit??"요소";if(J)return`${U.origin??"값"}이 너무 작습니다: ${U.minimum.toString()}${G} ${z}${g}`;return`${U.origin??"값"}이 너무 작습니다: ${U.minimum.toString()} ${z}${g}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`잘못된 문자열: "${z.prefix}"(으)로 시작해야 합니다`;if(z.format==="ends_with")return`잘못된 문자열: "${z.suffix}"(으)로 끝나야 합니다`;if(z.format==="includes")return`잘못된 문자열: "${z.includes}"을(를) 포함해야 합니다`;if(z.format==="regex")return`잘못된 문자열: 정규식 ${z.pattern} 패턴과 일치해야 합니다`;return`잘못된 ${_[z.format]??U.format}`}case"not_multiple_of":return`잘못된 숫자: ${U.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${W(U.keys,", ")}`;case"invalid_key":return`잘못된 키: ${U.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${U.origin}`;default:return"잘못된 입력"}}};function z3(){return{localeError:pA()}}var VI=($)=>{return $.charAt(0).toUpperCase()+$.slice(1)};function N7($){let I=Math.abs($),_=I%10,u=I%100;if(u>=11&&u<=19||_===0)return"many";if(_===1)return"one";return"few"}var oA=()=>{let $={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function I(U,z,g,J){let G=$[U]??null;if(G===null)return G;return{unit:G.unit[z],verb:G.verb[J][g?"inclusive":"notInclusive"]}}let _={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"},u={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Gautas tipas ${J}, o tikėtasi - instanceof ${U.expected}`;return`Gautas tipas ${J}, o tikėtasi - ${z}`}case"invalid_value":if(U.values.length===1)return`Privalo būti ${b(U.values[0])}`;return`Privalo būti vienas iš ${W(U.values,"|")} pasirinkimų`;case"too_big":{let z=u[U.origin]??U.origin,g=I(U.origin,N7(Number(U.maximum)),U.inclusive??!1,"smaller");if(g?.verb)return`${VI(z??U.origin??"reikšmė")} ${g.verb} ${U.maximum.toString()} ${g.unit??"elementų"}`;let J=U.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${VI(z??U.origin??"reikšmė")} turi būti ${J} ${U.maximum.toString()} ${g?.unit}`}case"too_small":{let z=u[U.origin]??U.origin,g=I(U.origin,N7(Number(U.minimum)),U.inclusive??!1,"bigger");if(g?.verb)return`${VI(z??U.origin??"reikšmė")} ${g.verb} ${U.minimum.toString()} ${g.unit??"elementų"}`;let J=U.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${VI(z??U.origin??"reikšmė")} turi būti ${J} ${U.minimum.toString()} ${g?.unit}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Eilutė privalo prasidėti "${z.prefix}"`;if(z.format==="ends_with")return`Eilutė privalo pasibaigti "${z.suffix}"`;if(z.format==="includes")return`Eilutė privalo įtraukti "${z.includes}"`;if(z.format==="regex")return`Eilutė privalo atitikti ${z.pattern}`;return`Neteisingas ${_[z.format]??U.format}`}case"not_multiple_of":return`Skaičius privalo būti ${U.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${U.keys.length>1?"i":"as"} rakt${U.keys.length>1?"ai":"as"}: ${W(U.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{let z=u[U.origin]??U.origin;return`${VI(z??U.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function g3(){return{localeError:oA()}}var tA=()=>{let $={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function I(U){return $[U]??null}let _={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:"внес"},u={nan:"NaN",number:"број",array:"низа"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Грешен внес: се очекува instanceof ${U.expected}, примено ${J}`;return`Грешен внес: се очекува ${z}, примено ${J}`}case"invalid_value":if(U.values.length===1)return`Invalid input: expected ${b(U.values[0])}`;return`Грешана опција: се очекува една ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`Премногу голем: се очекува ${U.origin??"вредноста"} да има ${z}${U.maximum.toString()} ${g.unit??"елементи"}`;return`Премногу голем: се очекува ${U.origin??"вредноста"} да биде ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`Премногу мал: се очекува ${U.origin} да има ${z}${U.minimum.toString()} ${g.unit}`;return`Премногу мал: се очекува ${U.origin} да биде ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Неважечка низа: мора да започнува со "${z.prefix}"`;if(z.format==="ends_with")return`Неважечка низа: мора да завршува со "${z.suffix}"`;if(z.format==="includes")return`Неважечка низа: мора да вклучува "${z.includes}"`;if(z.format==="regex")return`Неважечка низа: мора да одгоара на патернот ${z.pattern}`;return`Invalid ${_[z.format]??U.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${U.divisor}`;case"unrecognized_keys":return`${U.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${W(U.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${U.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${U.origin}`;default:return"Грешен внес"}}};function J3(){return{localeError:tA()}}var aA=()=>{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 _={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"},u={nan:"NaN",number:"nombor"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Input tidak sah: dijangka instanceof ${U.expected}, diterima ${J}`;return`Input tidak sah: dijangka ${z}, diterima ${J}`}case"invalid_value":if(U.values.length===1)return`Input tidak sah: dijangka ${b(U.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`Terlalu besar: dijangka ${U.origin??"nilai"} ${g.verb} ${z}${U.maximum.toString()} ${g.unit??"elemen"}`;return`Terlalu besar: dijangka ${U.origin??"nilai"} adalah ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`Terlalu kecil: dijangka ${U.origin} ${g.verb} ${z}${U.minimum.toString()} ${g.unit}`;return`Terlalu kecil: dijangka ${U.origin} adalah ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`String tidak sah: mesti bermula dengan "${z.prefix}"`;if(z.format==="ends_with")return`String tidak sah: mesti berakhir dengan "${z.suffix}"`;if(z.format==="includes")return`String tidak sah: mesti mengandungi "${z.includes}"`;if(z.format==="regex")return`String tidak sah: mesti sepadan dengan corak ${z.pattern}`;return`${_[z.format]??U.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${U.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${W(U.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${U.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${U.origin}`;default:return"Input tidak sah"}}};function G3(){return{localeError:aA()}}var eA=()=>{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 _={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"},u={nan:"NaN",number:"getal"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Ongeldige invoer: verwacht instanceof ${U.expected}, ontving ${J}`;return`Ongeldige invoer: verwacht ${z}, ontving ${J}`}case"invalid_value":if(U.values.length===1)return`Ongeldige invoer: verwacht ${b(U.values[0])}`;return`Ongeldige optie: verwacht één van ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin),J=U.origin==="date"?"laat":U.origin==="string"?"lang":"groot";if(g)return`Te ${J}: verwacht dat ${U.origin??"waarde"} ${z}${U.maximum.toString()} ${g.unit??"elementen"} ${g.verb}`;return`Te ${J}: verwacht dat ${U.origin??"waarde"} ${z}${U.maximum.toString()} is`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin),J=U.origin==="date"?"vroeg":U.origin==="string"?"kort":"klein";if(g)return`Te ${J}: verwacht dat ${U.origin} ${z}${U.minimum.toString()} ${g.unit} ${g.verb}`;return`Te ${J}: verwacht dat ${U.origin} ${z}${U.minimum.toString()} is`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Ongeldige tekst: moet met "${z.prefix}" beginnen`;if(z.format==="ends_with")return`Ongeldige tekst: moet op "${z.suffix}" eindigen`;if(z.format==="includes")return`Ongeldige tekst: moet "${z.includes}" bevatten`;if(z.format==="regex")return`Ongeldige tekst: moet overeenkomen met patroon ${z.pattern}`;return`Ongeldig: ${_[z.format]??U.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${U.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${U.keys.length>1?"s":""}: ${W(U.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${U.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${U.origin}`;default:return"Ongeldige invoer"}}};function q3(){return{localeError:eA()}}var sA=()=>{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 _={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"},u={nan:"NaN",number:"tall",array:"liste"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Ugyldig input: forventet instanceof ${U.expected}, fikk ${J}`;return`Ugyldig input: forventet ${z}, fikk ${J}`}case"invalid_value":if(U.values.length===1)return`Ugyldig verdi: forventet ${b(U.values[0])}`;return`Ugyldig valg: forventet en av ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`For stor(t): forventet ${U.origin??"value"} til å ha ${z}${U.maximum.toString()} ${g.unit??"elementer"}`;return`For stor(t): forventet ${U.origin??"value"} til å ha ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`For lite(n): forventet ${U.origin} til å ha ${z}${U.minimum.toString()} ${g.unit}`;return`For lite(n): forventet ${U.origin} til å ha ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Ugyldig streng: må starte med "${z.prefix}"`;if(z.format==="ends_with")return`Ugyldig streng: må ende med "${z.suffix}"`;if(z.format==="includes")return`Ugyldig streng: må inneholde "${z.includes}"`;if(z.format==="regex")return`Ugyldig streng: må matche mønsteret ${z.pattern}`;return`Ugyldig ${_[z.format]??U.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${U.divisor}`;case"unrecognized_keys":return`${U.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${W(U.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${U.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${U.origin}`;default:return"Ugyldig input"}}};function X3(){return{localeError:sA()}}var $j=()=>{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 _={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"},u={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Fâsit giren: umulan instanceof ${U.expected}, alınan ${J}`;return`Fâsit giren: umulan ${z}, alınan ${J}`}case"invalid_value":if(U.values.length===1)return`Fâsit giren: umulan ${b(U.values[0])}`;return`Fâsit tercih: mûteberler ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`Fazla büyük: ${U.origin??"value"}, ${z}${U.maximum.toString()} ${g.unit??"elements"} sahip olmalıydı.`;return`Fazla büyük: ${U.origin??"value"}, ${z}${U.maximum.toString()} olmalıydı.`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`Fazla küçük: ${U.origin}, ${z}${U.minimum.toString()} ${g.unit} sahip olmalıydı.`;return`Fazla küçük: ${U.origin}, ${z}${U.minimum.toString()} olmalıydı.`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Fâsit metin: "${z.prefix}" ile başlamalı.`;if(z.format==="ends_with")return`Fâsit metin: "${z.suffix}" ile bitmeli.`;if(z.format==="includes")return`Fâsit metin: "${z.includes}" ihtivâ etmeli.`;if(z.format==="regex")return`Fâsit metin: ${z.pattern} nakşına uymalı.`;return`Fâsit ${_[z.format]??U.format}`}case"not_multiple_of":return`Fâsit sayı: ${U.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${U.keys.length>1?"s":""}: ${W(U.keys,", ")}`;case"invalid_key":return`${U.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${U.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function N3(){return{localeError:$j()}}var Ij=()=>{let $={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function I(U){return $[U]??null}let _={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:"ورودي"},u={nan:"NaN",number:"عدد",array:"ارې"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`ناسم ورودي: باید instanceof ${U.expected} وای, مګر ${J} ترلاسه شو`;return`ناسم ورودي: باید ${z} وای, مګر ${J} ترلاسه شو`}case"invalid_value":if(U.values.length===1)return`ناسم ورودي: باید ${b(U.values[0])} وای`;return`ناسم انتخاب: باید یو له ${W(U.values,"|")} څخه وای`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`ډیر لوی: ${U.origin??"ارزښت"} باید ${z}${U.maximum.toString()} ${g.unit??"عنصرونه"} ولري`;return`ډیر لوی: ${U.origin??"ارزښت"} باید ${z}${U.maximum.toString()} وي`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`ډیر کوچنی: ${U.origin} باید ${z}${U.minimum.toString()} ${g.unit} ولري`;return`ډیر کوچنی: ${U.origin} باید ${z}${U.minimum.toString()} وي`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`ناسم متن: باید د "${z.prefix}" سره پیل شي`;if(z.format==="ends_with")return`ناسم متن: باید د "${z.suffix}" سره پای ته ورسيږي`;if(z.format==="includes")return`ناسم متن: باید "${z.includes}" ولري`;if(z.format==="regex")return`ناسم متن: باید د ${z.pattern} سره مطابقت ولري`;return`${_[z.format]??U.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${U.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${U.keys.length>1?"کلیډونه":"کلیډ"}: ${W(U.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${U.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${U.origin} کې`;default:return"ناسمه ورودي"}}};function Q3(){return{localeError:Ij()}}var Uj=()=>{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 _={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"},u={nan:"NaN",number:"liczba",array:"tablica"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${U.expected}, otrzymano ${J}`;return`Nieprawidłowe dane wejściowe: oczekiwano ${z}, otrzymano ${J}`}case"invalid_value":if(U.values.length===1)return`Nieprawidłowe dane wejściowe: oczekiwano ${b(U.values[0])}`;return`Nieprawidłowa opcja: oczekiwano jednej z wartości ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`Za duża wartość: oczekiwano, że ${U.origin??"wartość"} będzie mieć ${z}${U.maximum.toString()} ${g.unit??"elementów"}`;return`Zbyt duż(y/a/e): oczekiwano, że ${U.origin??"wartość"} będzie wynosić ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`Za mała wartość: oczekiwano, że ${U.origin??"wartość"} będzie mieć ${z}${U.minimum.toString()} ${g.unit??"elementów"}`;return`Zbyt mał(y/a/e): oczekiwano, że ${U.origin??"wartość"} będzie wynosić ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Nieprawidłowy ciąg znaków: musi zaczynać się od "${z.prefix}"`;if(z.format==="ends_with")return`Nieprawidłowy ciąg znaków: musi kończyć się na "${z.suffix}"`;if(z.format==="includes")return`Nieprawidłowy ciąg znaków: musi zawierać "${z.includes}"`;if(z.format==="regex")return`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${z.pattern}`;return`Nieprawidłow(y/a/e) ${_[z.format]??U.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${U.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${U.keys.length>1?"s":""}: ${W(U.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${U.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${U.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function v3(){return{localeError:Uj()}}var _j=()=>{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 _={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"},u={nan:"NaN",number:"número",null:"nulo"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Tipo inválido: esperado instanceof ${U.expected}, recebido ${J}`;return`Tipo inválido: esperado ${z}, recebido ${J}`}case"invalid_value":if(U.values.length===1)return`Entrada inválida: esperado ${b(U.values[0])}`;return`Opção inválida: esperada uma das ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`Muito grande: esperado que ${U.origin??"valor"} tivesse ${z}${U.maximum.toString()} ${g.unit??"elementos"}`;return`Muito grande: esperado que ${U.origin??"valor"} fosse ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`Muito pequeno: esperado que ${U.origin} tivesse ${z}${U.minimum.toString()} ${g.unit}`;return`Muito pequeno: esperado que ${U.origin} fosse ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Texto inválido: deve começar com "${z.prefix}"`;if(z.format==="ends_with")return`Texto inválido: deve terminar com "${z.suffix}"`;if(z.format==="includes")return`Texto inválido: deve incluir "${z.includes}"`;if(z.format==="regex")return`Texto inválido: deve corresponder ao padrão ${z.pattern}`;return`${_[z.format]??U.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${U.divisor}`;case"unrecognized_keys":return`Chave${U.keys.length>1?"s":""} desconhecida${U.keys.length>1?"s":""}: ${W(U.keys,", ")}`;case"invalid_key":return`Chave inválida em ${U.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${U.origin}`;default:return"Campo inválido"}}};function H3(){return{localeError:_j()}}function Q7($,I,_,u){let U=Math.abs($),z=U%10,g=U%100;if(g>=11&&g<=19)return u;if(z===1)return I;if(z>=2&&z<=4)return _;return u}var uj=()=>{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 _={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:"ввод"},u={nan:"NaN",number:"число",array:"массив"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Неверный ввод: ожидалось instanceof ${U.expected}, получено ${J}`;return`Неверный ввод: ожидалось ${z}, получено ${J}`}case"invalid_value":if(U.values.length===1)return`Неверный ввод: ожидалось ${b(U.values[0])}`;return`Неверный вариант: ожидалось одно из ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g){let J=Number(U.maximum),G=Q7(J,g.unit.one,g.unit.few,g.unit.many);return`Слишком большое значение: ожидалось, что ${U.origin??"значение"} будет иметь ${z}${U.maximum.toString()} ${G}`}return`Слишком большое значение: ожидалось, что ${U.origin??"значение"} будет ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g){let J=Number(U.minimum),G=Q7(J,g.unit.one,g.unit.few,g.unit.many);return`Слишком маленькое значение: ожидалось, что ${U.origin} будет иметь ${z}${U.minimum.toString()} ${G}`}return`Слишком маленькое значение: ожидалось, что ${U.origin} будет ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Неверная строка: должна начинаться с "${z.prefix}"`;if(z.format==="ends_with")return`Неверная строка: должна заканчиваться на "${z.suffix}"`;if(z.format==="includes")return`Неверная строка: должна содержать "${z.includes}"`;if(z.format==="regex")return`Неверная строка: должна соответствовать шаблону ${z.pattern}`;return`Неверный ${_[z.format]??U.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${U.divisor}`;case"unrecognized_keys":return`Нераспознанн${U.keys.length>1?"ые":"ый"} ключ${U.keys.length>1?"и":""}: ${W(U.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${U.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${U.origin}`;default:return"Неверные входные данные"}}};function Y3(){return{localeError:uj()}}var zj=()=>{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 _={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"},u={nan:"NaN",number:"število",array:"tabela"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Neveljaven vnos: pričakovano instanceof ${U.expected}, prejeto ${J}`;return`Neveljaven vnos: pričakovano ${z}, prejeto ${J}`}case"invalid_value":if(U.values.length===1)return`Neveljaven vnos: pričakovano ${b(U.values[0])}`;return`Neveljavna možnost: pričakovano eno izmed ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`Preveliko: pričakovano, da bo ${U.origin??"vrednost"} imelo ${z}${U.maximum.toString()} ${g.unit??"elementov"}`;return`Preveliko: pričakovano, da bo ${U.origin??"vrednost"} ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`Premajhno: pričakovano, da bo ${U.origin} imelo ${z}${U.minimum.toString()} ${g.unit}`;return`Premajhno: pričakovano, da bo ${U.origin} ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Neveljaven niz: mora se začeti z "${z.prefix}"`;if(z.format==="ends_with")return`Neveljaven niz: mora se končati z "${z.suffix}"`;if(z.format==="includes")return`Neveljaven niz: mora vsebovati "${z.includes}"`;if(z.format==="regex")return`Neveljaven niz: mora ustrezati vzorcu ${z.pattern}`;return`Neveljaven ${_[z.format]??U.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${U.divisor}`;case"unrecognized_keys":return`Neprepoznan${U.keys.length>1?"i ključi":" ključ"}: ${W(U.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${U.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${U.origin}`;default:return"Neveljaven vnos"}}};function O3(){return{localeError:zj()}}var gj=()=>{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 _={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"},u={nan:"NaN",number:"antal",array:"lista"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Ogiltig inmatning: förväntat instanceof ${U.expected}, fick ${J}`;return`Ogiltig inmatning: förväntat ${z}, fick ${J}`}case"invalid_value":if(U.values.length===1)return`Ogiltig inmatning: förväntat ${b(U.values[0])}`;return`Ogiltigt val: förväntade en av ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`För stor(t): förväntade ${U.origin??"värdet"} att ha ${z}${U.maximum.toString()} ${g.unit??"element"}`;return`För stor(t): förväntat ${U.origin??"värdet"} att ha ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`För lite(t): förväntade ${U.origin??"värdet"} att ha ${z}${U.minimum.toString()} ${g.unit}`;return`För lite(t): förväntade ${U.origin??"värdet"} att ha ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Ogiltig sträng: måste börja med "${z.prefix}"`;if(z.format==="ends_with")return`Ogiltig sträng: måste sluta med "${z.suffix}"`;if(z.format==="includes")return`Ogiltig sträng: måste innehålla "${z.includes}"`;if(z.format==="regex")return`Ogiltig sträng: måste matcha mönstret "${z.pattern}"`;return`Ogiltig(t) ${_[z.format]??U.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${U.divisor}`;case"unrecognized_keys":return`${U.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${W(U.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${U.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${U.origin??"värdet"}`;default:return"Ogiltig input"}}};function T3(){return{localeError:gj()}}var Jj=()=>{let $={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function I(U){return $[U]??null}let _={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"},u={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${U.expected}, பெறப்பட்டது ${J}`;return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${z}, பெறப்பட்டது ${J}`}case"invalid_value":if(U.values.length===1)return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${b(U.values[0])}`;return`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${W(U.values,"|")} இல் ஒன்று`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${U.origin??"மதிப்பு"} ${z}${U.maximum.toString()} ${g.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`;return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${U.origin??"மதிப்பு"} ${z}${U.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${U.origin} ${z}${U.minimum.toString()} ${g.unit} ஆக இருக்க வேண்டும்`;return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${U.origin} ${z}${U.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`தவறான சரம்: "${z.prefix}" இல் தொடங்க வேண்டும்`;if(z.format==="ends_with")return`தவறான சரம்: "${z.suffix}" இல் முடிவடைய வேண்டும்`;if(z.format==="includes")return`தவறான சரம்: "${z.includes}" ஐ உள்ளடக்க வேண்டும்`;if(z.format==="regex")return`தவறான சரம்: ${z.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;return`தவறான ${_[z.format]??U.format}`}case"not_multiple_of":return`தவறான எண்: ${U.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${U.keys.length>1?"கள்":""}: ${W(U.keys,", ")}`;case"invalid_key":return`${U.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${U.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function B3(){return{localeError:Jj()}}var Gj=()=>{let $={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function I(U){return $[U]??null}let _={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:"ข้อมูลที่ป้อน"},u={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${U.expected} แต่ได้รับ ${J}`;return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${z} แต่ได้รับ ${J}`}case"invalid_value":if(U.values.length===1)return`ค่าไม่ถูกต้อง: ควรเป็น ${b(U.values[0])}`;return`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"ไม่เกิน":"น้อยกว่า",g=I(U.origin);if(g)return`เกินกำหนด: ${U.origin??"ค่า"} ควรมี${z} ${U.maximum.toString()} ${g.unit??"รายการ"}`;return`เกินกำหนด: ${U.origin??"ค่า"} ควรมี${z} ${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?"อย่างน้อย":"มากกว่า",g=I(U.origin);if(g)return`น้อยกว่ากำหนด: ${U.origin} ควรมี${z} ${U.minimum.toString()} ${g.unit}`;return`น้อยกว่ากำหนด: ${U.origin} ควรมี${z} ${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${z.prefix}"`;if(z.format==="ends_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${z.suffix}"`;if(z.format==="includes")return`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${z.includes}" อยู่ในข้อความ`;if(z.format==="regex")return`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${z.pattern}`;return`รูปแบบไม่ถูกต้อง: ${_[z.format]??U.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${U.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${W(U.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${U.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${U.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function M3(){return{localeError:Gj()}}var qj=()=>{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 _={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"},u={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Geçersiz değer: beklenen instanceof ${U.expected}, alınan ${J}`;return`Geçersiz değer: beklenen ${z}, alınan ${J}`}case"invalid_value":if(U.values.length===1)return`Geçersiz değer: beklenen ${b(U.values[0])}`;return`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`Çok büyük: beklenen ${U.origin??"değer"} ${z}${U.maximum.toString()} ${g.unit??"öğe"}`;return`Çok büyük: beklenen ${U.origin??"değer"} ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`Çok küçük: beklenen ${U.origin} ${z}${U.minimum.toString()} ${g.unit}`;return`Çok küçük: beklenen ${U.origin} ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Geçersiz metin: "${z.prefix}" ile başlamalı`;if(z.format==="ends_with")return`Geçersiz metin: "${z.suffix}" ile bitmeli`;if(z.format==="includes")return`Geçersiz metin: "${z.includes}" içermeli`;if(z.format==="regex")return`Geçersiz metin: ${z.pattern} desenine uymalı`;return`Geçersiz ${_[z.format]??U.format}`}case"not_multiple_of":return`Geçersiz sayı: ${U.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${U.keys.length>1?"lar":""}: ${W(U.keys,", ")}`;case"invalid_key":return`${U.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${U.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function K3(){return{localeError:qj()}}var Xj=()=>{let $={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function I(U){return $[U]??null}let _={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:"вхідні дані"},u={nan:"NaN",number:"число",array:"масив"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Неправильні вхідні дані: очікується instanceof ${U.expected}, отримано ${J}`;return`Неправильні вхідні дані: очікується ${z}, отримано ${J}`}case"invalid_value":if(U.values.length===1)return`Неправильні вхідні дані: очікується ${b(U.values[0])}`;return`Неправильна опція: очікується одне з ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`Занадто велике: очікується, що ${U.origin??"значення"} ${g.verb} ${z}${U.maximum.toString()} ${g.unit??"елементів"}`;return`Занадто велике: очікується, що ${U.origin??"значення"} буде ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`Занадто мале: очікується, що ${U.origin} ${g.verb} ${z}${U.minimum.toString()} ${g.unit}`;return`Занадто мале: очікується, що ${U.origin} буде ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Неправильний рядок: повинен починатися з "${z.prefix}"`;if(z.format==="ends_with")return`Неправильний рядок: повинен закінчуватися на "${z.suffix}"`;if(z.format==="includes")return`Неправильний рядок: повинен містити "${z.includes}"`;if(z.format==="regex")return`Неправильний рядок: повинен відповідати шаблону ${z.pattern}`;return`Неправильний ${_[z.format]??U.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${U.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${U.keys.length>1?"і":""}: ${W(U.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${U.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${U.origin}`;default:return"Неправильні вхідні дані"}}};function ZI(){return{localeError:Xj()}}function D3(){return ZI()}var Nj=()=>{let $={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function I(U){return $[U]??null}let _={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:"ان پٹ"},u={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`غلط ان پٹ: instanceof ${U.expected} متوقع تھا، ${J} موصول ہوا`;return`غلط ان پٹ: ${z} متوقع تھا، ${J} موصول ہوا`}case"invalid_value":if(U.values.length===1)return`غلط ان پٹ: ${b(U.values[0])} متوقع تھا`;return`غلط آپشن: ${W(U.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`بہت بڑا: ${U.origin??"ویلیو"} کے ${z}${U.maximum.toString()} ${g.unit??"عناصر"} ہونے متوقع تھے`;return`بہت بڑا: ${U.origin??"ویلیو"} کا ${z}${U.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`بہت چھوٹا: ${U.origin} کے ${z}${U.minimum.toString()} ${g.unit} ہونے متوقع تھے`;return`بہت چھوٹا: ${U.origin} کا ${z}${U.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`غلط سٹرنگ: "${z.prefix}" سے شروع ہونا چاہیے`;if(z.format==="ends_with")return`غلط سٹرنگ: "${z.suffix}" پر ختم ہونا چاہیے`;if(z.format==="includes")return`غلط سٹرنگ: "${z.includes}" شامل ہونا چاہیے`;if(z.format==="regex")return`غلط سٹرنگ: پیٹرن ${z.pattern} سے میچ ہونا چاہیے`;return`غلط ${_[z.format]??U.format}`}case"not_multiple_of":return`غلط نمبر: ${U.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${U.keys.length>1?"ز":""}: ${W(U.keys,"، ")}`;case"invalid_key":return`${U.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${U.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function L3(){return{localeError:Nj()}}var Qj=()=>{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 _={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"},u={nan:"NaN",number:"raqam",array:"massiv"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Noto‘g‘ri kirish: kutilgan instanceof ${U.expected}, qabul qilingan ${J}`;return`Noto‘g‘ri kirish: kutilgan ${z}, qabul qilingan ${J}`}case"invalid_value":if(U.values.length===1)return`Noto‘g‘ri kirish: kutilgan ${b(U.values[0])}`;return`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`Juda katta: kutilgan ${U.origin??"qiymat"} ${z}${U.maximum.toString()} ${g.unit} ${g.verb}`;return`Juda katta: kutilgan ${U.origin??"qiymat"} ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`Juda kichik: kutilgan ${U.origin} ${z}${U.minimum.toString()} ${g.unit} ${g.verb}`;return`Juda kichik: kutilgan ${U.origin} ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Noto‘g‘ri satr: "${z.prefix}" bilan boshlanishi kerak`;if(z.format==="ends_with")return`Noto‘g‘ri satr: "${z.suffix}" bilan tugashi kerak`;if(z.format==="includes")return`Noto‘g‘ri satr: "${z.includes}" ni o‘z ichiga olishi kerak`;if(z.format==="regex")return`Noto‘g‘ri satr: ${z.pattern} shabloniga mos kelishi kerak`;return`Noto‘g‘ri ${_[z.format]??U.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${U.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${U.keys.length>1?"lar":""}: ${W(U.keys,", ")}`;case"invalid_key":return`${U.origin} dagi kalit noto‘g‘ri`;case"invalid_union":return"Noto‘g‘ri kirish";case"invalid_element":return`${U.origin} da noto‘g‘ri qiymat`;default:return"Noto‘g‘ri kirish"}}};function V3(){return{localeError:Qj()}}var vj=()=>{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 _={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"},u={nan:"NaN",number:"số",array:"mảng"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Đầu vào không hợp lệ: mong đợi instanceof ${U.expected}, nhận được ${J}`;return`Đầu vào không hợp lệ: mong đợi ${z}, nhận được ${J}`}case"invalid_value":if(U.values.length===1)return`Đầu vào không hợp lệ: mong đợi ${b(U.values[0])}`;return`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`Quá lớn: mong đợi ${U.origin??"giá trị"} ${g.verb} ${z}${U.maximum.toString()} ${g.unit??"phần tử"}`;return`Quá lớn: mong đợi ${U.origin??"giá trị"} ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`Quá nhỏ: mong đợi ${U.origin} ${g.verb} ${z}${U.minimum.toString()} ${g.unit}`;return`Quá nhỏ: mong đợi ${U.origin} ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Chuỗi không hợp lệ: phải bắt đầu bằng "${z.prefix}"`;if(z.format==="ends_with")return`Chuỗi không hợp lệ: phải kết thúc bằng "${z.suffix}"`;if(z.format==="includes")return`Chuỗi không hợp lệ: phải bao gồm "${z.includes}"`;if(z.format==="regex")return`Chuỗi không hợp lệ: phải khớp với mẫu ${z.pattern}`;return`${_[z.format]??U.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${U.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${W(U.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${U.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${U.origin}`;default:return"Đầu vào không hợp lệ"}}};function Z3(){return{localeError:vj()}}var Hj=()=>{let $={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function I(U){return $[U]??null}let _={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:"输入"},u={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`无效输入:期望 instanceof ${U.expected},实际接收 ${J}`;return`无效输入:期望 ${z},实际接收 ${J}`}case"invalid_value":if(U.values.length===1)return`无效输入:期望 ${b(U.values[0])}`;return`无效选项:期望以下之一 ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`数值过大:期望 ${U.origin??"值"} ${z}${U.maximum.toString()} ${g.unit??"个元素"}`;return`数值过大:期望 ${U.origin??"值"} ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`数值过小:期望 ${U.origin} ${z}${U.minimum.toString()} ${g.unit}`;return`数值过小:期望 ${U.origin} ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`无效字符串:必须以 "${z.prefix}" 开头`;if(z.format==="ends_with")return`无效字符串:必须以 "${z.suffix}" 结尾`;if(z.format==="includes")return`无效字符串:必须包含 "${z.includes}"`;if(z.format==="regex")return`无效字符串:必须满足正则表达式 ${z.pattern}`;return`无效${_[z.format]??U.format}`}case"not_multiple_of":return`无效数字:必须是 ${U.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${W(U.keys,", ")}`;case"invalid_key":return`${U.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${U.origin} 中包含无效值(value)`;default:return"无效输入"}}};function W3(){return{localeError:Hj()}}var Yj=()=>{let $={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function I(U){return $[U]??null}let _={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:"輸入"},u={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`無效的輸入值:預期為 instanceof ${U.expected},但收到 ${J}`;return`無效的輸入值:預期為 ${z},但收到 ${J}`}case"invalid_value":if(U.values.length===1)return`無效的輸入值:預期為 ${b(U.values[0])}`;return`無效的選項:預期為以下其中之一 ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`數值過大:預期 ${U.origin??"值"} 應為 ${z}${U.maximum.toString()} ${g.unit??"個元素"}`;return`數值過大:預期 ${U.origin??"值"} 應為 ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`數值過小:預期 ${U.origin} 應為 ${z}${U.minimum.toString()} ${g.unit}`;return`數值過小:預期 ${U.origin} 應為 ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`無效的字串:必須以 "${z.prefix}" 開頭`;if(z.format==="ends_with")return`無效的字串:必須以 "${z.suffix}" 結尾`;if(z.format==="includes")return`無效的字串:必須包含 "${z.includes}"`;if(z.format==="regex")return`無效的字串:必須符合格式 ${z.pattern}`;return`無效的 ${_[z.format]??U.format}`}case"not_multiple_of":return`無效的數字:必須為 ${U.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${U.keys.length>1?"們":""}:${W(U.keys,"、")}`;case"invalid_key":return`${U.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${U.origin} 中有無效的值`;default:return"無效的輸入值"}}};function R3(){return{localeError:Yj()}}var Oj=()=>{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 _={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é"},u={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,g=j(U.input),J=u[g]??g;if(/^[A-Z]/.test(U.expected))return`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${U.expected}, àmọ̀ a rí ${J}`;return`Ìbáwọlé aṣìṣe: a ní láti fi ${z}, àmọ̀ a rí ${J}`}case"invalid_value":if(U.values.length===1)return`Ìbáwọlé aṣìṣe: a ní láti fi ${b(U.values[0])}`;return`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${W(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",g=I(U.origin);if(g)return`Tó pọ̀ jù: a ní láti jẹ́ pé ${U.origin??"iye"} ${g.verb} ${z}${U.maximum} ${g.unit}`;return`Tó pọ̀ jù: a ní láti jẹ́ ${z}${U.maximum}`}case"too_small":{let z=U.inclusive?">=":">",g=I(U.origin);if(g)return`Kéré ju: a ní láti jẹ́ pé ${U.origin} ${g.verb} ${z}${U.minimum} ${g.unit}`;return`Kéré ju: a ní láti jẹ́ ${z}${U.minimum}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${z.prefix}"`;if(z.format==="ends_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${z.suffix}"`;if(z.format==="includes")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${z.includes}"`;if(z.format==="regex")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${z.pattern}`;return`Aṣìṣe: ${_[z.format]??U.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${U.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${W(U.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${U.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${U.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function P3(){return{localeError:Oj()}}var v7,b3=Symbol("ZodOutput"),A3=Symbol("ZodInput");class j3{constructor(){this._map=new WeakMap,this._idmap=new Map}add($,...I){let _=I[0];if(this._map.set($,_),_&&typeof _==="object"&&"id"in _)this._idmap.set(_.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 _={...this.get(I)??{}};delete _.id;let u={..._,...this._map.get($)};return Object.keys(u).length?u:void 0}return this._map.get($)}has($){return this._map.has($)}}function S_(){return new j3}(v7=globalThis).__zod_globalRegistry??(v7.__zod_globalRegistry=S_());var S$=globalThis.__zod_globalRegistry;function F3($,I){return new $({type:"string",...E(I)})}function S3($,I){return new $({type:"string",coerce:!0,...E(I)})}function w_($,I){return new $({type:"string",format:"email",check:"string_format",abort:!1,...E(I)})}function RI($,I){return new $({type:"string",format:"guid",check:"string_format",abort:!1,...E(I)})}function E_($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,...E(I)})}function C_($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...E(I)})}function f_($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...E(I)})}function x_($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...E(I)})}function PI($,I){return new $({type:"string",format:"url",check:"string_format",abort:!1,...E(I)})}function k_($,I){return new $({type:"string",format:"emoji",check:"string_format",abort:!1,...E(I)})}function y_($,I){return new $({type:"string",format:"nanoid",check:"string_format",abort:!1,...E(I)})}function i_($,I){return new $({type:"string",format:"cuid",check:"string_format",abort:!1,...E(I)})}function l_($,I){return new $({type:"string",format:"cuid2",check:"string_format",abort:!1,...E(I)})}function m_($,I){return new $({type:"string",format:"ulid",check:"string_format",abort:!1,...E(I)})}function r_($,I){return new $({type:"string",format:"xid",check:"string_format",abort:!1,...E(I)})}function n_($,I){return new $({type:"string",format:"ksuid",check:"string_format",abort:!1,...E(I)})}function h_($,I){return new $({type:"string",format:"ipv4",check:"string_format",abort:!1,...E(I)})}function d_($,I){return new $({type:"string",format:"ipv6",check:"string_format",abort:!1,...E(I)})}function w3($,I){return new $({type:"string",format:"mac",check:"string_format",abort:!1,...E(I)})}function c_($,I){return new $({type:"string",format:"cidrv4",check:"string_format",abort:!1,...E(I)})}function p_($,I){return new $({type:"string",format:"cidrv6",check:"string_format",abort:!1,...E(I)})}function o_($,I){return new $({type:"string",format:"base64",check:"string_format",abort:!1,...E(I)})}function t_($,I){return new $({type:"string",format:"base64url",check:"string_format",abort:!1,...E(I)})}function a_($,I){return new $({type:"string",format:"e164",check:"string_format",abort:!1,...E(I)})}function e_($,I){return new $({type:"string",format:"jwt",check:"string_format",abort:!1,...E(I)})}var E3={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function C3($,I){return new $({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...E(I)})}function f3($,I){return new $({type:"string",format:"date",check:"string_format",...E(I)})}function x3($,I){return new $({type:"string",format:"time",check:"string_format",precision:null,...E(I)})}function k3($,I){return new $({type:"string",format:"duration",check:"string_format",...E(I)})}function y3($,I){return new $({type:"number",checks:[],...E(I)})}function i3($,I){return new $({type:"number",coerce:!0,checks:[],...E(I)})}function l3($,I){return new $({type:"number",check:"number_format",abort:!1,format:"safeint",...E(I)})}function m3($,I){return new $({type:"number",check:"number_format",abort:!1,format:"float32",...E(I)})}function r3($,I){return new $({type:"number",check:"number_format",abort:!1,format:"float64",...E(I)})}function n3($,I){return new $({type:"number",check:"number_format",abort:!1,format:"int32",...E(I)})}function h3($,I){return new $({type:"number",check:"number_format",abort:!1,format:"uint32",...E(I)})}function d3($,I){return new $({type:"boolean",...E(I)})}function c3($,I){return new $({type:"boolean",coerce:!0,...E(I)})}function p3($,I){return new $({type:"bigint",...E(I)})}function o3($,I){return new $({type:"bigint",coerce:!0,...E(I)})}function t3($,I){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...E(I)})}function a3($,I){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...E(I)})}function e3($,I){return new $({type:"symbol",...E(I)})}function s3($,I){return new $({type:"undefined",...E(I)})}function $9($,I){return new $({type:"null",...E(I)})}function I9($){return new $({type:"any"})}function U9($){return new $({type:"unknown"})}function _9($,I){return new $({type:"never",...E(I)})}function u9($,I){return new $({type:"void",...E(I)})}function z9($,I){return new $({type:"date",...E(I)})}function g9($,I){return new $({type:"date",coerce:!0,...E(I)})}function J9($,I){return new $({type:"nan",...E(I)})}function f4($,I){return new K_({check:"less_than",...E(I),value:$,inclusive:!1})}function _4($,I){return new K_({check:"less_than",...E(I),value:$,inclusive:!0})}function x4($,I){return new D_({check:"greater_than",...E(I),value:$,inclusive:!1})}function l$($,I){return new D_({check:"greater_than",...E(I),value:$,inclusive:!0})}function s_($){return x4(0,$)}function $2($){return f4(0,$)}function I2($){return _4(0,$)}function U2($){return l$(0,$)}function Z6($,I){return new JJ({check:"multiple_of",...E(I),value:$})}function W6($,I){return new XJ({check:"max_size",...E(I),maximum:$})}function k4($,I){return new NJ({check:"min_size",...E(I),minimum:$})}function $1($,I){return new QJ({check:"size_equals",...E(I),size:$})}function I1($,I){return new vJ({check:"max_length",...E(I),maximum:$})}function e4($,I){return new HJ({check:"min_length",...E(I),minimum:$})}function U1($,I){return new YJ({check:"length_equals",...E(I),length:$})}function d1($,I){return new OJ({check:"string_format",format:"regex",...E(I),pattern:$})}function c1($){return new TJ({check:"string_format",format:"lowercase",...E($)})}function p1($){return new BJ({check:"string_format",format:"uppercase",...E($)})}function o1($,I){return new MJ({check:"string_format",format:"includes",...E(I),includes:$})}function t1($,I){return new KJ({check:"string_format",format:"starts_with",...E(I),prefix:$})}function a1($,I){return new DJ({check:"string_format",format:"ends_with",...E(I),suffix:$})}function _2($,I,_){return new LJ({check:"property",property:$,schema:I,...E(_)})}function e1($,I){return new VJ({check:"mime_type",mime:$,...E(I)})}function D4($){return new ZJ({check:"overwrite",tx:$})}function s1($){return D4((I)=>I.normalize($))}function $0(){return D4(($)=>$.trim())}function I0(){return D4(($)=>$.toLowerCase())}function U0(){return D4(($)=>$.toUpperCase())}function _0(){return D4(($)=>Lg($))}function G9($,I,_){return new $({type:"array",element:I,...E(_)})}function Bj($,I,_){return new $({type:"union",options:I,...E(_)})}function Mj($,I,_){return new $({type:"union",options:I,inclusive:!1,...E(_)})}function Kj($,I,_,u){return new $({type:"union",options:_,discriminator:I,...E(u)})}function Dj($,I,_){return new $({type:"intersection",left:I,right:_})}function Lj($,I,_,u){let U=_ instanceof d;return new $({type:"tuple",items:I,rest:U?_:null,...E(U?u:_)})}function Vj($,I,_,u){return new $({type:"record",keyType:I,valueType:_,...E(u)})}function Zj($,I,_,u){return new $({type:"map",keyType:I,valueType:_,...E(u)})}function Wj($,I,_){return new $({type:"set",valueType:I,...E(_)})}function Rj($,I,_){let u=Array.isArray(I)?Object.fromEntries(I.map((U)=>[U,U])):I;return new $({type:"enum",entries:u,...E(_)})}function Pj($,I,_){return new $({type:"enum",entries:I,...E(_)})}function bj($,I,_){return new $({type:"literal",values:Array.isArray(I)?I:[I],...E(_)})}function q9($,I){return new $({type:"file",...E(I)})}function Aj($,I){return new $({type:"transform",transform:I})}function jj($,I){return new $({type:"optional",innerType:I})}function Fj($,I){return new $({type:"nullable",innerType:I})}function Sj($,I,_){return new $({type:"default",innerType:I,get defaultValue(){return typeof _==="function"?_():Zg(_)}})}function wj($,I,_){return new $({type:"nonoptional",innerType:I,...E(_)})}function Ej($,I){return new $({type:"success",innerType:I})}function Cj($,I,_){return new $({type:"catch",innerType:I,catchValue:typeof _==="function"?_:()=>_})}function fj($,I,_){return new $({type:"pipe",in:I,out:_})}function xj($,I){return new $({type:"readonly",innerType:I})}function kj($,I,_){return new $({type:"template_literal",parts:I,...E(_)})}function yj($,I){return new $({type:"lazy",getter:I})}function ij($,I){return new $({type:"promise",innerType:I})}function X9($,I,_){let u=E(_);return u.abort??(u.abort=!0),new $({type:"custom",check:"custom",fn:I,...u})}function N9($,I,_){return new $({type:"custom",check:"custom",fn:I,...E(_)})}function Q9($){let I=H7((_)=>{return _.addIssue=(u)=>{if(typeof u==="string")_.issues.push(y1(u,_.value,I._zod.def));else{let U=u;if(U.fatal)U.continue=!1;U.code??(U.code="custom"),U.input??(U.input=_.value),U.inst??(U.inst=I),U.continue??(U.continue=!I._zod.def.abort),_.issues.push(y1(U))}},$(_.value,_)});return I}function H7($,I){let _=new X$({check:"custom",...E(I)});return _._zod.check=$,_}function v9($){let I=new X$({check:"describe"});return I._zod.onattach=[(_)=>{let u=S$.get(_)??{};S$.add(_,{...u,description:$})}],I._zod.check=()=>{},I}function H9($){let I=new X$({check:"meta"});return I._zod.onattach=[(_)=>{let u=S$.get(_)??{};S$.add(_,{...u,...$})}],I._zod.check=()=>{},I}function Y9($,I){let _=E(I),u=_.truthy??["true","1","yes","on","y","enabled"],U=_.falsy??["false","0","no","off","n","disabled"];if(_.case!=="sensitive")u=u.map((H)=>typeof H==="string"?H.toLowerCase():H),U=U.map((H)=>typeof H==="string"?H.toLowerCase():H);let z=new Set(u),g=new Set(U),J=$.Codec??KI,G=$.Boolean??BI,N=new($.String??s6)({type:"string",error:_.error}),X=new G({type:"boolean",error:_.error}),Q=new J({type:"pipe",in:N,out:X,transform:(H,Y)=>{let v=H;if(_.case!=="sensitive")v=v.toLowerCase();if(z.has(v))return!0;else if(g.has(v))return!1;else return Y.issues.push({code:"invalid_value",expected:"stringbool",values:[...z,...g],input:Y.value,inst:Q,continue:!1}),{}},reverseTransform:(H,Y)=>{if(H===!0)return u[0]||"true";else return U[0]||"false"},error:_.error});return Q}function u0($,I,_,u={}){let U=E(u),z={...E(u),check:"string_format",type:"string",format:I,fn:typeof _==="function"?_:(J)=>_.test(J),...U};if(_ instanceof RegExp)z.pattern=_;return new $(z)}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??S$,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 u$($,I,_={path:[],schemaPath:[]}){var u;let U=$._zod.def,z=I.seen.get($);if(z){if(z.count++,_.schemaPath.includes($))z.cycle=_.path;return z.schema}let g={schema:{},count:1,cycle:void 0,path:_.path};I.seen.set($,g);let J=$._zod.toJSONSchema?.();if(J)g.schema=J;else{let N={..._,schemaPath:[..._.schemaPath,$],path:_.path};if($._zod.processJSONSchema)$._zod.processJSONSchema(I,g.schema,N);else{let Q=g.schema,H=I.processors[U.type];if(!H)throw Error(`[toJSONSchema]: Non-representable type encountered: ${U.type}`);H($,I,Q,N)}let X=$._zod.parent;if(X){if(!g.ref)g.ref=X;u$(X,I,N),I.seen.get(X).isParent=!0}}let G=I.metadataRegistry.get($);if(G)Object.assign(g.schema,G);if(I.io==="input"&&m$($))delete g.schema.examples,delete g.schema.default;if(I.io==="input"&&g.schema._prefault)(u=g.schema).default??(u.default=g.schema._prefault);return delete g.schema._prefault,I.seen.get($).schema}function P6($,I){let _=$.seen.get(I);if(!_)throw Error("Unprocessed schema. This is a bug in Zod.");let u=new Map;for(let g of $.seen.entries()){let J=$.metadataRegistry.get(g[0])?.id;if(J){let G=u.get(J);if(G&&G!==g[0])throw Error(`Duplicate schema id "${J}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);u.set(J,g[0])}}let U=(g)=>{let J=$.target==="draft-2020-12"?"$defs":"definitions";if($.external){let X=$.external.registry.get(g[0])?.id,Q=$.external.uri??((Y)=>Y);if(X)return{ref:Q(X)};let H=g[1].defId??g[1].schema.id??`schema${$.counter++}`;return g[1].defId=H,{defId:H,ref:`${Q("__shared")}#/${J}/${H}`}}if(g[1]===_)return{ref:"#"};let q=`${"#"}/${J}/`,N=g[1].schema.id??`__schema${$.counter++}`;return{defId:N,ref:q+N}},z=(g)=>{if(g[1].schema.$ref)return;let J=g[1],{ref:G,defId:q}=U(g);if(J.def={...J.schema},q)J.defId=q;let N=J.schema;for(let X in N)delete N[X];N.$ref=G};if($.cycles==="throw")for(let g of $.seen.entries()){let J=g[1];if(J.cycle)throw Error(`Cycle detected: #/${J.cycle?.join("/")}/<root>
|
|
309
|
+
`)}H.write("payload.value = newResult;"),H.write("return payload;");let V=H.compile();return(W,K)=>V(Q,W,K)},z,J=s6,G=!zI.jitless,q=G&&VJ.value,N=I.catchall,X;$._zod.parse=(Q,H)=>{X??(X=u.value);let Y=Q.value;if(!J(Y))return Q.issues.push({expected:"object",code:"invalid_type",input:Y,inst:$}),Q;if(G&&q&&H?.async===!1&&H.jitless!==!0){if(!z)z=U(I.shape);if(Q=z(Q,H),!N)return Q;return X7([],Y,Q,H,X,$)}return _(Q,H)}});function aQ($,I,_,u){for(let z of $)if(z.issues.length===0)return I.value=z.value,I;let U=$.filter((z)=>!V6(z));if(U.length===1)return I.value=U[0].value,U[0];return I.issues.push({code:"invalid_union",input:I.value,inst:_,errors:$.map((z)=>z.issues.map((J)=>a$(J,u,Z$())))}),I}var MI=M("$ZodUnion",($,I)=>{n.init($,I),t($._zod,"optin",()=>I.options.some((U)=>U._zod.optin==="optional")?"optional":void 0),t($._zod,"optout",()=>I.options.some((U)=>U._zod.optout==="optional")?"optional":void 0),t($._zod,"values",()=>{if(I.options.every((U)=>U._zod.values))return new Set(I.options.flatMap((U)=>Array.from(U._zod.values)));return}),t($._zod,"pattern",()=>{if(I.options.every((U)=>U._zod.pattern)){let U=I.options.map((z)=>z._zod.pattern);return new RegExp(`^(${U.map((z)=>gI(z.source)).join("|")})$`)}return});let _=I.options.length===1,u=I.options[0]._zod.run;$._zod.parse=(U,z)=>{if(_)return u(U,z);let J=!1,G=[];for(let g of I.options){let q=g._zod.run({value:U.value,issues:[]},z);if(q instanceof Promise)G.push(q),J=!0;else{if(q.issues.length===0)return q;G.push(q)}}if(!J)return aQ(G,U,$,z);return Promise.all(G).then((g)=>{return aQ(g,U,$,z)})}});function eQ($,I,_,u){let U=$.filter((z)=>z.issues.length===0);if(U.length===1)return I.value=U[0].value,I;if(U.length===0)I.issues.push({code:"invalid_union",input:I.value,inst:_,errors:$.map((z)=>z.issues.map((J)=>a$(J,u,Z$())))});else I.issues.push({code:"invalid_union",input:I.value,inst:_,errors:[],inclusive:!1});return I}var N3=M("$ZodXor",($,I)=>{MI.init($,I),I.inclusive=!1;let _=I.options.length===1,u=I.options[0]._zod.run;$._zod.parse=(U,z)=>{if(_)return u(U,z);let J=!1,G=[];for(let g of I.options){let q=g._zod.run({value:U.value,issues:[]},z);if(q instanceof Promise)G.push(q),J=!0;else G.push(q)}if(!J)return eQ(G,U,$,z);return Promise.all(G).then((g)=>{return eQ(g,U,$,z)})}}),Q3=M("$ZodDiscriminatedUnion",($,I)=>{I.inclusive=!1,MI.init($,I);let _=$._zod.parse;t($._zod,"propValues",()=>{let U={};for(let z of I.options){let J=z._zod.propValues;if(!J||Object.keys(J).length===0)throw Error(`Invalid discriminated union option at index "${I.options.indexOf(z)}"`);for(let[G,g]of Object.entries(J)){if(!U[G])U[G]=new Set;for(let q of g)U[G].add(q)}}return U});let u=k1(()=>{let U=I.options,z=new Map;for(let J of U){let G=J._zod.propValues?.[I.discriminator];if(!G||G.size===0)throw Error(`Invalid discriminated union option at index "${I.options.indexOf(J)}"`);for(let g of G){if(z.has(g))throw Error(`Duplicate discriminator value "${String(g)}"`);z.set(g,J)}}return z});$._zod.parse=(U,z)=>{let J=U.value;if(!s6(J))return U.issues.push({code:"invalid_type",expected:"object",input:J,inst:$}),U;let G=u.value.get(J?.[I.discriminator]);if(G)return G._zod.run(U,z);if(I.unionFallback)return _(U,z);return U.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:I.discriminator,input:J,path:[I.discriminator],inst:$}),U}}),v3=M("$ZodIntersection",($,I)=>{n.init($,I),$._zod.parse=(_,u)=>{let U=_.value,z=I.left._zod.run({value:U,issues:[]},u),J=I.right._zod.run({value:U,issues:[]},u);if(z instanceof Promise||J instanceof Promise)return Promise.all([z,J]).then(([g,q])=>{return sQ(_,g,q)});return sQ(_,z,J)}});function R8($,I){if($===I)return{valid:!0,data:$};if($ instanceof Date&&I instanceof Date&&+$===+I)return{valid:!0,data:$};if(L6($)&&L6(I)){let _=Object.keys(I),u=Object.keys($).filter((z)=>_.indexOf(z)!==-1),U={...$,...I};for(let z of u){let J=R8($[z],I[z]);if(!J.valid)return{valid:!1,mergeErrorPath:[z,...J.mergeErrorPath]};U[z]=J.data}return{valid:!0,data:U}}if(Array.isArray($)&&Array.isArray(I)){if($.length!==I.length)return{valid:!1,mergeErrorPath:[]};let _=[];for(let u=0;u<$.length;u++){let U=$[u],z=I[u],J=R8(U,z);if(!J.valid)return{valid:!1,mergeErrorPath:[u,...J.mergeErrorPath]};_.push(J.data)}return{valid:!0,data:_}}return{valid:!1,mergeErrorPath:[]}}function sQ($,I,_){let u=new Map,U;for(let G of I.issues)if(G.code==="unrecognized_keys"){U??(U=G);for(let g of G.keys){if(!u.has(g))u.set(g,{});u.get(g).l=!0}}else $.issues.push(G);for(let G of _.issues)if(G.code==="unrecognized_keys")for(let g of G.keys){if(!u.has(g))u.set(g,{});u.get(g).r=!0}else $.issues.push(G);let z=[...u].filter(([,G])=>G.l&&G.r).map(([G])=>G);if(z.length&&U)$.issues.push({...U,keys:z});if(V6($))return $;let J=R8(I.value,_.value);if(!J.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(J.mergeErrorPath)}`);return $.value=J.data,$}var F_=M("$ZodTuple",($,I)=>{n.init($,I);let _=I.items;$._zod.parse=(u,U)=>{let z=u.value;if(!Array.isArray(z))return u.issues.push({input:z,inst:$,expected:"tuple",code:"invalid_type"}),u;u.value=[];let J=[],G=[..._].reverse().findIndex((N)=>N._zod.optin!=="optional"),g=G===-1?0:_.length-G;if(!I.rest){let N=z.length>_.length,X=z.length<g-1;if(N||X)return u.issues.push({...N?{code:"too_big",maximum:_.length,inclusive:!0}:{code:"too_small",minimum:_.length},input:z,inst:$,origin:"array"}),u}let q=-1;for(let N of _){if(q++,q>=z.length){if(q>=g)continue}let X=N._zod.run({value:z[q],issues:[]},U);if(X instanceof Promise)J.push(X.then((Q)=>Z_(Q,u,q)));else Z_(X,u,q)}if(I.rest){let N=z.slice(_.length);for(let X of N){q++;let Q=I.rest._zod.run({value:X,issues:[]},U);if(Q instanceof Promise)J.push(Q.then((H)=>Z_(H,u,q)));else Z_(Q,u,q)}}if(J.length)return Promise.all(J).then(()=>u);return u}});function Z_($,I,_){if($.issues.length)I.issues.push(..._4(_,$.issues));I.value[_]=$.value}var H3=M("$ZodRecord",($,I)=>{n.init($,I),$._zod.parse=(_,u)=>{let U=_.value;if(!L6(U))return _.issues.push({expected:"record",code:"invalid_type",input:U,inst:$}),_;let z=[],J=I.keyType._zod.values;if(J){_.value={};let G=new Set;for(let q of J)if(typeof q==="string"||typeof q==="number"||typeof q==="symbol"){G.add(typeof q==="number"?q.toString():q);let N=I.valueType._zod.run({value:U[q],issues:[]},u);if(N instanceof Promise)z.push(N.then((X)=>{if(X.issues.length)_.issues.push(..._4(q,X.issues));_.value[q]=X.value}));else{if(N.issues.length)_.issues.push(..._4(q,N.issues));_.value[q]=N.value}}let g;for(let q in U)if(!G.has(q))g=g??[],g.push(q);if(g&&g.length>0)_.issues.push({code:"unrecognized_keys",input:U,inst:$,keys:g})}else{_.value={};for(let G of Reflect.ownKeys(U)){if(G==="__proto__")continue;let g=I.keyType._zod.run({value:G,issues:[]},u);if(g instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof G==="string"&&YI.test(G)&&g.issues.length){let X=I.keyType._zod.run({value:Number(G),issues:[]},u);if(X instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(X.issues.length===0)g=X}if(g.issues.length){if(I.mode==="loose")_.value[G]=U[G];else _.issues.push({code:"invalid_key",origin:"record",issues:g.issues.map((X)=>a$(X,u,Z$())),input:G,path:[G],inst:$});continue}let N=I.valueType._zod.run({value:U[G],issues:[]},u);if(N instanceof Promise)z.push(N.then((X)=>{if(X.issues.length)_.issues.push(..._4(G,X.issues));_.value[g.value]=X.value}));else{if(N.issues.length)_.issues.push(..._4(G,N.issues));_.value[g.value]=N.value}}}if(z.length)return Promise.all(z).then(()=>_);return _}}),Y3=M("$ZodMap",($,I)=>{n.init($,I),$._zod.parse=(_,u)=>{let U=_.value;if(!(U instanceof Map))return _.issues.push({expected:"map",code:"invalid_type",input:U,inst:$}),_;let z=[];_.value=new Map;for(let[J,G]of U){let g=I.keyType._zod.run({value:J,issues:[]},u),q=I.valueType._zod.run({value:G,issues:[]},u);if(g instanceof Promise||q instanceof Promise)z.push(Promise.all([g,q]).then(([N,X])=>{$7(N,X,_,J,U,$,u)}));else $7(g,q,_,J,U,$,u)}if(z.length)return Promise.all(z).then(()=>_);return _}});function $7($,I,_,u,U,z,J){if($.issues.length)if(qI.has(typeof u))_.issues.push(..._4(u,$.issues));else _.issues.push({code:"invalid_key",origin:"map",input:U,inst:z,issues:$.issues.map((G)=>a$(G,J,Z$()))});if(I.issues.length)if(qI.has(typeof u))_.issues.push(..._4(u,I.issues));else _.issues.push({origin:"map",code:"invalid_element",input:U,inst:z,key:u,issues:I.issues.map((G)=>a$(G,J,Z$()))});_.value.set($.value,I.value)}var O3=M("$ZodSet",($,I)=>{n.init($,I),$._zod.parse=(_,u)=>{let U=_.value;if(!(U instanceof Set))return _.issues.push({input:U,inst:$,expected:"set",code:"invalid_type"}),_;let z=[];_.value=new Set;for(let J of U){let G=I.valueType._zod.run({value:J,issues:[]},u);if(G instanceof Promise)z.push(G.then((g)=>I7(g,_)));else I7(G,_)}if(z.length)return Promise.all(z).then(()=>_);return _}});function I7($,I){if($.issues.length)I.issues.push(...$.issues);I.value.add($.value)}var T3=M("$ZodEnum",($,I)=>{n.init($,I);let _=GI(I.entries),u=new Set(_);$._zod.values=u,$._zod.pattern=new RegExp(`^(${_.filter((U)=>qI.has(typeof U)).map((U)=>typeof U==="string"?H4(U):U.toString()).join("|")})$`),$._zod.parse=(U,z)=>{let J=U.value;if(u.has(J))return U;return U.issues.push({code:"invalid_value",values:_,input:J,inst:$}),U}}),B3=M("$ZodLiteral",($,I)=>{if(n.init($,I),I.values.length===0)throw Error("Cannot create literal schema with no valid values");let _=new Set(I.values);$._zod.values=_,$._zod.pattern=new RegExp(`^(${I.values.map((u)=>typeof u==="string"?H4(u):u?H4(u.toString()):String(u)).join("|")})$`),$._zod.parse=(u,U)=>{let z=u.value;if(_.has(z))return u;return u.issues.push({code:"invalid_value",values:I.values,input:z,inst:$}),u}}),M3=M("$ZodFile",($,I)=>{n.init($,I),$._zod.parse=(_,u)=>{let U=_.value;if(U instanceof File)return _;return _.issues.push({expected:"file",code:"invalid_type",input:U,inst:$}),_}}),K3=M("$ZodTransform",($,I)=>{n.init($,I),$._zod.parse=(_,u)=>{if(u.direction==="backward")throw new e6($.constructor.name);let U=I.transform(_.value,_);if(u.async)return(U instanceof Promise?U:Promise.resolve(U)).then((J)=>{return _.value=J,_});if(U instanceof Promise)throw new C4;return _.value=U,_}});function U7($,I){if($.issues.length&&I===void 0)return{issues:[],value:void 0};return $}var S_=M("$ZodOptional",($,I)=>{n.init($,I),$._zod.optin="optional",$._zod.optout="optional",t($._zod,"values",()=>{return I.innerType._zod.values?new Set([...I.innerType._zod.values,void 0]):void 0}),t($._zod,"pattern",()=>{let _=I.innerType._zod.pattern;return _?new RegExp(`^(${gI(_.source)})?$`):void 0}),$._zod.parse=(_,u)=>{if(I.innerType._zod.optin==="optional"){let U=I.innerType._zod.run(_,u);if(U instanceof Promise)return U.then((z)=>U7(z,_.value));return U7(U,_.value)}if(_.value===void 0)return _;return I.innerType._zod.run(_,u)}}),D3=M("$ZodExactOptional",($,I)=>{S_.init($,I),t($._zod,"values",()=>I.innerType._zod.values),t($._zod,"pattern",()=>I.innerType._zod.pattern),$._zod.parse=(_,u)=>{return I.innerType._zod.run(_,u)}}),L3=M("$ZodNullable",($,I)=>{n.init($,I),t($._zod,"optin",()=>I.innerType._zod.optin),t($._zod,"optout",()=>I.innerType._zod.optout),t($._zod,"pattern",()=>{let _=I.innerType._zod.pattern;return _?new RegExp(`^(${gI(_.source)}|null)$`):void 0}),t($._zod,"values",()=>{return I.innerType._zod.values?new Set([...I.innerType._zod.values,null]):void 0}),$._zod.parse=(_,u)=>{if(_.value===null)return _;return I.innerType._zod.run(_,u)}}),V3=M("$ZodDefault",($,I)=>{n.init($,I),$._zod.optin="optional",t($._zod,"values",()=>I.innerType._zod.values),$._zod.parse=(_,u)=>{if(u.direction==="backward")return I.innerType._zod.run(_,u);if(_.value===void 0)return _.value=I.defaultValue,_;let U=I.innerType._zod.run(_,u);if(U instanceof Promise)return U.then((z)=>_7(z,I));return _7(U,I)}});function _7($,I){if($.value===void 0)$.value=I.defaultValue;return $}var Z3=M("$ZodPrefault",($,I)=>{n.init($,I),$._zod.optin="optional",t($._zod,"values",()=>I.innerType._zod.values),$._zod.parse=(_,u)=>{if(u.direction==="backward")return I.innerType._zod.run(_,u);if(_.value===void 0)_.value=I.defaultValue;return I.innerType._zod.run(_,u)}}),W3=M("$ZodNonOptional",($,I)=>{n.init($,I),t($._zod,"values",()=>{let _=I.innerType._zod.values;return _?new Set([..._].filter((u)=>u!==void 0)):void 0}),$._zod.parse=(_,u)=>{let U=I.innerType._zod.run(_,u);if(U instanceof Promise)return U.then((z)=>u7(z,$));return u7(U,$)}});function u7($,I){if(!$.issues.length&&$.value===void 0)$.issues.push({code:"invalid_type",expected:"nonoptional",input:$.value,inst:I});return $}var R3=M("$ZodSuccess",($,I)=>{n.init($,I),$._zod.parse=(_,u)=>{if(u.direction==="backward")throw new e6("ZodSuccess");let U=I.innerType._zod.run(_,u);if(U instanceof Promise)return U.then((z)=>{return _.value=z.issues.length===0,_});return _.value=U.issues.length===0,_}}),P3=M("$ZodCatch",($,I)=>{n.init($,I),t($._zod,"optin",()=>I.innerType._zod.optin),t($._zod,"optout",()=>I.innerType._zod.optout),t($._zod,"values",()=>I.innerType._zod.values),$._zod.parse=(_,u)=>{if(u.direction==="backward")return I.innerType._zod.run(_,u);let U=I.innerType._zod.run(_,u);if(U instanceof Promise)return U.then((z)=>{if(_.value=z.value,z.issues.length)_.value=I.catchValue({..._,error:{issues:z.issues.map((J)=>a$(J,u,Z$()))},input:_.value}),_.issues=[];return _});if(_.value=U.value,U.issues.length)_.value=I.catchValue({..._,error:{issues:U.issues.map((z)=>a$(z,u,Z$()))},input:_.value}),_.issues=[];return _}}),b3=M("$ZodNaN",($,I)=>{n.init($,I),$._zod.parse=(_,u)=>{if(typeof _.value!=="number"||!Number.isNaN(_.value))return _.issues.push({input:_.value,inst:$,expected:"nan",code:"invalid_type"}),_;return _}}),A3=M("$ZodPipe",($,I)=>{n.init($,I),t($._zod,"values",()=>I.in._zod.values),t($._zod,"optin",()=>I.in._zod.optin),t($._zod,"optout",()=>I.out._zod.optout),t($._zod,"propValues",()=>I.in._zod.propValues),$._zod.parse=(_,u)=>{if(u.direction==="backward"){let z=I.out._zod.run(_,u);if(z instanceof Promise)return z.then((J)=>W_(J,I.in,u));return W_(z,I.in,u)}let U=I.in._zod.run(_,u);if(U instanceof Promise)return U.then((z)=>W_(z,I.out,u));return W_(U,I.out,u)}});function W_($,I,_){if($.issues.length)return $.aborted=!0,$;return I._zod.run({value:$.value,issues:$.issues},_)}var KI=M("$ZodCodec",($,I)=>{n.init($,I),t($._zod,"values",()=>I.in._zod.values),t($._zod,"optin",()=>I.in._zod.optin),t($._zod,"optout",()=>I.out._zod.optout),t($._zod,"propValues",()=>I.in._zod.propValues),$._zod.parse=(_,u)=>{if((u.direction||"forward")==="forward"){let z=I.in._zod.run(_,u);if(z instanceof Promise)return z.then((J)=>R_(J,I,u));return R_(z,I,u)}else{let z=I.out._zod.run(_,u);if(z instanceof Promise)return z.then((J)=>R_(J,I,u));return R_(z,I,u)}}});function R_($,I,_){if($.issues.length)return $.aborted=!0,$;if((_.direction||"forward")==="forward"){let U=I.transform($.value,$);if(U instanceof Promise)return U.then((z)=>P_($,z,I.out,_));return P_($,U,I.out,_)}else{let U=I.reverseTransform($.value,$);if(U instanceof Promise)return U.then((z)=>P_($,z,I.in,_));return P_($,U,I.in,_)}}function P_($,I,_,u){if($.issues.length)return $.aborted=!0,$;return _._zod.run({value:I,issues:$.issues},u)}var j3=M("$ZodReadonly",($,I)=>{n.init($,I),t($._zod,"propValues",()=>I.innerType._zod.propValues),t($._zod,"values",()=>I.innerType._zod.values),t($._zod,"optin",()=>I.innerType?._zod?.optin),t($._zod,"optout",()=>I.innerType?._zod?.optout),$._zod.parse=(_,u)=>{if(u.direction==="backward")return I.innerType._zod.run(_,u);let U=I.innerType._zod.run(_,u);if(U instanceof Promise)return U.then(z7);return z7(U)}});function z7($){return $.value=Object.freeze($.value),$}var F3=M("$ZodTemplateLiteral",($,I)=>{n.init($,I);let _=[];for(let u of I.parts)if(typeof u==="object"&&u!==null){if(!u._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...u._zod.traits].shift()}`);let U=u._zod.pattern instanceof RegExp?u._zod.pattern.source:u._zod.pattern;if(!U)throw Error(`Invalid template literal part: ${u._zod.traits}`);let z=U.startsWith("^")?1:0,J=U.endsWith("$")?U.length-1:U.length;_.push(U.slice(z,J))}else if(u===null||WJ.has(typeof u))_.push(H4(`${u}`));else throw Error(`Invalid template literal part: ${u}`);$._zod.pattern=new RegExp(`^${_.join("")}$`),$._zod.parse=(u,U)=>{if(typeof u.value!=="string")return u.issues.push({input:u.value,inst:$,expected:"string",code:"invalid_type"}),u;if($._zod.pattern.lastIndex=0,!$._zod.pattern.test(u.value))return u.issues.push({input:u.value,inst:$,code:"invalid_format",format:I.format??"template_literal",pattern:$._zod.pattern.source}),u;return u}}),S3=M("$ZodFunction",($,I)=>{return n.init($,I),$._def=I,$._zod.def=I,$.implement=(_)=>{if(typeof _!=="function")throw Error("implement() must be called with a function");return function(...u){let U=$._def.input?X_($._def.input,u):u,z=Reflect.apply(_,this,U);if($._def.output)return X_($._def.output,z);return z}},$.implementAsync=(_)=>{if(typeof _!=="function")throw Error("implementAsync() must be called with a function");return async function(...u){let U=$._def.input?await N_($._def.input,u):u,z=await Reflect.apply(_,this,U);if($._def.output)return await N_($._def.output,z);return z}},$._zod.parse=(_,u)=>{if(typeof _.value!=="function")return _.issues.push({code:"invalid_type",expected:"function",input:_.value,inst:$}),_;if($._def.output&&$._def.output._zod.def.type==="promise")_.value=$.implementAsync(_.value);else _.value=$.implement(_.value);return _},$.input=(..._)=>{let u=$.constructor;if(Array.isArray(_[0]))return new u({type:"function",input:new F_({type:"tuple",items:_[0],rest:_[1]}),output:$._def.output});return new u({type:"function",input:_[0],output:$._def.output})},$.output=(_)=>{return new $.constructor({type:"function",input:$._def.input,output:_})},$}),w3=M("$ZodPromise",($,I)=>{n.init($,I),$._zod.parse=(_,u)=>{return Promise.resolve(_.value).then((U)=>I.innerType._zod.run({value:U,issues:[]},u))}}),E3=M("$ZodLazy",($,I)=>{n.init($,I),t($._zod,"innerType",()=>I.getter()),t($._zod,"pattern",()=>$._zod.innerType?._zod?.pattern),t($._zod,"propValues",()=>$._zod.innerType?._zod?.propValues),t($._zod,"optin",()=>$._zod.innerType?._zod?.optin??void 0),t($._zod,"optout",()=>$._zod.innerType?._zod?.optout??void 0),$._zod.parse=(_,u)=>{return $._zod.innerType._zod.run(_,u)}}),C3=M("$ZodCustom",($,I)=>{Q$.init($,I),n.init($,I),$._zod.parse=(_,u)=>{return _},$._zod.check=(_)=>{let u=_.value,U=I.fn(u);if(U instanceof Promise)return U.then((z)=>J7(z,_,u,$));J7(U,_,u,$);return}});function J7($,I,_,u){if(!$){let U={code:"custom",input:_,inst:u,path:[...u._zod.def.path??[]],continue:!u._zod.def.abort};if(u._zod.def.params)U.params=u._zod.def.params;I.issues.push(y1(U))}}var WI={};S4(WI,{zhTW:()=>R9,zhCN:()=>W9,yo:()=>P9,vi:()=>Z9,uz:()=>V9,ur:()=>L9,uk:()=>ZI,ua:()=>D9,tr:()=>K9,th:()=>M9,ta:()=>B9,sv:()=>T9,sl:()=>O9,ru:()=>Y9,pt:()=>H9,ps:()=>Q9,pl:()=>v9,ota:()=>N9,no:()=>X9,nl:()=>q9,ms:()=>g9,mk:()=>G9,lt:()=>J9,ko:()=>z9,km:()=>LI,kh:()=>u9,ka:()=>_9,ja:()=>U9,it:()=>I9,is:()=>$9,id:()=>s3,hy:()=>e3,hu:()=>a3,he:()=>t3,frCA:()=>o3,fr:()=>p3,fi:()=>c3,fa:()=>d3,es:()=>h3,eo:()=>n3,en:()=>DI,de:()=>r3,da:()=>m3,cs:()=>l3,ca:()=>i3,bg:()=>y3,be:()=>k3,az:()=>x3,ar:()=>f3});var bA=()=>{let $={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function I(U){return $[U]??null}let _={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:"مدخل"},u={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`مدخلات غير مقبولة: يفترض إدخال instanceof ${U.expected}، ولكن تم إدخال ${G}`;return`مدخلات غير مقبولة: يفترض إدخال ${z}، ولكن تم إدخال ${G}`}case"invalid_value":if(U.values.length===1)return`مدخلات غير مقبولة: يفترض إدخال ${b(U.values[0])}`;return`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return` أكبر من اللازم: يفترض أن تكون ${U.origin??"القيمة"} ${z} ${U.maximum.toString()} ${J.unit??"عنصر"}`;return`أكبر من اللازم: يفترض أن تكون ${U.origin??"القيمة"} ${z} ${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`أصغر من اللازم: يفترض لـ ${U.origin} أن يكون ${z} ${U.minimum.toString()} ${J.unit}`;return`أصغر من اللازم: يفترض لـ ${U.origin} أن يكون ${z} ${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`نَص غير مقبول: يجب أن يبدأ بـ "${U.prefix}"`;if(z.format==="ends_with")return`نَص غير مقبول: يجب أن ينتهي بـ "${z.suffix}"`;if(z.format==="includes")return`نَص غير مقبول: يجب أن يتضمَّن "${z.includes}"`;if(z.format==="regex")return`نَص غير مقبول: يجب أن يطابق النمط ${z.pattern}`;return`${_[z.format]??U.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${U.divisor}`;case"unrecognized_keys":return`معرف${U.keys.length>1?"ات":""} غريب${U.keys.length>1?"ة":""}: ${R(U.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${U.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${U.origin}`;default:return"مدخل غير مقبول"}}};function f3(){return{localeError:bA()}}var AA=()=>{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 _={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"},u={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Yanlış dəyər: gözlənilən instanceof ${U.expected}, daxil olan ${G}`;return`Yanlış dəyər: gözlənilən ${z}, daxil olan ${G}`}case"invalid_value":if(U.values.length===1)return`Yanlış dəyər: gözlənilən ${b(U.values[0])}`;return`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Çox böyük: gözlənilən ${U.origin??"dəyər"} ${z}${U.maximum.toString()} ${J.unit??"element"}`;return`Çox böyük: gözlənilən ${U.origin??"dəyər"} ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`Çox kiçik: gözlənilən ${U.origin} ${z}${U.minimum.toString()} ${J.unit}`;return`Çox kiçik: gözlənilən ${U.origin} ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Yanlış mətn: "${z.prefix}" ilə başlamalıdır`;if(z.format==="ends_with")return`Yanlış mətn: "${z.suffix}" ilə bitməlidir`;if(z.format==="includes")return`Yanlış mətn: "${z.includes}" daxil olmalıdır`;if(z.format==="regex")return`Yanlış mətn: ${z.pattern} şablonuna uyğun olmalıdır`;return`Yanlış ${_[z.format]??U.format}`}case"not_multiple_of":return`Yanlış ədəd: ${U.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${U.keys.length>1?"lar":""}: ${R(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 x3(){return{localeError:AA()}}function Q7($,I,_,u){let U=Math.abs($),z=U%10,J=U%100;if(J>=11&&J<=19)return u;if(z===1)return I;if(z>=2&&z<=4)return _;return u}var jA=()=>{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 _={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:"увод"},u={nan:"NaN",number:"лік",array:"масіў"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Няправільны ўвод: чакаўся instanceof ${U.expected}, атрымана ${G}`;return`Няправільны ўвод: чакаўся ${z}, атрымана ${G}`}case"invalid_value":if(U.values.length===1)return`Няправільны ўвод: чакалася ${b(U.values[0])}`;return`Няправільны варыянт: чакаўся адзін з ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J){let G=Number(U.maximum),g=Q7(G,J.unit.one,J.unit.few,J.unit.many);return`Занадта вялікі: чакалася, што ${U.origin??"значэнне"} павінна ${J.verb} ${z}${U.maximum.toString()} ${g}`}return`Занадта вялікі: чакалася, што ${U.origin??"значэнне"} павінна быць ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J){let G=Number(U.minimum),g=Q7(G,J.unit.one,J.unit.few,J.unit.many);return`Занадта малы: чакалася, што ${U.origin} павінна ${J.verb} ${z}${U.minimum.toString()} ${g}`}return`Занадта малы: чакалася, што ${U.origin} павінна быць ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Няправільны радок: павінен пачынацца з "${z.prefix}"`;if(z.format==="ends_with")return`Няправільны радок: павінен заканчвацца на "${z.suffix}"`;if(z.format==="includes")return`Няправільны радок: павінен змяшчаць "${z.includes}"`;if(z.format==="regex")return`Няправільны радок: павінен адпавядаць шаблону ${z.pattern}`;return`Няправільны ${_[z.format]??U.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${U.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${U.keys.length>1?"ключы":"ключ"}: ${R(U.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${U.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${U.origin}`;default:return"Няправільны ўвод"}}};function k3(){return{localeError:jA()}}var FA=()=>{let $={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function I(U){return $[U]??null}let _={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:"вход"},u={nan:"NaN",number:"число",array:"масив"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Невалиден вход: очакван instanceof ${U.expected}, получен ${G}`;return`Невалиден вход: очакван ${z}, получен ${G}`}case"invalid_value":if(U.values.length===1)return`Невалиден вход: очакван ${b(U.values[0])}`;return`Невалидна опция: очаквано едно от ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Твърде голямо: очаква се ${U.origin??"стойност"} да съдържа ${z}${U.maximum.toString()} ${J.unit??"елемента"}`;return`Твърде голямо: очаква се ${U.origin??"стойност"} да бъде ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`Твърде малко: очаква се ${U.origin} да съдържа ${z}${U.minimum.toString()} ${J.unit}`;return`Твърде малко: очаква се ${U.origin} да бъде ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Невалиден низ: трябва да започва с "${z.prefix}"`;if(z.format==="ends_with")return`Невалиден низ: трябва да завършва с "${z.suffix}"`;if(z.format==="includes")return`Невалиден низ: трябва да включва "${z.includes}"`;if(z.format==="regex")return`Невалиден низ: трябва да съвпада с ${z.pattern}`;let J="Невалиден";if(z.format==="emoji")J="Невалидно";if(z.format==="datetime")J="Невалидно";if(z.format==="date")J="Невалидна";if(z.format==="time")J="Невалидно";if(z.format==="duration")J="Невалидна";return`${J} ${_[z.format]??U.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${U.divisor}`;case"unrecognized_keys":return`Неразпознат${U.keys.length>1?"и":""} ключ${U.keys.length>1?"ове":""}: ${R(U.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${U.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${U.origin}`;default:return"Невалиден вход"}}};function y3(){return{localeError:FA()}}var SA=()=>{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 _={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"},u={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Tipus invàlid: s'esperava instanceof ${U.expected}, s'ha rebut ${G}`;return`Tipus invàlid: s'esperava ${z}, s'ha rebut ${G}`}case"invalid_value":if(U.values.length===1)return`Valor invàlid: s'esperava ${b(U.values[0])}`;return`Opció invàlida: s'esperava una de ${R(U.values," o ")}`;case"too_big":{let z=U.inclusive?"com a màxim":"menys de",J=I(U.origin);if(J)return`Massa gran: s'esperava que ${U.origin??"el valor"} contingués ${z} ${U.maximum.toString()} ${J.unit??"elements"}`;return`Massa gran: s'esperava que ${U.origin??"el valor"} fos ${z} ${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?"com a mínim":"més de",J=I(U.origin);if(J)return`Massa petit: s'esperava que ${U.origin} contingués ${z} ${U.minimum.toString()} ${J.unit}`;return`Massa petit: s'esperava que ${U.origin} fos ${z} ${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Format invàlid: ha de començar amb "${z.prefix}"`;if(z.format==="ends_with")return`Format invàlid: ha d'acabar amb "${z.suffix}"`;if(z.format==="includes")return`Format invàlid: ha d'incloure "${z.includes}"`;if(z.format==="regex")return`Format invàlid: ha de coincidir amb el patró ${z.pattern}`;return`Format invàlid per a ${_[z.format]??U.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${U.divisor}`;case"unrecognized_keys":return`Clau${U.keys.length>1?"s":""} no reconeguda${U.keys.length>1?"s":""}: ${R(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 i3(){return{localeError:SA()}}var wA=()=>{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 _={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"},u={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Neplatný vstup: očekáváno instanceof ${U.expected}, obdrženo ${G}`;return`Neplatný vstup: očekáváno ${z}, obdrženo ${G}`}case"invalid_value":if(U.values.length===1)return`Neplatný vstup: očekáváno ${b(U.values[0])}`;return`Neplatná možnost: očekávána jedna z hodnot ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Hodnota je příliš velká: ${U.origin??"hodnota"} musí mít ${z}${U.maximum.toString()} ${J.unit??"prvků"}`;return`Hodnota je příliš velká: ${U.origin??"hodnota"} musí být ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`Hodnota je příliš malá: ${U.origin??"hodnota"} musí mít ${z}${U.minimum.toString()} ${J.unit??"prvků"}`;return`Hodnota je příliš malá: ${U.origin??"hodnota"} musí být ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Neplatný řetězec: musí začínat na "${z.prefix}"`;if(z.format==="ends_with")return`Neplatný řetězec: musí končit na "${z.suffix}"`;if(z.format==="includes")return`Neplatný řetězec: musí obsahovat "${z.includes}"`;if(z.format==="regex")return`Neplatný řetězec: musí odpovídat vzoru ${z.pattern}`;return`Neplatný formát ${_[z.format]??U.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${U.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${R(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 l3(){return{localeError:wA()}}var EA=()=>{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 _={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"},u={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Ugyldigt input: forventede instanceof ${U.expected}, fik ${G}`;return`Ugyldigt input: forventede ${z}, fik ${G}`}case"invalid_value":if(U.values.length===1)return`Ugyldig værdi: forventede ${b(U.values[0])}`;return`Ugyldigt valg: forventede en af følgende ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin),G=u[U.origin]??U.origin;if(J)return`For stor: forventede ${G??"value"} ${J.verb} ${z} ${U.maximum.toString()} ${J.unit??"elementer"}`;return`For stor: forventede ${G??"value"} havde ${z} ${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin),G=u[U.origin]??U.origin;if(J)return`For lille: forventede ${G} ${J.verb} ${z} ${U.minimum.toString()} ${J.unit}`;return`For lille: forventede ${G} havde ${z} ${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Ugyldig streng: skal starte med "${z.prefix}"`;if(z.format==="ends_with")return`Ugyldig streng: skal ende med "${z.suffix}"`;if(z.format==="includes")return`Ugyldig streng: skal indeholde "${z.includes}"`;if(z.format==="regex")return`Ugyldig streng: skal matche mønsteret ${z.pattern}`;return`Ugyldig ${_[z.format]??U.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${U.divisor}`;case"unrecognized_keys":return`${U.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${R(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 m3(){return{localeError:EA()}}var CA=()=>{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 _={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"},u={nan:"NaN",number:"Zahl",array:"Array"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Ungültige Eingabe: erwartet instanceof ${U.expected}, erhalten ${G}`;return`Ungültige Eingabe: erwartet ${z}, erhalten ${G}`}case"invalid_value":if(U.values.length===1)return`Ungültige Eingabe: erwartet ${b(U.values[0])}`;return`Ungültige Option: erwartet eine von ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Zu groß: erwartet, dass ${U.origin??"Wert"} ${z}${U.maximum.toString()} ${J.unit??"Elemente"} hat`;return`Zu groß: erwartet, dass ${U.origin??"Wert"} ${z}${U.maximum.toString()} ist`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`Zu klein: erwartet, dass ${U.origin} ${z}${U.minimum.toString()} ${J.unit} hat`;return`Zu klein: erwartet, dass ${U.origin} ${z}${U.minimum.toString()} ist`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Ungültiger String: muss mit "${z.prefix}" beginnen`;if(z.format==="ends_with")return`Ungültiger String: muss mit "${z.suffix}" enden`;if(z.format==="includes")return`Ungültiger String: muss "${z.includes}" enthalten`;if(z.format==="regex")return`Ungültiger String: muss dem Muster ${z.pattern} entsprechen`;return`Ungültig: ${_[z.format]??U.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${U.divisor} sein`;case"unrecognized_keys":return`${U.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${R(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 r3(){return{localeError:CA()}}var fA=()=>{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 _={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"},u={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;return`Invalid input: expected ${z}, received ${G}`}case"invalid_value":if(U.values.length===1)return`Invalid input: expected ${b(U.values[0])}`;return`Invalid option: expected one of ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Too big: expected ${U.origin??"value"} to have ${z}${U.maximum.toString()} ${J.unit??"elements"}`;return`Too big: expected ${U.origin??"value"} to be ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`Too small: expected ${U.origin} to have ${z}${U.minimum.toString()} ${J.unit}`;return`Too small: expected ${U.origin} to be ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Invalid string: must start with "${z.prefix}"`;if(z.format==="ends_with")return`Invalid string: must end with "${z.suffix}"`;if(z.format==="includes")return`Invalid string: must include "${z.includes}"`;if(z.format==="regex")return`Invalid string: must match pattern ${z.pattern}`;return`Invalid ${_[z.format]??U.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${U.divisor}`;case"unrecognized_keys":return`Unrecognized key${U.keys.length>1?"s":""}: ${R(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 DI(){return{localeError:fA()}}var xA=()=>{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 _={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"},u={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Nevalida enigo: atendiĝis instanceof ${U.expected}, riceviĝis ${G}`;return`Nevalida enigo: atendiĝis ${z}, riceviĝis ${G}`}case"invalid_value":if(U.values.length===1)return`Nevalida enigo: atendiĝis ${b(U.values[0])}`;return`Nevalida opcio: atendiĝis unu el ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Tro granda: atendiĝis ke ${U.origin??"valoro"} havu ${z}${U.maximum.toString()} ${J.unit??"elementojn"}`;return`Tro granda: atendiĝis ke ${U.origin??"valoro"} havu ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`Tro malgranda: atendiĝis ke ${U.origin} havu ${z}${U.minimum.toString()} ${J.unit}`;return`Tro malgranda: atendiĝis ke ${U.origin} estu ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Nevalida karaktraro: devas komenciĝi per "${z.prefix}"`;if(z.format==="ends_with")return`Nevalida karaktraro: devas finiĝi per "${z.suffix}"`;if(z.format==="includes")return`Nevalida karaktraro: devas inkluzivi "${z.includes}"`;if(z.format==="regex")return`Nevalida karaktraro: devas kongrui kun la modelo ${z.pattern}`;return`Nevalida ${_[z.format]??U.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${U.divisor}`;case"unrecognized_keys":return`Nekonata${U.keys.length>1?"j":""} ŝlosilo${U.keys.length>1?"j":""}: ${R(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 n3(){return{localeError:xA()}}var kA=()=>{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 _={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"},u={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Entrada inválida: se esperaba instanceof ${U.expected}, recibido ${G}`;return`Entrada inválida: se esperaba ${z}, recibido ${G}`}case"invalid_value":if(U.values.length===1)return`Entrada inválida: se esperaba ${b(U.values[0])}`;return`Opción inválida: se esperaba una de ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin),G=u[U.origin]??U.origin;if(J)return`Demasiado grande: se esperaba que ${G??"valor"} tuviera ${z}${U.maximum.toString()} ${J.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${G??"valor"} fuera ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin),G=u[U.origin]??U.origin;if(J)return`Demasiado pequeño: se esperaba que ${G} tuviera ${z}${U.minimum.toString()} ${J.unit}`;return`Demasiado pequeño: se esperaba que ${G} fuera ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Cadena inválida: debe comenzar con "${z.prefix}"`;if(z.format==="ends_with")return`Cadena inválida: debe terminar en "${z.suffix}"`;if(z.format==="includes")return`Cadena inválida: debe incluir "${z.includes}"`;if(z.format==="regex")return`Cadena inválida: debe coincidir con el patrón ${z.pattern}`;return`Inválido ${_[z.format]??U.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${U.divisor}`;case"unrecognized_keys":return`Llave${U.keys.length>1?"s":""} desconocida${U.keys.length>1?"s":""}: ${R(U.keys,", ")}`;case"invalid_key":return`Llave inválida en ${u[U.origin]??U.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${u[U.origin]??U.origin}`;default:return"Entrada inválida"}}};function h3(){return{localeError:kA()}}var yA=()=>{let $={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function I(U){return $[U]??null}let _={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:"ورودی"},u={nan:"NaN",number:"عدد",array:"آرایه"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`ورودی نامعتبر: میبایست instanceof ${U.expected} میبود، ${G} دریافت شد`;return`ورودی نامعتبر: میبایست ${z} میبود، ${G} دریافت شد`}case"invalid_value":if(U.values.length===1)return`ورودی نامعتبر: میبایست ${b(U.values[0])} میبود`;return`گزینه نامعتبر: میبایست یکی از ${R(U.values,"|")} میبود`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`خیلی بزرگ: ${U.origin??"مقدار"} باید ${z}${U.maximum.toString()} ${J.unit??"عنصر"} باشد`;return`خیلی بزرگ: ${U.origin??"مقدار"} باید ${z}${U.maximum.toString()} باشد`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`خیلی کوچک: ${U.origin} باید ${z}${U.minimum.toString()} ${J.unit} باشد`;return`خیلی کوچک: ${U.origin} باید ${z}${U.minimum.toString()} باشد`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`رشته نامعتبر: باید با "${z.prefix}" شروع شود`;if(z.format==="ends_with")return`رشته نامعتبر: باید با "${z.suffix}" تمام شود`;if(z.format==="includes")return`رشته نامعتبر: باید شامل "${z.includes}" باشد`;if(z.format==="regex")return`رشته نامعتبر: باید با الگوی ${z.pattern} مطابقت داشته باشد`;return`${_[z.format]??U.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${U.divisor} باشد`;case"unrecognized_keys":return`کلید${U.keys.length>1?"های":""} ناشناس: ${R(U.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${U.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${U.origin}`;default:return"ورودی نامعتبر"}}};function d3(){return{localeError:yA()}}var iA=()=>{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 _={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"},u={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Virheellinen tyyppi: odotettiin instanceof ${U.expected}, oli ${G}`;return`Virheellinen tyyppi: odotettiin ${z}, oli ${G}`}case"invalid_value":if(U.values.length===1)return`Virheellinen syöte: täytyy olla ${b(U.values[0])}`;return`Virheellinen valinta: täytyy olla yksi seuraavista: ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Liian suuri: ${J.subject} täytyy olla ${z}${U.maximum.toString()} ${J.unit}`.trim();return`Liian suuri: arvon täytyy olla ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`Liian pieni: ${J.subject} täytyy olla ${z}${U.minimum.toString()} ${J.unit}`.trim();return`Liian pieni: arvon täytyy olla ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Virheellinen syöte: täytyy alkaa "${z.prefix}"`;if(z.format==="ends_with")return`Virheellinen syöte: täytyy loppua "${z.suffix}"`;if(z.format==="includes")return`Virheellinen syöte: täytyy sisältää "${z.includes}"`;if(z.format==="regex")return`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${z.pattern}`;return`Virheellinen ${_[z.format]??U.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${U.divisor} monikerta`;case"unrecognized_keys":return`${U.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${R(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 c3(){return{localeError:iA()}}var lA=()=>{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 _={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"},u={nan:"NaN",number:"nombre",array:"tableau"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Entrée invalide : instanceof ${U.expected} attendu, ${G} reçu`;return`Entrée invalide : ${z} attendu, ${G} reçu`}case"invalid_value":if(U.values.length===1)return`Entrée invalide : ${b(U.values[0])} attendu`;return`Option invalide : une valeur parmi ${R(U.values,"|")} attendue`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Trop grand : ${U.origin??"valeur"} doit ${J.verb} ${z}${U.maximum.toString()} ${J.unit??"élément(s)"}`;return`Trop grand : ${U.origin??"valeur"} doit être ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`Trop petit : ${U.origin} doit ${J.verb} ${z}${U.minimum.toString()} ${J.unit}`;return`Trop petit : ${U.origin} doit être ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Chaîne invalide : doit commencer par "${z.prefix}"`;if(z.format==="ends_with")return`Chaîne invalide : doit se terminer par "${z.suffix}"`;if(z.format==="includes")return`Chaîne invalide : doit inclure "${z.includes}"`;if(z.format==="regex")return`Chaîne invalide : doit correspondre au modèle ${z.pattern}`;return`${_[z.format]??U.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${U.divisor}`;case"unrecognized_keys":return`Clé${U.keys.length>1?"s":""} non reconnue${U.keys.length>1?"s":""} : ${R(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 p3(){return{localeError:lA()}}var mA=()=>{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 _={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"},u={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Entrée invalide : attendu instanceof ${U.expected}, reçu ${G}`;return`Entrée invalide : attendu ${z}, reçu ${G}`}case"invalid_value":if(U.values.length===1)return`Entrée invalide : attendu ${b(U.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"≤":"<",J=I(U.origin);if(J)return`Trop grand : attendu que ${U.origin??"la valeur"} ait ${z}${U.maximum.toString()} ${J.unit}`;return`Trop grand : attendu que ${U.origin??"la valeur"} soit ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?"≥":">",J=I(U.origin);if(J)return`Trop petit : attendu que ${U.origin} ait ${z}${U.minimum.toString()} ${J.unit}`;return`Trop petit : attendu que ${U.origin} soit ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Chaîne invalide : doit commencer par "${z.prefix}"`;if(z.format==="ends_with")return`Chaîne invalide : doit se terminer par "${z.suffix}"`;if(z.format==="includes")return`Chaîne invalide : doit inclure "${z.includes}"`;if(z.format==="regex")return`Chaîne invalide : doit correspondre au motif ${z.pattern}`;return`${_[z.format]??U.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${U.divisor}`;case"unrecognized_keys":return`Clé${U.keys.length>1?"s":""} non reconnue${U.keys.length>1?"s":""} : ${R(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 o3(){return{localeError:mA()}}var rA=()=>{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:"גדול"}},_=(q)=>q?$[q]:void 0,u=(q)=>{let N=_(q);if(N)return N.label;return q??$.unknown.label},U=(q)=>`ה${u(q)}`,z=(q)=>{return(_(q)?.gender??"m")==="f"?"צריכה להיות":"צריך להיות"},J=(q)=>{if(!q)return null;return I[q]??null},G={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"}},g={nan:"NaN"};return(q)=>{switch(q.code){case"invalid_type":{let N=q.expected,X=g[N??""]??u(N),Q=F(q.input),H=g[Q]??$[Q]?.label??Q;if(/^[A-Z]/.test(q.expected))return`קלט לא תקין: צריך להיות instanceof ${q.expected}, התקבל ${H}`;return`קלט לא תקין: צריך להיות ${X}, התקבל ${H}`}case"invalid_value":{if(q.values.length===1)return`ערך לא תקין: הערך חייב להיות ${b(q.values[0])}`;let N=q.values.map((H)=>b(H));if(q.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${N[0]} או ${N[1]}`;let X=N[N.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${N.slice(0,-1).join(", ")} או ${X}`}case"too_big":{let N=J(q.origin),X=U(q.origin??"value");if(q.origin==="string")return`${N?.longLabel??"ארוך"} מדי: ${X} צריכה להכיל ${q.maximum.toString()} ${N?.unit??""} ${q.inclusive?"או פחות":"לכל היותר"}`.trim();if(q.origin==="number"){let Y=q.inclusive?`קטן או שווה ל-${q.maximum}`:`קטן מ-${q.maximum}`;return`גדול מדי: ${X} צריך להיות ${Y}`}if(q.origin==="array"||q.origin==="set"){let Y=q.origin==="set"?"צריכה":"צריך",v=q.inclusive?`${q.maximum} ${N?.unit??""} או פחות`:`פחות מ-${q.maximum} ${N?.unit??""}`;return`גדול מדי: ${X} ${Y} להכיל ${v}`.trim()}let Q=q.inclusive?"<=":"<",H=z(q.origin??"value");if(N?.unit)return`${N.longLabel} מדי: ${X} ${H} ${Q}${q.maximum.toString()} ${N.unit}`;return`${N?.longLabel??"גדול"} מדי: ${X} ${H} ${Q}${q.maximum.toString()}`}case"too_small":{let N=J(q.origin),X=U(q.origin??"value");if(q.origin==="string")return`${N?.shortLabel??"קצר"} מדי: ${X} צריכה להכיל ${q.minimum.toString()} ${N?.unit??""} ${q.inclusive?"או יותר":"לפחות"}`.trim();if(q.origin==="number"){let Y=q.inclusive?`גדול או שווה ל-${q.minimum}`:`גדול מ-${q.minimum}`;return`קטן מדי: ${X} צריך להיות ${Y}`}if(q.origin==="array"||q.origin==="set"){let Y=q.origin==="set"?"צריכה":"צריך";if(q.minimum===1&&q.inclusive){let O=q.origin==="set"?"לפחות פריט אחד":"לפחות פריט אחד";return`קטן מדי: ${X} ${Y} להכיל ${O}`}let v=q.inclusive?`${q.minimum} ${N?.unit??""} או יותר`:`יותר מ-${q.minimum} ${N?.unit??""}`;return`קטן מדי: ${X} ${Y} להכיל ${v}`.trim()}let Q=q.inclusive?">=":">",H=z(q.origin??"value");if(N?.unit)return`${N.shortLabel} מדי: ${X} ${H} ${Q}${q.minimum.toString()} ${N.unit}`;return`${N?.shortLabel??"קטן"} מדי: ${X} ${H} ${Q}${q.minimum.toString()}`}case"invalid_format":{let N=q;if(N.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${N.prefix}"`;if(N.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${N.suffix}"`;if(N.format==="includes")return`המחרוזת חייבת לכלול "${N.includes}"`;if(N.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${N.pattern}`;let X=G[N.format],Q=X?.label??N.format,Y=(X?.gender??"m")==="f"?"תקינה":"תקין";return`${Q} לא ${Y}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${q.divisor}`;case"unrecognized_keys":return`מפתח${q.keys.length>1?"ות":""} לא מזוה${q.keys.length>1?"ים":"ה"}: ${R(q.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${U(q.origin??"array")}`;default:return"קלט לא תקין"}}};function t3(){return{localeError:rA()}}var nA=()=>{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 _={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"},u={nan:"NaN",number:"szám",array:"tömb"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Érvénytelen bemenet: a várt érték instanceof ${U.expected}, a kapott érték ${G}`;return`Érvénytelen bemenet: a várt érték ${z}, a kapott érték ${G}`}case"invalid_value":if(U.values.length===1)return`Érvénytelen bemenet: a várt érték ${b(U.values[0])}`;return`Érvénytelen opció: valamelyik érték várt ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Túl nagy: ${U.origin??"érték"} mérete túl nagy ${z}${U.maximum.toString()} ${J.unit??"elem"}`;return`Túl nagy: a bemeneti érték ${U.origin??"érték"} túl nagy: ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`Túl kicsi: a bemeneti érték ${U.origin} mérete túl kicsi ${z}${U.minimum.toString()} ${J.unit}`;return`Túl kicsi: a bemeneti érték ${U.origin} túl kicsi ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Érvénytelen string: "${z.prefix}" értékkel kell kezdődnie`;if(z.format==="ends_with")return`Érvénytelen string: "${z.suffix}" értékkel kell végződnie`;if(z.format==="includes")return`Érvénytelen string: "${z.includes}" értéket kell tartalmaznia`;if(z.format==="regex")return`Érvénytelen string: ${z.pattern} mintának kell megfelelnie`;return`Érvénytelen ${_[z.format]??U.format}`}case"not_multiple_of":return`Érvénytelen szám: ${U.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${U.keys.length>1?"s":""}: ${R(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 a3(){return{localeError:nA()}}function v7($,I,_){return Math.abs($)===1?I:_}function h1($){if(!$)return"";let I=["ա","ե","ը","ի","ո","ու","օ"],_=$[$.length-1];return $+(I.includes(_)?"ն":"ը")}var hA=()=>{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 _={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:"մուտք"},u={nan:"NaN",number:"թիվ",array:"զանգված"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Սխալ մուտքագրում․ սպասվում էր instanceof ${U.expected}, ստացվել է ${G}`;return`Սխալ մուտքագրում․ սպասվում էր ${z}, ստացվել է ${G}`}case"invalid_value":if(U.values.length===1)return`Սխալ մուտքագրում․ սպասվում էր ${b(U.values[1])}`;return`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J){let G=Number(U.maximum),g=v7(G,J.unit.one,J.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${h1(U.origin??"արժեք")} կունենա ${z}${U.maximum.toString()} ${g}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${h1(U.origin??"արժեք")} լինի ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J){let G=Number(U.minimum),g=v7(G,J.unit.one,J.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${h1(U.origin)} կունենա ${z}${U.minimum.toString()} ${g}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${h1(U.origin)} լինի ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Սխալ տող․ պետք է սկսվի "${z.prefix}"-ով`;if(z.format==="ends_with")return`Սխալ տող․ պետք է ավարտվի "${z.suffix}"-ով`;if(z.format==="includes")return`Սխալ տող․ պետք է պարունակի "${z.includes}"`;if(z.format==="regex")return`Սխալ տող․ պետք է համապատասխանի ${z.pattern} ձևաչափին`;return`Սխալ ${_[z.format]??U.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${U.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${U.keys.length>1?"ներ":""}. ${R(U.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${h1(U.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${h1(U.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};function e3(){return{localeError:hA()}}var dA=()=>{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 _={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"},u={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Input tidak valid: diharapkan instanceof ${U.expected}, diterima ${G}`;return`Input tidak valid: diharapkan ${z}, diterima ${G}`}case"invalid_value":if(U.values.length===1)return`Input tidak valid: diharapkan ${b(U.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Terlalu besar: diharapkan ${U.origin??"value"} memiliki ${z}${U.maximum.toString()} ${J.unit??"elemen"}`;return`Terlalu besar: diharapkan ${U.origin??"value"} menjadi ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`Terlalu kecil: diharapkan ${U.origin} memiliki ${z}${U.minimum.toString()} ${J.unit}`;return`Terlalu kecil: diharapkan ${U.origin} menjadi ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`String tidak valid: harus dimulai dengan "${z.prefix}"`;if(z.format==="ends_with")return`String tidak valid: harus berakhir dengan "${z.suffix}"`;if(z.format==="includes")return`String tidak valid: harus menyertakan "${z.includes}"`;if(z.format==="regex")return`String tidak valid: harus sesuai pola ${z.pattern}`;return`${_[z.format]??U.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${U.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${U.keys.length>1?"s":""}: ${R(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 s3(){return{localeError:dA()}}var cA=()=>{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 _={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"},u={nan:"NaN",number:"númer",array:"fylki"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Rangt gildi: Þú slóst inn ${G} þar sem á að vera instanceof ${U.expected}`;return`Rangt gildi: Þú slóst inn ${G} þar sem á að vera ${z}`}case"invalid_value":if(U.values.length===1)return`Rangt gildi: gert ráð fyrir ${b(U.values[0])}`;return`Ógilt val: má vera eitt af eftirfarandi ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Of stórt: gert er ráð fyrir að ${U.origin??"gildi"} hafi ${z}${U.maximum.toString()} ${J.unit??"hluti"}`;return`Of stórt: gert er ráð fyrir að ${U.origin??"gildi"} sé ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`Of lítið: gert er ráð fyrir að ${U.origin} hafi ${z}${U.minimum.toString()} ${J.unit}`;return`Of lítið: gert er ráð fyrir að ${U.origin} sé ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Ógildur strengur: verður að byrja á "${z.prefix}"`;if(z.format==="ends_with")return`Ógildur strengur: verður að enda á "${z.suffix}"`;if(z.format==="includes")return`Ógildur strengur: verður að innihalda "${z.includes}"`;if(z.format==="regex")return`Ógildur strengur: verður að fylgja mynstri ${z.pattern}`;return`Rangt ${_[z.format]??U.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${U.divisor}`;case"unrecognized_keys":return`Óþekkt ${U.keys.length>1?"ir lyklar":"ur lykill"}: ${R(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 $9(){return{localeError:cA()}}var pA=()=>{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 _={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"},u={nan:"NaN",number:"numero",array:"vettore"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Input non valido: atteso instanceof ${U.expected}, ricevuto ${G}`;return`Input non valido: atteso ${z}, ricevuto ${G}`}case"invalid_value":if(U.values.length===1)return`Input non valido: atteso ${b(U.values[0])}`;return`Opzione non valida: atteso uno tra ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Troppo grande: ${U.origin??"valore"} deve avere ${z}${U.maximum.toString()} ${J.unit??"elementi"}`;return`Troppo grande: ${U.origin??"valore"} deve essere ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`Troppo piccolo: ${U.origin} deve avere ${z}${U.minimum.toString()} ${J.unit}`;return`Troppo piccolo: ${U.origin} deve essere ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Stringa non valida: deve iniziare con "${z.prefix}"`;if(z.format==="ends_with")return`Stringa non valida: deve terminare con "${z.suffix}"`;if(z.format==="includes")return`Stringa non valida: deve includere "${z.includes}"`;if(z.format==="regex")return`Stringa non valida: deve corrispondere al pattern ${z.pattern}`;return`Invalid ${_[z.format]??U.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${U.divisor}`;case"unrecognized_keys":return`Chiav${U.keys.length>1?"i":"e"} non riconosciut${U.keys.length>1?"e":"a"}: ${R(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 I9(){return{localeError:pA()}}var oA=()=>{let $={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function I(U){return $[U]??null}let _={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:"入力値"},u={nan:"NaN",number:"数値",array:"配列"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`無効な入力: instanceof ${U.expected}が期待されましたが、${G}が入力されました`;return`無効な入力: ${z}が期待されましたが、${G}が入力されました`}case"invalid_value":if(U.values.length===1)return`無効な入力: ${b(U.values[0])}が期待されました`;return`無効な選択: ${R(U.values,"、")}のいずれかである必要があります`;case"too_big":{let z=U.inclusive?"以下である":"より小さい",J=I(U.origin);if(J)return`大きすぎる値: ${U.origin??"値"}は${U.maximum.toString()}${J.unit??"要素"}${z}必要があります`;return`大きすぎる値: ${U.origin??"値"}は${U.maximum.toString()}${z}必要があります`}case"too_small":{let z=U.inclusive?"以上である":"より大きい",J=I(U.origin);if(J)return`小さすぎる値: ${U.origin}は${U.minimum.toString()}${J.unit}${z}必要があります`;return`小さすぎる値: ${U.origin}は${U.minimum.toString()}${z}必要があります`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`無効な文字列: "${z.prefix}"で始まる必要があります`;if(z.format==="ends_with")return`無効な文字列: "${z.suffix}"で終わる必要があります`;if(z.format==="includes")return`無効な文字列: "${z.includes}"を含む必要があります`;if(z.format==="regex")return`無効な文字列: パターン${z.pattern}に一致する必要があります`;return`無効な${_[z.format]??U.format}`}case"not_multiple_of":return`無効な数値: ${U.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${U.keys.length>1?"群":""}: ${R(U.keys,"、")}`;case"invalid_key":return`${U.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${U.origin}内の無効な値`;default:return"無効な入力"}}};function U9(){return{localeError:oA()}}var tA=()=>{let $={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function I(U){return $[U]??null}let _={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:"შეყვანა"},u={nan:"NaN",number:"რიცხვი",string:"სტრინგი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`არასწორი შეყვანა: მოსალოდნელი instanceof ${U.expected}, მიღებული ${G}`;return`არასწორი შეყვანა: მოსალოდნელი ${z}, მიღებული ${G}`}case"invalid_value":if(U.values.length===1)return`არასწორი შეყვანა: მოსალოდნელი ${b(U.values[0])}`;return`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${R(U.values,"|")}-დან`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`ზედმეტად დიდი: მოსალოდნელი ${U.origin??"მნიშვნელობა"} ${J.verb} ${z}${U.maximum.toString()} ${J.unit}`;return`ზედმეტად დიდი: მოსალოდნელი ${U.origin??"მნიშვნელობა"} იყოს ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`ზედმეტად პატარა: მოსალოდნელი ${U.origin} ${J.verb} ${z}${U.minimum.toString()} ${J.unit}`;return`ზედმეტად პატარა: მოსალოდნელი ${U.origin} იყოს ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`არასწორი სტრინგი: უნდა იწყებოდეს "${z.prefix}"-ით`;if(z.format==="ends_with")return`არასწორი სტრინგი: უნდა მთავრდებოდეს "${z.suffix}"-ით`;if(z.format==="includes")return`არასწორი სტრინგი: უნდა შეიცავდეს "${z.includes}"-ს`;if(z.format==="regex")return`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${z.pattern}`;return`არასწორი ${_[z.format]??U.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${U.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${U.keys.length>1?"ები":"ი"}: ${R(U.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${U.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${U.origin}-ში`;default:return"არასწორი შეყვანა"}}};function _9(){return{localeError:tA()}}var aA=()=>{let $={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function I(U){return $[U]??null}let _={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:"ទិន្នន័យបញ្ចូល"},u={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${U.expected} ប៉ុន្តែទទួលបាន ${G}`;return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${z} ប៉ុន្តែទទួលបាន ${G}`}case"invalid_value":if(U.values.length===1)return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${b(U.values[0])}`;return`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`ធំពេក៖ ត្រូវការ ${U.origin??"តម្លៃ"} ${z} ${U.maximum.toString()} ${J.unit??"ធាតុ"}`;return`ធំពេក៖ ត្រូវការ ${U.origin??"តម្លៃ"} ${z} ${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`តូចពេក៖ ត្រូវការ ${U.origin} ${z} ${U.minimum.toString()} ${J.unit}`;return`តូចពេក៖ ត្រូវការ ${U.origin} ${z} ${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${z.prefix}"`;if(z.format==="ends_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${z.suffix}"`;if(z.format==="includes")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${z.includes}"`;if(z.format==="regex")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${z.pattern}`;return`មិនត្រឹមត្រូវ៖ ${_[z.format]??U.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${U.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${R(U.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${U.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${U.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function LI(){return{localeError:aA()}}function u9(){return LI()}var eA=()=>{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 _={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:"입력"},u={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`잘못된 입력: 예상 타입은 instanceof ${U.expected}, 받은 타입은 ${G}입니다`;return`잘못된 입력: 예상 타입은 ${z}, 받은 타입은 ${G}입니다`}case"invalid_value":if(U.values.length===1)return`잘못된 입력: 값은 ${b(U.values[0])} 이어야 합니다`;return`잘못된 옵션: ${R(U.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let z=U.inclusive?"이하":"미만",J=z==="미만"?"이어야 합니다":"여야 합니다",G=I(U.origin),g=G?.unit??"요소";if(G)return`${U.origin??"값"}이 너무 큽니다: ${U.maximum.toString()}${g} ${z}${J}`;return`${U.origin??"값"}이 너무 큽니다: ${U.maximum.toString()} ${z}${J}`}case"too_small":{let z=U.inclusive?"이상":"초과",J=z==="이상"?"이어야 합니다":"여야 합니다",G=I(U.origin),g=G?.unit??"요소";if(G)return`${U.origin??"값"}이 너무 작습니다: ${U.minimum.toString()}${g} ${z}${J}`;return`${U.origin??"값"}이 너무 작습니다: ${U.minimum.toString()} ${z}${J}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`잘못된 문자열: "${z.prefix}"(으)로 시작해야 합니다`;if(z.format==="ends_with")return`잘못된 문자열: "${z.suffix}"(으)로 끝나야 합니다`;if(z.format==="includes")return`잘못된 문자열: "${z.includes}"을(를) 포함해야 합니다`;if(z.format==="regex")return`잘못된 문자열: 정규식 ${z.pattern} 패턴과 일치해야 합니다`;return`잘못된 ${_[z.format]??U.format}`}case"not_multiple_of":return`잘못된 숫자: ${U.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${R(U.keys,", ")}`;case"invalid_key":return`잘못된 키: ${U.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${U.origin}`;default:return"잘못된 입력"}}};function z9(){return{localeError:eA()}}var VI=($)=>{return $.charAt(0).toUpperCase()+$.slice(1)};function H7($){let I=Math.abs($),_=I%10,u=I%100;if(u>=11&&u<=19||_===0)return"many";if(_===1)return"one";return"few"}var sA=()=>{let $={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function I(U,z,J,G){let g=$[U]??null;if(g===null)return g;return{unit:g.unit[z],verb:g.verb[G][J?"inclusive":"notInclusive"]}}let _={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"},u={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Gautas tipas ${G}, o tikėtasi - instanceof ${U.expected}`;return`Gautas tipas ${G}, o tikėtasi - ${z}`}case"invalid_value":if(U.values.length===1)return`Privalo būti ${b(U.values[0])}`;return`Privalo būti vienas iš ${R(U.values,"|")} pasirinkimų`;case"too_big":{let z=u[U.origin]??U.origin,J=I(U.origin,H7(Number(U.maximum)),U.inclusive??!1,"smaller");if(J?.verb)return`${VI(z??U.origin??"reikšmė")} ${J.verb} ${U.maximum.toString()} ${J.unit??"elementų"}`;let G=U.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${VI(z??U.origin??"reikšmė")} turi būti ${G} ${U.maximum.toString()} ${J?.unit}`}case"too_small":{let z=u[U.origin]??U.origin,J=I(U.origin,H7(Number(U.minimum)),U.inclusive??!1,"bigger");if(J?.verb)return`${VI(z??U.origin??"reikšmė")} ${J.verb} ${U.minimum.toString()} ${J.unit??"elementų"}`;let G=U.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${VI(z??U.origin??"reikšmė")} turi būti ${G} ${U.minimum.toString()} ${J?.unit}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Eilutė privalo prasidėti "${z.prefix}"`;if(z.format==="ends_with")return`Eilutė privalo pasibaigti "${z.suffix}"`;if(z.format==="includes")return`Eilutė privalo įtraukti "${z.includes}"`;if(z.format==="regex")return`Eilutė privalo atitikti ${z.pattern}`;return`Neteisingas ${_[z.format]??U.format}`}case"not_multiple_of":return`Skaičius privalo būti ${U.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${U.keys.length>1?"i":"as"} rakt${U.keys.length>1?"ai":"as"}: ${R(U.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{let z=u[U.origin]??U.origin;return`${VI(z??U.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function J9(){return{localeError:sA()}}var $j=()=>{let $={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function I(U){return $[U]??null}let _={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:"внес"},u={nan:"NaN",number:"број",array:"низа"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Грешен внес: се очекува instanceof ${U.expected}, примено ${G}`;return`Грешен внес: се очекува ${z}, примено ${G}`}case"invalid_value":if(U.values.length===1)return`Invalid input: expected ${b(U.values[0])}`;return`Грешана опција: се очекува една ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Премногу голем: се очекува ${U.origin??"вредноста"} да има ${z}${U.maximum.toString()} ${J.unit??"елементи"}`;return`Премногу голем: се очекува ${U.origin??"вредноста"} да биде ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`Премногу мал: се очекува ${U.origin} да има ${z}${U.minimum.toString()} ${J.unit}`;return`Премногу мал: се очекува ${U.origin} да биде ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Неважечка низа: мора да започнува со "${z.prefix}"`;if(z.format==="ends_with")return`Неважечка низа: мора да завршува со "${z.suffix}"`;if(z.format==="includes")return`Неважечка низа: мора да вклучува "${z.includes}"`;if(z.format==="regex")return`Неважечка низа: мора да одгоара на патернот ${z.pattern}`;return`Invalid ${_[z.format]??U.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${U.divisor}`;case"unrecognized_keys":return`${U.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${R(U.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${U.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${U.origin}`;default:return"Грешен внес"}}};function G9(){return{localeError:$j()}}var Ij=()=>{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 _={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"},u={nan:"NaN",number:"nombor"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Input tidak sah: dijangka instanceof ${U.expected}, diterima ${G}`;return`Input tidak sah: dijangka ${z}, diterima ${G}`}case"invalid_value":if(U.values.length===1)return`Input tidak sah: dijangka ${b(U.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Terlalu besar: dijangka ${U.origin??"nilai"} ${J.verb} ${z}${U.maximum.toString()} ${J.unit??"elemen"}`;return`Terlalu besar: dijangka ${U.origin??"nilai"} adalah ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`Terlalu kecil: dijangka ${U.origin} ${J.verb} ${z}${U.minimum.toString()} ${J.unit}`;return`Terlalu kecil: dijangka ${U.origin} adalah ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`String tidak sah: mesti bermula dengan "${z.prefix}"`;if(z.format==="ends_with")return`String tidak sah: mesti berakhir dengan "${z.suffix}"`;if(z.format==="includes")return`String tidak sah: mesti mengandungi "${z.includes}"`;if(z.format==="regex")return`String tidak sah: mesti sepadan dengan corak ${z.pattern}`;return`${_[z.format]??U.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${U.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${R(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 g9(){return{localeError:Ij()}}var Uj=()=>{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 _={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"},u={nan:"NaN",number:"getal"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Ongeldige invoer: verwacht instanceof ${U.expected}, ontving ${G}`;return`Ongeldige invoer: verwacht ${z}, ontving ${G}`}case"invalid_value":if(U.values.length===1)return`Ongeldige invoer: verwacht ${b(U.values[0])}`;return`Ongeldige optie: verwacht één van ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin),G=U.origin==="date"?"laat":U.origin==="string"?"lang":"groot";if(J)return`Te ${G}: verwacht dat ${U.origin??"waarde"} ${z}${U.maximum.toString()} ${J.unit??"elementen"} ${J.verb}`;return`Te ${G}: verwacht dat ${U.origin??"waarde"} ${z}${U.maximum.toString()} is`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin),G=U.origin==="date"?"vroeg":U.origin==="string"?"kort":"klein";if(J)return`Te ${G}: verwacht dat ${U.origin} ${z}${U.minimum.toString()} ${J.unit} ${J.verb}`;return`Te ${G}: verwacht dat ${U.origin} ${z}${U.minimum.toString()} is`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Ongeldige tekst: moet met "${z.prefix}" beginnen`;if(z.format==="ends_with")return`Ongeldige tekst: moet op "${z.suffix}" eindigen`;if(z.format==="includes")return`Ongeldige tekst: moet "${z.includes}" bevatten`;if(z.format==="regex")return`Ongeldige tekst: moet overeenkomen met patroon ${z.pattern}`;return`Ongeldig: ${_[z.format]??U.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${U.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${U.keys.length>1?"s":""}: ${R(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 q9(){return{localeError:Uj()}}var _j=()=>{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 _={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"},u={nan:"NaN",number:"tall",array:"liste"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Ugyldig input: forventet instanceof ${U.expected}, fikk ${G}`;return`Ugyldig input: forventet ${z}, fikk ${G}`}case"invalid_value":if(U.values.length===1)return`Ugyldig verdi: forventet ${b(U.values[0])}`;return`Ugyldig valg: forventet en av ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`For stor(t): forventet ${U.origin??"value"} til å ha ${z}${U.maximum.toString()} ${J.unit??"elementer"}`;return`For stor(t): forventet ${U.origin??"value"} til å ha ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`For lite(n): forventet ${U.origin} til å ha ${z}${U.minimum.toString()} ${J.unit}`;return`For lite(n): forventet ${U.origin} til å ha ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Ugyldig streng: må starte med "${z.prefix}"`;if(z.format==="ends_with")return`Ugyldig streng: må ende med "${z.suffix}"`;if(z.format==="includes")return`Ugyldig streng: må inneholde "${z.includes}"`;if(z.format==="regex")return`Ugyldig streng: må matche mønsteret ${z.pattern}`;return`Ugyldig ${_[z.format]??U.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${U.divisor}`;case"unrecognized_keys":return`${U.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${R(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 X9(){return{localeError:_j()}}var uj=()=>{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 _={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"},u={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Fâsit giren: umulan instanceof ${U.expected}, alınan ${G}`;return`Fâsit giren: umulan ${z}, alınan ${G}`}case"invalid_value":if(U.values.length===1)return`Fâsit giren: umulan ${b(U.values[0])}`;return`Fâsit tercih: mûteberler ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Fazla büyük: ${U.origin??"value"}, ${z}${U.maximum.toString()} ${J.unit??"elements"} sahip olmalıydı.`;return`Fazla büyük: ${U.origin??"value"}, ${z}${U.maximum.toString()} olmalıydı.`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`Fazla küçük: ${U.origin}, ${z}${U.minimum.toString()} ${J.unit} sahip olmalıydı.`;return`Fazla küçük: ${U.origin}, ${z}${U.minimum.toString()} olmalıydı.`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Fâsit metin: "${z.prefix}" ile başlamalı.`;if(z.format==="ends_with")return`Fâsit metin: "${z.suffix}" ile bitmeli.`;if(z.format==="includes")return`Fâsit metin: "${z.includes}" ihtivâ etmeli.`;if(z.format==="regex")return`Fâsit metin: ${z.pattern} nakşına uymalı.`;return`Fâsit ${_[z.format]??U.format}`}case"not_multiple_of":return`Fâsit sayı: ${U.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${U.keys.length>1?"s":""}: ${R(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 N9(){return{localeError:uj()}}var zj=()=>{let $={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function I(U){return $[U]??null}let _={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:"ورودي"},u={nan:"NaN",number:"عدد",array:"ارې"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`ناسم ورودي: باید instanceof ${U.expected} وای, مګر ${G} ترلاسه شو`;return`ناسم ورودي: باید ${z} وای, مګر ${G} ترلاسه شو`}case"invalid_value":if(U.values.length===1)return`ناسم ورودي: باید ${b(U.values[0])} وای`;return`ناسم انتخاب: باید یو له ${R(U.values,"|")} څخه وای`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`ډیر لوی: ${U.origin??"ارزښت"} باید ${z}${U.maximum.toString()} ${J.unit??"عنصرونه"} ولري`;return`ډیر لوی: ${U.origin??"ارزښت"} باید ${z}${U.maximum.toString()} وي`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`ډیر کوچنی: ${U.origin} باید ${z}${U.minimum.toString()} ${J.unit} ولري`;return`ډیر کوچنی: ${U.origin} باید ${z}${U.minimum.toString()} وي`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`ناسم متن: باید د "${z.prefix}" سره پیل شي`;if(z.format==="ends_with")return`ناسم متن: باید د "${z.suffix}" سره پای ته ورسيږي`;if(z.format==="includes")return`ناسم متن: باید "${z.includes}" ولري`;if(z.format==="regex")return`ناسم متن: باید د ${z.pattern} سره مطابقت ولري`;return`${_[z.format]??U.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${U.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${U.keys.length>1?"کلیډونه":"کلیډ"}: ${R(U.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${U.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${U.origin} کې`;default:return"ناسمه ورودي"}}};function Q9(){return{localeError:zj()}}var Jj=()=>{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 _={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"},u={nan:"NaN",number:"liczba",array:"tablica"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${U.expected}, otrzymano ${G}`;return`Nieprawidłowe dane wejściowe: oczekiwano ${z}, otrzymano ${G}`}case"invalid_value":if(U.values.length===1)return`Nieprawidłowe dane wejściowe: oczekiwano ${b(U.values[0])}`;return`Nieprawidłowa opcja: oczekiwano jednej z wartości ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Za duża wartość: oczekiwano, że ${U.origin??"wartość"} będzie mieć ${z}${U.maximum.toString()} ${J.unit??"elementów"}`;return`Zbyt duż(y/a/e): oczekiwano, że ${U.origin??"wartość"} będzie wynosić ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`Za mała wartość: oczekiwano, że ${U.origin??"wartość"} będzie mieć ${z}${U.minimum.toString()} ${J.unit??"elementów"}`;return`Zbyt mał(y/a/e): oczekiwano, że ${U.origin??"wartość"} będzie wynosić ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Nieprawidłowy ciąg znaków: musi zaczynać się od "${z.prefix}"`;if(z.format==="ends_with")return`Nieprawidłowy ciąg znaków: musi kończyć się na "${z.suffix}"`;if(z.format==="includes")return`Nieprawidłowy ciąg znaków: musi zawierać "${z.includes}"`;if(z.format==="regex")return`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${z.pattern}`;return`Nieprawidłow(y/a/e) ${_[z.format]??U.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${U.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${U.keys.length>1?"s":""}: ${R(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 v9(){return{localeError:Jj()}}var Gj=()=>{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 _={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"},u={nan:"NaN",number:"número",null:"nulo"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Tipo inválido: esperado instanceof ${U.expected}, recebido ${G}`;return`Tipo inválido: esperado ${z}, recebido ${G}`}case"invalid_value":if(U.values.length===1)return`Entrada inválida: esperado ${b(U.values[0])}`;return`Opção inválida: esperada uma das ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Muito grande: esperado que ${U.origin??"valor"} tivesse ${z}${U.maximum.toString()} ${J.unit??"elementos"}`;return`Muito grande: esperado que ${U.origin??"valor"} fosse ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`Muito pequeno: esperado que ${U.origin} tivesse ${z}${U.minimum.toString()} ${J.unit}`;return`Muito pequeno: esperado que ${U.origin} fosse ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Texto inválido: deve começar com "${z.prefix}"`;if(z.format==="ends_with")return`Texto inválido: deve terminar com "${z.suffix}"`;if(z.format==="includes")return`Texto inválido: deve incluir "${z.includes}"`;if(z.format==="regex")return`Texto inválido: deve corresponder ao padrão ${z.pattern}`;return`${_[z.format]??U.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${U.divisor}`;case"unrecognized_keys":return`Chave${U.keys.length>1?"s":""} desconhecida${U.keys.length>1?"s":""}: ${R(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 H9(){return{localeError:Gj()}}function Y7($,I,_,u){let U=Math.abs($),z=U%10,J=U%100;if(J>=11&&J<=19)return u;if(z===1)return I;if(z>=2&&z<=4)return _;return u}var gj=()=>{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 _={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:"ввод"},u={nan:"NaN",number:"число",array:"массив"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Неверный ввод: ожидалось instanceof ${U.expected}, получено ${G}`;return`Неверный ввод: ожидалось ${z}, получено ${G}`}case"invalid_value":if(U.values.length===1)return`Неверный ввод: ожидалось ${b(U.values[0])}`;return`Неверный вариант: ожидалось одно из ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J){let G=Number(U.maximum),g=Y7(G,J.unit.one,J.unit.few,J.unit.many);return`Слишком большое значение: ожидалось, что ${U.origin??"значение"} будет иметь ${z}${U.maximum.toString()} ${g}`}return`Слишком большое значение: ожидалось, что ${U.origin??"значение"} будет ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J){let G=Number(U.minimum),g=Y7(G,J.unit.one,J.unit.few,J.unit.many);return`Слишком маленькое значение: ожидалось, что ${U.origin} будет иметь ${z}${U.minimum.toString()} ${g}`}return`Слишком маленькое значение: ожидалось, что ${U.origin} будет ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Неверная строка: должна начинаться с "${z.prefix}"`;if(z.format==="ends_with")return`Неверная строка: должна заканчиваться на "${z.suffix}"`;if(z.format==="includes")return`Неверная строка: должна содержать "${z.includes}"`;if(z.format==="regex")return`Неверная строка: должна соответствовать шаблону ${z.pattern}`;return`Неверный ${_[z.format]??U.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${U.divisor}`;case"unrecognized_keys":return`Нераспознанн${U.keys.length>1?"ые":"ый"} ключ${U.keys.length>1?"и":""}: ${R(U.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${U.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${U.origin}`;default:return"Неверные входные данные"}}};function Y9(){return{localeError:gj()}}var qj=()=>{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 _={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"},u={nan:"NaN",number:"število",array:"tabela"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Neveljaven vnos: pričakovano instanceof ${U.expected}, prejeto ${G}`;return`Neveljaven vnos: pričakovano ${z}, prejeto ${G}`}case"invalid_value":if(U.values.length===1)return`Neveljaven vnos: pričakovano ${b(U.values[0])}`;return`Neveljavna možnost: pričakovano eno izmed ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Preveliko: pričakovano, da bo ${U.origin??"vrednost"} imelo ${z}${U.maximum.toString()} ${J.unit??"elementov"}`;return`Preveliko: pričakovano, da bo ${U.origin??"vrednost"} ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`Premajhno: pričakovano, da bo ${U.origin} imelo ${z}${U.minimum.toString()} ${J.unit}`;return`Premajhno: pričakovano, da bo ${U.origin} ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Neveljaven niz: mora se začeti z "${z.prefix}"`;if(z.format==="ends_with")return`Neveljaven niz: mora se končati z "${z.suffix}"`;if(z.format==="includes")return`Neveljaven niz: mora vsebovati "${z.includes}"`;if(z.format==="regex")return`Neveljaven niz: mora ustrezati vzorcu ${z.pattern}`;return`Neveljaven ${_[z.format]??U.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${U.divisor}`;case"unrecognized_keys":return`Neprepoznan${U.keys.length>1?"i ključi":" ključ"}: ${R(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 O9(){return{localeError:qj()}}var Xj=()=>{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 _={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"},u={nan:"NaN",number:"antal",array:"lista"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Ogiltig inmatning: förväntat instanceof ${U.expected}, fick ${G}`;return`Ogiltig inmatning: förväntat ${z}, fick ${G}`}case"invalid_value":if(U.values.length===1)return`Ogiltig inmatning: förväntat ${b(U.values[0])}`;return`Ogiltigt val: förväntade en av ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`För stor(t): förväntade ${U.origin??"värdet"} att ha ${z}${U.maximum.toString()} ${J.unit??"element"}`;return`För stor(t): förväntat ${U.origin??"värdet"} att ha ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`För lite(t): förväntade ${U.origin??"värdet"} att ha ${z}${U.minimum.toString()} ${J.unit}`;return`För lite(t): förväntade ${U.origin??"värdet"} att ha ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Ogiltig sträng: måste börja med "${z.prefix}"`;if(z.format==="ends_with")return`Ogiltig sträng: måste sluta med "${z.suffix}"`;if(z.format==="includes")return`Ogiltig sträng: måste innehålla "${z.includes}"`;if(z.format==="regex")return`Ogiltig sträng: måste matcha mönstret "${z.pattern}"`;return`Ogiltig(t) ${_[z.format]??U.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${U.divisor}`;case"unrecognized_keys":return`${U.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${R(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 T9(){return{localeError:Xj()}}var Nj=()=>{let $={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function I(U){return $[U]??null}let _={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"},u={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${U.expected}, பெறப்பட்டது ${G}`;return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${z}, பெறப்பட்டது ${G}`}case"invalid_value":if(U.values.length===1)return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${b(U.values[0])}`;return`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${R(U.values,"|")} இல் ஒன்று`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${U.origin??"மதிப்பு"} ${z}${U.maximum.toString()} ${J.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`;return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${U.origin??"மதிப்பு"} ${z}${U.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${U.origin} ${z}${U.minimum.toString()} ${J.unit} ஆக இருக்க வேண்டும்`;return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${U.origin} ${z}${U.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`தவறான சரம்: "${z.prefix}" இல் தொடங்க வேண்டும்`;if(z.format==="ends_with")return`தவறான சரம்: "${z.suffix}" இல் முடிவடைய வேண்டும்`;if(z.format==="includes")return`தவறான சரம்: "${z.includes}" ஐ உள்ளடக்க வேண்டும்`;if(z.format==="regex")return`தவறான சரம்: ${z.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;return`தவறான ${_[z.format]??U.format}`}case"not_multiple_of":return`தவறான எண்: ${U.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${U.keys.length>1?"கள்":""}: ${R(U.keys,", ")}`;case"invalid_key":return`${U.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${U.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function B9(){return{localeError:Nj()}}var Qj=()=>{let $={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function I(U){return $[U]??null}let _={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:"ข้อมูลที่ป้อน"},u={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${U.expected} แต่ได้รับ ${G}`;return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${z} แต่ได้รับ ${G}`}case"invalid_value":if(U.values.length===1)return`ค่าไม่ถูกต้อง: ควรเป็น ${b(U.values[0])}`;return`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"ไม่เกิน":"น้อยกว่า",J=I(U.origin);if(J)return`เกินกำหนด: ${U.origin??"ค่า"} ควรมี${z} ${U.maximum.toString()} ${J.unit??"รายการ"}`;return`เกินกำหนด: ${U.origin??"ค่า"} ควรมี${z} ${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?"อย่างน้อย":"มากกว่า",J=I(U.origin);if(J)return`น้อยกว่ากำหนด: ${U.origin} ควรมี${z} ${U.minimum.toString()} ${J.unit}`;return`น้อยกว่ากำหนด: ${U.origin} ควรมี${z} ${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${z.prefix}"`;if(z.format==="ends_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${z.suffix}"`;if(z.format==="includes")return`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${z.includes}" อยู่ในข้อความ`;if(z.format==="regex")return`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${z.pattern}`;return`รูปแบบไม่ถูกต้อง: ${_[z.format]??U.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${U.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${R(U.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${U.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${U.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function M9(){return{localeError:Qj()}}var vj=()=>{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 _={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"},u={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Geçersiz değer: beklenen instanceof ${U.expected}, alınan ${G}`;return`Geçersiz değer: beklenen ${z}, alınan ${G}`}case"invalid_value":if(U.values.length===1)return`Geçersiz değer: beklenen ${b(U.values[0])}`;return`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Çok büyük: beklenen ${U.origin??"değer"} ${z}${U.maximum.toString()} ${J.unit??"öğe"}`;return`Çok büyük: beklenen ${U.origin??"değer"} ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`Çok küçük: beklenen ${U.origin} ${z}${U.minimum.toString()} ${J.unit}`;return`Çok küçük: beklenen ${U.origin} ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Geçersiz metin: "${z.prefix}" ile başlamalı`;if(z.format==="ends_with")return`Geçersiz metin: "${z.suffix}" ile bitmeli`;if(z.format==="includes")return`Geçersiz metin: "${z.includes}" içermeli`;if(z.format==="regex")return`Geçersiz metin: ${z.pattern} desenine uymalı`;return`Geçersiz ${_[z.format]??U.format}`}case"not_multiple_of":return`Geçersiz sayı: ${U.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${U.keys.length>1?"lar":""}: ${R(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 K9(){return{localeError:vj()}}var Hj=()=>{let $={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function I(U){return $[U]??null}let _={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:"вхідні дані"},u={nan:"NaN",number:"число",array:"масив"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Неправильні вхідні дані: очікується instanceof ${U.expected}, отримано ${G}`;return`Неправильні вхідні дані: очікується ${z}, отримано ${G}`}case"invalid_value":if(U.values.length===1)return`Неправильні вхідні дані: очікується ${b(U.values[0])}`;return`Неправильна опція: очікується одне з ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Занадто велике: очікується, що ${U.origin??"значення"} ${J.verb} ${z}${U.maximum.toString()} ${J.unit??"елементів"}`;return`Занадто велике: очікується, що ${U.origin??"значення"} буде ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`Занадто мале: очікується, що ${U.origin} ${J.verb} ${z}${U.minimum.toString()} ${J.unit}`;return`Занадто мале: очікується, що ${U.origin} буде ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Неправильний рядок: повинен починатися з "${z.prefix}"`;if(z.format==="ends_with")return`Неправильний рядок: повинен закінчуватися на "${z.suffix}"`;if(z.format==="includes")return`Неправильний рядок: повинен містити "${z.includes}"`;if(z.format==="regex")return`Неправильний рядок: повинен відповідати шаблону ${z.pattern}`;return`Неправильний ${_[z.format]??U.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${U.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${U.keys.length>1?"і":""}: ${R(U.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${U.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${U.origin}`;default:return"Неправильні вхідні дані"}}};function ZI(){return{localeError:Hj()}}function D9(){return ZI()}var Yj=()=>{let $={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function I(U){return $[U]??null}let _={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:"ان پٹ"},u={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`غلط ان پٹ: instanceof ${U.expected} متوقع تھا، ${G} موصول ہوا`;return`غلط ان پٹ: ${z} متوقع تھا، ${G} موصول ہوا`}case"invalid_value":if(U.values.length===1)return`غلط ان پٹ: ${b(U.values[0])} متوقع تھا`;return`غلط آپشن: ${R(U.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`بہت بڑا: ${U.origin??"ویلیو"} کے ${z}${U.maximum.toString()} ${J.unit??"عناصر"} ہونے متوقع تھے`;return`بہت بڑا: ${U.origin??"ویلیو"} کا ${z}${U.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`بہت چھوٹا: ${U.origin} کے ${z}${U.minimum.toString()} ${J.unit} ہونے متوقع تھے`;return`بہت چھوٹا: ${U.origin} کا ${z}${U.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`غلط سٹرنگ: "${z.prefix}" سے شروع ہونا چاہیے`;if(z.format==="ends_with")return`غلط سٹرنگ: "${z.suffix}" پر ختم ہونا چاہیے`;if(z.format==="includes")return`غلط سٹرنگ: "${z.includes}" شامل ہونا چاہیے`;if(z.format==="regex")return`غلط سٹرنگ: پیٹرن ${z.pattern} سے میچ ہونا چاہیے`;return`غلط ${_[z.format]??U.format}`}case"not_multiple_of":return`غلط نمبر: ${U.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${U.keys.length>1?"ز":""}: ${R(U.keys,"، ")}`;case"invalid_key":return`${U.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${U.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function L9(){return{localeError:Yj()}}var Oj=()=>{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 _={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"},u={nan:"NaN",number:"raqam",array:"massiv"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Noto‘g‘ri kirish: kutilgan instanceof ${U.expected}, qabul qilingan ${G}`;return`Noto‘g‘ri kirish: kutilgan ${z}, qabul qilingan ${G}`}case"invalid_value":if(U.values.length===1)return`Noto‘g‘ri kirish: kutilgan ${b(U.values[0])}`;return`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Juda katta: kutilgan ${U.origin??"qiymat"} ${z}${U.maximum.toString()} ${J.unit} ${J.verb}`;return`Juda katta: kutilgan ${U.origin??"qiymat"} ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`Juda kichik: kutilgan ${U.origin} ${z}${U.minimum.toString()} ${J.unit} ${J.verb}`;return`Juda kichik: kutilgan ${U.origin} ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Noto‘g‘ri satr: "${z.prefix}" bilan boshlanishi kerak`;if(z.format==="ends_with")return`Noto‘g‘ri satr: "${z.suffix}" bilan tugashi kerak`;if(z.format==="includes")return`Noto‘g‘ri satr: "${z.includes}" ni o‘z ichiga olishi kerak`;if(z.format==="regex")return`Noto‘g‘ri satr: ${z.pattern} shabloniga mos kelishi kerak`;return`Noto‘g‘ri ${_[z.format]??U.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${U.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${U.keys.length>1?"lar":""}: ${R(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 V9(){return{localeError:Oj()}}var Tj=()=>{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 _={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"},u={nan:"NaN",number:"số",array:"mảng"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Đầu vào không hợp lệ: mong đợi instanceof ${U.expected}, nhận được ${G}`;return`Đầu vào không hợp lệ: mong đợi ${z}, nhận được ${G}`}case"invalid_value":if(U.values.length===1)return`Đầu vào không hợp lệ: mong đợi ${b(U.values[0])}`;return`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Quá lớn: mong đợi ${U.origin??"giá trị"} ${J.verb} ${z}${U.maximum.toString()} ${J.unit??"phần tử"}`;return`Quá lớn: mong đợi ${U.origin??"giá trị"} ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`Quá nhỏ: mong đợi ${U.origin} ${J.verb} ${z}${U.minimum.toString()} ${J.unit}`;return`Quá nhỏ: mong đợi ${U.origin} ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Chuỗi không hợp lệ: phải bắt đầu bằng "${z.prefix}"`;if(z.format==="ends_with")return`Chuỗi không hợp lệ: phải kết thúc bằng "${z.suffix}"`;if(z.format==="includes")return`Chuỗi không hợp lệ: phải bao gồm "${z.includes}"`;if(z.format==="regex")return`Chuỗi không hợp lệ: phải khớp với mẫu ${z.pattern}`;return`${_[z.format]??U.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${U.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${R(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 Z9(){return{localeError:Tj()}}var Bj=()=>{let $={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function I(U){return $[U]??null}let _={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:"输入"},u={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`无效输入:期望 instanceof ${U.expected},实际接收 ${G}`;return`无效输入:期望 ${z},实际接收 ${G}`}case"invalid_value":if(U.values.length===1)return`无效输入:期望 ${b(U.values[0])}`;return`无效选项:期望以下之一 ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`数值过大:期望 ${U.origin??"值"} ${z}${U.maximum.toString()} ${J.unit??"个元素"}`;return`数值过大:期望 ${U.origin??"值"} ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`数值过小:期望 ${U.origin} ${z}${U.minimum.toString()} ${J.unit}`;return`数值过小:期望 ${U.origin} ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`无效字符串:必须以 "${z.prefix}" 开头`;if(z.format==="ends_with")return`无效字符串:必须以 "${z.suffix}" 结尾`;if(z.format==="includes")return`无效字符串:必须包含 "${z.includes}"`;if(z.format==="regex")return`无效字符串:必须满足正则表达式 ${z.pattern}`;return`无效${_[z.format]??U.format}`}case"not_multiple_of":return`无效数字:必须是 ${U.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${R(U.keys,", ")}`;case"invalid_key":return`${U.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${U.origin} 中包含无效值(value)`;default:return"无效输入"}}};function W9(){return{localeError:Bj()}}var Mj=()=>{let $={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function I(U){return $[U]??null}let _={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:"輸入"},u={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`無效的輸入值:預期為 instanceof ${U.expected},但收到 ${G}`;return`無效的輸入值:預期為 ${z},但收到 ${G}`}case"invalid_value":if(U.values.length===1)return`無效的輸入值:預期為 ${b(U.values[0])}`;return`無效的選項:預期為以下其中之一 ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`數值過大:預期 ${U.origin??"值"} 應為 ${z}${U.maximum.toString()} ${J.unit??"個元素"}`;return`數值過大:預期 ${U.origin??"值"} 應為 ${z}${U.maximum.toString()}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`數值過小:預期 ${U.origin} 應為 ${z}${U.minimum.toString()} ${J.unit}`;return`數值過小:預期 ${U.origin} 應為 ${z}${U.minimum.toString()}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`無效的字串:必須以 "${z.prefix}" 開頭`;if(z.format==="ends_with")return`無效的字串:必須以 "${z.suffix}" 結尾`;if(z.format==="includes")return`無效的字串:必須包含 "${z.includes}"`;if(z.format==="regex")return`無效的字串:必須符合格式 ${z.pattern}`;return`無效的 ${_[z.format]??U.format}`}case"not_multiple_of":return`無效的數字:必須為 ${U.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${U.keys.length>1?"們":""}:${R(U.keys,"、")}`;case"invalid_key":return`${U.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${U.origin} 中有無效的值`;default:return"無效的輸入值"}}};function R9(){return{localeError:Mj()}}var Kj=()=>{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 _={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é"},u={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return(U)=>{switch(U.code){case"invalid_type":{let z=u[U.expected]??U.expected,J=F(U.input),G=u[J]??J;if(/^[A-Z]/.test(U.expected))return`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${U.expected}, àmọ̀ a rí ${G}`;return`Ìbáwọlé aṣìṣe: a ní láti fi ${z}, àmọ̀ a rí ${G}`}case"invalid_value":if(U.values.length===1)return`Ìbáwọlé aṣìṣe: a ní láti fi ${b(U.values[0])}`;return`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${R(U.values,"|")}`;case"too_big":{let z=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Tó pọ̀ jù: a ní láti jẹ́ pé ${U.origin??"iye"} ${J.verb} ${z}${U.maximum} ${J.unit}`;return`Tó pọ̀ jù: a ní láti jẹ́ ${z}${U.maximum}`}case"too_small":{let z=U.inclusive?">=":">",J=I(U.origin);if(J)return`Kéré ju: a ní láti jẹ́ pé ${U.origin} ${J.verb} ${z}${U.minimum} ${J.unit}`;return`Kéré ju: a ní láti jẹ́ ${z}${U.minimum}`}case"invalid_format":{let z=U;if(z.format==="starts_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${z.prefix}"`;if(z.format==="ends_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${z.suffix}"`;if(z.format==="includes")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${z.includes}"`;if(z.format==="regex")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${z.pattern}`;return`Aṣìṣe: ${_[z.format]??U.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${U.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${R(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 P9(){return{localeError:Kj()}}var O7,b9=Symbol("ZodOutput"),A9=Symbol("ZodInput");class j9{constructor(){this._map=new WeakMap,this._idmap=new Map}add($,...I){let _=I[0];if(this._map.set($,_),_&&typeof _==="object"&&"id"in _)this._idmap.set(_.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 _={...this.get(I)??{}};delete _.id;let u={..._,...this._map.get($)};return Object.keys(u).length?u:void 0}return this._map.get($)}has($){return this._map.has($)}}function w_(){return new j9}(O7=globalThis).__zod_globalRegistry??(O7.__zod_globalRegistry=w_());var E$=globalThis.__zod_globalRegistry;function F9($,I){return new $({type:"string",...E(I)})}function S9($,I){return new $({type:"string",coerce:!0,...E(I)})}function E_($,I){return new $({type:"string",format:"email",check:"string_format",abort:!1,...E(I)})}function RI($,I){return new $({type:"string",format:"guid",check:"string_format",abort:!1,...E(I)})}function C_($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,...E(I)})}function f_($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...E(I)})}function x_($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...E(I)})}function k_($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...E(I)})}function PI($,I){return new $({type:"string",format:"url",check:"string_format",abort:!1,...E(I)})}function y_($,I){return new $({type:"string",format:"emoji",check:"string_format",abort:!1,...E(I)})}function i_($,I){return new $({type:"string",format:"nanoid",check:"string_format",abort:!1,...E(I)})}function l_($,I){return new $({type:"string",format:"cuid",check:"string_format",abort:!1,...E(I)})}function m_($,I){return new $({type:"string",format:"cuid2",check:"string_format",abort:!1,...E(I)})}function r_($,I){return new $({type:"string",format:"ulid",check:"string_format",abort:!1,...E(I)})}function n_($,I){return new $({type:"string",format:"xid",check:"string_format",abort:!1,...E(I)})}function h_($,I){return new $({type:"string",format:"ksuid",check:"string_format",abort:!1,...E(I)})}function d_($,I){return new $({type:"string",format:"ipv4",check:"string_format",abort:!1,...E(I)})}function c_($,I){return new $({type:"string",format:"ipv6",check:"string_format",abort:!1,...E(I)})}function w9($,I){return new $({type:"string",format:"mac",check:"string_format",abort:!1,...E(I)})}function p_($,I){return new $({type:"string",format:"cidrv4",check:"string_format",abort:!1,...E(I)})}function o_($,I){return new $({type:"string",format:"cidrv6",check:"string_format",abort:!1,...E(I)})}function t_($,I){return new $({type:"string",format:"base64",check:"string_format",abort:!1,...E(I)})}function a_($,I){return new $({type:"string",format:"base64url",check:"string_format",abort:!1,...E(I)})}function e_($,I){return new $({type:"string",format:"e164",check:"string_format",abort:!1,...E(I)})}function s_($,I){return new $({type:"string",format:"jwt",check:"string_format",abort:!1,...E(I)})}var E9={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function C9($,I){return new $({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...E(I)})}function f9($,I){return new $({type:"string",format:"date",check:"string_format",...E(I)})}function x9($,I){return new $({type:"string",format:"time",check:"string_format",precision:null,...E(I)})}function k9($,I){return new $({type:"string",format:"duration",check:"string_format",...E(I)})}function y9($,I){return new $({type:"number",checks:[],...E(I)})}function i9($,I){return new $({type:"number",coerce:!0,checks:[],...E(I)})}function l9($,I){return new $({type:"number",check:"number_format",abort:!1,format:"safeint",...E(I)})}function m9($,I){return new $({type:"number",check:"number_format",abort:!1,format:"float32",...E(I)})}function r9($,I){return new $({type:"number",check:"number_format",abort:!1,format:"float64",...E(I)})}function n9($,I){return new $({type:"number",check:"number_format",abort:!1,format:"int32",...E(I)})}function h9($,I){return new $({type:"number",check:"number_format",abort:!1,format:"uint32",...E(I)})}function d9($,I){return new $({type:"boolean",...E(I)})}function c9($,I){return new $({type:"boolean",coerce:!0,...E(I)})}function p9($,I){return new $({type:"bigint",...E(I)})}function o9($,I){return new $({type:"bigint",coerce:!0,...E(I)})}function t9($,I){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...E(I)})}function a9($,I){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...E(I)})}function e9($,I){return new $({type:"symbol",...E(I)})}function s9($,I){return new $({type:"undefined",...E(I)})}function $G($,I){return new $({type:"null",...E(I)})}function IG($){return new $({type:"any"})}function UG($){return new $({type:"unknown"})}function _G($,I){return new $({type:"never",...E(I)})}function uG($,I){return new $({type:"void",...E(I)})}function zG($,I){return new $({type:"date",...E(I)})}function JG($,I){return new $({type:"date",coerce:!0,...E(I)})}function GG($,I){return new $({type:"nan",...E(I)})}function f4($,I){return new D_({check:"less_than",...E(I),value:$,inclusive:!1})}function u4($,I){return new D_({check:"less_than",...E(I),value:$,inclusive:!0})}function x4($,I){return new L_({check:"greater_than",...E(I),value:$,inclusive:!1})}function h$($,I){return new L_({check:"greater_than",...E(I),value:$,inclusive:!0})}function $2($){return x4(0,$)}function I2($){return f4(0,$)}function U2($){return u4(0,$)}function _2($){return h$(0,$)}function Z6($,I){return new G8({check:"multiple_of",...E(I),value:$})}function W6($,I){return new X8({check:"max_size",...E(I),maximum:$})}function k4($,I){return new N8({check:"min_size",...E(I),minimum:$})}function U1($,I){return new Q8({check:"size_equals",...E(I),size:$})}function _1($,I){return new v8({check:"max_length",...E(I),maximum:$})}function e4($,I){return new H8({check:"min_length",...E(I),minimum:$})}function u1($,I){return new Y8({check:"length_equals",...E(I),length:$})}function d1($,I){return new O8({check:"string_format",format:"regex",...E(I),pattern:$})}function c1($){return new T8({check:"string_format",format:"lowercase",...E($)})}function p1($){return new B8({check:"string_format",format:"uppercase",...E($)})}function o1($,I){return new M8({check:"string_format",format:"includes",...E(I),includes:$})}function t1($,I){return new K8({check:"string_format",format:"starts_with",...E(I),prefix:$})}function a1($,I){return new D8({check:"string_format",format:"ends_with",...E(I),suffix:$})}function u2($,I,_){return new L8({check:"property",property:$,schema:I,...E(_)})}function e1($,I){return new V8({check:"mime_type",mime:$,...E(I)})}function L4($){return new Z8({check:"overwrite",tx:$})}function s1($){return L4((I)=>I.normalize($))}function $0(){return L4(($)=>$.trim())}function I0(){return L4(($)=>$.toLowerCase())}function U0(){return L4(($)=>$.toUpperCase())}function _0(){return L4(($)=>LJ($))}function gG($,I,_){return new $({type:"array",element:I,...E(_)})}function Lj($,I,_){return new $({type:"union",options:I,...E(_)})}function Vj($,I,_){return new $({type:"union",options:I,inclusive:!1,...E(_)})}function Zj($,I,_,u){return new $({type:"union",options:_,discriminator:I,...E(u)})}function Wj($,I,_){return new $({type:"intersection",left:I,right:_})}function Rj($,I,_,u){let U=_ instanceof n;return new $({type:"tuple",items:I,rest:U?_:null,...E(U?u:_)})}function Pj($,I,_,u){return new $({type:"record",keyType:I,valueType:_,...E(u)})}function bj($,I,_,u){return new $({type:"map",keyType:I,valueType:_,...E(u)})}function Aj($,I,_){return new $({type:"set",valueType:I,...E(_)})}function jj($,I,_){let u=Array.isArray(I)?Object.fromEntries(I.map((U)=>[U,U])):I;return new $({type:"enum",entries:u,...E(_)})}function Fj($,I,_){return new $({type:"enum",entries:I,...E(_)})}function Sj($,I,_){return new $({type:"literal",values:Array.isArray(I)?I:[I],...E(_)})}function qG($,I){return new $({type:"file",...E(I)})}function wj($,I){return new $({type:"transform",transform:I})}function Ej($,I){return new $({type:"optional",innerType:I})}function Cj($,I){return new $({type:"nullable",innerType:I})}function fj($,I,_){return new $({type:"default",innerType:I,get defaultValue(){return typeof _==="function"?_():ZJ(_)}})}function xj($,I,_){return new $({type:"nonoptional",innerType:I,...E(_)})}function kj($,I){return new $({type:"success",innerType:I})}function yj($,I,_){return new $({type:"catch",innerType:I,catchValue:typeof _==="function"?_:()=>_})}function ij($,I,_){return new $({type:"pipe",in:I,out:_})}function lj($,I){return new $({type:"readonly",innerType:I})}function mj($,I,_){return new $({type:"template_literal",parts:I,...E(_)})}function rj($,I){return new $({type:"lazy",getter:I})}function nj($,I){return new $({type:"promise",innerType:I})}function XG($,I,_){let u=E(_);return u.abort??(u.abort=!0),new $({type:"custom",check:"custom",fn:I,...u})}function NG($,I,_){return new $({type:"custom",check:"custom",fn:I,...E(_)})}function QG($){let I=T7((_)=>{return _.addIssue=(u)=>{if(typeof u==="string")_.issues.push(y1(u,_.value,I._zod.def));else{let U=u;if(U.fatal)U.continue=!1;U.code??(U.code="custom"),U.input??(U.input=_.value),U.inst??(U.inst=I),U.continue??(U.continue=!I._zod.def.abort),_.issues.push(y1(U))}},$(_.value,_)});return I}function T7($,I){let _=new Q$({check:"custom",...E(I)});return _._zod.check=$,_}function vG($){let I=new Q$({check:"describe"});return I._zod.onattach=[(_)=>{let u=E$.get(_)??{};E$.add(_,{...u,description:$})}],I._zod.check=()=>{},I}function HG($){let I=new Q$({check:"meta"});return I._zod.onattach=[(_)=>{let u=E$.get(_)??{};E$.add(_,{...u,...$})}],I._zod.check=()=>{},I}function YG($,I){let _=E(I),u=_.truthy??["true","1","yes","on","y","enabled"],U=_.falsy??["false","0","no","off","n","disabled"];if(_.case!=="sensitive")u=u.map((H)=>typeof H==="string"?H.toLowerCase():H),U=U.map((H)=>typeof H==="string"?H.toLowerCase():H);let z=new Set(u),J=new Set(U),G=$.Codec??KI,g=$.Boolean??BI,N=new($.String??I1)({type:"string",error:_.error}),X=new g({type:"boolean",error:_.error}),Q=new G({type:"pipe",in:N,out:X,transform:(H,Y)=>{let v=H;if(_.case!=="sensitive")v=v.toLowerCase();if(z.has(v))return!0;else if(J.has(v))return!1;else return Y.issues.push({code:"invalid_value",expected:"stringbool",values:[...z,...J],input:Y.value,inst:Q,continue:!1}),{}},reverseTransform:(H,Y)=>{if(H===!0)return u[0]||"true";else return U[0]||"false"},error:_.error});return Q}function u0($,I,_,u={}){let U=E(u),z={...E(u),check:"string_format",type:"string",format:I,fn:typeof _==="function"?_:(G)=>_.test(G),...U};if(_ instanceof RegExp)z.pattern=_;return new $(z)}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??E$,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 z$($,I,_={path:[],schemaPath:[]}){var u;let U=$._zod.def,z=I.seen.get($);if(z){if(z.count++,_.schemaPath.includes($))z.cycle=_.path;return z.schema}let J={schema:{},count:1,cycle:void 0,path:_.path};I.seen.set($,J);let G=$._zod.toJSONSchema?.();if(G)J.schema=G;else{let N={..._,schemaPath:[..._.schemaPath,$],path:_.path};if($._zod.processJSONSchema)$._zod.processJSONSchema(I,J.schema,N);else{let Q=J.schema,H=I.processors[U.type];if(!H)throw Error(`[toJSONSchema]: Non-representable type encountered: ${U.type}`);H($,I,Q,N)}let X=$._zod.parent;if(X){if(!J.ref)J.ref=X;z$(X,I,N),I.seen.get(X).isParent=!0}}let g=I.metadataRegistry.get($);if(g)Object.assign(J.schema,g);if(I.io==="input"&&d$($))delete J.schema.examples,delete J.schema.default;if(I.io==="input"&&J.schema._prefault)(u=J.schema).default??(u.default=J.schema._prefault);return delete J.schema._prefault,I.seen.get($).schema}function P6($,I){let _=$.seen.get(I);if(!_)throw Error("Unprocessed schema. This is a bug in Zod.");let u=new Map;for(let J of $.seen.entries()){let G=$.metadataRegistry.get(J[0])?.id;if(G){let g=u.get(G);if(g&&g!==J[0])throw Error(`Duplicate schema id "${G}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);u.set(G,J[0])}}let U=(J)=>{let G=$.target==="draft-2020-12"?"$defs":"definitions";if($.external){let X=$.external.registry.get(J[0])?.id,Q=$.external.uri??((Y)=>Y);if(X)return{ref:Q(X)};let H=J[1].defId??J[1].schema.id??`schema${$.counter++}`;return J[1].defId=H,{defId:H,ref:`${Q("__shared")}#/${G}/${H}`}}if(J[1]===_)return{ref:"#"};let q=`${"#"}/${G}/`,N=J[1].schema.id??`__schema${$.counter++}`;return{defId:N,ref:q+N}},z=(J)=>{if(J[1].schema.$ref)return;let G=J[1],{ref:g,defId:q}=U(J);if(G.def={...G.schema},q)G.defId=q;let N=G.schema;for(let X in N)delete N[X];N.$ref=g};if($.cycles==="throw")for(let J of $.seen.entries()){let G=J[1];if(G.cycle)throw Error(`Cycle detected: #/${G.cycle?.join("/")}/<root>
|
|
310
310
|
|
|
311
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let g of $.seen.entries()){let J=g[1];if(I===g[0]){z(g);continue}if($.external){let q=$.external.registry.get(g[0])?.id;if(I!==g[0]&&q){z(g);continue}}if($.metadataRegistry.get(g[0])?.id){z(g);continue}if(J.cycle){z(g);continue}if(J.count>1){if($.reused==="ref"){z(g);continue}}}}function b6($,I){let _=$.seen.get(I);if(!_)throw Error("Unprocessed schema. This is a bug in Zod.");let u=(g)=>{let J=$.seen.get(g);if(J.ref===null)return;let G=J.def??J.schema,q={...G},N=J.ref;if(J.ref=null,N){u(N);let Q=$.seen.get(N),H=Q.schema;if(H.$ref&&($.target==="draft-07"||$.target==="draft-04"||$.target==="openapi-3.0"))G.allOf=G.allOf??[],G.allOf.push(H);else Object.assign(G,H);if(Object.assign(G,q),g._zod.parent===N)for(let v in G){if(v==="$ref"||v==="allOf")continue;if(!(v in q))delete G[v]}if(H.$ref&&Q.def)for(let v in G){if(v==="$ref"||v==="allOf")continue;if(v in Q.def&&JSON.stringify(G[v])===JSON.stringify(Q.def[v]))delete G[v]}}let X=g._zod.parent;if(X&&X!==N){u(X);let Q=$.seen.get(X);if(Q?.schema.$ref){if(G.$ref=Q.schema.$ref,Q.def)for(let H in G){if(H==="$ref"||H==="allOf")continue;if(H in Q.def&&JSON.stringify(G[H])===JSON.stringify(Q.def[H]))delete G[H]}}}$.override({zodSchema:g,jsonSchema:G,path:J.path??[]})};for(let g of[...$.seen.entries()].reverse())u(g[0]);let U={};if($.target==="draft-2020-12")U.$schema="https://json-schema.org/draft/2020-12/schema";else if($.target==="draft-07")U.$schema="http://json-schema.org/draft-07/schema#";else if($.target==="draft-04")U.$schema="http://json-schema.org/draft-04/schema#";else if($.target==="openapi-3.0");if($.external?.uri){let g=$.external.registry.get(I)?.id;if(!g)throw Error("Schema is missing an `id` property");U.$id=$.external.uri(g)}Object.assign(U,_.def??_.schema);let z=$.external?.defs??{};for(let g of $.seen.entries()){let J=g[1];if(J.def&&J.defId)z[J.defId]=J.def}if($.external);else if(Object.keys(z).length>0)if($.target==="draft-2020-12")U.$defs=z;else U.definitions=z;try{let g=JSON.parse(JSON.stringify(U));return Object.defineProperty(g,"~standard",{value:{...I["~standard"],jsonSchema:{input:z0(I,"input",$.processors),output:z0(I,"output",$.processors)}},enumerable:!1,writable:!1}),g}catch(g){throw Error("Error converting schema to JSON.")}}function m$($,I){let _=I??{seen:new Set};if(_.seen.has($))return!1;_.seen.add($);let u=$._zod.def;if(u.type==="transform")return!0;if(u.type==="array")return m$(u.element,_);if(u.type==="set")return m$(u.valueType,_);if(u.type==="lazy")return m$(u.getter(),_);if(u.type==="promise"||u.type==="optional"||u.type==="nonoptional"||u.type==="nullable"||u.type==="readonly"||u.type==="default"||u.type==="prefault")return m$(u.innerType,_);if(u.type==="intersection")return m$(u.left,_)||m$(u.right,_);if(u.type==="record"||u.type==="map")return m$(u.keyType,_)||m$(u.valueType,_);if(u.type==="pipe")return m$(u.in,_)||m$(u.out,_);if(u.type==="object"){for(let U in u.shape)if(m$(u.shape[U],_))return!0;return!1}if(u.type==="union"){for(let U of u.options)if(m$(U,_))return!0;return!1}if(u.type==="tuple"){for(let U of u.items)if(m$(U,_))return!0;if(u.rest&&m$(u.rest,_))return!0;return!1}return!1}var O9=($,I={})=>(_)=>{let u=R6({..._,processors:I});return u$($,u),P6(u,$),b6(u,$)},z0=($,I,_={})=>(u)=>{let{libraryOptions:U,target:z}=u??{},g=R6({...U??{},target:z,io:I,processors:_});return u$($,g),P6(g,$),b6(g,$)};var lj={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},T9=($,I,_,u)=>{let U=_;U.type="string";let{minimum:z,maximum:g,format:J,patterns:G,contentEncoding:q}=$._zod.bag;if(typeof z==="number")U.minLength=z;if(typeof g==="number")U.maxLength=g;if(J){if(U.format=lj[J]??J,U.format==="")delete U.format;if(J==="time")delete U.format}if(q)U.contentEncoding=q;if(G&&G.size>0){let N=[...G];if(N.length===1)U.pattern=N[0].source;else if(N.length>1)U.allOf=[...N.map((X)=>({...I.target==="draft-07"||I.target==="draft-04"||I.target==="openapi-3.0"?{type:"string"}:{},pattern:X.source}))]}},B9=($,I,_,u)=>{let U=_,{minimum:z,maximum:g,format:J,multipleOf:G,exclusiveMaximum:q,exclusiveMinimum:N}=$._zod.bag;if(typeof J==="string"&&J.includes("int"))U.type="integer";else U.type="number";if(typeof N==="number")if(I.target==="draft-04"||I.target==="openapi-3.0")U.minimum=N,U.exclusiveMinimum=!0;else U.exclusiveMinimum=N;if(typeof z==="number"){if(U.minimum=z,typeof N==="number"&&I.target!=="draft-04")if(N>=z)delete U.minimum;else delete U.exclusiveMinimum}if(typeof q==="number")if(I.target==="draft-04"||I.target==="openapi-3.0")U.maximum=q,U.exclusiveMaximum=!0;else U.exclusiveMaximum=q;if(typeof g==="number"){if(U.maximum=g,typeof q==="number"&&I.target!=="draft-04")if(q<=g)delete U.maximum;else delete U.exclusiveMaximum}if(typeof G==="number")U.multipleOf=G},M9=($,I,_,u)=>{_.type="boolean"},K9=($,I,_,u)=>{if(I.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},D9=($,I,_,u)=>{if(I.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},L9=($,I,_,u)=>{if(I.target==="openapi-3.0")_.type="string",_.nullable=!0,_.enum=[null];else _.type="null"},V9=($,I,_,u)=>{if(I.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},Z9=($,I,_,u)=>{if(I.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},W9=($,I,_,u)=>{_.not={}},R9=($,I,_,u)=>{},P9=($,I,_,u)=>{},b9=($,I,_,u)=>{if(I.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},A9=($,I,_,u)=>{let U=$._zod.def,z=JI(U.entries);if(z.every((g)=>typeof g==="number"))_.type="number";if(z.every((g)=>typeof g==="string"))_.type="string";_.enum=z},j9=($,I,_,u)=>{let U=$._zod.def,z=[];for(let g of U.values)if(g===void 0){if(I.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof g==="bigint")if(I.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else z.push(Number(g));else z.push(g);if(z.length===0);else if(z.length===1){let g=z[0];if(_.type=g===null?"null":typeof g,I.target==="draft-04"||I.target==="openapi-3.0")_.enum=[g];else _.const=g}else{if(z.every((g)=>typeof g==="number"))_.type="number";if(z.every((g)=>typeof g==="string"))_.type="string";if(z.every((g)=>typeof g==="boolean"))_.type="boolean";if(z.every((g)=>g===null))_.type="null";_.enum=z}},F9=($,I,_,u)=>{if(I.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},S9=($,I,_,u)=>{let U=_,z=$._zod.pattern;if(!z)throw Error("Pattern not found in template literal");U.type="string",U.pattern=z.source},w9=($,I,_,u)=>{let U=_,z={type:"string",format:"binary",contentEncoding:"binary"},{minimum:g,maximum:J,mime:G}=$._zod.bag;if(g!==void 0)z.minLength=g;if(J!==void 0)z.maxLength=J;if(G)if(G.length===1)z.contentMediaType=G[0],Object.assign(U,z);else Object.assign(U,z),U.anyOf=G.map((q)=>({contentMediaType:q}));else Object.assign(U,z)},E9=($,I,_,u)=>{_.type="boolean"},C9=($,I,_,u)=>{if(I.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},f9=($,I,_,u)=>{if(I.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},x9=($,I,_,u)=>{if(I.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},k9=($,I,_,u)=>{if(I.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},y9=($,I,_,u)=>{if(I.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},i9=($,I,_,u)=>{let U=_,z=$._zod.def,{minimum:g,maximum:J}=$._zod.bag;if(typeof g==="number")U.minItems=g;if(typeof J==="number")U.maxItems=J;U.type="array",U.items=u$(z.element,I,{...u,path:[...u.path,"items"]})},l9=($,I,_,u)=>{let U=_,z=$._zod.def;U.type="object",U.properties={};let g=z.shape;for(let q in g)U.properties[q]=u$(g[q],I,{...u,path:[...u.path,"properties",q]});let J=new Set(Object.keys(g)),G=new Set([...J].filter((q)=>{let N=z.shape[q]._zod;if(I.io==="input")return N.optin===void 0;else return N.optout===void 0}));if(G.size>0)U.required=Array.from(G);if(z.catchall?._zod.def.type==="never")U.additionalProperties=!1;else if(!z.catchall){if(I.io==="output")U.additionalProperties=!1}else if(z.catchall)U.additionalProperties=u$(z.catchall,I,{...u,path:[...u.path,"additionalProperties"]})},z2=($,I,_,u)=>{let U=$._zod.def,z=U.inclusive===!1,g=U.options.map((J,G)=>u$(J,I,{...u,path:[...u.path,z?"oneOf":"anyOf",G]}));if(z)_.oneOf=g;else _.anyOf=g},m9=($,I,_,u)=>{let U=$._zod.def,z=u$(U.left,I,{...u,path:[...u.path,"allOf",0]}),g=u$(U.right,I,{...u,path:[...u.path,"allOf",1]}),J=(q)=>("allOf"in q)&&Object.keys(q).length===1,G=[...J(z)?z.allOf:[z],...J(g)?g.allOf:[g]];_.allOf=G},r9=($,I,_,u)=>{let U=_,z=$._zod.def;U.type="array";let g=I.target==="draft-2020-12"?"prefixItems":"items",J=I.target==="draft-2020-12"?"items":I.target==="openapi-3.0"?"items":"additionalItems",G=z.items.map((Q,H)=>u$(Q,I,{...u,path:[...u.path,g,H]})),q=z.rest?u$(z.rest,I,{...u,path:[...u.path,J,...I.target==="openapi-3.0"?[z.items.length]:[]]}):null;if(I.target==="draft-2020-12"){if(U.prefixItems=G,q)U.items=q}else if(I.target==="openapi-3.0"){if(U.items={anyOf:G},q)U.items.anyOf.push(q);if(U.minItems=G.length,!q)U.maxItems=G.length}else if(U.items=G,q)U.additionalItems=q;let{minimum:N,maximum:X}=$._zod.bag;if(typeof N==="number")U.minItems=N;if(typeof X==="number")U.maxItems=X},n9=($,I,_,u)=>{let U=_,z=$._zod.def;U.type="object";let g=z.keyType,G=g._zod.bag?.patterns;if(z.mode==="loose"&&G&&G.size>0){let N=u$(z.valueType,I,{...u,path:[...u.path,"patternProperties","*"]});U.patternProperties={};for(let X of G)U.patternProperties[X.source]=N}else{if(I.target==="draft-07"||I.target==="draft-2020-12")U.propertyNames=u$(z.keyType,I,{...u,path:[...u.path,"propertyNames"]});U.additionalProperties=u$(z.valueType,I,{...u,path:[...u.path,"additionalProperties"]})}let q=g._zod.values;if(q){let N=[...q].filter((X)=>typeof X==="string"||typeof X==="number");if(N.length>0)U.required=N}},h9=($,I,_,u)=>{let U=$._zod.def,z=u$(U.innerType,I,u),g=I.seen.get($);if(I.target==="openapi-3.0")g.ref=U.innerType,_.nullable=!0;else _.anyOf=[z,{type:"null"}]},d9=($,I,_,u)=>{let U=$._zod.def;u$(U.innerType,I,u);let z=I.seen.get($);z.ref=U.innerType},c9=($,I,_,u)=>{let U=$._zod.def;u$(U.innerType,I,u);let z=I.seen.get($);z.ref=U.innerType,_.default=JSON.parse(JSON.stringify(U.defaultValue))},p9=($,I,_,u)=>{let U=$._zod.def;u$(U.innerType,I,u);let z=I.seen.get($);if(z.ref=U.innerType,I.io==="input")_._prefault=JSON.parse(JSON.stringify(U.defaultValue))},o9=($,I,_,u)=>{let U=$._zod.def;u$(U.innerType,I,u);let z=I.seen.get($);z.ref=U.innerType;let g;try{g=U.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}_.default=g},t9=($,I,_,u)=>{let U=$._zod.def,z=I.io==="input"?U.in._zod.def.type==="transform"?U.out:U.in:U.out;u$(z,I,u);let g=I.seen.get($);g.ref=z},a9=($,I,_,u)=>{let U=$._zod.def;u$(U.innerType,I,u);let z=I.seen.get($);z.ref=U.innerType,_.readOnly=!0},e9=($,I,_,u)=>{let U=$._zod.def;u$(U.innerType,I,u);let z=I.seen.get($);z.ref=U.innerType},g2=($,I,_,u)=>{let U=$._zod.def;u$(U.innerType,I,u);let z=I.seen.get($);z.ref=U.innerType},s9=($,I,_,u)=>{let U=$._zod.innerType;u$(U,I,u);let z=I.seen.get($);z.ref=U},u2={string:T9,number:B9,boolean:M9,bigint:K9,symbol:D9,null:L9,undefined:V9,void:Z9,never:W9,any:R9,unknown:P9,date:b9,enum:A9,literal:j9,nan:F9,template_literal:S9,file:w9,success:E9,custom:C9,function:f9,transform:x9,map:k9,set:y9,array:i9,object:l9,union:z2,intersection:m9,tuple:r9,record:n9,nullable:h9,nonoptional:d9,default:c9,prefault:p9,catch:o9,pipe:t9,readonly:a9,promise:e9,optional:g2,lazy:s9};function J2($,I){if("_idmap"in $){let u=$,U=R6({...I,processors:u2}),z={};for(let G of u._idmap.entries()){let[q,N]=G;u$(N,U)}let g={},J={registry:u,uri:I?.uri,defs:z};U.external=J;for(let G of u._idmap.entries()){let[q,N]=G;P6(U,N),g[q]=b6(U,N)}if(Object.keys(z).length>0){let G=U.target==="draft-2020-12"?"$defs":"definitions";g.__shared={[G]:z}}return{schemas:g}}let _=R6({...I,processors:u2});return u$($,_),P6(_,$),b6(_,$)}class $G{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:u2,target:I,...$?.metadata&&{metadata:$.metadata},...$?.unrepresentable&&{unrepresentable:$.unrepresentable},...$?.override&&{override:$.override},...$?.io&&{io:$.io}})}process($,I={path:[],schemaPath:[]}){return u$($,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}P6(this.ctx,$);let _=b6(this.ctx,$),{"~standard":u,...U}=_;return U}}var Y7={};var bI={};S4(bI,{xor:()=>Jv,xid:()=>j7,void:()=>Iv,uuidv7:()=>L7,uuidv6:()=>D7,uuidv4:()=>K7,uuid:()=>M7,url:()=>V7,unknown:()=>_1,union:()=>E2,undefined:()=>s7,ulid:()=>A7,uint64:()=>a7,uint32:()=>p7,tuple:()=>EG,transform:()=>f2,templateLiteral:()=>Kv,symbol:()=>e7,superRefine:()=>Jq,success:()=>Tv,stringbool:()=>bv,stringFormat:()=>l7,string:()=>v2,strictObject:()=>zv,set:()=>Qv,refine:()=>gq,record:()=>CG,readonly:()=>$q,promise:()=>Dv,preprocess:()=>jv,prefault:()=>cG,pipe:()=>SI,partialRecord:()=>qv,optional:()=>jI,object:()=>uv,number:()=>BG,nullish:()=>Ov,nullable:()=>FI,null:()=>VG,nonoptional:()=>pG,never:()=>w2,nativeEnum:()=>vv,nanoid:()=>R7,nan:()=>Bv,meta:()=>Rv,map:()=>Nv,mac:()=>w7,looseRecord:()=>Xv,looseObject:()=>gv,literal:()=>Hv,lazy:()=>_q,ksuid:()=>F7,keyof:()=>_v,jwt:()=>i7,json:()=>Av,ipv6:()=>E7,ipv4:()=>S7,intersection:()=>SG,int64:()=>t7,int32:()=>c7,int:()=>H2,instanceof:()=>Pv,httpUrl:()=>Z7,hostname:()=>m7,hex:()=>r7,hash:()=>n7,guid:()=>B7,function:()=>Lv,float64:()=>d7,float32:()=>h7,file:()=>Yv,exactOptional:()=>mG,enum:()=>C2,emoji:()=>W7,email:()=>T7,e164:()=>y7,discriminatedUnion:()=>Gv,describe:()=>Wv,date:()=>Uv,custom:()=>Zv,cuid2:()=>b7,cuid:()=>P7,codec:()=>Mv,cidrv6:()=>f7,cidrv4:()=>C7,check:()=>Vv,catch:()=>aG,boolean:()=>MG,bigint:()=>o7,base64url:()=>k7,base64:()=>x7,array:()=>CI,any:()=>$v,_function:()=>Lv,_default:()=>hG,_ZodString:()=>Y2,ZodXor:()=>AG,ZodXID:()=>L2,ZodVoid:()=>PG,ZodUnknown:()=>WG,ZodUnion:()=>xI,ZodUndefined:()=>DG,ZodUUID:()=>y4,ZodURL:()=>wI,ZodULID:()=>D2,ZodType:()=>p,ZodTuple:()=>wG,ZodTransform:()=>iG,ZodTemplateLiteral:()=>Iq,ZodSymbol:()=>KG,ZodSuccess:()=>oG,ZodStringFormat:()=>G$,ZodString:()=>G0,ZodSet:()=>xG,ZodRecord:()=>kI,ZodReadonly:()=>sG,ZodPromise:()=>uq,ZodPrefault:()=>dG,ZodPipe:()=>y2,ZodOptional:()=>x2,ZodObject:()=>fI,ZodNumberFormat:()=>u1,ZodNumber:()=>X0,ZodNullable:()=>rG,ZodNull:()=>LG,ZodNonOptional:()=>k2,ZodNever:()=>RG,ZodNanoID:()=>B2,ZodNaN:()=>eG,ZodMap:()=>fG,ZodMAC:()=>TG,ZodLiteral:()=>kG,ZodLazy:()=>Uq,ZodKSUID:()=>V2,ZodJWT:()=>F2,ZodIntersection:()=>FG,ZodIPv6:()=>W2,ZodIPv4:()=>Z2,ZodGUID:()=>AI,ZodFunction:()=>zq,ZodFile:()=>yG,ZodExactOptional:()=>lG,ZodEnum:()=>J0,ZodEmoji:()=>T2,ZodEmail:()=>O2,ZodE164:()=>j2,ZodDiscriminatedUnion:()=>jG,ZodDefault:()=>nG,ZodDate:()=>EI,ZodCustomStringFormat:()=>q0,ZodCustom:()=>yI,ZodCodec:()=>i2,ZodCatch:()=>tG,ZodCUID2:()=>K2,ZodCUID:()=>M2,ZodCIDRv6:()=>P2,ZodCIDRv4:()=>R2,ZodBoolean:()=>N0,ZodBigIntFormat:()=>S2,ZodBigInt:()=>Q0,ZodBase64URL:()=>A2,ZodBase64:()=>b2,ZodArray:()=>bG,ZodAny:()=>ZG});var G2={};S4(G2,{uppercase:()=>p1,trim:()=>$0,toUpperCase:()=>U0,toLowerCase:()=>I0,startsWith:()=>t1,slugify:()=>_0,size:()=>$1,regex:()=>d1,property:()=>_2,positive:()=>s_,overwrite:()=>D4,normalize:()=>s1,nonpositive:()=>I2,nonnegative:()=>U2,negative:()=>$2,multipleOf:()=>Z6,minSize:()=>k4,minLength:()=>e4,mime:()=>e1,maxSize:()=>W6,maxLength:()=>I1,lte:()=>_4,lt:()=>f4,lowercase:()=>c1,length:()=>U1,includes:()=>o1,gte:()=>l$,gt:()=>x4,endsWith:()=>a1});var g0={};S4(g0,{time:()=>_G,duration:()=>uG,datetime:()=>IG,date:()=>UG,ZodISOTime:()=>N2,ZodISODuration:()=>Q2,ZodISODateTime:()=>q2,ZodISODate:()=>X2});var q2=M("ZodISODateTime",($,I)=>{kJ.init($,I),G$.init($,I)});function IG($){return C3(q2,$)}var X2=M("ZodISODate",($,I)=>{yJ.init($,I),G$.init($,I)});function UG($){return f3(X2,$)}var N2=M("ZodISOTime",($,I)=>{iJ.init($,I),G$.init($,I)});function _G($){return x3(N2,$)}var Q2=M("ZodISODuration",($,I)=>{lJ.init($,I),G$.init($,I)});function uG($){return k3(Q2,$)}var O7=($,I)=>{QI.init($,I),$.name="ZodError",Object.defineProperties($,{format:{value:(_)=>HI($,_)},flatten:{value:(_)=>vI($,_)},addIssue:{value:(_)=>{$.issues.push(_),$.message=JSON.stringify($.issues,x1,2)}},addIssues:{value:(_)=>{$.issues.push(..._),$.message=JSON.stringify($.issues,x1,2)}},isEmpty:{get(){return $.issues.length===0}}})},rj=M("ZodError",O7),e$=M("ZodError",O7,{Parent:Error});var zG=i1(e$),gG=l1(e$),JG=m1(e$),GG=r1(e$),qG=N_(e$),XG=Q_(e$),NG=v_(e$),QG=H_(e$),vG=Y_(e$),HG=O_(e$),YG=T_(e$),OG=B_(e$);var p=M("ZodType",($,I)=>{return d.init($,I),Object.assign($["~standard"],{jsonSchema:{input:z0($,"input"),output:z0($,"output")}}),$.toJSONSchema=O9($,{}),$.def=I,$.type=I.type,Object.defineProperty($,"_def",{value:I}),$.check=(..._)=>{return $.clone(S.mergeDefs(I,{checks:[...I.checks??[],..._.map((u)=>typeof u==="function"?{_zod:{check:u,def:{check:"custom"},onattach:[]}}:u)]}),{parent:!0})},$.with=$.check,$.clone=(_,u)=>i$($,_,u),$.brand=()=>$,$.register=(_,u)=>{return _.add($,u),$},$.parse=(_,u)=>zG($,_,u,{callee:$.parse}),$.safeParse=(_,u)=>JG($,_,u),$.parseAsync=async(_,u)=>gG($,_,u,{callee:$.parseAsync}),$.safeParseAsync=async(_,u)=>GG($,_,u),$.spa=$.safeParseAsync,$.encode=(_,u)=>qG($,_,u),$.decode=(_,u)=>XG($,_,u),$.encodeAsync=async(_,u)=>NG($,_,u),$.decodeAsync=async(_,u)=>QG($,_,u),$.safeEncode=(_,u)=>vG($,_,u),$.safeDecode=(_,u)=>HG($,_,u),$.safeEncodeAsync=async(_,u)=>YG($,_,u),$.safeDecodeAsync=async(_,u)=>OG($,_,u),$.refine=(_,u)=>$.check(gq(_,u)),$.superRefine=(_)=>$.check(Jq(_)),$.overwrite=(_)=>$.check(D4(_)),$.optional=()=>jI($),$.exactOptional=()=>mG($),$.nullable=()=>FI($),$.nullish=()=>jI(FI($)),$.nonoptional=(_)=>pG($,_),$.array=()=>CI($),$.or=(_)=>E2([$,_]),$.and=(_)=>SG($,_),$.transform=(_)=>SI($,f2(_)),$.default=(_)=>hG($,_),$.prefault=(_)=>cG($,_),$.catch=(_)=>aG($,_),$.pipe=(_)=>SI($,_),$.readonly=()=>$q($),$.describe=(_)=>{let u=$.clone();return S$.add(u,{description:_}),u},Object.defineProperty($,"description",{get(){return S$.get($)?.description},configurable:!0}),$.meta=(..._)=>{if(_.length===0)return S$.get($);let u=$.clone();return S$.add(u,_[0]),u},$.isOptional=()=>$.safeParse(void 0).success,$.isNullable=()=>$.safeParse(null).success,$.apply=(_)=>_($),$}),Y2=M("_ZodString",($,I)=>{s6.init($,I),p.init($,I),$._zod.processJSONSchema=(u,U,z)=>T9($,u,U,z);let _=$._zod.bag;$.format=_.format??null,$.minLength=_.minimum??null,$.maxLength=_.maximum??null,$.regex=(...u)=>$.check(d1(...u)),$.includes=(...u)=>$.check(o1(...u)),$.startsWith=(...u)=>$.check(t1(...u)),$.endsWith=(...u)=>$.check(a1(...u)),$.min=(...u)=>$.check(e4(...u)),$.max=(...u)=>$.check(I1(...u)),$.length=(...u)=>$.check(U1(...u)),$.nonempty=(...u)=>$.check(e4(1,...u)),$.lowercase=(u)=>$.check(c1(u)),$.uppercase=(u)=>$.check(p1(u)),$.trim=()=>$.check($0()),$.normalize=(...u)=>$.check(s1(...u)),$.toLowerCase=()=>$.check(I0()),$.toUpperCase=()=>$.check(U0()),$.slugify=()=>$.check(_0())}),G0=M("ZodString",($,I)=>{s6.init($,I),Y2.init($,I),$.email=(_)=>$.check(w_(O2,_)),$.url=(_)=>$.check(PI(wI,_)),$.jwt=(_)=>$.check(e_(F2,_)),$.emoji=(_)=>$.check(k_(T2,_)),$.guid=(_)=>$.check(RI(AI,_)),$.uuid=(_)=>$.check(E_(y4,_)),$.uuidv4=(_)=>$.check(C_(y4,_)),$.uuidv6=(_)=>$.check(f_(y4,_)),$.uuidv7=(_)=>$.check(x_(y4,_)),$.nanoid=(_)=>$.check(y_(B2,_)),$.guid=(_)=>$.check(RI(AI,_)),$.cuid=(_)=>$.check(i_(M2,_)),$.cuid2=(_)=>$.check(l_(K2,_)),$.ulid=(_)=>$.check(m_(D2,_)),$.base64=(_)=>$.check(o_(b2,_)),$.base64url=(_)=>$.check(t_(A2,_)),$.xid=(_)=>$.check(r_(L2,_)),$.ksuid=(_)=>$.check(n_(V2,_)),$.ipv4=(_)=>$.check(h_(Z2,_)),$.ipv6=(_)=>$.check(d_(W2,_)),$.cidrv4=(_)=>$.check(c_(R2,_)),$.cidrv6=(_)=>$.check(p_(P2,_)),$.e164=(_)=>$.check(a_(j2,_)),$.datetime=(_)=>$.check(IG(_)),$.date=(_)=>$.check(UG(_)),$.time=(_)=>$.check(_G(_)),$.duration=(_)=>$.check(uG(_))});function v2($){return F3(G0,$)}var G$=M("ZodStringFormat",($,I)=>{J$.init($,I),Y2.init($,I)}),O2=M("ZodEmail",($,I)=>{AJ.init($,I),G$.init($,I)});function T7($){return w_(O2,$)}var AI=M("ZodGUID",($,I)=>{PJ.init($,I),G$.init($,I)});function B7($){return RI(AI,$)}var y4=M("ZodUUID",($,I)=>{bJ.init($,I),G$.init($,I)});function M7($){return E_(y4,$)}function K7($){return C_(y4,$)}function D7($){return f_(y4,$)}function L7($){return x_(y4,$)}var wI=M("ZodURL",($,I)=>{jJ.init($,I),G$.init($,I)});function V7($){return PI(wI,$)}function Z7($){return PI(wI,{protocol:/^https?$/,hostname:v4.domain,...S.normalizeParams($)})}var T2=M("ZodEmoji",($,I)=>{FJ.init($,I),G$.init($,I)});function W7($){return k_(T2,$)}var B2=M("ZodNanoID",($,I)=>{SJ.init($,I),G$.init($,I)});function R7($){return y_(B2,$)}var M2=M("ZodCUID",($,I)=>{wJ.init($,I),G$.init($,I)});function P7($){return i_(M2,$)}var K2=M("ZodCUID2",($,I)=>{EJ.init($,I),G$.init($,I)});function b7($){return l_(K2,$)}var D2=M("ZodULID",($,I)=>{CJ.init($,I),G$.init($,I)});function A7($){return m_(D2,$)}var L2=M("ZodXID",($,I)=>{fJ.init($,I),G$.init($,I)});function j7($){return r_(L2,$)}var V2=M("ZodKSUID",($,I)=>{xJ.init($,I),G$.init($,I)});function F7($){return n_(V2,$)}var Z2=M("ZodIPv4",($,I)=>{mJ.init($,I),G$.init($,I)});function S7($){return h_(Z2,$)}var TG=M("ZodMAC",($,I)=>{nJ.init($,I),G$.init($,I)});function w7($){return w3(TG,$)}var W2=M("ZodIPv6",($,I)=>{rJ.init($,I),G$.init($,I)});function E7($){return d_(W2,$)}var R2=M("ZodCIDRv4",($,I)=>{hJ.init($,I),G$.init($,I)});function C7($){return c_(R2,$)}var P2=M("ZodCIDRv6",($,I)=>{dJ.init($,I),G$.init($,I)});function f7($){return p_(P2,$)}var b2=M("ZodBase64",($,I)=>{pJ.init($,I),G$.init($,I)});function x7($){return o_(b2,$)}var A2=M("ZodBase64URL",($,I)=>{oJ.init($,I),G$.init($,I)});function k7($){return t_(A2,$)}var j2=M("ZodE164",($,I)=>{tJ.init($,I),G$.init($,I)});function y7($){return a_(j2,$)}var F2=M("ZodJWT",($,I)=>{aJ.init($,I),G$.init($,I)});function i7($){return e_(F2,$)}var q0=M("ZodCustomStringFormat",($,I)=>{eJ.init($,I),G$.init($,I)});function l7($,I,_={}){return u0(q0,$,I,_)}function m7($){return u0(q0,"hostname",v4.hostname,$)}function r7($){return u0(q0,"hex",v4.hex,$)}function n7($,I){let _=I?.enc??"hex",u=`${$}_${_}`,U=v4[u];if(!U)throw Error(`Unrecognized hash format: ${u}`);return u0(q0,u,U,I)}var X0=M("ZodNumber",($,I)=>{b_.init($,I),p.init($,I),$._zod.processJSONSchema=(u,U,z)=>B9($,u,U,z),$.gt=(u,U)=>$.check(x4(u,U)),$.gte=(u,U)=>$.check(l$(u,U)),$.min=(u,U)=>$.check(l$(u,U)),$.lt=(u,U)=>$.check(f4(u,U)),$.lte=(u,U)=>$.check(_4(u,U)),$.max=(u,U)=>$.check(_4(u,U)),$.int=(u)=>$.check(H2(u)),$.safe=(u)=>$.check(H2(u)),$.positive=(u)=>$.check(x4(0,u)),$.nonnegative=(u)=>$.check(l$(0,u)),$.negative=(u)=>$.check(f4(0,u)),$.nonpositive=(u)=>$.check(_4(0,u)),$.multipleOf=(u,U)=>$.check(Z6(u,U)),$.step=(u,U)=>$.check(Z6(u,U)),$.finite=()=>$;let _=$._zod.bag;$.minValue=Math.max(_.minimum??Number.NEGATIVE_INFINITY,_.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,$.maxValue=Math.min(_.maximum??Number.POSITIVE_INFINITY,_.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,$.isInt=(_.format??"").includes("int")||Number.isSafeInteger(_.multipleOf??0.5),$.isFinite=!0,$.format=_.format??null});function BG($){return y3(X0,$)}var u1=M("ZodNumberFormat",($,I)=>{sJ.init($,I),X0.init($,I)});function H2($){return l3(u1,$)}function h7($){return m3(u1,$)}function d7($){return r3(u1,$)}function c7($){return n3(u1,$)}function p7($){return h3(u1,$)}var N0=M("ZodBoolean",($,I)=>{BI.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>M9($,_,u,U)});function MG($){return d3(N0,$)}var Q0=M("ZodBigInt",($,I)=>{A_.init($,I),p.init($,I),$._zod.processJSONSchema=(u,U,z)=>K9($,u,U,z),$.gte=(u,U)=>$.check(l$(u,U)),$.min=(u,U)=>$.check(l$(u,U)),$.gt=(u,U)=>$.check(x4(u,U)),$.gte=(u,U)=>$.check(l$(u,U)),$.min=(u,U)=>$.check(l$(u,U)),$.lt=(u,U)=>$.check(f4(u,U)),$.lte=(u,U)=>$.check(_4(u,U)),$.max=(u,U)=>$.check(_4(u,U)),$.positive=(u)=>$.check(x4(BigInt(0),u)),$.negative=(u)=>$.check(f4(BigInt(0),u)),$.nonpositive=(u)=>$.check(_4(BigInt(0),u)),$.nonnegative=(u)=>$.check(l$(BigInt(0),u)),$.multipleOf=(u,U)=>$.check(Z6(u,U));let _=$._zod.bag;$.minValue=_.minimum??null,$.maxValue=_.maximum??null,$.format=_.format??null});function o7($){return p3(Q0,$)}var S2=M("ZodBigIntFormat",($,I)=>{$8.init($,I),Q0.init($,I)});function t7($){return t3(S2,$)}function a7($){return a3(S2,$)}var KG=M("ZodSymbol",($,I)=>{I8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>D9($,_,u,U)});function e7($){return e3(KG,$)}var DG=M("ZodUndefined",($,I)=>{U8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>V9($,_,u,U)});function s7($){return s3(DG,$)}var LG=M("ZodNull",($,I)=>{_8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>L9($,_,u,U)});function VG($){return $9(LG,$)}var ZG=M("ZodAny",($,I)=>{u8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>R9($,_,u,U)});function $v(){return I9(ZG)}var WG=M("ZodUnknown",($,I)=>{z8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>P9($,_,u,U)});function _1(){return U9(WG)}var RG=M("ZodNever",($,I)=>{g8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>W9($,_,u,U)});function w2($){return _9(RG,$)}var PG=M("ZodVoid",($,I)=>{J8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>Z9($,_,u,U)});function Iv($){return u9(PG,$)}var EI=M("ZodDate",($,I)=>{G8.init($,I),p.init($,I),$._zod.processJSONSchema=(u,U,z)=>b9($,u,U,z),$.min=(u,U)=>$.check(l$(u,U)),$.max=(u,U)=>$.check(_4(u,U));let _=$._zod.bag;$.minDate=_.minimum?new Date(_.minimum):null,$.maxDate=_.maximum?new Date(_.maximum):null});function Uv($){return z9(EI,$)}var bG=M("ZodArray",($,I)=>{q8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>i9($,_,u,U),$.element=I.element,$.min=(_,u)=>$.check(e4(_,u)),$.nonempty=(_)=>$.check(e4(1,_)),$.max=(_,u)=>$.check(I1(_,u)),$.length=(_,u)=>$.check(U1(_,u)),$.unwrap=()=>$.element});function CI($,I){return G9(bG,$,I)}function _v($){let I=$._zod.def.shape;return C2(Object.keys(I))}var fI=M("ZodObject",($,I)=>{X8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>l9($,_,u,U),S.defineLazy($,"shape",()=>{return I.shape}),$.keyof=()=>C2(Object.keys($._zod.def.shape)),$.catchall=(_)=>$.clone({...$._zod.def,catchall:_}),$.passthrough=()=>$.clone({...$._zod.def,catchall:_1()}),$.loose=()=>$.clone({...$._zod.def,catchall:_1()}),$.strict=()=>$.clone({...$._zod.def,catchall:w2()}),$.strip=()=>$.clone({...$._zod.def,catchall:void 0}),$.extend=(_)=>{return S.extend($,_)},$.safeExtend=(_)=>{return S.safeExtend($,_)},$.merge=(_)=>S.merge($,_),$.pick=(_)=>S.pick($,_),$.omit=(_)=>S.omit($,_),$.partial=(..._)=>S.partial(x2,$,_[0]),$.required=(..._)=>S.required(k2,$,_[0])});function uv($,I){let _={type:"object",shape:$??{},...S.normalizeParams(I)};return new fI(_)}function zv($,I){return new fI({type:"object",shape:$,catchall:w2(),...S.normalizeParams(I)})}function gv($,I){return new fI({type:"object",shape:$,catchall:_1(),...S.normalizeParams(I)})}var xI=M("ZodUnion",($,I)=>{MI.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>z2($,_,u,U),$.options=I.options});function E2($,I){return new xI({type:"union",options:$,...S.normalizeParams(I)})}var AG=M("ZodXor",($,I)=>{xI.init($,I),N8.init($,I),$._zod.processJSONSchema=(_,u,U)=>z2($,_,u,U),$.options=I.options});function Jv($,I){return new AG({type:"union",options:$,inclusive:!1,...S.normalizeParams(I)})}var jG=M("ZodDiscriminatedUnion",($,I)=>{xI.init($,I),Q8.init($,I)});function Gv($,I,_){return new jG({type:"union",options:I,discriminator:$,...S.normalizeParams(_)})}var FG=M("ZodIntersection",($,I)=>{v8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>m9($,_,u,U)});function SG($,I){return new FG({type:"intersection",left:$,right:I})}var wG=M("ZodTuple",($,I)=>{j_.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>r9($,_,u,U),$.rest=(_)=>$.clone({...$._zod.def,rest:_})});function EG($,I,_){let u=I instanceof d,U=u?_:I;return new wG({type:"tuple",items:$,rest:u?I:null,...S.normalizeParams(U)})}var kI=M("ZodRecord",($,I)=>{H8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>n9($,_,u,U),$.keyType=I.keyType,$.valueType=I.valueType});function CG($,I,_){return new kI({type:"record",keyType:$,valueType:I,...S.normalizeParams(_)})}function qv($,I,_){let u=i$($);return u._zod.values=void 0,new kI({type:"record",keyType:u,valueType:I,...S.normalizeParams(_)})}function Xv($,I,_){return new kI({type:"record",keyType:$,valueType:I,mode:"loose",...S.normalizeParams(_)})}var fG=M("ZodMap",($,I)=>{Y8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>k9($,_,u,U),$.keyType=I.keyType,$.valueType=I.valueType,$.min=(..._)=>$.check(k4(..._)),$.nonempty=(_)=>$.check(k4(1,_)),$.max=(..._)=>$.check(W6(..._)),$.size=(..._)=>$.check($1(..._))});function Nv($,I,_){return new fG({type:"map",keyType:$,valueType:I,...S.normalizeParams(_)})}var xG=M("ZodSet",($,I)=>{O8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>y9($,_,u,U),$.min=(..._)=>$.check(k4(..._)),$.nonempty=(_)=>$.check(k4(1,_)),$.max=(..._)=>$.check(W6(..._)),$.size=(..._)=>$.check($1(..._))});function Qv($,I){return new xG({type:"set",valueType:$,...S.normalizeParams(I)})}var J0=M("ZodEnum",($,I)=>{T8.init($,I),p.init($,I),$._zod.processJSONSchema=(u,U,z)=>A9($,u,U,z),$.enum=I.entries,$.options=Object.values(I.entries);let _=new Set(Object.keys(I.entries));$.extract=(u,U)=>{let z={};for(let g of u)if(_.has(g))z[g]=I.entries[g];else throw Error(`Key ${g} not found in enum`);return new J0({...I,checks:[],...S.normalizeParams(U),entries:z})},$.exclude=(u,U)=>{let z={...I.entries};for(let g of u)if(_.has(g))delete z[g];else throw Error(`Key ${g} not found in enum`);return new J0({...I,checks:[],...S.normalizeParams(U),entries:z})}});function C2($,I){let _=Array.isArray($)?Object.fromEntries($.map((u)=>[u,u])):$;return new J0({type:"enum",entries:_,...S.normalizeParams(I)})}function vv($,I){return new J0({type:"enum",entries:$,...S.normalizeParams(I)})}var kG=M("ZodLiteral",($,I)=>{B8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>j9($,_,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 Hv($,I){return new kG({type:"literal",values:Array.isArray($)?$:[$],...S.normalizeParams(I)})}var yG=M("ZodFile",($,I)=>{M8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>w9($,_,u,U),$.min=(_,u)=>$.check(k4(_,u)),$.max=(_,u)=>$.check(W6(_,u)),$.mime=(_,u)=>$.check(e1(Array.isArray(_)?_:[_],u))});function Yv($){return q9(yG,$)}var iG=M("ZodTransform",($,I)=>{K8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>x9($,_,u,U),$._zod.parse=(_,u)=>{if(u.direction==="backward")throw new t6($.constructor.name);_.addIssue=(z)=>{if(typeof z==="string")_.issues.push(S.issue(z,_.value,I));else{let g=z;if(g.fatal)g.continue=!1;g.code??(g.code="custom"),g.input??(g.input=_.value),g.inst??(g.inst=$),_.issues.push(S.issue(g))}};let U=I.transform(_.value,_);if(U instanceof Promise)return U.then((z)=>{return _.value=z,_});return _.value=U,_}});function f2($){return new iG({type:"transform",transform:$})}var x2=M("ZodOptional",($,I)=>{F_.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>g2($,_,u,U),$.unwrap=()=>$._zod.def.innerType});function jI($){return new x2({type:"optional",innerType:$})}var lG=M("ZodExactOptional",($,I)=>{D8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>g2($,_,u,U),$.unwrap=()=>$._zod.def.innerType});function mG($){return new lG({type:"optional",innerType:$})}var rG=M("ZodNullable",($,I)=>{L8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>h9($,_,u,U),$.unwrap=()=>$._zod.def.innerType});function FI($){return new rG({type:"nullable",innerType:$})}function Ov($){return jI(FI($))}var nG=M("ZodDefault",($,I)=>{V8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>c9($,_,u,U),$.unwrap=()=>$._zod.def.innerType,$.removeDefault=$.unwrap});function hG($,I){return new nG({type:"default",innerType:$,get defaultValue(){return typeof I==="function"?I():S.shallowClone(I)}})}var dG=M("ZodPrefault",($,I)=>{Z8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>p9($,_,u,U),$.unwrap=()=>$._zod.def.innerType});function cG($,I){return new dG({type:"prefault",innerType:$,get defaultValue(){return typeof I==="function"?I():S.shallowClone(I)}})}var k2=M("ZodNonOptional",($,I)=>{W8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>d9($,_,u,U),$.unwrap=()=>$._zod.def.innerType});function pG($,I){return new k2({type:"nonoptional",innerType:$,...S.normalizeParams(I)})}var oG=M("ZodSuccess",($,I)=>{R8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>E9($,_,u,U),$.unwrap=()=>$._zod.def.innerType});function Tv($){return new oG({type:"success",innerType:$})}var tG=M("ZodCatch",($,I)=>{P8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>o9($,_,u,U),$.unwrap=()=>$._zod.def.innerType,$.removeCatch=$.unwrap});function aG($,I){return new tG({type:"catch",innerType:$,catchValue:typeof I==="function"?I:()=>I})}var eG=M("ZodNaN",($,I)=>{b8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>F9($,_,u,U)});function Bv($){return J9(eG,$)}var y2=M("ZodPipe",($,I)=>{A8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>t9($,_,u,U),$.in=I.in,$.out=I.out});function SI($,I){return new y2({type:"pipe",in:$,out:I})}var i2=M("ZodCodec",($,I)=>{y2.init($,I),KI.init($,I)});function Mv($,I,_){return new i2({type:"pipe",in:$,out:I,transform:_.decode,reverseTransform:_.encode})}var sG=M("ZodReadonly",($,I)=>{j8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>a9($,_,u,U),$.unwrap=()=>$._zod.def.innerType});function $q($){return new sG({type:"readonly",innerType:$})}var Iq=M("ZodTemplateLiteral",($,I)=>{F8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>S9($,_,u,U)});function Kv($,I){return new Iq({type:"template_literal",parts:$,...S.normalizeParams(I)})}var Uq=M("ZodLazy",($,I)=>{E8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>s9($,_,u,U),$.unwrap=()=>$._zod.def.getter()});function _q($){return new Uq({type:"lazy",getter:$})}var uq=M("ZodPromise",($,I)=>{w8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>e9($,_,u,U),$.unwrap=()=>$._zod.def.innerType});function Dv($){return new uq({type:"promise",innerType:$})}var zq=M("ZodFunction",($,I)=>{S8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>f9($,_,u,U)});function Lv($){return new zq({type:"function",input:Array.isArray($?.input)?EG($?.input):$?.input??CI(_1()),output:$?.output??_1()})}var yI=M("ZodCustom",($,I)=>{C8.init($,I),p.init($,I),$._zod.processJSONSchema=(_,u,U)=>C9($,_,u,U)});function Vv($){let I=new X$({check:"custom"});return I._zod.check=$,I}function Zv($,I){return X9(yI,$??(()=>!0),I)}function gq($,I={}){return N9(yI,$,I)}function Jq($){return Q9($)}var Wv=v9,Rv=H9;function Pv($,I={}){let _=new yI({type:"custom",check:"custom",fn:(u)=>u instanceof $,abort:!0,...S.normalizeParams(I)});return _._zod.bag.Class=$,_._zod.check=(u)=>{if(!(u.value instanceof $))u.issues.push({code:"invalid_type",expected:$.name,input:u.value,inst:_,path:[..._._zod.def.path??[]]})},_}var bv=(...$)=>Y9({Codec:i2,Boolean:N0,String:G0},...$);function Av($){let I=_q(()=>{return E2([v2($),BG(),MG(),VG(),CI(I),CG(v2(),I)])});return I}function jv($,I){return SI(f2($),I)}var hj={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 dj($){L$({customError:$})}function cj(){return L$().customError}var Gq;(function($){})(Gq||(Gq={}));var f={...bI,...G2,iso:g0},pj=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 oj($,I){let _=$.$schema;if(_==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(_==="http://json-schema.org/draft-07/schema#")return"draft-7";if(_==="http://json-schema.org/draft-04/schema#")return"draft-4";return I??"draft-2020-12"}function tj($,I){if(!$.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let _=$.slice(1).split("/").filter(Boolean);if(_.length===0)return I.rootSchema;let u=I.version==="draft-2020-12"?"$defs":"definitions";if(_[0]===u){let U=_[1];if(!U||!I.defs[U])throw Error(`Reference not found: ${$}`);return I.defs[U]}throw Error(`Reference not found: ${$}`)}function Fv($,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 z=tj(U,I),g=E$(z,I);return I.refs.set(U,g),I.processing.delete(U),g}if($.enum!==void 0){let U=$.enum;if(I.version==="openapi-3.0"&&$.nullable===!0&&U.length===1&&U[0]===null)return f.null();if(U.length===0)return f.never();if(U.length===1)return f.literal(U[0]);if(U.every((g)=>typeof g==="string"))return f.enum(U);let z=U.map((g)=>f.literal(g));if(z.length<2)return z[0];return f.union([z[0],z[1],...z.slice(2)])}if($.const!==void 0)return f.literal($.const);let _=$.type;if(Array.isArray(_)){let U=_.map((z)=>{let g={...$,type:z};return Fv(g,I)});if(U.length===0)return f.never();if(U.length===1)return U[0];return f.union(U)}if(!_)return f.any();let u;switch(_){case"string":{let U=f.string();if($.format){let z=$.format;if(z==="email")U=U.check(f.email());else if(z==="uri"||z==="uri-reference")U=U.check(f.url());else if(z==="uuid"||z==="guid")U=U.check(f.uuid());else if(z==="date-time")U=U.check(f.iso.datetime());else if(z==="date")U=U.check(f.iso.date());else if(z==="time")U=U.check(f.iso.time());else if(z==="duration")U=U.check(f.iso.duration());else if(z==="ipv4")U=U.check(f.ipv4());else if(z==="ipv6")U=U.check(f.ipv6());else if(z==="mac")U=U.check(f.mac());else if(z==="cidr")U=U.check(f.cidrv4());else if(z==="cidr-v6")U=U.check(f.cidrv6());else if(z==="base64")U=U.check(f.base64());else if(z==="base64url")U=U.check(f.base64url());else if(z==="e164")U=U.check(f.e164());else if(z==="jwt")U=U.check(f.jwt());else if(z==="emoji")U=U.check(f.emoji());else if(z==="nanoid")U=U.check(f.nanoid());else if(z==="cuid")U=U.check(f.cuid());else if(z==="cuid2")U=U.check(f.cuid2());else if(z==="ulid")U=U.check(f.ulid());else if(z==="xid")U=U.check(f.xid());else if(z==="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=U;break}case"number":case"integer":{let 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=U;break}case"boolean":{u=f.boolean();break}case"null":{u=f.null();break}case"object":{let U={},z=$.properties||{},g=new Set($.required||[]);for(let[G,q]of Object.entries(z)){let N=E$(q,I);U[G]=g.has(G)?N:N.optional()}if($.propertyNames){let G=E$($.propertyNames,I),q=$.additionalProperties&&typeof $.additionalProperties==="object"?E$($.additionalProperties,I):f.any();if(Object.keys(U).length===0){u=f.record(G,q);break}let N=f.object(U).passthrough(),X=f.looseRecord(G,q);u=f.intersection(N,X);break}if($.patternProperties){let G=$.patternProperties,q=Object.keys(G),N=[];for(let Q of q){let H=E$(G[Q],I),Y=f.string().regex(new RegExp(Q));N.push(f.looseRecord(Y,H))}let X=[];if(Object.keys(U).length>0)X.push(f.object(U).passthrough());if(X.push(...N),X.length===0)u=f.object({}).passthrough();else if(X.length===1)u=X[0];else{let Q=f.intersection(X[0],X[1]);for(let H=2;H<X.length;H++)Q=f.intersection(Q,X[H]);u=Q}break}let J=f.object(U);if($.additionalProperties===!1)u=J.strict();else if(typeof $.additionalProperties==="object")u=J.catchall(E$($.additionalProperties,I));else u=J.passthrough();break}case"array":{let{prefixItems:U,items:z}=$;if(U&&Array.isArray(U)){let g=U.map((G)=>E$(G,I)),J=z&&typeof z==="object"&&!Array.isArray(z)?E$(z,I):void 0;if(J)u=f.tuple(g).rest(J);else u=f.tuple(g);if(typeof $.minItems==="number")u=u.check(f.minLength($.minItems));if(typeof $.maxItems==="number")u=u.check(f.maxLength($.maxItems))}else if(Array.isArray(z)){let g=z.map((G)=>E$(G,I)),J=$.additionalItems&&typeof $.additionalItems==="object"?E$($.additionalItems,I):void 0;if(J)u=f.tuple(g).rest(J);else u=f.tuple(g);if(typeof $.minItems==="number")u=u.check(f.minLength($.minItems));if(typeof $.maxItems==="number")u=u.check(f.maxLength($.maxItems))}else if(z!==void 0){let g=E$(z,I),J=f.array(g);if(typeof $.minItems==="number")J=J.min($.minItems);if(typeof $.maxItems==="number")J=J.max($.maxItems);u=J}else u=f.array(f.any());break}default:throw Error(`Unsupported type: ${_}`)}if($.description)u=u.describe($.description);if($.default!==void 0)u=u.default($.default);return u}function E$($,I){if(typeof $==="boolean")return $?f.any():f.never();let _=Fv($,I),u=$.type||$.enum!==void 0||$.const!==void 0;if($.anyOf&&Array.isArray($.anyOf)){let J=$.anyOf.map((q)=>E$(q,I)),G=f.union(J);_=u?f.intersection(_,G):G}if($.oneOf&&Array.isArray($.oneOf)){let J=$.oneOf.map((q)=>E$(q,I)),G=f.xor(J);_=u?f.intersection(_,G):G}if($.allOf&&Array.isArray($.allOf))if($.allOf.length===0)_=u?_:f.any();else{let J=u?_:E$($.allOf[0],I),G=u?0:1;for(let q=G;q<$.allOf.length;q++)J=f.intersection(J,E$($.allOf[q],I));_=J}if($.nullable===!0&&I.version==="openapi-3.0")_=f.nullable(_);if($.readOnly===!0)_=f.readonly(_);let U={},z=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let J of z)if(J in $)U[J]=$[J];let g=["contentEncoding","contentMediaType","contentSchema"];for(let J of g)if(J in $)U[J]=$[J];for(let J of Object.keys($))if(!pj.has(J))U[J]=$[J];if(Object.keys(U).length>0)I.registry.add(_,U);return _}function Sv($,I){if(typeof $==="boolean")return $?f.any():f.never();let _=oj($,I?.defaultTarget),u=$.$defs||$.definitions||{},U={version:_,defs:u,refs:new Map,processing:new Set,rootSchema:$,registry:I?.registry??S$};return E$($,U)}var qq={};S4(qq,{string:()=>aj,number:()=>ej,date:()=>IF,boolean:()=>sj,bigint:()=>$F});function aj($){return S3(G0,$)}function ej($){return i3(X0,$)}function sj($){return c3(N0,$)}function $F($){return o3(Q0,$)}function IF($){return g9(EI,$)}L$(DI());iI();function GF($,I,_){let u=s.join($,".serena","memories"),U=s.join(u,`result-${I}-${_}.md`);if(k.existsSync(U))return U;let z=s.join(u,`result-${I}.md`);if(k.existsSync(z))return z;return null}function lI($){try{return process.kill($,0),!0}catch(I){return!1}}function iv($){let I=[],_=/[^\s"']+|"([^"]*)"|'([^']*)'/g,u=_.exec($);while(u!==null){if(u[1]!==void 0)I.push(u[1]);else if(u[2]!==void 0)I.push(u[2]);else if(u[0])I.push(u[0]);u=_.exec($)}return I}var qF=g$.object({default_cli:g$.string().optional(),agent_cli_mapping:g$.record(g$.string(),g$.string()).optional()}).passthrough().transform(($)=>({default_cli:$.default_cli,agent_cli_mapping:$.agent_cli_mapping??{}})),XF=g$.object({command:g$.string().optional(),subcommand:g$.string().optional(),prompt_flag:g$.string().optional().transform(($)=>{if($===void 0)return;let I=$.trim().toLowerCase();if(I===""||I==="none"||I==="null")return null;return $}),auto_approve_flag:g$.string().optional(),output_format_flag:g$.string().optional(),output_format:g$.string().optional(),model_flag:g$.string().optional(),default_model:g$.string().optional(),isolation_env:g$.string().optional(),isolation_flags:g$.string().optional()}).passthrough().transform(($)=>({...$,prompt_flag:$.prompt_flag??void 0})),NF=g$.object({active_vendor:g$.string().optional(),vendors:g$.record(g$.string(),XF).optional()}).passthrough().transform(($)=>({active_vendor:$.active_vendor,vendors:$.vendors??{}}));function lv($){try{return o6($)}catch{return null}}function QF($){let I=lv($),_=qF.safeParse(I);if(!_.success)return{};return _.data}function vF($){let I=lv($),_=NF.safeParse(I);if(!_.success)return{vendors:{}};return{active_vendor:_.data.active_vendor,vendors:_.data.vendors}}function Hq($,I){let _=s.resolve($),u=s.parse(_).root;while(_!==u){let U=s.join(_,I);if(k.existsSync(U))return U;_=s.dirname(_)}return null}function HF($){let I=Hq($,s.join(".agents","oma-config.yaml"));if(!I)return null;try{let _=k.readFileSync(I,"utf-8");return QF(_)}catch{return null}}function YF($){let I=Hq($,s.join(".agents","skills","oma-orchestrator","config","cli-config.yaml"));if(!I)return null;try{let _=k.readFileSync(I,"utf-8");return vF(_)}catch{return null}}function Yq($,I){let _=process.cwd(),u=HF(_),U=YF(_),z=$.replace(/-agent$/i,""),g=u?.agent_cli_mapping?.[$]||u?.agent_cli_mapping?.[z],J=I||g||u?.default_cli||U?.active_vendor||"gemini";if(!I&&!g&&!u?.default_cli&&!U?.active_vendor)console.error(r.default.yellow(`[oma] No vendor configured for agent "${$}". Falling back to "gemini".
|
|
312
|
-
Set default_cli in .agents/oma-config.yaml or use --vendor flag.`));return{vendor:
|
|
311
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let J of $.seen.entries()){let G=J[1];if(I===J[0]){z(J);continue}if($.external){let q=$.external.registry.get(J[0])?.id;if(I!==J[0]&&q){z(J);continue}}if($.metadataRegistry.get(J[0])?.id){z(J);continue}if(G.cycle){z(J);continue}if(G.count>1){if($.reused==="ref"){z(J);continue}}}}function b6($,I){let _=$.seen.get(I);if(!_)throw Error("Unprocessed schema. This is a bug in Zod.");let u=(J)=>{let G=$.seen.get(J);if(G.ref===null)return;let g=G.def??G.schema,q={...g},N=G.ref;if(G.ref=null,N){u(N);let Q=$.seen.get(N),H=Q.schema;if(H.$ref&&($.target==="draft-07"||$.target==="draft-04"||$.target==="openapi-3.0"))g.allOf=g.allOf??[],g.allOf.push(H);else Object.assign(g,H);if(Object.assign(g,q),J._zod.parent===N)for(let v in g){if(v==="$ref"||v==="allOf")continue;if(!(v in q))delete g[v]}if(H.$ref&&Q.def)for(let v in g){if(v==="$ref"||v==="allOf")continue;if(v in Q.def&&JSON.stringify(g[v])===JSON.stringify(Q.def[v]))delete g[v]}}let X=J._zod.parent;if(X&&X!==N){u(X);let Q=$.seen.get(X);if(Q?.schema.$ref){if(g.$ref=Q.schema.$ref,Q.def)for(let H in g){if(H==="$ref"||H==="allOf")continue;if(H in Q.def&&JSON.stringify(g[H])===JSON.stringify(Q.def[H]))delete g[H]}}}$.override({zodSchema:J,jsonSchema:g,path:G.path??[]})};for(let J of[...$.seen.entries()].reverse())u(J[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 J=$.external.registry.get(I)?.id;if(!J)throw Error("Schema is missing an `id` property");U.$id=$.external.uri(J)}Object.assign(U,_.def??_.schema);let z=$.external?.defs??{};for(let J of $.seen.entries()){let G=J[1];if(G.def&&G.defId)z[G.defId]=G.def}if($.external);else if(Object.keys(z).length>0)if($.target==="draft-2020-12")U.$defs=z;else U.definitions=z;try{let J=JSON.parse(JSON.stringify(U));return Object.defineProperty(J,"~standard",{value:{...I["~standard"],jsonSchema:{input:z0(I,"input",$.processors),output:z0(I,"output",$.processors)}},enumerable:!1,writable:!1}),J}catch(J){throw Error("Error converting schema to JSON.")}}function d$($,I){let _=I??{seen:new Set};if(_.seen.has($))return!1;_.seen.add($);let u=$._zod.def;if(u.type==="transform")return!0;if(u.type==="array")return d$(u.element,_);if(u.type==="set")return d$(u.valueType,_);if(u.type==="lazy")return d$(u.getter(),_);if(u.type==="promise"||u.type==="optional"||u.type==="nonoptional"||u.type==="nullable"||u.type==="readonly"||u.type==="default"||u.type==="prefault")return d$(u.innerType,_);if(u.type==="intersection")return d$(u.left,_)||d$(u.right,_);if(u.type==="record"||u.type==="map")return d$(u.keyType,_)||d$(u.valueType,_);if(u.type==="pipe")return d$(u.in,_)||d$(u.out,_);if(u.type==="object"){for(let U in u.shape)if(d$(u.shape[U],_))return!0;return!1}if(u.type==="union"){for(let U of u.options)if(d$(U,_))return!0;return!1}if(u.type==="tuple"){for(let U of u.items)if(d$(U,_))return!0;if(u.rest&&d$(u.rest,_))return!0;return!1}return!1}var OG=($,I={})=>(_)=>{let u=R6({..._,processors:I});return z$($,u),P6(u,$),b6(u,$)},z0=($,I,_={})=>(u)=>{let{libraryOptions:U,target:z}=u??{},J=R6({...U??{},target:z,io:I,processors:_});return z$($,J),P6(J,$),b6(J,$)};var hj={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},TG=($,I,_,u)=>{let U=_;U.type="string";let{minimum:z,maximum:J,format:G,patterns:g,contentEncoding:q}=$._zod.bag;if(typeof z==="number")U.minLength=z;if(typeof J==="number")U.maxLength=J;if(G){if(U.format=hj[G]??G,U.format==="")delete U.format;if(G==="time")delete U.format}if(q)U.contentEncoding=q;if(g&&g.size>0){let N=[...g];if(N.length===1)U.pattern=N[0].source;else if(N.length>1)U.allOf=[...N.map((X)=>({...I.target==="draft-07"||I.target==="draft-04"||I.target==="openapi-3.0"?{type:"string"}:{},pattern:X.source}))]}},BG=($,I,_,u)=>{let U=_,{minimum:z,maximum:J,format:G,multipleOf:g,exclusiveMaximum:q,exclusiveMinimum:N}=$._zod.bag;if(typeof G==="string"&&G.includes("int"))U.type="integer";else U.type="number";if(typeof N==="number")if(I.target==="draft-04"||I.target==="openapi-3.0")U.minimum=N,U.exclusiveMinimum=!0;else U.exclusiveMinimum=N;if(typeof z==="number"){if(U.minimum=z,typeof N==="number"&&I.target!=="draft-04")if(N>=z)delete U.minimum;else delete U.exclusiveMinimum}if(typeof q==="number")if(I.target==="draft-04"||I.target==="openapi-3.0")U.maximum=q,U.exclusiveMaximum=!0;else U.exclusiveMaximum=q;if(typeof J==="number"){if(U.maximum=J,typeof q==="number"&&I.target!=="draft-04")if(q<=J)delete U.maximum;else delete U.exclusiveMaximum}if(typeof g==="number")U.multipleOf=g},MG=($,I,_,u)=>{_.type="boolean"},KG=($,I,_,u)=>{if(I.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},DG=($,I,_,u)=>{if(I.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},LG=($,I,_,u)=>{if(I.target==="openapi-3.0")_.type="string",_.nullable=!0,_.enum=[null];else _.type="null"},VG=($,I,_,u)=>{if(I.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},ZG=($,I,_,u)=>{if(I.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},WG=($,I,_,u)=>{_.not={}},RG=($,I,_,u)=>{},PG=($,I,_,u)=>{},bG=($,I,_,u)=>{if(I.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},AG=($,I,_,u)=>{let U=$._zod.def,z=GI(U.entries);if(z.every((J)=>typeof J==="number"))_.type="number";if(z.every((J)=>typeof J==="string"))_.type="string";_.enum=z},jG=($,I,_,u)=>{let U=$._zod.def,z=[];for(let J of U.values)if(J===void 0){if(I.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof J==="bigint")if(I.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else z.push(Number(J));else z.push(J);if(z.length===0);else if(z.length===1){let J=z[0];if(_.type=J===null?"null":typeof J,I.target==="draft-04"||I.target==="openapi-3.0")_.enum=[J];else _.const=J}else{if(z.every((J)=>typeof J==="number"))_.type="number";if(z.every((J)=>typeof J==="string"))_.type="string";if(z.every((J)=>typeof J==="boolean"))_.type="boolean";if(z.every((J)=>J===null))_.type="null";_.enum=z}},FG=($,I,_,u)=>{if(I.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},SG=($,I,_,u)=>{let U=_,z=$._zod.pattern;if(!z)throw Error("Pattern not found in template literal");U.type="string",U.pattern=z.source},wG=($,I,_,u)=>{let U=_,z={type:"string",format:"binary",contentEncoding:"binary"},{minimum:J,maximum:G,mime:g}=$._zod.bag;if(J!==void 0)z.minLength=J;if(G!==void 0)z.maxLength=G;if(g)if(g.length===1)z.contentMediaType=g[0],Object.assign(U,z);else Object.assign(U,z),U.anyOf=g.map((q)=>({contentMediaType:q}));else Object.assign(U,z)},EG=($,I,_,u)=>{_.type="boolean"},CG=($,I,_,u)=>{if(I.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},fG=($,I,_,u)=>{if(I.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},xG=($,I,_,u)=>{if(I.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},kG=($,I,_,u)=>{if(I.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},yG=($,I,_,u)=>{if(I.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},iG=($,I,_,u)=>{let U=_,z=$._zod.def,{minimum:J,maximum:G}=$._zod.bag;if(typeof J==="number")U.minItems=J;if(typeof G==="number")U.maxItems=G;U.type="array",U.items=z$(z.element,I,{...u,path:[...u.path,"items"]})},lG=($,I,_,u)=>{let U=_,z=$._zod.def;U.type="object",U.properties={};let J=z.shape;for(let q in J)U.properties[q]=z$(J[q],I,{...u,path:[...u.path,"properties",q]});let G=new Set(Object.keys(J)),g=new Set([...G].filter((q)=>{let N=z.shape[q]._zod;if(I.io==="input")return N.optin===void 0;else return N.optout===void 0}));if(g.size>0)U.required=Array.from(g);if(z.catchall?._zod.def.type==="never")U.additionalProperties=!1;else if(!z.catchall){if(I.io==="output")U.additionalProperties=!1}else if(z.catchall)U.additionalProperties=z$(z.catchall,I,{...u,path:[...u.path,"additionalProperties"]})},J2=($,I,_,u)=>{let U=$._zod.def,z=U.inclusive===!1,J=U.options.map((G,g)=>z$(G,I,{...u,path:[...u.path,z?"oneOf":"anyOf",g]}));if(z)_.oneOf=J;else _.anyOf=J},mG=($,I,_,u)=>{let U=$._zod.def,z=z$(U.left,I,{...u,path:[...u.path,"allOf",0]}),J=z$(U.right,I,{...u,path:[...u.path,"allOf",1]}),G=(q)=>("allOf"in q)&&Object.keys(q).length===1,g=[...G(z)?z.allOf:[z],...G(J)?J.allOf:[J]];_.allOf=g},rG=($,I,_,u)=>{let U=_,z=$._zod.def;U.type="array";let J=I.target==="draft-2020-12"?"prefixItems":"items",G=I.target==="draft-2020-12"?"items":I.target==="openapi-3.0"?"items":"additionalItems",g=z.items.map((Q,H)=>z$(Q,I,{...u,path:[...u.path,J,H]})),q=z.rest?z$(z.rest,I,{...u,path:[...u.path,G,...I.target==="openapi-3.0"?[z.items.length]:[]]}):null;if(I.target==="draft-2020-12"){if(U.prefixItems=g,q)U.items=q}else if(I.target==="openapi-3.0"){if(U.items={anyOf:g},q)U.items.anyOf.push(q);if(U.minItems=g.length,!q)U.maxItems=g.length}else if(U.items=g,q)U.additionalItems=q;let{minimum:N,maximum:X}=$._zod.bag;if(typeof N==="number")U.minItems=N;if(typeof X==="number")U.maxItems=X},nG=($,I,_,u)=>{let U=_,z=$._zod.def;U.type="object";let J=z.keyType,g=J._zod.bag?.patterns;if(z.mode==="loose"&&g&&g.size>0){let N=z$(z.valueType,I,{...u,path:[...u.path,"patternProperties","*"]});U.patternProperties={};for(let X of g)U.patternProperties[X.source]=N}else{if(I.target==="draft-07"||I.target==="draft-2020-12")U.propertyNames=z$(z.keyType,I,{...u,path:[...u.path,"propertyNames"]});U.additionalProperties=z$(z.valueType,I,{...u,path:[...u.path,"additionalProperties"]})}let q=J._zod.values;if(q){let N=[...q].filter((X)=>typeof X==="string"||typeof X==="number");if(N.length>0)U.required=N}},hG=($,I,_,u)=>{let U=$._zod.def,z=z$(U.innerType,I,u),J=I.seen.get($);if(I.target==="openapi-3.0")J.ref=U.innerType,_.nullable=!0;else _.anyOf=[z,{type:"null"}]},dG=($,I,_,u)=>{let U=$._zod.def;z$(U.innerType,I,u);let z=I.seen.get($);z.ref=U.innerType},cG=($,I,_,u)=>{let U=$._zod.def;z$(U.innerType,I,u);let z=I.seen.get($);z.ref=U.innerType,_.default=JSON.parse(JSON.stringify(U.defaultValue))},pG=($,I,_,u)=>{let U=$._zod.def;z$(U.innerType,I,u);let z=I.seen.get($);if(z.ref=U.innerType,I.io==="input")_._prefault=JSON.parse(JSON.stringify(U.defaultValue))},oG=($,I,_,u)=>{let U=$._zod.def;z$(U.innerType,I,u);let z=I.seen.get($);z.ref=U.innerType;let J;try{J=U.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}_.default=J},tG=($,I,_,u)=>{let U=$._zod.def,z=I.io==="input"?U.in._zod.def.type==="transform"?U.out:U.in:U.out;z$(z,I,u);let J=I.seen.get($);J.ref=z},aG=($,I,_,u)=>{let U=$._zod.def;z$(U.innerType,I,u);let z=I.seen.get($);z.ref=U.innerType,_.readOnly=!0},eG=($,I,_,u)=>{let U=$._zod.def;z$(U.innerType,I,u);let z=I.seen.get($);z.ref=U.innerType},G2=($,I,_,u)=>{let U=$._zod.def;z$(U.innerType,I,u);let z=I.seen.get($);z.ref=U.innerType},sG=($,I,_,u)=>{let U=$._zod.innerType;z$(U,I,u);let z=I.seen.get($);z.ref=U},z2={string:TG,number:BG,boolean:MG,bigint:KG,symbol:DG,null:LG,undefined:VG,void:ZG,never:WG,any:RG,unknown:PG,date:bG,enum:AG,literal:jG,nan:FG,template_literal:SG,file:wG,success:EG,custom:CG,function:fG,transform:xG,map:kG,set:yG,array:iG,object:lG,union:J2,intersection:mG,tuple:rG,record:nG,nullable:hG,nonoptional:dG,default:cG,prefault:pG,catch:oG,pipe:tG,readonly:aG,promise:eG,optional:G2,lazy:sG};function g2($,I){if("_idmap"in $){let u=$,U=R6({...I,processors:z2}),z={};for(let g of u._idmap.entries()){let[q,N]=g;z$(N,U)}let J={},G={registry:u,uri:I?.uri,defs:z};U.external=G;for(let g of u._idmap.entries()){let[q,N]=g;P6(U,N),J[q]=b6(U,N)}if(Object.keys(z).length>0){let g=U.target==="draft-2020-12"?"$defs":"definitions";J.__shared={[g]:z}}return{schemas:J}}let _=R6({...I,processors:z2});return z$($,_),P6(_,$),b6(_,$)}class $g{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:z2,target:I,...$?.metadata&&{metadata:$.metadata},...$?.unrepresentable&&{unrepresentable:$.unrepresentable},...$?.override&&{override:$.override},...$?.io&&{io:$.io}})}process($,I={path:[],schemaPath:[]}){return z$($,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}P6(this.ctx,$);let _=b6(this.ctx,$),{"~standard":u,...U}=_;return U}}var B7={};var bI={};S4(bI,{xor:()=>Xv,xid:()=>w7,void:()=>uv,uuidv7:()=>W7,uuidv6:()=>Z7,uuidv4:()=>V7,uuid:()=>L7,url:()=>R7,unknown:()=>z1,union:()=>C2,undefined:()=>Uv,ulid:()=>S7,uint64:()=>$v,uint32:()=>a7,tuple:()=>Eg,transform:()=>x2,templateLiteral:()=>Vv,symbol:()=>Iv,superRefine:()=>Gq,success:()=>Kv,stringbool:()=>Fv,stringFormat:()=>n7,string:()=>H2,strictObject:()=>gv,set:()=>Yv,refine:()=>Jq,record:()=>Cg,readonly:()=>$q,promise:()=>Zv,preprocess:()=>wv,prefault:()=>cg,pipe:()=>SI,partialRecord:()=>Qv,optional:()=>jI,object:()=>Gv,number:()=>Bg,nullish:()=>Mv,nullable:()=>FI,null:()=>Vg,nonoptional:()=>pg,never:()=>E2,nativeEnum:()=>Ov,nanoid:()=>A7,nan:()=>Dv,meta:()=>Av,map:()=>Hv,mac:()=>f7,looseRecord:()=>vv,looseObject:()=>qv,literal:()=>Tv,lazy:()=>_q,ksuid:()=>E7,keyof:()=>Jv,jwt:()=>r7,json:()=>Sv,ipv6:()=>x7,ipv4:()=>C7,intersection:()=>Sg,int64:()=>s7,int32:()=>t7,int:()=>Y2,instanceof:()=>jv,httpUrl:()=>P7,hostname:()=>h7,hex:()=>d7,hash:()=>c7,guid:()=>D7,function:()=>Wv,float64:()=>o7,float32:()=>p7,file:()=>Bv,exactOptional:()=>mg,enum:()=>f2,emoji:()=>b7,email:()=>K7,e164:()=>m7,discriminatedUnion:()=>Nv,describe:()=>bv,date:()=>zv,custom:()=>Pv,cuid2:()=>F7,cuid:()=>j7,codec:()=>Lv,cidrv6:()=>y7,cidrv4:()=>k7,check:()=>Rv,catch:()=>ag,boolean:()=>Mg,bigint:()=>e7,base64url:()=>l7,base64:()=>i7,array:()=>CI,any:()=>_v,_function:()=>Wv,_default:()=>hg,_ZodString:()=>O2,ZodXor:()=>Ag,ZodXID:()=>V2,ZodVoid:()=>Pg,ZodUnknown:()=>Wg,ZodUnion:()=>xI,ZodUndefined:()=>Dg,ZodUUID:()=>y4,ZodURL:()=>wI,ZodULID:()=>L2,ZodType:()=>c,ZodTuple:()=>wg,ZodTransform:()=>ig,ZodTemplateLiteral:()=>Iq,ZodSymbol:()=>Kg,ZodSuccess:()=>og,ZodStringFormat:()=>q$,ZodString:()=>g0,ZodSet:()=>xg,ZodRecord:()=>kI,ZodReadonly:()=>sg,ZodPromise:()=>uq,ZodPrefault:()=>dg,ZodPipe:()=>i2,ZodOptional:()=>k2,ZodObject:()=>fI,ZodNumberFormat:()=>J1,ZodNumber:()=>X0,ZodNullable:()=>rg,ZodNull:()=>Lg,ZodNonOptional:()=>y2,ZodNever:()=>Rg,ZodNanoID:()=>M2,ZodNaN:()=>eg,ZodMap:()=>fg,ZodMAC:()=>Tg,ZodLiteral:()=>kg,ZodLazy:()=>Uq,ZodKSUID:()=>Z2,ZodJWT:()=>S2,ZodIntersection:()=>Fg,ZodIPv6:()=>R2,ZodIPv4:()=>W2,ZodGUID:()=>AI,ZodFunction:()=>zq,ZodFile:()=>yg,ZodExactOptional:()=>lg,ZodEnum:()=>G0,ZodEmoji:()=>B2,ZodEmail:()=>T2,ZodE164:()=>F2,ZodDiscriminatedUnion:()=>jg,ZodDefault:()=>ng,ZodDate:()=>EI,ZodCustomStringFormat:()=>q0,ZodCustom:()=>yI,ZodCodec:()=>l2,ZodCatch:()=>tg,ZodCUID2:()=>D2,ZodCUID:()=>K2,ZodCIDRv6:()=>b2,ZodCIDRv4:()=>P2,ZodBoolean:()=>N0,ZodBigIntFormat:()=>w2,ZodBigInt:()=>Q0,ZodBase64URL:()=>j2,ZodBase64:()=>A2,ZodArray:()=>bg,ZodAny:()=>Zg});var q2={};S4(q2,{uppercase:()=>p1,trim:()=>$0,toUpperCase:()=>U0,toLowerCase:()=>I0,startsWith:()=>t1,slugify:()=>_0,size:()=>U1,regex:()=>d1,property:()=>u2,positive:()=>$2,overwrite:()=>L4,normalize:()=>s1,nonpositive:()=>U2,nonnegative:()=>_2,negative:()=>I2,multipleOf:()=>Z6,minSize:()=>k4,minLength:()=>e4,mime:()=>e1,maxSize:()=>W6,maxLength:()=>_1,lte:()=>u4,lt:()=>f4,lowercase:()=>c1,length:()=>u1,includes:()=>o1,gte:()=>h$,gt:()=>x4,endsWith:()=>a1});var J0={};S4(J0,{time:()=>_g,duration:()=>ug,datetime:()=>Ig,date:()=>Ug,ZodISOTime:()=>Q2,ZodISODuration:()=>v2,ZodISODateTime:()=>X2,ZodISODate:()=>N2});var X2=M("ZodISODateTime",($,I)=>{k8.init($,I),q$.init($,I)});function Ig($){return C9(X2,$)}var N2=M("ZodISODate",($,I)=>{y8.init($,I),q$.init($,I)});function Ug($){return f9(N2,$)}var Q2=M("ZodISOTime",($,I)=>{i8.init($,I),q$.init($,I)});function _g($){return x9(Q2,$)}var v2=M("ZodISODuration",($,I)=>{l8.init($,I),q$.init($,I)});function ug($){return k9(v2,$)}var M7=($,I)=>{QI.init($,I),$.name="ZodError",Object.defineProperties($,{format:{value:(_)=>HI($,_)},flatten:{value:(_)=>vI($,_)},addIssue:{value:(_)=>{$.issues.push(_),$.message=JSON.stringify($.issues,x1,2)}},addIssues:{value:(_)=>{$.issues.push(..._),$.message=JSON.stringify($.issues,x1,2)}},isEmpty:{get(){return $.issues.length===0}}})},cj=M("ZodError",M7),s$=M("ZodError",M7,{Parent:Error});var zg=i1(s$),Jg=l1(s$),Gg=m1(s$),gg=r1(s$),qg=Q_(s$),Xg=v_(s$),Ng=H_(s$),Qg=Y_(s$),vg=O_(s$),Hg=T_(s$),Yg=B_(s$),Og=M_(s$);var c=M("ZodType",($,I)=>{return n.init($,I),Object.assign($["~standard"],{jsonSchema:{input:z0($,"input"),output:z0($,"output")}}),$.toJSONSchema=OG($,{}),$.def=I,$.type=I.type,Object.defineProperty($,"_def",{value:I}),$.check=(..._)=>{return $.clone(S.mergeDefs(I,{checks:[...I.checks??[],..._.map((u)=>typeof u==="function"?{_zod:{check:u,def:{check:"custom"},onattach:[]}}:u)]}),{parent:!0})},$.with=$.check,$.clone=(_,u)=>n$($,_,u),$.brand=()=>$,$.register=(_,u)=>{return _.add($,u),$},$.parse=(_,u)=>zg($,_,u,{callee:$.parse}),$.safeParse=(_,u)=>Gg($,_,u),$.parseAsync=async(_,u)=>Jg($,_,u,{callee:$.parseAsync}),$.safeParseAsync=async(_,u)=>gg($,_,u),$.spa=$.safeParseAsync,$.encode=(_,u)=>qg($,_,u),$.decode=(_,u)=>Xg($,_,u),$.encodeAsync=async(_,u)=>Ng($,_,u),$.decodeAsync=async(_,u)=>Qg($,_,u),$.safeEncode=(_,u)=>vg($,_,u),$.safeDecode=(_,u)=>Hg($,_,u),$.safeEncodeAsync=async(_,u)=>Yg($,_,u),$.safeDecodeAsync=async(_,u)=>Og($,_,u),$.refine=(_,u)=>$.check(Jq(_,u)),$.superRefine=(_)=>$.check(Gq(_)),$.overwrite=(_)=>$.check(L4(_)),$.optional=()=>jI($),$.exactOptional=()=>mg($),$.nullable=()=>FI($),$.nullish=()=>jI(FI($)),$.nonoptional=(_)=>pg($,_),$.array=()=>CI($),$.or=(_)=>C2([$,_]),$.and=(_)=>Sg($,_),$.transform=(_)=>SI($,x2(_)),$.default=(_)=>hg($,_),$.prefault=(_)=>cg($,_),$.catch=(_)=>ag($,_),$.pipe=(_)=>SI($,_),$.readonly=()=>$q($),$.describe=(_)=>{let u=$.clone();return E$.add(u,{description:_}),u},Object.defineProperty($,"description",{get(){return E$.get($)?.description},configurable:!0}),$.meta=(..._)=>{if(_.length===0)return E$.get($);let u=$.clone();return E$.add(u,_[0]),u},$.isOptional=()=>$.safeParse(void 0).success,$.isNullable=()=>$.safeParse(null).success,$.apply=(_)=>_($),$}),O2=M("_ZodString",($,I)=>{I1.init($,I),c.init($,I),$._zod.processJSONSchema=(u,U,z)=>TG($,u,U,z);let _=$._zod.bag;$.format=_.format??null,$.minLength=_.minimum??null,$.maxLength=_.maximum??null,$.regex=(...u)=>$.check(d1(...u)),$.includes=(...u)=>$.check(o1(...u)),$.startsWith=(...u)=>$.check(t1(...u)),$.endsWith=(...u)=>$.check(a1(...u)),$.min=(...u)=>$.check(e4(...u)),$.max=(...u)=>$.check(_1(...u)),$.length=(...u)=>$.check(u1(...u)),$.nonempty=(...u)=>$.check(e4(1,...u)),$.lowercase=(u)=>$.check(c1(u)),$.uppercase=(u)=>$.check(p1(u)),$.trim=()=>$.check($0()),$.normalize=(...u)=>$.check(s1(...u)),$.toLowerCase=()=>$.check(I0()),$.toUpperCase=()=>$.check(U0()),$.slugify=()=>$.check(_0())}),g0=M("ZodString",($,I)=>{I1.init($,I),O2.init($,I),$.email=(_)=>$.check(E_(T2,_)),$.url=(_)=>$.check(PI(wI,_)),$.jwt=(_)=>$.check(s_(S2,_)),$.emoji=(_)=>$.check(y_(B2,_)),$.guid=(_)=>$.check(RI(AI,_)),$.uuid=(_)=>$.check(C_(y4,_)),$.uuidv4=(_)=>$.check(f_(y4,_)),$.uuidv6=(_)=>$.check(x_(y4,_)),$.uuidv7=(_)=>$.check(k_(y4,_)),$.nanoid=(_)=>$.check(i_(M2,_)),$.guid=(_)=>$.check(RI(AI,_)),$.cuid=(_)=>$.check(l_(K2,_)),$.cuid2=(_)=>$.check(m_(D2,_)),$.ulid=(_)=>$.check(r_(L2,_)),$.base64=(_)=>$.check(t_(A2,_)),$.base64url=(_)=>$.check(a_(j2,_)),$.xid=(_)=>$.check(n_(V2,_)),$.ksuid=(_)=>$.check(h_(Z2,_)),$.ipv4=(_)=>$.check(d_(W2,_)),$.ipv6=(_)=>$.check(c_(R2,_)),$.cidrv4=(_)=>$.check(p_(P2,_)),$.cidrv6=(_)=>$.check(o_(b2,_)),$.e164=(_)=>$.check(e_(F2,_)),$.datetime=(_)=>$.check(Ig(_)),$.date=(_)=>$.check(Ug(_)),$.time=(_)=>$.check(_g(_)),$.duration=(_)=>$.check(ug(_))});function H2($){return F9(g0,$)}var q$=M("ZodStringFormat",($,I)=>{g$.init($,I),O2.init($,I)}),T2=M("ZodEmail",($,I)=>{A8.init($,I),q$.init($,I)});function K7($){return E_(T2,$)}var AI=M("ZodGUID",($,I)=>{P8.init($,I),q$.init($,I)});function D7($){return RI(AI,$)}var y4=M("ZodUUID",($,I)=>{b8.init($,I),q$.init($,I)});function L7($){return C_(y4,$)}function V7($){return f_(y4,$)}function Z7($){return x_(y4,$)}function W7($){return k_(y4,$)}var wI=M("ZodURL",($,I)=>{j8.init($,I),q$.init($,I)});function R7($){return PI(wI,$)}function P7($){return PI(wI,{protocol:/^https?$/,hostname:Y4.domain,...S.normalizeParams($)})}var B2=M("ZodEmoji",($,I)=>{F8.init($,I),q$.init($,I)});function b7($){return y_(B2,$)}var M2=M("ZodNanoID",($,I)=>{S8.init($,I),q$.init($,I)});function A7($){return i_(M2,$)}var K2=M("ZodCUID",($,I)=>{w8.init($,I),q$.init($,I)});function j7($){return l_(K2,$)}var D2=M("ZodCUID2",($,I)=>{E8.init($,I),q$.init($,I)});function F7($){return m_(D2,$)}var L2=M("ZodULID",($,I)=>{C8.init($,I),q$.init($,I)});function S7($){return r_(L2,$)}var V2=M("ZodXID",($,I)=>{f8.init($,I),q$.init($,I)});function w7($){return n_(V2,$)}var Z2=M("ZodKSUID",($,I)=>{x8.init($,I),q$.init($,I)});function E7($){return h_(Z2,$)}var W2=M("ZodIPv4",($,I)=>{m8.init($,I),q$.init($,I)});function C7($){return d_(W2,$)}var Tg=M("ZodMAC",($,I)=>{n8.init($,I),q$.init($,I)});function f7($){return w9(Tg,$)}var R2=M("ZodIPv6",($,I)=>{r8.init($,I),q$.init($,I)});function x7($){return c_(R2,$)}var P2=M("ZodCIDRv4",($,I)=>{h8.init($,I),q$.init($,I)});function k7($){return p_(P2,$)}var b2=M("ZodCIDRv6",($,I)=>{d8.init($,I),q$.init($,I)});function y7($){return o_(b2,$)}var A2=M("ZodBase64",($,I)=>{p8.init($,I),q$.init($,I)});function i7($){return t_(A2,$)}var j2=M("ZodBase64URL",($,I)=>{o8.init($,I),q$.init($,I)});function l7($){return a_(j2,$)}var F2=M("ZodE164",($,I)=>{t8.init($,I),q$.init($,I)});function m7($){return e_(F2,$)}var S2=M("ZodJWT",($,I)=>{a8.init($,I),q$.init($,I)});function r7($){return s_(S2,$)}var q0=M("ZodCustomStringFormat",($,I)=>{e8.init($,I),q$.init($,I)});function n7($,I,_={}){return u0(q0,$,I,_)}function h7($){return u0(q0,"hostname",Y4.hostname,$)}function d7($){return u0(q0,"hex",Y4.hex,$)}function c7($,I){let _=I?.enc??"hex",u=`${$}_${_}`,U=Y4[u];if(!U)throw Error(`Unrecognized hash format: ${u}`);return u0(q0,u,U,I)}var X0=M("ZodNumber",($,I)=>{A_.init($,I),c.init($,I),$._zod.processJSONSchema=(u,U,z)=>BG($,u,U,z),$.gt=(u,U)=>$.check(x4(u,U)),$.gte=(u,U)=>$.check(h$(u,U)),$.min=(u,U)=>$.check(h$(u,U)),$.lt=(u,U)=>$.check(f4(u,U)),$.lte=(u,U)=>$.check(u4(u,U)),$.max=(u,U)=>$.check(u4(u,U)),$.int=(u)=>$.check(Y2(u)),$.safe=(u)=>$.check(Y2(u)),$.positive=(u)=>$.check(x4(0,u)),$.nonnegative=(u)=>$.check(h$(0,u)),$.negative=(u)=>$.check(f4(0,u)),$.nonpositive=(u)=>$.check(u4(0,u)),$.multipleOf=(u,U)=>$.check(Z6(u,U)),$.step=(u,U)=>$.check(Z6(u,U)),$.finite=()=>$;let _=$._zod.bag;$.minValue=Math.max(_.minimum??Number.NEGATIVE_INFINITY,_.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,$.maxValue=Math.min(_.maximum??Number.POSITIVE_INFINITY,_.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,$.isInt=(_.format??"").includes("int")||Number.isSafeInteger(_.multipleOf??0.5),$.isFinite=!0,$.format=_.format??null});function Bg($){return y9(X0,$)}var J1=M("ZodNumberFormat",($,I)=>{s8.init($,I),X0.init($,I)});function Y2($){return l9(J1,$)}function p7($){return m9(J1,$)}function o7($){return r9(J1,$)}function t7($){return n9(J1,$)}function a7($){return h9(J1,$)}var N0=M("ZodBoolean",($,I)=>{BI.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>MG($,_,u,U)});function Mg($){return d9(N0,$)}var Q0=M("ZodBigInt",($,I)=>{j_.init($,I),c.init($,I),$._zod.processJSONSchema=(u,U,z)=>KG($,u,U,z),$.gte=(u,U)=>$.check(h$(u,U)),$.min=(u,U)=>$.check(h$(u,U)),$.gt=(u,U)=>$.check(x4(u,U)),$.gte=(u,U)=>$.check(h$(u,U)),$.min=(u,U)=>$.check(h$(u,U)),$.lt=(u,U)=>$.check(f4(u,U)),$.lte=(u,U)=>$.check(u4(u,U)),$.max=(u,U)=>$.check(u4(u,U)),$.positive=(u)=>$.check(x4(BigInt(0),u)),$.negative=(u)=>$.check(f4(BigInt(0),u)),$.nonpositive=(u)=>$.check(u4(BigInt(0),u)),$.nonnegative=(u)=>$.check(h$(BigInt(0),u)),$.multipleOf=(u,U)=>$.check(Z6(u,U));let _=$._zod.bag;$.minValue=_.minimum??null,$.maxValue=_.maximum??null,$.format=_.format??null});function e7($){return p9(Q0,$)}var w2=M("ZodBigIntFormat",($,I)=>{$3.init($,I),Q0.init($,I)});function s7($){return t9(w2,$)}function $v($){return a9(w2,$)}var Kg=M("ZodSymbol",($,I)=>{I3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>DG($,_,u,U)});function Iv($){return e9(Kg,$)}var Dg=M("ZodUndefined",($,I)=>{U3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>VG($,_,u,U)});function Uv($){return s9(Dg,$)}var Lg=M("ZodNull",($,I)=>{_3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>LG($,_,u,U)});function Vg($){return $G(Lg,$)}var Zg=M("ZodAny",($,I)=>{u3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>RG($,_,u,U)});function _v(){return IG(Zg)}var Wg=M("ZodUnknown",($,I)=>{z3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>PG($,_,u,U)});function z1(){return UG(Wg)}var Rg=M("ZodNever",($,I)=>{J3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>WG($,_,u,U)});function E2($){return _G(Rg,$)}var Pg=M("ZodVoid",($,I)=>{G3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>ZG($,_,u,U)});function uv($){return uG(Pg,$)}var EI=M("ZodDate",($,I)=>{g3.init($,I),c.init($,I),$._zod.processJSONSchema=(u,U,z)=>bG($,u,U,z),$.min=(u,U)=>$.check(h$(u,U)),$.max=(u,U)=>$.check(u4(u,U));let _=$._zod.bag;$.minDate=_.minimum?new Date(_.minimum):null,$.maxDate=_.maximum?new Date(_.maximum):null});function zv($){return zG(EI,$)}var bg=M("ZodArray",($,I)=>{q3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>iG($,_,u,U),$.element=I.element,$.min=(_,u)=>$.check(e4(_,u)),$.nonempty=(_)=>$.check(e4(1,_)),$.max=(_,u)=>$.check(_1(_,u)),$.length=(_,u)=>$.check(u1(_,u)),$.unwrap=()=>$.element});function CI($,I){return gG(bg,$,I)}function Jv($){let I=$._zod.def.shape;return f2(Object.keys(I))}var fI=M("ZodObject",($,I)=>{X3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>lG($,_,u,U),S.defineLazy($,"shape",()=>{return I.shape}),$.keyof=()=>f2(Object.keys($._zod.def.shape)),$.catchall=(_)=>$.clone({...$._zod.def,catchall:_}),$.passthrough=()=>$.clone({...$._zod.def,catchall:z1()}),$.loose=()=>$.clone({...$._zod.def,catchall:z1()}),$.strict=()=>$.clone({...$._zod.def,catchall:E2()}),$.strip=()=>$.clone({...$._zod.def,catchall:void 0}),$.extend=(_)=>{return S.extend($,_)},$.safeExtend=(_)=>{return S.safeExtend($,_)},$.merge=(_)=>S.merge($,_),$.pick=(_)=>S.pick($,_),$.omit=(_)=>S.omit($,_),$.partial=(..._)=>S.partial(k2,$,_[0]),$.required=(..._)=>S.required(y2,$,_[0])});function Gv($,I){let _={type:"object",shape:$??{},...S.normalizeParams(I)};return new fI(_)}function gv($,I){return new fI({type:"object",shape:$,catchall:E2(),...S.normalizeParams(I)})}function qv($,I){return new fI({type:"object",shape:$,catchall:z1(),...S.normalizeParams(I)})}var xI=M("ZodUnion",($,I)=>{MI.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>J2($,_,u,U),$.options=I.options});function C2($,I){return new xI({type:"union",options:$,...S.normalizeParams(I)})}var Ag=M("ZodXor",($,I)=>{xI.init($,I),N3.init($,I),$._zod.processJSONSchema=(_,u,U)=>J2($,_,u,U),$.options=I.options});function Xv($,I){return new Ag({type:"union",options:$,inclusive:!1,...S.normalizeParams(I)})}var jg=M("ZodDiscriminatedUnion",($,I)=>{xI.init($,I),Q3.init($,I)});function Nv($,I,_){return new jg({type:"union",options:I,discriminator:$,...S.normalizeParams(_)})}var Fg=M("ZodIntersection",($,I)=>{v3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>mG($,_,u,U)});function Sg($,I){return new Fg({type:"intersection",left:$,right:I})}var wg=M("ZodTuple",($,I)=>{F_.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>rG($,_,u,U),$.rest=(_)=>$.clone({...$._zod.def,rest:_})});function Eg($,I,_){let u=I instanceof n,U=u?_:I;return new wg({type:"tuple",items:$,rest:u?I:null,...S.normalizeParams(U)})}var kI=M("ZodRecord",($,I)=>{H3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>nG($,_,u,U),$.keyType=I.keyType,$.valueType=I.valueType});function Cg($,I,_){return new kI({type:"record",keyType:$,valueType:I,...S.normalizeParams(_)})}function Qv($,I,_){let u=n$($);return u._zod.values=void 0,new kI({type:"record",keyType:u,valueType:I,...S.normalizeParams(_)})}function vv($,I,_){return new kI({type:"record",keyType:$,valueType:I,mode:"loose",...S.normalizeParams(_)})}var fg=M("ZodMap",($,I)=>{Y3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>kG($,_,u,U),$.keyType=I.keyType,$.valueType=I.valueType,$.min=(..._)=>$.check(k4(..._)),$.nonempty=(_)=>$.check(k4(1,_)),$.max=(..._)=>$.check(W6(..._)),$.size=(..._)=>$.check(U1(..._))});function Hv($,I,_){return new fg({type:"map",keyType:$,valueType:I,...S.normalizeParams(_)})}var xg=M("ZodSet",($,I)=>{O3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>yG($,_,u,U),$.min=(..._)=>$.check(k4(..._)),$.nonempty=(_)=>$.check(k4(1,_)),$.max=(..._)=>$.check(W6(..._)),$.size=(..._)=>$.check(U1(..._))});function Yv($,I){return new xg({type:"set",valueType:$,...S.normalizeParams(I)})}var G0=M("ZodEnum",($,I)=>{T3.init($,I),c.init($,I),$._zod.processJSONSchema=(u,U,z)=>AG($,u,U,z),$.enum=I.entries,$.options=Object.values(I.entries);let _=new Set(Object.keys(I.entries));$.extract=(u,U)=>{let z={};for(let J of u)if(_.has(J))z[J]=I.entries[J];else throw Error(`Key ${J} not found in enum`);return new G0({...I,checks:[],...S.normalizeParams(U),entries:z})},$.exclude=(u,U)=>{let z={...I.entries};for(let J of u)if(_.has(J))delete z[J];else throw Error(`Key ${J} not found in enum`);return new G0({...I,checks:[],...S.normalizeParams(U),entries:z})}});function f2($,I){let _=Array.isArray($)?Object.fromEntries($.map((u)=>[u,u])):$;return new G0({type:"enum",entries:_,...S.normalizeParams(I)})}function Ov($,I){return new G0({type:"enum",entries:$,...S.normalizeParams(I)})}var kg=M("ZodLiteral",($,I)=>{B3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>jG($,_,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 Tv($,I){return new kg({type:"literal",values:Array.isArray($)?$:[$],...S.normalizeParams(I)})}var yg=M("ZodFile",($,I)=>{M3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>wG($,_,u,U),$.min=(_,u)=>$.check(k4(_,u)),$.max=(_,u)=>$.check(W6(_,u)),$.mime=(_,u)=>$.check(e1(Array.isArray(_)?_:[_],u))});function Bv($){return qG(yg,$)}var ig=M("ZodTransform",($,I)=>{K3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>xG($,_,u,U),$._zod.parse=(_,u)=>{if(u.direction==="backward")throw new e6($.constructor.name);_.addIssue=(z)=>{if(typeof z==="string")_.issues.push(S.issue(z,_.value,I));else{let J=z;if(J.fatal)J.continue=!1;J.code??(J.code="custom"),J.input??(J.input=_.value),J.inst??(J.inst=$),_.issues.push(S.issue(J))}};let U=I.transform(_.value,_);if(U instanceof Promise)return U.then((z)=>{return _.value=z,_});return _.value=U,_}});function x2($){return new ig({type:"transform",transform:$})}var k2=M("ZodOptional",($,I)=>{S_.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>G2($,_,u,U),$.unwrap=()=>$._zod.def.innerType});function jI($){return new k2({type:"optional",innerType:$})}var lg=M("ZodExactOptional",($,I)=>{D3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>G2($,_,u,U),$.unwrap=()=>$._zod.def.innerType});function mg($){return new lg({type:"optional",innerType:$})}var rg=M("ZodNullable",($,I)=>{L3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>hG($,_,u,U),$.unwrap=()=>$._zod.def.innerType});function FI($){return new rg({type:"nullable",innerType:$})}function Mv($){return jI(FI($))}var ng=M("ZodDefault",($,I)=>{V3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>cG($,_,u,U),$.unwrap=()=>$._zod.def.innerType,$.removeDefault=$.unwrap});function hg($,I){return new ng({type:"default",innerType:$,get defaultValue(){return typeof I==="function"?I():S.shallowClone(I)}})}var dg=M("ZodPrefault",($,I)=>{Z3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>pG($,_,u,U),$.unwrap=()=>$._zod.def.innerType});function cg($,I){return new dg({type:"prefault",innerType:$,get defaultValue(){return typeof I==="function"?I():S.shallowClone(I)}})}var y2=M("ZodNonOptional",($,I)=>{W3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>dG($,_,u,U),$.unwrap=()=>$._zod.def.innerType});function pg($,I){return new y2({type:"nonoptional",innerType:$,...S.normalizeParams(I)})}var og=M("ZodSuccess",($,I)=>{R3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>EG($,_,u,U),$.unwrap=()=>$._zod.def.innerType});function Kv($){return new og({type:"success",innerType:$})}var tg=M("ZodCatch",($,I)=>{P3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>oG($,_,u,U),$.unwrap=()=>$._zod.def.innerType,$.removeCatch=$.unwrap});function ag($,I){return new tg({type:"catch",innerType:$,catchValue:typeof I==="function"?I:()=>I})}var eg=M("ZodNaN",($,I)=>{b3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>FG($,_,u,U)});function Dv($){return GG(eg,$)}var i2=M("ZodPipe",($,I)=>{A3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>tG($,_,u,U),$.in=I.in,$.out=I.out});function SI($,I){return new i2({type:"pipe",in:$,out:I})}var l2=M("ZodCodec",($,I)=>{i2.init($,I),KI.init($,I)});function Lv($,I,_){return new l2({type:"pipe",in:$,out:I,transform:_.decode,reverseTransform:_.encode})}var sg=M("ZodReadonly",($,I)=>{j3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>aG($,_,u,U),$.unwrap=()=>$._zod.def.innerType});function $q($){return new sg({type:"readonly",innerType:$})}var Iq=M("ZodTemplateLiteral",($,I)=>{F3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>SG($,_,u,U)});function Vv($,I){return new Iq({type:"template_literal",parts:$,...S.normalizeParams(I)})}var Uq=M("ZodLazy",($,I)=>{E3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>sG($,_,u,U),$.unwrap=()=>$._zod.def.getter()});function _q($){return new Uq({type:"lazy",getter:$})}var uq=M("ZodPromise",($,I)=>{w3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>eG($,_,u,U),$.unwrap=()=>$._zod.def.innerType});function Zv($){return new uq({type:"promise",innerType:$})}var zq=M("ZodFunction",($,I)=>{S3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>fG($,_,u,U)});function Wv($){return new zq({type:"function",input:Array.isArray($?.input)?Eg($?.input):$?.input??CI(z1()),output:$?.output??z1()})}var yI=M("ZodCustom",($,I)=>{C3.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,U)=>CG($,_,u,U)});function Rv($){let I=new Q$({check:"custom"});return I._zod.check=$,I}function Pv($,I){return XG(yI,$??(()=>!0),I)}function Jq($,I={}){return NG(yI,$,I)}function Gq($){return QG($)}var bv=vG,Av=HG;function jv($,I={}){let _=new yI({type:"custom",check:"custom",fn:(u)=>u instanceof $,abort:!0,...S.normalizeParams(I)});return _._zod.bag.Class=$,_._zod.check=(u)=>{if(!(u.value instanceof $))u.issues.push({code:"invalid_type",expected:$.name,input:u.value,inst:_,path:[..._._zod.def.path??[]]})},_}var Fv=(...$)=>YG({Codec:l2,Boolean:N0,String:g0},...$);function Sv($){let I=_q(()=>{return C2([H2($),Bg(),Mg(),Vg(),CI(I),Cg(H2(),I)])});return I}function wv($,I){return SI(x2($),I)}var oj={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 tj($){Z$({customError:$})}function aj(){return Z$().customError}var gq;(function($){})(gq||(gq={}));var f={...bI,...q2,iso:J0},ej=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 sj($,I){let _=$.$schema;if(_==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(_==="http://json-schema.org/draft-07/schema#")return"draft-7";if(_==="http://json-schema.org/draft-04/schema#")return"draft-4";return I??"draft-2020-12"}function $F($,I){if(!$.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let _=$.slice(1).split("/").filter(Boolean);if(_.length===0)return I.rootSchema;let u=I.version==="draft-2020-12"?"$defs":"definitions";if(_[0]===u){let U=_[1];if(!U||!I.defs[U])throw Error(`Reference not found: ${$}`);return I.defs[U]}throw Error(`Reference not found: ${$}`)}function Ev($,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 z=$F(U,I),J=f$(z,I);return I.refs.set(U,J),I.processing.delete(U),J}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((J)=>typeof J==="string"))return f.enum(U);let z=U.map((J)=>f.literal(J));if(z.length<2)return z[0];return f.union([z[0],z[1],...z.slice(2)])}if($.const!==void 0)return f.literal($.const);let _=$.type;if(Array.isArray(_)){let U=_.map((z)=>{let J={...$,type:z};return Ev(J,I)});if(U.length===0)return f.never();if(U.length===1)return U[0];return f.union(U)}if(!_)return f.any();let u;switch(_){case"string":{let U=f.string();if($.format){let z=$.format;if(z==="email")U=U.check(f.email());else if(z==="uri"||z==="uri-reference")U=U.check(f.url());else if(z==="uuid"||z==="guid")U=U.check(f.uuid());else if(z==="date-time")U=U.check(f.iso.datetime());else if(z==="date")U=U.check(f.iso.date());else if(z==="time")U=U.check(f.iso.time());else if(z==="duration")U=U.check(f.iso.duration());else if(z==="ipv4")U=U.check(f.ipv4());else if(z==="ipv6")U=U.check(f.ipv6());else if(z==="mac")U=U.check(f.mac());else if(z==="cidr")U=U.check(f.cidrv4());else if(z==="cidr-v6")U=U.check(f.cidrv6());else if(z==="base64")U=U.check(f.base64());else if(z==="base64url")U=U.check(f.base64url());else if(z==="e164")U=U.check(f.e164());else if(z==="jwt")U=U.check(f.jwt());else if(z==="emoji")U=U.check(f.emoji());else if(z==="nanoid")U=U.check(f.nanoid());else if(z==="cuid")U=U.check(f.cuid());else if(z==="cuid2")U=U.check(f.cuid2());else if(z==="ulid")U=U.check(f.ulid());else if(z==="xid")U=U.check(f.xid());else if(z==="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=U;break}case"number":case"integer":{let 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=U;break}case"boolean":{u=f.boolean();break}case"null":{u=f.null();break}case"object":{let U={},z=$.properties||{},J=new Set($.required||[]);for(let[g,q]of Object.entries(z)){let N=f$(q,I);U[g]=J.has(g)?N:N.optional()}if($.propertyNames){let g=f$($.propertyNames,I),q=$.additionalProperties&&typeof $.additionalProperties==="object"?f$($.additionalProperties,I):f.any();if(Object.keys(U).length===0){u=f.record(g,q);break}let N=f.object(U).passthrough(),X=f.looseRecord(g,q);u=f.intersection(N,X);break}if($.patternProperties){let g=$.patternProperties,q=Object.keys(g),N=[];for(let Q of q){let H=f$(g[Q],I),Y=f.string().regex(new RegExp(Q));N.push(f.looseRecord(Y,H))}let X=[];if(Object.keys(U).length>0)X.push(f.object(U).passthrough());if(X.push(...N),X.length===0)u=f.object({}).passthrough();else if(X.length===1)u=X[0];else{let Q=f.intersection(X[0],X[1]);for(let H=2;H<X.length;H++)Q=f.intersection(Q,X[H]);u=Q}break}let G=f.object(U);if($.additionalProperties===!1)u=G.strict();else if(typeof $.additionalProperties==="object")u=G.catchall(f$($.additionalProperties,I));else u=G.passthrough();break}case"array":{let{prefixItems:U,items:z}=$;if(U&&Array.isArray(U)){let J=U.map((g)=>f$(g,I)),G=z&&typeof z==="object"&&!Array.isArray(z)?f$(z,I):void 0;if(G)u=f.tuple(J).rest(G);else u=f.tuple(J);if(typeof $.minItems==="number")u=u.check(f.minLength($.minItems));if(typeof $.maxItems==="number")u=u.check(f.maxLength($.maxItems))}else if(Array.isArray(z)){let J=z.map((g)=>f$(g,I)),G=$.additionalItems&&typeof $.additionalItems==="object"?f$($.additionalItems,I):void 0;if(G)u=f.tuple(J).rest(G);else u=f.tuple(J);if(typeof $.minItems==="number")u=u.check(f.minLength($.minItems));if(typeof $.maxItems==="number")u=u.check(f.maxLength($.maxItems))}else if(z!==void 0){let J=f$(z,I),G=f.array(J);if(typeof $.minItems==="number")G=G.min($.minItems);if(typeof $.maxItems==="number")G=G.max($.maxItems);u=G}else u=f.array(f.any());break}default:throw Error(`Unsupported type: ${_}`)}if($.description)u=u.describe($.description);if($.default!==void 0)u=u.default($.default);return u}function f$($,I){if(typeof $==="boolean")return $?f.any():f.never();let _=Ev($,I),u=$.type||$.enum!==void 0||$.const!==void 0;if($.anyOf&&Array.isArray($.anyOf)){let G=$.anyOf.map((q)=>f$(q,I)),g=f.union(G);_=u?f.intersection(_,g):g}if($.oneOf&&Array.isArray($.oneOf)){let G=$.oneOf.map((q)=>f$(q,I)),g=f.xor(G);_=u?f.intersection(_,g):g}if($.allOf&&Array.isArray($.allOf))if($.allOf.length===0)_=u?_:f.any();else{let G=u?_:f$($.allOf[0],I),g=u?0:1;for(let q=g;q<$.allOf.length;q++)G=f.intersection(G,f$($.allOf[q],I));_=G}if($.nullable===!0&&I.version==="openapi-3.0")_=f.nullable(_);if($.readOnly===!0)_=f.readonly(_);let U={},z=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let G of z)if(G in $)U[G]=$[G];let J=["contentEncoding","contentMediaType","contentSchema"];for(let G of J)if(G in $)U[G]=$[G];for(let G of Object.keys($))if(!ej.has(G))U[G]=$[G];if(Object.keys(U).length>0)I.registry.add(_,U);return _}function Cv($,I){if(typeof $==="boolean")return $?f.any():f.never();let _=sj($,I?.defaultTarget),u=$.$defs||$.definitions||{},U={version:_,defs:u,refs:new Map,processing:new Set,rootSchema:$,registry:I?.registry??E$};return f$($,U)}var qq={};S4(qq,{string:()=>IF,number:()=>UF,date:()=>zF,boolean:()=>_F,bigint:()=>uF});function IF($){return S9(g0,$)}function UF($){return i9(X0,$)}function _F($){return c9(N0,$)}function uF($){return o9(Q0,$)}function zF($){return JG(EI,$)}Z$(DI());iI();function QF($,I,_){let u=s.join($,".serena","memories"),U=s.join(u,`result-${I}-${_}.md`);if(k.existsSync(U))return U;let z=s.join(u,`result-${I}.md`);if(k.existsSync(z))return z;return null}function lI($){try{return process.kill($,0),!0}catch(I){return!1}}function rv($){let I=[],_=/[^\s"']+|"([^"]*)"|'([^']*)'/g,u=_.exec($);while(u!==null){if(u[1]!==void 0)I.push(u[1]);else if(u[2]!==void 0)I.push(u[2]);else if(u[0])I.push(u[0]);u=_.exec($)}return I}var vF=G$.object({default_cli:G$.string().optional(),agent_cli_mapping:G$.record(G$.string(),G$.string()).optional()}).passthrough().transform(($)=>({default_cli:$.default_cli,agent_cli_mapping:$.agent_cli_mapping??{}})),HF=G$.object({command:G$.string().optional(),subcommand:G$.string().optional(),prompt_flag:G$.string().optional().transform(($)=>{if($===void 0)return;let I=$.trim().toLowerCase();if(I===""||I==="none"||I==="null")return null;return $}),auto_approve_flag:G$.string().optional(),output_format_flag:G$.string().optional(),output_format:G$.string().optional(),model_flag:G$.string().optional(),default_model:G$.string().optional(),isolation_env:G$.string().optional(),isolation_flags:G$.string().optional()}).passthrough().transform(($)=>({...$,prompt_flag:$.prompt_flag??void 0})),YF=G$.object({active_vendor:G$.string().optional(),vendors:G$.record(G$.string(),HF).optional()}).passthrough().transform(($)=>({active_vendor:$.active_vendor,vendors:$.vendors??{}}));function nv($){try{return a6($)}catch{return null}}function OF($){let I=nv($),_=vF.safeParse(I);if(!_.success)return{};return _.data}function TF($){let I=nv($),_=YF.safeParse(I);if(!_.success)return{vendors:{}};return{active_vendor:_.data.active_vendor,vendors:_.data.vendors}}function Hq($,I){let _=s.resolve($),u=s.parse(_).root;while(_!==u){let U=s.join(_,I);if(k.existsSync(U))return U;_=s.dirname(_)}return null}function BF($){let I=Hq($,s.join(".agents","oma-config.yaml"));if(!I)return null;try{let _=k.readFileSync(I,"utf-8");return OF(_)}catch{return null}}function MF($){let I=Hq($,s.join(".agents","skills","oma-orchestrator","config","cli-config.yaml"));if(!I)return null;try{let _=k.readFileSync(I,"utf-8");return TF(_)}catch{return null}}function Yq($,I){let _=process.cwd(),u=BF(_),U=MF(_),z=$.replace(/-agent$/i,""),J=u?.agent_cli_mapping?.[$]||u?.agent_cli_mapping?.[z],G=I||J||u?.default_cli||U?.active_vendor||"gemini";if(!I&&!J&&!u?.default_cli&&!U?.active_vendor)console.error(l.default.yellow(`[oma] No vendor configured for agent "${$}". Falling back to "gemini".
|
|
312
|
+
Set default_cli in .agents/oma-config.yaml or use --vendor flag.`));return{vendor:G.toLowerCase(),config:U}}function hv($,I){if(I!==void 0)return I;return{gemini:"-p",claude:"-p",qwen:"-p",codex:null}[$]??"-p"}var KF={frontend:["web","frontend","client","ui","app","dashboard","admin","portal"],backend:["api","backend","server","service","gateway","core"],mobile:["mobile","ios","android","native","rn","expo"]},DF={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 dv($,I){if($.startsWith("!"))return[];let _=$.replace(/\/\*\*?$/,"").replace(/\/$/,"");if(!$.includes("*")){let U=s.join(I,_);if(k.existsSync(U)&&k.statSync(U).isDirectory())return[_];return[]}let u=s.join(I,_);if(!k.existsSync(u)||!k.statSync(u).isDirectory())return[];try{return k.readdirSync(u,{withFileTypes:!0}).filter((z)=>z.isDirectory()&&!z.name.startsWith(".")).map((z)=>s.join(_,z.name))}catch{return[]}}function LF($){let I=s.join($,"pnpm-workspace.yaml");if(!k.existsSync(I))return[];try{let _=k.readFileSync(I,"utf-8");return a6(_)?.packages??[]}catch{return[]}}function cv($){let I=s.join($,"package.json");if(!k.existsSync(I))return[];try{let _=k.readFileSync(I,"utf-8"),u=JSON.parse(_);if(Array.isArray(u?.workspaces))return u.workspaces;if(u?.workspaces&&typeof u.workspaces==="object")return u.workspaces.packages??[];return[]}catch{return[]}}function VF($){let I=s.join($,"lerna.json");if(!k.existsSync(I))return[];try{let _=k.readFileSync(I,"utf-8");return JSON.parse(_)?.packages??[]}catch{return[]}}function ZF($){let I=s.join($,"nx.json");if(!k.existsSync(I))return[];return["apps/*","libs/*","packages/*"].flatMap((u)=>dv(u,$))}function WF($){let I=s.join($,"turbo.json");if(!k.existsSync(I))return[];return cv($)}function RF($){let I=s.join($,"mise.toml");if(!k.existsSync(I))return[];try{let _=k.readFileSync(I,"utf-8"),u=[],U=_.match(/workspaces\s*=\s*\[([^\]]+)\]/);if(U?.[1]){let z=U[1].match(/"([^"]+)"|'([^']+)'/g);if(z)u.push(...z.map((J)=>J.replace(/["']/g,"")))}return u}catch{return[]}}function PF($){let I=new Set,_=[LF($),cv($),VF($),ZF($),WF($),RF($)];for(let U of _)for(let z of U)I.add(z);let u=new Set;for(let U of I)for(let z of dv(U,$))u.add(z);return[...u]}function bF($,I){let _=KF[I];if(!_)return 0;let u=s.basename($).toLowerCase(),U=$.toLowerCase();for(let z=0;z<_.length;z++){let J=_[z];if(!J)continue;if(u===J)return 100-z;if(u.includes(J))return 50-z;if(U.includes(J))return 25-z}return 0}function pv($){let I=process.cwd(),_=PF(I);if(_.length>0){let U=_.map((z)=>({workspace:z,score:bF(z,$)})).filter((z)=>z.score>0).sort((z,J)=>J.score-z.score);if(U.length>0&&U[0])return U[0].workspace}let u=DF[$];if(u)for(let U of u){let z=s.resolve(U);if(k.existsSync(z)&&k.statSync(z).isDirectory())return U}return"."}function ov($){let I=s.resolve($);if(k.existsSync(I)&&k.statSync(I).isFile())return k.readFileSync(I,"utf-8");return $}function tv($,I){let _=Hq(I,s.join(".agents","skills","_shared","runtime","execution-protocols",`${$}.md`));if(!_)return"";try{return k.readFileSync(_,"utf-8")}catch{return""}}async function av($,I,_,u,U){let z=u==="."?pv($):u,J=s.resolve(z);if(!k.existsSync(J))k.mkdirSync(J,{recursive:!0}),console.log(l.default.dim(`[${$}] Created workspace: ${J}`));else if(z!==u)console.log(l.default.blue(`[${$}] Auto-detected workspace: ${z}`));let G=n2(),g=s.join(G,`subagent-${_}-${$}.log`),q=s.join(G,`subagent-${_}-${$}.pid`),N=ov(I),{vendor:X,config:Q}=Yq($,U),H=tv(X,process.cwd()),Y=H?`${N}
|
|
313
313
|
|
|
314
|
-
${H}`:N,v=Q?.vendors?.[X]||{},O=v.command||X,T=v.subcommand,V=k.openSync(
|
|
314
|
+
${H}`:N,v=Q?.vendors?.[X]||{},O=v.command||X,T=v.subcommand,V=k.openSync(g,"w");console.log(l.default.blue(`[${$}] Spawning subagent...`)),console.log(l.default.dim(` Vendor: ${X}`)),console.log(l.default.dim(` Workspace: ${J}`)),console.log(l.default.dim(` Log: ${g}`));let W=[],K=hv(X,v.prompt_flag);if(v.output_format_flag&&v.output_format)W.push(v.output_format_flag,v.output_format);else if(v.output_format_flag)W.push(v.output_format_flag);if(v.model_flag&&v.default_model)W.push(v.model_flag,v.default_model);if(v.isolation_flags)W.push(...rv(v.isolation_flags));if(v.auto_approve_flag)W.push(v.auto_approve_flag);else{let x={gemini:"--approval-mode=yolo",codex:"--full-auto",qwen:"--yolo"}[X];if(x)W.push(x)}if(K)W.push(K,Y);let D=[];if(T)D.push(T);if(D.push(...W),!K)D.push(Y);let Z={...process.env};if(v.isolation_env){let[C,...x]=v.isolation_env.split("="),j=x.join("=");if(C&&j){let U$=j.replace("$$",String(process.pid));if(Z[C]=U$,U$.startsWith("/")&&!k.existsSync(U$))k.mkdirSync(U$,{recursive:!0})}}let B=vq(O,D,{cwd:J,stdio:["ignore",V,V],detached:!1,env:Z});if(!B.pid)console.error(l.default.red(`[${$}] Failed to spawn process`)),process.exit(1);k.writeFileSync(q,B.pid.toString()),console.log(l.default.green(`[${$}] Started with PID ${B.pid}`));let L=()=>{try{if(k.existsSync(q))k.unlinkSync(q);if(k.existsSync(g))k.unlinkSync(g)}catch(C){}},A=()=>{if(B.pid&&lI(B.pid))process.kill(B.pid);L(),process.exit()};process.on("SIGINT",A),process.on("SIGTERM",A),B.on("exit",(C)=>{if(console.log(l.default.blue(`[${$}] Exited with code ${C}`)),C!==0&&k.existsSync(g)){let x=k.readFileSync(g,"utf-8").trim();if(x)console.log(l.default.red(`[${$}] Log output:`)),console.log(x)}L(),process.exit(C??0)})}async function ev($,I,_=process.cwd()){let u={};for(let U of I){let z=QF(_,U,$),J=s.join(n2(),`subagent-${$}-${U}.pid`);if(z&&k.existsSync(z)){let g=k.readFileSync(z,"utf-8").match(/^## Status:\s*(\S+)/m);if(g?.[1])u[U]=g[1];else{let q=k.existsSync(J)?k.readFileSync(J,"utf-8").trim():"",N=parseInt(q,10);if(!Number.isNaN(N)&&lI(N))u[U]="running";else u[U]="completed"}}else if(k.existsSync(J)){let G=k.readFileSync(J,"utf-8").trim(),g=parseInt(G,10);if(!Number.isNaN(g)&&lI(g))u[U]="running";else u[U]="crashed"}else u[U]="crashed"}for(let[U,z]of Object.entries(u))console.log(`${U}:${z}`)}var AF=G$.object({agent:G$.string(),task:G$.string(),workspace:G$.string().optional()}),jF=G$.object({tasks:G$.array(AF)});function FF($){if(!k.existsSync($))throw Error(`Tasks file not found: ${$}`);let I=k.readFileSync($,"utf-8"),_=a6(I),u=jF.safeParse(_);if(!u.success)throw Error(`Invalid tasks file format: ${u.error.message}`);return u.data.tasks}function SF($){return $.map((I)=>{let _=I.split(":");if(_.length<2||!_[0])throw Error(`Invalid task format: "${I}". Expected "agent:task" or "agent:task:workspace"`);let u=_[0],U=_.slice(1),z,J;if(U.length>=2){let G=U[U.length-1]??"";if(G.startsWith("./")||G.startsWith("/")||G===".")J=G,z=U.slice(0,-1).join(":");else z=U.join(":")}else z=U.join(":");return{agent:u,task:z,workspace:J}})}async function sv($,I={}){let _=process.cwd(),u=s.join(_,".agents","results"),U=new Date().toISOString().replace(/[:.]/g,"-").slice(0,19),z=s.join(u,`parallel-${U}`);k.mkdirSync(z,{recursive:!0});let J=s.join(z,"pids.txt"),G;try{if(I.inline){if($.length===0)console.error(l.default.red("Error: No tasks specified")),console.log('Usage: oh-my-agent agent:parallel --inline "agent:task" "agent:task" ...'),process.exit(1);G=SF($)}else{if($.length===0)console.error(l.default.red("Error: No tasks file specified")),console.log("Usage: oh-my-agent agent:parallel <tasks-file.yaml>"),process.exit(1);let H=$[0];if(!H)console.error(l.default.red("Error: No tasks file specified")),process.exit(1);G=FF(H)}}catch(H){console.error(l.default.red(`Error: ${H.message}`)),process.exit(1)}console.log(l.default.cyan("======================================")),console.log(l.default.cyan(" Parallel SubAgent Execution")),console.log(l.default.cyan("======================================")),console.log(""),console.log(l.default.blue("Starting parallel execution...")),console.log("");let g=[];for(let H=0;H<G.length;H++){let Y=G[H];if(!Y)continue;let{agent:v,task:O,workspace:T="."}=Y,V=T==="."?pv(v):T,W=s.resolve(V),K=s.join(z,`${v}-${H}.log`);if(console.log(`${l.default.blue(`[${H}]`)} Spawning ${l.default.yellow(v)} agent...`),console.log(` Task: ${O.slice(0,60)}${O.length>60?"...":""}`),console.log(` Workspace: ${V}`),!k.existsSync(W))k.mkdirSync(W,{recursive:!0});let{vendor:D,config:Z}=Yq(v,I.vendor),B=Z?.vendors?.[D]||{},L=B.command||D,A=B.subcommand,C=[],x=hv(D,B.prompt_flag),j=ov(O),U$=tv(D,_),d=U$?`${j}
|
|
315
315
|
|
|
316
|
-
${
|
|
317
|
-
`);let ou=new Promise((X6)=>{
|
|
316
|
+
${U$}`:j;if(B.output_format_flag&&B.output_format)C.push(B.output_format_flag,B.output_format);else if(B.output_format_flag)C.push(B.output_format_flag);if(B.model_flag&&B.default_model)C.push(B.model_flag,B.default_model);if(B.isolation_flags)C.push(...rv(B.isolation_flags));if(B.auto_approve_flag)C.push(B.auto_approve_flag);else{let W1={gemini:"--approval-mode=yolo",codex:"--full-auto",qwen:"--yolo"}[D];if(W1)C.push(W1)}if(x)C.push(x,d);let N$=[];if(A)N$.push(A);if(N$.push(...C),!x)N$.push(d);let p={...process.env};if(B.isolation_env){let[X6,...W1]=B.isolation_env.split("="),X5=W1.join("=");if(X6&&X5){let OU=X5.replace("$$",String(process.pid));if(p[X6]=OU,OU.startsWith("/")&&!k.existsSync(OU))k.mkdirSync(OU,{recursive:!0})}}let O$=k.openSync(K,"w"),N4=vq(L,N$,{cwd:W,stdio:["ignore",O$,O$],detached:!0,env:p});if(!N4.pid){console.error(l.default.red(`[${H}] Failed to spawn ${v} process`));continue}k.appendFileSync(J,`${N4.pid}:${v}
|
|
317
|
+
`);let ou=new Promise((X6)=>{N4.on("exit",(W1)=>{k.closeSync(O$),X6(W1)}),N4.on("error",()=>{k.closeSync(O$),X6(null)})});g.push({pid:N4.pid,agent:v,idx:H,promise:ou})}if(console.log(""),console.log(l.default.blue("[Parallel]")+` Started ${l.default.yellow(String(g.length))} agents`),I.noWait){console.log(`${l.default.blue("[Parallel]")} Running in background mode`),console.log(`${l.default.blue("[Parallel]")} Results will be in: ${z}`),console.log(`${l.default.blue("[Parallel]")} PID list: ${J}`);return}console.log(`${l.default.blue("[Parallel]")} Waiting for completion...`),console.log("");let q=()=>{console.log(""),console.log(`${l.default.yellow("[Parallel]")} Cleaning up child processes...`);for(let{pid:H,agent:Y}of g)if(lI(H)){try{process.kill(-H,"SIGTERM")}catch{try{process.kill(H,"SIGTERM")}catch{}}console.log(`${l.default.yellow("[Parallel]")} Killed PID ${H} (${Y})`)}try{if(k.existsSync(J))k.unlinkSync(J)}catch{}};process.on("SIGINT",()=>{q(),process.exit(130)}),process.on("SIGTERM",()=>{q(),process.exit(143)});let N=0,X=0;for(let{agent:H,idx:Y,promise:v}of g){let O=await v;if(O===0)console.log(`${l.default.green("[DONE]")} ${H} agent (${Y}) completed`),N++;else console.log(l.default.red("[FAIL]")+` ${H} agent (${Y}) failed (exit code: ${O})`),X++}try{if(k.existsSync(J))k.unlinkSync(J)}catch{}console.log(""),console.log(l.default.cyan("======================================")),console.log(l.default.cyan(" Execution Summary")),console.log(l.default.cyan("======================================")),console.log(`Total: ${g.length}`),console.log(`Completed: ${l.default.green(String(N))}`),console.log(`Failed: ${l.default.red(String(X))}`),console.log(`Results: ${z}`),console.log(l.default.cyan("======================================")),console.log(""),console.log(l.default.blue("Result files:"));let Q=k.readdirSync(z).filter((H)=>H.endsWith(".log"));for(let H of Q)console.log(` - ${s.join(z,H)}`);if(X>0)process.exit(1)}function wF(){let $=r2(process.cwd());if($.id&&$.status!=="completed"&&$.status!=="failed")return $.id;return Nq(new Date)}var EF="codex",CF=["codex","claude","gemini","qwen"];function fF($,I,_){if(I)return`Review the uncommitted changes (git diff) in this repository. ${$}`;try{let u=NF("git diff HEAD~1",{cwd:_,encoding:"utf-8"}).trim();if(!u)return`No committed changes found. ${$}`;return`Review the following committed diff:
|
|
318
318
|
|
|
319
319
|
\`\`\`diff
|
|
320
320
|
${u}
|
|
321
321
|
\`\`\`
|
|
322
322
|
|
|
323
|
-
${$}`}catch{return`Review the latest committed changes. ${$}`}}function
|
|
324
|
-
`))if(I.includes("antigravity")||I.includes("language_server")){let _=I.trim().split(" ")[0];if(!_)continue;let u=Number.parseInt(_,10);if(!Number.isNaN(u))return u}}catch{}return null}function
|
|
325
|
-
`).slice(1)){let U=u.match(/:(\d+)\s+\(LISTEN\)/);if(U?.[1])_.push(Number.parseInt(U[1],10))}return _}catch{}return[]}function
|
|
326
|
-
---`,3);if(_===-1)return{frontmatter:{},body:$};let u=I.slice(3,_).trim(),U=I.slice(_+4);try{let z=
|
|
327
|
-
`);_.push(`${u}: ${
|
|
328
|
-
`)+I}import{cpSync as
|
|
329
|
-
`);aI(
|
|
323
|
+
${$}`}catch{return`Review the latest committed changes. ${$}`}}function xF($,I,_,u,U){let z=I.command||$;if($==="codex")return u?[z,"review","--uncommitted"]:[z,"review"];let J=fF(_,u,U),G=I.prompt_flag||"-p",g=[z,G,J];if(I.model_flag&&I.default_model)g.push(I.model_flag,I.default_model);if(I.auto_approve_flag)g.push(I.auto_approve_flag);else{let N={gemini:"--approval-mode=yolo",qwen:"--yolo"}[$];if(N)g.push(N)}if($==="claude")g.push("--output-format","text");return g}async function $H($){let I=wF(),_=$.prompt||"Review for bugs, security vulnerabilities, performance issues, and code quality. Report findings with severity levels.",u="review",U=$.workspace||".",z=s.resolve(U),{vendor:J,config:G}=Yq("review",$.model),g=CF.includes(J)?J:EF;if(g!==J)console.log(l.default.yellow(`[review] "${J}" has no review mode, falling back to ${g}`));let q=G?.vendors?.[g]||{},N=$.uncommitted??!0,X=xF(g,q,_,N,z),[Q,...H]=X,Y=s.join(n2(),`review-${I}.log`),v=s.join(n2(),`review-${I}.pid`);console.log(l.default.dim(` Session: ${I}`)),console.log(l.default.blue("[review] Starting review...")),console.log(l.default.dim(` Vendor: ${g}`)),console.log(l.default.dim(` Command: ${Q} ${H.slice(0,2).join(" ")}...`));let O=k.openSync(Y,"w"),T=vq(Q,H,{cwd:z,stdio:["ignore",O,O],detached:!1});if(!T.pid)console.error(l.default.red("[review] Failed to spawn process")),process.exit(1);k.writeFileSync(v,T.pid.toString()),console.log(l.default.green(`[review] Started with PID ${T.pid}`));let V=()=>{try{if(k.existsSync(v))k.unlinkSync(v);if(k.existsSync(Y))k.unlinkSync(Y)}catch(K){}},W=()=>{if(T.pid&&lI(T.pid))process.kill(T.pid);V(),process.exit()};process.on("SIGINT",W),process.on("SIGTERM",W),T.on("exit",(K)=>{if(k.existsSync(Y)){let D=k.readFileSync(Y,"utf-8").trim();if(D)console.log(""),console.log(D)}console.log(K===0?l.default.green("[review] Done"):l.default.red(`[review] Exited with code ${K}`)),V(),process.exit(K??0)})}I4();var H1=H$(b$(),1);import{execSync as Nw}from"node:child_process";import{existsSync as cq,readFileSync as pq}from"node:fs";import{homedir as oq}from"node:os";import{join as tq}from"node:path";import{execSync as lq}from"node:child_process";import AH from"node:https";function ES(){try{let $=lq("pgrep -fl language_server",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]});for(let I of $.split(`
|
|
324
|
+
`))if(I.includes("antigravity")||I.includes("language_server")){let _=I.trim().split(" ")[0];if(!_)continue;let u=Number.parseInt(_,10);if(!Number.isNaN(u))return u}}catch{}return null}function CS($){try{return lq(`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 fS($){try{let I=lq(`lsof -nP -a -iTCP -sTCP:LISTEN -p ${$}`,{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}),_=[];for(let u of I.split(`
|
|
325
|
+
`).slice(1)){let U=u.match(/:(\d+)\s+\(LISTEN\)/);if(U?.[1])_.push(Number.parseInt(U[1],10))}return _}catch{}return[]}function jH($,I,_,u){return new Promise((U,z)=>{let J=JSON.stringify(u),G=AH.request({hostname:"127.0.0.1",port:$,path:I,method:"POST",headers:{"Content-Type":"application/json","Content-Length":Buffer.byteLength(J),"Connect-Protocol-Version":"1","X-Codeium-Csrf-Token":_},rejectUnauthorized:!1,timeout:5000},(g)=>{let q="";g.on("data",(N)=>{q+=N}),g.on("end",()=>{if(g.statusCode&&g.statusCode>=200&&g.statusCode<300)try{U(JSON.parse(q))}catch{z(Error("Invalid JSON response"))}else z(Error(`Request failed: ${g.statusCode}`))})});G.on("error",z),G.on("timeout",()=>{G.destroy(),z(Error("Request timeout"))}),G.write(J),G.end()})}function xS($,I){return new Promise((_)=>{let u=AH.request({hostname:"127.0.0.1",port:$,path:"/exa.language_server_pb.LanguageServerService/GetUnleashData",method:"POST",headers:{"Content-Type":"application/json","X-Codeium-Csrf-Token":I,"Connect-Protocol-Version":"1"},rejectUnauthorized:!1,timeout:5000},(U)=>{let z="";U.on("data",(J)=>{z+=J}),U.on("end",()=>{if(U.statusCode===200)try{JSON.parse(z),_(!0)}catch{_(!1)}else _(!1)})});u.on("error",()=>_(!1)),u.on("timeout",()=>{u.destroy(),_(!1)}),u.write(JSON.stringify({wrapper_data:{}})),u.end()})}function kS($){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 bH($,I){if(!$||I===void 0)return;let _=Number($),u=Number(I);if(_<=0)return;return{available:u,monthly:_,usedPercent:(_-u)/_*100,remainingPercent:u/_*100}}function yS($){let I=$.userStatus??{},_=I.planStatus?.planInfo??{},u=bH(_.monthlyPromptCredits,I.planStatus?.availablePromptCredits),U=bH(_.monthlyFlowCredits,I.planStatus?.availableFlowCredits),J=(I.cascadeModelConfigData?.clientModelConfigs??[]).filter((g)=>g.quotaInfo!==void 0).map((g)=>{let q=g.quotaInfo.resetTime?new Date(g.quotaInfo.resetTime):null,N=q?q.getTime()-Date.now():0,X=g.quotaInfo.remainingFraction,Q=0;if(X!==void 0&&X!==null)Q=X*100;else if(g.quotaInfo.allowed)Q=100;return{label:g.label||"Unknown",modelId:g.modelOrAlias?.model||"unknown",remainingPercent:Q,isExhausted:g.quotaInfo.remainingFraction===0,resetTime:q,timeUntilReset:kS(N),supportsImages:g.supportsImages??!1}}),G=I.cascadeModelConfigData?.defaultOverrideModelConfig?.modelOrAlias?.model??null;return{userName:I.name||"Unknown",email:I.email||"",planName:_.planName||"Free",tierName:I.userTier?.name||"",promptCredits:u,flowCredits:U,models:J,defaultModel:G,timestamp:new Date}}async function FH(){let $=ES();if(!$)return null;let I=CS($);if(!I)return null;let _=fS($);for(let u of _)if(await xS(u,I))return{pid:$,csrfToken:I,port:u};return null}async function iS($){try{let I=await jH($.port,"/exa.language_server_pb.LanguageServerService/GetUserStatus",$.csrfToken,{metadata:{ideName:"antigravity",extensionName:"antigravity",locale:"en"}});return yS(I)}catch{return null}}async function SH(){let $=await FH();if(!$)return null;try{return await jH($.port,"/exa.language_server_pb.LanguageServerService/GetUserStatus",$.csrfToken,{metadata:{ideName:"antigravity",extensionName:"antigravity",locale:"en"}})}catch{return null}}async function pI(){let $=await FH();if(!$)return null;return iS($)}import{execSync as dq}from"node:child_process";import{cpSync as l4,existsSync as T$,lstatSync as yH,mkdirSync as J4,readdirSync as eI,readFileSync as I6,readlinkSync as aS,rmSync as eS,symlinkSync as sS,unlinkSync as iH,writeFileSync as Z4}from"node:fs";import{dirname as lH,join as r,relative as $w,resolve as nq}from"node:path";function oI($){let I=$.trimStart();if(!I.startsWith("---"))return{frontmatter:{},body:$};let _=I.indexOf(`
|
|
326
|
+
---`,3);if(_===-1)return{frontmatter:{},body:$};let u=I.slice(3,_).trim(),U=I.slice(_+4);try{let z=a6(u);return{frontmatter:z&&typeof z==="object"?z:{},body:U}}catch{return{frontmatter:{},body:U}}}function tI($,I){let _=["---"];for(let[u,U]of Object.entries($)){if(U===void 0||U===null)continue;if(Array.isArray(U)){_.push(`${u}:`);for(let z of U)_.push(` - ${z}`)}else{let z=String(U),J=/[:#[\]{}|>&*!,'"%@`]/.test(z)||z.includes(`
|
|
327
|
+
`);_.push(`${u}: ${J?JSON.stringify(z):z}`)}}return _.push("---"),_.push(""),_.join(`
|
|
328
|
+
`)+I}import{cpSync as Vr,existsSync as wH,mkdirSync as EH,readdirSync as lS,readFileSync as CH,writeFileSync as aI}from"node:fs";import{join as N1}from"node:path";var zu=".agents/rules",mS=".cursor/rules",rS=".claude/rules";function rq($){let I=N1($,zu);if(!wH(I))return[];return lS(I).filter((_)=>_.endsWith(".md")).map((_)=>{let u=CH(N1(I,_),"utf-8"),{frontmatter:U,body:z}=oI(u);return{name:_.replace(".md",""),description:U.description||_.replace(".md",""),globs:U.globs||"",alwaysApply:U.alwaysApply||!1,body:z.trim()}})}function H0($){let I=rq($);if(I.length===0)return[];let _=N1($,mS);EH(_,{recursive:!0});let u=[];for(let U of I){let z=`<!-- Generated by oh-my-agent. Source: ${zu}/${U.name}.md -->`,J=["---",`description: ${JSON.stringify(U.description)}`,`globs: ${U.globs?JSON.stringify(U.globs):""}`,`alwaysApply: ${U.alwaysApply}`,"---","",z,"",U.body,""].join(`
|
|
329
|
+
`);aI(N1(_,`${U.name}.mdc`),J),u.push(U.name)}return u}function fH($){let I=rq($);if(I.length===0)return[];let _=N1($,rS);EH(_,{recursive:!0});let u=[];for(let U of I){let z={description:U.description};if(!U.alwaysApply&&U.globs)z.paths=U.globs;let J=tI(z,`
|
|
330
330
|
${U.body}
|
|
331
|
-
`);aI(
|
|
332
|
-
`)}var
|
|
331
|
+
`);aI(N1(_,`${U.name}.md`),J),u.push(U.name)}return u}var nS="<!-- OMA:START — managed by oh-my-agent. Do not edit this block manually. -->",mq="<!-- OMA:END -->",hS={gemini:"GEMINI.md",codex:"AGENTS.md",qwen:"AGENTS.md"},dS={gemini:"`@agent-name` delegation or `oma agent:spawn {agent} {prompt} {sessionId}`",codex:"`oma agent:spawn {agent} {prompt} {sessionId}`",qwen:"`oma agent:spawn {agent} {prompt} {sessionId}`"},cS={gemini:"Hooks: `BeforeAgent` (keyword detection), `BeforeTool`, `AfterAgent` (persistent mode)",codex:"Hooks: `UserPromptSubmit` (keyword detection), `PreToolUse`, `Stop` (persistent mode)",qwen:"Hooks: `UserPromptSubmit` (keyword detection), `PreToolUse`, `Stop` (persistent mode)"};function pS($,I){let _=[nS,"","# oh-my-agent","","## Architecture","","- **SSOT**: `.agents/` directory (do not modify directly)","- **Response language**: Follows `language` in `.agents/oma-config.yaml`","- **Skills**: `.agents/skills/` (domain specialists)","- **Workflows**: `.agents/workflows/` (multi-step orchestration)",`- **Subagents**: ${dS[$]||"`oma agent:spawn`"}`,"","## Workflows","","Execute by naming the workflow in your prompt. Keywords are auto-detected via hooks.","","| Workflow | File | Description |","|----------|------|-------------|","| orchestrate | `orchestrate.md` | Parallel subagents + Review Loop |","| work | `work.md` | Step-by-step with remediation loop |","| ultrawork | `ultrawork.md` | 5-Phase Gate Loop (11 reviews) |","| plan | `plan.md` | PM task breakdown |","| brainstorm | `brainstorm.md` | Design-first ideation |","| review | `review.md` | QA audit |","| debug | `debug.md` | Root cause + minimal fix |","| commit | `commit.md` | Conventional Commits |","","To execute: read and follow `.agents/workflows/{name}.md` step by step.","","## Auto-Detection","",cS[$]||"","Keywords defined in `.agents/hooks/core/triggers.json` (multi-language).","Persistent workflows (orchestrate, ultrawork, work) block termination until complete.",'Deactivate: say "workflow done".',"","## Rules","","1. **Do not modify `.agents/` files** — SSOT protection","2. Workflows execute via keyword detection or explicit naming — never self-initiated","3. Response language follows `.agents/oma-config.yaml`",""];if(I.length>0){_.push("## Project Rules","",`Read the relevant file from \`${zu}/\` when working on matching code.`,"","| Rule | File | Scope |","|------|------|-------|");for(let u of I){let U=u.globs||(u.alwaysApply?"always":"on request");_.push(`| ${u.name} | \`${zu}/${u.name}.md\` | ${U} |`)}_.push("")}return _.push(mq),_.join(`
|
|
332
|
+
`)}var oS="<!-- OMA:START";function tS($,I){if(wH($)){let _=CH($,"utf-8"),u=_.indexOf(oS),U=_.indexOf(mq);if(u!==-1&&U!==-1){let z=_.slice(0,u),J=_.slice(U+mq.length);aI($,`${z}${I}${J}`)}else aI($,`${_.trimEnd()}
|
|
333
333
|
|
|
334
334
|
${I}
|
|
335
335
|
`)}else aI($,`${I}
|
|
336
|
-
`)}function
|
|
336
|
+
`)}function Ju($,I){let _=hS[I];if(!_)return!1;let u=rq($),U=pS(I,u);return tS(N1($,_),U),!0}var W$="first-fluke/oh-my-agent",U4=".agents/skills",hq=["claude","codex","copilot","cursor","gemini","qwen"];function mH($){let I=r($,".agents","oma-config.yaml");if(!T$(I))return[...hq];let u=I6(I,"utf-8").match(/^vendors:\s*\n((?:\s+-\s+\S+\n?)*)/m);if(!u)return[...hq];let U=[...u[1].matchAll(/-\s+(\S+)/g)].map((z)=>z[1]);return U.length>0?U:[...hq]}function rH($,I){let _=r($,".agents","oma-config.yaml");if(!T$(_))return;let u=I6(_,"utf-8"),U=`vendors:
|
|
337
337
|
${I.map((z)=>` - ${z}`).join(`
|
|
338
338
|
`)}`;if(/^vendors:/m.test(u))u=u.replace(/^vendors:\s*\n(?:\s+-\s+\S+\n?)*/m,`${U}
|
|
339
339
|
`);else u=`${u.trimEnd()}
|
|
340
340
|
${U}
|
|
341
|
-
`;
|
|
341
|
+
`;Z4(_,u)}var 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"},{name:"oma-pdf",desc:"PDF to Markdown conversion via opendataloader-pdf"}],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"}]},nH={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)};function Y0($){try{if(!yH($).isDirectory())iH($)}catch{}}function Gu($,I,_,u){let U=r($,".agents","skills",I);if(!T$(U))return!1;let z=r(_,U4,I);Y0(z),J4(z,{recursive:!0}),l4(U,z,{recursive:!0,force:!0});let J=r(U,"variants"),G=r(z,"stack");if(u&&T$(r(J,u)))J4(G,{recursive:!0}),l4(r(J,u),G,{recursive:!0,force:!0}),Z4(r(G,"stack.yaml"),`language: ${u}
|
|
342
342
|
source: preset
|
|
343
|
-
`);let
|
|
344
|
-
${X}`;
|
|
343
|
+
`);let g=r(z,"variants");if(T$(g))eS(g,{recursive:!0,force:!0});return!0}function gu($,I){let _=r($,".agents","skills","_shared");if(!T$(_))return;let u=r(I,U4,"_shared");Y0(u),J4(u,{recursive:!0}),l4(_,u,{recursive:!0,force:!0})}function hH($,I){let _=r($,".agents","workflows");if(!T$(_))return;let u=r(I,".agents","workflows");Y0(u),J4(u,{recursive:!0}),l4(_,u,{recursive:!0,force:!0})}function dH($,I){let _=r($,".agents","rules");if(!T$(_))return;let u=r(I,".agents","rules");Y0(u),J4(u,{recursive:!0}),l4(_,u,{recursive:!0,force:!0})}function cH($,I,_=!1){let u=r($,".agents","config");if(T$(u)){let z=r(I,".agents","config");if(J4(z,{recursive:!0}),_)l4(u,z,{recursive:!0,force:!0});else for(let J of eI(u,{withFileTypes:!0})){let G=r(z,J.name);if(!T$(G))l4(r(u,J.name),G,J.isDirectory()?{recursive:!0}:{})}}let U=r($,".agents","mcp.json");if(T$(U)){let z=r(I,".agents");J4(z,{recursive:!0});let J=r(z,"mcp.json");if(_||!T$(J))l4(U,J)}}function pH($){let I=process.env.HOME||process.env.USERPROFILE||"",_=r(I,".gemini","antigravity","global_workflows"),u=r($,".agents","workflows");if(!T$(u))return;J4(_,{recursive:!0}),l4(u,_,{recursive:!0,force:!0})}var Iw={"backend-engineer":{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:20},"frontend-engineer":{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:20},"db-engineer":{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:15},"debug-investigator":{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:15},"mobile-engineer":{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:20},"pm-planner":{tools:"Read, Write, Grep, Glob, Bash",model:"sonnet",maxTurns:10},"qa-reviewer":{tools:"Read, Grep, Glob, Bash",model:"sonnet",maxTurns:15,effort:"low"}};function Uw($,I){fH(I)}function _w($,I){if(!T$($))return;let _=r(I,".claude","agents");J4(_,{recursive:!0});for(let u of eI($,{withFileTypes:!0})){if(!u.isFile()||!u.name.endsWith(".md"))continue;let U=u.name,z=I6(r($,U),"utf-8"),{frontmatter:J,body:G}=oI(z),g=J.name||U.replace(".md",""),q=Iw[g]||{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:20},N={name:g,description:J.description,tools:q.tools,model:q.model,maxTurns:q.maxTurns};if(q.effort)N.effort=q.effort;if(J.skills)N.skills=J.skills;let X=G.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} -->
|
|
344
|
+
${X}`;Z4(r(_,U),tI(N,Q))}}function uw($,I){if(!T$($))return;for(let _ of eI($,{withFileTypes:!0})){if(!_.isFile()||!_.name.endsWith(".md")||_.name.startsWith("_"))continue;let u=_.name,U=I6(r($,u),"utf-8"),{frontmatter:z}=oI(U),J=u.replace(".md",""),G=z.description||J,g=r(I,".claude","skills",J);Y0(g);let q=tI({name:J,description:G,"disable-model-invocation":!0},`# /${J}
|
|
345
345
|
|
|
346
346
|
Read and follow \`.agents/workflows/${u}\` step by step.
|
|
347
|
-
`);
|
|
348
|
-
`)}function
|
|
349
|
-
`),
|
|
347
|
+
`);J4(g,{recursive:!0}),Z4(r(g,"SKILL.md"),q)}}function zw($,I){let _=r($,".agents","hooks","core");if(!T$(_))return;J4(I,{recursive:!0});for(let u of eI(I,{withFileTypes:!0}))Y0(r(I,u.name));l4(_,I,{recursive:!0,force:!0,dereference:!0})}function Jw($,I,_){let u={};if(T$($))try{u=JSON.parse(I6($,"utf-8"))}catch{}if(u.hooks={...u.hooks||{},...I},_)Object.assign(u,_);Z4($,`${JSON.stringify(u,null,2)}
|
|
348
|
+
`)}function xH($,I){if($.projectDirEnv)return`${$.runtime} "$${$.projectDirEnv}/${$.hookDir}/${I}"`;return`${$.runtime} ${$.hookDir}/${I}`}function Gw($,I,_){zw($,r(I,_.hookDir));let u={};for(let[z,J]of Object.entries(_.events)){let G={hooks:[{type:"command",command:xH(_,J.hook),timeout:J.timeout}]};if(J.matcher)G.matcher=J.matcher;u[z]=[G]}let U={};if(_.statusLine)U.statusLine={type:"command",command:xH(_,_.statusLine.hook)};if(_.extra)Object.assign(U,_.extra);if(Jw(r(I,_.settingsFile),u,Object.keys(U).length>0?U:void 0),_.featureFlags)gw(r(I,_.featureFlags.file),_.featureFlags.section,_.featureFlags.flags)}function gw($,I,_){J4(lH($),{recursive:!0});let u="";if(T$($))u=I6($,"utf-8");for(let[U,z]of Object.entries(_)){if(new RegExp(`${U}\\s*=\\s*${z}`,"i").test(u))continue;let G=new RegExp(`${U}\\s*=\\s*${!z}`,"i");if(G.test(u)){u=u.replace(G,`${U} = ${z}`),Z4($,u);continue}if(new RegExp(`\\[${I}\\]`,"i").test(u))u=u.replace(new RegExp(`(\\[${I}\\][^[]*)`,"i"),`$1${U} = ${z}
|
|
349
|
+
`),Z4($,u);else u=`${u.trimEnd()}
|
|
350
350
|
|
|
351
351
|
[${I}]
|
|
352
352
|
${U} = ${z}
|
|
353
|
-
`,
|
|
353
|
+
`,Z4($,u)}}var qw="<!-- OMA:START",kH="<!-- OMA:END -->";function Xw($,I){let _=r($,".claude","CLAUDE.md.template");if(!T$(_))return;let u=I6(_,"utf-8").trim(),U=r(I,"CLAUDE.md");if(T$(U)){let z=I6(U,"utf-8"),J=z.indexOf(qw),G=z.indexOf(kH);if(J!==-1&&G!==-1){let g=z.slice(0,J),q=z.slice(G+kH.length);Z4(U,`${g}${u}${q}`)}else Z4(U,`${z.trimEnd()}
|
|
354
354
|
|
|
355
355
|
${u}
|
|
356
|
-
`)}else
|
|
357
|
-
`)}function
|
|
358
|
-
`),"Authentication Status"),o(`Use ${
|
|
356
|
+
`)}else Z4(U,`${u}
|
|
357
|
+
`)}function qu($,I,_){let u=r($,".agents","agents"),U=r($,".agents","workflows"),z=r($,".agents","hooks","variants");for(let J of _){let G=r(z,`${J}.json`);if(T$(G)){let g=JSON.parse(I6(G,"utf-8"));Gw($,I,g)}if(J==="claude")_w(u,I),uw(U,I),Uw($,I),Xw($,I)}}function O0(){return[...T4.domain,...T4.design,...T4.coordination,...T4.utility,...T4.infrastructure]}var oH={claude:".claude/skills",copilot:".github/skills"};function Xu($,I,_){let u=[],U=[],z=nq($,U4);for(let J of I){let G=oH[J],g=r($,G);if(!T$(g))J4(g,{recursive:!0});for(let q of _){let N=r(z,q),X=r(g,q);if(!T$(N)){U.push(`${G}/${q} (source missing)`);continue}try{if(yH(X).isSymbolicLink()){if(nq(lH(X),aS(X))===nq(N)){U.push(`${G}/${q} (already linked)`);continue}iH(X)}else{U.push(`${G}/${q} (real dir exists)`);continue}}catch(H){}let Q=$w(g,N);sS(Q,X,"dir"),u.push(`${G}/${q}`)}}return{created:u,skipped:U}}function tH($){let I=r($,U4);if(!T$(I))return[];return eI(I,{withFileTypes:!0}).filter((_)=>_.isDirectory()&&!_.name.startsWith("_")).map((_)=>_.name)}function aH($){let I=[];for(let[_,u]of Object.entries(oH))if(T$(r($,u)))I.push(_);return I}function Q1(){try{return dq("gh --version",{stdio:"ignore"}),!0}catch{return!1}}function m4(){try{return dq("gh auth status",{stdio:"ignore"}),!0}catch{return!1}}function v1(){try{return dq(`gh api user/starred/${W$}`,{stdio:"ignore"}),!0}catch{return!1}}function eH(){return Q1()&&m4()&&v1()}function aq(){try{let $=Nw("claude auth status",{stdio:["pipe","pipe","ignore"],encoding:"utf-8"});return JSON.parse($).loggedIn===!0}catch{return!1}}function eq(){let $=tq(oq(),".gemini","oauth_creds.json");if(!cq($))return!1;try{let I=JSON.parse(pq($,"utf-8"));return!!(I.access_token&&I.refresh_token)}catch{return!1}}function sq(){let $=tq(oq(),".codex","auth.json");if(!cq($))return!1;try{return!!JSON.parse(pq($,"utf-8")).tokens?.access_token}catch{return!1}}function $X(){let $=tq(oq(),".qwen","settings.json");if(!cq($))return!1;try{return!!JSON.parse(pq($,"utf-8")).security?.auth?.selectedType}catch{return!1}}async function sH($=!1){let[I,_]=await Promise.all([m4(),pI().then((X)=>!!X)]),u=eq(),U=aq(),z=sq(),J=$X(),G={github:I,gemini:u,claude:U,codex:z,qwen:J,antigravity:_};if($){console.log(JSON.stringify(G,null,2));return}D$(H1.default.bgMagenta(H1.default.white(" \uD83D\uDD10 oh-my-agent auth status ")));let g=(X)=>X?"✅":"❌",q=(X)=>X?H1.default.green("Authenticated"):H1.default.red("Not Authenticated");y([["GitHub",I],["Gemini CLI",u],["Claude CLI",U],["Codex CLI",z],["Qwen CLI",J],["Antigravity",_]].map(([X,Q])=>`${g(Q)} ${X.padEnd(12)} ${q(Q)}`).join(`
|
|
358
|
+
`),"Authentication Status"),o(`Use ${H1.default.cyan("gemini auth")}, ${H1.default.cyan("claude auth")}, etc. to login.`)}import{spawn as Qw}from"node:child_process";import{existsSync as $Y,readFileSync as IY,writeFileSync as vw}from"node:fs";import Hw from"node:http";import Yw from"node:https";import{homedir as Ow}from"node:os";import{join as UY}from"node:path";var Tw="http://localhost:12341/mcp",_Y=1000,Bw=Number.parseInt(process.env.OH_MY_AG_BRIDGE_PROBE_TIMEOUT_MS??"2000",10),Mw=Number.parseInt(process.env.OH_MY_AG_BRIDGE_STARTUP_TIMEOUT_MS??"120000",10),S6={};function uY(){if(S6.stdinData)process.stdin.off("data",S6.stdinData);if(S6.sigint)process.off("SIGINT",S6.sigint);if(S6.sigterm)process.off("SIGTERM",S6.sigterm);S6={}}function Kw(){let $=UY(Ow(),".serena","serena_config.yml");if(!$Y($))return;try{let _=IY($,"utf8").match(/^projects:\s*\n((?:\s*-\s*.+\n?)*)/m);if(!_)return;let U=((_[1]??"").match(/^\s*-\s*(.+)$/gm)||[]).map((z)=>z.replace(/^\s*-\s*/,"").trim());for(let z of U){let J=UY(z,".serena","project.yml");if(!$Y(J))continue;let G=IY(J,"utf8");if(!/^languages:/m.test(G)){console.error(`[Bridge] Missing 'languages' key in ${J}, adding default...`);let g=G.search(/\n(?=\w)/);if(g!==-1){let q=`${G.slice(0,g)}
|
|
359
359
|
|
|
360
360
|
languages:
|
|
361
361
|
- python
|
|
362
362
|
- typescript
|
|
363
363
|
- dart
|
|
364
|
-
- terraform${
|
|
365
|
-
`);let x=
|
|
364
|
+
- terraform${G.slice(g)}`;vw(J,q),console.error(`[Bridge] Fixed ${J}`)}}}}catch(I){console.error(`[Bridge] Warning: Failed to validate Serena configs: ${I instanceof Error?I.message:I}`)}}async function zY($){uY();let I=$||Tw,_=new URL(I),U=_.protocol==="https:"?Yw:Hw,z=null,J=!1,G=null,g=!1;async function q(){let B=_.hostname==="localhost"?[I,I.replace("localhost","127.0.0.1")]:[I];for(let L of B)if(await new Promise((C)=>{let x=U.get(L,(j)=>{C(!0),x.destroy()});x.setTimeout(Bw,()=>{x.destroy(),C(!1)}),x.on("error",()=>{C(!1)}),x.end()}))return!0;return!1}async function N(){let B=_.port||"12341",L=_.hostname||"0.0.0.0";console.error(`Starting Serena server on ${L}:${B}...`),z=Qw("uvx",["--from","git+https://github.com/oraios/serena","serena-mcp-server","--transport","streamable-http","--host",L,"--port",B,"--context","ide","--open-web-dashboard","false"],{stdio:"pipe",detached:!1});let C=z;if(z.stderr)z.stderr.on("data",(j)=>{process.stderr.write(`[Serena] ${j}`)});if(z.stdout)z.stdout.on("data",()=>{});C.on("error",(j)=>{console.error("Failed to start Serena server:",j),process.exit(1)}),C.on("exit",(j,U$)=>{if(console.error(`Serena server exited with code ${String(j)} signal ${String(U$)}`),!J)process.exit(typeof j==="number"?j:1)}),console.error("Waiting for Serena to be ready...");let x=Math.max(1,Math.ceil(Mw/_Y));for(let j=0;j<x;j++){if(await q()){console.error("Serena server is ready!");return}await new Promise((U$)=>setTimeout(U$,_Y))}console.error("Timed out waiting for Serena server to start."),process.exit(1)}function X(B,L){let A=new URL(I),C={"Content-Type":"application/json",Accept:"application/json, text/event-stream","Content-Length":String(Buffer.byteLength(B))};if(G)C["Mcp-Session-Id"]=G;let x={hostname:A.hostname,port:A.port,path:A.pathname,method:"POST",headers:C},j=U.request(x,L);j.on("error",(U$)=>{console.error("POST error:",U$.message)}),j.write(B),j.end()}function Q(B,L){let A="";B.on("data",(C)=>{A+=C.toString(),A=A.replace(/\r\n/g,`
|
|
365
|
+
`);let x=A.split(`
|
|
366
366
|
|
|
367
|
-
`);
|
|
368
|
-
`),
|
|
369
|
-
`)}),C.on("end",()=>{if(
|
|
370
|
-
`);v=
|
|
371
|
-
`)}),x.on("end",()=>{if(
|
|
372
|
-
`);if(
|
|
373
|
-
`),X=_?!0:await
|
|
374
|
-
${N}`,initialValue:!0});if(
|
|
375
|
-
`).filter((
|
|
376
|
-
`);y(Y,"Details")}let H=[
|
|
377
|
-
`);if(y(H,"Results"),$)o(
|
|
367
|
+
`);A=x.pop()||"";for(let j of x){let U$=j.split(`
|
|
368
|
+
`),d="";for(let N$ of U$)if(N$.startsWith("data:"))d+=N$.slice(5).trim();if(d)L(d)}})}function H(){if(!G||g)return;g=!0;let B=new URL(I),L={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":G}},A=U.request(L,(C)=>{if(C.statusCode===405){C.resume(),g=!1;return}if(C.statusCode===409){console.error("GET stream already open for this session (409)"),C.resume();return}if(C.statusCode!==200){if(console.error(`Server stream connection failed: ${C.statusCode}`),C.resume(),g=!1,!J)setTimeout(H,1000);return}Q(C,(x)=>{process.stdout.write(`${x}
|
|
369
|
+
`)}),C.on("end",()=>{if(g=!1,!J)console.error("Server stream closed, reconnecting..."),setTimeout(H,1000)}),C.on("error",(x)=>{if(g=!1,console.error("Server stream error:",x.message),!J)setTimeout(H,1000)})});A.on("error",(C)=>{if(g=!1,console.error("Server stream connection error:",C.message),!J)setTimeout(H,1000)}),A.end()}if(Kw(),!await q())await N();else console.error(`Connected to existing Serena server at ${I}`);let v="",O=!1,T=[];process.stdin.setEncoding("utf8");let V=(B)=>{v+=B.toString();let L=v.split(`
|
|
370
|
+
`);v=L.pop()||"";for(let A of L)if(A.trim())W(A.trim())};process.stdin.on("data",V);function W(B){if(O){T.push(B);return}D(B)}function K(){while(T.length>0){let B=T.shift();if(B)D(B)}}function D(B){try{let L=JSON.parse(B),A=L.method==="initialize";if(A)O=!0;let C=JSON.stringify(L);X(C,(x)=>{let j=x.headers["mcp-session-id"];if(j)G=j;if(x.statusCode===202){if(x.resume(),A)O=!1,K();return}if((x.headers["content-type"]||"").includes("text/event-stream"))Q(x,(d)=>{process.stdout.write(`${d}
|
|
371
|
+
`)}),x.on("end",()=>{if(A){if(O=!1,G)H();K()}});else{let d="";x.on("data",(N$)=>{d+=N$.toString()}),x.on("end",()=>{if(d.trim())process.stdout.write(`${d}
|
|
372
|
+
`);if(A){if(O=!1,G)H();K()}})}})}catch(L){let A=L instanceof Error?L.message:String(L);console.error("Failed to parse IDE message:",A)}}process.stdin.resume();let Z=()=>{if(J=!0,uY(),z)console.error("Stopping Serena server..."),z.kill("SIGTERM");process.exit(0)};S6={stdinData:V,sigint:Z,sigterm:Z},process.on("SIGINT",Z),process.on("SIGTERM",Z)}I4();var G4=H$(b$(),1);import{existsSync as U6,readdirSync as T0,readFileSync as IX,rmSync as JY}from"node:fs";import{tmpdir as Dw}from"node:os";import{join as k$}from"node:path";async function Lw($,I,_){let u=k$($,".gemini","antigravity"),U=k$(u,"brain"),z=k$(u,"implicit"),J=k$(u,"knowledge"),G=U6(U),g=U6(z),q=U6(J);if(!G&&!g&&!q)return{shouldCleanupBrain:!1,shouldCleanupImplicit:!1,shouldCleanupKnowledge:!1};if(I)return{shouldCleanupBrain:G,shouldCleanupImplicit:g,shouldCleanupKnowledge:q};let N=[G&&" - brain",g&&" - implicit",q&&" - knowledge"].filter(Boolean).join(`
|
|
373
|
+
`),X=_?!0:await j$({message:`Clean up IDE garbage?
|
|
374
|
+
${N}`,initialValue:!0});if(u$(X)||!X)return{shouldCleanupBrain:!1,shouldCleanupImplicit:!1,shouldCleanupKnowledge:!1};return{shouldCleanupBrain:G,shouldCleanupImplicit:g,shouldCleanupKnowledge:q}}async function GY($=!1,I=!1,_=!1){let u=process.cwd(),U=k$(u,".agents","results"),z=Dw(),J={cleaned:0,skipped:0,details:[]},G=await Lw(u,I,_),g=(Y)=>{J.details.push($?`[DRY-RUN] ${Y}`:`[CLEAN] ${Y}`),J.cleaned++},q=(Y)=>{J.details.push(`[SKIP] ${Y}`),J.skipped++},N=(Y)=>{if($)return;try{JY(Y,{force:!0})}catch{}},X=(Y)=>{try{return process.kill(Y,0),!0}catch{return!1}},Q=async(Y)=>{if($)return;try{process.kill(Y)}catch{}await new Promise((v)=>setTimeout(v,1000));try{if(X(Y))process.kill(Y,"SIGKILL")}catch{}};try{let Y=T0(z).filter((v)=>v.startsWith("subagent-")&&v.endsWith(".pid"));for(let v of Y){let O=k$(z,v),T=IX(O,"utf-8").trim();if(!T){g(`Removing empty PID file: ${O}`),N(O);continue}let V=parseInt(T,10);if(Number.isNaN(V)){g(`Removing invalid PID file: ${O}`),N(O);continue}if(X(V))g(`Killing orphaned process PID=${V} (from ${O})`),await Q(V),N(O);else g(`Removing stale PID file (process gone): ${O}`),N(O)}}catch{}try{let Y=T0(z).filter((v)=>v.startsWith("subagent-")&&v.endsWith(".log"));for(let v of Y){let O=k$(z,v),T=v.replace(".log",".pid"),V=k$(z,T);if(U6(V))try{let W=IX(V,"utf-8").trim(),K=parseInt(W,10);if(!Number.isNaN(K)){if(X(K)){q(`Log file has active process: ${O}`);continue}}}catch{}g(`Removing stale log file: ${O}`),N(O)}}catch{}if(U6(U))try{let Y=T0(U).filter((v)=>v.startsWith("parallel-"));for(let v of Y){let O=k$(U,v,"pids.txt");if(!U6(O))continue;let V=IX(O,"utf-8").split(`
|
|
375
|
+
`).filter((K)=>K.trim()),W=!1;for(let K of V){let[D,Z]=K.split(":"),B=parseInt(D?.trim()||"",10);if(Number.isNaN(B))continue;if(X(B))W=!0,g(`Killing orphaned parallel agent PID=${B} (${Z?.trim()||"unknown"})`),await Q(B),N(O)}if(!W)g(`Removing stale PID list: ${O}`),N(O);else if(!$){await new Promise((K)=>setTimeout(K,1000));try{JY(O,{force:!0})}catch{}}}}catch{}else q(`No results directory found: ${U}`);if(G.shouldCleanupBrain||G.shouldCleanupImplicit||G.shouldCleanupKnowledge){let Y=k$(u,".gemini","antigravity");if(G.shouldCleanupBrain){let v=k$(Y,"brain");try{if(U6(v)){let O=T0(v);for(let T of O){let V=k$(v,T);g(`Removing brain file: ${V}`),N(V)}}}catch{}}if(G.shouldCleanupImplicit){let v=k$(Y,"implicit");try{if(U6(v)){let O=T0(v);for(let T of O){let V=k$(v,T);g(`Removing implicit file: ${V}`),N(V)}}}catch{}}if(G.shouldCleanupKnowledge){let v=k$(Y,"knowledge");try{if(U6(v)){let O=T0(v);for(let T of O){let V=k$(v,T);g(`Removing knowledge file: ${V}`),N(V)}}}catch{}}}if(I){console.log(JSON.stringify(J,null,2));return}if(console.clear(),D$(G4.default.bgMagenta(G4.default.white(" \uD83E\uDDF9 oh-my-agent cleanup "))),$)y(G4.default.yellow("Dry-run mode — no changes will be made"),"Mode");if(J.details.length>0){let Y=[G4.default.bold("Cleanup Details"),...J.details.map((v)=>{if(v.startsWith("[DRY-RUN]"))return G4.default.yellow(v);if(v.startsWith("[CLEAN]"))return G4.default.green(v);return G4.default.cyan(v)})].join(`
|
|
376
|
+
`);y(Y,"Details")}let H=[G4.default.bold("Summary"),"┌─────────┬────────┐",`│ ${G4.default.bold("Action")} │ ${G4.default.bold("Count")} │`,"├─────────┼────────┤",`│ Cleaned │ ${String(J.cleaned).padEnd(6)} │`,`│ Skipped │ ${String(J.skipped).padEnd(6)} │`,"└─────────┴────────┘"].join(`
|
|
377
|
+
`);if(y(H,"Results"),$)o(G4.default.yellow("Run without --dry-run to apply changes"));else o(G4.default.green("Cleanup complete!"))}I4();var i=H$(b$(),1);import{execSync as UX}from"node:child_process";import{existsSync as _6,readdirSync as qY,readFileSync as Qu,writeFileSync as Zw}from"node:fs";import{join as Y1}from"node:path";var gY={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",CLAUDE_CODE_DISABLE_AUTO_MEMORY:"1",DISABLE_PROMPT_CACHING:"1"},Vw={commit:`Generated with oh-my-agent
|
|
378
378
|
|
|
379
|
-
Co-Authored-By: First Fluke <our.first.fluke@gmail.com>`,pr:"Generated with [oh-my-agent](https://github.com/first-fluke/oh-my-agent)"};function B0($){let I=$?.env;if(!I)return!0;for(let[_,u]of Object.entries(
|
|
380
|
-
`),"CLI Status"),T.length>0)y(T.map((
|
|
381
|
-
`),"Install missing CLIs");if(z.length>0){let
|
|
382
|
-
`);y(
|
|
383
|
-
`);y(
|
|
384
|
-
`),"Installed Skills")}catch(
|
|
385
|
-
${
|
|
386
|
-
${
|
|
387
|
-
${
|
|
388
|
-
${
|
|
389
|
-
${
|
|
390
|
-
`),a.success(
|
|
391
|
-
${
|
|
392
|
-
${
|
|
393
|
-
${
|
|
394
|
-
${
|
|
395
|
-
${
|
|
379
|
+
Co-Authored-By: First Fluke <our.first.fluke@gmail.com>`,pr:"Generated with [oh-my-agent](https://github.com/first-fluke/oh-my-agent)"};function B0($){let I=$?.env;if(!I)return!0;for(let[_,u]of Object.entries(gY)){let U=I[_];if(typeof u==="number"){if((U??0)<u)return!0}else if(U!==u)return!0}if(!$.attribution?.commit||!$.attribution?.pr)return!0;return!1}function M0($){return $.env={...$.env||{},...gY},$.attribution={...Vw},$}async function Nu($,I,_){try{let u=UX(`${I} --version`,{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim();return{name:$,installed:!0,version:u,installCmd:_}}catch{return{name:$,installed:!1,installCmd:_}}}async function Ww($){let I=process.env.HOME||process.env.USERPROFILE||"",u={gemini:{path:`${I}/.gemini/settings.json`,type:"json"},claude:{path:`${I}/.claude.json`,type:"json"},codex:{path:`${I}/.codex/config.toml`,type:"toml"}}[$];if(!u)return{configured:!1};if(_6(u.path))try{let U=Qu(u.path,"utf-8");if(u.type==="json"){let z=JSON.parse(U);return{configured:!!(z.mcpServers||z.mcp),path:u.path}}return{configured:!0,path:u.path}}catch{return{configured:!1}}return{configured:!1}}async function Rw(){let $=Y1(process.cwd(),U4);if(!_6($))return[];let I=O0(),_=[];for(let u of I){let U=Y1($,u.name),z=Y1(U,"SKILL.md");_.push({name:u.name,installed:_6(U),hasSkillMd:_6(z)})}return _}async function Pw(){let $=process.env.HOME||process.env.USERPROFILE||"",I=Y1($,".gemini","antigravity","global_workflows");if(!_6(I))return{installed:!1,count:0};try{return{installed:!0,count:qY(I).filter((u)=>u.endsWith(".md")).length}}catch{return{installed:!1,count:0}}}async function XY($=!1){let I=process.cwd(),_=process.env.HOME||process.env.USERPROFILE||"",u=await Promise.all([Nu("gemini","gemini","bun install --global @google/gemini-cli"),Nu("claude","claude","bun install --global @anthropic-ai/claude-code"),Nu("codex","codex","bun install --global @openai/codex"),Nu("qwen","qwen","bun install --global @qwen-code/qwen-code")]),U={gemini:eq,claude:aq,codex:sq,qwen:$X},z=await Promise.all(u.filter((D)=>D.installed).map(async(D)=>{let Z=await Ww(D.name);return{...D,mcp:Z}})),J=await Rw(),G=await Pw(),g=!1;try{g=UX("git config --get rerere.enabled",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim()==="true"}catch{}let q=u.some((D)=>D.name==="claude"&&D.installed),N=!1,X=!1,Q=Y1(_,".claude","settings.json"),H=Y1(I,"CLAUDE.md");if(q)try{if(_6(Q)){let D=JSON.parse(Qu(Q,"utf-8"));N=!B0(D)}}catch{}try{if(_6(H))X=Qu(H,"utf-8").includes("<!-- OMA:START")}catch{}let Y=Y1(I,".serena","memories"),v=_6(Y),O=0;if(v)try{O=qY(Y).length}catch{}let T=u.filter((D)=>!D.installed),V=J.length>0?J.filter((D)=>!D.installed||!D.hasSkillMd):O0().map((D)=>({name:D.name,installed:!1,hasSkillMd:!1})),W=T.length+V.length+(G.installed?0:1)+(g?0:1)+(q&&!N?1:0)+(q&&!X?1:0);if($){let D={ok:W===0,issues:W,clis:u.map((Z)=>({name:Z.name,installed:Z.installed,version:Z.version||null,authenticated:Z.installed?U[Z.name]?.()??!1:!1})),mcp:z.map((Z)=>({name:Z.name,configured:Z.mcp.configured,path:Z.mcp.path||null})),skills:J.length>0?J.map((Z)=>({name:Z.name,installed:Z.installed,complete:Z.hasSkillMd})):[],missingSkills:V.map((Z)=>Z.name),globalWorkflows:{installed:G.installed,count:G.count},serena:{exists:v,fileCount:O},gitRerere:{enabled:g},recommendedSettings:{configured:N},claudeMd:{hasOmaBlock:X}};console.log(JSON.stringify(D,null,2)),process.exit(W===0?0:1)}console.clear(),D$(i.default.bgMagenta(i.default.white(" \uD83E\uDE7A oh-my-agent doctor ")));let K=$4();try{let D=u.map((L)=>{let A=L.installed?i.default.green("✅"):i.default.red("❌"),C=L.version||"-",x=L.installed?U[L.name]?.()?i.default.green("✅"):i.default.red("❌"):i.default.dim("-");return`${A} ${L.name.padEnd(8)} ${C.padEnd(12)} ${x}`});if(y([`${"CLI".padEnd(11)} ${"Version".padEnd(12)} Auth`,...D].join(`
|
|
380
|
+
`),"CLI Status"),T.length>0)y(T.map((L)=>`${i.default.yellow("→")} ${L.name}: ${i.default.dim(L.installCmd)}`).join(`
|
|
381
|
+
`),"Install missing CLIs");if(z.length>0){let L=[i.default.bold("\uD83D\uDD17 MCP Connection Status"),"┌─────────┬──────────┬─────────────────────┐",`│ ${i.default.bold("CLI")} │ ${i.default.bold("MCP Config")} │ ${i.default.bold("Path")} │`,"├─────────┼──────────┼─────────────────────┤",...z.map((A)=>{let C=A.mcp.configured?i.default.green("✅ Configured"):i.default.yellow("⚠️ Not configured"),x=A.mcp.path?A.mcp.path.split("/").pop()||"":"-";return`│ ${A.name.padEnd(7)} │ ${C.padEnd(8)} │ ${x.padEnd(19)} │`}),"└─────────┴──────────┴─────────────────────┘"].join(`
|
|
382
|
+
`);y(L,"MCP Status")}let Z=J.filter((L)=>L.installed).length,B=J.filter((L)=>L.hasSkillMd).length;if(J.length>0){let L=[i.default.bold(`\uD83D\uDCE6 Skills (${Z}/${J.length} installed, ${B} complete)`),"┌────────────────────┬──────────┬─────────────┐",`│ ${i.default.bold("Skill")} │ ${i.default.bold("Installed")} │ ${i.default.bold("SKILL.md")} │`,"├────────────────────┼──────────┼─────────────┤",...J.map((A)=>{let C=A.installed?i.default.green("✅"):i.default.red("❌"),x=A.hasSkillMd?i.default.green("✅"):i.default.red("❌");return`│ ${A.name.padEnd(18)} │ ${C.padEnd(8)} │ ${x.padEnd(11)} │`}),"└────────────────────┴──────────┴─────────────┘"].join(`
|
|
383
|
+
`);y(L,"Skills Status")}else y(i.default.yellow("No skills installed."),"Skills Status");if(V.length>0){let L=await j$({message:`Found ${V.length} missing/incomplete skill(s). Install them?`,initialValue:!0});if(u$(L))c$("Cancelled."),process.exit(0);if(L){let A=V.map((j)=>j.name),C=await F6({message:"Which skills to install?",options:[{value:"all",label:`✨ All (${A.length} skills)`,hint:"Recommended"},{value:"select",label:"\uD83D\uDD27 Select individually"}]});if(u$(C))c$("Cancelled."),process.exit(0);let x;if(C==="select"){let j=O0(),U$=await cI({message:"Select skills to install:",options:V.map((d)=>{let N$=j.find((p)=>p.name===d.name);return{value:d.name,label:d.name,hint:N$?.desc||""}}),required:!0});if(u$(U$))c$("Cancelled."),process.exit(0);x=U$}else x=A;K.start("Installing skills...");try{gu(I,I);for(let j of x)K.message(`Installing ${i.default.cyan(j)}...`),Gu(I,j,I);K.stop(`Installed ${x.length} skill(s)!`),y(x.map((j)=>`${i.default.green("✓")} ${j}`).join(`
|
|
384
|
+
`),"Installed Skills")}catch(j){K.stop("Installation failed"),a.error(j instanceof Error?j.message:String(j))}}}if(v)y(`${i.default.green("✅")} Serena memory directory exists
|
|
385
|
+
${i.default.dim(`${O} memory files found`)}`,"Serena Memory");else y(`${i.default.yellow("⚠️")} Serena memory directory not found
|
|
386
|
+
${i.default.dim("Dashboard will show 'No agents detected'")}`,"Serena Memory");if(G.installed)y(`${i.default.green("✅")} Global workflows installed
|
|
387
|
+
${i.default.dim(`${G.count} workflow files found`)}`,"Global Workflows");else y(`${i.default.red("❌")} Global workflows missing
|
|
388
|
+
${i.default.dim("Run 'oma' to install or reinstall global workflows")}`,"Global Workflows");if(g)y(`${i.default.green("✅")} git rerere is enabled`,"Git Config");else{let L=await j$({message:"Enable git rerere? (Recommended for multi-agent merge conflict reuse)",initialValue:!0});if(!u$(L)&&L)try{UX("git config --global rerere.enabled true"),a.success(i.default.green("git rerere enabled globally!"))}catch(A){a.error(`Failed to enable git rerere: ${A}`)}else y(`${i.default.yellow("⚠️")} git rerere is not enabled
|
|
389
|
+
${i.default.dim("Run: git config --global rerere.enabled true")}`,"Git Config")}if(q){if(N)y(`${i.default.green("✅")} Claude Code recommended settings applied`,"Claude Config");else{let L=await j$({message:"Apply recommended Claude Code settings?",initialValue:!0});if(!u$(L)&&L)try{let A={};if(_6(Q))A=JSON.parse(Qu(Q,"utf-8"));M0(A),Zw(Q,`${JSON.stringify(A,null,2)}
|
|
390
|
+
`),a.success(i.default.green("Claude Code recommended settings applied!"))}catch(A){a.error(`Failed to apply Claude Code settings: ${A}`)}else y(`${i.default.yellow("⚠️")} Claude Code recommended settings not applied
|
|
391
|
+
${i.default.dim("Conversations are deleted after 30 days by default")}`,"Claude Config")}if(X)y(`${i.default.green("✅")} OMA block found in ./CLAUDE.md`,"CLAUDE.md");else y(`${i.default.yellow("⚠️")} OMA block missing in ./CLAUDE.md
|
|
392
|
+
${i.default.dim("Run 'oh-my-agent' to install or reinstall")}`,"CLAUDE.md")}if(W===0)o(i.default.green("✅ All checks passed! Ready to use."));else o(i.default.yellow(`⚠️ Found ${W} issue(s). See details above.`));if(eH())y(`${i.default.green("⭐")} Thank you for starring oh-my-agent!
|
|
393
|
+
${i.default.dim("https://github.com/sponsors/first-fluke")}`,"Support");else y(`${i.default.yellow("❤️")} Enjoying oh-my-agent? Give it a star or sponsor!
|
|
394
|
+
${i.default.dim("gh api --method PUT /user/starred/first-fluke/oh-my-agent")}
|
|
395
|
+
${i.default.dim("https://github.com/sponsors/first-fluke")}`,"Support")}catch(D){if(K)K.stop("Check failed");a.error(D instanceof Error?D.message:String(D)),process.exit(1)}}var K0=H$(b$(),1);var NY=["cursor"];async function QY($,I,_=!1){if(!NY.includes($))throw Error(`Unsupported format: ${$}. Supported: ${NY.join(", ")}`);let u=H0(I);if(u.length===0)throw Error("No rules found. Run `oma install` first.");if(_){console.log(JSON.stringify({format:$,exported:u,dir:".cursor/rules"},null,2));return}console.log(`
|
|
396
396
|
${K0.default.green("✓")} Exported ${K0.default.bold(String(u.length))} rules to ${K0.default.cyan(".cursor/rules")}/
|
|
397
397
|
`);for(let U of u)console.log(` ${K0.default.green("✓")} ${U}.mdc`);console.log(`
|
|
398
398
|
${K0.default.dim("Tip: Rules with globs auto-activate on matching files. Others are available via @rule-name in Cursor chat.")}
|
|
399
|
-
`)}
|
|
400
|
-
`)}}catch{}let N=
|
|
401
|
-
`)),U}import{existsSync as
|
|
402
|
-
`,
|
|
399
|
+
`)}I4();var Y$=H$(b$(),1);import{execSync as u6}from"node:child_process";import{existsSync as V0,readdirSync as uE,readFileSync as $U,writeFileSync as Lu}from"node:fs";import{join as B1}from"node:path";I4();var vu=H$(b$(),1);import{execSync as vY}from"node:child_process";import{existsSync as p$,readFileSync as D0,rmSync as w6,writeFileSync as _X}from"node:fs";import{join as o$}from"node:path";function bw($){for(let I of[".omc",".omx"]){let _=o$($,I);if(p$(_))w6(_,{recursive:!0,force:!0})}}function Aw($){let I=process.env.HOME||process.env.USERPROFILE||"",_=[],u=o$(I,".claude","CLAUDE.md"),U=!1;if(p$(u))try{U=D0(u,"utf-8").includes("OMC:START")}catch{}if(U)_.push({name:"omc",displayName:"oh-my-claudecode",uninstall:()=>{let G=o$(I,".claude");for(let X of["architect","document-specialist","explore","designer","writer","vision","critic","analyst","executor","planner"]){let Q=o$(G,"agents",`${X}.md`);if(p$(Q))w6(Q,{force:!0})}for(let X of["coordinator","omc","ultrawork","deepsearch","analyze","plan","review","planner","orchestrator","update"]){let Q=o$(G,"commands",`${X}.md`);if(p$(Q))w6(Q,{force:!0})}for(let X of["ultrawork","git-master","frontend-ui-ux"]){let Q=o$(G,"skills",X);if(!p$(Q))continue;let H=o$(Q,"SKILL.md");if(p$(H))try{if(D0(H,"utf-8").includes(".agents/workflows/"))continue}catch{continue}w6(Q,{recursive:!0,force:!0})}for(let X of["keyword-detector.sh","silent-auto-update.sh","stop-continuation.sh"]){let Q=o$(G,"hooks",X);if(p$(Q))w6(Q,{force:!0})}for(let X of[".omc-version.json",".omc-silent-update.json",".omc-update.log",".omc-config.json"]){let Q=o$(G,X);if(p$(Q))w6(Q,{force:!0})}let g=o$($,".omc");if(p$(g))w6(g,{recursive:!0,force:!0});let q=o$(G,"settings.json");if(p$(q))try{let X=JSON.parse(D0(q,"utf-8"));if(X.hooks){for(let Q of Object.keys(X.hooks)){if(!Array.isArray(X.hooks[Q]))continue;if(X.hooks[Q]=X.hooks[Q].map((H)=>{if(Array.isArray(H.hooks))H.hooks=H.hooks.filter((Y)=>!Y.command||!(Y.command.includes("keyword-detector.sh")||Y.command.includes("silent-auto-update.sh")||Y.command.includes("stop-continuation.sh")));return H}).filter((H)=>!H.hooks||H.hooks.length>0),X.hooks[Q].length===0)delete X.hooks[Q]}if(Object.keys(X.hooks).length===0)delete X.hooks;_X(q,`${JSON.stringify(X,null,2)}
|
|
400
|
+
`)}}catch{}let N=o$(G,"CLAUDE.md");if(p$(N))try{let X=D0(N,"utf-8");if(X.includes("OMC:START")){let Q=X.replace(/<!-- OMC:START[\s\S]*?OMC:END -->\n?/g,"");_X(N,Q)}}catch{}}});for(let G of["opencode.json","opencode.jsonc"]){let g=o$(I,".config","opencode",G);if(!p$(g))continue;try{let N=D0(g,"utf-8").replace(/\/\/.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"").replace(/,\s*([\]}])/g,"$1"),X=JSON.parse(N);if(Array.isArray(X.plugin)&&X.plugin.includes("oh-my-opencode")){_.push({name:"omo",displayName:"oh-my-opencode",uninstall:()=>{let H=D0(g,"utf-8").replace(/\/\/.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"").replace(/,\s*([\]}])/g,"$1"),Y=JSON.parse(H);Y.plugin=Y.plugin.filter((v)=>v!=="oh-my-opencode"),_X(g,JSON.stringify(Y,null,2))}});break}}catch{}}let z=o$(I,".agents","skills","superpowers"),J=o$(I,".codex","superpowers");if(p$(z)||p$(J))_.push({name:"superpowers",displayName:"superpowers",uninstall:()=>{for(let G of[z,J])if(p$(G))w6(G,{recursive:!0,force:!0})}});try{vY("npm ls -g oh-my-codex",{stdio:"pipe",timeout:1e4}),_.push({name:"omx",displayName:"oh-my-codex",uninstall:()=>{vY("npx -y oh-my-codex@latest uninstall --yes",{stdio:"pipe",timeout:60000})}})}catch{}return _}async function Hu($){bw($);let I=Aw($);if(I.length===0)return[];let _=I.map((J)=>J.name),u=await j$({message:`${vu.default.yellow(_.join(", "))} detected. Remove all?`,initialValue:!0});if(u$(u)||!u)return[];let U=[],z=$4();z.start("Removing competing tools...");for(let J of I)try{J.uninstall(),U.push(`${J.displayName} removed`)}catch(G){let g=G instanceof Error?G.message:String(G);U.push(`${J.displayName} removal failed: ${g}`)}return z.stop(U.map((J)=>J.includes("failed")?`${vu.default.red("✗")} ${J}`:`${vu.default.green("✓")} ${J}`).join(`
|
|
401
|
+
`)),U}import{existsSync as L0,mkdirSync as jw,readFileSync as uX,writeFileSync as HY}from"node:fs";import{dirname as Fw,join as E6}from"node:path";async function Yu($){let I=E6($,U4,"_version.json");if(!L0(I))return null;try{let _=uX(I,"utf-8");return JSON.parse(_).version||null}catch{return null}}function zX($){let I=E6($,U4,"_version.json");if(!L0(I))return!1;try{let _=uX(I,"utf-8");return JSON.parse(_).needsReconcile===!0}catch{return!1}}function JX($,I){let _=E6($,U4,"_version.json");if(!L0(_))return;try{let u=uX(_,"utf-8"),U=JSON.parse(u);if(I)U.needsReconcile=!0;else delete U.needsReconcile;HY(_,JSON.stringify(U,null,2),"utf-8")}catch{}}function YY($){let I=E6($,U4);if(!L0(I))return!1;return[E6($,".agents","oma-config.yaml"),E6($,".agents","mcp.json"),E6($,".agents","workflows")].some((u)=>L0(u))}async function Ou($,I){let _=E6($,U4,"_version.json"),u=Fw(_);if(!L0(u))jw(u,{recursive:!0});HY(_,JSON.stringify({version:I},null,2),"utf-8")}async function OY(){let $=`https://raw.githubusercontent.com/${W$}/main/prompt-manifest.json`,I=await fetch($);if(!I.ok)throw Error("Failed to fetch remote manifest");return await I.json()}import{existsSync as O1,mkdirSync as TY,readFileSync as MY,writeFileSync as Tu}from"node:fs";import{homedir as Sw}from"node:os";import{join as r4,resolve as BY}from"node:path";var GX=r4(Sw(),".serena","serena_config.yml"),KY={"oma-frontend":["typescript"],"oma-mobile":["dart"],"oma-tf-infra":["terraform"]},gX={python:"python",node:"typescript",rust:"rust"};function DY($,I){let _=new Set;for(let u of $){let U=KY[u];if(U)for(let z of U)_.add(z)}if($.includes("oma-backend")&&I&&gX[I])_.add(gX[I]);if(_.size===0)_.add("typescript");return[..._]}function LY($){let I=new Set,_=r4($,".agents","skills");for(let[U,z]of Object.entries(KY))if(O1(r4(_,U)))for(let J of z)I.add(J);let u=r4(_,"oma-backend","stack","stack.yaml");if(O1(u))try{let z=MY(u,"utf-8").match(/^language:\s*(.+)$/m);if(z){let J=z[1].trim(),G=gX[J];if(G)I.add(G)}}catch{}else if(O1(r4(_,"oma-backend")))I.add("typescript");if(I.size===0)I.add("typescript");return[...I]}function ww($){let I=BY($);if(!O1(GX))return!1;try{let _=MY(GX,"utf-8"),u=_.match(/^(projects:\s*\n)((?:\s*-\s*.+\n?)*)/m);if(!u)return!1;if(((u[2]??"").match(/^\s*-\s*(.+)$/gm)||[]).map((q)=>BY(q.replace(/^\s*-\s*/,"").trim())).includes(I))return!1;let J=(u.index??0)+u[0].length,G=`- ${I}
|
|
402
|
+
`,g=_.slice(0,J)+G+_.slice(J);return Tu(GX,g),!0}catch{return!1}}var Ew=($,I)=>`languages:
|
|
403
403
|
${$.map((_)=>`- ${_}`).join(`
|
|
404
404
|
`)}
|
|
405
405
|
|
|
@@ -420,56 +420,56 @@ read_only_memory_patterns: []
|
|
|
420
420
|
line_ending:
|
|
421
421
|
ignored_memory_patterns: []
|
|
422
422
|
ls_specific_settings: {}
|
|
423
|
-
`;function
|
|
424
|
-
`);let
|
|
425
|
-
`),I.push("~/.claude/CLAUDE.md: OMA block removed (migrated to local ./CLAUDE.md)");return I}};var
|
|
426
|
-
`),"Migration");await
|
|
427
|
-
`),"Migration")}finally{u()}let T=
|
|
428
|
-
`),"Installed"),Y.includes("cursor")){let
|
|
429
|
-
`),a.success(Y$.default.green("Claude Code recommended settings applied!"))}catch{}if(Y.includes("codex"))try{if(u6("claude --version",{stdio:"ignore"}),u6("codex --version",{stdio:"ignore"}),!u6("claude plugin list",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).includes("codex@openai-codex"))u6("claude plugin marketplace add openai/codex-plugin-cc",{stdio:"ignore"}),u6("claude plugin install codex@openai-codex",{stdio:"ignore"}),a.success(Y$.default.green("Codex plugin installed for Claude Code!"))}catch{}if(Y.includes("gemini")){let
|
|
423
|
+
`;function Cw($,I){let _=r4($,".serena"),u=r4(_,"project.yml");if(O1(u))return!1;let U=$.split("/").pop()||$.split("\\").pop()||"project";TY(_,{recursive:!0}),Tu(u,Ew(I,U));let z=r4(_,".gitignore");if(!O1(z))Tu(z,`/cache
|
|
424
|
+
`);let J=r4(_,"memories");TY(J,{recursive:!0});let G=r4(J,".gitkeep");if(!O1(G))Tu(G,"");return!0}function Bu($,I){let _=Cw($,I),u=ww($);return{configured:_,registered:u}}import{execSync as fw}from"node:child_process";import{mkdtempSync as xw,rmSync as qX,writeFileSync as kw}from"node:fs";import{tmpdir as yw}from"node:os";import{join as VY}from"node:path";async function Mu(){let $=xw(VY(yw(),"oh-my-agent-"));try{let I=`https://api.github.com/repos/${W$}/tarball/main`,_=await fetch(I,{headers:{"User-Agent":"oh-my-agent-cli"}});if(!_.ok)throw Error(`HTTP ${_.status}`);let u=VY($,"repo.tar.gz");kw(u,Buffer.from(await _.arrayBuffer())),fw(`tar -xzf "${u}" -C "${$}" --strip-components=1`,{stdio:"pipe",timeout:30000}),qX(u)}catch(I){throw qX($,{recursive:!0,force:!0}),Error(`Failed to download repository archive: ${I instanceof Error?I.message:I}`)}return{dir:$,cleanup:()=>qX($,{recursive:!0,force:!0})}}import{existsSync as y$,lstatSync as ZY,readdirSync as XX,renameSync as Ku,rmSync as Du,unlinkSync as WY}from"node:fs";import{join as B4}from"node:path";var iw={"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"},lw={"backend-impl.md":"backend-engineer.md","db-impl.md":"db-engineer.md","frontend-impl.md":"frontend-engineer.md","mobile-impl.md":"mobile-engineer.md"},RY={name:"001-agents-dir",up($){let I=[],_=B4($,".agent"),u=B4($,".agents");if(y$(_)&&!y$(u))Ku(_,u),I.push(".agent/ → .agents/ (renamed)");else if(y$(_)&&y$(u))try{let J=XX(_);for(let G of J){let g=B4(_,G),q=B4(u,G);if(!y$(q))Ku(g,q),I.push(`.agent/${G} → .agents/${G} (merged)`)}Du(_,{recursive:!0,force:!0}),I.push(".agent/ (removed after merge)")}catch{}for(let J of[".cursor/skills"]){let G=B4($,J);if(!y$(G))continue;try{if(ZY(G).isSymbolicLink())WY(G),I.push(`${J} (removed symlink)`);else{let q=XX(G),N=0;for(let Q of q){let H=B4(G,Q);if(ZY(H).isSymbolicLink())WY(H),N++}if(XX(G).length===0)Du(G,{recursive:!0}),I.push(`${J} (removed ${N} symlinks, cleaned dir)`);else if(N>0)I.push(`${J} (removed ${N} symlinks)`)}}catch{}}let U=B4($,".agents","skills");if(y$(U))for(let[J,G]of Object.entries(iw)){let g=B4(U,J),q=B4(U,G);if(y$(g)&&!y$(q))Ku(g,q),I.push(`skills/${J} → skills/${G}`);else if(y$(g)&&y$(q))Du(g,{recursive:!0}),I.push(`skills/${J} (removed, replaced by ${G})`)}let z=B4($,".claude","agents");if(y$(z))for(let[J,G]of Object.entries(lw)){let g=B4(z,J),q=B4(z,G);if(y$(g)&&!y$(q))Ku(g,q),I.push(`agents/${J} → agents/${G}`);else if(y$(g)&&y$(q))Du(g),I.push(`agents/${J} (removed, replaced by ${G})`)}return I}};import{existsSync as NX,mkdirSync as PY,readdirSync as mw,readFileSync as bY,renameSync as rw,rmSync as AY,writeFileSync as nw}from"node:fs";import{dirname as jY,join as sI}from"node:path";var hw=[{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"}],dw=[".agents/skills/_shared/api-contracts",".agents/skills/_shared/execution-protocols"];function cw($,I){let _=I.replace(/^\.agents\//,"");return sI($,".agents",".migration-backup","shared-layout-v2",_)}function pw($){return sI(".agents",".migration-backup","shared-layout-v2",$.replace(/^\.agents\//,""))}var FY={name:"002-shared-layout",up($){let I=[];for(let _ of hw){let u=sI($,_.from),U=sI($,_.to);if(!NX(u))continue;if(!NX(U)){PY(jY(U),{recursive:!0}),rw(u,U),I.push(`${_.from} → ${_.to}`);continue}let z=bY(u,"utf-8"),J=bY(U,"utf-8");if(z!==J){let G=cw($,_.from),g=pw(_.from);PY(jY(G),{recursive:!0}),nw(G,z,"utf-8"),I.push(`${_.from} → ${g} (backup)`)}AY(u,{force:!0}),I.push(`${_.from} (removed legacy path)`)}for(let _ of dw){let u=sI($,_);if(!NX(u))continue;try{if(mw(u).length===0)AY(u,{recursive:!0,force:!0}),I.push(`${_} (removed empty dir)`)}catch{}}return I}};import{cpSync as ow,existsSync as SY,readdirSync as tw,rmSync as wY}from"node:fs";import{join as QX}from"node:path";var EY={name:"003-oma-config",up($){let I=[],_=QX($,".agents","config","user-preferences.yaml"),u=QX($,".agents","oma-config.yaml");if(SY(_)){ow(_,u,{force:!0}),wY(_),I.push(".agents/config/user-preferences.yaml → .agents/oma-config.yaml");let U=QX($,".agents","config");if(SY(U)&&tw(U).length===0)wY(U,{recursive:!0}),I.push(".agents/config/ (removed empty dir)")}return I}};import{existsSync as aw,readFileSync as ew,rmSync as sw,writeFileSync as $E}from"node:fs";import{join as IE}from"node:path";var UE="<!-- OMA:START",CY="<!-- OMA:END -->",fY={name:"004-claude-md-local",up($){let I=[],_=process.env.HOME||process.env.USERPROFILE||"";if(!_)return I;let u=IE(_,".claude","CLAUDE.md");if(!aw(u))return I;let U=ew(u,"utf-8"),z=U.indexOf(UE),J=U.indexOf(CY);if(z===-1||J===-1)return I;let G=U.slice(0,z),g=U.slice(J+CY.length),q=`${G}${g}`.trim();if(q.length===0)sw(u),I.push("~/.claude/CLAUDE.md removed (OMA block was only content)");else $E(u,`${q}
|
|
425
|
+
`),I.push("~/.claude/CLAUDE.md: OMA block removed (migrated to local ./CLAUDE.md)");return I}};var _E=[RY,FY,EY,fY];function T1($){let I=[];for(let _ of _E)I.push(..._.up($));return I}var zE={en:"English",ko:"한국어",ja:"日本語",zh:"中文",vi:"Tiếng Việt",de:"Deutsch",es:"Español",fr:"Français",nl:"Nederlands",pl:"Polski",pt:"Português",ru:"Русский"};function JE($){let I=B1($,"docs"),_=["en"];if(V0(I))for(let u of uE(I)){let U=u.match(/^README\.(.+)\.md$/);if(U?.[1])_.push(U[1])}return _.map((u)=>({value:u,label:zE[u]??u}))}function GE($){let I=B1($,".agents","oma-config.yaml");if(!V0(I))return null;try{return $U(I,"utf-8").match(/^language:\s*([A-Za-z-]+)/m)?.[1]??null}catch{return null}}async function vX(){console.clear(),D$(Y$.default.bgMagenta(Y$.default.white(" \uD83D\uDEF8 oh-my-agent ")));let $=T1(process.cwd());if($.length>0)y($.map((T)=>`${Y$.default.green("✓")} ${T}`).join(`
|
|
426
|
+
`),"Migration");await Hu(process.cwd());let I=$4();I.start("Downloading...");let _,u;try{let T=await Mu();_=T.dir,u=T.cleanup}catch(T){I.stop("Download failed"),a.error(T instanceof Error?T.message:String(T)),process.exit(1)}I.stop("Downloaded!");let U=JE(_),z=GE(process.cwd()),J=U.some((T)=>T.value===z)?z:"en",G=await F6({message:"Response language?",options:U,initialValue:J});if(u$(G))u(),c$("Cancelled."),process.exit(0);let g=await F6({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(u$(g))c$("Cancelled."),process.exit(0);let q;if(g==="custom"){let T=O0(),V=await cI({message:"Select skills:",options:T.map((W)=>({value:W.name,label:W.name,hint:W.desc})),required:!0});if(u$(V))c$("Cancelled."),process.exit(0);q=V}else q=nH[g]??[];let N=process.cwd(),X={};if(q.includes("oma-backend")){let T=await F6({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(u$(T))c$("Cancelled."),process.exit(0);if(T!=="other")X["oma-backend"]=T}let Q=[{value:"claude",label:"Claude Code",hint:"hooks + settings + CLAUDE.md"},{value:"codex",label:"Codex CLI",hint:"hooks + plugin"},{value:"copilot",label:"GitHub Copilot",hint:"skill symlinks"},{value:"cursor",label:"Cursor",hint:".cursor/rules/ export"},{value:"gemini",label:"Gemini CLI",hint:"hooks + Serena MCP"},{value:"qwen",label:"Qwen Code",hint:"hooks + settings"}],H=await cI({message:"CLI tools to configure:",options:Q,initialValues:Q.map((T)=>T.value),required:!0});if(u$(H))c$("Cancelled."),process.exit(0);let Y=H,v=Y.filter((T)=>T!=="copilot"&&T!=="cursor"),O=[];if(Y.includes("claude"))O.push("claude");if(Y.includes("copilot"))O.push("copilot");I.start("Installing skills...");try{try{gu(_,N),hH(_,N),dH(_,N),cH(_,N),pH(_);for(let B of q)I.message(`Installing ${Y$.default.cyan(B)}...`),Gu(_,B,N,X[B]);I.stop("Skills installed!"),I.start("Installing vendor adaptations..."),qu(_,N,v),I.stop("Vendor adaptations installed!");let K=B1(N,".agents","oma-config.yaml");if(V0(K)){let B=$U(K,"utf-8");Lu(K,B.replace(/^language:\s*.+$/m,`language: ${G}`)),rH(N,Y)}let D=await Yu(_);if(D)await Ou(N,D);let Z=T1(N);if(Z.length>0)y(Z.map((B)=>`${Y$.default.green("✓")} ${B}`).join(`
|
|
427
|
+
`),"Migration")}finally{u()}let T=Xu(N,O,q);if(y([...q.map((K)=>`${Y$.default.green("✓")} ${K}`),"",Y$.default.dim(`Location: ${B1(N,U4)}`),...T.created.length>0?["",Y$.default.cyan("Symlinks:"),...T.created.map((K)=>`${Y$.default.green("→")} ${K}`)]:[],...T.skipped.length>0?["",Y$.default.dim("Skipped:"),...T.skipped.map((K)=>Y$.default.dim(` ${K}`))]:[]].join(`
|
|
428
|
+
`),"Installed"),Y.includes("cursor")){let K=H0(N);if(K.length>0)a.success(Y$.default.green(`Cursor rules exported (${K.length} rules → .cursor/rules/)`))}let V=new Set;for(let K of["gemini","codex","qwen"]){if(!Y.includes(K))continue;let D=K==="gemini"?"GEMINI.md":"AGENTS.md";if(V.has(D))continue;if(Ju(N,K))V.add(D),a.success(Y$.default.green(`oma guide merged into ${D}`))}{let K=DY(q,X["oma-backend"]),{configured:D,registered:Z}=Bu(N,K);if(D)a.success(Y$.default.green(`Serena project configured (${K.join(", ")})`));if(Z)a.success(Y$.default.green("Project registered in Serena"))}try{u6("git config --get rerere.enabled",{stdio:["pipe","pipe","ignore"]})}catch{try{u6("git config --global rerere.enabled true"),a.success(Y$.default.green("git rerere enabled globally!"))}catch{}}let W=process.env.HOME||process.env.USERPROFILE||"";if(Y.includes("claude"))try{u6("claude --version",{stdio:"ignore"});let K=B1(W,".claude","settings.json"),D={};if(V0(K))D=JSON.parse($U(K,"utf-8"));if(B0(D))M0(D),Lu(K,`${JSON.stringify(D,null,2)}
|
|
429
|
+
`),a.success(Y$.default.green("Claude Code recommended settings applied!"))}catch{}if(Y.includes("codex"))try{if(u6("claude --version",{stdio:"ignore"}),u6("codex --version",{stdio:"ignore"}),!u6("claude plugin list",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).includes("codex@openai-codex"))u6("claude plugin marketplace add openai/codex-plugin-cc",{stdio:"ignore"}),u6("claude plugin install codex@openai-codex",{stdio:"ignore"}),a.success(Y$.default.green("Codex plugin installed for Claude Code!"))}catch{}if(Y.includes("gemini")){let K=B1(W,".gemini","antigravity","mcp_config.json");try{if(V0(K)){let Z=JSON.parse($U(K,"utf-8"));if(Z?.mcpServers){let B=Z.mcpServers.serena,L="oh-my-agent@latest";if(!(B?.command==="npx"&&Array.isArray(B?.args)&&B.args.includes("oh-my-agent@latest")))Z.mcpServers.serena={command:"npx",args:["-y","oh-my-agent@latest","bridge","http://localhost:12341/mcp"],disabled:!1},Lu(K,JSON.stringify(Z,null,2)),a.success(Y$.default.green("Serena MCP bridge configured!"))}}}catch{}let D=B1(W,".gemini","settings.json");try{if(V0(D)){let Z=JSON.parse($U(D,"utf-8"));if(Z?.mcpServers&&Z.mcpServers.serena?.url!=="http://localhost:12341/mcp")Z.mcpServers.serena={url:"http://localhost:12341/mcp"},Lu(D,JSON.stringify(Z,null,2)),a.success(Y$.default.green("Gemini CLI Serena configured!"))}}catch{}}if(o(Y$.default.green("Done! Open your project in your IDE to use the skills.")),Q1()&&m4()&&!v1()){let K=await j$({message:`${Y$.default.yellow("⭐")} Star ${Y$.default.cyan(W$)} on GitHub? It helps a lot!`});if(!u$(K)&&K)try{u6(`gh api -X PUT /user/starred/${W$}`,{stdio:"ignore"}),a.success(`Starred ${Y$.default.cyan(W$)}! Thank you! \uD83C\uDF1F`)}catch{a.warn(`Could not star automatically. Try: ${Y$.default.dim(`gh api --method PUT /user/starred/${W$}`)}`)}}}catch(T){I.stop("Installation failed"),a.error(T instanceof Error?T.message:String(T)),process.exit(1)}}I4();iI();var z6=H$(b$(),1);async function xY($=!1,I=!1){let _=process.cwd(),u=mv(_,{force:I});if($){console.log(JSON.stringify(u,null,2));return}console.clear(),D$(z6.default.bgMagenta(z6.default.white(" \uD83E\uDDE0 oh-my-agent memory:init ")));let U=[`Memories dir: ${z6.default.cyan(u.memoriesDir)}`,`Session ID: ${z6.default.cyan(u.sessionId)}`,"",z6.default.bold("Created:"),u.created.length>0?u.created.map((z)=>` + ${z}`).join(`
|
|
430
430
|
`):" (none)","",z6.default.bold("Updated:"),u.updated.length>0?u.updated.map((z)=>` ~ ${z}`).join(`
|
|
431
431
|
`):" (none)","",z6.default.bold("Skipped:"),u.skipped.length>0?u.skipped.map((z)=>` - ${z}`).join(`
|
|
432
432
|
`):" (none)"].join(`
|
|
433
|
-
`);y(U,"Memory Schema"),o(z6.default.green("Memory schema ready!"))}
|
|
434
|
-
`))if(
|
|
435
|
-
`))if(
|
|
436
|
-
`).filter(Boolean).map((
|
|
437
|
-
`).filter(Boolean).sort().reverse(),
|
|
438
|
-
`):" (no commits)"}function
|
|
439
|
-
`)}function
|
|
440
|
-
`)}function
|
|
441
|
-
`)}function
|
|
442
|
-
`)}function
|
|
443
|
-
`)}function
|
|
444
|
-
`)}function
|
|
433
|
+
`);y(U,"Memory Schema"),o(z6.default.green("Memory schema ready!"))}I4();var P$=H$(b$(),1);import{execSync as gE}from"node:child_process";import{existsSync as kY,mkdirSync as qE,readdirSync as yY,readFileSync as XE,writeFileSync as NE}from"node:fs";import{join as HX}from"node:path";function YX($){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 _=parseInt(I[1]||"0",10),u=I[2]||"";switch(u){case"h":return{since:`${_} hours ago`,label:`${_}h`,days:_/24};case"d":return{since:`${_} days ago`,label:`${_}d`,days:_};case"w":return{since:`${_*7} days ago`,label:`${_}w`,days:_*7};default:throw Error(`Invalid unit: ${u}`)}}function iY($){let I=YX($);return{current:I,previous:{since:`${I.days*2} days ago`,until:`${I.days} days ago`,label:I.label,days:I.days}}}function C6($,I){try{return gE(I,{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"],maxBuffer:10485760}).trim()}catch{return""}}function lY($){C6($,"git fetch origin --quiet 2>/dev/null || true")}function mY($){return C6($,"git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's|refs/remotes/origin/||'")||"main"}function rY($){return C6($,"git config user.name")||"Unknown"}function nY($,I,_){let u=I.until?` --until="${I.until}"`:"",U=C6($,`git log ${_} --since="${I.since}"${u} --format="COMMIT:%H|%aN|%ae|%at|%s" --shortstat`);if(!U)return[];let z=[],J=null;for(let G of U.split(`
|
|
434
|
+
`))if(G.startsWith("COMMIT:")){if(J?.hash)z.push({hash:J.hash,author:J.author||"",email:J.email||"",timestamp:J.timestamp||0,subject:J.subject||"",insertions:J.insertions||0,deletions:J.deletions||0});let g=G.slice(7).split("|");J={hash:g[0],author:g[1],email:g[2],timestamp:parseInt(g[3]||"0",10),subject:g.slice(4).join("|"),insertions:0,deletions:0}}else if(J&&G.trim()){let g=G.match(/(\d+) insertions?\(\+\)/),q=G.match(/(\d+) deletions?\(-\)/);if(g)J.insertions=parseInt(g[1]||"0",10);if(q)J.deletions=parseInt(q[1]||"0",10)}if(J?.hash)z.push({hash:J.hash,author:J.author||"",email:J.email||"",timestamp:J.timestamp||0,subject:J.subject||"",insertions:J.insertions||0,deletions:J.deletions||0});return z}function QE($,I,_){let u=I.until?` --until="${I.until}"`:"",U=C6($,`git log ${_} --since="${I.since}"${u} --format="COMMIT:%H|%aN" --numstat`);if(!U)return[];let z=[],J="";for(let G of U.split(`
|
|
435
|
+
`))if(G.startsWith("COMMIT:"))J=G.slice(7).split("|")[1]||"";else if(G.trim()&&J){let g=G.split("\t");if(g.length>=3){let q=parseInt(g[0]||"0",10),N=parseInt(g[1]||"0",10);if(!Number.isNaN(q)&&!Number.isNaN(N)&&g[2])z.push({file:g[2],insertions:q,deletions:N,author:J})}}return z}function vE($,I,_,u=10){let U=I.until?` --until="${I.until}"`:"",z=C6($,`git log ${_} --since="${I.since}"${U} --format="" --name-only | grep -v '^$' | sort | uniq -c | sort -rn | head -${u}`);if(!z)return[];return z.split(`
|
|
436
|
+
`).filter(Boolean).map((J)=>{let G=J.trim().match(/^\s*(\d+)\s+(.+)$/);if(!G)return null;return{count:parseInt(G[1]||"0",10),file:G[2]||""}}).filter((J)=>J!==null)}function HE($,I,_){let u=_?` --author="${_}"`:"",U=C6($,`git log ${I}${u} --format="%ad" --date=format:"%Y-%m-%d" | sort -u`);if(!U)return 0;let z=U.split(`
|
|
437
|
+
`).filter(Boolean).sort().reverse(),J=new Date;J.setHours(0,0,0,0);let G=0,g=new Date(J);for(let q of z){let[N=0,X=0,Q=0]=q.split("-").map(Number),H=new Date(N,X-1,Q);H.setHours(0,0,0,0);let Y=Math.round((g.getTime()-H.getTime())/86400000);if(Y===0)G++,g.setDate(g.getDate()-1);else if(Y===1&&G===0)G++,g.setTime(H.getTime()),g.setDate(g.getDate()-1);else break}return G}function YE($,I,_){let u=I.until?` --until="${I.until}"`:"",U=C6($,`git log ${_} --since="${I.since}"${u} --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 OE=/(?:test|spec|__tests__|\.test\.|\.spec\.)/i;function OX($){return OE.test($)}function hY($,I=45){if($.length===0)return[];let _=[...$].sort((g,q)=>g.timestamp-q.timestamp),u=[],U=_[0]?.timestamp??0,z=_[0]?.timestamp??0,J=1,G=()=>{let g=Math.max(Math.round((z-U)/60),1),q=g>=50?"deep":g>=20?"medium":"micro";u.push({startTime:U,endTime:z,commits:J,type:q,durationMinutes:g})};for(let g=1;g<_.length;g++){let q=_[g]?.timestamp??0;if((q-z)/60>I)G(),U=q,z=q,J=1;else z=q,J++}return G(),u}function dY($){let I=Array(24).fill(0);for(let _ of $){let u=new Date(_.timestamp*1000).getHours();I[u]=(I[u]||0)+1}return I}function TE($){let I={},_=/^(feat|fix|docs|style|refactor|test|chore|build|ci|perf)(\(.+\))?!?:/;for(let u of $){let U=u.subject.match(_),z=U?U[1]||"other":"other";I[z]=(I[z]||0)+1}return I}function BE($){let I={};for(let z of $){let J=z.file.split("/")[0]||z.file;I[J]=(I[J]||0)+1}let _=$.length;if(_===0)return{score:0,area:"-"};let U=Object.entries(I).sort(([,z],[,J])=>J-z)[0];if(!U)return{score:0,area:"-"};return{score:Math.round(U[1]/_*100),area:U[0]}}function ME($,I){let _={};for(let z of $){if(!_[z.author])_[z.author]={commits:0,insertions:0,deletions:0,testInsertions:0,topAreas:[],commitTypes:{},peakHour:0};let J=_[z.author];if(!J)continue;J.commits++,J.insertions+=z.insertions,J.deletions+=z.deletions;let G=z.subject.match(/^(feat|fix|docs|style|refactor|test|chore|build|ci|perf)(\(.+\))?!?:/),g=G?G[1]||"other":"other";J.commitTypes[g]=(J.commitTypes[g]||0)+1}let u={},U={};for(let z of I){if(!u[z.author])u[z.author]={};let J=z.file.split("/")[0]||z.file,G=u[z.author];if(G)G[J]=(G[J]||0)+1;let g=_[z.author];if(g&&OX(z.file))g.testInsertions+=z.insertions}for(let z of $){if(!U[z.author])U[z.author]=Array(24).fill(0);let J=new Date(z.timestamp*1000).getHours(),G=U[z.author];if(G)G[J]=(G[J]||0)+1}for(let[z,J]of Object.entries(_)){let G=u[z]||{};J.topAreas=Object.entries(G).sort(([,N],[,X])=>X-N).slice(0,3).map(([N])=>N);let g=U[z]||[],q=Math.max(...g,0);J.peakHour=q>0?g.indexOf(q):0}return _}function cY($){return HX($,".serena","retrospectives")}function TX($,I){let _=cY($);if(!kY(_))qE(_,{recursive:!0});let u=I.date.split("T")[0]||I.date,U=yY(_).filter((G)=>G.startsWith(u)).length,z=`${u}-${U+1}.json`,J=HX(_,z);return NE(J,JSON.stringify(I,null,2),"utf-8"),J}function pY($){let I=cY($);if(!kY(I))return null;try{let _=yY(I).filter((z)=>z.endsWith(".json")).sort().reverse();if(_.length===0)return null;let u=XE(HX(I,_[0]||""),"utf-8"),U=JSON.parse(u);if(U.metrics)return U;return null}catch{return null}}function oY($,I,_=30){if(I===0)return"";let u=Math.round($/I*_);return"█".repeat(u)}function KE($,I,_,u=25){let U=_>0?Math.round(I/_*100):0,z=oY(I,_,u);return` ${$.padEnd(12)} ${String(I).padStart(4)} (${String(U).padStart(2)}%) ${z}`}function tY($){let I=Math.max(...$,1),_=[];for(let u=0;u<24;u++){let U=$[u]||0;if(U===0)continue;_.push(` ${String(u).padStart(2)}:00 ${String(U).padStart(3)} ${oY(U,I,20)}`)}return _.length>0?_.join(`
|
|
438
|
+
`):" (no commits)"}function aY($){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])=>` ${_?.padEnd(20)} ${u}`).join(`
|
|
439
|
+
`)}function eY($,I){let _=Object.entries($).sort(([,G],[,g])=>g.commits-G.commits),u=_.findIndex(([G])=>G===I);if(u>0){let[G]=_.splice(u,1);if(G)_.unshift(G)}let U=` ${"Contributor".padEnd(24)} ${"Commits".padStart(7)} ${"+/-".padStart(14)} Top area`,z=` ${"-".repeat(24)} ${"-".repeat(7)} ${"-".repeat(14)} ${"-".repeat(15)}`,J=_.map(([G,g])=>{let q=G===I?`You (${G})`:G,N=`+${g.insertions}/-${g.deletions}`;return` ${q.padEnd(24)} ${String(g.commits).padStart(7)} ${N.padStart(14)} ${g.topArea}`});return[U,z,...J].join(`
|
|
440
|
+
`)}function BX($,I){let _=$.metrics,u=I.metrics;function U(J,G,g=""){let q=J-G,N=q>0?"↑":q<0?"↓":"→",X=q>0?"+":"";return`${G}${g} → ${J}${g} ${N}${X}${q}${g}`}return[` ${"Metric".padEnd(20)} Change`,` ${"-".repeat(20)} ${"-".repeat(35)}`,` ${"Commits".padEnd(20)} ${U(_.commits,u.commits)}`,` ${"Test ratio".padEnd(20)} ${U(_.testRatio,u.testRatio,"%")}`,` ${"Sessions".padEnd(20)} ${U(_.sessions,u.sessions)}`,` ${"Deep sessions".padEnd(20)} ${U(_.deepSessions,u.deepSessions)}`,` ${"LOC/session-hour".padEnd(20)} ${U(_.locPerSessionHour,u.locPerSessionHour)}`,` ${"Focus score".padEnd(20)} ${U(_.focusScore,u.focusScore,"%")}`,` ${"Streak".padEnd(20)} ${U(_.streakDays,u.streakDays,"d")}`].join(`
|
|
441
|
+
`)}function sY($){let I=$.filter((J)=>J.type==="deep").length,_=$.filter((J)=>J.type==="medium").length,u=$.filter((J)=>J.type==="micro").length,U=$.reduce((J,G)=>J+G.durationMinutes,0),z=$.length>0?Math.round(U/$.length):0;return[` Total sessions: ${$.length}`,` Deep (50+ min): ${I}`,` Medium (20-50): ${_}`,` Micro (<20 min): ${u}`,` Total active time: ${Math.floor(U/60)}h ${U%60}m`,` Avg session: ${z} min`].join(`
|
|
442
|
+
`)}function $O($){if($.length===0)return" (no file changes)";return $.map((I,_)=>{let u=I.count>=5?" [churn]":"",U=OX(I.file)?" [test]":"";return` ${String(_+1).padStart(2)}. ${I.file} (${I.count}x)${U}${u}`}).join(`
|
|
443
|
+
`)}function IO($,I){if(I===0)return" (no commits)";return Object.entries($).sort(([,_],[,u])=>u-_).map(([_,u])=>KE(_,u,I)).join(`
|
|
444
|
+
`)}function UO($){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 Vu($,I){let _=`origin/${mY($)}`,u=nY($,I,_),U=QE($,I,_),z=vE($,I,_),J=ME(u,U),G=hY(u),g=dY(u),q=TE(u),N=BE(U),X=HE($,_),Q=YE($,I,_),H=0;for(let Z of U)if(OX(Z.file))H+=Z.insertions;let Y=u.reduce((Z,B)=>Z+B.insertions,0),v=u.reduce((Z,B)=>Z+B.deletions,0),O=new Set(u.map((Z)=>new Date(Z.timestamp*1000).toISOString().split("T")[0])).size,T=G.reduce((Z,B)=>Z+B.durationMinutes,0),V=T/60,W=V>0?Math.round((Y+v)/V/50)*50:0,K=g.indexOf(Math.max(...g)),D={};for(let[Z,B]of Object.entries(J)){let L=B.insertions>0?Math.round(B.testInsertions/B.insertions*100):0;D[Z]={commits:B.commits,insertions:B.insertions,deletions:B.deletions,testRatio:L,topArea:B.topAreas[0]||"-"}}return{date:new Date().toISOString(),window:I.label,metrics:{commits:u.length,contributors:Object.keys(J).length,insertions:Y,deletions:v,netLoc:Y-v,testLoc:H,testRatio:Y>0?Math.round(H/Y*100):0,activeDays:O,sessions:G.length,deepSessions:G.filter((Z)=>Z.type==="deep").length,avgSessionMinutes:G.length>0?Math.round(T/G.length):0,locPerSessionHour:W,peakHour:K,focusScore:N.score,focusArea:N.area,streakDays:X,aiAssistedCommits:Q},authors:D,commitTypes:q,hotspots:z}}function MX($,I){let _=`origin/${mY($)}`,u=nY($,I,_);return{sessions:hY(u),hourly:dY(u)}}function QO($,I,_,u,U){if(console.log(P$.default.bold(P$.default.cyan(UO($)))),console.log(),y(aY($.metrics),"Summary"),U)y(BX($,U),"Trends vs Last Retro");if($.metrics.contributors>0)y(eY($.authors,u),"Contributors");if(y(tY(_),"Commit Time Distribution"),I.length>0)y(sY(I),"Work Sessions");if(y(IO($.commitTypes,$.metrics.commits),"Commit Types"),$.hotspots.length>0){let g=$.metrics.commits>0?Math.round(($.commitTypes.fix||0)/$.metrics.commits*100):0,q=$O($.hotspots);if(g>50)q+=`
|
|
445
445
|
|
|
446
|
-
${
|
|
446
|
+
${P$.default.yellow(`Fix ratio ${g}% — ship-fast-fix-fast pattern detected`)}`;y(q,"File Hotspots (Top 10)")}let{focusScore:z,focusArea:J}=$.metrics,G=z>=60?P$.default.green:z>=40?P$.default.yellow:P$.default.red;if(y(` ${G(`${z}%`)} — primary area: ${P$.default.bold(J)}`,"Focus Score"),y(` ${P$.default.bold(String($.metrics.streakDays))} consecutive days with commits`,"Shipping Streak"),$.metrics.aiAssistedCommits>0){let g=$.metrics.commits>0?Math.round($.metrics.aiAssistedCommits/$.metrics.commits*100):0;y(` ${$.metrics.aiAssistedCommits} commits (${g}%) AI-assisted`,"AI Collaboration")}}async function vO($,I={}){let _=process.cwd();if(I.interactive){let{retro:N}=await Promise.resolve().then(() => (NO(),XO));await N();return}console.clear(),D$(P$.default.bgMagenta(P$.default.white(" retro ")));let u=$4();u.start("Fetching origin..."),lY(_),u.stop("Origin fetched");let U=rY(_);if(I.compare){let{current:N,previous:X}=iY($);u.start(`Analyzing current window (${N.label})...`);let Q=Vu(_,N),H=MX(_,N);u.stop("Current window analyzed"),u.start(`Analyzing previous window (${X.label})...`);let Y=Vu(_,X);if(u.stop("Previous window analyzed"),Q.metrics.commits===0&&Y.metrics.commits===0){y(P$.default.yellow("No commits found in either window."),"Empty"),o(P$.default.dim("Try a wider window: oma retro compare 30d"));return}if(I.json){console.log(JSON.stringify({current:Q,previous:Y},null,2));return}console.log(P$.default.bold(`
|
|
447
447
|
Comparing: ${N.label} (current) vs ${X.label} (prior)
|
|
448
|
-
`)),y(
|
|
448
|
+
`)),y(BX(Q,Y),"Period Comparison"),console.log(P$.default.bold(`
|
|
449
449
|
--- Current Period ---
|
|
450
|
-
`)),
|
|
451
|
-
`),"Usage"),o(
|
|
452
|
-
`);y(H,"Overview");let Y=Object.entries(U.skillsUsed).sort(([,v],[,O])=>O-v).slice(0,5);if(Y.length>0){let v=[
|
|
453
|
-
`);y(v,"Skills")}o(
|
|
454
|
-
`),"Migration");if(!I)await
|
|
450
|
+
`)),QO(Q,H.sessions,H.hourly,U,null);let v=TX(_,Q);o(P$.default.dim(`Snapshot saved: ${v}`));return}let z;try{z=YX($)}catch(N){y(["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(`
|
|
451
|
+
`),"Usage"),o(P$.default.dim(N.message));return}u.start(`Analyzing ${z.label} window...`);let J=Vu(_,z),G=MX(_,z);if(u.stop(`Analysis complete (${J.metrics.commits} commits)`),J.metrics.commits===0){y(P$.default.yellow("No commits found in this window."),"Empty"),o(P$.default.dim("Try a wider window: oma retro 30d"));return}if(I.json){console.log(JSON.stringify(J,null,2));return}let g=pY(_);QO(J,G.sessions,G.hourly,U,g);let q=TX(_,J);o(P$.default.dim(`Snapshot saved: ${q}`))}I4();var f6=H$(b$(),1);import{execSync as bE,spawnSync as HO}from"node:child_process";import{platform as AE}from"node:os";function jE(){let $=AE();if($==="darwin")return"brew install gh";if($==="win32")return"winget install GitHub.cli";return"sudo apt install gh"}async function YO(){if(console.clear(),D$(f6.default.bgMagenta(f6.default.white(" ⭐ oh-my-agent star "))),!Q1()){let I=jE(),_=await j$({message:`GitHub CLI (gh) is not installed. Install with ${f6.default.cyan(I)}?`});if(u$(_)||!_){o("Install gh manually and try again.");return}let u=$4();u.start("Installing GitHub CLI...");let U=HO(I,{shell:!0,stdio:"pipe"});if(U.status!==0){u.stop("Installation failed"),a.error(U.stderr?.toString()||"Unknown error"),o("Please install gh manually.");return}u.stop("GitHub CLI installed!")}if(!m4()){a.warn("GitHub CLI is not authenticated.");let I=await j$({message:`Run ${f6.default.cyan("gh auth login")} now?`});if(u$(I)||!I){o("Authenticate and try again.");return}if(HO("gh",["auth","login"],{stdio:"inherit"}),!m4()){o("Authentication was not completed. Try again.");return}a.success("Authenticated!")}if(v1()){o(`Already starred ${f6.default.cyan(W$)}! Thank you! \uD83D\uDE4F`);return}let $=await j$({message:`Star ${f6.default.cyan(W$)} on GitHub?`});if(u$($)||!$){o("Maybe next time!");return}try{bE(`gh api -X PUT /user/starred/${W$}`,{stdio:"ignore"}),o(`Starred ${f6.default.cyan(W$)}! Thank you! \uD83C\uDF1F`)}catch{a.error("Failed to star the repository."),o("Please try again later.")}}I4();DX();iI();var W4=H$(b$(),1);import{existsSync as Wu,mkdirSync as FE,readdirSync as SE,readFileSync as wE,writeFileSync as OO}from"node:fs";import{dirname as EE,join as TO}from"node:path";function WX($){return TO($,".serena","metrics.json")}function ZX(){return{sessions:0,skillsUsed:{},tasksCompleted:0,totalSessionTime:0,filesChanged:0,linesAdded:0,linesRemoved:0,lastUpdated:new Date().toISOString(),startDate:new Date().toISOString()}}function CE($){let I=WX($);if(Wu(I))try{return JSON.parse(wE(I,"utf-8"))}catch{return ZX()}return ZX()}function fE($,I){let _=WX($),u=EE(_);if(!Wu(u))FE(u,{recursive:!0});I.lastUpdated=new Date().toISOString(),OO(_,JSON.stringify(I,null,2),"utf-8")}function xE($){let I=TO($,".serena","memories"),_={};if(!Wu(I))return _;try{let u=SE(I);for(let U of u){let z=U.match(/(?:progress|result)-(\w+)/);if(z?.[1]){let J=z[1];_[J]=(_[J]||0)+1}}}catch{}return _}async function BO($=!1,I=!1){let _=process.cwd(),u=WX(_);if(I){if(Wu(u))OO(u,JSON.stringify(ZX(),null,2),"utf-8");if($)console.log(JSON.stringify({reset:!0}));else console.log(W4.default.green("✅ Metrics reset successfully."));return}let U=CE(_),z=Zu(_),J=xE(_),G=yv(_),g=r2(_),q=g.startedAt?new Date(g.startedAt):null,N=q&&!Number.isNaN(q.getTime())?Math.max(0,Math.floor((Date.now()-q.getTime())/1000)):0;for(let[v,O]of Object.entries(J))U.skillsUsed[v]=(U.skillsUsed[v]||0)+O;if(G>U.tasksCompleted)U.tasksCompleted=G;if(g.id){if(["completed","failed","aborted"].includes(g.status||"")&&(U.lastSessionId!==g.id||U.lastSessionStatus!==g.status)&&N>0)U.totalSessionTime+=N;U.lastSessionId=g.id,U.lastSessionStatus=g.status,U.lastSessionStarted=g.startedAt,U.lastSessionDuration=N}U.filesChanged+=z.filesChanged,U.linesAdded+=z.linesAdded,U.linesRemoved+=z.linesRemoved,U.sessions+=1,fE(_,U);let X=Math.max(1,Math.ceil((Date.now()-new Date(U.startDate).getTime())/86400000)),Q=U.sessions>0?Math.round(U.totalSessionTime/U.sessions):0;if($){console.log(JSON.stringify({...U,gitStats:z,daysSinceStart:X,avgSessionTime:Q},null,2));return}console.clear(),D$(W4.default.bgMagenta(W4.default.white(" \uD83D\uDCCA oh-my-agent stats ")));let H=[W4.default.bold(`\uD83D\uDCC8 Productivity Metrics (${X} days)`),"┌─────────────────────┬──────────────┐",`│ ${W4.default.bold("Metric")} │ ${W4.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 │ ${W4.default.green(`+${U.linesAdded}`).padEnd(12)} │`,`│ Lines Removed │ ${W4.default.red(`-${U.linesRemoved}`).padEnd(12)} │`,"└─────────────────────┴──────────────┘"].join(`
|
|
452
|
+
`);y(H,"Overview");let Y=Object.entries(U.skillsUsed).sort(([,v],[,O])=>O-v).slice(0,5);if(Y.length>0){let v=[W4.default.bold("\uD83C\uDFC6 Top Skills Used"),...Y.map(([O,T],V)=>` ${V+1}. ${O} (${T})`)].join(`
|
|
453
|
+
`);y(v,"Skills")}o(W4.default.dim(`Data stored in: ${u}`))}I4();var l$=H$(b$(),1);import{execSync as x6}from"node:child_process";import{cpSync as Ru,existsSync as k6,mkdirSync as Pu,readFileSync as RX,rmSync as PX,writeFileSync as bu}from"node:fs";import{tmpdir as kE}from"node:os";import{join as i$}from"node:path";function yE($){if(!$)return{intro:(_)=>D$(_),outro:(_)=>o(_),note:(_,u)=>y(_,u),logError:(_)=>a.error(_),spinnerStart:(_)=>{let u=$4();return u.start(_),u}};let I={start(_){},stop(_){if(_)console.log(_)},message(_){console.log(_)}};return{intro:(_)=>console.log(_),outro:(_)=>console.log(_),note:(_,u)=>console.log(_),logError:(_)=>console.error(_),spinnerStart:(_)=>{return console.log(_),I}}}function iE($,I){if($!==null)return"ready";return I?"legacy":"missing"}async function MO($=!1,I=!1){if(!I&&process.stdout.isTTY)console.clear();let _=yE(I);_.intro(l$.default.bgMagenta(l$.default.white(" \uD83D\uDEF8 oh-my-agent update ")));let u=process.cwd(),U=await Yu(u),z=YY(u),J=iE(U,z);if(J==="missing"){if(_.logError("oh-my-agent is not installed in this project. Run `oma install` first."),I)throw Error("oh-my-agent is not installed in this project. Run `oma install` first.");process.exit(1)}let G=T1(u);if(G.length>0)_.note(G.map((N)=>`${l$.default.green("✓")} ${N}`).join(`
|
|
454
|
+
`),"Migration");let g=G.length>0||zX(u);if(G.length>0&&!zX(u))JX(u,!0);if(!I)await Hu(u);if(J==="legacy")_.note("Existing .agents installation detected without _version.json. Updating in place and restoring version metadata.","Legacy install");let q;try{q=_.spinnerStart("Checking for updates...");let N=await OY();if(U===N.version&&!g){q.stop(l$.default.green("Already up to date!")),_.outro(`Current version: ${l$.default.cyan(U)}`);return}let X=U===N.version;q.message(`Downloading ${l$.default.cyan(N.version)}...`);let{dir:Q,cleanup:H}=await Mu();try{q.message("Copying files..."),T1(u);let Y=i$(u,".agents","oma-config.yaml"),v=i$(u,".agents","mcp.json"),O=!$&&k6(Y)?RX(Y):null,T=!$&&k6(v)?RX(v):null,V=i$(kE(),`oma-stack-backup-${Date.now()}`),W=i$(u,".agents","skills","oma-backend","stack"),K=!$&&k6(W);if(K)Pu(V,{recursive:!0}),Ru(W,i$(V,"oma-backend"),{recursive:!0});let D=["snippets.md","tech-stack.md","api-template.py"],Z=i$(u,".agents","skills","oma-backend","resources"),B=!$&&!K&&D.some((p)=>k6(i$(Z,p)));if(Ru(i$(Q,".agents"),i$(u,".agents"),{recursive:!0,force:!0}),O)bu(Y,O);if(T)bu(v,T);if(K)try{Pu(W,{recursive:!0}),Ru(i$(V,"oma-backend"),W,{recursive:!0,force:!0})}finally{PX(V,{recursive:!0,force:!0})}if(B){let p=i$(Q,".agents","skills","oma-backend","variants","python");if(k6(p))Pu(W,{recursive:!0}),Ru(p,W,{recursive:!0,force:!0}),bu(i$(W,"stack.yaml"),`language: python
|
|
455
455
|
framework: fastapi
|
|
456
456
|
orm: sqlalchemy
|
|
457
457
|
source: migrated
|
|
458
|
-
`)}let
|
|
459
|
-
`),"Migration");await Ou(u,
|
|
460
|
-
`)}catch{}if(
|
|
461
|
-
`),"Symlinks updated")}}if(_.outro(
|
|
462
|
-
`)}function
|
|
463
|
-
`),"Account"),$.promptCredits||$.flowCredits){let _=[];if($.promptCredits)_.push(
|
|
464
|
-
`),"Credits")}if($.models.length===0)y(
|
|
465
|
-
`),`Models (${$.models.length})`)}o(
|
|
466
|
-
`),"Connection Failed"),process.exit(1);
|
|
467
|
-
`).filter(Boolean),
|
|
468
|
-
`);console.log(N),console.log();let X=`${
|
|
469
|
-
`);for(let T of
|
|
470
|
-
`)}async function SO($){let I=jO(process.cwd());if($.json){console.log(JSON.stringify(I,null,2));return}console.log(FO(I))}import{existsSync as Vx,mkdirSync as Zx,readdirSync as XU,readFileSync as Wx,statSync as U5}from"node:fs";import{createServer as Rx}from"node:http";import{basename as zB,join as b4}from"node:path";import{EventEmitter as xC}from"node:events";import{stat as kC,Stats as Xd}from"node:fs";import{readdir as yC,stat as iC}from"node:fs/promises";import*as e from"node:path";import{lstat as wO,readdir as GC,realpath as qC,stat as XC}from"node:fs/promises";import{join as NC,relative as QC,resolve as EO,sep as vC}from"node:path";import{Readable as HC}from"node:stream";var G4={FILE_TYPE:"files",DIR_TYPE:"directories",FILE_DIR_TYPE:"files_directories",EVERYTHING_TYPE:"all"},bX={root:".",fileFilter:($)=>!0,directoryFilter:($)=>!0,type:G4.FILE_TYPE,lstat:!1,depth:2147483648,alwaysStat:!1,highWaterMark:4096};Object.freeze(bX);var kO="READDIRP_RECURSIVE_ERROR",YC=new Set(["ENOENT","EPERM","EACCES","ELOOP",kO]),CO=[G4.DIR_TYPE,G4.EVERYTHING_TYPE,G4.FILE_DIR_TYPE,G4.FILE_TYPE],OC=new Set([G4.DIR_TYPE,G4.EVERYTHING_TYPE,G4.FILE_DIR_TYPE]),TC=new Set([G4.EVERYTHING_TYPE,G4.FILE_DIR_TYPE,G4.FILE_TYPE]),BC=($)=>YC.has($.code),MC=process.platform==="win32",fO=($)=>!0,xO=($)=>{if($===void 0)return fO;if(typeof $==="function")return $;if(typeof $==="string"){let I=$.trim();return(_)=>_.basename===I}if(Array.isArray($)){let I=$.map((_)=>_.trim());return(_)=>I.some((u)=>_.basename===u)}return fO};class AX extends HC{parents;reading;parent;_stat;_maxDepth;_wantsDir;_wantsFile;_wantsEverything;_root;_isDirent;_statsProp;_rdOptions;_fileFilter;_directoryFilter;constructor($={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:$.highWaterMark});let I={...bX,...$},{root:_,type:u}=I;this._fileFilter=xO(I.fileFilter),this._directoryFilter=xO(I.directoryFilter);let U=I.lstat?wO:XC;if(MC)this._stat=(z)=>U(z,{bigint:!0});else this._stat=U;this._maxDepth=I.depth!=null&&Number.isSafeInteger(I.depth)?I.depth:bX.depth,this._wantsDir=u?OC.has(u):!1,this._wantsFile=u?TC.has(u):!1,this._wantsEverything=u===G4.EVERYTHING_TYPE,this._root=EO(_),this._isDirent=!I.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(_,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,_=I&&I.files;if(_&&_.length>0){let{path:u,depth:U}=I,z=_.splice(0,$).map((J)=>this._formatEntry(J,u)),g=await Promise.all(z);for(let J of g){if(!J)continue;if(this.destroyed)return;let G=await this._getEntryType(J);if(G==="directory"&&this._directoryFilter(J)){if(U<=this._maxDepth)this.parents.push(this._exploreDir(J.fullPath,U+1));if(this._wantsDir)this.push(J),$--}else if((G==="file"||this._includeAsFile(J))&&this._fileFilter(J)){if(this._wantsFile)this.push(J),$--}}}else{let u=this.parents.pop();if(!u){this.push(null);break}if(this.parent=await u,this.destroyed)return}}}catch(I){this.destroy(I)}finally{this.reading=!1}}async _exploreDir($,I){let _;try{_=await GC($,this._rdOptions)}catch(u){this._onError(u)}return{files:_,depth:I,path:$}}async _formatEntry($,I){let _,u=this._isDirent?$.name:$;try{let U=EO(NC(I,u));_={path:QC(this._root,U),fullPath:U,basename:u},_[this._statsProp]=this._isDirent?$:await this._stat(U)}catch(U){this._onError(U);return}return _}_onError($){if(BC($)&&!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 _=$.fullPath;try{let u=await qC(_),U=await wO(u);if(U.isFile())return"file";if(U.isDirectory()){let z=u.length;if(_.startsWith(u)&&_.substr(z,1)===vC){let g=Error(`Circular symlink detected: "${_}" points to "${u}"`);return g.code=kO,this._onError(g)}return"directory"}}catch(u){return this._onError(u),""}}}_includeAsFile($){let I=$&&$[this._statsProp];return I&&this._wantsEverything&&!I.isDirectory()}}function yO($,I={}){let _=I.entryType||I.type;if(_==="both")_=G4.FILE_DIR_TYPE;if(_)I.type=_;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(_&&!CO.includes(_))throw Error(`readdirp: Invalid type passed. Use one of ${CO.join(", ")}`);return I.root=$,new AX(I)}import{watch as KC,unwatchFile as iO,watchFile as DC}from"node:fs";import{realpath as jX,lstat as LC,open as VC,stat as mO}from"node:fs/promises";import{type as ZC}from"node:os";import*as K$ from"node:path";var WC="data",wX="end",rO="close",wu=()=>{};var Eu=process.platform,EX=Eu==="win32",RC=Eu==="darwin",PC=Eu==="linux",bC=Eu==="freebsd",nO=ZC()==="OS400",B$={ALL:"all",READY:"ready",ADD:"add",CHANGE:"change",ADD_DIR:"addDir",UNLINK:"unlink",UNLINK_DIR:"unlinkDir",RAW:"raw",ERROR:"error"},R4=B$,AC="watch",jC={lstat:LC,stat:mO},K1="listeners",ju="errHandlers",Z0="rawEmitters",FC=[K1,ju,Z0],SC=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"]),wC=($)=>SC.has(K$.extname($).slice(1).toLowerCase()),SX=($,I)=>{if($ instanceof Set)$.forEach(I);else I($)},$U=($,I,_)=>{let u=$[I];if(!(u instanceof Set))$[I]=u=new Set([u]);u.add(_)},EC=($)=>(I)=>{let _=$[I];if(_ instanceof Set)_.clear();else delete $[I]},IU=($,I,_)=>{let u=$[I];if(u instanceof Set)u.delete(_);else if(u===_)delete $[I]},hO=($)=>$ instanceof Set?$.size===0:!$,Fu=new Map;function lO($,I,_,u,U){let z=(g,J)=>{if(_($),U(g,J,{watchedPath:$}),J&&$!==J)Su(K$.resolve($,J),K1,K$.join($,J))};try{return KC($,{persistent:I.persistent},z)}catch(g){u(g);return}}var Su=($,I,_,u,U)=>{let z=Fu.get($);if(!z)return;SX(z[I],(g)=>{g(_,u,U)})},CC=($,I,_,u)=>{let{listener:U,errHandler:z,rawEmitter:g}=u,J=Fu.get(I),G;if(!_.persistent){if(G=lO($,_,U,z,g),!G)return;return G.close.bind(G)}if(J)$U(J,K1,U),$U(J,ju,z),$U(J,Z0,g);else{if(G=lO($,_,Su.bind(null,I,K1),z,Su.bind(null,I,Z0)),!G)return;G.on(R4.ERROR,async(q)=>{let N=Su.bind(null,I,ju);if(J)J.watcherUnusable=!0;if(EX&&q.code==="EPERM")try{await(await VC($,"r")).close(),N(q)}catch(X){}else N(q)}),J={listeners:U,errHandlers:z,rawEmitters:g,watcher:G},Fu.set(I,J)}return()=>{if(IU(J,K1,U),IU(J,ju,z),IU(J,Z0,g),hO(J.listeners))J.watcher.close(),Fu.delete(I),FC.forEach(EC(J)),J.watcher=void 0,Object.freeze(J)}},FX=new Map,fC=($,I,_,u)=>{let{listener:U,rawEmitter:z}=u,g=FX.get(I),J=g&&g.options;if(J&&(J.persistent<_.persistent||J.interval>_.interval))iO(I),g=void 0;if(g)$U(g,K1,U),$U(g,Z0,z);else g={listeners:U,rawEmitters:z,options:_,watcher:DC(I,_,(G,q)=>{SX(g.rawEmitters,(X)=>{X(R4.CHANGE,I,{curr:G,prev:q})});let N=G.mtimeMs;if(G.size!==q.size||N>q.mtimeMs||N===0)SX(g.listeners,(X)=>X($,G))})},FX.set(I,g);return()=>{if(IU(g,K1,U),IU(g,Z0,z),hO(g.listeners))FX.delete(I),iO(I),g.options=g.watcher=void 0,Object.freeze(g)}};class CX{fsw;_boundHandleError;constructor($){this.fsw=$,this._boundHandleError=(I)=>$._handleError(I)}_watchWithNodeFs($,I){let _=this.fsw.options,u=K$.dirname($),U=K$.basename($);this.fsw._getWatchedDir(u).add(U);let g=K$.resolve($),J={persistent:_.persistent};if(!I)I=wu;let G;if(_.usePolling){let q=_.interval!==_.binaryInterval;J.interval=q&&wC(U)?_.binaryInterval:_.interval,G=fC($,g,J,{listener:I,rawEmitter:this.fsw._emitRaw})}else G=CC($,g,J,{listener:I,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw});return G}_handleFile($,I,_){if(this.fsw.closed)return;let u=K$.dirname($),U=K$.basename($),z=this.fsw._getWatchedDir(u),g=I;if(z.has(U))return;let J=async(q,N)=>{if(!this.fsw._throttle(AC,$,5))return;if(!N||N.mtimeMs===0)try{let X=await mO($);if(this.fsw.closed)return;let{atimeMs:Q,mtimeMs:H}=X;if(!Q||Q<=H||H!==g.mtimeMs)this.fsw._emit(R4.CHANGE,$,X);if((RC||PC||bC)&&g.ino!==X.ino){this.fsw._closeFile(q),g=X;let Y=this._watchWithNodeFs($,J);if(Y)this.fsw._addPathCloser(q,Y)}else g=X}catch(X){this.fsw._remove(u,U)}else if(z.has(U)){let{atimeMs:X,mtimeMs:Q}=N;if(!X||X<=Q||Q!==g.mtimeMs)this.fsw._emit(R4.CHANGE,$,N);g=N}},G=this._watchWithNodeFs($,J);if(!(_&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored($)){if(!this.fsw._throttle(R4.ADD,$,0))return;this.fsw._emit(R4.ADD,$,I)}return G}async _handleSymlink($,I,_,u){if(this.fsw.closed)return;let U=$.fullPath,z=this.fsw._getWatchedDir(I);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let g;try{g=await jX(_)}catch(J){return this.fsw._emitReady(),!0}if(this.fsw.closed)return;if(z.has(u)){if(this.fsw._symlinkPaths.get(U)!==g)this.fsw._symlinkPaths.set(U,g),this.fsw._emit(R4.CHANGE,_,$.stats)}else z.add(u),this.fsw._symlinkPaths.set(U,g),this.fsw._emit(R4.ADD,_,$.stats);return this.fsw._emitReady(),!0}if(this.fsw._symlinkPaths.has(U))return!0;this.fsw._symlinkPaths.set(U,!0)}_handleRead($,I,_,u,U,z,g){$=K$.join($,"");let J=u?`${$}:${u}`:$;if(g=this.fsw._throttle("readdir",J,1000),!g)return;let G=this.fsw._getWatchedDir(_.path),q=new Set,N=this.fsw._readdirp($,{fileFilter:(X)=>_.filterPath(X),directoryFilter:(X)=>_.filterDir(X)});if(!N)return;return N.on(WC,async(X)=>{if(this.fsw.closed){N=void 0;return}let Q=X.path,H=K$.join($,Q);if(q.add(Q),X.stats.isSymbolicLink()&&await this._handleSymlink(X,$,H,Q))return;if(this.fsw.closed){N=void 0;return}if(Q===u||!u&&!G.has(Q))this.fsw._incrReadyCount(),H=K$.join(U,K$.relative(U,H)),this._addToNodeFs(H,I,_,z+1)}).on(R4.ERROR,this._boundHandleError),new Promise((X,Q)=>{if(!N)return Q();N.once(wX,()=>{if(this.fsw.closed){N=void 0;return}let H=g?g.clear():!1;if(X(void 0),G.getChildren().filter((Y)=>{return Y!==$&&!q.has(Y)}).forEach((Y)=>{this.fsw._remove($,Y)}),N=void 0,H)this._handleRead($,!1,_,u,U,z,g)})})}async _handleDir($,I,_,u,U,z,g){let J=this.fsw._getWatchedDir(K$.dirname($)),G=J.has(K$.basename($));if(!(_&&this.fsw.options.ignoreInitial)&&!U&&!G)this.fsw._emit(R4.ADD_DIR,$,I);J.add(K$.basename($)),this.fsw._getWatchedDir($);let q,N,X=this.fsw.options.depth;if((X==null||u<=X)&&!this.fsw._symlinkPaths.has(g)){if(!U){if(await this._handleRead($,_,z,U,$,u,q),this.fsw.closed)return}N=this._watchWithNodeFs($,(Q,H)=>{if(H&&H.mtimeMs===0)return;this._handleRead(Q,!1,z,U,$,u,q)})}return N}async _addToNodeFs($,I,_,u,U){let z=this.fsw._emitReady;if(this.fsw._isIgnored($)||this.fsw.closed)return z(),!1;let g=this.fsw._getWatchHelpers($);if(_)g.filterPath=(J)=>_.filterPath(J),g.filterDir=(J)=>_.filterDir(J);try{let J=await jC[g.statMethod](g.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(g.watchPath,J))return z(),!1;let G=this.fsw.options.followSymlinks,q;if(J.isDirectory()){let N=K$.resolve($),X=G?await jX($):$;if(this.fsw.closed)return;if(q=await this._handleDir(g.watchPath,J,I,u,U,g,X),this.fsw.closed)return;if(N!==X&&X!==void 0)this.fsw._symlinkPaths.set(N,X)}else if(J.isSymbolicLink()){let N=G?await jX($):$;if(this.fsw.closed)return;let X=K$.dirname(g.watchPath);if(this.fsw._getWatchedDir(X).add(g.watchPath),this.fsw._emit(R4.ADD,g.watchPath,J),q=await this._handleDir(X,J,I,u,$,g,N),this.fsw.closed)return;if(N!==void 0)this.fsw._symlinkPaths.set(K$.resolve($),N)}else q=this._handleFile(g.watchPath,J,I);if(z(),q)this.fsw._addPathCloser($,q);return!1}catch(J){if(this.fsw._handleError(J))return z(),$}}}/*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */var fX="/",lC="//",tO=".",mC="..",rC="string",nC=/\\/g,aO=/\/\//g,hC=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,dC=/^\.[/\\]/;function Cu($){return Array.isArray($)?$:[$]}var xX=($)=>typeof $==="object"&&$!==null&&!($ instanceof RegExp);function cC($){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 _=e.relative($.path,I);if(!_)return!1;return!_.startsWith("..")&&!e.isAbsolute(_)}return!1};return()=>!1}function pC($){if(typeof $!=="string")throw Error("string expected");$=e.normalize($),$=$.replace(/\\/g,"/");let I=!1;if($.startsWith("//"))I=!0;if($=$.replace(aO,"/"),I)$="/"+$;return $}function dO($,I,_){let u=pC(I);for(let U=0;U<$.length;U++){let z=$[U];if(z(u,_))return!0}return!1}function oC($,I){if($==null)throw TypeError("anymatch: specify first argument");let u=Cu($).map((U)=>cC(U));if(I==null)return(U,z)=>{return dO(u,U,z)};return dO(u,I)}var cO=($)=>{let I=Cu($).flat();if(!I.every((_)=>typeof _===rC))throw TypeError(`Non-string provided as watch path: ${I}`);return I.map(eO)},pO=($)=>{let I=$.replace(nC,fX),_=!1;if(I.startsWith(lC))_=!0;if(I=I.replace(aO,fX),_)I=fX+I;return I},eO=($)=>pO(e.normalize(pO($))),oO=($="")=>(I)=>{if(typeof I==="string")return eO(e.isAbsolute(I)?I:e.join($,I));else return I},tC=($,I)=>{if(e.isAbsolute($))return $;return e.join(I,$)},aC=Object.freeze(new Set);class sO{path;_removeWatcher;items;constructor($,I){this.path=$,this._removeWatcher=I,this.items=new Set}add($){let{items:I}=this;if(!I)return;if($!==tO&&$!==mC)I.add($)}async remove($){let{items:I}=this;if(!I)return;if(I.delete($),I.size>0)return;let _=this.path;try{await yC(_)}catch(u){if(this._removeWatcher)this._removeWatcher(e.dirname(_),e.basename(_))}}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=wu,this.items=aC,Object.freeze(this)}}var eC="stat",sC="lstat";class $T{fsw;path;watchPath;fullWatchPath;dirParts;followSymlinks;statMethod;constructor($,I,_){this.fsw=_;let u=$;this.path=$=$.replace(dC,""),this.watchPath=u,this.fullWatchPath=e.resolve(u),this.dirParts=[],this.dirParts.forEach((U)=>{if(U.length>1)U.pop()}),this.followSymlinks=I,this.statMethod=I?eC:sC}entryPath($){return e.join(this.watchPath,e.relative(this.watchPath,$.fullPath))}filterPath($){let{stats:I}=$;if(I&&I.isSymbolicLink())return this.filterDir($);let _=this.entryPath($);return this.fsw._isntIgnored(_,I)&&this.fsw._hasReadPermissions(I)}filterDir($){return this.fsw._isntIgnored(this.entryPath($),$.stats)}}class IT extends xC{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,_={stabilityThreshold:2000,pollInterval:100},u={persistent:!0,ignoreInitial:!1,ignorePermissionErrors:!1,interval:100,binaryInterval:300,followSymlinks:!0,usePolling:!1,atomic:!0,...$,ignored:$.ignored?Cu($.ignored):Cu([]),awaitWriteFinish:I===!0?_:typeof I==="object"?{..._,...I}:!1};if(nO)u.usePolling=!0;if(u.atomic===void 0)u.atomic=!u.usePolling;let U=process.env.CHOKIDAR_USEPOLLING;if(U!==void 0){let J=U.toLowerCase();if(J==="false"||J==="0")u.usePolling=!1;else if(J==="true"||J==="1")u.usePolling=!0;else u.usePolling=!!J}let z=process.env.CHOKIDAR_INTERVAL;if(z)u.interval=Number.parseInt(z,10);let g=0;this._emitReady=()=>{if(g++,g>=this._readyCount)this._emitReady=wu,this._readyEmitted=!0,process.nextTick(()=>this.emit(B$.READY))},this._emitRaw=(...J)=>this.emit(B$.RAW,...J),this._boundRemove=this._remove.bind(this),this.options=u,this._nodeFsHandler=new CX(this),Object.freeze(u)}_addIgnoredPath($){if(xX($)){for(let I of this._ignoredPaths)if(xX(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(xX(I)&&I.path===$)this._ignoredPaths.delete(I)}}add($,I,_){let{cwd:u}=this.options;this.closed=!1,this._closePromise=void 0;let U=cO($);if(u)U=U.map((z)=>{return tC(z,u)});if(U.forEach((z)=>{this._removeIgnoredPath(z)}),this._userIgnored=void 0,!this._readyCount)this._readyCount=0;return this._readyCount+=U.length,Promise.all(U.map(async(z)=>{let g=await this._nodeFsHandler._addToNodeFs(z,!_,void 0,0,I);if(g)this._emitReady();return g})).then((z)=>{if(this.closed)return;z.forEach((g)=>{if(g)this.add(e.dirname(g),e.basename(I||g))})}),this}unwatch($){if(this.closed)return this;let I=cO($),{cwd:_}=this.options;return I.forEach((u)=>{if(!e.isAbsolute(u)&&!this._closers.has(u)){if(_)u=e.join(_,u);u=e.resolve(u)}if(this._closePath(u),this._addIgnoredPath(u),this._watched.has(u))this._addIgnoredPath({path:u,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((_)=>{let u=_();if(u instanceof Promise)$.push(u)})),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,_)=>{let U=(this.options.cwd?e.relative(this.options.cwd,_):_)||tO;$[U]=I.getChildren().sort()}),$}emitWithAll($,I){if(this.emit($,...I),$!==B$.ERROR)this.emit(B$.ALL,$,...I)}async _emit($,I,_){if(this.closed)return;let u=this.options;if(EX)I=e.normalize(I);if(u.cwd)I=e.relative(u.cwd,I);let U=[I];if(_!=null)U.push(_);let z=u.awaitWriteFinish,g;if(z&&(g=this._pendingWrites.get(I)))return g.lastChange=new Date,this;if(u.atomic){if($===B$.UNLINK)return this._pendingUnlinks.set(I,[$,...U]),setTimeout(()=>{this._pendingUnlinks.forEach((J,G)=>{this.emit(...J),this.emit(B$.ALL,...J),this._pendingUnlinks.delete(G)})},typeof u.atomic==="number"?u.atomic:100),this;if($===B$.ADD&&this._pendingUnlinks.has(I))$=B$.CHANGE,this._pendingUnlinks.delete(I)}if(z&&($===B$.ADD||$===B$.CHANGE)&&this._readyEmitted){let J=(G,q)=>{if(G)$=B$.ERROR,U[0]=G,this.emitWithAll($,U);else if(q){if(U.length>1)U[1]=q;else U.push(q);this.emitWithAll($,U)}};return this._awaitWriteFinish(I,z.stabilityThreshold,$,J),this}if($===B$.CHANGE){if(!this._throttle(B$.CHANGE,I,50))return this}if(u.alwaysStat&&_===void 0&&($===B$.ADD||$===B$.ADD_DIR||$===B$.CHANGE)){let J=u.cwd?e.join(u.cwd,I):I,G;try{G=await iC(J)}catch(q){}if(!G||this.closed)return;U.push(G)}return this.emitWithAll($,U),this}_handleError($){let I=$&&$.code;if($&&I!=="ENOENT"&&I!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||I!=="EPERM"&&I!=="EACCES"))this.emit(B$.ERROR,$);return $||this.closed}_throttle($,I,_){if(!this._throttled.has($))this._throttled.set($,new Map);let u=this._throttled.get($);if(!u)throw Error("invalid throttle");let U=u.get(I);if(U)return U.count++,!1;let z,g=()=>{let G=u.get(I),q=G?G.count:0;if(u.delete(I),clearTimeout(z),G)clearTimeout(G.timeoutObject);return q};z=setTimeout(g,_);let J={timeoutObject:z,clear:g,count:0};return u.set(I,J),J}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish($,I,_,u){let U=this.options.awaitWriteFinish;if(typeof U!=="object")return;let z=U.pollInterval,g,J=$;if(this.options.cwd&&!e.isAbsolute($))J=e.join(this.options.cwd,$);let G=new Date,q=this._pendingWrites;function N(X){kC(J,(Q,H)=>{if(Q||!q.has($)){if(Q&&Q.code!=="ENOENT")u(Q);return}let Y=Number(new Date);if(X&&H.size!==X.size)q.get($).lastChange=Y;let v=q.get($);if(Y-v.lastChange>=I)q.delete($),u(void 0,H);else g=setTimeout(N,z,H)})}if(!q.has($))q.set($,{lastChange:G,cancelWait:()=>{return q.delete($),clearTimeout(g),_}}),g=setTimeout(N,z)}_isIgnored($,I){if(this.options.atomic&&hC.test($))return!0;if(!this._userIgnored){let{cwd:_}=this.options,U=(this.options.ignored||[]).map(oO(_)),g=[...[...this._ignoredPaths].map(oO(_)),...U];this._userIgnored=oC(g,void 0)}return this._userIgnored($,I)}_isntIgnored($,I){return!this._isIgnored($,I)}_getWatchHelpers($){return new $T($,this.options.followSymlinks,this)}_getWatchedDir($){let I=e.resolve($);if(!this._watched.has(I))this._watched.set(I,new sO(I,this._boundRemove));return this._watched.get(I)}_hasReadPermissions($){if(this.options.ignorePermissionErrors)return!0;return Boolean(Number($.mode)&256)}_remove($,I,_){let u=e.join($,I),U=e.resolve(u);if(_=_!=null?_:this._watched.has(u)||this._watched.has(U),!this._throttle("remove",u,100))return;if(!_&&this._watched.size===1)this.add($,I,!0);this._getWatchedDir(u).getChildren().forEach((X)=>this._remove(u,X));let J=this._getWatchedDir($),G=J.has(I);if(J.remove(I),this._symlinkPaths.has(U))this._symlinkPaths.delete(U);let q=u;if(this.options.cwd)q=e.relative(this.options.cwd,u);if(this.options.awaitWriteFinish&&this._pendingWrites.has(q)){if(this._pendingWrites.get(q).cancelWait()===B$.ADD)return}this._watched.delete(u),this._watched.delete(U);let N=_?B$.UNLINK_DIR:B$.UNLINK;if(G&&!this._isIgnored(u))this._emit(N,u);this._closePath(u)}_closePath($){this._closeFile($);let I=e.dirname($);this._getWatchedDir(I).remove(e.basename($))}_closeFile($){let I=this._closers.get($);if(!I)return;I.forEach((_)=>_()),this._closers.delete($)}_addPathCloser($,I){if(!I)return;let _=this._closers.get($);if(!_)_=[],this._closers.set($,_);_.push(I)}_readdirp($,I){if(this.closed)return;let _={type:B$.ALL,alwaysStat:!0,lstat:!0,...I,depth:0},u=yO($,_);return this._streams.add(u),u.once(rO,()=>{u=void 0}),u.once(wX,()=>{if(u)this._streams.delete(u),u=void 0}),u}}function fu($,I={}){let _=new IT(I);return _.add($),_}var S0=v$(R$(),1);var Kx=v$(tT(),1),Dx=v$(rX(),1),Lx=v$(hX(),1),eX=v$(cu(),1),sX=v$(_B(),1);var uB=process.env.DASHBOARD_PORT?parseInt(process.env.DASHBOARD_PORT||"9847",10):9847;function Px(){if(process.env.MEMORIES_DIR)return process.env.MEMORIES_DIR;let $=process.argv[3];if($)return b4($,".serena","memories");return b4(process.cwd(),".serena","memories")}function NU($){try{return Wx($,"utf-8")}catch{return""}}function bx($){try{let I=XU($);if(I.includes("orchestrator-session.md"))return b4($,"orchestrator-session.md");let _=I.filter((u)=>/^session-.*\.md$/.test(u)).map((u)=>({name:u,mtime:U5(b4($,u)).mtimeMs})).sort((u,U)=>U.mtime-u.mtime);if(_.length>0&&_[0])return b4($,_[0].name)}catch{}return null}function Ax($){let I=bx($);if(!I)return{id:"N/A",status:"UNKNOWN"};let _=NU(I);if(!_)return{id:"N/A",status:"UNKNOWN"};let u=(_.match(/session-id:\s*(.+)/i)||[])[1]||(_.match(/# Session:\s*(.+)/i)||[])[1]||_.match(/(session-\d{8}-\d{6})/)?.[1]||zB(I,".md")||"N/A",U="UNKNOWN";if(/IN PROGRESS|RUNNING|## Active|\[IN PROGRESS\]/i.test(_))U="RUNNING";else if(/COMPLETED|DONE|## Completed|\[COMPLETED\]/i.test(_))U="COMPLETED";else if(/FAILED|ERROR|## Failed|\[FAILED\]/i.test(_))U="FAILED";else if(/Step \d+:.*\[/i.test(_))U="RUNNING";return{id:u.trim(),status:U}}function jx($){let I=NU(b4($,"task-board.md"));if(!I)return[];let _=[],u=I.split(`
|
|
471
|
-
`);for(let U of u){if(!U.startsWith("|")||/^\|\s*-+/.test(U))continue;let z=U.split("|").map((
|
|
472
|
-
`).map((
|
|
458
|
+
`)}let L=i$(u,".agents","skills","oma-backend","variants");if(k6(L))PX(L,{recursive:!0,force:!0});let A=T1(u);if(A.length>0)_.note(A.map((p)=>`${l$.default.green("✓")} ${p}`).join(`
|
|
459
|
+
`),"Migration");await Ou(u,N.version);let C=mH(u),x=C.filter((p)=>p!=="copilot"&&p!=="cursor");if(qu(Q,u,x),C.includes("cursor"))H0(u);let j=new Set;for(let p of["gemini","codex","qwen"]){if(!C.includes(p))continue;let O$=p==="gemini"?"GEMINI.md":"AGENTS.md";if(j.has(O$))continue;if(Ju(u,p))j.add(O$)}if(g)JX(u,!1);let U$=i$(u,".agents",".migration-backup");if(k6(U$))PX(U$,{recursive:!0,force:!0});{let p=LY(u);Bu(u,p)}let d=process.env.HOME||process.env.USERPROFILE||"";if(C.includes("claude"))try{x6("claude --version",{stdio:"ignore"});let p=i$(d,".claude","settings.json"),O$={};if(k6(p))O$=JSON.parse(RX(p,"utf-8"));if(B0(O$))Pu(i$(d,".claude"),{recursive:!0}),M0(O$),bu(p,`${JSON.stringify(O$,null,2)}
|
|
460
|
+
`)}catch{}if(C.includes("codex"))try{if(x6("claude --version",{stdio:"ignore"}),x6("codex --version",{stdio:"ignore"}),x6("claude plugin list",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).includes("codex@openai-codex"))x6("claude plugin update codex@openai-codex",{stdio:"ignore"});else x6("claude plugin marketplace add openai/codex-plugin-cc",{stdio:"ignore"}),x6("claude plugin install codex@openai-codex",{stdio:"ignore"})}catch{}let N$=aH(u);if(q.stop(X?l$.default.green("Reconciled after migrations!"):`Updated to version ${l$.default.cyan(N.version)}!`),N$.length>0){let p=tH(u);if(p.length>0){let{created:O$}=Xu(u,N$,p);if(O$.length>0)_.note(O$.map((N4)=>`${l$.default.green("→")} ${N4}`).join(`
|
|
461
|
+
`),"Symlinks updated")}}if(_.outro(X?`Reconciled to version ${l$.default.cyan(N.version)}`:`${N.metadata?.totalFiles??0} files updated successfully`),!I&&Q1()&&m4()&&!v1()){let p=await j$({message:`${l$.default.yellow("⭐")} Star ${l$.default.cyan(W$)} on GitHub? It helps a lot!`});if(!u$(p)&&p)try{x6(`gh api -X PUT /user/starred/${W$}`,{stdio:"ignore"}),a.success(`Starred ${l$.default.cyan(W$)}! Thank you! \uD83C\uDF1F`)}catch{a.warn(`Could not star automatically. Try: ${l$.default.dim(`gh api --method PUT /user/starred/${W$}`)}`)}}}finally{H()}}catch(N){if(q?.stop("Update failed"),_.logError(N instanceof Error?N.message:String(N)),I)throw N;process.exit(1)}}I4();var B$=H$(b$(),1);var KO=30;function VO($){let I=Math.round($/100*KO),_=KO-I,u;if($>60)u=B$.default.green;else if($>30)u=B$.default.yellow;else u=B$.default.red;let U=u("█".repeat(I)),z=B$.default.dim("░".repeat(_));return`${U}${z}`}function DO($){let I=$.remainingPercent.toFixed(0).padStart(4),_=VO($.remainingPercent),u=$.supportsImages?B$.default.dim(" img"):"",U=$.label.padEnd(26),z=$.isExhausted?B$.default.red(`resets ${$.timeUntilReset}`):$.timeUntilReset!=="Ready"?B$.default.dim(`resets ${$.timeUntilReset}`):"";return` ${U} ${_} ${I}%${u} ${z}`}function LO($,I){let _=VO(I.remainingPercent),u=I.remainingPercent.toFixed(0).padStart(4),U=`${I.available.toLocaleString()} / ${I.monthly.toLocaleString()}`;return[` ${_} ${u}%`,` ${B$.default.dim(U)}`].join(`
|
|
462
|
+
`)}function lE($){console.clear(),D$(B$.default.bgCyan(B$.default.black(" oh-my-agent usage ")));let I=[`${B$.default.bold("User")} ${$.userName}${$.email?` (${B$.default.dim($.email)})`:""}`,`${B$.default.bold("Plan")} ${$.planName}${$.tierName?` ${B$.default.dim(`(${$.tierName})`)}`:""}`];if($.defaultModel){let _=$.models.find((u)=>u.modelId===$.defaultModel)?.label;if(_)I.push(`${B$.default.bold("Default")} ${_}`)}if(y(I.join(`
|
|
463
|
+
`),"Account"),$.promptCredits||$.flowCredits){let _=[];if($.promptCredits)_.push(B$.default.bold(" Prompt"),LO("Prompt",$.promptCredits));if($.flowCredits){if(_.length>0)_.push("");_.push(B$.default.bold(" Flow"),LO("Flow",$.flowCredits))}y(_.join(`
|
|
464
|
+
`),"Credits")}if($.models.length===0)y(B$.default.dim(" No model quota data available"),"Models");else{let _=[...$.models].sort((J,G)=>J.label.localeCompare(G.label)),u=_.filter((J)=>J.isExhausted),U=_.filter((J)=>!J.isExhausted),z=[];if(U.length>0)for(let J of U)z.push(DO(J));if(u.length>0){if(z.length>0)z.push("");z.push(B$.default.red(" ── Exhausted ──"));for(let J of u)z.push(DO(J))}y(z.join(`
|
|
465
|
+
`),`Models (${$.models.length})`)}o(B$.default.dim(`Updated ${$.timestamp.toLocaleTimeString()}`))}async function ZO($=!1,I=!1){if(I){let u=await SH();if(!u)console.error("Failed to connect to Antigravity"),process.exit(1);console.log(JSON.stringify(u,null,2));return}if(!$){let u=$4();u.start("Connecting to Antigravity...");let U=await pI();if(u.stop(U?"Connected":B$.default.red("Failed to connect to Antigravity")),!U)y([`${B$.default.yellow("Antigravity IDE must be running locally.")}`,"",B$.default.dim("Make sure the language_server process is active."),B$.default.dim("Try opening a project in Antigravity first.")].join(`
|
|
466
|
+
`),"Connection Failed"),process.exit(1);lE(U);return}let _=await pI();if(!_)console.log(JSON.stringify({error:"Failed to connect"})),process.exit(1);console.log(JSON.stringify({userName:_.userName,email:_.email,planName:_.planName,tierName:_.tierName||null,promptCredits:_.promptCredits??null,flowCredits:_.flowCredits??null,defaultModel:_.defaultModel,models:[..._.models].sort((u,U)=>u.label.localeCompare(U.label)).map((u)=>({label:u.label,modelId:u.modelId,remainingPercent:u.remainingPercent,isExhausted:u.isExhausted,supportsImages:u.supportsImages,resetTime:u.resetTime?.toISOString()??null,timeUntilReset:u.timeUntilReset})),timestamp:_.timestamp.toISOString()},null,2))}I4();var m$=H$(b$(),1);import{execSync as mE}from"node:child_process";import{existsSync as J6,readdirSync as bO,readFileSync as bX}from"node:fs";import{join as n4}from"node:path";var WO=["backend","frontend","mobile","qa","debug","pm"];function rE($,I){let _=n4($,".serena","memories");if(!J6(_))return null;let u=new RegExp(`^result-${I}(?:-[\\w-]+)?\\.md$`),U=bO(_).filter((z)=>u.test(z)).sort().reverse();if(U.length===0)return null;return n4(_,U[0])}function m($,I,_){return{name:$,status:I,message:_}}function S$($,I){try{return mE($,{encoding:"utf-8",cwd:I,stdio:["pipe","pipe","pipe"]}).trim()}catch{return null}}function nE($,I){let _=AO($);if(!_)return m("Scope Check","skip","No plan file found");let u;try{u=JSON.parse(bX(_,"utf-8"))}catch{return m("Scope Check","skip","Invalid plan file")}let U=u.tasks?.filter((q)=>q.agent?.toLowerCase()===I);if(!U||U.length===0)return m("Scope Check","skip","No tasks for this agent");let z=U.flatMap((q)=>q.scope??[]);if(z.length===0)return m("Scope Check","skip","No scope defined in plan");let J=S$("git diff --name-only HEAD 2>/dev/null || git diff --name-only --cached 2>/dev/null",$);if(!J)return m("Scope Check","pass","No files changed");let G=J.split(`
|
|
467
|
+
`).filter(Boolean),g=[];for(let q of G)if(!z.some((X)=>q.startsWith(X)))g.push(q);if(g.length>0)return m("Scope Check","fail",`${g.length} out-of-scope: ${g[0]}${g.length>1?` +${g.length-1}`:""}`);return m("Scope Check","pass",`All ${G.length} files in scope`)}function hE($,I){let _=rE($,I);if(!_)return m("Charter Preflight","skip","Result file not found");let u=bX(_,"utf-8");if(!u.includes("CHARTER_CHECK:"))return m("Charter Preflight","warn","Block missing from result");if(/\{[^}]+\}/.test(u.split("CHARTER_CHECK:")[1]?.split("```")[0]||""))return m("Charter Preflight","warn","Contains unfilled placeholders");return m("Charter Preflight","pass","Properly filled")}function dE($){let I=["*.py","*.ts","*.tsx","*.js","*.dart"],_=`(password|secret|api_key|token)\\s*=\\s*['"][^'"]{8,}`;for(let u of I){let U=S$(`grep -rn --include="${u}" -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 m("Hardcoded Secrets","fail",`Found in: ${U.split(":")[0]}`)}return m("Hardcoded Secrets","pass","None detected")}function cE($){let I=S$('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',$),_=Number.parseInt(I||"0",10);if(_>0)return m("TODO/FIXME Comments","warn",`${_} found`);return m("TODO/FIXME Comments","pass","None found")}function pE($){if(!S$("which uv",$))return m("Python Syntax","skip","uv not available");let _=S$('find . -name "*.py" -not -path "*/node_modules/*" -not -path "*/.venv/*" -exec uv run python -m py_compile {} \\; 2>&1 | head -5',$);if(_&&_.length>0)return m("Python Syntax","fail","Syntax errors found");return m("Python Syntax","pass","Valid")}function oE($){if(S$(`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 m("SQL Injection","fail","f-string with SQL keywords detected");return m("SQL Injection","pass","None detected")}function RO($){let I=S$("which uv",$),_=J6(n4($,"pyproject.toml"));if(!I||!_)return m("Python Tests","skip",!I?"uv not available":"pyproject.toml not found");let u=S$("uv run pytest -q --tb=no 2>&1",$);if(u?.includes("passed")||u?.includes("no tests ran"))return m("Python Tests","pass","Tests pass");return m("Python Tests","fail","Tests failing")}function tE($){if(!J6(n4($,"tsconfig.json")))return m("TypeScript","skip","Not configured");let I=S$("npx tsc --noEmit 2>&1",$);if(I===null||I==="")return m("TypeScript","pass","Compilation clean");if(I.includes("error"))return m("TypeScript","fail","Type errors found");return m("TypeScript","pass","Compilation clean")}function aE($){let I=S$(`grep -rn --include="*.tsx" --include="*.jsx" 'style={{' . 2>/dev/null | grep -v node_modules | wc -l`,$),_=Number.parseInt(I||"0",10);if(_>0)return m("Inline Styles","warn",`${_} found (prefer Tailwind)`);return m("Inline Styles","pass","None found")}function eE($){let I=S$(`grep -rn --include="*.ts" --include="*.tsx" ': any' . 2>/dev/null | grep -v node_modules | grep -v ".d.ts" | wc -l`,$),_=Number.parseInt(I||"0",10);if(_>3)return m("Any Types","fail",`${_} found (limit: 3)`);if(_>0)return m("Any Types","warn",`${_} found`);return m("Any Types","pass","None found")}function PO($){if(!J6(n4($,"package.json")))return m("Frontend Tests","skip","No package.json");let I=S$("npx vitest run --reporter=verbose 2>&1",$);if(I?.includes("passed")||I?.includes("✓"))return m("Frontend Tests","pass","Tests pass");return m("Frontend Tests","warn","Tests failed or vitest not configured")}function sE($){if(!S$("which flutter",$)){if(!S$("which dart",$))return m("Flutter/Dart Analysis","skip","Not available");if(S$("dart analyze 2>&1",$)?.includes("No issues found"))return m("Dart Analysis","pass","Clean");return m("Dart Analysis","fail","Issues found")}if(S$("flutter analyze 2>&1",$)?.includes("No issues found"))return m("Flutter Analysis","pass","Clean");return m("Flutter Analysis","fail","Issues found")}function $C($){if(!S$("which flutter",$))return m("Flutter Tests","skip","Flutter not available");if(S$("flutter test 2>&1",$)?.includes("All tests passed"))return m("Flutter Tests","pass","All tests pass");return m("Flutter Tests","fail","Tests failed")}function AO($){let I=n4($,".agents","results");if(J6(I))try{let u=bO(I).filter((U)=>U.startsWith("plan-")&&U.endsWith(".json")).sort().reverse();if(u.length>0)return n4(I,u[0])}catch{}let _=n4($,".agents","plan.json");return J6(_)?_:null}function IC($){let I=AO($);if(!I)return m("PM Plan","warn","No plan file found");try{return JSON.parse(bX(I,"utf-8")),m("PM Plan","pass","Valid JSON")}catch{return m("PM Plan","fail","Invalid JSON")}}function UC($,I){let _=[];switch($){case"backend":_.push(pE(I)),_.push(oE(I)),_.push(RO(I));break;case"frontend":_.push(tE(I)),_.push(aE(I)),_.push(eE(I)),_.push(PO(I));break;case"mobile":_.push(sE(I)),_.push($C(I));break;case"qa":_.push(m("QA Report","pass","Verified by self-check.md"));break;case"debug":if(J6(n4(I,"pyproject.toml")))_.push(RO(I));else if(J6(n4(I,"package.json")))_.push(PO(I));else _.push(m("Debug Tests","skip","No test runner detected"));break;case"pm":_.push(IC(I));break}return _}async function jO($,I,_=!1){let u=$.toLowerCase();if(!WO.includes(u)){let Q=`Invalid agent type: ${$}. Valid types: ${WO.join(", ")}`;if(_)console.log(JSON.stringify({ok:!1,error:Q}));else a.error(Q);process.exit(2)}let U=I||process.cwd();if(!J6(U)){let Q=`Workspace not found: ${U}`;if(_)console.log(JSON.stringify({ok:!1,error:Q}));else a.error(Q);process.exit(2)}let z=[];z.push(nE(U,u)),z.push(hE(U,u)),z.push(dE(U)),z.push(cE(U)),z.push(...UC(u,U));let J=z.filter((Q)=>Q.status==="pass").length,G=z.filter((Q)=>Q.status==="fail").length,g=z.filter((Q)=>Q.status==="warn").length,q={ok:G===0,agent:u,workspace:U,checks:z,summary:{passed:J,failed:G,warned:g}};if(_)console.log(JSON.stringify(q,null,2)),process.exit(G>0?1:0);console.clear(),D$(m$.default.bgCyan(m$.default.white(` \uD83D\uDD0D Verify: ${u} agent `))),y(m$.default.dim(U),"Workspace");let N=["┌────────────────────────────┬────────┬─────────────────────────────┐",`│ ${m$.default.bold("Check")} │ ${m$.default.bold("Status")} │ ${m$.default.bold("Details")} │`,"├────────────────────────────┼────────┼─────────────────────────────┤",...z.map((Q)=>{let H;switch(Q.status){case"pass":H=m$.default.green("PASS");break;case"fail":H=m$.default.red("FAIL");break;case"warn":H=m$.default.yellow("WARN");break;default:H=m$.default.dim("SKIP")}let Y=Q.name.padEnd(26),v=H.padEnd(6),O=(Q.message||"-").slice(0,27).padEnd(27);return`│ ${Y} │ ${v} │ ${O} │`}),"└────────────────────────────┴────────┴─────────────────────────────┘"].join(`
|
|
468
|
+
`);console.log(N),console.log();let X=`${m$.default.green(`${J} passed`)}, ${m$.default.red(`${G} failed`)}, ${m$.default.yellow(`${g} warnings`)}`;if(G>0)o(m$.default.red(`❌ Verification failed: ${X}`)),process.exit(1);o(m$.default.green(`✅ Verification passed: ${X}`)),process.exit(0)}var M$=H$(b$(),1);import{existsSync as _C,readdirSync as FO,readFileSync as uC}from"node:fs";import{join as R4}from"node:path";var SO=Object.fromEntries(Object.entries(T4).map(([$,I])=>[$,I.map((_)=>_.name)])),zC={"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 AX($){let I=new Set;for(let _ of $.matchAll(/_shared\/((?:[a-z][a-z0-9_-]*\/)*[a-z][a-z0-9_-]*)(?:\.md)?(?=[`)\s/}]|$)/gi))if(_[1])I.add(_[1]);return[...I]}function Au($){try{return uC($,"utf-8")}catch{return""}}function jX($){try{return FO($).filter((I)=>!I.startsWith("."))}catch{return[]}}function JC($){try{return FO($,{withFileTypes:!0}).filter((I)=>!I.name.startsWith("."))}catch{return[]}}function wO($,I=""){let _=[];for(let u of JC($)){let U=I?`${I}/${u.name}`:u.name;if(u.isDirectory()){_.push({path:U,isDirectory:!0}),_.push(...wO(R4($,u.name),U));continue}if(!u.name.endsWith(".md"))continue;_.push({path:U.replace(/\.md$/,""),isDirectory:!1})}return _}function EO($){let I=[{id:"root",label:"oh-my-agent",category:"root"}],_=new Set,u=[];function U(X,Q,H){let Y=`${X}|${Q}`;if(_.has(Y))return;_.add(Y),u.push({from:X,to:Q,type:H})}let z=R4($,".agents","skills");for(let[X,Q]of Object.entries(SO))for(let H of Q){let Y=R4(z,H);if(!_C(Y))continue;let v=`skill:${H}`;I.push({id:v,label:H,category:"skill",group:"Skills",subgroup:X});let O=[Au(R4(Y,"SKILL.md")),Au(R4(Y,"resources","execution-protocol.md"))].join(`
|
|
469
|
+
`);for(let T of AX(O))U(v,`shared:${T}`,"references")}let J=R4($,".agents","workflows");for(let X of jX(J).filter((Q)=>Q.endsWith(".md"))){let Q=X.replace(".md",""),H=`workflow:${Q}`;I.push({id:H,label:Q,category:"workflow",group:"Workflows"});for(let Y of AX(Au(R4(J,X))))U(H,`shared:${Y}`,"references")}let G=R4(z,"_shared");for(let X of wO(G)){let Q=`shared:${X.path}`;if(I.push({id:Q,label:X.path,category:"shared",group:"Shared"}),!X.isDirectory){for(let H of AX(Au(R4(G,`${X.path}.md`))))if(H!==X.path)U(Q,`shared:${H}`,"references")}}let g=R4($,".claude","agents");for(let X of jX(g).filter((Q)=>Q.endsWith(".md"))){let Q=X.replace(".md",""),H=`agent:${Q}`;I.push({id:H,label:Q,category:"agent",group:"Claude Agents"});let Y=zC[Q];if(Y)U(H,`skill:${Y}`,"implements")}let q=R4($,".serena","memories");for(let X of jX(q).filter((Q)=>Q.endsWith(".md")))I.push({id:`memory:${X.replace(".md","")}`,label:X.replace(".md",""),category:"memory",group:"Serena Memories"});let N=new Set(I.map((X)=>X.id));return{nodes:I,edges:u.filter((X)=>N.has(X.from)&&N.has(X.to))}}var GC={root:($)=>M$.default.bold(M$.default.white($)),skill:M$.default.green,workflow:M$.default.blue,shared:M$.default.yellow,agent:M$.default.magenta,memory:M$.default.cyan};function g4($,I){return(GC[I]??M$.default.white)($)}function h4(...$){let I=$.sort((U,z)=>U[0]-z[0]),_="",u=0;for(let[U,z,J]of I){if(U>u)_+=" ".repeat(U-u);_+=z,u=U+J}return _}function gC($){let I=[],_=$.nodes.filter((j)=>j.category==="skill").length,u=$.nodes.filter((j)=>j.category==="workflow").length,U=$.nodes.filter((j)=>j.category==="shared").length,z=$.nodes.filter((j)=>j.category==="agent").length,J=$.nodes.filter((j)=>j.category==="memory").length,G=$.edges.filter((j)=>j.from.startsWith("skill:")&&j.to.startsWith("shared:")).length,g=$.edges.filter((j)=>j.from.startsWith("workflow:")&&j.to.startsWith("shared:")).length,q=$.edges.filter((j)=>j.type==="implements").length,N=$.edges.filter((j)=>j.from.startsWith("shared:")&&j.to.startsWith("shared:")).length,X=`Skills (${_})`,Q=`Workflows (${u})`,H=`Shared (${U})`,Y=`Agents (${z})`,v=`Memories (${J})`,O=10,T=29,V=48,W=19;I.push(h4([24,g4("oh-my-agent","root"),11])),I.push(h4([29,"│",1]));let K=Array(49).fill(" ");K[10]="┌",K[29]="┼",K[48]="┐";for(let j=11;j<48;j++)if(j!==29)K[j]="─";I.push(K.join("")),I.push(h4([10,"▼",1],[29,"▼",1],[48,"▼",1])),I.push(h4([10-(X.length>>1),g4(X,"skill"),X.length],[29-(Q.length>>1),g4(Q,"workflow"),Q.length],[48-(v.length>>1),g4(v,"memory"),v.length])),I.push(h4([10,"│",1],[29,"│",1]));let D=`${G} refs`,Z=`${g} refs`;I.push(h4([10-(D.length>>1),M$.default.dim(D),D.length],[29-(Z.length>>1),M$.default.dim(Z),Z.length])),I.push(h4([10,"│",1],[29,"│",1]));let B=Array(30).fill(" ");B[10]="└",B[19]="┬",B[29]="┘";for(let j=11;j<29;j++)if(j!==19)B[j]="─";I.push(B.join("")),I.push(h4([19,"▼",1]));let L=19-(H.length>>1),A=h4([L,g4(H,"shared"),H.length]);if(N>0)A+=` ${M$.default.dim(`◂── ${N} internal`)}`;I.push(A),I.push("");let C=10-(Y.length>>1),x=`──[${q} implements]──▸`;return I.push(h4([C,g4(Y,"agent"),Y.length])+` ${M$.default.dim(x)} ${g4("Skills","skill")}`),I}function CO($){let I=[];I.push(...gC($)),I.push(""),I.push(M$.default.dim("─".repeat(56))),I.push("");let _=new Map,u=new Map;for(let X of $.edges){if(!_.has(X.from))_.set(X.from,[]);if(_.get(X.from)?.push(X),X.to.startsWith("shared:"))u.set(X.to,(u.get(X.to)??0)+1)}function U(X){let Q=_.get(X);if(!Q?.length)return"";let H=Q.map((v)=>$.nodes.find((O)=>O.id===v.to)?.label.replace(/\.md$/,"")??v.to.split(":")[1]),Y=H.length>4?`${H.slice(0,3).join(", ")} +${H.length-3}`:H.join(", ");return` ${M$.default.dim("──▸")} ${M$.default.dim(Y)}`}let z=$.nodes.filter((X)=>X.category==="skill"),J=Object.keys(SO);I.push(M$.default.bold(`Skills (${z.length})`));for(let X=0;X<J.length;X++){let Q=J[X],H=z.filter((O)=>O.subgroup===Q);if(!H.length)continue;let Y=X===J.length-1;I.push(`${Y?"└─":"├─"} ${M$.default.dim(Q)}`);let v=Y?" ":"│ ";for(let O of H){let T=O===H.at(-1)?"└─":"├─";I.push(`${v}${T} ${g4(O.label,"skill")}${U(O.id)}`)}}I.push("");let G=$.nodes.filter((X)=>X.category==="workflow");I.push(M$.default.bold(`Workflows (${G.length})`));for(let X of G){let Q=X===G.at(-1)?"└─":"├─";I.push(`${Q} ${g4(X.label,"workflow")}${U(X.id)}`)}I.push("");let g=[...$.nodes.filter((X)=>X.category==="shared")].sort((X,Q)=>(u.get(Q.id)??0)-(u.get(X.id)??0));I.push(M$.default.bold(`Shared (${g.length})`));for(let X of g){let Q=X===g.at(-1)?"└─":"├─",H=u.get(X.id)??0,Y=H>0?M$.default.dim(` (${H} refs)`):"";I.push(`${Q} ${g4(X.label,"shared")}${Y}${U(X.id)}`)}I.push("");let q=$.nodes.filter((X)=>X.category==="agent");I.push(M$.default.bold(`Claude Agents (${q.length})`));for(let X of q){let Q=X===q.at(-1)?"└─":"├─",H=$.edges.find((v)=>v.from===X.id&&v.type==="implements"),Y=H?` ${M$.default.dim("──▸")} ${g4(H.to.split(":")[1]??"","skill")}`:"";I.push(`${Q} ${g4(X.label,"agent")}${Y}`)}I.push("");let N=$.nodes.filter((X)=>X.category==="memory");if(I.push(M$.default.bold(`Serena Memories (${N.length})`)),!N.length)I.push(`└─ ${M$.default.dim("(none)")}`);else for(let X of N){let Q=X===N.at(-1)?"└─":"├─";I.push(`${Q} ${g4(X.label,"memory")}`)}return I.join(`
|
|
470
|
+
`)}async function fO($){let I=EO(process.cwd());if($.json){console.log(JSON.stringify(I,null,2));return}console.log(CO(I))}import{existsSync as Zx,mkdirSync as Wx,readdirSync as NU,readFileSync as Rx,statSync as z5}from"node:fs";import{createServer as Px}from"node:http";import{basename as qB,join as A4}from"node:path";import{EventEmitter as kC}from"node:events";import{stat as yC,Stats as Nd}from"node:fs";import{readdir as iC,stat as lC}from"node:fs/promises";import*as e from"node:path";import{lstat as xO,readdir as qC,realpath as XC,stat as NC}from"node:fs/promises";import{join as QC,relative as vC,resolve as kO,sep as HC}from"node:path";import{Readable as YC}from"node:stream";var q4={FILE_TYPE:"files",DIR_TYPE:"directories",FILE_DIR_TYPE:"files_directories",EVERYTHING_TYPE:"all"},FX={root:".",fileFilter:($)=>!0,directoryFilter:($)=>!0,type:q4.FILE_TYPE,lstat:!1,depth:2147483648,alwaysStat:!1,highWaterMark:4096};Object.freeze(FX);var mO="READDIRP_RECURSIVE_ERROR",OC=new Set(["ENOENT","EPERM","EACCES","ELOOP",mO]),yO=[q4.DIR_TYPE,q4.EVERYTHING_TYPE,q4.FILE_DIR_TYPE,q4.FILE_TYPE],TC=new Set([q4.DIR_TYPE,q4.EVERYTHING_TYPE,q4.FILE_DIR_TYPE]),BC=new Set([q4.EVERYTHING_TYPE,q4.FILE_DIR_TYPE,q4.FILE_TYPE]),MC=($)=>OC.has($.code),KC=process.platform==="win32",iO=($)=>!0,lO=($)=>{if($===void 0)return iO;if(typeof $==="function")return $;if(typeof $==="string"){let I=$.trim();return(_)=>_.basename===I}if(Array.isArray($)){let I=$.map((_)=>_.trim());return(_)=>I.some((u)=>_.basename===u)}return iO};class SX extends YC{parents;reading;parent;_stat;_maxDepth;_wantsDir;_wantsFile;_wantsEverything;_root;_isDirent;_statsProp;_rdOptions;_fileFilter;_directoryFilter;constructor($={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:$.highWaterMark});let I={...FX,...$},{root:_,type:u}=I;this._fileFilter=lO(I.fileFilter),this._directoryFilter=lO(I.directoryFilter);let U=I.lstat?xO:NC;if(KC)this._stat=(z)=>U(z,{bigint:!0});else this._stat=U;this._maxDepth=I.depth!=null&&Number.isSafeInteger(I.depth)?I.depth:FX.depth,this._wantsDir=u?TC.has(u):!1,this._wantsFile=u?BC.has(u):!1,this._wantsEverything=u===q4.EVERYTHING_TYPE,this._root=kO(_),this._isDirent=!I.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(_,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,_=I&&I.files;if(_&&_.length>0){let{path:u,depth:U}=I,z=_.splice(0,$).map((G)=>this._formatEntry(G,u)),J=await Promise.all(z);for(let G of J){if(!G)continue;if(this.destroyed)return;let g=await this._getEntryType(G);if(g==="directory"&&this._directoryFilter(G)){if(U<=this._maxDepth)this.parents.push(this._exploreDir(G.fullPath,U+1));if(this._wantsDir)this.push(G),$--}else if((g==="file"||this._includeAsFile(G))&&this._fileFilter(G)){if(this._wantsFile)this.push(G),$--}}}else{let u=this.parents.pop();if(!u){this.push(null);break}if(this.parent=await u,this.destroyed)return}}}catch(I){this.destroy(I)}finally{this.reading=!1}}async _exploreDir($,I){let _;try{_=await qC($,this._rdOptions)}catch(u){this._onError(u)}return{files:_,depth:I,path:$}}async _formatEntry($,I){let _,u=this._isDirent?$.name:$;try{let U=kO(QC(I,u));_={path:vC(this._root,U),fullPath:U,basename:u},_[this._statsProp]=this._isDirent?$:await this._stat(U)}catch(U){this._onError(U);return}return _}_onError($){if(MC($)&&!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 _=$.fullPath;try{let u=await XC(_),U=await xO(u);if(U.isFile())return"file";if(U.isDirectory()){let z=u.length;if(_.startsWith(u)&&_.substr(z,1)===HC){let J=Error(`Circular symlink detected: "${_}" points to "${u}"`);return J.code=mO,this._onError(J)}return"directory"}}catch(u){return this._onError(u),""}}}_includeAsFile($){let I=$&&$[this._statsProp];return I&&this._wantsEverything&&!I.isDirectory()}}function rO($,I={}){let _=I.entryType||I.type;if(_==="both")_=q4.FILE_DIR_TYPE;if(_)I.type=_;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(_&&!yO.includes(_))throw Error(`readdirp: Invalid type passed. Use one of ${yO.join(", ")}`);return I.root=$,new SX(I)}import{watch as DC,unwatchFile as nO,watchFile as LC}from"node:fs";import{realpath as wX,lstat as VC,open as ZC,stat as dO}from"node:fs/promises";import{type as WC}from"node:os";import*as L$ from"node:path";var RC="data",fX="end",cO="close",wu=()=>{};var Eu=process.platform,xX=Eu==="win32",PC=Eu==="darwin",bC=Eu==="linux",AC=Eu==="freebsd",pO=WC()==="OS400",K$={ALL:"all",READY:"ready",ADD:"add",CHANGE:"change",ADD_DIR:"addDir",UNLINK:"unlink",UNLINK_DIR:"unlinkDir",RAW:"raw",ERROR:"error"},P4=K$,jC="watch",FC={lstat:VC,stat:dO},K1="listeners",ju="errHandlers",Z0="rawEmitters",SC=[K1,ju,Z0],wC=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"]),EC=($)=>wC.has(L$.extname($).slice(1).toLowerCase()),CX=($,I)=>{if($ instanceof Set)$.forEach(I);else I($)},IU=($,I,_)=>{let u=$[I];if(!(u instanceof Set))$[I]=u=new Set([u]);u.add(_)},CC=($)=>(I)=>{let _=$[I];if(_ instanceof Set)_.clear();else delete $[I]},UU=($,I,_)=>{let u=$[I];if(u instanceof Set)u.delete(_);else if(u===_)delete $[I]},oO=($)=>$ instanceof Set?$.size===0:!$,Fu=new Map;function hO($,I,_,u,U){let z=(J,G)=>{if(_($),U(J,G,{watchedPath:$}),G&&$!==G)Su(L$.resolve($,G),K1,L$.join($,G))};try{return DC($,{persistent:I.persistent},z)}catch(J){u(J);return}}var Su=($,I,_,u,U)=>{let z=Fu.get($);if(!z)return;CX(z[I],(J)=>{J(_,u,U)})},fC=($,I,_,u)=>{let{listener:U,errHandler:z,rawEmitter:J}=u,G=Fu.get(I),g;if(!_.persistent){if(g=hO($,_,U,z,J),!g)return;return g.close.bind(g)}if(G)IU(G,K1,U),IU(G,ju,z),IU(G,Z0,J);else{if(g=hO($,_,Su.bind(null,I,K1),z,Su.bind(null,I,Z0)),!g)return;g.on(P4.ERROR,async(q)=>{let N=Su.bind(null,I,ju);if(G)G.watcherUnusable=!0;if(xX&&q.code==="EPERM")try{await(await ZC($,"r")).close(),N(q)}catch(X){}else N(q)}),G={listeners:U,errHandlers:z,rawEmitters:J,watcher:g},Fu.set(I,G)}return()=>{if(UU(G,K1,U),UU(G,ju,z),UU(G,Z0,J),oO(G.listeners))G.watcher.close(),Fu.delete(I),SC.forEach(CC(G)),G.watcher=void 0,Object.freeze(G)}},EX=new Map,xC=($,I,_,u)=>{let{listener:U,rawEmitter:z}=u,J=EX.get(I),G=J&&J.options;if(G&&(G.persistent<_.persistent||G.interval>_.interval))nO(I),J=void 0;if(J)IU(J,K1,U),IU(J,Z0,z);else J={listeners:U,rawEmitters:z,options:_,watcher:LC(I,_,(g,q)=>{CX(J.rawEmitters,(X)=>{X(P4.CHANGE,I,{curr:g,prev:q})});let N=g.mtimeMs;if(g.size!==q.size||N>q.mtimeMs||N===0)CX(J.listeners,(X)=>X($,g))})},EX.set(I,J);return()=>{if(UU(J,K1,U),UU(J,Z0,z),oO(J.listeners))EX.delete(I),nO(I),J.options=J.watcher=void 0,Object.freeze(J)}};class kX{fsw;_boundHandleError;constructor($){this.fsw=$,this._boundHandleError=(I)=>$._handleError(I)}_watchWithNodeFs($,I){let _=this.fsw.options,u=L$.dirname($),U=L$.basename($);this.fsw._getWatchedDir(u).add(U);let J=L$.resolve($),G={persistent:_.persistent};if(!I)I=wu;let g;if(_.usePolling){let q=_.interval!==_.binaryInterval;G.interval=q&&EC(U)?_.binaryInterval:_.interval,g=xC($,J,G,{listener:I,rawEmitter:this.fsw._emitRaw})}else g=fC($,J,G,{listener:I,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw});return g}_handleFile($,I,_){if(this.fsw.closed)return;let u=L$.dirname($),U=L$.basename($),z=this.fsw._getWatchedDir(u),J=I;if(z.has(U))return;let G=async(q,N)=>{if(!this.fsw._throttle(jC,$,5))return;if(!N||N.mtimeMs===0)try{let X=await dO($);if(this.fsw.closed)return;let{atimeMs:Q,mtimeMs:H}=X;if(!Q||Q<=H||H!==J.mtimeMs)this.fsw._emit(P4.CHANGE,$,X);if((PC||bC||AC)&&J.ino!==X.ino){this.fsw._closeFile(q),J=X;let Y=this._watchWithNodeFs($,G);if(Y)this.fsw._addPathCloser(q,Y)}else J=X}catch(X){this.fsw._remove(u,U)}else if(z.has(U)){let{atimeMs:X,mtimeMs:Q}=N;if(!X||X<=Q||Q!==J.mtimeMs)this.fsw._emit(P4.CHANGE,$,N);J=N}},g=this._watchWithNodeFs($,G);if(!(_&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored($)){if(!this.fsw._throttle(P4.ADD,$,0))return;this.fsw._emit(P4.ADD,$,I)}return g}async _handleSymlink($,I,_,u){if(this.fsw.closed)return;let U=$.fullPath,z=this.fsw._getWatchedDir(I);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let J;try{J=await wX(_)}catch(G){return this.fsw._emitReady(),!0}if(this.fsw.closed)return;if(z.has(u)){if(this.fsw._symlinkPaths.get(U)!==J)this.fsw._symlinkPaths.set(U,J),this.fsw._emit(P4.CHANGE,_,$.stats)}else z.add(u),this.fsw._symlinkPaths.set(U,J),this.fsw._emit(P4.ADD,_,$.stats);return this.fsw._emitReady(),!0}if(this.fsw._symlinkPaths.has(U))return!0;this.fsw._symlinkPaths.set(U,!0)}_handleRead($,I,_,u,U,z,J){$=L$.join($,"");let G=u?`${$}:${u}`:$;if(J=this.fsw._throttle("readdir",G,1000),!J)return;let g=this.fsw._getWatchedDir(_.path),q=new Set,N=this.fsw._readdirp($,{fileFilter:(X)=>_.filterPath(X),directoryFilter:(X)=>_.filterDir(X)});if(!N)return;return N.on(RC,async(X)=>{if(this.fsw.closed){N=void 0;return}let Q=X.path,H=L$.join($,Q);if(q.add(Q),X.stats.isSymbolicLink()&&await this._handleSymlink(X,$,H,Q))return;if(this.fsw.closed){N=void 0;return}if(Q===u||!u&&!g.has(Q))this.fsw._incrReadyCount(),H=L$.join(U,L$.relative(U,H)),this._addToNodeFs(H,I,_,z+1)}).on(P4.ERROR,this._boundHandleError),new Promise((X,Q)=>{if(!N)return Q();N.once(fX,()=>{if(this.fsw.closed){N=void 0;return}let H=J?J.clear():!1;if(X(void 0),g.getChildren().filter((Y)=>{return Y!==$&&!q.has(Y)}).forEach((Y)=>{this.fsw._remove($,Y)}),N=void 0,H)this._handleRead($,!1,_,u,U,z,J)})})}async _handleDir($,I,_,u,U,z,J){let G=this.fsw._getWatchedDir(L$.dirname($)),g=G.has(L$.basename($));if(!(_&&this.fsw.options.ignoreInitial)&&!U&&!g)this.fsw._emit(P4.ADD_DIR,$,I);G.add(L$.basename($)),this.fsw._getWatchedDir($);let q,N,X=this.fsw.options.depth;if((X==null||u<=X)&&!this.fsw._symlinkPaths.has(J)){if(!U){if(await this._handleRead($,_,z,U,$,u,q),this.fsw.closed)return}N=this._watchWithNodeFs($,(Q,H)=>{if(H&&H.mtimeMs===0)return;this._handleRead(Q,!1,z,U,$,u,q)})}return N}async _addToNodeFs($,I,_,u,U){let z=this.fsw._emitReady;if(this.fsw._isIgnored($)||this.fsw.closed)return z(),!1;let J=this.fsw._getWatchHelpers($);if(_)J.filterPath=(G)=>_.filterPath(G),J.filterDir=(G)=>_.filterDir(G);try{let G=await FC[J.statMethod](J.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(J.watchPath,G))return z(),!1;let g=this.fsw.options.followSymlinks,q;if(G.isDirectory()){let N=L$.resolve($),X=g?await wX($):$;if(this.fsw.closed)return;if(q=await this._handleDir(J.watchPath,G,I,u,U,J,X),this.fsw.closed)return;if(N!==X&&X!==void 0)this.fsw._symlinkPaths.set(N,X)}else if(G.isSymbolicLink()){let N=g?await wX($):$;if(this.fsw.closed)return;let X=L$.dirname(J.watchPath);if(this.fsw._getWatchedDir(X).add(J.watchPath),this.fsw._emit(P4.ADD,J.watchPath,G),q=await this._handleDir(X,G,I,u,$,J,N),this.fsw.closed)return;if(N!==void 0)this.fsw._symlinkPaths.set(L$.resolve($),N)}else q=this._handleFile(J.watchPath,G,I);if(z(),q)this.fsw._addPathCloser($,q);return!1}catch(G){if(this.fsw._handleError(G))return z(),$}}}/*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */var yX="/",mC="//",$T=".",rC="..",nC="string",hC=/\\/g,IT=/\/\//g,dC=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,cC=/^\.[/\\]/;function Cu($){return Array.isArray($)?$:[$]}var iX=($)=>typeof $==="object"&&$!==null&&!($ instanceof RegExp);function pC($){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 _=e.relative($.path,I);if(!_)return!1;return!_.startsWith("..")&&!e.isAbsolute(_)}return!1};return()=>!1}function oC($){if(typeof $!=="string")throw Error("string expected");$=e.normalize($),$=$.replace(/\\/g,"/");let I=!1;if($.startsWith("//"))I=!0;if($=$.replace(IT,"/"),I)$="/"+$;return $}function tO($,I,_){let u=oC(I);for(let U=0;U<$.length;U++){let z=$[U];if(z(u,_))return!0}return!1}function tC($,I){if($==null)throw TypeError("anymatch: specify first argument");let u=Cu($).map((U)=>pC(U));if(I==null)return(U,z)=>{return tO(u,U,z)};return tO(u,I)}var aO=($)=>{let I=Cu($).flat();if(!I.every((_)=>typeof _===nC))throw TypeError(`Non-string provided as watch path: ${I}`);return I.map(UT)},eO=($)=>{let I=$.replace(hC,yX),_=!1;if(I.startsWith(mC))_=!0;if(I=I.replace(IT,yX),_)I=yX+I;return I},UT=($)=>eO(e.normalize(eO($))),sO=($="")=>(I)=>{if(typeof I==="string")return UT(e.isAbsolute(I)?I:e.join($,I));else return I},aC=($,I)=>{if(e.isAbsolute($))return $;return e.join(I,$)},eC=Object.freeze(new Set);class _T{path;_removeWatcher;items;constructor($,I){this.path=$,this._removeWatcher=I,this.items=new Set}add($){let{items:I}=this;if(!I)return;if($!==$T&&$!==rC)I.add($)}async remove($){let{items:I}=this;if(!I)return;if(I.delete($),I.size>0)return;let _=this.path;try{await iC(_)}catch(u){if(this._removeWatcher)this._removeWatcher(e.dirname(_),e.basename(_))}}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=wu,this.items=eC,Object.freeze(this)}}var sC="stat",$f="lstat";class uT{fsw;path;watchPath;fullWatchPath;dirParts;followSymlinks;statMethod;constructor($,I,_){this.fsw=_;let u=$;this.path=$=$.replace(cC,""),this.watchPath=u,this.fullWatchPath=e.resolve(u),this.dirParts=[],this.dirParts.forEach((U)=>{if(U.length>1)U.pop()}),this.followSymlinks=I,this.statMethod=I?sC:$f}entryPath($){return e.join(this.watchPath,e.relative(this.watchPath,$.fullPath))}filterPath($){let{stats:I}=$;if(I&&I.isSymbolicLink())return this.filterDir($);let _=this.entryPath($);return this.fsw._isntIgnored(_,I)&&this.fsw._hasReadPermissions(I)}filterDir($){return this.fsw._isntIgnored(this.entryPath($),$.stats)}}class zT extends kC{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,_={stabilityThreshold:2000,pollInterval:100},u={persistent:!0,ignoreInitial:!1,ignorePermissionErrors:!1,interval:100,binaryInterval:300,followSymlinks:!0,usePolling:!1,atomic:!0,...$,ignored:$.ignored?Cu($.ignored):Cu([]),awaitWriteFinish:I===!0?_:typeof I==="object"?{..._,...I}:!1};if(pO)u.usePolling=!0;if(u.atomic===void 0)u.atomic=!u.usePolling;let U=process.env.CHOKIDAR_USEPOLLING;if(U!==void 0){let G=U.toLowerCase();if(G==="false"||G==="0")u.usePolling=!1;else if(G==="true"||G==="1")u.usePolling=!0;else u.usePolling=!!G}let z=process.env.CHOKIDAR_INTERVAL;if(z)u.interval=Number.parseInt(z,10);let J=0;this._emitReady=()=>{if(J++,J>=this._readyCount)this._emitReady=wu,this._readyEmitted=!0,process.nextTick(()=>this.emit(K$.READY))},this._emitRaw=(...G)=>this.emit(K$.RAW,...G),this._boundRemove=this._remove.bind(this),this.options=u,this._nodeFsHandler=new kX(this),Object.freeze(u)}_addIgnoredPath($){if(iX($)){for(let I of this._ignoredPaths)if(iX(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(iX(I)&&I.path===$)this._ignoredPaths.delete(I)}}add($,I,_){let{cwd:u}=this.options;this.closed=!1,this._closePromise=void 0;let U=aO($);if(u)U=U.map((z)=>{return aC(z,u)});if(U.forEach((z)=>{this._removeIgnoredPath(z)}),this._userIgnored=void 0,!this._readyCount)this._readyCount=0;return this._readyCount+=U.length,Promise.all(U.map(async(z)=>{let J=await this._nodeFsHandler._addToNodeFs(z,!_,void 0,0,I);if(J)this._emitReady();return J})).then((z)=>{if(this.closed)return;z.forEach((J)=>{if(J)this.add(e.dirname(J),e.basename(I||J))})}),this}unwatch($){if(this.closed)return this;let I=aO($),{cwd:_}=this.options;return I.forEach((u)=>{if(!e.isAbsolute(u)&&!this._closers.has(u)){if(_)u=e.join(_,u);u=e.resolve(u)}if(this._closePath(u),this._addIgnoredPath(u),this._watched.has(u))this._addIgnoredPath({path:u,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((_)=>{let u=_();if(u instanceof Promise)$.push(u)})),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,_)=>{let U=(this.options.cwd?e.relative(this.options.cwd,_):_)||$T;$[U]=I.getChildren().sort()}),$}emitWithAll($,I){if(this.emit($,...I),$!==K$.ERROR)this.emit(K$.ALL,$,...I)}async _emit($,I,_){if(this.closed)return;let u=this.options;if(xX)I=e.normalize(I);if(u.cwd)I=e.relative(u.cwd,I);let U=[I];if(_!=null)U.push(_);let z=u.awaitWriteFinish,J;if(z&&(J=this._pendingWrites.get(I)))return J.lastChange=new Date,this;if(u.atomic){if($===K$.UNLINK)return this._pendingUnlinks.set(I,[$,...U]),setTimeout(()=>{this._pendingUnlinks.forEach((G,g)=>{this.emit(...G),this.emit(K$.ALL,...G),this._pendingUnlinks.delete(g)})},typeof u.atomic==="number"?u.atomic:100),this;if($===K$.ADD&&this._pendingUnlinks.has(I))$=K$.CHANGE,this._pendingUnlinks.delete(I)}if(z&&($===K$.ADD||$===K$.CHANGE)&&this._readyEmitted){let G=(g,q)=>{if(g)$=K$.ERROR,U[0]=g,this.emitWithAll($,U);else if(q){if(U.length>1)U[1]=q;else U.push(q);this.emitWithAll($,U)}};return this._awaitWriteFinish(I,z.stabilityThreshold,$,G),this}if($===K$.CHANGE){if(!this._throttle(K$.CHANGE,I,50))return this}if(u.alwaysStat&&_===void 0&&($===K$.ADD||$===K$.ADD_DIR||$===K$.CHANGE)){let G=u.cwd?e.join(u.cwd,I):I,g;try{g=await lC(G)}catch(q){}if(!g||this.closed)return;U.push(g)}return this.emitWithAll($,U),this}_handleError($){let I=$&&$.code;if($&&I!=="ENOENT"&&I!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||I!=="EPERM"&&I!=="EACCES"))this.emit(K$.ERROR,$);return $||this.closed}_throttle($,I,_){if(!this._throttled.has($))this._throttled.set($,new Map);let u=this._throttled.get($);if(!u)throw Error("invalid throttle");let U=u.get(I);if(U)return U.count++,!1;let z,J=()=>{let g=u.get(I),q=g?g.count:0;if(u.delete(I),clearTimeout(z),g)clearTimeout(g.timeoutObject);return q};z=setTimeout(J,_);let G={timeoutObject:z,clear:J,count:0};return u.set(I,G),G}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish($,I,_,u){let U=this.options.awaitWriteFinish;if(typeof U!=="object")return;let z=U.pollInterval,J,G=$;if(this.options.cwd&&!e.isAbsolute($))G=e.join(this.options.cwd,$);let g=new Date,q=this._pendingWrites;function N(X){yC(G,(Q,H)=>{if(Q||!q.has($)){if(Q&&Q.code!=="ENOENT")u(Q);return}let Y=Number(new Date);if(X&&H.size!==X.size)q.get($).lastChange=Y;let v=q.get($);if(Y-v.lastChange>=I)q.delete($),u(void 0,H);else J=setTimeout(N,z,H)})}if(!q.has($))q.set($,{lastChange:g,cancelWait:()=>{return q.delete($),clearTimeout(J),_}}),J=setTimeout(N,z)}_isIgnored($,I){if(this.options.atomic&&dC.test($))return!0;if(!this._userIgnored){let{cwd:_}=this.options,U=(this.options.ignored||[]).map(sO(_)),J=[...[...this._ignoredPaths].map(sO(_)),...U];this._userIgnored=tC(J,void 0)}return this._userIgnored($,I)}_isntIgnored($,I){return!this._isIgnored($,I)}_getWatchHelpers($){return new uT($,this.options.followSymlinks,this)}_getWatchedDir($){let I=e.resolve($);if(!this._watched.has(I))this._watched.set(I,new _T(I,this._boundRemove));return this._watched.get(I)}_hasReadPermissions($){if(this.options.ignorePermissionErrors)return!0;return Boolean(Number($.mode)&256)}_remove($,I,_){let u=e.join($,I),U=e.resolve(u);if(_=_!=null?_:this._watched.has(u)||this._watched.has(U),!this._throttle("remove",u,100))return;if(!_&&this._watched.size===1)this.add($,I,!0);this._getWatchedDir(u).getChildren().forEach((X)=>this._remove(u,X));let G=this._getWatchedDir($),g=G.has(I);if(G.remove(I),this._symlinkPaths.has(U))this._symlinkPaths.delete(U);let q=u;if(this.options.cwd)q=e.relative(this.options.cwd,u);if(this.options.awaitWriteFinish&&this._pendingWrites.has(q)){if(this._pendingWrites.get(q).cancelWait()===K$.ADD)return}this._watched.delete(u),this._watched.delete(U);let N=_?K$.UNLINK_DIR:K$.UNLINK;if(g&&!this._isIgnored(u))this._emit(N,u);this._closePath(u)}_closePath($){this._closeFile($);let I=e.dirname($);this._getWatchedDir(I).remove(e.basename($))}_closeFile($){let I=this._closers.get($);if(!I)return;I.forEach((_)=>_()),this._closers.delete($)}_addPathCloser($,I){if(!I)return;let _=this._closers.get($);if(!_)_=[],this._closers.set($,_);_.push(I)}_readdirp($,I){if(this.closed)return;let _={type:K$.ALL,alwaysStat:!0,lstat:!0,...I,depth:0},u=rO($,_);return this._streams.add(u),u.once(cO,()=>{u=void 0}),u.once(fX,()=>{if(u)this._streams.delete(u),u=void 0}),u}}function fu($,I={}){let _=new zT(I);return _.add($),_}var S0=H$(b$(),1);var Dx=H$($B(),1),Lx=H$(dX(),1),Vx=H$(pX(),1),I5=H$(cu(),1),U5=H$(GB(),1);var gB=process.env.DASHBOARD_PORT?parseInt(process.env.DASHBOARD_PORT||"9847",10):9847;function bx(){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 QU($){try{return Rx($,"utf-8")}catch{return""}}function Ax($){try{let I=NU($);if(I.includes("orchestrator-session.md"))return A4($,"orchestrator-session.md");let _=I.filter((u)=>/^session-.*\.md$/.test(u)).map((u)=>({name:u,mtime:z5(A4($,u)).mtimeMs})).sort((u,U)=>U.mtime-u.mtime);if(_.length>0&&_[0])return A4($,_[0].name)}catch{}return null}function jx($){let I=Ax($);if(!I)return{id:"N/A",status:"UNKNOWN"};let _=QU(I);if(!_)return{id:"N/A",status:"UNKNOWN"};let u=(_.match(/session-id:\s*(.+)/i)||[])[1]||(_.match(/# Session:\s*(.+)/i)||[])[1]||_.match(/(session-\d{8}-\d{6})/)?.[1]||qB(I,".md")||"N/A",U="UNKNOWN";if(/IN PROGRESS|RUNNING|## Active|\[IN PROGRESS\]/i.test(_))U="RUNNING";else if(/COMPLETED|DONE|## Completed|\[COMPLETED\]/i.test(_))U="COMPLETED";else if(/FAILED|ERROR|## Failed|\[FAILED\]/i.test(_))U="FAILED";else if(/Step \d+:.*\[/i.test(_))U="RUNNING";return{id:u.trim(),status:U}}function Fx($){let I=QU(A4($,"task-board.md"));if(!I)return[];let _=[],u=I.split(`
|
|
471
|
+
`);for(let U of u){if(!U.startsWith("|")||/^\|\s*-+/.test(U))continue;let z=U.split("|").map((G)=>G.trim()).filter(Boolean),J=z[0];if(z.length<2||!J||/^agent$/i.test(J))continue;_.push({agent:z[0]||"",status:z[1]||"pending",task:z[2]||""})}return _}function u5($,I){try{let _=NU($).filter((z)=>z.startsWith(`progress-${I}`)&&z.endsWith(".md")).sort().reverse();if(_.length===0)return null;let U=(_[0]?QU(A4($,_[0])):"").match(/turn[:\s]*(\d+)/i);return U?.[1]?parseInt(U[1],10):null}catch{return null}}function Sx($){try{return NU($).filter((_)=>_.endsWith(".md")&&_!==".gitkeep").map((_)=>({name:_,mtime:z5(A4($,_)).mtimeMs})).sort((_,u)=>u.mtime-_.mtime).slice(0,5).map((_)=>{let u=_.name.replace(/^(progress|result|session|debug|task)-?/,"").replace(/[-_]agent/,"").replace(/[-_]completion/,"").replace(/\.md$/,"").replace(/[-_]/g," ").trim()||_.name.replace(/\.md$/,""),z=QU(A4($,_.name)).split(`
|
|
472
|
+
`).map((G)=>G.trim()).filter((G)=>G&&!G.startsWith("---")&&G.length>3),J="";for(let G=z.length-1;G>=0;G--){let g=z[G];if(!g)continue;if(/^\*\*|^#+|^-|^\d+\.|Status|Result|Action|Step/i.test(g)){if(J=g.replace(/^[#*\-\d.]+\s*/,"").replace(/\*\*/g,"").trim(),J.length>5)break}}if(J.length>80)J=`${J.substring(0,77)}...`;return{agent:u,message:J,file:_.name}}).filter((_)=>_.message)}catch{return[]}}function wx($){let I=[],_=new Set;try{let u=NU($).filter((U)=>U.endsWith(".md")&&U!==".gitkeep").map((U)=>({name:U,mtime:z5(A4($,U)).mtimeMs})).sort((U,z)=>z.mtime-U.mtime);for(let U of u){let z=QU(A4($,U.name)),J=z.match(/\*\*Agent\*\*:\s*(.+)/i)||z.match(/Agent:\s*(.+)/i)||z.match(/^#+\s*(.+?)\s*Agent/im),G=null;if(J?.[1])G=J[1].trim();else if(/_agent|agent_|-agent/i.test(U.name))G=U.name.replace(/\.md$/,"").replace(/[-_]completion|[-_]progress|[-_]result/gi,"").replace(/[-_]/g," ").trim();if(G&&!_.has(G.toLowerCase())){_.add(G.toLowerCase());let g="unknown";if(/\[COMPLETED\]|## Completed|## Results/i.test(z))g="completed";else if(/\[IN PROGRESS\]|## Progress|IN PROGRESS/i.test(z))g="running";else if(/\[FAILED\]|## Failed|ERROR/i.test(z))g="failed";let q=z.match(/## Task\s*\n+(.+)/i)||z.match(/\*\*Task\*\*:\s*(.+)/i),N=q?.[1]?q[1].trim().substring(0,60):"";I.push({agent:G,status:g,task:N,turn:u5($,G)})}}}catch{}return I}function _5($){let I=jx($),u=Fx($).map((U)=>({...U,turn:u5($,U.agent)}));if(u.length===0)u=wx($);if(u.length===0)try{let U=NU($).filter((z)=>z.startsWith("progress-")&&z.endsWith(".md"));for(let z of U){let J=z.replace(/^progress-/,"").replace(/\.md$/,"");u.push({agent:J,status:"running",task:"",turn:u5($,J)})}}catch{}return{session:I,agents:u,activity:Sx($),memoriesDir:$,updatedAt:new Date().toISOString()}}var Ex=`<!DOCTYPE html>
|
|
473
473
|
<html lang="en">
|
|
474
474
|
<head>
|
|
475
475
|
<meta charset="UTF-8">
|
|
@@ -526,15 +526,15 @@ source: migrated
|
|
|
526
526
|
fetch('/api/state').then(r=>r.json()).then(renderState).catch(()=>{});connect();
|
|
527
527
|
</script>
|
|
528
528
|
</body>
|
|
529
|
-
</html>`;function
|
|
530
|
-
Shutting down...`),z.close(),_.clients.forEach((
|
|
531
|
-
\uD83D\uDEF8 Serena Memory Dashboard`)),console.log(S0.white(` http://localhost:${
|
|
532
|
-
`))})}var
|
|
533
|
-
`);for(let U of u){if(!U.startsWith("|")||/^\|\s*-+/.test(U))continue;let z=U.split("|").map((q)=>q.trim()).filter(Boolean),
|
|
534
|
-
`).map((
|
|
535
|
-
\uD83D\uDEF8 Serena Terminal Dashboard`)),console.log(
|
|
536
|
-
`)),
|
|
537
|
-
`),I.close(),_(),process.exit(0)}),process.on("SIGTERM",()=>process.emit("SIGINT"))})}var
|
|
529
|
+
</html>`;function XB(){let $=bx();if(!Zx($))Wx($,{recursive:!0});let I=Px((J,G)=>{if(J.url==="/api/state")G.writeHead(200,{"Content-Type":"application/json"}),G.end(JSON.stringify(_5($)));else G.writeHead(200,{"Content-Type":"text/html"}),G.end(Ex)}),_=new U5.default({server:I}),u=null;function U(J,G){if(u)clearTimeout(u);u=setTimeout(()=>{let g=JSON.stringify({type:"update",event:J,file:G,data:_5($)});_.clients.forEach((q)=>{if(q.readyState===I5.default.OPEN)q.send(g)})},100)}let z=fu($,{persistent:!0,ignoreInitial:!0,awaitWriteFinish:{stabilityThreshold:200,pollInterval:50}});z.on("all",(J,G)=>U(J,qB(G))),_.on("connection",(J)=>{J.send(JSON.stringify({type:"full",data:_5($)})),J.on("error",()=>J.terminate())}),process.on("SIGINT",()=>{console.log(`
|
|
530
|
+
Shutting down...`),z.close(),_.clients.forEach((J)=>{J.terminate()}),_.close(()=>I.close(()=>process.exit(0))),setTimeout(()=>process.exit(1),3000).unref()}),process.on("SIGTERM",()=>process.emit("SIGINT")),I.listen(gB,()=>{console.log(S0.magenta(`
|
|
531
|
+
\uD83D\uDEF8 Serena Memory Dashboard`)),console.log(S0.white(` http://localhost:${gB}`)),console.log(S0.dim(` Watching: ${$}
|
|
532
|
+
`))})}var NB={name:"oh-my-agent",version:"4.26.3",description:"Portable multi-agent harness for .agents-based skills and workflows across Antigravity, Claude Code, Codex, OpenCode, and more",type:"module",bin:{"oh-my-agent":"./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","oma-pdf"]}};import{existsSync as fx,mkdirSync as xx,readdirSync as vU,readFileSync as kx,statSync as G5}from"node:fs";import{basename as yx,join as j4}from"node:path";var r$=H$(b$(),1),ix="●",lx="✓",mx="✗",rx="○",nx="◌";function hx(){if(process.env.MEMORIES_DIR)return process.env.MEMORIES_DIR;let $=process.argv[3];if($)return j4($,".serena","memories");return j4(process.cwd(),".serena","memories")}function HU($){try{return kx($,"utf-8")}catch{return""}}function dx($){try{let I=vU($);if(I.includes("orchestrator-session.md"))return j4($,"orchestrator-session.md");let _=I.filter((u)=>/^session-.*\.md$/.test(u)).map((u)=>({name:u,mtime:G5(j4($,u)).mtimeMs})).sort((u,U)=>U.mtime-u.mtime);if(_.length>0&&_[0])return j4($,_[0].name)}catch{}return null}function cx($){let I=dx($);if(!I)return{id:"N/A",status:"UNKNOWN"};let _=HU(I);if(!_)return{id:"N/A",status:"UNKNOWN"};let u=(_.match(/session-id:\s*(.+)/i)||[])[1]||(_.match(/# Session:\s*(.+)/i)||[])[1]||_.match(/(session-\d{8}-\d{6})/)?.[1]||yx(I,".md"),U="UNKNOWN";if(/IN PROGRESS|RUNNING|## Active|\[IN PROGRESS\]/i.test(_))U="RUNNING";else if(/COMPLETED|DONE|## Completed|\[COMPLETED\]/i.test(_))U="COMPLETED";else if(/FAILED|ERROR|## Failed|\[FAILED\]/i.test(_))U="FAILED";else if(/Step \d+:.*\[/i.test(_))U="RUNNING";return{id:(u||"N/A").trim(),status:U}}function px($){let I=HU(j4($,"task-board.md"));if(!I)return[];let _=[],u=I.split(`
|
|
533
|
+
`);for(let U of u){if(!U.startsWith("|")||/^\|\s*-+/.test(U))continue;let z=U.split("|").map((q)=>q.trim()).filter(Boolean),J=z[0];if(z.length<2||!J||/^agent$/i.test(J))continue;let G=z[1],g=z[2];_.push({agent:J,status:G||"pending",task:g||""})}return _}function J5($,I){try{let _=vU($).filter((z)=>z.startsWith(`progress-${I}`)&&z.endsWith(".md")).sort().reverse();if(_.length===0||!_[0])return null;let U=HU(j4($,_[0])).match(/turn[:\s]*(\d+)/i);return U?.[1]?parseInt(U[1],10):null}catch{return null}}function ox($){try{let I=vU($).filter((u)=>u.endsWith(".md")&&u!==".gitkeep").map((u)=>({name:u,mtime:G5(j4($,u)).mtimeMs})).sort((u,U)=>U.mtime-u.mtime).slice(0,5),_=[];for(let u of I){let U=u.name.replace(/^(progress|result|session|debug|task)-?/,"").replace(/[-_]agent/,"").replace(/[-_]completion/,"").replace(/\.md$/,"").replace(/[-_]/g," ").trim()||u.name.replace(/\.md$/,""),J=HU(j4($,u.name)).split(`
|
|
534
|
+
`).map((g)=>g.trim()).filter((g)=>g&&!g.startsWith("---")&&g.length>3),G="";for(let g=J.length-1;g>=0;g--){let q=J[g];if(!q)continue;if(/^\*\*|^#+|^-|^\d+\.|Status|Result|Action|Step/i.test(q)){if(G=q.replace(/^[#*\-\d.]+\s*/,"").replace(/\*\*/g,"").trim(),G.length>5)break}}if(G.length>52)G=`${G.substring(0,49)}...`;if(G)_.push({agent:U,message:G})}return _}catch{return[]}}function tx($){let I=[],_=new Set;try{let u=vU($).filter((U)=>U.endsWith(".md")&&U!==".gitkeep").map((U)=>({name:U,mtime:G5(j4($,U)).mtimeMs})).sort((U,z)=>z.mtime-U.mtime);for(let U of u){let z=HU(j4($,U.name)),J=z.match(/\*\*Agent\*\*:\s*(.+)/i)||z.match(/Agent:\s*(.+)/i)||z.match(/^#+\s*(.+?)\s*Agent/im),G=null;if(J?.[1])G=J[1].trim();else if(/_agent|agent_|-agent/i.test(U.name))G=U.name.replace(/\.md$/,"").replace(/[-_]completion|[-_]progress|[-_]result/gi,"").replace(/[-_]/g," ").trim();if(G&&!_.has(G.toLowerCase())){_.add(G.toLowerCase());let g="unknown";if(/\[COMPLETED\]|## Completed|## Results/i.test(z))g="completed";else if(/\[IN PROGRESS\]|## Progress|IN PROGRESS/i.test(z))g="running";else if(/\[FAILED\]|## Failed|ERROR/i.test(z))g="failed";let q=z.match(/## Task\s*\n+(.+)/i)||z.match(/\*\*Task\*\*:\s*(.+)/i),N=q?.[1]?q[1].trim().substring(0,20):"";I.push({agent:G,status:g,task:N,turn:J5($,G)})}}}catch{}return I}function ax($){let I=$.toLowerCase();if(["running","active","in_progress","in-progress"].includes(I))return`${r$.default.green(ix)} running`;else if(["completed","done","finished"].includes(I))return`${r$.default.cyan(lx)} completed`;else if(["failed","error"].includes(I))return`${r$.default.red(mx)} failed`;else if(["blocked","waiting"].includes(I))return`${r$.default.yellow(rx)} blocked`;return`${r$.default.dim(nx)} pending`}function QB($){console.clear();let I=cx($),u=px($).map((v)=>({...v,turn:J5($,v.agent)}));if(u.length===0)u=tx($);if(u.length===0)try{let v=vU($).filter((O)=>O.startsWith("progress-")&&O.endsWith(".md"));for(let O of v){let T=O.replace(/^progress-/,"").replace(/\.md$/,"");u.push({agent:T,status:"running",task:"",turn:J5($,T)})}}catch{}let U=56,z="═".repeat(U),J=(v)=>" ".repeat(Math.max(0,v)),G=(v)=>r$.default.magenta(v),g=(v)=>r$.default.bold(v),q=(v)=>r$.default.dim(v),N=r$.default.yellow;if(I.status==="RUNNING")N=r$.default.green;else if(I.status==="COMPLETED")N=r$.default.cyan;else if(I.status==="FAILED")N=r$.default.red;console.log(`${G(`╔${z}╗`)}`),console.log(`${G("║")} ${g(G("Serena Memory Dashboard"))}${J(U-25)}${G("║")}`);let X=`Session: ${g(I.id.padEnd(20))} [${N(I.status)}]`;if(console.log(`${G("║")} ${X}${J(U-4-X.length-9)}${G("║")}`),console.log(`${G(`╠${z}╣`)}`),console.log(`${G("║")} ${g(`${"Agent".padEnd(12)} ${"Status".padEnd(12)} ${"Turn".padEnd(6)} ${"Task".padEnd(20)}`)} ${G("║")}`),console.log(`${G("║")} ${q(`${"──────────".padEnd(12)} ${"──────────".padEnd(12)} ${"────".padEnd(6)} ${"──────────────────".padEnd(20)}`)} ${G("║")}`),u.length===0)console.log(`${G("║")} ${q(`No agents detected yet${J(32)}`)}${G("║")}`);else for(let v of u){let O=ax(v.status),T=v.turn!=null?String(v.turn):"-",V=v.task.substring(0,20);console.log(`${G("║")} ${v.agent.padEnd(12)} ${O.padEnd(22)} ${T.padEnd(6)} ${V.padEnd(20)}${G("║")}`)}console.log(`${G(`╠${z}╣`)}`),console.log(`${G("║")} ${g("Latest Activity:")}${J(U-18)}${G("║")}`);let Q=ox($);if(Q.length===0)console.log(`${G("║")} ${q(`No activity yet${J(38)}`)}${G("║")}`);else for(let v of Q){let O=`[${v.agent}] ${v.message}`;console.log(`${G("║")} ${q(O.substring(0,52).padEnd(52))}${G("║")}`)}console.log(`${G(`╠${z}╣`)}`);let Y=`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(`${G("║")} ${q(Y)}${J(U-4-Y.length)}${G("║")}`),console.log(`${G(`╚${z}╝`)}`)}async function vB(){let $=hx();if(!fx($))xx($,{recursive:!0}),console.log(r$.default.yellow(`Created ${$} — waiting for memory files...`));console.log(r$.default.magenta(`
|
|
535
|
+
\uD83D\uDEF8 Serena Terminal Dashboard`)),console.log(r$.default.dim(` Watching: ${$}
|
|
536
|
+
`)),QB($);let I=fu($,{persistent:!0,ignoreInitial:!0,awaitWriteFinish:{stabilityThreshold:200,pollInterval:50}});return I.on("all",()=>QB($)),new Promise((_)=>{process.on("SIGINT",()=>{console.log(`
|
|
537
|
+
`),I.close(),_(),process.exit(0)}),process.on("SIGTERM",()=>process.emit("SIGINT"))})}var TB=NB.version,BB="OH_MY_AG_OUTPUT_FORMAT",YU=["text","json"],HB=["gemini","claude","codex","qwen"],YB=["backend","frontend","mobile","qa","debug","pm"];function c4($,I="Output as JSON"){return $.option("--json",I).option("--output <format>","Output format (text/json)",(_)=>{let u=_.trim().toLowerCase();if(!YU.includes(u))throw Error(`Invalid output format: ${_}. Expected one of ${YU.join(", ")}`);return u})}function ex($){if($?.json)return"json";let I=$?.output?.trim().toLowerCase();if(I&&YU.includes(I))return I;if(process.env[BB]?.trim().toLowerCase()==="json")return"json";return"text"}function F4($){return ex($)==="json"}function MB($){let I=$.at(-1);return I instanceof zz?I:null}function sx($){let I=MB($);if(I)return I.opts();let _=$.at(-1);return _&&typeof _==="object"?_:{}}function $k($){if($ instanceof Error)return $.message;return String($)}function r6($){throw Error($)}function q5($,I){for(let _ of $){let u=_.charCodeAt(0);if(u>=0&&u<=31||u===127)r6(`${I} must not contain control characters`)}}function Ik($,I){if(q5($,I),/[?#%]/.test($))r6(`${I} must not contain ?, #, or %`);if($.includes(".."))r6(`${I} must not contain '..'`)}function Uk($,I){q5($,I);try{new URL($)}catch{r6(`${I} must be a valid absolute URL`)}}function g5($,I,_="text"){if(typeof $==="string"){if(_==="identifier"){Ik($,I);return}if(_==="url"){Uk($,I);return}q5($,I);return}if(Array.isArray($))for(let[u,U]of $.entries())g5(U,`${I}[${u}]`,_)}function OB($){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 _k($){let I=$.vendor;if(typeof I==="string"&&!HB.includes(I))r6(`vendor must be one of ${HB.join(", ")}`);let _=$.output;if(typeof _==="string"&&!YU.includes(_))r6(`output must be one of ${YU.join(", ")}`)}function uk($){let I=$.processedArgs??$.args??[];($.registeredArguments??[]).forEach((U,z)=>{let J=U.name?.()||String(z),G=I[z];if(g5(G,J,OB(J)),J==="agent-type"&&typeof G==="string"&&!YB.includes(G))r6(`agent-type must be one of ${YB.join(", ")}`)});let u=$.opts();_k(u);for(let[U,z]of Object.entries(u))g5(z,U,OB(U))}function zk($){return($.registeredArguments??[]).map((I)=>({name:I.name?.()||"",required:!!I.required,variadic:!!I.variadic}))}function Jk($){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 KB($){let I=[],_=$;while(_?.parent)I.unshift(_.name()),_=_.parent;return I.join(" ")}function Gk($){return $.options.some((I)=>I.long==="--json"||I.long==="--output")}function gk($){return $.options.some((I)=>I.long==="--dry-run")}function DB($){return{name:$.name(),path:KB($),summary:$.summary()||void 0,description:$.description(),arguments:zk($),options:Jk($),supportsJsonOutput:Gk($),supportsDryRun:gk($),subcommands:$.commands.map((I)=>DB(I))}}function qk($,I){if(!I)return $;let _=I.trim();if(!_)return $;let u=[...$.commands];while(u.length>0){let U=u.shift();if(!U)continue;if(U.name()===_||KB(U)===_)return U;u.push(...U.commands)}return null}function Xk($,I){let _=qk($,I);if(!_)r6(`Unknown command: ${I}`);let u={name:$.name(),version:$.version(),description:$.description(),env:{[BB]:"Set to json to force machine-readable output on commands that support it."},command:DB(_)};console.log(JSON.stringify(u,null,2))}function V$($,I={}){return async(..._)=>{let u=MB(_),U=sx(_);try{if(u)uk(u);await $(..._)}catch(z){let J=$k(z);if(I.supportsJsonOutput&&F4(U))console.log(JSON.stringify({error:J},null,2));else console.error(J);process.exitCode=1}}}var v$=new zz;v$.name("oh-my-agent").description("Multi-Agent Orchestrator for AI IDEs").version(TB).showSuggestionAfterError().showHelpAfterError().addHelpText("after",`
|
|
538
538
|
Aliases:
|
|
539
539
|
oma Alias for oh-my-agent after global installation.
|
|
540
|
-
`).action(
|
|
540
|
+
`).action(V$(async()=>{await vX()}));v$.command("install").description("Install oh-my-agent skills and configurations").action(V$(async()=>{await vX()}));v$.command("describe [command-path]").description("Describe CLI commands as JSON for runtime introspection").action(V$(($)=>{Xk(v$,$)},{supportsJsonOutput:!0}));v$.command("dashboard").description("Start terminal dashboard (real-time agent monitoring)").action(V$(async()=>{await vB()}));v$.command("dashboard:web").description("Start web dashboard on http://localhost:9847").action(V$(()=>{XB()}));c4(v$.command("auth:status").description("Check authentication status of all supported CLIs")).action(V$(async($)=>{await sH(F4($))},{supportsJsonOutput:!0}));c4(v$.command("usage:anti").description("Show model usage quotas (connects to local Antigravity IDE)").option("--raw","Dump raw RPC response")).action(V$(async($)=>{await ZO(F4($),$.raw)},{supportsJsonOutput:!0}));v$.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(V$(async($)=>{await MO($.force??!1,$.ci??!1)}));c4(v$.command("doctor").description("Check CLI installations, MCP configs, and skill status"),"Output as JSON for CI/CD").action(V$(async($)=>{await XY(F4($))},{supportsJsonOutput:!0}));c4(v$.command("stats").description("View productivity metrics").option("--reset","Reset metrics data")).action(V$(async($)=>{await BO(F4($),$.reset)},{supportsJsonOutput:!0}));c4(v$.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(V$(async($,I)=>{await vO($,{json:F4(I),compare:I.compare,interactive:I.interactive})},{supportsJsonOutput:!0}));c4(v$.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(V$(async($)=>{await GY($.dryRun,F4($),$.yes)},{supportsJsonOutput:!0}));v$.command("bridge [url]").description("Bridge MCP stdio to Streamable HTTP (for Serena)").action(V$(async($)=>{await zY($)}));v$.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(V$(async($,I,_,u)=>{await av($,I,_,u.workspace||".",u.model)}));v$.command("agent:status <session-id> [agent-ids...]").description("Check status of subagents").option("-r, --root <path>","Root path for memory checks",process.cwd()).action(V$(async($,I,_)=>{await ev($,I,_.root)}));v$.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(V$(async($,I)=>{await sv($,{vendor:I.model,inline:I.inline,noWait:!I.wait})}));v$.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(V$(async($)=>{await $H({prompt:$.prompt,model:$.model,workspace:$.workspace,uncommitted:$.uncommitted})}));c4(v$.command("memory:init").description("Initialize Serena memory schema in .serena/memories").option("--force","Overwrite empty or existing schema files")).action(V$(async($)=>{await xY(F4($),$.force)},{supportsJsonOutput:!0}));c4(v$.command("verify <agent-type>").description("Verify subagent output (backend/frontend/mobile/qa/debug/pm)").option("-w, --workspace <path>","Workspace path",process.cwd())).action(V$(async($,I)=>{await jO($,I.workspace,F4(I))},{supportsJsonOutput:!0}));v$.command("star").description("Star oh-my-agent on GitHub").action(V$(async()=>{await YO()}));c4(v$.command("export <format>").description("Export skills for external IDEs (cursor)").option("-d, --dir <path>","Target directory",process.cwd())).action(V$(async($,I)=>{await QY($,I.dir,F4(I))},{supportsJsonOutput:!0}));c4(v$.command("visualize").alias("viz").description("Visualize project structure as a dependency graph")).action(V$(async($)=>{await fO({json:F4($)})},{supportsJsonOutput:!0}));v$.command("help").description("Show help information").action(V$(()=>{v$.help()}));v$.command("version").description("Show version number").action(V$(()=>{console.log(TB)}));v$.parse();
|