@farthershore/cli 0.11.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,123 +1,126 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __createRequire } from "node:module";const require=__createRequire(import.meta.url);
3
- var sh=Object.create;var Mi=Object.defineProperty;var ch=Object.getOwnPropertyDescriptor;var uh=Object.getOwnPropertyNames;var lh=Object.getPrototypeOf,dh=Object.prototype.hasOwnProperty;var Rt=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(r,n)=>(typeof require<"u"?require:r)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var Me=(t,r)=>()=>(r||t((r={exports:{}}).exports,r),r.exports),ke=(t,r)=>{for(var n in r)Mi(t,n,{get:r[n],enumerable:!0})},mh=(t,r,n,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of uh(r))!dh.call(t,e)&&e!==n&&Mi(t,e,{get:()=>r[e],enumerable:!(o=ch(r,e))||o.enumerable});return t};var ph=(t,r,n)=>(n=t!=null?sh(lh(t)):{},mh(r||!t||!t.__esModule?Mi(n,"default",{value:t,enumerable:!0}):n,t));var Zt=Me(Bi=>{var Dr=class extends Error{constructor(r,n,o){super(o),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=n,this.exitCode=r,this.nestedError=void 0}},Vi=class extends Dr{constructor(r){super(1,"commander.invalidArgument",r),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Bi.CommanderError=Dr;Bi.InvalidArgumentError=Vi});var Ur=Me(Wi=>{var{InvalidArgumentError:fh}=Zt(),Gi=class{constructor(r,n){switch(this.description=n||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,r[0]){case"<":this.required=!0,this._name=r.slice(1,-1);break;case"[":this.required=!1,this._name=r.slice(1,-1);break;default:this.required=!0,this._name=r;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(r,n){return n===this.defaultValue||!Array.isArray(n)?[r]:n.concat(r)}default(r,n){return this.defaultValue=r,this.defaultValueDescription=n,this}argParser(r){return this.parseArg=r,this}choices(r){return this.argChoices=r.slice(),this.parseArg=(n,o)=>{if(!this.argChoices.includes(n))throw new fh(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(n,o):n},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function gh(t){let r=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+r+">":"["+r+"]"}Wi.Argument=Gi;Wi.humanReadableArgName=gh});var qi=Me(Ji=>{var{humanReadableArgName:hh}=Ur(),Hi=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(r){this.helpWidth=this.helpWidth??r.helpWidth??80}visibleCommands(r){let n=r.commands.filter(e=>!e._hidden),o=r._getHelpCommand();return o&&!o._hidden&&n.push(o),this.sortSubcommands&&n.sort((e,i)=>e.name().localeCompare(i.name())),n}compareOptions(r,n){let o=e=>e.short?e.short.replace(/^-/,""):e.long.replace(/^--/,"");return o(r).localeCompare(o(n))}visibleOptions(r){let n=r.options.filter(e=>!e.hidden),o=r._getHelpOption();if(o&&!o.hidden){let e=o.short&&r._findOption(o.short),i=o.long&&r._findOption(o.long);!e&&!i?n.push(o):o.long&&!i?n.push(r.createOption(o.long,o.description)):o.short&&!e&&n.push(r.createOption(o.short,o.description))}return this.sortOptions&&n.sort(this.compareOptions),n}visibleGlobalOptions(r){if(!this.showGlobalOptions)return[];let n=[];for(let o=r.parent;o;o=o.parent){let e=o.options.filter(i=>!i.hidden);n.push(...e)}return this.sortOptions&&n.sort(this.compareOptions),n}visibleArguments(r){return r._argsDescription&&r.registeredArguments.forEach(n=>{n.description=n.description||r._argsDescription[n.name()]||""}),r.registeredArguments.find(n=>n.description)?r.registeredArguments:[]}subcommandTerm(r){let n=r.registeredArguments.map(o=>hh(o)).join(" ");return r._name+(r._aliases[0]?"|"+r._aliases[0]:"")+(r.options.length?" [options]":"")+(n?" "+n:"")}optionTerm(r){return r.flags}argumentTerm(r){return r.name()}longestSubcommandTermLength(r,n){return n.visibleCommands(r).reduce((o,e)=>Math.max(o,this.displayWidth(n.styleSubcommandTerm(n.subcommandTerm(e)))),0)}longestOptionTermLength(r,n){return n.visibleOptions(r).reduce((o,e)=>Math.max(o,this.displayWidth(n.styleOptionTerm(n.optionTerm(e)))),0)}longestGlobalOptionTermLength(r,n){return n.visibleGlobalOptions(r).reduce((o,e)=>Math.max(o,this.displayWidth(n.styleOptionTerm(n.optionTerm(e)))),0)}longestArgumentTermLength(r,n){return n.visibleArguments(r).reduce((o,e)=>Math.max(o,this.displayWidth(n.styleArgumentTerm(n.argumentTerm(e)))),0)}commandUsage(r){let n=r._name;r._aliases[0]&&(n=n+"|"+r._aliases[0]);let o="";for(let e=r.parent;e;e=e.parent)o=e.name()+" "+o;return o+n+" "+r.usage()}commandDescription(r){return r.description()}subcommandDescription(r){return r.summary()||r.description()}optionDescription(r){let n=[];return r.argChoices&&n.push(`choices: ${r.argChoices.map(o=>JSON.stringify(o)).join(", ")}`),r.defaultValue!==void 0&&(r.required||r.optional||r.isBoolean()&&typeof r.defaultValue=="boolean")&&n.push(`default: ${r.defaultValueDescription||JSON.stringify(r.defaultValue)}`),r.presetArg!==void 0&&r.optional&&n.push(`preset: ${JSON.stringify(r.presetArg)}`),r.envVar!==void 0&&n.push(`env: ${r.envVar}`),n.length>0?`${r.description} (${n.join(", ")})`:r.description}argumentDescription(r){let n=[];if(r.argChoices&&n.push(`choices: ${r.argChoices.map(o=>JSON.stringify(o)).join(", ")}`),r.defaultValue!==void 0&&n.push(`default: ${r.defaultValueDescription||JSON.stringify(r.defaultValue)}`),n.length>0){let o=`(${n.join(", ")})`;return r.description?`${r.description} ${o}`:o}return r.description}formatHelp(r,n){let o=n.padWidth(r,n),e=n.helpWidth??80;function i(p,g){return n.formatItem(p,o,g,n)}let a=[`${n.styleTitle("Usage:")} ${n.styleUsage(n.commandUsage(r))}`,""],s=n.commandDescription(r);s.length>0&&(a=a.concat([n.boxWrap(n.styleCommandDescription(s),e),""]));let u=n.visibleArguments(r).map(p=>i(n.styleArgumentTerm(n.argumentTerm(p)),n.styleArgumentDescription(n.argumentDescription(p))));u.length>0&&(a=a.concat([n.styleTitle("Arguments:"),...u,""]));let l=n.visibleOptions(r).map(p=>i(n.styleOptionTerm(n.optionTerm(p)),n.styleOptionDescription(n.optionDescription(p))));if(l.length>0&&(a=a.concat([n.styleTitle("Options:"),...l,""])),n.showGlobalOptions){let p=n.visibleGlobalOptions(r).map(g=>i(n.styleOptionTerm(n.optionTerm(g)),n.styleOptionDescription(n.optionDescription(g))));p.length>0&&(a=a.concat([n.styleTitle("Global Options:"),...p,""]))}let d=n.visibleCommands(r).map(p=>i(n.styleSubcommandTerm(n.subcommandTerm(p)),n.styleSubcommandDescription(n.subcommandDescription(p))));return d.length>0&&(a=a.concat([n.styleTitle("Commands:"),...d,""])),a.join(`
4
- `)}displayWidth(r){return Ul(r).length}styleTitle(r){return r}styleUsage(r){return r.split(" ").map(n=>n==="[options]"?this.styleOptionText(n):n==="[command]"?this.styleSubcommandText(n):n[0]==="["||n[0]==="<"?this.styleArgumentText(n):this.styleCommandText(n)).join(" ")}styleCommandDescription(r){return this.styleDescriptionText(r)}styleOptionDescription(r){return this.styleDescriptionText(r)}styleSubcommandDescription(r){return this.styleDescriptionText(r)}styleArgumentDescription(r){return this.styleDescriptionText(r)}styleDescriptionText(r){return r}styleOptionTerm(r){return this.styleOptionText(r)}styleSubcommandTerm(r){return r.split(" ").map(n=>n==="[options]"?this.styleOptionText(n):n[0]==="["||n[0]==="<"?this.styleArgumentText(n):this.styleSubcommandText(n)).join(" ")}styleArgumentTerm(r){return this.styleArgumentText(r)}styleOptionText(r){return r}styleArgumentText(r){return r}styleSubcommandText(r){return r}styleCommandText(r){return r}padWidth(r,n){return Math.max(n.longestOptionTermLength(r,n),n.longestGlobalOptionTermLength(r,n),n.longestSubcommandTermLength(r,n),n.longestArgumentTermLength(r,n))}preformatted(r){return/\n[^\S\r\n]/.test(r)}formatItem(r,n,o,e){let a=" ".repeat(2);if(!o)return a+r;let s=r.padEnd(n+r.length-e.displayWidth(r)),u=2,d=(this.helpWidth??80)-n-u-2,p;return d<this.minWidthToWrap||e.preformatted(o)?p=o:p=e.boxWrap(o,d).replace(/\n/g,`
5
- `+" ".repeat(n+u)),a+s+" ".repeat(u)+p.replace(/\n/g,`
6
- ${a}`)}boxWrap(r,n){if(n<this.minWidthToWrap)return r;let o=r.split(/\r\n|\n/),e=/[\s]*[^\s]+/g,i=[];return o.forEach(a=>{let s=a.match(e);if(s===null){i.push("");return}let u=[s.shift()],l=this.displayWidth(u[0]);s.forEach(d=>{let p=this.displayWidth(d);if(l+p<=n){u.push(d),l+=p;return}i.push(u.join(""));let g=d.trimStart();u=[g],l=this.displayWidth(g)}),i.push(u.join(""))}),i.join(`
7
- `)}};function Ul(t){let r=/\x1b\[\d*(;\d*)*m/g;return t.replace(r,"")}Ji.Help=Hi;Ji.stripColor=Ul});var Qi=Me(Xi=>{var{InvalidArgumentError:vh}=Zt(),Ki=class{constructor(r,n){this.flags=r,this.description=n||"",this.required=r.includes("<"),this.optional=r.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(r),this.mandatory=!1;let o=_h(r);this.short=o.shortFlag,this.long=o.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}default(r,n){return this.defaultValue=r,this.defaultValueDescription=n,this}preset(r){return this.presetArg=r,this}conflicts(r){return this.conflictsWith=this.conflictsWith.concat(r),this}implies(r){let n=r;return typeof r=="string"&&(n={[r]:!0}),this.implied=Object.assign(this.implied||{},n),this}env(r){return this.envVar=r,this}argParser(r){return this.parseArg=r,this}makeOptionMandatory(r=!0){return this.mandatory=!!r,this}hideHelp(r=!0){return this.hidden=!!r,this}_concatValue(r,n){return n===this.defaultValue||!Array.isArray(n)?[r]:n.concat(r)}choices(r){return this.argChoices=r.slice(),this.parseArg=(n,o)=>{if(!this.argChoices.includes(n))throw new vh(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(n,o):n},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Rl(this.name().replace(/^no-/,"")):Rl(this.name())}is(r){return this.short===r||this.long===r}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Yi=class{constructor(r){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,r.forEach(n=>{n.negate?this.negativeOptions.set(n.attributeName(),n):this.positiveOptions.set(n.attributeName(),n)}),this.negativeOptions.forEach((n,o)=>{this.positiveOptions.has(o)&&this.dualOptions.add(o)})}valueFromOption(r,n){let o=n.attributeName();if(!this.dualOptions.has(o))return!0;let e=this.negativeOptions.get(o).presetArg,i=e!==void 0?e:!1;return n.negate===(i===r)}};function Rl(t){return t.split("-").reduce((r,n)=>r+n[0].toUpperCase()+n.slice(1))}function _h(t){let r,n,o=/^-[^-]$/,e=/^--[^-]/,i=t.split(/[ |,]+/).concat("guard");if(o.test(i[0])&&(r=i.shift()),e.test(i[0])&&(n=i.shift()),!r&&o.test(i[0])&&(r=i.shift()),!r&&e.test(i[0])&&(r=n,n=i.shift()),i[0].startsWith("-")){let a=i[0],s=`option creation failed due to '${a}' in option flags '${t}'`;throw/^-[^-][^-]/.test(a)?new Error(`${s}
3
+ var n_=Object.create;var ji=Object.defineProperty;var r_=Object.getOwnPropertyDescriptor;var i_=Object.getOwnPropertyNames;var o_=Object.getPrototypeOf,a_=Object.prototype.hasOwnProperty;var Ft=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Fe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ye=(e,t)=>{for(var r in t)ji(e,r,{get:t[r],enumerable:!0})},s_=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of i_(t))!a_.call(e,n)&&n!==r&&ji(e,n,{get:()=>t[n],enumerable:!(o=r_(t,n))||o.enumerable});return e};var c_=(e,t,r)=>(r=e!=null?n_(o_(e)):{},s_(t||!e||!e.__esModule?ji(r,"default",{value:e,enumerable:!0}):r,e));var Zt=Fe(Li=>{var Dn=class extends Error{constructor(t,r,o){super(o),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=t,this.nestedError=void 0}},Ui=class extends Dn{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Li.CommanderError=Dn;Li.InvalidArgumentError=Ui});var zn=Fe(Fi=>{var{InvalidArgumentError:u_}=Zt(),Mi=class{constructor(t,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,t[0]){case"<":this.required=!0,this._name=t.slice(1,-1);break;case"[":this.required=!1,this._name=t.slice(1,-1);break;default:this.required=!0,this._name=t;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:r.concat(t)}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}argParser(t){return this.parseArg=t,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,o)=>{if(!this.argChoices.includes(r))throw new u_(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,o):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function l_(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}Fi.Argument=Mi;Fi.humanReadableArgName=l_});var Bi=Fe(Vi=>{var{humanReadableArgName:d_}=zn(),Zi=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(t){this.helpWidth=this.helpWidth??t.helpWidth??80}visibleCommands(t){let r=t.commands.filter(n=>!n._hidden),o=t._getHelpCommand();return o&&!o._hidden&&r.push(o),this.sortSubcommands&&r.sort((n,i)=>n.name().localeCompare(i.name())),r}compareOptions(t,r){let o=n=>n.short?n.short.replace(/^-/,""):n.long.replace(/^--/,"");return o(t).localeCompare(o(r))}visibleOptions(t){let r=t.options.filter(n=>!n.hidden),o=t._getHelpOption();if(o&&!o.hidden){let n=o.short&&t._findOption(o.short),i=o.long&&t._findOption(o.long);!n&&!i?r.push(o):o.long&&!i?r.push(t.createOption(o.long,o.description)):o.short&&!n&&r.push(t.createOption(o.short,o.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];let r=[];for(let o=t.parent;o;o=o.parent){let n=o.options.filter(i=>!i.hidden);r.push(...n)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(t){return t._argsDescription&&t.registeredArguments.forEach(r=>{r.description=r.description||t._argsDescription[r.name()]||""}),t.registeredArguments.find(r=>r.description)?t.registeredArguments:[]}subcommandTerm(t){let r=t.registeredArguments.map(o=>d_(o)).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,r){return r.visibleCommands(t).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(n)))),0)}longestOptionTermLength(t,r){return r.visibleOptions(t).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleOptionTerm(r.optionTerm(n)))),0)}longestGlobalOptionTermLength(t,r){return r.visibleGlobalOptions(t).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleOptionTerm(r.optionTerm(n)))),0)}longestArgumentTermLength(t,r){return r.visibleArguments(t).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(n)))),0)}commandUsage(t){let r=t._name;t._aliases[0]&&(r=r+"|"+t._aliases[0]);let o="";for(let n=t.parent;n;n=n.parent)o=n.name()+" "+o;return o+r+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){let r=[];return t.argChoices&&r.push(`choices: ${t.argChoices.map(o=>JSON.stringify(o)).join(", ")}`),t.defaultValue!==void 0&&(t.required||t.optional||t.isBoolean()&&typeof t.defaultValue=="boolean")&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),t.presetArg!==void 0&&t.optional&&r.push(`preset: ${JSON.stringify(t.presetArg)}`),t.envVar!==void 0&&r.push(`env: ${t.envVar}`),r.length>0?`${t.description} (${r.join(", ")})`:t.description}argumentDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(o=>JSON.stringify(o)).join(", ")}`),t.defaultValue!==void 0&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),r.length>0){let o=`(${r.join(", ")})`;return t.description?`${t.description} ${o}`:o}return t.description}formatHelp(t,r){let o=r.padWidth(t,r),n=r.helpWidth??80;function i(m,g){return r.formatItem(m,o,g,r)}let s=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(t))}`,""],c=r.commandDescription(t);c.length>0&&(s=s.concat([r.boxWrap(r.styleCommandDescription(c),n),""]));let u=r.visibleArguments(t).map(m=>i(r.styleArgumentTerm(r.argumentTerm(m)),r.styleArgumentDescription(r.argumentDescription(m))));u.length>0&&(s=s.concat([r.styleTitle("Arguments:"),...u,""]));let l=r.visibleOptions(t).map(m=>i(r.styleOptionTerm(r.optionTerm(m)),r.styleOptionDescription(r.optionDescription(m))));if(l.length>0&&(s=s.concat([r.styleTitle("Options:"),...l,""])),r.showGlobalOptions){let m=r.visibleGlobalOptions(t).map(g=>i(r.styleOptionTerm(r.optionTerm(g)),r.styleOptionDescription(r.optionDescription(g))));m.length>0&&(s=s.concat([r.styleTitle("Global Options:"),...m,""]))}let d=r.visibleCommands(t).map(m=>i(r.styleSubcommandTerm(r.subcommandTerm(m)),r.styleSubcommandDescription(r.subcommandDescription(m))));return d.length>0&&(s=s.concat([r.styleTitle("Commands:"),...d,""])),s.join(`
4
+ `)}displayWidth(t){return Yl(t).length}styleTitle(t){return t}styleUsage(t){return t.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r==="[command]"?this.styleSubcommandText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleCommandText(r)).join(" ")}styleCommandDescription(t){return this.styleDescriptionText(t)}styleOptionDescription(t){return this.styleDescriptionText(t)}styleSubcommandDescription(t){return this.styleDescriptionText(t)}styleArgumentDescription(t){return this.styleDescriptionText(t)}styleDescriptionText(t){return t}styleOptionTerm(t){return this.styleOptionText(t)}styleSubcommandTerm(t){return t.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleSubcommandText(r)).join(" ")}styleArgumentTerm(t){return this.styleArgumentText(t)}styleOptionText(t){return t}styleArgumentText(t){return t}styleSubcommandText(t){return t}styleCommandText(t){return t}padWidth(t,r){return Math.max(r.longestOptionTermLength(t,r),r.longestGlobalOptionTermLength(t,r),r.longestSubcommandTermLength(t,r),r.longestArgumentTermLength(t,r))}preformatted(t){return/\n[^\S\r\n]/.test(t)}formatItem(t,r,o,n){let s=" ".repeat(2);if(!o)return s+t;let c=t.padEnd(r+t.length-n.displayWidth(t)),u=2,d=(this.helpWidth??80)-r-u-2,m;return d<this.minWidthToWrap||n.preformatted(o)?m=o:m=n.boxWrap(o,d).replace(/\n/g,`
5
+ `+" ".repeat(r+u)),s+c+" ".repeat(u)+m.replace(/\n/g,`
6
+ ${s}`)}boxWrap(t,r){if(r<this.minWidthToWrap)return t;let o=t.split(/\r\n|\n/),n=/[\s]*[^\s]+/g,i=[];return o.forEach(s=>{let c=s.match(n);if(c===null){i.push("");return}let u=[c.shift()],l=this.displayWidth(u[0]);c.forEach(d=>{let m=this.displayWidth(d);if(l+m<=r){u.push(d),l+=m;return}i.push(u.join(""));let g=d.trimStart();u=[g],l=this.displayWidth(g)}),i.push(u.join(""))}),i.join(`
7
+ `)}};function Yl(e){let t=/\x1b\[\d*(;\d*)*m/g;return e.replace(t,"")}Vi.Help=Zi;Vi.stripColor=Yl});var Wi=Fe(Ki=>{var{InvalidArgumentError:m_}=Zt(),Hi=class{constructor(t,r){this.flags=t,this.description=r||"",this.required=t.includes("<"),this.optional=t.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(t),this.mandatory=!1;let o=p_(t);this.short=o.shortFlag,this.long=o.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}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}preset(t){return this.presetArg=t,this}conflicts(t){return this.conflictsWith=this.conflictsWith.concat(t),this}implies(t){let r=t;return typeof t=="string"&&(r={[t]:!0}),this.implied=Object.assign(this.implied||{},r),this}env(t){return this.envVar=t,this}argParser(t){return this.parseArg=t,this}makeOptionMandatory(t=!0){return this.mandatory=!!t,this}hideHelp(t=!0){return this.hidden=!!t,this}_concatValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:r.concat(t)}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,o)=>{if(!this.argChoices.includes(r))throw new m_(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,o):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Xl(this.name().replace(/^no-/,"")):Xl(this.name())}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Gi=class{constructor(t){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,t.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r)}),this.negativeOptions.forEach((r,o)=>{this.positiveOptions.has(o)&&this.dualOptions.add(o)})}valueFromOption(t,r){let o=r.attributeName();if(!this.dualOptions.has(o))return!0;let n=this.negativeOptions.get(o).presetArg,i=n!==void 0?n:!1;return r.negate===(i===t)}};function Xl(e){return e.split("-").reduce((t,r)=>t+r[0].toUpperCase()+r.slice(1))}function p_(e){let t,r,o=/^-[^-]$/,n=/^--[^-]/,i=e.split(/[ |,]+/).concat("guard");if(o.test(i[0])&&(t=i.shift()),n.test(i[0])&&(r=i.shift()),!t&&o.test(i[0])&&(t=i.shift()),!t&&n.test(i[0])&&(t=r,r=i.shift()),i[0].startsWith("-")){let s=i[0],c=`option creation failed due to '${s}' in option flags '${e}'`;throw/^-[^-][^-]/.test(s)?new Error(`${c}
8
8
  - a short flag is a single dash and a single character
9
9
  - either use a single dash and a single character (for a short flag)
10
- - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):o.test(a)?new Error(`${s}
11
- - too many short flags`):e.test(a)?new Error(`${s}
12
- - too many long flags`):new Error(`${s}
13
- - unrecognised flag format`)}if(r===void 0&&n===void 0)throw new Error(`option creation failed due to no flags found in '${t}'.`);return{shortFlag:r,longFlag:n}}Xi.Option=Ki;Xi.DualOptions=Yi});var Ll=Me(Zl=>{function yh(t,r){if(Math.abs(t.length-r.length)>3)return Math.max(t.length,r.length);let n=[];for(let o=0;o<=t.length;o++)n[o]=[o];for(let o=0;o<=r.length;o++)n[0][o]=o;for(let o=1;o<=r.length;o++)for(let e=1;e<=t.length;e++){let i=1;t[e-1]===r[o-1]?i=0:i=1,n[e][o]=Math.min(n[e-1][o]+1,n[e][o-1]+1,n[e-1][o-1]+i),e>1&&o>1&&t[e-1]===r[o-2]&&t[e-2]===r[o-1]&&(n[e][o]=Math.min(n[e][o],n[e-2][o-2]+1))}return n[t.length][r.length]}function bh(t,r){if(!r||r.length===0)return"";r=Array.from(new Set(r));let n=t.startsWith("--");n&&(t=t.slice(2),r=r.map(a=>a.slice(2)));let o=[],e=3,i=.4;return r.forEach(a=>{if(a.length<=1)return;let s=yh(t,a),u=Math.max(t.length,a.length);(u-s)/u>i&&(s<e?(e=s,o=[a]):s===e&&o.push(a))}),o.sort((a,s)=>a.localeCompare(s)),n&&(o=o.map(a=>`--${a}`)),o.length>1?`
10
+ - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):o.test(s)?new Error(`${c}
11
+ - too many short flags`):n.test(s)?new Error(`${c}
12
+ - too many long flags`):new Error(`${c}
13
+ - unrecognised flag format`)}if(t===void 0&&r===void 0)throw new Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:r}}Ki.Option=Hi;Ki.DualOptions=Gi});var ed=Fe(Ql=>{function f_(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let r=[];for(let o=0;o<=e.length;o++)r[o]=[o];for(let o=0;o<=t.length;o++)r[0][o]=o;for(let o=1;o<=t.length;o++)for(let n=1;n<=e.length;n++){let i=1;e[n-1]===t[o-1]?i=0:i=1,r[n][o]=Math.min(r[n-1][o]+1,r[n][o-1]+1,r[n-1][o-1]+i),n>1&&o>1&&e[n-1]===t[o-2]&&e[n-2]===t[o-1]&&(r[n][o]=Math.min(r[n][o],r[n-2][o-2]+1))}return r[e.length][t.length]}function g_(e,t){if(!t||t.length===0)return"";t=Array.from(new Set(t));let r=e.startsWith("--");r&&(e=e.slice(2),t=t.map(s=>s.slice(2)));let o=[],n=3,i=.4;return t.forEach(s=>{if(s.length<=1)return;let c=f_(e,s),u=Math.max(e.length,s.length);(u-c)/u>i&&(c<n?(n=c,o=[s]):c===n&&o.push(s))}),o.sort((s,c)=>s.localeCompare(c)),r&&(o=o.map(s=>`--${s}`)),o.length>1?`
14
14
  (Did you mean one of ${o.join(", ")}?)`:o.length===1?`
15
- (Did you mean ${o[0]}?)`:""}Zl.suggestSimilar=bh});var Bl=Me(io=>{var $h=Rt("node:events").EventEmitter,eo=Rt("node:child_process"),Se=Rt("node:path"),Rr=Rt("node:fs"),E=Rt("node:process"),{Argument:xh,humanReadableArgName:kh}=Ur(),{CommanderError:to}=Zt(),{Help:Sh,stripColor:wh}=qi(),{Option:Fl,DualOptions:Ih}=Qi(),{suggestSimilar:Ml}=Ll(),ro=class t extends $h{constructor(r){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=r||"",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:n=>E.stdout.write(n),writeErr:n=>E.stderr.write(n),outputError:(n,o)=>o(n),getOutHelpWidth:()=>E.stdout.isTTY?E.stdout.columns:void 0,getErrHelpWidth:()=>E.stderr.isTTY?E.stderr.columns:void 0,getOutHasColors:()=>no()??(E.stdout.isTTY&&E.stdout.hasColors?.()),getErrHasColors:()=>no()??(E.stderr.isTTY&&E.stderr.hasColors?.()),stripColor:n=>wh(n)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(r){return this._outputConfiguration=r._outputConfiguration,this._helpOption=r._helpOption,this._helpCommand=r._helpCommand,this._helpConfiguration=r._helpConfiguration,this._exitCallback=r._exitCallback,this._storeOptionsAsProperties=r._storeOptionsAsProperties,this._combineFlagAndOptionalValue=r._combineFlagAndOptionalValue,this._allowExcessArguments=r._allowExcessArguments,this._enablePositionalOptions=r._enablePositionalOptions,this._showHelpAfterError=r._showHelpAfterError,this._showSuggestionAfterError=r._showSuggestionAfterError,this}_getCommandAndAncestors(){let r=[];for(let n=this;n;n=n.parent)r.push(n);return r}command(r,n,o){let e=n,i=o;typeof e=="object"&&e!==null&&(i=e,e=null),i=i||{};let[,a,s]=r.match(/([^ ]+) *(.*)/),u=this.createCommand(a);return e&&(u.description(e),u._executableHandler=!0),i.isDefault&&(this._defaultCommandName=u._name),u._hidden=!!(i.noHelp||i.hidden),u._executableFile=i.executableFile||null,s&&u.arguments(s),this._registerCommand(u),u.parent=this,u.copyInheritedSettings(this),e?this:u}createCommand(r){return new t(r)}createHelp(){return Object.assign(new Sh,this.configureHelp())}configureHelp(r){return r===void 0?this._helpConfiguration:(this._helpConfiguration=r,this)}configureOutput(r){return r===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,r),this)}showHelpAfterError(r=!0){return typeof r!="string"&&(r=!!r),this._showHelpAfterError=r,this}showSuggestionAfterError(r=!0){return this._showSuggestionAfterError=!!r,this}addCommand(r,n){if(!r._name)throw new Error(`Command passed to .addCommand() must have a name
16
- - specify the name in Command constructor or using .name()`);return n=n||{},n.isDefault&&(this._defaultCommandName=r._name),(n.noHelp||n.hidden)&&(r._hidden=!0),this._registerCommand(r),r.parent=this,r._checkForBrokenPassThrough(),this}createArgument(r,n){return new xh(r,n)}argument(r,n,o,e){let i=this.createArgument(r,n);return typeof o=="function"?i.default(e).argParser(o):i.default(o),this.addArgument(i),this}arguments(r){return r.trim().split(/ +/).forEach(n=>{this.argument(n)}),this}addArgument(r){let n=this.registeredArguments.slice(-1)[0];if(n&&n.variadic)throw new Error(`only the last argument can be variadic '${n.name()}'`);if(r.required&&r.defaultValue!==void 0&&r.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${r.name()}'`);return this.registeredArguments.push(r),this}helpCommand(r,n){if(typeof r=="boolean")return this._addImplicitHelpCommand=r,this;r=r??"help [command]";let[,o,e]=r.match(/([^ ]+) *(.*)/),i=n??"display help for command",a=this.createCommand(o);return a.helpOption(!1),e&&a.arguments(e),i&&a.description(i),this._addImplicitHelpCommand=!0,this._helpCommand=a,this}addHelpCommand(r,n){return typeof r!="object"?(this.helpCommand(r,n),this):(this._addImplicitHelpCommand=!0,this._helpCommand=r,this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(r,n){let o=["preSubcommand","preAction","postAction"];if(!o.includes(r))throw new Error(`Unexpected value for event passed to hook : '${r}'.
17
- Expecting one of '${o.join("', '")}'`);return this._lifeCycleHooks[r]?this._lifeCycleHooks[r].push(n):this._lifeCycleHooks[r]=[n],this}exitOverride(r){return r?this._exitCallback=r:this._exitCallback=n=>{if(n.code!=="commander.executeSubCommandAsync")throw n},this}_exit(r,n,o){this._exitCallback&&this._exitCallback(new to(r,n,o)),E.exit(r)}action(r){let n=o=>{let e=this.registeredArguments.length,i=o.slice(0,e);return this._storeOptionsAsProperties?i[e]=this:i[e]=this.opts(),i.push(this),r.apply(this,i)};return this._actionHandler=n,this}createOption(r,n){return new Fl(r,n)}_callParseArg(r,n,o,e){try{return r.parseArg(n,o)}catch(i){if(i.code==="commander.invalidArgument"){let a=`${e} ${i.message}`;this.error(a,{exitCode:i.exitCode,code:i.code})}throw i}}_registerOption(r){let n=r.short&&this._findOption(r.short)||r.long&&this._findOption(r.long);if(n){let o=r.long&&this._findOption(r.long)?r.long:r.short;throw new Error(`Cannot add option '${r.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${o}'
18
- - already used by option '${n.flags}'`)}this.options.push(r)}_registerCommand(r){let n=e=>[e.name()].concat(e.aliases()),o=n(r).find(e=>this._findCommand(e));if(o){let e=n(this._findCommand(o)).join("|"),i=n(r).join("|");throw new Error(`cannot add command '${i}' as already have command '${e}'`)}this.commands.push(r)}addOption(r){this._registerOption(r);let n=r.name(),o=r.attributeName();if(r.negate){let i=r.long.replace(/^--no-/,"--");this._findOption(i)||this.setOptionValueWithSource(o,r.defaultValue===void 0?!0:r.defaultValue,"default")}else r.defaultValue!==void 0&&this.setOptionValueWithSource(o,r.defaultValue,"default");let e=(i,a,s)=>{i==null&&r.presetArg!==void 0&&(i=r.presetArg);let u=this.getOptionValue(o);i!==null&&r.parseArg?i=this._callParseArg(r,i,u,a):i!==null&&r.variadic&&(i=r._concatValue(i,u)),i==null&&(r.negate?i=!1:r.isBoolean()||r.optional?i=!0:i=""),this.setOptionValueWithSource(o,i,s)};return this.on("option:"+n,i=>{let a=`error: option '${r.flags}' argument '${i}' is invalid.`;e(i,a,"cli")}),r.envVar&&this.on("optionEnv:"+n,i=>{let a=`error: option '${r.flags}' value '${i}' from env '${r.envVar}' is invalid.`;e(i,a,"env")}),this}_optionEx(r,n,o,e,i){if(typeof n=="object"&&n instanceof Fl)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let a=this.createOption(n,o);if(a.makeOptionMandatory(!!r.mandatory),typeof e=="function")a.default(i).argParser(e);else if(e instanceof RegExp){let s=e;e=(u,l)=>{let d=s.exec(u);return d?d[0]:l},a.default(i).argParser(e)}else a.default(e);return this.addOption(a)}option(r,n,o,e){return this._optionEx({},r,n,o,e)}requiredOption(r,n,o,e){return this._optionEx({mandatory:!0},r,n,o,e)}combineFlagAndOptionalValue(r=!0){return this._combineFlagAndOptionalValue=!!r,this}allowUnknownOption(r=!0){return this._allowUnknownOption=!!r,this}allowExcessArguments(r=!0){return this._allowExcessArguments=!!r,this}enablePositionalOptions(r=!0){return this._enablePositionalOptions=!!r,this}passThroughOptions(r=!0){return this._passThroughOptions=!!r,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(r=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!r,this}getOptionValue(r){return this._storeOptionsAsProperties?this[r]:this._optionValues[r]}setOptionValue(r,n){return this.setOptionValueWithSource(r,n,void 0)}setOptionValueWithSource(r,n,o){return this._storeOptionsAsProperties?this[r]=n:this._optionValues[r]=n,this._optionValueSources[r]=o,this}getOptionValueSource(r){return this._optionValueSources[r]}getOptionValueSourceWithGlobals(r){let n;return this._getCommandAndAncestors().forEach(o=>{o.getOptionValueSource(r)!==void 0&&(n=o.getOptionValueSource(r))}),n}_prepareUserArgs(r,n){if(r!==void 0&&!Array.isArray(r))throw new Error("first parameter to parse must be array or undefined");if(n=n||{},r===void 0&&n.from===void 0){E.versions?.electron&&(n.from="electron");let e=E.execArgv??[];(e.includes("-e")||e.includes("--eval")||e.includes("-p")||e.includes("--print"))&&(n.from="eval")}r===void 0&&(r=E.argv),this.rawArgs=r.slice();let o;switch(n.from){case void 0:case"node":this._scriptPath=r[1],o=r.slice(2);break;case"electron":E.defaultApp?(this._scriptPath=r[1],o=r.slice(2)):o=r.slice(1);break;case"user":o=r.slice(0);break;case"eval":o=r.slice(1);break;default:throw new Error(`unexpected parse option { from: '${n.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",o}parse(r,n){this._prepareForParse();let o=this._prepareUserArgs(r,n);return this._parseCommand([],o),this}async parseAsync(r,n){this._prepareForParse();let o=this._prepareUserArgs(r,n);return await this._parseCommand([],o),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
19
- - 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(r,n,o){if(Rr.existsSync(r))return;let e=n?`searched for local subcommand relative to directory '${n}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",i=`'${r}' does not exist
15
+ (Did you mean ${o[0]}?)`:""}Ql.suggestSimilar=g_});var id=Fe(Qi=>{var h_=Ft("node:events").EventEmitter,qi=Ft("node:child_process"),xe=Ft("node:path"),jn=Ft("node:fs"),P=Ft("node:process"),{Argument:__,humanReadableArgName:v_}=zn(),{CommanderError:Ji}=Zt(),{Help:b_,stripColor:y_}=Bi(),{Option:td,DualOptions:x_}=Wi(),{suggestSimilar:nd}=ed(),Yi=class e extends h_{constructor(t){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=t||"",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:r=>P.stdout.write(r),writeErr:r=>P.stderr.write(r),outputError:(r,o)=>o(r),getOutHelpWidth:()=>P.stdout.isTTY?P.stdout.columns:void 0,getErrHelpWidth:()=>P.stderr.isTTY?P.stderr.columns:void 0,getOutHasColors:()=>Xi()??(P.stdout.isTTY&&P.stdout.hasColors?.()),getErrHasColors:()=>Xi()??(P.stderr.isTTY&&P.stderr.hasColors?.()),stripColor:r=>y_(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(t){return this._outputConfiguration=t._outputConfiguration,this._helpOption=t._helpOption,this._helpCommand=t._helpCommand,this._helpConfiguration=t._helpConfiguration,this._exitCallback=t._exitCallback,this._storeOptionsAsProperties=t._storeOptionsAsProperties,this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue,this._allowExcessArguments=t._allowExcessArguments,this._enablePositionalOptions=t._enablePositionalOptions,this._showHelpAfterError=t._showHelpAfterError,this._showSuggestionAfterError=t._showSuggestionAfterError,this}_getCommandAndAncestors(){let t=[];for(let r=this;r;r=r.parent)t.push(r);return t}command(t,r,o){let n=r,i=o;typeof n=="object"&&n!==null&&(i=n,n=null),i=i||{};let[,s,c]=t.match(/([^ ]+) *(.*)/),u=this.createCommand(s);return n&&(u.description(n),u._executableHandler=!0),i.isDefault&&(this._defaultCommandName=u._name),u._hidden=!!(i.noHelp||i.hidden),u._executableFile=i.executableFile||null,c&&u.arguments(c),this._registerCommand(u),u.parent=this,u.copyInheritedSettings(this),n?this:u}createCommand(t){return new e(t)}createHelp(){return Object.assign(new b_,this.configureHelp())}configureHelp(t){return t===void 0?this._helpConfiguration:(this._helpConfiguration=t,this)}configureOutput(t){return t===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,t),this)}showHelpAfterError(t=!0){return typeof t!="string"&&(t=!!t),this._showHelpAfterError=t,this}showSuggestionAfterError(t=!0){return this._showSuggestionAfterError=!!t,this}addCommand(t,r){if(!t._name)throw new Error(`Command passed to .addCommand() must have a name
16
+ - specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=t._name),(r.noHelp||r.hidden)&&(t._hidden=!0),this._registerCommand(t),t.parent=this,t._checkForBrokenPassThrough(),this}createArgument(t,r){return new __(t,r)}argument(t,r,o,n){let i=this.createArgument(t,r);return typeof o=="function"?i.default(n).argParser(o):i.default(o),this.addArgument(i),this}arguments(t){return t.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(t){let r=this.registeredArguments.slice(-1)[0];if(r&&r.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(t.required&&t.defaultValue!==void 0&&t.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${t.name()}'`);return this.registeredArguments.push(t),this}helpCommand(t,r){if(typeof t=="boolean")return this._addImplicitHelpCommand=t,this;t=t??"help [command]";let[,o,n]=t.match(/([^ ]+) *(.*)/),i=r??"display help for command",s=this.createCommand(o);return s.helpOption(!1),n&&s.arguments(n),i&&s.description(i),this._addImplicitHelpCommand=!0,this._helpCommand=s,this}addHelpCommand(t,r){return typeof t!="object"?(this.helpCommand(t,r),this):(this._addImplicitHelpCommand=!0,this._helpCommand=t,this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(t,r){let o=["preSubcommand","preAction","postAction"];if(!o.includes(t))throw new Error(`Unexpected value for event passed to hook : '${t}'.
17
+ Expecting one of '${o.join("', '")}'`);return this._lifeCycleHooks[t]?this._lifeCycleHooks[t].push(r):this._lifeCycleHooks[t]=[r],this}exitOverride(t){return t?this._exitCallback=t:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(t,r,o){this._exitCallback&&this._exitCallback(new Ji(t,r,o)),P.exit(t)}action(t){let r=o=>{let n=this.registeredArguments.length,i=o.slice(0,n);return this._storeOptionsAsProperties?i[n]=this:i[n]=this.opts(),i.push(this),t.apply(this,i)};return this._actionHandler=r,this}createOption(t,r){return new td(t,r)}_callParseArg(t,r,o,n){try{return t.parseArg(r,o)}catch(i){if(i.code==="commander.invalidArgument"){let s=`${n} ${i.message}`;this.error(s,{exitCode:i.exitCode,code:i.code})}throw i}}_registerOption(t){let r=t.short&&this._findOption(t.short)||t.long&&this._findOption(t.long);if(r){let o=t.long&&this._findOption(t.long)?t.long:t.short;throw new Error(`Cannot add option '${t.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${o}'
18
+ - already used by option '${r.flags}'`)}this.options.push(t)}_registerCommand(t){let r=n=>[n.name()].concat(n.aliases()),o=r(t).find(n=>this._findCommand(n));if(o){let n=r(this._findCommand(o)).join("|"),i=r(t).join("|");throw new Error(`cannot add command '${i}' as already have command '${n}'`)}this.commands.push(t)}addOption(t){this._registerOption(t);let r=t.name(),o=t.attributeName();if(t.negate){let i=t.long.replace(/^--no-/,"--");this._findOption(i)||this.setOptionValueWithSource(o,t.defaultValue===void 0?!0:t.defaultValue,"default")}else t.defaultValue!==void 0&&this.setOptionValueWithSource(o,t.defaultValue,"default");let n=(i,s,c)=>{i==null&&t.presetArg!==void 0&&(i=t.presetArg);let u=this.getOptionValue(o);i!==null&&t.parseArg?i=this._callParseArg(t,i,u,s):i!==null&&t.variadic&&(i=t._concatValue(i,u)),i==null&&(t.negate?i=!1:t.isBoolean()||t.optional?i=!0:i=""),this.setOptionValueWithSource(o,i,c)};return this.on("option:"+r,i=>{let s=`error: option '${t.flags}' argument '${i}' is invalid.`;n(i,s,"cli")}),t.envVar&&this.on("optionEnv:"+r,i=>{let s=`error: option '${t.flags}' value '${i}' from env '${t.envVar}' is invalid.`;n(i,s,"env")}),this}_optionEx(t,r,o,n,i){if(typeof r=="object"&&r instanceof td)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let s=this.createOption(r,o);if(s.makeOptionMandatory(!!t.mandatory),typeof n=="function")s.default(i).argParser(n);else if(n instanceof RegExp){let c=n;n=(u,l)=>{let d=c.exec(u);return d?d[0]:l},s.default(i).argParser(n)}else s.default(n);return this.addOption(s)}option(t,r,o,n){return this._optionEx({},t,r,o,n)}requiredOption(t,r,o,n){return this._optionEx({mandatory:!0},t,r,o,n)}combineFlagAndOptionalValue(t=!0){return this._combineFlagAndOptionalValue=!!t,this}allowUnknownOption(t=!0){return this._allowUnknownOption=!!t,this}allowExcessArguments(t=!0){return this._allowExcessArguments=!!t,this}enablePositionalOptions(t=!0){return this._enablePositionalOptions=!!t,this}passThroughOptions(t=!0){return this._passThroughOptions=!!t,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(t=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!t,this}getOptionValue(t){return this._storeOptionsAsProperties?this[t]:this._optionValues[t]}setOptionValue(t,r){return this.setOptionValueWithSource(t,r,void 0)}setOptionValueWithSource(t,r,o){return this._storeOptionsAsProperties?this[t]=r:this._optionValues[t]=r,this._optionValueSources[t]=o,this}getOptionValueSource(t){return this._optionValueSources[t]}getOptionValueSourceWithGlobals(t){let r;return this._getCommandAndAncestors().forEach(o=>{o.getOptionValueSource(t)!==void 0&&(r=o.getOptionValueSource(t))}),r}_prepareUserArgs(t,r){if(t!==void 0&&!Array.isArray(t))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},t===void 0&&r.from===void 0){P.versions?.electron&&(r.from="electron");let n=P.execArgv??[];(n.includes("-e")||n.includes("--eval")||n.includes("-p")||n.includes("--print"))&&(r.from="eval")}t===void 0&&(t=P.argv),this.rawArgs=t.slice();let o;switch(r.from){case void 0:case"node":this._scriptPath=t[1],o=t.slice(2);break;case"electron":P.defaultApp?(this._scriptPath=t[1],o=t.slice(2)):o=t.slice(1);break;case"user":o=t.slice(0);break;case"eval":o=t.slice(1);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",o}parse(t,r){this._prepareForParse();let o=this._prepareUserArgs(t,r);return this._parseCommand([],o),this}async parseAsync(t,r){this._prepareForParse();let o=this._prepareUserArgs(t,r);return await this._parseCommand([],o),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
19
+ - 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(t,r,o){if(jn.existsSync(t))return;let n=r?`searched for local subcommand relative to directory '${r}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",i=`'${t}' does not exist
20
20
  - if '${o}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
21
21
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
22
- - ${e}`;throw new Error(i)}_executeSubCommand(r,n){n=n.slice();let o=!1,e=[".js",".ts",".tsx",".mjs",".cjs"];function i(d,p){let g=Se.resolve(d,p);if(Rr.existsSync(g))return g;if(e.includes(Se.extname(p)))return;let h=e.find(x=>Rr.existsSync(`${g}${x}`));if(h)return`${g}${h}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let a=r._executableFile||`${this._name}-${r._name}`,s=this._executableDir||"";if(this._scriptPath){let d;try{d=Rr.realpathSync(this._scriptPath)}catch{d=this._scriptPath}s=Se.resolve(Se.dirname(d),s)}if(s){let d=i(s,a);if(!d&&!r._executableFile&&this._scriptPath){let p=Se.basename(this._scriptPath,Se.extname(this._scriptPath));p!==this._name&&(d=i(s,`${p}-${r._name}`))}a=d||a}o=e.includes(Se.extname(a));let u;E.platform!=="win32"?o?(n.unshift(a),n=Vl(E.execArgv).concat(n),u=eo.spawn(E.argv[0],n,{stdio:"inherit"})):u=eo.spawn(a,n,{stdio:"inherit"}):(this._checkForMissingExecutable(a,s,r._name),n.unshift(a),n=Vl(E.execArgv).concat(n),u=eo.spawn(E.execPath,n,{stdio:"inherit"})),u.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(p=>{E.on(p,()=>{u.killed===!1&&u.exitCode===null&&u.kill(p)})});let l=this._exitCallback;u.on("close",d=>{d=d??1,l?l(new to(d,"commander.executeSubCommandAsync","(close)")):E.exit(d)}),u.on("error",d=>{if(d.code==="ENOENT")this._checkForMissingExecutable(a,s,r._name);else if(d.code==="EACCES")throw new Error(`'${a}' not executable`);if(!l)E.exit(1);else{let p=new to(1,"commander.executeSubCommandAsync","(error)");p.nestedError=d,l(p)}}),this.runningCommand=u}_dispatchSubcommand(r,n,o){let e=this._findCommand(r);e||this.help({error:!0}),e._prepareForParse();let i;return i=this._chainOrCallSubCommandHook(i,e,"preSubcommand"),i=this._chainOrCall(i,()=>{if(e._executableHandler)this._executeSubCommand(e,n.concat(o));else return e._parseCommand(n,o)}),i}_dispatchHelpCommand(r){r||this.help();let n=this._findCommand(r);return n&&!n._executableHandler&&n.help(),this._dispatchSubcommand(r,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((r,n)=>{r.required&&this.args[n]==null&&this.missingArgument(r.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let r=(o,e,i)=>{let a=e;if(e!==null&&o.parseArg){let s=`error: command-argument value '${e}' is invalid for argument '${o.name()}'.`;a=this._callParseArg(o,e,i,s)}return a};this._checkNumberOfArguments();let n=[];this.registeredArguments.forEach((o,e)=>{let i=o.defaultValue;o.variadic?e<this.args.length?(i=this.args.slice(e),o.parseArg&&(i=i.reduce((a,s)=>r(o,s,a),o.defaultValue))):i===void 0&&(i=[]):e<this.args.length&&(i=this.args[e],o.parseArg&&(i=r(o,i,o.defaultValue))),n[e]=i}),this.processedArgs=n}_chainOrCall(r,n){return r&&r.then&&typeof r.then=="function"?r.then(()=>n()):n()}_chainOrCallHooks(r,n){let o=r,e=[];return this._getCommandAndAncestors().reverse().filter(i=>i._lifeCycleHooks[n]!==void 0).forEach(i=>{i._lifeCycleHooks[n].forEach(a=>{e.push({hookedCommand:i,callback:a})})}),n==="postAction"&&e.reverse(),e.forEach(i=>{o=this._chainOrCall(o,()=>i.callback(i.hookedCommand,this))}),o}_chainOrCallSubCommandHook(r,n,o){let e=r;return this._lifeCycleHooks[o]!==void 0&&this._lifeCycleHooks[o].forEach(i=>{e=this._chainOrCall(e,()=>i(this,n))}),e}_parseCommand(r,n){let o=this.parseOptions(n);if(this._parseOptionsEnv(),this._parseOptionsImplied(),r=r.concat(o.operands),n=o.unknown,this.args=r.concat(n),r&&this._findCommand(r[0]))return this._dispatchSubcommand(r[0],r.slice(1),n);if(this._getHelpCommand()&&r[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(r[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(n),this._dispatchSubcommand(this._defaultCommandName,r,n);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(o.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let e=()=>{o.unknown.length>0&&this.unknownOption(o.unknown[0])},i=`command:${this.name()}`;if(this._actionHandler){e(),this._processArguments();let a;return a=this._chainOrCallHooks(a,"preAction"),a=this._chainOrCall(a,()=>this._actionHandler(this.processedArgs)),this.parent&&(a=this._chainOrCall(a,()=>{this.parent.emit(i,r,n)})),a=this._chainOrCallHooks(a,"postAction"),a}if(this.parent&&this.parent.listenerCount(i))e(),this._processArguments(),this.parent.emit(i,r,n);else if(r.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",r,n);this.listenerCount("command:*")?this.emit("command:*",r,n):this.commands.length?this.unknownCommand():(e(),this._processArguments())}else this.commands.length?(e(),this.help({error:!0})):(e(),this._processArguments())}_findCommand(r){if(r)return this.commands.find(n=>n._name===r||n._aliases.includes(r))}_findOption(r){return this.options.find(n=>n.is(r))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(r=>{r.options.forEach(n=>{n.mandatory&&r.getOptionValue(n.attributeName())===void 0&&r.missingMandatoryOptionValue(n)})})}_checkForConflictingLocalOptions(){let r=this.options.filter(o=>{let e=o.attributeName();return this.getOptionValue(e)===void 0?!1:this.getOptionValueSource(e)!=="default"});r.filter(o=>o.conflictsWith.length>0).forEach(o=>{let e=r.find(i=>o.conflictsWith.includes(i.attributeName()));e&&this._conflictingOption(o,e)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(r=>{r._checkForConflictingLocalOptions()})}parseOptions(r){let n=[],o=[],e=n,i=r.slice();function a(u){return u.length>1&&u[0]==="-"}let s=null;for(;i.length;){let u=i.shift();if(u==="--"){e===o&&e.push(u),e.push(...i);break}if(s&&!a(u)){this.emit(`option:${s.name()}`,u);continue}if(s=null,a(u)){let l=this._findOption(u);if(l){if(l.required){let d=i.shift();d===void 0&&this.optionMissingArgument(l),this.emit(`option:${l.name()}`,d)}else if(l.optional){let d=null;i.length>0&&!a(i[0])&&(d=i.shift()),this.emit(`option:${l.name()}`,d)}else this.emit(`option:${l.name()}`);s=l.variadic?l:null;continue}}if(u.length>2&&u[0]==="-"&&u[1]!=="-"){let l=this._findOption(`-${u[1]}`);if(l){l.required||l.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${l.name()}`,u.slice(2)):(this.emit(`option:${l.name()}`),i.unshift(`-${u.slice(2)}`));continue}}if(/^--[^=]+=/.test(u)){let l=u.indexOf("="),d=this._findOption(u.slice(0,l));if(d&&(d.required||d.optional)){this.emit(`option:${d.name()}`,u.slice(l+1));continue}}if(a(u)&&(e=o),(this._enablePositionalOptions||this._passThroughOptions)&&n.length===0&&o.length===0){if(this._findCommand(u)){n.push(u),i.length>0&&o.push(...i);break}else if(this._getHelpCommand()&&u===this._getHelpCommand().name()){n.push(u),i.length>0&&n.push(...i);break}else if(this._defaultCommandName){o.push(u),i.length>0&&o.push(...i);break}}if(this._passThroughOptions){e.push(u),i.length>0&&e.push(...i);break}e.push(u)}return{operands:n,unknown:o}}opts(){if(this._storeOptionsAsProperties){let r={},n=this.options.length;for(let o=0;o<n;o++){let e=this.options[o].attributeName();r[e]=e===this._versionOptionName?this._version:this[e]}return r}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((r,n)=>Object.assign(r,n.opts()),{})}error(r,n){this._outputConfiguration.outputError(`${r}
22
+ - ${n}`;throw new Error(i)}_executeSubCommand(t,r){r=r.slice();let o=!1,n=[".js",".ts",".tsx",".mjs",".cjs"];function i(d,m){let g=xe.resolve(d,m);if(jn.existsSync(g))return g;if(n.includes(xe.extname(m)))return;let h=n.find(S=>jn.existsSync(`${g}${S}`));if(h)return`${g}${h}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=t._executableFile||`${this._name}-${t._name}`,c=this._executableDir||"";if(this._scriptPath){let d;try{d=jn.realpathSync(this._scriptPath)}catch{d=this._scriptPath}c=xe.resolve(xe.dirname(d),c)}if(c){let d=i(c,s);if(!d&&!t._executableFile&&this._scriptPath){let m=xe.basename(this._scriptPath,xe.extname(this._scriptPath));m!==this._name&&(d=i(c,`${m}-${t._name}`))}s=d||s}o=n.includes(xe.extname(s));let u;P.platform!=="win32"?o?(r.unshift(s),r=rd(P.execArgv).concat(r),u=qi.spawn(P.argv[0],r,{stdio:"inherit"})):u=qi.spawn(s,r,{stdio:"inherit"}):(this._checkForMissingExecutable(s,c,t._name),r.unshift(s),r=rd(P.execArgv).concat(r),u=qi.spawn(P.execPath,r,{stdio:"inherit"})),u.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(m=>{P.on(m,()=>{u.killed===!1&&u.exitCode===null&&u.kill(m)})});let l=this._exitCallback;u.on("close",d=>{d=d??1,l?l(new Ji(d,"commander.executeSubCommandAsync","(close)")):P.exit(d)}),u.on("error",d=>{if(d.code==="ENOENT")this._checkForMissingExecutable(s,c,t._name);else if(d.code==="EACCES")throw new Error(`'${s}' not executable`);if(!l)P.exit(1);else{let m=new Ji(1,"commander.executeSubCommandAsync","(error)");m.nestedError=d,l(m)}}),this.runningCommand=u}_dispatchSubcommand(t,r,o){let n=this._findCommand(t);n||this.help({error:!0}),n._prepareForParse();let i;return i=this._chainOrCallSubCommandHook(i,n,"preSubcommand"),i=this._chainOrCall(i,()=>{if(n._executableHandler)this._executeSubCommand(n,r.concat(o));else return n._parseCommand(r,o)}),i}_dispatchHelpCommand(t){t||this.help();let r=this._findCommand(t);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(t,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((t,r)=>{t.required&&this.args[r]==null&&this.missingArgument(t.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let t=(o,n,i)=>{let s=n;if(n!==null&&o.parseArg){let c=`error: command-argument value '${n}' is invalid for argument '${o.name()}'.`;s=this._callParseArg(o,n,i,c)}return s};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((o,n)=>{let i=o.defaultValue;o.variadic?n<this.args.length?(i=this.args.slice(n),o.parseArg&&(i=i.reduce((s,c)=>t(o,c,s),o.defaultValue))):i===void 0&&(i=[]):n<this.args.length&&(i=this.args[n],o.parseArg&&(i=t(o,i,o.defaultValue))),r[n]=i}),this.processedArgs=r}_chainOrCall(t,r){return t&&t.then&&typeof t.then=="function"?t.then(()=>r()):r()}_chainOrCallHooks(t,r){let o=t,n=[];return this._getCommandAndAncestors().reverse().filter(i=>i._lifeCycleHooks[r]!==void 0).forEach(i=>{i._lifeCycleHooks[r].forEach(s=>{n.push({hookedCommand:i,callback:s})})}),r==="postAction"&&n.reverse(),n.forEach(i=>{o=this._chainOrCall(o,()=>i.callback(i.hookedCommand,this))}),o}_chainOrCallSubCommandHook(t,r,o){let n=t;return this._lifeCycleHooks[o]!==void 0&&this._lifeCycleHooks[o].forEach(i=>{n=this._chainOrCall(n,()=>i(this,r))}),n}_parseCommand(t,r){let o=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),t=t.concat(o.operands),r=o.unknown,this.args=t.concat(r),t&&this._findCommand(t[0]))return this._dispatchSubcommand(t[0],t.slice(1),r);if(this._getHelpCommand()&&t[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(t[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,t,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(o.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let n=()=>{o.unknown.length>0&&this.unknownOption(o.unknown[0])},i=`command:${this.name()}`;if(this._actionHandler){n(),this._processArguments();let s;return s=this._chainOrCallHooks(s,"preAction"),s=this._chainOrCall(s,()=>this._actionHandler(this.processedArgs)),this.parent&&(s=this._chainOrCall(s,()=>{this.parent.emit(i,t,r)})),s=this._chainOrCallHooks(s,"postAction"),s}if(this.parent&&this.parent.listenerCount(i))n(),this._processArguments(),this.parent.emit(i,t,r);else if(t.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",t,r);this.listenerCount("command:*")?this.emit("command:*",t,r):this.commands.length?this.unknownCommand():(n(),this._processArguments())}else this.commands.length?(n(),this.help({error:!0})):(n(),this._processArguments())}_findCommand(t){if(t)return this.commands.find(r=>r._name===t||r._aliases.includes(t))}_findOption(t){return this.options.find(r=>r.is(t))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(t=>{t.options.forEach(r=>{r.mandatory&&t.getOptionValue(r.attributeName())===void 0&&t.missingMandatoryOptionValue(r)})})}_checkForConflictingLocalOptions(){let t=this.options.filter(o=>{let n=o.attributeName();return this.getOptionValue(n)===void 0?!1:this.getOptionValueSource(n)!=="default"});t.filter(o=>o.conflictsWith.length>0).forEach(o=>{let n=t.find(i=>o.conflictsWith.includes(i.attributeName()));n&&this._conflictingOption(o,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(t=>{t._checkForConflictingLocalOptions()})}parseOptions(t){let r=[],o=[],n=r,i=t.slice();function s(u){return u.length>1&&u[0]==="-"}let c=null;for(;i.length;){let u=i.shift();if(u==="--"){n===o&&n.push(u),n.push(...i);break}if(c&&!s(u)){this.emit(`option:${c.name()}`,u);continue}if(c=null,s(u)){let l=this._findOption(u);if(l){if(l.required){let d=i.shift();d===void 0&&this.optionMissingArgument(l),this.emit(`option:${l.name()}`,d)}else if(l.optional){let d=null;i.length>0&&!s(i[0])&&(d=i.shift()),this.emit(`option:${l.name()}`,d)}else this.emit(`option:${l.name()}`);c=l.variadic?l:null;continue}}if(u.length>2&&u[0]==="-"&&u[1]!=="-"){let l=this._findOption(`-${u[1]}`);if(l){l.required||l.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${l.name()}`,u.slice(2)):(this.emit(`option:${l.name()}`),i.unshift(`-${u.slice(2)}`));continue}}if(/^--[^=]+=/.test(u)){let l=u.indexOf("="),d=this._findOption(u.slice(0,l));if(d&&(d.required||d.optional)){this.emit(`option:${d.name()}`,u.slice(l+1));continue}}if(s(u)&&(n=o),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&o.length===0){if(this._findCommand(u)){r.push(u),i.length>0&&o.push(...i);break}else if(this._getHelpCommand()&&u===this._getHelpCommand().name()){r.push(u),i.length>0&&r.push(...i);break}else if(this._defaultCommandName){o.push(u),i.length>0&&o.push(...i);break}}if(this._passThroughOptions){n.push(u),i.length>0&&n.push(...i);break}n.push(u)}return{operands:r,unknown:o}}opts(){if(this._storeOptionsAsProperties){let t={},r=this.options.length;for(let o=0;o<r;o++){let n=this.options[o].attributeName();t[n]=n===this._versionOptionName?this._version:this[n]}return t}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((t,r)=>Object.assign(t,r.opts()),{})}error(t,r){this._outputConfiguration.outputError(`${t}
23
23
  `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
24
24
  `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
25
- `),this.outputHelp({error:!0}));let o=n||{},e=o.exitCode||1,i=o.code||"commander.error";this._exit(e,i,r)}_parseOptionsEnv(){this.options.forEach(r=>{if(r.envVar&&r.envVar in E.env){let n=r.attributeName();(this.getOptionValue(n)===void 0||["default","config","env"].includes(this.getOptionValueSource(n)))&&(r.required||r.optional?this.emit(`optionEnv:${r.name()}`,E.env[r.envVar]):this.emit(`optionEnv:${r.name()}`))}})}_parseOptionsImplied(){let r=new Ih(this.options),n=o=>this.getOptionValue(o)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(o));this.options.filter(o=>o.implied!==void 0&&n(o.attributeName())&&r.valueFromOption(this.getOptionValue(o.attributeName()),o)).forEach(o=>{Object.keys(o.implied).filter(e=>!n(e)).forEach(e=>{this.setOptionValueWithSource(e,o.implied[e],"implied")})})}missingArgument(r){let n=`error: missing required argument '${r}'`;this.error(n,{code:"commander.missingArgument"})}optionMissingArgument(r){let n=`error: option '${r.flags}' argument missing`;this.error(n,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(r){let n=`error: required option '${r.flags}' not specified`;this.error(n,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(r,n){let o=a=>{let s=a.attributeName(),u=this.getOptionValue(s),l=this.options.find(p=>p.negate&&s===p.attributeName()),d=this.options.find(p=>!p.negate&&s===p.attributeName());return l&&(l.presetArg===void 0&&u===!1||l.presetArg!==void 0&&u===l.presetArg)?l:d||a},e=a=>{let s=o(a),u=s.attributeName();return this.getOptionValueSource(u)==="env"?`environment variable '${s.envVar}'`:`option '${s.flags}'`},i=`error: ${e(r)} cannot be used with ${e(n)}`;this.error(i,{code:"commander.conflictingOption"})}unknownOption(r){if(this._allowUnknownOption)return;let n="";if(r.startsWith("--")&&this._showSuggestionAfterError){let e=[],i=this;do{let a=i.createHelp().visibleOptions(i).filter(s=>s.long).map(s=>s.long);e=e.concat(a),i=i.parent}while(i&&!i._enablePositionalOptions);n=Ml(r,e)}let o=`error: unknown option '${r}'${n}`;this.error(o,{code:"commander.unknownOption"})}_excessArguments(r){if(this._allowExcessArguments)return;let n=this.registeredArguments.length,o=n===1?"":"s",i=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${n} argument${o} but got ${r.length}.`;this.error(i,{code:"commander.excessArguments"})}unknownCommand(){let r=this.args[0],n="";if(this._showSuggestionAfterError){let e=[];this.createHelp().visibleCommands(this).forEach(i=>{e.push(i.name()),i.alias()&&e.push(i.alias())}),n=Ml(r,e)}let o=`error: unknown command '${r}'${n}`;this.error(o,{code:"commander.unknownCommand"})}version(r,n,o){if(r===void 0)return this._version;this._version=r,n=n||"-V, --version",o=o||"output the version number";let e=this.createOption(n,o);return this._versionOptionName=e.attributeName(),this._registerOption(e),this.on("option:"+e.name(),()=>{this._outputConfiguration.writeOut(`${r}
26
- `),this._exit(0,"commander.version",r)}),this}description(r,n){return r===void 0&&n===void 0?this._description:(this._description=r,n&&(this._argsDescription=n),this)}summary(r){return r===void 0?this._summary:(this._summary=r,this)}alias(r){if(r===void 0)return this._aliases[0];let n=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(n=this.commands[this.commands.length-1]),r===n._name)throw new Error("Command alias can't be the same as its name");let o=this.parent?._findCommand(r);if(o){let e=[o.name()].concat(o.aliases()).join("|");throw new Error(`cannot add alias '${r}' to command '${this.name()}' as already have command '${e}'`)}return n._aliases.push(r),this}aliases(r){return r===void 0?this._aliases:(r.forEach(n=>this.alias(n)),this)}usage(r){if(r===void 0){if(this._usage)return this._usage;let n=this.registeredArguments.map(o=>kh(o));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?n:[]).join(" ")}return this._usage=r,this}name(r){return r===void 0?this._name:(this._name=r,this)}nameFromFilename(r){return this._name=Se.basename(r,Se.extname(r)),this}executableDir(r){return r===void 0?this._executableDir:(this._executableDir=r,this)}helpInformation(r){let n=this.createHelp(),o=this._getOutputContext(r);n.prepareContext({error:o.error,helpWidth:o.helpWidth,outputHasColors:o.hasColors});let e=n.formatHelp(this,n);return o.hasColors?e:this._outputConfiguration.stripColor(e)}_getOutputContext(r){r=r||{};let n=!!r.error,o,e,i;return n?(o=s=>this._outputConfiguration.writeErr(s),e=this._outputConfiguration.getErrHasColors(),i=this._outputConfiguration.getErrHelpWidth()):(o=s=>this._outputConfiguration.writeOut(s),e=this._outputConfiguration.getOutHasColors(),i=this._outputConfiguration.getOutHelpWidth()),{error:n,write:s=>(e||(s=this._outputConfiguration.stripColor(s)),o(s)),hasColors:e,helpWidth:i}}outputHelp(r){let n;typeof r=="function"&&(n=r,r=void 0);let o=this._getOutputContext(r),e={error:o.error,write:o.write,command:this};this._getCommandAndAncestors().reverse().forEach(a=>a.emit("beforeAllHelp",e)),this.emit("beforeHelp",e);let i=this.helpInformation({error:o.error});if(n&&(i=n(i),typeof i!="string"&&!Buffer.isBuffer(i)))throw new Error("outputHelp callback must return a string or a Buffer");o.write(i),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",e),this._getCommandAndAncestors().forEach(a=>a.emit("afterAllHelp",e))}helpOption(r,n){return typeof r=="boolean"?(r?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(r=r??"-h, --help",n=n??"display help for command",this._helpOption=this.createOption(r,n),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(r){return this._helpOption=r,this}help(r){this.outputHelp(r);let n=Number(E.exitCode??0);n===0&&r&&typeof r!="function"&&r.error&&(n=1),this._exit(n,"commander.help","(outputHelp)")}addHelpText(r,n){let o=["beforeAll","before","after","afterAll"];if(!o.includes(r))throw new Error(`Unexpected value for position to addHelpText.
27
- Expecting one of '${o.join("', '")}'`);let e=`${r}Help`;return this.on(e,i=>{let a;typeof n=="function"?a=n({error:i.error,command:i.command}):a=n,a&&i.write(`${a}
28
- `)}),this}_outputHelpIfRequested(r){let n=this._getHelpOption();n&&r.find(e=>n.is(e))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Vl(t){return t.map(r=>{if(!r.startsWith("--inspect"))return r;let n,o="127.0.0.1",e="9229",i;return(i=r.match(/^(--inspect(-brk)?)$/))!==null?n=i[1]:(i=r.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(n=i[1],/^\d+$/.test(i[3])?e=i[3]:o=i[3]):(i=r.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(n=i[1],o=i[3],e=i[4]),n&&e!=="0"?`${n}=${o}:${parseInt(e)+1}`:r})}function no(){if(E.env.NO_COLOR||E.env.FORCE_COLOR==="0"||E.env.FORCE_COLOR==="false")return!1;if(E.env.FORCE_COLOR||E.env.CLICOLOR_FORCE!==void 0)return!0}io.Command=ro;io.useColor=no});var Jl=Me(ie=>{var{Argument:Gl}=Ur(),{Command:oo}=Bl(),{CommanderError:zh,InvalidArgumentError:Wl}=Zt(),{Help:Oh}=qi(),{Option:Hl}=Qi();ie.program=new oo;ie.createCommand=t=>new oo(t);ie.createOption=(t,r)=>new Hl(t,r);ie.createArgument=(t,r)=>new Gl(t,r);ie.Command=oo;ie.Option=Hl;ie.Argument=Gl;ie.Help=Oh;ie.CommanderError=zh;ie.InvalidArgumentError=Wl;ie.InvalidOptionArgumentError=Wl});var ql=ph(Jl(),1),{program:kx,createCommand:Sx,createArgument:wx,createOption:Ix,CommanderError:zx,InvalidArgumentError:Ox,InvalidOptionArgumentError:Ex,Command:Kl,Argument:Px,Option:Tx,Help:jx}=ql.default;import{readFile as sx}from"node:fs/promises";import{fileURLToPath as cx}from"node:url";import{dirname as ux,join as lx}from"node:path";var k=class extends Error{constructor(n,o,e){super(n);this.status=o;this.name="CliError",this.code=e?.code,this.details=e?.details}status;code;details};var Lt="x-fs-surface",Ft="cli",Eh="management";function Qe(t,r){let n=new URLSearchParams;for(let[e,i]of Object.entries(r))i&&n.set(e,i);let o=n.toString();return o?`${t}?${o}`:t}function Yl(t){let r=null;async function n(){let a=await fetch(`${t.apiUrl}/auth/cli/exchange`,{method:"POST",headers:{Authorization:`Bearer ${t.token}`,"Content-Type":"application/json",[Lt]:Ft}});if(!a.ok){let u=(await a.json().catch(()=>null))?.error,l=typeof u=="string"?{message:u}:u;throw new k(l?.message??a.statusText,a.status,{code:l?.code,details:l?.details})}return r=await a.json(),r}function o(a){return a.split("/",3)[1]===Eh}async function e(a){if(!t.token.startsWith("mk_")||o(a))return t.token;let s=r?Date.parse(r.expiresAt):0;return(!r||s-Date.now()<6e4)&&await n(),r.accessToken}async function i(a,s,u){let l=await e(s),d=await fetch(`${t.apiUrl}${s}`,{method:a,headers:{Authorization:`Bearer ${l}`,"Content-Type":"application/json",[Lt]:Ft},body:u?JSON.stringify(u):void 0});if(!d.ok){let g=(await d.json().catch(()=>null))?.error,h=typeof g=="string"?{message:g}:g;throw new k(h?.message??d.statusText,d.status,{code:h?.code,details:h?.details})}if(d.status!==204)return d.json()}return{exchangeCliToken:n,bootstrap:()=>i("POST","/builder/context/bootstrap"),listProducts:()=>i("GET","/products"),initProduct:a=>i("POST","/products/init",a),updateProduct:(a,s,u)=>i("PATCH",Qe(`/products/${a}`,{env:u?.env}),s),publishProduct:a=>i("POST",`/products/${a}/publish`),createPlan:(a,s,u)=>i("POST",Qe(`/products/${a}/plans`,{env:u?.env}),s),updatePlan:(a,s,u,l)=>i("PATCH",Qe(`/products/${a}/plans/${s}`,{env:l?.env}),u),deletePlan:(a,s,u)=>i("DELETE",Qe(`/products/${a}/plans/${s}`,{env:u?.env})),getProduct:(a,s)=>i("GET",Qe(`/products/${a}`,{env:s?.env})),listEnvironments:a=>i("GET",`/products/${a}/environments`),createEnvironment:(a,s)=>i("POST",`/products/${a}/environments`,s),deleteEnvironment:(a,s)=>i("DELETE",`/products/${a}/environments/${encodeURIComponent(s)}`),deleteProduct:a=>i("DELETE",`/products/${a}`),managementListPlans:a=>i("GET",`/management/products/${a}/plans`),managementGetUsage:a=>i("GET",`/management/products/${a}/usage`),managementListMakerTokens:()=>i("GET","/maker-tokens"),managementCreateMakerToken:a=>i("POST","/maker-tokens",a),managementRevokeMakerToken:a=>i("DELETE",`/maker-tokens/${a}`),managementListMeteringTokens:a=>i("GET",`/management/products/${a}/metering-tokens`),managementCreateMeteringToken:(a,s)=>i("POST",`/management/products/${a}/metering-tokens`,s),managementRevokeMeteringToken:(a,s)=>i("DELETE",`/management/products/${a}/metering-tokens/${s}`),builderGitHubStatus:()=>i("GET","/builder/git/github/status"),productStripeStatus:a=>i("GET",`/products/${a}/stripe/status`),issuePersonaBootstrapKey:async(a,s,u)=>{let l=await fetch(`${t.apiUrl}/portal/products/${a}/environments/${s}/test/bootstrap-key`,{method:"POST",headers:{Authorization:`Bearer ${t.token}`,"Content-Type":"application/json",[Lt]:Ft},body:JSON.stringify(u??{})});if(!l.ok){let p=(await l.json().catch(()=>null))?.error,g=typeof p=="string"?{message:p}:p;throw new k(g?.message??l.statusText,l.status,{code:g?.code,details:g?.details})}return l.json()},listPersonas:async(a,s)=>{let u=await fetch(`${t.apiUrl}/portal/products/${a}/environments/${s}/test/personas`,{method:"GET",headers:{Authorization:`Bearer ${t.token}`,[Lt]:Ft}});if(!u.ok){let d=(await u.json().catch(()=>null))?.error,p=typeof d=="string"?{message:d}:d;throw new k(p?.message??u.statusText,u.status,{code:p?.code,details:p?.details})}return u.json()},revokePersona:async(a,s,u)=>{let l=await fetch(`${t.apiUrl}/portal/products/${a}/environments/${s}/test/personas/${u}`,{method:"DELETE",headers:{Authorization:`Bearer ${t.token}`,[Lt]:Ft}});if(!l.ok){let p=(await l.json().catch(()=>null))?.error,g=typeof p=="string"?{message:p}:p;throw new k(g?.message??l.statusText,l.status,{code:g?.code,details:g?.details})}return l.json()},getProductConfig:(a,s)=>i("GET",Qe(`/products/${a}/config`,{format:"json",env:s?.env,state:s?.state})),updateProductConfigDraft:(a,s,u)=>i("PATCH",`/products/${a}/config/draft`,{spec:s,env:u?.env,branch:u?.branch,source:u?.source,baseDraftHash:u?.baseDraftHash})}}import{existsSync as Zr,mkdirSync as Ph,readFileSync as ed,writeFileSync as td}from"node:fs";import{homedir as Th}from"node:os";import{join as so}from"node:path";var Xl="https://core.farthershore.com";var Lr=so(Th(),".farthershore"),Ql=so(Lr,"config.json"),Mt=so(Lr,"credentials.json");function rd(t){Zr(t)||Ph(t,{recursive:!0,mode:448})}var ao={apiUrl:Xl};function nd(){if(rd(Lr),!Zr(Ql))return ao;try{let t=JSON.parse(ed(Ql,"utf-8"));return{...ao,...t}}catch{return ao}}function Fr(){if(!Zr(Mt))return null;try{return JSON.parse(ed(Mt,"utf-8"))}catch{return null}}function id(t){rd(Lr),td(Mt,JSON.stringify(t,null,2)+`
29
- `,{mode:384})}function od(){Zr(Mt)&&td(Mt,"{}")}function ad(t){if(t)return t;let r=process.env.FARTHERSHORE_TOKEN;if(r)return r;let n=Fr();if(n?.token)return n.token;throw new k("Not authenticated. Run `farthershore auth login` or set FARTHERSHORE_TOKEN environment variable.")}import{createInterface as Jh}from"node:readline";var sd=(t=0)=>r=>`\x1B[${r+t}m`,cd=(t=0)=>r=>`\x1B[${38+t};5;${r}m`,ud=(t=0)=>(r,n,o)=>`\x1B[${38+t};2;${r};${n};${o}m`,C={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},Wx=Object.keys(C.modifier),jh=Object.keys(C.color),Ah=Object.keys(C.bgColor),Hx=[...jh,...Ah];function Nh(){let t=new Map;for(let[r,n]of Object.entries(C)){for(let[o,e]of Object.entries(n))C[o]={open:`\x1B[${e[0]}m`,close:`\x1B[${e[1]}m`},n[o]=C[o],t.set(e[0],e[1]);Object.defineProperty(C,r,{value:n,enumerable:!1})}return Object.defineProperty(C,"codes",{value:t,enumerable:!1}),C.color.close="\x1B[39m",C.bgColor.close="\x1B[49m",C.color.ansi=sd(),C.color.ansi256=cd(),C.color.ansi16m=ud(),C.bgColor.ansi=sd(10),C.bgColor.ansi256=cd(10),C.bgColor.ansi16m=ud(10),Object.defineProperties(C,{rgbToAnsi256:{value(r,n,o){return r===n&&n===o?r<8?16:r>248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/255*5)+6*Math.round(n/255*5)+Math.round(o/255*5)},enumerable:!1},hexToRgb:{value(r){let n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(r.toString(16));if(!n)return[0,0,0];let[o]=n;o.length===3&&(o=[...o].map(i=>i+i).join(""));let e=Number.parseInt(o,16);return[e>>16&255,e>>8&255,e&255]},enumerable:!1},hexToAnsi256:{value:r=>C.rgbToAnsi256(...C.hexToRgb(r)),enumerable:!1},ansi256ToAnsi:{value(r){if(r<8)return 30+r;if(r<16)return 90+(r-8);let n,o,e;if(r>=232)n=((r-232)*10+8)/255,o=n,e=n;else{r-=16;let s=r%36;n=Math.floor(r/36)/5,o=Math.floor(s/6)/5,e=s%6/5}let i=Math.max(n,o,e)*2;if(i===0)return 30;let a=30+(Math.round(e)<<2|Math.round(o)<<1|Math.round(n));return i===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(r,n,o)=>C.ansi256ToAnsi(C.rgbToAnsi256(r,n,o)),enumerable:!1},hexToAnsi:{value:r=>C.ansi256ToAnsi(C.hexToAnsi256(r)),enumerable:!1}}),C}var Ch=Nh(),se=Ch;import co from"node:process";import Dh from"node:os";import ld from"node:tty";function oe(t,r=globalThis.Deno?globalThis.Deno.args:co.argv){let n=t.startsWith("-")?"":t.length===1?"-":"--",o=r.indexOf(n+t),e=r.indexOf("--");return o!==-1&&(e===-1||o<e)}var{env:D}=co,Mr;oe("no-color")||oe("no-colors")||oe("color=false")||oe("color=never")?Mr=0:(oe("color")||oe("colors")||oe("color=true")||oe("color=always"))&&(Mr=1);function Uh(){if("FORCE_COLOR"in D)return D.FORCE_COLOR==="true"?1:D.FORCE_COLOR==="false"?0:D.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(D.FORCE_COLOR,10),3)}function Rh(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Zh(t,{streamIsTTY:r,sniffFlags:n=!0}={}){let o=Uh();o!==void 0&&(Mr=o);let e=n?Mr:o;if(e===0)return 0;if(n){if(oe("color=16m")||oe("color=full")||oe("color=truecolor"))return 3;if(oe("color=256"))return 2}if("TF_BUILD"in D&&"AGENT_NAME"in D)return 1;if(t&&!r&&e===void 0)return 0;let i=e||0;if(D.TERM==="dumb")return i;if(co.platform==="win32"){let a=Dh.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in D)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(a=>a in D)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(a=>a in D)||D.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in D)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(D.TEAMCITY_VERSION)?1:0;if(D.COLORTERM==="truecolor"||D.TERM==="xterm-kitty"||D.TERM==="xterm-ghostty"||D.TERM==="wezterm")return 3;if("TERM_PROGRAM"in D){let a=Number.parseInt((D.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(D.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(D.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(D.TERM)||"COLORTERM"in D?1:i}function dd(t,r={}){let n=Zh(t,{streamIsTTY:t&&t.isTTY,...r});return Rh(n)}var Lh={stdout:dd({isTTY:ld.isatty(1)}),stderr:dd({isTTY:ld.isatty(2)})},md=Lh;function pd(t,r,n){let o=t.indexOf(r);if(o===-1)return t;let e=r.length,i=0,a="";do a+=t.slice(i,o)+r+n,i=o+e,o=t.indexOf(r,i);while(o!==-1);return a+=t.slice(i),a}function fd(t,r,n,o){let e=0,i="";do{let a=t[o-1]==="\r";i+=t.slice(e,a?o-1:o)+r+(a?`\r
25
+ `),this.outputHelp({error:!0}));let o=r||{},n=o.exitCode||1,i=o.code||"commander.error";this._exit(n,i,t)}_parseOptionsEnv(){this.options.forEach(t=>{if(t.envVar&&t.envVar in P.env){let r=t.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(t.required||t.optional?this.emit(`optionEnv:${t.name()}`,P.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new x_(this.options),r=o=>this.getOptionValue(o)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(o));this.options.filter(o=>o.implied!==void 0&&r(o.attributeName())&&t.valueFromOption(this.getOptionValue(o.attributeName()),o)).forEach(o=>{Object.keys(o.implied).filter(n=>!r(n)).forEach(n=>{this.setOptionValueWithSource(n,o.implied[n],"implied")})})}missingArgument(t){let r=`error: missing required argument '${t}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(t){let r=`error: option '${t.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){let r=`error: required option '${t.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,r){let o=s=>{let c=s.attributeName(),u=this.getOptionValue(c),l=this.options.find(m=>m.negate&&c===m.attributeName()),d=this.options.find(m=>!m.negate&&c===m.attributeName());return l&&(l.presetArg===void 0&&u===!1||l.presetArg!==void 0&&u===l.presetArg)?l:d||s},n=s=>{let c=o(s),u=c.attributeName();return this.getOptionValueSource(u)==="env"?`environment variable '${c.envVar}'`:`option '${c.flags}'`},i=`error: ${n(t)} cannot be used with ${n(r)}`;this.error(i,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let r="";if(t.startsWith("--")&&this._showSuggestionAfterError){let n=[],i=this;do{let s=i.createHelp().visibleOptions(i).filter(c=>c.long).map(c=>c.long);n=n.concat(s),i=i.parent}while(i&&!i._enablePositionalOptions);r=nd(t,n)}let o=`error: unknown option '${t}'${r}`;this.error(o,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,o=r===1?"":"s",i=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${o} but got ${t.length}.`;this.error(i,{code:"commander.excessArguments"})}unknownCommand(){let t=this.args[0],r="";if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(i=>{n.push(i.name()),i.alias()&&n.push(i.alias())}),r=nd(t,n)}let o=`error: unknown command '${t}'${r}`;this.error(o,{code:"commander.unknownCommand"})}version(t,r,o){if(t===void 0)return this._version;this._version=t,r=r||"-V, --version",o=o||"output the version number";let n=this.createOption(r,o);return this._versionOptionName=n.attributeName(),this._registerOption(n),this.on("option:"+n.name(),()=>{this._outputConfiguration.writeOut(`${t}
26
+ `),this._exit(0,"commander.version",t)}),this}description(t,r){return t===void 0&&r===void 0?this._description:(this._description=t,r&&(this._argsDescription=r),this)}summary(t){return t===void 0?this._summary:(this._summary=t,this)}alias(t){if(t===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),t===r._name)throw new Error("Command alias can't be the same as its name");let o=this.parent?._findCommand(t);if(o){let n=[o.name()].concat(o.aliases()).join("|");throw new Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${n}'`)}return r._aliases.push(t),this}aliases(t){return t===void 0?this._aliases:(t.forEach(r=>this.alias(r)),this)}usage(t){if(t===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(o=>v_(o));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=t,this}name(t){return t===void 0?this._name:(this._name=t,this)}nameFromFilename(t){return this._name=xe.basename(t,xe.extname(t)),this}executableDir(t){return t===void 0?this._executableDir:(this._executableDir=t,this)}helpInformation(t){let r=this.createHelp(),o=this._getOutputContext(t);r.prepareContext({error:o.error,helpWidth:o.helpWidth,outputHasColors:o.hasColors});let n=r.formatHelp(this,r);return o.hasColors?n:this._outputConfiguration.stripColor(n)}_getOutputContext(t){t=t||{};let r=!!t.error,o,n,i;return r?(o=c=>this._outputConfiguration.writeErr(c),n=this._outputConfiguration.getErrHasColors(),i=this._outputConfiguration.getErrHelpWidth()):(o=c=>this._outputConfiguration.writeOut(c),n=this._outputConfiguration.getOutHasColors(),i=this._outputConfiguration.getOutHelpWidth()),{error:r,write:c=>(n||(c=this._outputConfiguration.stripColor(c)),o(c)),hasColors:n,helpWidth:i}}outputHelp(t){let r;typeof t=="function"&&(r=t,t=void 0);let o=this._getOutputContext(t),n={error:o.error,write:o.write,command:this};this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let i=this.helpInformation({error:o.error});if(r&&(i=r(i),typeof i!="string"&&!Buffer.isBuffer(i)))throw new Error("outputHelp callback must return a string or a Buffer");o.write(i),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",n),this._getCommandAndAncestors().forEach(s=>s.emit("afterAllHelp",n))}helpOption(t,r){return typeof t=="boolean"?(t?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(t=t??"-h, --help",r=r??"display help for command",this._helpOption=this.createOption(t,r),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(t){return this._helpOption=t,this}help(t){this.outputHelp(t);let r=Number(P.exitCode??0);r===0&&t&&typeof t!="function"&&t.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(t,r){let o=["beforeAll","before","after","afterAll"];if(!o.includes(t))throw new Error(`Unexpected value for position to addHelpText.
27
+ Expecting one of '${o.join("', '")}'`);let n=`${t}Help`;return this.on(n,i=>{let s;typeof r=="function"?s=r({error:i.error,command:i.command}):s=r,s&&i.write(`${s}
28
+ `)}),this}_outputHelpIfRequested(t){let r=this._getHelpOption();r&&t.find(n=>r.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function rd(e){return e.map(t=>{if(!t.startsWith("--inspect"))return t;let r,o="127.0.0.1",n="9229",i;return(i=t.match(/^(--inspect(-brk)?)$/))!==null?r=i[1]:(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=i[1],/^\d+$/.test(i[3])?n=i[3]:o=i[3]):(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=i[1],o=i[3],n=i[4]),r&&n!=="0"?`${r}=${o}:${parseInt(n)+1}`:t})}function Xi(){if(P.env.NO_COLOR||P.env.FORCE_COLOR==="0"||P.env.FORCE_COLOR==="false")return!1;if(P.env.FORCE_COLOR||P.env.CLICOLOR_FORCE!==void 0)return!0}Qi.Command=Yi;Qi.useColor=Xi});var cd=Fe(re=>{var{Argument:od}=zn(),{Command:eo}=id(),{CommanderError:k_,InvalidArgumentError:ad}=Zt(),{Help:S_}=Bi(),{Option:sd}=Wi();re.program=new eo;re.createCommand=e=>new eo(e);re.createOption=(e,t)=>new sd(e,t);re.createArgument=(e,t)=>new od(e,t);re.Command=eo;re.Option=sd;re.Argument=od;re.Help=S_;re.CommanderError=k_;re.InvalidArgumentError=ad;re.InvalidOptionArgumentError=ad});var ud=c_(cd(),1),{program:X$,createCommand:Q$,createArgument:eI,createOption:tI,CommanderError:nI,InvalidArgumentError:rI,InvalidOptionArgumentError:iI,Command:ld,Argument:oI,Option:aI,Help:sI}=ud.default;import{readFile as D$}from"node:fs/promises";import{fileURLToPath as z$}from"node:url";import{dirname as j$,join as U$}from"node:path";var k=class extends Error{constructor(r,o,n){super(r);this.status=o;this.name="CliError",this.code=n?.code,this.details=n?.details,this.param=n?.param}status;code;details;param};var Vt="x-fs-surface",Bt="cli",$_="management";function Qe(e,t){let r=new URLSearchParams;for(let[n,i]of Object.entries(t))i&&r.set(n,i);let o=r.toString();return o?`${e}?${o}`:e}function I_(e){let t=e.includes("?")?"&":"?";return`${e}${t}dry_run=true`}function dd(e){let t=null;async function r(){let s=await fetch(`${e.apiUrl}/auth/cli/exchange`,{method:"POST",headers:{Authorization:`Bearer ${e.token}`,"Content-Type":"application/json",[Vt]:Bt}});if(!s.ok){let u=(await s.json().catch(()=>null))?.error,l=typeof u=="string"?{message:u}:u;throw new k(l?.message??s.statusText,s.status,{code:l?.code,details:l?.details})}return t=await s.json(),t}function o(s){return s.split("/",3)[1]===$_}async function n(s){if(!e.token.startsWith("mk_")||o(s))return e.token;let c=t?Date.parse(t.expiresAt):0;return(!t||c-Date.now()<6e4)&&await r(),t.accessToken}async function i(s,c,u,l){let d=await n(c),m=l?.dryRun?I_(c):c,g={Authorization:`Bearer ${d}`,"Content-Type":"application/json",[Vt]:Bt};l?.idempotencyKey&&(g["Idempotency-Key"]=l.idempotencyKey);let h=await fetch(`${e.apiUrl}${m}`,{method:s,headers:g,body:u?JSON.stringify(u):void 0});if(!h.ok){let C=(await h.json().catch(()=>null))?.error,A=typeof C=="string"?{message:C}:C;throw new k(A?.message??h.statusText,h.status,{code:A?.code,details:A?.details})}if(h.status!==204)return h.json()}return{exchangeCliToken:r,bootstrap:()=>i("POST","/builder/context/bootstrap"),listProducts:()=>i("GET","/products"),initProduct:(s,c)=>i("POST","/products/init",s,c),updateProduct:(s,c,u)=>i("PATCH",Qe(`/products/${s}`,{env:u?.env}),c),publishProduct:(s,c)=>i("POST",`/products/${s}/publish`,void 0,c),createPlan:(s,c,u,l)=>i("POST",Qe(`/products/${s}/plans`,{env:u?.env}),c,l),updatePlan:(s,c,u,l)=>i("PATCH",Qe(`/products/${s}/plans/${c}`,{env:l?.env}),u),deletePlan:(s,c,u)=>i("DELETE",Qe(`/products/${s}/plans/${c}`,{env:u?.env})),getProduct:(s,c)=>i("GET",Qe(`/products/${s}`,{env:c?.env})),listEnvironments:s=>i("GET",`/products/${s}/environments`),createEnvironment:(s,c,u)=>i("POST",`/products/${s}/environments`,c,u),deleteEnvironment:(s,c)=>i("DELETE",`/products/${s}/environments/${encodeURIComponent(c)}`),deleteProduct:s=>i("DELETE",`/products/${s}`),managementListPlans:s=>i("GET",`/management/products/${s}/plans`),managementGetUsage:s=>i("GET",`/management/products/${s}/usage`),managementListMakerTokens:()=>i("GET","/maker-tokens"),managementCreateMakerToken:(s,c)=>i("POST","/maker-tokens",s,c),managementRevokeMakerToken:s=>i("DELETE",`/maker-tokens/${s}`),builderListBackends:s=>i("GET",`/products/${s}/backends`),builderCreateBackend:(s,c,u)=>i("POST",`/products/${s}/backends`,c,u),builderDeleteBackend:(s,c)=>i("DELETE",`/products/${s}/backends/${c}`),builderListRuntimeTokens:s=>i("GET",`/products/${s}/runtime-tokens`),builderCreateRuntimeToken:(s,c,u)=>i("POST",`/products/${s}/runtime-tokens`,c,u),builderRotateRuntimeToken:(s,c,u)=>i("POST",`/products/${s}/runtime-tokens/${c}/rotate`,void 0,u),builderRevokeRuntimeToken:(s,c)=>i("DELETE",`/products/${s}/runtime-tokens/${c}`),builderGitHubStatus:()=>i("GET","/builder/git/github/status"),productStripeStatus:s=>i("GET",`/products/${s}/stripe/status`),issuePersonaBootstrapKey:async(s,c,u)=>{let l=await fetch(`${e.apiUrl}/portal/products/${s}/environments/${c}/test/bootstrap-key`,{method:"POST",headers:{Authorization:`Bearer ${e.token}`,"Content-Type":"application/json",[Vt]:Bt},body:JSON.stringify(u??{})});if(!l.ok){let m=(await l.json().catch(()=>null))?.error,g=typeof m=="string"?{message:m}:m;throw new k(g?.message??l.statusText,l.status,{code:g?.code,details:g?.details})}return l.json()},listPersonas:async(s,c)=>{let u=await fetch(`${e.apiUrl}/portal/products/${s}/environments/${c}/test/personas`,{method:"GET",headers:{Authorization:`Bearer ${e.token}`,[Vt]:Bt}});if(!u.ok){let d=(await u.json().catch(()=>null))?.error,m=typeof d=="string"?{message:d}:d;throw new k(m?.message??u.statusText,u.status,{code:m?.code,details:m?.details})}return u.json()},revokePersona:async(s,c,u)=>{let l=await fetch(`${e.apiUrl}/portal/products/${s}/environments/${c}/test/personas/${u}`,{method:"DELETE",headers:{Authorization:`Bearer ${e.token}`,[Vt]:Bt}});if(!l.ok){let m=(await l.json().catch(()=>null))?.error,g=typeof m=="string"?{message:m}:m;throw new k(g?.message??l.statusText,l.status,{code:g?.code,details:g?.details})}return l.json()},getProductConfig:(s,c)=>i("GET",Qe(`/products/${s}/config`,{format:"json",env:c?.env,state:c?.state})),updateProductConfigDraft:(s,c,u)=>i("PATCH",`/products/${s}/config/draft`,{spec:c,env:u?.env,branch:u?.branch,source:u?.source,baseDraftHash:u?.baseDraftHash})}}import{existsSync as Un,mkdirSync as w_,readFileSync as fd,writeFileSync as gd}from"node:fs";import{homedir as E_}from"node:os";import{join as no}from"node:path";var md="https://core.farthershore.com";var Ln=no(E_(),".farthershore"),pd=no(Ln,"config.json"),Ht=no(Ln,"credentials.json");function hd(e){Un(e)||w_(e,{recursive:!0,mode:448})}var to={apiUrl:md};function _d(){if(hd(Ln),!Un(pd))return to;try{let e=JSON.parse(fd(pd,"utf-8"));return{...to,...e}}catch{return to}}function Mn(){if(!Un(Ht))return null;try{return JSON.parse(fd(Ht,"utf-8"))}catch{return null}}function vd(e){hd(Ln),gd(Ht,JSON.stringify(e,null,2)+`
29
+ `,{mode:384})}function bd(){Un(Ht)&&gd(Ht,"{}")}function yd(e){if(e)return e;let t=process.env.FARTHERSHORE_TOKEN;if(t)return t;let r=Mn();if(r?.token)return r.token;throw new k("Not authenticated. Run `farthershore auth login` or set FARTHERSHORE_TOKEN environment variable.")}import{createInterface as Yk}from"node:readline";var xd=(e=0)=>t=>`\x1B[${t+e}m`,kd=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Sd=(e=0)=>(t,r,o)=>`\x1B[${38+e};2;${t};${r};${o}m`,U={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},xI=Object.keys(U.modifier),O_=Object.keys(U.color),T_=Object.keys(U.bgColor),kI=[...O_,...T_];function P_(){let e=new Map;for(let[t,r]of Object.entries(U)){for(let[o,n]of Object.entries(r))U[o]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},r[o]=U[o],e.set(n[0],n[1]);Object.defineProperty(U,t,{value:r,enumerable:!1})}return Object.defineProperty(U,"codes",{value:e,enumerable:!1}),U.color.close="\x1B[39m",U.bgColor.close="\x1B[49m",U.color.ansi=xd(),U.color.ansi256=kd(),U.color.ansi16m=Sd(),U.bgColor.ansi=xd(10),U.bgColor.ansi256=kd(10),U.bgColor.ansi16m=Sd(10),Object.defineProperties(U,{rgbToAnsi256:{value(t,r,o){return t===r&&r===o?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(o/255*5)},enumerable:!1},hexToRgb:{value(t){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[o]=r;o.length===3&&(o=[...o].map(i=>i+i).join(""));let n=Number.parseInt(o,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:t=>U.rgbToAnsi256(...U.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,o,n;if(t>=232)r=((t-232)*10+8)/255,o=r,n=r;else{t-=16;let c=t%36;r=Math.floor(t/36)/5,o=Math.floor(c/6)/5,n=c%6/5}let i=Math.max(r,o,n)*2;if(i===0)return 30;let s=30+(Math.round(n)<<2|Math.round(o)<<1|Math.round(r));return i===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(t,r,o)=>U.ansi256ToAnsi(U.rgbToAnsi256(t,r,o)),enumerable:!1},hexToAnsi:{value:t=>U.ansi256ToAnsi(U.hexToAnsi256(t)),enumerable:!1}}),U}var A_=P_(),ae=A_;import ro from"node:process";import N_ from"node:os";import $d from"node:tty";function ie(e,t=globalThis.Deno?globalThis.Deno.args:ro.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",o=t.indexOf(r+e),n=t.indexOf("--");return o!==-1&&(n===-1||o<n)}var{env:L}=ro,Fn;ie("no-color")||ie("no-colors")||ie("color=false")||ie("color=never")?Fn=0:(ie("color")||ie("colors")||ie("color=true")||ie("color=always"))&&(Fn=1);function C_(){if("FORCE_COLOR"in L)return L.FORCE_COLOR==="true"?1:L.FORCE_COLOR==="false"?0:L.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(L.FORCE_COLOR,10),3)}function R_(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function D_(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let o=C_();o!==void 0&&(Fn=o);let n=r?Fn:o;if(n===0)return 0;if(r){if(ie("color=16m")||ie("color=full")||ie("color=truecolor"))return 3;if(ie("color=256"))return 2}if("TF_BUILD"in L&&"AGENT_NAME"in L)return 1;if(e&&!t&&n===void 0)return 0;let i=n||0;if(L.TERM==="dumb")return i;if(ro.platform==="win32"){let s=N_.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in L)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(s=>s in L)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(s=>s in L)||L.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in L)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(L.TEAMCITY_VERSION)?1:0;if(L.COLORTERM==="truecolor"||L.TERM==="xterm-kitty"||L.TERM==="xterm-ghostty"||L.TERM==="wezterm")return 3;if("TERM_PROGRAM"in L){let s=Number.parseInt((L.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(L.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(L.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(L.TERM)||"COLORTERM"in L?1:i}function Id(e,t={}){let r=D_(e,{streamIsTTY:e&&e.isTTY,...t});return R_(r)}var z_={stdout:Id({isTTY:$d.isatty(1)}),stderr:Id({isTTY:$d.isatty(2)})},wd=z_;function Ed(e,t,r){let o=e.indexOf(t);if(o===-1)return e;let n=t.length,i=0,s="";do s+=e.slice(i,o)+t+r,i=o+n,o=e.indexOf(t,i);while(o!==-1);return s+=e.slice(i),s}function Od(e,t,r,o){let n=0,i="";do{let s=e[o-1]==="\r";i+=e.slice(n,s?o-1:o)+t+(s?`\r
30
30
  `:`
31
- `)+n,e=o+1,o=t.indexOf(`
32
- `,e)}while(o!==-1);return i+=t.slice(e),i}var{stdout:gd,stderr:hd}=md,uo=Symbol("GENERATOR"),et=Symbol("STYLER"),Vt=Symbol("IS_EMPTY"),vd=["ansi","ansi","ansi256","ansi16m"],tt=Object.create(null),Fh=(t,r={})=>{if(r.level&&!(Number.isInteger(r.level)&&r.level>=0&&r.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let n=gd?gd.level:0;t.level=r.level===void 0?n:r.level};var Mh=t=>{let r=(...n)=>n.join(" ");return Fh(r,t),Object.setPrototypeOf(r,Bt.prototype),r};function Bt(t){return Mh(t)}Object.setPrototypeOf(Bt.prototype,Function.prototype);for(let[t,r]of Object.entries(se))tt[t]={get(){let n=Vr(this,mo(r.open,r.close,this[et]),this[Vt]);return Object.defineProperty(this,t,{value:n}),n}};tt.visible={get(){let t=Vr(this,this[et],!0);return Object.defineProperty(this,"visible",{value:t}),t}};var lo=(t,r,n,...o)=>t==="rgb"?r==="ansi16m"?se[n].ansi16m(...o):r==="ansi256"?se[n].ansi256(se.rgbToAnsi256(...o)):se[n].ansi(se.rgbToAnsi(...o)):t==="hex"?lo("rgb",r,n,...se.hexToRgb(...o)):se[n][t](...o),Vh=["rgb","hex","ansi256"];for(let t of Vh){tt[t]={get(){let{level:n}=this;return function(...o){let e=mo(lo(t,vd[n],"color",...o),se.color.close,this[et]);return Vr(this,e,this[Vt])}}};let r="bg"+t[0].toUpperCase()+t.slice(1);tt[r]={get(){let{level:n}=this;return function(...o){let e=mo(lo(t,vd[n],"bgColor",...o),se.bgColor.close,this[et]);return Vr(this,e,this[Vt])}}}}var Bh=Object.defineProperties(()=>{},{...tt,level:{enumerable:!0,get(){return this[uo].level},set(t){this[uo].level=t}}}),mo=(t,r,n)=>{let o,e;return n===void 0?(o=t,e=r):(o=n.openAll+t,e=r+n.closeAll),{open:t,close:r,openAll:o,closeAll:e,parent:n}},Vr=(t,r,n)=>{let o=(...e)=>Gh(o,e.length===1?""+e[0]:e.join(" "));return Object.setPrototypeOf(o,Bh),o[uo]=t,o[et]=r,o[Vt]=n,o},Gh=(t,r)=>{if(t.level<=0||!r)return t[Vt]?"":r;let n=t[et];if(n===void 0)return r;let{openAll:o,closeAll:e}=n;if(r.includes("\x1B"))for(;n!==void 0;)r=pd(r,n.close,n.open),n=n.parent;let i=r.indexOf(`
33
- `);return i!==-1&&(r=fd(r,e,o,i)),o+r+e};Object.defineProperties(Bt.prototype,tt);var Wh=Bt(),nk=Bt({level:hd?hd.level:0});var N=Wh;function ce(t){return JSON.stringify(t,null,2)}function Oe(t){console.log(N.green(`\u2713 ${t}`))}function Gt(t){console.error(N.red(`\u2717 ${t}`))}function Wt(t){console.log(N.dim(t))}function po(){return process.stdout.isTTY===!0}function Ee(t){return t==="json"||t==="table"?t:po()?"table":"json"}function Hh(t){return Ee(t.opts().format)}function z(t,r,n){if(Hh(t)==="json"){console.log(ce(n));return}Oe(r)}async function R(t,r){if(r){if(r.length===36)return r;let o=(await t.listProducts()).find(e=>e.id===r||e.name.toLowerCase()===r.toLowerCase());if(o)return o.id}throw new Error("No product selected. Pass --product <id-or-name> or run `farthershore product create` first.")}async function Br(t,r,n){let e=await t.listEnvironments(r),a=(Array.isArray(e.data)?e.data:Array.isArray(e.environments)?e.environments:[]).find(s=>s.name.toLowerCase()===n.toLowerCase()||s.id===n);if(!a)throw new Error(`Environment "${n}" not found on product ${r}.`);return a.id}async function qh(t){if(!po())throw new k("No token provided. Pass --token, set FARTHERSHORE_TOKEN, or run interactively.",void 0,{code:"AUTH_NO_TOKEN"});let r=Jh({input:process.stdin,output:process.stdout,terminal:!0});return new Promise(n=>{r.question(t,o=>{r.close(),n(o.trim())})})}function _d(t,r){let n=t.command("auth").description("Manage CLI auth credentials");n.command("login").description("Store a maker token in ~/.farthershore/credentials.json").option("--token <token>","Maker token (mk_...). Falls back to FARTHERSHORE_TOKEN env, then prompt.").action(async o=>{let e=o.token??process.env.FARTHERSHORE_TOKEN??await qh("Maker token: ");if(!e||e.length<10)throw new k("Token looks malformed.",void 0,{code:"AUTH_INVALID_TOKEN"});let i=Fr();id({...i??{},token:e}),z(t,"Token stored.",{ok:!0})}),n.command("whoami").description("Show current auth identity (org, role, scopes)").action(async()=>{let e=await r().bootstrap(),i=e.memberships.find(a=>a.organization.id===e.activeOrganization.id);z(t,`Authenticated as ${e.user.id}`,{ok:!0,userId:e.user.id,clerkUserId:e.user.clerkUserId,organizationId:e.activeOrganization.id,organizationName:e.activeOrganization.name??null,organizationSlug:e.activeOrganization.slug??null,role:i?.role??null,memberships:e.memberships.map(a=>({organizationId:a.organization.id,organizationName:a.organization.name??null,role:a.role}))})}),n.command("logout").description("Clear stored credentials").action(()=>{od(),z(t,"Logged out.",{ok:!0})})}var Gr=[{id:"requests",label:"API requests",description:"Count every call \u2014 the right default for most APIs.",meters:[{key:"requests",display:"Requests",unit:"request"}]},{id:"ai-tokens",label:"AI tokens",description:"LLM-style token metering alongside calls. The gateway can estimate tokens per request and settle actuals from @farthershore/metering reports.",meters:[{key:"requests",display:"Requests",unit:"request"},{key:"tokens",display:"Tokens",unit:"token"}]},{id:"credits",label:"Credits",description:"Price work in abstract credits (e.g. one image = 5 credits). Report each call's dynamic credit cost through @farthershore/metering.",meters:[{key:"requests",display:"Requests",unit:"request"},{key:"credits",display:"Credits",unit:"credit"}]},{id:"spend",label:"Metered spend",description:"Pass-through spend in cents (OpenRouter-style) reported through @farthershore/metering. Pairs with prepaid credit wallets.",meters:[{key:"requests",display:"Requests",unit:"request"},{key:"dollars",display:"Spend",unit:"cent"}]},{id:"compute",label:"Compute time",description:"Bill milliseconds of compute, settled from @farthershore/metering reports.",meters:[{key:"requests",display:"Requests",unit:"request"},{key:"compute_ms",display:"Compute Time",unit:"ms"}]}];function yd(t){let r=t.trim().toLowerCase();return Gr.find(n=>n.id===r)}function bd(){return Gr.map(t=>t.id)}var rt=["frontend","api","docs","widget","dashboard","webhook","worker","agent"],Kh=["frontend","api"];function $d(t){let r=t.trim().toLowerCase();if(!rt.includes(r))throw new k(`Unknown product surface "${t}". Available: ${rt.join(", ")}.`,void 0,{code:"UNKNOWN_PRODUCT_SURFACE"});return r}function Jt(t){let r=(t.surface??[]).map($d);if(r.length===0)return;if(new Set(r).size!==r.length)throw new k("Duplicate product surfaces in --surface flags.",void 0,{code:"INVALID_PRODUCT_SURFACES"});return r}function fo(t){return t&&t.length>0?t:[...Kh]}function Yh(t){return t.split("_").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ")}function Xh(t){let[r="",n,o]=t.split(":");if(!/^[a-z0-9_]+$/.test(r))throw new k(`Invalid meter key in "--meter ${t}" \u2014 keys are lowercase letters, digits, and underscores (e.g. input_tokens).`,void 0,{code:"INVALID_METER_SPEC"});return{key:r,display:n?.trim()||Yh(r),unit:o?.trim()||void 0}}function Qh(t){let r=t.meter??[];if(r.length>0&&t.meters)throw new k("Pass either --meters <template> or repeated --meter entries, not both.",void 0,{code:"CONFLICTING_METER_FLAGS"});if(r.length>0){let n=r.map(Xh);if(new Set(n.map(e=>e.key)).size!==n.length)throw new k("Duplicate meter keys in --meter flags.",void 0,{code:"INVALID_METER_SPEC"});return n}if(t.meters){let n=yd(t.meters);if(!n)throw new k(`Unknown meter template "${t.meters}". Available: ${bd().join(", ")}.`,void 0,{code:"UNKNOWN_METER_TEMPLATE"});return n.meters.map(o=>({...o}))}}function ev(t){return{...t,product:t.product}}function xd(t,r){let n=t.command("product").description("Product lifecycle: list, show, create, update, delete");n.command("list").description("List products in the current org").action(async()=>{let e=await r().listProducts();z(t,`${e.length} product(s)`,{ok:!0,count:e.length,products:e.map(i=>({...i,displayName:i.displayName??null,status:i.status??null}))})}),n.command("show <productIdOrName>").description("Show a product").option("--env <env>","Environment scope (preview branch name)").action(async(o,e)=>{let i=r(),a=await R(i,o),s=await i.getProduct(a,{env:e.env});z(t,`Product ${a}`,{ok:!0,product:s})}),n.command("create").description("Create a new product and provision the frontend starter repo").requiredOption("--name <name>","Product slug (becomes the subdomain)").option("--display-name <displayName>","Human-friendly product name").option("--description <description>").requiredOption("--origin <url>","Business logic base URL Farther Shore calls for customer-facing actions").requiredOption("--repo-owner <owner>","Connected GitHub account that will own the product repo").requiredOption("--repo-name <name>","GitHub repository name to create").option("--meters <template>",`Meter template: ${Gr.map(o=>`${o.id} (${o.label})`).join(", ")}. Default: requests.`).option("--meter <key[:display[:unit]]>","Custom meter, repeatable (e.g. --meter input_tokens:'Input Tokens':token). Overrides --meters.",(o,e)=>[...e,o],[]).option("--surface <surface>",`Initial Product SDK surface, repeatable. Available: ${rt.join(", ")}.`,(o,e)=>[...e,o],[]).action(async o=>{let e=Qh(o),i=Jt(o),s=await r().initProduct({name:o.name,origin:o.origin,repoTarget:{owner:o.repoOwner,name:o.repoName},description:o.description,displayName:o.displayName,meters:e,surfaces:i});z(t,`Product created: ${o.name}`,{ok:!0,result:ev(s)})}),n.command("update <productIdOrName>").description("Update product metadata (name, origin, description, etc.)").option("--display-name <displayName>").option("--description <description>").option("--origin <url>").option("--env <env>","Environment scope").action(async(o,e)=>{let i=r(),a=await R(i,o),s={};if(e.displayName!==void 0&&(s.displayName=e.displayName),e.description!==void 0&&(s.description=e.description),e.origin!==void 0&&(s.origin=e.origin),Object.keys(s).length===0)throw new k("No fields to update. Pass --display-name / --origin / --description.",void 0,{code:"PRODUCT_UPDATE_NO_FIELDS"});let u=await i.updateProduct(a,s,{env:e.env});z(t,`Product ${a} updated`,{ok:!0,product:u})}),n.command("publish <productIdOrName>").description("Publish a draft product (make it live). Requires at least one plan, an origin, and a verified Stripe connection.").action(async o=>{let e=r(),i=await R(e,o),a=await e.publishProduct(i);z(t,`Product ${i} published`,{ok:!0,product:a})}),n.command("delete <productIdOrName>").description("Permanently delete a product. Requires --yes.").option("--yes","Skip confirmation; required for delete").action(async(o,e)=>{if(!e.yes)throw new k("Pass --yes to confirm product deletion.",void 0,{code:"DESTRUCTIVE_OP_REQUIRES_YES"});let i=r(),a=await R(i,o);await i.deleteProduct(a),z(t,`Product ${a} deleted`,{ok:!0,deleted:a})})}function tv(t){if(!t||typeof t!="object")return[];let r=t;return Array.isArray(r.data)?r.data:Array.isArray(r.environments)?r.environments:[]}function kd(t,r){let n=t.command("env").description("Manage product environments (preview branches, prod)");n.command("list <productIdOrName>").description("List environments for a product").action(async o=>{let e=r(),i=await R(e,o),a=tv(await e.listEnvironments(i));z(t,`${a.length} environment(s)`,{ok:!0,productId:i,count:a.length,environments:a.map(s=>({id:s.id,name:s.name,branch:s.branch??null,portalHostname:s.portalHostname??null,runtimeHostname:s.runtimeHostname??null,status:s.status??null}))})}),n.command("create <productIdOrName>").description("Create a preview environment bound to a git branch").requiredOption("--name <name>","Environment name (e.g. preview, staging)").requiredOption("--branch <branch>","Git branch to track (e.g. env/preview)").action(async(o,e)=>{let i=r(),a=await R(i,o),s=await i.createEnvironment(a,{name:e.name,branch:e.branch});z(t,`Environment ${e.name} created`,{ok:!0,productId:a,environment:s})}),n.command("delete <productIdOrName> <envName>").description("Delete an environment by name. Requires --yes.").option("--yes","Skip confirmation; required for delete").action(async(o,e,i)=>{if(!i.yes)throw new k("Pass --yes to confirm environment deletion.",void 0,{code:"DESTRUCTIVE_OP_REQUIRES_YES"});let a=r(),s=await R(a,o);await a.deleteEnvironment(s,e),z(t,`Environment ${e} deleted`,{ok:!0,productId:s,deleted:e})})}var c={};ke(c,{$brand:()=>ho,$input:()=>Us,$output:()=>Ds,NEVER:()=>go,TimePrecision:()=>Fs,ZodAny:()=>Pu,ZodArray:()=>Nu,ZodBase64:()=>yi,ZodBase64URL:()=>bi,ZodBigInt:()=>At,ZodBigIntFormat:()=>ki,ZodBoolean:()=>jt,ZodCIDRv4:()=>vi,ZodCIDRv6:()=>_i,ZodCUID:()=>li,ZodCUID2:()=>di,ZodCatch:()=>rl,ZodCodec:()=>Ir,ZodCustom:()=>zr,ZodCustomStringFormat:()=>Pt,ZodDate:()=>$r,ZodDefault:()=>Ku,ZodDiscriminatedUnion:()=>Du,ZodE164:()=>$i,ZodEmail:()=>si,ZodEmoji:()=>ci,ZodEnum:()=>Ot,ZodError:()=>jy,ZodExactOptional:()=>Hu,ZodFile:()=>Gu,ZodFirstPartyTypeKind:()=>gl,ZodFunction:()=>ml,ZodGUID:()=>hr,ZodIPv4:()=>gi,ZodIPv6:()=>hi,ZodISODate:()=>ti,ZodISODateTime:()=>ei,ZodISODuration:()=>ni,ZodISOTime:()=>ri,ZodIntersection:()=>Uu,ZodIssueCode:()=>Ny,ZodJWT:()=>xi,ZodKSUID:()=>fi,ZodLazy:()=>ul,ZodLiteral:()=>Bu,ZodMAC:()=>ku,ZodMap:()=>Mu,ZodNaN:()=>il,ZodNanoID:()=>ui,ZodNever:()=>ju,ZodNonOptional:()=>Ei,ZodNull:()=>Ou,ZodNullable:()=>qu,ZodNumber:()=>Tt,ZodNumberFormat:()=>Ye,ZodObject:()=>kr,ZodOptional:()=>Oi,ZodPipe:()=>wr,ZodPrefault:()=>Xu,ZodPreprocess:()=>ol,ZodPromise:()=>dl,ZodReadonly:()=>al,ZodRealError:()=>Q,ZodRecord:()=>zt,ZodSet:()=>Vu,ZodString:()=>Et,ZodStringFormat:()=>j,ZodSuccess:()=>tl,ZodSymbol:()=>Iu,ZodTemplateLiteral:()=>cl,ZodTransform:()=>Wu,ZodTuple:()=>Zu,ZodType:()=>w,ZodULID:()=>mi,ZodURL:()=>br,ZodUUID:()=>ye,ZodUndefined:()=>zu,ZodUnion:()=>Sr,ZodUnknown:()=>Tu,ZodVoid:()=>Au,ZodXID:()=>pi,ZodXor:()=>Cu,_ZodString:()=>ai,_default:()=>Yu,_function:()=>mf,any:()=>Mp,array:()=>xr,base64:()=>wp,base64url:()=>Ip,bigint:()=>Up,boolean:()=>wu,catch:()=>nl,check:()=>pf,cidrv4:()=>kp,cidrv6:()=>Sp,clone:()=>W,codec:()=>cf,coerce:()=>hl,config:()=>Z,core:()=>ze,cuid:()=>gp,cuid2:()=>hp,custom:()=>ff,date:()=>Bp,decode:()=>hu,decodeAsync:()=>_u,describe:()=>gf,discriminatedUnion:()=>Kp,e164:()=>zp,email:()=>op,emoji:()=>pp,encode:()=>gu,encodeAsync:()=>vu,endsWith:()=>vt,enum:()=>Ii,exactOptional:()=>Ju,file:()=>nf,flattenError:()=>rr,float32:()=>Ap,float64:()=>Np,formatError:()=>nr,fromJSONSchema:()=>xf,function:()=>mf,getErrorMap:()=>Dy,globalRegistry:()=>V,gt:()=>ve,gte:()=>J,guid:()=>ap,hash:()=>jp,hex:()=>Tp,hostname:()=>Pp,httpUrl:()=>mp,includes:()=>gt,instanceof:()=>vf,int:()=>ii,int32:()=>Cp,int64:()=>Rp,intersection:()=>Ru,invertCodec:()=>uf,ipv4:()=>bp,ipv6:()=>xp,iso:()=>It,json:()=>yf,jwt:()=>Op,keyof:()=>Gp,ksuid:()=>yp,lazy:()=>ll,length:()=>qe,literal:()=>rf,locales:()=>dr,looseObject:()=>Jp,looseRecord:()=>Xp,lowercase:()=>pt,lt:()=>he,lte:()=>te,mac:()=>$p,map:()=>Qp,maxLength:()=>Je,maxSize:()=>De,meta:()=>hf,mime:()=>_t,minLength:()=>Ie,minSize:()=>_e,multipleOf:()=>Ce,nan:()=>sf,nanoid:()=>fp,nativeEnum:()=>tf,negative:()=>Bn,never:()=>Si,nonnegative:()=>Wn,nonoptional:()=>el,nonpositive:()=>Gn,normalize:()=>yt,null:()=>Eu,nullable:()=>_r,nullish:()=>of,number:()=>Su,object:()=>Wp,optional:()=>vr,overwrite:()=>le,parse:()=>du,parseAsync:()=>mu,partialRecord:()=>Yp,pipe:()=>oi,positive:()=>Vn,prefault:()=>Qu,preprocess:()=>bf,prettifyError:()=>Eo,promise:()=>df,property:()=>Hn,readonly:()=>sl,record:()=>Fu,refine:()=>pl,regex:()=>mt,regexes:()=>ee,registry:()=>xn,safeDecode:()=>bu,safeDecodeAsync:()=>xu,safeEncode:()=>yu,safeEncodeAsync:()=>$u,safeParse:()=>pu,safeParseAsync:()=>fu,set:()=>ef,setErrorMap:()=>Cy,size:()=>He,slugify:()=>kt,startsWith:()=>ht,strictObject:()=>Hp,string:()=>gr,stringFormat:()=>Ep,stringbool:()=>_f,success:()=>af,superRefine:()=>fl,symbol:()=>Lp,templateLiteral:()=>lf,toJSONSchema:()=>Yn,toLowerCase:()=>$t,toUpperCase:()=>xt,transform:()=>zi,treeifyError:()=>Oo,trim:()=>bt,tuple:()=>Lu,uint32:()=>Dp,uint64:()=>Zp,ulid:()=>vp,undefined:()=>Fp,union:()=>wi,unknown:()=>Ke,uppercase:()=>ft,url:()=>dp,util:()=>y,uuid:()=>sp,uuidv4:()=>cp,uuidv6:()=>up,uuidv7:()=>lp,void:()=>Vp,xid:()=>_p,xor:()=>qp});var ze={};ke(ze,{$ZodAny:()=>is,$ZodArray:()=>us,$ZodAsyncError:()=>ue,$ZodBase64:()=>Ja,$ZodBase64URL:()=>qa,$ZodBigInt:()=>fn,$ZodBigIntFormat:()=>es,$ZodBoolean:()=>sr,$ZodCIDRv4:()=>Ga,$ZodCIDRv6:()=>Wa,$ZodCUID:()=>Aa,$ZodCUID2:()=>Na,$ZodCatch:()=>zs,$ZodCheck:()=>A,$ZodCheckBigIntFormat:()=>ua,$ZodCheckEndsWith:()=>$a,$ZodCheckGreaterThan:()=>cn,$ZodCheckIncludes:()=>ya,$ZodCheckLengthEquals:()=>ga,$ZodCheckLessThan:()=>sn,$ZodCheckLowerCase:()=>va,$ZodCheckMaxLength:()=>pa,$ZodCheckMaxSize:()=>la,$ZodCheckMimeType:()=>ka,$ZodCheckMinLength:()=>fa,$ZodCheckMinSize:()=>da,$ZodCheckMultipleOf:()=>sa,$ZodCheckNumberFormat:()=>ca,$ZodCheckOverwrite:()=>Sa,$ZodCheckProperty:()=>xa,$ZodCheckRegex:()=>ha,$ZodCheckSizeEquals:()=>ma,$ZodCheckStartsWith:()=>ba,$ZodCheckStringFormat:()=>lt,$ZodCheckUpperCase:()=>_a,$ZodCodec:()=>ur,$ZodCustom:()=>Cs,$ZodCustomStringFormat:()=>Xa,$ZodDate:()=>cs,$ZodDefault:()=>ks,$ZodDiscriminatedUnion:()=>ms,$ZodE164:()=>Ka,$ZodEmail:()=>Ea,$ZodEmoji:()=>Ta,$ZodEncodeError:()=>Pe,$ZodEnum:()=>vs,$ZodError:()=>tr,$ZodExactOptional:()=>$s,$ZodFile:()=>ys,$ZodFunction:()=>js,$ZodGUID:()=>za,$ZodIPv4:()=>Ma,$ZodIPv6:()=>Va,$ZodISODate:()=>Za,$ZodISODateTime:()=>Ra,$ZodISODuration:()=>Fa,$ZodISOTime:()=>La,$ZodIntersection:()=>ps,$ZodJWT:()=>Ya,$ZodKSUID:()=>Ua,$ZodLazy:()=>Ns,$ZodLiteral:()=>_s,$ZodMAC:()=>Ba,$ZodMap:()=>gs,$ZodNaN:()=>Os,$ZodNanoID:()=>ja,$ZodNever:()=>as,$ZodNonOptional:()=>ws,$ZodNull:()=>ns,$ZodNullable:()=>xs,$ZodNumber:()=>pn,$ZodNumberFormat:()=>Qa,$ZodObject:()=>em,$ZodObjectJIT:()=>ls,$ZodOptional:()=>hn,$ZodPipe:()=>vn,$ZodPrefault:()=>Ss,$ZodPreprocess:()=>Es,$ZodPromise:()=>As,$ZodReadonly:()=>Ps,$ZodRealError:()=>X,$ZodRecord:()=>fs,$ZodRegistry:()=>$n,$ZodSet:()=>hs,$ZodString:()=>We,$ZodStringFormat:()=>T,$ZodSuccess:()=>Is,$ZodSymbol:()=>ts,$ZodTemplateLiteral:()=>Ts,$ZodTransform:()=>bs,$ZodTuple:()=>gn,$ZodType:()=>S,$ZodULID:()=>Ca,$ZodURL:()=>Pa,$ZodUUID:()=>Oa,$ZodUndefined:()=>rs,$ZodUnion:()=>cr,$ZodUnknown:()=>os,$ZodVoid:()=>ss,$ZodXID:()=>Da,$ZodXor:()=>ds,$brand:()=>ho,$constructor:()=>m,$input:()=>Us,$output:()=>Ds,Doc:()=>ar,JSONSchema:()=>rp,JSONSchemaGenerator:()=>Xn,NEVER:()=>go,TimePrecision:()=>Fs,_any:()=>cc,_array:()=>gc,_base64:()=>Zn,_base64url:()=>Ln,_bigint:()=>tc,_boolean:()=>Qs,_catch:()=>Sy,_check:()=>tp,_cidrv4:()=>Un,_cidrv6:()=>Rn,_coercedBigint:()=>rc,_coercedBoolean:()=>ec,_coercedDate:()=>pc,_coercedNumber:()=>Hs,_coercedString:()=>Zs,_cuid:()=>Pn,_cuid2:()=>Tn,_custom:()=>vc,_date:()=>mc,_decode:()=>Yr,_decodeAsync:()=>Qr,_default:()=>$y,_discriminatedUnion:()=>uy,_e164:()=>Fn,_email:()=>kn,_emoji:()=>On,_encode:()=>Kr,_encodeAsync:()=>Xr,_endsWith:()=>vt,_enum:()=>gy,_file:()=>hc,_float32:()=>qs,_float64:()=>Ks,_gt:()=>ve,_gte:()=>J,_guid:()=>mr,_includes:()=>gt,_int:()=>Js,_int32:()=>Ys,_int64:()=>nc,_intersection:()=>ly,_ipv4:()=>Cn,_ipv6:()=>Dn,_isoDate:()=>Vs,_isoDateTime:()=>Ms,_isoDuration:()=>Gs,_isoTime:()=>Bs,_jwt:()=>Mn,_ksuid:()=>Nn,_lazy:()=>Oy,_length:()=>qe,_literal:()=>vy,_lowercase:()=>pt,_lt:()=>he,_lte:()=>te,_mac:()=>Ls,_map:()=>py,_max:()=>te,_maxLength:()=>Je,_maxSize:()=>De,_mime:()=>_t,_min:()=>J,_minLength:()=>Ie,_minSize:()=>_e,_multipleOf:()=>Ce,_nan:()=>fc,_nanoid:()=>En,_nativeEnum:()=>hy,_negative:()=>Bn,_never:()=>lc,_nonnegative:()=>Wn,_nonoptional:()=>xy,_nonpositive:()=>Gn,_normalize:()=>yt,_null:()=>sc,_nullable:()=>by,_number:()=>Ws,_optional:()=>yy,_overwrite:()=>le,_parse:()=>at,_parseAsync:()=>st,_pipe:()=>wy,_positive:()=>Vn,_promise:()=>Ey,_property:()=>Hn,_readonly:()=>Iy,_record:()=>my,_refine:()=>_c,_regex:()=>mt,_safeDecode:()=>tn,_safeDecodeAsync:()=>nn,_safeEncode:()=>en,_safeEncodeAsync:()=>rn,_safeParse:()=>ct,_safeParseAsync:()=>ut,_set:()=>fy,_size:()=>He,_slugify:()=>kt,_startsWith:()=>ht,_string:()=>Rs,_stringFormat:()=>St,_stringbool:()=>xc,_success:()=>ky,_superRefine:()=>yc,_symbol:()=>oc,_templateLiteral:()=>zy,_toLowerCase:()=>$t,_toUpperCase:()=>xt,_transform:()=>_y,_trim:()=>bt,_tuple:()=>dy,_uint32:()=>Xs,_uint64:()=>ic,_ulid:()=>jn,_undefined:()=>ac,_union:()=>sy,_unknown:()=>uc,_uppercase:()=>ft,_url:()=>pr,_uuid:()=>Sn,_uuidv4:()=>wn,_uuidv6:()=>In,_uuidv7:()=>zn,_void:()=>dc,_xid:()=>An,_xor:()=>cy,clone:()=>W,config:()=>Z,createStandardJSONSchemaMethod:()=>wt,createToJSONSchemaMethod:()=>kc,decode:()=>Ev,decodeAsync:()=>Tv,describe:()=>bc,encode:()=>Ov,encodeAsync:()=>Pv,extractDefs:()=>Re,finalize:()=>Ze,flattenError:()=>rr,formatError:()=>nr,globalConfig:()=>Ve,globalRegistry:()=>V,initializeContext:()=>Ue,isValidBase64:()=>Ha,isValidBase64URL:()=>Kd,isValidJWT:()=>Yd,locales:()=>dr,meta:()=>$c,parse:()=>Jr,parseAsync:()=>qr,prettifyError:()=>Eo,process:()=>P,regexes:()=>ee,registry:()=>xn,safeDecode:()=>Av,safeDecodeAsync:()=>Cv,safeEncode:()=>jv,safeEncodeAsync:()=>Nv,safeParse:()=>Po,safeParseAsync:()=>To,toDotPath:()=>Ed,toJSONSchema:()=>Yn,treeifyError:()=>Oo,util:()=>y,version:()=>wa});var Sd,go=Object.freeze({status:"aborted"});function m(t,r,n){function o(s,u){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:u,constr:a,traits:new Set},enumerable:!1}),s._zod.traits.has(t))return;s._zod.traits.add(t),r(s,u);let l=a.prototype,d=Object.keys(l);for(let p=0;p<d.length;p++){let g=d[p];g in s||(s[g]=l[g].bind(s))}}let e=n?.Parent??Object;class i extends e{}Object.defineProperty(i,"name",{value:t});function a(s){var u;let l=n?.Parent?new i:this;o(l,s),(u=l._zod).deferred??(u.deferred=[]);for(let d of l._zod.deferred)d();return l}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>n?.Parent&&s instanceof n.Parent?!0:s?._zod?.traits?.has(t)}),Object.defineProperty(a,"name",{value:t}),a}var ho=Symbol("zod_brand"),ue=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Pe=class extends Error{constructor(r){super(`Encountered unidirectional transform during encode: ${r}`),this.name="ZodEncodeError"}};(Sd=globalThis).__zod_globalConfig??(Sd.__zod_globalConfig={});var Ve=globalThis.__zod_globalConfig;function Z(t){return t&&Object.assign(Ve,t),Ve}var y={};ke(y,{BIGINT_FORMAT_RANGES:()=>Io,Class:()=>_o,NUMBER_FORMAT_RANGES:()=>wo,aborted:()=>Ne,allowsEval:()=>$o,assert:()=>av,assertEqual:()=>rv,assertIs:()=>iv,assertNever:()=>ov,assertNotEqual:()=>nv,assignProp:()=>je,base64ToUint8Array:()=>Id,base64urlToUint8Array:()=>kv,cached:()=>it,captureStackTrace:()=>Hr,cleanEnum:()=>xv,cleanRegex:()=>Yt,clone:()=>W,cloneDef:()=>cv,createTransparentProxy:()=>fv,defineLazy:()=>I,esc:()=>Wr,escapeRegex:()=>ae,explicitlyAborted:()=>zo,extend:()=>vv,finalizeIssue:()=>H,floatSafeRemainder:()=>yo,getElementAtPath:()=>uv,getEnumValues:()=>Kt,getLengthableOrigin:()=>er,getParsedType:()=>pv,getSizableOrigin:()=>Qt,hexToUint8Array:()=>wv,isObject:()=>Be,isPlainObject:()=>Ae,issue:()=>ot,joinValues:()=>f,jsonStringifyReplacer:()=>nt,merge:()=>yv,mergeDefs:()=>we,normalizeParams:()=>b,nullish:()=>Te,numKeys:()=>mv,objectClone:()=>sv,omit:()=>hv,optionalKeys:()=>So,parsedType:()=>_,partial:()=>bv,pick:()=>gv,prefixIssues:()=>Y,primitiveTypes:()=>ko,promiseAllObject:()=>lv,propertyKeyTypes:()=>Xt,randomString:()=>dv,required:()=>$v,safeExtend:()=>_v,shallowClone:()=>xo,slugify:()=>bo,stringifyPrimitive:()=>v,uint8ArrayToBase64:()=>zd,uint8ArrayToBase64url:()=>Sv,uint8ArrayToHex:()=>Iv,unwrapMessage:()=>qt});function rv(t){return t}function nv(t){return t}function iv(t){}function ov(t){throw new Error("Unexpected value in exhaustive check")}function av(t){}function Kt(t){let r=Object.values(t).filter(o=>typeof o=="number");return Object.entries(t).filter(([o,e])=>r.indexOf(+o)===-1).map(([o,e])=>e)}function f(t,r="|"){return t.map(n=>v(n)).join(r)}function nt(t,r){return typeof r=="bigint"?r.toString():r}function it(t){return{get value(){{let n=t();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function Te(t){return t==null}function Yt(t){let r=t.startsWith("^")?1:0,n=t.endsWith("$")?t.length-1:t.length;return t.slice(r,n)}function yo(t,r){let n=t/r,o=Math.round(n),e=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-o)<e?0:n-o}var wd=Symbol("evaluating");function I(t,r,n){let o;Object.defineProperty(t,r,{get(){if(o!==wd)return o===void 0&&(o=wd,o=n()),o},set(e){Object.defineProperty(t,r,{value:e})},configurable:!0})}function sv(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function je(t,r,n){Object.defineProperty(t,r,{value:n,writable:!0,enumerable:!0,configurable:!0})}function we(...t){let r={};for(let n of t){let o=Object.getOwnPropertyDescriptors(n);Object.assign(r,o)}return Object.defineProperties({},r)}function cv(t){return we(t._zod.def)}function uv(t,r){return r?r.reduce((n,o)=>n?.[o],t):t}function lv(t){let r=Object.keys(t),n=r.map(o=>t[o]);return Promise.all(n).then(o=>{let e={};for(let i=0;i<r.length;i++)e[r[i]]=o[i];return e})}function dv(t=10){let r="abcdefghijklmnopqrstuvwxyz",n="";for(let o=0;o<t;o++)n+=r[Math.floor(Math.random()*r.length)];return n}function Wr(t){return JSON.stringify(t)}function bo(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Hr="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function Be(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var $o=it(()=>{if(Ve.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function Ae(t){if(Be(t)===!1)return!1;let r=t.constructor;if(r===void 0||typeof r!="function")return!0;let n=r.prototype;return!(Be(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function xo(t){return Ae(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}function mv(t){let r=0;for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&r++;return r}var pv=t=>{let r=typeof t;switch(r){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${r}`)}},Xt=new Set(["string","number","symbol"]),ko=new Set(["string","number","bigint","boolean","symbol","undefined"]);function ae(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function W(t,r,n){let o=new t._zod.constr(r??t._zod.def);return(!r||n?.parent)&&(o._zod.parent=t),o}function b(t){let r=t;if(!r)return{};if(typeof r=="string")return{error:()=>r};if(r?.message!==void 0){if(r?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");r.error=r.message}return delete r.message,typeof r.error=="string"?{...r,error:()=>r.error}:r}function fv(t){let r;return new Proxy({},{get(n,o,e){return r??(r=t()),Reflect.get(r,o,e)},set(n,o,e,i){return r??(r=t()),Reflect.set(r,o,e,i)},has(n,o){return r??(r=t()),Reflect.has(r,o)},deleteProperty(n,o){return r??(r=t()),Reflect.deleteProperty(r,o)},ownKeys(n){return r??(r=t()),Reflect.ownKeys(r)},getOwnPropertyDescriptor(n,o){return r??(r=t()),Reflect.getOwnPropertyDescriptor(r,o)},defineProperty(n,o,e){return r??(r=t()),Reflect.defineProperty(r,o,e)}})}function v(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function So(t){return Object.keys(t).filter(r=>t[r]._zod.optin==="optional"&&t[r]._zod.optout==="optional")}var wo={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Io={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function gv(t,r){let n=t._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=we(t._zod.def,{get shape(){let a={};for(let s in r){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(a[s]=n.shape[s])}return je(this,"shape",a),a},checks:[]});return W(t,i)}function hv(t,r){let n=t._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=we(t._zod.def,{get shape(){let a={...t._zod.def.shape};for(let s in r){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);r[s]&&delete a[s]}return je(this,"shape",a),a},checks:[]});return W(t,i)}function vv(t,r){if(!Ae(r))throw new Error("Invalid input to extend: expected a plain object");let n=t._zod.def.checks;if(n&&n.length>0){let i=t._zod.def.shape;for(let a in r)if(Object.getOwnPropertyDescriptor(i,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let e=we(t._zod.def,{get shape(){let i={...t._zod.def.shape,...r};return je(this,"shape",i),i}});return W(t,e)}function _v(t,r){if(!Ae(r))throw new Error("Invalid input to safeExtend: expected a plain object");let n=we(t._zod.def,{get shape(){let o={...t._zod.def.shape,...r};return je(this,"shape",o),o}});return W(t,n)}function yv(t,r){if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=we(t._zod.def,{get shape(){let o={...t._zod.def.shape,...r._zod.def.shape};return je(this,"shape",o),o},get catchall(){return r._zod.def.catchall},checks:r._zod.def.checks??[]});return W(t,n)}function bv(t,r,n){let e=r._zod.def.checks;if(e&&e.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=we(r._zod.def,{get shape(){let s=r._zod.def.shape,u={...s};if(n)for(let l in n){if(!(l in s))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(u[l]=t?new t({type:"optional",innerType:s[l]}):s[l])}else for(let l in s)u[l]=t?new t({type:"optional",innerType:s[l]}):s[l];return je(this,"shape",u),u},checks:[]});return W(r,a)}function $v(t,r,n){let o=we(r._zod.def,{get shape(){let e=r._zod.def.shape,i={...e};if(n)for(let a in n){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(i[a]=new t({type:"nonoptional",innerType:e[a]}))}else for(let a in e)i[a]=new t({type:"nonoptional",innerType:e[a]});return je(this,"shape",i),i}});return W(r,o)}function Ne(t,r=0){if(t.aborted===!0)return!0;for(let n=r;n<t.issues.length;n++)if(t.issues[n]?.continue!==!0)return!0;return!1}function zo(t,r=0){if(t.aborted===!0)return!0;for(let n=r;n<t.issues.length;n++)if(t.issues[n]?.continue===!1)return!0;return!1}function Y(t,r){return r.map(n=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(t),n})}function qt(t){return typeof t=="string"?t:t?.message}function H(t,r,n){let o=t.message?t.message:qt(t.inst?._zod.def?.error?.(t))??qt(r?.error?.(t))??qt(n.customError?.(t))??qt(n.localeError?.(t))??"Invalid input",{inst:e,continue:i,input:a,...s}=t;return s.path??(s.path=[]),s.message=o,r?.reportInput&&(s.input=a),s}function Qt(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function er(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function _(t){let r=typeof t;switch(r){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let n=t;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return r}function ot(...t){let[r,n,o]=t;return typeof r=="string"?{message:r,code:"custom",input:n,inst:o}:{...r}}function xv(t){return Object.entries(t).filter(([r,n])=>Number.isNaN(Number.parseInt(r,10))).map(r=>r[1])}function Id(t){let r=atob(t),n=new Uint8Array(r.length);for(let o=0;o<r.length;o++)n[o]=r.charCodeAt(o);return n}function zd(t){let r="";for(let n=0;n<t.length;n++)r+=String.fromCharCode(t[n]);return btoa(r)}function kv(t){let r=t.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-r.length%4)%4);return Id(r+n)}function Sv(t){return zd(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function wv(t){let r=t.replace(/^0x/,"");if(r.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(r.length/2);for(let o=0;o<r.length;o+=2)n[o/2]=Number.parseInt(r.slice(o,o+2),16);return n}function Iv(t){return Array.from(t).map(r=>r.toString(16).padStart(2,"0")).join("")}var _o=class{constructor(...r){}};var Od=(t,r)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:r,enumerable:!1}),t.message=JSON.stringify(r,nt,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},tr=m("$ZodError",Od),X=m("$ZodError",Od,{Parent:Error});function rr(t,r=n=>n.message){let n={},o=[];for(let e of t.issues)e.path.length>0?(n[e.path[0]]=n[e.path[0]]||[],n[e.path[0]].push(r(e))):o.push(r(e));return{formErrors:o,fieldErrors:n}}function nr(t,r=n=>n.message){let n={_errors:[]},o=(e,i=[])=>{for(let a of e.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>o({issues:s},[...i,...a.path]));else if(a.code==="invalid_key")o({issues:a.issues},[...i,...a.path]);else if(a.code==="invalid_element")o({issues:a.issues},[...i,...a.path]);else{let s=[...i,...a.path];if(s.length===0)n._errors.push(r(a));else{let u=n,l=0;for(;l<s.length;){let d=s[l];l===s.length-1?(u[d]=u[d]||{_errors:[]},u[d]._errors.push(r(a))):u[d]=u[d]||{_errors:[]},u=u[d],l++}}}};return o(t),n}function Oo(t,r=n=>n.message){let n={errors:[]},o=(e,i=[])=>{var a,s;for(let u of e.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(l=>o({issues:l},[...i,...u.path]));else if(u.code==="invalid_key")o({issues:u.issues},[...i,...u.path]);else if(u.code==="invalid_element")o({issues:u.issues},[...i,...u.path]);else{let l=[...i,...u.path];if(l.length===0){n.errors.push(r(u));continue}let d=n,p=0;for(;p<l.length;){let g=l[p],h=p===l.length-1;typeof g=="string"?(d.properties??(d.properties={}),(a=d.properties)[g]??(a[g]={errors:[]}),d=d.properties[g]):(d.items??(d.items=[]),(s=d.items)[g]??(s[g]={errors:[]}),d=d.items[g]),h&&d.errors.push(r(u)),p++}}};return o(t),n}function Ed(t){let r=[],n=t.map(o=>typeof o=="object"?o.key:o);for(let o of n)typeof o=="number"?r.push(`[${o}]`):typeof o=="symbol"?r.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?r.push(`[${JSON.stringify(o)}]`):(r.length&&r.push("."),r.push(o));return r.join("")}function Eo(t){let r=[],n=[...t.issues].sort((o,e)=>(o.path??[]).length-(e.path??[]).length);for(let o of n)r.push(`\u2716 ${o.message}`),o.path?.length&&r.push(` \u2192 at ${Ed(o.path)}`);return r.join(`
34
- `)}var at=t=>(r,n,o,e)=>{let i=o?{...o,async:!1}:{async:!1},a=r._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new ue;if(a.issues.length){let s=new(e?.Err??t)(a.issues.map(u=>H(u,i,Z())));throw Hr(s,e?.callee),s}return a.value},Jr=at(X),st=t=>async(r,n,o,e)=>{let i=o?{...o,async:!0}:{async:!0},a=r._zod.run({value:n,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(e?.Err??t)(a.issues.map(u=>H(u,i,Z())));throw Hr(s,e?.callee),s}return a.value},qr=st(X),ct=t=>(r,n,o)=>{let e=o?{...o,async:!1}:{async:!1},i=r._zod.run({value:n,issues:[]},e);if(i instanceof Promise)throw new ue;return i.issues.length?{success:!1,error:new(t??tr)(i.issues.map(a=>H(a,e,Z())))}:{success:!0,data:i.value}},Po=ct(X),ut=t=>async(r,n,o)=>{let e=o?{...o,async:!0}:{async:!0},i=r._zod.run({value:n,issues:[]},e);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new t(i.issues.map(a=>H(a,e,Z())))}:{success:!0,data:i.value}},To=ut(X),Kr=t=>(r,n,o)=>{let e=o?{...o,direction:"backward"}:{direction:"backward"};return at(t)(r,n,e)},Ov=Kr(X),Yr=t=>(r,n,o)=>at(t)(r,n,o),Ev=Yr(X),Xr=t=>async(r,n,o)=>{let e=o?{...o,direction:"backward"}:{direction:"backward"};return st(t)(r,n,e)},Pv=Xr(X),Qr=t=>async(r,n,o)=>st(t)(r,n,o),Tv=Qr(X),en=t=>(r,n,o)=>{let e=o?{...o,direction:"backward"}:{direction:"backward"};return ct(t)(r,n,e)},jv=en(X),tn=t=>(r,n,o)=>ct(t)(r,n,o),Av=tn(X),rn=t=>async(r,n,o)=>{let e=o?{...o,direction:"backward"}:{direction:"backward"};return ut(t)(r,n,e)},Nv=rn(X),nn=t=>async(r,n,o)=>ut(t)(r,n,o),Cv=nn(X);var ee={};ke(ee,{base64:()=>Ho,base64url:()=>on,bigint:()=>ea,boolean:()=>ra,browserEmail:()=>Vv,cidrv4:()=>Go,cidrv6:()=>Wo,cuid:()=>jo,cuid2:()=>Ao,date:()=>Ko,datetime:()=>Xo,domain:()=>Wv,duration:()=>Ro,e164:()=>qo,email:()=>Lo,emoji:()=>Fo,extendedDuration:()=>Dv,guid:()=>Zo,hex:()=>Hv,hostname:()=>Gv,html5Email:()=>Lv,httpProtocol:()=>Jo,idnEmail:()=>Mv,integer:()=>ta,ipv4:()=>Mo,ipv6:()=>Vo,ksuid:()=>Do,lowercase:()=>oa,mac:()=>Bo,md5_base64:()=>qv,md5_base64url:()=>Kv,md5_hex:()=>Jv,nanoid:()=>Uo,null:()=>na,number:()=>an,rfc5322Email:()=>Fv,sha1_base64:()=>Xv,sha1_base64url:()=>Qv,sha1_hex:()=>Yv,sha256_base64:()=>t_,sha256_base64url:()=>r_,sha256_hex:()=>e_,sha384_base64:()=>i_,sha384_base64url:()=>o_,sha384_hex:()=>n_,sha512_base64:()=>s_,sha512_base64url:()=>c_,sha512_hex:()=>a_,string:()=>Qo,time:()=>Yo,ulid:()=>No,undefined:()=>ia,unicodeEmail:()=>Pd,uppercase:()=>aa,uuid:()=>Ge,uuid4:()=>Uv,uuid6:()=>Rv,uuid7:()=>Zv,xid:()=>Co});var jo=/^[cC][0-9a-z]{6,}$/,Ao=/^[0-9a-z]+$/,No=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Co=/^[0-9a-vA-V]{20}$/,Do=/^[A-Za-z0-9]{27}$/,Uo=/^[a-zA-Z0-9_-]{21}$/,Ro=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Dv=/^[-+]?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)?)??$/,Zo=/^([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})$/,Ge=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([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)$/,Uv=Ge(4),Rv=Ge(6),Zv=Ge(7),Lo=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Lv=/^[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])?)*$/,Fv=/^(([^<>()\[\]\\.,;:\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,}))$/,Pd=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Mv=Pd,Vv=/^[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])?)*$/,Bv="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Fo(){return new RegExp(Bv,"u")}var Mo=/^(?:(?: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])$/,Vo=/^(([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}|:))$/,Bo=t=>{let r=ae(t??":");return new RegExp(`^(?:[0-9A-F]{2}${r}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${r}){5}[0-9a-f]{2}$`)},Go=/^((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])$/,Wo=/^(([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])$/,Ho=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,on=/^[A-Za-z0-9_-]*$/,Gv=/^(?=.{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])?)*\.?$/,Wv=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Jo=/^https?$/,qo=/^\+[1-9]\d{6,14}$/,Td="(?:(?:\\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])))",Ko=new RegExp(`^${Td}$`);function jd(t){let r="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${r}`:t.precision===0?`${r}:[0-5]\\d`:`${r}:[0-5]\\d\\.\\d{${t.precision}}`:`${r}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Yo(t){return new RegExp(`^${jd(t)}$`)}function Xo(t){let r=jd({precision:t.precision}),n=["Z"];t.local&&n.push(""),t.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${r}(?:${n.join("|")})`;return new RegExp(`^${Td}T(?:${o})$`)}var Qo=t=>{let r=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${r}$`)},ea=/^-?\d+n?$/,ta=/^-?\d+$/,an=/^-?\d+(?:\.\d+)?$/,ra=/^(?:true|false)$/i,na=/^null$/i;var ia=/^undefined$/i;var oa=/^[^A-Z]*$/,aa=/^[^a-z]*$/,Hv=/^[0-9a-fA-F]*$/;function ir(t,r){return new RegExp(`^[A-Za-z0-9+/]{${t}}${r}$`)}function or(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}var Jv=/^[0-9a-fA-F]{32}$/,qv=ir(22,"=="),Kv=or(22),Yv=/^[0-9a-fA-F]{40}$/,Xv=ir(27,"="),Qv=or(27),e_=/^[0-9a-fA-F]{64}$/,t_=ir(43,"="),r_=or(43),n_=/^[0-9a-fA-F]{96}$/,i_=ir(64,""),o_=or(64),a_=/^[0-9a-fA-F]{128}$/,s_=ir(86,"=="),c_=or(86);var A=m("$ZodCheck",(t,r)=>{var n;t._zod??(t._zod={}),t._zod.def=r,(n=t._zod).onattach??(n.onattach=[])}),Nd={number:"number",bigint:"bigint",object:"date"},sn=m("$ZodCheckLessThan",(t,r)=>{A.init(t,r);let n=Nd[typeof r.value];t._zod.onattach.push(o=>{let e=o._zod.bag,i=(r.inclusive?e.maximum:e.exclusiveMaximum)??Number.POSITIVE_INFINITY;r.value<i&&(r.inclusive?e.maximum=r.value:e.exclusiveMaximum=r.value)}),t._zod.check=o=>{(r.inclusive?o.value<=r.value:o.value<r.value)||o.issues.push({origin:n,code:"too_big",maximum:typeof r.value=="object"?r.value.getTime():r.value,input:o.value,inclusive:r.inclusive,inst:t,continue:!r.abort})}}),cn=m("$ZodCheckGreaterThan",(t,r)=>{A.init(t,r);let n=Nd[typeof r.value];t._zod.onattach.push(o=>{let e=o._zod.bag,i=(r.inclusive?e.minimum:e.exclusiveMinimum)??Number.NEGATIVE_INFINITY;r.value>i&&(r.inclusive?e.minimum=r.value:e.exclusiveMinimum=r.value)}),t._zod.check=o=>{(r.inclusive?o.value>=r.value:o.value>r.value)||o.issues.push({origin:n,code:"too_small",minimum:typeof r.value=="object"?r.value.getTime():r.value,input:o.value,inclusive:r.inclusive,inst:t,continue:!r.abort})}}),sa=m("$ZodCheckMultipleOf",(t,r)=>{A.init(t,r),t._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=r.value)}),t._zod.check=n=>{if(typeof n.value!=typeof r.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%r.value===BigInt(0):yo(n.value,r.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:r.value,input:n.value,inst:t,continue:!r.abort})}}),ca=m("$ZodCheckNumberFormat",(t,r)=>{A.init(t,r),r.format=r.format||"float64";let n=r.format?.includes("int"),o=n?"int":"number",[e,i]=wo[r.format];t._zod.onattach.push(a=>{let s=a._zod.bag;s.format=r.format,s.minimum=e,s.maximum=i,n&&(s.pattern=ta)}),t._zod.check=a=>{let s=a.value;if(n){if(!Number.isInteger(s)){a.issues.push({expected:o,format:r.format,code:"invalid_type",continue:!1,input:s,inst:t});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:o,inclusive:!0,continue:!r.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:o,inclusive:!0,continue:!r.abort});return}}s<e&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:e,inclusive:!0,inst:t,continue:!r.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:t,continue:!r.abort})}}),ua=m("$ZodCheckBigIntFormat",(t,r)=>{A.init(t,r);let[n,o]=Io[r.format];t._zod.onattach.push(e=>{let i=e._zod.bag;i.format=r.format,i.minimum=n,i.maximum=o}),t._zod.check=e=>{let i=e.value;i<n&&e.issues.push({origin:"bigint",input:i,code:"too_small",minimum:n,inclusive:!0,inst:t,continue:!r.abort}),i>o&&e.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:!0,inst:t,continue:!r.abort})}}),la=m("$ZodCheckMaxSize",(t,r)=>{var n;A.init(t,r),(n=t._zod.def).when??(n.when=o=>{let e=o.value;return!Te(e)&&e.size!==void 0}),t._zod.onattach.push(o=>{let e=o._zod.bag.maximum??Number.POSITIVE_INFINITY;r.maximum<e&&(o._zod.bag.maximum=r.maximum)}),t._zod.check=o=>{let e=o.value;e.size<=r.maximum||o.issues.push({origin:Qt(e),code:"too_big",maximum:r.maximum,inclusive:!0,input:e,inst:t,continue:!r.abort})}}),da=m("$ZodCheckMinSize",(t,r)=>{var n;A.init(t,r),(n=t._zod.def).when??(n.when=o=>{let e=o.value;return!Te(e)&&e.size!==void 0}),t._zod.onattach.push(o=>{let e=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;r.minimum>e&&(o._zod.bag.minimum=r.minimum)}),t._zod.check=o=>{let e=o.value;e.size>=r.minimum||o.issues.push({origin:Qt(e),code:"too_small",minimum:r.minimum,inclusive:!0,input:e,inst:t,continue:!r.abort})}}),ma=m("$ZodCheckSizeEquals",(t,r)=>{var n;A.init(t,r),(n=t._zod.def).when??(n.when=o=>{let e=o.value;return!Te(e)&&e.size!==void 0}),t._zod.onattach.push(o=>{let e=o._zod.bag;e.minimum=r.size,e.maximum=r.size,e.size=r.size}),t._zod.check=o=>{let e=o.value,i=e.size;if(i===r.size)return;let a=i>r.size;o.issues.push({origin:Qt(e),...a?{code:"too_big",maximum:r.size}:{code:"too_small",minimum:r.size},inclusive:!0,exact:!0,input:o.value,inst:t,continue:!r.abort})}}),pa=m("$ZodCheckMaxLength",(t,r)=>{var n;A.init(t,r),(n=t._zod.def).when??(n.when=o=>{let e=o.value;return!Te(e)&&e.length!==void 0}),t._zod.onattach.push(o=>{let e=o._zod.bag.maximum??Number.POSITIVE_INFINITY;r.maximum<e&&(o._zod.bag.maximum=r.maximum)}),t._zod.check=o=>{let e=o.value;if(e.length<=r.maximum)return;let a=er(e);o.issues.push({origin:a,code:"too_big",maximum:r.maximum,inclusive:!0,input:e,inst:t,continue:!r.abort})}}),fa=m("$ZodCheckMinLength",(t,r)=>{var n;A.init(t,r),(n=t._zod.def).when??(n.when=o=>{let e=o.value;return!Te(e)&&e.length!==void 0}),t._zod.onattach.push(o=>{let e=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;r.minimum>e&&(o._zod.bag.minimum=r.minimum)}),t._zod.check=o=>{let e=o.value;if(e.length>=r.minimum)return;let a=er(e);o.issues.push({origin:a,code:"too_small",minimum:r.minimum,inclusive:!0,input:e,inst:t,continue:!r.abort})}}),ga=m("$ZodCheckLengthEquals",(t,r)=>{var n;A.init(t,r),(n=t._zod.def).when??(n.when=o=>{let e=o.value;return!Te(e)&&e.length!==void 0}),t._zod.onattach.push(o=>{let e=o._zod.bag;e.minimum=r.length,e.maximum=r.length,e.length=r.length}),t._zod.check=o=>{let e=o.value,i=e.length;if(i===r.length)return;let a=er(e),s=i>r.length;o.issues.push({origin:a,...s?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},inclusive:!0,exact:!0,input:o.value,inst:t,continue:!r.abort})}}),lt=m("$ZodCheckStringFormat",(t,r)=>{var n,o;A.init(t,r),t._zod.onattach.push(e=>{let i=e._zod.bag;i.format=r.format,r.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(r.pattern))}),r.pattern?(n=t._zod).check??(n.check=e=>{r.pattern.lastIndex=0,!r.pattern.test(e.value)&&e.issues.push({origin:"string",code:"invalid_format",format:r.format,input:e.value,...r.pattern?{pattern:r.pattern.toString()}:{},inst:t,continue:!r.abort})}):(o=t._zod).check??(o.check=()=>{})}),ha=m("$ZodCheckRegex",(t,r)=>{lt.init(t,r),t._zod.check=n=>{r.pattern.lastIndex=0,!r.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:r.pattern.toString(),inst:t,continue:!r.abort})}}),va=m("$ZodCheckLowerCase",(t,r)=>{r.pattern??(r.pattern=oa),lt.init(t,r)}),_a=m("$ZodCheckUpperCase",(t,r)=>{r.pattern??(r.pattern=aa),lt.init(t,r)}),ya=m("$ZodCheckIncludes",(t,r)=>{A.init(t,r);let n=ae(r.includes),o=new RegExp(typeof r.position=="number"?`^.{${r.position}}${n}`:n);r.pattern=o,t._zod.onattach.push(e=>{let i=e._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),t._zod.check=e=>{e.value.includes(r.includes,r.position)||e.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:r.includes,input:e.value,inst:t,continue:!r.abort})}}),ba=m("$ZodCheckStartsWith",(t,r)=>{A.init(t,r);let n=new RegExp(`^${ae(r.prefix)}.*`);r.pattern??(r.pattern=n),t._zod.onattach.push(o=>{let e=o._zod.bag;e.patterns??(e.patterns=new Set),e.patterns.add(n)}),t._zod.check=o=>{o.value.startsWith(r.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:r.prefix,input:o.value,inst:t,continue:!r.abort})}}),$a=m("$ZodCheckEndsWith",(t,r)=>{A.init(t,r);let n=new RegExp(`.*${ae(r.suffix)}$`);r.pattern??(r.pattern=n),t._zod.onattach.push(o=>{let e=o._zod.bag;e.patterns??(e.patterns=new Set),e.patterns.add(n)}),t._zod.check=o=>{o.value.endsWith(r.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:r.suffix,input:o.value,inst:t,continue:!r.abort})}});function Ad(t,r,n){t.issues.length&&r.issues.push(...Y(n,t.issues))}var xa=m("$ZodCheckProperty",(t,r)=>{A.init(t,r),t._zod.check=n=>{let o=r.schema._zod.run({value:n.value[r.property],issues:[]},{});if(o instanceof Promise)return o.then(e=>Ad(e,n,r.property));Ad(o,n,r.property)}}),ka=m("$ZodCheckMimeType",(t,r)=>{A.init(t,r);let n=new Set(r.mime);t._zod.onattach.push(o=>{o._zod.bag.mime=r.mime}),t._zod.check=o=>{n.has(o.value.type)||o.issues.push({code:"invalid_value",values:r.mime,input:o.value.type,inst:t,continue:!r.abort})}}),Sa=m("$ZodCheckOverwrite",(t,r)=>{A.init(t,r),t._zod.check=n=>{n.value=r.tx(n.value)}});var ar=class{constructor(r=[]){this.content=[],this.indent=0,this&&(this.args=r)}indented(r){this.indent+=1,r(this),this.indent-=1}write(r){if(typeof r=="function"){r(this,{execution:"sync"}),r(this,{execution:"async"});return}let o=r.split(`
35
- `).filter(a=>a),e=Math.min(...o.map(a=>a.length-a.trimStart().length)),i=o.map(a=>a.slice(e)).map(a=>" ".repeat(this.indent*2)+a);for(let a of i)this.content.push(a)}compile(){let r=Function,n=this?.args,e=[...(this?.content??[""]).map(i=>` ${i}`)];return new r(...n,e.join(`
36
- `))}};var wa={major:4,minor:4,patch:3};var S=m("$ZodType",(t,r)=>{var n;t??(t={}),t._zod.def=r,t._zod.bag=t._zod.bag||{},t._zod.version=wa;let o=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&o.unshift(t);for(let e of o)for(let i of e._zod.onattach)i(t);if(o.length===0)(n=t._zod).deferred??(n.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let e=(a,s,u)=>{let l=Ne(a),d;for(let p of s){if(p._zod.def.when){if(zo(a)||!p._zod.def.when(a))continue}else if(l)continue;let g=a.issues.length,h=p._zod.check(a);if(h instanceof Promise&&u?.async===!1)throw new ue;if(d||h instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await h,a.issues.length!==g&&(l||(l=Ne(a,g)))});else{if(a.issues.length===g)continue;l||(l=Ne(a,g))}}return d?d.then(()=>a):a},i=(a,s,u)=>{if(Ne(a))return a.aborted=!0,a;let l=e(s,o,u);if(l instanceof Promise){if(u.async===!1)throw new ue;return l.then(d=>t._zod.parse(d,u))}return t._zod.parse(l,u)};t._zod.run=(a,s)=>{if(s.skipChecks)return t._zod.parse(a,s);if(s.direction==="backward"){let l=t._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return l instanceof Promise?l.then(d=>i(d,a,s)):i(l,a,s)}let u=t._zod.parse(a,s);if(u instanceof Promise){if(s.async===!1)throw new ue;return u.then(l=>e(l,o,s))}return e(u,o,s)}}I(t,"~standard",()=>({validate:e=>{try{let i=Po(t,e);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return To(t,e).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),We=m("$ZodString",(t,r)=>{S.init(t,r),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??Qo(t._zod.bag),t._zod.parse=(n,o)=>{if(r.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:t}),n}}),T=m("$ZodStringFormat",(t,r)=>{lt.init(t,r),We.init(t,r)}),za=m("$ZodGUID",(t,r)=>{r.pattern??(r.pattern=Zo),T.init(t,r)}),Oa=m("$ZodUUID",(t,r)=>{if(r.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[r.version];if(o===void 0)throw new Error(`Invalid UUID version: "${r.version}"`);r.pattern??(r.pattern=Ge(o))}else r.pattern??(r.pattern=Ge());T.init(t,r)}),Ea=m("$ZodEmail",(t,r)=>{r.pattern??(r.pattern=Lo),T.init(t,r)}),Pa=m("$ZodURL",(t,r)=>{T.init(t,r),t._zod.check=n=>{try{let o=n.value.trim();if(!r.normalize&&r.protocol?.source===Jo.source&&!/^https?:\/\//i.test(o)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:t,continue:!r.abort});return}let e=new URL(o);r.hostname&&(r.hostname.lastIndex=0,r.hostname.test(e.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:r.hostname.source,input:n.value,inst:t,continue:!r.abort})),r.protocol&&(r.protocol.lastIndex=0,r.protocol.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:r.protocol.source,input:n.value,inst:t,continue:!r.abort})),r.normalize?n.value=e.href:n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:t,continue:!r.abort})}}}),Ta=m("$ZodEmoji",(t,r)=>{r.pattern??(r.pattern=Fo()),T.init(t,r)}),ja=m("$ZodNanoID",(t,r)=>{r.pattern??(r.pattern=Uo),T.init(t,r)}),Aa=m("$ZodCUID",(t,r)=>{r.pattern??(r.pattern=jo),T.init(t,r)}),Na=m("$ZodCUID2",(t,r)=>{r.pattern??(r.pattern=Ao),T.init(t,r)}),Ca=m("$ZodULID",(t,r)=>{r.pattern??(r.pattern=No),T.init(t,r)}),Da=m("$ZodXID",(t,r)=>{r.pattern??(r.pattern=Co),T.init(t,r)}),Ua=m("$ZodKSUID",(t,r)=>{r.pattern??(r.pattern=Do),T.init(t,r)}),Ra=m("$ZodISODateTime",(t,r)=>{r.pattern??(r.pattern=Xo(r)),T.init(t,r)}),Za=m("$ZodISODate",(t,r)=>{r.pattern??(r.pattern=Ko),T.init(t,r)}),La=m("$ZodISOTime",(t,r)=>{r.pattern??(r.pattern=Yo(r)),T.init(t,r)}),Fa=m("$ZodISODuration",(t,r)=>{r.pattern??(r.pattern=Ro),T.init(t,r)}),Ma=m("$ZodIPv4",(t,r)=>{r.pattern??(r.pattern=Mo),T.init(t,r),t._zod.bag.format="ipv4"}),Va=m("$ZodIPv6",(t,r)=>{r.pattern??(r.pattern=Vo),T.init(t,r),t._zod.bag.format="ipv6",t._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:t,continue:!r.abort})}}}),Ba=m("$ZodMAC",(t,r)=>{r.pattern??(r.pattern=Bo(r.delimiter)),T.init(t,r),t._zod.bag.format="mac"}),Ga=m("$ZodCIDRv4",(t,r)=>{r.pattern??(r.pattern=Go),T.init(t,r)}),Wa=m("$ZodCIDRv6",(t,r)=>{r.pattern??(r.pattern=Wo),T.init(t,r),t._zod.check=n=>{let o=n.value.split("/");try{if(o.length!==2)throw new Error;let[e,i]=o;if(!i)throw new Error;let a=Number(i);if(`${a}`!==i)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:t,continue:!r.abort})}}});function Ha(t){if(t==="")return!0;if(/\s/.test(t)||t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var Ja=m("$ZodBase64",(t,r)=>{r.pattern??(r.pattern=Ho),T.init(t,r),t._zod.bag.contentEncoding="base64",t._zod.check=n=>{Ha(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:t,continue:!r.abort})}});function Kd(t){if(!on.test(t))return!1;let r=t.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=r.padEnd(Math.ceil(r.length/4)*4,"=");return Ha(n)}var qa=m("$ZodBase64URL",(t,r)=>{r.pattern??(r.pattern=on),T.init(t,r),t._zod.bag.contentEncoding="base64url",t._zod.check=n=>{Kd(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:t,continue:!r.abort})}}),Ka=m("$ZodE164",(t,r)=>{r.pattern??(r.pattern=qo),T.init(t,r)});function Yd(t,r=null){try{let n=t.split(".");if(n.length!==3)return!1;let[o]=n;if(!o)return!1;let e=JSON.parse(atob(o));return!("typ"in e&&e?.typ!=="JWT"||!e.alg||r&&(!("alg"in e)||e.alg!==r))}catch{return!1}}var Ya=m("$ZodJWT",(t,r)=>{T.init(t,r),t._zod.check=n=>{Yd(n.value,r.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:t,continue:!r.abort})}}),Xa=m("$ZodCustomStringFormat",(t,r)=>{T.init(t,r),t._zod.check=n=>{r.fn(n.value)||n.issues.push({code:"invalid_format",format:r.format,input:n.value,inst:t,continue:!r.abort})}}),pn=m("$ZodNumber",(t,r)=>{S.init(t,r),t._zod.pattern=t._zod.bag.pattern??an,t._zod.parse=(n,o)=>{if(r.coerce)try{n.value=Number(n.value)}catch{}let e=n.value;if(typeof e=="number"&&!Number.isNaN(e)&&Number.isFinite(e))return n;let i=typeof e=="number"?Number.isNaN(e)?"NaN":Number.isFinite(e)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:e,inst:t,...i?{received:i}:{}}),n}}),Qa=m("$ZodNumberFormat",(t,r)=>{ca.init(t,r),pn.init(t,r)}),sr=m("$ZodBoolean",(t,r)=>{S.init(t,r),t._zod.pattern=ra,t._zod.parse=(n,o)=>{if(r.coerce)try{n.value=!!n.value}catch{}let e=n.value;return typeof e=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:e,inst:t}),n}}),fn=m("$ZodBigInt",(t,r)=>{S.init(t,r),t._zod.pattern=ea,t._zod.parse=(n,o)=>{if(r.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:t}),n}}),es=m("$ZodBigIntFormat",(t,r)=>{ua.init(t,r),fn.init(t,r)}),ts=m("$ZodSymbol",(t,r)=>{S.init(t,r),t._zod.parse=(n,o)=>{let e=n.value;return typeof e=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:e,inst:t}),n}}),rs=m("$ZodUndefined",(t,r)=>{S.init(t,r),t._zod.pattern=ia,t._zod.values=new Set([void 0]),t._zod.parse=(n,o)=>{let e=n.value;return typeof e>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:e,inst:t}),n}}),ns=m("$ZodNull",(t,r)=>{S.init(t,r),t._zod.pattern=na,t._zod.values=new Set([null]),t._zod.parse=(n,o)=>{let e=n.value;return e===null||n.issues.push({expected:"null",code:"invalid_type",input:e,inst:t}),n}}),is=m("$ZodAny",(t,r)=>{S.init(t,r),t._zod.parse=n=>n}),os=m("$ZodUnknown",(t,r)=>{S.init(t,r),t._zod.parse=n=>n}),as=m("$ZodNever",(t,r)=>{S.init(t,r),t._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:t}),n)}),ss=m("$ZodVoid",(t,r)=>{S.init(t,r),t._zod.parse=(n,o)=>{let e=n.value;return typeof e>"u"||n.issues.push({expected:"void",code:"invalid_type",input:e,inst:t}),n}}),cs=m("$ZodDate",(t,r)=>{S.init(t,r),t._zod.parse=(n,o)=>{if(r.coerce)try{n.value=new Date(n.value)}catch{}let e=n.value,i=e instanceof Date;return i&&!Number.isNaN(e.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:e,...i?{received:"Invalid Date"}:{},inst:t}),n}});function Dd(t,r,n){t.issues.length&&r.issues.push(...Y(n,t.issues)),r.value[n]=t.value}var us=m("$ZodArray",(t,r)=>{S.init(t,r),t._zod.parse=(n,o)=>{let e=n.value;if(!Array.isArray(e))return n.issues.push({expected:"array",code:"invalid_type",input:e,inst:t}),n;n.value=Array(e.length);let i=[];for(let a=0;a<e.length;a++){let s=e[a],u=r.element._zod.run({value:s,issues:[]},o);u instanceof Promise?i.push(u.then(l=>Dd(l,n,a))):Dd(u,n,a)}return i.length?Promise.all(i).then(()=>n):n}});function mn(t,r,n,o,e,i){let a=n in o;if(t.issues.length){if(e&&i&&!a)return;r.issues.push(...Y(n,t.issues))}if(!a&&!e){t.issues.length||r.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}t.value===void 0?a&&(r.value[n]=void 0):r.value[n]=t.value}function Xd(t){let r=Object.keys(t.shape);for(let o of r)if(!t.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let n=So(t.shape);return{...t,keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(n)}}function Qd(t,r,n,o,e,i){let a=[],s=e.keySet,u=e.catchall._zod,l=u.def.type,d=u.optin==="optional",p=u.optout==="optional";for(let g in r){if(g==="__proto__"||s.has(g))continue;if(l==="never"){a.push(g);continue}let h=u.run({value:r[g],issues:[]},o);h instanceof Promise?t.push(h.then(x=>mn(x,n,g,r,d,p))):mn(h,n,g,r,d,p)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:r,inst:i}),t.length?Promise.all(t).then(()=>n):n}var em=m("$ZodObject",(t,r)=>{if(S.init(t,r),!Object.getOwnPropertyDescriptor(r,"shape")?.get){let s=r.shape;Object.defineProperty(r,"shape",{get:()=>{let u={...s};return Object.defineProperty(r,"shape",{value:u}),u}})}let o=it(()=>Xd(r));I(t._zod,"propValues",()=>{let s=r.shape,u={};for(let l in s){let d=s[l]._zod;if(d.values){u[l]??(u[l]=new Set);for(let p of d.values)u[l].add(p)}}return u});let e=Be,i=r.catchall,a;t._zod.parse=(s,u)=>{a??(a=o.value);let l=s.value;if(!e(l))return s.issues.push({expected:"object",code:"invalid_type",input:l,inst:t}),s;s.value={};let d=[],p=a.shape;for(let g of a.keys){let h=p[g],x=h._zod.optin==="optional",K=h._zod.optout==="optional",F=h._zod.run({value:l[g],issues:[]},u);F instanceof Promise?d.push(F.then(Fi=>mn(Fi,s,g,l,x,K))):mn(F,s,g,l,x,K)}return i?Qd(d,l,s,u,o.value,t):d.length?Promise.all(d).then(()=>s):s}}),ls=m("$ZodObjectJIT",(t,r)=>{em.init(t,r);let n=t._zod.parse,o=it(()=>Xd(r)),e=g=>{let h=new ar(["shape","payload","ctx"]),x=o.value,K=ge=>{let U=Wr(ge);return`shape[${U}]._zod.run({ value: input[${U}], issues: [] }, ctx)`};h.write("const input = payload.value;");let F=Object.create(null),Fi=0;for(let ge of x.keys)F[ge]=`key_${Fi++}`;h.write("const newResult = {};");for(let ge of x.keys){let U=F[ge],M=Wr(ge),Cl=g[ge],Dl=Cl?._zod?.optin==="optional",ah=Cl?._zod?.optout==="optional";h.write(`const ${U} = ${K(ge)};`),Dl&&ah?h.write(`
37
- if (${U}.issues.length) {
38
- if (${M} in input) {
39
- payload.issues = payload.issues.concat(${U}.issues.map(iss => ({
31
+ `)+r,n=o+1,o=e.indexOf(`
32
+ `,n)}while(o!==-1);return i+=e.slice(n),i}var{stdout:Td,stderr:Pd}=wd,io=Symbol("GENERATOR"),et=Symbol("STYLER"),Gt=Symbol("IS_EMPTY"),Ad=["ansi","ansi","ansi256","ansi16m"],tt=Object.create(null),j_=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Td?Td.level:0;e.level=t.level===void 0?r:t.level};var U_=e=>{let t=(...r)=>r.join(" ");return j_(t,e),Object.setPrototypeOf(t,Kt.prototype),t};function Kt(e){return U_(e)}Object.setPrototypeOf(Kt.prototype,Function.prototype);for(let[e,t]of Object.entries(ae))tt[e]={get(){let r=Zn(this,ao(t.open,t.close,this[et]),this[Gt]);return Object.defineProperty(this,e,{value:r}),r}};tt.visible={get(){let e=Zn(this,this[et],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var oo=(e,t,r,...o)=>e==="rgb"?t==="ansi16m"?ae[r].ansi16m(...o):t==="ansi256"?ae[r].ansi256(ae.rgbToAnsi256(...o)):ae[r].ansi(ae.rgbToAnsi(...o)):e==="hex"?oo("rgb",t,r,...ae.hexToRgb(...o)):ae[r][e](...o),L_=["rgb","hex","ansi256"];for(let e of L_){tt[e]={get(){let{level:r}=this;return function(...o){let n=ao(oo(e,Ad[r],"color",...o),ae.color.close,this[et]);return Zn(this,n,this[Gt])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);tt[t]={get(){let{level:r}=this;return function(...o){let n=ao(oo(e,Ad[r],"bgColor",...o),ae.bgColor.close,this[et]);return Zn(this,n,this[Gt])}}}}var M_=Object.defineProperties(()=>{},{...tt,level:{enumerable:!0,get(){return this[io].level},set(e){this[io].level=e}}}),ao=(e,t,r)=>{let o,n;return r===void 0?(o=e,n=t):(o=r.openAll+e,n=t+r.closeAll),{open:e,close:t,openAll:o,closeAll:n,parent:r}},Zn=(e,t,r)=>{let o=(...n)=>F_(o,n.length===1?""+n[0]:n.join(" "));return Object.setPrototypeOf(o,M_),o[io]=e,o[et]=t,o[Gt]=r,o},F_=(e,t)=>{if(e.level<=0||!t)return e[Gt]?"":t;let r=e[et];if(r===void 0)return t;let{openAll:o,closeAll:n}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=Ed(t,r.close,r.open),r=r.parent;let i=t.indexOf(`
33
+ `);return i!==-1&&(t=Od(t,n,o,i)),o+t+n};Object.defineProperties(Kt.prototype,tt);var Z_=Kt(),NI=Kt({level:Pd?Pd.level:0});var j=Z_;var Nd;function Cd(e){Nd=Vn(e)}function ke(){return Nd??Vn(void 0)}function Rd(){return ke()==="json"}function Dd(e){Rd()||console.log(j.green(`\u2713 ${e}`))}function Wt(e){Rd()||console.log(j.dim(e))}function so(){return process.stdout.isTTY===!0}function Vn(e){return e==="json"||e==="table"?e:so()?"table":"json"}var a={};ye(a,{$brand:()=>uo,$input:()=>As,$output:()=>Ps,NEVER:()=>co,TimePrecision:()=>Ds,ZodAny:()=>$u,ZodArray:()=>Ou,ZodBase64:()=>hi,ZodBase64URL:()=>_i,ZodBigInt:()=>Nt,ZodBigIntFormat:()=>yi,ZodBoolean:()=>At,ZodCIDRv4:()=>fi,ZodCIDRv6:()=>gi,ZodCUID:()=>si,ZodCUID2:()=>ci,ZodCatch:()=>Ju,ZodCodec:()=>On,ZodCustom:()=>Tn,ZodCustomStringFormat:()=>Tt,ZodDate:()=>Sn,ZodDefault:()=>Bu,ZodDiscriminatedUnion:()=>Pu,ZodE164:()=>vi,ZodEmail:()=>ii,ZodEmoji:()=>oi,ZodEnum:()=>Et,ZodError:()=>by,ZodExactOptional:()=>Fu,ZodFile:()=>Lu,ZodFirstPartyTypeKind:()=>ul,ZodFunction:()=>al,ZodGUID:()=>vn,ZodIPv4:()=>mi,ZodIPv6:()=>pi,ZodISODate:()=>Xr,ZodISODateTime:()=>Yr,ZodISODuration:()=>ei,ZodISOTime:()=>Qr,ZodIntersection:()=>Au,ZodIssueCode:()=>xy,ZodJWT:()=>bi,ZodKSUID:()=>di,ZodLazy:()=>rl,ZodLiteral:()=>Uu,ZodMAC:()=>_u,ZodMap:()=>zu,ZodNaN:()=>Xu,ZodNanoID:()=>ai,ZodNever:()=>wu,ZodNonOptional:()=>wi,ZodNull:()=>ku,ZodNullable:()=>Vu,ZodNumber:()=>Pt,ZodNumberFormat:()=>Je,ZodObject:()=>In,ZodOptional:()=>Ii,ZodPipe:()=>En,ZodPrefault:()=>Gu,ZodPreprocess:()=>Qu,ZodPromise:()=>ol,ZodReadonly:()=>el,ZodRealError:()=>Q,ZodRecord:()=>wt,ZodSet:()=>ju,ZodString:()=>Ot,ZodStringFormat:()=>D,ZodSuccess:()=>qu,ZodSymbol:()=>yu,ZodTemplateLiteral:()=>nl,ZodTransform:()=>Mu,ZodTuple:()=>Cu,ZodType:()=>I,ZodULID:()=>ui,ZodURL:()=>kn,ZodUUID:()=>ve,ZodUndefined:()=>xu,ZodUnion:()=>wn,ZodUnknown:()=>Iu,ZodVoid:()=>Eu,ZodXID:()=>li,ZodXor:()=>Tu,_ZodString:()=>ri,_default:()=>Hu,_function:()=>$f,any:()=>ef,array:()=>$n,base64:()=>jp,base64url:()=>Up,bigint:()=>qp,boolean:()=>bu,catch:()=>Yu,check:()=>If,cidrv4:()=>Dp,cidrv6:()=>zp,clone:()=>K,codec:()=>yf,coerce:()=>ll,config:()=>F,core:()=>Ie,cuid:()=>Ep,cuid2:()=>Op,custom:()=>wf,date:()=>nf,decode:()=>lu,decodeAsync:()=>mu,describe:()=>Ef,discriminatedUnion:()=>uf,e164:()=>Lp,email:()=>_p,emoji:()=>Ip,encode:()=>uu,encodeAsync:()=>du,endsWith:()=>ht,enum:()=>Si,exactOptional:()=>Zu,file:()=>hf,flattenError:()=>rn,float32:()=>Hp,float64:()=>Gp,formatError:()=>on,fromJSONSchema:()=>Rf,function:()=>$f,getErrorMap:()=>Sy,globalRegistry:()=>B,gt:()=>he,gte:()=>q,guid:()=>vp,hash:()=>Bp,hex:()=>Vp,hostname:()=>Zp,httpUrl:()=>$p,includes:()=>ft,instanceof:()=>Tf,int:()=>ti,int32:()=>Kp,int64:()=>Jp,intersection:()=>Nu,invertCodec:()=>xf,ipv4:()=>Np,ipv6:()=>Rp,iso:()=>It,json:()=>Af,jwt:()=>Mp,keyof:()=>rf,ksuid:()=>Ap,lazy:()=>il,length:()=>We,literal:()=>gf,locales:()=>pn,looseObject:()=>sf,looseRecord:()=>df,lowercase:()=>mt,lt:()=>ge,lte:()=>ne,mac:()=>Cp,map:()=>mf,maxLength:()=>Ke,maxSize:()=>Ce,meta:()=>Of,mime:()=>_t,minLength:()=>$e,minSize:()=>_e,multipleOf:()=>Ne,nan:()=>bf,nanoid:()=>wp,nativeEnum:()=>ff,negative:()=>Fr,never:()=>xi,nonnegative:()=>Vr,nonoptional:()=>Wu,nonpositive:()=>Zr,normalize:()=>vt,null:()=>Su,nullable:()=>yn,nullish:()=>_f,number:()=>vu,object:()=>of,optional:()=>bn,overwrite:()=>ce,parse:()=>ou,parseAsync:()=>au,partialRecord:()=>lf,pipe:()=>ni,positive:()=>Mr,prefault:()=>Ku,preprocess:()=>Nf,prettifyError:()=>So,promise:()=>Sf,property:()=>Br,readonly:()=>tl,record:()=>Du,refine:()=>sl,regex:()=>dt,regexes:()=>te,registry:()=>br,safeDecode:()=>fu,safeDecodeAsync:()=>hu,safeEncode:()=>pu,safeEncodeAsync:()=>gu,safeParse:()=>su,safeParseAsync:()=>cu,set:()=>pf,setErrorMap:()=>ky,size:()=>Ge,slugify:()=>kt,startsWith:()=>gt,strictObject:()=>af,string:()=>_n,stringFormat:()=>Fp,stringbool:()=>Pf,success:()=>vf,superRefine:()=>cl,symbol:()=>Xp,templateLiteral:()=>kf,toJSONSchema:()=>Wr,toLowerCase:()=>yt,toUpperCase:()=>xt,transform:()=>$i,treeifyError:()=>ko,trim:()=>bt,tuple:()=>Ru,uint32:()=>Wp,uint64:()=>Yp,ulid:()=>Tp,undefined:()=>Qp,union:()=>ki,unknown:()=>qe,uppercase:()=>pt,url:()=>Sp,util:()=>b,uuid:()=>bp,uuidv4:()=>yp,uuidv6:()=>xp,uuidv7:()=>kp,void:()=>tf,xid:()=>Pp,xor:()=>cf});var Ie={};ye(Ie,{$ZodAny:()=>Xa,$ZodArray:()=>rs,$ZodAsyncError:()=>se,$ZodBase64:()=>Za,$ZodBase64URL:()=>Va,$ZodBigInt:()=>dr,$ZodBigIntFormat:()=>Wa,$ZodBoolean:()=>un,$ZodCIDRv4:()=>La,$ZodCIDRv6:()=>Ma,$ZodCUID:()=>Ea,$ZodCUID2:()=>Oa,$ZodCatch:()=>xs,$ZodCheck:()=>z,$ZodCheckBigIntFormat:()=>ra,$ZodCheckEndsWith:()=>ga,$ZodCheckGreaterThan:()=>or,$ZodCheckIncludes:()=>pa,$ZodCheckLengthEquals:()=>ua,$ZodCheckLessThan:()=>ir,$ZodCheckLowerCase:()=>da,$ZodCheckMaxLength:()=>sa,$ZodCheckMaxSize:()=>ia,$ZodCheckMimeType:()=>_a,$ZodCheckMinLength:()=>ca,$ZodCheckMinSize:()=>oa,$ZodCheckMultipleOf:()=>ta,$ZodCheckNumberFormat:()=>na,$ZodCheckOverwrite:()=>va,$ZodCheckProperty:()=>ha,$ZodCheckRegex:()=>la,$ZodCheckSizeEquals:()=>aa,$ZodCheckStartsWith:()=>fa,$ZodCheckStringFormat:()=>ut,$ZodCheckUpperCase:()=>ma,$ZodCodec:()=>dn,$ZodCustom:()=>Ts,$ZodCustomStringFormat:()=>Ga,$ZodDate:()=>ns,$ZodDefault:()=>_s,$ZodDiscriminatedUnion:()=>as,$ZodE164:()=>Ba,$ZodEmail:()=>Sa,$ZodEmoji:()=>Ia,$ZodEncodeError:()=>Ee,$ZodEnum:()=>ds,$ZodError:()=>nn,$ZodExactOptional:()=>gs,$ZodFile:()=>ps,$ZodFunction:()=>ws,$ZodGUID:()=>xa,$ZodIPv4:()=>za,$ZodIPv6:()=>ja,$ZodISODate:()=>Ca,$ZodISODateTime:()=>Na,$ZodISODuration:()=>Da,$ZodISOTime:()=>Ra,$ZodIntersection:()=>ss,$ZodJWT:()=>Ha,$ZodKSUID:()=>Aa,$ZodLazy:()=>Os,$ZodLiteral:()=>ms,$ZodMAC:()=>Ua,$ZodMap:()=>us,$ZodNaN:()=>ks,$ZodNanoID:()=>wa,$ZodNever:()=>es,$ZodNonOptional:()=>bs,$ZodNull:()=>Ya,$ZodNullable:()=>hs,$ZodNumber:()=>lr,$ZodNumberFormat:()=>Ka,$ZodObject:()=>mm,$ZodObjectJIT:()=>is,$ZodOptional:()=>pr,$ZodPipe:()=>fr,$ZodPrefault:()=>vs,$ZodPreprocess:()=>Ss,$ZodPromise:()=>Es,$ZodReadonly:()=>$s,$ZodRealError:()=>X,$ZodRecord:()=>cs,$ZodRegistry:()=>vr,$ZodSet:()=>ls,$ZodString:()=>He,$ZodStringFormat:()=>R,$ZodSuccess:()=>ys,$ZodSymbol:()=>qa,$ZodTemplateLiteral:()=>Is,$ZodTransform:()=>fs,$ZodTuple:()=>mr,$ZodType:()=>$,$ZodULID:()=>Ta,$ZodURL:()=>$a,$ZodUUID:()=>ka,$ZodUndefined:()=>Ja,$ZodUnion:()=>ln,$ZodUnknown:()=>Qa,$ZodVoid:()=>ts,$ZodXID:()=>Pa,$ZodXor:()=>os,$brand:()=>uo,$constructor:()=>p,$input:()=>As,$output:()=>Ps,Doc:()=>cn,JSONSchema:()=>fp,JSONSchemaGenerator:()=>qr,NEVER:()=>co,TimePrecision:()=>Ds,_any:()=>nc,_array:()=>uc,_base64:()=>zr,_base64url:()=>jr,_bigint:()=>qs,_boolean:()=>Ks,_catch:()=>dy,_check:()=>pp,_cidrv4:()=>Rr,_cidrv6:()=>Dr,_coercedBigint:()=>Js,_coercedBoolean:()=>Ws,_coercedDate:()=>sc,_coercedNumber:()=>Fs,_coercedString:()=>Cs,_cuid:()=>Er,_cuid2:()=>Or,_custom:()=>dc,_date:()=>ac,_decode:()=>qn,_decodeAsync:()=>Yn,_default:()=>cy,_discriminatedUnion:()=>Jb,_e164:()=>Ur,_email:()=>yr,_emoji:()=>Ir,_encode:()=>Wn,_encodeAsync:()=>Jn,_endsWith:()=>ht,_enum:()=>ny,_file:()=>lc,_float32:()=>Vs,_float64:()=>Bs,_gt:()=>he,_gte:()=>q,_guid:()=>fn,_includes:()=>ft,_int:()=>Zs,_int32:()=>Hs,_int64:()=>Ys,_intersection:()=>Yb,_ipv4:()=>Nr,_ipv6:()=>Cr,_isoDate:()=>js,_isoDateTime:()=>zs,_isoDuration:()=>Ls,_isoTime:()=>Us,_jwt:()=>Lr,_ksuid:()=>Ar,_lazy:()=>gy,_length:()=>We,_literal:()=>iy,_lowercase:()=>mt,_lt:()=>ge,_lte:()=>ne,_mac:()=>Rs,_map:()=>ey,_max:()=>ne,_maxLength:()=>Ke,_maxSize:()=>Ce,_mime:()=>_t,_min:()=>q,_minLength:()=>$e,_minSize:()=>_e,_multipleOf:()=>Ne,_nan:()=>cc,_nanoid:()=>wr,_nativeEnum:()=>ry,_negative:()=>Fr,_never:()=>ic,_nonnegative:()=>Vr,_nonoptional:()=>uy,_nonpositive:()=>Zr,_normalize:()=>vt,_null:()=>tc,_nullable:()=>sy,_number:()=>Ms,_optional:()=>ay,_overwrite:()=>ce,_parse:()=>ot,_parseAsync:()=>at,_pipe:()=>my,_positive:()=>Mr,_promise:()=>hy,_property:()=>Br,_readonly:()=>py,_record:()=>Qb,_refine:()=>mc,_regex:()=>dt,_safeDecode:()=>Qn,_safeDecodeAsync:()=>tr,_safeEncode:()=>Xn,_safeEncodeAsync:()=>er,_safeParse:()=>st,_safeParseAsync:()=>ct,_set:()=>ty,_size:()=>Ge,_slugify:()=>kt,_startsWith:()=>gt,_string:()=>Ns,_stringFormat:()=>St,_stringbool:()=>hc,_success:()=>ly,_superRefine:()=>pc,_symbol:()=>Qs,_templateLiteral:()=>fy,_toLowerCase:()=>yt,_toUpperCase:()=>xt,_transform:()=>oy,_trim:()=>bt,_tuple:()=>Xb,_uint32:()=>Gs,_uint64:()=>Xs,_ulid:()=>Tr,_undefined:()=>ec,_union:()=>Wb,_unknown:()=>rc,_uppercase:()=>pt,_url:()=>gn,_uuid:()=>xr,_uuidv4:()=>kr,_uuidv6:()=>Sr,_uuidv7:()=>$r,_void:()=>oc,_xid:()=>Pr,_xor:()=>qb,clone:()=>K,config:()=>F,createStandardJSONSchemaMethod:()=>$t,createToJSONSchemaMethod:()=>_c,decode:()=>hv,decodeAsync:()=>vv,describe:()=>fc,encode:()=>gv,encodeAsync:()=>_v,extractDefs:()=>De,finalize:()=>ze,flattenError:()=>rn,formatError:()=>on,globalConfig:()=>Ze,globalRegistry:()=>B,initializeContext:()=>Re,isValidBase64:()=>Fa,isValidBase64URL:()=>cm,isValidJWT:()=>um,locales:()=>pn,meta:()=>gc,parse:()=>Gn,parseAsync:()=>Kn,prettifyError:()=>So,process:()=>N,regexes:()=>te,registry:()=>br,safeDecode:()=>yv,safeDecodeAsync:()=>kv,safeEncode:()=>bv,safeEncodeAsync:()=>xv,safeParse:()=>$o,safeParseAsync:()=>Io,toDotPath:()=>Fd,toJSONSchema:()=>Wr,treeifyError:()=>ko,util:()=>b,version:()=>ba});var zd,co=Object.freeze({status:"aborted"});function p(e,t,r){function o(c,u){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:u,constr:s,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,u);let l=s.prototype,d=Object.keys(l);for(let m=0;m<d.length;m++){let g=d[m];g in c||(c[g]=l[g].bind(c))}}let n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:e});function s(c){var u;let l=r?.Parent?new i:this;o(l,c),(u=l._zod).deferred??(u.deferred=[]);for(let d of l._zod.deferred)d();return l}return Object.defineProperty(s,"init",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:c=>r?.Parent&&c instanceof r.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var uo=Symbol("zod_brand"),se=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ee=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(zd=globalThis).__zod_globalConfig??(zd.__zod_globalConfig={});var Ze=globalThis.__zod_globalConfig;function F(e){return e&&Object.assign(Ze,e),Ze}var b={};ye(b,{BIGINT_FORMAT_RANGES:()=>yo,Class:()=>mo,NUMBER_FORMAT_RANGES:()=>bo,aborted:()=>Ae,allowsEval:()=>go,assert:()=>K_,assertEqual:()=>V_,assertIs:()=>H_,assertNever:()=>G_,assertNotEqual:()=>B_,assignProp:()=>Te,base64ToUint8Array:()=>Ud,base64urlToUint8Array:()=>lv,cached:()=>rt,captureStackTrace:()=>Hn,cleanEnum:()=>uv,cleanRegex:()=>Xt,clone:()=>K,cloneDef:()=>q_,createTransparentProxy:()=>tv,defineLazy:()=>w,esc:()=>Bn,escapeRegex:()=>oe,explicitlyAborted:()=>xo,extend:()=>iv,finalizeIssue:()=>W,floatSafeRemainder:()=>po,getElementAtPath:()=>J_,getEnumValues:()=>Yt,getLengthableOrigin:()=>tn,getParsedType:()=>ev,getSizableOrigin:()=>en,hexToUint8Array:()=>mv,isObject:()=>Ve,isPlainObject:()=>Pe,issue:()=>it,joinValues:()=>f,jsonStringifyReplacer:()=>nt,merge:()=>av,mergeDefs:()=>Se,normalizeParams:()=>y,nullish:()=>Oe,numKeys:()=>Q_,objectClone:()=>W_,omit:()=>rv,optionalKeys:()=>vo,parsedType:()=>v,partial:()=>sv,pick:()=>nv,prefixIssues:()=>Y,primitiveTypes:()=>_o,promiseAllObject:()=>Y_,propertyKeyTypes:()=>Qt,randomString:()=>X_,required:()=>cv,safeExtend:()=>ov,shallowClone:()=>ho,slugify:()=>fo,stringifyPrimitive:()=>_,uint8ArrayToBase64:()=>Ld,uint8ArrayToBase64url:()=>dv,uint8ArrayToHex:()=>pv,unwrapMessage:()=>Jt});function V_(e){return e}function B_(e){return e}function H_(e){}function G_(e){throw new Error("Unexpected value in exhaustive check")}function K_(e){}function Yt(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function f(e,t="|"){return e.map(r=>_(r)).join(t)}function nt(e,t){return typeof t=="bigint"?t.toString():t}function rt(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function Oe(e){return e==null}function Xt(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function po(e,t){let r=e/t,o=Math.round(r),n=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-o)<n?0:r-o}var jd=Symbol("evaluating");function w(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==jd)return o===void 0&&(o=jd,o=r()),o},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function W_(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Te(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Se(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o)}return Object.defineProperties({},t)}function q_(e){return Se(e._zod.def)}function J_(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function Y_(e){let t=Object.keys(e),r=t.map(o=>e[o]);return Promise.all(r).then(o=>{let n={};for(let i=0;i<t.length;i++)n[t[i]]=o[i];return n})}function X_(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function Bn(e){return JSON.stringify(e)}function fo(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Hn="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ve(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var go=rt(()=>{if(Ze.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Pe(e){if(Ve(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Ve(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function ho(e){return Pe(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function Q_(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var ev=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},Qt=new Set(["string","number","symbol"]),_o=new Set(["string","number","bigint","boolean","symbol","undefined"]);function oe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function K(e,t,r){let o=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(o._zod.parent=e),o}function y(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function tv(e){let t;return new Proxy({},{get(r,o,n){return t??(t=e()),Reflect.get(t,o,n)},set(r,o,n,i){return t??(t=e()),Reflect.set(t,o,n,i)},has(r,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(r,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(r,o,n){return t??(t=e()),Reflect.defineProperty(t,o,n)}})}function _(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function vo(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var bo={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},yo={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function nv(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=Se(e._zod.def,{get shape(){let s={};for(let c in t){if(!(c in r.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(s[c]=r.shape[c])}return Te(this,"shape",s),s},checks:[]});return K(e,i)}function rv(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=Se(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let c in t){if(!(c in r.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete s[c]}return Te(this,"shape",s),s},checks:[]});return K(e,i)}function iv(e,t){if(!Pe(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let i=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=Se(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Te(this,"shape",i),i}});return K(e,n)}function ov(e,t){if(!Pe(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=Se(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Te(this,"shape",o),o}});return K(e,r)}function av(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=Se(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return Te(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return K(e,r)}function sv(e,t,r){let n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=Se(t._zod.def,{get shape(){let c=t._zod.def.shape,u={...c};if(r)for(let l in r){if(!(l in c))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(u[l]=e?new e({type:"optional",innerType:c[l]}):c[l])}else for(let l in c)u[l]=e?new e({type:"optional",innerType:c[l]}):c[l];return Te(this,"shape",u),u},checks:[]});return K(t,s)}function cv(e,t,r){let o=Se(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let s in r){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=new e({type:"nonoptional",innerType:n[s]}))}else for(let s in n)i[s]=new e({type:"nonoptional",innerType:n[s]});return Te(this,"shape",i),i}});return K(t,o)}function Ae(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function xo(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function Y(e,t){return t.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function Jt(e){return typeof e=="string"?e:e?.message}function W(e,t,r){let o=e.message?e.message:Jt(e.inst?._zod.def?.error?.(e))??Jt(t?.error?.(e))??Jt(r.customError?.(e))??Jt(r.localeError?.(e))??"Invalid input",{inst:n,continue:i,input:s,...c}=e;return c.path??(c.path=[]),c.message=o,t?.reportInput&&(c.input=s),c}function en(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function tn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function v(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function it(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function uv(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Ud(e){let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r}function Ld(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function lv(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return Ud(t+r)}function dv(e){return Ld(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function mv(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)r[o/2]=Number.parseInt(t.slice(o,o+2),16);return r}function pv(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var mo=class{constructor(...t){}};var Md=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,nt,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},nn=p("$ZodError",Md),X=p("$ZodError",Md,{Parent:Error});function rn(e,t=r=>r.message){let r={},o=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):o.push(t(n));return{formErrors:o,fieldErrors:r}}function on(e,t=r=>r.message){let r={_errors:[]},o=(n,i=[])=>{for(let s of n.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(c=>o({issues:c},[...i,...s.path]));else if(s.code==="invalid_key")o({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")o({issues:s.issues},[...i,...s.path]);else{let c=[...i,...s.path];if(c.length===0)r._errors.push(t(s));else{let u=r,l=0;for(;l<c.length;){let d=c[l];l===c.length-1?(u[d]=u[d]||{_errors:[]},u[d]._errors.push(t(s))):u[d]=u[d]||{_errors:[]},u=u[d],l++}}}};return o(e),r}function ko(e,t=r=>r.message){let r={errors:[]},o=(n,i=[])=>{var s,c;for(let u of n.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(l=>o({issues:l},[...i,...u.path]));else if(u.code==="invalid_key")o({issues:u.issues},[...i,...u.path]);else if(u.code==="invalid_element")o({issues:u.issues},[...i,...u.path]);else{let l=[...i,...u.path];if(l.length===0){r.errors.push(t(u));continue}let d=r,m=0;for(;m<l.length;){let g=l[m],h=m===l.length-1;typeof g=="string"?(d.properties??(d.properties={}),(s=d.properties)[g]??(s[g]={errors:[]}),d=d.properties[g]):(d.items??(d.items=[]),(c=d.items)[g]??(c[g]={errors:[]}),d=d.items[g]),h&&d.errors.push(t(u)),m++}}};return o(e),r}function Fd(e){let t=[],r=e.map(o=>typeof o=="object"?o.key:o);for(let o of r)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}function So(e){let t=[],r=[...e.issues].sort((o,n)=>(o.path??[]).length-(n.path??[]).length);for(let o of r)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${Fd(o.path)}`);return t.join(`
34
+ `)}var ot=e=>(t,r,o,n)=>{let i=o?{...o,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new se;if(s.issues.length){let c=new(n?.Err??e)(s.issues.map(u=>W(u,i,F())));throw Hn(c,n?.callee),c}return s.value},Gn=ot(X),at=e=>async(t,r,o,n)=>{let i=o?{...o,async:!0}:{async:!0},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let c=new(n?.Err??e)(s.issues.map(u=>W(u,i,F())));throw Hn(c,n?.callee),c}return s.value},Kn=at(X),st=e=>(t,r,o)=>{let n=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new se;return i.issues.length?{success:!1,error:new(e??nn)(i.issues.map(s=>W(s,n,F())))}:{success:!0,data:i.value}},$o=st(X),ct=e=>async(t,r,o)=>{let n=o?{...o,async:!0}:{async:!0},i=t._zod.run({value:r,issues:[]},n);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>W(s,n,F())))}:{success:!0,data:i.value}},Io=ct(X),Wn=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return ot(e)(t,r,n)},gv=Wn(X),qn=e=>(t,r,o)=>ot(e)(t,r,o),hv=qn(X),Jn=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return at(e)(t,r,n)},_v=Jn(X),Yn=e=>async(t,r,o)=>at(e)(t,r,o),vv=Yn(X),Xn=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return st(e)(t,r,n)},bv=Xn(X),Qn=e=>(t,r,o)=>st(e)(t,r,o),yv=Qn(X),er=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return ct(e)(t,r,n)},xv=er(X),tr=e=>async(t,r,o)=>ct(e)(t,r,o),kv=tr(X);var te={};ye(te,{base64:()=>Fo,base64url:()=>nr,bigint:()=>Wo,boolean:()=>Jo,browserEmail:()=>Pv,cidrv4:()=>Lo,cidrv6:()=>Mo,cuid:()=>wo,cuid2:()=>Eo,date:()=>Bo,datetime:()=>Go,domain:()=>Cv,duration:()=>No,e164:()=>Vo,email:()=>Ro,emoji:()=>Do,extendedDuration:()=>Sv,guid:()=>Co,hex:()=>Rv,hostname:()=>Nv,html5Email:()=>Ev,httpProtocol:()=>Zo,idnEmail:()=>Tv,integer:()=>qo,ipv4:()=>zo,ipv6:()=>jo,ksuid:()=>Po,lowercase:()=>Qo,mac:()=>Uo,md5_base64:()=>zv,md5_base64url:()=>jv,md5_hex:()=>Dv,nanoid:()=>Ao,null:()=>Yo,number:()=>rr,rfc5322Email:()=>Ov,sha1_base64:()=>Lv,sha1_base64url:()=>Mv,sha1_hex:()=>Uv,sha256_base64:()=>Zv,sha256_base64url:()=>Vv,sha256_hex:()=>Fv,sha384_base64:()=>Hv,sha384_base64url:()=>Gv,sha384_hex:()=>Bv,sha512_base64:()=>Wv,sha512_base64url:()=>qv,sha512_hex:()=>Kv,string:()=>Ko,time:()=>Ho,ulid:()=>Oo,undefined:()=>Xo,unicodeEmail:()=>Zd,uppercase:()=>ea,uuid:()=>Be,uuid4:()=>$v,uuid6:()=>Iv,uuid7:()=>wv,xid:()=>To});var wo=/^[cC][0-9a-z]{6,}$/,Eo=/^[0-9a-z]+$/,Oo=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,To=/^[0-9a-vA-V]{20}$/,Po=/^[A-Za-z0-9]{27}$/,Ao=/^[a-zA-Z0-9_-]{21}$/,No=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Sv=/^[-+]?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)?)??$/,Co=/^([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})$/,Be=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([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)$/,$v=Be(4),Iv=Be(6),wv=Be(7),Ro=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ev=/^[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])?)*$/,Ov=/^(([^<>()\[\]\\.,;:\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,}))$/,Zd=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Tv=Zd,Pv=/^[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])?)*$/,Av="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Do(){return new RegExp(Av,"u")}var zo=/^(?:(?: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])$/,jo=/^(([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}|:))$/,Uo=e=>{let t=oe(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Lo=/^((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])$/,Mo=/^(([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])$/,Fo=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,nr=/^[A-Za-z0-9_-]*$/,Nv=/^(?=.{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])?)*\.?$/,Cv=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Zo=/^https?$/,Vo=/^\+[1-9]\d{6,14}$/,Vd="(?:(?:\\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])))",Bo=new RegExp(`^${Vd}$`);function Bd(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Ho(e){return new RegExp(`^${Bd(e)}$`)}function Go(e){let t=Bd({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${r.join("|")})`;return new RegExp(`^${Vd}T(?:${o})$`)}var Ko=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Wo=/^-?\d+n?$/,qo=/^-?\d+$/,rr=/^-?\d+(?:\.\d+)?$/,Jo=/^(?:true|false)$/i,Yo=/^null$/i;var Xo=/^undefined$/i;var Qo=/^[^A-Z]*$/,ea=/^[^a-z]*$/,Rv=/^[0-9a-fA-F]*$/;function an(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function sn(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Dv=/^[0-9a-fA-F]{32}$/,zv=an(22,"=="),jv=sn(22),Uv=/^[0-9a-fA-F]{40}$/,Lv=an(27,"="),Mv=sn(27),Fv=/^[0-9a-fA-F]{64}$/,Zv=an(43,"="),Vv=sn(43),Bv=/^[0-9a-fA-F]{96}$/,Hv=an(64,""),Gv=sn(64),Kv=/^[0-9a-fA-F]{128}$/,Wv=an(86,"=="),qv=sn(86);var z=p("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Gd={number:"number",bigint:"bigint",object:"date"},ir=p("$ZodCheckLessThan",(e,t)=>{z.init(e,t);let r=Gd[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),or=p("$ZodCheckGreaterThan",(e,t)=>{z.init(e,t);let r=Gd[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ta=p("$ZodCheckMultipleOf",(e,t)=>{z.init(e,t),e._zod.onattach.push(r=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):po(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),na=p("$ZodCheckNumberFormat",(e,t)=>{z.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),o=r?"int":"number",[n,i]=bo[t.format];e._zod.onattach.push(s=>{let c=s._zod.bag;c.format=t.format,c.minimum=n,c.maximum=i,r&&(c.pattern=qo)}),e._zod.check=s=>{let c=s.value;if(r){if(!Number.isInteger(c)){s.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?s.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):s.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}c<n&&s.issues.push({origin:"number",input:c,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),c>i&&s.issues.push({origin:"number",input:c,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),ra=p("$ZodCheckBigIntFormat",(e,t)=>{z.init(e,t);let[r,o]=yo[t.format];e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,i.minimum=r,i.maximum=o}),e._zod.check=n=>{let i=n.value;i<r&&n.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),i>o&&n.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),ia=p("$ZodCheckMaxSize",(e,t)=>{var r;z.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Oe(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let n=o.value;n.size<=t.maximum||o.issues.push({origin:en(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),oa=p("$ZodCheckMinSize",(e,t)=>{var r;z.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Oe(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let n=o.value;n.size>=t.minimum||o.issues.push({origin:en(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),aa=p("$ZodCheckSizeEquals",(e,t)=>{var r;z.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Oe(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=o=>{let n=o.value,i=n.size;if(i===t.size)return;let s=i>t.size;o.issues.push({origin:en(n),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),sa=p("$ZodCheckMaxLength",(e,t)=>{var r;z.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Oe(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let n=o.value;if(n.length<=t.maximum)return;let s=tn(n);o.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),ca=p("$ZodCheckMinLength",(e,t)=>{var r;z.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Oe(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let n=o.value;if(n.length>=t.minimum)return;let s=tn(n);o.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),ua=p("$ZodCheckLengthEquals",(e,t)=>{var r;z.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Oe(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=o=>{let n=o.value,i=n.length;if(i===t.length)return;let s=tn(n),c=i>t.length;o.issues.push({origin:s,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),ut=p("$ZodCheckStringFormat",(e,t)=>{var r,o;z.init(e,t),e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),la=p("$ZodCheckRegex",(e,t)=>{ut.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),da=p("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Qo),ut.init(e,t)}),ma=p("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ea),ut.init(e,t)}),pa=p("$ZodCheckIncludes",(e,t)=>{z.init(e,t);let r=oe(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),fa=p("$ZodCheckStartsWith",(e,t)=>{z.init(e,t);let r=new RegExp(`^${oe(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),ga=p("$ZodCheckEndsWith",(e,t)=>{z.init(e,t);let r=new RegExp(`.*${oe(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});function Hd(e,t,r){e.issues.length&&t.issues.push(...Y(r,e.issues))}var ha=p("$ZodCheckProperty",(e,t)=>{z.init(e,t),e._zod.check=r=>{let o=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(n=>Hd(n,r,t.property));Hd(o,r,t.property)}}),_a=p("$ZodCheckMimeType",(e,t)=>{z.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime}),e._zod.check=o=>{r.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),va=p("$ZodCheckOverwrite",(e,t)=>{z.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var cn=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let o=t.split(`
35
+ `).filter(s=>s),n=Math.min(...o.map(s=>s.length-s.trimStart().length)),i=o.map(s=>s.slice(n)).map(s=>" ".repeat(this.indent*2)+s);for(let s of i)this.content.push(s)}compile(){let t=Function,r=this?.args,n=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...r,n.join(`
36
+ `))}};var ba={major:4,minor:4,patch:3};var $=p("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=ba;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let n of o)for(let i of n._zod.onattach)i(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let n=(s,c,u)=>{let l=Ae(s),d;for(let m of c){if(m._zod.def.when){if(xo(s)||!m._zod.def.when(s))continue}else if(l)continue;let g=s.issues.length,h=m._zod.check(s);if(h instanceof Promise&&u?.async===!1)throw new se;if(d||h instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await h,s.issues.length!==g&&(l||(l=Ae(s,g)))});else{if(s.issues.length===g)continue;l||(l=Ae(s,g))}}return d?d.then(()=>s):s},i=(s,c,u)=>{if(Ae(s))return s.aborted=!0,s;let l=n(c,o,u);if(l instanceof Promise){if(u.async===!1)throw new se;return l.then(d=>e._zod.parse(d,u))}return e._zod.parse(l,u)};e._zod.run=(s,c)=>{if(c.skipChecks)return e._zod.parse(s,c);if(c.direction==="backward"){let l=e._zod.parse({value:s.value,issues:[]},{...c,skipChecks:!0});return l instanceof Promise?l.then(d=>i(d,s,c)):i(l,s,c)}let u=e._zod.parse(s,c);if(u instanceof Promise){if(c.async===!1)throw new se;return u.then(l=>n(l,o,c))}return n(u,o,c)}}w(e,"~standard",()=>({validate:n=>{try{let i=$o(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Io(e,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),He=p("$ZodString",(e,t)=>{$.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Ko(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),R=p("$ZodStringFormat",(e,t)=>{ut.init(e,t),He.init(e,t)}),xa=p("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Co),R.init(e,t)}),ka=p("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Be(o))}else t.pattern??(t.pattern=Be());R.init(e,t)}),Sa=p("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Ro),R.init(e,t)}),$a=p("$ZodURL",(e,t)=>{R.init(e,t),e._zod.check=r=>{try{let o=r.value.trim();if(!t.normalize&&t.protocol?.source===Zo.source&&!/^https?:\/\//i.test(o)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}let n=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Ia=p("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Do()),R.init(e,t)}),wa=p("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Ao),R.init(e,t)}),Ea=p("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=wo),R.init(e,t)}),Oa=p("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Eo),R.init(e,t)}),Ta=p("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Oo),R.init(e,t)}),Pa=p("$ZodXID",(e,t)=>{t.pattern??(t.pattern=To),R.init(e,t)}),Aa=p("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Po),R.init(e,t)}),Na=p("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Go(t)),R.init(e,t)}),Ca=p("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Bo),R.init(e,t)}),Ra=p("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Ho(t)),R.init(e,t)}),Da=p("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=No),R.init(e,t)}),za=p("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=zo),R.init(e,t),e._zod.bag.format="ipv4"}),ja=p("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=jo),R.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),Ua=p("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Uo(t.delimiter)),R.init(e,t),e._zod.bag.format="mac"}),La=p("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Lo),R.init(e,t)}),Ma=p("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Mo),R.init(e,t),e._zod.check=r=>{let o=r.value.split("/");try{if(o.length!==2)throw new Error;let[n,i]=o;if(!i)throw new Error;let s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Fa(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Za=p("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Fo),R.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Fa(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function cm(e){if(!nr.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Fa(r)}var Va=p("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=nr),R.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{cm(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Ba=p("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Vo),R.init(e,t)});function um(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[o]=r;if(!o)return!1;let n=JSON.parse(atob(o));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}var Ha=p("$ZodJWT",(e,t)=>{R.init(e,t),e._zod.check=r=>{um(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Ga=p("$ZodCustomStringFormat",(e,t)=>{R.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),lr=p("$ZodNumber",(e,t)=>{$.init(e,t),e._zod.pattern=e._zod.bag.pattern??rr,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let i=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...i?{received:i}:{}}),r}}),Ka=p("$ZodNumberFormat",(e,t)=>{na.init(e,t),lr.init(e,t)}),un=p("$ZodBoolean",(e,t)=>{$.init(e,t),e._zod.pattern=Jo,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=!!r.value}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),dr=p("$ZodBigInt",(e,t)=>{$.init(e,t),e._zod.pattern=Wo,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),Wa=p("$ZodBigIntFormat",(e,t)=>{ra.init(e,t),dr.init(e,t)}),qa=p("$ZodSymbol",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),Ja=p("$ZodUndefined",(e,t)=>{$.init(e,t),e._zod.pattern=Xo,e._zod.values=new Set([void 0]),e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),Ya=p("$ZodNull",(e,t)=>{$.init(e,t),e._zod.pattern=Yo,e._zod.values=new Set([null]),e._zod.parse=(r,o)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),Xa=p("$ZodAny",(e,t)=>{$.init(e,t),e._zod.parse=r=>r}),Qa=p("$ZodUnknown",(e,t)=>{$.init(e,t),e._zod.parse=r=>r}),es=p("$ZodNever",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),ts=p("$ZodVoid",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),ns=p("$ZodDate",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let n=r.value,i=n instanceof Date;return i&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...i?{received:"Invalid Date"}:{},inst:e}),r}});function Wd(e,t,r){e.issues.length&&t.issues.push(...Y(r,e.issues)),t.value[r]=e.value}var rs=p("$ZodArray",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);let i=[];for(let s=0;s<n.length;s++){let c=n[s],u=t.element._zod.run({value:c,issues:[]},o);u instanceof Promise?i.push(u.then(l=>Wd(l,r,s))):Wd(u,r,s)}return i.length?Promise.all(i).then(()=>r):r}});function ur(e,t,r,o,n,i){let s=r in o;if(e.issues.length){if(n&&i&&!s)return;t.issues.push(...Y(r,e.issues))}if(!s&&!n){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?s&&(t.value[r]=void 0):t.value[r]=e.value}function lm(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let r=vo(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function dm(e,t,r,o,n,i){let s=[],c=n.keySet,u=n.catchall._zod,l=u.def.type,d=u.optin==="optional",m=u.optout==="optional";for(let g in t){if(g==="__proto__"||c.has(g))continue;if(l==="never"){s.push(g);continue}let h=u.run({value:t[g],issues:[]},o);h instanceof Promise?e.push(h.then(S=>ur(S,r,g,t,d,m))):ur(h,r,g,t,d,m)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}var mm=p("$ZodObject",(e,t)=>{if($.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let c=t.shape;Object.defineProperty(t,"shape",{get:()=>{let u={...c};return Object.defineProperty(t,"shape",{value:u}),u}})}let o=rt(()=>lm(t));w(e._zod,"propValues",()=>{let c=t.shape,u={};for(let l in c){let d=c[l]._zod;if(d.values){u[l]??(u[l]=new Set);for(let m of d.values)u[l].add(m)}}return u});let n=Ve,i=t.catchall,s;e._zod.parse=(c,u)=>{s??(s=o.value);let l=c.value;if(!n(l))return c.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),c;c.value={};let d=[],m=s.shape;for(let g of s.keys){let h=m[g],S=h._zod.optin==="optional",C=h._zod.optout==="optional",A=h._zod.run({value:l[g],issues:[]},u);A instanceof Promise?d.push(A.then(Xe=>ur(Xe,c,g,l,S,C))):ur(A,c,g,l,S,C)}return i?dm(d,l,c,u,o.value,e):d.length?Promise.all(d).then(()=>c):c}}),is=p("$ZodObjectJIT",(e,t)=>{mm.init(e,t);let r=e._zod.parse,o=rt(()=>lm(t)),n=g=>{let h=new cn(["shape","payload","ctx"]),S=o.value,C=fe=>{let M=Bn(fe);return`shape[${M}]._zod.run({ value: input[${M}], issues: [] }, ctx)`};h.write("const input = payload.value;");let A=Object.create(null),Xe=0;for(let fe of S.keys)A[fe]=`key_${Xe++}`;h.write("const newResult = {};");for(let fe of S.keys){let M=A[fe],V=Bn(fe),ql=g[fe],Jl=ql?._zod?.optin==="optional",t_=ql?._zod?.optout==="optional";h.write(`const ${M} = ${C(fe)};`),Jl&&t_?h.write(`
37
+ if (${M}.issues.length) {
38
+ if (${V} in input) {
39
+ payload.issues = payload.issues.concat(${M}.issues.map(iss => ({
40
40
  ...iss,
41
- path: iss.path ? [${M}, ...iss.path] : [${M}]
41
+ path: iss.path ? [${V}, ...iss.path] : [${V}]
42
42
  })));
43
43
  }
44
44
  }
45
45
 
46
- if (${U}.value === undefined) {
47
- if (${M} in input) {
48
- newResult[${M}] = undefined;
46
+ if (${M}.value === undefined) {
47
+ if (${V} in input) {
48
+ newResult[${V}] = undefined;
49
49
  }
50
50
  } else {
51
- newResult[${M}] = ${U}.value;
51
+ newResult[${V}] = ${M}.value;
52
52
  }
53
53
 
54
- `):Dl?h.write(`
55
- if (${U}.issues.length) {
56
- payload.issues = payload.issues.concat(${U}.issues.map(iss => ({
54
+ `):Jl?h.write(`
55
+ if (${M}.issues.length) {
56
+ payload.issues = payload.issues.concat(${M}.issues.map(iss => ({
57
57
  ...iss,
58
- path: iss.path ? [${M}, ...iss.path] : [${M}]
58
+ path: iss.path ? [${V}, ...iss.path] : [${V}]
59
59
  })));
60
60
  }
61
61
 
62
- if (${U}.value === undefined) {
63
- if (${M} in input) {
64
- newResult[${M}] = undefined;
62
+ if (${M}.value === undefined) {
63
+ if (${V} in input) {
64
+ newResult[${V}] = undefined;
65
65
  }
66
66
  } else {
67
- newResult[${M}] = ${U}.value;
67
+ newResult[${V}] = ${M}.value;
68
68
  }
69
69
 
70
70
  `):h.write(`
71
- const ${U}_present = ${M} in input;
72
- if (${U}.issues.length) {
73
- payload.issues = payload.issues.concat(${U}.issues.map(iss => ({
71
+ const ${M}_present = ${V} in input;
72
+ if (${M}.issues.length) {
73
+ payload.issues = payload.issues.concat(${M}.issues.map(iss => ({
74
74
  ...iss,
75
- path: iss.path ? [${M}, ...iss.path] : [${M}]
75
+ path: iss.path ? [${V}, ...iss.path] : [${V}]
76
76
  })));
77
77
  }
78
- if (!${U}_present && !${U}.issues.length) {
78
+ if (!${M}_present && !${M}.issues.length) {
79
79
  payload.issues.push({
80
80
  code: "invalid_type",
81
81
  expected: "nonoptional",
82
82
  input: undefined,
83
- path: [${M}]
83
+ path: [${V}]
84
84
  });
85
85
  }
86
86
 
87
- if (${U}_present) {
88
- if (${U}.value === undefined) {
89
- newResult[${M}] = undefined;
87
+ if (${M}_present) {
88
+ if (${M}.value === undefined) {
89
+ newResult[${V}] = undefined;
90
90
  } else {
91
- newResult[${M}] = ${U}.value;
91
+ newResult[${V}] = ${M}.value;
92
92
  }
93
93
  }
94
94
 
95
- `)}h.write("payload.value = newResult;"),h.write("return payload;");let oh=h.compile();return(ge,U)=>oh(g,ge,U)},i,a=Be,s=!Ve.jitless,l=s&&$o.value,d=r.catchall,p;t._zod.parse=(g,h)=>{p??(p=o.value);let x=g.value;return a(x)?s&&l&&h?.async===!1&&h.jitless!==!0?(i||(i=e(r.shape)),g=i(g,h),d?Qd([],x,g,h,p,t):g):n(g,h):(g.issues.push({expected:"object",code:"invalid_type",input:x,inst:t}),g)}});function Ud(t,r,n,o){for(let i of t)if(i.issues.length===0)return r.value=i.value,r;let e=t.filter(i=>!Ne(i));return e.length===1?(r.value=e[0].value,e[0]):(r.issues.push({code:"invalid_union",input:r.value,inst:n,errors:t.map(i=>i.issues.map(a=>H(a,o,Z())))}),r)}var cr=m("$ZodUnion",(t,r)=>{S.init(t,r),I(t._zod,"optin",()=>r.options.some(o=>o._zod.optin==="optional")?"optional":void 0),I(t._zod,"optout",()=>r.options.some(o=>o._zod.optout==="optional")?"optional":void 0),I(t._zod,"values",()=>{if(r.options.every(o=>o._zod.values))return new Set(r.options.flatMap(o=>Array.from(o._zod.values)))}),I(t._zod,"pattern",()=>{if(r.options.every(o=>o._zod.pattern)){let o=r.options.map(e=>e._zod.pattern);return new RegExp(`^(${o.map(e=>Yt(e.source)).join("|")})$`)}});let n=r.options.length===1?r.options[0]._zod.run:null;t._zod.parse=(o,e)=>{if(n)return n(o,e);let i=!1,a=[];for(let s of r.options){let u=s._zod.run({value:o.value,issues:[]},e);if(u instanceof Promise)a.push(u),i=!0;else{if(u.issues.length===0)return u;a.push(u)}}return i?Promise.all(a).then(s=>Ud(s,o,t,e)):Ud(a,o,t,e)}});function Rd(t,r,n,o){let e=t.filter(i=>i.issues.length===0);return e.length===1?(r.value=e[0].value,r):(e.length===0?r.issues.push({code:"invalid_union",input:r.value,inst:n,errors:t.map(i=>i.issues.map(a=>H(a,o,Z())))}):r.issues.push({code:"invalid_union",input:r.value,inst:n,errors:[],inclusive:!1}),r)}var ds=m("$ZodXor",(t,r)=>{cr.init(t,r),r.inclusive=!1;let n=r.options.length===1?r.options[0]._zod.run:null;t._zod.parse=(o,e)=>{if(n)return n(o,e);let i=!1,a=[];for(let s of r.options){let u=s._zod.run({value:o.value,issues:[]},e);u instanceof Promise?(a.push(u),i=!0):a.push(u)}return i?Promise.all(a).then(s=>Rd(s,o,t,e)):Rd(a,o,t,e)}}),ms=m("$ZodDiscriminatedUnion",(t,r)=>{r.inclusive=!1,cr.init(t,r);let n=t._zod.parse;I(t._zod,"propValues",()=>{let e={};for(let i of r.options){let a=i._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${r.options.indexOf(i)}"`);for(let[s,u]of Object.entries(a)){e[s]||(e[s]=new Set);for(let l of u)e[s].add(l)}}return e});let o=it(()=>{let e=r.options,i=new Map;for(let a of e){let s=a._zod.propValues?.[r.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${r.options.indexOf(a)}"`);for(let u of s){if(i.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);i.set(u,a)}}return i});t._zod.parse=(e,i)=>{let a=e.value;if(!Be(a))return e.issues.push({code:"invalid_type",expected:"object",input:a,inst:t}),e;let s=o.value.get(a?.[r.discriminator]);return s?s._zod.run(e,i):r.unionFallback||i.direction==="backward"?n(e,i):(e.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:r.discriminator,options:Array.from(o.value.keys()),input:a,path:[r.discriminator],inst:t}),e)}}),ps=m("$ZodIntersection",(t,r)=>{S.init(t,r),t._zod.parse=(n,o)=>{let e=n.value,i=r.left._zod.run({value:e,issues:[]},o),a=r.right._zod.run({value:e,issues:[]},o);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([u,l])=>Zd(n,u,l)):Zd(n,i,a)}});function Ia(t,r){if(t===r)return{valid:!0,data:t};if(t instanceof Date&&r instanceof Date&&+t==+r)return{valid:!0,data:t};if(Ae(t)&&Ae(r)){let n=Object.keys(r),o=Object.keys(t).filter(i=>n.indexOf(i)!==-1),e={...t,...r};for(let i of o){let a=Ia(t[i],r[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};e[i]=a.data}return{valid:!0,data:e}}if(Array.isArray(t)&&Array.isArray(r)){if(t.length!==r.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let o=0;o<t.length;o++){let e=t[o],i=r[o],a=Ia(e,i);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Zd(t,r,n){let o=new Map,e;for(let s of r.issues)if(s.code==="unrecognized_keys"){e??(e=s);for(let u of s.keys)o.has(u)||o.set(u,{}),o.get(u).l=!0}else t.issues.push(s);for(let s of n.issues)if(s.code==="unrecognized_keys")for(let u of s.keys)o.has(u)||o.set(u,{}),o.get(u).r=!0;else t.issues.push(s);let i=[...o].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(i.length&&e&&t.issues.push({...e,keys:i}),Ne(t))return t;let a=Ia(r.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return t.value=a.data,t}var gn=m("$ZodTuple",(t,r)=>{S.init(t,r);let n=r.items;t._zod.parse=(o,e)=>{let i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:t,expected:"tuple",code:"invalid_type"}),o;o.value=[];let a=[],s=Ld(n,"optin"),u=Ld(n,"optout");if(!r.rest){if(i.length<s)return o.issues.push({code:"too_small",minimum:s,inclusive:!0,input:i,inst:t,origin:"array"}),o;i.length>n.length&&o.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:i,inst:t,origin:"array"})}let l=new Array(n.length);for(let d=0;d<n.length;d++){let p=n[d]._zod.run({value:i[d],issues:[]},e);p instanceof Promise?a.push(p.then(g=>{l[d]=g})):l[d]=p}if(r.rest){let d=n.length-1,p=i.slice(n.length);for(let g of p){d++;let h=r.rest._zod.run({value:g,issues:[]},e);h instanceof Promise?a.push(h.then(x=>Fd(x,o,d))):Fd(h,o,d)}}return a.length?Promise.all(a).then(()=>Md(l,o,n,i,u)):Md(l,o,n,i,u)}});function Ld(t,r){for(let n=t.length-1;n>=0;n--)if(t[n]._zod[r]!=="optional")return n+1;return 0}function Fd(t,r,n){t.issues.length&&r.issues.push(...Y(n,t.issues)),r.value[n]=t.value}function Md(t,r,n,o,e){for(let i=0;i<n.length;i++){let a=t[i],s=i<o.length;if(a.issues.length){if(!s&&i>=e){r.value.length=i;break}r.issues.push(...Y(i,a.issues))}r.value[i]=a.value}for(let i=r.value.length-1;i>=o.length&&(n[i]._zod.optout==="optional"&&r.value[i]===void 0);i--)r.value.length=i;return r}var fs=m("$ZodRecord",(t,r)=>{S.init(t,r),t._zod.parse=(n,o)=>{let e=n.value;if(!Ae(e))return n.issues.push({expected:"record",code:"invalid_type",input:e,inst:t}),n;let i=[],a=r.keyType._zod.values;if(a){n.value={};let s=new Set;for(let l of a)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){s.add(typeof l=="number"?l.toString():l);let d=r.keyType._zod.run({value:l,issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(h=>H(h,o,Z())),input:l,path:[l],inst:t});continue}let p=d.value,g=r.valueType._zod.run({value:e[l],issues:[]},o);g instanceof Promise?i.push(g.then(h=>{h.issues.length&&n.issues.push(...Y(l,h.issues)),n.value[p]=h.value})):(g.issues.length&&n.issues.push(...Y(l,g.issues)),n.value[p]=g.value)}let u;for(let l in e)s.has(l)||(u=u??[],u.push(l));u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:e,inst:t,keys:u})}else{n.value={};for(let s of Reflect.ownKeys(e)){if(s==="__proto__"||!Object.prototype.propertyIsEnumerable.call(e,s))continue;let u=r.keyType._zod.run({value:s,issues:[]},o);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&an.test(s)&&u.issues.length){let p=r.keyType._zod.run({value:Number(s),issues:[]},o);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(u=p)}if(u.issues.length){r.mode==="loose"?n.value[s]=e[s]:n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(p=>H(p,o,Z())),input:s,path:[s],inst:t});continue}let d=r.valueType._zod.run({value:e[s],issues:[]},o);d instanceof Promise?i.push(d.then(p=>{p.issues.length&&n.issues.push(...Y(s,p.issues)),n.value[u.value]=p.value})):(d.issues.length&&n.issues.push(...Y(s,d.issues)),n.value[u.value]=d.value)}}return i.length?Promise.all(i).then(()=>n):n}}),gs=m("$ZodMap",(t,r)=>{S.init(t,r),t._zod.parse=(n,o)=>{let e=n.value;if(!(e instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:e,inst:t}),n;let i=[];n.value=new Map;for(let[a,s]of e){let u=r.keyType._zod.run({value:a,issues:[]},o),l=r.valueType._zod.run({value:s,issues:[]},o);u instanceof Promise||l instanceof Promise?i.push(Promise.all([u,l]).then(([d,p])=>{Vd(d,p,n,a,e,t,o)})):Vd(u,l,n,a,e,t,o)}return i.length?Promise.all(i).then(()=>n):n}});function Vd(t,r,n,o,e,i,a){t.issues.length&&(Xt.has(typeof o)?n.issues.push(...Y(o,t.issues)):n.issues.push({code:"invalid_key",origin:"map",input:e,inst:i,issues:t.issues.map(s=>H(s,a,Z()))})),r.issues.length&&(Xt.has(typeof o)?n.issues.push(...Y(o,r.issues)):n.issues.push({origin:"map",code:"invalid_element",input:e,inst:i,key:o,issues:r.issues.map(s=>H(s,a,Z()))})),n.value.set(t.value,r.value)}var hs=m("$ZodSet",(t,r)=>{S.init(t,r),t._zod.parse=(n,o)=>{let e=n.value;if(!(e instanceof Set))return n.issues.push({input:e,inst:t,expected:"set",code:"invalid_type"}),n;let i=[];n.value=new Set;for(let a of e){let s=r.valueType._zod.run({value:a,issues:[]},o);s instanceof Promise?i.push(s.then(u=>Bd(u,n))):Bd(s,n)}return i.length?Promise.all(i).then(()=>n):n}});function Bd(t,r){t.issues.length&&r.issues.push(...t.issues),r.value.add(t.value)}var vs=m("$ZodEnum",(t,r)=>{S.init(t,r);let n=Kt(r.entries),o=new Set(n);t._zod.values=o,t._zod.pattern=new RegExp(`^(${n.filter(e=>Xt.has(typeof e)).map(e=>typeof e=="string"?ae(e):e.toString()).join("|")})$`),t._zod.parse=(e,i)=>{let a=e.value;return o.has(a)||e.issues.push({code:"invalid_value",values:n,input:a,inst:t}),e}}),_s=m("$ZodLiteral",(t,r)=>{if(S.init(t,r),r.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(r.values);t._zod.values=n,t._zod.pattern=new RegExp(`^(${r.values.map(o=>typeof o=="string"?ae(o):o?ae(o.toString()):String(o)).join("|")})$`),t._zod.parse=(o,e)=>{let i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:r.values,input:i,inst:t}),o}}),ys=m("$ZodFile",(t,r)=>{S.init(t,r),t._zod.parse=(n,o)=>{let e=n.value;return e instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:e,inst:t}),n}}),bs=m("$ZodTransform",(t,r)=>{S.init(t,r),t._zod.optin="optional",t._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Pe(t.constructor.name);let e=r.transform(n.value,n);if(o.async)return(e instanceof Promise?e:Promise.resolve(e)).then(a=>(n.value=a,n.fallback=!0,n));if(e instanceof Promise)throw new ue;return n.value=e,n.fallback=!0,n}});function Gd(t,r){return r===void 0&&(t.issues.length||t.fallback)?{issues:[],value:void 0}:t}var hn=m("$ZodOptional",(t,r)=>{S.init(t,r),t._zod.optin="optional",t._zod.optout="optional",I(t._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,void 0]):void 0),I(t._zod,"pattern",()=>{let n=r.innerType._zod.pattern;return n?new RegExp(`^(${Yt(n.source)})?$`):void 0}),t._zod.parse=(n,o)=>{if(r.innerType._zod.optin==="optional"){let e=n.value,i=r.innerType._zod.run(n,o);return i instanceof Promise?i.then(a=>Gd(a,e)):Gd(i,e)}return n.value===void 0?n:r.innerType._zod.run(n,o)}}),$s=m("$ZodExactOptional",(t,r)=>{hn.init(t,r),I(t._zod,"values",()=>r.innerType._zod.values),I(t._zod,"pattern",()=>r.innerType._zod.pattern),t._zod.parse=(n,o)=>r.innerType._zod.run(n,o)}),xs=m("$ZodNullable",(t,r)=>{S.init(t,r),I(t._zod,"optin",()=>r.innerType._zod.optin),I(t._zod,"optout",()=>r.innerType._zod.optout),I(t._zod,"pattern",()=>{let n=r.innerType._zod.pattern;return n?new RegExp(`^(${Yt(n.source)}|null)$`):void 0}),I(t._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,null]):void 0),t._zod.parse=(n,o)=>n.value===null?n:r.innerType._zod.run(n,o)}),ks=m("$ZodDefault",(t,r)=>{S.init(t,r),t._zod.optin="optional",I(t._zod,"values",()=>r.innerType._zod.values),t._zod.parse=(n,o)=>{if(o.direction==="backward")return r.innerType._zod.run(n,o);if(n.value===void 0)return n.value=r.defaultValue,n;let e=r.innerType._zod.run(n,o);return e instanceof Promise?e.then(i=>Wd(i,r)):Wd(e,r)}});function Wd(t,r){return t.value===void 0&&(t.value=r.defaultValue),t}var Ss=m("$ZodPrefault",(t,r)=>{S.init(t,r),t._zod.optin="optional",I(t._zod,"values",()=>r.innerType._zod.values),t._zod.parse=(n,o)=>(o.direction==="backward"||n.value===void 0&&(n.value=r.defaultValue),r.innerType._zod.run(n,o))}),ws=m("$ZodNonOptional",(t,r)=>{S.init(t,r),I(t._zod,"values",()=>{let n=r.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),t._zod.parse=(n,o)=>{let e=r.innerType._zod.run(n,o);return e instanceof Promise?e.then(i=>Hd(i,t)):Hd(e,t)}});function Hd(t,r){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:r}),t}var Is=m("$ZodSuccess",(t,r)=>{S.init(t,r),t._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Pe("ZodSuccess");let e=r.innerType._zod.run(n,o);return e instanceof Promise?e.then(i=>(n.value=i.issues.length===0,n)):(n.value=e.issues.length===0,n)}}),zs=m("$ZodCatch",(t,r)=>{S.init(t,r),t._zod.optin="optional",I(t._zod,"optout",()=>r.innerType._zod.optout),I(t._zod,"values",()=>r.innerType._zod.values),t._zod.parse=(n,o)=>{if(o.direction==="backward")return r.innerType._zod.run(n,o);let e=r.innerType._zod.run(n,o);return e instanceof Promise?e.then(i=>(n.value=i.value,i.issues.length&&(n.value=r.catchValue({...n,error:{issues:i.issues.map(a=>H(a,o,Z()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=e.value,e.issues.length&&(n.value=r.catchValue({...n,error:{issues:e.issues.map(i=>H(i,o,Z()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),Os=m("$ZodNaN",(t,r)=>{S.init(t,r),t._zod.parse=(n,o)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:t,expected:"nan",code:"invalid_type"}),n)}),vn=m("$ZodPipe",(t,r)=>{S.init(t,r),I(t._zod,"values",()=>r.in._zod.values),I(t._zod,"optin",()=>r.in._zod.optin),I(t._zod,"optout",()=>r.out._zod.optout),I(t._zod,"propValues",()=>r.in._zod.propValues),t._zod.parse=(n,o)=>{if(o.direction==="backward"){let i=r.out._zod.run(n,o);return i instanceof Promise?i.then(a=>un(a,r.in,o)):un(i,r.in,o)}let e=r.in._zod.run(n,o);return e instanceof Promise?e.then(i=>un(i,r.out,o)):un(e,r.out,o)}});function un(t,r,n){return t.issues.length?(t.aborted=!0,t):r._zod.run({value:t.value,issues:t.issues,fallback:t.fallback},n)}var ur=m("$ZodCodec",(t,r)=>{S.init(t,r),I(t._zod,"values",()=>r.in._zod.values),I(t._zod,"optin",()=>r.in._zod.optin),I(t._zod,"optout",()=>r.out._zod.optout),I(t._zod,"propValues",()=>r.in._zod.propValues),t._zod.parse=(n,o)=>{if((o.direction||"forward")==="forward"){let i=r.in._zod.run(n,o);return i instanceof Promise?i.then(a=>ln(a,r,o)):ln(i,r,o)}else{let i=r.out._zod.run(n,o);return i instanceof Promise?i.then(a=>ln(a,r,o)):ln(i,r,o)}}});function ln(t,r,n){if(t.issues.length)return t.aborted=!0,t;if((n.direction||"forward")==="forward"){let e=r.transform(t.value,t);return e instanceof Promise?e.then(i=>dn(t,i,r.out,n)):dn(t,e,r.out,n)}else{let e=r.reverseTransform(t.value,t);return e instanceof Promise?e.then(i=>dn(t,i,r.in,n)):dn(t,e,r.in,n)}}function dn(t,r,n,o){return t.issues.length?(t.aborted=!0,t):n._zod.run({value:r,issues:t.issues},o)}var Es=m("$ZodPreprocess",(t,r)=>{vn.init(t,r)}),Ps=m("$ZodReadonly",(t,r)=>{S.init(t,r),I(t._zod,"propValues",()=>r.innerType._zod.propValues),I(t._zod,"values",()=>r.innerType._zod.values),I(t._zod,"optin",()=>r.innerType?._zod?.optin),I(t._zod,"optout",()=>r.innerType?._zod?.optout),t._zod.parse=(n,o)=>{if(o.direction==="backward")return r.innerType._zod.run(n,o);let e=r.innerType._zod.run(n,o);return e instanceof Promise?e.then(Jd):Jd(e)}});function Jd(t){return t.value=Object.freeze(t.value),t}var Ts=m("$ZodTemplateLiteral",(t,r)=>{S.init(t,r);let n=[];for(let o of r.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let e=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!e)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=e.startsWith("^")?1:0,a=e.endsWith("$")?e.length-1:e.length;n.push(e.slice(i,a))}else if(o===null||ko.has(typeof o))n.push(ae(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);t._zod.pattern=new RegExp(`^${n.join("")}$`),t._zod.parse=(o,e)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:t,expected:"string",code:"invalid_type"}),o):(t._zod.pattern.lastIndex=0,t._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:t,code:"invalid_format",format:r.format??"template_literal",pattern:t._zod.pattern.source}),o)}),js=m("$ZodFunction",(t,r)=>(S.init(t,r),t._def=r,t._zod.def=r,t.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...o){let e=t._def.input?Jr(t._def.input,o):o,i=Reflect.apply(n,this,e);return t._def.output?Jr(t._def.output,i):i}},t.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let e=t._def.input?await qr(t._def.input,o):o,i=await Reflect.apply(n,this,e);return t._def.output?await qr(t._def.output,i):i}},t._zod.parse=(n,o)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:t}),n):(t._def.output&&t._def.output._zod.def.type==="promise"?n.value=t.implementAsync(n.value):n.value=t.implement(n.value),n),t.input=(...n)=>{let o=t.constructor;return Array.isArray(n[0])?new o({type:"function",input:new gn({type:"tuple",items:n[0],rest:n[1]}),output:t._def.output}):new o({type:"function",input:n[0],output:t._def.output})},t.output=n=>{let o=t.constructor;return new o({type:"function",input:t._def.input,output:n})},t)),As=m("$ZodPromise",(t,r)=>{S.init(t,r),t._zod.parse=(n,o)=>Promise.resolve(n.value).then(e=>r.innerType._zod.run({value:e,issues:[]},o))}),Ns=m("$ZodLazy",(t,r)=>{S.init(t,r),I(t._zod,"innerType",()=>{let n=r;return n._cachedInner||(n._cachedInner=r.getter()),n._cachedInner}),I(t._zod,"pattern",()=>t._zod.innerType?._zod?.pattern),I(t._zod,"propValues",()=>t._zod.innerType?._zod?.propValues),I(t._zod,"optin",()=>t._zod.innerType?._zod?.optin??void 0),I(t._zod,"optout",()=>t._zod.innerType?._zod?.optout??void 0),t._zod.parse=(n,o)=>t._zod.innerType._zod.run(n,o)}),Cs=m("$ZodCustom",(t,r)=>{A.init(t,r),S.init(t,r),t._zod.parse=(n,o)=>n,t._zod.check=n=>{let o=n.value,e=r.fn(o);if(e instanceof Promise)return e.then(i=>qd(i,n,o,t));qd(e,n,o,t)}});function qd(t,r,n,o){if(!t){let e={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(e.params=o._zod.def.params),r.issues.push(ot(e))}}var dr={};ke(dr,{ar:()=>tm,az:()=>rm,be:()=>im,bg:()=>om,ca:()=>am,cs:()=>sm,da:()=>cm,de:()=>um,el:()=>lm,en:()=>_n,eo:()=>dm,es:()=>mm,fa:()=>pm,fi:()=>fm,fr:()=>gm,frCA:()=>hm,he:()=>vm,hr:()=>_m,hu:()=>ym,hy:()=>$m,id:()=>xm,is:()=>km,it:()=>Sm,ja:()=>wm,ka:()=>Im,kh:()=>zm,km:()=>yn,ko:()=>Om,lt:()=>Pm,mk:()=>Tm,ms:()=>jm,nl:()=>Am,no:()=>Nm,ota:()=>Cm,pl:()=>Um,ps:()=>Dm,pt:()=>Rm,ro:()=>Zm,ru:()=>Fm,sl:()=>Mm,sv:()=>Vm,ta:()=>Bm,th:()=>Gm,tr:()=>Wm,ua:()=>Hm,uk:()=>bn,ur:()=>Jm,uz:()=>qm,vi:()=>Km,yo:()=>Qm,zhCN:()=>Ym,zhTW:()=>Xm});var l_=()=>{let t={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function r(e){return t[e]??null}let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${e.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}case"invalid_value":return e.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${v(e.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${e.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${e.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${e.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${e.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${e.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${e.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${e.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${n[i.format]??e.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${e.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${e.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${e.keys.length>1?"\u0629":""}: ${f(e.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${e.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${e.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function tm(){return{localeError:l_()}}var d_=()=>{let t={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function r(e){return t[e]??null}let n={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"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${e.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${s}`}case"invalid_value":return e.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${v(e.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${e.origin??"d\u0259y\u0259r"} ${i}${e.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${e.origin??"d\u0259y\u0259r"} ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${e.origin} ${i}${e.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${e.origin} ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[i.format]??e.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${e.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${e.keys.length>1?"lar":""}: ${f(e.keys,", ")}`;case"invalid_key":return`${e.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${e.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function rm(){return{localeError:d_()}}function nm(t,r,n,o){let e=Math.abs(t),i=e%10,a=e%100;return a>=11&&a<=19?o:i===1?r:i>=2&&i<=4?n:o}var m_=()=>{let t={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function r(e){return t[e]??null}let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},o={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${e.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}case"invalid_value":return e.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${v(e.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);if(a){let s=Number(e.maximum),u=nm(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${e.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${e.maximum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${e.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);if(a){let s=Number(e.minimum),u=nm(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${e.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${e.minimum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${e.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[i.format]??e.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${e.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${e.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${f(e.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${e.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${e.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function im(){return{localeError:m_()}}var p_=()=>{let t={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function r(e){return t[e]??null}let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${e.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}case"invalid_value":return e.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${v(e.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${e.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${e.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${e.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${e.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${e.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${e.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;if(i.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${i.prefix}"`;if(i.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${i.suffix}"`;if(i.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${i.includes}"`;if(i.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${i.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${n[i.format]??e.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${e.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${e.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${e.keys.length>1?"\u043E\u0432\u0435":""}: ${f(e.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${e.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${e.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function om(){return{localeError:p_()}}var f_=()=>{let t={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function r(e){return t[e]??null}let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",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\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${e.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${s}`}case"invalid_value":return e.values.length===1?`Valor inv\xE0lid: s'esperava ${v(e.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${f(e.values," o ")}`;case"too_big":{let i=e.inclusive?"com a m\xE0xim":"menys de",a=r(e.origin);return a?`Massa gran: s'esperava que ${e.origin??"el valor"} contingu\xE9s ${i} ${e.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${e.origin??"el valor"} fos ${i} ${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?"com a m\xEDnim":"m\xE9s de",a=r(e.origin);return a?`Massa petit: s'esperava que ${e.origin} contingu\xE9s ${i} ${e.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${e.origin} fos ${i} ${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${n[i.format]??e.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${e.divisor}`;case"unrecognized_keys":return`Clau${e.keys.length>1?"s":""} no reconeguda${e.keys.length>1?"s":""}: ${f(e.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${e.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${e.origin}`;default:return"Entrada inv\xE0lida"}}};function am(){return{localeError:f_()}}var g_=()=>{let t={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function r(e){return t[e]??null}let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 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 \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},o={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${e.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${s}`}case"invalid_value":return e.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${v(e.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${e.origin??"hodnota"} mus\xED m\xEDt ${i}${e.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${e.origin??"hodnota"} mus\xED b\xFDt ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${e.origin??"hodnota"} mus\xED m\xEDt ${i}${e.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${e.origin??"hodnota"} mus\xED b\xFDt ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${n[i.format]??e.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${e.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${f(e.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${e.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${e.origin}`;default:return"Neplatn\xFD vstup"}}};function sm(){return{localeError:g_()}}var h_=()=>{let t={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function r(e){return t[e]??null}let n={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\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",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"},o={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`Ugyldigt input: forventede instanceof ${e.expected}, fik ${s}`:`Ugyldigt input: forventede ${i}, fik ${s}`}case"invalid_value":return e.values.length===1?`Ugyldig v\xE6rdi: forventede ${v(e.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin),s=o[e.origin]??e.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${i} ${e.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${i} ${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin),s=o[e.origin]??e.origin;return a?`For lille: forventede ${s} ${a.verb} ${i} ${e.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${i} ${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${n[i.format]??e.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${f(e.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${e.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${e.origin}`;default:return"Ugyldigt input"}}};function cm(){return{localeError:h_()}}var v_=()=>{let t={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 r(e){return t[e]??null}let n={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"},o={nan:"NaN",number:"Zahl",array:"Array"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${e.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${s}`}case"invalid_value":return e.values.length===1?`Ung\xFCltige Eingabe: erwartet ${v(e.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`Zu gro\xDF: erwartet, dass ${e.origin??"Wert"} ${i}${e.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${e.origin??"Wert"} ${i}${e.maximum.toString()} ist`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`Zu klein: erwartet, dass ${e.origin} ${i}${e.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${e.origin} ${i}${e.minimum.toString()} ist`}case"invalid_format":{let i=e;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${n[i.format]??e.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${e.divisor} sein`;case"unrecognized_keys":return`${e.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${f(e.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${e.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${e.origin}`;default:return"Ung\xFCltige Eingabe"}}};function um(){return{localeError:v_()}}var __=()=>{let t={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function r(e){return t[e]??null}let n={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 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 \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return typeof e.expected=="string"&&/^[A-Z]/.test(e.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${e.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`}case"invalid_value":return e.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${v(e.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${e.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${e.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${e.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${e.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${e.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${e.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${i.prefix}"`:i.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${i.suffix}"`:i.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${i.includes}"`:i.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${i.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${n[i.format]??e.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${e.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${e.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${e.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${f(e.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${e.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${e.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function lm(){return{localeError:__()}}var y_=()=>{let t={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 r(e){return t[e]??null}let n={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"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return`Invalid input: expected ${i}, received ${s}`}case"invalid_value":return e.values.length===1?`Invalid input: expected ${v(e.values[0])}`:`Invalid option: expected one of ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`Too big: expected ${e.origin??"value"} to have ${i}${e.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${e.origin??"value"} to be ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`Too small: expected ${e.origin} to have ${i}${e.minimum.toString()} ${a.unit}`:`Too small: expected ${e.origin} to be ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${n[i.format]??e.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${e.divisor}`;case"unrecognized_keys":return`Unrecognized key${e.keys.length>1?"s":""}: ${f(e.keys,", ")}`;case"invalid_key":return`Invalid key in ${e.origin}`;case"invalid_union":return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(a=>`'${a}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${e.origin}`;default:return"Invalid input"}}};function _n(){return{localeError:y_()}}var b_=()=>{let t={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function r(e){return t[e]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",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\u016Dro",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"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${e.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${s}`}case"invalid_value":return e.values.length===1?`Nevalida enigo: atendi\u011Dis ${v(e.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`Tro granda: atendi\u011Dis ke ${e.origin??"valoro"} havu ${i}${e.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${e.origin??"valoro"} havu ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`Tro malgranda: atendi\u011Dis ke ${e.origin} havu ${i}${e.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${e.origin} estu ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${n[i.format]??e.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${e.divisor}`;case"unrecognized_keys":return`Nekonata${e.keys.length>1?"j":""} \u015Dlosilo${e.keys.length>1?"j":""}: ${f(e.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${e.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${e.origin}`;default:return"Nevalida enigo"}}};function dm(){return{localeError:b_()}}var $_=()=>{let t={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function r(e){return t[e]??null}let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",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\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${e.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${s}`}case"invalid_value":return e.values.length===1?`Entrada inv\xE1lida: se esperaba ${v(e.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin),s=o[e.origin]??e.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${i}${e.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin),s=o[e.origin]??e.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${i}${e.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${n[i.format]??e.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${e.divisor}`;case"unrecognized_keys":return`Llave${e.keys.length>1?"s":""} desconocida${e.keys.length>1?"s":""}: ${f(e.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${o[e.origin]??e.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${o[e.origin]??e.origin}`;default:return"Entrada inv\xE1lida"}}};function mm(){return{localeError:$_()}}var x_=()=>{let t={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function r(e){return t[e]??null}let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${e.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return e.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${v(e.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${f(e.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${e.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${e.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${e.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${e.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${e.origin} \u0628\u0627\u06CC\u062F ${i}${e.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${e.origin} \u0628\u0627\u06CC\u062F ${i}${e.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=e;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[i.format]??e.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${e.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${e.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${f(e.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${e.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${e.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function pm(){return{localeError:x_()}}var k_=()=>{let t={string:{unit:"merkki\xE4",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\xE4iv\xE4m\xE4\xE4r\xE4n"}};function r(e){return t[e]??null}let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",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\xE4iv\xE4m\xE4\xE4r\xE4",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"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`Virheellinen tyyppi: odotettiin instanceof ${e.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${s}`}case"invalid_value":return e.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${v(e.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${i}${e.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${i}${e.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${n[i.format]??e.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${e.divisor} monikerta`;case"unrecognized_keys":return`${e.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${f(e.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\xF6te"}}};function fm(){return{localeError:k_()}}var S_=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function r(e){return t[e]??null}let n={regex:"entr\xE9e",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\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`Entr\xE9e invalide : instanceof ${e.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${s} re\xE7u`}case"invalid_value":return e.values.length===1?`Entr\xE9e invalide : ${v(e.values[0])} attendu`:`Option invalide : une valeur parmi ${f(e.values,"|")} attendue`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`Trop grand : ${o[e.origin]??"valeur"} doit ${a.verb} ${i}${e.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${o[e.origin]??"valeur"} doit \xEAtre ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`Trop petit : ${o[e.origin]??"valeur"} doit ${a.verb} ${i}${e.minimum.toString()} ${a.unit}`:`Trop petit : ${o[e.origin]??"valeur"} doit \xEAtre ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${n[i.format]??e.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${e.divisor}`;case"unrecognized_keys":return`Cl\xE9${e.keys.length>1?"s":""} non reconnue${e.keys.length>1?"s":""} : ${f(e.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${e.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${e.origin}`;default:return"Entr\xE9e invalide"}}};function gm(){return{localeError:S_()}}var w_=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function r(e){return t[e]??null}let n={regex:"entr\xE9e",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\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`Entr\xE9e invalide : attendu instanceof ${e.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${s}`}case"invalid_value":return e.values.length===1?`Entr\xE9e invalide : attendu ${v(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"\u2264":"<",a=r(e.origin);return a?`Trop grand : attendu que ${e.origin??"la valeur"} ait ${i}${e.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${e.origin??"la valeur"} soit ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?"\u2265":">",a=r(e.origin);return a?`Trop petit : attendu que ${e.origin} ait ${i}${e.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${e.origin} soit ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${n[i.format]??e.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${e.divisor}`;case"unrecognized_keys":return`Cl\xE9${e.keys.length>1?"s":""} non reconnue${e.keys.length>1?"s":""} : ${f(e.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${e.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${e.origin}`;default:return"Entr\xE9e invalide"}}};function hm(){return{localeError:w_()}}var I_=()=>{let t={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},r={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},n=l=>l?t[l]:void 0,o=l=>{let d=n(l);return d?d.label:l??t.unknown.label},e=l=>`\u05D4${o(l)}`,i=l=>(n(l)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",a=l=>l?r[l]??null:null,s={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",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:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},u={nan:"NaN"};return l=>{switch(l.code){case"invalid_type":{let d=l.expected,p=u[d??""]??o(d),g=_(l.input),h=u[g]??t[g]?.label??g;return/^[A-Z]/.test(l.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${l.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`}case"invalid_value":{if(l.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${v(l.values[0])}`;let d=l.values.map(h=>v(h));if(l.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${d[0]} \u05D0\u05D5 ${d[1]}`;let p=d[d.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${d.slice(0,-1).join(", ")} \u05D0\u05D5 ${p}`}case"too_big":{let d=a(l.origin),p=e(l.origin??"value");if(l.origin==="string")return`${d?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.maximum.toString()} ${d?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(l.origin==="number"){let x=l.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${l.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${x}`}if(l.origin==="array"||l.origin==="set"){let x=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",K=l.inclusive?`${l.maximum} ${d?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${l.maximum} ${d?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} ${x} \u05DC\u05D4\u05DB\u05D9\u05DC ${K}`.trim()}let g=l.inclusive?"<=":"<",h=i(l.origin??"value");return d?.unit?`${d.longLabel} \u05DE\u05D3\u05D9: ${p} ${h} ${g}${l.maximum.toString()} ${d.unit}`:`${d?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${p} ${h} ${g}${l.maximum.toString()}`}case"too_small":{let d=a(l.origin),p=e(l.origin??"value");if(l.origin==="string")return`${d?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.minimum.toString()} ${d?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(l.origin==="number"){let x=l.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${l.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${x}`}if(l.origin==="array"||l.origin==="set"){let x=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let F=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${x} \u05DC\u05D4\u05DB\u05D9\u05DC ${F}`}let K=l.inclusive?`${l.minimum} ${d?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${l.minimum} ${d?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${x} \u05DC\u05D4\u05DB\u05D9\u05DC ${K}`.trim()}let g=l.inclusive?">=":">",h=i(l.origin??"value");return d?.unit?`${d.shortLabel} \u05DE\u05D3\u05D9: ${p} ${h} ${g}${l.minimum.toString()} ${d.unit}`:`${d?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${p} ${h} ${g}${l.minimum.toString()}`}case"invalid_format":{let d=l;if(d.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${d.prefix}"`;if(d.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${d.suffix}"`;if(d.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${d.includes}"`;if(d.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${d.pattern}`;let p=s[d.format],g=p?.label??d.format,x=(p?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${g} \u05DC\u05D0 ${x}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${l.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${l.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${l.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${f(l.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${e(l.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function vm(){return{localeError:I_()}}var z_=()=>{let t={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function r(e){return t[e]??null}let n={regex:"unos",email:"email 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:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},o={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${e.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${i}, a primljeno je ${s}`}case"invalid_value":return e.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${v(e.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin),s=o[e.origin]??e.origin;return a?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${i}${e.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin),s=o[e.origin]??e.origin;return a?`Premalo: o\u010Dekivano da ${s} ima ${i}${e.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${i.prefix}"`:i.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${i.suffix}"`:i.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${i.includes}"`:i.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`:`Neispravna ${n[i.format]??e.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${e.divisor}`;case"unrecognized_keys":return`Neprepoznat${e.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${f(e.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${o[e.origin]??e.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${o[e.origin]??e.origin}`;default:return"Neispravan unos"}}};function _m(){return{localeError:z_()}}var O_=()=>{let t={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function r(e){return t[e]??null}let n={regex:"bemenet",email:"email c\xEDm",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\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},o={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${e.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return e.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${v(e.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`T\xFAl nagy: ${e.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${e.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${e.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${e.origin} m\xE9rete t\xFAl kicsi ${i}${e.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${e.origin} t\xFAl kicsi ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[i.format]??e.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${e.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${e.keys.length>1?"s":""}: ${f(e.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${e.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${e.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function ym(){return{localeError:O_()}}function bm(t,r,n){return Math.abs(t)===1?r:n}function dt(t){if(!t)return"";let r=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=t[t.length-1];return t+(r.includes(n)?"\u0576":"\u0568")}var E_=()=>{let t={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function r(e){return t[e]??null}let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},o={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${e.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}case"invalid_value":return e.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${v(e.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);if(a){let s=Number(e.maximum),u=bm(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${dt(e.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${e.maximum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${dt(e.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);if(a){let s=Number(e.minimum),u=bm(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${dt(e.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${e.minimum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${dt(e.origin)} \u056C\u056B\u0576\u056B ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[i.format]??e.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${e.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${e.keys.length>1?"\u0576\u0565\u0580":""}. ${f(e.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${dt(e.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${dt(e.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function $m(){return{localeError:E_()}}var P_=()=>{let t={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function r(e){return t[e]??null}let n={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"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`Input tidak valid: diharapkan instanceof ${e.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${i}, diterima ${s}`}case"invalid_value":return e.values.length===1?`Input tidak valid: diharapkan ${v(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`Terlalu besar: diharapkan ${e.origin??"value"} memiliki ${i}${e.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${e.origin??"value"} menjadi ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`Terlalu kecil: diharapkan ${e.origin} memiliki ${i}${e.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${e.origin} menjadi ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${n[i.format]??e.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${e.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${e.keys.length>1?"s":""}: ${f(e.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${e.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${e.origin}`;default:return"Input tidak valid"}}};function xm(){return{localeError:P_()}}var T_=()=>{let t={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function r(e){return t[e]??null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",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\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",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\xF6lugildi",jwt:"JWT",template_literal:"gildi"},o={nan:"NaN",number:"n\xFAmer",array:"fylki"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${e.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return e.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${v(e.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${e.origin??"gildi"} hafi ${i}${e.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${e.origin??"gildi"} s\xE9 ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${e.origin} hafi ${i}${e.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${e.origin} s\xE9 ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${n[i.format]??e.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${e.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${e.keys.length>1?"ir lyklar":"ur lykill"}: ${f(e.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${e.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${e.origin}`;default:return"Rangt gildi"}}};function km(){return{localeError:T_()}}var j_=()=>{let t={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function r(e){return t[e]??null}let n={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"},o={nan:"NaN",number:"numero",array:"vettore"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`Input non valido: atteso instanceof ${e.expected}, ricevuto ${s}`:`Input non valido: atteso ${i}, ricevuto ${s}`}case"invalid_value":return e.values.length===1?`Input non valido: atteso ${v(e.values[0])}`:`Opzione non valida: atteso uno tra ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`Troppo grande: ${e.origin??"valore"} deve avere ${i}${e.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${e.origin??"valore"} deve essere ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`Troppo piccolo: ${e.origin} deve avere ${i}${e.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${e.origin} deve essere ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Input non valido: ${n[i.format]??e.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${e.divisor}`;case"unrecognized_keys":return`Chiav${e.keys.length>1?"i":"e"} non riconosciut${e.keys.length>1?"e":"a"}: ${f(e.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${e.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${e.origin}`;default:return"Input non valido"}}};function Sm(){return{localeError:j_()}}var A_=()=>{let t={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function r(e){return t[e]??null}let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},o={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${e.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return e.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${v(e.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${f(e.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=e.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=r(e.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${e.origin??"\u5024"}\u306F${e.maximum.toString()}${a.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${e.origin??"\u5024"}\u306F${e.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=e.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=r(e.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${e.origin}\u306F${e.minimum.toString()}${a.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${e.origin}\u306F${e.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=e;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[i.format]??e.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${e.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${e.keys.length>1?"\u7FA4":""}: ${f(e.keys,"\u3001")}`;case"invalid_key":return`${e.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${e.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function wm(){return{localeError:A_()}}var N_=()=>{let t={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function r(e){return t[e]??null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},o={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${e.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}case"invalid_value":return e.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${v(e.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${f(e.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${e.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${i}${e.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${e.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${e.origin} ${a.verb} ${i}${e.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${e.origin} \u10D8\u10E7\u10DD\u10E1 ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.prefix}"-\u10D8\u10D7`:i.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.suffix}"-\u10D8\u10D7`:i.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${i.includes}"-\u10E1`:i.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[i.format]??e.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${e.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${e.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${f(e.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${e.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${e.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function Im(){return{localeError:N_()}}var C_=()=>{let t={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function r(e){return t[e]??null}let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},o={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${e.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}case"invalid_value":return e.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${v(e.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${e.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${e.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${e.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${e.origin} ${i} ${e.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${e.origin} ${i} ${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[i.format]??e.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${e.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${f(e.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${e.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${e.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function yn(){return{localeError:C_()}}function zm(){return yn()}var D_=()=>{let t={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function r(e){return t[e]??null}let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${e.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return e.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${v(e.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${f(e.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=e.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=r(e.origin),u=s?.unit??"\uC694\uC18C";return s?`${e.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${e.maximum.toString()}${u} ${i}${a}`:`${e.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${e.maximum.toString()} ${i}${a}`}case"too_small":{let i=e.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=r(e.origin),u=s?.unit??"\uC694\uC18C";return s?`${e.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${e.minimum.toString()}${u} ${i}${a}`:`${e.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${e.minimum.toString()} ${i}${a}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[i.format]??e.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${e.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${f(e.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${e.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${e.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function Om(){return{localeError:D_()}}var lr=t=>t.charAt(0).toUpperCase()+t.slice(1);function Em(t){let r=Math.abs(t),n=r%10,o=r%100;return o>=11&&o<=19||n===0?"many":n===1?"one":"few"}var U_=()=>{let t={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function r(e,i,a,s){let u=t[e]??null;return u===null?u:{unit:u.unit[i],verb:u.verb[s][a?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to 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\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},o={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${e.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${i}`}case"invalid_value":return e.values.length===1?`Privalo b\u016Bti ${v(e.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${f(e.values,"|")} pasirinkim\u0173`;case"too_big":{let i=o[e.origin]??e.origin,a=r(e.origin,Em(Number(e.maximum)),e.inclusive??!1,"smaller");if(a?.verb)return`${lr(i??e.origin??"reik\u0161m\u0117")} ${a.verb} ${e.maximum.toString()} ${a.unit??"element\u0173"}`;let s=e.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${lr(i??e.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${e.maximum.toString()} ${a?.unit}`}case"too_small":{let i=o[e.origin]??e.origin,a=r(e.origin,Em(Number(e.minimum)),e.inclusive??!1,"bigger");if(a?.verb)return`${lr(i??e.origin??"reik\u0161m\u0117")} ${a.verb} ${e.minimum.toString()} ${a.unit??"element\u0173"}`;let s=e.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${lr(i??e.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${e.minimum.toString()} ${a?.unit}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${n[i.format]??e.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${e.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${e.keys.length>1?"i":"as"} rakt${e.keys.length>1?"ai":"as"}: ${f(e.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=o[e.origin]??e.origin;return`${lr(i??e.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function Pm(){return{localeError:U_()}}var R_=()=>{let t={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function r(e){return t[e]??null}let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},o={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${e.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return e.values.length===1?`Invalid input: expected ${v(e.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${e.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${e.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${e.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${e.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${e.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${e.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${n[i.format]??e.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${f(e.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${e.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${e.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function Tm(){return{localeError:R_()}}var Z_=()=>{let t={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function r(e){return t[e]??null}let n={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"},o={nan:"NaN",number:"nombor"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`Input tidak sah: dijangka instanceof ${e.expected}, diterima ${s}`:`Input tidak sah: dijangka ${i}, diterima ${s}`}case"invalid_value":return e.values.length===1?`Input tidak sah: dijangka ${v(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`Terlalu besar: dijangka ${e.origin??"nilai"} ${a.verb} ${i}${e.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${e.origin??"nilai"} adalah ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`Terlalu kecil: dijangka ${e.origin} ${a.verb} ${i}${e.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${e.origin} adalah ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${n[i.format]??e.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${e.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${f(e.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${e.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${e.origin}`;default:return"Input tidak sah"}}};function jm(){return{localeError:Z_()}}var L_=()=>{let t={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function r(e){return t[e]??null}let n={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"},o={nan:"NaN",number:"getal"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`Ongeldige invoer: verwacht instanceof ${e.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${i}, ontving ${s}`}case"invalid_value":return e.values.length===1?`Ongeldige invoer: verwacht ${v(e.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin),s=e.origin==="date"?"laat":e.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${e.origin??"waarde"} ${i}${e.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${e.origin??"waarde"} ${i}${e.maximum.toString()} is`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin),s=e.origin==="date"?"vroeg":e.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${e.origin} ${i}${e.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${e.origin} ${i}${e.minimum.toString()} is`}case"invalid_format":{let i=e;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${n[i.format]??e.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${e.keys.length>1?"s":""}: ${f(e.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${e.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${e.origin}`;default:return"Ongeldige invoer"}}};function Am(){return{localeError:L_()}}var F_=()=>{let t={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function r(e){return t[e]??null}let n={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\xE5de",ipv6:"IPv6-omr\xE5de",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"},o={nan:"NaN",number:"tall",array:"liste"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventet instanceof ${e.expected}, fikk ${s}`:`Ugyldig input: forventet ${i}, fikk ${s}`}case"invalid_value":return e.values.length===1?`Ugyldig verdi: forventet ${v(e.values[0])}`:`Ugyldig valg: forventet en av ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`For stor(t): forventet ${e.origin??"value"} til \xE5 ha ${i}${e.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${e.origin??"value"} til \xE5 ha ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`For lite(n): forventet ${e.origin} til \xE5 ha ${i}${e.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${e.origin} til \xE5 ha ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${n[i.format]??e.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${f(e.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${e.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${e.origin}`;default:return"Ugyldig input"}}};function Nm(){return{localeError:F_()}}var M_=()=>{let t={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function r(e){return t[e]??null}let n={regex:"giren",email:"epostag\xE2h",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\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`F\xE2sit giren: umulan instanceof ${e.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${s}`}case"invalid_value":return e.values.length===1?`F\xE2sit giren: umulan ${v(e.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`Fazla b\xFCy\xFCk: ${e.origin??"value"}, ${i}${e.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${e.origin??"value"}, ${i}${e.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`Fazla k\xFC\xE7\xFCk: ${e.origin}, ${i}${e.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${e.origin}, ${i}${e.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=e;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[i.format]??e.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${e.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${e.keys.length>1?"s":""}: ${f(e.keys,", ")}`;case"invalid_key":return`${e.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${e.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function Cm(){return{localeError:M_()}}var V_=()=>{let t={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function r(e){return t[e]??null}let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${e.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return e.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${v(e.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${f(e.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${e.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${e.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${e.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${e.maximum.toString()} \u0648\u064A`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${e.origin} \u0628\u0627\u06CC\u062F ${i}${e.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${e.origin} \u0628\u0627\u06CC\u062F ${i}${e.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=e;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[i.format]??e.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${e.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${e.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${f(e.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${e.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${e.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function Dm(){return{localeError:V_()}}var B_=()=>{let t={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function r(e){return t[e]??null}let n={regex:"wyra\u017Cenie",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\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},o={nan:"NaN",number:"liczba",array:"tablica"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${e.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${s}`}case"invalid_value":return e.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${v(e.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${e.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${e.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${e.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${e.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${e.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${e.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[i.format]??e.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${e.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${e.keys.length>1?"s":""}: ${f(e.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${e.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${e.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function Um(){return{localeError:B_()}}var G_=()=>{let t={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function r(e){return t[e]??null}let n={regex:"padr\xE3o",email:"endere\xE7o 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\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o 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\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",number:"n\xFAmero",null:"nulo"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`Tipo inv\xE1lido: esperado instanceof ${e.expected}, recebido ${s}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${s}`}case"invalid_value":return e.values.length===1?`Entrada inv\xE1lida: esperado ${v(e.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`Muito grande: esperado que ${e.origin??"valor"} tivesse ${i}${e.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${e.origin??"valor"} fosse ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`Muito pequeno: esperado que ${e.origin} tivesse ${i}${e.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${e.origin} fosse ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${n[i.format]??e.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${e.divisor}`;case"unrecognized_keys":return`Chave${e.keys.length>1?"s":""} desconhecida${e.keys.length>1?"s":""}: ${f(e.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${e.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${e.origin}`;default:return"Campo inv\xE1lido"}}};function Rm(){return{localeError:G_()}}var W_=()=>{let t={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function r(e){return t[e]??null}let n={regex:"intrare",email:"adres\u0103 de 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:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},o={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${i}, primit ${s}`}case"invalid_value":return e.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${v(e.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`Prea mare: a\u0219teptat ca ${e.origin??"valoarea"} ${a.verb} ${i}${e.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${e.origin??"valoarea"} s\u0103 fie ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`Prea mic: a\u0219teptat ca ${e.origin} ${a.verb} ${i}${e.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${e.origin} s\u0103 fie ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${i.prefix}"`:i.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${i.suffix}"`:i.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${i.includes}"`:i.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${i.pattern}`:`Format invalid: ${n[i.format]??e.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${e.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${f(e.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${e.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${e.origin}`;default:return"Intrare invalid\u0103"}}};function Zm(){return{localeError:W_()}}function Lm(t,r,n,o){let e=Math.abs(t),i=e%10,a=e%100;return a>=11&&a<=19?o:i===1?r:i>=2&&i<=4?n:o}var H_=()=>{let t={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function r(e){return t[e]??null}let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${e.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}case"invalid_value":return e.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${v(e.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);if(a){let s=Number(e.maximum),u=Lm(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${e.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${e.maximum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${e.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);if(a){let s=Number(e.minimum),u=Lm(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${e.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${e.minimum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${e.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[i.format]??e.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${e.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${e.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${e.keys.length>1?"\u0438":""}: ${f(e.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${e.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${e.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function Fm(){return{localeError:H_()}}var J_=()=>{let t={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function r(e){return t[e]??null}let n={regex:"vnos",email:"e-po\u0161tni 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 \u010Das",date:"ISO datum",time:"ISO \u010Das",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 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},o={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${e.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${s}`}case"invalid_value":return e.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${v(e.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${e.origin??"vrednost"} imelo ${i}${e.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${e.origin??"vrednost"} ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${e.origin} imelo ${i}${e.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${e.origin} ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${n[i.format]??e.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${e.divisor}`;case"unrecognized_keys":return`Neprepoznan${e.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${f(e.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${e.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${e.origin}`;default:return"Neveljaven vnos"}}};function Mm(){return{localeError:J_()}}var q_=()=>{let t={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function r(e){return t[e]??null}let n={regex:"regulj\xE4rt 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\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},o={nan:"NaN",number:"antal",array:"lista"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${e.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${s}`}case"invalid_value":return e.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${v(e.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${e.origin??"v\xE4rdet"} att ha ${i}${e.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${e.origin??"v\xE4rdet"} att ha ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${e.origin??"v\xE4rdet"} att ha ${i}${e.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${e.origin??"v\xE4rdet"} att ha ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${n[i.format]??e.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${f(e.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${e.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${e.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function Vm(){return{localeError:q_()}}var K_=()=>{let t={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function r(e){return t[e]??null}let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",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 \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${e.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}case"invalid_value":return e.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${v(e.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${f(e.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${e.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${e.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${e.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${e.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${e.origin} ${i}${e.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${e.origin} ${i}${e.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=e;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[i.format]??e.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${e.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${e.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${f(e.keys,", ")}`;case"invalid_key":return`${e.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${e.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function Bm(){return{localeError:K_()}}var Y_=()=>{let t={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function r(e){return t[e]??null}let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},o={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${e.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}case"invalid_value":return e.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${v(e.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=r(e.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${e.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${e.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${e.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=r(e.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${e.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${e.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${e.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[i.format]??e.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${e.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${f(e.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${e.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${e.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function Gm(){return{localeError:Y_()}}var X_=()=>{let t={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function r(e){return t[e]??null}let n={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\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${e.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${s}`}case"invalid_value":return e.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${v(e.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${e.origin??"de\u011Fer"} ${i}${e.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${e.origin??"de\u011Fer"} ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${e.origin} ${i}${e.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${e.origin} ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[i.format]??e.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${e.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${e.keys.length>1?"lar":""}: ${f(e.keys,", ")}`;case"invalid_key":return`${e.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${e.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function Wm(){return{localeError:X_()}}var Q_=()=>{let t={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function r(e){return t[e]??null}let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${e.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}case"invalid_value":return e.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${v(e.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${e.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${i}${e.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${e.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${e.origin} ${a.verb} ${i}${e.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${e.origin} \u0431\u0443\u0434\u0435 ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[i.format]??e.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${e.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${e.keys.length>1?"\u0456":""}: ${f(e.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${e.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${e.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function bn(){return{localeError:Q_()}}function Hm(){return bn()}var ey=()=>{let t={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function r(e){return t[e]??null}let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},o={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${e.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return e.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${v(e.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${f(e.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${e.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${e.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${e.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${e.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${e.origin} \u06A9\u06D2 ${i}${e.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${e.origin} \u06A9\u0627 ${i}${e.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=e;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[i.format]??e.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${e.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${e.keys.length>1?"\u0632":""}: ${f(e.keys,"\u060C ")}`;case"invalid_key":return`${e.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${e.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function Jm(){return{localeError:ey()}}var ty=()=>{let t={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function r(e){return t[e]??null}let n={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"},o={nan:"NaN",number:"raqam",array:"massiv"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${e.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${s}`}case"invalid_value":return e.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${v(e.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`Juda katta: kutilgan ${e.origin??"qiymat"} ${i}${e.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${e.origin??"qiymat"} ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`Juda kichik: kutilgan ${e.origin} ${i}${e.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${e.origin} ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[i.format]??e.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${e.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${e.keys.length>1?"lar":""}: ${f(e.keys,", ")}`;case"invalid_key":return`${e.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${e.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function qm(){return{localeError:ty()}}var ry=()=>{let t={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function r(e){return t[e]??null}let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 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\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},o={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${e.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return e.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${v(e.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${e.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${i}${e.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${e.origin??"gi\xE1 tr\u1ECB"} ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${e.origin} ${a.verb} ${i}${e.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${e.origin} ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${n[i.format]??e.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${e.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${f(e.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${e.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${e.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function Km(){return{localeError:ry()}}var ny=()=>{let t={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function r(e){return t[e]??null}let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},o={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${e.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return e.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${v(e.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${e.origin??"\u503C"} ${i}${e.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${e.origin??"\u503C"} ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${e.origin} ${i}${e.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${e.origin} ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${n[i.format]??e.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${e.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${f(e.keys,", ")}`;case"invalid_key":return`${e.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${e.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function Ym(){return{localeError:ny()}}var iy=()=>{let t={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function r(e){return t[e]??null}let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",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 \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${e.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return e.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${v(e.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${e.origin??"\u503C"} \u61C9\u70BA ${i}${e.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${e.origin??"\u503C"} \u61C9\u70BA ${i}${e.maximum.toString()}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${e.origin} \u61C9\u70BA ${i}${e.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${e.origin} \u61C9\u70BA ${i}${e.minimum.toString()}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${n[i.format]??e.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${e.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${e.keys.length>1?"\u5011":""}\uFF1A${f(e.keys,"\u3001")}`;case"invalid_key":return`${e.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${e.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function Xm(){return{localeError:iy()}}var oy=()=>{let t={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function r(e){return t[e]??null}let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",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:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},o={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return e=>{switch(e.code){case"invalid_type":{let i=o[e.expected]??e.expected,a=_(e.input),s=o[a]??a;return/^[A-Z]/.test(e.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${e.expected}, \xE0m\u1ECD\u0300 a r\xED ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return e.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${v(e.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${f(e.values,"|")}`;case"too_big":{let i=e.inclusive?"<=":"<",a=r(e.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${e.origin??"iye"} ${a.verb} ${i}${e.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${e.maximum}`}case"too_small":{let i=e.inclusive?">=":">",a=r(e.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${e.origin} ${a.verb} ${i}${e.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${e.minimum}`}case"invalid_format":{let i=e;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${n[i.format]??e.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${e.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${f(e.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${e.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${e.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function Qm(){return{localeError:oy()}}var ep,Ds=Symbol("ZodOutput"),Us=Symbol("ZodInput"),$n=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(r,...n){let o=n[0];return this._map.set(r,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,r),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(r){let n=this._map.get(r);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(r),this}get(r){let n=r._zod.parent;if(n){let o={...this.get(n)??{}};delete o.id;let e={...o,...this._map.get(r)};return Object.keys(e).length?e:void 0}return this._map.get(r)}has(r){return this._map.has(r)}};function xn(){return new $n}(ep=globalThis).__zod_globalRegistry??(ep.__zod_globalRegistry=xn());var V=globalThis.__zod_globalRegistry;function Rs(t,r){return new t({type:"string",...b(r)})}function Zs(t,r){return new t({type:"string",coerce:!0,...b(r)})}function kn(t,r){return new t({type:"string",format:"email",check:"string_format",abort:!1,...b(r)})}function mr(t,r){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...b(r)})}function Sn(t,r){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...b(r)})}function wn(t,r){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...b(r)})}function In(t,r){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...b(r)})}function zn(t,r){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...b(r)})}function pr(t,r){return new t({type:"string",format:"url",check:"string_format",abort:!1,...b(r)})}function On(t,r){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...b(r)})}function En(t,r){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...b(r)})}function Pn(t,r){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...b(r)})}function Tn(t,r){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...b(r)})}function jn(t,r){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...b(r)})}function An(t,r){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...b(r)})}function Nn(t,r){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...b(r)})}function Cn(t,r){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...b(r)})}function Dn(t,r){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...b(r)})}function Ls(t,r){return new t({type:"string",format:"mac",check:"string_format",abort:!1,...b(r)})}function Un(t,r){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...b(r)})}function Rn(t,r){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...b(r)})}function Zn(t,r){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...b(r)})}function Ln(t,r){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...b(r)})}function Fn(t,r){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...b(r)})}function Mn(t,r){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...b(r)})}var Fs={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Ms(t,r){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...b(r)})}function Vs(t,r){return new t({type:"string",format:"date",check:"string_format",...b(r)})}function Bs(t,r){return new t({type:"string",format:"time",check:"string_format",precision:null,...b(r)})}function Gs(t,r){return new t({type:"string",format:"duration",check:"string_format",...b(r)})}function Ws(t,r){return new t({type:"number",checks:[],...b(r)})}function Hs(t,r){return new t({type:"number",coerce:!0,checks:[],...b(r)})}function Js(t,r){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...b(r)})}function qs(t,r){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...b(r)})}function Ks(t,r){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...b(r)})}function Ys(t,r){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...b(r)})}function Xs(t,r){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...b(r)})}function Qs(t,r){return new t({type:"boolean",...b(r)})}function ec(t,r){return new t({type:"boolean",coerce:!0,...b(r)})}function tc(t,r){return new t({type:"bigint",...b(r)})}function rc(t,r){return new t({type:"bigint",coerce:!0,...b(r)})}function nc(t,r){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...b(r)})}function ic(t,r){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...b(r)})}function oc(t,r){return new t({type:"symbol",...b(r)})}function ac(t,r){return new t({type:"undefined",...b(r)})}function sc(t,r){return new t({type:"null",...b(r)})}function cc(t){return new t({type:"any"})}function uc(t){return new t({type:"unknown"})}function lc(t,r){return new t({type:"never",...b(r)})}function dc(t,r){return new t({type:"void",...b(r)})}function mc(t,r){return new t({type:"date",...b(r)})}function pc(t,r){return new t({type:"date",coerce:!0,...b(r)})}function fc(t,r){return new t({type:"nan",...b(r)})}function he(t,r){return new sn({check:"less_than",...b(r),value:t,inclusive:!1})}function te(t,r){return new sn({check:"less_than",...b(r),value:t,inclusive:!0})}function ve(t,r){return new cn({check:"greater_than",...b(r),value:t,inclusive:!1})}function J(t,r){return new cn({check:"greater_than",...b(r),value:t,inclusive:!0})}function Vn(t){return ve(0,t)}function Bn(t){return he(0,t)}function Gn(t){return te(0,t)}function Wn(t){return J(0,t)}function Ce(t,r){return new sa({check:"multiple_of",...b(r),value:t})}function De(t,r){return new la({check:"max_size",...b(r),maximum:t})}function _e(t,r){return new da({check:"min_size",...b(r),minimum:t})}function He(t,r){return new ma({check:"size_equals",...b(r),size:t})}function Je(t,r){return new pa({check:"max_length",...b(r),maximum:t})}function Ie(t,r){return new fa({check:"min_length",...b(r),minimum:t})}function qe(t,r){return new ga({check:"length_equals",...b(r),length:t})}function mt(t,r){return new ha({check:"string_format",format:"regex",...b(r),pattern:t})}function pt(t){return new va({check:"string_format",format:"lowercase",...b(t)})}function ft(t){return new _a({check:"string_format",format:"uppercase",...b(t)})}function gt(t,r){return new ya({check:"string_format",format:"includes",...b(r),includes:t})}function ht(t,r){return new ba({check:"string_format",format:"starts_with",...b(r),prefix:t})}function vt(t,r){return new $a({check:"string_format",format:"ends_with",...b(r),suffix:t})}function Hn(t,r,n){return new xa({check:"property",property:t,schema:r,...b(n)})}function _t(t,r){return new ka({check:"mime_type",mime:t,...b(r)})}function le(t){return new Sa({check:"overwrite",tx:t})}function yt(t){return le(r=>r.normalize(t))}function bt(){return le(t=>t.trim())}function $t(){return le(t=>t.toLowerCase())}function xt(){return le(t=>t.toUpperCase())}function kt(){return le(t=>bo(t))}function gc(t,r,n){return new t({type:"array",element:r,...b(n)})}function sy(t,r,n){return new t({type:"union",options:r,...b(n)})}function cy(t,r,n){return new t({type:"union",options:r,inclusive:!1,...b(n)})}function uy(t,r,n,o){return new t({type:"union",options:n,discriminator:r,...b(o)})}function ly(t,r,n){return new t({type:"intersection",left:r,right:n})}function dy(t,r,n,o){let e=n instanceof S,i=e?o:n,a=e?n:null;return new t({type:"tuple",items:r,rest:a,...b(i)})}function my(t,r,n,o){return new t({type:"record",keyType:r,valueType:n,...b(o)})}function py(t,r,n,o){return new t({type:"map",keyType:r,valueType:n,...b(o)})}function fy(t,r,n){return new t({type:"set",valueType:r,...b(n)})}function gy(t,r,n){let o=Array.isArray(r)?Object.fromEntries(r.map(e=>[e,e])):r;return new t({type:"enum",entries:o,...b(n)})}function hy(t,r,n){return new t({type:"enum",entries:r,...b(n)})}function vy(t,r,n){return new t({type:"literal",values:Array.isArray(r)?r:[r],...b(n)})}function hc(t,r){return new t({type:"file",...b(r)})}function _y(t,r){return new t({type:"transform",transform:r})}function yy(t,r){return new t({type:"optional",innerType:r})}function by(t,r){return new t({type:"nullable",innerType:r})}function $y(t,r,n){return new t({type:"default",innerType:r,get defaultValue(){return typeof n=="function"?n():xo(n)}})}function xy(t,r,n){return new t({type:"nonoptional",innerType:r,...b(n)})}function ky(t,r){return new t({type:"success",innerType:r})}function Sy(t,r,n){return new t({type:"catch",innerType:r,catchValue:typeof n=="function"?n:()=>n})}function wy(t,r,n){return new t({type:"pipe",in:r,out:n})}function Iy(t,r){return new t({type:"readonly",innerType:r})}function zy(t,r,n){return new t({type:"template_literal",parts:r,...b(n)})}function Oy(t,r){return new t({type:"lazy",getter:r})}function Ey(t,r){return new t({type:"promise",innerType:r})}function vc(t,r,n){let o=b(n);return o.abort??(o.abort=!0),new t({type:"custom",check:"custom",fn:r,...o})}function _c(t,r,n){return new t({type:"custom",check:"custom",fn:r,...b(n)})}function yc(t,r){let n=tp(o=>(o.addIssue=e=>{if(typeof e=="string")o.issues.push(ot(e,o.value,n._zod.def));else{let i=e;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),o.issues.push(ot(i))}},t(o.value,o)),r);return n}function tp(t,r){let n=new A({check:"custom",...b(r)});return n._zod.check=t,n}function bc(t){let r=new A({check:"describe"});return r._zod.onattach=[n=>{let o=V.get(n)??{};V.add(n,{...o,description:t})}],r._zod.check=()=>{},r}function $c(t){let r=new A({check:"meta"});return r._zod.onattach=[n=>{let o=V.get(n)??{};V.add(n,{...o,...t})}],r._zod.check=()=>{},r}function xc(t,r){let n=b(r),o=n.truthy??["true","1","yes","on","y","enabled"],e=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(o=o.map(h=>typeof h=="string"?h.toLowerCase():h),e=e.map(h=>typeof h=="string"?h.toLowerCase():h));let i=new Set(o),a=new Set(e),s=t.Codec??ur,u=t.Boolean??sr,l=t.String??We,d=new l({type:"string",error:n.error}),p=new u({type:"boolean",error:n.error}),g=new s({type:"pipe",in:d,out:p,transform:((h,x)=>{let K=h;return n.case!=="sensitive"&&(K=K.toLowerCase()),i.has(K)?!0:a.has(K)?!1:(x.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:x.value,inst:g,continue:!1}),{})}),reverseTransform:((h,x)=>h===!0?o[0]||"true":e[0]||"false"),error:n.error});return g}function St(t,r,n,o={}){let e=b(o),i={...b(o),check:"string_format",type:"string",format:r,fn:typeof n=="function"?n:s=>n.test(s),...e};return n instanceof RegExp&&(i.pattern=n),new t(i)}function Ue(t){let r=t?.target??"draft-2020-12";return r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??V,target:r,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0}}function P(t,r,n={path:[],schemaPath:[]}){var o;let e=t._zod.def,i=r.seen.get(t);if(i)return i.count++,n.schemaPath.includes(t)&&(i.cycle=n.path),i.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};r.seen.set(t,a);let s=t._zod.toJSONSchema?.();if(s)a.schema=s;else{let d={...n,schemaPath:[...n.schemaPath,t],path:n.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(r,a.schema,d);else{let g=a.schema,h=r.processors[e.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${e.type}`);h(t,r,g,d)}let p=t._zod.parent;p&&(a.ref||(a.ref=p),P(p,r,d),r.seen.get(p).isParent=!0)}let u=r.metadataRegistry.get(t);return u&&Object.assign(a.schema,u),r.io==="input"&&q(t)&&(delete a.schema.examples,delete a.schema.default),r.io==="input"&&"_prefault"in a.schema&&((o=a.schema).default??(o.default=a.schema._prefault)),delete a.schema._prefault,r.seen.get(t).schema}function Re(t,r){let n=t.seen.get(r);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let a of t.seen.entries()){let s=t.metadataRegistry.get(a[0])?.id;if(s){let u=o.get(s);if(u&&u!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(s,a[0])}}let e=a=>{let s=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){let p=t.external.registry.get(a[0])?.id,g=t.external.uri??(x=>x);if(p)return{ref:g(p)};let h=a[1].defId??a[1].schema.id??`schema${t.counter++}`;return a[1].defId=h,{defId:h,ref:`${g("__shared")}#/${s}/${h}`}}if(a[1]===n)return{ref:"#"};let l=`#/${s}/`,d=a[1].schema.id??`__schema${t.counter++}`;return{defId:d,ref:l+d}},i=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:u,defId:l}=e(a);s.def={...s.schema},l&&(s.defId=l);let d=s.schema;for(let p in d)delete d[p];d.$ref=u};if(t.cycles==="throw")for(let a of t.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
95
+ `)}h.write("payload.value = newResult;"),h.write("return payload;");let e_=h.compile();return(fe,M)=>e_(g,fe,M)},i,s=Ve,c=!Ze.jitless,l=c&&go.value,d=t.catchall,m;e._zod.parse=(g,h)=>{m??(m=o.value);let S=g.value;return s(S)?c&&l&&h?.async===!1&&h.jitless!==!0?(i||(i=n(t.shape)),g=i(g,h),d?dm([],S,g,h,m,e):g):r(g,h):(g.issues.push({expected:"object",code:"invalid_type",input:S,inst:e}),g)}});function qd(e,t,r,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let n=e.filter(i=>!Ae(i));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>W(s,o,F())))}),t)}var ln=p("$ZodUnion",(e,t)=>{$.init(e,t),w(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),w(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),w(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),w(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){let o=t.options.map(n=>n._zod.pattern);return new RegExp(`^(${o.map(n=>Xt(n.source)).join("|")})$`)}});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,n)=>{if(r)return r(o,n);let i=!1,s=[];for(let c of t.options){let u=c._zod.run({value:o.value,issues:[]},n);if(u instanceof Promise)s.push(u),i=!0;else{if(u.issues.length===0)return u;s.push(u)}}return i?Promise.all(s).then(c=>qd(c,o,e,n)):qd(s,o,e,n)}});function Jd(e,t,r,o){let n=e.filter(i=>i.issues.length===0);return n.length===1?(t.value=n[0].value,t):(n.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>W(s,o,F())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}var os=p("$ZodXor",(e,t)=>{ln.init(e,t),t.inclusive=!1;let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,n)=>{if(r)return r(o,n);let i=!1,s=[];for(let c of t.options){let u=c._zod.run({value:o.value,issues:[]},n);u instanceof Promise?(s.push(u),i=!0):s.push(u)}return i?Promise.all(s).then(c=>Jd(c,o,e,n)):Jd(s,o,e,n)}}),as=p("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,ln.init(e,t);let r=e._zod.parse;w(e._zod,"propValues",()=>{let n={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[c,u]of Object.entries(s)){n[c]||(n[c]=new Set);for(let l of u)n[c].add(l)}}return n});let o=rt(()=>{let n=t.options,i=new Map;for(let s of n){let c=s._zod.propValues?.[t.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let u of c){if(i.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);i.set(u,s)}}return i});e._zod.parse=(n,i)=>{let s=n.value;if(!Ve(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),n;let c=o.value.get(s?.[t.discriminator]);return c?c._zod.run(n,i):t.unionFallback||i.direction==="backward"?r(n,i):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:s,path:[t.discriminator],inst:e}),n)}}),ss=p("$ZodIntersection",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value,i=t.left._zod.run({value:n,issues:[]},o),s=t.right._zod.run({value:n,issues:[]},o);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([u,l])=>Yd(r,u,l)):Yd(r,i,s)}});function ya(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Pe(e)&&Pe(t)){let r=Object.keys(t),o=Object.keys(e).filter(i=>r.indexOf(i)!==-1),n={...e,...t};for(let i of o){let s=ya(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};n[i]=s.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let o=0;o<e.length;o++){let n=e[o],i=t[o],s=ya(n,i);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Yd(e,t,r){let o=new Map,n;for(let c of t.issues)if(c.code==="unrecognized_keys"){n??(n=c);for(let u of c.keys)o.has(u)||o.set(u,{}),o.get(u).l=!0}else e.issues.push(c);for(let c of r.issues)if(c.code==="unrecognized_keys")for(let u of c.keys)o.has(u)||o.set(u,{}),o.get(u).r=!0;else e.issues.push(c);let i=[...o].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(i.length&&n&&e.issues.push({...n,keys:i}),Ae(e))return e;let s=ya(t.value,r.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}var mr=p("$ZodTuple",(e,t)=>{$.init(e,t);let r=t.items;e._zod.parse=(o,n)=>{let i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];let s=[],c=Xd(r,"optin"),u=Xd(r,"optout");if(!t.rest){if(i.length<c)return o.issues.push({code:"too_small",minimum:c,inclusive:!0,input:i,inst:e,origin:"array"}),o;i.length>r.length&&o.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:i,inst:e,origin:"array"})}let l=new Array(r.length);for(let d=0;d<r.length;d++){let m=r[d]._zod.run({value:i[d],issues:[]},n);m instanceof Promise?s.push(m.then(g=>{l[d]=g})):l[d]=m}if(t.rest){let d=r.length-1,m=i.slice(r.length);for(let g of m){d++;let h=t.rest._zod.run({value:g,issues:[]},n);h instanceof Promise?s.push(h.then(S=>Qd(S,o,d))):Qd(h,o,d)}}return s.length?Promise.all(s).then(()=>em(l,o,r,i,u)):em(l,o,r,i,u)}});function Xd(e,t){for(let r=e.length-1;r>=0;r--)if(e[r]._zod[t]!=="optional")return r+1;return 0}function Qd(e,t,r){e.issues.length&&t.issues.push(...Y(r,e.issues)),t.value[r]=e.value}function em(e,t,r,o,n){for(let i=0;i<r.length;i++){let s=e[i],c=i<o.length;if(s.issues.length){if(!c&&i>=n){t.value.length=i;break}t.issues.push(...Y(i,s.issues))}t.value[i]=s.value}for(let i=t.value.length-1;i>=o.length&&(r[i]._zod.optout==="optional"&&t.value[i]===void 0);i--)t.value.length=i;return t}var cs=p("$ZodRecord",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Pe(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;let i=[],s=t.keyType._zod.values;if(s){r.value={};let c=new Set;for(let l of s)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){c.add(typeof l=="number"?l.toString():l);let d=t.keyType._zod.run({value:l,issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(h=>W(h,o,F())),input:l,path:[l],inst:e});continue}let m=d.value,g=t.valueType._zod.run({value:n[l],issues:[]},o);g instanceof Promise?i.push(g.then(h=>{h.issues.length&&r.issues.push(...Y(l,h.issues)),r.value[m]=h.value})):(g.issues.length&&r.issues.push(...Y(l,g.issues)),r.value[m]=g.value)}let u;for(let l in n)c.has(l)||(u=u??[],u.push(l));u&&u.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:u})}else{r.value={};for(let c of Reflect.ownKeys(n)){if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(n,c))continue;let u=t.keyType._zod.run({value:c,issues:[]},o);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&rr.test(c)&&u.issues.length){let m=t.keyType._zod.run({value:Number(c),issues:[]},o);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");m.issues.length===0&&(u=m)}if(u.issues.length){t.mode==="loose"?r.value[c]=n[c]:r.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(m=>W(m,o,F())),input:c,path:[c],inst:e});continue}let d=t.valueType._zod.run({value:n[c],issues:[]},o);d instanceof Promise?i.push(d.then(m=>{m.issues.length&&r.issues.push(...Y(c,m.issues)),r.value[u.value]=m.value})):(d.issues.length&&r.issues.push(...Y(c,d.issues)),r.value[u.value]=d.value)}}return i.length?Promise.all(i).then(()=>r):r}}),us=p("$ZodMap",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;let i=[];r.value=new Map;for(let[s,c]of n){let u=t.keyType._zod.run({value:s,issues:[]},o),l=t.valueType._zod.run({value:c,issues:[]},o);u instanceof Promise||l instanceof Promise?i.push(Promise.all([u,l]).then(([d,m])=>{tm(d,m,r,s,n,e,o)})):tm(u,l,r,s,n,e,o)}return i.length?Promise.all(i).then(()=>r):r}});function tm(e,t,r,o,n,i,s){e.issues.length&&(Qt.has(typeof o)?r.issues.push(...Y(o,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:i,issues:e.issues.map(c=>W(c,s,F()))})),t.issues.length&&(Qt.has(typeof o)?r.issues.push(...Y(o,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:i,key:o,issues:t.issues.map(c=>W(c,s,F()))})),r.value.set(e.value,t.value)}var ls=p("$ZodSet",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;let i=[];r.value=new Set;for(let s of n){let c=t.valueType._zod.run({value:s,issues:[]},o);c instanceof Promise?i.push(c.then(u=>nm(u,r))):nm(c,r)}return i.length?Promise.all(i).then(()=>r):r}});function nm(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var ds=p("$ZodEnum",(e,t)=>{$.init(e,t);let r=Yt(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(n=>Qt.has(typeof n)).map(n=>typeof n=="string"?oe(n):n.toString()).join("|")})$`),e._zod.parse=(n,i)=>{let s=n.value;return o.has(s)||n.issues.push({code:"invalid_value",values:r,input:s,inst:e}),n}}),ms=p("$ZodLiteral",(e,t)=>{if($.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?oe(o):o?oe(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,n)=>{let i=o.value;return r.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),ps=p("$ZodFile",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),fs=p("$ZodTransform",(e,t)=>{$.init(e,t),e._zod.optin="optional",e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Ee(e.constructor.name);let n=t.transform(r.value,r);if(o.async)return(n instanceof Promise?n:Promise.resolve(n)).then(s=>(r.value=s,r.fallback=!0,r));if(n instanceof Promise)throw new se;return r.value=n,r.fallback=!0,r}});function rm(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var pr=p("$ZodOptional",(e,t)=>{$.init(e,t),e._zod.optin="optional",e._zod.optout="optional",w(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),w(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Xt(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(t.innerType._zod.optin==="optional"){let n=r.value,i=t.innerType._zod.run(r,o);return i instanceof Promise?i.then(s=>rm(s,n)):rm(i,n)}return r.value===void 0?r:t.innerType._zod.run(r,o)}}),gs=p("$ZodExactOptional",(e,t)=>{pr.init(e,t),w(e._zod,"values",()=>t.innerType._zod.values),w(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,o)=>t.innerType._zod.run(r,o)}),hs=p("$ZodNullable",(e,t)=>{$.init(e,t),w(e._zod,"optin",()=>t.innerType._zod.optin),w(e._zod,"optout",()=>t.innerType._zod.optout),w(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Xt(r.source)}|null)$`):void 0}),w(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:t.innerType._zod.run(r,o)}),_s=p("$ZodDefault",(e,t)=>{$.init(e,t),e._zod.optin="optional",w(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>im(i,t)):im(n,t)}});function im(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var vs=p("$ZodPrefault",(e,t)=>{$.init(e,t),e._zod.optin="optional",w(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>(o.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,o))}),bs=p("$ZodNonOptional",(e,t)=>{$.init(e,t),w(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>om(i,e)):om(n,e)}});function om(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var ys=p("$ZodSuccess",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Ee("ZodSuccess");let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),xs=p("$ZodCatch",(e,t)=>{$.init(e,t),e._zod.optin="optional",w(e._zod,"optout",()=>t.innerType._zod.optout),w(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>W(s,o,F()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(i=>W(i,o,F()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),ks=p("$ZodNaN",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),fr=p("$ZodPipe",(e,t)=>{$.init(e,t),w(e._zod,"values",()=>t.in._zod.values),w(e._zod,"optin",()=>t.in._zod.optin),w(e._zod,"optout",()=>t.out._zod.optout),w(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(s=>ar(s,t.in,o)):ar(i,t.in,o)}let n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>ar(i,t.out,o)):ar(n,t.out,o)}});function ar(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}var dn=p("$ZodCodec",(e,t)=>{$.init(e,t),w(e._zod,"values",()=>t.in._zod.values),w(e._zod,"optin",()=>t.in._zod.optin),w(e._zod,"optout",()=>t.out._zod.optout),w(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(r,o);return i instanceof Promise?i.then(s=>sr(s,t,o)):sr(i,t,o)}else{let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(s=>sr(s,t,o)):sr(i,t,o)}}});function sr(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let n=t.transform(e.value,e);return n instanceof Promise?n.then(i=>cr(e,i,t.out,r)):cr(e,n,t.out,r)}else{let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(i=>cr(e,i,t.in,r)):cr(e,n,t.in,r)}}function cr(e,t,r,o){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},o)}var Ss=p("$ZodPreprocess",(e,t)=>{fr.init(e,t)}),$s=p("$ZodReadonly",(e,t)=>{$.init(e,t),w(e._zod,"propValues",()=>t.innerType._zod.propValues),w(e._zod,"values",()=>t.innerType._zod.values),w(e._zod,"optin",()=>t.innerType?._zod?.optin),w(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(am):am(n)}});function am(e){return e.value=Object.freeze(e.value),e}var Is=p("$ZodTemplateLiteral",(e,t)=>{$.init(e,t);let r=[];for(let o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let n=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=n.startsWith("^")?1:0,s=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(i,s))}else if(o===null||_o.has(typeof o))r.push(oe(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(o,n)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"string",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o)}),ws=p("$ZodFunction",(e,t)=>($.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...o){let n=e._def.input?Gn(e._def.input,o):o,i=Reflect.apply(r,this,n);return e._def.output?Gn(e._def.output,i):i}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let n=e._def.input?await Kn(e._def.input,o):o,i=await Reflect.apply(r,this,n);return e._def.output?await Kn(e._def.output,i):i}},e._zod.parse=(r,o)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let o=e.constructor;return Array.isArray(r[0])?new o({type:"function",input:new mr({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new o({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:r})},e)),Es=p("$ZodPromise",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},o))}),Os=p("$ZodLazy",(e,t)=>{$.init(e,t),w(e._zod,"innerType",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),w(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),w(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),w(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),w(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o)}),Ts=p("$ZodCustom",(e,t)=>{z.init(e,t),$.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=r=>{let o=r.value,n=t.fn(o);if(n instanceof Promise)return n.then(i=>sm(i,r,o,e));sm(n,r,o,e)}});function sm(e,t,r,o){if(!e){let n={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(n.params=o._zod.def.params),t.issues.push(it(n))}}var pn={};ye(pn,{ar:()=>pm,az:()=>fm,be:()=>hm,bg:()=>_m,ca:()=>vm,cs:()=>bm,da:()=>ym,de:()=>xm,el:()=>km,en:()=>gr,eo:()=>Sm,es:()=>$m,fa:()=>Im,fi:()=>wm,fr:()=>Em,frCA:()=>Om,he:()=>Tm,hr:()=>Pm,hu:()=>Am,hy:()=>Cm,id:()=>Rm,is:()=>Dm,it:()=>zm,ja:()=>jm,ka:()=>Um,kh:()=>Lm,km:()=>hr,ko:()=>Mm,lt:()=>Zm,mk:()=>Vm,ms:()=>Bm,nl:()=>Hm,no:()=>Gm,ota:()=>Km,pl:()=>qm,ps:()=>Wm,pt:()=>Jm,ro:()=>Ym,ru:()=>Qm,sl:()=>ep,sv:()=>tp,ta:()=>np,th:()=>rp,tr:()=>ip,ua:()=>op,uk:()=>_r,ur:()=>ap,uz:()=>sp,vi:()=>cp,yo:()=>dp,zhCN:()=>up,zhTW:()=>lp});var Yv=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(n){return e[n]??null}let r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${n.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${c}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${c}`}case"invalid_value":return n.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${_(n.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${r[i.format]??n.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${n.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${f(n.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function pm(){return{localeError:Yv()}}var Xv=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r={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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${n.expected}, daxil olan ${c}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${c}`}case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${_(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[i.format]??n.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${f(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function fm(){return{localeError:Xv()}}function gm(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var Qv=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(n){return e[n]??null}let r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},o={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${n.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${c}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${c}`}case"invalid_value":return n.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${_(n.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let c=Number(n.maximum),u=gm(c,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${n.maximum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let c=Number(n.minimum),u=gm(c,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${n.minimum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${f(n.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${n.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function hm(){return{localeError:Qv()}}var eb=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${c}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${c}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${_(n.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${n.minimum.toString()} ${s.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;if(i.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${i.prefix}"`;if(i.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${i.suffix}"`;if(i.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${i.includes}"`;if(i.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${i.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${r[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${n.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u043E\u0432\u0435":""}: ${f(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function _m(){return{localeError:eb()}}var tb=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}let r={regex:"entrada",email:"adre\xE7a electr\xF2nica",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\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${n.expected}, s'ha rebut ${c}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${c}`}case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${_(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${f(n.values," o ")}`;case"too_big":{let i=n.inclusive?"com a m\xE0xim":"menys de",s=t(n.origin);return s?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${i} ${n.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(n.origin);return s?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${i} ${n.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${r[i.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${f(n.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${n.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${n.origin}`;default:return"Entrada inv\xE0lida"}}};function vm(){return{localeError:tb()}}var nb=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(n){return e[n]??null}let r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 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 \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},o={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${n.expected}, obdr\u017Eeno ${c}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${c}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${_(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${r[i.format]??n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${f(n.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${n.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${n.origin}`;default:return"Neplatn\xFD vstup"}}};function bm(){return{localeError:nb()}}var rb=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(n){return e[n]??null}let r={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\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",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"},o={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${c}`:`Ugyldigt input: forventede ${i}, fik ${c}`}case"invalid_value":return n.values.length===1?`Ugyldig v\xE6rdi: forventede ${_(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin),c=o[n.origin]??n.origin;return s?`For stor: forventede ${c??"value"} ${s.verb} ${i} ${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${c??"value"} havde ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin),c=o[n.origin]??n.origin;return s?`For lille: forventede ${c} ${s.verb} ${i} ${n.minimum.toString()} ${s.unit}`:`For lille: forventede ${c} havde ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.format]??n.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${f(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${n.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${n.origin}`;default:return"Ugyldigt input"}}};function ym(){return{localeError:rb()}}var ib=()=>{let e={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 t(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"Zahl",array:"Array"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${c}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${c}`}case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${_(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ist`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ist`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${r[i.format]??n.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${f(n.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${n.origin}`;default:return"Ung\xFCltige Eingabe"}}};function xm(){return{localeError:ib()}}var ob=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(n){return e[n]??null}let r={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 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 \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return typeof n.expected=="string"&&/^[A-Z]/.test(n.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${n.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${c}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${c}`}case"invalid_value":return n.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${_(n.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${n.maximum.toString()} ${s.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${n.minimum.toString()} ${s.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${i.prefix}"`:i.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${i.suffix}"`:i.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${i.includes}"`:i.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${i.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${r[i.format]??n.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${n.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${n.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${n.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${f(n.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${n.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${n.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function km(){return{localeError:ob()}}var ab=()=>{let e={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 t(n){return e[n]??null}let r={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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return`Invalid input: expected ${i}, received ${c}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${_(n.values[0])}`:`Invalid option: expected one of ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Too big: expected ${n.origin??"value"} to have ${i}${n.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Too small: expected ${n.origin} to have ${i}${n.minimum.toString()} ${s.unit}`:`Too small: expected ${n.origin} to be ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${r[i.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${f(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`Invalid discriminator value. Expected ${n.options.map(s=>`'${s}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function gr(){return{localeError:ab()}}var sb=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(n){return e[n]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",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\u016Dro",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"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${c}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${c}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${_(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${i}${n.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${r[i.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} \u015Dlosilo${n.keys.length>1?"j":""}: ${f(n.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}};function Sm(){return{localeError:sb()}}var cb=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}let r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",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\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${c}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${c}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${_(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin),c=o[n.origin]??n.origin;return s?`Demasiado grande: se esperaba que ${c??"valor"} tuviera ${i}${n.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${c??"valor"} fuera ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin),c=o[n.origin]??n.origin;return s?`Demasiado peque\xF1o: se esperaba que ${c} tuviera ${i}${n.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${c} fuera ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${r[i.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${f(n.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${o[n.origin]??n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${o[n.origin]??n.origin}`;default:return"Entrada inv\xE1lida"}}};function $m(){return{localeError:cb()}}var ub=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(n){return e[n]??null}let r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${n.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${c} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${c} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${_(n.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${f(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[i.format]??n.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${n.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${f(n.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${n.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function Im(){return{localeError:ub()}}var lb=()=>{let e={string:{unit:"merkki\xE4",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\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(n){return e[n]??null}let r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",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\xE4iv\xE4m\xE4\xE4r\xE4",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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${c}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${c}`}case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${_(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${i}${n.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${i}${n.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${r[i.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${f(n.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\xF6te"}}};function wm(){return{localeError:lb()}}var db=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r={regex:"entr\xE9e",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\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instanceof ${n.expected} attendu, ${c} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${c} re\xE7u`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${_(n.values[0])} attendu`:`Option invalide : une valeur parmi ${f(n.values,"|")} attendue`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Trop grand : ${o[n.origin]??"valeur"} doit ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${o[n.origin]??"valeur"} doit \xEAtre ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Trop petit : ${o[n.origin]??"valeur"} doit ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Trop petit : ${o[n.origin]??"valeur"} doit \xEAtre ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${r[i.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${f(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function Em(){return{localeError:db()}}var mb=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r={regex:"entr\xE9e",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\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${c}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${c}`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${_(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u2264":"<",s=t(n.origin);return s?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${i}${n.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"\u2265":">",s=t(n.origin);return s?`Trop petit : attendu que ${n.origin} ait ${i}${n.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${n.origin} soit ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${r[i.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${f(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function Om(){return{localeError:mb()}}var pb=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=l=>l?e[l]:void 0,o=l=>{let d=r(l);return d?d.label:l??e.unknown.label},n=l=>`\u05D4${o(l)}`,i=l=>(r(l)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",s=l=>l?t[l]??null:null,c={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",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:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},u={nan:"NaN"};return l=>{switch(l.code){case"invalid_type":{let d=l.expected,m=u[d??""]??o(d),g=v(l.input),h=u[g]??e[g]?.label??g;return/^[A-Z]/.test(l.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${l.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`}case"invalid_value":{if(l.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${_(l.values[0])}`;let d=l.values.map(h=>_(h));if(l.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${d[0]} \u05D0\u05D5 ${d[1]}`;let m=d[d.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${d.slice(0,-1).join(", ")} \u05D0\u05D5 ${m}`}case"too_big":{let d=s(l.origin),m=n(l.origin??"value");if(l.origin==="string")return`${d?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.maximum.toString()} ${d?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(l.origin==="number"){let S=l.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${l.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${S}`}if(l.origin==="array"||l.origin==="set"){let S=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",C=l.inclusive?`${l.maximum} ${d?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${l.maximum} ${d?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${m} ${S} \u05DC\u05D4\u05DB\u05D9\u05DC ${C}`.trim()}let g=l.inclusive?"<=":"<",h=i(l.origin??"value");return d?.unit?`${d.longLabel} \u05DE\u05D3\u05D9: ${m} ${h} ${g}${l.maximum.toString()} ${d.unit}`:`${d?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${m} ${h} ${g}${l.maximum.toString()}`}case"too_small":{let d=s(l.origin),m=n(l.origin??"value");if(l.origin==="string")return`${d?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.minimum.toString()} ${d?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(l.origin==="number"){let S=l.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${l.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${S}`}if(l.origin==="array"||l.origin==="set"){let S=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let A=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} ${S} \u05DC\u05D4\u05DB\u05D9\u05DC ${A}`}let C=l.inclusive?`${l.minimum} ${d?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${l.minimum} ${d?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} ${S} \u05DC\u05D4\u05DB\u05D9\u05DC ${C}`.trim()}let g=l.inclusive?">=":">",h=i(l.origin??"value");return d?.unit?`${d.shortLabel} \u05DE\u05D3\u05D9: ${m} ${h} ${g}${l.minimum.toString()} ${d.unit}`:`${d?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${m} ${h} ${g}${l.minimum.toString()}`}case"invalid_format":{let d=l;if(d.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${d.prefix}"`;if(d.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${d.suffix}"`;if(d.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${d.includes}"`;if(d.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${d.pattern}`;let m=c[d.format],g=m?.label??d.format,S=(m?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${g} \u05DC\u05D0 ${S}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${l.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${l.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${l.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${f(l.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n(l.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function Tm(){return{localeError:pb()}}var fb=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(n){return e[n]??null}let r={regex:"unos",email:"email 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:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},o={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${n.expected}, a primljeno je ${c}`:`Neispravan unos: o\u010Dekuje se ${i}, a primljeno je ${c}`}case"invalid_value":return n.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${_(n.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin),c=o[n.origin]??n.origin;return s?`Preveliko: o\u010Dekivano da ${c??"vrijednost"} ima ${i}${n.maximum.toString()} ${s.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${c??"vrijednost"} bude ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin),c=o[n.origin]??n.origin;return s?`Premalo: o\u010Dekivano da ${c} ima ${i}${n.minimum.toString()} ${s.unit}`:`Premalo: o\u010Dekivano da ${c} bude ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${i.prefix}"`:i.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${i.suffix}"`:i.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${i.includes}"`:i.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`:`Neispravna ${r[i.format]??n.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${n.divisor}`;case"unrecognized_keys":return`Neprepoznat${n.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${f(n.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${o[n.origin]??n.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${o[n.origin]??n.origin}`;default:return"Neispravan unos"}}};function Pm(){return{localeError:fb()}}var gb=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}let r={regex:"bemenet",email:"email c\xEDm",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\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},o={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${n.expected}, a kapott \xE9rt\xE9k ${c}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${c}`}case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${_(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${n.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${i}${n.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[i.format]??n.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${f(n.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${n.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function Am(){return{localeError:gb()}}function Nm(e,t,r){return Math.abs(e)===1?t:r}function lt(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}var hb=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(n){return e[n]??null}let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},o={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${n.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${c}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${c}`}case"invalid_value":return n.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${_(n.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let c=Number(n.maximum),u=Nm(c,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${lt(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${n.maximum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${lt(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let c=Number(n.minimum),u=Nm(c,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${lt(n.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${n.minimum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${lt(n.origin)} \u056C\u056B\u0576\u056B ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[i.format]??n.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${n.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${n.keys.length>1?"\u0576\u0565\u0580":""}. ${f(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${lt(n.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${lt(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function Cm(){return{localeError:hb()}}var _b=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}let r={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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${c}`:`Input tidak valid: diharapkan ${i}, diterima ${c}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${_(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${i}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: diharapkan ${n.origin} memiliki ${i}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${r[i.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${f(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};function Rm(){return{localeError:_b()}}var vb=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(n){return e[n]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",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\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",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\xF6lugildi",jwt:"JWT",template_literal:"gildi"},o={nan:"NaN",number:"n\xFAmer",array:"fylki"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera instanceof ${n.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${_(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${i}${n.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} s\xE9 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${i}${n.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} s\xE9 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${r[i.format]??n.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${f(n.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${n.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${n.origin}`;default:return"Rangt gildi"}}};function Dm(){return{localeError:vb()}}var bb=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"numero",array:"vettore"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${c}`:`Input non valido: atteso ${i}, ricevuto ${c}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${_(n.values[0])}`:`Opzione non valida: atteso uno tra ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Troppo grande: ${n.origin??"valore"} deve avere ${i}${n.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Troppo piccolo: ${n.origin} deve avere ${i}${n.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${n.origin} deve essere ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Input non valido: ${r[i.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${f(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};function zm(){return{localeError:bb()}}var yb=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(n){return e[n]??null}let r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},o={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${c}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${c}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${_(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${f(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=t(n.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${s.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=t(n.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${s.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[i.format]??n.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${n.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${n.keys.length>1?"\u7FA4":""}: ${f(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function jm(){return{localeError:yb()}}var xb=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(n){return e[n]??null}let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},o={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${n.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${c}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${c}`}case"invalid_value":return n.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${_(n.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${f(n.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin} \u10D8\u10E7\u10DD\u10E1 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.prefix}"-\u10D8\u10D7`:i.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.suffix}"-\u10D8\u10D7`:i.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${i.includes}"-\u10E1`:i.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${n.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${n.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${f(n.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${n.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${n.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function Um(){return{localeError:xb()}}var kb=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(n){return e[n]??null}let r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},o={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${n.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${c}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${c}`}case"invalid_value":return n.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${_(n.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${n.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${f(n.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function hr(){return{localeError:kb()}}function Lm(){return hr()}var Sb=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(n){return e[n]??null}let r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${c}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${c}\uC785\uB2C8\uB2E4`}case"invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${_(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${f(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=t(n.origin),u=c?.unit??"\uC694\uC18C";return c?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${u} ${i}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${i}${s}`}case"too_small":{let i=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=t(n.origin),u=c?.unit??"\uC694\uC18C";return c?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${u} ${i}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${i}${s}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[i.format]??n.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${f(n.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function Mm(){return{localeError:Sb()}}var mn=e=>e.charAt(0).toUpperCase()+e.slice(1);function Fm(e){let t=Math.abs(e),r=t%10,o=t%100;return o>=11&&o<=19||r===0?"many":r===1?"one":"few"}var $b=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(n,i,s,c){let u=e[n]??null;return u===null?u:{unit:u.unit[i],verb:u.verb[c][s?"inclusive":"notInclusive"]}}let r={regex:"\u012Fvestis",email:"el. pa\u0161to 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\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},o={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${c}, o tik\u0117tasi - instanceof ${n.expected}`:`Gautas tipas ${c}, o tik\u0117tasi - ${i}`}case"invalid_value":return n.values.length===1?`Privalo b\u016Bti ${_(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${f(n.values,"|")} pasirinkim\u0173`;case"too_big":{let i=o[n.origin]??n.origin,s=t(n.origin,Fm(Number(n.maximum)),n.inclusive??!1,"smaller");if(s?.verb)return`${mn(i??n.origin??"reik\u0161m\u0117")} ${s.verb} ${n.maximum.toString()} ${s.unit??"element\u0173"}`;let c=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${mn(i??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${n.maximum.toString()} ${s?.unit}`}case"too_small":{let i=o[n.origin]??n.origin,s=t(n.origin,Fm(Number(n.minimum)),n.inclusive??!1,"bigger");if(s?.verb)return`${mn(i??n.origin??"reik\u0161m\u0117")} ${s.verb} ${n.minimum.toString()} ${s.unit??"element\u0173"}`;let c=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${mn(i??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${n.minimum.toString()} ${s?.unit}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${r[i.format]??n.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${f(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=o[n.origin]??n.origin;return`${mn(i??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function Zm(){return{localeError:$b()}}var Ib=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(n){return e[n]??null}let r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},o={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${n.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${c}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${c}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${_(n.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${r[i.format]??n.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${f(n.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${n.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function Vm(){return{localeError:Ib()}}var wb=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"nombor"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${c}`:`Input tidak sah: dijangka ${i}, diterima ${c}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${_(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: dijangka ${n.origin??"nilai"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: dijangka ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${r[i.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${f(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};function Bm(){return{localeError:wb()}}var Eb=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"getal"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${c}`:`Ongeldige invoer: verwacht ${i}, ontving ${c}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${_(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin),c=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return s?`Te ${c}: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${c}: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} is`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin),c=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return s?`Te ${c}: verwacht dat ${n.origin} ${i}${n.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${c}: verwacht dat ${n.origin} ${i}${n.minimum.toString()} is`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${r[i.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${f(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};function Hm(){return{localeError:Eb()}}var Ob=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(n){return e[n]??null}let r={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\xE5de",ipv6:"IPv6-omr\xE5de",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"},o={nan:"NaN",number:"tall",array:"liste"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${c}`:`Ugyldig input: forventet ${i}, fikk ${c}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${_(n.values[0])}`:`Ugyldig valg: forventet en av ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${f(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};function Gm(){return{localeError:Ob()}}var Tb=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r={regex:"giren",email:"epostag\xE2h",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\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${c}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${c}`}case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${_(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=n;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[i.format]??n.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${f(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function Km(){return{localeError:Tb()}}var Pb=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(n){return e[n]??null}let r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${n.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${c} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${c} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${_(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${f(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0648\u064A`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[i.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${f(n.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${n.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function Wm(){return{localeError:Pb()}}var Ab=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(n){return e[n]??null}let r={regex:"wyra\u017Cenie",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\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},o={nan:"NaN",number:"liczba",array:"tablica"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${n.expected}, otrzymano ${c}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${c}`}case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${_(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[i.format]??n.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${f(n.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${n.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function qm(){return{localeError:Ab()}}var Nb=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}let r={regex:"padr\xE3o",email:"endere\xE7o 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\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o 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\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",number:"n\xFAmero",null:"nulo"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Tipo inv\xE1lido: esperado instanceof ${n.expected}, recebido ${c}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${c}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${_(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${i}${n.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Muito pequeno: esperado que ${n.origin} tivesse ${i}${n.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${r[i.format]??n.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${f(n.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${n.origin}`;default:return"Campo inv\xE1lido"}}};function Jm(){return{localeError:Nb()}}var Cb=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(n){return e[n]??null}let r={regex:"intrare",email:"adres\u0103 de 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:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},o={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return`Intrare invalid\u0103: a\u0219teptat ${i}, primit ${c}`}case"invalid_value":return n.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${_(n.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} s\u0103 fie ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Prea mic: a\u0219teptat ca ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Prea mic: a\u0219teptat ca ${n.origin} s\u0103 fie ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${i.prefix}"`:i.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${i.suffix}"`:i.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${i.includes}"`:i.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${i.pattern}`:`Format invalid: ${r[i.format]??n.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${n.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${f(n.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${n.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${n.origin}`;default:return"Intrare invalid\u0103"}}};function Ym(){return{localeError:Cb()}}function Xm(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var Rb=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${c}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${c}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${_(n.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let c=Number(n.maximum),u=Xm(c,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.maximum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let c=Number(n.minimum),u=Xm(c,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.minimum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${f(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function Qm(){return{localeError:Rb()}}var Db=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}let r={regex:"vnos",email:"e-po\u0161tni 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 \u010Das",date:"ISO datum",time:"ISO \u010Das",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 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},o={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${c}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${c}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${_(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${i}${n.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${i}${n.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${r[i.format]??n.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${f(n.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};function ep(){return{localeError:Db()}}var zb=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(n){return e[n]??null}let r={regex:"regulj\xE4rt 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\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},o={nan:"NaN",number:"antal",array:"lista"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${c}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${c}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${_(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${r[i.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${f(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function tp(){return{localeError:zb()}}var jb=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(n){return e[n]??null}let r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",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 \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${n.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${c}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${c}`}case"invalid_value":return n.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${_(n.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${f(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${f(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function np(){return{localeError:jb()}}var Ub=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(n){return e[n]??null}let r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},o={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${n.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${c}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${c}`}case"invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${_(n.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[i.format]??n.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${n.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${f(n.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function rp(){return{localeError:Ub()}}var Lb=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(n){return e[n]??null}let r={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\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${c}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${c}`}case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${_(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[i.format]??n.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${n.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${n.keys.length>1?"lar":""}: ${f(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${n.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function ip(){return{localeError:Lb()}}var Mb=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${n.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${c}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${c}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${_(n.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} \u0431\u0443\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${f(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${n.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function _r(){return{localeError:Mb()}}function op(){return _r()}var Fb=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(n){return e[n]??null}let r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},o={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${n.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${c} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${c} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${_(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${f(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${i}${n.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${i}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${n.keys.length>1?"\u0632":""}: ${f(n.keys,"\u060C ")}`;case"invalid_key":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function ap(){return{localeError:Fb()}}var Zb=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"raqam",array:"massiv"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${c}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${c}`}case"invalid_value":return n.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${_(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Juda katta: kutilgan ${n.origin??"qiymat"} ${i}${n.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Juda kichik: kutilgan ${n.origin} ${i}${n.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[i.format]??n.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${n.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${n.keys.length>1?"lar":""}: ${f(n.keys,", ")}`;case"invalid_key":return`${n.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${n.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function sp(){return{localeError:Zb()}}var Vb=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(n){return e[n]??null}let r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 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\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},o={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${n.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${c}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${c}`}case"invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${_(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${r[i.format]??n.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${n.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${f(n.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function cp(){return{localeError:Vb()}}var Bb=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(n){return e[n]??null}let r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},o={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`}case"invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${_(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${r[i.format]??n.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${f(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function up(){return{localeError:Bb()}}var Hb=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(n){return e[n]??null}let r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",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 \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${n.expected}\uFF0C\u4F46\u6536\u5230 ${c}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${c}`}case"invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${_(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${f(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function lp(){return{localeError:Hb()}}var Gb=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(n){return e[n]??null}let r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",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:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},o={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${n.expected}, \xE0m\u1ECD\u0300 a r\xED ${c}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${c}`}case"invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${_(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${s.verb} ${i}${n.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.maximum}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${s.verb} ${i}${n.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.minimum}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${r[i.format]??n.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${n.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${f(n.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function dp(){return{localeError:Gb()}}var mp,Ps=Symbol("ZodOutput"),As=Symbol("ZodInput"),vr=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let o=r[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let o={...this.get(r)??{}};delete o.id;let n={...o,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function br(){return new vr}(mp=globalThis).__zod_globalRegistry??(mp.__zod_globalRegistry=br());var B=globalThis.__zod_globalRegistry;function Ns(e,t){return new e({type:"string",...y(t)})}function Cs(e,t){return new e({type:"string",coerce:!0,...y(t)})}function yr(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...y(t)})}function fn(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...y(t)})}function xr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...y(t)})}function kr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...y(t)})}function Sr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...y(t)})}function $r(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...y(t)})}function gn(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...y(t)})}function Ir(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...y(t)})}function wr(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...y(t)})}function Er(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...y(t)})}function Or(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...y(t)})}function Tr(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...y(t)})}function Pr(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...y(t)})}function Ar(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...y(t)})}function Nr(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...y(t)})}function Cr(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...y(t)})}function Rs(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...y(t)})}function Rr(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...y(t)})}function Dr(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...y(t)})}function zr(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...y(t)})}function jr(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...y(t)})}function Ur(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...y(t)})}function Lr(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...y(t)})}var Ds={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function zs(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...y(t)})}function js(e,t){return new e({type:"string",format:"date",check:"string_format",...y(t)})}function Us(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...y(t)})}function Ls(e,t){return new e({type:"string",format:"duration",check:"string_format",...y(t)})}function Ms(e,t){return new e({type:"number",checks:[],...y(t)})}function Fs(e,t){return new e({type:"number",coerce:!0,checks:[],...y(t)})}function Zs(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...y(t)})}function Vs(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...y(t)})}function Bs(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...y(t)})}function Hs(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...y(t)})}function Gs(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...y(t)})}function Ks(e,t){return new e({type:"boolean",...y(t)})}function Ws(e,t){return new e({type:"boolean",coerce:!0,...y(t)})}function qs(e,t){return new e({type:"bigint",...y(t)})}function Js(e,t){return new e({type:"bigint",coerce:!0,...y(t)})}function Ys(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...y(t)})}function Xs(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...y(t)})}function Qs(e,t){return new e({type:"symbol",...y(t)})}function ec(e,t){return new e({type:"undefined",...y(t)})}function tc(e,t){return new e({type:"null",...y(t)})}function nc(e){return new e({type:"any"})}function rc(e){return new e({type:"unknown"})}function ic(e,t){return new e({type:"never",...y(t)})}function oc(e,t){return new e({type:"void",...y(t)})}function ac(e,t){return new e({type:"date",...y(t)})}function sc(e,t){return new e({type:"date",coerce:!0,...y(t)})}function cc(e,t){return new e({type:"nan",...y(t)})}function ge(e,t){return new ir({check:"less_than",...y(t),value:e,inclusive:!1})}function ne(e,t){return new ir({check:"less_than",...y(t),value:e,inclusive:!0})}function he(e,t){return new or({check:"greater_than",...y(t),value:e,inclusive:!1})}function q(e,t){return new or({check:"greater_than",...y(t),value:e,inclusive:!0})}function Mr(e){return he(0,e)}function Fr(e){return ge(0,e)}function Zr(e){return ne(0,e)}function Vr(e){return q(0,e)}function Ne(e,t){return new ta({check:"multiple_of",...y(t),value:e})}function Ce(e,t){return new ia({check:"max_size",...y(t),maximum:e})}function _e(e,t){return new oa({check:"min_size",...y(t),minimum:e})}function Ge(e,t){return new aa({check:"size_equals",...y(t),size:e})}function Ke(e,t){return new sa({check:"max_length",...y(t),maximum:e})}function $e(e,t){return new ca({check:"min_length",...y(t),minimum:e})}function We(e,t){return new ua({check:"length_equals",...y(t),length:e})}function dt(e,t){return new la({check:"string_format",format:"regex",...y(t),pattern:e})}function mt(e){return new da({check:"string_format",format:"lowercase",...y(e)})}function pt(e){return new ma({check:"string_format",format:"uppercase",...y(e)})}function ft(e,t){return new pa({check:"string_format",format:"includes",...y(t),includes:e})}function gt(e,t){return new fa({check:"string_format",format:"starts_with",...y(t),prefix:e})}function ht(e,t){return new ga({check:"string_format",format:"ends_with",...y(t),suffix:e})}function Br(e,t,r){return new ha({check:"property",property:e,schema:t,...y(r)})}function _t(e,t){return new _a({check:"mime_type",mime:e,...y(t)})}function ce(e){return new va({check:"overwrite",tx:e})}function vt(e){return ce(t=>t.normalize(e))}function bt(){return ce(e=>e.trim())}function yt(){return ce(e=>e.toLowerCase())}function xt(){return ce(e=>e.toUpperCase())}function kt(){return ce(e=>fo(e))}function uc(e,t,r){return new e({type:"array",element:t,...y(r)})}function Wb(e,t,r){return new e({type:"union",options:t,...y(r)})}function qb(e,t,r){return new e({type:"union",options:t,inclusive:!1,...y(r)})}function Jb(e,t,r,o){return new e({type:"union",options:r,discriminator:t,...y(o)})}function Yb(e,t,r){return new e({type:"intersection",left:t,right:r})}function Xb(e,t,r,o){let n=r instanceof $,i=n?o:r,s=n?r:null;return new e({type:"tuple",items:t,rest:s,...y(i)})}function Qb(e,t,r,o){return new e({type:"record",keyType:t,valueType:r,...y(o)})}function ey(e,t,r,o){return new e({type:"map",keyType:t,valueType:r,...y(o)})}function ty(e,t,r){return new e({type:"set",valueType:t,...y(r)})}function ny(e,t,r){let o=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:o,...y(r)})}function ry(e,t,r){return new e({type:"enum",entries:t,...y(r)})}function iy(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...y(r)})}function lc(e,t){return new e({type:"file",...y(t)})}function oy(e,t){return new e({type:"transform",transform:t})}function ay(e,t){return new e({type:"optional",innerType:t})}function sy(e,t){return new e({type:"nullable",innerType:t})}function cy(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():ho(r)}})}function uy(e,t,r){return new e({type:"nonoptional",innerType:t,...y(r)})}function ly(e,t){return new e({type:"success",innerType:t})}function dy(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function my(e,t,r){return new e({type:"pipe",in:t,out:r})}function py(e,t){return new e({type:"readonly",innerType:t})}function fy(e,t,r){return new e({type:"template_literal",parts:t,...y(r)})}function gy(e,t){return new e({type:"lazy",getter:t})}function hy(e,t){return new e({type:"promise",innerType:t})}function dc(e,t,r){let o=y(r);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function mc(e,t,r){return new e({type:"custom",check:"custom",fn:t,...y(r)})}function pc(e,t){let r=pp(o=>(o.addIssue=n=>{if(typeof n=="string")o.issues.push(it(n,o.value,r._zod.def));else{let i=n;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=r),i.continue??(i.continue=!r._zod.def.abort),o.issues.push(it(i))}},e(o.value,o)),t);return r}function pp(e,t){let r=new z({check:"custom",...y(t)});return r._zod.check=e,r}function fc(e){let t=new z({check:"describe"});return t._zod.onattach=[r=>{let o=B.get(r)??{};B.add(r,{...o,description:e})}],t._zod.check=()=>{},t}function gc(e){let t=new z({check:"meta"});return t._zod.onattach=[r=>{let o=B.get(r)??{};B.add(r,{...o,...e})}],t._zod.check=()=>{},t}function hc(e,t){let r=y(t),o=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(o=o.map(h=>typeof h=="string"?h.toLowerCase():h),n=n.map(h=>typeof h=="string"?h.toLowerCase():h));let i=new Set(o),s=new Set(n),c=e.Codec??dn,u=e.Boolean??un,l=e.String??He,d=new l({type:"string",error:r.error}),m=new u({type:"boolean",error:r.error}),g=new c({type:"pipe",in:d,out:m,transform:((h,S)=>{let C=h;return r.case!=="sensitive"&&(C=C.toLowerCase()),i.has(C)?!0:s.has(C)?!1:(S.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:S.value,inst:g,continue:!1}),{})}),reverseTransform:((h,S)=>h===!0?o[0]||"true":n[0]||"false"),error:r.error});return g}function St(e,t,r,o={}){let n=y(o),i={...y(o),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:c=>r.test(c),...n};return r instanceof RegExp&&(i.pattern=r),new e(i)}function Re(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??B,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function N(e,t,r={path:[],schemaPath:[]}){var o;let n=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;let s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s);let c=e._zod.toJSONSchema?.();if(c)s.schema=c;else{let d={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,d);else{let g=s.schema,h=t.processors[n.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);h(e,t,g,d)}let m=e._zod.parent;m&&(s.ref||(s.ref=m),N(m,t,d),t.seen.get(m).isParent=!0)}let u=t.metadataRegistry.get(e);return u&&Object.assign(s.schema,u),t.io==="input"&&J(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&"_prefault"in s.schema&&((o=s.schema).default??(o.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function De(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let s of e.seen.entries()){let c=e.metadataRegistry.get(s[0])?.id;if(c){let u=o.get(c);if(u&&u!==s[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(c,s[0])}}let n=s=>{let c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let m=e.external.registry.get(s[0])?.id,g=e.external.uri??(S=>S);if(m)return{ref:g(m)};let h=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=h,{defId:h,ref:`${g("__shared")}#/${c}/${h}`}}if(s[1]===r)return{ref:"#"};let l=`#/${c}/`,d=s[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:l+d}},i=s=>{if(s[1].schema.$ref)return;let c=s[1],{ref:u,defId:l}=n(s);c.def={...c.schema},l&&(c.defId=l);let d=c.schema;for(let m in d)delete d[m];d.$ref=u};if(e.cycles==="throw")for(let s of e.seen.entries()){let c=s[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
96
96
 
97
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of t.seen.entries()){let s=a[1];if(r===a[0]){i(a);continue}if(t.external){let l=t.external.registry.get(a[0])?.id;if(r!==a[0]&&l){i(a);continue}}if(t.metadataRegistry.get(a[0])?.id){i(a);continue}if(s.cycle){i(a);continue}if(s.count>1&&t.reused==="ref"){i(a);continue}}}function Ze(t,r){let n=t.seen.get(r);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=s=>{let u=t.seen.get(s);if(u.ref===null)return;let l=u.def??u.schema,d={...l},p=u.ref;if(u.ref=null,p){o(p);let h=t.seen.get(p),x=h.schema;if(x.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(x)):Object.assign(l,x),Object.assign(l,d),s._zod.parent===p)for(let F in l)F==="$ref"||F==="allOf"||F in d||delete l[F];if(x.$ref&&h.def)for(let F in l)F==="$ref"||F==="allOf"||F in h.def&&JSON.stringify(l[F])===JSON.stringify(h.def[F])&&delete l[F]}let g=s._zod.parent;if(g&&g!==p){o(g);let h=t.seen.get(g);if(h?.schema.$ref&&(l.$ref=h.schema.$ref,h.def))for(let x in l)x==="$ref"||x==="allOf"||x in h.def&&JSON.stringify(l[x])===JSON.stringify(h.def[x])&&delete l[x]}t.override({zodSchema:s,jsonSchema:l,path:u.path??[]})};for(let s of[...t.seen.entries()].reverse())o(s[0]);let e={};if(t.target==="draft-2020-12"?e.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?e.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?e.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){let s=t.external.registry.get(r)?.id;if(!s)throw new Error("Schema is missing an `id` property");e.$id=t.external.uri(s)}Object.assign(e,n.def??n.schema);let i=t.metadataRegistry.get(r)?.id;i!==void 0&&e.id===i&&delete e.id;let a=t.external?.defs??{};for(let s of t.seen.entries()){let u=s[1];u.def&&u.defId&&(u.def.id===u.defId&&delete u.def.id,a[u.defId]=u.def)}t.external||Object.keys(a).length>0&&(t.target==="draft-2020-12"?e.$defs=a:e.definitions=a);try{let s=JSON.parse(JSON.stringify(e));return Object.defineProperty(s,"~standard",{value:{...r["~standard"],jsonSchema:{input:wt(r,"input",t.processors),output:wt(r,"output",t.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function q(t,r){let n=r??{seen:new Set};if(n.seen.has(t))return!1;n.seen.add(t);let o=t._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return q(o.element,n);if(o.type==="set")return q(o.valueType,n);if(o.type==="lazy")return q(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return q(o.innerType,n);if(o.type==="intersection")return q(o.left,n)||q(o.right,n);if(o.type==="record"||o.type==="map")return q(o.keyType,n)||q(o.valueType,n);if(o.type==="pipe")return t._zod.traits.has("$ZodCodec")?!0:q(o.in,n)||q(o.out,n);if(o.type==="object"){for(let e in o.shape)if(q(o.shape[e],n))return!0;return!1}if(o.type==="union"){for(let e of o.options)if(q(e,n))return!0;return!1}if(o.type==="tuple"){for(let e of o.items)if(q(e,n))return!0;return!!(o.rest&&q(o.rest,n))}return!1}var kc=(t,r={})=>n=>{let o=Ue({...n,processors:r});return P(t,o),Re(o,t),Ze(o,t)},wt=(t,r,n={})=>o=>{let{libraryOptions:e,target:i}=o??{},a=Ue({...e??{},target:i,io:r,processors:n});return P(t,a),Re(a,t),Ze(a,t)};var Py={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Sc=(t,r,n,o)=>{let e=n;e.type="string";let{minimum:i,maximum:a,format:s,patterns:u,contentEncoding:l}=t._zod.bag;if(typeof i=="number"&&(e.minLength=i),typeof a=="number"&&(e.maxLength=a),s&&(e.format=Py[s]??s,e.format===""&&delete e.format,s==="time"&&delete e.format),l&&(e.contentEncoding=l),u&&u.size>0){let d=[...u];d.length===1?e.pattern=d[0].source:d.length>1&&(e.allOf=[...d.map(p=>({...r.target==="draft-07"||r.target==="draft-04"||r.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},wc=(t,r,n,o)=>{let e=n,{minimum:i,maximum:a,format:s,multipleOf:u,exclusiveMaximum:l,exclusiveMinimum:d}=t._zod.bag;typeof s=="string"&&s.includes("int")?e.type="integer":e.type="number";let p=typeof d=="number"&&d>=(i??Number.NEGATIVE_INFINITY),g=typeof l=="number"&&l<=(a??Number.POSITIVE_INFINITY),h=r.target==="draft-04"||r.target==="openapi-3.0";p?h?(e.minimum=d,e.exclusiveMinimum=!0):e.exclusiveMinimum=d:typeof i=="number"&&(e.minimum=i),g?h?(e.maximum=l,e.exclusiveMaximum=!0):e.exclusiveMaximum=l:typeof a=="number"&&(e.maximum=a),typeof u=="number"&&(e.multipleOf=u)},Ic=(t,r,n,o)=>{n.type="boolean"},zc=(t,r,n,o)=>{if(r.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Oc=(t,r,n,o)=>{if(r.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Ec=(t,r,n,o)=>{r.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},Pc=(t,r,n,o)=>{if(r.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Tc=(t,r,n,o)=>{if(r.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},jc=(t,r,n,o)=>{n.not={}},Ac=(t,r,n,o)=>{},Nc=(t,r,n,o)=>{},Cc=(t,r,n,o)=>{if(r.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Dc=(t,r,n,o)=>{let e=t._zod.def,i=Kt(e.entries);i.every(a=>typeof a=="number")&&(n.type="number"),i.every(a=>typeof a=="string")&&(n.type="string"),n.enum=i},Uc=(t,r,n,o)=>{let e=t._zod.def,i=[];for(let a of e.values)if(a===void 0){if(r.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(r.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){let a=i[0];n.type=a===null?"null":typeof a,r.target==="draft-04"||r.target==="openapi-3.0"?n.enum=[a]:n.const=a}else i.every(a=>typeof a=="number")&&(n.type="number"),i.every(a=>typeof a=="string")&&(n.type="string"),i.every(a=>typeof a=="boolean")&&(n.type="boolean"),i.every(a=>a===null)&&(n.type="null"),n.enum=i},Rc=(t,r,n,o)=>{if(r.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Zc=(t,r,n,o)=>{let e=n,i=t._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");e.type="string",e.pattern=i.source},Lc=(t,r,n,o)=>{let e=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:u}=t._zod.bag;a!==void 0&&(i.minLength=a),s!==void 0&&(i.maxLength=s),u?u.length===1?(i.contentMediaType=u[0],Object.assign(e,i)):(Object.assign(e,i),e.anyOf=u.map(l=>({contentMediaType:l}))):Object.assign(e,i)},Fc=(t,r,n,o)=>{n.type="boolean"},Mc=(t,r,n,o)=>{if(r.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Vc=(t,r,n,o)=>{if(r.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Bc=(t,r,n,o)=>{if(r.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Gc=(t,r,n,o)=>{if(r.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Wc=(t,r,n,o)=>{if(r.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Hc=(t,r,n,o)=>{let e=n,i=t._zod.def,{minimum:a,maximum:s}=t._zod.bag;typeof a=="number"&&(e.minItems=a),typeof s=="number"&&(e.maxItems=s),e.type="array",e.items=P(i.element,r,{...o,path:[...o.path,"items"]})},Jc=(t,r,n,o)=>{let e=n,i=t._zod.def;e.type="object",e.properties={};let a=i.shape;for(let l in a)e.properties[l]=P(a[l],r,{...o,path:[...o.path,"properties",l]});let s=new Set(Object.keys(a)),u=new Set([...s].filter(l=>{let d=i.shape[l]._zod;return r.io==="input"?d.optin===void 0:d.optout===void 0}));u.size>0&&(e.required=Array.from(u)),i.catchall?._zod.def.type==="never"?e.additionalProperties=!1:i.catchall?i.catchall&&(e.additionalProperties=P(i.catchall,r,{...o,path:[...o.path,"additionalProperties"]})):r.io==="output"&&(e.additionalProperties=!1)},qn=(t,r,n,o)=>{let e=t._zod.def,i=e.inclusive===!1,a=e.options.map((s,u)=>P(s,r,{...o,path:[...o.path,i?"oneOf":"anyOf",u]}));i?n.oneOf=a:n.anyOf=a},qc=(t,r,n,o)=>{let e=t._zod.def,i=P(e.left,r,{...o,path:[...o.path,"allOf",0]}),a=P(e.right,r,{...o,path:[...o.path,"allOf",1]}),s=l=>"allOf"in l&&Object.keys(l).length===1,u=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];n.allOf=u},Kc=(t,r,n,o)=>{let e=n,i=t._zod.def;e.type="array";let a=r.target==="draft-2020-12"?"prefixItems":"items",s=r.target==="draft-2020-12"||r.target==="openapi-3.0"?"items":"additionalItems",u=i.items.map((g,h)=>P(g,r,{...o,path:[...o.path,a,h]})),l=i.rest?P(i.rest,r,{...o,path:[...o.path,s,...r.target==="openapi-3.0"?[i.items.length]:[]]}):null;r.target==="draft-2020-12"?(e.prefixItems=u,l&&(e.items=l)):r.target==="openapi-3.0"?(e.items={anyOf:u},l&&e.items.anyOf.push(l),e.minItems=u.length,l||(e.maxItems=u.length)):(e.items=u,l&&(e.additionalItems=l));let{minimum:d,maximum:p}=t._zod.bag;typeof d=="number"&&(e.minItems=d),typeof p=="number"&&(e.maxItems=p)},Yc=(t,r,n,o)=>{let e=n,i=t._zod.def;e.type="object";let a=i.keyType,u=a._zod.bag?.patterns;if(i.mode==="loose"&&u&&u.size>0){let d=P(i.valueType,r,{...o,path:[...o.path,"patternProperties","*"]});e.patternProperties={};for(let p of u)e.patternProperties[p.source]=d}else(r.target==="draft-07"||r.target==="draft-2020-12")&&(e.propertyNames=P(i.keyType,r,{...o,path:[...o.path,"propertyNames"]})),e.additionalProperties=P(i.valueType,r,{...o,path:[...o.path,"additionalProperties"]});let l=a._zod.values;if(l){let d=[...l].filter(p=>typeof p=="string"||typeof p=="number");d.length>0&&(e.required=d)}},Xc=(t,r,n,o)=>{let e=t._zod.def,i=P(e.innerType,r,o),a=r.seen.get(t);r.target==="openapi-3.0"?(a.ref=e.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},Qc=(t,r,n,o)=>{let e=t._zod.def;P(e.innerType,r,o);let i=r.seen.get(t);i.ref=e.innerType},eu=(t,r,n,o)=>{let e=t._zod.def;P(e.innerType,r,o);let i=r.seen.get(t);i.ref=e.innerType,n.default=JSON.parse(JSON.stringify(e.defaultValue))},tu=(t,r,n,o)=>{let e=t._zod.def;P(e.innerType,r,o);let i=r.seen.get(t);i.ref=e.innerType,r.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(e.defaultValue)))},ru=(t,r,n,o)=>{let e=t._zod.def;P(e.innerType,r,o);let i=r.seen.get(t);i.ref=e.innerType;let a;try{a=e.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},nu=(t,r,n,o)=>{let e=t._zod.def,i=e.in._zod.traits.has("$ZodTransform"),a=r.io==="input"?i?e.out:e.in:e.out;P(a,r,o);let s=r.seen.get(t);s.ref=a},iu=(t,r,n,o)=>{let e=t._zod.def;P(e.innerType,r,o);let i=r.seen.get(t);i.ref=e.innerType,n.readOnly=!0},ou=(t,r,n,o)=>{let e=t._zod.def;P(e.innerType,r,o);let i=r.seen.get(t);i.ref=e.innerType},Kn=(t,r,n,o)=>{let e=t._zod.def;P(e.innerType,r,o);let i=r.seen.get(t);i.ref=e.innerType},au=(t,r,n,o)=>{let e=t._zod.innerType;P(e,r,o);let i=r.seen.get(t);i.ref=e},Jn={string:Sc,number:wc,boolean:Ic,bigint:zc,symbol:Oc,null:Ec,undefined:Pc,void:Tc,never:jc,any:Ac,unknown:Nc,date:Cc,enum:Dc,literal:Uc,nan:Rc,template_literal:Zc,file:Lc,success:Fc,custom:Mc,function:Vc,transform:Bc,map:Gc,set:Wc,array:Hc,object:Jc,union:qn,intersection:qc,tuple:Kc,record:Yc,nullable:Xc,nonoptional:Qc,default:eu,prefault:tu,catch:ru,pipe:nu,readonly:iu,promise:ou,optional:Kn,lazy:au};function Yn(t,r){if("_idmap"in t){let o=t,e=Ue({...r,processors:Jn}),i={};for(let u of o._idmap.entries()){let[l,d]=u;P(d,e)}let a={},s={registry:o,uri:r?.uri,defs:i};e.external=s;for(let u of o._idmap.entries()){let[l,d]=u;Re(e,d),a[l]=Ze(e,d)}if(Object.keys(i).length>0){let u=e.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[u]:i}}return{schemas:a}}let n=Ue({...r,processors:Jn});return P(t,n),Re(n,t),Ze(n,t)}var Xn=class{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(r){this.ctx.counter=r}get seen(){return this.ctx.seen}constructor(r){let n=r?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=Ue({processors:Jn,target:n,...r?.metadata&&{metadata:r.metadata},...r?.unrepresentable&&{unrepresentable:r.unrepresentable},...r?.override&&{override:r.override},...r?.io&&{io:r.io}})}process(r,n={path:[],schemaPath:[]}){return P(r,this.ctx,n)}emit(r,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),Re(this.ctx,r);let o=Ze(this.ctx,r),{"~standard":e,...i}=o;return i}};var rp={};var fr={};ke(fr,{ZodAny:()=>Pu,ZodArray:()=>Nu,ZodBase64:()=>yi,ZodBase64URL:()=>bi,ZodBigInt:()=>At,ZodBigIntFormat:()=>ki,ZodBoolean:()=>jt,ZodCIDRv4:()=>vi,ZodCIDRv6:()=>_i,ZodCUID:()=>li,ZodCUID2:()=>di,ZodCatch:()=>rl,ZodCodec:()=>Ir,ZodCustom:()=>zr,ZodCustomStringFormat:()=>Pt,ZodDate:()=>$r,ZodDefault:()=>Ku,ZodDiscriminatedUnion:()=>Du,ZodE164:()=>$i,ZodEmail:()=>si,ZodEmoji:()=>ci,ZodEnum:()=>Ot,ZodExactOptional:()=>Hu,ZodFile:()=>Gu,ZodFunction:()=>ml,ZodGUID:()=>hr,ZodIPv4:()=>gi,ZodIPv6:()=>hi,ZodIntersection:()=>Uu,ZodJWT:()=>xi,ZodKSUID:()=>fi,ZodLazy:()=>ul,ZodLiteral:()=>Bu,ZodMAC:()=>ku,ZodMap:()=>Mu,ZodNaN:()=>il,ZodNanoID:()=>ui,ZodNever:()=>ju,ZodNonOptional:()=>Ei,ZodNull:()=>Ou,ZodNullable:()=>qu,ZodNumber:()=>Tt,ZodNumberFormat:()=>Ye,ZodObject:()=>kr,ZodOptional:()=>Oi,ZodPipe:()=>wr,ZodPrefault:()=>Xu,ZodPreprocess:()=>ol,ZodPromise:()=>dl,ZodReadonly:()=>al,ZodRecord:()=>zt,ZodSet:()=>Vu,ZodString:()=>Et,ZodStringFormat:()=>j,ZodSuccess:()=>tl,ZodSymbol:()=>Iu,ZodTemplateLiteral:()=>cl,ZodTransform:()=>Wu,ZodTuple:()=>Zu,ZodType:()=>w,ZodULID:()=>mi,ZodURL:()=>br,ZodUUID:()=>ye,ZodUndefined:()=>zu,ZodUnion:()=>Sr,ZodUnknown:()=>Tu,ZodVoid:()=>Au,ZodXID:()=>pi,ZodXor:()=>Cu,_ZodString:()=>ai,_default:()=>Yu,_function:()=>mf,any:()=>Mp,array:()=>xr,base64:()=>wp,base64url:()=>Ip,bigint:()=>Up,boolean:()=>wu,catch:()=>nl,check:()=>pf,cidrv4:()=>kp,cidrv6:()=>Sp,codec:()=>cf,cuid:()=>gp,cuid2:()=>hp,custom:()=>ff,date:()=>Bp,describe:()=>gf,discriminatedUnion:()=>Kp,e164:()=>zp,email:()=>op,emoji:()=>pp,enum:()=>Ii,exactOptional:()=>Ju,file:()=>nf,float32:()=>Ap,float64:()=>Np,function:()=>mf,guid:()=>ap,hash:()=>jp,hex:()=>Tp,hostname:()=>Pp,httpUrl:()=>mp,instanceof:()=>vf,int:()=>ii,int32:()=>Cp,int64:()=>Rp,intersection:()=>Ru,invertCodec:()=>uf,ipv4:()=>bp,ipv6:()=>xp,json:()=>yf,jwt:()=>Op,keyof:()=>Gp,ksuid:()=>yp,lazy:()=>ll,literal:()=>rf,looseObject:()=>Jp,looseRecord:()=>Xp,mac:()=>$p,map:()=>Qp,meta:()=>hf,nan:()=>sf,nanoid:()=>fp,nativeEnum:()=>tf,never:()=>Si,nonoptional:()=>el,null:()=>Eu,nullable:()=>_r,nullish:()=>of,number:()=>Su,object:()=>Wp,optional:()=>vr,partialRecord:()=>Yp,pipe:()=>oi,prefault:()=>Qu,preprocess:()=>bf,promise:()=>df,readonly:()=>sl,record:()=>Fu,refine:()=>pl,set:()=>ef,strictObject:()=>Hp,string:()=>gr,stringFormat:()=>Ep,stringbool:()=>_f,success:()=>af,superRefine:()=>fl,symbol:()=>Lp,templateLiteral:()=>lf,transform:()=>zi,tuple:()=>Lu,uint32:()=>Dp,uint64:()=>Zp,ulid:()=>vp,undefined:()=>Fp,union:()=>wi,unknown:()=>Ke,url:()=>dp,uuid:()=>sp,uuidv4:()=>cp,uuidv6:()=>up,uuidv7:()=>lp,void:()=>Vp,xid:()=>_p,xor:()=>qp});var Qn={};ke(Qn,{endsWith:()=>vt,gt:()=>ve,gte:()=>J,includes:()=>gt,length:()=>qe,lowercase:()=>pt,lt:()=>he,lte:()=>te,maxLength:()=>Je,maxSize:()=>De,mime:()=>_t,minLength:()=>Ie,minSize:()=>_e,multipleOf:()=>Ce,negative:()=>Bn,nonnegative:()=>Wn,nonpositive:()=>Gn,normalize:()=>yt,overwrite:()=>le,positive:()=>Vn,property:()=>Hn,regex:()=>mt,size:()=>He,slugify:()=>kt,startsWith:()=>ht,toLowerCase:()=>$t,toUpperCase:()=>xt,trim:()=>bt,uppercase:()=>ft});var It={};ke(It,{ZodISODate:()=>ti,ZodISODateTime:()=>ei,ZodISODuration:()=>ni,ZodISOTime:()=>ri,date:()=>cu,datetime:()=>su,duration:()=>lu,time:()=>uu});var ei=m("ZodISODateTime",(t,r)=>{Ra.init(t,r),j.init(t,r)});function su(t){return Ms(ei,t)}var ti=m("ZodISODate",(t,r)=>{Za.init(t,r),j.init(t,r)});function cu(t){return Vs(ti,t)}var ri=m("ZodISOTime",(t,r)=>{La.init(t,r),j.init(t,r)});function uu(t){return Bs(ri,t)}var ni=m("ZodISODuration",(t,r)=>{Fa.init(t,r),j.init(t,r)});function lu(t){return Gs(ni,t)}var np=(t,r)=>{tr.init(t,r),t.name="ZodError",Object.defineProperties(t,{format:{value:n=>nr(t,n)},flatten:{value:n=>rr(t,n)},addIssue:{value:n=>{t.issues.push(n),t.message=JSON.stringify(t.issues,nt,2)}},addIssues:{value:n=>{t.issues.push(...n),t.message=JSON.stringify(t.issues,nt,2)}},isEmpty:{get(){return t.issues.length===0}}})},jy=m("ZodError",np),Q=m("ZodError",np,{Parent:Error});var du=at(Q),mu=st(Q),pu=ct(Q),fu=ut(Q),gu=Kr(Q),hu=Yr(Q),vu=Xr(Q),_u=Qr(Q),yu=en(Q),bu=tn(Q),$u=rn(Q),xu=nn(Q);var ip=new WeakMap;function yr(t,r,n){let o=Object.getPrototypeOf(t),e=ip.get(o);if(e||(e=new Set,ip.set(o,e)),!e.has(r)){e.add(r);for(let i in n){let a=n[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){let s=a.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s}),s},set(s){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s})}})}}}var w=m("ZodType",(t,r)=>(S.init(t,r),Object.assign(t["~standard"],{jsonSchema:{input:wt(t,"input"),output:wt(t,"output")}}),t.toJSONSchema=kc(t,{}),t.def=r,t.type=r.type,Object.defineProperty(t,"_def",{value:r}),t.parse=(n,o)=>du(t,n,o,{callee:t.parse}),t.safeParse=(n,o)=>pu(t,n,o),t.parseAsync=async(n,o)=>mu(t,n,o,{callee:t.parseAsync}),t.safeParseAsync=async(n,o)=>fu(t,n,o),t.spa=t.safeParseAsync,t.encode=(n,o)=>gu(t,n,o),t.decode=(n,o)=>hu(t,n,o),t.encodeAsync=async(n,o)=>vu(t,n,o),t.decodeAsync=async(n,o)=>_u(t,n,o),t.safeEncode=(n,o)=>yu(t,n,o),t.safeDecode=(n,o)=>bu(t,n,o),t.safeEncodeAsync=async(n,o)=>$u(t,n,o),t.safeDecodeAsync=async(n,o)=>xu(t,n,o),yr(t,"ZodType",{check(...n){let o=this.def;return this.clone(y.mergeDefs(o,{checks:[...o.checks??[],...n.map(e=>typeof e=="function"?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,o){return W(this,n,o)},brand(){return this},register(n,o){return n.add(this,o),this},refine(n,o){return this.check(pl(n,o))},superRefine(n,o){return this.check(fl(n,o))},overwrite(n){return this.check(le(n))},optional(){return vr(this)},exactOptional(){return Ju(this)},nullable(){return _r(this)},nullish(){return vr(_r(this))},nonoptional(n){return el(this,n)},array(){return xr(this)},or(n){return wi([this,n])},and(n){return Ru(this,n)},transform(n){return oi(this,zi(n))},default(n){return Yu(this,n)},prefault(n){return Qu(this,n)},catch(n){return nl(this,n)},pipe(n){return oi(this,n)},readonly(){return sl(this)},describe(n){let o=this.clone();return V.add(o,{description:n}),o},meta(...n){if(n.length===0)return V.get(this);let o=this.clone();return V.add(o,n[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(t,"description",{get(){return V.get(t)?.description},configurable:!0}),t)),ai=m("_ZodString",(t,r)=>{We.init(t,r),w.init(t,r),t._zod.processJSONSchema=(o,e,i)=>Sc(t,o,e,i);let n=t._zod.bag;t.format=n.format??null,t.minLength=n.minimum??null,t.maxLength=n.maximum??null,yr(t,"_ZodString",{regex(...o){return this.check(mt(...o))},includes(...o){return this.check(gt(...o))},startsWith(...o){return this.check(ht(...o))},endsWith(...o){return this.check(vt(...o))},min(...o){return this.check(Ie(...o))},max(...o){return this.check(Je(...o))},length(...o){return this.check(qe(...o))},nonempty(...o){return this.check(Ie(1,...o))},lowercase(o){return this.check(pt(o))},uppercase(o){return this.check(ft(o))},trim(){return this.check(bt())},normalize(...o){return this.check(yt(...o))},toLowerCase(){return this.check($t())},toUpperCase(){return this.check(xt())},slugify(){return this.check(kt())}})}),Et=m("ZodString",(t,r)=>{We.init(t,r),ai.init(t,r),t.email=n=>t.check(kn(si,n)),t.url=n=>t.check(pr(br,n)),t.jwt=n=>t.check(Mn(xi,n)),t.emoji=n=>t.check(On(ci,n)),t.guid=n=>t.check(mr(hr,n)),t.uuid=n=>t.check(Sn(ye,n)),t.uuidv4=n=>t.check(wn(ye,n)),t.uuidv6=n=>t.check(In(ye,n)),t.uuidv7=n=>t.check(zn(ye,n)),t.nanoid=n=>t.check(En(ui,n)),t.guid=n=>t.check(mr(hr,n)),t.cuid=n=>t.check(Pn(li,n)),t.cuid2=n=>t.check(Tn(di,n)),t.ulid=n=>t.check(jn(mi,n)),t.base64=n=>t.check(Zn(yi,n)),t.base64url=n=>t.check(Ln(bi,n)),t.xid=n=>t.check(An(pi,n)),t.ksuid=n=>t.check(Nn(fi,n)),t.ipv4=n=>t.check(Cn(gi,n)),t.ipv6=n=>t.check(Dn(hi,n)),t.cidrv4=n=>t.check(Un(vi,n)),t.cidrv6=n=>t.check(Rn(_i,n)),t.e164=n=>t.check(Fn($i,n)),t.datetime=n=>t.check(su(n)),t.date=n=>t.check(cu(n)),t.time=n=>t.check(uu(n)),t.duration=n=>t.check(lu(n))});function gr(t){return Rs(Et,t)}var j=m("ZodStringFormat",(t,r)=>{T.init(t,r),ai.init(t,r)}),si=m("ZodEmail",(t,r)=>{Ea.init(t,r),j.init(t,r)});function op(t){return kn(si,t)}var hr=m("ZodGUID",(t,r)=>{za.init(t,r),j.init(t,r)});function ap(t){return mr(hr,t)}var ye=m("ZodUUID",(t,r)=>{Oa.init(t,r),j.init(t,r)});function sp(t){return Sn(ye,t)}function cp(t){return wn(ye,t)}function up(t){return In(ye,t)}function lp(t){return zn(ye,t)}var br=m("ZodURL",(t,r)=>{Pa.init(t,r),j.init(t,r)});function dp(t){return pr(br,t)}function mp(t){return pr(br,{protocol:ee.httpProtocol,hostname:ee.domain,...y.normalizeParams(t)})}var ci=m("ZodEmoji",(t,r)=>{Ta.init(t,r),j.init(t,r)});function pp(t){return On(ci,t)}var ui=m("ZodNanoID",(t,r)=>{ja.init(t,r),j.init(t,r)});function fp(t){return En(ui,t)}var li=m("ZodCUID",(t,r)=>{Aa.init(t,r),j.init(t,r)});function gp(t){return Pn(li,t)}var di=m("ZodCUID2",(t,r)=>{Na.init(t,r),j.init(t,r)});function hp(t){return Tn(di,t)}var mi=m("ZodULID",(t,r)=>{Ca.init(t,r),j.init(t,r)});function vp(t){return jn(mi,t)}var pi=m("ZodXID",(t,r)=>{Da.init(t,r),j.init(t,r)});function _p(t){return An(pi,t)}var fi=m("ZodKSUID",(t,r)=>{Ua.init(t,r),j.init(t,r)});function yp(t){return Nn(fi,t)}var gi=m("ZodIPv4",(t,r)=>{Ma.init(t,r),j.init(t,r)});function bp(t){return Cn(gi,t)}var ku=m("ZodMAC",(t,r)=>{Ba.init(t,r),j.init(t,r)});function $p(t){return Ls(ku,t)}var hi=m("ZodIPv6",(t,r)=>{Va.init(t,r),j.init(t,r)});function xp(t){return Dn(hi,t)}var vi=m("ZodCIDRv4",(t,r)=>{Ga.init(t,r),j.init(t,r)});function kp(t){return Un(vi,t)}var _i=m("ZodCIDRv6",(t,r)=>{Wa.init(t,r),j.init(t,r)});function Sp(t){return Rn(_i,t)}var yi=m("ZodBase64",(t,r)=>{Ja.init(t,r),j.init(t,r)});function wp(t){return Zn(yi,t)}var bi=m("ZodBase64URL",(t,r)=>{qa.init(t,r),j.init(t,r)});function Ip(t){return Ln(bi,t)}var $i=m("ZodE164",(t,r)=>{Ka.init(t,r),j.init(t,r)});function zp(t){return Fn($i,t)}var xi=m("ZodJWT",(t,r)=>{Ya.init(t,r),j.init(t,r)});function Op(t){return Mn(xi,t)}var Pt=m("ZodCustomStringFormat",(t,r)=>{Xa.init(t,r),j.init(t,r)});function Ep(t,r,n={}){return St(Pt,t,r,n)}function Pp(t){return St(Pt,"hostname",ee.hostname,t)}function Tp(t){return St(Pt,"hex",ee.hex,t)}function jp(t,r){let n=r?.enc??"hex",o=`${t}_${n}`,e=ee[o];if(!e)throw new Error(`Unrecognized hash format: ${o}`);return St(Pt,o,e,r)}var Tt=m("ZodNumber",(t,r)=>{pn.init(t,r),w.init(t,r),t._zod.processJSONSchema=(o,e,i)=>wc(t,o,e,i),yr(t,"ZodNumber",{gt(o,e){return this.check(ve(o,e))},gte(o,e){return this.check(J(o,e))},min(o,e){return this.check(J(o,e))},lt(o,e){return this.check(he(o,e))},lte(o,e){return this.check(te(o,e))},max(o,e){return this.check(te(o,e))},int(o){return this.check(ii(o))},safe(o){return this.check(ii(o))},positive(o){return this.check(ve(0,o))},nonnegative(o){return this.check(J(0,o))},negative(o){return this.check(he(0,o))},nonpositive(o){return this.check(te(0,o))},multipleOf(o,e){return this.check(Ce(o,e))},step(o,e){return this.check(Ce(o,e))},finite(){return this}});let n=t._zod.bag;t.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),t.isFinite=!0,t.format=n.format??null});function Su(t){return Ws(Tt,t)}var Ye=m("ZodNumberFormat",(t,r)=>{Qa.init(t,r),Tt.init(t,r)});function ii(t){return Js(Ye,t)}function Ap(t){return qs(Ye,t)}function Np(t){return Ks(Ye,t)}function Cp(t){return Ys(Ye,t)}function Dp(t){return Xs(Ye,t)}var jt=m("ZodBoolean",(t,r)=>{sr.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>Ic(t,n,o,e)});function wu(t){return Qs(jt,t)}var At=m("ZodBigInt",(t,r)=>{fn.init(t,r),w.init(t,r),t._zod.processJSONSchema=(o,e,i)=>zc(t,o,e,i),t.gte=(o,e)=>t.check(J(o,e)),t.min=(o,e)=>t.check(J(o,e)),t.gt=(o,e)=>t.check(ve(o,e)),t.gte=(o,e)=>t.check(J(o,e)),t.min=(o,e)=>t.check(J(o,e)),t.lt=(o,e)=>t.check(he(o,e)),t.lte=(o,e)=>t.check(te(o,e)),t.max=(o,e)=>t.check(te(o,e)),t.positive=o=>t.check(ve(BigInt(0),o)),t.negative=o=>t.check(he(BigInt(0),o)),t.nonpositive=o=>t.check(te(BigInt(0),o)),t.nonnegative=o=>t.check(J(BigInt(0),o)),t.multipleOf=(o,e)=>t.check(Ce(o,e));let n=t._zod.bag;t.minValue=n.minimum??null,t.maxValue=n.maximum??null,t.format=n.format??null});function Up(t){return tc(At,t)}var ki=m("ZodBigIntFormat",(t,r)=>{es.init(t,r),At.init(t,r)});function Rp(t){return nc(ki,t)}function Zp(t){return ic(ki,t)}var Iu=m("ZodSymbol",(t,r)=>{ts.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>Oc(t,n,o,e)});function Lp(t){return oc(Iu,t)}var zu=m("ZodUndefined",(t,r)=>{rs.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>Pc(t,n,o,e)});function Fp(t){return ac(zu,t)}var Ou=m("ZodNull",(t,r)=>{ns.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>Ec(t,n,o,e)});function Eu(t){return sc(Ou,t)}var Pu=m("ZodAny",(t,r)=>{is.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>Ac(t,n,o,e)});function Mp(){return cc(Pu)}var Tu=m("ZodUnknown",(t,r)=>{os.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>Nc(t,n,o,e)});function Ke(){return uc(Tu)}var ju=m("ZodNever",(t,r)=>{as.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>jc(t,n,o,e)});function Si(t){return lc(ju,t)}var Au=m("ZodVoid",(t,r)=>{ss.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>Tc(t,n,o,e)});function Vp(t){return dc(Au,t)}var $r=m("ZodDate",(t,r)=>{cs.init(t,r),w.init(t,r),t._zod.processJSONSchema=(o,e,i)=>Cc(t,o,e,i),t.min=(o,e)=>t.check(J(o,e)),t.max=(o,e)=>t.check(te(o,e));let n=t._zod.bag;t.minDate=n.minimum?new Date(n.minimum):null,t.maxDate=n.maximum?new Date(n.maximum):null});function Bp(t){return mc($r,t)}var Nu=m("ZodArray",(t,r)=>{us.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>Hc(t,n,o,e),t.element=r.element,yr(t,"ZodArray",{min(n,o){return this.check(Ie(n,o))},nonempty(n){return this.check(Ie(1,n))},max(n,o){return this.check(Je(n,o))},length(n,o){return this.check(qe(n,o))},unwrap(){return this.element}})});function xr(t,r){return gc(Nu,t,r)}function Gp(t){let r=t._zod.def.shape;return Ii(Object.keys(r))}var kr=m("ZodObject",(t,r)=>{ls.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>Jc(t,n,o,e),y.defineLazy(t,"shape",()=>r.shape),yr(t,"ZodObject",{keyof(){return Ii(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:Ke()})},loose(){return this.clone({...this._zod.def,catchall:Ke()})},strict(){return this.clone({...this._zod.def,catchall:Si()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return y.extend(this,n)},safeExtend(n){return y.safeExtend(this,n)},merge(n){return y.merge(this,n)},pick(n){return y.pick(this,n)},omit(n){return y.omit(this,n)},partial(...n){return y.partial(Oi,this,n[0])},required(...n){return y.required(Ei,this,n[0])}})});function Wp(t,r){let n={type:"object",shape:t??{},...y.normalizeParams(r)};return new kr(n)}function Hp(t,r){return new kr({type:"object",shape:t,catchall:Si(),...y.normalizeParams(r)})}function Jp(t,r){return new kr({type:"object",shape:t,catchall:Ke(),...y.normalizeParams(r)})}var Sr=m("ZodUnion",(t,r)=>{cr.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>qn(t,n,o,e),t.options=r.options});function wi(t,r){return new Sr({type:"union",options:t,...y.normalizeParams(r)})}var Cu=m("ZodXor",(t,r)=>{Sr.init(t,r),ds.init(t,r),t._zod.processJSONSchema=(n,o,e)=>qn(t,n,o,e),t.options=r.options});function qp(t,r){return new Cu({type:"union",options:t,inclusive:!1,...y.normalizeParams(r)})}var Du=m("ZodDiscriminatedUnion",(t,r)=>{Sr.init(t,r),ms.init(t,r)});function Kp(t,r,n){return new Du({type:"union",options:r,discriminator:t,...y.normalizeParams(n)})}var Uu=m("ZodIntersection",(t,r)=>{ps.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>qc(t,n,o,e)});function Ru(t,r){return new Uu({type:"intersection",left:t,right:r})}var Zu=m("ZodTuple",(t,r)=>{gn.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>Kc(t,n,o,e),t.rest=n=>t.clone({...t._zod.def,rest:n})});function Lu(t,r,n){let o=r instanceof S,e=o?n:r,i=o?r:null;return new Zu({type:"tuple",items:t,rest:i,...y.normalizeParams(e)})}var zt=m("ZodRecord",(t,r)=>{fs.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>Yc(t,n,o,e),t.keyType=r.keyType,t.valueType=r.valueType});function Fu(t,r,n){return!r||!r._zod?new zt({type:"record",keyType:gr(),valueType:t,...y.normalizeParams(r)}):new zt({type:"record",keyType:t,valueType:r,...y.normalizeParams(n)})}function Yp(t,r,n){let o=W(t);return o._zod.values=void 0,new zt({type:"record",keyType:o,valueType:r,...y.normalizeParams(n)})}function Xp(t,r,n){return new zt({type:"record",keyType:t,valueType:r,mode:"loose",...y.normalizeParams(n)})}var Mu=m("ZodMap",(t,r)=>{gs.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>Gc(t,n,o,e),t.keyType=r.keyType,t.valueType=r.valueType,t.min=(...n)=>t.check(_e(...n)),t.nonempty=n=>t.check(_e(1,n)),t.max=(...n)=>t.check(De(...n)),t.size=(...n)=>t.check(He(...n))});function Qp(t,r,n){return new Mu({type:"map",keyType:t,valueType:r,...y.normalizeParams(n)})}var Vu=m("ZodSet",(t,r)=>{hs.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>Wc(t,n,o,e),t.min=(...n)=>t.check(_e(...n)),t.nonempty=n=>t.check(_e(1,n)),t.max=(...n)=>t.check(De(...n)),t.size=(...n)=>t.check(He(...n))});function ef(t,r){return new Vu({type:"set",valueType:t,...y.normalizeParams(r)})}var Ot=m("ZodEnum",(t,r)=>{vs.init(t,r),w.init(t,r),t._zod.processJSONSchema=(o,e,i)=>Dc(t,o,e,i),t.enum=r.entries,t.options=Object.values(r.entries);let n=new Set(Object.keys(r.entries));t.extract=(o,e)=>{let i={};for(let a of o)if(n.has(a))i[a]=r.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Ot({...r,checks:[],...y.normalizeParams(e),entries:i})},t.exclude=(o,e)=>{let i={...r.entries};for(let a of o)if(n.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new Ot({...r,checks:[],...y.normalizeParams(e),entries:i})}});function Ii(t,r){let n=Array.isArray(t)?Object.fromEntries(t.map(o=>[o,o])):t;return new Ot({type:"enum",entries:n,...y.normalizeParams(r)})}function tf(t,r){return new Ot({type:"enum",entries:t,...y.normalizeParams(r)})}var Bu=m("ZodLiteral",(t,r)=>{_s.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>Uc(t,n,o,e),t.values=new Set(r.values),Object.defineProperty(t,"value",{get(){if(r.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return r.values[0]}})});function rf(t,r){return new Bu({type:"literal",values:Array.isArray(t)?t:[t],...y.normalizeParams(r)})}var Gu=m("ZodFile",(t,r)=>{ys.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>Lc(t,n,o,e),t.min=(n,o)=>t.check(_e(n,o)),t.max=(n,o)=>t.check(De(n,o)),t.mime=(n,o)=>t.check(_t(Array.isArray(n)?n:[n],o))});function nf(t){return hc(Gu,t)}var Wu=m("ZodTransform",(t,r)=>{bs.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>Bc(t,n,o,e),t._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Pe(t.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(y.issue(i,n.value,r));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=t),n.issues.push(y.issue(a))}};let e=r.transform(n.value,n);return e instanceof Promise?e.then(i=>(n.value=i,n.fallback=!0,n)):(n.value=e,n.fallback=!0,n)}});function zi(t){return new Wu({type:"transform",transform:t})}var Oi=m("ZodOptional",(t,r)=>{hn.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>Kn(t,n,o,e),t.unwrap=()=>t._zod.def.innerType});function vr(t){return new Oi({type:"optional",innerType:t})}var Hu=m("ZodExactOptional",(t,r)=>{$s.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>Kn(t,n,o,e),t.unwrap=()=>t._zod.def.innerType});function Ju(t){return new Hu({type:"optional",innerType:t})}var qu=m("ZodNullable",(t,r)=>{xs.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>Xc(t,n,o,e),t.unwrap=()=>t._zod.def.innerType});function _r(t){return new qu({type:"nullable",innerType:t})}function of(t){return vr(_r(t))}var Ku=m("ZodDefault",(t,r)=>{ks.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>eu(t,n,o,e),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function Yu(t,r){return new Ku({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():y.shallowClone(r)}})}var Xu=m("ZodPrefault",(t,r)=>{Ss.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>tu(t,n,o,e),t.unwrap=()=>t._zod.def.innerType});function Qu(t,r){return new Xu({type:"prefault",innerType:t,get defaultValue(){return typeof r=="function"?r():y.shallowClone(r)}})}var Ei=m("ZodNonOptional",(t,r)=>{ws.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>Qc(t,n,o,e),t.unwrap=()=>t._zod.def.innerType});function el(t,r){return new Ei({type:"nonoptional",innerType:t,...y.normalizeParams(r)})}var tl=m("ZodSuccess",(t,r)=>{Is.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>Fc(t,n,o,e),t.unwrap=()=>t._zod.def.innerType});function af(t){return new tl({type:"success",innerType:t})}var rl=m("ZodCatch",(t,r)=>{zs.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>ru(t,n,o,e),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function nl(t,r){return new rl({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}var il=m("ZodNaN",(t,r)=>{Os.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>Rc(t,n,o,e)});function sf(t){return fc(il,t)}var wr=m("ZodPipe",(t,r)=>{vn.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>nu(t,n,o,e),t.in=r.in,t.out=r.out});function oi(t,r){return new wr({type:"pipe",in:t,out:r})}var Ir=m("ZodCodec",(t,r)=>{wr.init(t,r),ur.init(t,r)});function cf(t,r,n){return new Ir({type:"pipe",in:t,out:r,transform:n.decode,reverseTransform:n.encode})}function uf(t){let r=t._zod.def;return new Ir({type:"pipe",in:r.out,out:r.in,transform:r.reverseTransform,reverseTransform:r.transform})}var ol=m("ZodPreprocess",(t,r)=>{wr.init(t,r),Es.init(t,r)}),al=m("ZodReadonly",(t,r)=>{Ps.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>iu(t,n,o,e),t.unwrap=()=>t._zod.def.innerType});function sl(t){return new al({type:"readonly",innerType:t})}var cl=m("ZodTemplateLiteral",(t,r)=>{Ts.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>Zc(t,n,o,e)});function lf(t,r){return new cl({type:"template_literal",parts:t,...y.normalizeParams(r)})}var ul=m("ZodLazy",(t,r)=>{Ns.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>au(t,n,o,e),t.unwrap=()=>t._zod.def.getter()});function ll(t){return new ul({type:"lazy",getter:t})}var dl=m("ZodPromise",(t,r)=>{As.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>ou(t,n,o,e),t.unwrap=()=>t._zod.def.innerType});function df(t){return new dl({type:"promise",innerType:t})}var ml=m("ZodFunction",(t,r)=>{js.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>Vc(t,n,o,e)});function mf(t){return new ml({type:"function",input:Array.isArray(t?.input)?Lu(t?.input):t?.input??xr(Ke()),output:t?.output??Ke()})}var zr=m("ZodCustom",(t,r)=>{Cs.init(t,r),w.init(t,r),t._zod.processJSONSchema=(n,o,e)=>Mc(t,n,o,e)});function pf(t){let r=new A({check:"custom"});return r._zod.check=t,r}function ff(t,r){return vc(zr,t??(()=>!0),r)}function pl(t,r={}){return _c(zr,t,r)}function fl(t,r){return yc(t,r)}var gf=bc,hf=$c;function vf(t,r={}){let n=new zr({type:"custom",check:"custom",fn:o=>o instanceof t,abort:!0,...y.normalizeParams(r)});return n._zod.bag.Class=t,n._zod.check=o=>{o.value instanceof t||o.issues.push({code:"invalid_type",expected:t.name,input:o.value,inst:n,path:[...n._zod.def.path??[]]})},n}var _f=(...t)=>xc({Codec:Ir,Boolean:jt,String:Et},...t);function yf(t){let r=ll(()=>wi([gr(t),Su(),wu(),Eu(),xr(r),Fu(gr(),r)]));return r}function bf(t,r){return new ol({type:"pipe",in:zi(t),out:r})}var Ny={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 Cy(t){Z({customError:t})}function Dy(){return Z().customError}var gl;gl||(gl={});var $={...fr,...Qn,iso:It},Uy=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 Ry(t,r){let n=t.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":r??"draft-2020-12"}function Zy(t,r){if(!t.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=t.slice(1).split("/").filter(Boolean);if(n.length===0)return r.rootSchema;let o=r.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===o){let e=n[1];if(!e||!r.defs[e])throw new Error(`Reference not found: ${t}`);return r.defs[e]}throw new Error(`Reference not found: ${t}`)}function $f(t,r){if(t.not!==void 0){if(typeof t.not=="object"&&Object.keys(t.not).length===0)return $.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(t.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(t.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(t.if!==void 0||t.then!==void 0||t.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(t.dependentSchemas!==void 0||t.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(t.$ref){let e=t.$ref;if(r.refs.has(e))return r.refs.get(e);if(r.processing.has(e))return $.lazy(()=>{if(!r.refs.has(e))throw new Error(`Circular reference not resolved: ${e}`);return r.refs.get(e)});r.processing.add(e);let i=Zy(e,r),a=B(i,r);return r.refs.set(e,a),r.processing.delete(e),a}if(t.enum!==void 0){let e=t.enum;if(r.version==="openapi-3.0"&&t.nullable===!0&&e.length===1&&e[0]===null)return $.null();if(e.length===0)return $.never();if(e.length===1)return $.literal(e[0]);if(e.every(a=>typeof a=="string"))return $.enum(e);let i=e.map(a=>$.literal(a));return i.length<2?i[0]:$.union([i[0],i[1],...i.slice(2)])}if(t.const!==void 0)return $.literal(t.const);let n=t.type;if(Array.isArray(n)){let e=n.map(i=>{let a={...t,type:i};return $f(a,r)});return e.length===0?$.never():e.length===1?e[0]:$.union(e)}if(!n)return $.any();let o;switch(n){case"string":{let e=$.string();if(t.format){let i=t.format;i==="email"?e=e.check($.email()):i==="uri"||i==="uri-reference"?e=e.check($.url()):i==="uuid"||i==="guid"?e=e.check($.uuid()):i==="date-time"?e=e.check($.iso.datetime()):i==="date"?e=e.check($.iso.date()):i==="time"?e=e.check($.iso.time()):i==="duration"?e=e.check($.iso.duration()):i==="ipv4"?e=e.check($.ipv4()):i==="ipv6"?e=e.check($.ipv6()):i==="mac"?e=e.check($.mac()):i==="cidr"?e=e.check($.cidrv4()):i==="cidr-v6"?e=e.check($.cidrv6()):i==="base64"?e=e.check($.base64()):i==="base64url"?e=e.check($.base64url()):i==="e164"?e=e.check($.e164()):i==="jwt"?e=e.check($.jwt()):i==="emoji"?e=e.check($.emoji()):i==="nanoid"?e=e.check($.nanoid()):i==="cuid"?e=e.check($.cuid()):i==="cuid2"?e=e.check($.cuid2()):i==="ulid"?e=e.check($.ulid()):i==="xid"?e=e.check($.xid()):i==="ksuid"&&(e=e.check($.ksuid()))}typeof t.minLength=="number"&&(e=e.min(t.minLength)),typeof t.maxLength=="number"&&(e=e.max(t.maxLength)),t.pattern&&(e=e.regex(new RegExp(t.pattern))),o=e;break}case"number":case"integer":{let e=n==="integer"?$.number().int():$.number();typeof t.minimum=="number"&&(e=e.min(t.minimum)),typeof t.maximum=="number"&&(e=e.max(t.maximum)),typeof t.exclusiveMinimum=="number"?e=e.gt(t.exclusiveMinimum):t.exclusiveMinimum===!0&&typeof t.minimum=="number"&&(e=e.gt(t.minimum)),typeof t.exclusiveMaximum=="number"?e=e.lt(t.exclusiveMaximum):t.exclusiveMaximum===!0&&typeof t.maximum=="number"&&(e=e.lt(t.maximum)),typeof t.multipleOf=="number"&&(e=e.multipleOf(t.multipleOf)),o=e;break}case"boolean":{o=$.boolean();break}case"null":{o=$.null();break}case"object":{let e={},i=t.properties||{},a=new Set(t.required||[]);for(let[u,l]of Object.entries(i)){let d=B(l,r);e[u]=a.has(u)?d:d.optional()}if(t.propertyNames){let u=B(t.propertyNames,r),l=t.additionalProperties&&typeof t.additionalProperties=="object"?B(t.additionalProperties,r):$.any();if(Object.keys(e).length===0){o=$.record(u,l);break}let d=$.object(e).passthrough(),p=$.looseRecord(u,l);o=$.intersection(d,p);break}if(t.patternProperties){let u=t.patternProperties,l=Object.keys(u),d=[];for(let g of l){let h=B(u[g],r),x=$.string().regex(new RegExp(g));d.push($.looseRecord(x,h))}let p=[];if(Object.keys(e).length>0&&p.push($.object(e).passthrough()),p.push(...d),p.length===0)o=$.object({}).passthrough();else if(p.length===1)o=p[0];else{let g=$.intersection(p[0],p[1]);for(let h=2;h<p.length;h++)g=$.intersection(g,p[h]);o=g}break}let s=$.object(e);t.additionalProperties===!1?o=s.strict():typeof t.additionalProperties=="object"?o=s.catchall(B(t.additionalProperties,r)):o=s.passthrough();break}case"array":{let e=t.prefixItems,i=t.items;if(e&&Array.isArray(e)){let a=e.map(u=>B(u,r)),s=i&&typeof i=="object"&&!Array.isArray(i)?B(i,r):void 0;s?o=$.tuple(a).rest(s):o=$.tuple(a),typeof t.minItems=="number"&&(o=o.check($.minLength(t.minItems))),typeof t.maxItems=="number"&&(o=o.check($.maxLength(t.maxItems)))}else if(Array.isArray(i)){let a=i.map(u=>B(u,r)),s=t.additionalItems&&typeof t.additionalItems=="object"?B(t.additionalItems,r):void 0;s?o=$.tuple(a).rest(s):o=$.tuple(a),typeof t.minItems=="number"&&(o=o.check($.minLength(t.minItems))),typeof t.maxItems=="number"&&(o=o.check($.maxLength(t.maxItems)))}else if(i!==void 0){let a=B(i,r),s=$.array(a);typeof t.minItems=="number"&&(s=s.min(t.minItems)),typeof t.maxItems=="number"&&(s=s.max(t.maxItems)),o=s}else o=$.array($.any());break}default:throw new Error(`Unsupported type: ${n}`)}return o}function B(t,r){if(typeof t=="boolean")return t?$.any():$.never();let n=$f(t,r),o=t.type||t.enum!==void 0||t.const!==void 0;if(t.anyOf&&Array.isArray(t.anyOf)){let s=t.anyOf.map(l=>B(l,r)),u=$.union(s);n=o?$.intersection(n,u):u}if(t.oneOf&&Array.isArray(t.oneOf)){let s=t.oneOf.map(l=>B(l,r)),u=$.xor(s);n=o?$.intersection(n,u):u}if(t.allOf&&Array.isArray(t.allOf))if(t.allOf.length===0)n=o?n:$.any();else{let s=o?n:B(t.allOf[0],r),u=o?0:1;for(let l=u;l<t.allOf.length;l++)s=$.intersection(s,B(t.allOf[l],r));n=s}t.nullable===!0&&r.version==="openapi-3.0"&&(n=$.nullable(n)),t.readOnly===!0&&(n=$.readonly(n)),t.default!==void 0&&(n=n.default(t.default));let e={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of i)s in t&&(e[s]=t[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in t&&(e[s]=t[s]);for(let s of Object.keys(t))Uy.has(s)||(e[s]=t[s]);return Object.keys(e).length>0&&r.registry.add(n,e),t.description&&(n=n.describe(t.description)),n}function xf(t,r){if(typeof t=="boolean")return t?$.any():$.never();let n;try{n=JSON.parse(JSON.stringify(t))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let o=Ry(n,r?.defaultTarget),e=n.$defs||n.definitions||{},i={version:o,defs:e,refs:new Map,processing:new Set,rootSchema:n,registry:r?.registry??V};return B(n,i)}var hl={};ke(hl,{bigint:()=>Vy,boolean:()=>My,date:()=>By,number:()=>Fy,string:()=>Ly});function Ly(t){return Zs(Et,t)}function Fy(t){return Hs(Tt,t)}function My(t){return ec(jt,t)}function Vy(t){return rc(At,t)}function By(t){return pc($r,t)}Z(_n());var Gy=c.string().min(1),Wy=c.object({type:c.literal("named"),name:c.enum(["second","minute","hour","day","week","month"])}),Hy=c.object({type:c.literal("custom"),seconds:c.number().int().positive(),label:c.string().optional()}),Jy=c.discriminatedUnion("type",[Wy,Hy]),be=c.object({dimension:Gy,window:Jy,capacity:c.number().nonnegative(),enforcement:c.enum(["enforce","track"]).optional(),acknowledgeUnreachable:c.boolean().optional()}),$I=c.array(be).max(20);var de=c.enum(["preserve_current_period","switch_immediately","switch_immediately_prorate","new_subscribers_only"]),Or=c.object({default:de.default("preserve_current_period"),proration:c.enum(["none","prorate","credit"]).default("none"),when:c.object({price_increase:de.optional(),price_decrease:de.optional(),feature_added:de.optional(),feature_removed:de.optional(),limit_increased:de.optional(),limit_reduced:de.optional(),credit_increased:de.optional(),credit_reduced:de.optional(),rating_changed:de.optional()}).strict().default({price_increase:"preserve_current_period",price_decrease:"switch_immediately",feature_added:"switch_immediately",feature_removed:"preserve_current_period",limit_increased:"switch_immediately",limit_reduced:"preserve_current_period",credit_increased:"switch_immediately",credit_reduced:"preserve_current_period",rating_changed:"preserve_current_period"}),allowImmediatePriceIncrease:c.boolean().default(!1),allowImmediateEntitlementReduction:c.boolean().default(!1)}).strict().superRefine((t,r)=>{let n=new Set(["switch_immediately","switch_immediately_prorate"]);n.has(t.when.price_increase??t.default)&&!t.allowImmediatePriceIncrease&&r.addIssue({code:"custom",path:["when","price_increase"],message:"price_increase cannot switch immediately without allowImmediatePriceIncrease: true"});for(let o of["feature_removed","limit_reduced","credit_reduced"])n.has(t.when[o]??t.default)&&!t.allowImmediateEntitlementReduction&&r.addIssue({code:"custom",path:["when",o],message:`${o} cannot switch immediately without allowImmediateEntitlementReduction: true`})});var qy=c.object({kind:c.literal("recurring"),amount_cents:c.number().int().nonnegative()}),Ky=c.object({kind:c.literal("one_time"),amount_cents:c.number().int().nonnegative()}),Yy=c.object({kind:c.literal("promotional"),amount_cents:c.number().int().nonnegative(),label:c.string().min(1).max(120),expires_after_days:c.number().int().positive().optional()}),Xy=c.object({kind:c.literal("trial")}),Qy=c.object({kind:c.literal("rollover"),percent:c.number().int().min(0).max(100)}),eb=c.object({kind:c.literal("top_up"),sku:c.string().min(1).max(120),label:c.string().min(1).max(200),price_cents:c.number().int().positive(),credit_cents:c.number().int().positive()}),tb=c.object({kind:c.literal("auto_recharge"),threshold_cents:c.number().int().nonnegative(),refill_cents:c.number().int().positive()}),re=c.discriminatedUnion("kind",[qy,Ky,Yy,Xy,Qy,eb,tb]);function Er(t,r,n=["grants"]){if(!t)return;let o=0,e=0;for(let i of t)i.kind==="recurring"?o+=1:i.kind==="one_time"&&(e+=1);o>1&&r.addIssue({code:"custom",message:"At most one `recurring` grant is allowed \u2014 recurring credit is a single canonical entry.",path:n}),e>1&&r.addIssue({code:"custom",message:"At most one `one_time` grant is allowed \u2014 one-time credit is a single canonical entry.",path:n})}function rb(t){let r=[];return t.grants&&t.grants.length>0&&r.push(...t.grants),(t.trial_days??0)>0&&!r.some(n=>n.kind==="trial")&&r.push({kind:"trial"}),r}function kf(t,r){return rb(t).find(n=>n.kind===r)}function Pr(t){return kf(t,"recurring")?.amount_cents??0}function Nt(t){return kf(t,"one_time")?.amount_cents??0}var Sf=c.enum(["linear","active_count"]);var nb=c.object({up_to:c.number().int().positive().nullable(),price_per_unit_micros:c.number().int().nonnegative()}),ib=c.object({strategy:c.enum(["graduated","volume"]),tiers:c.array(nb).min(1).max(20)}),ne=c.object({dimension:c.string().min(1).max(64).regex(/^[a-z0-9_]+$/,"Meter dimension must be lowercase alphanumeric with underscores"),kind:Sf.default("linear"),price_per_unit_micros:c.number().int().nonnegative().default(0),tiered:ib.optional(),included_units:c.number().int().positive().optional()}).superRefine((t,r)=>{if(t.tiered&&t.price_per_unit_micros>0&&r.addIssue({code:"custom",message:"`tiered` is mutually exclusive with a non-zero `price_per_unit_micros` \u2014 drop one",path:["tiered"]}),t.included_units!==void 0&&t.tiered&&r.addIssue({code:"custom",message:"`included_units` is mutually exclusive with `tiered` \u2014 a tiered schedule already expresses the included allotment as a zero-priced first tier",path:["included_units"]}),t.tiered){let n=0,o=!1;for(let e=0;e<t.tiered.tiers.length;e++){let i=t.tiered.tiers[e];if(o){r.addIssue({code:"custom",message:"Open-ended tier (`up_to: null`) must be the final tier",path:["tiered","tiers",e,"up_to"]});break}if(i.up_to===null){o=!0;continue}i.up_to<=n&&r.addIssue({code:"custom",message:`Tier upper bounds must be strictly ascending (tier ${e} = ${i.up_to} <= previous ${n})`,path:["tiered","tiers",e,"up_to"]}),n=i.up_to}o||r.addIssue({code:"custom",message:"The final tier of a `tiered` schedule must be open-ended (`up_to: null`)",path:["tiered","tiers",t.tiered.tiers.length-1,"up_to"]})}}),me=c.enum(["month","year"]),ob=c.object({meters:c.array(ne).default([]),recurring_fee_cents:c.number().int().nonnegative().default(0),billing_interval:me.default("month"),grants:c.array(re).max(40).default([]),trial_days:c.number().int().nonnegative().default(0),max_monthly_spend_cents:c.number().int().nonnegative().optional()});var ab=c.enum(["NONE","PRORATE","CREDIT"]).default("NONE"),sb={meters:c.array(ne).default([]),recurring_fee_cents:c.number().int().nonnegative().default(0),billing_interval:me.default("month"),trial_days:c.number().int().nonnegative().default(0),max_monthly_spend_cents:c.number().int().nonnegative().optional(),min_monthly_spend_cents:c.number().int().nonnegative().optional(),grants:c.array(re).max(40).default([])},cb={meters:c.array(ne).optional(),recurring_fee_cents:c.number().int().nonnegative().optional(),billing_interval:me.optional(),trial_days:c.number().int().nonnegative().optional(),max_monthly_spend_cents:c.number().int().nonnegative().optional(),min_monthly_spend_cents:c.number().int().nonnegative().optional(),grants:c.array(re).max(40).optional()},ub=c.object({id:c.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Variant id must be lowercase alphanumeric with hyphens/underscores"),label:c.string().max(200).optional(),rolloutPercent:c.number().int().min(0).max(100),assignmentSeed:c.string().min(1).max(100).default("default"),prorationOnRollback:ab,...cb,limits:c.array(be).max(20).optional(),featureGates:c.record(c.string(),c.boolean()).optional(),capability_limits:c.record(c.string().min(1).max(120),c.union([c.number().int().nonnegative(),c.boolean()])).optional(),overageBehavior:c.enum(["block","allow_and_bill"]).optional()}),wf=ub.superRefine((t,r)=>{Er(t.grants,r)}),If=c.object({key:c.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Plan key must be lowercase alphanumeric with hyphens/underscores"),name:c.string().min(1).max(100),description:c.string().max(500).optional(),details:c.array(c.string().max(200)).max(10).optional(),...sb,free:c.boolean().default(!1),limits:c.array(be).max(20).default([]),featureGates:c.record(c.string(),c.boolean()).optional(),capability_limits:c.record(c.string().min(1).max(120),c.union([c.number().int().nonnegative(),c.boolean()])).default({}),overageBehavior:c.enum(["block","allow_and_bill"]).default("block"),selfServeEnabled:c.boolean().default(!0),legacy:c.boolean().optional().default(!1),variants:c.array(wf).max(4).optional(),archive:c.object({at:c.string().datetime().optional(),transitionTo:c.string().optional(),strategy:c.enum(["auto","explicit","block"]).default("auto")}).optional()}),vl=If.superRefine((t,r)=>{Er(t.grants,r)});var _l=["subscription.created","subscription.updated","subscription.canceled","payment.succeeded","payment.failed","rate_limit.exceeded","entitlement.changed","usage.threshold_reached"],Ct=c.enum(_l);var lb=/^\$\{[A-Z][A-Z0-9_]{0,127}\}$/,yl=c.string().min(3).max(200).refine(t=>lb.test(t),{message:"secret must use ${VAR} interpolation syntax (e.g. ${WEBHOOK_SECRET}); raw secrets in YAML are rejected. Define the env var in the per-product secret store and reference it here."}),bl=c.object({maxAttempts:c.number().int().min(1).max(20).default(5),backoff:c.enum(["exponential","fixed"]).default("exponential")}),zf=c.object({id:c.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Webhook endpoint id must be lowercase alphanumeric with hyphens/underscores"),url:c.string().url("webhooks.endpoints[].url must be a valid URL"),secret:yl,events:c.array(Ct).min(1,"webhooks.endpoints[].events must subscribe to \u2265 1 event"),enabled:c.boolean().default(!0),retryPolicy:bl.default({maxAttempts:5,backoff:"exponential"})}),Tr=c.object({endpoints:c.array(zf).max(50).default([])});var db=c.object({meters:c.array(ne).optional(),recurring_fee_cents:c.number().int().nonnegative().optional(),billing_interval:me.optional(),grants:c.array(re).max(40).optional(),trial_days:c.number().int().nonnegative().optional(),max_monthly_spend_cents:c.number().int().nonnegative().optional(),limits:c.array(be).max(20).optional(),featureGates:c.record(c.string(),c.boolean()).optional(),overageBehavior:c.enum(["block","allow_and_bill"]).optional(),selfServeEnabled:c.boolean().optional(),legacy:c.boolean().optional()}).strict(),mb=c.object({url:c.string().url().optional(),secret:yl.optional(),events:c.array(Ct).optional(),enabled:c.boolean().optional(),retryPolicy:bl.partial().optional()}).strict(),pb=c.object({plans:c.record(c.string(),db).optional(),webhooks:c.object({endpoints:c.record(c.string(),mb).optional()}).strict().optional()}).strict(),jr=c.record(c.string().min(1).max(64),pb);var Of=1,Ef=["plans_table","usage_card","api_keys_panel","billing_summary","credit_balance","feature_panel","product_docs","audit_log","team_panel","markdown"],Pf=["/","/pricing","/dashboard","/dashboard/*","/settings","/settings/*","/team","/audit-log","/docs","/docs/*","/terms","/privacy","/persona","/persona-sign-in"],Tf=c.string().min(1).max(200).regex(/^\/[a-zA-Z0-9_./-]*$/,"path must start with / and contain only [a-zA-Z0-9_./-]"),$l=c.string().min(1).max(120).regex(/^[a-z0-9_-]+$/),jf=c.object({label:c.string().min(1).max(80),path:Tf,capability:$l.optional()}),Af=c.enum(Ef),Nf=c.object({component:Af,props:c.record(c.string().min(1).max(80),c.unknown()).optional(),capability:$l.optional(),gateMode:c.enum(["hide","disable","upsell"]).default("hide")}),Cf=c.object({path:Tf,title:c.string().min(1).max(120),requiresAuth:c.boolean(),capability:$l.optional(),components:c.array(Nf).max(12).default([])}),Ar=c.object({version:c.literal(Of),nav:c.array(jf).max(12).default([]),pages:c.array(Cf).max(24).default([])}).superRefine((t,r)=>{let n=new Set;t.pages.forEach((o,e)=>{n.has(o.path)&&r.addIssue({code:"custom",message:`duplicate frontend page path "${o.path}"`,path:["pages",e,"path"]}),n.add(o.path),Df(o.path)&&r.addIssue({code:"custom",message:`frontend page path "${o.path}" is reserved by the template`,path:["pages",e,"path"]})})});function Df(t){return Pf.some(r=>{if(r.endsWith("/*")){let n=r.slice(0,-2);return t===n||t.startsWith(`${n}/`)}return t===r})}var xl=c.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Plan key must be lowercase alphanumeric with hyphens/underscores"),Uf=c.string().min(1).max(100),fb=c.object({plan:xl,version:Uf.optional()}),gb=c.object({plan:xl,version:c.literal("head").default("head")}),hb=c.object({plan:xl,version:Uf}),Rf=c.enum(["grandfather","next_renewal","by_date","immediate","opt_in"]),Zf=c.enum(["none","prorate","credit"]),Lf=c.object({effective:Rf,date:c.string().datetime().optional(),proration:Zf.optional()}).superRefine((t,r)=>{t.effective==="by_date"&&t.date===void 0&&r.addIssue({code:"custom",path:["date"],message:"existingCustomers.date is required when effective is by_date"})}),Ff=c.object({subscriber:c.string().min(1).max(200),pinTo:hb,until:c.string().datetime().optional(),notes:c.string().max(1e3).optional()}),Mf=c.object({id:c.string().min(1).max(120).regex(/^[a-z0-9][a-z0-9_.-]*$/,"Migration id must be lowercase alphanumeric with dots, hyphens, or underscores"),from:fb,to:gb,newCustomers:c.literal("immediate").default("immediate"),existingCustomers:Lf,pins:c.array(Ff).max(50).default([])}),Nr=c.array(Mf).superRefine((t,r)=>{let n=new Set;t.forEach((o,e)=>{n.has(o.id)&&r.addIssue({code:"custom",path:[e,"id"],message:`duplicate migration id "${o.id}"`}),n.add(o.id)})});var Vf=c.enum(["subscription","subject"]),Bf=c.enum(["reported","action_inferred"]),Gf=c.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/),Wf=c.object({name:Gf,display:c.string().min(1).max(120).optional(),scope:Vf.default("subscription"),subjectType:c.string().min(1).max(64).regex(/^[a-zA-Z0-9_.:-]+$/).optional(),countSource:Bf.default("reported")}).superRefine((t,r)=>{t.scope==="subject"&&!t.subjectType&&r.addIssue({code:"custom",path:["subjectType"],message:"subjectType is required when resource scope is subject"}),t.scope==="subscription"&&t.subjectType&&r.addIssue({code:"custom",path:["subjectType"],message:"subjectType is only valid for subject-scoped counted resources"})}),Cr=c.array(Wf).max(100).default([]);var vb=c.object({key:c.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"AddOn key must be lowercase alphanumeric with hyphens/underscores"),name:c.string().min(1).max(100),description:c.string().max(500).optional(),recurring_fee_cents:c.number().int().nonnegative().default(0),billing_interval:me.default("month"),meters:c.array(ne).default([]),grants:c.array(re).max(40).default([]),capability_limits:c.record(c.string().min(1).max(120),c.union([c.number().int().nonnegative(),c.boolean()])).default({}),featureGates:c.record(c.string(),c.boolean()).optional(),selfServeEnabled:c.boolean().default(!0)}),Pi=c.record(c.string().min(1).max(64),vb).default({}),_b=c.enum(["active","canceled","paused","pending_activation"]),rz=c.object({addOnKey:c.string().min(1).max(64),status:_b.default("active"),activatedAt:c.string().datetime().optional(),canceledAt:c.string().datetime().nullable().optional(),stripeSubscriptionItemId:c.string().optional()});function Hf(t,r){t.usagePricing!==void 0&&r.addIssue({code:"custom",path:["usagePricing"],message:"usagePricing is not supported. Define usage.meters.<key>.rating instead."})}function Jf(t,r){t.filter(o=>o.free).length>1&&r.addIssue({code:"custom",path:["plans"],message:"Only one free plan is allowed per product"}),t.forEach((o,e)=>{o.free&&(yb(o,e,r),bb(o,e,r))})}function yb(t,r,n){(tg(t)??0)!==0&&n.addIssue({code:"custom",path:["plans",r,"recurring_fee_cents"],message:"Free plans must have zero price"})}function bb(t,r,n){t.limits.some(e=>!e.enforcement||e.enforcement==="enforce")||n.addIssue({code:"custom",path:["plans",r,"limits"],message:"Free plans must include at least one hard enforced limit"})}function qf(t,r){let n=new Map;t.forEach((o,e)=>{if(o.free)return;let i=tg(o);if(i===void 0||i<=0)return;let a=wb(o,i),s=n.get(a);if(s){r.addIssue({code:"custom",path:["plans",e,"recurring_fee_cents"],message:`Paid plan price duplicates plan "${s}" (${a})`});return}n.set(a,o.key)})}function Kf(t,r){let n=new Set((t.metering?.meters??[]).map(e=>e.key).filter(e=>typeof e=="string"&&e.length>0)),o=new Set(Object.keys(t.usage?.meters??{}));t.plans.forEach((e,i)=>{let a=e.meters;a&&a.forEach((s,u)=>{let l=s.dimension;typeof l!="string"||l.length===0||n.has(l)||o.has(l)||r.addIssue({code:"custom",path:["plans",i,"meters",u,"dimension"],message:`Plan "${e.key}" prices meter "${l}" but no metering.meters[] entry and no usage.meters[] entry declares it.`})})})}function Yf(t,r){if(!t.features)return;let n=new Set(t.plans.map(o=>o.key));for(let[o,e]of Object.entries(t.features)){if(!e.plans)continue;e.plans.forEach((a,s)=>{n.has(a)||r.addIssue({code:"custom",path:["features",o,"plans",s],message:`Feature "${o}" references unknown plan "${a}"`})});let i=new Set;e.plans.forEach((a,s)=>{i.has(a)&&r.addIssue({code:"custom",path:["features",o,"plans",s],message:`Feature "${o}" lists plan "${a}" more than once`}),i.add(a)})}}function Xf(t,r){if(!t.features)return;let n=new Set((t.metering?.meters??[]).map(e=>e.key).filter(e=>typeof e=="string"&&e.length>0)),o=!1;for(let[e,i]of Object.entries(t.features))(i.routes??[]).forEach((s,u)=>{let l=Qf(s);l.length!==0&&(o=!0,l.forEach((d,p)=>{n.has(d)||r.addIssue({code:"custom",path:["features",e,"routes",u,"metering",p],message:`Route references unknown meter "${d}". Declare it in metering.meters[].`})}))});o&&n.size===0&&r.addIssue({code:"custom",path:["metering","meters"],message:"One or more routes declare metering keys but `metering.meters[]` is empty. Declare meters at the product level first."})}function $b(t,r){let n=new Map;for(let o of t.plans)n.set(o.key,new Set);if(!t.features){for(let o of n.values())for(let e of r)o.add(e);return n}for(let o of Object.values(t.features))xb(o,n);return n}function xb(t,r){let n=t.plans??[],o=t.routes??[];for(let e of n){let i=r.get(e);if(i)for(let a of o){if(a.unmetered===!0)continue;let s=Qf(a);if(s.length>0){for(let u of s)i.add(u);continue}}}}function Qf(t){let r=new Set;for(let n of Object.keys(t.metering?.defaults??{}))r.add(n);for(let n of t.metering?.reports??[])r.add(n);for(let n of Object.keys(t.metering?.estimates??{}))r.add(n);return[...r]}function kb(t){if(!t||typeof t!="object")return null;let r=t;return typeof r.dimension=="string"?r.dimension:null}var Sb=new Set(["credits"]);function eg(t,r){if(!t.plans||t.plans.length===0)return;let n=new Set((t.metering?.meters??[]).map(i=>i.key).filter(i=>typeof i=="string"&&i.length>0)),o=new Set(Object.keys(t.usage?.meters??{})),e=$b(t,n);t.plans.forEach((i,a)=>{let s=i.limits??[],u=e.get(i.key)??new Set;s.forEach((l,d)=>{if(l&&typeof l=="object"?l.acknowledgeUnreachable===!0:!1)return;let g=kb(l);g&&(u.has(g)||o.has(g)||Sb.has(g)||r.addIssue({code:"custom",path:["plans",a,"limits",d,"meter"],message:`Plan "${i.key}" limits meter "${g}" but no route in any granted feature emits this meter, and the meter is not declared under usage.meters either. Either grant a feature whose routes meter "${g}" to this plan, declare the meter under metering.meters[] or usage.meters, or set acknowledgeUnreachable: true if the limit is intentional (e.g. soft budget).`}))})})}function tg(t){return t.recurring_fee_cents}function wb(t,r){return`USD:month:${r}`}var rg=c.object({subdomain:c.string().min(1).max(63).regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/,"Subdomain must be lowercase alphanumeric with optional hyphens")}),Ib=c.enum(["exact_pre_request","estimated_then_settled","postpaid","strict_concurrency"]),Ti=c.object({key:c.string().min(1).max(64).regex(/^[a-z0-9_]+$/,"Meter key must be lowercase alphanumeric with underscores"),display:c.string().min(1).max(100),unit:c.string().max(20).optional(),estimate:c.number().finite().nonnegative().optional(),routeDefault:c.number().finite().nonnegative().optional(),enforcementType:Ib.default("estimated_then_settled"),aggregation:c.enum(["SUM","COUNT","MAX","UNIQUE_COUNT","LATEST"]).default("COUNT"),window:c.enum(["minute","hour","day","month","billing_period"]).default("billing_period"),valueProperty:c.string().optional(),uniqueProperty:c.string().optional(),groupBy:c.array(c.string()).optional(),eventCode:c.string().optional()}),ng=c.string().min(1).max(64).regex(/^[a-z0-9_]+$/,"Usage measure must be lowercase alphanumeric with underscores"),zb=c.enum(["pass_through","markup","fixed_margin","customer_rate"]),Ob=c.object({source:c.literal("fixed"),rates:c.record(c.string().min(1),c.record(ng,c.number().int().nonnegative()))}),Eb=c.object({source:c.literal("provider_catalog"),catalog:c.string().min(1).max(100),pricePolicy:zb.default("pass_through"),markupPercent:c.number().nonnegative().max(1e4).optional(),marginMicros:c.number().int().nonnegative().optional()}),Pb=c.object({source:c.literal("upstream_reported"),amountField:c.string().min(1).max(500),currencyField:c.string().min(1).max(500).optional()}),Tb=c.object({source:c.literal("external_rate_api"),resolver:c.string().min(1).max(100),configRef:c.string().min(1).max(200).optional()}),jb=c.object({source:c.literal("custom"),resolver:c.string().min(1).max(100),configRef:c.string().min(1).max(200).optional()}),ig=c.discriminatedUnion("source",[Ob,Eb,Pb,Tb,jb]),og=c.object({selector:c.string().min(1).max(100).optional(),measures:c.array(ng).min(1).max(20),rating:ig.optional()}),ag=c.object({meters:c.record(c.string().min(1).max(64).regex(/^[a-z0-9_]+$/),og)}),Ab=c.object({defaults:c.record(c.string().min(1).max(64),c.number().finite().nonnegative()).optional(),reports:c.array(c.string().min(1).max(64)).max(20).optional(),estimates:c.record(c.string().min(1).max(64),c.number().finite().nonnegative()).optional(),onStatusCodes:c.union([c.string().min(1).max(100),c.array(c.number().int().min(100).max(599)).min(1).max(100)]).optional()}),sg=c.object({method:c.enum(["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS","*"]).default("*"),path:c.string().min(1).max(500).regex(/^\/[a-zA-Z0-9_/:.{}*-]*$/,"path must start with / and contain only [a-zA-Z0-9_/:.{}*-]"),unmetered:c.boolean().optional(),metering:Ab.optional(),inheritDefaultMeters:c.boolean().optional()}).strict(),cg=c.object({description:c.string().max(500).optional(),routes:c.array(sg).min(1).max(50),plans:c.array(c.string().min(1)).min(1).max(20)}),ug=c.record(c.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/),cg),lg=c.enum(["report","pull_request"]),dg=c.enum(["safe","non_blocking","economic_risk","blocking"]),ji=c.object({cleanup:c.object({enabled:c.boolean().default(!1),mode:lg.default("report")}).default({enabled:!1,mode:"report"}),change_approval:c.object({auto_merge_max_risk:c.enum(["none","safe","non_blocking"]).default("none"),require_human_for:c.array(dg).default(["economic_risk","blocking"])}).default({auto_merge_max_risk:"none",require_human_for:["economic_risk","blocking"]})}).default({cleanup:{enabled:!1,mode:"report"},change_approval:{auto_merge_max_risk:"none",require_human_for:["economic_risk","blocking"]}}),mg=c.enum(["org_only","org_and_user"]),pg=c.enum(["clerk","test-personas"]),Ai=c.object({identity_requirement:mg.optional(),context_tokens:c.object({enabled:c.boolean().default(!0)}).optional(),portal_auth:c.object({strategy:pg}).optional()}),fg=c.enum(["frontend","api","docs","widget","dashboard","webhook","worker","agent"]),gg=c.object({key:c.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Surface key must be lowercase alphanumeric with hyphens/underscores"),type:fg,display:c.string().min(1).max(100).optional(),description:c.string().max(500).optional()}),hg=c.object({key:c.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Entitlement key must be lowercase alphanumeric with hyphens/underscores"),description:c.string().max(500).optional(),capabilities:c.array(c.string().min(1).max(100)).max(100).optional(),featureGates:c.record(c.string().min(1),c.boolean()).optional(),limits:c.array(be).max(100).optional(),meters:c.array(c.string().min(1).max(64)).max(100).optional()}),Ni=c.array(gg).max(20).default([]),Ci=c.array(hg).max(100).default([]),vg=c.enum(["async_job","agent_task","scheduled","lifecycle","background"]),_g=c.discriminatedUnion("type",[c.object({type:c.literal("manual")}),c.object({type:c.literal("schedule"),cron:c.string().min(1).max(120)}),c.object({type:c.literal("event"),event:c.string().min(1).max(120)}),c.object({type:c.literal("api"),path:c.string().min(1).max(240).regex(/^\//,"path must start with /")}),c.object({type:c.literal("lifecycle"),event:c.string().min(1).max(120)})]),yg=c.object({key:c.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Workflow key must be lowercase alphanumeric with hyphens/underscores"),title:c.string().min(1).max(120).optional(),description:c.string().max(1e3).optional(),kind:vg,trigger:_g,capabilities:c.array(c.string().min(1).max(100)).max(100).optional(),meters:c.array(c.string().min(1).max(64)).max(100).optional(),estimates:c.record(c.string().min(1).max(64),c.number().finite()).optional(),metadata:c.record(c.string().min(1),c.unknown()).optional()}),Di=c.array(yg).max(100).default([]),Xe=c.object({product:c.object({name:c.string().min(1).max(100),displayName:c.string().max(200).optional(),description:c.string().max(2e3).optional(),baseUrl:c.string().url("baseUrl must be a valid URL"),sandboxBaseUrl:c.string().url("sandboxBaseUrl must be a valid URL").optional(),visibility:c.enum(["public","private"]).default("public"),logoUrl:c.string().url().optional(),primaryColor:c.string().regex(/^#[0-9a-fA-F]{6}$/).optional(),envBranchPrefix:c.string().max(50).nullable().optional()}),gateway:c.object({authHeader:c.string().min(1).max(100).default("x-api-key"),upstreamAuth:c.object({type:c.enum(["none","static_bearer"]),token:c.string().optional()}).default({type:"none"})}),metering:c.object({meters:c.array(Ti).max(10).default([]),billOn4xx:c.boolean().default(!1)}).default({meters:[],billOn4xx:!1}),usage:ag.optional(),usagePricing:c.never({error:"usagePricing is not supported. Define usage.meters.<key>.rating instead."}).optional(),features:ug.optional(),resources:Cr,policies:ji,customer_context:Ai.optional(),surfaces:Ni,entitlements:Ci,workflows:Di,frontend:Ar.optional(),migrations:Nr.optional(),billing:c.object({gracePeriodDays:c.number().int().nonnegative().default(3),applyLimitUpgradesInstantly:c.boolean().optional(),subscriberChangePolicy:Or.default({default:"preserve_current_period",proration:"none",when:{price_increase:"preserve_current_period",price_decrease:"switch_immediately",feature_added:"switch_immediately",feature_removed:"preserve_current_period",limit_increased:"switch_immediately",limit_reduced:"preserve_current_period",credit_increased:"switch_immediately",credit_reduced:"preserve_current_period",rating_changed:"preserve_current_period"},allowImmediatePriceIncrease:!1,allowImmediateEntitlementReduction:!1})}).default({gracePeriodDays:3,subscriberChangePolicy:{default:"preserve_current_period",proration:"none",when:{price_increase:"preserve_current_period",price_decrease:"switch_immediately",feature_added:"switch_immediately",feature_removed:"preserve_current_period",limit_increased:"switch_immediately",limit_reduced:"preserve_current_period",credit_increased:"switch_immediately",credit_reduced:"preserve_current_period",rating_changed:"preserve_current_period"},allowImmediatePriceIncrease:!1,allowImmediateEntitlementReduction:!1}}),plans:c.array(vl).max(4).default([]),add_ons:Pi,lifecycle:c.object({breaking_changes:c.object({require_deprecation_window_days:c.number().int().nonnegative().default(0),require_successor_route:c.boolean().default(!1)}).default({require_deprecation_window_days:0,require_successor_route:!1})}).default({breaking_changes:{require_deprecation_window_days:0,require_successor_route:!1}}),webhooks:Tr.optional(),environments:jr.optional(),ephemeral:c.object({defaultPlan:c.string().min(1).optional()}).optional()}).superRefine((t,r)=>{Hf(t,r),Jf(t.plans,r),qf(t.plans,r),Kf(t,r),Yf(t,r),Xf(t,r),eg(t,r)}),Nb=c.object({product:Xe.shape.product}),Cb=c.object({gateway:Xe.shape.gateway}),Db=c.object({metering:Xe.shape.metering}),Ub=c.object({plans:Xe.shape.plans});var Rb=c.string().min(2).max(20).regex(/^\d+(ms|s|m|h)$/,"rate_limit window must look like `60s`, `5m`, `1h`"),bg=c.object({strategy:c.enum(["token_bucket","sliding_window","fixed_window"]).default("token_bucket"),dimensions:c.array(c.enum(["subscription","credential","ip","route"])).min(1).max(4).default(["subscription"]),limits:c.array(c.object({window:Rb,max:c.number().int().positive().max(1e7)})).min(1).max(10),fail_open:c.object({max_consecutive_failures:c.number().int().positive().default(100),max_window_seconds:c.number().int().positive().default(60),recovery_threshold:c.number().int().positive().default(50),degraded_mode:c.enum(["safe_mode_block","safe_mode_throttle","runtime_killswitch_trigger"]).default("safe_mode_throttle")}).default({max_consecutive_failures:100,max_window_seconds:60,recovery_threshold:50,degraded_mode:"safe_mode_throttle"})}),$g=c.object({header_name:c.string().min(1).max(100).default("x-api-key"),upstream_token_source:c.discriminatedUnion("type",[c.object({type:c.literal("none")}),c.object({type:c.literal("static_bearer"),token_secret_ref:c.string().min(1).max(200).describe("Reference into the secret store (e.g. CF Secret name); not the raw token")})]).default({type:"none"}),scope_mode:c.enum(["strict","advisory","off"]).default("strict")}),xg=c.object({max_in_flight:c.number().int().positive().max(1e4),dimensions:c.array(c.enum(["subscription","credential","capability"])).min(1).max(3).default(["subscription"]),capability:c.string().min(1).max(120).optional(),lease_ttl_seconds:c.number().int().positive().max(600).default(30),fail_open:c.object({max_consecutive_failures:c.number().int().positive().default(50),max_window_seconds:c.number().int().positive().default(60),recovery_threshold:c.number().int().positive().default(20),degraded_mode:c.enum(["safe_mode_block","safe_mode_throttle","runtime_killswitch_trigger"]).default("safe_mode_throttle")}).default({max_consecutive_failures:50,max_window_seconds:60,recovery_threshold:20,degraded_mode:"safe_mode_throttle"})}),kg=c.object({max_attempts:c.number().int().min(1).max(5).default(2),retry_on_status:c.array(c.number().int().min(400).max(599)).min(1).max(20).default([502,503,504]),backoff:c.object({initial_ms:c.number().int().positive().max(5e3).default(100),multiplier:c.number().positive().max(10).default(2),jitter:c.enum(["none","full","equal"]).default("equal"),total_budget_ms:c.number().int().positive().max(3e4).default(5e3)}).default({initial_ms:100,multiplier:2,jitter:"equal",total_budget_ms:5e3})}),Sg=c.object({applies_to:c.enum(["request","response","both"]).default("request"),rewrites:c.array(c.object({source:c.string().min(1).max(200),target:c.string().min(1).max(200).nullable()})).min(1).max(20)});var kl=c.discriminatedUnion("type",[c.object({type:c.literal("rate_limit"),config:bg}),c.object({type:c.literal("auth"),config:$g}),c.object({type:c.literal("concurrency"),config:xg}),c.object({type:c.literal("retry"),config:kg}),c.object({type:c.literal("transform"),config:Sg})]);var Le=c.enum(["long","short","blocking"]).default("long"),wg=c.object({route_types:c.array(c.enum(["http"])).max(5).optional(),meters:c.array(c.string().min(1).max(64)).max(20).optional(),auth_modes:c.array(c.enum(["api_key","oauth2","anonymous"])).max(5).optional()});var Sl=c.intersection(c.object({name:c.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Policy name must be lowercase alphanumeric with hyphens/underscores"),description:c.string().max(500).optional(),compatible_with:wg.default({}),mutation_class:c.enum(["runtime","contractual"]).default("runtime"),cacheProfile:Le}),kl);var Zb=c.enum(["query","mutation"]),Lb=c.enum(["none","metadata","full"]),Fb=c.object({type:c.string().min(1).max(64).regex(/^[a-zA-Z0-9_.:-]+$/),from:c.enum(["header","path_param"]),name:c.string().min(1).max(120)}),Mb=c.object({resource:c.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/),effect:c.enum(["create","delete"])}),Ig=c.object({id:c.string().min(1).max(160).regex(/^[a-z0-9_.:-]+$/),title:c.string().min(1).max(160).optional(),kind:Zb,actorType:c.string().min(1).max(64).regex(/^[a-zA-Z0-9_.:-]+$/).optional(),subject:Fb.optional(),inputSchemaRef:c.string().min(1).max(240).optional(),audit:Lb.default("metadata"),resource:Mb.optional()});var zg=c.object({method:c.enum(["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS","*"]).default("*"),path:c.string().min(1).max(500).regex(/^\/[a-zA-Z0-9_/:.{}*-]*$/,"path must start with / and contain only [a-zA-Z0-9_/:.{}*-]")}),Og=c.object({match:zg,metering:c.object({defaults:c.record(c.string().min(1).max(64),c.number().finite().nonnegative()).optional(),reports:c.array(c.string().min(1).max(64)).max(20).optional(),estimates:c.record(c.string().min(1).max(64),c.number().finite().nonnegative()).optional(),onStatusCodes:c.union([c.string().min(1).max(100),c.array(c.number().int().min(100).max(599)).min(1).max(100)]).optional()}).optional(),unmetered:c.boolean().optional(),inheritDefaultMeters:c.boolean().optional(),action:c.string().min(1).max(160).regex(/^[a-z0-9_.:-]+$/).optional()}).strict(),Eg=c.object({override_origin:c.string().url("override_origin must be a valid URL").nullable().default(null)}),Pg=c.object({rollout_key:c.string().min(1).max(120).regex(/^[a-z0-9_-]+$/,"rollout_key must be lowercase alphanumeric with hyphens/underscores").optional(),required_flags:c.array(c.string().min(1).max(120).regex(/^[a-z0-9_-]+$/)).max(10).optional()}),wl=c.object({feature:c.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/,"feature key must be lowercase alphanumeric with [_.:-]"),description:c.string().max(500).optional(),mutation_class:c.enum(["runtime","contractual"]).default("contractual"),cacheProfile:Le,routes:c.array(Og).min(1).max(50),upstream:Eg.default({override_origin:null}),policies:c.array(c.string().min(1).max(64).regex(/^[a-z0-9_-]+$/)).max(20).default([]),runtime:Pg.default({}),capabilities:c.array(c.string().min(1).max(120).regex(/^[a-z0-9_-]+$/)).max(20).default([]),plans:c.array(c.string().min(1).max(64)).max(20).default([]),actions:c.array(Ig).max(100).optional()});var Ui=c.string().min(1).max(120).regex(/^[a-z0-9_-]+$/,"runtime key must be lowercase alphanumeric with hyphens/underscores"),Il=c.object({runtime_flags:c.array(Ui).max(10).optional(),capabilities:c.array(c.string().min(1).max(120).regex(/^[a-z0-9_-]+$/)).max(10).optional()}).default({}),Tg=c.object({plans:c.array(c.string().min(1).max(64)).max(20).optional(),environments:c.array(c.string().min(1).max(64)).max(10).optional(),capabilities:c.array(c.string().min(1).max(120).regex(/^[a-z0-9_-]+$/)).max(10).optional()}).default({}),Vb=c.object({missing_behavior:c.enum(["treat_as_zero_percent","treat_as_full_rollout","fail_closed"]).default("treat_as_zero_percent"),stale_behavior:c.enum(["use_last_known","fail_closed_on_signature"]).default("use_last_known")}),jg=c.object({description:c.string().max(500).optional(),audience:Tg,percent:c.number().int().min(0).max(100),assignment_seed:c.string().min(1).max(120).default("default"),depends_on:Il,defaults:Vb.default({missing_behavior:"treat_as_zero_percent",stale_behavior:"use_last_known"})}),Bb=c.object({cacheProfile:Le.default("blocking"),rollouts:c.record(Ui,jg).default({})}),Gb=c.object({missing_behavior:c.enum(["disabled","enabled","fail_closed"]).default("disabled"),stale_behavior:c.enum(["use_last_known","fail_closed_on_signature"]).default("use_last_known")}),Ag=c.object({description:c.string().max(500).optional(),enabled:c.boolean(),audience:Tg,depends_on:Il,defaults:Gb.default({missing_behavior:"disabled",stale_behavior:"use_last_known"}),killswitch_target:c.object({kind:c.enum(["policy","route","rollout"]),name:c.string().min(1).max(120).regex(/^[a-z0-9_-]+$/)}).optional()}),Wb=c.object({cacheProfile:Le.default("blocking"),flags:c.record(Ui,Ag).default({})}),Hb=c.object({missing_behavior:c.enum(["disabled","pending_review"]).default("disabled"),stale_behavior:c.enum(["use_last_known","fail_closed_on_signature"]).default("use_last_known")}),Ng=c.object({description:c.string().max(500).optional(),from_plan_key:c.string().min(1).max(64),to_plan_key:c.string().min(1).max(64),policy:c.enum(["GRANDFATHER","MIGRATE_AT_RENEWAL","MIGRATE_IMMEDIATELY","MIGRATE_BY_DATE","OPT_IN"]).default("MIGRATE_AT_RENEWAL"),proration_policy:c.enum(["NONE","PRORATE","CREDIT"]).default("NONE"),cutover_at:c.string().datetime().optional(),freeze_contract_mutations:c.boolean().default(!0),depends_on:Il,defaults:Hb.default({missing_behavior:"disabled",stale_behavior:"use_last_known"})}),Jb=c.object({cacheProfile:Le.default("blocking"),migrations:c.record(Ui,Ng).default({})});var zl=c.object({capability:c.string().min(1).max(120).regex(/^[a-z0-9_-]+$/,"capability name must be lowercase alphanumeric with hyphens/underscores"),description:c.string().max(500).optional(),mutation_class:c.enum(["runtime","contractual"]).default("contractual"),includes_features:c.array(c.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/)).max(20).default([]),includes_policies:c.array(c.string().min(1).max(64).regex(/^[a-z0-9_-]+$/)).max(20).default([]),includes_capabilities:c.array(c.string().min(1).max(120).regex(/^[a-z0-9_-]+$/)).max(20).default([])});var Ol=1,qb={meters:c.array(ne).default([]),recurring_fee_cents:c.number().int().nonnegative().default(0),billing_interval:me.default("month"),trial_days:c.number().int().nonnegative().default(0),max_monthly_spend_cents:c.number().int().nonnegative().optional(),min_monthly_spend_cents:c.number().int().nonnegative().optional(),grants:c.array(re).max(40).default([])},Dg=c.object({key:c.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Plan key must be lowercase alphanumeric with hyphens/underscores"),name:c.string().min(1).max(100),description:c.string().max(500).optional(),details:c.array(c.string().max(200)).max(10).optional(),...qb,free:c.boolean().default(!1),capabilities:c.array(c.string().min(1).max(120).regex(/^[a-z0-9_-]+$/)).max(20).default([]),limits:c.array(be).max(20).default([]),capability_limits:c.record(c.string().min(1).max(120),c.union([c.number().int().nonnegative(),c.boolean()])).default({}),overageBehavior:c.enum(["block","allow_and_bill"]).default("block"),selfServeEnabled:c.boolean().default(!0),legacy:c.boolean().optional().default(!1),archive:c.object({at:c.string().datetime().optional(),transitionTo:c.string().optional(),strategy:c.enum(["auto","explicit","block"]).default("auto")}).optional()}).superRefine((t,r)=>{Er(t.grants,r)}),Cg={default:"preserve_current_period",proration:"none",when:{price_increase:"preserve_current_period",price_decrease:"switch_immediately",feature_added:"switch_immediately",feature_removed:"preserve_current_period",limit_increased:"switch_immediately",limit_reduced:"preserve_current_period",credit_increased:"switch_immediately",credit_reduced:"preserve_current_period",rating_changed:"preserve_current_period"},allowImmediatePriceIncrease:!1,allowImmediateEntitlementReduction:!1},Kb=c.object({artifactSchemaVersion:c.literal(Ol).default(Ol),product:c.object({name:c.string().min(1).max(100),displayName:c.string().max(200).optional(),description:c.string().max(2e3).optional(),baseUrl:c.string().url("baseUrl must be a valid URL"),sandboxBaseUrl:c.string().url("sandboxBaseUrl must be a valid URL").optional(),visibility:c.enum(["public","private"]).default("public"),logoUrl:c.string().url().optional(),primaryColor:c.string().regex(/^#[0-9a-fA-F]{6}$/).optional(),envBranchPrefix:c.string().max(50).nullable().optional()}),meters:c.array(Ti).max(10).default([]),billOn4xx:c.boolean().default(!1),frontend:Ar.optional(),migrations:Nr.optional(),resources:Cr,policies:ji,customer_context:Ai.optional(),surfaces:Ni,entitlements:Ci,workflows:Di,billing:c.object({gracePeriodDays:c.number().int().nonnegative().default(3),applyLimitUpgradesInstantly:c.boolean().optional(),subscriberChangePolicy:Or.default(Cg)}).default({gracePeriodDays:3,subscriberChangePolicy:Cg}),plans:c.array(Dg).max(4).default([]),add_ons:Pi,lifecycle:c.object({breaking_changes:c.object({require_deprecation_window_days:c.number().int().nonnegative().default(0),require_successor_route:c.boolean().default(!1)}).default({require_deprecation_window_days:0,require_successor_route:!1})}).default({breaking_changes:{require_deprecation_window_days:0,require_successor_route:!1}}),webhooks:Tr.optional(),environments:jr.optional(),ephemeral:c.object({defaultPlan:c.string().min(1).optional()}).optional()});var Ug=1;var Yb=c.object({irVersion:c.literal(Ug),sdkVersion:c.string().min(1).max(64),product:Xe,routes:c.array(wl).max(200).default([]),policies:c.array(Sl).max(200).default([]),capabilities:c.array(zl).max(200).default([]),runtime:c.object({rollout:c.null().default(null),flags:c.null().default(null),migrations:c.null().default(null)}).default({rollout:null,flags:null,migrations:null})});var pe=["free","starter","pro","prepaid","metered"],Xb={kind:"free",label:"Free",description:"No recurring fee and no metered usage. Pure freemium tier.",pricing:{meters:[],recurring_fee_cents:0,billing_interval:"month",grants:[],trial_days:0}},Qb={kind:"starter",label:"Starter \u2014 $20/mo + $20 included",description:"$20/month subscription with $20 of usage credit each period. Stripe-style minimum-spend; overage billed at $0.001/request by default.",pricing:{meters:[{dimension:"requests",kind:"linear",price_per_unit_micros:1e3}],recurring_fee_cents:2e3,billing_interval:"month",grants:[{kind:"recurring",amount_cents:2e3}],trial_days:0}},e$={kind:"pro",label:"Pro \u2014 $100/mo + $200 included",description:"$100/month subscription with $200 of usage credit each period and a 14-day trial. Overage billed at $0.0005/request by default.",pricing:{meters:[{dimension:"requests",kind:"linear",price_per_unit_micros:500}],recurring_fee_cents:1e4,billing_interval:"month",grants:[{kind:"recurring",amount_cents:2e4}],trial_days:14}},t$={kind:"prepaid",label:"Prepaid \u2014 $50 sign-up credit, then PAYG",description:"$50 one-time credit at signup. Once depleted the subscriber pays-as-they-go at $0.001/request by default.",pricing:{meters:[{dimension:"requests",kind:"linear",price_per_unit_micros:1e3}],recurring_fee_cents:0,billing_interval:"month",grants:[{kind:"one_time",amount_cents:5e3}],trial_days:0}},r$={kind:"metered",label:"Metered (pay-as-you-go)",description:"No subscription fee. Pure usage billing at $0.001/request by default.",pricing:{meters:[{dimension:"requests",kind:"linear",price_per_unit_micros:1e3}],recurring_fee_cents:0,billing_interval:"month",grants:[],trial_days:0}},Rg=Object.freeze({free:Xb,starter:Qb,pro:e$,prepaid:t$,metered:r$});function Ri(t){return Rg[t]}function El(){return pe.map(t=>Rg[t])}var DO=c.object({recurring_fee_cents:c.number().int().nonnegative().optional(),grants:c.array(re).max(40).optional(),min_monthly_spend_cents:c.number().int().nonnegative().optional(),max_monthly_spend_cents:c.number().int().nonnegative().optional(),meters:c.array(ne).optional(),notes:c.string().max(2e3).optional()});function Zg(t,r){if(typeof t!="number"&&typeof r!="number")return;let n=[];return typeof t=="number"&&t>0&&n.push({kind:"recurring",amount_cents:t}),typeof r=="number"&&r>0&&n.push({kind:"one_time",amount_cents:r}),n}function n$(t){if(!t||typeof t!="object")return[];let r=t;return Array.isArray(r.data)?r.data:Array.isArray(r.plans)?r.plans:Array.isArray(t)?t:[]}function i$(t){if(t.length===0)return"(no plans)";let r=["KEY","NAME","FREE","FEE\xA2","RECUR_GRANT\xA2","ONE_TIME\xA2","TRIAL_D","MAX_SPEND\xA2","STATUS"],n=s=>s===null?"\u2014":s.toLocaleString("en-US"),o=t.map(s=>[s.key,s.name,s.free?"Y":"N",n(s.recurring_fee_cents),n(s.recurring_credit_grant_cents),n(s.one_time_credit_grant_cents),n(s.trial_days),n(s.max_monthly_spend_cents),s.status]),e=r.map((s,u)=>Math.max(s.length,...o.map(l=>l[u]?.length??0))),i=s=>s.map((u,l)=>u.padEnd(e[l]??u.length)).join(" "),a=e.map(s=>"-".repeat(s)).join(" ");return[i(r),a,...o.map(i)].join(`
98
- `)}function Lg(t,r){let n=t.command("plan").description("Plan management: list, create, update, delete");n.command("list <productIdOrName>").description("List plans for a product").addHelpText("after",`
97
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let c=s[1];if(t===s[0]){i(s);continue}if(e.external){let l=e.external.registry.get(s[0])?.id;if(t!==s[0]&&l){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(c.cycle){i(s);continue}if(c.count>1&&e.reused==="ref"){i(s);continue}}}function ze(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=c=>{let u=e.seen.get(c);if(u.ref===null)return;let l=u.def??u.schema,d={...l},m=u.ref;if(u.ref=null,m){o(m);let h=e.seen.get(m),S=h.schema;if(S.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(S)):Object.assign(l,S),Object.assign(l,d),c._zod.parent===m)for(let A in l)A==="$ref"||A==="allOf"||A in d||delete l[A];if(S.$ref&&h.def)for(let A in l)A==="$ref"||A==="allOf"||A in h.def&&JSON.stringify(l[A])===JSON.stringify(h.def[A])&&delete l[A]}let g=c._zod.parent;if(g&&g!==m){o(g);let h=e.seen.get(g);if(h?.schema.$ref&&(l.$ref=h.schema.$ref,h.def))for(let S in l)S==="$ref"||S==="allOf"||S in h.def&&JSON.stringify(l[S])===JSON.stringify(h.def[S])&&delete l[S]}e.override({zodSchema:c,jsonSchema:l,path:u.path??[]})};for(let c of[...e.seen.entries()].reverse())o(c[0]);let n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let c=e.external.registry.get(t)?.id;if(!c)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(c)}Object.assign(n,r.def??r.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&n.id===i&&delete n.id;let s=e.external?.defs??{};for(let c of e.seen.entries()){let u=c[1];u.def&&u.defId&&(u.def.id===u.defId&&delete u.def.id,s[u.defId]=u.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?n.$defs=s:n.definitions=s);try{let c=JSON.parse(JSON.stringify(n));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:$t(t,"input",e.processors),output:$t(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function J(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return J(o.element,r);if(o.type==="set")return J(o.valueType,r);if(o.type==="lazy")return J(o.getter(),r);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return J(o.innerType,r);if(o.type==="intersection")return J(o.left,r)||J(o.right,r);if(o.type==="record"||o.type==="map")return J(o.keyType,r)||J(o.valueType,r);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:J(o.in,r)||J(o.out,r);if(o.type==="object"){for(let n in o.shape)if(J(o.shape[n],r))return!0;return!1}if(o.type==="union"){for(let n of o.options)if(J(n,r))return!0;return!1}if(o.type==="tuple"){for(let n of o.items)if(J(n,r))return!0;return!!(o.rest&&J(o.rest,r))}return!1}var _c=(e,t={})=>r=>{let o=Re({...r,processors:t});return N(e,o),De(o,e),ze(o,e)},$t=(e,t,r={})=>o=>{let{libraryOptions:n,target:i}=o??{},s=Re({...n??{},target:i,io:t,processors:r});return N(e,s),De(s,e),ze(s,e)};var _y={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},vc=(e,t,r,o)=>{let n=r;n.type="string";let{minimum:i,maximum:s,format:c,patterns:u,contentEncoding:l}=e._zod.bag;if(typeof i=="number"&&(n.minLength=i),typeof s=="number"&&(n.maxLength=s),c&&(n.format=_y[c]??c,n.format===""&&delete n.format,c==="time"&&delete n.format),l&&(n.contentEncoding=l),u&&u.size>0){let d=[...u];d.length===1?n.pattern=d[0].source:d.length>1&&(n.allOf=[...d.map(m=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},bc=(e,t,r,o)=>{let n=r,{minimum:i,maximum:s,format:c,multipleOf:u,exclusiveMaximum:l,exclusiveMinimum:d}=e._zod.bag;typeof c=="string"&&c.includes("int")?n.type="integer":n.type="number";let m=typeof d=="number"&&d>=(i??Number.NEGATIVE_INFINITY),g=typeof l=="number"&&l<=(s??Number.POSITIVE_INFINITY),h=t.target==="draft-04"||t.target==="openapi-3.0";m?h?(n.minimum=d,n.exclusiveMinimum=!0):n.exclusiveMinimum=d:typeof i=="number"&&(n.minimum=i),g?h?(n.maximum=l,n.exclusiveMaximum=!0):n.exclusiveMaximum=l:typeof s=="number"&&(n.maximum=s),typeof u=="number"&&(n.multipleOf=u)},yc=(e,t,r,o)=>{r.type="boolean"},xc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},kc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Sc=(e,t,r,o)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},$c=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Ic=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},wc=(e,t,r,o)=>{r.not={}},Ec=(e,t,r,o)=>{},Oc=(e,t,r,o)=>{},Tc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Pc=(e,t,r,o)=>{let n=e._zod.def,i=Yt(n.entries);i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),r.enum=i},Ac=(e,t,r,o)=>{let n=e._zod.def,i=[];for(let s of n.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){let s=i[0];r.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[s]:r.const=s}else i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),i.every(s=>typeof s=="boolean")&&(r.type="boolean"),i.every(s=>s===null)&&(r.type="null"),r.enum=i},Nc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Cc=(e,t,r,o)=>{let n=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=i.source},Rc=(e,t,r,o)=>{let n=r,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:c,mime:u}=e._zod.bag;s!==void 0&&(i.minLength=s),c!==void 0&&(i.maxLength=c),u?u.length===1?(i.contentMediaType=u[0],Object.assign(n,i)):(Object.assign(n,i),n.anyOf=u.map(l=>({contentMediaType:l}))):Object.assign(n,i)},Dc=(e,t,r,o)=>{r.type="boolean"},zc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},jc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Uc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Lc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Mc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Fc=(e,t,r,o)=>{let n=r,i=e._zod.def,{minimum:s,maximum:c}=e._zod.bag;typeof s=="number"&&(n.minItems=s),typeof c=="number"&&(n.maxItems=c),n.type="array",n.items=N(i.element,t,{...o,path:[...o.path,"items"]})},Zc=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object",n.properties={};let s=i.shape;for(let l in s)n.properties[l]=N(s[l],t,{...o,path:[...o.path,"properties",l]});let c=new Set(Object.keys(s)),u=new Set([...c].filter(l=>{let d=i.shape[l]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));u.size>0&&(n.required=Array.from(u)),i.catchall?._zod.def.type==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=N(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},Gr=(e,t,r,o)=>{let n=e._zod.def,i=n.inclusive===!1,s=n.options.map((c,u)=>N(c,t,{...o,path:[...o.path,i?"oneOf":"anyOf",u]}));i?r.oneOf=s:r.anyOf=s},Vc=(e,t,r,o)=>{let n=e._zod.def,i=N(n.left,t,{...o,path:[...o.path,"allOf",0]}),s=N(n.right,t,{...o,path:[...o.path,"allOf",1]}),c=l=>"allOf"in l&&Object.keys(l).length===1,u=[...c(i)?i.allOf:[i],...c(s)?s.allOf:[s]];r.allOf=u},Bc=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",c=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",u=i.items.map((g,h)=>N(g,t,{...o,path:[...o.path,s,h]})),l=i.rest?N(i.rest,t,{...o,path:[...o.path,c,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=u,l&&(n.items=l)):t.target==="openapi-3.0"?(n.items={anyOf:u},l&&n.items.anyOf.push(l),n.minItems=u.length,l||(n.maxItems=u.length)):(n.items=u,l&&(n.additionalItems=l));let{minimum:d,maximum:m}=e._zod.bag;typeof d=="number"&&(n.minItems=d),typeof m=="number"&&(n.maxItems=m)},Hc=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object";let s=i.keyType,u=s._zod.bag?.patterns;if(i.mode==="loose"&&u&&u.size>0){let d=N(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});n.patternProperties={};for(let m of u)n.patternProperties[m.source]=d}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(n.propertyNames=N(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),n.additionalProperties=N(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let l=s._zod.values;if(l){let d=[...l].filter(m=>typeof m=="string"||typeof m=="number");d.length>0&&(n.required=d)}},Gc=(e,t,r,o)=>{let n=e._zod.def,i=N(n.innerType,t,o),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=n.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},Kc=(e,t,r,o)=>{let n=e._zod.def;N(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},Wc=(e,t,r,o)=>{let n=e._zod.def;N(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},qc=(e,t,r,o)=>{let n=e._zod.def;N(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},Jc=(e,t,r,o)=>{let n=e._zod.def;N(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType;let s;try{s=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=s},Yc=(e,t,r,o)=>{let n=e._zod.def,i=n.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?i?n.out:n.in:n.out;N(s,t,o);let c=t.seen.get(e);c.ref=s},Xc=(e,t,r,o)=>{let n=e._zod.def;N(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.readOnly=!0},Qc=(e,t,r,o)=>{let n=e._zod.def;N(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},Kr=(e,t,r,o)=>{let n=e._zod.def;N(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},eu=(e,t,r,o)=>{let n=e._zod.innerType;N(n,t,o);let i=t.seen.get(e);i.ref=n},Hr={string:vc,number:bc,boolean:yc,bigint:xc,symbol:kc,null:Sc,undefined:$c,void:Ic,never:wc,any:Ec,unknown:Oc,date:Tc,enum:Pc,literal:Ac,nan:Nc,template_literal:Cc,file:Rc,success:Dc,custom:zc,function:jc,transform:Uc,map:Lc,set:Mc,array:Fc,object:Zc,union:Gr,intersection:Vc,tuple:Bc,record:Hc,nullable:Gc,nonoptional:Kc,default:Wc,prefault:qc,catch:Jc,pipe:Yc,readonly:Xc,promise:Qc,optional:Kr,lazy:eu};function Wr(e,t){if("_idmap"in e){let o=e,n=Re({...t,processors:Hr}),i={};for(let u of o._idmap.entries()){let[l,d]=u;N(d,n)}let s={},c={registry:o,uri:t?.uri,defs:i};n.external=c;for(let u of o._idmap.entries()){let[l,d]=u;De(n,d),s[l]=ze(n,d)}if(Object.keys(i).length>0){let u=n.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[u]:i}}return{schemas:s}}let r=Re({...t,processors:Hr});return N(e,r),De(r,e),ze(r,e)}var qr=class{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(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=Re({processors:Hr,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return N(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),De(this.ctx,t);let o=ze(this.ctx,t),{"~standard":n,...i}=o;return i}};var fp={};var hn={};ye(hn,{ZodAny:()=>$u,ZodArray:()=>Ou,ZodBase64:()=>hi,ZodBase64URL:()=>_i,ZodBigInt:()=>Nt,ZodBigIntFormat:()=>yi,ZodBoolean:()=>At,ZodCIDRv4:()=>fi,ZodCIDRv6:()=>gi,ZodCUID:()=>si,ZodCUID2:()=>ci,ZodCatch:()=>Ju,ZodCodec:()=>On,ZodCustom:()=>Tn,ZodCustomStringFormat:()=>Tt,ZodDate:()=>Sn,ZodDefault:()=>Bu,ZodDiscriminatedUnion:()=>Pu,ZodE164:()=>vi,ZodEmail:()=>ii,ZodEmoji:()=>oi,ZodEnum:()=>Et,ZodExactOptional:()=>Fu,ZodFile:()=>Lu,ZodFunction:()=>al,ZodGUID:()=>vn,ZodIPv4:()=>mi,ZodIPv6:()=>pi,ZodIntersection:()=>Au,ZodJWT:()=>bi,ZodKSUID:()=>di,ZodLazy:()=>rl,ZodLiteral:()=>Uu,ZodMAC:()=>_u,ZodMap:()=>zu,ZodNaN:()=>Xu,ZodNanoID:()=>ai,ZodNever:()=>wu,ZodNonOptional:()=>wi,ZodNull:()=>ku,ZodNullable:()=>Vu,ZodNumber:()=>Pt,ZodNumberFormat:()=>Je,ZodObject:()=>In,ZodOptional:()=>Ii,ZodPipe:()=>En,ZodPrefault:()=>Gu,ZodPreprocess:()=>Qu,ZodPromise:()=>ol,ZodReadonly:()=>el,ZodRecord:()=>wt,ZodSet:()=>ju,ZodString:()=>Ot,ZodStringFormat:()=>D,ZodSuccess:()=>qu,ZodSymbol:()=>yu,ZodTemplateLiteral:()=>nl,ZodTransform:()=>Mu,ZodTuple:()=>Cu,ZodType:()=>I,ZodULID:()=>ui,ZodURL:()=>kn,ZodUUID:()=>ve,ZodUndefined:()=>xu,ZodUnion:()=>wn,ZodUnknown:()=>Iu,ZodVoid:()=>Eu,ZodXID:()=>li,ZodXor:()=>Tu,_ZodString:()=>ri,_default:()=>Hu,_function:()=>$f,any:()=>ef,array:()=>$n,base64:()=>jp,base64url:()=>Up,bigint:()=>qp,boolean:()=>bu,catch:()=>Yu,check:()=>If,cidrv4:()=>Dp,cidrv6:()=>zp,codec:()=>yf,cuid:()=>Ep,cuid2:()=>Op,custom:()=>wf,date:()=>nf,describe:()=>Ef,discriminatedUnion:()=>uf,e164:()=>Lp,email:()=>_p,emoji:()=>Ip,enum:()=>Si,exactOptional:()=>Zu,file:()=>hf,float32:()=>Hp,float64:()=>Gp,function:()=>$f,guid:()=>vp,hash:()=>Bp,hex:()=>Vp,hostname:()=>Zp,httpUrl:()=>$p,instanceof:()=>Tf,int:()=>ti,int32:()=>Kp,int64:()=>Jp,intersection:()=>Nu,invertCodec:()=>xf,ipv4:()=>Np,ipv6:()=>Rp,json:()=>Af,jwt:()=>Mp,keyof:()=>rf,ksuid:()=>Ap,lazy:()=>il,literal:()=>gf,looseObject:()=>sf,looseRecord:()=>df,mac:()=>Cp,map:()=>mf,meta:()=>Of,nan:()=>bf,nanoid:()=>wp,nativeEnum:()=>ff,never:()=>xi,nonoptional:()=>Wu,null:()=>Su,nullable:()=>yn,nullish:()=>_f,number:()=>vu,object:()=>of,optional:()=>bn,partialRecord:()=>lf,pipe:()=>ni,prefault:()=>Ku,preprocess:()=>Nf,promise:()=>Sf,readonly:()=>tl,record:()=>Du,refine:()=>sl,set:()=>pf,strictObject:()=>af,string:()=>_n,stringFormat:()=>Fp,stringbool:()=>Pf,success:()=>vf,superRefine:()=>cl,symbol:()=>Xp,templateLiteral:()=>kf,transform:()=>$i,tuple:()=>Ru,uint32:()=>Wp,uint64:()=>Yp,ulid:()=>Tp,undefined:()=>Qp,union:()=>ki,unknown:()=>qe,url:()=>Sp,uuid:()=>bp,uuidv4:()=>yp,uuidv6:()=>xp,uuidv7:()=>kp,void:()=>tf,xid:()=>Pp,xor:()=>cf});var Jr={};ye(Jr,{endsWith:()=>ht,gt:()=>he,gte:()=>q,includes:()=>ft,length:()=>We,lowercase:()=>mt,lt:()=>ge,lte:()=>ne,maxLength:()=>Ke,maxSize:()=>Ce,mime:()=>_t,minLength:()=>$e,minSize:()=>_e,multipleOf:()=>Ne,negative:()=>Fr,nonnegative:()=>Vr,nonpositive:()=>Zr,normalize:()=>vt,overwrite:()=>ce,positive:()=>Mr,property:()=>Br,regex:()=>dt,size:()=>Ge,slugify:()=>kt,startsWith:()=>gt,toLowerCase:()=>yt,toUpperCase:()=>xt,trim:()=>bt,uppercase:()=>pt});var It={};ye(It,{ZodISODate:()=>Xr,ZodISODateTime:()=>Yr,ZodISODuration:()=>ei,ZodISOTime:()=>Qr,date:()=>nu,datetime:()=>tu,duration:()=>iu,time:()=>ru});var Yr=p("ZodISODateTime",(e,t)=>{Na.init(e,t),D.init(e,t)});function tu(e){return zs(Yr,e)}var Xr=p("ZodISODate",(e,t)=>{Ca.init(e,t),D.init(e,t)});function nu(e){return js(Xr,e)}var Qr=p("ZodISOTime",(e,t)=>{Ra.init(e,t),D.init(e,t)});function ru(e){return Us(Qr,e)}var ei=p("ZodISODuration",(e,t)=>{Da.init(e,t),D.init(e,t)});function iu(e){return Ls(ei,e)}var gp=(e,t)=>{nn.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>on(e,r)},flatten:{value:r=>rn(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,nt,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,nt,2)}},isEmpty:{get(){return e.issues.length===0}}})},by=p("ZodError",gp),Q=p("ZodError",gp,{Parent:Error});var ou=ot(Q),au=at(Q),su=st(Q),cu=ct(Q),uu=Wn(Q),lu=qn(Q),du=Jn(Q),mu=Yn(Q),pu=Xn(Q),fu=Qn(Q),gu=er(Q),hu=tr(Q);var hp=new WeakMap;function xn(e,t,r){let o=Object.getPrototypeOf(e),n=hp.get(o);if(n||(n=new Set,hp.set(o,n)),!n.has(t)){n.add(t);for(let i in r){let s=r[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){let c=s.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:c}),c},set(c){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:c})}})}}}var I=p("ZodType",(e,t)=>($.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:$t(e,"input"),output:$t(e,"output")}}),e.toJSONSchema=_c(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,o)=>ou(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>su(e,r,o),e.parseAsync=async(r,o)=>au(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>cu(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>uu(e,r,o),e.decode=(r,o)=>lu(e,r,o),e.encodeAsync=async(r,o)=>du(e,r,o),e.decodeAsync=async(r,o)=>mu(e,r,o),e.safeEncode=(r,o)=>pu(e,r,o),e.safeDecode=(r,o)=>fu(e,r,o),e.safeEncodeAsync=async(r,o)=>gu(e,r,o),e.safeDecodeAsync=async(r,o)=>hu(e,r,o),xn(e,"ZodType",{check(...r){let o=this.def;return this.clone(b.mergeDefs(o,{checks:[...o.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,o){return K(this,r,o)},brand(){return this},register(r,o){return r.add(this,o),this},refine(r,o){return this.check(sl(r,o))},superRefine(r,o){return this.check(cl(r,o))},overwrite(r){return this.check(ce(r))},optional(){return bn(this)},exactOptional(){return Zu(this)},nullable(){return yn(this)},nullish(){return bn(yn(this))},nonoptional(r){return Wu(this,r)},array(){return $n(this)},or(r){return ki([this,r])},and(r){return Nu(this,r)},transform(r){return ni(this,$i(r))},default(r){return Hu(this,r)},prefault(r){return Ku(this,r)},catch(r){return Yu(this,r)},pipe(r){return ni(this,r)},readonly(){return tl(this)},describe(r){let o=this.clone();return B.add(o,{description:r}),o},meta(...r){if(r.length===0)return B.get(this);let o=this.clone();return B.add(o,r[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return B.get(e)?.description},configurable:!0}),e)),ri=p("_ZodString",(e,t)=>{He.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>vc(e,o,n,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,xn(e,"_ZodString",{regex(...o){return this.check(dt(...o))},includes(...o){return this.check(ft(...o))},startsWith(...o){return this.check(gt(...o))},endsWith(...o){return this.check(ht(...o))},min(...o){return this.check($e(...o))},max(...o){return this.check(Ke(...o))},length(...o){return this.check(We(...o))},nonempty(...o){return this.check($e(1,...o))},lowercase(o){return this.check(mt(o))},uppercase(o){return this.check(pt(o))},trim(){return this.check(bt())},normalize(...o){return this.check(vt(...o))},toLowerCase(){return this.check(yt())},toUpperCase(){return this.check(xt())},slugify(){return this.check(kt())}})}),Ot=p("ZodString",(e,t)=>{He.init(e,t),ri.init(e,t),e.email=r=>e.check(yr(ii,r)),e.url=r=>e.check(gn(kn,r)),e.jwt=r=>e.check(Lr(bi,r)),e.emoji=r=>e.check(Ir(oi,r)),e.guid=r=>e.check(fn(vn,r)),e.uuid=r=>e.check(xr(ve,r)),e.uuidv4=r=>e.check(kr(ve,r)),e.uuidv6=r=>e.check(Sr(ve,r)),e.uuidv7=r=>e.check($r(ve,r)),e.nanoid=r=>e.check(wr(ai,r)),e.guid=r=>e.check(fn(vn,r)),e.cuid=r=>e.check(Er(si,r)),e.cuid2=r=>e.check(Or(ci,r)),e.ulid=r=>e.check(Tr(ui,r)),e.base64=r=>e.check(zr(hi,r)),e.base64url=r=>e.check(jr(_i,r)),e.xid=r=>e.check(Pr(li,r)),e.ksuid=r=>e.check(Ar(di,r)),e.ipv4=r=>e.check(Nr(mi,r)),e.ipv6=r=>e.check(Cr(pi,r)),e.cidrv4=r=>e.check(Rr(fi,r)),e.cidrv6=r=>e.check(Dr(gi,r)),e.e164=r=>e.check(Ur(vi,r)),e.datetime=r=>e.check(tu(r)),e.date=r=>e.check(nu(r)),e.time=r=>e.check(ru(r)),e.duration=r=>e.check(iu(r))});function _n(e){return Ns(Ot,e)}var D=p("ZodStringFormat",(e,t)=>{R.init(e,t),ri.init(e,t)}),ii=p("ZodEmail",(e,t)=>{Sa.init(e,t),D.init(e,t)});function _p(e){return yr(ii,e)}var vn=p("ZodGUID",(e,t)=>{xa.init(e,t),D.init(e,t)});function vp(e){return fn(vn,e)}var ve=p("ZodUUID",(e,t)=>{ka.init(e,t),D.init(e,t)});function bp(e){return xr(ve,e)}function yp(e){return kr(ve,e)}function xp(e){return Sr(ve,e)}function kp(e){return $r(ve,e)}var kn=p("ZodURL",(e,t)=>{$a.init(e,t),D.init(e,t)});function Sp(e){return gn(kn,e)}function $p(e){return gn(kn,{protocol:te.httpProtocol,hostname:te.domain,...b.normalizeParams(e)})}var oi=p("ZodEmoji",(e,t)=>{Ia.init(e,t),D.init(e,t)});function Ip(e){return Ir(oi,e)}var ai=p("ZodNanoID",(e,t)=>{wa.init(e,t),D.init(e,t)});function wp(e){return wr(ai,e)}var si=p("ZodCUID",(e,t)=>{Ea.init(e,t),D.init(e,t)});function Ep(e){return Er(si,e)}var ci=p("ZodCUID2",(e,t)=>{Oa.init(e,t),D.init(e,t)});function Op(e){return Or(ci,e)}var ui=p("ZodULID",(e,t)=>{Ta.init(e,t),D.init(e,t)});function Tp(e){return Tr(ui,e)}var li=p("ZodXID",(e,t)=>{Pa.init(e,t),D.init(e,t)});function Pp(e){return Pr(li,e)}var di=p("ZodKSUID",(e,t)=>{Aa.init(e,t),D.init(e,t)});function Ap(e){return Ar(di,e)}var mi=p("ZodIPv4",(e,t)=>{za.init(e,t),D.init(e,t)});function Np(e){return Nr(mi,e)}var _u=p("ZodMAC",(e,t)=>{Ua.init(e,t),D.init(e,t)});function Cp(e){return Rs(_u,e)}var pi=p("ZodIPv6",(e,t)=>{ja.init(e,t),D.init(e,t)});function Rp(e){return Cr(pi,e)}var fi=p("ZodCIDRv4",(e,t)=>{La.init(e,t),D.init(e,t)});function Dp(e){return Rr(fi,e)}var gi=p("ZodCIDRv6",(e,t)=>{Ma.init(e,t),D.init(e,t)});function zp(e){return Dr(gi,e)}var hi=p("ZodBase64",(e,t)=>{Za.init(e,t),D.init(e,t)});function jp(e){return zr(hi,e)}var _i=p("ZodBase64URL",(e,t)=>{Va.init(e,t),D.init(e,t)});function Up(e){return jr(_i,e)}var vi=p("ZodE164",(e,t)=>{Ba.init(e,t),D.init(e,t)});function Lp(e){return Ur(vi,e)}var bi=p("ZodJWT",(e,t)=>{Ha.init(e,t),D.init(e,t)});function Mp(e){return Lr(bi,e)}var Tt=p("ZodCustomStringFormat",(e,t)=>{Ga.init(e,t),D.init(e,t)});function Fp(e,t,r={}){return St(Tt,e,t,r)}function Zp(e){return St(Tt,"hostname",te.hostname,e)}function Vp(e){return St(Tt,"hex",te.hex,e)}function Bp(e,t){let r=t?.enc??"hex",o=`${e}_${r}`,n=te[o];if(!n)throw new Error(`Unrecognized hash format: ${o}`);return St(Tt,o,n,t)}var Pt=p("ZodNumber",(e,t)=>{lr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>bc(e,o,n,i),xn(e,"ZodNumber",{gt(o,n){return this.check(he(o,n))},gte(o,n){return this.check(q(o,n))},min(o,n){return this.check(q(o,n))},lt(o,n){return this.check(ge(o,n))},lte(o,n){return this.check(ne(o,n))},max(o,n){return this.check(ne(o,n))},int(o){return this.check(ti(o))},safe(o){return this.check(ti(o))},positive(o){return this.check(he(0,o))},nonnegative(o){return this.check(q(0,o))},negative(o){return this.check(ge(0,o))},nonpositive(o){return this.check(ne(0,o))},multipleOf(o,n){return this.check(Ne(o,n))},step(o,n){return this.check(Ne(o,n))},finite(){return this}});let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function vu(e){return Ms(Pt,e)}var Je=p("ZodNumberFormat",(e,t)=>{Ka.init(e,t),Pt.init(e,t)});function ti(e){return Zs(Je,e)}function Hp(e){return Vs(Je,e)}function Gp(e){return Bs(Je,e)}function Kp(e){return Hs(Je,e)}function Wp(e){return Gs(Je,e)}var At=p("ZodBoolean",(e,t)=>{un.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>yc(e,r,o,n)});function bu(e){return Ks(At,e)}var Nt=p("ZodBigInt",(e,t)=>{dr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>xc(e,o,n,i),e.gte=(o,n)=>e.check(q(o,n)),e.min=(o,n)=>e.check(q(o,n)),e.gt=(o,n)=>e.check(he(o,n)),e.gte=(o,n)=>e.check(q(o,n)),e.min=(o,n)=>e.check(q(o,n)),e.lt=(o,n)=>e.check(ge(o,n)),e.lte=(o,n)=>e.check(ne(o,n)),e.max=(o,n)=>e.check(ne(o,n)),e.positive=o=>e.check(he(BigInt(0),o)),e.negative=o=>e.check(ge(BigInt(0),o)),e.nonpositive=o=>e.check(ne(BigInt(0),o)),e.nonnegative=o=>e.check(q(BigInt(0),o)),e.multipleOf=(o,n)=>e.check(Ne(o,n));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function qp(e){return qs(Nt,e)}var yi=p("ZodBigIntFormat",(e,t)=>{Wa.init(e,t),Nt.init(e,t)});function Jp(e){return Ys(yi,e)}function Yp(e){return Xs(yi,e)}var yu=p("ZodSymbol",(e,t)=>{qa.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>kc(e,r,o,n)});function Xp(e){return Qs(yu,e)}var xu=p("ZodUndefined",(e,t)=>{Ja.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>$c(e,r,o,n)});function Qp(e){return ec(xu,e)}var ku=p("ZodNull",(e,t)=>{Ya.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Sc(e,r,o,n)});function Su(e){return tc(ku,e)}var $u=p("ZodAny",(e,t)=>{Xa.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ec(e,r,o,n)});function ef(){return nc($u)}var Iu=p("ZodUnknown",(e,t)=>{Qa.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Oc(e,r,o,n)});function qe(){return rc(Iu)}var wu=p("ZodNever",(e,t)=>{es.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>wc(e,r,o,n)});function xi(e){return ic(wu,e)}var Eu=p("ZodVoid",(e,t)=>{ts.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ic(e,r,o,n)});function tf(e){return oc(Eu,e)}var Sn=p("ZodDate",(e,t)=>{ns.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Tc(e,o,n,i),e.min=(o,n)=>e.check(q(o,n)),e.max=(o,n)=>e.check(ne(o,n));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function nf(e){return ac(Sn,e)}var Ou=p("ZodArray",(e,t)=>{rs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Fc(e,r,o,n),e.element=t.element,xn(e,"ZodArray",{min(r,o){return this.check($e(r,o))},nonempty(r){return this.check($e(1,r))},max(r,o){return this.check(Ke(r,o))},length(r,o){return this.check(We(r,o))},unwrap(){return this.element}})});function $n(e,t){return uc(Ou,e,t)}function rf(e){let t=e._zod.def.shape;return Si(Object.keys(t))}var In=p("ZodObject",(e,t)=>{is.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Zc(e,r,o,n),b.defineLazy(e,"shape",()=>t.shape),xn(e,"ZodObject",{keyof(){return Si(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:qe()})},loose(){return this.clone({...this._zod.def,catchall:qe()})},strict(){return this.clone({...this._zod.def,catchall:xi()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return b.extend(this,r)},safeExtend(r){return b.safeExtend(this,r)},merge(r){return b.merge(this,r)},pick(r){return b.pick(this,r)},omit(r){return b.omit(this,r)},partial(...r){return b.partial(Ii,this,r[0])},required(...r){return b.required(wi,this,r[0])}})});function of(e,t){let r={type:"object",shape:e??{},...b.normalizeParams(t)};return new In(r)}function af(e,t){return new In({type:"object",shape:e,catchall:xi(),...b.normalizeParams(t)})}function sf(e,t){return new In({type:"object",shape:e,catchall:qe(),...b.normalizeParams(t)})}var wn=p("ZodUnion",(e,t)=>{ln.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Gr(e,r,o,n),e.options=t.options});function ki(e,t){return new wn({type:"union",options:e,...b.normalizeParams(t)})}var Tu=p("ZodXor",(e,t)=>{wn.init(e,t),os.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Gr(e,r,o,n),e.options=t.options});function cf(e,t){return new Tu({type:"union",options:e,inclusive:!1,...b.normalizeParams(t)})}var Pu=p("ZodDiscriminatedUnion",(e,t)=>{wn.init(e,t),as.init(e,t)});function uf(e,t,r){return new Pu({type:"union",options:t,discriminator:e,...b.normalizeParams(r)})}var Au=p("ZodIntersection",(e,t)=>{ss.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Vc(e,r,o,n)});function Nu(e,t){return new Au({type:"intersection",left:e,right:t})}var Cu=p("ZodTuple",(e,t)=>{mr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Bc(e,r,o,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});function Ru(e,t,r){let o=t instanceof $,n=o?r:t,i=o?t:null;return new Cu({type:"tuple",items:e,rest:i,...b.normalizeParams(n)})}var wt=p("ZodRecord",(e,t)=>{cs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Hc(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType});function Du(e,t,r){return!t||!t._zod?new wt({type:"record",keyType:_n(),valueType:e,...b.normalizeParams(t)}):new wt({type:"record",keyType:e,valueType:t,...b.normalizeParams(r)})}function lf(e,t,r){let o=K(e);return o._zod.values=void 0,new wt({type:"record",keyType:o,valueType:t,...b.normalizeParams(r)})}function df(e,t,r){return new wt({type:"record",keyType:e,valueType:t,mode:"loose",...b.normalizeParams(r)})}var zu=p("ZodMap",(e,t)=>{us.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Lc(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(_e(...r)),e.nonempty=r=>e.check(_e(1,r)),e.max=(...r)=>e.check(Ce(...r)),e.size=(...r)=>e.check(Ge(...r))});function mf(e,t,r){return new zu({type:"map",keyType:e,valueType:t,...b.normalizeParams(r)})}var ju=p("ZodSet",(e,t)=>{ls.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Mc(e,r,o,n),e.min=(...r)=>e.check(_e(...r)),e.nonempty=r=>e.check(_e(1,r)),e.max=(...r)=>e.check(Ce(...r)),e.size=(...r)=>e.check(Ge(...r))});function pf(e,t){return new ju({type:"set",valueType:e,...b.normalizeParams(t)})}var Et=p("ZodEnum",(e,t)=>{ds.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Pc(e,o,n,i),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(o,n)=>{let i={};for(let s of o)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Et({...t,checks:[],...b.normalizeParams(n),entries:i})},e.exclude=(o,n)=>{let i={...t.entries};for(let s of o)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new Et({...t,checks:[],...b.normalizeParams(n),entries:i})}});function Si(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Et({type:"enum",entries:r,...b.normalizeParams(t)})}function ff(e,t){return new Et({type:"enum",entries:e,...b.normalizeParams(t)})}var Uu=p("ZodLiteral",(e,t)=>{ms.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ac(e,r,o,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function gf(e,t){return new Uu({type:"literal",values:Array.isArray(e)?e:[e],...b.normalizeParams(t)})}var Lu=p("ZodFile",(e,t)=>{ps.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Rc(e,r,o,n),e.min=(r,o)=>e.check(_e(r,o)),e.max=(r,o)=>e.check(Ce(r,o)),e.mime=(r,o)=>e.check(_t(Array.isArray(r)?r:[r],o))});function hf(e){return lc(Lu,e)}var Mu=p("ZodTransform",(e,t)=>{fs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Uc(e,r,o,n),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Ee(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(b.issue(i,r.value,t));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(b.issue(s))}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(i=>(r.value=i,r.fallback=!0,r)):(r.value=n,r.fallback=!0,r)}});function $i(e){return new Mu({type:"transform",transform:e})}var Ii=p("ZodOptional",(e,t)=>{pr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Kr(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function bn(e){return new Ii({type:"optional",innerType:e})}var Fu=p("ZodExactOptional",(e,t)=>{gs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Kr(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Zu(e){return new Fu({type:"optional",innerType:e})}var Vu=p("ZodNullable",(e,t)=>{hs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Gc(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function yn(e){return new Vu({type:"nullable",innerType:e})}function _f(e){return bn(yn(e))}var Bu=p("ZodDefault",(e,t)=>{_s.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Wc(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Hu(e,t){return new Bu({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():b.shallowClone(t)}})}var Gu=p("ZodPrefault",(e,t)=>{vs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>qc(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Ku(e,t){return new Gu({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():b.shallowClone(t)}})}var wi=p("ZodNonOptional",(e,t)=>{bs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Kc(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Wu(e,t){return new wi({type:"nonoptional",innerType:e,...b.normalizeParams(t)})}var qu=p("ZodSuccess",(e,t)=>{ys.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Dc(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function vf(e){return new qu({type:"success",innerType:e})}var Ju=p("ZodCatch",(e,t)=>{xs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Jc(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Yu(e,t){return new Ju({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var Xu=p("ZodNaN",(e,t)=>{ks.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Nc(e,r,o,n)});function bf(e){return cc(Xu,e)}var En=p("ZodPipe",(e,t)=>{fr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Yc(e,r,o,n),e.in=t.in,e.out=t.out});function ni(e,t){return new En({type:"pipe",in:e,out:t})}var On=p("ZodCodec",(e,t)=>{En.init(e,t),dn.init(e,t)});function yf(e,t,r){return new On({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function xf(e){let t=e._zod.def;return new On({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var Qu=p("ZodPreprocess",(e,t)=>{En.init(e,t),Ss.init(e,t)}),el=p("ZodReadonly",(e,t)=>{$s.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Xc(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function tl(e){return new el({type:"readonly",innerType:e})}var nl=p("ZodTemplateLiteral",(e,t)=>{Is.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Cc(e,r,o,n)});function kf(e,t){return new nl({type:"template_literal",parts:e,...b.normalizeParams(t)})}var rl=p("ZodLazy",(e,t)=>{Os.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>eu(e,r,o,n),e.unwrap=()=>e._zod.def.getter()});function il(e){return new rl({type:"lazy",getter:e})}var ol=p("ZodPromise",(e,t)=>{Es.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Qc(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Sf(e){return new ol({type:"promise",innerType:e})}var al=p("ZodFunction",(e,t)=>{ws.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>jc(e,r,o,n)});function $f(e){return new al({type:"function",input:Array.isArray(e?.input)?Ru(e?.input):e?.input??$n(qe()),output:e?.output??qe()})}var Tn=p("ZodCustom",(e,t)=>{Ts.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>zc(e,r,o,n)});function If(e){let t=new z({check:"custom"});return t._zod.check=e,t}function wf(e,t){return dc(Tn,e??(()=>!0),t)}function sl(e,t={}){return mc(Tn,e,t)}function cl(e,t){return pc(e,t)}var Ef=fc,Of=gc;function Tf(e,t={}){let r=new Tn({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...b.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:r,path:[...r._zod.def.path??[]]})},r}var Pf=(...e)=>hc({Codec:On,Boolean:At,String:Ot},...e);function Af(e){let t=il(()=>ki([_n(e),vu(),bu(),Su(),$n(t),Du(_n(),t)]));return t}function Nf(e,t){return new Qu({type:"pipe",in:$i(e),out:t})}var xy={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 ky(e){F({customError:e})}function Sy(){return F().customError}var ul;ul||(ul={});var x={...hn,...Jr,iso:It},$y=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 Iy(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function wy(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let o=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===o){let n=r[1];if(!n||!t.defs[n])throw new Error(`Reference not found: ${e}`);return t.defs[n]}throw new Error(`Reference not found: ${e}`)}function Cf(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return x.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return x.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let i=wy(n,t),s=G(i,t);return t.refs.set(n,s),t.processing.delete(n),s}if(e.enum!==void 0){let n=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&n.length===1&&n[0]===null)return x.null();if(n.length===0)return x.never();if(n.length===1)return x.literal(n[0]);if(n.every(s=>typeof s=="string"))return x.enum(n);let i=n.map(s=>x.literal(s));return i.length<2?i[0]:x.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return x.literal(e.const);let r=e.type;if(Array.isArray(r)){let n=r.map(i=>{let s={...e,type:i};return Cf(s,t)});return n.length===0?x.never():n.length===1?n[0]:x.union(n)}if(!r)return x.any();let o;switch(r){case"string":{let n=x.string();if(e.format){let i=e.format;i==="email"?n=n.check(x.email()):i==="uri"||i==="uri-reference"?n=n.check(x.url()):i==="uuid"||i==="guid"?n=n.check(x.uuid()):i==="date-time"?n=n.check(x.iso.datetime()):i==="date"?n=n.check(x.iso.date()):i==="time"?n=n.check(x.iso.time()):i==="duration"?n=n.check(x.iso.duration()):i==="ipv4"?n=n.check(x.ipv4()):i==="ipv6"?n=n.check(x.ipv6()):i==="mac"?n=n.check(x.mac()):i==="cidr"?n=n.check(x.cidrv4()):i==="cidr-v6"?n=n.check(x.cidrv6()):i==="base64"?n=n.check(x.base64()):i==="base64url"?n=n.check(x.base64url()):i==="e164"?n=n.check(x.e164()):i==="jwt"?n=n.check(x.jwt()):i==="emoji"?n=n.check(x.emoji()):i==="nanoid"?n=n.check(x.nanoid()):i==="cuid"?n=n.check(x.cuid()):i==="cuid2"?n=n.check(x.cuid2()):i==="ulid"?n=n.check(x.ulid()):i==="xid"?n=n.check(x.xid()):i==="ksuid"&&(n=n.check(x.ksuid()))}typeof e.minLength=="number"&&(n=n.min(e.minLength)),typeof e.maxLength=="number"&&(n=n.max(e.maxLength)),e.pattern&&(n=n.regex(new RegExp(e.pattern))),o=n;break}case"number":case"integer":{let n=r==="integer"?x.number().int():x.number();typeof e.minimum=="number"&&(n=n.min(e.minimum)),typeof e.maximum=="number"&&(n=n.max(e.maximum)),typeof e.exclusiveMinimum=="number"?n=n.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(n=n.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?n=n.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(n=n.lt(e.maximum)),typeof e.multipleOf=="number"&&(n=n.multipleOf(e.multipleOf)),o=n;break}case"boolean":{o=x.boolean();break}case"null":{o=x.null();break}case"object":{let n={},i=e.properties||{},s=new Set(e.required||[]);for(let[u,l]of Object.entries(i)){let d=G(l,t);n[u]=s.has(u)?d:d.optional()}if(e.propertyNames){let u=G(e.propertyNames,t),l=e.additionalProperties&&typeof e.additionalProperties=="object"?G(e.additionalProperties,t):x.any();if(Object.keys(n).length===0){o=x.record(u,l);break}let d=x.object(n).passthrough(),m=x.looseRecord(u,l);o=x.intersection(d,m);break}if(e.patternProperties){let u=e.patternProperties,l=Object.keys(u),d=[];for(let g of l){let h=G(u[g],t),S=x.string().regex(new RegExp(g));d.push(x.looseRecord(S,h))}let m=[];if(Object.keys(n).length>0&&m.push(x.object(n).passthrough()),m.push(...d),m.length===0)o=x.object({}).passthrough();else if(m.length===1)o=m[0];else{let g=x.intersection(m[0],m[1]);for(let h=2;h<m.length;h++)g=x.intersection(g,m[h]);o=g}break}let c=x.object(n);e.additionalProperties===!1?o=c.strict():typeof e.additionalProperties=="object"?o=c.catchall(G(e.additionalProperties,t)):o=c.passthrough();break}case"array":{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let s=n.map(u=>G(u,t)),c=i&&typeof i=="object"&&!Array.isArray(i)?G(i,t):void 0;c?o=x.tuple(s).rest(c):o=x.tuple(s),typeof e.minItems=="number"&&(o=o.check(x.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(x.maxLength(e.maxItems)))}else if(Array.isArray(i)){let s=i.map(u=>G(u,t)),c=e.additionalItems&&typeof e.additionalItems=="object"?G(e.additionalItems,t):void 0;c?o=x.tuple(s).rest(c):o=x.tuple(s),typeof e.minItems=="number"&&(o=o.check(x.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(x.maxLength(e.maxItems)))}else if(i!==void 0){let s=G(i,t),c=x.array(s);typeof e.minItems=="number"&&(c=c.min(e.minItems)),typeof e.maxItems=="number"&&(c=c.max(e.maxItems)),o=c}else o=x.array(x.any());break}default:throw new Error(`Unsupported type: ${r}`)}return o}function G(e,t){if(typeof e=="boolean")return e?x.any():x.never();let r=Cf(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let c=e.anyOf.map(l=>G(l,t)),u=x.union(c);r=o?x.intersection(r,u):u}if(e.oneOf&&Array.isArray(e.oneOf)){let c=e.oneOf.map(l=>G(l,t)),u=x.xor(c);r=o?x.intersection(r,u):u}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=o?r:x.any();else{let c=o?r:G(e.allOf[0],t),u=o?0:1;for(let l=u;l<e.allOf.length;l++)c=x.intersection(c,G(e.allOf[l],t));r=c}e.nullable===!0&&t.version==="openapi-3.0"&&(r=x.nullable(r)),e.readOnly===!0&&(r=x.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let n={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let c of i)c in e&&(n[c]=e[c]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let c of s)c in e&&(n[c]=e[c]);for(let c of Object.keys(e))$y.has(c)||(n[c]=e[c]);return Object.keys(n).length>0&&t.registry.add(r,n),e.description&&(r=r.describe(e.description)),r}function Rf(e,t){if(typeof e=="boolean")return e?x.any():x.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let o=Iy(r,t?.defaultTarget),n=r.$defs||r.definitions||{},i={version:o,defs:n,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??B};return G(r,i)}var ll={};ye(ll,{bigint:()=>Py,boolean:()=>Ty,date:()=>Ay,number:()=>Oy,string:()=>Ey});function Ey(e){return Cs(Ot,e)}function Oy(e){return Fs(Pt,e)}function Ty(e){return Ws(At,e)}function Py(e){return Js(Nt,e)}function Ay(e){return sc(Sn,e)}F(gr());var Df=a.enum(["SUM","COUNT","MAX","UNIQUE_COUNT","LATEST"]),dl=a.object({d:a.number().int().nonnegative(),w:a.number().int().positive(),c:a.number().nonnegative(),agg:Df.default("COUNT").optional(),valueProperty:a.string().optional(),uniqueProperty:a.string().optional()}),Ny=a.object({kind:a.literal("credential_validity")}),Cy=a.object({kind:a.literal("track_only_bypass")}),Ry=a.object({kind:a.literal("lifecycle_block"),blockOn:a.array(a.string()).default(["SUSPENDED","CANCELLED","INACTIVE"]),code:a.string().default("subscription_inactive")}),Dy=a.object({kind:a.literal("identity_requirement"),require:a.enum(["org_only","org_and_user"]).default("org_only")}),zy=a.object({kind:a.literal("scope"),requireExplicit:a.boolean().default(!0)}),jy=a.object({kind:a.literal("feature_gate"),feature:a.string().min(1).max(120)}),Uy=a.object({kind:a.literal("geo_restriction"),allow:a.array(a.string().length(2).regex(/^[A-Z]{2}$/)).optional(),block:a.array(a.string().length(2).regex(/^[A-Z]{2}$/)).optional()}).refine(e=>e.allow!==void 0||e.block!==void 0,{message:"geo_restriction requires either `allow` or `block`"}),Ly=a.enum(["fixed_window","sliding_window","token_bucket"]),My=dl.extend({kind:a.literal("rate_limit"),m:a.enum(["e","t"]).default("e"),strategy:Ly.default("fixed_window"),bucket_capacity:a.number().positive().optional(),refill_rate_per_second:a.number().positive().optional()}).superRefine((e,t)=>{e.strategy==="token_bucket"?(e.bucket_capacity===void 0&&t.addIssue({code:"custom",message:"token_bucket strategy requires `bucket_capacity` (positive number)",path:["bucket_capacity"]}),e.refill_rate_per_second===void 0&&t.addIssue({code:"custom",message:"token_bucket strategy requires `refill_rate_per_second` (positive number)",path:["refill_rate_per_second"]})):(e.bucket_capacity!==void 0&&t.addIssue({code:"custom",message:`bucket_capacity is only valid when strategy === 'token_bucket' (got '${e.strategy}')`,path:["bucket_capacity"]}),e.refill_rate_per_second!==void 0&&t.addIssue({code:"custom",message:`refill_rate_per_second is only valid when strategy === 'token_bucket' (got '${e.strategy}')`,path:["refill_rate_per_second"]}))}),Fy=a.enum(["fixed_window","sliding_window"]),Zy=dl.extend({kind:a.literal("quota"),ovr:a.enum(["BLOCK","ALLOW_AND_BILL"]),strategy:Fy.default("fixed_window")}),Vy=dl.extend({kind:a.literal("credit_balance"),ovr:a.enum(["BLOCK","ALLOW_AND_BILL"])}),By=a.object({kind:a.literal("concurrency"),capability:a.string().min(1).max(120),limit:a.number().int().positive(),lease_ttl_seconds:a.number().int().positive().max(3600).default(60)}),Hy=a.object({kind:a.literal("capability_limit"),capability:a.string().min(1).max(120),limit:a.union([a.number().int().nonnegative(),a.boolean()])}),Gy=a.object({kind:a.literal("resource_count"),resource:a.string().min(1).max(120),limit:a.number().int().nonnegative(),actionId:a.string().min(1).max(160).optional()}),Ky=a.object({kind:a.literal("reservation"),dimension:a.string().min(1).max(120),max_outstanding:a.number().int().positive(),hold_seconds:a.number().int().positive().max(86400)}),ml=a.discriminatedUnion("kind",[Ny,Cy,Ry,Dy,zy,jy,Uy,My,Zy,Vy,Hy,Gy,By,Ky]);var VO=a.object({keyId:a.string().min(1),orgId:a.string().min(1),actorType:a.enum(["org","user"]).optional(),actorId:a.string().nullable().optional(),productId:a.string().min(1),compiledPlanId:a.string().min(1),entitlementHash:a.string().optional(),subjectKey:a.string().min(1),subscriptionId:a.string().min(1),currentPeriodId:a.string().optional(),currentPeriodStartMs:a.number().optional(),subscriberId:a.string().min(1),apiKeyId:a.string().nullable(),entitlementVersion:a.number(),identityRequirement:a.enum(["org_only","org_and_user"]),status:a.enum(["active","revoked"]),expiresAt:a.number().nullable().optional(),subscriberStatus:a.enum(["ONBOARDING","ACTIVE","SUSPENDED"]),subscriptionStatus:a.string().min(1),environment:a.enum(["production","sandbox"]).optional(),environmentId:a.string().optional(),scopes:a.array(a.string()).readonly().optional(),entitlement:a.record(a.string(),a.unknown()).nullable().optional()});var zf=a.object({unit:a.enum(["requests","tokens","computeMs","dollars"]),window:a.enum(["second","minute","hour","day","week","month"]),capacity:a.number()}),Wy=a.object({id:a.string().min(1),slug:a.string().optional(),transportMode:a.enum(["public_origin","mtls","cloudflare_tunnel"]),verificationRequired:a.boolean().optional(),originUrl:a.string().optional(),originHostname:a.string().optional(),mtlsClientCertRef:a.string().optional(),accessCredentialRef:a.string().optional(),policyVersion:a.string().optional()}),BO=a.object({id:a.string().min(1),origin:a.string().min(1),sandboxOrigin:a.string().nullable().optional(),authHeader:a.string().optional(),pricing:a.object({requests:a.number().optional(),tokens:a.number().optional(),computeMs:a.number().optional(),per_request:a.number().optional()}).catchall(a.number().optional()).optional(),metering:a.object({tokens:a.object({estimatePerRequest:a.number().optional()}).optional(),computeMs:a.object({estimatePerRequest:a.number().optional()}).optional(),billOn4xx:a.boolean().optional()}).optional(),tenantLimits:a.array(zf).readonly().optional(),userLimits:a.array(zf).readonly().optional(),environmentId:a.string().optional(),contextTokenSecret:a.string().nullable().optional(),timeoutMs:a.number().positive().optional(),idleTimeoutMs:a.number().positive().optional(),backends:a.array(Wy).optional(),defaultBackendId:a.string().optional(),verificationRequired:a.boolean().optional()});var qy=a.object({perRequestMinUnitsByDim:a.record(a.string(),a.number()).optional(),creditPoolMicros:a.number().optional(),perDimUnitCostMicros:a.record(a.string(),a.number()).optional()}),Jy=a.object({source:a.enum(["fixed","provider_catalog","upstream_reported","external_rate_api","custom"]),meterKey:a.string(),selector:a.string().optional(),measures:a.array(a.string()),catalog:a.string().optional(),pricePolicy:a.string().optional(),markupPercent:a.number().optional(),amountField:a.string().optional(),resolver:a.string().optional(),fixedRatesMicros:a.record(a.string(),a.record(a.string(),a.number())).optional()}),Yy=a.object({key:a.string(),display:a.string(),unit:a.string().optional(),aggregation:a.enum(["SUM","COUNT","MAX","UNIQUE_COUNT","LATEST"]),window:a.enum(["minute","hour","day","month","billing_period"]),enforcementType:a.string()}),Xy=a.object({feature:a.string(),method:a.string(),path:a.string(),meters:a.array(a.string()).optional()}),HO=a.object({v:a.number(),sub:a.string(),compiledPlanId:a.string().min(1),planType:a.string(),ts:a.number(),constraints:a.array(ml),cv:a.number(),dm:a.record(a.string(),a.number()),dmv:a.number().optional(),floor:qy.nullable().optional(),displayDims:a.array(a.number()).optional(),meterSemantics:a.record(a.string(),Yy).optional(),rp:a.record(a.string(),Jy).optional(),fr:a.array(Xy).optional(),sig:a.string().min(1),sigKid:a.string().optional(),environmentId:a.string().optional()}).passthrough();var GO=a.object({subscriptionId:a.string().min(1),activePeriodId:a.string().optional(),activeCompiledPlanId:a.string().min(1),activeEntitlementHash:a.string().optional(),enforcementMode:a.enum(["STRICT","GRACE","TRACK_ONLY"]),gracePeriodEndsAt:a.string().optional(),trialEndsAt:a.string().optional(),overrides:a.object({maxMonthlySpendCents:a.number().optional(),limitOverrides:a.record(a.string(),a.number()).optional(),featureGateOverrides:a.record(a.string(),a.boolean()).optional()}).optional(),scheduledTransition:a.object({kind:a.string(),timing:a.string(),scheduledFor:a.string(),toCompiledPlanId:a.string().nullable()}).optional(),creditPool:a.object({periodStartMs:a.number(),periodEndMs:a.number(),grantedCents:a.number(),policy:a.enum(["block","allow"]),epoch:a.number()}).optional(),resourceCounts:a.record(a.string(),a.number()).optional(),dedicatedShard:a.enum(["ACTIVE","DRAINING"]).optional(),generation:a.number(),updatedAt:a.string()});var Qy=["DRAFT","ACTIVE"],qO=a.enum(Qy),ex=["ONBOARDING","ACTIVE","SUSPENDED"],jf=a.enum(ex),tx=["ACTIVE","REVOKED"],JO=a.enum(tx),nx=["BLOCK","ALLOW_AND_BILL"],Uf=a.enum(nx),rx=["ACTIVE","ARCHIVED"],YO=a.enum(rx),ix=["ACTIVE","EXPERIMENTAL","LEGACY_STABLE","PHASING_OUT","SUPERSEDED","ARCHIVED"],XO=a.enum(ix);var Ei=[{id:"requests",label:"API requests",description:"Count every call \u2014 the right default for most APIs.",meters:[{key:"requests",display:"Requests",unit:"request"}]},{id:"ai-tokens",label:"AI tokens",description:"LLM-style token metering alongside calls. The gateway can estimate tokens per request and settle actuals from @farthershore/metering reports.",meters:[{key:"requests",display:"Requests",unit:"request"},{key:"tokens_used",display:"Tokens Used",unit:"token"}]},{id:"credits",label:"Credits",description:"Price work in abstract credits (e.g. one image = 5 credits). Report each call's dynamic credit cost through @farthershore/metering.",meters:[{key:"requests",display:"Requests",unit:"request"},{key:"credits",display:"Credits",unit:"credit"}]},{id:"spend",label:"Metered spend",description:"Pass-through spend in cents (OpenRouter-style) reported through @farthershore/metering. Pairs with prepaid credit wallets.",meters:[{key:"requests",display:"Requests",unit:"request"},{key:"dollars",display:"Spend",unit:"cent"}]},{id:"compute",label:"Compute time",description:"Bill milliseconds of compute, settled from @farthershore/metering reports.",meters:[{key:"requests",display:"Requests",unit:"request"},{key:"compute_ms",display:"Compute Time",unit:"ms"}]}];function Lf(e){let t=e.trim().toLowerCase();return Ei.find(r=>r.id===t)}function Mf(){return Ei.map(e=>e.id)}var ox="FS_RUNTIME_TOKEN";var ax={payload:"x-fs-metering",signature:"x-fs-metering-sig",token:"x-fs-metering-token"};var nT={environmentVariable:ox,presentation:ax.token,storage:"sha256-hash-only"};var rT=10*1024*1024;var sx=["CHECKOUT_COMPLETED","PLAN_CHANGED","CANCELLED","RESTORED","UNSCHEDULED_CANCELLATION","PRICE_ROLLOVER","PAUSED","RESUMED","PLAN_CHANGE_SCHEDULED","PLAN_CHANGE_ABORTED","SCHEDULE_CREATED","SCHEDULE_UPDATED","SCHEDULE_RELEASED","SCHEDULE_COMPLETED","SCHEDULE_ABORTED","CANCEL_SCHEDULED","PAYMENT_FAILED","PAYMENT_RECOVERED","PAYMENT_RECOVERED_FROM_SUSPENDED","PAYMENT_ACTION_REQUIRED","RECURRING_PAYMENT","REFUND_PROCESSED","DISPUTE_OPENED","DISPUTE_FUNDS_WITHDRAWN","DISPUTE_CLOSED"],aT=a.enum(sx);var lT=a.object({fontFamily:a.enum(["sans","serif","mono","system"]).optional(),radius:a.enum(["none","sm","md","lg","full"]).optional(),density:a.enum(["compact","default","comfortable"]).optional(),colorScheme:a.enum(["system","light","dark"]).optional()}).strict().optional();var cx=a.object({d:a.number(),w:a.number(),capacity:a.number(),remaining:a.number(),windowStart:a.number(),windowEnd:a.number()}),ux=a.record(a.string(),cx),lx=a.object({allocations:a.array(a.number()),expiresAt:a.number()}),dx=a.record(a.string(),lx),mx=a.record(a.string(),a.bigint()),gT=a.object({subscriptionId:a.string(),handoffToken:a.string(),targetShardId:a.string(),policyVersion:a.number(),entitlementVersion:a.number().nullable(),windowStates:ux,activeLeases:dx,totalsByDimension:mx.optional(),billingCycleId:a.string().nullable().optional(),billingCycleStartMs:a.number().optional()});var px={gatewayProjectRead:"gateway:project:read",usageWrite:"usage:write",authzDeniedWrite:"authz-denied:write",reservationAuthorize:"reservation:authorize",reservationFinalize:"reservation:finalize",internalCronRun:"internal:cron:run",personaManage:"persona:manage"},yT=Object.values(px);var fx=["managed_frontend","custom_frontend","embedded_sdk","public_api","cli","agent","webhook","admin","internal"],Zf=a.enum(fx),Ff=a.string().min(1).max(128),gx=a.object({d:a.number().int().nonnegative(),w:a.number().int().positive(),rem:a.number(),cap:a.number()}).strict(),Vf=a.object({v:a.literal(1),entV:a.number().int().nonnegative().optional(),entHash:Ff.optional(),featureGrant:a.boolean().optional(),gates:a.array(Ff).max(16).optional(),limits:a.array(gx).max(16).optional()}).strict();var hx=a.object({requestId:a.string(),eventId:a.string(),tenantId:a.string(),slug:a.string(),subscriptionId:a.string(),subscriberId:a.string(),apiKeyId:a.string().nullable(),compiledPlanId:a.string(),subscriberStatus:jf,subscriptionStatus:a.string(),productId:a.string(),statusCode:a.number(),path:a.string(),latencyMs:a.number(),rawDimsUnits:a.record(a.string(),a.number()),meterSettlements:a.array(a.object({meterId:a.string(),meterType:a.enum(["exact_pre_request","estimated_then_settled","postpaid","strict_concurrency"]),reserved:a.number(),actual:a.number(),delta:a.number(),dimension:a.number().int().nonnegative(),leaseId:a.string()})).optional(),reportingAttested:a.boolean(),billable:a.boolean(),measureContext:a.record(a.string(),a.unknown()).optional(),creditUnitsConsumed:a.record(a.string(),a.number()).optional(),timestamp:a.number(),environmentId:a.string().nullable().optional(),orgId:a.string().optional(),actorType:a.enum(["org","user"]).optional(),actorId:a.string().nullable().optional(),subjectKey:a.string().optional(),overageBehavior:Uf.optional(),environment:a.enum(["production","sandbox"]).optional(),surface:Zf.optional(),actionId:a.string().min(1).max(128).optional(),subjectType:a.string().min(1).max(128).optional(),subjectId:a.string().min(1).max(256).optional(),decision:Vf.optional(),leaseId:a.string(),transactionId:a.string(),gatewayMetadata:a.object({shardId:a.string(),policyVersion:a.number().int().nonnegative().optional(),artifactVersion:a.number().int().nonnegative().default(0),artifactHash:a.string().regex(/^sha256_[a-f0-9]{64}$/).optional(),leaseTelemetry:a.object({consumeRequests:a.number().int().nonnegative(),localLeaseHits:a.number().int().nonnegative(),doAllocationAttempts:a.number().int().nonnegative(),doAllocationGrants:a.number().int().nonnegative(),doAllocationDenials:a.number().int().nonnegative(),doUnavailable:a.number().int().nonnegative(),doCircuitOpen:a.number().int().nonnegative(),leaseRefreshSingleflightJoins:a.number().int().nonnegative(),leaseRefreshSingleflightJoinRate:a.number().min(0).max(1),expiredLeasesReaped:a.number().int().nonnegative(),expiredLeaseReclaimedGrant:a.array(a.number().nonnegative()),reconcileRequests:a.number().int().nonnegative(),reconcilePositiveDeltas:a.number().int().nonnegative(),reconcileNoLocalLease:a.number().int().nonnegative(),doReconcileAttempts:a.number().int().nonnegative(),doReconcileFailures:a.number().int().nonnegative(),unspentLeaseRemainderReturns:a.number().int().nonnegative(),unspentLeaseRemainderReturnFailures:a.number().int().nonnegative(),unspentLeaseRemainderReturnedGrant:a.array(a.number().nonnegative()),maxObservedPositiveReconcileDelta:a.array(a.number().nonnegative()),requestToDoRatio:a.number().nonnegative(),localLeaseHitRate:a.number().min(0).max(1),localSpendRate:a.number().min(0).max(1),maxObservedActiveLeases:a.number().int().nonnegative(),maxObservedOutstandingGrant:a.array(a.number().nonnegative()),maxObservedOutstandingGrantRatio:a.number().nonnegative(),maxObservedEmergencyReserveGrant:a.array(a.number().nonnegative()),maxObservedEmergencyReserveGrantRatio:a.number().nonnegative(),maxObservedLeaseGrant:a.array(a.number().nonnegative()),maxObservedLeaseGrantRatio:a.number().nonnegative(),maxObservedLeaseTtlMs:a.number().int().nonnegative()}).optional(),artifactCacheTelemetry:a.object({reads:a.number().int().nonnegative(),l0FreshHits:a.number().int().nonnegative(),l0Misses:a.number().int().nonnegative(),l0StaleServes:a.number().int().nonnegative(),l0StaleIfErrorServes:a.number().int().nonnegative(),l0BlockingRefreshes:a.number().int().nonnegative(),l0SingleflightJoins:a.number().int().nonnegative(),l0EarlyRefreshes:a.number().int().nonnegative(),l1Hits:a.number().int().nonnegative(),l1Misses:a.number().int().nonnegative(),l1Rejected:a.number().int().nonnegative(),l1WriteFailures:a.number().int().nonnegative(),kvHits:a.number().int().nonnegative(),kvMisses:a.number().int().nonnegative(),kvTimeouts:a.number().int().nonnegative(),kvCircuitOpenReads:a.number().int().nonnegative(),resultHits:a.number().int().nonnegative(),resultMisses:a.number().int().nonnegative(),resultDenied:a.number().int().nonnegative(),resultUnavailable:a.number().int().nonnegative(),backgroundRefreshErrors:a.number().int().nonnegative(),l0HitRate:a.number().min(0).max(1),l0SingleflightJoinRate:a.number().min(0).max(1),l0EarlyRefreshRate:a.number().min(0).max(1),l1HitRate:a.number().min(0).max(1),kvHitRate:a.number().min(0).max(1),resultHitRate:a.number().min(0).max(1),staleServeRate:a.number().min(0).max(1)}).optional(),gatewayVersion:a.string()}).passthrough()}).passthrough();var _x=a.object({path:a.string(),code:a.string(),message:a.string()}),TT=a.object({reason:a.literal("schema_validation_failed"),receivedAt:a.string(),rawPayload:a.unknown(),issues:a.array(_x),consumerVersion:a.string().optional(),originalMessageId:a.string().optional()});var pl=["subscription.created","subscription.updated","subscription.canceled","payment.succeeded","payment.failed","rate_limit.exceeded","entitlement.changed","usage.threshold_reached"],Ct=a.enum(pl);var ue=a.enum(["preserve_current_period","switch_immediately","switch_immediately_prorate","new_subscribers_only"]),Pn=a.object({default:ue.default("preserve_current_period"),proration:a.enum(["none","prorate","credit"]).default("none"),when:a.object({price_increase:ue.optional(),price_decrease:ue.optional(),feature_added:ue.optional(),feature_removed:ue.optional(),limit_increased:ue.optional(),limit_reduced:ue.optional(),credit_increased:ue.optional(),credit_reduced:ue.optional(),rating_changed:ue.optional()}).strict().default({price_increase:"preserve_current_period",price_decrease:"switch_immediately",feature_added:"switch_immediately",feature_removed:"preserve_current_period",limit_increased:"switch_immediately",limit_reduced:"preserve_current_period",credit_increased:"switch_immediately",credit_reduced:"preserve_current_period",rating_changed:"preserve_current_period"}),allowImmediatePriceIncrease:a.boolean().default(!1),allowImmediateEntitlementReduction:a.boolean().default(!1)}).strict().superRefine((e,t)=>{let r=new Set(["switch_immediately","switch_immediately_prorate"]);r.has(e.when.price_increase??e.default)&&!e.allowImmediatePriceIncrease&&t.addIssue({code:"custom",path:["when","price_increase"],message:"price_increase cannot switch immediately without allowImmediatePriceIncrease: true"});for(let o of["feature_removed","limit_reduced","credit_reduced"])r.has(e.when[o]??e.default)&&!e.allowImmediateEntitlementReduction&&t.addIssue({code:"custom",path:["when",o],message:`${o} cannot switch immediately without allowImmediateEntitlementReduction: true`})});var vx=a.object({kind:a.literal("recurring"),amount_cents:a.number().int().nonnegative()}),bx=a.object({kind:a.literal("one_time"),amount_cents:a.number().int().nonnegative()}),yx=a.object({kind:a.literal("promotional"),amount_cents:a.number().int().nonnegative(),label:a.string().min(1).max(120),expires_after_days:a.number().int().positive().optional()}),xx=a.object({kind:a.literal("trial")}),kx=a.object({kind:a.literal("rollover"),percent:a.number().int().min(0).max(100)}),Sx=a.object({kind:a.literal("top_up"),sku:a.string().min(1).max(120),label:a.string().min(1).max(200),price_cents:a.number().int().positive(),credit_cents:a.number().int().positive()}),$x=a.object({kind:a.literal("auto_recharge"),threshold_cents:a.number().int().nonnegative(),refill_cents:a.number().int().positive()}),le=a.discriminatedUnion("kind",[vx,bx,yx,xx,kx,Sx,$x]);function fl(e,t,r=["grants"]){if(!e)return;let o=0,n=0;for(let i of e)i.kind==="recurring"?o+=1:i.kind==="one_time"&&(n+=1);o>1&&t.addIssue({code:"custom",message:"At most one `recurring` grant is allowed \u2014 recurring credit is a single canonical entry.",path:r}),n>1&&t.addIssue({code:"custom",message:"At most one `one_time` grant is allowed \u2014 one-time credit is a single canonical entry.",path:r})}function Ix(e){let t=[];return e.grants&&e.grants.length>0&&t.push(...e.grants),(e.trial_days??0)>0&&!t.some(r=>r.kind==="trial")&&t.push({kind:"trial"}),t}function Bf(e,t){return Ix(e).find(r=>r.kind===t)}function An(e){return Bf(e,"recurring")?.amount_cents??0}function Rt(e){return Bf(e,"one_time")?.amount_cents??0}var Hf=a.enum(["linear","active_count"]);var wx=a.object({up_to:a.number().int().positive().nullable(),price_per_unit_micros:a.number().int().nonnegative()}),Ex=a.object({strategy:a.enum(["graduated","volume"]),tiers:a.array(wx).min(1).max(20)}),de=a.object({dimension:a.string().min(1).max(64).regex(/^[a-z0-9_]+$/,"Meter dimension must be lowercase alphanumeric with underscores"),kind:Hf.default("linear"),price_per_unit_micros:a.number().int().nonnegative().default(0),tiered:Ex.optional(),included_units:a.number().int().positive().optional()}).superRefine((e,t)=>{if(e.tiered&&e.price_per_unit_micros>0&&t.addIssue({code:"custom",message:"`tiered` is mutually exclusive with a non-zero `price_per_unit_micros` \u2014 drop one",path:["tiered"]}),e.included_units!==void 0&&e.tiered&&t.addIssue({code:"custom",message:"`included_units` is mutually exclusive with `tiered` \u2014 a tiered schedule already expresses the included allotment as a zero-priced first tier",path:["included_units"]}),e.tiered){let r=0,o=!1;for(let n=0;n<e.tiered.tiers.length;n++){let i=e.tiered.tiers[n];if(o){t.addIssue({code:"custom",message:"Open-ended tier (`up_to: null`) must be the final tier",path:["tiered","tiers",n,"up_to"]});break}if(i.up_to===null){o=!0;continue}i.up_to<=r&&t.addIssue({code:"custom",message:`Tier upper bounds must be strictly ascending (tier ${n} = ${i.up_to} <= previous ${r})`,path:["tiered","tiers",n,"up_to"]}),r=i.up_to}o||t.addIssue({code:"custom",message:"The final tier of a `tiered` schedule must be open-ended (`up_to: null`)",path:["tiered","tiers",e.tiered.tiers.length-1,"up_to"]})}}),we=a.enum(["month","year"]),Ox=a.object({meters:a.array(de).default([]),recurring_fee_cents:a.number().int().nonnegative().default(0),billing_interval:we.default("month"),grants:a.array(le).max(40).default([]),trial_days:a.number().int().nonnegative().default(0),max_monthly_spend_cents:a.number().int().nonnegative().optional()});var Tx=a.string().min(1),Px=a.object({type:a.literal("named"),name:a.enum(["second","minute","hour","day","week","month"])}),Ax=a.object({type:a.literal("custom"),seconds:a.number().int().positive(),label:a.string().optional()}),Nx=a.discriminatedUnion("type",[Px,Ax]),je=a.object({dimension:Tx,window:Nx,capacity:a.number().nonnegative(),enforcement:a.enum(["enforce","track"]).optional(),acknowledgeUnreachable:a.boolean().optional()}),FT=a.array(je).max(20);var Cx=a.enum(["NONE","PRORATE","CREDIT"]).default("NONE"),Rx={meters:a.array(de).default([]),recurring_fee_cents:a.number().int().nonnegative().default(0),billing_interval:we.default("month"),trial_days:a.number().int().nonnegative().default(0),max_monthly_spend_cents:a.number().int().nonnegative().optional(),min_monthly_spend_cents:a.number().int().nonnegative().optional(),grants:a.array(le).max(40).default([])},Dx={meters:a.array(de).optional(),recurring_fee_cents:a.number().int().nonnegative().optional(),billing_interval:we.optional(),trial_days:a.number().int().nonnegative().optional(),max_monthly_spend_cents:a.number().int().nonnegative().optional(),min_monthly_spend_cents:a.number().int().nonnegative().optional(),grants:a.array(le).max(40).optional()},zx=a.object({id:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Variant id must be lowercase alphanumeric with hyphens/underscores"),label:a.string().max(200).optional(),rolloutPercent:a.number().int().min(0).max(100),assignmentSeed:a.string().min(1).max(100).default("default"),prorationOnRollback:Cx,...Dx,limits:a.array(je).max(20).optional(),featureGates:a.record(a.string(),a.boolean()).optional(),capability_limits:a.record(a.string().min(1).max(120),a.union([a.number().int().nonnegative(),a.boolean()])).optional(),overageBehavior:a.enum(["block","allow_and_bill"]).optional()}),Gf=zx.superRefine((e,t)=>{fl(e.grants,t)}),Kf=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Plan key must be lowercase alphanumeric with hyphens/underscores"),name:a.string().min(1).max(100),description:a.string().max(500).optional(),details:a.array(a.string().max(200)).max(10).optional(),...Rx,free:a.boolean().default(!1),limits:a.array(je).max(20).default([]),featureGates:a.record(a.string(),a.boolean()).optional(),capability_limits:a.record(a.string().min(1).max(120),a.union([a.number().int().nonnegative(),a.boolean()])).default({}),overageBehavior:a.enum(["block","allow_and_bill"]).default("block"),selfServeEnabled:a.boolean().default(!0),legacy:a.boolean().optional().default(!1),variants:a.array(Gf).max(4).optional(),archive:a.object({at:a.string().datetime().optional(),transitionTo:a.string().optional(),strategy:a.enum(["auto","explicit","block"]).default("auto")}).optional()}),Oi=Kf.superRefine((e,t)=>{fl(e.grants,t)});var jx=/^\$\{[A-Z][A-Z0-9_]{0,127}\}$/,gl=a.string().min(3).max(200).refine(e=>jx.test(e),{message:"secret must use ${VAR} interpolation syntax (e.g. ${WEBHOOK_SECRET}); raw secrets in YAML are rejected. Define the env var in the per-product secret store and reference it here."}),hl=a.object({maxAttempts:a.number().int().min(1).max(20).default(5),backoff:a.enum(["exponential","fixed"]).default("exponential")}),_l=a.object({id:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Webhook endpoint id must be lowercase alphanumeric with hyphens/underscores"),url:a.string().url("webhooks.endpoints[].url must be a valid URL"),secret:gl,events:a.array(Ct).min(1,"webhooks.endpoints[].events must subscribe to \u2265 1 event"),enabled:a.boolean().default(!0),retryPolicy:hl.default({maxAttempts:5,backoff:"exponential"})}),vl=a.object({endpoints:a.array(_l).max(50).default([])});var Ux=a.object({meters:a.array(de).optional(),recurring_fee_cents:a.number().int().nonnegative().optional(),billing_interval:we.optional(),grants:a.array(le).max(40).optional(),trial_days:a.number().int().nonnegative().optional(),max_monthly_spend_cents:a.number().int().nonnegative().optional(),limits:a.array(je).max(20).optional(),featureGates:a.record(a.string(),a.boolean()).optional(),overageBehavior:a.enum(["block","allow_and_bill"]).optional(),selfServeEnabled:a.boolean().optional(),legacy:a.boolean().optional()}).strict(),Lx=a.object({url:a.string().url().optional(),secret:gl.optional(),events:a.array(Ct).optional(),enabled:a.boolean().optional(),retryPolicy:hl.partial().optional()}).strict(),Mx=a.object({plans:a.record(a.string(),Ux).optional(),webhooks:a.object({endpoints:a.record(a.string(),Lx).optional()}).strict().optional()}).strict(),bl=a.record(a.string().min(1).max(64),Mx);var Wf=1,qf=["plans_table","usage_card","api_keys_panel","billing_summary","credit_balance","feature_panel","product_docs","audit_log","team_panel","markdown"],Jf=["/","/pricing","/dashboard","/dashboard/*","/settings","/settings/*","/team","/audit-log","/docs","/docs/*","/terms","/privacy","/persona","/persona-sign-in"],Yf=a.string().min(1).max(200).regex(/^\/[a-zA-Z0-9_./-]*$/,"path must start with / and contain only [a-zA-Z0-9_./-]"),yl=a.string().min(1).max(120).regex(/^[a-z0-9_-]+$/),Xf=a.object({label:a.string().min(1).max(80),path:Yf,capability:yl.optional()}),Qf=a.enum(qf),eg=a.object({component:Qf,props:a.record(a.string().min(1).max(80),a.unknown()).optional(),capability:yl.optional(),gateMode:a.enum(["hide","disable","upsell"]).default("hide")}),tg=a.object({path:Yf,title:a.string().min(1).max(120),requiresAuth:a.boolean(),capability:yl.optional(),components:a.array(eg).max(12).default([])}),xl=a.object({version:a.literal(Wf),nav:a.array(Xf).max(12).default([]),pages:a.array(tg).max(24).default([])}).superRefine((e,t)=>{let r=new Set;e.pages.forEach((o,n)=>{r.has(o.path)&&t.addIssue({code:"custom",message:`duplicate frontend page path "${o.path}"`,path:["pages",n,"path"]}),r.add(o.path),ng(o.path)&&t.addIssue({code:"custom",message:`frontend page path "${o.path}" is reserved by the template`,path:["pages",n,"path"]})})});function ng(e){return Jf.some(t=>{if(t.endsWith("/*")){let r=t.slice(0,-2);return e===r||e.startsWith(`${r}/`)}return e===t})}var kl=a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Plan key must be lowercase alphanumeric with hyphens/underscores"),rg=a.string().min(1).max(100),Fx=a.object({plan:kl,version:rg.optional()}),Zx=a.object({plan:kl,version:a.literal("head").default("head")}),Vx=a.object({plan:kl,version:rg}),ig=a.enum(["grandfather","next_renewal","by_date","immediate","opt_in"]),og=a.enum(["none","prorate","credit"]),ag=a.object({effective:ig,date:a.string().datetime().optional(),proration:og.optional()}).superRefine((e,t)=>{e.effective==="by_date"&&e.date===void 0&&t.addIssue({code:"custom",path:["date"],message:"existingCustomers.date is required when effective is by_date"})}),sg=a.object({subscriber:a.string().min(1).max(200),pinTo:Vx,until:a.string().datetime().optional(),notes:a.string().max(1e3).optional()}),cg=a.object({id:a.string().min(1).max(120).regex(/^[a-z0-9][a-z0-9_.-]*$/,"Migration id must be lowercase alphanumeric with dots, hyphens, or underscores"),from:Fx,to:Zx,newCustomers:a.literal("immediate").default("immediate"),existingCustomers:ag,pins:a.array(sg).max(50).default([])}),Sl=a.array(cg).superRefine((e,t)=>{let r=new Set;e.forEach((o,n)=>{r.has(o.id)&&t.addIssue({code:"custom",path:[n,"id"],message:`duplicate migration id "${o.id}"`}),r.add(o.id)})});var ug=a.enum(["subscription","subject"]),lg=a.enum(["reported","action_inferred"]),dg=a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/),mg=a.object({name:dg,display:a.string().min(1).max(120).optional(),scope:ug.default("subscription"),subjectType:a.string().min(1).max(64).regex(/^[a-zA-Z0-9_.:-]+$/).optional(),countSource:lg.default("reported")}).superRefine((e,t)=>{e.scope==="subject"&&!e.subjectType&&t.addIssue({code:"custom",path:["subjectType"],message:"subjectType is required when resource scope is subject"}),e.scope==="subscription"&&e.subjectType&&t.addIssue({code:"custom",path:["subjectType"],message:"subjectType is only valid for subject-scoped counted resources"})}),$l=a.array(mg).max(100).default([]);var Bx=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"AddOn key must be lowercase alphanumeric with hyphens/underscores"),name:a.string().min(1).max(100),description:a.string().max(500).optional(),recurring_fee_cents:a.number().int().nonnegative().default(0),billing_interval:we.default("month"),meters:a.array(de).default([]),grants:a.array(le).max(40).default([]),capability_limits:a.record(a.string().min(1).max(120),a.union([a.number().int().nonnegative(),a.boolean()])).default({}),featureGates:a.record(a.string(),a.boolean()).optional(),selfServeEnabled:a.boolean().default(!0)}),pg=a.record(a.string().min(1).max(64),Bx).default({}),Hx=a.enum(["active","canceled","paused","pending_activation"]),pP=a.object({addOnKey:a.string().min(1).max(64),status:Hx.default("active"),activatedAt:a.string().datetime().optional(),canceledAt:a.string().datetime().nullable().optional(),stripeSubscriptionItemId:a.string().optional()});var fg=/^[a-z0-9][a-z0-9_-]*$/,Il=a.string().min(1).max(64).regex(fg,"backend id must be a lowercase slug ([a-z0-9][a-z0-9_-]*)"),gg=a.enum(["public_origin","mtls","cloudflare_tunnel"]),hg=a.enum(["managed_cloudflared","sidecar"]);var _g=a.object({mode:gg.default("public_origin"),runner:hg.optional()}).strict(),vg=a.object({required:a.boolean().default(!1)}).strict(),bg=a.object({name:a.string().min(1).max(120).optional(),slug:Il.optional(),transport:_g.default({mode:"public_origin"}),verification:vg.default({required:!1}),meters:a.array(a.string().min(1).max(64)).max(100).optional(),default:a.boolean().optional(),originUrl:a.string().url().optional(),originHostname:a.string().min(1).max(255).optional()}).strict(),wl=a.record(Il,bg),Dt=Il,zt={unknownBackendInRoute:"UNKNOWN_BACKEND_IN_ROUTE",ambiguousDefaultBackend:"AMBIGUOUS_DEFAULT_BACKEND",routeMeterNotAllowedByBackend:"ROUTE_METER_NOT_ALLOWED_BY_BACKEND",unknownMeterInBackend:"UNKNOWN_METER_IN_BACKEND"};function El(e){let t=Object.keys(e??{});if(t.length===0)return{defaultId:null,ambiguous:!1};if(t.length===1)return{defaultId:t[0],ambiguous:!1};let r=t.filter(o=>e[o]?.default===!0);return r.length===1?{defaultId:r[0],ambiguous:!1}:{defaultId:null,ambiguous:!0}}var Gx=a.string().min(2).max(20).regex(/^\d+(ms|s|m|h)$/,"rate_limit window must look like `60s`, `5m`, `1h`"),yg=a.object({strategy:a.enum(["token_bucket","sliding_window","fixed_window"]).default("token_bucket"),dimensions:a.array(a.enum(["subscription","credential","ip","route"])).min(1).max(4).default(["subscription"]),limits:a.array(a.object({window:Gx,max:a.number().int().positive().max(1e7)})).min(1).max(10),fail_open:a.object({max_consecutive_failures:a.number().int().positive().default(100),max_window_seconds:a.number().int().positive().default(60),recovery_threshold:a.number().int().positive().default(50),degraded_mode:a.enum(["safe_mode_block","safe_mode_throttle","runtime_killswitch_trigger"]).default("safe_mode_throttle")}).default({max_consecutive_failures:100,max_window_seconds:60,recovery_threshold:50,degraded_mode:"safe_mode_throttle"})}),xg=a.object({header_name:a.string().min(1).max(100).default("x-api-key"),upstream_token_source:a.discriminatedUnion("type",[a.object({type:a.literal("none")}),a.object({type:a.literal("static_bearer"),token_secret_ref:a.string().min(1).max(200).describe("Reference into the secret store (e.g. CF Secret name); not the raw token")})]).default({type:"none"}),scope_mode:a.enum(["strict","advisory","off"]).default("strict")}),kg=a.object({max_in_flight:a.number().int().positive().max(1e4),dimensions:a.array(a.enum(["subscription","credential","capability"])).min(1).max(3).default(["subscription"]),capability:a.string().min(1).max(120).optional(),lease_ttl_seconds:a.number().int().positive().max(600).default(30),fail_open:a.object({max_consecutive_failures:a.number().int().positive().default(50),max_window_seconds:a.number().int().positive().default(60),recovery_threshold:a.number().int().positive().default(20),degraded_mode:a.enum(["safe_mode_block","safe_mode_throttle","runtime_killswitch_trigger"]).default("safe_mode_throttle")}).default({max_consecutive_failures:50,max_window_seconds:60,recovery_threshold:20,degraded_mode:"safe_mode_throttle"})}),Sg=a.object({max_attempts:a.number().int().min(1).max(5).default(2),retry_on_status:a.array(a.number().int().min(400).max(599)).min(1).max(20).default([502,503,504]),backoff:a.object({initial_ms:a.number().int().positive().max(5e3).default(100),multiplier:a.number().positive().max(10).default(2),jitter:a.enum(["none","full","equal"]).default("equal"),total_budget_ms:a.number().int().positive().max(3e4).default(5e3)}).default({initial_ms:100,multiplier:2,jitter:"equal",total_budget_ms:5e3})}),$g=a.object({applies_to:a.enum(["request","response","both"]).default("request"),rewrites:a.array(a.object({source:a.string().min(1).max(200),target:a.string().min(1).max(200).nullable()})).min(1).max(20)});var Ol=a.discriminatedUnion("type",[a.object({type:a.literal("rate_limit"),config:yg}),a.object({type:a.literal("auth"),config:xg}),a.object({type:a.literal("concurrency"),config:kg}),a.object({type:a.literal("retry"),config:Sg}),a.object({type:a.literal("transform"),config:$g})]);var Ti=a.enum(["long","short","blocking"]).default("long"),Ig=a.object({route_types:a.array(a.enum(["http"])).max(5).optional(),meters:a.array(a.string().min(1).max(64)).max(20).optional(),auth_modes:a.array(a.enum(["api_key","oauth2","anonymous"])).max(5).optional()});var Tl=a.intersection(a.object({name:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Policy name must be lowercase alphanumeric with hyphens/underscores"),description:a.string().max(500).optional(),compatible_with:Ig.default({}),mutation_class:a.enum(["runtime","contractual"]).default("runtime"),cacheProfile:Ti}),Ol);var Kx=a.enum(["query","mutation"]),Wx=a.enum(["none","metadata","full"]),qx=a.object({type:a.string().min(1).max(64).regex(/^[a-zA-Z0-9_.:-]+$/),from:a.enum(["header","path_param"]),name:a.string().min(1).max(120)}),Jx=a.object({resource:a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/),effect:a.enum(["create","delete"])}),wg=a.object({id:a.string().min(1).max(160).regex(/^[a-z0-9_.:-]+$/),title:a.string().min(1).max(160).optional(),kind:Kx,actorType:a.string().min(1).max(64).regex(/^[a-zA-Z0-9_.:-]+$/).optional(),subject:qx.optional(),inputSchemaRef:a.string().min(1).max(240).optional(),audit:Wx.default("metadata"),resource:Jx.optional()});var Eg=a.object({method:a.enum(["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS","*"]).default("*"),path:a.string().min(1).max(500).regex(/^\/[a-zA-Z0-9_/:.{}*-]*$/,"path must start with / and contain only [a-zA-Z0-9_/:.{}*-]")});function Yx(e){let t=e.trim();if(!t)return!1;let[r,o,n]=t.split("-");if(n!==void 0||!/^\d{3}$/.test(r??""))return!1;let i=Number(r),s=o===void 0?i:Number(o);return o!==void 0&&!/^\d{3}$/.test(o)?!1:i>=100&&i<=599&&s>=100&&s<=599&&i<=s}function Og(e){return e.split(",").every(Yx)}var Pi=a.union([a.string().min(1).max(100).refine(Og,{message:"onStatusCodes must be comma-separated HTTP status codes or numeric ranges, e.g. 200-299,304"}),a.array(a.number().int().min(100).max(599)).min(1).max(100)]),Tg=a.object({match:Eg,metering:a.object({defaults:a.record(a.string().min(1).max(64),a.number().finite().nonnegative()).optional(),reports:a.array(a.string().min(1).max(64)).max(20).optional(),estimates:a.record(a.string().min(1).max(64),a.number().finite().nonnegative()).optional(),onStatusCodes:Pi.optional()}).optional(),unmetered:a.boolean().optional(),inheritDefaultMeters:a.boolean().optional(),action:a.string().min(1).max(160).regex(/^[a-z0-9_.:-]+$/).optional(),backend:Dt.optional()}).strict(),Pg=a.object({override_origin:a.string().url("override_origin must be a valid URL").nullable().default(null)}),Ag=a.object({rollout_key:a.string().min(1).max(120).regex(/^[a-z0-9_-]+$/,"rollout_key must be lowercase alphanumeric with hyphens/underscores").optional(),required_flags:a.array(a.string().min(1).max(120).regex(/^[a-z0-9_-]+$/)).max(10).optional()}),Pl=a.object({feature:a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/,"feature key must be lowercase alphanumeric with [_.:-]"),description:a.string().max(500).optional(),mutation_class:a.enum(["runtime","contractual"]).default("contractual"),cacheProfile:Ti,routes:a.array(Tg).min(1).max(50),upstream:Pg.default({override_origin:null}),policies:a.array(a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/)).max(20).default([]),runtime:Ag.default({}),plans:a.array(a.string().min(1).max(64)).max(20).default([]),actions:a.array(wg).max(100).optional(),backend:Dt.optional()}).strict();function Ng(e,t){e.usagePricing!==void 0&&t.addIssue({code:"custom",path:["usagePricing"],message:"usagePricing is not supported. Define usage.meters.<key>.rating instead."})}function Cg(e,t){e.filter(o=>o.free).length>1&&t.addIssue({code:"custom",path:["plans"],message:"Only one free plan is allowed per product"}),e.forEach((o,n)=>{o.free&&(Xx(o,n,t),Qx(o,n,t))})}function Xx(e,t,r){(Mg(e)??0)!==0&&r.addIssue({code:"custom",path:["plans",t,"recurring_fee_cents"],message:"Free plans must have zero price"})}function Qx(e,t,r){e.limits.some(n=>!n.enforcement||n.enforcement==="enforce")||r.addIssue({code:"custom",path:["plans",t,"limits"],message:"Free plans must include at least one hard enforced limit"})}function Rg(e,t){let r=new Map;e.forEach((o,n)=>{if(o.free)return;let i=Mg(o);if(i===void 0||i<=0)return;let s=ik(o,i),c=r.get(s);if(c){t.addIssue({code:"custom",path:["plans",n,"recurring_fee_cents"],message:`Paid plan price duplicates plan "${c}" (${s})`});return}r.set(s,o.key)})}function Dg(e,t){let r=new Set((e.metering?.meters??[]).map(n=>n.key).filter(n=>typeof n=="string"&&n.length>0)),o=new Set(Object.keys(e.usage?.meters??{}));e.plans.forEach((n,i)=>{let s=n.meters;s&&s.forEach((c,u)=>{let l=c.dimension;typeof l!="string"||l.length===0||r.has(l)||o.has(l)||t.addIssue({code:"custom",path:["plans",i,"meters",u,"dimension"],message:`Plan "${n.key}" prices meter "${l}" but no metering.meters[] entry and no usage.meters[] entry declares it.`})})})}function zg(e,t){if(!e.features)return;let r=new Set(e.plans.map(o=>o.key));for(let[o,n]of Object.entries(e.features)){if(!n.plans)continue;n.plans.forEach((s,c)=>{r.has(s)||t.addIssue({code:"custom",path:["features",o,"plans",c],message:`Feature "${o}" references unknown plan "${s}"`})});let i=new Set;n.plans.forEach((s,c)=>{i.has(s)&&t.addIssue({code:"custom",path:["features",o,"plans",c],message:`Feature "${o}" lists plan "${s}" more than once`}),i.add(s)})}}function jg(e,t){if(!e.features)return;let r=new Set((e.metering?.meters??[]).map(n=>n.key).filter(n=>typeof n=="string"&&n.length>0)),o=!1;for(let[n,i]of Object.entries(e.features))(i.routes??[]).forEach((c,u)=>{let l=Al(c);l.length!==0&&(o=!0,l.forEach((d,m)=>{r.has(d)||t.addIssue({code:"custom",path:["features",n,"routes",u,"metering",m],message:`Route references unknown meter "${d}". Declare it in metering.meters[].`})}))});o&&r.size===0&&t.addIssue({code:"custom",path:["metering","meters"],message:"One or more routes declare metering keys but `metering.meters[]` is empty. Declare meters at the product level first."})}function ek(e,t){let r=new Map;for(let o of e.plans)r.set(o.key,new Set);if(!e.features){for(let o of r.values())for(let n of t)o.add(n);return r}for(let o of Object.values(e.features))tk(o,r);return r}function tk(e,t){let r=e.plans??[],o=e.routes??[];for(let n of r){let i=t.get(n);if(i)for(let s of o){if(s.unmetered===!0)continue;let c=Al(s);if(c.length>0){for(let u of c)i.add(u);continue}}}}function Al(e){let t=new Set;for(let r of Object.keys(e.metering?.defaults??{}))t.add(r);for(let r of e.metering?.reports??[])t.add(r);for(let r of Object.keys(e.metering?.estimates??{}))t.add(r);return[...t]}function nk(e){if(!e||typeof e!="object")return null;let t=e;return typeof t.dimension=="string"?t.dimension:null}var rk=new Set(["credits"]);function Ug(e,t){if(!e.plans||e.plans.length===0)return;let r=new Set((e.metering?.meters??[]).map(i=>i.key).filter(i=>typeof i=="string"&&i.length>0)),o=new Set(Object.keys(e.usage?.meters??{})),n=ek(e,r);e.plans.forEach((i,s)=>{let c=i.limits??[],u=n.get(i.key)??new Set;c.forEach((l,d)=>{if(l&&typeof l=="object"?l.acknowledgeUnreachable===!0:!1)return;let g=nk(l);g&&(u.has(g)||o.has(g)||rk.has(g)||t.addIssue({code:"custom",path:["plans",s,"limits",d,"meter"],message:`Plan "${i.key}" limits meter "${g}" but no route in any granted feature emits this meter, and the meter is not declared under usage.meters either. Either grant a feature whose routes meter "${g}" to this plan, declare the meter under metering.meters[] or usage.meters, or set acknowledgeUnreachable: true if the limit is intentional (e.g. soft budget).`}))})})}function Lg(e,t){let r=e.backend;if(!r||Object.keys(r).length===0)return;let o=new Set(Object.keys(r)),n=new Set((e.metering?.meters??[]).map(u=>u.key).filter(u=>typeof u=="string"&&u.length>0));for(let[u,l]of Object.entries(r))(l.meters??[]).forEach((d,m)=>{n.has(d)||t.addIssue({code:"custom",path:["backend",u,"meters",m],message:`${zt.unknownMeterInBackend}: backend "${u}" allows meter "${d}" but no metering.meters[] entry declares it.`})});let{defaultId:i,ambiguous:s}=El(r),c=!1;for(let u of Object.values(e.features??{}))for(let l of u.routes??[])l.backend===void 0&&(c=!0);s&&c&&t.addIssue({code:"custom",path:["backend"],message:`${zt.ambiguousDefaultBackend}: product declares ${o.size} backends but no single default \u2014 mark exactly one backend \`default: true\` or bind every route explicitly.`});for(let[u,l]of Object.entries(e.features??{}))(l.routes??[]).forEach((d,m)=>{let g=d.backend??i;if(d.backend!==void 0&&!o.has(d.backend)){t.addIssue({code:"custom",path:["features",u,"routes",m,"backend"],message:`${zt.unknownBackendInRoute}: route binds backend "${d.backend}" which is not declared in the product \`backend\` block.`});return}if(!g)return;let S=r[g]?.meters;if(!S)return;let C=new Set(S);for(let A of Al(d))C.has(A)||t.addIssue({code:"custom",path:["features",u,"routes",m,"metering"],message:`${zt.routeMeterNotAllowedByBackend}: route meters "${A}" but backend "${g}" does not allow it (backend.meters[] = [${S.join(", ")}]).`})})}function Mg(e){return e.recurring_fee_cents}function ik(e,t){return`USD:month:${t}`}var ok=a.object({subdomain:a.string().min(1).max(63).regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/,"Subdomain must be lowercase alphanumeric with optional hyphens")}),ak=a.enum(["exact_pre_request","estimated_then_settled","postpaid","strict_concurrency"]),Nl=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_]+$/,"Meter key must be lowercase alphanumeric with underscores"),display:a.string().min(1).max(100),unit:a.string().max(20).optional(),estimate:a.number().finite().nonnegative().optional(),routeDefault:a.number().finite().nonnegative().optional(),enforcementType:ak.default("estimated_then_settled"),aggregation:a.enum(["SUM","COUNT","MAX","UNIQUE_COUNT","LATEST"]).default("COUNT"),window:a.enum(["minute","hour","day","month","billing_period"]).default("billing_period"),valueProperty:a.string().optional(),uniqueProperty:a.string().optional(),groupBy:a.array(a.string()).optional(),eventCode:a.string().optional()}),Fg=a.string().min(1).max(64).regex(/^[a-z0-9_]+$/,"Usage measure must be lowercase alphanumeric with underscores"),sk=a.enum(["pass_through","markup","fixed_margin","customer_rate"]),ck=a.object({source:a.literal("fixed"),rates:a.record(a.string().min(1),a.record(Fg,a.number().int().nonnegative()))}),uk=a.object({source:a.literal("provider_catalog"),catalog:a.string().min(1).max(100),pricePolicy:sk.default("pass_through"),markupPercent:a.number().nonnegative().max(1e4).optional(),marginMicros:a.number().int().nonnegative().optional()}),lk=a.object({source:a.literal("upstream_reported"),amountField:a.string().min(1).max(500),currencyField:a.string().min(1).max(500).optional()}),dk=a.object({source:a.literal("external_rate_api"),resolver:a.string().min(1).max(100),configRef:a.string().min(1).max(200).optional()}),mk=a.object({source:a.literal("custom"),resolver:a.string().min(1).max(100),configRef:a.string().min(1).max(200).optional()}),Zg=a.discriminatedUnion("source",[ck,uk,lk,dk,mk]),Vg=a.object({selector:a.string().min(1).max(100).optional(),measures:a.array(Fg).min(1).max(20),rating:Zg.optional()}),Bg=a.object({meters:a.record(a.string().min(1).max(64).regex(/^[a-z0-9_]+$/),Vg)}),pk=a.object({defaults:a.record(a.string().min(1).max(64),a.number().finite().nonnegative()).optional(),reports:a.array(a.string().min(1).max(64)).max(20).optional(),estimates:a.record(a.string().min(1).max(64),a.number().finite().nonnegative()).optional(),onStatusCodes:Pi.optional()}),Hg=a.object({method:a.enum(["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS","*"]).default("*"),path:a.string().min(1).max(500).regex(/^\/[a-zA-Z0-9_/:.{}*-]*$/,"path must start with / and contain only [a-zA-Z0-9_/:.{}*-]"),unmetered:a.boolean().optional(),metering:pk.optional(),inheritDefaultMeters:a.boolean().optional(),backend:Dt.optional()}).strict(),Cl=a.object({description:a.string().max(500).optional(),routes:a.array(Hg).min(1).max(50),plans:a.array(a.string().min(1)).min(1).max(20)}),Gg=a.record(a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/),Cl),Kg=a.enum(["report","pull_request"]),Wg=a.enum(["safe","non_blocking","economic_risk","blocking"]),qg=a.object({cleanup:a.object({enabled:a.boolean().default(!1),mode:Kg.default("report")}).default({enabled:!1,mode:"report"}),change_approval:a.object({auto_merge_max_risk:a.enum(["none","safe","non_blocking"]).default("none"),require_human_for:a.array(Wg).default(["economic_risk","blocking"])}).default({auto_merge_max_risk:"none",require_human_for:["economic_risk","blocking"]})}).default({cleanup:{enabled:!1,mode:"report"},change_approval:{auto_merge_max_risk:"none",require_human_for:["economic_risk","blocking"]}}),Jg=a.enum(["org_only","org_and_user"]),Yg=a.enum(["clerk","test-personas"]),Xg=a.object({identity_requirement:Jg.optional(),context_tokens:a.object({enabled:a.boolean().default(!0)}).optional(),portal_auth:a.object({strategy:Yg}).optional()}),Qg=a.enum(["frontend","api","docs","widget","dashboard","webhook","worker","agent"]),eh=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Surface key must be lowercase alphanumeric with hyphens/underscores"),type:Qg,display:a.string().min(1).max(100).optional(),description:a.string().max(500).optional()}),th=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Entitlement key must be lowercase alphanumeric with hyphens/underscores"),description:a.string().max(500).optional(),capabilities:a.array(a.string().min(1).max(100)).max(100).optional(),featureGates:a.record(a.string().min(1),a.boolean()).optional(),limits:a.array(je).max(100).optional(),meters:a.array(a.string().min(1).max(64)).max(100).optional()}),nh=a.array(eh).max(20).default([]),rh=a.array(th).max(100).default([]),ih=a.enum(["async_job","agent_task","scheduled","lifecycle","background"]),oh=a.discriminatedUnion("type",[a.object({type:a.literal("manual")}),a.object({type:a.literal("schedule"),cron:a.string().min(1).max(120)}),a.object({type:a.literal("event"),event:a.string().min(1).max(120)}),a.object({type:a.literal("api"),path:a.string().min(1).max(240).regex(/^\//,"path must start with /")}),a.object({type:a.literal("lifecycle"),event:a.string().min(1).max(120)})]),ah=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Workflow key must be lowercase alphanumeric with hyphens/underscores"),title:a.string().min(1).max(120).optional(),description:a.string().max(1e3).optional(),kind:ih,trigger:oh,capabilities:a.array(a.string().min(1).max(100)).max(100).optional(),meters:a.array(a.string().min(1).max(64)).max(100).optional(),estimates:a.record(a.string().min(1).max(64),a.number().finite()).optional(),metadata:a.record(a.string().min(1),a.unknown()).optional()}),sh=a.array(ah).max(100).default([]),Ye=a.object({product:a.object({name:a.string().min(1).max(100),displayName:a.string().max(200).optional(),description:a.string().max(2e3).optional(),baseUrl:a.string().url("baseUrl must be a valid URL"),sandboxBaseUrl:a.string().url("sandboxBaseUrl must be a valid URL").optional(),visibility:a.enum(["public","private"]).default("public"),logoUrl:a.string().url().optional(),primaryColor:a.string().regex(/^#[0-9a-fA-F]{6}$/).optional(),envBranchPrefix:a.string().max(50).nullable().optional()}),gateway:a.object({authHeader:a.string().min(1).max(100).default("x-api-key"),upstreamAuth:a.object({type:a.enum(["none","static_bearer"]),token:a.string().optional()}).default({type:"none"})}),metering:a.object({meters:a.array(Nl).max(10).default([]),billOn4xx:a.boolean().default(!1)}).default({meters:[],billOn4xx:!1}),backend:wl.optional(),usage:Bg.optional(),usagePricing:a.never({error:"usagePricing is not supported. Define usage.meters.<key>.rating instead."}).optional(),features:Gg.optional(),resources:$l,policies:qg,customer_context:Xg.optional(),surfaces:nh,entitlements:rh,workflows:sh,frontend:xl.optional(),migrations:Sl.optional(),billing:a.object({gracePeriodDays:a.number().int().nonnegative().default(3),applyLimitUpgradesInstantly:a.boolean().optional(),subscriberChangePolicy:Pn.default({default:"preserve_current_period",proration:"none",when:{price_increase:"preserve_current_period",price_decrease:"switch_immediately",feature_added:"switch_immediately",feature_removed:"preserve_current_period",limit_increased:"switch_immediately",limit_reduced:"preserve_current_period",credit_increased:"switch_immediately",credit_reduced:"preserve_current_period",rating_changed:"preserve_current_period"},allowImmediatePriceIncrease:!1,allowImmediateEntitlementReduction:!1})}).default({gracePeriodDays:3,subscriberChangePolicy:{default:"preserve_current_period",proration:"none",when:{price_increase:"preserve_current_period",price_decrease:"switch_immediately",feature_added:"switch_immediately",feature_removed:"preserve_current_period",limit_increased:"switch_immediately",limit_reduced:"preserve_current_period",credit_increased:"switch_immediately",credit_reduced:"preserve_current_period",rating_changed:"preserve_current_period"},allowImmediatePriceIncrease:!1,allowImmediateEntitlementReduction:!1}}),plans:a.array(Oi).max(4).default([]),add_ons:pg,lifecycle:a.object({breaking_changes:a.object({require_deprecation_window_days:a.number().int().nonnegative().default(0),require_successor_route:a.boolean().default(!1)}).default({require_deprecation_window_days:0,require_successor_route:!1})}).default({breaking_changes:{require_deprecation_window_days:0,require_successor_route:!1}}),webhooks:vl.optional(),environments:bl.optional(),ephemeral:a.object({defaultPlan:a.string().min(1).optional()}).optional()}).superRefine((e,t)=>{Ng(e,t),Cg(e.plans,t),Rg(e.plans,t),Dg(e,t),zg(e,t),jg(e,t),Ug(e,t),Lg(e,t)}),fk=a.object({product:Ye.shape.product}),gk=a.object({gateway:Ye.shape.gateway}),hk=a.object({metering:Ye.shape.metering}),_k=a.object({plans:Ye.shape.plans});var Rl=a.object({capability:a.string().min(1).max(120).regex(/^[a-z0-9_-]+$/,"capability name must be lowercase alphanumeric with hyphens/underscores"),description:a.string().max(500).optional(),mutation_class:a.enum(["runtime","contractual"]).default("contractual"),includes_features:a.array(a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/)).max(20).default([]),includes_policies:a.array(a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/)).max(20).default([]),includes_capabilities:a.array(a.string().min(1).max(120).regex(/^[a-z0-9_-]+$/)).max(20).default([])});var ch=1;var vk=a.object({irVersion:a.literal(ch),sdkVersion:a.string().min(1).max(64),product:Ye,routes:a.array(Pl).max(200).default([]),policies:a.array(Tl).max(200).default([]),capabilities:a.array(Rl).max(200).default([])}).strict();var OA=a.object({gracePeriodDays:a.number().int().nonnegative().optional(),subscriberChangePolicy:Pn.optional()}),TA=a.object({code:a.string(),kind:a.enum(["percent_off","amount_off","free_months"]),amount:a.number().optional(),durationMonths:a.number(),applicablePlanIds:a.array(a.string()).optional(),maxRedemptions:a.number().optional(),activeFrom:a.string().optional(),activeUntil:a.string().optional(),status:a.enum(["ACTIVE","ARCHIVED"]).optional()}),PA=a.object({id:a.string(),actorUserId:a.string().optional(),action:a.string(),decision:a.string().optional(),timestamp:a.string(),details:a.unknown().optional()}),AA=a.object({name:a.string(),branch:a.string().optional(),isProduction:a.boolean().optional()}),NA=a.object({id:a.string(),name:a.string(),apiKeyId:a.string().optional()});var bk=["IMMEDIATE_NO_PRORATE","IMMEDIATE_PRORATE_CHARGE_NEW","IMMEDIATE_PRORATE_REFUND_OLD","IMMEDIATE_PRORATE_BOTH","DEFER_TO_PERIOD_END"],LA=a.enum(bk);var uh=a.object({id:a.string(),billingCycleId:a.string(),effectiveStart:a.string(),effectiveEnd:a.string(),compiledPlanId:a.string()}),lh=a.object({currentPeriod:uh,priorPeriod:uh.optional()});var yk=a.object({subjectKey:a.string(),subscriptionId:a.string(),subscriberId:a.string(),productId:a.string(),organizationId:a.string(),compiledPlanId:a.string(),activeEntitlementHash:a.string().optional(),generation:a.number(),enforcementMode:a.enum(["STRICT","GRACE","TRACK_ONLY"]),dedicatedShard:a.enum(["ACTIVE","DRAINING"]).optional(),resourceCounts:a.record(a.string(),a.number()).optional(),overrides:a.object({maxMonthlySpendCents:a.number().optional(),limitOverrides:a.record(a.string(),a.number()).optional(),featureGateOverrides:a.record(a.string(),a.boolean()).optional()}).optional(),subscriptionStatus:a.string(),subscriberStatus:a.string(),scopes:a.array(a.string()),periods:lh,expiresAt:a.number().optional(),trialEndsAt:a.string().optional()}),xk=a.discriminatedUnion("kind",[a.object({kind:a.literal("found"),state:yk,expiresAt:a.number(),ttlSeconds:a.number()}),a.object({kind:a.literal("not_found"),negativeCacheTtlSeconds:a.number().default(60)}),a.object({kind:a.literal("revoked"),negativeCacheTtlSeconds:a.number().default(300),reason:a.string().optional()}),a.object({kind:a.literal("rate_limited"),retryAfterSeconds:a.number().default(10)})]),HA=a.object({environmentId:a.string().nullable(),subjectKeys:a.array(a.string()).min(1).max(500)}),GA=a.object({results:a.array(a.object({subjectKey:a.string(),result:xk}))}),kk=a.object({keyId:a.string(),orgId:a.string(),productId:a.string(),compiledPlanId:a.string(),entitlementHash:a.string().optional(),subscriptionId:a.string(),subscriberId:a.string(),apiKeyId:a.string().nullable(),subjectKey:a.string(),entitlementVersion:a.number().int(),identityRequirement:a.enum(["org_only","org_and_user"]),status:a.enum(["active","revoked"]),subscriberStatus:a.enum(["ONBOARDING","ACTIVE","SUSPENDED"]),subscriptionStatus:a.string(),environment:a.enum(["production","sandbox"]).optional(),environmentId:a.string().optional(),scopes:a.array(a.string()).default([]),entitlement:a.unknown().optional(),actorType:a.enum(["org","user"]).optional(),actorId:a.string().nullable().optional(),currentPeriodId:a.string().optional(),currentPeriodStartMs:a.number().int().nonnegative().optional(),expiresAt:a.number().nullable().optional()}),KA=a.discriminatedUnion("kind",[a.object({kind:a.literal("found"),record:kk,expiresAt:a.number(),ttlSeconds:a.number()}),a.object({kind:a.literal("not_found"),negativeCacheTtlSeconds:a.number().default(60)}),a.object({kind:a.literal("revoked"),negativeCacheTtlSeconds:a.number().default(300),reason:a.string().optional()}),a.object({kind:a.literal("rate_limited"),retryAfterSeconds:a.number().default(10)})]),WA=a.discriminatedUnion("kind",[a.object({kind:a.literal("found"),entitlement:a.unknown(),expiresAt:a.number(),ttlSeconds:a.number()}),a.object({kind:a.literal("not_found"),negativeCacheTtlSeconds:a.number().default(60)}),a.object({kind:a.literal("rate_limited"),retryAfterSeconds:a.number().default(10)})]),Sk=a.object({id:a.string(),origin:a.string(),sandboxOrigin:a.string().nullable().optional(),authHeader:a.string().optional(),pricing:a.record(a.string(),a.number()).optional(),metering:a.object({tokens:a.object({estimatePerRequest:a.number().optional()}).optional(),computeMs:a.object({estimatePerRequest:a.number().optional()}).optional(),billOn4xx:a.boolean().optional()}).optional(),tenantLimits:a.array(a.object({unit:a.enum(["requests","tokens","computeMs","dollars"]),window:a.enum(["second","minute","hour","day","week","month"]),capacity:a.number()})).optional(),userLimits:a.array(a.object({unit:a.enum(["requests","tokens","computeMs","dollars"]),window:a.enum(["second","minute","hour","day","week","month"]),capacity:a.number()})).optional(),environmentId:a.string().optional(),contextTokenSecret:a.string().nullable().optional(),timeoutMs:a.number().positive().optional(),idleTimeoutMs:a.number().positive().optional()}),qA=a.discriminatedUnion("kind",[a.object({kind:a.literal("found"),tenant:Sk,expiresAt:a.number(),ttlSeconds:a.number()}),a.object({kind:a.literal("not_found"),negativeCacheTtlSeconds:a.number().default(60)}),a.object({kind:a.literal("rate_limited"),retryAfterSeconds:a.number().default(10)})]);var Ai=["consumer_api_key","consumer_session_token","test_persona_session_token","builder_master_key","builder_session_token","maker_jwt","service_jwt","internal_service","context_token"],dh=a.enum(Ai);var $k=a.object({fromIssuer:a.string().min(1),fromTokenId:a.string().min(1),intent:a.string().min(1)}),mh=a.object({issuer:a.string().min(1),issuedAt:a.number().int().nonnegative(),expiresAt:a.number().int().nonnegative().optional(),tokenId:a.string().min(1).optional(),delegationChain:a.array($k)});var Dl=["template","embedded","provisioned","agent"],Ik=a.enum(Dl),wk=["builder_user","builder_org","maker","consumer_subject","internal_service","service_jwt","agent_runtime"],Ek=a.enum(wk),ph=a.object({kind:Ek,id:a.string().min(1),label:a.string().optional()}),Ok=["subscription","organization","platform"],Tk=a.enum(Ok),Pk=a.object({kind:Tk,id:a.string().min(1)}),Ak=a.object({type:dh,id:a.string().min(1),hint:a.string().max(8).optional()}),Nk=a.object({compiledPlanId:a.string().min(1),fromCache:a.boolean().optional()}),fh=a.object({requestId:a.string().min(1),surface:Ik,builderOrgId:a.string().min(1),productId:a.string().min(1).optional(),runtimeId:a.string().min(1).optional(),template:a.string().optional(),caller:ph,actor:ph,billingSubject:Pk,credential:Ak,capability:a.string().min(1),scopes:a.array(a.string()),entitlement:Nk.optional(),trust:mh});var Nn;(function(e){e.AUTHZ_DECISION="authz_decision",e.ENTITLEMENT_DECISION="entitlement_decision",e.RUNTIME_LIMIT_DECISION="runtime_limit_decision",e.RESOURCE_GOVERNANCE_DECISION="resource_governance_decision",e.RESOURCE_MUTATION="resource_mutation",e.LIFECYCLE_EVENT="lifecycle_event",e.RUNTIME_CONTEXT_CREATED="runtime_context_created",e.SYSTEM_ACTION="system_action"})(Nn||(Nn={}));var gh=Object.values(Nn),fN=a.enum(gh),hh=a.object({decisionId:a.string().optional(),ctx:fh,details:a.record(a.string(),a.unknown()).optional(),createdAt:a.string().min(1)}),Ck=gh.filter(e=>e!==Nn.SYSTEM_ACTION),Rk=hh.extend({kind:a.enum(Ck)}),Dk=hh.extend({kind:a.literal(Nn.SYSTEM_ACTION),actorType:a.string().min(1),action:a.string().min(1)}),gN=a.discriminatedUnion("kind",[Rk,Dk]);var O=["template","agent"],zk=["provisioned"],_h=[...Dl],T=["builder_master_key","builder_session_token","maker_jwt"],jt=["service_jwt","internal_service"],zl=["consumer_api_key","consumer_session_token","test_persona_session_token","context_token"],vh=[...Ai],Cn="subscriptions:write",jk=[{id:"products.create",operation:"Create a product",requiredScopes:["products:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Create a new product in the builder org"},{id:"products.update",operation:"Update a product",requiredScopes:["products:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Update product metadata or compiled config"},{id:"products.delete",operation:"Delete a product",requiredScopes:["products:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Delete a product (soft-archive if subscriptions exist)"},{id:"products.read",operation:"Read a product",requiredScopes:["products:read"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Read product metadata + compiled config"},{id:"products.publish",operation:"Publish a product",requiredScopes:["products:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Compile + publish the product to the gateway"},{id:"plans.create",operation:"Create a plan",requiredScopes:["plans:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Add a new plan to a product"},{id:"plans.update",operation:"Update a plan",requiredScopes:["plans:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Update plan pricing, limits, or features"},{id:"plans.delete",operation:"Delete a plan",requiredScopes:["plans:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Delete a plan (denied if subscriptions are attached)"},{id:"plans.publish",operation:"Publish a plan",requiredScopes:["plans:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Mark a plan as available for new subscriptions"},{id:"subscriptions.create",operation:"Create a subscription",requiredScopes:[Cn],allowedSurfaces:O,allowedCredentialTypes:[...T,...jt],description:"Provision a new subscription for a subscriber"},{id:"subscriptions.update",operation:"Update a subscription",requiredScopes:[Cn],allowedSurfaces:O,allowedCredentialTypes:[...T,...jt],description:"Change plan, enforcement mode, or schedule"},{id:"subscriptions.cancel",operation:"Cancel a subscription",requiredScopes:[Cn],allowedSurfaces:O,allowedCredentialTypes:[...T,...jt],description:"Cancel a subscription (immediate or end-of-period)"},{id:"subscriptions.pause",operation:"Pause a subscription",requiredScopes:[Cn],allowedSurfaces:O,allowedCredentialTypes:[...T,...jt],description:"Pause a subscription (no usage, no billing)"},{id:"subscriptions.resume",operation:"Resume a subscription",requiredScopes:[Cn],allowedSurfaces:O,allowedCredentialTypes:[...T,...jt],description:"Resume a paused subscription"},{id:"subscriptions.read",operation:"Read a subscription",requiredScopes:["subscriptions:read"],allowedSurfaces:O,allowedCredentialTypes:[...T,...jt],description:"Read subscription state and usage"},{id:"webhooks.create",operation:"Create a webhook endpoint",requiredScopes:["webhooks:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Register a new webhook endpoint URL"},{id:"webhooks.update",operation:"Update a webhook endpoint",requiredScopes:["webhooks:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Update endpoint URL, secret, or subscribed events"},{id:"webhooks.delete",operation:"Delete a webhook endpoint",requiredScopes:["webhooks:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Remove a webhook endpoint"},{id:"webhooks.test",operation:"Send a test webhook payload",requiredScopes:["webhooks:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Trigger a synthetic payload to verify an endpoint"},{id:"api-keys.create",operation:"Create an API key",requiredScopes:["api-keys:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Mint a new consumer or master API key"},{id:"api-keys.revoke",operation:"Revoke an API key",requiredScopes:["api-keys:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Revoke an API key (immediate invalidation)"},{id:"api-keys.read",operation:"Read API key metadata",requiredScopes:["api-keys:read"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Read key id + hint + scopes (never the secret)"},{id:"organizations.create",operation:"Create an organization",requiredScopes:["orgs:write"],allowedSurfaces:["template"],allowedCredentialTypes:["builder_session_token"],description:"Create a builder org (top-level signup)"},{id:"organizations.update",operation:"Update an organization",requiredScopes:["orgs:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Update org metadata or billing email"},{id:"members.invite",operation:"Invite a member to an organization",requiredScopes:["members:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Send an invitation to join the org"},{id:"members.remove",operation:"Remove a member from an organization",requiredScopes:["members:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Revoke a member's access to the org"},{id:"projects.create",operation:"Create a project",requiredScopes:["projects:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Create a project (groups products + environments)"},{id:"environments.create",operation:"Create an environment",requiredScopes:["environments:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Add a deployment environment (stage / branch)"},{id:"environments.delete",operation:"Delete an environment",requiredScopes:["environments:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Remove a deployment environment"},{id:"billing.portal-redirect",operation:"Generate Stripe customer-portal redirect",requiredScopes:["billing:portal"],allowedSurfaces:O,allowedCredentialTypes:[...T,...zl],description:"Mint a one-time Stripe portal-session redirect URL"},{id:"billing.read",operation:"Read billing state",requiredScopes:["billing:read"],allowedSurfaces:O,allowedCredentialTypes:[...T,...zl],description:"Read invoices, balances, scheduled changes"},{id:"runtime-context.read",operation:"Read the caller's runtime context",requiredScopes:[],allowedSurfaces:_h,allowedCredentialTypes:vh,description:"Introspect the resolved RuntimeContext (minus secrets)"},{id:"capabilities.list",operation:"List registered capabilities",requiredScopes:[],allowedSurfaces:_h,allowedCredentialTypes:vh,description:"List all capabilities the registry knows about"},{id:"explain-denial.read",operation:"Explain a denial decision",requiredScopes:["audit:read"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Look up a decision id + return the full ctx + reason"},{id:"replay.execute",operation:"Replay a historical billing period",requiredScopes:["replay:execute"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Re-run billing for a past period; verify deltas"},{id:"rollback.execute",operation:"Execute a GitHub-driven product rollback",requiredScopes:["rollback:execute"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Revert product.config.ts to a previous commit (dry-run capable)"},{id:"api.invoke",operation:"Invoke a consumer-facing gateway route",requiredScopes:[],allowedSurfaces:zk,allowedCredentialTypes:zl,description:"Consumer-side traffic into a deployed product (catch-all). The EntitlementEngine + RuntimeLimitEngine handle the fine-grained gating; this capability is the umbrella entry-point."}],bN=Object.freeze(jk);var Uk=["ProductApplyWorkflow","RollbackWorkflow","StripeSyncWorkflow","WebhookDispatchWorkflow","DLQReplayWorkflow","CreditExpireWorkflow","SubscriptionTransitionWorkflow","CompiledPlanLifecycleWorkflow","CreditGrantExpiryWorkflow","ShardReshardWorkflow","MaintenanceJobWorkflow"],SN=a.enum(Uk),Lk=["transient","permanent","rollback-required","human-intervention"],$N=a.enum(Lk);var Mk=["SAFE_AUTOMATIC","REQUIRES_APPROVAL","IRREVERSIBLE","BILLING_IMPACTING","EDGE_BREAKING"],IN=a.enum(Mk);var AN=a.object({workflowExecutionId:a.string().min(1),eventType:a.string().min(1),phase:a.string().min(1).optional(),stepId:a.string().min(1).optional(),cohortKey:a.string().min(1).optional(),payload:a.record(a.string(),a.unknown()),occurredAt:a.string().min(1),correlationId:a.string().min(1).optional()}).transform(e=>({...e,workflowExecutionId:e.workflowExecutionId,stepId:e.stepId===void 0?void 0:e.stepId}));var Fk=["GATEWAY","HOSTED_UI_PAGE","HOSTED_UI_PROXY"],Zk=["platform_requests"],Vk=a.object({requestId:a.string().optional(),productId:a.string().optional(),route:a.string().optional(),usageEventId:a.string().optional()}).strict(),Bk=a.object({organizationId:a.string().min(1),source:a.enum(Fk),dimension:a.enum(Zk),quantity:a.number().int().positive(),idempotencyKey:a.string().min(1).max(512),occurredAt:a.string().datetime(),metadata:Vk.optional()}).strict(),QN=a.object({entries:a.array(Bk).min(1).max(500)});var Hk={MANAGED_BY_CODE:"This product's contract is managed as code. Edit the Product SDK program in its GitHub repo (product/) and push \u2014 do NOT retry the API. (Branding stays editable via `farthershore product update`.)",UNAUTHORIZED:"Token is invalid or revoked. Run `farthershore auth login` to update it.",FORBIDDEN:"Your token doesn't have access to this resource. Check the org / product scope.",INVALID_ACCESS_KEY:"Token format is wrong. Generate a new one at https://farthershore.com/settings/tokens.",MAKER_TOKEN_REVOKED:"This maker token was revoked. Mint a new one in the product settings.",MAKER_TOKEN_NO_PRODUCT:"Maker token is not bound to a product. Re-create it from the product page.",AUTH_NO_TOKEN:"Pass --token <mk_...> or set FARTHERSHORE_TOKEN, or run interactively in a TTY.",AUTH_INVALID_TOKEN:"Token format is malformed. Maker tokens start with `mk_` and are 30+ characters.",DESTRUCTIVE_OP_REQUIRES_YES:"Destructive ops (delete) require an explicit `--yes` to proceed. This is intentional safety.",PRODUCT_UPDATE_NO_FIELDS:"Pass at least one field flag (--display-name, --origin, --description).",PLAN_UPDATE_NO_FIELDS:"Pass at least one of --name, --recurring-fee-cents, --grant, --trial-days, --max-monthly-spend-cents, or --meter.",ENV_NOT_FOUND:"Environment doesn't exist. Use `farthershore env list <product>` to see available envs, or create one with `farthershore env create`.",STRIPE_NOT_CONFIGURED:"Stripe isn't connected on this product. Connect it in the dashboard before running billing operations.",STRIPE_NOT_CONNECTED:"Publishing requires a connected Stripe account. Connect one on the dashboard Connections page, then re-run `farthershore product publish`.",STRIPE_NOT_VERIFIED:"Your Stripe account isn't fully verified yet. Finish Stripe onboarding, then re-run `farthershore product publish`.",BILLING_TAX_NOT_ENROLLED:"Stripe Tax isn't enrolled for this account. Enable it from the dashboard Connections page, then re-run `farthershore product publish`.",STRIPE_BALANCE_OUTSTANDING:"Customer has an outstanding balance. Resolve the invoice in Stripe before retrying.",CHECKOUT_SESSION_FAILED:"Stripe rejected the checkout request. Check that the plan exists and Stripe credentials are valid.",PRODUCT_NOT_FOUND:"Check the product slug. Run `farthershore` (no args) for a list of products you can see.",PRODUCT_REPO_NOT_LINKED:"Link a GitHub repo to this product before publishing or validating product manifests.",YAML_PARSE_ERROR:"Product manifest is not valid. Run `farthershore build` locally, fix product/ source, then push again for bot validation.",GITHUB_NOT_CONNECTED:"Connect GitHub on the org page before running `init` (it provisions the repo).",BRANCH_NO_MATCHING_ENV:"The current branch isn't mapped to an environment. Add a branch rule in product settings or pass --branch explicitly.",PLAN_NOT_FOUND:"Plan key doesn't exist on this product. Check the `plans` block in your local product manifest.",PLAN_HAS_ACTIVE_SUBSCRIPTIONS:"Plan has active subscribers and can't be deleted. Migrate them to another plan first.",PLAN_SLUG_CONFLICT:"Another plan already uses this key. Pick a unique plan key in your manifest.",SLUG_CONFLICT:"This product slug is taken. Pick a different name.",SLUG_BLOCKED:"This slug is reserved or blocked. Pick a different name.",SLUG_RESERVED:"This slug is reserved by Farther Shore. Pick a different name.",SLUG_INVALID_FORMAT:"Slug must be lowercase letters, digits, and hyphens (no leading/trailing hyphen).",DECISION_NOT_FOUND:"No DenialEvent recorded for that decisionId. Verify the id from the original deny response or audit log.",AUTH_UNAUTHORIZED:"Token is missing, expired, or lacks the audit:read scope required to read denial events.",RATE_LIMIT_EXCEEDED:"You've hit the rate limit. Wait a moment and retry.",VALIDATION_ERROR:"Request is malformed. The `details` field has the field-level errors.",CONFLICT:"The resource is in a state that conflicts with the request. Inspect `details` to learn more."};function jl(e){if(e)return Hk[e]}function yh(e){process.stdout.write(`${JSON.stringify(e,null,2)}
98
+ `)}function Gk(e,t){return{schema_version:1,ok:!0,op:e,data:t}}function Kk(e,t){let r=t.status??0;return{schema_version:1,ok:!1,op:e,error:{code:t.code??"INTERNAL_ERROR",message:t.message,status:r,param:t.param,retryable:Jk(r,t.code),details:t.details,hint:jl(t.code)}}}function H(e,t,r=Sh()){if(ke()==="json"){yh(Gk(r,e));return}t&&Dd(t)}function Wk(e){return e===0?1:e===400||e===422?2:e===401||e===403?3:e===409?4:e>=500?5:1}var qk=new Set(["RATE_LIMIT_EXCEEDED","SERVICE_UNAVAILABLE"]);function Jk(e,t){return e>=500||e===429||e===503?!0:t?qk.has(t):!1}function Ul(e,t=Sh()){let r=e.status??0;if(ke()==="json")yh(Kk(t,e));else{let o=jl(e.code),n=e.code?` [${e.code}]`:"";process.stderr.write(`Error${n}: ${e.message}
99
+ `),o&&process.stderr.write(`Hint: ${o}
100
+ `)}return Wk(r)}var xh="unknown";function kh(e){xh=e}function Sh(){return xh}async function Xk(e){if(!so())throw new k("No token provided. Pass --token, set FARTHERSHORE_TOKEN, or run interactively.",void 0,{code:"AUTH_NO_TOKEN"});let t=Yk({input:process.stdin,output:process.stdout,terminal:!0});return new Promise(r=>{t.question(e,o=>{t.close(),r(o.trim())})})}function $h(e,t){let r=e.command("auth").description("Manage CLI auth credentials");r.command("login").description("Store a maker token in ~/.farthershore/credentials.json").option("--token <token>","Maker token (mk_...). Falls back to FARTHERSHORE_TOKEN env, then prompt.").action(async o=>{let n=o.token??process.env.FARTHERSHORE_TOKEN??await Xk("Maker token: ");if(!n||n.length<10)throw new k("Token looks malformed.",void 0,{code:"AUTH_INVALID_TOKEN"});let i=Mn();vd({...i??{},token:n}),H({},"Token stored.")}),r.command("whoami").description("Show current auth identity (org, role, scopes)").action(async()=>{let n=await t().bootstrap(),i=n.memberships.find(s=>s.organization.id===n.activeOrganization.id);H({userId:n.user.id,clerkUserId:n.user.clerkUserId,organizationId:n.activeOrganization.id,organizationName:n.activeOrganization.name??null,organizationSlug:n.activeOrganization.slug??null,role:i?.role??null,memberships:n.memberships.map(s=>({organizationId:s.organization.id,organizationName:s.organization.name??null,role:s.role}))},`Authenticated as ${n.user.id}`)}),r.command("logout").description("Clear stored credentials").action(()=>{bd(),H({},"Logged out.")})}var Ue={idempotencyKey:a.string().optional().describe("A UUID you generate; REUSE the same value when retrying so the retry replays the first result instead of double-provisioning.")};import{randomUUID as Qk}from"node:crypto";async function Ni(e,t){if(t){if(t.length===36)return t;let o=(await e.listProducts()).find(n=>n.id===t||n.name.toLowerCase()===t.toLowerCase());if(o)return o.id}throw new Error("No product selected. Pass --product <id-or-name> or run `farthershore product create` first.")}async function Ci(e,t,r){let n=await e.listEnvironments(t),s=(Array.isArray(n.data)?n.data:Array.isArray(n.environments)?n.environments:[]).find(c=>c.name.toLowerCase()===r.toLowerCase()||c.id===r);if(!s)throw new Error(`Environment "${r}" not found on product ${t}.`);return s.id}var eS="Reuse the same key on retry so it replays instead of double-creating (auto-generated if omitted).",tS="Preview the change without applying it.",nS="Skip confirmation; required for this destructive action";function rS(e,t){let r=typeof t.parser=="function",o=t.defaultValue!==void 0,n=[t.token];(t.describe!==void 0||r||o)&&n.push(t.describe??""),r&&n.push(t.parser),o&&n.push(t.defaultValue),t.required?e.requiredOption(...n):e.option(...n)}function Ih(e,t,r){let o=r.cli.args.filter(c=>c.kind==="positional"),n=r.cli.args.filter(c=>c.kind==="flag"),i=[r.cli.command,...o.map(c=>c.token)].join(" "),s=e.command(i).description(r.cli.summary);for(let c of n)rS(s,c);r.cli.destructive&&s.option("--yes",nS),r.cli.idempotent&&(s.option("--idempotency-key <key>",eS),s.option("--dry-run",tS)),r.cli.helpTextAfter&&s.addHelpText("after",r.cli.helpTextAfter),s.action(async(...c)=>{let u=c[c.length-2]??{},l=c.slice(0,c.length-2);if(r.cli.destructive&&u.yes!==!0)throw new k(r.cli.yesMessage??"Pass --yes to confirm this destructive action.",void 0,{code:"DESTRUCTIVE_OP_REQUIRES_YES"});let d=t(),m={...u};for(let C=0;C<o.length;C++){let A=o[C],Xe=l[C];m[A.field]=A.resolveProduct?await Ni(d,Xe):Xe}let g=r.cli.idempotent?{idempotencyKey:u.idempotencyKey??Qk(),dryRun:u.dryRun}:{},S={client:d,args:m,opts:u,reqOpts:g,emit:H,emitDryRunPreview:C=>C?.dryRun===!0?(H({preview:C.wouldHave,dryRun:!0},"Dry run \u2014 no changes applied."),!0):!1};await r.cli.handler(S)})}var iS={product:"Product lifecycle: list, show, create, update, delete",plan:"Plan management: list, create, update, delete",env:"Manage product environments (preview branches, prod)",backend:"Manage BYO backends and their runtime tokens","backend tokens":"Manage runtime tokens (fsrt_) for BYO backends",persona:"Mint and manage test-env personas (test API keys)",usage:"Usage observability for a product",token:"Maker-token management (list, create, revoke)"};function oS(e,t){let r=t.split(" "),o=e,n="";for(let i of r){n=n?`${n} ${i}`:i;let s=o.commands.find(l=>l.name()===i);if(s){o=s;continue}let c=iS[n],u=o.command(i);c&&u.description(c),o=u}return o}function ee(e,t,r){for(let o of r){let n=oS(e,o.cli.group);Ih(n,t,o)}}var Ut=["frontend","api","docs","widget","dashboard","webhook","worker","agent"],aS=["frontend","api"];function wh(e){let t=e.trim().toLowerCase();if(!Ut.includes(t))throw new k(`Unknown product surface "${e}". Available: ${Ut.join(", ")}.`,void 0,{code:"UNKNOWN_PRODUCT_SURFACE"});return t}function Rn(e){let t=(e.surface??[]).map(wh);if(t.length===0)return;if(new Set(t).size!==t.length)throw new k("Duplicate product surfaces in --surface flags.",void 0,{code:"INVALID_PRODUCT_SURFACES"});return t}function Ll(e){return e&&e.length>0?e:[...aS]}function sS(e){return e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function cS(e){let[t="",r,o]=e.split(":");if(!/^[a-z0-9_]+$/.test(t))throw new k(`Invalid meter key in "--meter ${e}" \u2014 keys are lowercase letters, digits, and underscores (e.g. input_tokens).`,void 0,{code:"INVALID_METER_SPEC"});return{key:t,display:r?.trim()||sS(t),unit:o?.trim()||void 0}}function uS(e){let t=e.meter??[];if(t.length>0&&e.meters)throw new k("Pass either --meters <template> or repeated --meter entries, not both.",void 0,{code:"CONFLICTING_METER_FLAGS"});if(t.length>0){let r=t.map(cS);if(new Set(r.map(n=>n.key)).size!==r.length)throw new k("Duplicate meter keys in --meter flags.",void 0,{code:"INVALID_METER_SPEC"});return r}if(e.meters){let r=Lf(e.meters);if(!r)throw new k(`Unknown meter template "${e.meters}". Available: ${Mf().join(", ")}.`,void 0,{code:"UNKNOWN_METER_TEMPLATE"});return r.meters.map(o=>({...o}))}}function lS(e){return{...e,product:e.product}}var dS=[{opKey:"product.list",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"product",command:"list",summary:"List products in the current org",args:[],handler:async({client:e,emit:t})=>{let r=await e.listProducts();t({count:r.length,products:r.map(o=>({...o,displayName:o.displayName??null,status:o.status??null}))},`${r.length} product(s)`)}},mcp:{tool:"fs_product_list",title:"List products",description:"List every product in the authenticated FartherShore workspace (id, name, status). Read-only; use this to discover product ids for the other tools.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{},handler:async e=>{let t=await e.listProducts();return{count:t.length,products:t.map(r=>({id:r.id,name:r.name,status:r.status??null}))}}}},{opKey:"product.read",operationClass:"dual",scope:["products:read"],sideEffect:"read",cli:{group:"product",command:"show",summary:"Show a product",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment scope (preview branch name)"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=await e.getProduct(o,{env:t.env});r({product:n},`Product ${o}`)}},mcp:null},{opKey:"product.create",operationClass:"dual",scope:["products:create"],sideEffect:"write",cli:{group:"product",command:"create",summary:"Create a new product and provision the frontend starter repo",idempotent:!0,args:[{field:"name",kind:"flag",token:"--name <name>",describe:"Product slug (becomes the subdomain)",required:!0},{field:"displayName",kind:"flag",token:"--display-name <displayName>",describe:"Human-friendly product name"},{field:"description",kind:"flag",token:"--description <description>"},{field:"origin",kind:"flag",token:"--origin <url>",describe:"Builder-owned product origin Farther Shore calls for customer-facing actions",required:!0},{field:"repoOwner",kind:"flag",token:"--repo-owner <owner>",describe:"Connected GitHub account that will own the product repo",required:!0},{field:"repoName",kind:"flag",token:"--repo-name <name>",describe:"GitHub repository name to create",required:!0},{field:"meters",kind:"flag",token:"--meters <template>",describe:`Meter template: ${Ei.map(e=>`${e.id} (${e.label})`).join(", ")}. Default: requests.`},{field:"meter",kind:"flag",token:"--meter <key[:display[:unit]]>",describe:"Custom meter, repeatable (e.g. --meter input_tokens:'Input Tokens':token). Overrides --meters.",parser:(e,t)=>[...t,e],defaultValue:[]},{field:"surface",kind:"flag",token:"--surface <surface>",describe:`Initial Product SDK surface, repeatable. Available: ${Ut.join(", ")}.`,parser:(e,t)=>[...t,e],defaultValue:[]}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=uS({meters:t.meters,meter:t.meter}),s=Rn({surface:t.surface}),c=await e.initProduct({name:t.name,origin:t.origin,repoTarget:{owner:t.repoOwner,name:t.repoName},description:t.description,displayName:t.displayName,meters:i,surfaces:s},r);n(c)||o({result:lS(c)},`Product created: ${t.name}`)}},mcp:null},{opKey:"brand.update",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"product",command:"update",summary:"Update product metadata (name, origin, description, etc.)",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"displayName",kind:"flag",token:"--display-name <displayName>"},{field:"description",kind:"flag",token:"--description <description>"},{field:"origin",kind:"flag",token:"--origin <url>"},{field:"confirmOriginChange",kind:"flag",token:"--confirm-origin-change",describe:"Confirm changing the origin on a live (ACTIVE) product. Without it core 409s to guard accidental origin changes."},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment scope"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n={};if(t.displayName!==void 0&&(n.displayName=t.displayName),t.description!==void 0&&(n.description=t.description),t.origin!==void 0&&(n.origin=t.origin),t.confirmOriginChange&&(n.confirmOriginChange=!0),Object.keys(n).length===0)throw new k("No fields to update. Pass --display-name / --origin / --description.",void 0,{code:"PRODUCT_UPDATE_NO_FIELDS"});let i=await e.updateProduct(o,n,{env:t.env});r({product:i},`Product ${o} updated`)}},mcp:{tool:"fs_brand_update",title:"Update product brand",description:"Update a product's BRAND/presentation only \u2014 display name, description, icon, logo (wordmark), primary color. Plans, pricing, and routes are managed as code in the product repo and are NOT editable here. Only the fields you pass are changed.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id to update."),displayName:a.string().optional().describe("Display name."),description:a.string().optional().describe("Short product description."),iconUrl:a.string().optional().describe("Square icon/favicon URL."),logoUrl:a.string().optional().describe("Wordmark/logo URL."),primaryColor:a.string().optional().describe("Primary brand color (hex).")},handler:async(e,t)=>{let r={};return t.displayName!==void 0&&(r.displayName=t.displayName),t.description!==void 0&&(r.description=t.description),t.iconUrl!==void 0&&(r.iconUrl=t.iconUrl),t.logoUrl!==void 0&&(r.logoUrl=t.logoUrl),t.primaryColor!==void 0&&(r.primaryColor=t.primaryColor),e.updateProduct(t.productId,r)}}},{opKey:"product.publish",operationClass:"dual",scope:["products:publish"],sideEffect:"write",cli:{group:"product",command:"publish",summary:"Publish a draft product (make it live). Requires at least one plan, an origin, and a verified Stripe connection.",idempotent:!0,args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=t.productId,s=await e.publishProduct(i,r);n(s)||o({product:s},`Product ${i} published`)}},mcp:{tool:"fs_product_publish",title:"Publish a product",description:"Publish a product \u2014 deploy its current spec live. Equivalent to a repo-driven deploy (operationClass=dual); both reconcile to the same published state.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id to publish."),...Ue},handler:async(e,t)=>e.publishProduct(t.productId,{idempotencyKey:t.idempotencyKey})}},{opKey:"product.delete",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"product",command:"delete",summary:"Permanently delete a product. Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm product deletion.",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId;try{await e.deleteProduct(o)}catch(n){throw n instanceof k&&(n.status===403||n.code==="FORBIDDEN")?new k("Deleting a whole product requires a builder/browser session \u2014 open the product in the dashboard to delete it. (Preview environments CAN be deleted via the CLI: `farthershore env delete`.)",n.status,{code:n.code??"FORBIDDEN"}):n}r({deleted:o},`Product ${o} deleted`)}},mcp:null}];function Eh(e,t){ee(e,t,dS)}function mS(e){if(!e||typeof e!="object")return[];let t=e;return Array.isArray(t.data)?t.data:Array.isArray(t.environments)?t.environments:[]}var pS=[{opKey:"environment.read",operationClass:"dual",scope:["products:read"],sideEffect:"read",cli:{group:"env",command:"list",summary:"List environments for a product",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=mS(await e.listEnvironments(o));r({productId:o,count:n.length,environments:n.map(i=>({id:i.id,name:i.name,branch:i.branch??null,portalHostname:i.portalHostname??null,runtimeHostname:i.runtimeHostname??null,status:i.status??null}))},`${n.length} environment(s)`)}},mcp:{tool:"fs_env_list",title:"List environments",description:"List a product's preview environments (name, branch, hostnames). Read-only.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id whose environments to list.")},handler:async(e,{productId:t})=>e.listEnvironments(t)}},{opKey:"environment.create",operationClass:"dual",scope:["products:update"],sideEffect:"write",cli:{group:"env",command:"create",summary:"Create a preview environment bound to a git branch",idempotent:!0,args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"name",kind:"flag",token:"--name <name>",describe:"Environment name (e.g. preview, staging)",required:!0},{field:"branch",kind:"flag",token:"--branch <branch>",describe:"Git branch to track (e.g. env/preview)",required:!0}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=t.productId,s=await e.createEnvironment(i,{name:t.name,branch:t.branch},r);n(s)||o({productId:i,environment:s},`Environment ${t.name} created`)}},mcp:{tool:"fs_env_create",title:"Create preview environment",description:"Create a preview environment bound to a git branch. Equivalent to pushing the branch \u2014 both reconcile to the same environment (operationClass=dual). Provide a name and the git branch it tracks.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id to create the environment in."),name:a.string().describe("Environment name (e.g. 'staging', 'preview-pr-42')."),branch:a.string().describe("The git branch this environment tracks."),...Ue},handler:async(e,t)=>{let r=await e.createEnvironment(t.productId,{name:t.name,branch:t.branch},{idempotencyKey:t.idempotencyKey});return{ok:!0,productId:t.productId,environment:r}}}},{opKey:"environment.delete",operationClass:"dual",scope:["products:update"],sideEffect:"write",cli:{group:"env",command:"delete",summary:"Delete an environment by name. Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm environment deletion.",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"envName",kind:"positional",token:"<envName>"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.envName;await e.deleteEnvironment(o,n),r({productId:o,deleted:n},`Environment ${n} deleted`)}},mcp:null}];function Oh(e,t){ee(e,t,pS)}var me=["free","starter","pro","prepaid","metered"],fS={kind:"free",label:"Free",description:"No recurring fee and no metered usage. Pure freemium tier.",pricing:{meters:[],recurring_fee_cents:0,billing_interval:"month",grants:[],trial_days:0}},gS={kind:"starter",label:"Starter \u2014 $20/mo + $20 included",description:"$20/month subscription with $20 of usage credit each period. Stripe-style minimum-spend; overage billed at $0.001/request by default.",pricing:{meters:[{dimension:"requests",kind:"linear",price_per_unit_micros:1e3}],recurring_fee_cents:2e3,billing_interval:"month",grants:[{kind:"recurring",amount_cents:2e3}],trial_days:0}},hS={kind:"pro",label:"Pro \u2014 $100/mo + $200 included",description:"$100/month subscription with $200 of usage credit each period and a 14-day trial. Overage billed at $0.0005/request by default.",pricing:{meters:[{dimension:"requests",kind:"linear",price_per_unit_micros:500}],recurring_fee_cents:1e4,billing_interval:"month",grants:[{kind:"recurring",amount_cents:2e4}],trial_days:14}},_S={kind:"prepaid",label:"Prepaid \u2014 $50 sign-up credit, then PAYG",description:"$50 one-time credit at signup. Once depleted the subscriber pays-as-they-go at $0.001/request by default.",pricing:{meters:[{dimension:"requests",kind:"linear",price_per_unit_micros:1e3}],recurring_fee_cents:0,billing_interval:"month",grants:[{kind:"one_time",amount_cents:5e3}],trial_days:0}},vS={kind:"metered",label:"Metered (pay-as-you-go)",description:"No subscription fee. Pure usage billing at $0.001/request by default.",pricing:{meters:[{dimension:"requests",kind:"linear",price_per_unit_micros:1e3}],recurring_fee_cents:0,billing_interval:"month",grants:[],trial_days:0}},Th=Object.freeze({free:fS,starter:gS,pro:hS,prepaid:_S,metered:vS});function Ri(e){return Th[e]}function Ml(){return me.map(e=>Th[e])}var jR=a.object({recurring_fee_cents:a.number().int().nonnegative().optional(),grants:a.array(le).max(40).optional(),min_monthly_spend_cents:a.number().int().nonnegative().optional(),max_monthly_spend_cents:a.number().int().nonnegative().optional(),meters:a.array(de).optional(),notes:a.string().max(2e3).optional()});function bS(e){return(e??[]).some(t=>"amount_cents"in t?t.amount_cents>0:t.kind==="top_up"?t.price_cents>0:t.kind==="auto_recharge"?t.refill_cents>0:!1)}function Ph(e){let t=e.meters&&e.meters.length>0?e.meters:void 0,r=e.grants&&e.grants.length>0?e.grants:void 0,o=bS(r);if(e.free&&((e.recurringFeeCents??0)>0||o||(t?.length??0)>0))throw new k("A free plan cannot be combined with a fee, credit grant, or usage meter.",void 0,{code:"FREE_PLAN_HAS_REVENUE"});if(!e.free&&(e.recurringFeeCents??0)<=0&&!o&&(t?.length??0)===0)throw new k("Plan has no revenue and isn't free \u2014 set free=true, a recurring fee, a credit grant, or a usage meter.",void 0,{code:"PLAN_HAS_NO_REVENUE"});let n={key:e.key,name:e.name};if(e.free&&(n.free=!0),t&&(n.meters=t),e.rateLimit!==!1){let i=typeof e.rateLimit=="number"?e.rateLimit:600,s=e.rateWindow??"minute";if(!["second","minute","hour"].includes(s))throw new k(`Invalid rate window "${s}" \u2014 use second, minute, or hour.`,void 0,{code:"INVALID_RATE_WINDOW"});n.limits=[{dimension:"requests",window:{type:"named",name:s},capacity:i,enforcement:"enforce"}]}return typeof e.recurringFeeCents=="number"&&(n.recurring_fee_cents=e.recurringFeeCents),r&&(n.grants=r),typeof e.trialDays=="number"&&(n.trial_days=e.trialDays),typeof e.maxMonthlySpendCents=="number"&&(n.max_monthly_spend_cents=e.maxMonthlySpendCents),n}function yS(e){let t=e.indexOf(":"),r=t===-1?e:e.slice(0,t),o=t===-1?"":e.slice(t+1);if(!/^[a-z0-9_]+$/.test(r))throw new k(`Invalid meter dimension in "--meter ${e}" \u2014 dimensions are lowercase letters, digits, and underscores (e.g. requests, input_tokens).`,void 0,{code:"INVALID_PLAN_METER_SPEC"});if(!/^\d+$/.test(o.trim()))throw new k(`Invalid price in "--meter ${e}" \u2014 expected <dimension>:<price_per_unit_micros> with a non-negative integer price (e.g. requests:1000).`,void 0,{code:"INVALID_PLAN_METER_SPEC"});return{dimension:r,price_per_unit_micros:Number.parseInt(o.trim(),10),kind:"linear"}}function Ah(e){let t=e??[];if(t.length===0)return;let r=t.map(yS);if(new Set(r.map(n=>n.dimension)).size!==r.length)throw new k("Duplicate meter dimensions in --meter flags.",void 0,{code:"INVALID_PLAN_METER_SPEC"});return r}function xS(e){let t=e.indexOf(":"),r=t===-1?e:e.slice(0,t),o=t===-1?"":e.slice(t+1);if(r!=="recurring"&&r!=="one_time")throw new k(`Invalid grant kind in "--grant ${e}" \u2014 use recurring:<amount_cents> or one_time:<amount_cents>.`,void 0,{code:"INVALID_PLAN_GRANT_SPEC"});if(!/^\d+$/.test(o.trim()))throw new k(`Invalid grant amount in "--grant ${e}" \u2014 expected ${r}:<amount_cents> with a non-negative integer amount.`,void 0,{code:"INVALID_PLAN_GRANT_SPEC"});return{kind:r,amount_cents:Number.parseInt(o.trim(),10)}}function Nh(e){let t=e??[];if(t.length===0)return;let r=t.map(xS),o=r.map(n=>n.kind);if(new Set(o).size!==o.length)throw new k("Duplicate canonical grant kinds in --grant flags.",void 0,{code:"INVALID_PLAN_GRANT_SPEC"});return r}function kS(e){if(!e||typeof e!="object")return[];let t=e;return Array.isArray(t.data)?t.data:Array.isArray(t.plans)?t.plans:Array.isArray(e)?e:[]}function SS(e){if(e.length===0)return"(no plans)";let t=["KEY","NAME","FREE","FEE\xA2","RECURRING\xA2","ONE_TIME\xA2","TRIAL_D","MAX_SPEND\xA2","STATUS"],r=c=>c===null?"\u2014":c.toLocaleString("en-US"),o=e.map(c=>[c.key,c.name,c.free?"Y":"N",r(c.recurring_fee_cents),r(c.recurring_grant_cents),r(c.one_time_grant_cents),r(c.trial_days),r(c.max_monthly_spend_cents),c.status]),n=t.map((c,u)=>Math.max(c.length,...o.map(l=>l[u]?.length??0))),i=c=>c.map((u,l)=>u.padEnd(n[l]??u.length)).join(" "),s=n.map(c=>"-".repeat(c)).join(" ");return[i(t),s,...o.map(i)].join(`
101
+ `)}var $S=[{opKey:"plan.read",operationClass:"contract",scope:["products:read"],sideEffect:"read",cli:{group:"plan",command:"list",summary:"List plans for a product",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0}],helpTextAfter:`
99
102
  Output:
100
103
  --format json \u2014 stable agent-friendly JSON envelope (default for non-TTY)
101
104
  --format table \u2014 human-readable summary table (default for TTY)
102
- `).action(async o=>{let e=r(),i=await R(e,o),s=n$(await e.managementListPlans(i)).map(d=>({id:d.id,key:d.planKey??d.key??"",name:d.name??"",version:d.version??null,free:d.free??!1,recurring_fee_cents:d.recurring_fee_cents??0,recurring_credit_grant_cents:Pr({grants:d.grants}),one_time_credit_grant_cents:Nt({grants:d.grants}),trial_days:d.trial_days??0,max_monthly_spend_cents:d.max_monthly_spend_cents??null,status:d.status??(d.isActive===!1?"INACTIVE":"ACTIVE")})),u=t.opts();if(Ee(u.format)==="json"){console.log(ce({ok:!0,productId:i,count:s.length,plans:s}));return}Oe(`${s.length} plan(s) for product ${i}`),console.log(i$(s))}),n.command("create <productIdOrName>").description("Create a plan on a product (5-knob spec)").requiredOption("--key <key>","Stable plan key (e.g. starter, pro)").requiredOption("--name <name>","Human-friendly plan name").option("--free","Mark this as the free plan (requires hard-enforced limits)").option("--recurring-fee-cents <cents>","Flat subscription fee per period, in cents",o=>parseInt(o,10)).option("--recurring-credit-grant-cents <cents>","Credit granted each period, in cents",o=>parseInt(o,10)).option("--one-time-credit-grant-cents <cents>","Prepaid balance at signup, in cents",o=>parseInt(o,10)).option("--trial-days <days>","Free-trial length in days",o=>parseInt(o,10)).option("--max-monthly-spend-cents <cents>","Optional hard cap on monthly spend, in cents",o=>parseInt(o,10)).option("--rate-limit <maxPerWindow>","Burst-protection rate limit on requests (default: 600). Publishing requires every plan to carry one \u2014 pass --no-rate-limit only for drafts.",o=>parseInt(o,10)).option("--no-rate-limit","Create the plan without a burst rate limit").option("--rate-window <window>","Rate limit window: second | minute | hour (default: minute)").option("--env <env>","Environment scope").action(async(o,e)=>{let i=r(),a=await R(i,o),s={key:e.key,name:e.name};if(e.free&&(s.free=!0),e.rateLimit!==!1){let d=typeof e.rateLimit=="number"?e.rateLimit:600,p=e.rateWindow??"minute";if(!["second","minute","hour"].includes(p))throw new k(`Invalid --rate-window "${p}" \u2014 use second, minute, or hour.`,void 0,{code:"INVALID_RATE_WINDOW"});s.limits=[{dimension:"requests",window:{type:"named",name:p},capacity:d,enforcement:"enforce"}]}typeof e.recurringFeeCents=="number"&&(s.recurring_fee_cents=e.recurringFeeCents);let u=Zg(e.recurringCreditGrantCents,e.oneTimeCreditGrantCents);u&&(s.grants=u),typeof e.trialDays=="number"&&(s.trial_days=e.trialDays),typeof e.maxMonthlySpendCents=="number"&&(s.max_monthly_spend_cents=e.maxMonthlySpendCents);let l=await i.createPlan(a,s,{env:e.env});z(t,`Plan ${e.key} created`,{ok:!0,productId:a,plan:l})}),n.command("update <productIdOrName> <planId>").description("Update a plan (5-knob spec)").option("--name <name>","Human-friendly plan name").option("--recurring-fee-cents <cents>","Flat subscription fee per period, in cents",o=>parseInt(o,10)).option("--recurring-credit-grant-cents <cents>","Credit granted each period, in cents",o=>parseInt(o,10)).option("--one-time-credit-grant-cents <cents>","Prepaid balance at signup, in cents",o=>parseInt(o,10)).option("--trial-days <days>","Free-trial length in days",o=>parseInt(o,10)).option("--max-monthly-spend-cents <cents>","Optional hard cap on monthly spend, in cents",o=>parseInt(o,10)).option("--env <env>","Environment scope").action(async(o,e,i)=>{let a=r(),s=await R(a,o),u={};i.name!==void 0&&(u.name=i.name),typeof i.recurringFeeCents=="number"&&(u.recurring_fee_cents=i.recurringFeeCents);let l=Zg(i.recurringCreditGrantCents,i.oneTimeCreditGrantCents);if(l&&(u.grants=l),typeof i.trialDays=="number"&&(u.trial_days=i.trialDays),typeof i.maxMonthlySpendCents=="number"&&(u.max_monthly_spend_cents=i.maxMonthlySpendCents),Object.keys(u).length===0)throw new k("No fields to update. Pass --name, --recurring-fee-cents, --recurring-credit-grant-cents, --one-time-credit-grant-cents, --trial-days, or --max-monthly-spend-cents.",void 0,{code:"PLAN_UPDATE_NO_FIELDS"});let d=await a.updatePlan(s,e,u,{env:i.env});z(t,`Plan ${e} updated`,{ok:!0,productId:s,plan:d})}),n.command("delete <productIdOrName> <planId>").description("Delete a plan. Requires --yes.").option("--yes","Skip confirmation; required for delete").option("--env <env>","Environment scope").action(async(o,e,i)=>{if(!i.yes)throw new k("Pass --yes to confirm plan deletion.",void 0,{code:"DESTRUCTIVE_OP_REQUIRES_YES"});let a=r(),s=await R(a,o);await a.deletePlan(s,e,{env:i.env}),z(t,`Plan ${e} deleted`,{ok:!0,productId:s,deleted:e})})}function Fg(t,r){let n=t.command("persona").description("Mint and manage test-env personas (test API keys)");n.command("bootstrap <productIdOrName>").description("Issue a fresh fsk_test_ API key in a test environment").requiredOption("--env <env>","Environment name (must be test-strategy)").option("--plan <planKey>","Plan key to assign (e.g. starter)").option("--display-name <name>","Persona display name").action(async(o,e)=>{let i=r(),a=await R(i,o),s=await Pl(i,a,e.env),u=await i.issuePersonaBootstrapKey(a,s,{planKey:e.plan,displayName:e.displayName});z(t,"Persona bootstrapped",{ok:!0,productId:a,environmentId:s,result:u})}),n.command("list <productIdOrName>").description("List personas for a test environment").requiredOption("--env <env>","Environment name").action(async(o,e)=>{let i=r(),a=await R(i,o),s=await Pl(i,a,e.env),u=await i.listPersonas(a,s);z(t,"Personas",{ok:!0,productId:a,environmentId:s,result:u})}),n.command("revoke <productIdOrName> <personaId>").description("Revoke a persona's API key").requiredOption("--env <env>","Environment name").action(async(o,e,i)=>{let a=r(),s=await R(a,o),u=await Pl(a,s,i.env),l=await a.revokePersona(s,u,e);z(t,`Persona ${e} revoked`,{ok:!0,productId:s,environmentId:u,result:l})})}async function Pl(t,r,n){try{return await Br(t,r,n)}catch(o){throw new k(o instanceof Error?o.message:`Environment "${n}" not found on product ${r}.`,void 0,{code:"ENV_NOT_FOUND"})}}function Mg(t,r){t.command("usage").description("Usage observability for a product").command("summary <productIdOrName>").description("Show usage summary for the last 30 days").action(async o=>{let e=r(),i=await R(e,o),a=await e.managementGetUsage(i);z(t,"Usage summary",{ok:!0,productId:i,summary:a})})}function Vg(t,r){let n=t.command("connect").description("Connection status for GitHub and Stripe (browser-only flows)");n.command("github").description("Print GitHub-connection status").action(async()=>{let e=await r().builderGitHubStatus();z(t,"GitHub status",{ok:!0,status:e})}),n.command("stripe <productIdOrName>").description("Print Stripe Connect status for a product").action(async o=>{let e=r(),i=await R(e,o),a=await e.productStripeStatus(i);z(t,"Stripe status",{ok:!0,productId:i,status:a})})}function o$(t){if(!t||typeof t!="object")return[];let r=t;return Array.isArray(r.data)?r.data:Array.isArray(r.tokens)?r.tokens:Array.isArray(t)?t:[]}function Bg(t,r){let n=t.command("token").description("Maker-token management (list, create, revoke)");n.command("list").description("List maker tokens in the current org").action(async()=>{let o=r(),e=o$(await o.managementListMakerTokens());z(t,`${e.length} token(s)`,{ok:!0,count:e.length,tokens:e.map(i=>({id:i.id,name:i.name??null,scopes:i.scopes??[],productId:i.productId??null,lastFour:i.lastFour??null,createdAt:i.createdAt??null,revokedAt:i.revokedAt??null}))})}),n.command("create").description("Create a new maker token (returns the secret once)").requiredOption("--name <name>","Human-friendly token name").option("--scope <scope...>","Scope(s) to attach (e.g. products:update products:publish)").option("--product <productId>","Scope to a specific product").action(async o=>{let i=await r().managementCreateMakerToken({name:o.name,scopes:o.scope,productId:o.product});z(t,"Token created",{ok:!0,result:i})}),n.command("revoke <tokenId>").description("Revoke a maker token. Requires --yes.").option("--yes","Skip confirmation; required for revoke").action(async(o,e)=>{if(!e.yes)throw new k("Pass --yes to confirm token revocation.",void 0,{code:"DESTRUCTIVE_OP_REQUIRES_YES"});await r().managementRevokeMakerToken(o),z(t,`Token ${o} revoked`,{ok:!0,revoked:o})})}function a$(t){if(!t||typeof t!="object")return[];let r=t;return Array.isArray(r.data)?r.data:Array.isArray(r.tokens)?r.tokens:Array.isArray(t)?t:[]}async function s$(t,r,n){if(!n)return null;try{return await Br(t,r,n)}catch(o){throw new k(o instanceof Error?o.message:`Environment "${n}" not found on product ${r}.`,void 0,{code:"ENV_NOT_FOUND"})}}function Gg(t,r){let o=(t.commands.find(e=>e.name()==="metering")??t.command("metering").description("Runtime metering management")).command("tokens").description("Runtime metering token management");o.command("list <productId>").description("List runtime metering tokens for a product").action(async e=>{let i=r(),a=a$(await i.managementListMeteringTokens(e));z(t,`${a.length} metering token(s)`,{ok:!0,count:a.length,tokens:a})}),o.command("create <productId>").description("Create a runtime metering token (returns FARTHERSHORE_METERING_TOKEN once)").requiredOption("--name <name>","Human-friendly token name").option("--env <environment>","Scope token to an environment name or id").option("--environment <environment>","Alias for --env").action(async(e,i)=>{let a=r(),s=i.env??i.environment,u=await s$(a,e,s),l=await a.managementCreateMeteringToken(e,{name:i.name,environmentId:u});z(t,"Metering token created",{ok:!0,envVar:"FARTHERSHORE_METERING_TOKEN",result:l})}),o.command("revoke <productId> <tokenId>").description("Revoke a runtime metering token. Requires --yes.").option("--yes","Skip confirmation; required for revoke").action(async(e,i,a)=>{if(!a.yes)throw new k("Pass --yes to confirm metering token revocation.",void 0,{code:"DESTRUCTIVE_OP_REQUIRES_YES"});await r().managementRevokeMeteringToken(e,i),z(t,`Metering token ${i} revoked`,{ok:!0,productId:e,revoked:i})})}import{existsSync as Wg,mkdirSync as c$,writeFileSync as u$}from"node:fs";import{basename as l$,dirname as Tl,join as d$,resolve as m$}from"node:path";import{createInterface as p$}from"node:readline/promises";import{stdin as Hg,stdout as Jg}from"node:process";var Zi="product/product.config.ts",f$="^0.4.0",g$="^0.1.16";function jl(t){let r=new Set;for(let a of t.pricing.meters??[])typeof a.dimension=="string"&&r.add(a.dimension);let n=new Set,o={key:t.kind,name:t.label.split(" \u2014 ")[0]??t.label,description:t.description,...t.pricing};t.kind==="free"&&(o.free=!0,o.limits=[{dimension:"requests",window:{type:"named",name:"month"},capacity:1e3,enforcement:"enforce"}],n.add("requests"));let e={product:{name:"my-product",displayName:"My Product",baseUrl:"https://app.example.com"},gateway:{},plans:[o]},i=new Set([...r,...n]);return i.size>0&&(e.metering={meters:[...i].map(a=>({key:a,display:Kg(a)}))}),e}function h$(t){if(!t)throw new k(`--template is required. Choose one of: ${pe.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_REQUIRED"});let r=t.toLowerCase();if(!pe.includes(r))throw new k(`Unknown template "${t}". Choose one of: ${pe.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_UNKNOWN"});return r}function qg(t){let r=jl(t);return`import { fs } from "@farthershore/product";
105
+ `,handler:async({client:e,args:t,emit:r})=>{let o=t.productId,i=kS(await e.managementListPlans(o)).map(s=>({id:s.id,key:s.planKey??s.key??"",name:s.name??"",version:s.version??null,free:s.free??!1,recurring_fee_cents:s.recurring_fee_cents??0,grants:s.grants??[],recurring_grant_cents:An({grants:s.grants}),one_time_grant_cents:Rt({grants:s.grants}),trial_days:s.trial_days??0,max_monthly_spend_cents:s.max_monthly_spend_cents??null,status:s.status??(s.isActive===!1?"INACTIVE":"ACTIVE")}));r({productId:o,count:i.length,plans:i},`${i.length} plan(s) for product ${o}`),ke()!=="json"&&console.log(SS(i))}},mcp:{tool:"fs_plan_list",title:"List plans",description:"List a product's pricing plans (read-only). Plans are managed as code in the product's GitHub repo \u2014 to add/change/remove a plan, edit the manifest (product/) and push; this tool only reads the current state. Pass the product id (from fs_product_list).",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id whose plans to list.")},handler:async(e,{productId:t})=>e.managementListPlans(t)}},{opKey:"plan.create",operationClass:"contract",scope:["products:update"],sideEffect:"write",cli:{group:"plan",command:"create",summary:"Create a plan on a product (canonical plan spec)",idempotent:!0,args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"key",kind:"flag",token:"--key <key>",describe:"Stable plan key (e.g. starter, pro)",required:!0},{field:"name",kind:"flag",token:"--name <name>",describe:"Human-friendly plan name",required:!0},{field:"free",kind:"flag",token:"--free",describe:"Mark this as the free plan (requires hard-enforced limits)"},{field:"recurringFeeCents",kind:"flag",token:"--recurring-fee-cents <cents>",describe:"Flat subscription fee per period, in cents",parser:e=>parseInt(e,10)},{field:"grant",kind:"flag",token:"--grant <kind:amount_cents>",describe:"Canonical credit grant, repeatable. Supported: recurring:2000, one_time:10000.",parser:(e,t)=>[...t,e],defaultValue:[]},{field:"trialDays",kind:"flag",token:"--trial-days <days>",describe:"Free-trial length in days",parser:e=>parseInt(e,10)},{field:"maxMonthlySpendCents",kind:"flag",token:"--max-monthly-spend-cents <cents>",describe:"Optional hard cap on monthly spend, in cents",parser:e=>parseInt(e,10)},{field:"rateLimit",kind:"flag",token:"--rate-limit <maxPerWindow>",describe:"Burst-protection rate limit on requests (default: 600). Publishing requires every plan to carry one \u2014 pass --no-rate-limit only for drafts.",parser:e=>parseInt(e,10)},{field:"rateLimit",kind:"flag",token:"--no-rate-limit",describe:"Create the plan without a burst rate limit"},{field:"rateWindow",kind:"flag",token:"--rate-window <window>",describe:"Rate limit window: second | minute | hour (default: minute)"},{field:"meter",kind:"flag",token:"--meter <dimension:price_per_unit_micros>",describe:"Usage meter for PAY_AS_YOU_GO / INCLUDED_USAGE plans, repeatable (e.g. --meter requests:1000). Counts as revenue for the no-revenue check.",parser:(e,t)=>[...t,e],defaultValue:[]},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment scope"}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=t.productId,s=Ah(t.meter),c=Nh(t.grant),u=Ph({key:t.key,name:t.name,free:t.free,recurringFeeCents:t.recurringFeeCents,grants:c,trialDays:t.trialDays,maxMonthlySpendCents:t.maxMonthlySpendCents,rateLimit:t.rateLimit,rateWindow:t.rateWindow,meters:s}),l=await e.createPlan(i,u,{env:t.env},r);n(l)||o({productId:i,plan:l},`Plan ${t.key} created`)}},mcp:null},{opKey:"plan.update",operationClass:"contract",scope:["products:update"],sideEffect:"write",cli:{group:"plan",command:"update",summary:"Update a plan (canonical plan spec)",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"planId",kind:"positional",token:"<planId>"},{field:"name",kind:"flag",token:"--name <name>",describe:"Human-friendly plan name"},{field:"recurringFeeCents",kind:"flag",token:"--recurring-fee-cents <cents>",describe:"Flat subscription fee per period, in cents",parser:e=>parseInt(e,10)},{field:"grant",kind:"flag",token:"--grant <kind:amount_cents>",describe:"Canonical credit grant, repeatable. Supported: recurring:2000, one_time:10000. Replaces the plan's grants[].",parser:(e,t)=>[...t,e],defaultValue:[]},{field:"trialDays",kind:"flag",token:"--trial-days <days>",describe:"Free-trial length in days",parser:e=>parseInt(e,10)},{field:"maxMonthlySpendCents",kind:"flag",token:"--max-monthly-spend-cents <cents>",describe:"Optional hard cap on monthly spend, in cents",parser:e=>parseInt(e,10)},{field:"meter",kind:"flag",token:"--meter <dimension:price_per_unit_micros>",describe:"Usage meter for PAY_AS_YOU_GO / INCLUDED_USAGE plans, repeatable (e.g. --meter requests:1000). Replaces the plan's meters[].",parser:(e,t)=>[...t,e],defaultValue:[]},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment scope"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.planId,i={};t.name!==void 0&&(i.name=t.name),typeof t.recurringFeeCents=="number"&&(i.recurring_fee_cents=t.recurringFeeCents);let s=Nh(t.grant);s&&(i.grants=s);let c=Ah(t.meter);if(c&&(i.meters=c),typeof t.trialDays=="number"&&(i.trial_days=t.trialDays),typeof t.maxMonthlySpendCents=="number"&&(i.max_monthly_spend_cents=t.maxMonthlySpendCents),Object.keys(i).length===0)throw new k("No fields to update. Pass --name, --recurring-fee-cents, --grant, --trial-days, --max-monthly-spend-cents, or --meter.",void 0,{code:"PLAN_UPDATE_NO_FIELDS"});let u=await e.updatePlan(o,n,i,{env:t.env});r({productId:o,plan:u},`Plan ${n} updated`)}},mcp:null},{opKey:"plan.delete",operationClass:"contract",scope:["products:update"],sideEffect:"write",cli:{group:"plan",command:"delete",summary:"Delete a plan. Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm plan deletion.",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"planId",kind:"positional",token:"<planId>"},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment scope"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.planId;await e.deletePlan(o,n,{env:t.env}),r({productId:o,deleted:n},`Plan ${n} deleted`)}},mcp:null}];function Ch(e,t){ee(e,t,$S)}var IS=[{opKey:"persona.bootstrap",operationClass:"operate",scope:["products:read"],sideEffect:"write",cli:{group:"persona",command:"bootstrap",summary:"Issue a fresh fsk_test_ API key in a test environment",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment name (must be test-strategy)",required:!0},{field:"plan",kind:"flag",token:"--plan <planKey>",describe:"Plan key to assign (e.g. starter)"},{field:"displayName",kind:"flag",token:"--display-name <name>",describe:"Persona display name"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=await Fl(e,o,t.env),i=await e.issuePersonaBootstrapKey(o,n,{planKey:t.plan,displayName:t.displayName});r({productId:o,environmentId:n,result:i},"Persona bootstrapped")}},mcp:{tool:"fs_persona_bootstrap",title:"Bootstrap a test persona",description:"Issue a one-time test bootstrap key for a product environment \u2014 use it to provision a test persona. Returns the key ONCE; store it now.",returnsOneTimeSecret:!0,annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id."),environmentId:a.string().describe("The environment id to scope the persona to.")},handler:async(e,{productId:t,environmentId:r})=>e.issuePersonaBootstrapKey(t,r)}},{opKey:"persona.read",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"persona",command:"list",summary:"List personas for a test environment",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment name",required:!0}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=await Fl(e,o,t.env),i=await e.listPersonas(o,n);r({productId:o,environmentId:n,result:i},"Personas")}},mcp:{tool:"fs_persona_list",title:"List personas",description:"List a product environment's test personas (id, label, status). Read-only.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id."),environmentId:a.string().describe("The environment id whose personas to list.")},handler:async(e,{productId:t,environmentId:r})=>e.listPersonas(t,r)}},{opKey:"persona.revoke",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"persona",command:"revoke",summary:"Revoke a persona's API key",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"personaId",kind:"positional",token:"<personaId>"},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment name",required:!0}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.personaId,i=await Fl(e,o,t.env),s=await e.revokePersona(o,i,n);r({productId:o,environmentId:i,result:s},`Persona ${n} revoked`)}},mcp:{tool:"fs_persona_revoke",title:"Revoke a persona",description:"Revoke a test persona. Its credentials stop working.",annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id."),environmentId:a.string().describe("The environment id."),personaId:a.string().describe("The persona id to revoke.")},handler:async(e,{productId:t,environmentId:r,personaId:o})=>e.revokePersona(t,r,o)}}];function Rh(e,t){ee(e,t,IS)}async function Fl(e,t,r){try{return await Ci(e,t,r)}catch(o){throw new k(o instanceof Error?o.message:`Environment "${r}" not found on product ${t}.`,void 0,{code:"ENV_NOT_FOUND"})}}var wS=[{opKey:"usage.read",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"usage",command:"summary",summary:"Show usage summary for the last 30 days",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=await e.managementGetUsage(o);r({productId:o,summary:n},"Usage summary")}},mcp:{tool:"fs_usage_read",title:"Read usage summary",description:"Read a product's usage summary \u2014 metered request counts and tier utilization. Read-only.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id whose usage to read.")},handler:async(e,{productId:t})=>e.managementGetUsage(t)}}];function Dh(e,t){ee(e,t,wS)}function zh(e,t){let r=e.command("connect").description("Connection status for GitHub and Stripe (browser-only flows)");r.command("github").description("Print GitHub-connection status").action(async()=>{let n=await t().builderGitHubStatus();H({status:n},"GitHub status")}),r.command("stripe <productIdOrName>").description("Print Stripe Connect status for a product").action(async o=>{let n=t(),i=await Ni(n,o),s=await n.productStripeStatus(i);H({productId:i,status:s},"Stripe status")})}function ES(e){if(!e||typeof e!="object")return[];let t=e;return Array.isArray(t.data)?t.data:Array.isArray(t.tokens)?t.tokens:Array.isArray(e)?e:[]}var OS=[{opKey:"maker_token.read",operationClass:"operate",scope:[],sideEffect:"read",cli:{group:"token",command:"list",summary:"List maker tokens in the current org",args:[],handler:async({client:e,emit:t})=>{let r=ES(await e.managementListMakerTokens());t({count:r.length,tokens:r.map(o=>({id:o.id,name:o.name??null,scopes:o.scopes??[],productId:o.productId??null,lastFour:o.lastFour??null,createdAt:o.createdAt??null,revokedAt:o.revokedAt??null}))},`${r.length} token(s)`)}},mcp:{tool:"fs_maker_token_list",title:"List maker tokens",description:"List the workspace's maker tokens (mk_) \u2014 id, label, scopes, last-four, status. Read-only; secrets are never shown. Creating/revoking maker tokens is intentionally not exposed via MCP.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{},handler:async e=>e.managementListMakerTokens()}},{opKey:"maker_token.create",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"token",command:"create",summary:"Create a new maker token (returns the secret once)",args:[{field:"name",kind:"flag",token:"--name <name>",describe:"Human-friendly token name",required:!0},{field:"scope",kind:"flag",token:"--scope <scope...>",describe:"Scope(s) to attach (e.g. products:update products:publish)"},{field:"product",kind:"flag",token:"--product <productId>",describe:"Scope to a specific product"}],handler:async({client:e,args:t,emit:r})=>{let o=await e.managementCreateMakerToken({name:t.name,scopes:t.scope,productId:t.product});r({result:o},"Token created")}},mcp:null},{opKey:"maker_token.revoke",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"token",command:"revoke",summary:"Revoke a maker token. Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm token revocation.",args:[{field:"tokenId",kind:"positional",token:"<tokenId>"}],handler:async({client:e,args:t,emit:r})=>{let o=t.tokenId;await e.managementRevokeMakerToken(o),r({revoked:o},`Token ${o} revoked`)}},mcp:null}];function jh(e,t){ee(e,t,OS)}var Zl=["gateway_verification","metering","health","tunnel"];function Uh(e){if(!e||typeof e!="object")return[];let t=e;return Array.isArray(t.data)?t.data:Array.isArray(t.backends)?t.backends:Array.isArray(t.tokens)?t.tokens:Array.isArray(e)?e:[]}async function Lh(e,t,r){if(!r)return null;try{return await Ci(e,t,r)}catch(o){throw new k(o instanceof Error?o.message:`Environment "${r}" not found on product ${t}.`,void 0,{code:"ENV_NOT_FOUND"})}}var Vl=e=>typeof e=="string"&&e.length>0?e.split(",").map(t=>t.trim()).filter(t=>t.length>0):void 0,TS=[{opKey:"backend.read",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"backend",command:"list",summary:"List backends for a product",args:[{field:"productId",kind:"positional",token:"<productId>"}],handler:async({client:e,args:t,emit:r})=>{let o=Uh(await e.builderListBackends(t.productId));r({count:o.length,backends:o},`${o.length} backend(s)`)}},mcp:{tool:"fs_backend_list",title:"List backends",description:"List a product's backends (origins) \u2014 id, name, slug, transport mode, default flag. Read-only.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id whose backends to list.")},handler:async(e,{productId:t})=>e.builderListBackends(t)}},{opKey:"backend.create",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"backend",command:"create",summary:"Create a backend (default transport: public_origin)",idempotent:!0,args:[{field:"productId",kind:"positional",token:"<productId>"},{field:"name",kind:"flag",token:"--name <name>",describe:"Human-friendly backend name",required:!0},{field:"slug",kind:"flag",token:"--slug <slug>",describe:"Stable slug (defaults to a slugified name)"},{field:"env",kind:"flag",token:"--env <environment>",describe:"Scope backend to an environment name or id"},{field:"transport",kind:"flag",token:"--transport <mode>",describe:"Transport mode: public_origin | mtls | cloudflare_tunnel",defaultValue:"public_origin"},{field:"runner",kind:"flag",token:"--runner <runner>",describe:"managed_cloudflared | sidecar"},{field:"runtime",kind:"flag",token:"--runtime <runtime>",describe:"Container/runtime descriptor"},{field:"originUrl",kind:"flag",token:"--origin-url <url>",describe:"Builder origin URL (public_origin/mtls)"},{field:"default",kind:"flag",token:"--default",describe:"Mark this backend the product default"}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=t.productId,s=await Lh(e,i,t.env),c=t.transport==="mtls"||t.transport==="cloudflare_tunnel"?t.transport:"public_origin",u=await e.builderCreateBackend(i,{name:t.name,slug:t.slug,environmentId:s,transportMode:c,runner:t.runner==="managed_cloudflared"||t.runner==="sidecar"?t.runner:null,runtime:t.runtime??null,originUrl:t.originUrl??null,isDefault:t.default},r);n(u)||o({result:u},"Backend created")}},mcp:{tool:"fs_backend_create",title:"Create a backend",description:"Create a backend (origin) for a product. Pick a transport mode: public_origin (plain HTTPS), mtls (mutual TLS), or cloudflare_tunnel (secure bring-your-own-backend). Mark it default to route traffic to it.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id to create the backend in."),name:a.string().describe("Backend name (e.g. 'prod-origin')."),slug:a.string().optional().describe("URL-safe slug; derived from name if omitted."),transportMode:a.enum(["public_origin","mtls","cloudflare_tunnel"]).optional().describe("How the gateway reaches the origin; defaults to public_origin."),originUrl:a.string().optional().describe("The origin URL (for public_origin / mtls modes)."),isDefault:a.boolean().optional().describe("Route traffic to this backend by default."),...Ue},handler:async(e,t)=>e.builderCreateBackend(t.productId,{name:t.name,slug:t.slug,transportMode:t.transportMode,originUrl:t.originUrl,isDefault:t.isDefault},{idempotencyKey:t.idempotencyKey})}},{opKey:"backend.delete",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"backend",command:"delete",summary:"Delete a backend (revokes its runtime tokens). Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm backend deletion.",args:[{field:"productId",kind:"positional",token:"<productId>"},{field:"backendId",kind:"positional",token:"<backendId>"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.backendId;await e.builderDeleteBackend(o,n),r({productId:o,deleted:n},`Backend ${n} deleted`)}},mcp:{tool:"fs_backend_delete",title:"Delete a backend",description:"Delete a backend (origin). Traffic routed to it stops; re-create to restore.",annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id."),backendId:a.string().describe("The backend id to delete.")},handler:async(e,{productId:t,backendId:r})=>e.builderDeleteBackend(t,r)}},{opKey:"runtime_token.read",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"backend tokens",command:"list",summary:"List runtime tokens for a product",args:[{field:"productId",kind:"positional",token:"<productId>"}],handler:async({client:e,args:t,emit:r})=>{let o=Uh(await e.builderListRuntimeTokens(t.productId));r({count:o.length,tokens:o},`${o.length} runtime token(s)`)}},mcp:{tool:"fs_runtime_token_list",title:"List runtime tokens",description:"List a product's runtime tokens (fsrt_) \u2014 id, last-four, capabilities, status. Read-only; secrets are never shown.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id.")},handler:async(e,{productId:t})=>e.builderListRuntimeTokens(t)}},{opKey:"runtime_token.mint",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"backend tokens",command:"create",summary:"Create a runtime token (returns FS_RUNTIME_TOKEN once)",idempotent:!0,args:[{field:"productId",kind:"positional",token:"<productId>"},{field:"env",kind:"flag",token:"--env <environment>",describe:"Scope token to an environment name or id"},{field:"backend",kind:"flag",token:"--backend <backendId>",describe:"Bind token to a specific backend"},{field:"kind",kind:"flag",token:"--kind <kind>",describe:"live | test (defaults from env scope)"},{field:"capabilities",kind:"flag",token:"--capabilities <list>",describe:`Comma-separated capabilities: ${Zl.join(" | ")}. Default: core's DEFAULT_CAPABILITIES. Use tunnel for cloudflare_tunnel backends.`},{field:"meters",kind:"flag",token:"--meters <list>",describe:"Comma-separated allowed meters (default: all product meters)"},{field:"routes",kind:"flag",token:"--routes <list>",describe:"Comma-separated allowed routes"}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=t.productId,s=await Lh(e,i,t.env),c=t.kind==="test"||t.kind==="live"?t.kind:void 0,u=Vl(t.capabilities);if(u){for(let d of u)if(!Zl.includes(d))throw new k(`Unknown capability "${d}". Available: ${Zl.join(", ")}.`,void 0,{code:"UNKNOWN_RUNTIME_TOKEN_CAPABILITY"})}let l=await e.builderCreateRuntimeToken(i,{environmentId:s,backendId:t.backend??null,kind:c,capabilities:u,allowedMeters:Vl(t.meters),allowedRoutes:Vl(t.routes)},r);n(l)||o({envVar:"FS_RUNTIME_TOKEN",result:l},"Runtime token created")}},mcp:{tool:"fs_runtime_token_mint",title:"Mint a runtime token",description:"Mint a new runtime token (fsrt_) for a backend. Returns the plaintext token ONCE \u2014 store it now (e.g. as FS_RUNTIME_TOKEN). Capabilities default to the backend's needs (gateway_verification, metering, health).",returnsOneTimeSecret:!0,annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id."),backendId:a.string().optional().describe("Bind the token to this backend."),environmentId:a.string().optional().describe("Scope to a preview environment (omit for production)."),kind:a.enum(["live","test"]).optional().describe("Token kind; defaults from the env scope."),capabilities:a.array(a.string()).optional().describe("Capabilities (gateway_verification, metering, health, tunnel)."),...Ue},handler:async(e,t)=>e.builderCreateRuntimeToken(t.productId,{backendId:t.backendId??null,environmentId:t.environmentId??null,kind:t.kind,capabilities:t.capabilities},{idempotencyKey:t.idempotencyKey})}},{opKey:"runtime_token.rotate",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"backend tokens",command:"rotate",summary:"Rotate a runtime token (returns a fresh FS_RUNTIME_TOKEN once)",args:[{field:"productId",kind:"positional",token:"<productId>"},{field:"tokenId",kind:"positional",token:"<tokenId>"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.tokenId,i=await e.builderRotateRuntimeToken(o,n);r({envVar:"FS_RUNTIME_TOKEN",result:i},`Runtime token ${n} rotated`)}},mcp:{tool:"fs_runtime_token_rotate",title:"Rotate a runtime token",description:"Rotate a runtime token: mint a fresh secret carrying the same scope and revoke the old one. Returns the new plaintext token ONCE.",returnsOneTimeSecret:!0,annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id."),tokenId:a.string().describe("The runtime token id to rotate."),...Ue},handler:async(e,t)=>e.builderRotateRuntimeToken(t.productId,t.tokenId,{idempotencyKey:t.idempotencyKey})}},{opKey:"runtime_token.revoke",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"backend tokens",command:"revoke",summary:"Revoke a runtime token. Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm runtime token revocation.",args:[{field:"productId",kind:"positional",token:"<productId>"},{field:"tokenId",kind:"positional",token:"<tokenId>"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.tokenId;await e.builderRevokeRuntimeToken(o,n),r({productId:o,revoked:n},`Runtime token ${n} revoked`)}},mcp:{tool:"fs_runtime_token_revoke",title:"Revoke a runtime token",description:"Revoke a runtime token. The backend using it stops verifying.",annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id."),tokenId:a.string().describe("The runtime token id to revoke.")},handler:async(e,{productId:t,tokenId:r})=>e.builderRevokeRuntimeToken(t,r)}}];function Mh(e,t){ee(e,t,TS)}import{existsSync as Fh,mkdirSync as PS,writeFileSync as AS}from"node:fs";import{basename as NS,dirname as Bl,join as CS,resolve as RS}from"node:path";import{createInterface as DS}from"node:readline/promises";import{stdin as Zh,stdout as Vh}from"node:process";var Di="product/product.config.ts",zS="^0.5.0",jS="^0.1.16";function Gl(e){let t=new Set;for(let c of e.pricing.meters??[])typeof c.dimension=="string"&&t.add(c.dimension);let r=new Set,o={key:e.kind,name:e.label.split(" \u2014 ")[0]??e.label,description:e.description,...e.pricing},n=[{dimension:"requests",window:{type:"named",name:"minute"},capacity:600,enforcement:"enforce"}];r.add("requests"),e.kind==="free"&&(o.free=!0,n.push({dimension:"requests",window:{type:"named",name:"month"},capacity:1e3,enforcement:"enforce"})),o.limits=n;let i={product:{name:"my-product",displayName:"My Product",baseUrl:"https://app.example.com"},gateway:{},plans:[o]},s=new Set([...t,...r]);return s.size>0&&(i.metering={meters:[...s].map(c=>({key:c,display:Hh(c)}))}),i}function US(e){if(!e)throw new k(`--template is required. Choose one of: ${me.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_REQUIRED"});let t=e.toLowerCase();if(!me.includes(t))throw new k(`Unknown template "${e}". Choose one of: ${me.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_UNKNOWN"});return t}function Bh(e){let t=Gl(e);return`import { fs } from "@farthershore/product";
103
106
  import { configureFeatures } from "./features.js";
104
107
  import { configureMeters } from "./meters.js";
105
108
  import { configurePlans } from "./plans.js";
106
109
 
107
- const product = fs.product(${Fe(r.product.name)}, {
108
- origin: ${Fe(r.product.baseUrl)},
109
- displayName: ${Fe(r.product.displayName)},
110
+ const product = fs.product(${Le(t.product.name)}, {
111
+ origin: ${Le(t.product.baseUrl)},
112
+ displayName: ${Le(t.product.displayName)},
110
113
  });
111
114
 
112
115
  product.use(configureMeters, configureFeatures, configurePlans);
113
116
 
114
117
  export default product;
115
- `}function v$(t,r=Zi,n){let o=Tl(r),e=s=>o==="."?s:`${o}/${s}`,i=l$(o)==="product"?Tl(o):o,a=s=>i==="."?s:d$(i,s);return[{path:a(".gitignore"),content:b$()},{path:r,content:qg(t)},{path:e("package.json"),content:_$()},{path:e("tsconfig.json"),content:y$()},{path:e("meters.ts"),content:z$(t)},{path:e("features.ts"),content:O$(n)},{path:e("plans.ts"),content:E$(t)},{path:a("frontend/package.json"),content:$$()},{path:a("frontend/index.html"),content:x$()},{path:a("frontend/src/App.tsx"),content:k$()},{path:a("frontend/src/styles.css"),content:S$()},{path:a("frontend/tsconfig.json"),content:w$()},{path:a("frontend/vite.config.ts"),content:I$()}]}function _$(){return`${JSON.stringify({private:!0,type:"module",scripts:{build:"farthershore-manifest-build --out manifest-ir.json",validate:"farthershore-manifest-build --out manifest-ir.json"},dependencies:{"@farthershore/product":f$},devDependencies:{typescript:"^6.0.2"}},null,2)}
116
- `}function y$(){return`${JSON.stringify({compilerOptions:{target:"ES2022",module:"NodeNext",moduleResolution:"NodeNext",strict:!0,noEmit:!0,skipLibCheck:!0},include:["**/*.ts"]},null,2)}
117
- `}function b$(){return["# OS",".DS_Store","Thumbs.db","","# Dependencies and local output","product/node_modules/","product/manifest-ir.json","product/manifest-diagnostics.json","frontend/node_modules/","frontend/dist/","manifest-ir.json","manifest-diagnostics.json","","# Local env + tooling",".env",".env.local",".vscode/",".idea/",""].join(`
118
- `)}function $$(){return`${JSON.stringify({private:!0,type:"module",scripts:{dev:"vite",build:"tsc -b && vite build",preview:"vite preview"},dependencies:{"@farthershore/farthershore-js":g$,react:"^19.0.0","react-dom":"^19.0.0"},devDependencies:{"@types/react":"^19.0.0","@types/react-dom":"^19.0.0","@vitejs/plugin-react":"^4.3.4",typescript:"^6.0.2",vite:"^6.0.0"}},null,2)}
119
- `}function x$(){return["<!doctype html>",'<html lang="en">'," <head>",' <meta charset="UTF-8" />',' <meta name="viewport" content="width=device-width, initial-scale=1.0" />'," <title>Farther Shore Product</title>"," </head>"," <body>",' <div id="root"></div>',' <script type="module" src="/src/App.tsx"></script>'," </body>","</html>",""].join(`
120
- `)}function k$(){return`import React from "react";
118
+ `}function LS(e,t=Di,r){let o=Bl(t),n=c=>o==="."?c:`${o}/${c}`,i=NS(o)==="product"?Bl(o):o,s=c=>i==="."?c:CS(i,c);return[{path:s(".gitignore"),content:ZS()},{path:t,content:Bh(e)},{path:n("package.json"),content:MS()},{path:n("tsconfig.json"),content:FS()},{path:n("meters.ts"),content:qS(e)},{path:n("features.ts"),content:JS(r)},{path:n("plans.ts"),content:YS(e)},{path:s("frontend/package.json"),content:VS()},{path:s("frontend/index.html"),content:BS()},{path:s("frontend/src/App.tsx"),content:HS()},{path:s("frontend/src/styles.css"),content:GS()},{path:s("frontend/tsconfig.json"),content:KS()},{path:s("frontend/vite.config.ts"),content:WS()}]}function MS(){return`${JSON.stringify({private:!0,type:"module",scripts:{build:"farthershore-manifest-build --out manifest-ir.json",validate:"farthershore-manifest-build --out manifest-ir.json"},dependencies:{"@farthershore/product":zS},devDependencies:{typescript:"^6.0.2"}},null,2)}
119
+ `}function FS(){return`${JSON.stringify({compilerOptions:{target:"ES2022",module:"NodeNext",moduleResolution:"NodeNext",strict:!0,noEmit:!0,skipLibCheck:!0},include:["**/*.ts"]},null,2)}
120
+ `}function ZS(){return["# OS",".DS_Store","Thumbs.db","","# Dependencies and local output","product/node_modules/","product/manifest-ir.json","product/manifest-diagnostics.json","frontend/node_modules/","frontend/dist/","manifest-ir.json","manifest-diagnostics.json","","# Local env + tooling",".env",".env.local",".vscode/",".idea/",""].join(`
121
+ `)}function VS(){return`${JSON.stringify({private:!0,type:"module",scripts:{dev:"vite",build:"tsc -b && vite build",preview:"vite preview"},dependencies:{"@farthershore/farthershore-js":jS,react:"^19.0.0","react-dom":"^19.0.0"},devDependencies:{"@types/react":"^19.0.0","@types/react-dom":"^19.0.0","@vitejs/plugin-react":"^4.3.4",typescript:"^6.0.2",vite:"^6.0.0"}},null,2)}
122
+ `}function BS(){return["<!doctype html>",'<html lang="en">'," <head>",' <meta charset="UTF-8" />',' <meta name="viewport" content="width=device-width, initial-scale=1.0" />'," <title>Farther Shore Product</title>"," </head>"," <body>",' <div id="root"></div>',' <script type="module" src="/src/App.tsx"></script>'," </body>","</html>",""].join(`
123
+ `)}function HS(){return`import React from "react";
121
124
  import { createRoot } from "react-dom/client";
122
125
  import "./styles.css";
123
126
 
@@ -139,7 +142,7 @@ function App() {
139
142
  const root = document.getElementById("root");
140
143
  if (!root) throw new Error("Missing #root");
141
144
  createRoot(root).render(<App />);
142
- `}function S$(){return`:root {
145
+ `}function GS(){return`:root {
143
146
  color-scheme: light;
144
147
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
145
148
  color: #18181b;
@@ -179,23 +182,23 @@ p {
179
182
  font-size: 18px;
180
183
  line-height: 1.6;
181
184
  }
182
- `}function w$(){return`${JSON.stringify({compilerOptions:{target:"ES2022",useDefineForClassFields:!0,lib:["DOM","DOM.Iterable","ES2022"],allowJs:!1,skipLibCheck:!0,esModuleInterop:!0,allowSyntheticDefaultImports:!0,strict:!0,forceConsistentCasingInFileNames:!0,module:"ESNext",moduleResolution:"Bundler",resolveJsonModule:!0,isolatedModules:!0,noEmit:!0,jsx:"react-jsx"},include:["src"],references:[]},null,2)}
183
- `}function I$(){return`import { defineConfig } from "vite";
185
+ `}function KS(){return`${JSON.stringify({compilerOptions:{target:"ES2022",useDefineForClassFields:!0,lib:["DOM","DOM.Iterable","ES2022"],allowJs:!1,skipLibCheck:!0,esModuleInterop:!0,allowSyntheticDefaultImports:!0,strict:!0,forceConsistentCasingInFileNames:!0,module:"ESNext",moduleResolution:"Bundler",resolveJsonModule:!0,isolatedModules:!0,noEmit:!0,jsx:"react-jsx"},include:["src"],references:[]},null,2)}
186
+ `}function WS(){return`import { defineConfig } from "vite";
184
187
  import react from "@vitejs/plugin-react";
185
188
 
186
189
  export default defineConfig({
187
190
  plugins: [react()],
188
191
  });
189
- `}function z$(t){let n=(jl(t).metering?.meters??[]).map(e=>({key:e.key,display:e.display??Kg(e.key)})),o=['import type { ProductModule } from "@farthershore/product";',"","export const configureMeters: ProductModule = (product) => {"];n.length===0&&o.push(" // Add product.meter(...) declarations here as plans evolve.");for(let e of n)e.key==="requests"?o.push(` product.requests({ display: ${Fe(e.display)} });`):o.push(` product.meter(${Fe(e.key)}, { display: ${Fe(e.display)} });`);return o.push("};",""),o.join(`
190
- `)}function O$(t){let r=fo(t),n=['import type { ProductModule } from "@farthershore/product";',"","export const configureFeatures: ProductModule = (product) => {"];for(let o of r)n.push(` product.surface(${Fe(o)});`);return r.includes("api")?n.push("",' product.feature("api").route("GET /v1/example");'):n.push(""," // Add product.feature(...).route(...) for gateway-routed actions,"," // product.workflow(...) for async work, or more product.surface(...)"," // declarations as this software business evolves."),n.push("};",""),n.join(`
191
- `)}function E$(t){return`import type { ProductModule } from "@farthershore/product";
192
+ `}function qS(e){let r=(Gl(e).metering?.meters??[]).map(n=>({key:n.key,display:n.display??Hh(n.key)})),o=['import type { ProductModule } from "@farthershore/product";',"","export const configureMeters: ProductModule = (product) => {"];r.length===0&&o.push(" // Add product.meter(...) declarations here as plans evolve.");for(let n of r)n.key==="requests"?o.push(` product.requests({ display: ${Le(n.display)} });`):o.push(` product.meter(${Le(n.key)}, { display: ${Le(n.display)} });`);return o.push("};",""),o.join(`
193
+ `)}function JS(e){let t=Ll(e),r=['import type { ProductModule } from "@farthershore/product";',"","export const configureFeatures: ProductModule = (product) => {"];for(let o of t)r.push(` product.surface(${Le(o)});`);return t.includes("api")?r.push("",' product.feature("api").route("GET /v1/example");'):r.push(""," // Add product.feature(...).route(...) for gateway-routed actions,"," // product.workflow(...) for async work, or more product.surface(...)"," // declarations as this software business evolves."),r.push("};",""),r.join(`
194
+ `)}function YS(e){let r=Gl(e).plans.map(i=>{let s=e$(i);return`
195
+ product.plan(${Le(i.key)}, ${Hl(s,1)});`});return`${r.some(i=>i.includes("fs.price."))?'import { fs, type ProductModule } from "@farthershore/product";':'import type { ProductModule } from "@farthershore/product";'}
192
196
 
193
- export const configurePlans: ProductModule = (product) => {${jl(t).plans.map(n=>`
194
- product.raw.plan(${Fe(n)});`).join("")}
197
+ export const configurePlans: ProductModule = (product) => {${r.join("")}
195
198
  };
196
- `}function Kg(t){return t.split("_").filter(Boolean).map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ")}function P$(){return El().map((t,r)=>` ${r+1}) ${t.kind.padEnd(8)} \u2014 ${t.description}`).join(`
197
- `)}function T$(t){let r=t.pricing,n=(r.meters??[]).map(e=>`${e.dimension} @ ${e.price_per_unit_micros} micros/unit`).join(", "),o=[` recurring_fee_cents ${r.recurring_fee_cents}`,` recurring credit (grant) ${Pr(r)}`,` one-time credit (grant) ${Nt(r)}`,` trial_days ${r.trial_days}`];return n&&o.push(` meters ${n}`),o.join(`
198
- `)}async function j$(t){t.log("FartherShore init \u2014 pick a starter plan preset:"),t.log(""),t.log(P$()),t.log("");let r=(await t.ask("Preset (number or name, blank to cancel): ")).trim();if(!r)return null;let n=Number.parseInt(r,10),o=null;if(Number.isInteger(n)&&n>=1&&n<=pe.length?o=pe[n-1]??null:pe.includes(r.toLowerCase())&&(o=r.toLowerCase()),!o)throw new k(`Unknown preset "${r}". Choose one of: ${pe.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_UNKNOWN"});t.log(""),t.log(`Preview \u2014 ${Ri(o).label}:`),t.log(T$(Ri(o))),t.log("");let e=(await t.ask(`Output path (default: ${Zi}): `)).trim();return{kind:o,path:e||Zi}}function Yg(t){t.command("init").description("Scaffold a starter product/product.config.ts from a named plan preset (free | starter | pro | prepaid | metered)").option("--template <kind>",`Plan preset to scaffold. One of: ${pe.join(" | ")}`).option("--force","Overwrite product/product.config.ts if it already exists").option("--path <path>","Output path for the generated product config (default: ./product/product.config.ts)").option("--surface <surface>",`Initial Product SDK surface, repeatable. Available: ${rt.join(", ")}. Default: frontend, api.`,(r,n)=>[...n,r],[]).addHelpText("after",`
199
+ `}var XS=new Set(["key","name","description","details","recurring_fee_cents","billing_interval","free","meters","grants","trial_days","max_monthly_spend_cents","min_monthly_spend_cents","limits","featureGates","capability_limits","capabilities","overageBehavior","selfServeEnabled","legacy","archive"]),QS=[["description","description"],["details","details"],["meters","meters"],["trial_days","trialDays"],["max_monthly_spend_cents","maxMonthlySpendCents"],["min_monthly_spend_cents","minMonthlySpendCents"],["limits","limits"],["featureGates","featureGates"],["capability_limits","capabilityLimits"],["capabilities","capabilities"],["overageBehavior","overageBehavior"],["selfServeEnabled","selfServeEnabled"],["legacy","legacy"],["archive","archive"]];function e$(e){let t={name:e.name},r=t$(e),o={...r.raw};return r.value&&(t.price=r.value),n$(e,t),Array.isArray(e.grants)&&e.grants.length>0&&(t.grants=e.grants),Object.assign(o,r$(e)),Object.keys(o).length>0&&(t.raw=o),t}function t$(e){let t=e.recurring_fee_cents,r=e.billing_interval,o=e.free;return typeof t=="number"&&t>0&&(r==="month"||r==="year")?{value:{__price:r==="year"?"yearly":"monthly",amount:t/100},raw:o!==void 0?{free:o}:{}}:o===!0&&t===0&&r==="month"?{value:{__price:"free"},raw:{}}:{raw:{...t!==void 0&&t!==0?{recurring_fee_cents:t}:{},...r!==void 0&&r!=="month"?{billing_interval:r}:{},...o!==void 0?{free:o}:{}}}}function n$(e,t){for(let[r,o]of QS)e[r]!==void 0&&(t[o]=e[r])}function r$(e){let t={};for(let[r,o]of Object.entries(e))XS.has(r)||(t[r]=o);return t}function Hh(e){return e.split("_").filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function i$(){return Ml().map((e,t)=>` ${t+1}) ${e.kind.padEnd(8)} \u2014 ${e.description}`).join(`
200
+ `)}function o$(e){let t=e.pricing,r=(t.meters??[]).map(n=>`${n.dimension} @ ${n.price_per_unit_micros} micros/unit`).join(", "),o=[` recurring_fee_cents ${t.recurring_fee_cents}`,` recurring credit (grant) ${An(t)}`,` one-time credit (grant) ${Rt(t)}`,` trial_days ${t.trial_days}`];return r&&o.push(` meters ${r}`),o.join(`
201
+ `)}async function a$(e){e.log("FartherShore init \u2014 pick a starter plan preset:"),e.log(""),e.log(i$()),e.log("");let t=(await e.ask("Preset (number or name, blank to cancel): ")).trim();if(!t)return null;let r=Number.parseInt(t,10),o=null;if(Number.isInteger(r)&&r>=1&&r<=me.length?o=me[r-1]??null:me.includes(t.toLowerCase())&&(o=t.toLowerCase()),!o)throw new k(`Unknown preset "${t}". Choose one of: ${me.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_UNKNOWN"});e.log(""),e.log(`Preview \u2014 ${Ri(o).label}:`),e.log(o$(Ri(o))),e.log("");let n=(await e.ask(`Output path (default: ${Di}): `)).trim();return{kind:o,path:n||Di}}function Gh(e){e.command("init").description("Scaffold a starter product/product.config.ts from a named plan preset (free | starter | pro | prepaid | metered)").option("--template <kind>",`Plan preset to scaffold. One of: ${me.join(" | ")}`).option("--force","Overwrite product/product.config.ts if it already exists").option("--path <path>","Output path for the generated product config (default: ./product/product.config.ts)").option("--surface <surface>",`Initial Product SDK surface, repeatable. Available: ${Ut.join(", ")}. Default: frontend, api.`,(t,r)=>[...r,t],[]).addHelpText("after",`
199
202
  Examples:
200
203
  farthershore init # interactive (TTY only)
201
204
  farthershore init --template free
@@ -204,21 +207,26 @@ Examples:
204
207
  farthershore init --template starter --surface frontend --surface agent
205
208
 
206
209
  Available templates:
207
- ${El().map(r=>` ${r.kind.padEnd(8)} ${r.description}`).join(`
210
+ ${Ml().map(t=>` ${t.kind.padEnd(8)} ${t.description}`).join(`
208
211
  `)}
209
- `).action(async r=>{let n,o=r.path;if(r.template)n=h$(r.template);else if(Hg.isTTY&&Jg.isTTY){let g=p$({input:Hg,output:Jg});try{let h=await j$({ask:x=>g.question(x),log:x=>{console.log(x)}});if(!h){Wt("Cancelled.");return}n=h.kind,o=o??h.path}finally{g.close()}}else throw new k(`--template is required when stdin is not a TTY. Choose one of: ${pe.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_REQUIRED"});let e=Ri(n),i=m$(o??Zi),a=Jt(r);if(Wg(i)&&!r.force)throw new k(`${i} already exists. Pass --force to overwrite.`,void 0,{code:"INIT_FILE_EXISTS"});let s=v$(e,i,a),u=s.map(g=>g.path).filter(g=>Wg(g));if(u.length>0&&!r.force)throw new k(`${u[0]} already exists. Pass --force to overwrite.`,void 0,{code:"INIT_FILE_EXISTS"});for(let g of s)c$(Tl(g.path),{recursive:!0}),u$(g.path,g.content,"utf-8");let l=s.find(g=>g.path===i)?.content??qg(e),d=t.opts();if(Ee(d.format)==="json"){z(t,"",{ok:!0,template:n,path:i,surfaces:fo(a),preset:{kind:e.kind,label:e.label},content:l,files:s});return}Oe(`Scaffolded ${i} from preset "${e.label}".`),Wt("Next: edit product/product.config.ts and its imported modules, then run `farthershore build`.")})}function Fe(t){return JSON.stringify(t,null,2)}var A$="x-fs-surface",N$="cli",C$=["ProductApplyWorkflow","RollbackWorkflow","StripeSyncWorkflow","WebhookDispatchWorkflow","DLQReplayWorkflow","NoOpWorkflow"];function D$(){let t=process.env.FARTHERSHORE_API_URL;if(!t)throw new k("FARTHERSHORE_API_URL is not set. Point it at the core base URL (e.g. https://core.farthershore.com) before running `farthershore workflows`.",void 0,{code:"ADMIN_API_URL_MISSING"});return t.replace(/\/+$/,"")}function U$(){let t=process.env.FARTHERSHORE_ADMIN_SECRET;if(!t)throw new k("FARTHERSHORE_ADMIN_SECRET is not set. This command authenticates against core's /internal/admin/workflow/* proxy with the same shared secret fs-admin uses.",void 0,{code:"ADMIN_SECRET_MISSING"});return t}async function Xg(t){let r=D$(),n=U$(),o=await fetch(`${r}${t}`,{method:"GET",headers:{"content-type":"application/json","x-admin-service-secret":n,"x-admin-actor-id":"farthershore-cli",[A$]:N$}});if(!o.ok){let i=(await o.json().catch(()=>null))?.error;throw new k(i?.message??o.statusText,o.status,{code:i?.code,details:i?.details})}if(o.status!==204)return o.json()}function Nl(t){if(t==null)return"\u2014";if(t<1e3)return`${t}ms`;let r=t/1e3;if(r<60)return`${r.toFixed(1)}s`;let n=r/60;return n<60?`${n.toFixed(1)}m`:`${(n/60).toFixed(1)}h`}function Qg(t,r=new Date){let n=new Date(t.startedAt).getTime(),o=t.completedAt?new Date(t.completedAt).getTime():t.failedAt?new Date(t.failedAt).getTime():r.getTime();return Math.max(0,o-n)}function Li(t){switch(t){case"COMPLETED":case"SUCCEEDED":case"CONVERGED":return N.green;case"RUNNING":case"PENDING":case"PAUSED":case"RETRYING":case"WAITING_FOR_APPROVAL":return N.yellow;case"FAILED":case"DIVERGED":case"STALLED":case"REQUIRES_HUMAN_INTERVENTION":case"TIMEOUT":return N.red;case"ROLLED_BACK":case"CANCELLED":case"COMPENSATED":return N.magenta;default:return r=>r}}function O(t,r){return t.length<=r?t.padEnd(r):r<=1?t.slice(0,r):`${t.slice(0,r-1)}\u2026`}var L={id:30,type:24,product:18,status:16,phase:26,started:24,duration:10};function R$(t,r=new Date){let n=N.dim([O("ID",L.id),O("TYPE",L.type),O("PRODUCT",L.product),O("STATUS",L.status),O("PHASE",L.phase),O("STARTED",L.started),O("DURATION",L.duration)].join(" ")),o=N.dim(["-".repeat(L.id),"-".repeat(L.type),"-".repeat(L.product),"-".repeat(L.status),"-".repeat(L.phase),"-".repeat(L.started),"-".repeat(L.duration)].join(" ")),e=t.map(i=>{let a=Nl(Qg(i,r)),s=Li(i.status)(O(i.status,L.status));return[O(i.id,L.id),O(i.workflowType,L.type),O(i.productId??"\u2014",L.product),s,O(i.currentPhase??"\u2014",L.phase),O(i.startedAt,L.started),O(a,L.duration)].join(" ")});return[n,o,...e].join(`
210
- `)}function fe(t,r){let n;return r==null||r===""?n=N.dim("(unset)"):typeof r=="object"?n=JSON.stringify(r):typeof r=="string"||typeof r=="number"||typeof r=="boolean"?n=String(r):n=JSON.stringify(r),` ${N.dim(t.padEnd(20))}${n}`}var $e={stepName:28,phase:26,status:14,attempt:8,duration:10},Dt={eventType:28,occurredAt:24,payload:60},Ut={surface:24,status:14,delta:60};function Z$(t){if(t.length===0)return N.dim(" (no steps recorded)");let r=N.dim([O("STEP",$e.stepName),O("PHASE",$e.phase),O("STATUS",$e.status),O("ATTEMPT",$e.attempt),O("DURATION",$e.duration)].join(" ")),n=t.map(o=>[O(o.stepName,$e.stepName),O(o.phase,$e.phase),Li(o.status)(O(o.status,$e.status)),O(String(o.attempt),$e.attempt),O(Nl(o.durationMs),$e.duration)].join(" "));return[r,...n].join(`
211
- `)}function L$(t){return Object.keys(t).length===0?"(empty)":JSON.stringify(t)}function F$(t){if(t.length===0)return N.dim(" (no events recorded)");let r=N.dim([O("EVENT",Dt.eventType),O("OCCURRED AT",Dt.occurredAt),O("PAYLOAD",Dt.payload)].join(" ")),n=t.map(o=>[O(o.eventType,Dt.eventType),O(o.occurredAt,Dt.occurredAt),O(L$(o.payload),Dt.payload)].join(" "));return[r,...n].join(`
212
- `)}function M$(t){if(t.length===0)return N.dim(" (no convergence state recorded)");let r=N.dim([O("SURFACE",Ut.surface),O("STATUS",Ut.status),O("DELTA",Ut.delta)].join(" ")),n=t.map(o=>[O(o.surface,Ut.surface),Li(o.status)(O(o.status,Ut.status)),O(o.deltaDescription??"\u2014",Ut.delta)].join(" "));return[r,...n].join(`
213
- `)}function V$(t){let{execution:r,steps:n,events:o,convergence:e}=t,i=[];return i.push(N.bold(`Workflow ${r.id}`)),i.push(fe("type",r.workflowType)),i.push(fe("status",Li(r.status)(r.status))),i.push(fe("currentPhase",r.currentPhase)),i.push(fe("startedAt",r.startedAt)),i.push(fe("completedAt",r.completedAt)),i.push(fe("triggeredBy",r.triggeredBy)),i.push(fe("correlationId",r.correlationId)),i.push(fe("productId",r.productId)),i.push(fe("duration",Nl(Qg(r)))),i.push(""),i.push(N.bold("Steps")),i.push(Z$(n)),i.push(""),i.push(N.bold("Events")),i.push(F$(o)),i.push(""),i.push(N.bold("Convergence")),i.push(M$(e)),r.errorReason&&(i.push(""),i.push(N.bold(N.red("Error"))),i.push(fe("reason",r.errorReason)),i.push(fe("classification",r.errorClassification))),i.join(`
214
- `)}var Al=["RUNNING","COMPLETED","FAILED","ROLLED_BACK","STALLED","REQUIRES_HUMAN_INTERVENTION","WAITING_FOR_APPROVAL","CANCELLED"];function B$(t){if(!t)return 50;let r=Number.parseInt(t,10);if(Number.isNaN(r)||r<=0)throw new k(`--limit must be a positive integer (got "${t}")`,void 0,{code:"INVALID_LIMIT"});return r}function G$(t){let r=new URLSearchParams;if(t.status){if(!Al.includes(t.status))throw new k(`--status must be one of: ${Al.join(", ")} (got "${t.status}")`,void 0,{code:"INVALID_STATUS"});r.set("status",t.status)}t.type&&r.set("workflowType",t.type),t.product&&r.set("productId",t.product),r.set("limit",String(B$(t.limit)));let n=r.toString();return n?`?${n}`:""}function eh(t){let r=t.command("workflows").description("Inspect durable lifecycle workflow executions (list / show / replay)");r.command("ls").description("List workflow executions as a table").option("--status <status>",`Filter by status (one of: ${Al.join(", ")})`).option("--type <type>",`Filter by workflow type (e.g. ${C$.join(", ")})`).option("--product <productId>","Filter by productId").option("--limit <N>","Maximum number of rows to return (default 50)").option("--json","Emit raw JSON for piping instead of the pretty table").action(async n=>{let o=G$(n),e=await Xg(`/internal/admin/workflow/executions${o}`);if(n.json){console.log(ce(e));return}console.log(R$(e.items)),console.log(N.dim(`
215
- ${e.items.length} executions${e.nextCursor?" (more available \u2014 pass --limit to see more)":""}`))}),r.command("show <workflowExecutionId>").description("Show a single workflow execution: header, steps, events, convergence panel").option("--json","Emit raw JSON instead of the pretty-printed view").action(async(n,o)=>{let e=await Xg(`/internal/admin/workflow/executions/${encodeURIComponent(n)}`);if(o.json){console.log(ce(e));return}console.log(V$(e))}),r.command("replay <workflowExecutionId>").description("Replay a workflow execution (or a single step). STUB in Wave 5 \u2014 operator-action endpoints land in a follow-up.").option("--step <stepName>","Replay only the named step rather than the full execution").action((n,o)=>{Gt("Replay is not yet implemented; use core's /workflow/<id>/rollback for now. Tracked in FAR-<followup>."),process.exitCode=1})}import{spawn as W$}from"node:child_process";import{existsSync as rh}from"node:fs";import{readFile as H$}from"node:fs/promises";var J$="product/product.config.ts",q$="manifest-ir.json",th="./product/node_modules/.bin/farthershore-manifest-build",K$="./node_modules/.bin/farthershore-manifest-build";function Y$(t=rh){return t(th)?th:K$}async function X$(t,r=W$,n=rh){let o=Y$(n),e=["--entry",t.entry,"--out",t.out],i=r(o,e,{stdio:["ignore","pipe","pipe"]}),a="",s="",u=!1;return i.stdout?.setEncoding("utf8"),i.stderr?.setEncoding("utf8"),i.stdout?.on("data",l=>{a+=l}),i.stderr?.on("data",l=>{s+=l}),new Promise(l=>{let d=(p,g)=>{u||(u=!0,l({command:o,args:e,exitCode:p,signal:g,stdout:a,stderr:s}))};i.on("error",p=>{s+=`${p.message}
216
- `,d(1,null)}),i.on("close",(p,g)=>{d(p??(g?1:0),g)})})}async function Q$(t){let r=await H$(t,"utf8"),n=JSON.parse(r);if(!ox(n)||!("ir"in n))throw new Error(`${t} is not a Manifest IR envelope with an ir field`);return{ir:n.ir,irHash:typeof n.irHash=="string"?n.irHash:void 0}}function nh(t,r,n={}){t.command("build").description("Build product/product.config.ts into a Manifest IR envelope").option("--entry <path>","Product-as-code entry file (default: product/product.config.ts)").option("--out <path>","Output path for the Manifest IR envelope (default: manifest-ir.json)").addHelpText("after",`
212
+ `).action(async t=>{let r,o=t.path;if(t.template)r=US(t.template);else if(Zh.isTTY&&Vh.isTTY){let d=DS({input:Zh,output:Vh});try{let m=await a$({ask:g=>d.question(g),log:g=>{console.log(g)}});if(!m){Wt("Cancelled.");return}r=m.kind,o=o??m.path}finally{d.close()}}else throw new k(`--template is required when stdin is not a TTY. Choose one of: ${me.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_REQUIRED"});let n=Ri(r),i=RS(o??Di),s=Rn(t);if(Fh(i)&&!t.force)throw new k(`${i} already exists. Pass --force to overwrite.`,void 0,{code:"INIT_FILE_EXISTS"});let c=LS(n,i,s),u=c.map(d=>d.path).filter(d=>Fh(d));if(u.length>0&&!t.force)throw new k(`${u[0]} already exists. Pass --force to overwrite.`,void 0,{code:"INIT_FILE_EXISTS"});for(let d of c)PS(Bl(d.path),{recursive:!0}),AS(d.path,d.content,"utf-8");let l=c.find(d=>d.path===i)?.content??Bh(n);H({template:r,path:i,surfaces:Ll(s),preset:{kind:n.kind,label:n.label},content:l,files:c},`Scaffolded ${i} from preset "${n.label}".`),Wt("Next: edit product/product.config.ts and its imported modules, then run `farthershore build`.")})}function Le(e){return JSON.stringify(e,null,2)}function Hl(e,t=0){if(typeof e=="object"&&e!==null&&!Array.isArray(e)&&"__price"in e){let r=e;return r.__price==="free"?"fs.price.free()":`fs.price.${r.__price}(${r.amount})`}if(Array.isArray(e)){if(e.length===0)return"[]";let r=e.map(i=>Hl(i,t+1)),o=`[${r.join(", ")}]`;if(o.length<=72&&!o.includes(`
213
+ `))return o;let n=" ".repeat(t+1);return`[
214
+ ${r.map(i=>`${n}${i}`).join(`,
215
+ `)},
216
+ ${" ".repeat(t)}]`}if(typeof e=="object"&&e!==null){let r=Object.entries(e);if(r.length===0)return"{}";let o=r.map(([s,c])=>`${s$(s)}: ${Hl(c,t+1)}`),n=`{ ${o.join(", ")} }`;if(n.length<=72&&!n.includes(`
217
+ `))return n;let i=" ".repeat(t+1);return`{
218
+ ${o.map(s=>`${i}${s}`).join(`,
219
+ `)},
220
+ ${" ".repeat(t)}}`}return JSON.stringify(e)}function s$(e){return/^[A-Za-z_$][A-Za-z0-9_$]*$/.test(e)?e:JSON.stringify(e)}var c$="x-fs-surface",u$="cli",l$=["ProductApplyWorkflow","RollbackWorkflow","StripeSyncWorkflow","WebhookDispatchWorkflow","DLQReplayWorkflow","NoOpWorkflow"];function d$(){let e=process.env.FARTHERSHORE_API_URL;if(!e)throw new k("FARTHERSHORE_API_URL is not set. Point it at the core base URL (e.g. https://core.farthershore.com) before running `farthershore workflows`.",void 0,{code:"ADMIN_API_URL_MISSING"});return e.replace(/\/+$/,"")}function m$(){let e=process.env.FARTHERSHORE_ADMIN_SECRET;if(!e)throw new k("FARTHERSHORE_ADMIN_SECRET is not set. This command authenticates against core's /internal/admin/workflow/* proxy with the same shared secret fs-admin uses.",void 0,{code:"ADMIN_SECRET_MISSING"});return e}async function Kh(e){let t=d$(),r=m$(),o=await fetch(`${t}${e}`,{method:"GET",headers:{"content-type":"application/json","x-admin-service-secret":r,"x-admin-actor-id":"farthershore-cli",[c$]:u$}});if(!o.ok){let i=(await o.json().catch(()=>null))?.error;throw new k(i?.message??o.statusText,o.status,{code:i?.code,details:i?.details})}if(o.status!==204)return o.json()}function Wl(e){if(e==null)return"\u2014";if(e<1e3)return`${e}ms`;let t=e/1e3;if(t<60)return`${t.toFixed(1)}s`;let r=t/60;return r<60?`${r.toFixed(1)}m`:`${(r/60).toFixed(1)}h`}function Wh(e,t=new Date){let r=new Date(e.startedAt).getTime(),o=e.completedAt?new Date(e.completedAt).getTime():e.failedAt?new Date(e.failedAt).getTime():t.getTime();return Math.max(0,o-r)}function zi(e){switch(e){case"COMPLETED":case"SUCCEEDED":case"CONVERGED":return j.green;case"RUNNING":case"PENDING":case"PAUSED":case"RETRYING":case"WAITING_FOR_APPROVAL":return j.yellow;case"FAILED":case"DIVERGED":case"STALLED":case"REQUIRES_HUMAN_INTERVENTION":case"TIMEOUT":return j.red;case"ROLLED_BACK":case"CANCELLED":case"COMPENSATED":return j.magenta;default:return t=>t}}function E(e,t){return e.length<=t?e.padEnd(t):t<=1?e.slice(0,t):`${e.slice(0,t-1)}\u2026`}var Z={id:30,type:24,product:18,status:16,phase:26,started:24,duration:10};function p$(e,t=new Date){let r=j.dim([E("ID",Z.id),E("TYPE",Z.type),E("PRODUCT",Z.product),E("STATUS",Z.status),E("PHASE",Z.phase),E("STARTED",Z.started),E("DURATION",Z.duration)].join(" ")),o=j.dim(["-".repeat(Z.id),"-".repeat(Z.type),"-".repeat(Z.product),"-".repeat(Z.status),"-".repeat(Z.phase),"-".repeat(Z.started),"-".repeat(Z.duration)].join(" ")),n=e.map(i=>{let s=Wl(Wh(i,t)),c=zi(i.status)(E(i.status,Z.status));return[E(i.id,Z.id),E(i.workflowType,Z.type),E(i.productId??"\u2014",Z.product),c,E(i.currentPhase??"\u2014",Z.phase),E(i.startedAt,Z.started),E(s,Z.duration)].join(" ")});return[r,o,...n].join(`
221
+ `)}function pe(e,t){let r;return t==null||t===""?r=j.dim("(unset)"):typeof t=="object"?r=JSON.stringify(t):typeof t=="string"||typeof t=="number"||typeof t=="boolean"?r=String(t):r=JSON.stringify(t),` ${j.dim(e.padEnd(20))}${r}`}var be={stepName:28,phase:26,status:14,attempt:8,duration:10},Lt={eventType:28,occurredAt:24,payload:60},Mt={surface:24,status:14,delta:60};function f$(e){if(e.length===0)return j.dim(" (no steps recorded)");let t=j.dim([E("STEP",be.stepName),E("PHASE",be.phase),E("STATUS",be.status),E("ATTEMPT",be.attempt),E("DURATION",be.duration)].join(" ")),r=e.map(o=>[E(o.stepName,be.stepName),E(o.phase,be.phase),zi(o.status)(E(o.status,be.status)),E(String(o.attempt),be.attempt),E(Wl(o.durationMs),be.duration)].join(" "));return[t,...r].join(`
222
+ `)}function g$(e){return Object.keys(e).length===0?"(empty)":JSON.stringify(e)}function h$(e){if(e.length===0)return j.dim(" (no events recorded)");let t=j.dim([E("EVENT",Lt.eventType),E("OCCURRED AT",Lt.occurredAt),E("PAYLOAD",Lt.payload)].join(" ")),r=e.map(o=>[E(o.eventType,Lt.eventType),E(o.occurredAt,Lt.occurredAt),E(g$(o.payload),Lt.payload)].join(" "));return[t,...r].join(`
223
+ `)}function _$(e){if(e.length===0)return j.dim(" (no convergence state recorded)");let t=j.dim([E("SURFACE",Mt.surface),E("STATUS",Mt.status),E("DELTA",Mt.delta)].join(" ")),r=e.map(o=>[E(o.surface,Mt.surface),zi(o.status)(E(o.status,Mt.status)),E(o.deltaDescription??"\u2014",Mt.delta)].join(" "));return[t,...r].join(`
224
+ `)}function v$(e){let{execution:t,steps:r,events:o,convergence:n}=e,i=[];return i.push(j.bold(`Workflow ${t.id}`)),i.push(pe("type",t.workflowType)),i.push(pe("status",zi(t.status)(t.status))),i.push(pe("currentPhase",t.currentPhase)),i.push(pe("startedAt",t.startedAt)),i.push(pe("completedAt",t.completedAt)),i.push(pe("triggeredBy",t.triggeredBy)),i.push(pe("correlationId",t.correlationId)),i.push(pe("productId",t.productId)),i.push(pe("duration",Wl(Wh(t)))),i.push(""),i.push(j.bold("Steps")),i.push(f$(r)),i.push(""),i.push(j.bold("Events")),i.push(h$(o)),i.push(""),i.push(j.bold("Convergence")),i.push(_$(n)),t.errorReason&&(i.push(""),i.push(j.bold(j.red("Error"))),i.push(pe("reason",t.errorReason)),i.push(pe("classification",t.errorClassification))),i.join(`
225
+ `)}var Kl=["RUNNING","COMPLETED","FAILED","ROLLED_BACK","STALLED","REQUIRES_HUMAN_INTERVENTION","WAITING_FOR_APPROVAL","CANCELLED"];function b$(e){if(!e)return 50;let t=Number.parseInt(e,10);if(Number.isNaN(t)||t<=0)throw new k(`--limit must be a positive integer (got "${e}")`,void 0,{code:"INVALID_LIMIT"});return t}function y$(e){let t=new URLSearchParams;if(e.status){if(!Kl.includes(e.status))throw new k(`--status must be one of: ${Kl.join(", ")} (got "${e.status}")`,void 0,{code:"INVALID_STATUS"});t.set("status",e.status)}e.type&&t.set("workflowType",e.type),e.product&&t.set("productId",e.product),t.set("limit",String(b$(e.limit)));let r=t.toString();return r?`?${r}`:""}function qh(e){let t=e.command("workflows").description("Inspect durable lifecycle workflow executions (list / show / replay)");t.command("ls").description("List workflow executions as a table").option("--status <status>",`Filter by status (one of: ${Kl.join(", ")})`).option("--type <type>",`Filter by workflow type (e.g. ${l$.join(", ")})`).option("--product <productId>","Filter by productId").option("--limit <N>","Maximum number of rows to return (default 50)").action(async r=>{let o=y$(r),n=await Kh(`/internal/admin/workflow/executions${o}`);H(n),ke()!=="json"&&(console.log(p$(n.items)),console.log(j.dim(`
226
+ ${n.items.length} executions${n.nextCursor?" (more available \u2014 pass --limit to see more)":""}`)))}),t.command("show <workflowExecutionId>").description("Show a single workflow execution: header, steps, events, convergence panel").action(async r=>{let o=await Kh(`/internal/admin/workflow/executions/${encodeURIComponent(r)}`);H(o),ke()!=="json"&&console.log(v$(o))}),t.command("replay <workflowExecutionId>").description("Replay a workflow execution (or a single step). STUB in Wave 5 \u2014 operator-action endpoints land in a follow-up.").option("--step <stepName>","Replay only the named step rather than the full execution").action((r,o)=>{throw new k("Replay not yet implemented via CLI; use core's /workflow/<id>/rollback for now. Tracked in FAR-<followup>.",501,{code:"NOT_IMPLEMENTED"})})}import{spawn as x$}from"node:child_process";import{existsSync as Yh}from"node:fs";import{readFile as k$}from"node:fs/promises";var S$="product/product.config.ts",$$="manifest-ir.json",Jh="./product/node_modules/.bin/farthershore-manifest-build",I$="./node_modules/.bin/farthershore-manifest-build";function w$(e=Yh){return e(Jh)?Jh:I$}async function E$(e,t=x$,r=Yh){let o=w$(r),n=["--entry",e.entry,"--out",e.out],i=t(o,n,{stdio:["ignore","pipe","pipe"]}),s="",c="",u=!1;return i.stdout?.setEncoding("utf8"),i.stderr?.setEncoding("utf8"),i.stdout?.on("data",l=>{s+=l}),i.stderr?.on("data",l=>{c+=l}),new Promise(l=>{let d=(m,g)=>{u||(u=!0,l({command:o,args:n,exitCode:m,signal:g,stdout:s,stderr:c}))};i.on("error",m=>{c+=`${m.message}
227
+ `,d(1,null)}),i.on("close",(m,g)=>{d(m??(g?1:0),g)})})}async function O$(e){let t=await k$(e,"utf8"),r=JSON.parse(t);if(!R$(r)||!("ir"in r))throw new Error(`${e} is not a Manifest IR envelope with an ir field`);return{ir:r.ir,irHash:typeof r.irHash=="string"?r.irHash:void 0}}function Xh(e,t,r={}){e.command("build").description("Build product/product.config.ts into a Manifest IR envelope").option("--entry <path>","Product-as-code entry file (default: product/product.config.ts)").option("--out <path>","Output path for the Manifest IR envelope (default: manifest-ir.json)").addHelpText("after",`
217
228
  Examples:
218
229
  farthershore build
219
230
  farthershore build --entry product/product.config.ts --out manifest-ir.json
220
231
  farthershore build --format json
221
- `).action(async o=>{let e=t.opts(),i=Ee(e.format),a=o.entry??J$,s=o.out??q$,u=n.runLocalManifestBuild??X$,l=n.readManifestEnvelope??Q$,d=await u({entry:a,out:s});if(ex(d,i),d.exitCode!==0){tx(d,a,s,i);return}let p;try{p=await l(s)}catch(g){rx(g,a,s,i);return}nx({entry:a,out:s,envelope:p,format:i})})}function ex(t,r){r!=="json"&&(t.stdout&&process.stdout.write(t.stdout),t.stderr&&process.stderr.write(t.stderr))}function tx(t,r,n,o){if(process.exitCode=t.exitCode||1,o==="json"){console.log(ce({ok:!1,success:!1,phase:"local_build",entry:r,out:n,command:t.command,args:t.args,exitCode:t.exitCode,signal:t.signal,stdout:t.stdout,stderr:t.stderr,nextActions:["Fix product/product.config.ts and run farthershore build again"]}));return}Gt(`Manifest build failed with exit code ${t.exitCode||1}`)}function rx(t,r,n,o){let e=t instanceof Error?t.message:"Manifest IR output could not be read";if(process.exitCode=1,o==="json"){console.log(ce({ok:!1,success:!1,phase:"read_manifest_ir",entry:r,out:n,errors:[{message:e}],nextActions:["Check the manifest build output path and run farthershore build again"]}));return}Gt(e)}function nx(t){if(t.format==="json"){console.log(ce({ok:!0,success:!0,entry:t.entry,out:t.out,irHash:t.envelope.irHash??null,mode:null,validation:null,errors:[],warnings:[],lifecyclePlan:null,nextActions:ix()}));return}Oe(`Manifest IR written to ${t.out}`),Wt("Commit and push product/ changes for the GitHub bot to compile and publish accepted lifecycle state.")}function ix(){return["Commit and push product/ changes; the GitHub bot will compile and publish accepted lifecycle state"]}function ox(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}var ax={UNAUTHORIZED:"Token is invalid or revoked. Run `farthershore auth login` to update it.",FORBIDDEN:"Your token doesn't have access to this resource. Check the org / product scope.",INVALID_ACCESS_KEY:"Token format is wrong. Generate a new one at https://farthershore.com/settings/tokens.",MAKER_TOKEN_REVOKED:"This maker token was revoked. Mint a new one in the product settings.",MAKER_TOKEN_NO_PRODUCT:"Maker token is not bound to a product. Re-create it from the product page.",AUTH_NO_TOKEN:"Pass --token <mk_...> or set FARTHERSHORE_TOKEN, or run interactively in a TTY.",AUTH_INVALID_TOKEN:"Token format is malformed. Maker tokens start with `mk_` and are 30+ characters.",DESTRUCTIVE_OP_REQUIRES_YES:"Destructive ops (delete) require an explicit `--yes` to proceed. This is intentional safety.",PRODUCT_UPDATE_NO_FIELDS:"Pass at least one field flag (--display-name, --origin, --description).",PLAN_UPDATE_NO_FIELDS:"Pass at least one of --name, --recurring-fee-cents, --recurring-credit-grant-cents, --one-time-credit-grant-cents, --trial-days, --max-monthly-spend-cents.",ENV_NOT_FOUND:"Environment doesn't exist. Use `farthershore env list <product>` to see available envs, or create one with `farthershore env create`.",STRIPE_NOT_CONFIGURED:"Stripe isn't connected on this product. Connect it in the dashboard before running billing operations.",STRIPE_NOT_CONNECTED:"Publishing requires a connected Stripe account. Connect one on the dashboard Connections page, then re-run `farthershore product publish`.",STRIPE_NOT_VERIFIED:"Your Stripe account isn't fully verified yet. Finish Stripe onboarding, then re-run `farthershore product publish`.",BILLING_TAX_NOT_ENROLLED:"Stripe Tax isn't enrolled for this account. Enable it from the dashboard Connections page, then re-run `farthershore product publish`.",STRIPE_BALANCE_OUTSTANDING:"Customer has an outstanding balance. Resolve the invoice in Stripe before retrying.",CHECKOUT_SESSION_FAILED:"Stripe rejected the checkout request. Check that the plan exists and Stripe credentials are valid.",PRODUCT_NOT_FOUND:"Check the product slug. Run `farthershore` (no args) for a list of products you can see.",PRODUCT_REPO_NOT_LINKED:"Link a GitHub repo to this product before publishing or validating product manifests.",YAML_PARSE_ERROR:"Product manifest is not valid. Run `farthershore build` locally, fix product/ source, then push again for bot validation.",GITHUB_NOT_CONNECTED:"Connect GitHub on the org page before running `init` (it provisions the repo).",BRANCH_NO_MATCHING_ENV:"The current branch isn't mapped to an environment. Add a branch rule in product settings or pass --branch explicitly.",PLAN_NOT_FOUND:"Plan key doesn't exist on this product. Check the `plans` block in your local product manifest.",PLAN_HAS_ACTIVE_SUBSCRIPTIONS:"Plan has active subscribers and can't be deleted. Migrate them to another plan first.",PLAN_SLUG_CONFLICT:"Another plan already uses this key. Pick a unique plan key in your manifest.",SLUG_CONFLICT:"This product slug is taken. Pick a different name.",SLUG_BLOCKED:"This slug is reserved or blocked. Pick a different name.",SLUG_RESERVED:"This slug is reserved by Farther Shore. Pick a different name.",SLUG_INVALID_FORMAT:"Slug must be lowercase letters, digits, and hyphens (no leading/trailing hyphen).",DECISION_NOT_FOUND:"No DenialEvent recorded for that decisionId. Verify the id from the original deny response or audit log.",AUTH_UNAUTHORIZED:"Token is missing, expired, or lacks the audit:read scope required to read denial events.",RATE_LIMIT_EXCEEDED:"You've hit the rate limit. Wait a moment and retry.",VALIDATION_ERROR:"Request is malformed. The `details` field has the field-level errors.",CONFLICT:"The resource is in a state that conflicts with the request. Inspect `details` to learn more."};function ih(t){if(t)return ax[t]}var dx=ux(cx(import.meta.url)),mx=JSON.parse(await sx(lx(dx,"..","package.json"),"utf-8")),G=new Kl;G.name("farthershore").description("FartherShore CLI \u2014 agent-friendly commands for product configuration").version(mx.version).option("--token <token>","Override auth token").option("--api-url <url>","Override API base URL").option("--format <format>","Output format. Use --format json for machine-readable agent output");function xe(){let t=nd(),r=G.opts(),n=ad(r.token),o=r.apiUrl??process.env.FARTHERSHORE_API_URL??t.apiUrl;return Yl({apiUrl:o,token:n})}_d(G,xe);xd(G,xe);kd(G,xe);Lg(G,xe);Fg(G,xe);Mg(G,xe);Vg(G,xe);Bg(G,xe);Gg(G,xe);Yg(G);nh(G,xe);eh(G);G.exitOverride();function px(t){let r=t.code?` [${t.code}]`:"";process.stderr.write(`Error${r}: ${t.message}
222
- `);let n=ih(t.code);n&&process.stderr.write(`Hint: ${n}
223
- `)}async function fx(){try{await G.parseAsync(process.argv)}catch(t){if(t instanceof k)px(t),process.exitCode=1;else if(t instanceof Error){let r=t.code;r==="commander.helpDisplayed"||r==="commander.version"||t.message!=="(outputHelp)"&&(process.stderr.write(`Error: ${t.message}
224
- `),process.exitCode=1)}}}fx();
232
+ `).action(async o=>{let n=e.opts(),i=Vn(n.format),s=o.entry??S$,c=o.out??$$,u=r.runLocalManifestBuild??E$,l=r.readManifestEnvelope??O$,d=await u({entry:s,out:c});T$(d,i),d.exitCode!==0&&P$(d,s,c);let m;try{m=await l(c)}catch(g){A$(g,s,c)}N$({entry:s,out:c,envelope:m})})}function T$(e,t){t!=="json"&&(e.stdout&&process.stdout.write(e.stdout),e.stderr&&process.stderr.write(e.stderr))}function P$(e,t,r){throw new k(`Manifest build failed with exit code ${e.exitCode||1}`,0,{code:"MANIFEST_BUILD_FAILED",details:{success:!1,phase:"local_build",entry:t,out:r,command:e.command,args:e.args,exitCode:e.exitCode,signal:e.signal,stdout:e.stdout,stderr:e.stderr,nextActions:["Fix product/product.config.ts and run farthershore build again"]}})}function A$(e,t,r){let o=e instanceof Error?e.message:"Manifest IR output could not be read";throw new k(o,0,{code:"MANIFEST_IR_READ_FAILED",details:{success:!1,phase:"read_manifest_ir",entry:t,out:r,errors:[{message:o}],nextActions:["Check the manifest build output path and run farthershore build again"]}})}function N$(e){H({success:!0,entry:e.entry,out:e.out,irHash:e.envelope.irHash??null,mode:null,validation:null,errors:[],warnings:[],lifecyclePlan:null,nextActions:C$()},`Manifest IR written to ${e.out}`),Wt("Commit and push product/ changes for the GitHub bot to compile and publish accepted lifecycle state.")}function C$(){return["Commit and push product/ changes; the GitHub bot will compile and publish accepted lifecycle state"]}function R$(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function Qh(e,t){$h(e,t),Eh(e,t),Oh(e,t),Ch(e,t),Rh(e,t),Dh(e,t),zh(e,t),jh(e,t),Mh(e,t),Gh(e),Xh(e,t),qh(e)}var L$=j$(z$(import.meta.url)),M$=JSON.parse(await D$(U$(L$,"..","package.json"),"utf-8")),Me=new ld;Me.name("farthershore").description("FartherShore CLI \u2014 agent-friendly commands for product configuration").version(M$.version).option("--token <token>","Override auth token").option("--api-url <url>","Override API base URL").option("--format <format>","Output format. Use --format json for machine-readable agent output").option("--no-input","Never prompt; fail fast in non-interactive (agent) use");Me.hook("preAction",(e,t)=>{Cd(Me.opts().format),kh(F$(t))});function F$(e){let t=[],r=e;for(;r&&r.name()&&r.name()!==Me.name();)t.unshift(r.name()),r=r.parent;return t.join(".")||"unknown"}function Z$(){let e=_d(),t=Me.opts(),r=yd(t.token),o=t.apiUrl??process.env.FARTHERSHORE_API_URL??e.apiUrl;return dd({apiUrl:o,token:r})}Qh(Me,Z$);Me.exitOverride();async function V$(){try{await Me.parseAsync(process.argv)}catch(e){if(e instanceof k)process.exitCode=Ul(e);else if(e instanceof Error){let t=e.code;t==="commander.helpDisplayed"||t==="commander.version"||e.message!=="(outputHelp)"&&(process.exitCode=Ul(new k(e.message,0)))}}}V$();