@farthershore/cli 0.14.1 → 0.14.2

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,78 +1,78 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __createRequire } from "node:module";const require=__createRequire(import.meta.url);
3
- var m_=Object.create;var Hi=Object.defineProperty;var p_=Object.getOwnPropertyDescriptor;var f_=Object.getOwnPropertyNames;var g_=Object.getPrototypeOf,h_=Object.prototype.hasOwnProperty;var Ht=(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 Ve=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Se=(e,t)=>{for(var r in t)Hi(e,r,{get:t[r],enumerable:!0})},__=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of f_(t))!h_.call(e,n)&&n!==r&&Hi(e,n,{get:()=>t[n],enumerable:!(o=p_(t,n))||o.enumerable});return e};var v_=(e,t,r)=>(r=e!=null?m_(g_(e)):{},__(t||!e||!e.__esModule?Hi(r,"default",{value:e,enumerable:!0}):r,e));var Gt=Ve(Ki=>{var Fn=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}},Gi=class extends Fn{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Ki.CommanderError=Fn;Ki.InvalidArgumentError=Gi});var Mn=Ve(qi=>{var{InvalidArgumentError:b_}=Gt(),Wi=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 b_(`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 y_(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}qi.Argument=Wi;qi.humanReadableArgName=y_});var Xi=Ve(Yi=>{var{humanReadableArgName:x_}=Mn(),Ji=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=>x_(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 id(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,`
3
+ var z_=Object.create;var oo=Object.defineProperty;var j_=Object.getOwnPropertyDescriptor;var L_=Object.getOwnPropertyNames;var F_=Object.getPrototypeOf,M_=Object.prototype.hasOwnProperty;var Qt=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var Ke=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ie=(t,e)=>{for(var r in e)oo(t,r,{get:e[r],enumerable:!0})},Z_=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of L_(e))!M_.call(t,n)&&n!==r&&oo(t,n,{get:()=>e[n],enumerable:!(o=j_(e,n))||o.enumerable});return t};var V_=(t,e,r)=>(r=t!=null?z_(F_(t)):{},Z_(e||!t||!t.__esModule?oo(r,"default",{value:t,enumerable:!0}):r,t));var en=Ke(so=>{var Jn=class extends Error{constructor(e,r,o){super(o),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=e,this.nestedError=void 0}},ao=class extends Jn{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};so.CommanderError=Jn;so.InvalidArgumentError=ao});var Yn=Ke(uo=>{var{InvalidArgumentError:B_}=en(),co=class{constructor(e,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:r.concat(e)}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,o)=>{if(!this.argChoices.includes(r))throw new B_(`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 H_(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}uo.Argument=co;uo.humanReadableArgName=H_});var po=Ke(mo=>{var{humanReadableArgName:K_}=Yn(),lo=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let r=e.commands.filter(n=>!n._hidden),o=e._getHelpCommand();return o&&!o._hidden&&r.push(o),this.sortSubcommands&&r.sort((n,i)=>n.name().localeCompare(i.name())),r}compareOptions(e,r){let o=n=>n.short?n.short.replace(/^-/,""):n.long.replace(/^--/,"");return o(e).localeCompare(o(r))}visibleOptions(e){let r=e.options.filter(n=>!n.hidden),o=e._getHelpOption();if(o&&!o.hidden){let n=o.short&&e._findOption(o.short),i=o.long&&e._findOption(o.long);!n&&!i?r.push(o):o.long&&!i?r.push(e.createOption(o.long,o.description)):o.short&&!n&&r.push(e.createOption(o.short,o.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let r=[];for(let o=e.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(e){return e._argsDescription&&e.registeredArguments.forEach(r=>{r.description=r.description||e._argsDescription[r.name()]||""}),e.registeredArguments.find(r=>r.description)?e.registeredArguments:[]}subcommandTerm(e){let r=e.registeredArguments.map(o=>K_(o)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,r){return r.visibleCommands(e).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(n)))),0)}longestOptionTermLength(e,r){return r.visibleOptions(e).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleOptionTerm(r.optionTerm(n)))),0)}longestGlobalOptionTermLength(e,r){return r.visibleGlobalOptions(e).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleOptionTerm(r.optionTerm(n)))),0)}longestArgumentTermLength(e,r){return r.visibleArguments(e).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(n)))),0)}commandUsage(e){let r=e._name;e._aliases[0]&&(r=r+"|"+e._aliases[0]);let o="";for(let n=e.parent;n;n=n.parent)o=n.name()+" "+o;return o+r+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let r=[];return e.argChoices&&r.push(`choices: ${e.argChoices.map(o=>JSON.stringify(o)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&r.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&r.push(`env: ${e.envVar}`),r.length>0?`${e.description} (${r.join(", ")})`:e.description}argumentDescription(e){let r=[];if(e.argChoices&&r.push(`choices: ${e.argChoices.map(o=>JSON.stringify(o)).join(", ")}`),e.defaultValue!==void 0&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),r.length>0){let o=`(${r.join(", ")})`;return e.description?`${e.description} ${o}`:o}return e.description}formatHelp(e,r){let o=r.padWidth(e,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(e))}`,""],c=r.commandDescription(e);c.length>0&&(s=s.concat([r.boxWrap(r.styleCommandDescription(c),n),""]));let u=r.visibleArguments(e).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(e).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(e).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(e).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(e){return _d(e).length}styleTitle(e){return e}styleUsage(e){return e.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(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleSubcommandText(r)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,r){return Math.max(r.longestOptionTermLength(e,r),r.longestGlobalOptionTermLength(e,r),r.longestSubcommandTermLength(e,r),r.longestArgumentTermLength(e,r))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,r,o,n){let s=" ".repeat(2);if(!o)return s+e;let c=e.padEnd(r+e.length-n.displayWidth(e)),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
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 id(e){let t=/\x1b\[\d*(;\d*)*m/g;return e.replace(t,"")}Yi.Help=Ji;Yi.stripColor=id});var no=Ve(to=>{var{InvalidArgumentError:k_}=Gt(),Qi=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=S_(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 k_(`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?od(this.name().replace(/^no-/,"")):od(this.name())}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}},eo=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 od(e){return e.split("-").reduce((t,r)=>t+r[0].toUpperCase()+r.slice(1))}function S_(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}
6
+ ${s}`)}boxWrap(e,r){if(r<this.minWidthToWrap)return e;let o=e.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 _d(t){let e=/\x1b\[\d*(;\d*)*m/g;return t.replace(e,"")}mo.Help=lo;mo.stripColor=_d});var _o=Ke(ho=>{var{InvalidArgumentError:G_}=en(),fo=class{constructor(e,r){this.flags=e,this.description=r||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let o=W_(e);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(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let r=e;return typeof e=="string"&&(r={[e]:!0}),this.implied=Object.assign(this.implied||{},r),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:r.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,o)=>{if(!this.argChoices.includes(r))throw new G_(`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?vd(this.name().replace(/^no-/,"")):vd(this.name())}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},go=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.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(e,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===e)}};function vd(t){return t.split("-").reduce((e,r)=>e+r[0].toUpperCase()+r.slice(1))}function W_(t){let e,r,o=/^-[^-]$/,n=/^--[^-]/,i=t.split(/[ |,]+/).concat("guard");if(o.test(i[0])&&(e=i.shift()),n.test(i[0])&&(r=i.shift()),!e&&o.test(i[0])&&(e=i.shift()),!e&&n.test(i[0])&&(e=r,r=i.shift()),i[0].startsWith("-")){let s=i[0],c=`option creation failed due to '${s}' in option flags '${t}'`;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
10
  - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):o.test(s)?new Error(`${c}
11
11
  - too many short flags`):n.test(s)?new Error(`${c}
12
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}}to.Option=Qi;to.DualOptions=eo});var sd=Ve(ad=>{function $_(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 I_(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=$_(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?`
13
+ - unrecognised flag format`)}if(e===void 0&&r===void 0)throw new Error(`option creation failed due to no flags found in '${t}'.`);return{shortFlag:e,longFlag:r}}ho.Option=fo;ho.DualOptions=go});var yd=Ke(bd=>{function q_(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let r=[];for(let o=0;o<=t.length;o++)r[o]=[o];for(let o=0;o<=e.length;o++)r[0][o]=o;for(let o=1;o<=e.length;o++)for(let n=1;n<=t.length;n++){let i=1;t[n-1]===e[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&&t[n-1]===e[o-2]&&t[n-2]===e[o-1]&&(r[n][o]=Math.min(r[n][o],r[n-2][o-2]+1))}return r[t.length][e.length]}function J_(t,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let r=t.startsWith("--");r&&(t=t.slice(2),e=e.map(s=>s.slice(2)));let o=[],n=3,i=.4;return e.forEach(s=>{if(s.length<=1)return;let c=q_(t,s),u=Math.max(t.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]}?)`:""}ad.suggestSimilar=I_});var dd=Ve(so=>{var E_=Ht("node:events").EventEmitter,ro=Ht("node:child_process"),$e=Ht("node:path"),Zn=Ht("node:fs"),A=Ht("node:process"),{Argument:w_,humanReadableArgName:O_}=Mn(),{CommanderError:io}=Gt(),{Help:T_,stripColor:A_}=Xi(),{Option:cd,DualOptions:P_}=no(),{suggestSimilar:ud}=sd(),oo=class e extends E_{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=>A.stdout.write(r),writeErr:r=>A.stderr.write(r),outputError:(r,o)=>o(r),getOutHelpWidth:()=>A.stdout.isTTY?A.stdout.columns:void 0,getErrHelpWidth:()=>A.stderr.isTTY?A.stderr.columns:void 0,getOutHasColors:()=>ao()??(A.stdout.isTTY&&A.stdout.hasColors?.()),getErrHasColors:()=>ao()??(A.stderr.isTTY&&A.stderr.hasColors?.()),stripColor:r=>A_(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 T_,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 w_(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 io(t,r,o)),A.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 cd(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 cd)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){A.versions?.electron&&(r.from="electron");let n=A.execArgv??[];(n.includes("-e")||n.includes("--eval")||n.includes("-p")||n.includes("--print"))&&(r.from="eval")}t===void 0&&(t=A.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":A.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(Zn.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
15
+ (Did you mean ${o[0]}?)`:""}bd.suggestSimilar=J_});var $d=Ke(xo=>{var Y_=Qt("node:events").EventEmitter,vo=Qt("node:child_process"),Ee=Qt("node:path"),Xn=Qt("node:fs"),P=Qt("node:process"),{Argument:X_,humanReadableArgName:Q_}=Yn(),{CommanderError:bo}=en(),{Help:ev,stripColor:tv}=po(),{Option:kd,DualOptions:nv}=_o(),{suggestSimilar:xd}=yd(),yo=class t extends Y_{constructor(e){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=e||"",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:()=>ko()??(P.stdout.isTTY&&P.stdout.hasColors?.()),getErrHasColors:()=>ko()??(P.stderr.isTTY&&P.stderr.hasColors?.()),stripColor:r=>tv(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let r=this;r;r=r.parent)e.push(r);return e}command(e,r,o){let n=r,i=o;typeof n=="object"&&n!==null&&(i=n,n=null),i=i||{};let[,s,c]=e.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(e){return new t(e)}createHelp(){return Object.assign(new ev,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,r){if(!e._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=e._name),(r.noHelp||r.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,r){return new X_(e,r)}argument(e,r,o,n){let i=this.createArgument(e,r);return typeof o=="function"?i.default(n).argParser(o):i.default(o),this.addArgument(i),this}arguments(e){return e.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(e){let r=this.registeredArguments.slice(-1)[0];if(r&&r.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,r){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,this;e=e??"help [command]";let[,o,n]=e.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(e,r){return typeof e!="object"?(this.helpCommand(e,r),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,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(e,r){let o=["preSubcommand","preAction","postAction"];if(!o.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
17
+ Expecting one of '${o.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(r):this._lifeCycleHooks[e]=[r],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(e,r,o){this._exitCallback&&this._exitCallback(new bo(e,r,o)),P.exit(e)}action(e){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),e.apply(this,i)};return this._actionHandler=r,this}createOption(e,r){return new kd(e,r)}_callParseArg(e,r,o,n){try{return e.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(e){let r=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(r){let o=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${o}'
18
+ - already used by option '${r.flags}'`)}this.options.push(e)}_registerCommand(e){let r=n=>[n.name()].concat(n.aliases()),o=r(e).find(n=>this._findCommand(n));if(o){let n=r(this._findCommand(o)).join("|"),i=r(e).join("|");throw new Error(`cannot add command '${i}' as already have command '${n}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let r=e.name(),o=e.attributeName();if(e.negate){let i=e.long.replace(/^--no-/,"--");this._findOption(i)||this.setOptionValueWithSource(o,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(o,e.defaultValue,"default");let n=(i,s,c)=>{i==null&&e.presetArg!==void 0&&(i=e.presetArg);let u=this.getOptionValue(o);i!==null&&e.parseArg?i=this._callParseArg(e,i,u,s):i!==null&&e.variadic&&(i=e._concatValue(i,u)),i==null&&(e.negate?i=!1:e.isBoolean()||e.optional?i=!0:i=""),this.setOptionValueWithSource(o,i,c)};return this.on("option:"+r,i=>{let s=`error: option '${e.flags}' argument '${i}' is invalid.`;n(i,s,"cli")}),e.envVar&&this.on("optionEnv:"+r,i=>{let s=`error: option '${e.flags}' value '${i}' from env '${e.envVar}' is invalid.`;n(i,s,"env")}),this}_optionEx(e,r,o,n,i){if(typeof r=="object"&&r instanceof kd)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let s=this.createOption(r,o);if(s.makeOptionMandatory(!!e.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(e,r,o,n){return this._optionEx({},e,r,o,n)}requiredOption(e,r,o,n){return this._optionEx({mandatory:!0},e,r,o,n)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,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(e=!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=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,r){return this.setOptionValueWithSource(e,r,void 0)}setOptionValueWithSource(e,r,o){return this._storeOptionsAsProperties?this[e]=r:this._optionValues[e]=r,this._optionValueSources[e]=o,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let r;return this._getCommandAndAncestors().forEach(o=>{o.getOptionValueSource(e)!==void 0&&(r=o.getOptionValueSource(e))}),r}_prepareUserArgs(e,r){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},e===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")}e===void 0&&(e=P.argv),this.rawArgs=e.slice();let o;switch(r.from){case void 0:case"node":this._scriptPath=e[1],o=e.slice(2);break;case"electron":P.defaultApp?(this._scriptPath=e[1],o=e.slice(2)):o=e.slice(1);break;case"user":o=e.slice(0);break;case"eval":o=e.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(e,r){this._prepareForParse();let o=this._prepareUserArgs(e,r);return this._parseCommand([],o),this}async parseAsync(e,r){this._prepareForParse();let o=this._prepareUserArgs(e,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(e,r,o){if(Xn.existsSync(e))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=`'${e}' 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
- - ${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=$e.resolve(d,m);if(Zn.existsSync(g))return g;if(n.includes($e.extname(m)))return;let h=n.find(S=>Zn.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=Zn.realpathSync(this._scriptPath)}catch{d=this._scriptPath}c=$e.resolve($e.dirname(d),c)}if(c){let d=i(c,s);if(!d&&!t._executableFile&&this._scriptPath){let m=$e.basename(this._scriptPath,$e.extname(this._scriptPath));m!==this._name&&(d=i(c,`${m}-${t._name}`))}s=d||s}o=n.includes($e.extname(s));let u;A.platform!=="win32"?o?(r.unshift(s),r=ld(A.execArgv).concat(r),u=ro.spawn(A.argv[0],r,{stdio:"inherit"})):u=ro.spawn(s,r,{stdio:"inherit"}):(this._checkForMissingExecutable(s,c,t._name),r.unshift(s),r=ld(A.execArgv).concat(r),u=ro.spawn(A.execPath,r,{stdio:"inherit"})),u.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(m=>{A.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 io(d,"commander.executeSubCommandAsync","(close)")):A.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)A.exit(1);else{let m=new io(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}
22
+ - ${n}`;throw new Error(i)}_executeSubCommand(e,r){r=r.slice();let o=!1,n=[".js",".ts",".tsx",".mjs",".cjs"];function i(d,m){let g=Ee.resolve(d,m);if(Xn.existsSync(g))return g;if(n.includes(Ee.extname(m)))return;let h=n.find(x=>Xn.existsSync(`${g}${x}`));if(h)return`${g}${h}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=e._executableFile||`${this._name}-${e._name}`,c=this._executableDir||"";if(this._scriptPath){let d;try{d=Xn.realpathSync(this._scriptPath)}catch{d=this._scriptPath}c=Ee.resolve(Ee.dirname(d),c)}if(c){let d=i(c,s);if(!d&&!e._executableFile&&this._scriptPath){let m=Ee.basename(this._scriptPath,Ee.extname(this._scriptPath));m!==this._name&&(d=i(c,`${m}-${e._name}`))}s=d||s}o=n.includes(Ee.extname(s));let u;P.platform!=="win32"?o?(r.unshift(s),r=Sd(P.execArgv).concat(r),u=vo.spawn(P.argv[0],r,{stdio:"inherit"})):u=vo.spawn(s,r,{stdio:"inherit"}):(this._checkForMissingExecutable(s,c,e._name),r.unshift(s),r=Sd(P.execArgv).concat(r),u=vo.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 bo(d,"commander.executeSubCommandAsync","(close)")):P.exit(d)}),u.on("error",d=>{if(d.code==="ENOENT")this._checkForMissingExecutable(s,c,e._name);else if(d.code==="EACCES")throw new Error(`'${s}' not executable`);if(!l)P.exit(1);else{let m=new bo(1,"commander.executeSubCommandAsync","(error)");m.nestedError=d,l(m)}}),this.runningCommand=u}_dispatchSubcommand(e,r,o){let n=this._findCommand(e);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(e){e||this.help();let r=this._findCommand(e);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,r)=>{e.required&&this.args[r]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(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)=>e(o,c,s),o.defaultValue))):i===void 0&&(i=[]):n<this.args.length&&(i=this.args[n],o.parseArg&&(i=e(o,i,o.defaultValue))),r[n]=i}),this.processedArgs=r}_chainOrCall(e,r){return e&&e.then&&typeof e.then=="function"?e.then(()=>r()):r()}_chainOrCallHooks(e,r){let o=e,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(e,r,o){let n=e;return this._lifeCycleHooks[o]!==void 0&&this._lifeCycleHooks[o].forEach(i=>{n=this._chainOrCall(n,()=>i(this,r))}),n}_parseCommand(e,r){let o=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(o.operands),r=o.unknown,this.args=e.concat(r),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),r);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,e,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,e,r)})),s=this._chainOrCallHooks(s,"postAction"),s}if(this.parent&&this.parent.listenerCount(i))n(),this._processArguments(),this.parent.emit(i,e,r);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,r);this.listenerCount("command:*")?this.emit("command:*",e,r):this.commands.length?this.unknownCommand():(n(),this._processArguments())}else this.commands.length?(n(),this.help({error:!0})):(n(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(r=>r._name===e||r._aliases.includes(e))}_findOption(e){return this.options.find(r=>r.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(r=>{r.mandatory&&e.getOptionValue(r.attributeName())===void 0&&e.missingMandatoryOptionValue(r)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(o=>{let n=o.attributeName();return this.getOptionValue(n)===void 0?!1:this.getOptionValueSource(n)!=="default"});e.filter(o=>o.conflictsWith.length>0).forEach(o=>{let n=e.find(i=>o.conflictsWith.includes(i.attributeName()));n&&this._conflictingOption(o,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let r=[],o=[],n=r,i=e.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 e={},r=this.options.length;for(let o=0;o<r;o++){let n=this.options[o].attributeName();e[n]=n===this._versionOptionName?this._version:this[n]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,r)=>Object.assign(e,r.opts()),{})}error(e,r){this._outputConfiguration.outputError(`${e}
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=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 A.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()}`,A.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new P_(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=ud(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=ud(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=>O_(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=$e.basename(t,$e.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(A.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 ld(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 ao(){if(A.env.NO_COLOR||A.env.FORCE_COLOR==="0"||A.env.FORCE_COLOR==="false")return!1;if(A.env.FORCE_COLOR||A.env.CLICOLOR_FORCE!==void 0)return!0}so.Command=oo;so.useColor=ao});var gd=Ve(oe=>{var{Argument:md}=Mn(),{Command:co}=dd(),{CommanderError:N_,InvalidArgumentError:pd}=Gt(),{Help:C_}=Xi(),{Option:fd}=no();oe.program=new co;oe.createCommand=e=>new co(e);oe.createOption=(e,t)=>new fd(e,t);oe.createArgument=(e,t)=>new md(e,t);oe.Command=co;oe.Option=fd;oe.Argument=md;oe.Help=C_;oe.CommanderError=N_;oe.InvalidArgumentError=pd;oe.InvalidOptionArgumentError=pd});var hd=v_(gd(),1),{program:mI,createCommand:pI,createArgument:fI,createOption:gI,CommanderError:hI,InvalidArgumentError:_I,InvalidOptionArgumentError:vI,Command:_d,Argument:bI,Option:yI,Help:xI}=hd.default;import{readFile as q$}from"node:fs/promises";import{fileURLToPath as J$}from"node:url";import{dirname as Y$,join as X$}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 Kt="x-fs-surface",Wt="cli",R_="management";function rt(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 D_(e){let t=e.includes("?")?"&":"?";return`${e}${t}dry_run=true`}function vd(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",[Kt]:Wt}});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]===R_}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?D_(c):c,g={Authorization:`Bearer ${d}`,"Content-Type":"application/json",[Kt]:Wt};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,P=typeof C=="string"?{message:C}:C;throw new k(P?.message??h.statusText,h.status,{code:P?.code,details:P?.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",rt(`/products/${s}`,{env:u?.env}),c),publishProduct:(s,c,u)=>i("POST",`/products/${s}/publish`,c&&Object.keys(c).length>0?c:void 0,u),createPlan:(s,c,u,l)=>i("POST",rt(`/products/${s}/plans`,{env:u?.env}),c,l),updatePlan:(s,c,u,l)=>i("PATCH",rt(`/products/${s}/plans/${c}`,{env:l?.env}),u),deletePlan:(s,c,u)=>i("DELETE",rt(`/products/${s}/plans/${c}`,{env:u?.env})),migratePlan:(s,c,u,l)=>i("POST",`/products/${s}/plans/${encodeURIComponent(c)}/migration-batches`,u,l),getProduct:(s,c)=>i("GET",rt(`/products/${s}`,{env:c?.env})),getDeployments:s=>i("GET",`/products/${s}/deployments`),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}`),builderFrontendDeploy:(s,c,u)=>i("POST",`/products/${s}/frontend/deploy`,c,u),builderFrontendStatus:(s,c)=>i("GET",`/products/${s}/frontend/status${c?`?environmentId=${encodeURIComponent(c)}`:""}`),builderFrontendReleases:(s,c)=>i("GET",`/products/${s}/frontend/releases${c?`?environmentId=${encodeURIComponent(c)}`:""}`),builderFrontendRollback:(s,c,u)=>i("POST",`/products/${s}/frontend/rollback`,c,u),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",[Kt]:Wt},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}`,[Kt]:Wt}});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}`,[Kt]:Wt}});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",rt(`/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 Vn,mkdirSync as z_,readFileSync as xd,writeFileSync as kd}from"node:fs";import{homedir as U_}from"node:os";import{join as lo}from"node:path";var bd="https://core.farthershore.com";var Bn=lo(U_(),".farthershore"),yd=lo(Bn,"config.json"),qt=lo(Bn,"credentials.json");function Sd(e){Vn(e)||z_(e,{recursive:!0,mode:448})}var uo={apiUrl:bd};function $d(){if(Sd(Bn),!Vn(yd))return uo;try{let e=JSON.parse(xd(yd,"utf-8"));return{...uo,...e}}catch{return uo}}function Hn(){if(!Vn(qt))return null;try{return JSON.parse(xd(qt,"utf-8"))}catch{return null}}function Id(e){Sd(Bn),kd(qt,JSON.stringify(e,null,2)+`
29
- `,{mode:384})}function Ed(){Vn(qt)&&kd(qt,"{}")}function wd(e){if(e)return e;let t=process.env.FARTHERSHORE_TOKEN;if(t)return t;let r=Hn();if(r?.token)return r.token;throw new k("Not authenticated. Run `farthershore auth login` or set FARTHERSHORE_TOKEN environment variable.")}import{createInterface as Qk}from"node:readline";var Od=(e=0)=>t=>`\x1B[${t+e}m`,Td=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Ad=(e=0)=>(t,r,o)=>`\x1B[${38+e};2;${t};${r};${o}m`,j={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]}},DI=Object.keys(j.modifier),j_=Object.keys(j.color),L_=Object.keys(j.bgColor),zI=[...j_,...L_];function F_(){let e=new Map;for(let[t,r]of Object.entries(j)){for(let[o,n]of Object.entries(r))j[o]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},r[o]=j[o],e.set(n[0],n[1]);Object.defineProperty(j,t,{value:r,enumerable:!1})}return Object.defineProperty(j,"codes",{value:e,enumerable:!1}),j.color.close="\x1B[39m",j.bgColor.close="\x1B[49m",j.color.ansi=Od(),j.color.ansi256=Td(),j.color.ansi16m=Ad(),j.bgColor.ansi=Od(10),j.bgColor.ansi256=Td(10),j.bgColor.ansi16m=Ad(10),Object.defineProperties(j,{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=>j.rgbToAnsi256(...j.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)=>j.ansi256ToAnsi(j.rgbToAnsi256(t,r,o)),enumerable:!1},hexToAnsi:{value:t=>j.ansi256ToAnsi(j.hexToAnsi256(t)),enumerable:!1}}),j}var M_=F_(),ce=M_;import mo from"node:process";import Z_ from"node:os";import Pd from"node:tty";function ae(e,t=globalThis.Deno?globalThis.Deno.args:mo.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}=mo,Gn;ae("no-color")||ae("no-colors")||ae("color=false")||ae("color=never")?Gn=0:(ae("color")||ae("colors")||ae("color=true")||ae("color=always"))&&(Gn=1);function V_(){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 B_(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function H_(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let o=V_();o!==void 0&&(Gn=o);let n=r?Gn:o;if(n===0)return 0;if(r){if(ae("color=16m")||ae("color=full")||ae("color=truecolor"))return 3;if(ae("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(mo.platform==="win32"){let s=Z_.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 Nd(e,t={}){let r=H_(e,{streamIsTTY:e&&e.isTTY,...t});return B_(r)}var G_={stdout:Nd({isTTY:Pd.isatty(1)}),stderr:Nd({isTTY:Pd.isatty(2)})},Cd=G_;function Rd(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 Dd(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
25
+ `),this.outputHelp({error:!0}));let o=r||{},n=o.exitCode||1,i=o.code||"commander.error";this._exit(n,i,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in P.env){let r=e.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,P.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new nv(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())&&e.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(e){let r=`error: missing required argument '${e}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(e){let r=`error: option '${e.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let r=`error: required option '${e.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,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(e)} cannot be used with ${n(r)}`;this.error(i,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let r="";if(e.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=xd(e,n)}let o=`error: unknown option '${e}'${r}`;this.error(o,{code:"commander.unknownOption"})}_excessArguments(e){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 ${e.length}.`;this.error(i,{code:"commander.excessArguments"})}unknownCommand(){let e=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=xd(e,n)}let o=`error: unknown command '${e}'${r}`;this.error(o,{code:"commander.unknownCommand"})}version(e,r,o){if(e===void 0)return this._version;this._version=e,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(`${e}
26
+ `),this._exit(0,"commander.version",e)}),this}description(e,r){return e===void 0&&r===void 0?this._description:(this._description=e,r&&(this._argsDescription=r),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===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]),e===r._name)throw new Error("Command alias can't be the same as its name");let o=this.parent?._findCommand(e);if(o){let n=[o.name()].concat(o.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${n}'`)}return r._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(r=>this.alias(r)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(o=>Q_(o));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=Ee.basename(e,Ee.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let r=this.createHelp(),o=this._getOutputContext(e);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(e){e=e||{};let r=!!e.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(e){let r;typeof e=="function"&&(r=e,e=void 0);let o=this._getOutputContext(e),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(e,r){return typeof e=="boolean"?(e?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(e=e??"-h, --help",r=r??"display help for command",this._helpOption=this.createOption(e,r),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let r=Number(P.exitCode??0);r===0&&e&&typeof e!="function"&&e.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(e,r){let o=["beforeAll","before","after","afterAll"];if(!o.includes(e))throw new Error(`Unexpected value for position to addHelpText.
27
+ Expecting one of '${o.join("', '")}'`);let n=`${e}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(e){let r=this._getHelpOption();r&&e.find(n=>r.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Sd(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let r,o="127.0.0.1",n="9229",i;return(i=e.match(/^(--inspect(-brk)?)$/))!==null?r=i[1]:(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=i[1],/^\d+$/.test(i[3])?n=i[3]:o=i[3]):(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=i[1],o=i[3],n=i[4]),r&&n!=="0"?`${r}=${o}:${parseInt(n)+1}`:e})}function ko(){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}xo.Command=yo;xo.useColor=ko});var Od=Ke(se=>{var{Argument:Id}=Yn(),{Command:So}=$d(),{CommanderError:rv,InvalidArgumentError:Ed}=en(),{Help:iv}=po(),{Option:wd}=_o();se.program=new So;se.createCommand=t=>new So(t);se.createOption=(t,e)=>new wd(t,e);se.createArgument=(t,e)=>new Id(t,e);se.Command=So;se.Option=wd;se.Argument=Id;se.Help=iv;se.CommanderError=rv;se.InvalidArgumentError=Ed;se.InvalidOptionArgumentError=Ed});var Td=V_(Od(),1),{program:QI,createCommand:eE,createArgument:tE,createOption:nE,CommanderError:rE,InvalidArgumentError:iE,InvalidOptionArgumentError:oE,Command:Ad,Argument:aE,Option:sE,Help:cE}=Td.default;import{readFile as UI}from"node:fs/promises";import{fileURLToPath as zI}from"node:url";import{dirname as jI,join as LI}from"node:path";var S=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 ot="x-fs-surface",at="cli",ov="management";function Qn(t,e){let r=new URLSearchParams;for(let[n,i]of Object.entries(e))i&&r.set(n,i);let o=r.toString();return o?`${t}?${o}`:t}function Cd(t){let e=t.includes("?")?"&":"?";return`${t}${e}dry_run=true`}function Pd(t){let e=null;async function r(){let c=await fetch(`${t.apiUrl}/auth/cli/exchange`,{method:"POST",headers:{Authorization:`Bearer ${t.token}`,"Content-Type":"application/json",[ot]:at}});if(!c.ok){let l=(await c.json().catch(()=>null))?.error,d=typeof l=="string"?{message:l}:l;throw new S(d?.message??c.statusText,c.status,{code:d?.code,details:d?.details})}return e=await c.json(),e}function o(c){return c.split("/",3)[1]===ov}async function n(c){if(!t.token.startsWith("mk_")||o(c))return t.token;let u=e?Date.parse(e.expiresAt):0;return(!e||u-Date.now()<6e4)&&await r(),e.accessToken}async function i(c,u,l,d){let m=await n(u),g=d?.dryRun?Cd(u):u,h={Authorization:`Bearer ${m}`,"Content-Type":"application/json",[ot]:at};d?.idempotencyKey&&(h["Idempotency-Key"]=d.idempotencyKey);let x=await fetch(`${t.apiUrl}${g}`,{method:c,headers:h,body:l?JSON.stringify(l):void 0});if(!x.ok){let C=(await x.json().catch(()=>null))?.error,ee=typeof C=="string"?{message:C}:C;throw new S(ee?.message??x.statusText,x.status,{code:ee?.code,details:ee?.details})}if(x.status!==204)return x.json()}async function s(c,u,l,d,m){let g=await n(u),h=m?.dryRun?Cd(u):u,x={Authorization:`Bearer ${g}`,"Content-Type":d,[ot]:at};m?.idempotencyKey&&(x["Idempotency-Key"]=m.idempotencyKey);let A=await fetch(`${t.apiUrl}${h}`,{method:c,headers:x,body:l});if(!A.ok){let ee=(await A.json().catch(()=>null))?.error,Xt=typeof ee=="string"?{message:ee}:ee;throw new S(Xt?.message??A.statusText,A.status,{code:Xt?.code,details:Xt?.details})}if(A.status!==204)return A.json()}return{exchangeCliToken:r,bootstrap:()=>i("POST","/builder/context/bootstrap"),listProducts:()=>i("GET","/businesses"),initProduct:(c,u)=>i("POST","/businesses/init",c,u),updateProduct:(c,u,l,d)=>i("PATCH",Qn(`/businesses/${c}`,{env:l?.env}),u,d),uploadBrandAsset:(c,u,l,d,m)=>s("PUT",`/businesses/${c}/${u}`,l,d,m),deleteBrandAsset:(c,u,l)=>i("DELETE",`/businesses/${c}/${u}`,void 0,l),publishProduct:(c,u,l)=>i("POST",`/businesses/${c}/publish`,u&&Object.keys(u).length>0?u:void 0,l),migratePlan:(c,u,l,d)=>i("POST",`/businesses/${c}/plans/${encodeURIComponent(u)}/migration-batches`,l,d),getProduct:(c,u)=>i("GET",Qn(`/businesses/${c}`,{env:u?.env})),getDeployments:c=>i("GET",`/businesses/${c}/deployments`),listChangeSets:(c,u)=>i("GET",Qn(`/businesses/${c}/change-sets`,{env:u?.env})),listEnvironments:c=>i("GET",`/businesses/${c}/environments`),createEnvironment:(c,u,l)=>i("POST",`/businesses/${c}/environments`,u,l),deleteEnvironment:(c,u)=>i("DELETE",`/businesses/${c}/environments/${encodeURIComponent(u)}`),deleteProduct:c=>i("DELETE",`/businesses/${c}`),managementListPlans:c=>i("GET",`/management/businesses/${c}/plans`),managementGetUsage:c=>i("GET",`/management/businesses/${c}/usage`),managementListMakerTokens:()=>i("GET","/maker-tokens"),managementCreateMakerToken:(c,u)=>i("POST","/maker-tokens",c,u),managementRevokeMakerToken:c=>i("DELETE",`/maker-tokens/${c}`),builderListBackends:c=>i("GET",`/businesses/${c}/backends`),builderCreateBackend:(c,u,l)=>i("POST",`/businesses/${c}/backends`,u,l),builderDeleteBackend:(c,u)=>i("DELETE",`/businesses/${c}/backends/${u}`),builderListRuntimeTokens:c=>i("GET",`/businesses/${c}/runtime-tokens`),builderCreateRuntimeToken:(c,u,l)=>i("POST",`/businesses/${c}/runtime-tokens`,u,l),builderRotateRuntimeToken:(c,u,l)=>i("POST",`/businesses/${c}/runtime-tokens/${u}/rotate`,void 0,l),builderRevokeRuntimeToken:(c,u)=>i("DELETE",`/businesses/${c}/runtime-tokens/${u}`),builderFrontendDeploy:(c,u,l)=>i("POST",`/businesses/${c}/frontend/deploy`,u,l),builderFrontendStatus:(c,u)=>i("GET",`/businesses/${c}/frontend/status${u?`?environmentId=${encodeURIComponent(u)}`:""}`),builderFrontendReleases:(c,u)=>i("GET",`/businesses/${c}/frontend/releases${u?`?environmentId=${encodeURIComponent(u)}`:""}`),builderFrontendRollback:(c,u,l)=>i("POST",`/businesses/${c}/frontend/rollback`,u,l),builderFrontendVariables:(c,u)=>i("GET",`/businesses/${c}/frontend/variables${u?`?environmentId=${encodeURIComponent(u)}`:""}`),builderSetFrontendVariable:(c,u,l)=>i("POST",`/businesses/${c}/frontend/variables`,u,l),builderDeleteFrontendVariable:(c,u,l,d)=>i("DELETE",`/businesses/${c}/frontend/variables/${encodeURIComponent(u)}${l?`?environmentId=${encodeURIComponent(l)}`:""}`,void 0,d),builderGitHubStatus:()=>i("GET","/builder/git/github/status"),productStripeStatus:c=>i("GET",`/businesses/${c}/stripe/status`),issuePersonaBootstrapKey:async(c,u,l)=>{let d=await fetch(`${t.apiUrl}/portal/businesses/${c}/environments/${u}/test/bootstrap-key`,{method:"POST",headers:{Authorization:`Bearer ${t.token}`,"Content-Type":"application/json",[ot]:at},body:JSON.stringify(l??{})});if(!d.ok){let g=(await d.json().catch(()=>null))?.error,h=typeof g=="string"?{message:g}:g;throw new S(h?.message??d.statusText,d.status,{code:h?.code,details:h?.details})}return d.json()},listPersonas:async(c,u)=>{let l=await fetch(`${t.apiUrl}/portal/businesses/${c}/environments/${u}/test/personas`,{method:"GET",headers:{Authorization:`Bearer ${t.token}`,[ot]:at}});if(!l.ok){let m=(await l.json().catch(()=>null))?.error,g=typeof m=="string"?{message:m}:m;throw new S(g?.message??l.statusText,l.status,{code:g?.code,details:g?.details})}return l.json()},revokePersona:async(c,u,l)=>{let d=await fetch(`${t.apiUrl}/portal/businesses/${c}/environments/${u}/test/personas/${l}`,{method:"DELETE",headers:{Authorization:`Bearer ${t.token}`,[ot]:at}});if(!d.ok){let g=(await d.json().catch(()=>null))?.error,h=typeof g=="string"?{message:g}:g;throw new S(h?.message??d.statusText,d.status,{code:h?.code,details:h?.details})}return d.json()},getProductConfig:(c,u)=>i("GET",Qn(`/businesses/${c}/config`,{format:"json",env:u?.env,state:u?.state})),updateProductConfigDraft:(c,u,l)=>i("PATCH",`/businesses/${c}/config/draft`,{spec:u,env:l?.env,branch:l?.branch,source:l?.source,baseDraftHash:l?.baseDraftHash})}}import{existsSync as er,mkdirSync as av,readFileSync as Dd,writeFileSync as Ud}from"node:fs";import{homedir as sv}from"node:os";import{join as Io}from"node:path";var Nd="https://core.farthershore.com";var tr=Io(sv(),".farthershore"),Rd=Io(tr,"config.json"),tn=Io(tr,"credentials.json");function zd(t){er(t)||av(t,{recursive:!0,mode:448})}var $o={apiUrl:Nd};function jd(){if(zd(tr),!er(Rd))return $o;try{let t=JSON.parse(Dd(Rd,"utf-8"));return{...$o,...t}}catch{return $o}}function nr(){if(!er(tn))return null;try{return JSON.parse(Dd(tn,"utf-8"))}catch{return null}}function Ld(t){zd(tr),Ud(tn,JSON.stringify(t,null,2)+`
29
+ `,{mode:384})}function Fd(){er(tn)&&Ud(tn,"{}")}function Md(t){if(t)return t;let e=process.env.FARTHERSHORE_TOKEN;if(e)return e;let r=nr();if(r?.token)return r.token;throw new S("Not authenticated. Run `farthershore auth login` or set FARTHERSHORE_TOKEN environment variable.")}import{createInterface as wS}from"node:readline";var Zd=(t=0)=>e=>`\x1B[${e+t}m`,Vd=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Bd=(t=0)=>(e,r,o)=>`\x1B[${38+t};2;${e};${r};${o}m`,j={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]}},xE=Object.keys(j.modifier),cv=Object.keys(j.color),uv=Object.keys(j.bgColor),SE=[...cv,...uv];function lv(){let t=new Map;for(let[e,r]of Object.entries(j)){for(let[o,n]of Object.entries(r))j[o]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},r[o]=j[o],t.set(n[0],n[1]);Object.defineProperty(j,e,{value:r,enumerable:!1})}return Object.defineProperty(j,"codes",{value:t,enumerable:!1}),j.color.close="\x1B[39m",j.bgColor.close="\x1B[49m",j.color.ansi=Zd(),j.color.ansi256=Vd(),j.color.ansi16m=Bd(),j.bgColor.ansi=Zd(10),j.bgColor.ansi256=Vd(10),j.bgColor.ansi16m=Bd(10),Object.defineProperties(j,{rgbToAnsi256:{value(e,r,o){return e===r&&r===o?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(o/255*5)},enumerable:!1},hexToRgb:{value(e){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.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:e=>j.rgbToAnsi256(...j.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,o,n;if(e>=232)r=((e-232)*10+8)/255,o=r,n=r;else{e-=16;let c=e%36;r=Math.floor(e/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:(e,r,o)=>j.ansi256ToAnsi(j.rgbToAnsi256(e,r,o)),enumerable:!1},hexToAnsi:{value:e=>j.ansi256ToAnsi(j.hexToAnsi256(e)),enumerable:!1}}),j}var dv=lv(),le=dv;import Eo from"node:process";import mv from"node:os";import Hd from"node:tty";function ce(t,e=globalThis.Deno?globalThis.Deno.args:Eo.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",o=e.indexOf(r+t),n=e.indexOf("--");return o!==-1&&(n===-1||o<n)}var{env:L}=Eo,rr;ce("no-color")||ce("no-colors")||ce("color=false")||ce("color=never")?rr=0:(ce("color")||ce("colors")||ce("color=true")||ce("color=always"))&&(rr=1);function pv(){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 fv(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function gv(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let o=pv();o!==void 0&&(rr=o);let n=r?rr:o;if(n===0)return 0;if(r){if(ce("color=16m")||ce("color=full")||ce("color=truecolor"))return 3;if(ce("color=256"))return 2}if("TF_BUILD"in L&&"AGENT_NAME"in L)return 1;if(t&&!e&&n===void 0)return 0;let i=n||0;if(L.TERM==="dumb")return i;if(Eo.platform==="win32"){let s=mv.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 Kd(t,e={}){let r=gv(t,{streamIsTTY:t&&t.isTTY,...e});return fv(r)}var hv={stdout:Kd({isTTY:Hd.isatty(1)}),stderr:Kd({isTTY:Hd.isatty(2)})},Gd=hv;function Wd(t,e,r){let o=t.indexOf(e);if(o===-1)return t;let n=e.length,i=0,s="";do s+=t.slice(i,o)+e+r,i=o+n,o=t.indexOf(e,i);while(o!==-1);return s+=t.slice(i),s}function qd(t,e,r,o){let n=0,i="";do{let s=t[o-1]==="\r";i+=t.slice(n,s?o-1:o)+e+(s?`\r
30
30
  `:`
31
- `)+r,n=o+1,o=e.indexOf(`
32
- `,n)}while(o!==-1);return i+=e.slice(n),i}var{stdout:zd,stderr:Ud}=Cd,po=Symbol("GENERATOR"),it=Symbol("STYLER"),Jt=Symbol("IS_EMPTY"),jd=["ansi","ansi","ansi256","ansi16m"],ot=Object.create(null),K_=(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=zd?zd.level:0;e.level=t.level===void 0?r:t.level};var W_=e=>{let t=(...r)=>r.join(" ");return K_(t,e),Object.setPrototypeOf(t,Yt.prototype),t};function Yt(e){return W_(e)}Object.setPrototypeOf(Yt.prototype,Function.prototype);for(let[e,t]of Object.entries(ce))ot[e]={get(){let r=Kn(this,go(t.open,t.close,this[it]),this[Jt]);return Object.defineProperty(this,e,{value:r}),r}};ot.visible={get(){let e=Kn(this,this[it],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var fo=(e,t,r,...o)=>e==="rgb"?t==="ansi16m"?ce[r].ansi16m(...o):t==="ansi256"?ce[r].ansi256(ce.rgbToAnsi256(...o)):ce[r].ansi(ce.rgbToAnsi(...o)):e==="hex"?fo("rgb",t,r,...ce.hexToRgb(...o)):ce[r][e](...o),q_=["rgb","hex","ansi256"];for(let e of q_){ot[e]={get(){let{level:r}=this;return function(...o){let n=go(fo(e,jd[r],"color",...o),ce.color.close,this[it]);return Kn(this,n,this[Jt])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);ot[t]={get(){let{level:r}=this;return function(...o){let n=go(fo(e,jd[r],"bgColor",...o),ce.bgColor.close,this[it]);return Kn(this,n,this[Jt])}}}}var J_=Object.defineProperties(()=>{},{...ot,level:{enumerable:!0,get(){return this[po].level},set(e){this[po].level=e}}}),go=(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}},Kn=(e,t,r)=>{let o=(...n)=>Y_(o,n.length===1?""+n[0]:n.join(" "));return Object.setPrototypeOf(o,J_),o[po]=e,o[it]=t,o[Jt]=r,o},Y_=(e,t)=>{if(e.level<=0||!t)return e[Jt]?"":t;let r=e[it];if(r===void 0)return t;let{openAll:o,closeAll:n}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=Rd(t,r.close,r.open),r=r.parent;let i=t.indexOf(`
33
- `);return i!==-1&&(t=Dd(t,n,o,i)),o+t+n};Object.defineProperties(Yt.prototype,ot);var X_=Yt(),GI=Yt({level:Ud?Ud.level:0});var z=X_;var Ld;function Fd(e){Ld=qn(e)}function ue(){return Ld??qn(void 0)}function Wn(){return ue()==="json"}function Md(e){Wn()||console.log(z.green(`\u2713 ${e}`))}function Zd(e){Wn()||console.error(z.red(`\u2717 ${e}`))}function Ie(e){Wn()||console.log(z.dim(e))}function Vd(e){Wn()||console.log(z.bold(e))}function Xt(){return process.stdout.isTTY===!0}function qn(e){return e==="json"||e==="table"?e:Xt()?"table":"json"}var a={};Se(a,{$brand:()=>_o,$input:()=>js,$output:()=>Us,NEVER:()=>ho,TimePrecision:()=>Zs,ZodAny:()=>Pu,ZodArray:()=>Du,ZodBase64:()=>ki,ZodBase64URL:()=>Si,ZodBigInt:()=>zt,ZodBigIntFormat:()=>Ei,ZodBoolean:()=>Dt,ZodCIDRv4:()=>yi,ZodCIDRv6:()=>xi,ZodCUID:()=>pi,ZodCUID2:()=>fi,ZodCatch:()=>rl,ZodCodec:()=>Pn,ZodCustom:()=>Nn,ZodCustomStringFormat:()=>Ct,ZodDate:()=>En,ZodDefault:()=>Yu,ZodDiscriminatedUnion:()=>Uu,ZodE164:()=>$i,ZodEmail:()=>li,ZodEmoji:()=>di,ZodEnum:()=>Pt,ZodError:()=>Ty,ZodExactOptional:()=>Wu,ZodFile:()=>Gu,ZodFirstPartyTypeKind:()=>hl,ZodFunction:()=>pl,ZodGUID:()=>xn,ZodIPv4:()=>vi,ZodIPv6:()=>bi,ZodISODate:()=>ii,ZodISODateTime:()=>ri,ZodISODuration:()=>ai,ZodISOTime:()=>oi,ZodIntersection:()=>ju,ZodIssueCode:()=>Py,ZodJWT:()=>Ii,ZodKSUID:()=>_i,ZodLazy:()=>ll,ZodLiteral:()=>Hu,ZodMAC:()=>$u,ZodMap:()=>Vu,ZodNaN:()=>ol,ZodNanoID:()=>mi,ZodNever:()=>Cu,ZodNonOptional:()=>Ni,ZodNull:()=>Tu,ZodNullable:()=>Ju,ZodNumber:()=>Rt,ZodNumberFormat:()=>Qe,ZodObject:()=>On,ZodOptional:()=>Pi,ZodPipe:()=>An,ZodPrefault:()=>Qu,ZodPreprocess:()=>al,ZodPromise:()=>ml,ZodReadonly:()=>sl,ZodRealError:()=>ee,ZodRecord:()=>At,ZodSet:()=>Bu,ZodString:()=>Nt,ZodStringFormat:()=>D,ZodSuccess:()=>nl,ZodSymbol:()=>wu,ZodTemplateLiteral:()=>ul,ZodTransform:()=>Ku,ZodTuple:()=>Fu,ZodType:()=>I,ZodULID:()=>gi,ZodURL:()=>In,ZodUUID:()=>xe,ZodUndefined:()=>Ou,ZodUnion:()=>Tn,ZodUnknown:()=>Nu,ZodVoid:()=>Ru,ZodXID:()=>hi,ZodXor:()=>zu,_ZodString:()=>ui,_default:()=>Xu,_function:()=>Nf,any:()=>uf,array:()=>wn,base64:()=>Hp,base64url:()=>Gp,bigint:()=>rf,boolean:()=>Eu,catch:()=>il,check:()=>Cf,cidrv4:()=>Vp,cidrv6:()=>Bp,clone:()=>W,codec:()=>Of,coerce:()=>_l,config:()=>M,core:()=>Oe,cuid:()=>Dp,cuid2:()=>zp,custom:()=>Rf,date:()=>df,decode:()=>_u,decodeAsync:()=>bu,describe:()=>Df,discriminatedUnion:()=>_f,e164:()=>Kp,email:()=>Ip,emoji:()=>Cp,encode:()=>hu,encodeAsync:()=>vu,endsWith:()=>yt,enum:()=>Ti,exactOptional:()=>qu,file:()=>$f,flattenError:()=>sn,float32:()=>Qp,float64:()=>ef,formatError:()=>cn,fromJSONSchema:()=>Zf,function:()=>Nf,getErrorMap:()=>Cy,globalRegistry:()=>H,gt:()=>be,gte:()=>J,guid:()=>Ep,hash:()=>Xp,hex:()=>Yp,hostname:()=>Jp,httpUrl:()=>Np,includes:()=>vt,instanceof:()=>Uf,int:()=>si,int32:()=>tf,int64:()=>of,intersection:()=>Lu,invertCodec:()=>Tf,ipv4:()=>Fp,ipv6:()=>Zp,iso:()=>Tt,json:()=>Lf,jwt:()=>Wp,keyof:()=>mf,ksuid:()=>Lp,lazy:()=>dl,length:()=>Ye,literal:()=>Sf,locales:()=>hn,looseObject:()=>gf,looseRecord:()=>bf,lowercase:()=>ht,lt:()=>ve,lte:()=>re,mac:()=>Mp,map:()=>yf,maxLength:()=>Je,maxSize:()=>Ue,meta:()=>zf,mime:()=>xt,minLength:()=>we,minSize:()=>ye,multipleOf:()=>ze,nan:()=>wf,nanoid:()=>Rp,nativeEnum:()=>kf,negative:()=>Kr,never:()=>wi,nonnegative:()=>qr,nonoptional:()=>tl,nonpositive:()=>Wr,normalize:()=>kt,null:()=>Au,nullable:()=>Sn,nullish:()=>If,number:()=>Iu,object:()=>pf,optional:()=>kn,overwrite:()=>de,parse:()=>mu,parseAsync:()=>pu,partialRecord:()=>vf,pipe:()=>ci,positive:()=>Gr,prefault:()=>el,preprocess:()=>Ff,prettifyError:()=>Ao,promise:()=>Pf,property:()=>Jr,readonly:()=>cl,record:()=>Zu,refine:()=>fl,regex:()=>gt,regexes:()=>ne,registry:()=>Ir,safeDecode:()=>xu,safeDecodeAsync:()=>Su,safeEncode:()=>yu,safeEncodeAsync:()=>ku,safeParse:()=>fu,safeParseAsync:()=>gu,set:()=>xf,setErrorMap:()=>Ny,size:()=>qe,slugify:()=>Et,startsWith:()=>bt,strictObject:()=>ff,string:()=>yn,stringFormat:()=>qp,stringbool:()=>jf,success:()=>Ef,superRefine:()=>gl,symbol:()=>sf,templateLiteral:()=>Af,toJSONSchema:()=>ei,toLowerCase:()=>$t,toUpperCase:()=>It,transform:()=>Ai,treeifyError:()=>To,trim:()=>St,tuple:()=>Mu,uint32:()=>nf,uint64:()=>af,ulid:()=>Up,undefined:()=>cf,union:()=>Oi,unknown:()=>Xe,uppercase:()=>_t,url:()=>Pp,util:()=>b,uuid:()=>wp,uuidv4:()=>Op,uuidv6:()=>Tp,uuidv7:()=>Ap,void:()=>lf,xid:()=>jp,xor:()=>hf});var Oe={};Se(Oe,{$ZodAny:()=>os,$ZodArray:()=>ls,$ZodAsyncError:()=>le,$ZodBase64:()=>qa,$ZodBase64URL:()=>Ja,$ZodBigInt:()=>_r,$ZodBigIntFormat:()=>ts,$ZodBoolean:()=>mn,$ZodCIDRv4:()=>Ga,$ZodCIDRv6:()=>Ka,$ZodCUID:()=>Ra,$ZodCUID2:()=>Da,$ZodCatch:()=>Os,$ZodCheck:()=>U,$ZodCheckBigIntFormat:()=>la,$ZodCheckEndsWith:()=>ka,$ZodCheckGreaterThan:()=>dr,$ZodCheckIncludes:()=>ya,$ZodCheckLengthEquals:()=>ha,$ZodCheckLessThan:()=>lr,$ZodCheckLowerCase:()=>va,$ZodCheckMaxLength:()=>fa,$ZodCheckMaxSize:()=>da,$ZodCheckMimeType:()=>$a,$ZodCheckMinLength:()=>ga,$ZodCheckMinSize:()=>ma,$ZodCheckMultipleOf:()=>ca,$ZodCheckNumberFormat:()=>ua,$ZodCheckOverwrite:()=>Ia,$ZodCheckProperty:()=>Sa,$ZodCheckRegex:()=>_a,$ZodCheckSizeEquals:()=>pa,$ZodCheckStartsWith:()=>xa,$ZodCheckStringFormat:()=>pt,$ZodCheckUpperCase:()=>ba,$ZodCodec:()=>fn,$ZodCustom:()=>zs,$ZodCustomStringFormat:()=>Qa,$ZodDate:()=>us,$ZodDefault:()=>$s,$ZodDiscriminatedUnion:()=>ps,$ZodE164:()=>Ya,$ZodEmail:()=>Aa,$ZodEmoji:()=>Na,$ZodEncodeError:()=>Pe,$ZodEnum:()=>vs,$ZodError:()=>an,$ZodExactOptional:()=>ks,$ZodFile:()=>ys,$ZodFunction:()=>Cs,$ZodGUID:()=>Oa,$ZodIPv4:()=>Va,$ZodIPv6:()=>Ba,$ZodISODate:()=>Fa,$ZodISODateTime:()=>La,$ZodISODuration:()=>Za,$ZodISOTime:()=>Ma,$ZodIntersection:()=>fs,$ZodJWT:()=>Xa,$ZodKSUID:()=>ja,$ZodLazy:()=>Ds,$ZodLiteral:()=>bs,$ZodMAC:()=>Ha,$ZodMap:()=>hs,$ZodNaN:()=>Ts,$ZodNanoID:()=>Ca,$ZodNever:()=>ss,$ZodNonOptional:()=>Es,$ZodNull:()=>is,$ZodNullable:()=>Ss,$ZodNumber:()=>hr,$ZodNumberFormat:()=>es,$ZodObject:()=>ym,$ZodObjectJIT:()=>ds,$ZodOptional:()=>br,$ZodPipe:()=>yr,$ZodPrefault:()=>Is,$ZodPreprocess:()=>As,$ZodPromise:()=>Rs,$ZodReadonly:()=>Ps,$ZodRealError:()=>Q,$ZodRecord:()=>gs,$ZodRegistry:()=>$r,$ZodSet:()=>_s,$ZodString:()=>We,$ZodStringFormat:()=>R,$ZodSuccess:()=>ws,$ZodSymbol:()=>ns,$ZodTemplateLiteral:()=>Ns,$ZodTransform:()=>xs,$ZodTuple:()=>vr,$ZodType:()=>$,$ZodULID:()=>za,$ZodURL:()=>Pa,$ZodUUID:()=>Ta,$ZodUndefined:()=>rs,$ZodUnion:()=>pn,$ZodUnknown:()=>as,$ZodVoid:()=>cs,$ZodXID:()=>Ua,$ZodXor:()=>ms,$brand:()=>_o,$constructor:()=>p,$input:()=>js,$output:()=>Us,Doc:()=>dn,JSONSchema:()=>kp,JSONSchemaGenerator:()=>ti,NEVER:()=>ho,TimePrecision:()=>Zs,_any:()=>uc,_array:()=>hc,_base64:()=>Zr,_base64url:()=>Vr,_bigint:()=>nc,_boolean:()=>ec,_catch:()=>xy,_check:()=>xp,_cidrv4:()=>Fr,_cidrv6:()=>Mr,_coercedBigint:()=>rc,_coercedBoolean:()=>tc,_coercedDate:()=>fc,_coercedNumber:()=>Ws,_coercedString:()=>Fs,_cuid:()=>Cr,_cuid2:()=>Rr,_custom:()=>vc,_date:()=>pc,_decode:()=>tr,_decodeAsync:()=>rr,_default:()=>vy,_discriminatedUnion:()=>ay,_e164:()=>Br,_email:()=>Er,_emoji:()=>Pr,_encode:()=>er,_encodeAsync:()=>nr,_endsWith:()=>yt,_enum:()=>my,_file:()=>_c,_float32:()=>Js,_float64:()=>Ys,_gt:()=>be,_gte:()=>J,_guid:()=>_n,_includes:()=>vt,_int:()=>qs,_int32:()=>Xs,_int64:()=>ic,_intersection:()=>sy,_ipv4:()=>jr,_ipv6:()=>Lr,_isoDate:()=>Bs,_isoDateTime:()=>Vs,_isoDuration:()=>Gs,_isoTime:()=>Hs,_jwt:()=>Hr,_ksuid:()=>Ur,_lazy:()=>Iy,_length:()=>Ye,_literal:()=>fy,_lowercase:()=>ht,_lt:()=>ve,_lte:()=>re,_mac:()=>Ms,_map:()=>ly,_max:()=>re,_maxLength:()=>Je,_maxSize:()=>Ue,_mime:()=>xt,_min:()=>J,_minLength:()=>we,_minSize:()=>ye,_multipleOf:()=>ze,_nan:()=>gc,_nanoid:()=>Nr,_nativeEnum:()=>py,_negative:()=>Kr,_never:()=>dc,_nonnegative:()=>qr,_nonoptional:()=>by,_nonpositive:()=>Wr,_normalize:()=>kt,_null:()=>cc,_nullable:()=>_y,_number:()=>Ks,_optional:()=>hy,_overwrite:()=>de,_parse:()=>ut,_parseAsync:()=>lt,_pipe:()=>ky,_positive:()=>Gr,_promise:()=>Ey,_property:()=>Jr,_readonly:()=>Sy,_record:()=>uy,_refine:()=>bc,_regex:()=>gt,_safeDecode:()=>or,_safeDecodeAsync:()=>sr,_safeEncode:()=>ir,_safeEncodeAsync:()=>ar,_safeParse:()=>dt,_safeParseAsync:()=>mt,_set:()=>dy,_size:()=>qe,_slugify:()=>Et,_startsWith:()=>bt,_string:()=>Ls,_stringFormat:()=>wt,_stringbool:()=>Sc,_success:()=>yy,_superRefine:()=>yc,_symbol:()=>ac,_templateLiteral:()=>$y,_toLowerCase:()=>$t,_toUpperCase:()=>It,_transform:()=>gy,_trim:()=>St,_tuple:()=>cy,_uint32:()=>Qs,_uint64:()=>oc,_ulid:()=>Dr,_undefined:()=>sc,_union:()=>iy,_unknown:()=>lc,_uppercase:()=>_t,_url:()=>vn,_uuid:()=>wr,_uuidv4:()=>Or,_uuidv6:()=>Tr,_uuidv7:()=>Ar,_void:()=>mc,_xid:()=>zr,_xor:()=>oy,clone:()=>W,config:()=>M,createStandardJSONSchemaMethod:()=>Ot,createToJSONSchemaMethod:()=>$c,decode:()=>Ev,decodeAsync:()=>Ov,describe:()=>xc,encode:()=>Iv,encodeAsync:()=>wv,extractDefs:()=>Le,finalize:()=>Fe,flattenError:()=>sn,formatError:()=>cn,globalConfig:()=>He,globalRegistry:()=>H,initializeContext:()=>je,isValidBase64:()=>Wa,isValidBase64URL:()=>hm,isValidJWT:()=>_m,locales:()=>hn,meta:()=>kc,parse:()=>Xn,parseAsync:()=>Qn,prettifyError:()=>Ao,process:()=>N,regexes:()=>ne,registry:()=>Ir,safeDecode:()=>Av,safeDecodeAsync:()=>Nv,safeEncode:()=>Tv,safeEncodeAsync:()=>Pv,safeParse:()=>Po,safeParseAsync:()=>No,toDotPath:()=>qd,toJSONSchema:()=>ei,treeifyError:()=>To,util:()=>b,version:()=>Ea});var Bd,ho=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 _o=Symbol("zod_brand"),le=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Pe=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(Bd=globalThis).__zod_globalConfig??(Bd.__zod_globalConfig={});var He=globalThis.__zod_globalConfig;function M(e){return e&&Object.assign(He,e),He}var b={};Se(b,{BIGINT_FORMAT_RANGES:()=>wo,Class:()=>bo,NUMBER_FORMAT_RANGES:()=>Eo,aborted:()=>De,allowsEval:()=>ko,assert:()=>rv,assertEqual:()=>Q_,assertIs:()=>tv,assertNever:()=>nv,assertNotEqual:()=>ev,assignProp:()=>Ce,base64ToUint8Array:()=>Gd,base64urlToUint8Array:()=>yv,cached:()=>st,captureStackTrace:()=>Yn,cleanEnum:()=>bv,cleanRegex:()=>tn,clone:()=>W,cloneDef:()=>ov,createTransparentProxy:()=>dv,defineLazy:()=>E,esc:()=>Jn,escapeRegex:()=>se,explicitlyAborted:()=>Oo,extend:()=>fv,finalizeIssue:()=>q,floatSafeRemainder:()=>yo,getElementAtPath:()=>av,getEnumValues:()=>en,getLengthableOrigin:()=>on,getParsedType:()=>lv,getSizableOrigin:()=>rn,hexToUint8Array:()=>kv,isObject:()=>Ge,isPlainObject:()=>Re,issue:()=>ct,joinValues:()=>f,jsonStringifyReplacer:()=>at,merge:()=>hv,mergeDefs:()=>Ee,normalizeParams:()=>y,nullish:()=>Ne,numKeys:()=>uv,objectClone:()=>iv,omit:()=>pv,optionalKeys:()=>Io,parsedType:()=>v,partial:()=>_v,pick:()=>mv,prefixIssues:()=>X,primitiveTypes:()=>$o,promiseAllObject:()=>sv,propertyKeyTypes:()=>nn,randomString:()=>cv,required:()=>vv,safeExtend:()=>gv,shallowClone:()=>So,slugify:()=>xo,stringifyPrimitive:()=>_,uint8ArrayToBase64:()=>Kd,uint8ArrayToBase64url:()=>xv,uint8ArrayToHex:()=>Sv,unwrapMessage:()=>Qt});function Q_(e){return e}function ev(e){return e}function tv(e){}function nv(e){throw new Error("Unexpected value in exhaustive check")}function rv(e){}function en(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 at(e,t){return typeof t=="bigint"?t.toString():t}function st(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function Ne(e){return e==null}function tn(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function yo(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 Hd=Symbol("evaluating");function E(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==Hd)return o===void 0&&(o=Hd,o=r()),o},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function iv(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Ce(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Ee(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o)}return Object.defineProperties({},t)}function ov(e){return Ee(e._zod.def)}function av(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function sv(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 cv(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function Jn(e){return JSON.stringify(e)}function xo(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Yn="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ge(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var ko=st(()=>{if(He.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Re(e){if(Ge(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Ge(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function So(e){return Re(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function uv(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var lv=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}`)}},nn=new Set(["string","number","symbol"]),$o=new Set(["string","number","bigint","boolean","symbol","undefined"]);function se(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function W(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 dv(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 Io(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var Eo={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]},wo={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function mv(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=Ee(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 Ce(this,"shape",s),s},checks:[]});return W(e,i)}function pv(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=Ee(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 Ce(this,"shape",s),s},checks:[]});return W(e,i)}function fv(e,t){if(!Re(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=Ee(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Ce(this,"shape",i),i}});return W(e,n)}function gv(e,t){if(!Re(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=Ee(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Ce(this,"shape",o),o}});return W(e,r)}function hv(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=Ee(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return Ce(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return W(e,r)}function _v(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=Ee(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 Ce(this,"shape",u),u},checks:[]});return W(t,s)}function vv(e,t,r){let o=Ee(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 Ce(this,"shape",i),i}});return W(t,o)}function De(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 Oo(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 X(e,t){return t.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function Qt(e){return typeof e=="string"?e:e?.message}function q(e,t,r){let o=e.message?e.message:Qt(e.inst?._zod.def?.error?.(e))??Qt(t?.error?.(e))??Qt(r.customError?.(e))??Qt(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 rn(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function on(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 ct(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function bv(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Gd(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 Kd(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function yv(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return Gd(t+r)}function xv(e){return Kd(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function kv(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 Sv(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var bo=class{constructor(...t){}};var Wd=(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,at,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},an=p("$ZodError",Wd),Q=p("$ZodError",Wd,{Parent:Error});function sn(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 cn(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 To(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 qd(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 Ao(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 ${qd(o.path)}`);return t.join(`
34
- `)}var ut=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 le;if(s.issues.length){let c=new(n?.Err??e)(s.issues.map(u=>q(u,i,M())));throw Yn(c,n?.callee),c}return s.value},Xn=ut(Q),lt=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=>q(u,i,M())));throw Yn(c,n?.callee),c}return s.value},Qn=lt(Q),dt=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 le;return i.issues.length?{success:!1,error:new(e??an)(i.issues.map(s=>q(s,n,M())))}:{success:!0,data:i.value}},Po=dt(Q),mt=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=>q(s,n,M())))}:{success:!0,data:i.value}},No=mt(Q),er=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return ut(e)(t,r,n)},Iv=er(Q),tr=e=>(t,r,o)=>ut(e)(t,r,o),Ev=tr(Q),nr=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return lt(e)(t,r,n)},wv=nr(Q),rr=e=>async(t,r,o)=>lt(e)(t,r,o),Ov=rr(Q),ir=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return dt(e)(t,r,n)},Tv=ir(Q),or=e=>(t,r,o)=>dt(e)(t,r,o),Av=or(Q),ar=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return mt(e)(t,r,n)},Pv=ar(Q),sr=e=>async(t,r,o)=>mt(e)(t,r,o),Nv=sr(Q);var ne={};Se(ne,{base64:()=>Wo,base64url:()=>cr,bigint:()=>ta,boolean:()=>ra,browserEmail:()=>Fv,cidrv4:()=>Go,cidrv6:()=>Ko,cuid:()=>Co,cuid2:()=>Ro,date:()=>Yo,datetime:()=>Qo,domain:()=>Vv,duration:()=>Lo,e164:()=>Jo,email:()=>Mo,emoji:()=>Zo,extendedDuration:()=>Cv,guid:()=>Fo,hex:()=>Bv,hostname:()=>Zv,html5Email:()=>Uv,httpProtocol:()=>qo,idnEmail:()=>Lv,integer:()=>na,ipv4:()=>Vo,ipv6:()=>Bo,ksuid:()=>Uo,lowercase:()=>aa,mac:()=>Ho,md5_base64:()=>Gv,md5_base64url:()=>Kv,md5_hex:()=>Hv,nanoid:()=>jo,null:()=>ia,number:()=>ur,rfc5322Email:()=>jv,sha1_base64:()=>qv,sha1_base64url:()=>Jv,sha1_hex:()=>Wv,sha256_base64:()=>Xv,sha256_base64url:()=>Qv,sha256_hex:()=>Yv,sha384_base64:()=>tb,sha384_base64url:()=>nb,sha384_hex:()=>eb,sha512_base64:()=>ib,sha512_base64url:()=>ob,sha512_hex:()=>rb,string:()=>ea,time:()=>Xo,ulid:()=>Do,undefined:()=>oa,unicodeEmail:()=>Jd,uppercase:()=>sa,uuid:()=>Ke,uuid4:()=>Rv,uuid6:()=>Dv,uuid7:()=>zv,xid:()=>zo});var Co=/^[cC][0-9a-z]{6,}$/,Ro=/^[0-9a-z]+$/,Do=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,zo=/^[0-9a-vA-V]{20}$/,Uo=/^[A-Za-z0-9]{27}$/,jo=/^[a-zA-Z0-9_-]{21}$/,Lo=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Cv=/^[-+]?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)?)??$/,Fo=/^([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})$/,Ke=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)$/,Rv=Ke(4),Dv=Ke(6),zv=Ke(7),Mo=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Uv=/^[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])?)*$/,jv=/^(([^<>()\[\]\\.,;:\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,}))$/,Jd=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Lv=Jd,Fv=/^[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])?)*$/,Mv="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Zo(){return new RegExp(Mv,"u")}var Vo=/^(?:(?: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])$/,Bo=/^(([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}|:))$/,Ho=e=>{let t=se(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){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])$/,Ko=/^(([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])$/,Wo=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,cr=/^[A-Za-z0-9_-]*$/,Zv=/^(?=.{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])?)*\.?$/,Vv=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,qo=/^https?$/,Jo=/^\+[1-9]\d{6,14}$/,Yd="(?:(?:\\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])))",Yo=new RegExp(`^${Yd}$`);function Xd(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 Xo(e){return new RegExp(`^${Xd(e)}$`)}function Qo(e){let t=Xd({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(`^${Yd}T(?:${o})$`)}var ea=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},ta=/^-?\d+n?$/,na=/^-?\d+$/,ur=/^-?\d+(?:\.\d+)?$/,ra=/^(?:true|false)$/i,ia=/^null$/i;var oa=/^undefined$/i;var aa=/^[^A-Z]*$/,sa=/^[^a-z]*$/,Bv=/^[0-9a-fA-F]*$/;function un(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function ln(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Hv=/^[0-9a-fA-F]{32}$/,Gv=un(22,"=="),Kv=ln(22),Wv=/^[0-9a-fA-F]{40}$/,qv=un(27,"="),Jv=ln(27),Yv=/^[0-9a-fA-F]{64}$/,Xv=un(43,"="),Qv=ln(43),eb=/^[0-9a-fA-F]{96}$/,tb=un(64,""),nb=ln(64),rb=/^[0-9a-fA-F]{128}$/,ib=un(86,"=="),ob=ln(86);var U=p("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),em={number:"number",bigint:"bigint",object:"date"},lr=p("$ZodCheckLessThan",(e,t)=>{U.init(e,t);let r=em[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})}}),dr=p("$ZodCheckGreaterThan",(e,t)=>{U.init(e,t);let r=em[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})}}),ca=p("$ZodCheckMultipleOf",(e,t)=>{U.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):yo(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})}}),ua=p("$ZodCheckNumberFormat",(e,t)=>{U.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),o=r?"int":"number",[n,i]=Eo[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=na)}),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})}}),la=p("$ZodCheckBigIntFormat",(e,t)=>{U.init(e,t);let[r,o]=wo[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})}}),da=p("$ZodCheckMaxSize",(e,t)=>{var r;U.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Ne(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:rn(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),ma=p("$ZodCheckMinSize",(e,t)=>{var r;U.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Ne(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:rn(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),pa=p("$ZodCheckSizeEquals",(e,t)=>{var r;U.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Ne(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:rn(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})}}),fa=p("$ZodCheckMaxLength",(e,t)=>{var r;U.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Ne(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=on(n);o.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),ga=p("$ZodCheckMinLength",(e,t)=>{var r;U.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Ne(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=on(n);o.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),ha=p("$ZodCheckLengthEquals",(e,t)=>{var r;U.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Ne(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=on(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})}}),pt=p("$ZodCheckStringFormat",(e,t)=>{var r,o;U.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=()=>{})}),_a=p("$ZodCheckRegex",(e,t)=>{pt.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})}}),va=p("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=aa),pt.init(e,t)}),ba=p("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=sa),pt.init(e,t)}),ya=p("$ZodCheckIncludes",(e,t)=>{U.init(e,t);let r=se(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})}}),xa=p("$ZodCheckStartsWith",(e,t)=>{U.init(e,t);let r=new RegExp(`^${se(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})}}),ka=p("$ZodCheckEndsWith",(e,t)=>{U.init(e,t);let r=new RegExp(`.*${se(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 Qd(e,t,r){e.issues.length&&t.issues.push(...X(r,e.issues))}var Sa=p("$ZodCheckProperty",(e,t)=>{U.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=>Qd(n,r,t.property));Qd(o,r,t.property)}}),$a=p("$ZodCheckMimeType",(e,t)=>{U.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})}}),Ia=p("$ZodCheckOverwrite",(e,t)=>{U.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var dn=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 Ea={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=Ea;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=De(s),d;for(let m of c){if(m._zod.def.when){if(Oo(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 le;if(d||h instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await h,s.issues.length!==g&&(l||(l=De(s,g)))});else{if(s.issues.length===g)continue;l||(l=De(s,g))}}return d?d.then(()=>s):s},i=(s,c,u)=>{if(De(s))return s.aborted=!0,s;let l=n(c,o,u);if(l instanceof Promise){if(u.async===!1)throw new le;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 le;return u.then(l=>n(l,o,c))}return n(u,o,c)}}E(e,"~standard",()=>({validate:n=>{try{let i=Po(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return No(e,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),We=p("$ZodString",(e,t)=>{$.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ea(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)=>{pt.init(e,t),We.init(e,t)}),Oa=p("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Fo),R.init(e,t)}),Ta=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=Ke(o))}else t.pattern??(t.pattern=Ke());R.init(e,t)}),Aa=p("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Mo),R.init(e,t)}),Pa=p("$ZodURL",(e,t)=>{R.init(e,t),e._zod.check=r=>{try{let o=r.value.trim();if(!t.normalize&&t.protocol?.source===qo.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})}}}),Na=p("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Zo()),R.init(e,t)}),Ca=p("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=jo),R.init(e,t)}),Ra=p("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Co),R.init(e,t)}),Da=p("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ro),R.init(e,t)}),za=p("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Do),R.init(e,t)}),Ua=p("$ZodXID",(e,t)=>{t.pattern??(t.pattern=zo),R.init(e,t)}),ja=p("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Uo),R.init(e,t)}),La=p("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Qo(t)),R.init(e,t)}),Fa=p("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Yo),R.init(e,t)}),Ma=p("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Xo(t)),R.init(e,t)}),Za=p("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Lo),R.init(e,t)}),Va=p("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Vo),R.init(e,t),e._zod.bag.format="ipv4"}),Ba=p("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Bo),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})}}}),Ha=p("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Ho(t.delimiter)),R.init(e,t),e._zod.bag.format="mac"}),Ga=p("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Go),R.init(e,t)}),Ka=p("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Ko),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 Wa(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var qa=p("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Wo),R.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Wa(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function hm(e){if(!cr.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Wa(r)}var Ja=p("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=cr),R.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{hm(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Ya=p("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Jo),R.init(e,t)});function _m(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 Xa=p("$ZodJWT",(e,t)=>{R.init(e,t),e._zod.check=r=>{_m(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Qa=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})}}),hr=p("$ZodNumber",(e,t)=>{$.init(e,t),e._zod.pattern=e._zod.bag.pattern??ur,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}}),es=p("$ZodNumberFormat",(e,t)=>{ua.init(e,t),hr.init(e,t)}),mn=p("$ZodBoolean",(e,t)=>{$.init(e,t),e._zod.pattern=ra,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}}),_r=p("$ZodBigInt",(e,t)=>{$.init(e,t),e._zod.pattern=ta,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}}),ts=p("$ZodBigIntFormat",(e,t)=>{la.init(e,t),_r.init(e,t)}),ns=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}}),rs=p("$ZodUndefined",(e,t)=>{$.init(e,t),e._zod.pattern=oa,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}}),is=p("$ZodNull",(e,t)=>{$.init(e,t),e._zod.pattern=ia,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}}),os=p("$ZodAny",(e,t)=>{$.init(e,t),e._zod.parse=r=>r}),as=p("$ZodUnknown",(e,t)=>{$.init(e,t),e._zod.parse=r=>r}),ss=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)}),cs=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}}),us=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 nm(e,t,r){e.issues.length&&t.issues.push(...X(r,e.issues)),t.value[r]=e.value}var ls=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=>nm(l,r,s))):nm(u,r,s)}return i.length?Promise.all(i).then(()=>r):r}});function gr(e,t,r,o,n,i){let s=r in o;if(e.issues.length){if(n&&i&&!s)return;t.issues.push(...X(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 vm(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=Io(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function bm(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=>gr(S,r,g,t,d,m))):gr(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 ym=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=st(()=>vm(t));E(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=Ge,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",P=h._zod.run({value:l[g],issues:[]},u);P instanceof Promise?d.push(P.then(nt=>gr(nt,c,g,l,S,C))):gr(P,c,g,l,S,C)}return i?bm(d,l,c,u,o.value,e):d.length?Promise.all(d).then(()=>c):c}}),ds=p("$ZodObjectJIT",(e,t)=>{ym.init(e,t);let r=e._zod.parse,o=st(()=>vm(t)),n=g=>{let h=new dn(["shape","payload","ctx"]),S=o.value,C=_e=>{let F=Jn(_e);return`shape[${F}]._zod.run({ value: input[${F}], issues: [] }, ctx)`};h.write("const input = payload.value;");let P=Object.create(null),nt=0;for(let _e of S.keys)P[_e]=`key_${nt++}`;h.write("const newResult = {};");for(let _e of S.keys){let F=P[_e],B=Jn(_e),nd=g[_e],rd=nd?._zod?.optin==="optional",d_=nd?._zod?.optout==="optional";h.write(`const ${F} = ${C(_e)};`),rd&&d_?h.write(`
31
+ `)+r,n=o+1,o=t.indexOf(`
32
+ `,n)}while(o!==-1);return i+=t.slice(n),i}var{stdout:Jd,stderr:Yd}=Gd,wo=Symbol("GENERATOR"),st=Symbol("STYLER"),nn=Symbol("IS_EMPTY"),Xd=["ansi","ansi","ansi256","ansi16m"],ct=Object.create(null),_v=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Jd?Jd.level:0;t.level=e.level===void 0?r:e.level};var vv=t=>{let e=(...r)=>r.join(" ");return _v(e,t),Object.setPrototypeOf(e,rn.prototype),e};function rn(t){return vv(t)}Object.setPrototypeOf(rn.prototype,Function.prototype);for(let[t,e]of Object.entries(le))ct[t]={get(){let r=ir(this,To(e.open,e.close,this[st]),this[nn]);return Object.defineProperty(this,t,{value:r}),r}};ct.visible={get(){let t=ir(this,this[st],!0);return Object.defineProperty(this,"visible",{value:t}),t}};var Oo=(t,e,r,...o)=>t==="rgb"?e==="ansi16m"?le[r].ansi16m(...o):e==="ansi256"?le[r].ansi256(le.rgbToAnsi256(...o)):le[r].ansi(le.rgbToAnsi(...o)):t==="hex"?Oo("rgb",e,r,...le.hexToRgb(...o)):le[r][t](...o),bv=["rgb","hex","ansi256"];for(let t of bv){ct[t]={get(){let{level:r}=this;return function(...o){let n=To(Oo(t,Xd[r],"color",...o),le.color.close,this[st]);return ir(this,n,this[nn])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);ct[e]={get(){let{level:r}=this;return function(...o){let n=To(Oo(t,Xd[r],"bgColor",...o),le.bgColor.close,this[st]);return ir(this,n,this[nn])}}}}var yv=Object.defineProperties(()=>{},{...ct,level:{enumerable:!0,get(){return this[wo].level},set(t){this[wo].level=t}}}),To=(t,e,r)=>{let o,n;return r===void 0?(o=t,n=e):(o=r.openAll+t,n=e+r.closeAll),{open:t,close:e,openAll:o,closeAll:n,parent:r}},ir=(t,e,r)=>{let o=(...n)=>kv(o,n.length===1?""+n[0]:n.join(" "));return Object.setPrototypeOf(o,yv),o[wo]=t,o[st]=e,o[nn]=r,o},kv=(t,e)=>{if(t.level<=0||!e)return t[nn]?"":e;let r=t[st];if(r===void 0)return e;let{openAll:o,closeAll:n}=r;if(e.includes("\x1B"))for(;r!==void 0;)e=Wd(e,r.close,r.open),r=r.parent;let i=e.indexOf(`
33
+ `);return i!==-1&&(e=qd(e,n,o,i)),o+e+n};Object.defineProperties(rn.prototype,ct);var xv=rn(),NE=rn({level:Yd?Yd.level:0});var R=xv;var Qd;function em(t){Qd=ar(t)}function de(){return Qd??ar(void 0)}function on(){return de()==="json"}function tm(t){on()||console.log(R.green(`\u2713 ${t}`))}function nm(t){on()||console.error(R.red(`\u2717 ${t}`))}function or(t){on()||console.warn(R.yellow(`\u26A0 ${t}`))}function G(t){on()||console.log(R.dim(t))}function rm(t){on()||console.log(R.bold(t))}function an(){return process.stdout.isTTY===!0}function ar(t){return t==="json"||t==="table"?t:an()?"table":"json"}var a={};Ie(a,{$brand:()=>Co,$input:()=>Xs,$output:()=>Ys,NEVER:()=>Ao,TimePrecision:()=>nc,ZodAny:()=>Hu,ZodArray:()=>qu,ZodBase64:()=>Ni,ZodBase64URL:()=>Ri,ZodBigInt:()=>Lt,ZodBigIntFormat:()=>zi,ZodBoolean:()=>jt,ZodCIDRv4:()=>Ci,ZodCIDRv6:()=>Pi,ZodCUID:()=>$i,ZodCUID2:()=>Ii,ZodCatch:()=>_l,ZodCodec:()=>jn,ZodCustom:()=>Ln,ZodCustomStringFormat:()=>Ut,ZodDate:()=>Nn,ZodDefault:()=>dl,ZodDiscriminatedUnion:()=>Yu,ZodE164:()=>Di,ZodEmail:()=>ki,ZodEmoji:()=>xi,ZodEnum:()=>Rt,ZodError:()=>Qy,ZodExactOptional:()=>cl,ZodFile:()=>al,ZodFirstPartyTypeKind:()=>Al,ZodFunction:()=>wl,ZodGUID:()=>On,ZodIPv4:()=>Ti,ZodIPv6:()=>Ai,ZodISODate:()=>gi,ZodISODateTime:()=>fi,ZodISODuration:()=>_i,ZodISOTime:()=>hi,ZodIntersection:()=>Xu,ZodIssueCode:()=>tk,ZodJWT:()=>Ui,ZodKSUID:()=>Oi,ZodLazy:()=>$l,ZodLiteral:()=>ol,ZodMAC:()=>ju,ZodMap:()=>rl,ZodNaN:()=>bl,ZodNanoID:()=>Si,ZodNever:()=>Gu,ZodNonOptional:()=>Vi,ZodNull:()=>Vu,ZodNullable:()=>ll,ZodNumber:()=>zt,ZodNumberFormat:()=>tt,ZodObject:()=>Dn,ZodOptional:()=>Zi,ZodPipe:()=>zn,ZodPrefault:()=>pl,ZodPreprocess:()=>yl,ZodPromise:()=>El,ZodReadonly:()=>kl,ZodRealError:()=>re,ZodRecord:()=>Nt,ZodSet:()=>il,ZodString:()=>Dt,ZodStringFormat:()=>U,ZodSuccess:()=>hl,ZodSymbol:()=>Mu,ZodTemplateLiteral:()=>Sl,ZodTransform:()=>sl,ZodTuple:()=>el,ZodType:()=>I,ZodULID:()=>Ei,ZodURL:()=>Pn,ZodUUID:()=>Se,ZodUndefined:()=>Zu,ZodUnion:()=>Un,ZodUnknown:()=>Ku,ZodVoid:()=>Wu,ZodXID:()=>wi,ZodXor:()=>Ju,_ZodString:()=>yi,_default:()=>ml,_function:()=>Kf,any:()=>Sf,array:()=>Rn,base64:()=>af,base64url:()=>sf,bigint:()=>vf,boolean:()=>Fu,catch:()=>vl,check:()=>Gf,cidrv4:()=>rf,cidrv6:()=>of,clone:()=>q,codec:()=>Zf,coerce:()=>Cl,config:()=>M,core:()=>Te,cuid:()=>qp,cuid2:()=>Jp,custom:()=>Wf,date:()=>If,decode:()=>Cu,decodeAsync:()=>Nu,describe:()=>qf,discriminatedUnion:()=>Cf,e164:()=>cf,email:()=>Lp,emoji:()=>Gp,encode:()=>Au,encodeAsync:()=>Pu,endsWith:()=>St,enum:()=>Fi,exactOptional:()=>ul,file:()=>jf,flattenError:()=>fn,float32:()=>ff,float64:()=>gf,formatError:()=>gn,fromJSONSchema:()=>ng,function:()=>Kf,getErrorMap:()=>rk,globalRegistry:()=>K,gt:()=>ke,gte:()=>Y,guid:()=>Fp,hash:()=>pf,hex:()=>mf,hostname:()=>df,httpUrl:()=>Kp,includes:()=>kt,instanceof:()=>Yf,int:()=>vi,int32:()=>hf,int64:()=>bf,intersection:()=>Qu,invertCodec:()=>Vf,ipv4:()=>ef,ipv6:()=>nf,iso:()=>Pt,json:()=>Qf,jwt:()=>uf,keyof:()=>Ef,ksuid:()=>Qp,lazy:()=>Il,length:()=>Qe,literal:()=>zf,locales:()=>Sn,looseObject:()=>Tf,looseRecord:()=>Nf,lowercase:()=>bt,lt:()=>ye,lte:()=>ae,mac:()=>tf,map:()=>Rf,maxLength:()=>Xe,maxSize:()=>Fe,meta:()=>Jf,mime:()=>$t,minLength:()=>Oe,minSize:()=>xe,multipleOf:()=>Le,nan:()=>Mf,nanoid:()=>Wp,nativeEnum:()=>Uf,negative:()=>ii,never:()=>ji,nonnegative:()=>ai,nonoptional:()=>gl,nonpositive:()=>oi,normalize:()=>It,null:()=>Bu,nullable:()=>An,nullish:()=>Lf,number:()=>Lu,object:()=>wf,optional:()=>Tn,overwrite:()=>pe,parse:()=>Eu,parseAsync:()=>wu,partialRecord:()=>Pf,pipe:()=>bi,positive:()=>ri,prefault:()=>fl,preprocess:()=>eg,prettifyError:()=>Bo,promise:()=>Hf,property:()=>si,readonly:()=>xl,record:()=>nl,refine:()=>Ol,regex:()=>vt,regexes:()=>oe,registry:()=>Ur,safeDecode:()=>Du,safeDecodeAsync:()=>zu,safeEncode:()=>Ru,safeEncodeAsync:()=>Uu,safeParse:()=>Ou,safeParseAsync:()=>Tu,set:()=>Df,setErrorMap:()=>nk,size:()=>Ye,slugify:()=>Tt,startsWith:()=>xt,strictObject:()=>Of,string:()=>wn,stringFormat:()=>lf,stringbool:()=>Xf,success:()=>Ff,superRefine:()=>Tl,symbol:()=>kf,templateLiteral:()=>Bf,toJSONSchema:()=>di,toLowerCase:()=>wt,toUpperCase:()=>Ot,transform:()=>Mi,treeifyError:()=>Vo,trim:()=>Et,tuple:()=>tl,uint32:()=>_f,uint64:()=>yf,ulid:()=>Yp,undefined:()=>xf,union:()=>Li,unknown:()=>et,uppercase:()=>yt,url:()=>Hp,util:()=>b,uuid:()=>Mp,uuidv4:()=>Zp,uuidv6:()=>Vp,uuidv7:()=>Bp,void:()=>$f,xid:()=>Xp,xor:()=>Af});var Te={};Ie(Te,{$ZodAny:()=>bs,$ZodArray:()=>$s,$ZodAsyncError:()=>me,$ZodBase64:()=>us,$ZodBase64URL:()=>ls,$ZodBigInt:()=>Or,$ZodBigIntFormat:()=>gs,$ZodBoolean:()=>bn,$ZodCIDRv4:()=>as,$ZodCIDRv6:()=>ss,$ZodCUID:()=>Wa,$ZodCUID2:()=>qa,$ZodCatch:()=>Zs,$ZodCheck:()=>z,$ZodCheckBigIntFormat:()=>$a,$ZodCheckEndsWith:()=>Ua,$ZodCheckGreaterThan:()=>xr,$ZodCheckIncludes:()=>Ra,$ZodCheckLengthEquals:()=>Aa,$ZodCheckLessThan:()=>kr,$ZodCheckLowerCase:()=>Pa,$ZodCheckMaxLength:()=>Oa,$ZodCheckMaxSize:()=>Ia,$ZodCheckMimeType:()=>ja,$ZodCheckMinLength:()=>Ta,$ZodCheckMinSize:()=>Ea,$ZodCheckMultipleOf:()=>xa,$ZodCheckNumberFormat:()=>Sa,$ZodCheckOverwrite:()=>La,$ZodCheckProperty:()=>za,$ZodCheckRegex:()=>Ca,$ZodCheckSizeEquals:()=>wa,$ZodCheckStartsWith:()=>Da,$ZodCheckStringFormat:()=>ht,$ZodCheckUpperCase:()=>Na,$ZodCodec:()=>kn,$ZodCustom:()=>Js,$ZodCustomStringFormat:()=>ps,$ZodDate:()=>Ss,$ZodDefault:()=>js,$ZodDiscriminatedUnion:()=>ws,$ZodE164:()=>ds,$ZodEmail:()=>Ba,$ZodEmoji:()=>Ka,$ZodEncodeError:()=>Re,$ZodEnum:()=>Ps,$ZodError:()=>pn,$ZodExactOptional:()=>Us,$ZodFile:()=>Rs,$ZodFunction:()=>Gs,$ZodGUID:()=>Za,$ZodIPv4:()=>rs,$ZodIPv6:()=>is,$ZodISODate:()=>es,$ZodISODateTime:()=>Qa,$ZodISODuration:()=>ns,$ZodISOTime:()=>ts,$ZodIntersection:()=>Os,$ZodJWT:()=>ms,$ZodKSUID:()=>Xa,$ZodLazy:()=>qs,$ZodLiteral:()=>Ns,$ZodMAC:()=>os,$ZodMap:()=>As,$ZodNaN:()=>Vs,$ZodNanoID:()=>Ga,$ZodNever:()=>ks,$ZodNonOptional:()=>Fs,$ZodNull:()=>vs,$ZodNullable:()=>zs,$ZodNumber:()=>wr,$ZodNumberFormat:()=>fs,$ZodObject:()=>Rm,$ZodObjectJIT:()=>Is,$ZodOptional:()=>Ar,$ZodPipe:()=>Cr,$ZodPrefault:()=>Ls,$ZodPreprocess:()=>Bs,$ZodPromise:()=>Ws,$ZodReadonly:()=>Hs,$ZodRealError:()=>ne,$ZodRecord:()=>Ts,$ZodRegistry:()=>Dr,$ZodSet:()=>Cs,$ZodString:()=>Je,$ZodStringFormat:()=>D,$ZodSuccess:()=>Ms,$ZodSymbol:()=>hs,$ZodTemplateLiteral:()=>Ks,$ZodTransform:()=>Ds,$ZodTuple:()=>Tr,$ZodType:()=>$,$ZodULID:()=>Ja,$ZodURL:()=>Ha,$ZodUUID:()=>Va,$ZodUndefined:()=>_s,$ZodUnion:()=>yn,$ZodUnknown:()=>ys,$ZodVoid:()=>xs,$ZodXID:()=>Ya,$ZodXor:()=>Es,$brand:()=>Co,$constructor:()=>p,$input:()=>Xs,$output:()=>Ys,Doc:()=>vn,JSONSchema:()=>Up,JSONSchemaGenerator:()=>mi,NEVER:()=>Ao,TimePrecision:()=>nc,_any:()=>Sc,_array:()=>Ac,_base64:()=>Qr,_base64url:()=>ei,_bigint:()=>hc,_boolean:()=>fc,_catch:()=>Hy,_check:()=>Dp,_cidrv4:()=>Yr,_cidrv6:()=>Xr,_coercedBigint:()=>_c,_coercedBoolean:()=>gc,_coercedDate:()=>Oc,_coercedNumber:()=>cc,_coercedString:()=>ec,_cuid:()=>Br,_cuid2:()=>Hr,_custom:()=>Pc,_date:()=>wc,_decode:()=>mr,_decodeAsync:()=>fr,_default:()=>Zy,_discriminatedUnion:()=>Ay,_e164:()=>ti,_email:()=>zr,_emoji:()=>Zr,_encode:()=>dr,_encodeAsync:()=>pr,_endsWith:()=>St,_enum:()=>Uy,_file:()=>Cc,_float32:()=>lc,_float64:()=>dc,_gt:()=>ke,_gte:()=>Y,_guid:()=>$n,_includes:()=>kt,_int:()=>uc,_int32:()=>mc,_int64:()=>vc,_intersection:()=>Cy,_ipv4:()=>qr,_ipv6:()=>Jr,_isoDate:()=>ic,_isoDateTime:()=>rc,_isoDuration:()=>ac,_isoTime:()=>oc,_jwt:()=>ni,_ksuid:()=>Wr,_lazy:()=>qy,_length:()=>Qe,_literal:()=>jy,_lowercase:()=>bt,_lt:()=>ye,_lte:()=>ae,_mac:()=>tc,_map:()=>Ry,_max:()=>ae,_maxLength:()=>Xe,_maxSize:()=>Fe,_mime:()=>$t,_min:()=>Y,_minLength:()=>Oe,_minSize:()=>xe,_multipleOf:()=>Le,_nan:()=>Tc,_nanoid:()=>Vr,_nativeEnum:()=>zy,_negative:()=>ii,_never:()=>Ic,_nonnegative:()=>ai,_nonoptional:()=>Vy,_nonpositive:()=>oi,_normalize:()=>It,_null:()=>xc,_nullable:()=>My,_number:()=>sc,_optional:()=>Fy,_overwrite:()=>pe,_parse:()=>mt,_parseAsync:()=>pt,_pipe:()=>Ky,_positive:()=>ri,_promise:()=>Jy,_property:()=>si,_readonly:()=>Gy,_record:()=>Ny,_refine:()=>Nc,_regex:()=>vt,_safeDecode:()=>hr,_safeDecodeAsync:()=>vr,_safeEncode:()=>gr,_safeEncodeAsync:()=>_r,_safeParse:()=>ft,_safeParseAsync:()=>gt,_set:()=>Dy,_size:()=>Ye,_slugify:()=>Tt,_startsWith:()=>xt,_string:()=>Qs,_stringFormat:()=>At,_stringbool:()=>zc,_success:()=>By,_superRefine:()=>Rc,_symbol:()=>yc,_templateLiteral:()=>Wy,_toLowerCase:()=>wt,_toUpperCase:()=>Ot,_transform:()=>Ly,_trim:()=>Et,_tuple:()=>Py,_uint32:()=>pc,_uint64:()=>bc,_ulid:()=>Kr,_undefined:()=>kc,_union:()=>Oy,_unknown:()=>$c,_uppercase:()=>yt,_url:()=>In,_uuid:()=>jr,_uuidv4:()=>Lr,_uuidv6:()=>Fr,_uuidv7:()=>Mr,_void:()=>Ec,_xid:()=>Gr,_xor:()=>Ty,clone:()=>q,config:()=>M,createStandardJSONSchemaMethod:()=>Ct,createToJSONSchemaMethod:()=>jc,decode:()=>Jv,decodeAsync:()=>Xv,describe:()=>Dc,encode:()=>qv,encodeAsync:()=>Yv,extractDefs:()=>Ze,finalize:()=>Ve,flattenError:()=>fn,formatError:()=>gn,globalConfig:()=>Ge,globalRegistry:()=>K,initializeContext:()=>Me,isValidBase64:()=>cs,isValidBase64URL:()=>Am,isValidJWT:()=>Cm,locales:()=>Sn,meta:()=>Uc,parse:()=>ur,parseAsync:()=>lr,prettifyError:()=>Bo,process:()=>N,regexes:()=>oe,registry:()=>Ur,safeDecode:()=>eb,safeDecodeAsync:()=>nb,safeEncode:()=>Qv,safeEncodeAsync:()=>tb,safeParse:()=>Ho,safeParseAsync:()=>Ko,toDotPath:()=>um,toJSONSchema:()=>di,treeifyError:()=>Vo,util:()=>b,version:()=>Fa});var im,Ao=Object.freeze({status:"aborted"});function p(t,e,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(t))return;c._zod.traits.add(t),e(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:t});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(t)}),Object.defineProperty(s,"name",{value:t}),s}var Co=Symbol("zod_brand"),me=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Re=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(im=globalThis).__zod_globalConfig??(im.__zod_globalConfig={});var Ge=globalThis.__zod_globalConfig;function M(t){return t&&Object.assign(Ge,t),Ge}var b={};Ie(b,{BIGINT_FORMAT_RANGES:()=>Mo,Class:()=>No,NUMBER_FORMAT_RANGES:()=>Fo,aborted:()=>je,allowsEval:()=>Uo,assert:()=>wv,assertEqual:()=>Sv,assertIs:()=>Iv,assertNever:()=>Ev,assertNotEqual:()=>$v,assignProp:()=>Ue,base64ToUint8Array:()=>am,base64urlToUint8Array:()=>Bv,cached:()=>lt,captureStackTrace:()=>cr,cleanEnum:()=>Vv,cleanRegex:()=>un,clone:()=>q,cloneDef:()=>Tv,createTransparentProxy:()=>Dv,defineLazy:()=>E,esc:()=>sr,escapeRegex:()=>ue,explicitlyAborted:()=>Zo,extend:()=>jv,finalizeIssue:()=>J,floatSafeRemainder:()=>Ro,getElementAtPath:()=>Av,getEnumValues:()=>cn,getLengthableOrigin:()=>mn,getParsedType:()=>Rv,getSizableOrigin:()=>dn,hexToUint8Array:()=>Kv,isObject:()=>We,isPlainObject:()=>ze,issue:()=>dt,joinValues:()=>f,jsonStringifyReplacer:()=>ut,merge:()=>Fv,mergeDefs:()=>we,normalizeParams:()=>y,nullish:()=>De,numKeys:()=>Nv,objectClone:()=>Ov,omit:()=>zv,optionalKeys:()=>Lo,parsedType:()=>v,partial:()=>Mv,pick:()=>Uv,prefixIssues:()=>te,primitiveTypes:()=>jo,promiseAllObject:()=>Cv,propertyKeyTypes:()=>ln,randomString:()=>Pv,required:()=>Zv,safeExtend:()=>Lv,shallowClone:()=>zo,slugify:()=>Do,stringifyPrimitive:()=>_,uint8ArrayToBase64:()=>sm,uint8ArrayToBase64url:()=>Hv,uint8ArrayToHex:()=>Gv,unwrapMessage:()=>sn});function Sv(t){return t}function $v(t){return t}function Iv(t){}function Ev(t){throw new Error("Unexpected value in exhaustive check")}function wv(t){}function cn(t){let e=Object.values(t).filter(o=>typeof o=="number");return Object.entries(t).filter(([o,n])=>e.indexOf(+o)===-1).map(([o,n])=>n)}function f(t,e="|"){return t.map(r=>_(r)).join(e)}function ut(t,e){return typeof e=="bigint"?e.toString():e}function lt(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function De(t){return t==null}function un(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function Ro(t,e){let r=t/e,o=Math.round(r),n=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-o)<n?0:r-o}var om=Symbol("evaluating");function E(t,e,r){let o;Object.defineProperty(t,e,{get(){if(o!==om)return o===void 0&&(o=om,o=r()),o},set(n){Object.defineProperty(t,e,{value:n})},configurable:!0})}function Ov(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function Ue(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function we(...t){let e={};for(let r of t){let o=Object.getOwnPropertyDescriptors(r);Object.assign(e,o)}return Object.defineProperties({},e)}function Tv(t){return we(t._zod.def)}function Av(t,e){return e?e.reduce((r,o)=>r?.[o],t):t}function Cv(t){let e=Object.keys(t),r=e.map(o=>t[o]);return Promise.all(r).then(o=>{let n={};for(let i=0;i<e.length;i++)n[e[i]]=o[i];return n})}function Pv(t=10){let e="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<t;o++)r+=e[Math.floor(Math.random()*e.length)];return r}function sr(t){return JSON.stringify(t)}function Do(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var cr="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function We(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var Uo=lt(()=>{if(Ge.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function ze(t){if(We(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let r=e.prototype;return!(We(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function zo(t){return ze(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}function Nv(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}var Rv=t=>{let e=typeof t;switch(e){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: ${e}`)}},ln=new Set(["string","number","symbol"]),jo=new Set(["string","number","bigint","boolean","symbol","undefined"]);function ue(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function q(t,e,r){let o=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(o._zod.parent=t),o}function y(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function Dv(t){let e;return new Proxy({},{get(r,o,n){return e??(e=t()),Reflect.get(e,o,n)},set(r,o,n,i){return e??(e=t()),Reflect.set(e,o,n,i)},has(r,o){return e??(e=t()),Reflect.has(e,o)},deleteProperty(r,o){return e??(e=t()),Reflect.deleteProperty(e,o)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,o){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,o)},defineProperty(r,o,n){return e??(e=t()),Reflect.defineProperty(e,o,n)}})}function _(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function Lo(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}var Fo={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]},Mo={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Uv(t,e){let r=t._zod.def,o=r.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 s={};for(let c in e){if(!(c in r.shape))throw new Error(`Unrecognized key: "${c}"`);e[c]&&(s[c]=r.shape[c])}return Ue(this,"shape",s),s},checks:[]});return q(t,i)}function zv(t,e){let r=t._zod.def,o=r.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 s={...t._zod.def.shape};for(let c in e){if(!(c in r.shape))throw new Error(`Unrecognized key: "${c}"`);e[c]&&delete s[c]}return Ue(this,"shape",s),s},checks:[]});return q(t,i)}function jv(t,e){if(!ze(e))throw new Error("Invalid input to extend: expected a plain object");let r=t._zod.def.checks;if(r&&r.length>0){let i=t._zod.def.shape;for(let s in e)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=we(t._zod.def,{get shape(){let i={...t._zod.def.shape,...e};return Ue(this,"shape",i),i}});return q(t,n)}function Lv(t,e){if(!ze(e))throw new Error("Invalid input to safeExtend: expected a plain object");let r=we(t._zod.def,{get shape(){let o={...t._zod.def.shape,...e};return Ue(this,"shape",o),o}});return q(t,r)}function Fv(t,e){if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=we(t._zod.def,{get shape(){let o={...t._zod.def.shape,...e._zod.def.shape};return Ue(this,"shape",o),o},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return q(t,r)}function Mv(t,e,r){let n=e._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=we(e._zod.def,{get shape(){let c=e._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]=t?new t({type:"optional",innerType:c[l]}):c[l])}else for(let l in c)u[l]=t?new t({type:"optional",innerType:c[l]}):c[l];return Ue(this,"shape",u),u},checks:[]});return q(e,s)}function Zv(t,e,r){let o=we(e._zod.def,{get shape(){let n=e._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 t({type:"nonoptional",innerType:n[s]}))}else for(let s in n)i[s]=new t({type:"nonoptional",innerType:n[s]});return Ue(this,"shape",i),i}});return q(e,o)}function je(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function Zo(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue===!1)return!0;return!1}function te(t,e){return e.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(t),r})}function sn(t){return typeof t=="string"?t:t?.message}function J(t,e,r){let o=t.message?t.message:sn(t.inst?._zod.def?.error?.(t))??sn(e?.error?.(t))??sn(r.customError?.(t))??sn(r.localeError?.(t))??"Invalid input",{inst:n,continue:i,input:s,...c}=t;return c.path??(c.path=[]),c.message=o,e?.reportInput&&(c.input=s),c}function dn(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function mn(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function v(t){let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let r=t;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return e}function dt(...t){let[e,r,o]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:o}:{...e}}function Vv(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function am(t){let e=atob(t),r=new Uint8Array(e.length);for(let o=0;o<e.length;o++)r[o]=e.charCodeAt(o);return r}function sm(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function Bv(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-e.length%4)%4);return am(e+r)}function Hv(t){return sm(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Kv(t){let e=t.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(e.length/2);for(let o=0;o<e.length;o+=2)r[o/2]=Number.parseInt(e.slice(o,o+2),16);return r}function Gv(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var No=class{constructor(...e){}};var cm=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,ut,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},pn=p("$ZodError",cm),ne=p("$ZodError",cm,{Parent:Error});function fn(t,e=r=>r.message){let r={},o=[];for(let n of t.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(e(n))):o.push(e(n));return{formErrors:o,fieldErrors:r}}function gn(t,e=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(e(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(e(s))):u[d]=u[d]||{_errors:[]},u=u[d],l++}}}};return o(t),r}function Vo(t,e=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(e(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(e(u)),m++}}};return o(t),r}function um(t){let e=[],r=t.map(o=>typeof o=="object"?o.key:o);for(let o of r)typeof o=="number"?e.push(`[${o}]`):typeof o=="symbol"?e.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?e.push(`[${JSON.stringify(o)}]`):(e.length&&e.push("."),e.push(o));return e.join("")}function Bo(t){let e=[],r=[...t.issues].sort((o,n)=>(o.path??[]).length-(n.path??[]).length);for(let o of r)e.push(`\u2716 ${o.message}`),o.path?.length&&e.push(` \u2192 at ${um(o.path)}`);return e.join(`
34
+ `)}var mt=t=>(e,r,o,n)=>{let i=o?{...o,async:!1}:{async:!1},s=e._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new me;if(s.issues.length){let c=new(n?.Err??t)(s.issues.map(u=>J(u,i,M())));throw cr(c,n?.callee),c}return s.value},ur=mt(ne),pt=t=>async(e,r,o,n)=>{let i=o?{...o,async:!0}:{async:!0},s=e._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let c=new(n?.Err??t)(s.issues.map(u=>J(u,i,M())));throw cr(c,n?.callee),c}return s.value},lr=pt(ne),ft=t=>(e,r,o)=>{let n=o?{...o,async:!1}:{async:!1},i=e._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new me;return i.issues.length?{success:!1,error:new(t??pn)(i.issues.map(s=>J(s,n,M())))}:{success:!0,data:i.value}},Ho=ft(ne),gt=t=>async(e,r,o)=>{let n=o?{...o,async:!0}:{async:!0},i=e._zod.run({value:r,issues:[]},n);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new t(i.issues.map(s=>J(s,n,M())))}:{success:!0,data:i.value}},Ko=gt(ne),dr=t=>(e,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return mt(t)(e,r,n)},qv=dr(ne),mr=t=>(e,r,o)=>mt(t)(e,r,o),Jv=mr(ne),pr=t=>async(e,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return pt(t)(e,r,n)},Yv=pr(ne),fr=t=>async(e,r,o)=>pt(t)(e,r,o),Xv=fr(ne),gr=t=>(e,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return ft(t)(e,r,n)},Qv=gr(ne),hr=t=>(e,r,o)=>ft(t)(e,r,o),eb=hr(ne),_r=t=>async(e,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return gt(t)(e,r,n)},tb=_r(ne),vr=t=>async(e,r,o)=>gt(t)(e,r,o),nb=vr(ne);var oe={};Ie(oe,{base64:()=>ca,base64url:()=>br,bigint:()=>ga,boolean:()=>_a,browserEmail:()=>lb,cidrv4:()=>aa,cidrv6:()=>sa,cuid:()=>Go,cuid2:()=>Wo,date:()=>da,datetime:()=>pa,domain:()=>pb,duration:()=>Qo,e164:()=>la,email:()=>ta,emoji:()=>na,extendedDuration:()=>rb,guid:()=>ea,hex:()=>fb,hostname:()=>mb,html5Email:()=>sb,httpProtocol:()=>ua,idnEmail:()=>ub,integer:()=>ha,ipv4:()=>ra,ipv6:()=>ia,ksuid:()=>Yo,lowercase:()=>ya,mac:()=>oa,md5_base64:()=>hb,md5_base64url:()=>_b,md5_hex:()=>gb,nanoid:()=>Xo,null:()=>va,number:()=>yr,rfc5322Email:()=>cb,sha1_base64:()=>bb,sha1_base64url:()=>yb,sha1_hex:()=>vb,sha256_base64:()=>xb,sha256_base64url:()=>Sb,sha256_hex:()=>kb,sha384_base64:()=>Ib,sha384_base64url:()=>Eb,sha384_hex:()=>$b,sha512_base64:()=>Ob,sha512_base64url:()=>Tb,sha512_hex:()=>wb,string:()=>fa,time:()=>ma,ulid:()=>qo,undefined:()=>ba,unicodeEmail:()=>lm,uppercase:()=>ka,uuid:()=>qe,uuid4:()=>ib,uuid6:()=>ob,uuid7:()=>ab,xid:()=>Jo});var Go=/^[cC][0-9a-z]{6,}$/,Wo=/^[0-9a-z]+$/,qo=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Jo=/^[0-9a-vA-V]{20}$/,Yo=/^[A-Za-z0-9]{27}$/,Xo=/^[a-zA-Z0-9_-]{21}$/,Qo=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,rb=/^[-+]?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)?)??$/,ea=/^([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})$/,qe=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)$/,ib=qe(4),ob=qe(6),ab=qe(7),ta=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,sb=/^[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])?)*$/,cb=/^(([^<>()\[\]\\.,;:\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,}))$/,lm=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,ub=lm,lb=/^[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])?)*$/,db="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function na(){return new RegExp(db,"u")}var ra=/^(?:(?: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])$/,ia=/^(([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}|:))$/,oa=t=>{let e=ue(t??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)},aa=/^((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])$/,sa=/^(([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])$/,ca=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,br=/^[A-Za-z0-9_-]*$/,mb=/^(?=.{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])?)*\.?$/,pb=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,ua=/^https?$/,la=/^\+[1-9]\d{6,14}$/,dm="(?:(?:\\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])))",da=new RegExp(`^${dm}$`);function mm(t){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ma(t){return new RegExp(`^${mm(t)}$`)}function pa(t){let e=mm({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${e}(?:${r.join("|")})`;return new RegExp(`^${dm}T(?:${o})$`)}var fa=t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},ga=/^-?\d+n?$/,ha=/^-?\d+$/,yr=/^-?\d+(?:\.\d+)?$/,_a=/^(?:true|false)$/i,va=/^null$/i;var ba=/^undefined$/i;var ya=/^[^A-Z]*$/,ka=/^[^a-z]*$/,fb=/^[0-9a-fA-F]*$/;function hn(t,e){return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`)}function _n(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}var gb=/^[0-9a-fA-F]{32}$/,hb=hn(22,"=="),_b=_n(22),vb=/^[0-9a-fA-F]{40}$/,bb=hn(27,"="),yb=_n(27),kb=/^[0-9a-fA-F]{64}$/,xb=hn(43,"="),Sb=_n(43),$b=/^[0-9a-fA-F]{96}$/,Ib=hn(64,""),Eb=_n(64),wb=/^[0-9a-fA-F]{128}$/,Ob=hn(86,"=="),Tb=_n(86);var z=p("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),fm={number:"number",bigint:"bigint",object:"date"},kr=p("$ZodCheckLessThan",(t,e)=>{z.init(t,e);let r=fm[typeof e.value];t._zod.onattach.push(o=>{let n=o._zod.bag,i=(e.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<i&&(e.inclusive?n.maximum=e.value:n.exclusiveMaximum=e.value)}),t._zod.check=o=>{(e.inclusive?o.value<=e.value:o.value<e.value)||o.issues.push({origin:r,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:o.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),xr=p("$ZodCheckGreaterThan",(t,e)=>{z.init(t,e);let r=fm[typeof e.value];t._zod.onattach.push(o=>{let n=o._zod.bag,i=(e.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>i&&(e.inclusive?n.minimum=e.value:n.exclusiveMinimum=e.value)}),t._zod.check=o=>{(e.inclusive?o.value>=e.value:o.value>e.value)||o.issues.push({origin:r,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:o.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),xa=p("$ZodCheckMultipleOf",(t,e)=>{z.init(t,e),t._zod.onattach.push(r=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=e.value)}),t._zod.check=r=>{if(typeof r.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%e.value===BigInt(0):Ro(r.value,e.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:e.value,input:r.value,inst:t,continue:!e.abort})}}),Sa=p("$ZodCheckNumberFormat",(t,e)=>{z.init(t,e),e.format=e.format||"float64";let r=e.format?.includes("int"),o=r?"int":"number",[n,i]=Fo[e.format];t._zod.onattach.push(s=>{let c=s._zod.bag;c.format=e.format,c.minimum=n,c.maximum=i,r&&(c.pattern=ha)}),t._zod.check=s=>{let c=s.value;if(r){if(!Number.isInteger(c)){s.issues.push({expected:o,format:e.format,code:"invalid_type",continue:!1,input:c,inst:t});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:t,origin:o,inclusive:!0,continue:!e.abort}):s.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:o,inclusive:!0,continue:!e.abort});return}}c<n&&s.issues.push({origin:"number",input:c,code:"too_small",minimum:n,inclusive:!0,inst:t,continue:!e.abort}),c>i&&s.issues.push({origin:"number",input:c,code:"too_big",maximum:i,inclusive:!0,inst:t,continue:!e.abort})}}),$a=p("$ZodCheckBigIntFormat",(t,e)=>{z.init(t,e);let[r,o]=Mo[e.format];t._zod.onattach.push(n=>{let i=n._zod.bag;i.format=e.format,i.minimum=r,i.maximum=o}),t._zod.check=n=>{let i=n.value;i<r&&n.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),i>o&&n.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:!0,inst:t,continue:!e.abort})}}),Ia=p("$ZodCheckMaxSize",(t,e)=>{var r;z.init(t,e),(r=t._zod.def).when??(r.when=o=>{let n=o.value;return!De(n)&&n.size!==void 0}),t._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<n&&(o._zod.bag.maximum=e.maximum)}),t._zod.check=o=>{let n=o.value;n.size<=e.maximum||o.issues.push({origin:dn(n),code:"too_big",maximum:e.maximum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),Ea=p("$ZodCheckMinSize",(t,e)=>{var r;z.init(t,e),(r=t._zod.def).when??(r.when=o=>{let n=o.value;return!De(n)&&n.size!==void 0}),t._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(o._zod.bag.minimum=e.minimum)}),t._zod.check=o=>{let n=o.value;n.size>=e.minimum||o.issues.push({origin:dn(n),code:"too_small",minimum:e.minimum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),wa=p("$ZodCheckSizeEquals",(t,e)=>{var r;z.init(t,e),(r=t._zod.def).when??(r.when=o=>{let n=o.value;return!De(n)&&n.size!==void 0}),t._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=e.size,n.maximum=e.size,n.size=e.size}),t._zod.check=o=>{let n=o.value,i=n.size;if(i===e.size)return;let s=i>e.size;o.issues.push({origin:dn(n),...s?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:o.value,inst:t,continue:!e.abort})}}),Oa=p("$ZodCheckMaxLength",(t,e)=>{var r;z.init(t,e),(r=t._zod.def).when??(r.when=o=>{let n=o.value;return!De(n)&&n.length!==void 0}),t._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<n&&(o._zod.bag.maximum=e.maximum)}),t._zod.check=o=>{let n=o.value;if(n.length<=e.maximum)return;let s=mn(n);o.issues.push({origin:s,code:"too_big",maximum:e.maximum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),Ta=p("$ZodCheckMinLength",(t,e)=>{var r;z.init(t,e),(r=t._zod.def).when??(r.when=o=>{let n=o.value;return!De(n)&&n.length!==void 0}),t._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(o._zod.bag.minimum=e.minimum)}),t._zod.check=o=>{let n=o.value;if(n.length>=e.minimum)return;let s=mn(n);o.issues.push({origin:s,code:"too_small",minimum:e.minimum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),Aa=p("$ZodCheckLengthEquals",(t,e)=>{var r;z.init(t,e),(r=t._zod.def).when??(r.when=o=>{let n=o.value;return!De(n)&&n.length!==void 0}),t._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=e.length,n.maximum=e.length,n.length=e.length}),t._zod.check=o=>{let n=o.value,i=n.length;if(i===e.length)return;let s=mn(n),c=i>e.length;o.issues.push({origin:s,...c?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:o.value,inst:t,continue:!e.abort})}}),ht=p("$ZodCheckStringFormat",(t,e)=>{var r,o;z.init(t,e),t._zod.onattach.push(n=>{let i=n._zod.bag;i.format=e.format,e.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:e.format,input:n.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(o=t._zod).check??(o.check=()=>{})}),Ca=p("$ZodCheckRegex",(t,e)=>{ht.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),Pa=p("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=ya),ht.init(t,e)}),Na=p("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=ka),ht.init(t,e)}),Ra=p("$ZodCheckIncludes",(t,e)=>{z.init(t,e);let r=ue(e.includes),o=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=o,t._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),t._zod.check=n=>{n.value.includes(e.includes,e.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:n.value,inst:t,continue:!e.abort})}}),Da=p("$ZodCheckStartsWith",(t,e)=>{z.init(t,e);let r=new RegExp(`^${ue(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),t._zod.check=o=>{o.value.startsWith(e.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:o.value,inst:t,continue:!e.abort})}}),Ua=p("$ZodCheckEndsWith",(t,e)=>{z.init(t,e);let r=new RegExp(`.*${ue(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),t._zod.check=o=>{o.value.endsWith(e.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:o.value,inst:t,continue:!e.abort})}});function pm(t,e,r){t.issues.length&&e.issues.push(...te(r,t.issues))}var za=p("$ZodCheckProperty",(t,e)=>{z.init(t,e),t._zod.check=r=>{let o=e.schema._zod.run({value:r.value[e.property],issues:[]},{});if(o instanceof Promise)return o.then(n=>pm(n,r,e.property));pm(o,r,e.property)}}),ja=p("$ZodCheckMimeType",(t,e)=>{z.init(t,e);let r=new Set(e.mime);t._zod.onattach.push(o=>{o._zod.bag.mime=e.mime}),t._zod.check=o=>{r.has(o.value.type)||o.issues.push({code:"invalid_value",values:e.mime,input:o.value.type,inst:t,continue:!e.abort})}}),La=p("$ZodCheckOverwrite",(t,e)=>{z.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}});var vn=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let o=e.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 e=Function,r=this?.args,n=[...(this?.content??[""]).map(i=>` ${i}`)];return new e(...r,n.join(`
36
+ `))}};var Fa={major:4,minor:4,patch:3};var $=p("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=Fa;let o=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&o.unshift(t);for(let n of o)for(let i of n._zod.onattach)i(t);if(o.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let n=(s,c,u)=>{let l=je(s),d;for(let m of c){if(m._zod.def.when){if(Zo(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 me;if(d||h instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await h,s.issues.length!==g&&(l||(l=je(s,g)))});else{if(s.issues.length===g)continue;l||(l=je(s,g))}}return d?d.then(()=>s):s},i=(s,c,u)=>{if(je(s))return s.aborted=!0,s;let l=n(c,o,u);if(l instanceof Promise){if(u.async===!1)throw new me;return l.then(d=>t._zod.parse(d,u))}return t._zod.parse(l,u)};t._zod.run=(s,c)=>{if(c.skipChecks)return t._zod.parse(s,c);if(c.direction==="backward"){let l=t._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=t._zod.parse(s,c);if(u instanceof Promise){if(c.async===!1)throw new me;return u.then(l=>n(l,o,c))}return n(u,o,c)}}E(t,"~standard",()=>({validate:n=>{try{let i=Ho(t,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Ko(t,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),Je=p("$ZodString",(t,e)=>{$.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??fa(t._zod.bag),t._zod.parse=(r,o)=>{if(e.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:t}),r}}),D=p("$ZodStringFormat",(t,e)=>{ht.init(t,e),Je.init(t,e)}),Za=p("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=ea),D.init(t,e)}),Va=p("$ZodUUID",(t,e)=>{if(e.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(o===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=qe(o))}else e.pattern??(e.pattern=qe());D.init(t,e)}),Ba=p("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=ta),D.init(t,e)}),Ha=p("$ZodURL",(t,e)=>{D.init(t,e),t._zod.check=r=>{try{let o=r.value.trim();if(!e.normalize&&e.protocol?.source===ua.source&&!/^https?:\/\//i.test(o)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:t,continue:!e.abort});return}let n=new URL(o);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),e.normalize?r.value=n.href:r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),Ka=p("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=na()),D.init(t,e)}),Ga=p("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=Xo),D.init(t,e)}),Wa=p("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=Go),D.init(t,e)}),qa=p("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=Wo),D.init(t,e)}),Ja=p("$ZodULID",(t,e)=>{e.pattern??(e.pattern=qo),D.init(t,e)}),Ya=p("$ZodXID",(t,e)=>{e.pattern??(e.pattern=Jo),D.init(t,e)}),Xa=p("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=Yo),D.init(t,e)}),Qa=p("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=pa(e)),D.init(t,e)}),es=p("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=da),D.init(t,e)}),ts=p("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=ma(e)),D.init(t,e)}),ns=p("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=Qo),D.init(t,e)}),rs=p("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=ra),D.init(t,e),t._zod.bag.format="ipv4"}),is=p("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=ia),D.init(t,e),t._zod.bag.format="ipv6",t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),os=p("$ZodMAC",(t,e)=>{e.pattern??(e.pattern=oa(e.delimiter)),D.init(t,e),t._zod.bag.format="mac"}),as=p("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=aa),D.init(t,e)}),ss=p("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=sa),D.init(t,e),t._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:t,continue:!e.abort})}}});function cs(t){if(t==="")return!0;if(/\s/.test(t)||t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var us=p("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=ca),D.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=r=>{cs(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});function Am(t){if(!br.test(t))return!1;let e=t.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return cs(r)}var ls=p("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=br),D.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=r=>{Am(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),ds=p("$ZodE164",(t,e)=>{e.pattern??(e.pattern=la),D.init(t,e)});function Cm(t,e=null){try{let r=t.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||e&&(!("alg"in n)||n.alg!==e))}catch{return!1}}var ms=p("$ZodJWT",(t,e)=>{D.init(t,e),t._zod.check=r=>{Cm(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}}),ps=p("$ZodCustomStringFormat",(t,e)=>{D.init(t,e),t._zod.check=r=>{e.fn(r.value)||r.issues.push({code:"invalid_format",format:e.format,input:r.value,inst:t,continue:!e.abort})}}),wr=p("$ZodNumber",(t,e)=>{$.init(t,e),t._zod.pattern=t._zod.bag.pattern??yr,t._zod.parse=(r,o)=>{if(e.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:t,...i?{received:i}:{}}),r}}),fs=p("$ZodNumberFormat",(t,e)=>{Sa.init(t,e),wr.init(t,e)}),bn=p("$ZodBoolean",(t,e)=>{$.init(t,e),t._zod.pattern=_a,t._zod.parse=(r,o)=>{if(e.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:t}),r}}),Or=p("$ZodBigInt",(t,e)=>{$.init(t,e),t._zod.pattern=ga,t._zod.parse=(r,o)=>{if(e.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:t}),r}}),gs=p("$ZodBigIntFormat",(t,e)=>{$a.init(t,e),Or.init(t,e)}),hs=p("$ZodSymbol",(t,e)=>{$.init(t,e),t._zod.parse=(r,o)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:t}),r}}),_s=p("$ZodUndefined",(t,e)=>{$.init(t,e),t._zod.pattern=ba,t._zod.values=new Set([void 0]),t._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:t}),r}}),vs=p("$ZodNull",(t,e)=>{$.init(t,e),t._zod.pattern=va,t._zod.values=new Set([null]),t._zod.parse=(r,o)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:t}),r}}),bs=p("$ZodAny",(t,e)=>{$.init(t,e),t._zod.parse=r=>r}),ys=p("$ZodUnknown",(t,e)=>{$.init(t,e),t._zod.parse=r=>r}),ks=p("$ZodNever",(t,e)=>{$.init(t,e),t._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)}),xs=p("$ZodVoid",(t,e)=>{$.init(t,e),t._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:t}),r}}),Ss=p("$ZodDate",(t,e)=>{$.init(t,e),t._zod.parse=(r,o)=>{if(e.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:t}),r}});function hm(t,e,r){t.issues.length&&e.issues.push(...te(r,t.issues)),e.value[r]=t.value}var $s=p("$ZodArray",(t,e)=>{$.init(t,e),t._zod.parse=(r,o)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:t}),r;r.value=Array(n.length);let i=[];for(let s=0;s<n.length;s++){let c=n[s],u=e.element._zod.run({value:c,issues:[]},o);u instanceof Promise?i.push(u.then(l=>hm(l,r,s))):hm(u,r,s)}return i.length?Promise.all(i).then(()=>r):r}});function Er(t,e,r,o,n,i){let s=r in o;if(t.issues.length){if(n&&i&&!s)return;e.issues.push(...te(r,t.issues))}if(!s&&!n){t.issues.length||e.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}t.value===void 0?s&&(e.value[r]=void 0):e.value[r]=t.value}function Pm(t){let e=Object.keys(t.shape);for(let o of e)if(!t.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let r=Lo(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(r)}}function Nm(t,e,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 e){if(g==="__proto__"||c.has(g))continue;if(l==="never"){s.push(g);continue}let h=u.run({value:e[g],issues:[]},o);h instanceof Promise?t.push(h.then(x=>Er(x,r,g,e,d,m))):Er(h,r,g,e,d,m)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:e,inst:i}),t.length?Promise.all(t).then(()=>r):r}var Rm=p("$ZodObject",(t,e)=>{if($.init(t,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){let c=e.shape;Object.defineProperty(e,"shape",{get:()=>{let u={...c};return Object.defineProperty(e,"shape",{value:u}),u}})}let o=lt(()=>Pm(e));E(t._zod,"propValues",()=>{let c=e.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=We,i=e.catchall,s;t._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:t}),c;c.value={};let d=[],m=s.shape;for(let g of s.keys){let h=m[g],x=h._zod.optin==="optional",A=h._zod.optout==="optional",C=h._zod.run({value:l[g],issues:[]},u);C instanceof Promise?d.push(C.then(ee=>Er(ee,c,g,l,x,A))):Er(C,c,g,l,x,A)}return i?Nm(d,l,c,u,o.value,t):d.length?Promise.all(d).then(()=>c):c}}),Is=p("$ZodObjectJIT",(t,e)=>{Rm.init(t,e);let r=t._zod.parse,o=lt(()=>Pm(e)),n=g=>{let h=new vn(["shape","payload","ctx"]),x=o.value,A=be=>{let F=sr(be);return`shape[${F}]._zod.run({ value: input[${F}], issues: [] }, ctx)`};h.write("const input = payload.value;");let C=Object.create(null),ee=0;for(let be of x.keys)C[be]=`key_${ee++}`;h.write("const newResult = {};");for(let be of x.keys){let F=C[be],H=sr(be),gd=g[be],hd=gd?._zod?.optin==="optional",U_=gd?._zod?.optout==="optional";h.write(`const ${F} = ${A(be)};`),hd&&U_?h.write(`
37
37
  if (${F}.issues.length) {
38
- if (${B} in input) {
38
+ if (${H} in input) {
39
39
  payload.issues = payload.issues.concat(${F}.issues.map(iss => ({
40
40
  ...iss,
41
- path: iss.path ? [${B}, ...iss.path] : [${B}]
41
+ path: iss.path ? [${H}, ...iss.path] : [${H}]
42
42
  })));
43
43
  }
44
44
  }
45
45
 
46
46
  if (${F}.value === undefined) {
47
- if (${B} in input) {
48
- newResult[${B}] = undefined;
47
+ if (${H} in input) {
48
+ newResult[${H}] = undefined;
49
49
  }
50
50
  } else {
51
- newResult[${B}] = ${F}.value;
51
+ newResult[${H}] = ${F}.value;
52
52
  }
53
53
 
54
- `):rd?h.write(`
54
+ `):hd?h.write(`
55
55
  if (${F}.issues.length) {
56
56
  payload.issues = payload.issues.concat(${F}.issues.map(iss => ({
57
57
  ...iss,
58
- path: iss.path ? [${B}, ...iss.path] : [${B}]
58
+ path: iss.path ? [${H}, ...iss.path] : [${H}]
59
59
  })));
60
60
  }
61
61
 
62
62
  if (${F}.value === undefined) {
63
- if (${B} in input) {
64
- newResult[${B}] = undefined;
63
+ if (${H} in input) {
64
+ newResult[${H}] = undefined;
65
65
  }
66
66
  } else {
67
- newResult[${B}] = ${F}.value;
67
+ newResult[${H}] = ${F}.value;
68
68
  }
69
69
 
70
70
  `):h.write(`
71
- const ${F}_present = ${B} in input;
71
+ const ${F}_present = ${H} in input;
72
72
  if (${F}.issues.length) {
73
73
  payload.issues = payload.issues.concat(${F}.issues.map(iss => ({
74
74
  ...iss,
75
- path: iss.path ? [${B}, ...iss.path] : [${B}]
75
+ path: iss.path ? [${H}, ...iss.path] : [${H}]
76
76
  })));
77
77
  }
78
78
  if (!${F}_present && !${F}.issues.length) {
@@ -80,47 +80,47 @@ Expecting one of '${o.join("', '")}'`);let n=`${t}Help`;return this.on(n,i=>{let
80
80
  code: "invalid_type",
81
81
  expected: "nonoptional",
82
82
  input: undefined,
83
- path: [${B}]
83
+ path: [${H}]
84
84
  });
85
85
  }
86
86
 
87
87
  if (${F}_present) {
88
88
  if (${F}.value === undefined) {
89
- newResult[${B}] = undefined;
89
+ newResult[${H}] = undefined;
90
90
  } else {
91
- newResult[${B}] = ${F}.value;
91
+ newResult[${H}] = ${F}.value;
92
92
  }
93
93
  }
94
94
 
95
- `)}h.write("payload.value = newResult;"),h.write("return payload;");let l_=h.compile();return(_e,F)=>l_(g,_e,F)},i,s=Ge,c=!He.jitless,l=c&&ko.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?bm([],S,g,h,m,e):g):r(g,h):(g.issues.push({expected:"object",code:"invalid_type",input:S,inst:e}),g)}});function rm(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=>!De(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=>q(s,o,M())))}),t)}var pn=p("$ZodUnion",(e,t)=>{$.init(e,t),E(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),E(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),E(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),E(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=>tn(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=>rm(c,o,e,n)):rm(s,o,e,n)}});function im(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=>q(s,o,M())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}var ms=p("$ZodXor",(e,t)=>{pn.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=>im(c,o,e,n)):im(s,o,e,n)}}),ps=p("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,pn.init(e,t);let r=e._zod.parse;E(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=st(()=>{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(!Ge(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)}}),fs=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])=>om(r,u,l)):om(r,i,s)}});function wa(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(Re(e)&&Re(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=wa(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=wa(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 om(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}),De(e))return e;let s=wa(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 vr=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=am(r,"optin"),u=am(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=>sm(S,o,d))):sm(h,o,d)}}return s.length?Promise.all(s).then(()=>cm(l,o,r,i,u)):cm(l,o,r,i,u)}});function am(e,t){for(let r=e.length-1;r>=0;r--)if(e[r]._zod[t]!=="optional")return r+1;return 0}function sm(e,t,r){e.issues.length&&t.issues.push(...X(r,e.issues)),t.value[r]=e.value}function cm(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(...X(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 gs=p("$ZodRecord",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Re(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=>q(h,o,M())),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(...X(l,h.issues)),r.value[m]=h.value})):(g.issues.length&&r.issues.push(...X(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"&&ur.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=>q(m,o,M())),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(...X(c,m.issues)),r.value[u.value]=m.value})):(d.issues.length&&r.issues.push(...X(c,d.issues)),r.value[u.value]=d.value)}}return i.length?Promise.all(i).then(()=>r):r}}),hs=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])=>{um(d,m,r,s,n,e,o)})):um(u,l,r,s,n,e,o)}return i.length?Promise.all(i).then(()=>r):r}});function um(e,t,r,o,n,i,s){e.issues.length&&(nn.has(typeof o)?r.issues.push(...X(o,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:i,issues:e.issues.map(c=>q(c,s,M()))})),t.issues.length&&(nn.has(typeof o)?r.issues.push(...X(o,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:i,key:o,issues:t.issues.map(c=>q(c,s,M()))})),r.value.set(e.value,t.value)}var _s=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=>lm(u,r))):lm(c,r)}return i.length?Promise.all(i).then(()=>r):r}});function lm(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var vs=p("$ZodEnum",(e,t)=>{$.init(e,t);let r=en(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(n=>nn.has(typeof n)).map(n=>typeof n=="string"?se(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}}),bs=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"?se(o):o?se(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}}),ys=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}}),xs=p("$ZodTransform",(e,t)=>{$.init(e,t),e._zod.optin="optional",e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Pe(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 le;return r.value=n,r.fallback=!0,r}});function dm(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var br=p("$ZodOptional",(e,t)=>{$.init(e,t),e._zod.optin="optional",e._zod.optout="optional",E(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),E(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${tn(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=>dm(s,n)):dm(i,n)}return r.value===void 0?r:t.innerType._zod.run(r,o)}}),ks=p("$ZodExactOptional",(e,t)=>{br.init(e,t),E(e._zod,"values",()=>t.innerType._zod.values),E(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,o)=>t.innerType._zod.run(r,o)}),Ss=p("$ZodNullable",(e,t)=>{$.init(e,t),E(e._zod,"optin",()=>t.innerType._zod.optin),E(e._zod,"optout",()=>t.innerType._zod.optout),E(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${tn(r.source)}|null)$`):void 0}),E(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",E(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=>mm(i,t)):mm(n,t)}});function mm(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Is=p("$ZodPrefault",(e,t)=>{$.init(e,t),e._zod.optin="optional",E(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))}),Es=p("$ZodNonOptional",(e,t)=>{$.init(e,t),E(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=>pm(i,e)):pm(n,e)}});function pm(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 ws=p("$ZodSuccess",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Pe("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)}}),Os=p("$ZodCatch",(e,t)=>{$.init(e,t),e._zod.optin="optional",E(e._zod,"optout",()=>t.innerType._zod.optout),E(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=>q(s,o,M()))},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=>q(i,o,M()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),Ts=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)}),yr=p("$ZodPipe",(e,t)=>{$.init(e,t),E(e._zod,"values",()=>t.in._zod.values),E(e._zod,"optin",()=>t.in._zod.optin),E(e._zod,"optout",()=>t.out._zod.optout),E(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=>mr(s,t.in,o)):mr(i,t.in,o)}let n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>mr(i,t.out,o)):mr(n,t.out,o)}});function mr(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 fn=p("$ZodCodec",(e,t)=>{$.init(e,t),E(e._zod,"values",()=>t.in._zod.values),E(e._zod,"optin",()=>t.in._zod.optin),E(e._zod,"optout",()=>t.out._zod.optout),E(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=>pr(s,t,o)):pr(i,t,o)}else{let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(s=>pr(s,t,o)):pr(i,t,o)}}});function pr(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=>fr(e,i,t.out,r)):fr(e,n,t.out,r)}else{let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(i=>fr(e,i,t.in,r)):fr(e,n,t.in,r)}}function fr(e,t,r,o){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},o)}var As=p("$ZodPreprocess",(e,t)=>{yr.init(e,t)}),Ps=p("$ZodReadonly",(e,t)=>{$.init(e,t),E(e._zod,"propValues",()=>t.innerType._zod.propValues),E(e._zod,"values",()=>t.innerType._zod.values),E(e._zod,"optin",()=>t.innerType?._zod?.optin),E(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(fm):fm(n)}});function fm(e){return e.value=Object.freeze(e.value),e}var Ns=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(se(`${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)}),Cs=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?Xn(e._def.input,o):o,i=Reflect.apply(r,this,n);return e._def.output?Xn(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 Qn(e._def.input,o):o,i=await Reflect.apply(r,this,n);return e._def.output?await Qn(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 vr({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)),Rs=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))}),Ds=p("$ZodLazy",(e,t)=>{$.init(e,t),E(e._zod,"innerType",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),E(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),E(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),E(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),E(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o)}),zs=p("$ZodCustom",(e,t)=>{U.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=>gm(i,r,o,e));gm(n,r,o,e)}});function gm(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(ct(n))}}var hn={};Se(hn,{ar:()=>xm,az:()=>km,be:()=>$m,bg:()=>Im,ca:()=>Em,cs:()=>wm,da:()=>Om,de:()=>Tm,el:()=>Am,en:()=>xr,eo:()=>Pm,es:()=>Nm,fa:()=>Cm,fi:()=>Rm,fr:()=>Dm,frCA:()=>zm,he:()=>Um,hr:()=>jm,hu:()=>Lm,hy:()=>Mm,id:()=>Zm,is:()=>Vm,it:()=>Bm,ja:()=>Hm,ka:()=>Gm,kh:()=>Km,km:()=>kr,ko:()=>Wm,lt:()=>Jm,mk:()=>Ym,ms:()=>Xm,nl:()=>Qm,no:()=>ep,ota:()=>tp,pl:()=>rp,ps:()=>np,pt:()=>ip,ro:()=>op,ru:()=>sp,sl:()=>cp,sv:()=>up,ta:()=>lp,th:()=>dp,tr:()=>mp,ua:()=>pp,uk:()=>Sr,ur:()=>fp,uz:()=>gp,vi:()=>hp,yo:()=>bp,zhCN:()=>_p,zhTW:()=>vp});var sb=()=>{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 xm(){return{localeError:sb()}}var cb=()=>{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 km(){return{localeError:cb()}}function Sm(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 ub=()=>{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=Sm(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=Sm(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 $m(){return{localeError:ub()}}var lb=()=>{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 Im(){return{localeError:lb()}}var db=()=>{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 Em(){return{localeError:db()}}var mb=()=>{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 wm(){return{localeError:mb()}}var pb=()=>{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 Om(){return{localeError:pb()}}var fb=()=>{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 Tm(){return{localeError:fb()}}var gb=()=>{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 Am(){return{localeError:gb()}}var hb=()=>{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 xr(){return{localeError:hb()}}var _b=()=>{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 Pm(){return{localeError:_b()}}var vb=()=>{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 Nm(){return{localeError:vb()}}var bb=()=>{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 Cm(){return{localeError:bb()}}var yb=()=>{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 Rm(){return{localeError:yb()}}var xb=()=>{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 Dm(){return{localeError:xb()}}var kb=()=>{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 zm(){return{localeError:kb()}}var Sb=()=>{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 P=(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 ${P}`}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 Um(){return{localeError:Sb()}}var $b=()=>{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 jm(){return{localeError:$b()}}var Ib=()=>{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 Lm(){return{localeError:Ib()}}function Fm(e,t,r){return Math.abs(e)===1?t:r}function ft(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 Eb=()=>{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=Fm(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 ${ft(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 ${ft(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=Fm(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 ${ft(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 ${ft(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 ${ft(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 ${ft(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function Mm(){return{localeError:Eb()}}var wb=()=>{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 Zm(){return{localeError:wb()}}var Ob=()=>{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 Vm(){return{localeError:Ob()}}var Tb=()=>{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 Bm(){return{localeError:Tb()}}var Ab=()=>{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 Hm(){return{localeError:Ab()}}var Pb=()=>{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 Gm(){return{localeError:Pb()}}var Nb=()=>{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 kr(){return{localeError:Nb()}}function Km(){return kr()}var Cb=()=>{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 Wm(){return{localeError:Cb()}}var gn=e=>e.charAt(0).toUpperCase()+e.slice(1);function qm(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 Rb=()=>{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,qm(Number(n.maximum)),n.inclusive??!1,"smaller");if(s?.verb)return`${gn(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`${gn(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,qm(Number(n.minimum)),n.inclusive??!1,"bigger");if(s?.verb)return`${gn(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`${gn(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`${gn(i??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function Jm(){return{localeError:Rb()}}var Db=()=>{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 Ym(){return{localeError:Db()}}var zb=()=>{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 Xm(){return{localeError:zb()}}var Ub=()=>{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 Qm(){return{localeError:Ub()}}var jb=()=>{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 ep(){return{localeError:jb()}}var Lb=()=>{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 tp(){return{localeError:Lb()}}var Fb=()=>{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 np(){return{localeError:Fb()}}var Mb=()=>{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 rp(){return{localeError:Mb()}}var Zb=()=>{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 ip(){return{localeError:Zb()}}var Vb=()=>{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 op(){return{localeError:Vb()}}function ap(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 Bb=()=>{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=ap(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=ap(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 sp(){return{localeError:Bb()}}var Hb=()=>{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 cp(){return{localeError:Hb()}}var Gb=()=>{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 up(){return{localeError:Gb()}}var Kb=()=>{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 lp(){return{localeError:Kb()}}var Wb=()=>{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 dp(){return{localeError:Wb()}}var qb=()=>{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 mp(){return{localeError:qb()}}var Jb=()=>{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 Sr(){return{localeError:Jb()}}function pp(){return Sr()}var Yb=()=>{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 fp(){return{localeError:Yb()}}var Xb=()=>{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 gp(){return{localeError:Xb()}}var Qb=()=>{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 hp(){return{localeError:Qb()}}var ey=()=>{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 _p(){return{localeError:ey()}}var ty=()=>{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 vp(){return{localeError:ty()}}var ny=()=>{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 bp(){return{localeError:ny()}}var yp,Us=Symbol("ZodOutput"),js=Symbol("ZodInput"),$r=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 Ir(){return new $r}(yp=globalThis).__zod_globalRegistry??(yp.__zod_globalRegistry=Ir());var H=globalThis.__zod_globalRegistry;function Ls(e,t){return new e({type:"string",...y(t)})}function Fs(e,t){return new e({type:"string",coerce:!0,...y(t)})}function Er(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...y(t)})}function _n(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...y(t)})}function wr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...y(t)})}function Or(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...y(t)})}function Tr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...y(t)})}function Ar(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...y(t)})}function vn(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...y(t)})}function Pr(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...y(t)})}function Nr(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...y(t)})}function Cr(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...y(t)})}function Rr(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...y(t)})}function Dr(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...y(t)})}function zr(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...y(t)})}function Ur(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...y(t)})}function jr(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...y(t)})}function Lr(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...y(t)})}function Ms(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...y(t)})}function Fr(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...y(t)})}function Mr(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 Vr(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...y(t)})}function Br(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...y(t)})}function Hr(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...y(t)})}var Zs={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Vs(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...y(t)})}function Bs(e,t){return new e({type:"string",format:"date",check:"string_format",...y(t)})}function Hs(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...y(t)})}function Gs(e,t){return new e({type:"string",format:"duration",check:"string_format",...y(t)})}function Ks(e,t){return new e({type:"number",checks:[],...y(t)})}function Ws(e,t){return new e({type:"number",coerce:!0,checks:[],...y(t)})}function qs(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...y(t)})}function Js(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...y(t)})}function Ys(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...y(t)})}function Xs(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...y(t)})}function Qs(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...y(t)})}function ec(e,t){return new e({type:"boolean",...y(t)})}function tc(e,t){return new e({type:"boolean",coerce:!0,...y(t)})}function nc(e,t){return new e({type:"bigint",...y(t)})}function rc(e,t){return new e({type:"bigint",coerce:!0,...y(t)})}function ic(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...y(t)})}function oc(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...y(t)})}function ac(e,t){return new e({type:"symbol",...y(t)})}function sc(e,t){return new e({type:"undefined",...y(t)})}function cc(e,t){return new e({type:"null",...y(t)})}function uc(e){return new e({type:"any"})}function lc(e){return new e({type:"unknown"})}function dc(e,t){return new e({type:"never",...y(t)})}function mc(e,t){return new e({type:"void",...y(t)})}function pc(e,t){return new e({type:"date",...y(t)})}function fc(e,t){return new e({type:"date",coerce:!0,...y(t)})}function gc(e,t){return new e({type:"nan",...y(t)})}function ve(e,t){return new lr({check:"less_than",...y(t),value:e,inclusive:!1})}function re(e,t){return new lr({check:"less_than",...y(t),value:e,inclusive:!0})}function be(e,t){return new dr({check:"greater_than",...y(t),value:e,inclusive:!1})}function J(e,t){return new dr({check:"greater_than",...y(t),value:e,inclusive:!0})}function Gr(e){return be(0,e)}function Kr(e){return ve(0,e)}function Wr(e){return re(0,e)}function qr(e){return J(0,e)}function ze(e,t){return new ca({check:"multiple_of",...y(t),value:e})}function Ue(e,t){return new da({check:"max_size",...y(t),maximum:e})}function ye(e,t){return new ma({check:"min_size",...y(t),minimum:e})}function qe(e,t){return new pa({check:"size_equals",...y(t),size:e})}function Je(e,t){return new fa({check:"max_length",...y(t),maximum:e})}function we(e,t){return new ga({check:"min_length",...y(t),minimum:e})}function Ye(e,t){return new ha({check:"length_equals",...y(t),length:e})}function gt(e,t){return new _a({check:"string_format",format:"regex",...y(t),pattern:e})}function ht(e){return new va({check:"string_format",format:"lowercase",...y(e)})}function _t(e){return new ba({check:"string_format",format:"uppercase",...y(e)})}function vt(e,t){return new ya({check:"string_format",format:"includes",...y(t),includes:e})}function bt(e,t){return new xa({check:"string_format",format:"starts_with",...y(t),prefix:e})}function yt(e,t){return new ka({check:"string_format",format:"ends_with",...y(t),suffix:e})}function Jr(e,t,r){return new Sa({check:"property",property:e,schema:t,...y(r)})}function xt(e,t){return new $a({check:"mime_type",mime:e,...y(t)})}function de(e){return new Ia({check:"overwrite",tx:e})}function kt(e){return de(t=>t.normalize(e))}function St(){return de(e=>e.trim())}function $t(){return de(e=>e.toLowerCase())}function It(){return de(e=>e.toUpperCase())}function Et(){return de(e=>xo(e))}function hc(e,t,r){return new e({type:"array",element:t,...y(r)})}function iy(e,t,r){return new e({type:"union",options:t,...y(r)})}function oy(e,t,r){return new e({type:"union",options:t,inclusive:!1,...y(r)})}function ay(e,t,r,o){return new e({type:"union",options:r,discriminator:t,...y(o)})}function sy(e,t,r){return new e({type:"intersection",left:t,right:r})}function cy(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 uy(e,t,r,o){return new e({type:"record",keyType:t,valueType:r,...y(o)})}function ly(e,t,r,o){return new e({type:"map",keyType:t,valueType:r,...y(o)})}function dy(e,t,r){return new e({type:"set",valueType:t,...y(r)})}function my(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 py(e,t,r){return new e({type:"enum",entries:t,...y(r)})}function fy(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...y(r)})}function _c(e,t){return new e({type:"file",...y(t)})}function gy(e,t){return new e({type:"transform",transform:t})}function hy(e,t){return new e({type:"optional",innerType:t})}function _y(e,t){return new e({type:"nullable",innerType:t})}function vy(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():So(r)}})}function by(e,t,r){return new e({type:"nonoptional",innerType:t,...y(r)})}function yy(e,t){return new e({type:"success",innerType:t})}function xy(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function ky(e,t,r){return new e({type:"pipe",in:t,out:r})}function Sy(e,t){return new e({type:"readonly",innerType:t})}function $y(e,t,r){return new e({type:"template_literal",parts:t,...y(r)})}function Iy(e,t){return new e({type:"lazy",getter:t})}function Ey(e,t){return new e({type:"promise",innerType:t})}function vc(e,t,r){let o=y(r);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function bc(e,t,r){return new e({type:"custom",check:"custom",fn:t,...y(r)})}function yc(e,t){let r=xp(o=>(o.addIssue=n=>{if(typeof n=="string")o.issues.push(ct(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(ct(i))}},e(o.value,o)),t);return r}function xp(e,t){let r=new U({check:"custom",...y(t)});return r._zod.check=e,r}function xc(e){let t=new U({check:"describe"});return t._zod.onattach=[r=>{let o=H.get(r)??{};H.add(r,{...o,description:e})}],t._zod.check=()=>{},t}function kc(e){let t=new U({check:"meta"});return t._zod.onattach=[r=>{let o=H.get(r)??{};H.add(r,{...o,...e})}],t._zod.check=()=>{},t}function Sc(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??fn,u=e.Boolean??mn,l=e.String??We,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 wt(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 je(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??H,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"&&Y(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 Le(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>
95
+ `)}h.write("payload.value = newResult;"),h.write("return payload;");let Xt=h.compile();return(be,F)=>Xt(g,be,F)},i,s=We,c=!Ge.jitless,l=c&&Uo.value,d=e.catchall,m;t._zod.parse=(g,h)=>{m??(m=o.value);let x=g.value;return s(x)?c&&l&&h?.async===!1&&h.jitless!==!0?(i||(i=n(e.shape)),g=i(g,h),d?Nm([],x,g,h,m,t):g):r(g,h):(g.issues.push({expected:"object",code:"invalid_type",input:x,inst:t}),g)}});function _m(t,e,r,o){for(let i of t)if(i.issues.length===0)return e.value=i.value,e;let n=t.filter(i=>!je(i));return n.length===1?(e.value=n[0].value,n[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(i=>i.issues.map(s=>J(s,o,M())))}),e)}var yn=p("$ZodUnion",(t,e)=>{$.init(t,e),E(t._zod,"optin",()=>e.options.some(o=>o._zod.optin==="optional")?"optional":void 0),E(t._zod,"optout",()=>e.options.some(o=>o._zod.optout==="optional")?"optional":void 0),E(t._zod,"values",()=>{if(e.options.every(o=>o._zod.values))return new Set(e.options.flatMap(o=>Array.from(o._zod.values)))}),E(t._zod,"pattern",()=>{if(e.options.every(o=>o._zod.pattern)){let o=e.options.map(n=>n._zod.pattern);return new RegExp(`^(${o.map(n=>un(n.source)).join("|")})$`)}});let r=e.options.length===1?e.options[0]._zod.run:null;t._zod.parse=(o,n)=>{if(r)return r(o,n);let i=!1,s=[];for(let c of e.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=>_m(c,o,t,n)):_m(s,o,t,n)}});function vm(t,e,r,o){let n=t.filter(i=>i.issues.length===0);return n.length===1?(e.value=n[0].value,e):(n.length===0?e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(i=>i.issues.map(s=>J(s,o,M())))}):e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:[],inclusive:!1}),e)}var Es=p("$ZodXor",(t,e)=>{yn.init(t,e),e.inclusive=!1;let r=e.options.length===1?e.options[0]._zod.run:null;t._zod.parse=(o,n)=>{if(r)return r(o,n);let i=!1,s=[];for(let c of e.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=>vm(c,o,t,n)):vm(s,o,t,n)}}),ws=p("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,yn.init(t,e);let r=t._zod.parse;E(t._zod,"propValues",()=>{let n={};for(let i of e.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${e.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=lt(()=>{let n=e.options,i=new Map;for(let s of n){let c=s._zod.propValues?.[e.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${e.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});t._zod.parse=(n,i)=>{let s=n.value;if(!We(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:t}),n;let c=o.value.get(s?.[e.discriminator]);return c?c._zod.run(n,i):e.unionFallback||i.direction==="backward"?r(n,i):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,options:Array.from(o.value.keys()),input:s,path:[e.discriminator],inst:t}),n)}}),Os=p("$ZodIntersection",(t,e)=>{$.init(t,e),t._zod.parse=(r,o)=>{let n=r.value,i=e.left._zod.run({value:n,issues:[]},o),s=e.right._zod.run({value:n,issues:[]},o);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([u,l])=>bm(r,u,l)):bm(r,i,s)}});function Ma(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(ze(t)&&ze(e)){let r=Object.keys(e),o=Object.keys(t).filter(i=>r.indexOf(i)!==-1),n={...t,...e};for(let i of o){let s=Ma(t[i],e[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};n[i]=s.data}return{valid:!0,data:n}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let o=0;o<t.length;o++){let n=t[o],i=e[o],s=Ma(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 bm(t,e,r){let o=new Map,n;for(let c of e.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 t.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 t.issues.push(c);let i=[...o].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(i.length&&n&&t.issues.push({...n,keys:i}),je(t))return t;let s=Ma(e.value,r.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return t.value=s.data,t}var Tr=p("$ZodTuple",(t,e)=>{$.init(t,e);let r=e.items;t._zod.parse=(o,n)=>{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 s=[],c=ym(r,"optin"),u=ym(r,"optout");if(!e.rest){if(i.length<c)return o.issues.push({code:"too_small",minimum:c,inclusive:!0,input:i,inst:t,origin:"array"}),o;i.length>r.length&&o.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:i,inst:t,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(e.rest){let d=r.length-1,m=i.slice(r.length);for(let g of m){d++;let h=e.rest._zod.run({value:g,issues:[]},n);h instanceof Promise?s.push(h.then(x=>km(x,o,d))):km(h,o,d)}}return s.length?Promise.all(s).then(()=>xm(l,o,r,i,u)):xm(l,o,r,i,u)}});function ym(t,e){for(let r=t.length-1;r>=0;r--)if(t[r]._zod[e]!=="optional")return r+1;return 0}function km(t,e,r){t.issues.length&&e.issues.push(...te(r,t.issues)),e.value[r]=t.value}function xm(t,e,r,o,n){for(let i=0;i<r.length;i++){let s=t[i],c=i<o.length;if(s.issues.length){if(!c&&i>=n){e.value.length=i;break}e.issues.push(...te(i,s.issues))}e.value[i]=s.value}for(let i=e.value.length-1;i>=o.length&&(r[i]._zod.optout==="optional"&&e.value[i]===void 0);i--)e.value.length=i;return e}var Ts=p("$ZodRecord",(t,e)=>{$.init(t,e),t._zod.parse=(r,o)=>{let n=r.value;if(!ze(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:t}),r;let i=[],s=e.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=e.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=>J(h,o,M())),input:l,path:[l],inst:t});continue}let m=d.value,g=e.valueType._zod.run({value:n[l],issues:[]},o);g instanceof Promise?i.push(g.then(h=>{h.issues.length&&r.issues.push(...te(l,h.issues)),r.value[m]=h.value})):(g.issues.length&&r.issues.push(...te(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:t,keys:u})}else{r.value={};for(let c of Reflect.ownKeys(n)){if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(n,c))continue;let u=e.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"&&yr.test(c)&&u.issues.length){let m=e.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){e.mode==="loose"?r.value[c]=n[c]:r.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(m=>J(m,o,M())),input:c,path:[c],inst:t});continue}let d=e.valueType._zod.run({value:n[c],issues:[]},o);d instanceof Promise?i.push(d.then(m=>{m.issues.length&&r.issues.push(...te(c,m.issues)),r.value[u.value]=m.value})):(d.issues.length&&r.issues.push(...te(c,d.issues)),r.value[u.value]=d.value)}}return i.length?Promise.all(i).then(()=>r):r}}),As=p("$ZodMap",(t,e)=>{$.init(t,e),t._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:t}),r;let i=[];r.value=new Map;for(let[s,c]of n){let u=e.keyType._zod.run({value:s,issues:[]},o),l=e.valueType._zod.run({value:c,issues:[]},o);u instanceof Promise||l instanceof Promise?i.push(Promise.all([u,l]).then(([d,m])=>{Sm(d,m,r,s,n,t,o)})):Sm(u,l,r,s,n,t,o)}return i.length?Promise.all(i).then(()=>r):r}});function Sm(t,e,r,o,n,i,s){t.issues.length&&(ln.has(typeof o)?r.issues.push(...te(o,t.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:i,issues:t.issues.map(c=>J(c,s,M()))})),e.issues.length&&(ln.has(typeof o)?r.issues.push(...te(o,e.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:i,key:o,issues:e.issues.map(c=>J(c,s,M()))})),r.value.set(t.value,e.value)}var Cs=p("$ZodSet",(t,e)=>{$.init(t,e),t._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:t,expected:"set",code:"invalid_type"}),r;let i=[];r.value=new Set;for(let s of n){let c=e.valueType._zod.run({value:s,issues:[]},o);c instanceof Promise?i.push(c.then(u=>$m(u,r))):$m(c,r)}return i.length?Promise.all(i).then(()=>r):r}});function $m(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}var Ps=p("$ZodEnum",(t,e)=>{$.init(t,e);let r=cn(e.entries),o=new Set(r);t._zod.values=o,t._zod.pattern=new RegExp(`^(${r.filter(n=>ln.has(typeof n)).map(n=>typeof n=="string"?ue(n):n.toString()).join("|")})$`),t._zod.parse=(n,i)=>{let s=n.value;return o.has(s)||n.issues.push({code:"invalid_value",values:r,input:s,inst:t}),n}}),Ns=p("$ZodLiteral",(t,e)=>{if($.init(t,e),e.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(e.values);t._zod.values=r,t._zod.pattern=new RegExp(`^(${e.values.map(o=>typeof o=="string"?ue(o):o?ue(o.toString()):String(o)).join("|")})$`),t._zod.parse=(o,n)=>{let i=o.value;return r.has(i)||o.issues.push({code:"invalid_value",values:e.values,input:i,inst:t}),o}}),Rs=p("$ZodFile",(t,e)=>{$.init(t,e),t._zod.parse=(r,o)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:t}),r}}),Ds=p("$ZodTransform",(t,e)=>{$.init(t,e),t._zod.optin="optional",t._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Re(t.constructor.name);let n=e.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 me;return r.value=n,r.fallback=!0,r}});function Im(t,e){return e===void 0&&(t.issues.length||t.fallback)?{issues:[],value:void 0}:t}var Ar=p("$ZodOptional",(t,e)=>{$.init(t,e),t._zod.optin="optional",t._zod.optout="optional",E(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),E(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${un(r.source)})?$`):void 0}),t._zod.parse=(r,o)=>{if(e.innerType._zod.optin==="optional"){let n=r.value,i=e.innerType._zod.run(r,o);return i instanceof Promise?i.then(s=>Im(s,n)):Im(i,n)}return r.value===void 0?r:e.innerType._zod.run(r,o)}}),Us=p("$ZodExactOptional",(t,e)=>{Ar.init(t,e),E(t._zod,"values",()=>e.innerType._zod.values),E(t._zod,"pattern",()=>e.innerType._zod.pattern),t._zod.parse=(r,o)=>e.innerType._zod.run(r,o)}),zs=p("$ZodNullable",(t,e)=>{$.init(t,e),E(t._zod,"optin",()=>e.innerType._zod.optin),E(t._zod,"optout",()=>e.innerType._zod.optout),E(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${un(r.source)}|null)$`):void 0}),E(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,o)=>r.value===null?r:e.innerType._zod.run(r,o)}),js=p("$ZodDefault",(t,e)=>{$.init(t,e),t._zod.optin="optional",E(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,o)=>{if(o.direction==="backward")return e.innerType._zod.run(r,o);if(r.value===void 0)return r.value=e.defaultValue,r;let n=e.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>Em(i,e)):Em(n,e)}});function Em(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}var Ls=p("$ZodPrefault",(t,e)=>{$.init(t,e),t._zod.optin="optional",E(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,o)=>(o.direction==="backward"||r.value===void 0&&(r.value=e.defaultValue),e.innerType._zod.run(r,o))}),Fs=p("$ZodNonOptional",(t,e)=>{$.init(t,e),E(t._zod,"values",()=>{let r=e.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),t._zod.parse=(r,o)=>{let n=e.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>wm(i,t)):wm(n,t)}});function wm(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}var Ms=p("$ZodSuccess",(t,e)=>{$.init(t,e),t._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Re("ZodSuccess");let n=e.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)}}),Zs=p("$ZodCatch",(t,e)=>{$.init(t,e),t._zod.optin="optional",E(t._zod,"optout",()=>e.innerType._zod.optout),E(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,o)=>{if(o.direction==="backward")return e.innerType._zod.run(r,o);let n=e.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.value,i.issues.length&&(r.value=e.catchValue({...r,error:{issues:i.issues.map(s=>J(s,o,M()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=n.value,n.issues.length&&(r.value=e.catchValue({...r,error:{issues:n.issues.map(i=>J(i,o,M()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),Vs=p("$ZodNaN",(t,e)=>{$.init(t,e),t._zod.parse=(r,o)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:t,expected:"nan",code:"invalid_type"}),r)}),Cr=p("$ZodPipe",(t,e)=>{$.init(t,e),E(t._zod,"values",()=>e.in._zod.values),E(t._zod,"optin",()=>e.in._zod.optin),E(t._zod,"optout",()=>e.out._zod.optout),E(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,o)=>{if(o.direction==="backward"){let i=e.out._zod.run(r,o);return i instanceof Promise?i.then(s=>Sr(s,e.in,o)):Sr(i,e.in,o)}let n=e.in._zod.run(r,o);return n instanceof Promise?n.then(i=>Sr(i,e.out,o)):Sr(n,e.out,o)}});function Sr(t,e,r){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues,fallback:t.fallback},r)}var kn=p("$ZodCodec",(t,e)=>{$.init(t,e),E(t._zod,"values",()=>e.in._zod.values),E(t._zod,"optin",()=>e.in._zod.optin),E(t._zod,"optout",()=>e.out._zod.optout),E(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,o)=>{if((o.direction||"forward")==="forward"){let i=e.in._zod.run(r,o);return i instanceof Promise?i.then(s=>$r(s,e,o)):$r(i,e,o)}else{let i=e.out._zod.run(r,o);return i instanceof Promise?i.then(s=>$r(s,e,o)):$r(i,e,o)}}});function $r(t,e,r){if(t.issues.length)return t.aborted=!0,t;if((r.direction||"forward")==="forward"){let n=e.transform(t.value,t);return n instanceof Promise?n.then(i=>Ir(t,i,e.out,r)):Ir(t,n,e.out,r)}else{let n=e.reverseTransform(t.value,t);return n instanceof Promise?n.then(i=>Ir(t,i,e.in,r)):Ir(t,n,e.in,r)}}function Ir(t,e,r,o){return t.issues.length?(t.aborted=!0,t):r._zod.run({value:e,issues:t.issues},o)}var Bs=p("$ZodPreprocess",(t,e)=>{Cr.init(t,e)}),Hs=p("$ZodReadonly",(t,e)=>{$.init(t,e),E(t._zod,"propValues",()=>e.innerType._zod.propValues),E(t._zod,"values",()=>e.innerType._zod.values),E(t._zod,"optin",()=>e.innerType?._zod?.optin),E(t._zod,"optout",()=>e.innerType?._zod?.optout),t._zod.parse=(r,o)=>{if(o.direction==="backward")return e.innerType._zod.run(r,o);let n=e.innerType._zod.run(r,o);return n instanceof Promise?n.then(Om):Om(n)}});function Om(t){return t.value=Object.freeze(t.value),t}var Ks=p("$ZodTemplateLiteral",(t,e)=>{$.init(t,e);let r=[];for(let o of e.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||jo.has(typeof o))r.push(ue(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);t._zod.pattern=new RegExp(`^${r.join("")}$`),t._zod.parse=(o,n)=>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:e.format??"template_literal",pattern:t._zod.pattern.source}),o)}),Gs=p("$ZodFunction",(t,e)=>($.init(t,e),t._def=e,t._zod.def=e,t.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...o){let n=t._def.input?ur(t._def.input,o):o,i=Reflect.apply(r,this,n);return t._def.output?ur(t._def.output,i):i}},t.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let n=t._def.input?await lr(t._def.input,o):o,i=await Reflect.apply(r,this,n);return t._def.output?await lr(t._def.output,i):i}},t._zod.parse=(r,o)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:t}),r):(t._def.output&&t._def.output._zod.def.type==="promise"?r.value=t.implementAsync(r.value):r.value=t.implement(r.value),r),t.input=(...r)=>{let o=t.constructor;return Array.isArray(r[0])?new o({type:"function",input:new Tr({type:"tuple",items:r[0],rest:r[1]}),output:t._def.output}):new o({type:"function",input:r[0],output:t._def.output})},t.output=r=>{let o=t.constructor;return new o({type:"function",input:t._def.input,output:r})},t)),Ws=p("$ZodPromise",(t,e)=>{$.init(t,e),t._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>e.innerType._zod.run({value:n,issues:[]},o))}),qs=p("$ZodLazy",(t,e)=>{$.init(t,e),E(t._zod,"innerType",()=>{let r=e;return r._cachedInner||(r._cachedInner=e.getter()),r._cachedInner}),E(t._zod,"pattern",()=>t._zod.innerType?._zod?.pattern),E(t._zod,"propValues",()=>t._zod.innerType?._zod?.propValues),E(t._zod,"optin",()=>t._zod.innerType?._zod?.optin??void 0),E(t._zod,"optout",()=>t._zod.innerType?._zod?.optout??void 0),t._zod.parse=(r,o)=>t._zod.innerType._zod.run(r,o)}),Js=p("$ZodCustom",(t,e)=>{z.init(t,e),$.init(t,e),t._zod.parse=(r,o)=>r,t._zod.check=r=>{let o=r.value,n=e.fn(o);if(n instanceof Promise)return n.then(i=>Tm(i,r,o,t));Tm(n,r,o,t)}});function Tm(t,e,r,o){if(!t){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),e.issues.push(dt(n))}}var Sn={};Ie(Sn,{ar:()=>Dm,az:()=>Um,be:()=>jm,bg:()=>Lm,ca:()=>Fm,cs:()=>Mm,da:()=>Zm,de:()=>Vm,el:()=>Bm,en:()=>Pr,eo:()=>Hm,es:()=>Km,fa:()=>Gm,fi:()=>Wm,fr:()=>qm,frCA:()=>Jm,he:()=>Ym,hr:()=>Xm,hu:()=>Qm,hy:()=>tp,id:()=>np,is:()=>rp,it:()=>ip,ja:()=>op,ka:()=>ap,kh:()=>sp,km:()=>Nr,ko:()=>cp,lt:()=>lp,mk:()=>dp,ms:()=>mp,nl:()=>pp,no:()=>fp,ota:()=>gp,pl:()=>_p,ps:()=>hp,pt:()=>vp,ro:()=>bp,ru:()=>kp,sl:()=>xp,sv:()=>Sp,ta:()=>$p,th:()=>Ip,tr:()=>Ep,ua:()=>wp,uk:()=>Rr,ur:()=>Op,uz:()=>Tp,vi:()=>Ap,yo:()=>Np,zhCN:()=>Cp,zhTW:()=>Pp});var Cb=()=>{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 e(n){return t[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=e(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=e(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 Dm(){return{localeError:Cb()}}var Pb=()=>{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 e(n){return t[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=e(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=e(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 Um(){return{localeError:Pb()}}function zm(t,e,r,o){let n=Math.abs(t),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?e:i>=2&&i<=4?r:o}var Nb=()=>{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 e(n){return t[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=e(n.origin);if(s){let c=Number(n.maximum),u=zm(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=e(n.origin);if(s){let c=Number(n.minimum),u=zm(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 jm(){return{localeError:Nb()}}var Rb=()=>{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 e(n){return t[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=e(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=e(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 Lm(){return{localeError:Rb()}}var Db=()=>{let t={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function e(n){return t[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=e(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=e(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 Fm(){return{localeError:Db()}}var Ub=()=>{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 e(n){return t[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=e(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=e(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 Mm(){return{localeError:Ub()}}var zb=()=>{let t={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function e(n){return t[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=e(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=e(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 Zm(){return{localeError:zb()}}var jb=()=>{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 e(n){return t[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=e(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=e(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 Vm(){return{localeError:jb()}}var Lb=()=>{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 e(n){return t[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=e(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=e(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 Bm(){return{localeError:Lb()}}var Fb=()=>{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 e(n){return t[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=e(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=e(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 Pr(){return{localeError:Fb()}}var Mb=()=>{let t={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function e(n){return t[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=e(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=e(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 Hm(){return{localeError:Mb()}}var Zb=()=>{let t={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function e(n){return t[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=e(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=e(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 Km(){return{localeError:Zb()}}var Vb=()=>{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 e(n){return t[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=e(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=e(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 Gm(){return{localeError:Vb()}}var Bb=()=>{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 e(n){return t[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=e(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=e(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:Bb()}}var Hb=()=>{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 e(n){return t[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=e(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=e(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 qm(){return{localeError:Hb()}}var Kb=()=>{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 e(n){return t[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=e(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=e(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 Jm(){return{localeError:Kb()}}var Gb=()=>{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"}},e={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?t[l]:void 0,o=l=>{let d=r(l);return d?d.label:l??t.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?e[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]??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 ${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 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: ${m} \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",A=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} ${x} \u05DC\u05D4\u05DB\u05D9\u05DC ${A}`.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 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: ${m} \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 C=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} ${x} \u05DC\u05D4\u05DB\u05D9\u05DC ${C}`}let A=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} ${x} \u05DC\u05D4\u05DB\u05D9\u05DC ${A}`.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,x=(m?.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${n(l.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function Ym(){return{localeError:Gb()}}var Wb=()=>{let t={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function e(n){return t[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=e(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=e(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 Xm(){return{localeError:Wb()}}var qb=()=>{let t={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function e(n){return t[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=e(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=e(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 Qm(){return{localeError:qb()}}function ep(t,e,r){return Math.abs(t)===1?e:r}function _t(t){if(!t)return"";let e=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=t[t.length-1];return t+(e.includes(r)?"\u0576":"\u0568")}var Jb=()=>{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 e(n){return t[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=e(n.origin);if(s){let c=Number(n.maximum),u=ep(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 ${_t(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 ${_t(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=e(n.origin);if(s){let c=Number(n.minimum),u=ep(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 ${_t(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 ${_t(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 ${_t(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 ${_t(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function tp(){return{localeError:Jb()}}var Yb=()=>{let t={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function e(n){return t[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=e(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=e(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 np(){return{localeError:Yb()}}var Xb=()=>{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 e(n){return t[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=e(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=e(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 rp(){return{localeError:Xb()}}var Qb=()=>{let t={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function e(n){return t[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=e(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=e(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 ip(){return{localeError:Qb()}}var ey=()=>{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 e(n){return t[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=e(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=e(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 op(){return{localeError:ey()}}var ty=()=>{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 e(n){return t[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=e(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=e(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 ap(){return{localeError:ty()}}var ny=()=>{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 e(n){return t[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=e(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=e(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 Nr(){return{localeError:ny()}}function sp(){return Nr()}var ry=()=>{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 e(n){return t[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=e(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=e(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 cp(){return{localeError:ry()}}var xn=t=>t.charAt(0).toUpperCase()+t.slice(1);function up(t){let e=Math.abs(t),r=e%10,o=e%100;return o>=11&&o<=19||r===0?"many":r===1?"one":"few"}var iy=()=>{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 e(n,i,s,c){let u=t[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=e(n.origin,up(Number(n.maximum)),n.inclusive??!1,"smaller");if(s?.verb)return`${xn(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`${xn(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=e(n.origin,up(Number(n.minimum)),n.inclusive??!1,"bigger");if(s?.verb)return`${xn(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`${xn(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`${xn(i??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function lp(){return{localeError:iy()}}var oy=()=>{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 e(n){return t[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=e(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=e(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 dp(){return{localeError:oy()}}var ay=()=>{let t={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function e(n){return t[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=e(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=e(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 mp(){return{localeError:ay()}}var sy=()=>{let t={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function e(n){return t[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=e(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=e(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 pp(){return{localeError:sy()}}var cy=()=>{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 e(n){return t[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=e(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=e(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 fp(){return{localeError:cy()}}var uy=()=>{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 e(n){return t[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=e(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=e(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 gp(){return{localeError:uy()}}var ly=()=>{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 e(n){return t[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=e(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=e(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 hp(){return{localeError:ly()}}var dy=()=>{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 e(n){return t[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=e(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=e(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 _p(){return{localeError:dy()}}var my=()=>{let t={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function e(n){return t[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=e(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=e(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 vp(){return{localeError:my()}}var py=()=>{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 e(n){return t[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=e(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=e(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 bp(){return{localeError:py()}}function yp(t,e,r,o){let n=Math.abs(t),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?e:i>=2&&i<=4?r:o}var fy=()=>{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 e(n){return t[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=e(n.origin);if(s){let c=Number(n.maximum),u=yp(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=e(n.origin);if(s){let c=Number(n.minimum),u=yp(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 kp(){return{localeError:fy()}}var gy=()=>{let t={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function e(n){return t[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=e(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=e(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 xp(){return{localeError:gy()}}var hy=()=>{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 e(n){return t[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=e(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=e(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 Sp(){return{localeError:hy()}}var _y=()=>{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 e(n){return t[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=e(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=e(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 $p(){return{localeError:_y()}}var vy=()=>{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 e(n){return t[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=e(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=e(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 Ip(){return{localeError:vy()}}var by=()=>{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 e(n){return t[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=e(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=e(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 Ep(){return{localeError:by()}}var yy=()=>{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 e(n){return t[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=e(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=e(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 Rr(){return{localeError:yy()}}function wp(){return Rr()}var ky=()=>{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 e(n){return t[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=e(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=e(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 Op(){return{localeError:ky()}}var xy=()=>{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 e(n){return t[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=e(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=e(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 Tp(){return{localeError:xy()}}var Sy=()=>{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 e(n){return t[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=e(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=e(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 Ap(){return{localeError:Sy()}}var $y=()=>{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 e(n){return t[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=e(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=e(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 Cp(){return{localeError:$y()}}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 e(n){return t[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=e(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=e(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 Pp(){return{localeError:Iy()}}var Ey=()=>{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 e(n){return t[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=e(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=e(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 Np(){return{localeError:Ey()}}var Rp,Ys=Symbol("ZodOutput"),Xs=Symbol("ZodInput"),Dr=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...r){let o=r[0];return this._map.set(e,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let r=this._map.get(e);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(e),this}get(e){let r=e._zod.parent;if(r){let o={...this.get(r)??{}};delete o.id;let n={...o,...this._map.get(e)};return Object.keys(n).length?n:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Ur(){return new Dr}(Rp=globalThis).__zod_globalRegistry??(Rp.__zod_globalRegistry=Ur());var K=globalThis.__zod_globalRegistry;function Qs(t,e){return new t({type:"string",...y(e)})}function ec(t,e){return new t({type:"string",coerce:!0,...y(e)})}function zr(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...y(e)})}function $n(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...y(e)})}function jr(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...y(e)})}function Lr(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...y(e)})}function Fr(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...y(e)})}function Mr(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...y(e)})}function In(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...y(e)})}function Zr(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...y(e)})}function Vr(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...y(e)})}function Br(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...y(e)})}function Hr(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...y(e)})}function Kr(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...y(e)})}function Gr(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...y(e)})}function Wr(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...y(e)})}function qr(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...y(e)})}function Jr(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...y(e)})}function tc(t,e){return new t({type:"string",format:"mac",check:"string_format",abort:!1,...y(e)})}function Yr(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...y(e)})}function Xr(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...y(e)})}function Qr(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...y(e)})}function ei(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...y(e)})}function ti(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...y(e)})}function ni(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...y(e)})}var nc={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function rc(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...y(e)})}function ic(t,e){return new t({type:"string",format:"date",check:"string_format",...y(e)})}function oc(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...y(e)})}function ac(t,e){return new t({type:"string",format:"duration",check:"string_format",...y(e)})}function sc(t,e){return new t({type:"number",checks:[],...y(e)})}function cc(t,e){return new t({type:"number",coerce:!0,checks:[],...y(e)})}function uc(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...y(e)})}function lc(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...y(e)})}function dc(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...y(e)})}function mc(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...y(e)})}function pc(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...y(e)})}function fc(t,e){return new t({type:"boolean",...y(e)})}function gc(t,e){return new t({type:"boolean",coerce:!0,...y(e)})}function hc(t,e){return new t({type:"bigint",...y(e)})}function _c(t,e){return new t({type:"bigint",coerce:!0,...y(e)})}function vc(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...y(e)})}function bc(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...y(e)})}function yc(t,e){return new t({type:"symbol",...y(e)})}function kc(t,e){return new t({type:"undefined",...y(e)})}function xc(t,e){return new t({type:"null",...y(e)})}function Sc(t){return new t({type:"any"})}function $c(t){return new t({type:"unknown"})}function Ic(t,e){return new t({type:"never",...y(e)})}function Ec(t,e){return new t({type:"void",...y(e)})}function wc(t,e){return new t({type:"date",...y(e)})}function Oc(t,e){return new t({type:"date",coerce:!0,...y(e)})}function Tc(t,e){return new t({type:"nan",...y(e)})}function ye(t,e){return new kr({check:"less_than",...y(e),value:t,inclusive:!1})}function ae(t,e){return new kr({check:"less_than",...y(e),value:t,inclusive:!0})}function ke(t,e){return new xr({check:"greater_than",...y(e),value:t,inclusive:!1})}function Y(t,e){return new xr({check:"greater_than",...y(e),value:t,inclusive:!0})}function ri(t){return ke(0,t)}function ii(t){return ye(0,t)}function oi(t){return ae(0,t)}function ai(t){return Y(0,t)}function Le(t,e){return new xa({check:"multiple_of",...y(e),value:t})}function Fe(t,e){return new Ia({check:"max_size",...y(e),maximum:t})}function xe(t,e){return new Ea({check:"min_size",...y(e),minimum:t})}function Ye(t,e){return new wa({check:"size_equals",...y(e),size:t})}function Xe(t,e){return new Oa({check:"max_length",...y(e),maximum:t})}function Oe(t,e){return new Ta({check:"min_length",...y(e),minimum:t})}function Qe(t,e){return new Aa({check:"length_equals",...y(e),length:t})}function vt(t,e){return new Ca({check:"string_format",format:"regex",...y(e),pattern:t})}function bt(t){return new Pa({check:"string_format",format:"lowercase",...y(t)})}function yt(t){return new Na({check:"string_format",format:"uppercase",...y(t)})}function kt(t,e){return new Ra({check:"string_format",format:"includes",...y(e),includes:t})}function xt(t,e){return new Da({check:"string_format",format:"starts_with",...y(e),prefix:t})}function St(t,e){return new Ua({check:"string_format",format:"ends_with",...y(e),suffix:t})}function si(t,e,r){return new za({check:"property",property:t,schema:e,...y(r)})}function $t(t,e){return new ja({check:"mime_type",mime:t,...y(e)})}function pe(t){return new La({check:"overwrite",tx:t})}function It(t){return pe(e=>e.normalize(t))}function Et(){return pe(t=>t.trim())}function wt(){return pe(t=>t.toLowerCase())}function Ot(){return pe(t=>t.toUpperCase())}function Tt(){return pe(t=>Do(t))}function Ac(t,e,r){return new t({type:"array",element:e,...y(r)})}function Oy(t,e,r){return new t({type:"union",options:e,...y(r)})}function Ty(t,e,r){return new t({type:"union",options:e,inclusive:!1,...y(r)})}function Ay(t,e,r,o){return new t({type:"union",options:r,discriminator:e,...y(o)})}function Cy(t,e,r){return new t({type:"intersection",left:e,right:r})}function Py(t,e,r,o){let n=r instanceof $,i=n?o:r,s=n?r:null;return new t({type:"tuple",items:e,rest:s,...y(i)})}function Ny(t,e,r,o){return new t({type:"record",keyType:e,valueType:r,...y(o)})}function Ry(t,e,r,o){return new t({type:"map",keyType:e,valueType:r,...y(o)})}function Dy(t,e,r){return new t({type:"set",valueType:e,...y(r)})}function Uy(t,e,r){let o=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new t({type:"enum",entries:o,...y(r)})}function zy(t,e,r){return new t({type:"enum",entries:e,...y(r)})}function jy(t,e,r){return new t({type:"literal",values:Array.isArray(e)?e:[e],...y(r)})}function Cc(t,e){return new t({type:"file",...y(e)})}function Ly(t,e){return new t({type:"transform",transform:e})}function Fy(t,e){return new t({type:"optional",innerType:e})}function My(t,e){return new t({type:"nullable",innerType:e})}function Zy(t,e,r){return new t({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():zo(r)}})}function Vy(t,e,r){return new t({type:"nonoptional",innerType:e,...y(r)})}function By(t,e){return new t({type:"success",innerType:e})}function Hy(t,e,r){return new t({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}function Ky(t,e,r){return new t({type:"pipe",in:e,out:r})}function Gy(t,e){return new t({type:"readonly",innerType:e})}function Wy(t,e,r){return new t({type:"template_literal",parts:e,...y(r)})}function qy(t,e){return new t({type:"lazy",getter:e})}function Jy(t,e){return new t({type:"promise",innerType:e})}function Pc(t,e,r){let o=y(r);return o.abort??(o.abort=!0),new t({type:"custom",check:"custom",fn:e,...o})}function Nc(t,e,r){return new t({type:"custom",check:"custom",fn:e,...y(r)})}function Rc(t,e){let r=Dp(o=>(o.addIssue=n=>{if(typeof n=="string")o.issues.push(dt(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(dt(i))}},t(o.value,o)),e);return r}function Dp(t,e){let r=new z({check:"custom",...y(e)});return r._zod.check=t,r}function Dc(t){let e=new z({check:"describe"});return e._zod.onattach=[r=>{let o=K.get(r)??{};K.add(r,{...o,description:t})}],e._zod.check=()=>{},e}function Uc(t){let e=new z({check:"meta"});return e._zod.onattach=[r=>{let o=K.get(r)??{};K.add(r,{...o,...t})}],e._zod.check=()=>{},e}function zc(t,e){let r=y(e),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=t.Codec??kn,u=t.Boolean??bn,l=t.String??Je,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,x)=>{let A=h;return r.case!=="sensitive"&&(A=A.toLowerCase()),i.has(A)?!0:s.has(A)?!1:(x.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:x.value,inst:g,continue:!1}),{})}),reverseTransform:((h,x)=>h===!0?o[0]||"true":n[0]||"false"),error:r.error});return g}function At(t,e,r,o={}){let n=y(o),i={...y(o),check:"string_format",type:"string",format:e,fn:typeof r=="function"?r:c=>r.test(c),...n};return r instanceof RegExp&&(i.pattern=r),new t(i)}function Me(t){let e=t?.target??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??K,target:e,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 N(t,e,r={path:[],schemaPath:[]}){var o;let n=t._zod.def,i=e.seen.get(t);if(i)return i.count++,r.schemaPath.includes(t)&&(i.cycle=r.path),i.schema;let s={schema:{},count:1,cycle:void 0,path:r.path};e.seen.set(t,s);let c=t._zod.toJSONSchema?.();if(c)s.schema=c;else{let d={...r,schemaPath:[...r.schemaPath,t],path:r.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,s.schema,d);else{let g=s.schema,h=e.processors[n.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);h(t,e,g,d)}let m=t._zod.parent;m&&(s.ref||(s.ref=m),N(m,e,d),e.seen.get(m).isParent=!0)}let u=e.metadataRegistry.get(t);return u&&Object.assign(s.schema,u),e.io==="input"&&X(t)&&(delete s.schema.examples,delete s.schema.default),e.io==="input"&&"_prefault"in s.schema&&((o=s.schema).default??(o.default=s.schema._prefault)),delete s.schema._prefault,e.seen.get(t).schema}function Ze(t,e){let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let s of t.seen.entries()){let c=t.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=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){let m=t.external.registry.get(s[0])?.id,g=t.external.uri??(x=>x);if(m)return{ref:g(m)};let h=s[1].defId??s[1].schema.id??`schema${t.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${t.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(t.cycles==="throw")for(let s of t.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 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 Fe(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 P in l)P==="$ref"||P==="allOf"||P in d||delete l[P];if(S.$ref&&h.def)for(let P in l)P==="$ref"||P==="allOf"||P in h.def&&JSON.stringify(l[P])===JSON.stringify(h.def[P])&&delete l[P]}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:Ot(t,"input",e.processors),output:Ot(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function Y(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 Y(o.element,r);if(o.type==="set")return Y(o.valueType,r);if(o.type==="lazy")return Y(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 Y(o.innerType,r);if(o.type==="intersection")return Y(o.left,r)||Y(o.right,r);if(o.type==="record"||o.type==="map")return Y(o.keyType,r)||Y(o.valueType,r);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Y(o.in,r)||Y(o.out,r);if(o.type==="object"){for(let n in o.shape)if(Y(o.shape[n],r))return!0;return!1}if(o.type==="union"){for(let n of o.options)if(Y(n,r))return!0;return!1}if(o.type==="tuple"){for(let n of o.items)if(Y(n,r))return!0;return!!(o.rest&&Y(o.rest,r))}return!1}var $c=(e,t={})=>r=>{let o=je({...r,processors:t});return N(e,o),Le(o,e),Fe(o,e)},Ot=(e,t,r={})=>o=>{let{libraryOptions:n,target:i}=o??{},s=je({...n??{},target:i,io:t,processors:r});return N(e,s),Le(s,e),Fe(s,e)};var wy={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Ic=(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=wy[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}))])}},Ec=(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)},wc=(e,t,r,o)=>{r.type="boolean"},Oc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Tc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Ac=(e,t,r,o)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},Pc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Nc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Cc=(e,t,r,o)=>{r.not={}},Rc=(e,t,r,o)=>{},Dc=(e,t,r,o)=>{},zc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Uc=(e,t,r,o)=>{let n=e._zod.def,i=en(n.entries);i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),r.enum=i},jc=(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},Lc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Fc=(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},Mc=(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)},Zc=(e,t,r,o)=>{r.type="boolean"},Vc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Bc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Hc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Gc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Kc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Wc=(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"]})},qc=(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)},Xr=(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},Jc=(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},Yc=(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)},Xc=(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)}},Qc=(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"}]},eu=(e,t,r,o)=>{let n=e._zod.def;N(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},tu=(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))},nu=(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)))},ru=(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},iu=(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},ou=(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},au=(e,t,r,o)=>{let n=e._zod.def;N(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},Qr=(e,t,r,o)=>{let n=e._zod.def;N(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},su=(e,t,r,o)=>{let n=e._zod.innerType;N(n,t,o);let i=t.seen.get(e);i.ref=n},Yr={string:Ic,number:Ec,boolean:wc,bigint:Oc,symbol:Tc,null:Ac,undefined:Pc,void:Nc,never:Cc,any:Rc,unknown:Dc,date:zc,enum:Uc,literal:jc,nan:Lc,template_literal:Fc,file:Mc,success:Zc,custom:Vc,function:Bc,transform:Hc,map:Gc,set:Kc,array:Wc,object:qc,union:Xr,intersection:Jc,tuple:Yc,record:Xc,nullable:Qc,nonoptional:eu,default:tu,prefault:nu,catch:ru,pipe:iu,readonly:ou,promise:au,optional:Qr,lazy:su};function ei(e,t){if("_idmap"in e){let o=e,n=je({...t,processors:Yr}),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;Le(n,d),s[l]=Fe(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=je({...t,processors:Yr});return N(e,r),Le(r,e),Fe(r,e)}var ti=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=je({processors:Yr,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)),Le(this.ctx,t);let o=Fe(this.ctx,t),{"~standard":n,...i}=o;return i}};var kp={};var bn={};Se(bn,{ZodAny:()=>Pu,ZodArray:()=>Du,ZodBase64:()=>ki,ZodBase64URL:()=>Si,ZodBigInt:()=>zt,ZodBigIntFormat:()=>Ei,ZodBoolean:()=>Dt,ZodCIDRv4:()=>yi,ZodCIDRv6:()=>xi,ZodCUID:()=>pi,ZodCUID2:()=>fi,ZodCatch:()=>rl,ZodCodec:()=>Pn,ZodCustom:()=>Nn,ZodCustomStringFormat:()=>Ct,ZodDate:()=>En,ZodDefault:()=>Yu,ZodDiscriminatedUnion:()=>Uu,ZodE164:()=>$i,ZodEmail:()=>li,ZodEmoji:()=>di,ZodEnum:()=>Pt,ZodExactOptional:()=>Wu,ZodFile:()=>Gu,ZodFunction:()=>pl,ZodGUID:()=>xn,ZodIPv4:()=>vi,ZodIPv6:()=>bi,ZodIntersection:()=>ju,ZodJWT:()=>Ii,ZodKSUID:()=>_i,ZodLazy:()=>ll,ZodLiteral:()=>Hu,ZodMAC:()=>$u,ZodMap:()=>Vu,ZodNaN:()=>ol,ZodNanoID:()=>mi,ZodNever:()=>Cu,ZodNonOptional:()=>Ni,ZodNull:()=>Tu,ZodNullable:()=>Ju,ZodNumber:()=>Rt,ZodNumberFormat:()=>Qe,ZodObject:()=>On,ZodOptional:()=>Pi,ZodPipe:()=>An,ZodPrefault:()=>Qu,ZodPreprocess:()=>al,ZodPromise:()=>ml,ZodReadonly:()=>sl,ZodRecord:()=>At,ZodSet:()=>Bu,ZodString:()=>Nt,ZodStringFormat:()=>D,ZodSuccess:()=>nl,ZodSymbol:()=>wu,ZodTemplateLiteral:()=>ul,ZodTransform:()=>Ku,ZodTuple:()=>Fu,ZodType:()=>I,ZodULID:()=>gi,ZodURL:()=>In,ZodUUID:()=>xe,ZodUndefined:()=>Ou,ZodUnion:()=>Tn,ZodUnknown:()=>Nu,ZodVoid:()=>Ru,ZodXID:()=>hi,ZodXor:()=>zu,_ZodString:()=>ui,_default:()=>Xu,_function:()=>Nf,any:()=>uf,array:()=>wn,base64:()=>Hp,base64url:()=>Gp,bigint:()=>rf,boolean:()=>Eu,catch:()=>il,check:()=>Cf,cidrv4:()=>Vp,cidrv6:()=>Bp,codec:()=>Of,cuid:()=>Dp,cuid2:()=>zp,custom:()=>Rf,date:()=>df,describe:()=>Df,discriminatedUnion:()=>_f,e164:()=>Kp,email:()=>Ip,emoji:()=>Cp,enum:()=>Ti,exactOptional:()=>qu,file:()=>$f,float32:()=>Qp,float64:()=>ef,function:()=>Nf,guid:()=>Ep,hash:()=>Xp,hex:()=>Yp,hostname:()=>Jp,httpUrl:()=>Np,instanceof:()=>Uf,int:()=>si,int32:()=>tf,int64:()=>of,intersection:()=>Lu,invertCodec:()=>Tf,ipv4:()=>Fp,ipv6:()=>Zp,json:()=>Lf,jwt:()=>Wp,keyof:()=>mf,ksuid:()=>Lp,lazy:()=>dl,literal:()=>Sf,looseObject:()=>gf,looseRecord:()=>bf,mac:()=>Mp,map:()=>yf,meta:()=>zf,nan:()=>wf,nanoid:()=>Rp,nativeEnum:()=>kf,never:()=>wi,nonoptional:()=>tl,null:()=>Au,nullable:()=>Sn,nullish:()=>If,number:()=>Iu,object:()=>pf,optional:()=>kn,partialRecord:()=>vf,pipe:()=>ci,prefault:()=>el,preprocess:()=>Ff,promise:()=>Pf,readonly:()=>cl,record:()=>Zu,refine:()=>fl,set:()=>xf,strictObject:()=>ff,string:()=>yn,stringFormat:()=>qp,stringbool:()=>jf,success:()=>Ef,superRefine:()=>gl,symbol:()=>sf,templateLiteral:()=>Af,transform:()=>Ai,tuple:()=>Mu,uint32:()=>nf,uint64:()=>af,ulid:()=>Up,undefined:()=>cf,union:()=>Oi,unknown:()=>Xe,url:()=>Pp,uuid:()=>wp,uuidv4:()=>Op,uuidv6:()=>Tp,uuidv7:()=>Ap,void:()=>lf,xid:()=>jp,xor:()=>hf});var ni={};Se(ni,{endsWith:()=>yt,gt:()=>be,gte:()=>J,includes:()=>vt,length:()=>Ye,lowercase:()=>ht,lt:()=>ve,lte:()=>re,maxLength:()=>Je,maxSize:()=>Ue,mime:()=>xt,minLength:()=>we,minSize:()=>ye,multipleOf:()=>ze,negative:()=>Kr,nonnegative:()=>qr,nonpositive:()=>Wr,normalize:()=>kt,overwrite:()=>de,positive:()=>Gr,property:()=>Jr,regex:()=>gt,size:()=>qe,slugify:()=>Et,startsWith:()=>bt,toLowerCase:()=>$t,toUpperCase:()=>It,trim:()=>St,uppercase:()=>_t});var Tt={};Se(Tt,{ZodISODate:()=>ii,ZodISODateTime:()=>ri,ZodISODuration:()=>ai,ZodISOTime:()=>oi,date:()=>uu,datetime:()=>cu,duration:()=>du,time:()=>lu});var ri=p("ZodISODateTime",(e,t)=>{La.init(e,t),D.init(e,t)});function cu(e){return Vs(ri,e)}var ii=p("ZodISODate",(e,t)=>{Fa.init(e,t),D.init(e,t)});function uu(e){return Bs(ii,e)}var oi=p("ZodISOTime",(e,t)=>{Ma.init(e,t),D.init(e,t)});function lu(e){return Hs(oi,e)}var ai=p("ZodISODuration",(e,t)=>{Za.init(e,t),D.init(e,t)});function du(e){return Gs(ai,e)}var Sp=(e,t)=>{an.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>cn(e,r)},flatten:{value:r=>sn(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,at,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,at,2)}},isEmpty:{get(){return e.issues.length===0}}})},Ty=p("ZodError",Sp),ee=p("ZodError",Sp,{Parent:Error});var mu=ut(ee),pu=lt(ee),fu=dt(ee),gu=mt(ee),hu=er(ee),_u=tr(ee),vu=nr(ee),bu=rr(ee),yu=ir(ee),xu=or(ee),ku=ar(ee),Su=sr(ee);var $p=new WeakMap;function $n(e,t,r){let o=Object.getPrototypeOf(e),n=$p.get(o);if(n||(n=new Set,$p.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:Ot(e,"input"),output:Ot(e,"output")}}),e.toJSONSchema=$c(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,o)=>mu(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>fu(e,r,o),e.parseAsync=async(r,o)=>pu(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>gu(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>hu(e,r,o),e.decode=(r,o)=>_u(e,r,o),e.encodeAsync=async(r,o)=>vu(e,r,o),e.decodeAsync=async(r,o)=>bu(e,r,o),e.safeEncode=(r,o)=>yu(e,r,o),e.safeDecode=(r,o)=>xu(e,r,o),e.safeEncodeAsync=async(r,o)=>ku(e,r,o),e.safeDecodeAsync=async(r,o)=>Su(e,r,o),$n(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 W(this,r,o)},brand(){return this},register(r,o){return r.add(this,o),this},refine(r,o){return this.check(fl(r,o))},superRefine(r,o){return this.check(gl(r,o))},overwrite(r){return this.check(de(r))},optional(){return kn(this)},exactOptional(){return qu(this)},nullable(){return Sn(this)},nullish(){return kn(Sn(this))},nonoptional(r){return tl(this,r)},array(){return wn(this)},or(r){return Oi([this,r])},and(r){return Lu(this,r)},transform(r){return ci(this,Ai(r))},default(r){return Xu(this,r)},prefault(r){return el(this,r)},catch(r){return il(this,r)},pipe(r){return ci(this,r)},readonly(){return cl(this)},describe(r){let o=this.clone();return H.add(o,{description:r}),o},meta(...r){if(r.length===0)return H.get(this);let o=this.clone();return H.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 H.get(e)?.description},configurable:!0}),e)),ui=p("_ZodString",(e,t)=>{We.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Ic(e,o,n,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,$n(e,"_ZodString",{regex(...o){return this.check(gt(...o))},includes(...o){return this.check(vt(...o))},startsWith(...o){return this.check(bt(...o))},endsWith(...o){return this.check(yt(...o))},min(...o){return this.check(we(...o))},max(...o){return this.check(Je(...o))},length(...o){return this.check(Ye(...o))},nonempty(...o){return this.check(we(1,...o))},lowercase(o){return this.check(ht(o))},uppercase(o){return this.check(_t(o))},trim(){return this.check(St())},normalize(...o){return this.check(kt(...o))},toLowerCase(){return this.check($t())},toUpperCase(){return this.check(It())},slugify(){return this.check(Et())}})}),Nt=p("ZodString",(e,t)=>{We.init(e,t),ui.init(e,t),e.email=r=>e.check(Er(li,r)),e.url=r=>e.check(vn(In,r)),e.jwt=r=>e.check(Hr(Ii,r)),e.emoji=r=>e.check(Pr(di,r)),e.guid=r=>e.check(_n(xn,r)),e.uuid=r=>e.check(wr(xe,r)),e.uuidv4=r=>e.check(Or(xe,r)),e.uuidv6=r=>e.check(Tr(xe,r)),e.uuidv7=r=>e.check(Ar(xe,r)),e.nanoid=r=>e.check(Nr(mi,r)),e.guid=r=>e.check(_n(xn,r)),e.cuid=r=>e.check(Cr(pi,r)),e.cuid2=r=>e.check(Rr(fi,r)),e.ulid=r=>e.check(Dr(gi,r)),e.base64=r=>e.check(Zr(ki,r)),e.base64url=r=>e.check(Vr(Si,r)),e.xid=r=>e.check(zr(hi,r)),e.ksuid=r=>e.check(Ur(_i,r)),e.ipv4=r=>e.check(jr(vi,r)),e.ipv6=r=>e.check(Lr(bi,r)),e.cidrv4=r=>e.check(Fr(yi,r)),e.cidrv6=r=>e.check(Mr(xi,r)),e.e164=r=>e.check(Br($i,r)),e.datetime=r=>e.check(cu(r)),e.date=r=>e.check(uu(r)),e.time=r=>e.check(lu(r)),e.duration=r=>e.check(du(r))});function yn(e){return Ls(Nt,e)}var D=p("ZodStringFormat",(e,t)=>{R.init(e,t),ui.init(e,t)}),li=p("ZodEmail",(e,t)=>{Aa.init(e,t),D.init(e,t)});function Ip(e){return Er(li,e)}var xn=p("ZodGUID",(e,t)=>{Oa.init(e,t),D.init(e,t)});function Ep(e){return _n(xn,e)}var xe=p("ZodUUID",(e,t)=>{Ta.init(e,t),D.init(e,t)});function wp(e){return wr(xe,e)}function Op(e){return Or(xe,e)}function Tp(e){return Tr(xe,e)}function Ap(e){return Ar(xe,e)}var In=p("ZodURL",(e,t)=>{Pa.init(e,t),D.init(e,t)});function Pp(e){return vn(In,e)}function Np(e){return vn(In,{protocol:ne.httpProtocol,hostname:ne.domain,...b.normalizeParams(e)})}var di=p("ZodEmoji",(e,t)=>{Na.init(e,t),D.init(e,t)});function Cp(e){return Pr(di,e)}var mi=p("ZodNanoID",(e,t)=>{Ca.init(e,t),D.init(e,t)});function Rp(e){return Nr(mi,e)}var pi=p("ZodCUID",(e,t)=>{Ra.init(e,t),D.init(e,t)});function Dp(e){return Cr(pi,e)}var fi=p("ZodCUID2",(e,t)=>{Da.init(e,t),D.init(e,t)});function zp(e){return Rr(fi,e)}var gi=p("ZodULID",(e,t)=>{za.init(e,t),D.init(e,t)});function Up(e){return Dr(gi,e)}var hi=p("ZodXID",(e,t)=>{Ua.init(e,t),D.init(e,t)});function jp(e){return zr(hi,e)}var _i=p("ZodKSUID",(e,t)=>{ja.init(e,t),D.init(e,t)});function Lp(e){return Ur(_i,e)}var vi=p("ZodIPv4",(e,t)=>{Va.init(e,t),D.init(e,t)});function Fp(e){return jr(vi,e)}var $u=p("ZodMAC",(e,t)=>{Ha.init(e,t),D.init(e,t)});function Mp(e){return Ms($u,e)}var bi=p("ZodIPv6",(e,t)=>{Ba.init(e,t),D.init(e,t)});function Zp(e){return Lr(bi,e)}var yi=p("ZodCIDRv4",(e,t)=>{Ga.init(e,t),D.init(e,t)});function Vp(e){return Fr(yi,e)}var xi=p("ZodCIDRv6",(e,t)=>{Ka.init(e,t),D.init(e,t)});function Bp(e){return Mr(xi,e)}var ki=p("ZodBase64",(e,t)=>{qa.init(e,t),D.init(e,t)});function Hp(e){return Zr(ki,e)}var Si=p("ZodBase64URL",(e,t)=>{Ja.init(e,t),D.init(e,t)});function Gp(e){return Vr(Si,e)}var $i=p("ZodE164",(e,t)=>{Ya.init(e,t),D.init(e,t)});function Kp(e){return Br($i,e)}var Ii=p("ZodJWT",(e,t)=>{Xa.init(e,t),D.init(e,t)});function Wp(e){return Hr(Ii,e)}var Ct=p("ZodCustomStringFormat",(e,t)=>{Qa.init(e,t),D.init(e,t)});function qp(e,t,r={}){return wt(Ct,e,t,r)}function Jp(e){return wt(Ct,"hostname",ne.hostname,e)}function Yp(e){return wt(Ct,"hex",ne.hex,e)}function Xp(e,t){let r=t?.enc??"hex",o=`${e}_${r}`,n=ne[o];if(!n)throw new Error(`Unrecognized hash format: ${o}`);return wt(Ct,o,n,t)}var Rt=p("ZodNumber",(e,t)=>{hr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Ec(e,o,n,i),$n(e,"ZodNumber",{gt(o,n){return this.check(be(o,n))},gte(o,n){return this.check(J(o,n))},min(o,n){return this.check(J(o,n))},lt(o,n){return this.check(ve(o,n))},lte(o,n){return this.check(re(o,n))},max(o,n){return this.check(re(o,n))},int(o){return this.check(si(o))},safe(o){return this.check(si(o))},positive(o){return this.check(be(0,o))},nonnegative(o){return this.check(J(0,o))},negative(o){return this.check(ve(0,o))},nonpositive(o){return this.check(re(0,o))},multipleOf(o,n){return this.check(ze(o,n))},step(o,n){return this.check(ze(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 Iu(e){return Ks(Rt,e)}var Qe=p("ZodNumberFormat",(e,t)=>{es.init(e,t),Rt.init(e,t)});function si(e){return qs(Qe,e)}function Qp(e){return Js(Qe,e)}function ef(e){return Ys(Qe,e)}function tf(e){return Xs(Qe,e)}function nf(e){return Qs(Qe,e)}var Dt=p("ZodBoolean",(e,t)=>{mn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>wc(e,r,o,n)});function Eu(e){return ec(Dt,e)}var zt=p("ZodBigInt",(e,t)=>{_r.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Oc(e,o,n,i),e.gte=(o,n)=>e.check(J(o,n)),e.min=(o,n)=>e.check(J(o,n)),e.gt=(o,n)=>e.check(be(o,n)),e.gte=(o,n)=>e.check(J(o,n)),e.min=(o,n)=>e.check(J(o,n)),e.lt=(o,n)=>e.check(ve(o,n)),e.lte=(o,n)=>e.check(re(o,n)),e.max=(o,n)=>e.check(re(o,n)),e.positive=o=>e.check(be(BigInt(0),o)),e.negative=o=>e.check(ve(BigInt(0),o)),e.nonpositive=o=>e.check(re(BigInt(0),o)),e.nonnegative=o=>e.check(J(BigInt(0),o)),e.multipleOf=(o,n)=>e.check(ze(o,n));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function rf(e){return nc(zt,e)}var Ei=p("ZodBigIntFormat",(e,t)=>{ts.init(e,t),zt.init(e,t)});function of(e){return ic(Ei,e)}function af(e){return oc(Ei,e)}var wu=p("ZodSymbol",(e,t)=>{ns.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Tc(e,r,o,n)});function sf(e){return ac(wu,e)}var Ou=p("ZodUndefined",(e,t)=>{rs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Pc(e,r,o,n)});function cf(e){return sc(Ou,e)}var Tu=p("ZodNull",(e,t)=>{is.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ac(e,r,o,n)});function Au(e){return cc(Tu,e)}var Pu=p("ZodAny",(e,t)=>{os.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Rc(e,r,o,n)});function uf(){return uc(Pu)}var Nu=p("ZodUnknown",(e,t)=>{as.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Dc(e,r,o,n)});function Xe(){return lc(Nu)}var Cu=p("ZodNever",(e,t)=>{ss.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Cc(e,r,o,n)});function wi(e){return dc(Cu,e)}var Ru=p("ZodVoid",(e,t)=>{cs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Nc(e,r,o,n)});function lf(e){return mc(Ru,e)}var En=p("ZodDate",(e,t)=>{us.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>zc(e,o,n,i),e.min=(o,n)=>e.check(J(o,n)),e.max=(o,n)=>e.check(re(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 df(e){return pc(En,e)}var Du=p("ZodArray",(e,t)=>{ls.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Wc(e,r,o,n),e.element=t.element,$n(e,"ZodArray",{min(r,o){return this.check(we(r,o))},nonempty(r){return this.check(we(1,r))},max(r,o){return this.check(Je(r,o))},length(r,o){return this.check(Ye(r,o))},unwrap(){return this.element}})});function wn(e,t){return hc(Du,e,t)}function mf(e){let t=e._zod.def.shape;return Ti(Object.keys(t))}var On=p("ZodObject",(e,t)=>{ds.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>qc(e,r,o,n),b.defineLazy(e,"shape",()=>t.shape),$n(e,"ZodObject",{keyof(){return Ti(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:Xe()})},loose(){return this.clone({...this._zod.def,catchall:Xe()})},strict(){return this.clone({...this._zod.def,catchall:wi()})},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(Pi,this,r[0])},required(...r){return b.required(Ni,this,r[0])}})});function pf(e,t){let r={type:"object",shape:e??{},...b.normalizeParams(t)};return new On(r)}function ff(e,t){return new On({type:"object",shape:e,catchall:wi(),...b.normalizeParams(t)})}function gf(e,t){return new On({type:"object",shape:e,catchall:Xe(),...b.normalizeParams(t)})}var Tn=p("ZodUnion",(e,t)=>{pn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Xr(e,r,o,n),e.options=t.options});function Oi(e,t){return new Tn({type:"union",options:e,...b.normalizeParams(t)})}var zu=p("ZodXor",(e,t)=>{Tn.init(e,t),ms.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Xr(e,r,o,n),e.options=t.options});function hf(e,t){return new zu({type:"union",options:e,inclusive:!1,...b.normalizeParams(t)})}var Uu=p("ZodDiscriminatedUnion",(e,t)=>{Tn.init(e,t),ps.init(e,t)});function _f(e,t,r){return new Uu({type:"union",options:t,discriminator:e,...b.normalizeParams(r)})}var ju=p("ZodIntersection",(e,t)=>{fs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Jc(e,r,o,n)});function Lu(e,t){return new ju({type:"intersection",left:e,right:t})}var Fu=p("ZodTuple",(e,t)=>{vr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Yc(e,r,o,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});function Mu(e,t,r){let o=t instanceof $,n=o?r:t,i=o?t:null;return new Fu({type:"tuple",items:e,rest:i,...b.normalizeParams(n)})}var At=p("ZodRecord",(e,t)=>{gs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Xc(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType});function Zu(e,t,r){return!t||!t._zod?new At({type:"record",keyType:yn(),valueType:e,...b.normalizeParams(t)}):new At({type:"record",keyType:e,valueType:t,...b.normalizeParams(r)})}function vf(e,t,r){let o=W(e);return o._zod.values=void 0,new At({type:"record",keyType:o,valueType:t,...b.normalizeParams(r)})}function bf(e,t,r){return new At({type:"record",keyType:e,valueType:t,mode:"loose",...b.normalizeParams(r)})}var Vu=p("ZodMap",(e,t)=>{hs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Gc(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(ye(...r)),e.nonempty=r=>e.check(ye(1,r)),e.max=(...r)=>e.check(Ue(...r)),e.size=(...r)=>e.check(qe(...r))});function yf(e,t,r){return new Vu({type:"map",keyType:e,valueType:t,...b.normalizeParams(r)})}var Bu=p("ZodSet",(e,t)=>{_s.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Kc(e,r,o,n),e.min=(...r)=>e.check(ye(...r)),e.nonempty=r=>e.check(ye(1,r)),e.max=(...r)=>e.check(Ue(...r)),e.size=(...r)=>e.check(qe(...r))});function xf(e,t){return new Bu({type:"set",valueType:e,...b.normalizeParams(t)})}var Pt=p("ZodEnum",(e,t)=>{vs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Uc(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 Pt({...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 Pt({...t,checks:[],...b.normalizeParams(n),entries:i})}});function Ti(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Pt({type:"enum",entries:r,...b.normalizeParams(t)})}function kf(e,t){return new Pt({type:"enum",entries:e,...b.normalizeParams(t)})}var Hu=p("ZodLiteral",(e,t)=>{bs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>jc(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 Sf(e,t){return new Hu({type:"literal",values:Array.isArray(e)?e:[e],...b.normalizeParams(t)})}var Gu=p("ZodFile",(e,t)=>{ys.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Mc(e,r,o,n),e.min=(r,o)=>e.check(ye(r,o)),e.max=(r,o)=>e.check(Ue(r,o)),e.mime=(r,o)=>e.check(xt(Array.isArray(r)?r:[r],o))});function $f(e){return _c(Gu,e)}var Ku=p("ZodTransform",(e,t)=>{xs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Hc(e,r,o,n),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Pe(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 Ai(e){return new Ku({type:"transform",transform:e})}var Pi=p("ZodOptional",(e,t)=>{br.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Qr(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function kn(e){return new Pi({type:"optional",innerType:e})}var Wu=p("ZodExactOptional",(e,t)=>{ks.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Qr(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function qu(e){return new Wu({type:"optional",innerType:e})}var Ju=p("ZodNullable",(e,t)=>{Ss.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 Sn(e){return new Ju({type:"nullable",innerType:e})}function If(e){return kn(Sn(e))}var Yu=p("ZodDefault",(e,t)=>{$s.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>tu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Xu(e,t){return new Yu({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():b.shallowClone(t)}})}var Qu=p("ZodPrefault",(e,t)=>{Is.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>nu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function el(e,t){return new Qu({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():b.shallowClone(t)}})}var Ni=p("ZodNonOptional",(e,t)=>{Es.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>eu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function tl(e,t){return new Ni({type:"nonoptional",innerType:e,...b.normalizeParams(t)})}var nl=p("ZodSuccess",(e,t)=>{ws.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Zc(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Ef(e){return new nl({type:"success",innerType:e})}var rl=p("ZodCatch",(e,t)=>{Os.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ru(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function il(e,t){return new rl({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var ol=p("ZodNaN",(e,t)=>{Ts.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Lc(e,r,o,n)});function wf(e){return gc(ol,e)}var An=p("ZodPipe",(e,t)=>{yr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>iu(e,r,o,n),e.in=t.in,e.out=t.out});function ci(e,t){return new An({type:"pipe",in:e,out:t})}var Pn=p("ZodCodec",(e,t)=>{An.init(e,t),fn.init(e,t)});function Of(e,t,r){return new Pn({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function Tf(e){let t=e._zod.def;return new Pn({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var al=p("ZodPreprocess",(e,t)=>{An.init(e,t),As.init(e,t)}),sl=p("ZodReadonly",(e,t)=>{Ps.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ou(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function cl(e){return new sl({type:"readonly",innerType:e})}var ul=p("ZodTemplateLiteral",(e,t)=>{Ns.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Fc(e,r,o,n)});function Af(e,t){return new ul({type:"template_literal",parts:e,...b.normalizeParams(t)})}var ll=p("ZodLazy",(e,t)=>{Ds.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>su(e,r,o,n),e.unwrap=()=>e._zod.def.getter()});function dl(e){return new ll({type:"lazy",getter:e})}var ml=p("ZodPromise",(e,t)=>{Rs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>au(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Pf(e){return new ml({type:"promise",innerType:e})}var pl=p("ZodFunction",(e,t)=>{Cs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Bc(e,r,o,n)});function Nf(e){return new pl({type:"function",input:Array.isArray(e?.input)?Mu(e?.input):e?.input??wn(Xe()),output:e?.output??Xe()})}var Nn=p("ZodCustom",(e,t)=>{zs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Vc(e,r,o,n)});function Cf(e){let t=new U({check:"custom"});return t._zod.check=e,t}function Rf(e,t){return vc(Nn,e??(()=>!0),t)}function fl(e,t={}){return bc(Nn,e,t)}function gl(e,t){return yc(e,t)}var Df=xc,zf=kc;function Uf(e,t={}){let r=new Nn({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 jf=(...e)=>Sc({Codec:Pn,Boolean:Dt,String:Nt},...e);function Lf(e){let t=dl(()=>Oi([yn(e),Iu(),Eu(),Au(),wn(t),Zu(yn(),t)]));return t}function Ff(e,t){return new al({type:"pipe",in:Ai(e),out:t})}var Py={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 Ny(e){M({customError:e})}function Cy(){return M().customError}var hl;hl||(hl={});var x={...bn,...ni,iso:Tt},Ry=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 Dy(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 zy(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 Mf(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=zy(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 Mf(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=Mf(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))Ry.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 Zf(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=Dy(r,t?.defaultTarget),n=r.$defs||r.definitions||{},i={version:o,defs:n,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??H};return G(r,i)}var _l={};Se(_l,{bigint:()=>Fy,boolean:()=>Ly,date:()=>My,number:()=>jy,string:()=>Uy});function Uy(e){return Fs(Nt,e)}function jy(e){return Ws(Rt,e)}function Ly(e){return tc(Dt,e)}function Fy(e){return rc(zt,e)}function My(e){return fc(En,e)}M(xr());var Vf=a.enum(["SUM","COUNT","MAX","UNIQUE_COUNT","LATEST"]),vl=a.object({d:a.number().int().nonnegative(),w:a.number().int().positive(),c:a.number().nonnegative(),agg:Vf.default("COUNT").optional(),valueProperty:a.string().optional(),uniqueProperty:a.string().optional()}),Zy=a.object({kind:a.literal("credential_validity")}),Vy=a.object({kind:a.literal("track_only_bypass")}),By=a.object({kind:a.literal("lifecycle_block"),blockOn:a.array(a.string()).default(["SUSPENDED","CANCELLED","INACTIVE"]),code:a.string().default("subscription_inactive")}),Hy=a.object({kind:a.literal("identity_requirement"),require:a.enum(["org_only","org_and_user"]).default("org_only")}),Gy=a.object({kind:a.literal("scope"),requireExplicit:a.boolean().default(!0)}),Ky=a.object({kind:a.literal("feature_gate"),feature:a.string().min(1).max(120)}),Wy=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`"}),qy=a.enum(["fixed_window","sliding_window","token_bucket"]),Jy=vl.extend({kind:a.literal("rate_limit"),m:a.enum(["e","t"]).default("e"),strategy:qy.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"]}))}),Yy=a.enum(["fixed_window","sliding_window"]),Xy=vl.extend({kind:a.literal("quota"),ovr:a.enum(["BLOCK","ALLOW_AND_BILL"]),strategy:Yy.default("fixed_window")}),Qy=vl.extend({kind:a.literal("credit_balance"),ovr:a.enum(["BLOCK","ALLOW_AND_BILL"])}),ex=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)}),tx=a.object({kind:a.literal("capability_limit"),capability:a.string().min(1).max(120),limit:a.union([a.number().int().nonnegative(),a.boolean()])}),nx=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()}),rx=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)}),bl=a.discriminatedUnion("kind",[Zy,Vy,By,Hy,Gy,Ky,Wy,Jy,Xy,Qy,tx,nx,ex,rx]);var rT=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 Bf=a.object({unit:a.enum(["requests","tokens","computeMs","dollars"]),window:a.enum(["second","minute","hour","day","week","month"]),capacity:a.number()}),ix=a.object({id:a.string().min(1),slug:a.string().optional(),transportMode:a.enum(["direct","tunnel"]),verificationRequired:a.boolean().optional(),originUrl:a.string().optional(),originHostname:a.string().optional(),accessCredentialRef:a.string().optional(),policyVersion:a.string().optional()}),iT=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(Bf).readonly().optional(),userLimits:a.array(Bf).readonly().optional(),environmentId:a.string().optional(),contextTokenSecret:a.string().nullable().optional(),timeoutMs:a.number().positive().optional(),idleTimeoutMs:a.number().positive().optional(),backends:a.array(ix).optional(),defaultBackendId:a.string().optional(),verificationRequired:a.boolean().optional()});var ox=a.object({perRequestMinUnitsByDim:a.record(a.string(),a.number()).optional(),creditPoolMicros:a.number().optional(),perDimUnitCostMicros:a.record(a.string(),a.number()).optional()}),ax=a.object({source:a.enum(["fixed","provider_catalog"]),meterKey:a.string(),selector:a.string().optional(),measures:a.array(a.string()),catalog:a.string().optional(),pricePolicy:a.string().optional(),markupPercent:a.number().optional(),fixedRatesMicros:a.record(a.string(),a.record(a.string(),a.number())).optional()}),sx=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()}),cx=a.object({feature:a.string(),method:a.string(),path:a.string(),meters:a.array(a.string()).optional()}),oT=a.object({v:a.number(),sub:a.string(),compiledPlanId:a.string().min(1),planType:a.string(),ts:a.number(),constraints:a.array(bl),cv:a.number(),dm:a.record(a.string(),a.number()),dmv:a.number().optional(),floor:ox.nullable().optional(),displayDims:a.array(a.number()).optional(),meterSemantics:a.record(a.string(),sx).optional(),rp:a.record(a.string(),ax).optional(),fr:a.array(cx).optional(),sig:a.string().min(1),sigKid:a.string().optional(),environmentId:a.string().optional()}).passthrough();var aT=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({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 ux=["DRAFT","ACTIVE"],uT=a.enum(ux),lx=["ONBOARDING","ACTIVE","SUSPENDED"],Hf=a.enum(lx),dx=["ACTIVE","REVOKED"],lT=a.enum(dx),mx=["BLOCK","ALLOW_AND_BILL"],Gf=a.enum(mx),px=["ACTIVE","ARCHIVED"],dT=a.enum(px),fx=["ACTIVE","EXPERIMENTAL","LEGACY_STABLE","PHASING_OUT","SUPERSEDED","ARCHIVED"],mT=a.enum(fx);var Ci=[{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/backend 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/backend.",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/backend. 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/backend reports.",meters:[{key:"requests",display:"Requests",unit:"request"},{key:"compute_ms",display:"Compute Time",unit:"ms"}]}];function Kf(e){let t=e.trim().toLowerCase();return Ci.find(r=>r.id===t)}function Wf(){return Ci.map(e=>e.id)}var gx="FS_RUNTIME_TOKEN";var hx={payload:"x-fs-metering",signature:"x-fs-metering-sig",token:"x-fs-metering-token"};var _T={environmentVariable:gx,presentation:hx.token,storage:"sha256-hash-only"};var qf={missingSignature:"missing_signature",malformedSignature:"malformed_signature",unknownKeyId:"unknown_key_id",jwksUnavailable:"jwks_unavailable",badSignature:"bad_signature",bodyHashMismatch:"body_hash_mismatch",routeMismatch:"route_mismatch",clockSkew:"clock_skew",expiredSignature:"expired_signature",replayedNonce:"replayed_nonce",bodyTooLarge:"body_too_large",environmentMismatch:"environment_mismatch",missingToken:"missing_token",invalidToken:"invalid_token"};var vT=10*1024*1024;var _x=["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","MIN_SPEND_TRUE_UP"],xT=a.enum(_x);var IT=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 vx=a.object({d:a.number(),w:a.number(),capacity:a.number(),remaining:a.number(),windowStart:a.number(),windowEnd:a.number()}),bx=a.record(a.string(),vx),yx=a.object({allocations:a.array(a.number()),expiresAt:a.number()}),xx=a.record(a.string(),yx),kx=a.record(a.string(),a.bigint()),AT=a.object({subscriptionId:a.string(),handoffToken:a.string(),targetShardId:a.string(),policyVersion:a.number(),entitlementVersion:a.number().nullable(),windowStates:bx,activeLeases:xx,totalsByDimension:kx.optional(),billingCycleId:a.string().nullable().optional(),billingCycleStartMs:a.number().optional()});var Sx={gatewayProjectRead:"gateway:project:read",gatewayResourceWrite:"gateway:resource:write",usageWrite:"usage:write",authzDeniedWrite:"authz-denied:write",reservationAuthorize:"reservation:authorize",reservationFinalize:"reservation:finalize",internalCronRun:"internal:cron:run",personaManage:"persona:manage"},DT=Object.values(Sx);var $x=["managed_frontend","custom_frontend","embedded_sdk","public_api","cli","agent","webhook","admin","internal"],Yf=a.enum($x),Jf=a.string().min(1).max(128),Ix=a.object({d:a.number().int().nonnegative(),w:a.number().int().positive(),rem:a.number(),cap:a.number()}).strict(),Xf=a.object({v:a.literal(1),entV:a.number().int().nonnegative().optional(),entHash:Jf.optional(),featureGrant:a.boolean().optional(),gates:a.array(Jf).max(16).optional(),limits:a.array(Ix).max(16).optional()}).strict();var Ex=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:Hf,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:Gf.optional(),environment:a.enum(["production","sandbox"]).optional(),surface:Yf.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:Xf.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 wx=a.object({path:a.string(),code:a.string(),message:a.string()}),BT=a.object({reason:a.literal("schema_validation_failed"),receivedAt:a.string(),rawPayload:a.unknown(),issues:a.array(wx),consumerVersion:a.string().optional(),originalMessageId:a.string().optional()});var yl=["subscription.created","subscription.updated","subscription.canceled","payment.succeeded","payment.failed","rate_limit.exceeded","entitlement.changed","usage.threshold_reached"],Ut=a.enum(yl);var me=a.enum(["immediate","period_end"]),Cn=a.object({default:me.default("period_end"),when:a.object({price_increase:me.optional(),price_decrease:me.optional(),feature_added:me.optional(),feature_removed:me.optional(),limit_increased:me.optional(),limit_reduced:me.optional(),credit_increased:me.optional(),credit_reduced:me.optional(),rating_changed:me.optional()}).strict().default({price_increase:"period_end",price_decrease:"immediate",feature_added:"immediate",feature_removed:"period_end",limit_increased:"immediate",limit_reduced:"period_end",credit_increased:"immediate",credit_reduced:"period_end",rating_changed:"period_end"}),allowImmediatePriceIncrease:a.boolean().default(!1),allowImmediateEntitlementReduction:a.boolean().default(!1)}).strict().superRefine((e,t)=>{(e.when.price_increase??e.default)==="immediate"&&!e.allowImmediatePriceIncrease&&t.addIssue({code:"custom",path:["when","price_increase"],message:"price_increase cannot switch immediately without allowImmediatePriceIncrease: true"});for(let r of["feature_removed","limit_reduced","credit_reduced"])(e.when[r]??e.default)==="immediate"&&!e.allowImmediateEntitlementReduction&&t.addIssue({code:"custom",path:["when",r],message:`${r} cannot switch immediately without allowImmediateEntitlementReduction: true`})});var Ox=a.object({kind:a.literal("credit"),amount_cents:a.number().int().nonnegative(),recurs:a.boolean().optional(),expires_after_days:a.number().int().positive().optional(),label:a.string().min(1).max(120).optional()}),Tx=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()}),pe=a.discriminatedUnion("kind",[Ox,Tx]);function Qf(e){return e.kind==="credit"&&e.recurs===!0&&e.label===void 0}function eg(e){return e.kind==="credit"&&e.recurs!==!0&&e.label===void 0}function xl(e,t,r=["grants"]){if(!e)return;let o=0,n=0;for(let i of e)Qf(i)?o+=1:eg(i)&&(n+=1);o>1&&t.addIssue({code:"custom",message:"At most one recurring `credit` grant (recurs:true, no label) is allowed \u2014 recurring credit is a single canonical entry.",path:r}),n>1&&t.addIssue({code:"custom",message:"At most one one-time `credit` grant (recurs:false, no label) is allowed \u2014 one-time credit is a single canonical entry.",path:r})}function tg(e){return e.grants&&e.grants.length>0?[...e.grants]:[]}function Rn(e){return tg(e).find(Qf)?.amount_cents??0}function jt(e){return tg(e).find(eg)?.amount_cents??0}var Ax=a.object({percent:a.number().int().min(0).max(100)}),Px=a.object({threshold_cents:a.number().int().nonnegative(),refill_cents:a.number().int().positive()}),Te=a.object({rollover:Ax.optional(),auto_recharge:Px.optional()});var ng=a.enum(["linear","active_count"]);var Nx=a.object({up_to:a.number().int().positive().nullable(),price_per_unit_micros:a.number().int().nonnegative()}),Cx=a.object({strategy:a.enum(["graduated","volume"]),tiers:a.array(Nx).min(1).max(20)}),fe=a.object({dimension:a.string().min(1).max(64).regex(/^[a-z0-9_]+$/,"Meter dimension must be lowercase alphanumeric with underscores"),kind:ng.default("linear"),price_per_unit_micros:a.number().int().nonnegative().default(0),tiered:Cx.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"]})}}),Ae=a.enum(["month","year"]),Rx=a.object({meters:a.array(fe).default([]),recurring_fee_cents:a.number().int().nonnegative().default(0),billing_interval:Ae.default("month"),grants:a.array(pe).max(40).default([]),creditPolicy:Te.optional(),trial_days:a.number().int().nonnegative().default(0),max_monthly_spend_cents:a.number().int().nonnegative().optional()});var Dx=a.string().min(1),zx=a.object({type:a.literal("named"),name:a.enum(["second","minute","hour","day","week","month"])}),Ux=a.object({type:a.literal("custom"),seconds:a.number().int().positive(),label:a.string().optional()}),jx=a.discriminatedUnion("type",[zx,Ux]),Me=a.object({dimension:Dx,window:jx,capacity:a.number().nonnegative(),enforcement:a.enum(["enforce","track"]).optional(),acknowledgeUnreachable:a.boolean().optional()}),oA=a.array(Me).max(20);var Lx=a.enum(["NONE","PRORATE","CREDIT"]).default("NONE"),Fx={meters:a.array(fe).default([]),recurring_fee_cents:a.number().int().nonnegative().default(0),billing_interval:Ae.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(pe).max(40).default([]),creditPolicy:Te.optional()},Mx={meters:a.array(fe).optional(),recurring_fee_cents:a.number().int().nonnegative().optional(),billing_interval:Ae.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(pe).max(40).optional(),creditPolicy:Te.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:Lx,...Mx,limits:a.array(Me).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()}),rg=Zx.superRefine((e,t)=>{xl(e.grants,t)}),ig=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(),...Fx,free:a.boolean().default(!1),limits:a.array(Me).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(rg).max(4).optional(),archive:a.object({at:a.string().datetime().optional(),transitionTo:a.string().optional(),strategy:a.enum(["auto","explicit","block"]).default("auto")}).optional()}),Ri=ig.superRefine((e,t)=>{xl(e.grants,t)});var Vx=/^\$\{[A-Z][A-Z0-9_]{0,127}\}$/,kl=a.string().min(3).max(200).refine(e=>Vx.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."}),Sl=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:kl,events:a.array(Ut).min(1,"webhooks.endpoints[].events must subscribe to \u2265 1 event"),enabled:a.boolean().default(!0),retryPolicy:Sl.default({maxAttempts:5,backoff:"exponential"})}),Il=a.object({endpoints:a.array($l).max(50).default([])});var Bx=a.object({meters:a.array(fe).optional(),recurring_fee_cents:a.number().int().nonnegative().optional(),billing_interval:Ae.optional(),grants:a.array(pe).max(40).optional(),creditPolicy:Te.optional(),trial_days:a.number().int().nonnegative().optional(),max_monthly_spend_cents:a.number().int().nonnegative().optional(),limits:a.array(Me).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(),Hx=a.object({url:a.string().url().optional(),secret:kl.optional(),events:a.array(Ut).optional(),enabled:a.boolean().optional(),retryPolicy:Sl.partial().optional()}).strict(),Gx=a.object({plans:a.record(a.string(),Bx).optional(),webhooks:a.object({endpoints:a.record(a.string(),Hx).optional()}).strict().optional()}).strict(),El=a.record(a.string().min(1).max(64),Gx);var og=1,ag=["plans_table","usage_card","api_keys_panel","billing_summary","credit_balance","feature_panel","product_docs","audit_log","team_panel","markdown"],sg=["/","/pricing","/dashboard","/dashboard/*","/settings","/settings/*","/team","/audit-log","/docs","/docs/*","/terms","/privacy","/persona","/persona-sign-in"],cg=a.string().min(1).max(200).regex(/^\/[a-zA-Z0-9_./-]*$/,"path must start with / and contain only [a-zA-Z0-9_./-]"),wl=a.string().min(1).max(120).regex(/^[a-z0-9_-]+$/),ug=a.object({label:a.string().min(1).max(80),path:cg,capability:wl.optional()}),lg=a.enum(ag),dg=a.object({component:lg,props:a.record(a.string().min(1).max(80),a.unknown()).optional(),capability:wl.optional(),gateMode:a.enum(["hide","disable","upsell"]).default("hide")}),mg=a.object({path:cg,title:a.string().min(1).max(120),requiresAuth:a.boolean(),capability:wl.optional(),components:a.array(dg).max(12).default([])}),Ol=a.object({version:a.literal(og),nav:a.array(ug).max(12).default([]),pages:a.array(mg).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),pg(o.path)&&t.addIssue({code:"custom",message:`frontend page path "${o.path}" is reserved by the template`,path:["pages",n,"path"]})})});function pg(e){return sg.some(t=>{if(t.endsWith("/*")){let r=t.slice(0,-2);return e===r||e.startsWith(`${r}/`)}return e===t})}var fg=a.enum(["subscription","subject"]),gg=a.enum(["reported","action_inferred"]),hg=a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/),_g=a.object({name:hg,display:a.string().min(1).max(120).optional(),scope:fg.default("subscription"),subjectType:a.string().min(1).max(64).regex(/^[a-zA-Z0-9_.:-]+$/).optional(),countSource:gg.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"})}),Tl=a.array(_g).max(100).default([]);var Kx=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:Ae.default("month"),meters:a.array(fe).default([]),grants:a.array(pe).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)}),vg=a.record(a.string().min(1).max(64),Kx).default({}),Wx=a.enum(["active","canceled","paused","pending_activation"]),PA=a.object({addOnKey:a.string().min(1).max(64),status:Wx.default("active"),activatedAt:a.string().datetime().optional(),canceledAt:a.string().datetime().nullable().optional(),stripeSubscriptionItemId:a.string().optional()});var bg=/^[a-z0-9][a-z0-9_-]*$/,Al=a.string().min(1).max(64).regex(bg,"backend id must be a lowercase slug ([a-z0-9][a-z0-9_-]*)"),yg=a.enum(["direct","tunnel"]),xg=a.enum(["embedded","sidecar"]);var kg=a.object({mode:yg.default("direct"),runner:xg.optional()}).strict(),Sg=a.object({required:a.boolean().default(!1)}).strict(),$g=a.object({name:a.string().min(1).max(120).optional(),slug:Al.optional(),transport:kg.default({mode:"direct"}),verification:Sg.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(),Pl=a.record(Al,$g),Lt=Al,Ft={unknownBackendInRoute:"UNKNOWN_BACKEND_IN_ROUTE",ambiguousDefaultBackend:"AMBIGUOUS_DEFAULT_BACKEND",routeMeterNotAllowedByBackend:"ROUTE_METER_NOT_ALLOWED_BY_BACKEND",unknownMeterInBackend:"UNKNOWN_METER_IN_BACKEND"};function Nl(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 qx=a.string().min(2).max(20).regex(/^\d+(ms|s|m|h)$/,"rate_limit window must look like `60s`, `5m`, `1h`"),Ig=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:qx,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"})}),Eg=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")}),wg=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"})}),Og=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})}),Tg=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 Cl=a.discriminatedUnion("type",[a.object({type:a.literal("rate_limit"),config:Ig}),a.object({type:a.literal("auth"),config:Eg}),a.object({type:a.literal("concurrency"),config:wg}),a.object({type:a.literal("retry"),config:Og}),a.object({type:a.literal("transform"),config:Tg})]);var Di=a.enum(["long","short","blocking"]).default("long"),Ag=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 Rl=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:Ag.default({}),mutation_class:a.enum(["runtime","contractual"]).default("runtime"),cacheProfile:Di}),Cl);var Jx=a.enum(["query","mutation"]),Yx=a.enum(["none","metadata","full"]),Xx=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)}),Qx=a.object({resource:a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/),effect:a.enum(["create","delete"])}),Pg=a.object({id:a.string().min(1).max(160).regex(/^[a-z0-9_.:-]+$/),title:a.string().min(1).max(160).optional(),kind:Jx,actorType:a.string().min(1).max(64).regex(/^[a-zA-Z0-9_.:-]+$/).optional(),subject:Xx.optional(),inputSchemaRef:a.string().min(1).max(240).optional(),audit:Yx.default("metadata"),resource:Qx.optional()});var Ng=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 ek(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 Cg(e){return e.split(",").every(ek)}var zi=a.union([a.string().min(1).max(100).refine(Cg,{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)]),Rg=a.object({match:Ng,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:zi.optional()}).optional(),unmetered:a.boolean().optional(),inheritDefaultMeters:a.boolean().optional(),action:a.string().min(1).max(160).regex(/^[a-z0-9_.:-]+$/).optional(),backend:Lt.optional()}).strict(),Dg=a.object({override_origin:a.string().url("override_origin must be a valid URL").nullable().default(null)}),zg=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()}),Dl=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:Di,routes:a.array(Rg).min(1).max(50),upstream:Dg.default({override_origin:null}),policies:a.array(a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/)).max(20).default([]),runtime:zg.default({}),plans:a.array(a.string().min(1).max(64)).max(20).default([]),actions:a.array(Pg).max(100).optional(),backend:Lt.optional()}).strict();function Ug(e,t){e.usagePricing!==void 0&&t.addIssue({code:"custom",path:["usagePricing"],message:"usagePricing is not supported. Define usage.meters.<key>.rating instead."})}function jg(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&&(tk(o,n,t),nk(o,n,t))})}function tk(e,t,r){(Hg(e)??0)!==0&&r.addIssue({code:"custom",path:["plans",t,"recurring_fee_cents"],message:"Free plans must have zero price"})}function nk(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 Lg(e,t){let r=new Map;e.forEach((o,n)=>{if(o.free)return;let i=Hg(o);if(i===void 0||i<=0)return;let s=sk(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 Fg(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 Mg(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 Zg(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=zl(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 rk(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))ik(o,r);return r}function ik(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=zl(s);if(c.length>0){for(let u of c)i.add(u);continue}}}}function zl(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 ok(e){if(!e||typeof e!="object")return null;let t=e;return typeof t.dimension=="string"?t.dimension:null}var ak=new Set(["credits"]);function Vg(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=rk(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=ok(l);g&&(u.has(g)||o.has(g)||ak.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 Bg(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:`${Ft.unknownMeterInBackend}: backend "${u}" allows meter "${d}" but no metering.meters[] entry declares it.`})});let{defaultId:i,ambiguous:s}=Nl(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:`${Ft.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:`${Ft.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 P of zl(d))C.has(P)||t.addIssue({code:"custom",path:["features",u,"routes",m,"metering"],message:`${Ft.routeMeterNotAllowedByBackend}: route meters "${P}" but backend "${g}" does not allow it (backend.meters[] = [${S.join(", ")}]).`})})}function Hg(e){return e.recurring_fee_cents}function sk(e,t){return`USD:month:${t}`}var ck=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")}),Gg=a.enum(["exact_pre_request","estimated_then_settled","postpaid","strict_concurrency"]),Ul=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:Gg.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()}),Kg=a.string().min(1).max(64).regex(/^[a-z0-9_]+$/,"Usage measure must be lowercase alphanumeric with underscores"),uk=a.enum(["pass_through","markup"]),lk=a.object({source:a.literal("fixed"),rates:a.record(a.string().min(1),a.record(Kg,a.number().int().nonnegative()))}),dk=a.object({source:a.literal("provider_catalog"),catalog:a.string().min(1).max(100),pricePolicy:uk.default("pass_through"),markupPercent:a.number().nonnegative().max(1e4).optional(),marginMicros:a.number().int().nonnegative().optional()}),Wg=a.discriminatedUnion("source",[lk,dk]),qg=a.object({selector:a.string().min(1).max(100).optional(),measures:a.array(Kg).min(1).max(20),rating:Wg.optional()}),Jg=a.object({meters:a.record(a.string().min(1).max(64).regex(/^[a-z0-9_]+$/),qg)}),mk=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:zi.optional()}),Yg=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:mk.optional(),inheritDefaultMeters:a.boolean().optional(),backend:Lt.optional()}).strict(),jl=a.object({description:a.string().max(500).optional(),routes:a.array(Yg).min(1).max(50),plans:a.array(a.string().min(1)).min(1).max(20)}),Xg=a.record(a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/),jl),Qg=a.enum(["report","pull_request"]),eh=a.enum(["safe","non_blocking","economic_risk","blocking"]),th=a.object({cleanup:a.object({enabled:a.boolean().default(!1),mode:Qg.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(eh).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"]}}),nh=a.enum(["org_only","org_and_user"]),rh=a.enum(["clerk","test-personas"]),ih=a.object({identity_requirement:nh.optional(),context_tokens:a.object({enabled:a.boolean().default(!0)}).optional(),portal_auth:a.object({strategy:rh}).optional()}),oh=a.enum(["frontend","api","docs","widget","dashboard","webhook","worker","agent"]),ah=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Surface key must be lowercase alphanumeric with hyphens/underscores"),type:oh,display:a.string().min(1).max(100).optional(),description:a.string().max(500).optional()}),sh=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(Me).max(100).optional(),meters:a.array(a.string().min(1).max(64)).max(100).optional()}),ch=a.array(ah).max(20).default([]),uh=a.array(sh).max(100).default([]),lh=a.enum(["async_job","agent_task","scheduled","lifecycle","background"]),dh=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)})]),mh=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:lh,trigger:dh,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()}),ph=a.array(mh).max(100).default([]),et=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(Ul).max(10).default([]),billOn4xx:a.boolean().default(!1)}).default({meters:[],billOn4xx:!1}),backend:Pl.optional(),usage:Jg.optional(),usagePricing:a.never({error:"usagePricing is not supported. Define usage.meters.<key>.rating instead."}).optional(),features:Xg.optional(),resources:Tl,policies:th,customer_context:ih.optional(),surfaces:ch,entitlements:uh,workflows:ph,frontend:Ol.optional(),billing:a.object({applyLimitUpgradesInstantly:a.boolean().optional(),subscriberChangePolicy:Cn.default({default:"period_end",when:{price_increase:"period_end",price_decrease:"immediate",feature_added:"immediate",feature_removed:"period_end",limit_increased:"immediate",limit_reduced:"period_end",credit_increased:"immediate",credit_reduced:"period_end",rating_changed:"period_end"},allowImmediatePriceIncrease:!1,allowImmediateEntitlementReduction:!1})}).default({subscriberChangePolicy:{default:"period_end",when:{price_increase:"period_end",price_decrease:"immediate",feature_added:"immediate",feature_removed:"period_end",limit_increased:"immediate",limit_reduced:"period_end",credit_increased:"immediate",credit_reduced:"period_end",rating_changed:"period_end"},allowImmediatePriceIncrease:!1,allowImmediateEntitlementReduction:!1}}),plans:a.array(Ri).max(4).default([]),add_ons:vg,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:Il.optional(),environments:El.optional(),ephemeral:a.object({defaultPlan:a.string().min(1).optional()}).optional()}).superRefine((e,t)=>{Ug(e,t),jg(e.plans,t),Lg(e.plans,t),Fg(e,t),Mg(e,t),Zg(e,t),Vg(e,t),Bg(e,t)}),pk=a.object({product:et.shape.product}),fk=a.object({gateway:et.shape.gateway}),gk=a.object({metering:et.shape.metering}),hk=a.object({plans:et.shape.plans});var Ll=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 fh=1;var _k=a.object({irVersion:a.literal(fh),sdkVersion:a.string().min(1).max(64),product:et,routes:a.array(Dl).max(200).default([]),policies:a.array(Rl).max(200).default([]),capabilities:a.array(Ll).max(200).default([])}).strict();var BP=a.object({subscriberChangePolicy:Cn.optional()}),HP=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()}),GP=a.object({id:a.string(),actorUserId:a.string().optional(),action:a.string(),decision:a.string().optional(),timestamp:a.string(),details:a.unknown().optional()}),KP=a.object({name:a.string(),branch:a.string().optional(),isProduction:a.boolean().optional()}),WP=a.object({id:a.string(),name:a.string(),apiKeyId:a.string().optional()});var vk=["IMMEDIATE_NO_PRORATE","IMMEDIATE_PRORATE_CHARGE_NEW","IMMEDIATE_PRORATE_REFUND_OLD","IMMEDIATE_PRORATE_BOTH","DEFER_TO_PERIOD_END"],tN=a.enum(vk);var gh=a.object({id:a.string(),billingCycleId:a.string(),effectiveStart:a.string(),effectiveEnd:a.string(),compiledPlanId:a.string()}),hh=a.object({currentPeriod:gh,priorPeriod:gh.optional()});var bk=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({featureGateOverrides:a.record(a.string(),a.boolean()).optional()}).optional(),subscriptionStatus:a.string(),subscriberStatus:a.string(),scopes:a.array(a.string()),periods:hh,expiresAt:a.number().optional(),trialEndsAt:a.string().optional()}),yk=a.discriminatedUnion("kind",[a.object({kind:a.literal("found"),state:bk,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)})]),sN=a.object({environmentId:a.string().nullable(),subjectKeys:a.array(a.string()).min(1).max(500)}),cN=a.object({results:a.array(a.object({subjectKey:a.string(),result:yk}))}),xk=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()}),uN=a.discriminatedUnion("kind",[a.object({kind:a.literal("found"),record:xk,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)})]),lN=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)})]),kk=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()}),dN=a.discriminatedUnion("kind",[a.object({kind:a.literal("found"),tenant:kk,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 Ui=["consumer_api_key","consumer_session_token","test_persona_session_token","builder_master_key","builder_session_token","maker_jwt","service_jwt","internal_service","context_token"],_h=a.enum(Ui);var Sk=a.object({fromIssuer:a.string().min(1),fromTokenId:a.string().min(1),intent:a.string().min(1)}),vh=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(Sk)});var Fl=["template","embedded","provisioned","agent"],$k=a.enum(Fl),Ik=["builder_user","builder_org","maker","consumer_subject","internal_service","service_jwt","agent_runtime"],Ek=a.enum(Ik),bh=a.object({kind:Ek,id:a.string().min(1),label:a.string().optional()}),wk=["subscription","organization","platform"],Ok=a.enum(wk),Tk=a.object({kind:Ok,id:a.string().min(1)}),Ak=a.object({type:_h,id:a.string().min(1),hint:a.string().max(8).optional()}),Pk=a.object({compiledPlanId:a.string().min(1),fromCache:a.boolean().optional()}),yh=a.object({requestId:a.string().min(1),surface:$k,builderOrgId:a.string().min(1),productId:a.string().min(1).optional(),runtimeId:a.string().min(1).optional(),template:a.string().optional(),caller:bh,actor:bh,billingSubject:Tk,credential:Ak,capability:a.string().min(1),scopes:a.array(a.string()),entitlement:Pk.optional(),trust:vh});var Dn;(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"})(Dn||(Dn={}));var xh=Object.values(Dn),AN=a.enum(xh),kh=a.object({decisionId:a.string().optional(),ctx:yh,details:a.record(a.string(),a.unknown()).optional(),createdAt:a.string().min(1)}),Nk=xh.filter(e=>e!==Dn.SYSTEM_ACTION),Ck=kh.extend({kind:a.enum(Nk)}),Rk=kh.extend({kind:a.literal(Dn.SYSTEM_ACTION),actorType:a.string().min(1),action:a.string().min(1)}),PN=a.discriminatedUnion("kind",[Ck,Rk]);var O=["template","agent"],Dk=["provisioned"],Sh=[...Fl],T=["builder_master_key","builder_session_token","maker_jwt"],Mt=["service_jwt","internal_service"],Ml=["consumer_api_key","consumer_session_token","test_persona_session_token","context_token"],$h=[...Ui],zn="subscriptions:write",zk=[{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:[zn],allowedSurfaces:O,allowedCredentialTypes:[...T,...Mt],description:"Provision a new subscription for a subscriber"},{id:"subscriptions.update",operation:"Update a subscription",requiredScopes:[zn],allowedSurfaces:O,allowedCredentialTypes:[...T,...Mt],description:"Change plan, enforcement mode, or schedule"},{id:"subscriptions.cancel",operation:"Cancel a subscription",requiredScopes:[zn],allowedSurfaces:O,allowedCredentialTypes:[...T,...Mt],description:"Cancel a subscription (immediate or end-of-period)"},{id:"subscriptions.pause",operation:"Pause a subscription",requiredScopes:[zn],allowedSurfaces:O,allowedCredentialTypes:[...T,...Mt],description:"Pause a subscription (no usage, no billing)"},{id:"subscriptions.resume",operation:"Resume a subscription",requiredScopes:[zn],allowedSurfaces:O,allowedCredentialTypes:[...T,...Mt],description:"Resume a paused subscription"},{id:"subscriptions.read",operation:"Read a subscription",requiredScopes:["subscriptions:read"],allowedSurfaces:O,allowedCredentialTypes:[...T,...Mt],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,...Ml],description:"Mint a one-time Stripe portal-session redirect URL"},{id:"billing.read",operation:"Read billing state",requiredScopes:["billing:read"],allowedSurfaces:O,allowedCredentialTypes:[...T,...Ml],description:"Read invoices, balances, scheduled changes"},{id:"runtime-context.read",operation:"Read the caller's runtime context",requiredScopes:[],allowedSurfaces:Sh,allowedCredentialTypes:$h,description:"Introspect the resolved RuntimeContext (minus secrets)"},{id:"capabilities.list",operation:"List registered capabilities",requiredScopes:[],allowedSurfaces:Sh,allowedCredentialTypes:$h,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:Dk,allowedCredentialTypes:Ml,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."}],DN=Object.freeze(zk);var Uk=["ProductApplyWorkflow","RollbackWorkflow","StripeSyncWorkflow","WebhookDispatchWorkflow","SubscriptionTransitionWorkflow","CompiledPlanLifecycleWorkflow","ShardReshardWorkflow","MaintenanceJobWorkflow"],LN=a.enum(Uk),jk=["transient","permanent","rollback-required","human-intervention"],FN=a.enum(jk);var Lk=["SAFE_AUTOMATIC","REQUIRES_APPROVAL","IRREVERSIBLE","BILLING_IMPACTING","EDGE_BREAKING"],MN=a.enum(Lk);var KN=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"],Mk=["platform_requests"],Zk=a.object({requestId:a.string().optional(),productId:a.string().optional(),route:a.string().optional(),usageEventId:a.string().optional()}).strict(),Vk=a.object({organizationId:a.string().min(1),source:a.enum(Fk),dimension:a.enum(Mk),quantity:a.number().int().positive(),idempotencyKey:a.string().min(1).max(512),occurredAt:a.string().datetime(),metadata:Zk.optional()}).strict(),gC=a.object({entries:a.array(Vk).min(1).max(500)});var te={VALIDATION_ERROR:"VALIDATION_ERROR",CONFLICT:"CONFLICT",NOT_FOUND:"NOT_FOUND",NOT_IMPLEMENTED:"NOT_IMPLEMENTED",NOT_CONFIGURED:"NOT_CONFIGURED",INTERNAL_ERROR:"INTERNAL_ERROR",SERVICE_UNAVAILABLE:"SERVICE_UNAVAILABLE",RATE_LIMIT_EXCEEDED:"RATE_LIMIT_EXCEEDED",DELETE_CONFIRMATION_REQUIRED:"DELETE_CONFIRMATION_REQUIRED",MISSING_HOST:"MISSING_HOST",MISSING_CONNECTIONS:"MISSING_CONNECTIONS",SECRET_NOT_CONFIGURED:"SECRET_NOT_CONFIGURED",UNAUTHORIZED:"UNAUTHORIZED",FORBIDDEN:"FORBIDDEN",INVALID_ACCESS_KEY:"INVALID_ACCESS_KEY",AUTO_KEY_CREATION_FAILED:"AUTO_KEY_CREATION_FAILED",PERSONA_NOT_FOUND:"PERSONA_NOT_FOUND",PERSONA_REVOKED:"PERSONA_REVOKED",PERSONA_SESSIONS_NOT_SUPPORTED:"PERSONA_SESSIONS_NOT_SUPPORTED",NOT_TEST_PERSONA_ENV:"NOT_TEST_PERSONA_ENV",PERSONA_AUTH_DISABLED_IN_PROD:"PERSONA_AUTH_DISABLED_IN_PROD",MAKER_TOKEN_NOT_FOUND:"MAKER_TOKEN_NOT_FOUND",MAKER_TOKEN_NOT_REVOKED:"MAKER_TOKEN_NOT_REVOKED",MAKER_TOKEN_NO_PRODUCT:"MAKER_TOKEN_NO_PRODUCT",MAKER_TOKEN_REVOKED:"MAKER_TOKEN_REVOKED",ORGANIZATION_NOT_FOUND:"ORGANIZATION_NOT_FOUND",ORG_HAS_ACTIVE_SUBSCRIPTIONS:"ORG_HAS_ACTIVE_SUBSCRIPTIONS",ORG_HAS_OUTSTANDING_BALANCE:"ORG_HAS_OUTSTANDING_BALANCE",PERSONAL_ORG_NOT_DELETABLE:"PERSONAL_ORG_NOT_DELETABLE",MEMBER_NOT_FOUND:"MEMBER_NOT_FOUND",INVITATION_NOT_FOUND:"INVITATION_NOT_FOUND",CUSTOMER_NOT_FOUND:"CUSTOMER_NOT_FOUND",PRODUCT_NOT_FOUND:"PRODUCT_NOT_FOUND",PRODUCT_DELETE_BLOCKED:"PRODUCT_DELETE_BLOCKED",PRODUCT_REPO_NOT_LINKED:"PRODUCT_REPO_NOT_LINKED",PRODUCT_SCOPE_MISMATCH:"PRODUCT_SCOPE_MISMATCH",YAML_PARSE_ERROR:"YAML_PARSE_ERROR",COMPILATION_NOT_FOUND:"COMPILATION_NOT_FOUND",PLAN_NOT_FOUND:"PLAN_NOT_FOUND",PLAN_HAS_ACTIVE_SUBSCRIPTIONS:"PLAN_HAS_ACTIVE_SUBSCRIPTIONS",PLAN_SLUG_CONFLICT:"PLAN_SLUG_CONFLICT",PLAN_UPGRADE_REQUIRED:"PLAN_UPGRADE_REQUIRED",SLUG_CONFLICT:"SLUG_CONFLICT",SLUG_BLOCKED:"SLUG_BLOCKED",SLUG_OFFENSIVE:"SLUG_OFFENSIVE",SLUG_RESERVED:"SLUG_RESERVED",SLUG_IMPERSONATION:"SLUG_IMPERSONATION",SLUG_INVALID_FORMAT:"SLUG_INVALID_FORMAT",SLUG_VALIDATOR_NOT_READY:"SLUG_VALIDATOR_NOT_READY",PRICING_PREVIEW_FAILED:"PRICING_PREVIEW_FAILED",PRICING_REPLAY_FAILED:"PRICING_REPLAY_FAILED",RESERVATION_NOT_FOUND:"RESERVATION_NOT_FOUND",PROMO_CODE_NOT_FOUND:"PROMO_CODE_NOT_FOUND",PROMO_CODE_INVALID:"PROMO_CODE_INVALID",BILLING_EVENT_NOT_FOUND:"BILLING_EVENT_NOT_FOUND",BILLING_NOT_CONFIGURED:"BILLING_NOT_CONFIGURED",SUBSCRIPTION_NOT_READY:"SUBSCRIPTION_NOT_READY",SUBSCRIPTION_FETCH_FAILED:"SUBSCRIPTION_FETCH_FAILED",INVALID_STATE:"INVALID_STATE",DUPLICATE_TRANSITION:"DUPLICATE_TRANSITION",LEGACY_STABLE_NOT_SELF_SERVICE:"LEGACY_STABLE_NOT_SELF_SERVICE",ARCHIVED_TARGET:"ARCHIVED_TARGET",FREE_TO_PAID_VIA_CHECKOUT_ONLY:"FREE_TO_PAID_VIA_CHECKOUT_ONLY",CAPABILITY_LIMIT_EXCEEDED:"CAPABILITY_LIMIT_EXCEEDED",CAPABILITY_CHECK_UNAVAILABLE:"CAPABILITY_CHECK_UNAVAILABLE",STRIPE_NOT_CONFIGURED:"STRIPE_NOT_CONFIGURED",STRIPE_BALANCE_OUTSTANDING:"STRIPE_BALANCE_OUTSTANDING",STRIPE_OPERATION_FAILED:"STRIPE_OPERATION_FAILED",STRIPE_RESYNC_FAILED:"STRIPE_RESYNC_FAILED",CHECKOUT_SESSION_FAILED:"CHECKOUT_SESSION_FAILED",POLAR_PRODUCT_NOT_CONFIGURED:"POLAR_PRODUCT_NOT_CONFIGURED",BILLING_TAX_NOT_ENROLLED:"BILLING_TAX_NOT_ENROLLED",WEBHOOK_NOT_FOUND:"WEBHOOK_NOT_FOUND",WEBHOOK_DISPATCH_FAILED:"WEBHOOK_DISPATCH_FAILED",WEBHOOK_SECRET_NOT_CONFIGURED:"WEBHOOK_SECRET_NOT_CONFIGURED",INVALID_WEBHOOK_SIGNATURE:"INVALID_WEBHOOK_SIGNATURE",MISSING_RAW_BODY:"MISSING_RAW_BODY",WEBHOOK_REDIRECTED:"WEBHOOK_REDIRECTED",MANAGED_BY_CODE:"MANAGED_BY_CODE",GITHUB_CONNECTION_NOT_FOUND:"GITHUB_CONNECTION_NOT_FOUND",GITHUB_NOT_CONNECTED:"GITHUB_NOT_CONNECTED",GITHUB_SYNC_FAILED:"GITHUB_SYNC_FAILED",GITHUB_SYNC_UNAVAILABLE:"GITHUB_SYNC_UNAVAILABLE",GITHUB_TOKEN_FAILED:"GITHUB_TOKEN_FAILED",GIT_PROVIDER_NOT_CONFIGURED:"GIT_PROVIDER_NOT_CONFIGURED",ENVIRONMENT_NOT_FOUND:"ENVIRONMENT_NOT_FOUND",ENVIRONMENT_CLEANUP_FAILED:"ENVIRONMENT_CLEANUP_FAILED",DEPLOYMENT_RUN_NOT_FOUND:"DEPLOYMENT_RUN_NOT_FOUND",BRANCH_NO_MATCHING_ENV:"BRANCH_NO_MATCHING_ENV",APPLY_SPEC_FAILED:"APPLY_SPEC_FAILED",BOOTSTRAP_FAILED:"BOOTSTRAP_FAILED",JOB_ALREADY_RUNNING:"JOB_ALREADY_RUNNING",LOGO_DELETE_FAILED:"LOGO_DELETE_FAILED",LOGO_UPLOAD_FAILED:"LOGO_UPLOAD_FAILED",INVALID_LOGO_FORMAT:"INVALID_LOGO_FORMAT"};var yC={missing_token:te.UNAUTHORIZED,invalid_token:te.UNAUTHORIZED,missing_signature:te.UNAUTHORIZED,malformed_signature:te.UNAUTHORIZED,unknown_key_id:te.UNAUTHORIZED,bad_signature:te.UNAUTHORIZED,expired_signature:te.UNAUTHORIZED,clock_skew:te.UNAUTHORIZED,replayed_nonce:te.UNAUTHORIZED,body_hash_mismatch:te.UNAUTHORIZED,route_mismatch:te.UNAUTHORIZED,environment_mismatch:te.UNAUTHORIZED,jwks_unavailable:te.SERVICE_UNAVAILABLE,body_too_large:te.VALIDATION_ERROR};var xC=Object.values(qf);var Ih={limit_allocator_unavailable:{statuses:[503],source:"batcher-enum",retryAfter:!0,verifiedAt:["engine/enforcement/runtime.ts:471"]},limit_exceeded:{statuses:[402],source:"batcher-enum",retryAfter:!0,verifiedAt:["engine/enforcement/batcher.ts:326","engine/enforcement/constraints/quota.ts:69"]},rate_limited:{statuses:[429],source:"batcher-enum",retryAfter:!0,verifiedAt:["engine/enforcement/batcher.ts:328","engine/enforcement/constraints/rate-limit.ts:74","engine/pipeline/rate-limit.ts:83"]},credit_exhausted:{statuses:[402],source:"batcher-enum",retryAfter:!0,verifiedAt:["engine/enforcement/batcher.ts:333"]},enforcement_denied:{statuses:[402],source:"batcher-enum",retryAfter:!0,verifiedAt:["engine/enforcement/batcher.ts:335"]},feature_not_enabled:{statuses:[403],source:"runtime-inline",retryAfter:!1,verifiedAt:["engine/enforcement/runtime.ts:188"]},invalid_entitlement_shape:{statuses:[503],source:"runtime-inline",retryAfter:!0,verifiedAt:["engine/enforcement/runtime.ts:144"]},unsupported_constraint_schema:{statuses:[503],source:"runtime-inline",retryAfter:!1,verifiedAt:["engine/enforcement/runtime.ts:154"]},enforcement_error:{statuses:[500],source:"runtime-inline",retryAfter:!1,verifiedAt:["engine/enforcement/runtime.ts:342"]},enforcement_dependency_unavailable:{statuses:[503],source:"runtime-inline",retryAfter:!1,verifiedAt:["engine/enforcement/runtime.ts:427"]},concurrency_limit_exceeded:{statuses:[503],source:"constraint",retryAfter:!0,verifiedAt:["engine/enforcement/constraints/concurrency.ts:314"]},concurrency_context_unavailable:{statuses:[503],source:"constraint",retryAfter:!0,verifiedAt:["engine/enforcement/constraints/concurrency.ts:291"]},concurrency_coordinator_unavailable:{statuses:[503],source:"constraint",retryAfter:!0,verifiedAt:["engine/enforcement/constraints/concurrency.ts:305"]},key_expired:{statuses:[401],source:"constraint",retryAfter:!1,verifiedAt:["engine/enforcement/constraints/credential-validity.ts:33"]},geo_context_unavailable:{statuses:[503],source:"constraint",retryAfter:!0,verifiedAt:["engine/enforcement/constraints/geo-restriction.ts:44"]},geo_blocked:{statuses:[403],source:"constraint",retryAfter:!1,verifiedAt:["engine/enforcement/constraints/geo-restriction.ts:51"]},geo_not_allowed:{statuses:[403],source:"constraint",retryAfter:!1,verifiedAt:["engine/enforcement/constraints/geo-restriction.ts:58"]},resource_count_limit_exceeded:{statuses:[403,402],source:"constraint",retryAfter:!1,verifiedAt:["engine/enforcement/constraints/resource-count.ts:95","apps/core:routes/internal/gateway-resources.ts:144"]},resolver_rate_limited:{statuses:[503],source:"gateway-error",retryAfter:!0,verifiedAt:["engine/errors.ts:55"]},resolver_unavailable:{statuses:[503],source:"gateway-error",retryAfter:!0,verifiedAt:["engine/errors.ts:73"]},credential_resolver_miss_rate_limited:{statuses:[429],source:"gateway-error",retryAfter:!0,verifiedAt:["engine/errors.ts:89"]}},Bk=Object.keys(Ih);var Hk=new Set([429,503]),SC=new Set(Bk.filter(e=>Ih[e].statuses.every(t=>Hk.has(t))));var Gk=[402,403,429],IC=new Set(Gk);var Kk={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 Zl(e){if(e)return Kk[e]}function wh(e){process.stdout.write(`${JSON.stringify(e,null,2)}
98
- `)}function Wk(e,t){return{schema_version:1,ok:!0,op:e,data:t}}function qk(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:Xk(r,t.code),details:t.details,hint:Zl(t.code)}}}function V(e,t,r=Ah()){if(ue()==="json"){wh(Wk(r,e));return}t&&Md(t)}function Jk(e){return e===0?1:e===400||e===422?2:e===401||e===403?3:e===409?4:e>=500?5:1}var Yk=new Set(["RATE_LIMIT_EXCEEDED","SERVICE_UNAVAILABLE"]);function Xk(e,t){return e>=500||e===429||e===503?!0:t?Yk.has(t):!1}function Vl(e,t=Ah()){let r=e.status??0;if(ue()==="json")wh(qk(t,e));else{let o=Zl(e.code),n=e.code?` [${e.code}]`:"";process.stderr.write(`Error${n}: ${e.message}
97
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of t.seen.entries()){let c=s[1];if(e===s[0]){i(s);continue}if(t.external){let l=t.external.registry.get(s[0])?.id;if(e!==s[0]&&l){i(s);continue}}if(t.metadataRegistry.get(s[0])?.id){i(s);continue}if(c.cycle){i(s);continue}if(c.count>1&&t.reused==="ref"){i(s);continue}}}function Ve(t,e){let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=c=>{let u=t.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=t.seen.get(m),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),c._zod.parent===m)for(let C in l)C==="$ref"||C==="allOf"||C in d||delete l[C];if(x.$ref&&h.def)for(let C in l)C==="$ref"||C==="allOf"||C in h.def&&JSON.stringify(l[C])===JSON.stringify(h.def[C])&&delete l[C]}let g=c._zod.parent;if(g&&g!==m){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:c,jsonSchema:l,path:u.path??[]})};for(let c of[...t.seen.entries()].reverse())o(c[0]);let n={};if(t.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){let c=t.external.registry.get(e)?.id;if(!c)throw new Error("Schema is missing an `id` property");n.$id=t.external.uri(c)}Object.assign(n,r.def??r.schema);let i=t.metadataRegistry.get(e)?.id;i!==void 0&&n.id===i&&delete n.id;let s=t.external?.defs??{};for(let c of t.seen.entries()){let u=c[1];u.def&&u.defId&&(u.def.id===u.defId&&delete u.def.id,s[u.defId]=u.def)}t.external||Object.keys(s).length>0&&(t.target==="draft-2020-12"?n.$defs=s:n.definitions=s);try{let c=JSON.parse(JSON.stringify(n));return Object.defineProperty(c,"~standard",{value:{...e["~standard"],jsonSchema:{input:Ct(e,"input",t.processors),output:Ct(e,"output",t.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function X(t,e){let r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let o=t._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return X(o.element,r);if(o.type==="set")return X(o.valueType,r);if(o.type==="lazy")return X(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 X(o.innerType,r);if(o.type==="intersection")return X(o.left,r)||X(o.right,r);if(o.type==="record"||o.type==="map")return X(o.keyType,r)||X(o.valueType,r);if(o.type==="pipe")return t._zod.traits.has("$ZodCodec")?!0:X(o.in,r)||X(o.out,r);if(o.type==="object"){for(let n in o.shape)if(X(o.shape[n],r))return!0;return!1}if(o.type==="union"){for(let n of o.options)if(X(n,r))return!0;return!1}if(o.type==="tuple"){for(let n of o.items)if(X(n,r))return!0;return!!(o.rest&&X(o.rest,r))}return!1}var jc=(t,e={})=>r=>{let o=Me({...r,processors:e});return N(t,o),Ze(o,t),Ve(o,t)},Ct=(t,e,r={})=>o=>{let{libraryOptions:n,target:i}=o??{},s=Me({...n??{},target:i,io:e,processors:r});return N(t,s),Ze(s,t),Ve(s,t)};var Yy={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Lc=(t,e,r,o)=>{let n=r;n.type="string";let{minimum:i,maximum:s,format:c,patterns:u,contentEncoding:l}=t._zod.bag;if(typeof i=="number"&&(n.minLength=i),typeof s=="number"&&(n.maxLength=s),c&&(n.format=Yy[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=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},Fc=(t,e,r,o)=>{let n=r,{minimum:i,maximum:s,format:c,multipleOf:u,exclusiveMaximum:l,exclusiveMinimum:d}=t._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=e.target==="draft-04"||e.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)},Mc=(t,e,r,o)=>{r.type="boolean"},Zc=(t,e,r,o)=>{if(e.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Vc=(t,e,r,o)=>{if(e.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Bc=(t,e,r,o)=>{e.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},Hc=(t,e,r,o)=>{if(e.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Kc=(t,e,r,o)=>{if(e.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Gc=(t,e,r,o)=>{r.not={}},Wc=(t,e,r,o)=>{},qc=(t,e,r,o)=>{},Jc=(t,e,r,o)=>{if(e.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Yc=(t,e,r,o)=>{let n=t._zod.def,i=cn(n.entries);i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),r.enum=i},Xc=(t,e,r,o)=>{let n=t._zod.def,i=[];for(let s of n.values)if(s===void 0){if(e.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(e.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,e.target==="draft-04"||e.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},Qc=(t,e,r,o)=>{if(e.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},eu=(t,e,r,o)=>{let n=r,i=t._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=i.source},tu=(t,e,r,o)=>{let n=r,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:c,mime:u}=t._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)},nu=(t,e,r,o)=>{r.type="boolean"},ru=(t,e,r,o)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},iu=(t,e,r,o)=>{if(e.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},ou=(t,e,r,o)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},au=(t,e,r,o)=>{if(e.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},su=(t,e,r,o)=>{if(e.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},cu=(t,e,r,o)=>{let n=r,i=t._zod.def,{minimum:s,maximum:c}=t._zod.bag;typeof s=="number"&&(n.minItems=s),typeof c=="number"&&(n.maxItems=c),n.type="array",n.items=N(i.element,e,{...o,path:[...o.path,"items"]})},uu=(t,e,r,o)=>{let n=r,i=t._zod.def;n.type="object",n.properties={};let s=i.shape;for(let l in s)n.properties[l]=N(s[l],e,{...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 e.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,e,{...o,path:[...o.path,"additionalProperties"]})):e.io==="output"&&(n.additionalProperties=!1)},ui=(t,e,r,o)=>{let n=t._zod.def,i=n.inclusive===!1,s=n.options.map((c,u)=>N(c,e,{...o,path:[...o.path,i?"oneOf":"anyOf",u]}));i?r.oneOf=s:r.anyOf=s},lu=(t,e,r,o)=>{let n=t._zod.def,i=N(n.left,e,{...o,path:[...o.path,"allOf",0]}),s=N(n.right,e,{...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},du=(t,e,r,o)=>{let n=r,i=t._zod.def;n.type="array";let s=e.target==="draft-2020-12"?"prefixItems":"items",c=e.target==="draft-2020-12"||e.target==="openapi-3.0"?"items":"additionalItems",u=i.items.map((g,h)=>N(g,e,{...o,path:[...o.path,s,h]})),l=i.rest?N(i.rest,e,{...o,path:[...o.path,c,...e.target==="openapi-3.0"?[i.items.length]:[]]}):null;e.target==="draft-2020-12"?(n.prefixItems=u,l&&(n.items=l)):e.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}=t._zod.bag;typeof d=="number"&&(n.minItems=d),typeof m=="number"&&(n.maxItems=m)},mu=(t,e,r,o)=>{let n=r,i=t._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,e,{...o,path:[...o.path,"patternProperties","*"]});n.patternProperties={};for(let m of u)n.patternProperties[m.source]=d}else(e.target==="draft-07"||e.target==="draft-2020-12")&&(n.propertyNames=N(i.keyType,e,{...o,path:[...o.path,"propertyNames"]})),n.additionalProperties=N(i.valueType,e,{...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)}},pu=(t,e,r,o)=>{let n=t._zod.def,i=N(n.innerType,e,o),s=e.seen.get(t);e.target==="openapi-3.0"?(s.ref=n.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},fu=(t,e,r,o)=>{let n=t._zod.def;N(n.innerType,e,o);let i=e.seen.get(t);i.ref=n.innerType},gu=(t,e,r,o)=>{let n=t._zod.def;N(n.innerType,e,o);let i=e.seen.get(t);i.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},hu=(t,e,r,o)=>{let n=t._zod.def;N(n.innerType,e,o);let i=e.seen.get(t);i.ref=n.innerType,e.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},_u=(t,e,r,o)=>{let n=t._zod.def;N(n.innerType,e,o);let i=e.seen.get(t);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},vu=(t,e,r,o)=>{let n=t._zod.def,i=n.in._zod.traits.has("$ZodTransform"),s=e.io==="input"?i?n.out:n.in:n.out;N(s,e,o);let c=e.seen.get(t);c.ref=s},bu=(t,e,r,o)=>{let n=t._zod.def;N(n.innerType,e,o);let i=e.seen.get(t);i.ref=n.innerType,r.readOnly=!0},yu=(t,e,r,o)=>{let n=t._zod.def;N(n.innerType,e,o);let i=e.seen.get(t);i.ref=n.innerType},li=(t,e,r,o)=>{let n=t._zod.def;N(n.innerType,e,o);let i=e.seen.get(t);i.ref=n.innerType},ku=(t,e,r,o)=>{let n=t._zod.innerType;N(n,e,o);let i=e.seen.get(t);i.ref=n},ci={string:Lc,number:Fc,boolean:Mc,bigint:Zc,symbol:Vc,null:Bc,undefined:Hc,void:Kc,never:Gc,any:Wc,unknown:qc,date:Jc,enum:Yc,literal:Xc,nan:Qc,template_literal:eu,file:tu,success:nu,custom:ru,function:iu,transform:ou,map:au,set:su,array:cu,object:uu,union:ui,intersection:lu,tuple:du,record:mu,nullable:pu,nonoptional:fu,default:gu,prefault:hu,catch:_u,pipe:vu,readonly:bu,promise:yu,optional:li,lazy:ku};function di(t,e){if("_idmap"in t){let o=t,n=Me({...e,processors:ci}),i={};for(let u of o._idmap.entries()){let[l,d]=u;N(d,n)}let s={},c={registry:o,uri:e?.uri,defs:i};n.external=c;for(let u of o._idmap.entries()){let[l,d]=u;Ze(n,d),s[l]=Ve(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=Me({...e,processors:ci});return N(t,r),Ze(r,t),Ve(r,t)}var mi=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(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let r=e?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=Me({processors:ci,target:r,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,r={path:[],schemaPath:[]}){return N(e,this.ctx,r)}emit(e,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),Ze(this.ctx,e);let o=Ve(this.ctx,e),{"~standard":n,...i}=o;return i}};var Up={};var En={};Ie(En,{ZodAny:()=>Hu,ZodArray:()=>qu,ZodBase64:()=>Ni,ZodBase64URL:()=>Ri,ZodBigInt:()=>Lt,ZodBigIntFormat:()=>zi,ZodBoolean:()=>jt,ZodCIDRv4:()=>Ci,ZodCIDRv6:()=>Pi,ZodCUID:()=>$i,ZodCUID2:()=>Ii,ZodCatch:()=>_l,ZodCodec:()=>jn,ZodCustom:()=>Ln,ZodCustomStringFormat:()=>Ut,ZodDate:()=>Nn,ZodDefault:()=>dl,ZodDiscriminatedUnion:()=>Yu,ZodE164:()=>Di,ZodEmail:()=>ki,ZodEmoji:()=>xi,ZodEnum:()=>Rt,ZodExactOptional:()=>cl,ZodFile:()=>al,ZodFunction:()=>wl,ZodGUID:()=>On,ZodIPv4:()=>Ti,ZodIPv6:()=>Ai,ZodIntersection:()=>Xu,ZodJWT:()=>Ui,ZodKSUID:()=>Oi,ZodLazy:()=>$l,ZodLiteral:()=>ol,ZodMAC:()=>ju,ZodMap:()=>rl,ZodNaN:()=>bl,ZodNanoID:()=>Si,ZodNever:()=>Gu,ZodNonOptional:()=>Vi,ZodNull:()=>Vu,ZodNullable:()=>ll,ZodNumber:()=>zt,ZodNumberFormat:()=>tt,ZodObject:()=>Dn,ZodOptional:()=>Zi,ZodPipe:()=>zn,ZodPrefault:()=>pl,ZodPreprocess:()=>yl,ZodPromise:()=>El,ZodReadonly:()=>kl,ZodRecord:()=>Nt,ZodSet:()=>il,ZodString:()=>Dt,ZodStringFormat:()=>U,ZodSuccess:()=>hl,ZodSymbol:()=>Mu,ZodTemplateLiteral:()=>Sl,ZodTransform:()=>sl,ZodTuple:()=>el,ZodType:()=>I,ZodULID:()=>Ei,ZodURL:()=>Pn,ZodUUID:()=>Se,ZodUndefined:()=>Zu,ZodUnion:()=>Un,ZodUnknown:()=>Ku,ZodVoid:()=>Wu,ZodXID:()=>wi,ZodXor:()=>Ju,_ZodString:()=>yi,_default:()=>ml,_function:()=>Kf,any:()=>Sf,array:()=>Rn,base64:()=>af,base64url:()=>sf,bigint:()=>vf,boolean:()=>Fu,catch:()=>vl,check:()=>Gf,cidrv4:()=>rf,cidrv6:()=>of,codec:()=>Zf,cuid:()=>qp,cuid2:()=>Jp,custom:()=>Wf,date:()=>If,describe:()=>qf,discriminatedUnion:()=>Cf,e164:()=>cf,email:()=>Lp,emoji:()=>Gp,enum:()=>Fi,exactOptional:()=>ul,file:()=>jf,float32:()=>ff,float64:()=>gf,function:()=>Kf,guid:()=>Fp,hash:()=>pf,hex:()=>mf,hostname:()=>df,httpUrl:()=>Kp,instanceof:()=>Yf,int:()=>vi,int32:()=>hf,int64:()=>bf,intersection:()=>Qu,invertCodec:()=>Vf,ipv4:()=>ef,ipv6:()=>nf,json:()=>Qf,jwt:()=>uf,keyof:()=>Ef,ksuid:()=>Qp,lazy:()=>Il,literal:()=>zf,looseObject:()=>Tf,looseRecord:()=>Nf,mac:()=>tf,map:()=>Rf,meta:()=>Jf,nan:()=>Mf,nanoid:()=>Wp,nativeEnum:()=>Uf,never:()=>ji,nonoptional:()=>gl,null:()=>Bu,nullable:()=>An,nullish:()=>Lf,number:()=>Lu,object:()=>wf,optional:()=>Tn,partialRecord:()=>Pf,pipe:()=>bi,prefault:()=>fl,preprocess:()=>eg,promise:()=>Hf,readonly:()=>xl,record:()=>nl,refine:()=>Ol,set:()=>Df,strictObject:()=>Of,string:()=>wn,stringFormat:()=>lf,stringbool:()=>Xf,success:()=>Ff,superRefine:()=>Tl,symbol:()=>kf,templateLiteral:()=>Bf,transform:()=>Mi,tuple:()=>tl,uint32:()=>_f,uint64:()=>yf,ulid:()=>Yp,undefined:()=>xf,union:()=>Li,unknown:()=>et,url:()=>Hp,uuid:()=>Mp,uuidv4:()=>Zp,uuidv6:()=>Vp,uuidv7:()=>Bp,void:()=>$f,xid:()=>Xp,xor:()=>Af});var pi={};Ie(pi,{endsWith:()=>St,gt:()=>ke,gte:()=>Y,includes:()=>kt,length:()=>Qe,lowercase:()=>bt,lt:()=>ye,lte:()=>ae,maxLength:()=>Xe,maxSize:()=>Fe,mime:()=>$t,minLength:()=>Oe,minSize:()=>xe,multipleOf:()=>Le,negative:()=>ii,nonnegative:()=>ai,nonpositive:()=>oi,normalize:()=>It,overwrite:()=>pe,positive:()=>ri,property:()=>si,regex:()=>vt,size:()=>Ye,slugify:()=>Tt,startsWith:()=>xt,toLowerCase:()=>wt,toUpperCase:()=>Ot,trim:()=>Et,uppercase:()=>yt});var Pt={};Ie(Pt,{ZodISODate:()=>gi,ZodISODateTime:()=>fi,ZodISODuration:()=>_i,ZodISOTime:()=>hi,date:()=>Su,datetime:()=>xu,duration:()=>Iu,time:()=>$u});var fi=p("ZodISODateTime",(t,e)=>{Qa.init(t,e),U.init(t,e)});function xu(t){return rc(fi,t)}var gi=p("ZodISODate",(t,e)=>{es.init(t,e),U.init(t,e)});function Su(t){return ic(gi,t)}var hi=p("ZodISOTime",(t,e)=>{ts.init(t,e),U.init(t,e)});function $u(t){return oc(hi,t)}var _i=p("ZodISODuration",(t,e)=>{ns.init(t,e),U.init(t,e)});function Iu(t){return ac(_i,t)}var zp=(t,e)=>{pn.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>gn(t,r)},flatten:{value:r=>fn(t,r)},addIssue:{value:r=>{t.issues.push(r),t.message=JSON.stringify(t.issues,ut,2)}},addIssues:{value:r=>{t.issues.push(...r),t.message=JSON.stringify(t.issues,ut,2)}},isEmpty:{get(){return t.issues.length===0}}})},Qy=p("ZodError",zp),re=p("ZodError",zp,{Parent:Error});var Eu=mt(re),wu=pt(re),Ou=ft(re),Tu=gt(re),Au=dr(re),Cu=mr(re),Pu=pr(re),Nu=fr(re),Ru=gr(re),Du=hr(re),Uu=_r(re),zu=vr(re);var jp=new WeakMap;function Cn(t,e,r){let o=Object.getPrototypeOf(t),n=jp.get(o);if(n||(n=new Set,jp.set(o,n)),!n.has(e)){n.add(e);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",(t,e)=>($.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:Ct(t,"input"),output:Ct(t,"output")}}),t.toJSONSchema=jc(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.parse=(r,o)=>Eu(t,r,o,{callee:t.parse}),t.safeParse=(r,o)=>Ou(t,r,o),t.parseAsync=async(r,o)=>wu(t,r,o,{callee:t.parseAsync}),t.safeParseAsync=async(r,o)=>Tu(t,r,o),t.spa=t.safeParseAsync,t.encode=(r,o)=>Au(t,r,o),t.decode=(r,o)=>Cu(t,r,o),t.encodeAsync=async(r,o)=>Pu(t,r,o),t.decodeAsync=async(r,o)=>Nu(t,r,o),t.safeEncode=(r,o)=>Ru(t,r,o),t.safeDecode=(r,o)=>Du(t,r,o),t.safeEncodeAsync=async(r,o)=>Uu(t,r,o),t.safeDecodeAsync=async(r,o)=>zu(t,r,o),Cn(t,"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 q(this,r,o)},brand(){return this},register(r,o){return r.add(this,o),this},refine(r,o){return this.check(Ol(r,o))},superRefine(r,o){return this.check(Tl(r,o))},overwrite(r){return this.check(pe(r))},optional(){return Tn(this)},exactOptional(){return ul(this)},nullable(){return An(this)},nullish(){return Tn(An(this))},nonoptional(r){return gl(this,r)},array(){return Rn(this)},or(r){return Li([this,r])},and(r){return Qu(this,r)},transform(r){return bi(this,Mi(r))},default(r){return ml(this,r)},prefault(r){return fl(this,r)},catch(r){return vl(this,r)},pipe(r){return bi(this,r)},readonly(){return xl(this)},describe(r){let o=this.clone();return K.add(o,{description:r}),o},meta(...r){if(r.length===0)return K.get(this);let o=this.clone();return K.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(t,"description",{get(){return K.get(t)?.description},configurable:!0}),t)),yi=p("_ZodString",(t,e)=>{Je.init(t,e),I.init(t,e),t._zod.processJSONSchema=(o,n,i)=>Lc(t,o,n,i);let r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,Cn(t,"_ZodString",{regex(...o){return this.check(vt(...o))},includes(...o){return this.check(kt(...o))},startsWith(...o){return this.check(xt(...o))},endsWith(...o){return this.check(St(...o))},min(...o){return this.check(Oe(...o))},max(...o){return this.check(Xe(...o))},length(...o){return this.check(Qe(...o))},nonempty(...o){return this.check(Oe(1,...o))},lowercase(o){return this.check(bt(o))},uppercase(o){return this.check(yt(o))},trim(){return this.check(Et())},normalize(...o){return this.check(It(...o))},toLowerCase(){return this.check(wt())},toUpperCase(){return this.check(Ot())},slugify(){return this.check(Tt())}})}),Dt=p("ZodString",(t,e)=>{Je.init(t,e),yi.init(t,e),t.email=r=>t.check(zr(ki,r)),t.url=r=>t.check(In(Pn,r)),t.jwt=r=>t.check(ni(Ui,r)),t.emoji=r=>t.check(Zr(xi,r)),t.guid=r=>t.check($n(On,r)),t.uuid=r=>t.check(jr(Se,r)),t.uuidv4=r=>t.check(Lr(Se,r)),t.uuidv6=r=>t.check(Fr(Se,r)),t.uuidv7=r=>t.check(Mr(Se,r)),t.nanoid=r=>t.check(Vr(Si,r)),t.guid=r=>t.check($n(On,r)),t.cuid=r=>t.check(Br($i,r)),t.cuid2=r=>t.check(Hr(Ii,r)),t.ulid=r=>t.check(Kr(Ei,r)),t.base64=r=>t.check(Qr(Ni,r)),t.base64url=r=>t.check(ei(Ri,r)),t.xid=r=>t.check(Gr(wi,r)),t.ksuid=r=>t.check(Wr(Oi,r)),t.ipv4=r=>t.check(qr(Ti,r)),t.ipv6=r=>t.check(Jr(Ai,r)),t.cidrv4=r=>t.check(Yr(Ci,r)),t.cidrv6=r=>t.check(Xr(Pi,r)),t.e164=r=>t.check(ti(Di,r)),t.datetime=r=>t.check(xu(r)),t.date=r=>t.check(Su(r)),t.time=r=>t.check($u(r)),t.duration=r=>t.check(Iu(r))});function wn(t){return Qs(Dt,t)}var U=p("ZodStringFormat",(t,e)=>{D.init(t,e),yi.init(t,e)}),ki=p("ZodEmail",(t,e)=>{Ba.init(t,e),U.init(t,e)});function Lp(t){return zr(ki,t)}var On=p("ZodGUID",(t,e)=>{Za.init(t,e),U.init(t,e)});function Fp(t){return $n(On,t)}var Se=p("ZodUUID",(t,e)=>{Va.init(t,e),U.init(t,e)});function Mp(t){return jr(Se,t)}function Zp(t){return Lr(Se,t)}function Vp(t){return Fr(Se,t)}function Bp(t){return Mr(Se,t)}var Pn=p("ZodURL",(t,e)=>{Ha.init(t,e),U.init(t,e)});function Hp(t){return In(Pn,t)}function Kp(t){return In(Pn,{protocol:oe.httpProtocol,hostname:oe.domain,...b.normalizeParams(t)})}var xi=p("ZodEmoji",(t,e)=>{Ka.init(t,e),U.init(t,e)});function Gp(t){return Zr(xi,t)}var Si=p("ZodNanoID",(t,e)=>{Ga.init(t,e),U.init(t,e)});function Wp(t){return Vr(Si,t)}var $i=p("ZodCUID",(t,e)=>{Wa.init(t,e),U.init(t,e)});function qp(t){return Br($i,t)}var Ii=p("ZodCUID2",(t,e)=>{qa.init(t,e),U.init(t,e)});function Jp(t){return Hr(Ii,t)}var Ei=p("ZodULID",(t,e)=>{Ja.init(t,e),U.init(t,e)});function Yp(t){return Kr(Ei,t)}var wi=p("ZodXID",(t,e)=>{Ya.init(t,e),U.init(t,e)});function Xp(t){return Gr(wi,t)}var Oi=p("ZodKSUID",(t,e)=>{Xa.init(t,e),U.init(t,e)});function Qp(t){return Wr(Oi,t)}var Ti=p("ZodIPv4",(t,e)=>{rs.init(t,e),U.init(t,e)});function ef(t){return qr(Ti,t)}var ju=p("ZodMAC",(t,e)=>{os.init(t,e),U.init(t,e)});function tf(t){return tc(ju,t)}var Ai=p("ZodIPv6",(t,e)=>{is.init(t,e),U.init(t,e)});function nf(t){return Jr(Ai,t)}var Ci=p("ZodCIDRv4",(t,e)=>{as.init(t,e),U.init(t,e)});function rf(t){return Yr(Ci,t)}var Pi=p("ZodCIDRv6",(t,e)=>{ss.init(t,e),U.init(t,e)});function of(t){return Xr(Pi,t)}var Ni=p("ZodBase64",(t,e)=>{us.init(t,e),U.init(t,e)});function af(t){return Qr(Ni,t)}var Ri=p("ZodBase64URL",(t,e)=>{ls.init(t,e),U.init(t,e)});function sf(t){return ei(Ri,t)}var Di=p("ZodE164",(t,e)=>{ds.init(t,e),U.init(t,e)});function cf(t){return ti(Di,t)}var Ui=p("ZodJWT",(t,e)=>{ms.init(t,e),U.init(t,e)});function uf(t){return ni(Ui,t)}var Ut=p("ZodCustomStringFormat",(t,e)=>{ps.init(t,e),U.init(t,e)});function lf(t,e,r={}){return At(Ut,t,e,r)}function df(t){return At(Ut,"hostname",oe.hostname,t)}function mf(t){return At(Ut,"hex",oe.hex,t)}function pf(t,e){let r=e?.enc??"hex",o=`${t}_${r}`,n=oe[o];if(!n)throw new Error(`Unrecognized hash format: ${o}`);return At(Ut,o,n,e)}var zt=p("ZodNumber",(t,e)=>{wr.init(t,e),I.init(t,e),t._zod.processJSONSchema=(o,n,i)=>Fc(t,o,n,i),Cn(t,"ZodNumber",{gt(o,n){return this.check(ke(o,n))},gte(o,n){return this.check(Y(o,n))},min(o,n){return this.check(Y(o,n))},lt(o,n){return this.check(ye(o,n))},lte(o,n){return this.check(ae(o,n))},max(o,n){return this.check(ae(o,n))},int(o){return this.check(vi(o))},safe(o){return this.check(vi(o))},positive(o){return this.check(ke(0,o))},nonnegative(o){return this.check(Y(0,o))},negative(o){return this.check(ye(0,o))},nonpositive(o){return this.check(ae(0,o))},multipleOf(o,n){return this.check(Le(o,n))},step(o,n){return this.check(Le(o,n))},finite(){return this}});let r=t._zod.bag;t.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),t.isFinite=!0,t.format=r.format??null});function Lu(t){return sc(zt,t)}var tt=p("ZodNumberFormat",(t,e)=>{fs.init(t,e),zt.init(t,e)});function vi(t){return uc(tt,t)}function ff(t){return lc(tt,t)}function gf(t){return dc(tt,t)}function hf(t){return mc(tt,t)}function _f(t){return pc(tt,t)}var jt=p("ZodBoolean",(t,e)=>{bn.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>Mc(t,r,o,n)});function Fu(t){return fc(jt,t)}var Lt=p("ZodBigInt",(t,e)=>{Or.init(t,e),I.init(t,e),t._zod.processJSONSchema=(o,n,i)=>Zc(t,o,n,i),t.gte=(o,n)=>t.check(Y(o,n)),t.min=(o,n)=>t.check(Y(o,n)),t.gt=(o,n)=>t.check(ke(o,n)),t.gte=(o,n)=>t.check(Y(o,n)),t.min=(o,n)=>t.check(Y(o,n)),t.lt=(o,n)=>t.check(ye(o,n)),t.lte=(o,n)=>t.check(ae(o,n)),t.max=(o,n)=>t.check(ae(o,n)),t.positive=o=>t.check(ke(BigInt(0),o)),t.negative=o=>t.check(ye(BigInt(0),o)),t.nonpositive=o=>t.check(ae(BigInt(0),o)),t.nonnegative=o=>t.check(Y(BigInt(0),o)),t.multipleOf=(o,n)=>t.check(Le(o,n));let r=t._zod.bag;t.minValue=r.minimum??null,t.maxValue=r.maximum??null,t.format=r.format??null});function vf(t){return hc(Lt,t)}var zi=p("ZodBigIntFormat",(t,e)=>{gs.init(t,e),Lt.init(t,e)});function bf(t){return vc(zi,t)}function yf(t){return bc(zi,t)}var Mu=p("ZodSymbol",(t,e)=>{hs.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>Vc(t,r,o,n)});function kf(t){return yc(Mu,t)}var Zu=p("ZodUndefined",(t,e)=>{_s.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>Hc(t,r,o,n)});function xf(t){return kc(Zu,t)}var Vu=p("ZodNull",(t,e)=>{vs.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>Bc(t,r,o,n)});function Bu(t){return xc(Vu,t)}var Hu=p("ZodAny",(t,e)=>{bs.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>Wc(t,r,o,n)});function Sf(){return Sc(Hu)}var Ku=p("ZodUnknown",(t,e)=>{ys.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>qc(t,r,o,n)});function et(){return $c(Ku)}var Gu=p("ZodNever",(t,e)=>{ks.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>Gc(t,r,o,n)});function ji(t){return Ic(Gu,t)}var Wu=p("ZodVoid",(t,e)=>{xs.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>Kc(t,r,o,n)});function $f(t){return Ec(Wu,t)}var Nn=p("ZodDate",(t,e)=>{Ss.init(t,e),I.init(t,e),t._zod.processJSONSchema=(o,n,i)=>Jc(t,o,n,i),t.min=(o,n)=>t.check(Y(o,n)),t.max=(o,n)=>t.check(ae(o,n));let r=t._zod.bag;t.minDate=r.minimum?new Date(r.minimum):null,t.maxDate=r.maximum?new Date(r.maximum):null});function If(t){return wc(Nn,t)}var qu=p("ZodArray",(t,e)=>{$s.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>cu(t,r,o,n),t.element=e.element,Cn(t,"ZodArray",{min(r,o){return this.check(Oe(r,o))},nonempty(r){return this.check(Oe(1,r))},max(r,o){return this.check(Xe(r,o))},length(r,o){return this.check(Qe(r,o))},unwrap(){return this.element}})});function Rn(t,e){return Ac(qu,t,e)}function Ef(t){let e=t._zod.def.shape;return Fi(Object.keys(e))}var Dn=p("ZodObject",(t,e)=>{Is.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>uu(t,r,o,n),b.defineLazy(t,"shape",()=>e.shape),Cn(t,"ZodObject",{keyof(){return Fi(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:et()})},loose(){return this.clone({...this._zod.def,catchall:et()})},strict(){return this.clone({...this._zod.def,catchall:ji()})},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(Zi,this,r[0])},required(...r){return b.required(Vi,this,r[0])}})});function wf(t,e){let r={type:"object",shape:t??{},...b.normalizeParams(e)};return new Dn(r)}function Of(t,e){return new Dn({type:"object",shape:t,catchall:ji(),...b.normalizeParams(e)})}function Tf(t,e){return new Dn({type:"object",shape:t,catchall:et(),...b.normalizeParams(e)})}var Un=p("ZodUnion",(t,e)=>{yn.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>ui(t,r,o,n),t.options=e.options});function Li(t,e){return new Un({type:"union",options:t,...b.normalizeParams(e)})}var Ju=p("ZodXor",(t,e)=>{Un.init(t,e),Es.init(t,e),t._zod.processJSONSchema=(r,o,n)=>ui(t,r,o,n),t.options=e.options});function Af(t,e){return new Ju({type:"union",options:t,inclusive:!1,...b.normalizeParams(e)})}var Yu=p("ZodDiscriminatedUnion",(t,e)=>{Un.init(t,e),ws.init(t,e)});function Cf(t,e,r){return new Yu({type:"union",options:e,discriminator:t,...b.normalizeParams(r)})}var Xu=p("ZodIntersection",(t,e)=>{Os.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>lu(t,r,o,n)});function Qu(t,e){return new Xu({type:"intersection",left:t,right:e})}var el=p("ZodTuple",(t,e)=>{Tr.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>du(t,r,o,n),t.rest=r=>t.clone({...t._zod.def,rest:r})});function tl(t,e,r){let o=e instanceof $,n=o?r:e,i=o?e:null;return new el({type:"tuple",items:t,rest:i,...b.normalizeParams(n)})}var Nt=p("ZodRecord",(t,e)=>{Ts.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>mu(t,r,o,n),t.keyType=e.keyType,t.valueType=e.valueType});function nl(t,e,r){return!e||!e._zod?new Nt({type:"record",keyType:wn(),valueType:t,...b.normalizeParams(e)}):new Nt({type:"record",keyType:t,valueType:e,...b.normalizeParams(r)})}function Pf(t,e,r){let o=q(t);return o._zod.values=void 0,new Nt({type:"record",keyType:o,valueType:e,...b.normalizeParams(r)})}function Nf(t,e,r){return new Nt({type:"record",keyType:t,valueType:e,mode:"loose",...b.normalizeParams(r)})}var rl=p("ZodMap",(t,e)=>{As.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>au(t,r,o,n),t.keyType=e.keyType,t.valueType=e.valueType,t.min=(...r)=>t.check(xe(...r)),t.nonempty=r=>t.check(xe(1,r)),t.max=(...r)=>t.check(Fe(...r)),t.size=(...r)=>t.check(Ye(...r))});function Rf(t,e,r){return new rl({type:"map",keyType:t,valueType:e,...b.normalizeParams(r)})}var il=p("ZodSet",(t,e)=>{Cs.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>su(t,r,o,n),t.min=(...r)=>t.check(xe(...r)),t.nonempty=r=>t.check(xe(1,r)),t.max=(...r)=>t.check(Fe(...r)),t.size=(...r)=>t.check(Ye(...r))});function Df(t,e){return new il({type:"set",valueType:t,...b.normalizeParams(e)})}var Rt=p("ZodEnum",(t,e)=>{Ps.init(t,e),I.init(t,e),t._zod.processJSONSchema=(o,n,i)=>Yc(t,o,n,i),t.enum=e.entries,t.options=Object.values(e.entries);let r=new Set(Object.keys(e.entries));t.extract=(o,n)=>{let i={};for(let s of o)if(r.has(s))i[s]=e.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Rt({...e,checks:[],...b.normalizeParams(n),entries:i})},t.exclude=(o,n)=>{let i={...e.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 Rt({...e,checks:[],...b.normalizeParams(n),entries:i})}});function Fi(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(o=>[o,o])):t;return new Rt({type:"enum",entries:r,...b.normalizeParams(e)})}function Uf(t,e){return new Rt({type:"enum",entries:t,...b.normalizeParams(e)})}var ol=p("ZodLiteral",(t,e)=>{Ns.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>Xc(t,r,o,n),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function zf(t,e){return new ol({type:"literal",values:Array.isArray(t)?t:[t],...b.normalizeParams(e)})}var al=p("ZodFile",(t,e)=>{Rs.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>tu(t,r,o,n),t.min=(r,o)=>t.check(xe(r,o)),t.max=(r,o)=>t.check(Fe(r,o)),t.mime=(r,o)=>t.check($t(Array.isArray(r)?r:[r],o))});function jf(t){return Cc(al,t)}var sl=p("ZodTransform",(t,e)=>{Ds.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>ou(t,r,o,n),t._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Re(t.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(b.issue(i,r.value,e));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=t),r.issues.push(b.issue(s))}};let n=e.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 Mi(t){return new sl({type:"transform",transform:t})}var Zi=p("ZodOptional",(t,e)=>{Ar.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>li(t,r,o,n),t.unwrap=()=>t._zod.def.innerType});function Tn(t){return new Zi({type:"optional",innerType:t})}var cl=p("ZodExactOptional",(t,e)=>{Us.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>li(t,r,o,n),t.unwrap=()=>t._zod.def.innerType});function ul(t){return new cl({type:"optional",innerType:t})}var ll=p("ZodNullable",(t,e)=>{zs.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>pu(t,r,o,n),t.unwrap=()=>t._zod.def.innerType});function An(t){return new ll({type:"nullable",innerType:t})}function Lf(t){return Tn(An(t))}var dl=p("ZodDefault",(t,e)=>{js.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>gu(t,r,o,n),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function ml(t,e){return new dl({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():b.shallowClone(e)}})}var pl=p("ZodPrefault",(t,e)=>{Ls.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>hu(t,r,o,n),t.unwrap=()=>t._zod.def.innerType});function fl(t,e){return new pl({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():b.shallowClone(e)}})}var Vi=p("ZodNonOptional",(t,e)=>{Fs.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>fu(t,r,o,n),t.unwrap=()=>t._zod.def.innerType});function gl(t,e){return new Vi({type:"nonoptional",innerType:t,...b.normalizeParams(e)})}var hl=p("ZodSuccess",(t,e)=>{Ms.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>nu(t,r,o,n),t.unwrap=()=>t._zod.def.innerType});function Ff(t){return new hl({type:"success",innerType:t})}var _l=p("ZodCatch",(t,e)=>{Zs.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>_u(t,r,o,n),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function vl(t,e){return new _l({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}var bl=p("ZodNaN",(t,e)=>{Vs.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>Qc(t,r,o,n)});function Mf(t){return Tc(bl,t)}var zn=p("ZodPipe",(t,e)=>{Cr.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>vu(t,r,o,n),t.in=e.in,t.out=e.out});function bi(t,e){return new zn({type:"pipe",in:t,out:e})}var jn=p("ZodCodec",(t,e)=>{zn.init(t,e),kn.init(t,e)});function Zf(t,e,r){return new jn({type:"pipe",in:t,out:e,transform:r.decode,reverseTransform:r.encode})}function Vf(t){let e=t._zod.def;return new jn({type:"pipe",in:e.out,out:e.in,transform:e.reverseTransform,reverseTransform:e.transform})}var yl=p("ZodPreprocess",(t,e)=>{zn.init(t,e),Bs.init(t,e)}),kl=p("ZodReadonly",(t,e)=>{Hs.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>bu(t,r,o,n),t.unwrap=()=>t._zod.def.innerType});function xl(t){return new kl({type:"readonly",innerType:t})}var Sl=p("ZodTemplateLiteral",(t,e)=>{Ks.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>eu(t,r,o,n)});function Bf(t,e){return new Sl({type:"template_literal",parts:t,...b.normalizeParams(e)})}var $l=p("ZodLazy",(t,e)=>{qs.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>ku(t,r,o,n),t.unwrap=()=>t._zod.def.getter()});function Il(t){return new $l({type:"lazy",getter:t})}var El=p("ZodPromise",(t,e)=>{Ws.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>yu(t,r,o,n),t.unwrap=()=>t._zod.def.innerType});function Hf(t){return new El({type:"promise",innerType:t})}var wl=p("ZodFunction",(t,e)=>{Gs.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>iu(t,r,o,n)});function Kf(t){return new wl({type:"function",input:Array.isArray(t?.input)?tl(t?.input):t?.input??Rn(et()),output:t?.output??et()})}var Ln=p("ZodCustom",(t,e)=>{Js.init(t,e),I.init(t,e),t._zod.processJSONSchema=(r,o,n)=>ru(t,r,o,n)});function Gf(t){let e=new z({check:"custom"});return e._zod.check=t,e}function Wf(t,e){return Pc(Ln,t??(()=>!0),e)}function Ol(t,e={}){return Nc(Ln,t,e)}function Tl(t,e){return Rc(t,e)}var qf=Dc,Jf=Uc;function Yf(t,e={}){let r=new Ln({type:"custom",check:"custom",fn:o=>o instanceof t,abort:!0,...b.normalizeParams(e)});return r._zod.bag.Class=t,r._zod.check=o=>{o.value instanceof t||o.issues.push({code:"invalid_type",expected:t.name,input:o.value,inst:r,path:[...r._zod.def.path??[]]})},r}var Xf=(...t)=>zc({Codec:jn,Boolean:jt,String:Dt},...t);function Qf(t){let e=Il(()=>Li([wn(t),Lu(),Fu(),Bu(),Rn(e),nl(wn(),e)]));return e}function eg(t,e){return new yl({type:"pipe",in:Mi(t),out:e})}var tk={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 nk(t){M({customError:t})}function rk(){return M().customError}var Al;Al||(Al={});var k={...En,...pi,iso:Pt},ik=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 ok(t,e){let r=t.$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":e??"draft-2020-12"}function ak(t,e){if(!t.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=t.slice(1).split("/").filter(Boolean);if(r.length===0)return e.rootSchema;let o=e.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===o){let n=r[1];if(!n||!e.defs[n])throw new Error(`Reference not found: ${t}`);return e.defs[n]}throw new Error(`Reference not found: ${t}`)}function tg(t,e){if(t.not!==void 0){if(typeof t.not=="object"&&Object.keys(t.not).length===0)return k.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 n=t.$ref;if(e.refs.has(n))return e.refs.get(n);if(e.processing.has(n))return k.lazy(()=>{if(!e.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return e.refs.get(n)});e.processing.add(n);let i=ak(n,e),s=W(i,e);return e.refs.set(n,s),e.processing.delete(n),s}if(t.enum!==void 0){let n=t.enum;if(e.version==="openapi-3.0"&&t.nullable===!0&&n.length===1&&n[0]===null)return k.null();if(n.length===0)return k.never();if(n.length===1)return k.literal(n[0]);if(n.every(s=>typeof s=="string"))return k.enum(n);let i=n.map(s=>k.literal(s));return i.length<2?i[0]:k.union([i[0],i[1],...i.slice(2)])}if(t.const!==void 0)return k.literal(t.const);let r=t.type;if(Array.isArray(r)){let n=r.map(i=>{let s={...t,type:i};return tg(s,e)});return n.length===0?k.never():n.length===1?n[0]:k.union(n)}if(!r)return k.any();let o;switch(r){case"string":{let n=k.string();if(t.format){let i=t.format;i==="email"?n=n.check(k.email()):i==="uri"||i==="uri-reference"?n=n.check(k.url()):i==="uuid"||i==="guid"?n=n.check(k.uuid()):i==="date-time"?n=n.check(k.iso.datetime()):i==="date"?n=n.check(k.iso.date()):i==="time"?n=n.check(k.iso.time()):i==="duration"?n=n.check(k.iso.duration()):i==="ipv4"?n=n.check(k.ipv4()):i==="ipv6"?n=n.check(k.ipv6()):i==="mac"?n=n.check(k.mac()):i==="cidr"?n=n.check(k.cidrv4()):i==="cidr-v6"?n=n.check(k.cidrv6()):i==="base64"?n=n.check(k.base64()):i==="base64url"?n=n.check(k.base64url()):i==="e164"?n=n.check(k.e164()):i==="jwt"?n=n.check(k.jwt()):i==="emoji"?n=n.check(k.emoji()):i==="nanoid"?n=n.check(k.nanoid()):i==="cuid"?n=n.check(k.cuid()):i==="cuid2"?n=n.check(k.cuid2()):i==="ulid"?n=n.check(k.ulid()):i==="xid"?n=n.check(k.xid()):i==="ksuid"&&(n=n.check(k.ksuid()))}typeof t.minLength=="number"&&(n=n.min(t.minLength)),typeof t.maxLength=="number"&&(n=n.max(t.maxLength)),t.pattern&&(n=n.regex(new RegExp(t.pattern))),o=n;break}case"number":case"integer":{let n=r==="integer"?k.number().int():k.number();typeof t.minimum=="number"&&(n=n.min(t.minimum)),typeof t.maximum=="number"&&(n=n.max(t.maximum)),typeof t.exclusiveMinimum=="number"?n=n.gt(t.exclusiveMinimum):t.exclusiveMinimum===!0&&typeof t.minimum=="number"&&(n=n.gt(t.minimum)),typeof t.exclusiveMaximum=="number"?n=n.lt(t.exclusiveMaximum):t.exclusiveMaximum===!0&&typeof t.maximum=="number"&&(n=n.lt(t.maximum)),typeof t.multipleOf=="number"&&(n=n.multipleOf(t.multipleOf)),o=n;break}case"boolean":{o=k.boolean();break}case"null":{o=k.null();break}case"object":{let n={},i=t.properties||{},s=new Set(t.required||[]);for(let[u,l]of Object.entries(i)){let d=W(l,e);n[u]=s.has(u)?d:d.optional()}if(t.propertyNames){let u=W(t.propertyNames,e),l=t.additionalProperties&&typeof t.additionalProperties=="object"?W(t.additionalProperties,e):k.any();if(Object.keys(n).length===0){o=k.record(u,l);break}let d=k.object(n).passthrough(),m=k.looseRecord(u,l);o=k.intersection(d,m);break}if(t.patternProperties){let u=t.patternProperties,l=Object.keys(u),d=[];for(let g of l){let h=W(u[g],e),x=k.string().regex(new RegExp(g));d.push(k.looseRecord(x,h))}let m=[];if(Object.keys(n).length>0&&m.push(k.object(n).passthrough()),m.push(...d),m.length===0)o=k.object({}).passthrough();else if(m.length===1)o=m[0];else{let g=k.intersection(m[0],m[1]);for(let h=2;h<m.length;h++)g=k.intersection(g,m[h]);o=g}break}let c=k.object(n);t.additionalProperties===!1?o=c.strict():typeof t.additionalProperties=="object"?o=c.catchall(W(t.additionalProperties,e)):o=c.passthrough();break}case"array":{let n=t.prefixItems,i=t.items;if(n&&Array.isArray(n)){let s=n.map(u=>W(u,e)),c=i&&typeof i=="object"&&!Array.isArray(i)?W(i,e):void 0;c?o=k.tuple(s).rest(c):o=k.tuple(s),typeof t.minItems=="number"&&(o=o.check(k.minLength(t.minItems))),typeof t.maxItems=="number"&&(o=o.check(k.maxLength(t.maxItems)))}else if(Array.isArray(i)){let s=i.map(u=>W(u,e)),c=t.additionalItems&&typeof t.additionalItems=="object"?W(t.additionalItems,e):void 0;c?o=k.tuple(s).rest(c):o=k.tuple(s),typeof t.minItems=="number"&&(o=o.check(k.minLength(t.minItems))),typeof t.maxItems=="number"&&(o=o.check(k.maxLength(t.maxItems)))}else if(i!==void 0){let s=W(i,e),c=k.array(s);typeof t.minItems=="number"&&(c=c.min(t.minItems)),typeof t.maxItems=="number"&&(c=c.max(t.maxItems)),o=c}else o=k.array(k.any());break}default:throw new Error(`Unsupported type: ${r}`)}return o}function W(t,e){if(typeof t=="boolean")return t?k.any():k.never();let r=tg(t,e),o=t.type||t.enum!==void 0||t.const!==void 0;if(t.anyOf&&Array.isArray(t.anyOf)){let c=t.anyOf.map(l=>W(l,e)),u=k.union(c);r=o?k.intersection(r,u):u}if(t.oneOf&&Array.isArray(t.oneOf)){let c=t.oneOf.map(l=>W(l,e)),u=k.xor(c);r=o?k.intersection(r,u):u}if(t.allOf&&Array.isArray(t.allOf))if(t.allOf.length===0)r=o?r:k.any();else{let c=o?r:W(t.allOf[0],e),u=o?0:1;for(let l=u;l<t.allOf.length;l++)c=k.intersection(c,W(t.allOf[l],e));r=c}t.nullable===!0&&e.version==="openapi-3.0"&&(r=k.nullable(r)),t.readOnly===!0&&(r=k.readonly(r)),t.default!==void 0&&(r=r.default(t.default));let n={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let c of i)c in t&&(n[c]=t[c]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let c of s)c in t&&(n[c]=t[c]);for(let c of Object.keys(t))ik.has(c)||(n[c]=t[c]);return Object.keys(n).length>0&&e.registry.add(r,n),t.description&&(r=r.describe(t.description)),r}function ng(t,e){if(typeof t=="boolean")return t?k.any():k.never();let r;try{r=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=ok(r,e?.defaultTarget),n=r.$defs||r.definitions||{},i={version:o,defs:n,refs:new Map,processing:new Set,rootSchema:r,registry:e?.registry??K};return W(r,i)}var Cl={};Ie(Cl,{bigint:()=>lk,boolean:()=>uk,date:()=>dk,number:()=>ck,string:()=>sk});function sk(t){return ec(Dt,t)}function ck(t){return cc(zt,t)}function uk(t){return gc(jt,t)}function lk(t){return _c(Lt,t)}function dk(t){return Oc(Nn,t)}M(Pr());var Fn=a.object({endpoint:a.string().min(1).max(256).optional(),apiKey:a.string().min(1).max(256).optional(),workspace:a.string().min(1).max(256).optional(),region:a.string().min(1).max(256).optional(),feature:a.string().min(1).max(256).optional()}).strict(),rg=a.enum(["SUM","COUNT","MAX","UNIQUE_COUNT","LATEST"]),Pl=a.object({d:a.number().int().nonnegative(),w:a.number().int().positive(),c:a.number().nonnegative(),agg:rg.default("COUNT").optional(),valueProperty:a.string().optional(),uniqueProperty:a.string().optional(),provenance:a.enum(["plan","manual","provider"]).optional(),warnAt:a.number().min(0).max(1).optional(),scope:Fn.optional()}),mk=a.object({kind:a.literal("credential_validity")}),pk=a.object({kind:a.literal("track_only_bypass")}),fk=a.object({kind:a.literal("lifecycle_block"),blockOn:a.array(a.string()).default(["SUSPENDED","CANCELLED","INACTIVE"]),code:a.string().default("subscription_inactive")}),gk=a.object({kind:a.literal("identity_requirement"),require:a.enum(["org_only","org_and_user"]).default("org_only")}),hk=a.object({kind:a.literal("scope"),requireExplicit:a.boolean().default(!0)}),_k=a.object({kind:a.literal("feature_gate"),feature:a.string().min(1).max(120)}),vk=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(t=>t.allow!==void 0||t.block!==void 0,{message:"geo_restriction requires either `allow` or `block`"}),bk=a.enum(["fixed_window","sliding_window","token_bucket"]),yk=Pl.extend({kind:a.literal("rate_limit"),m:a.enum(["e","t"]).default("e"),strategy:bk.default("fixed_window"),bucket_capacity:a.number().positive().optional(),refill_rate_per_second:a.number().positive().optional()}).superRefine((t,e)=>{t.strategy==="token_bucket"?(t.bucket_capacity===void 0&&e.addIssue({code:"custom",message:"token_bucket strategy requires `bucket_capacity` (positive number)",path:["bucket_capacity"]}),t.refill_rate_per_second===void 0&&e.addIssue({code:"custom",message:"token_bucket strategy requires `refill_rate_per_second` (positive number)",path:["refill_rate_per_second"]})):(t.bucket_capacity!==void 0&&e.addIssue({code:"custom",message:`bucket_capacity is only valid when strategy === 'token_bucket' (got '${t.strategy}')`,path:["bucket_capacity"]}),t.refill_rate_per_second!==void 0&&e.addIssue({code:"custom",message:`refill_rate_per_second is only valid when strategy === 'token_bucket' (got '${t.strategy}')`,path:["refill_rate_per_second"]}))}),kk=a.enum(["fixed_window","sliding_window"]),xk=Pl.extend({kind:a.literal("quota"),ovr:a.enum(["BLOCK","ALLOW_AND_BILL"]),strategy:kk.default("fixed_window")}),Sk=Pl.extend({kind:a.literal("credit_balance"),ovr:a.enum(["BLOCK","ALLOW_AND_BILL"])}),$k=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)}),Ik=a.object({kind:a.literal("capability_limit"),capability:a.string().min(1).max(120),limit:a.union([a.number().int().nonnegative(),a.boolean()])}),Ek=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()}),wk=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)}),Ok=a.enum(["plan","manual","provider"]),Bi=a.object({maxInputTokens:a.number().int().positive().optional(),maxOutputTokens:a.number().int().positive().optional(),maxContextTokens:a.number().int().positive().optional(),maxPayloadBytes:a.number().int().positive().optional(),enforcement:a.enum(["enforce","track"]).default("enforce"),failMode:a.enum(["open","closed"]).default("open"),tokenCountSource:a.enum(["declared","estimated"]).optional(),scope:Fn.optional()}).refine(ig,{message:"capacity requires at least one ceiling (maxInputTokens / maxOutputTokens / maxContextTokens / maxPayloadBytes)"});function ig(t){return t.maxInputTokens!==void 0||t.maxOutputTokens!==void 0||t.maxContextTokens!==void 0||t.maxPayloadBytes!==void 0}var Tk=a.object({kind:a.literal("capacity"),maxInputTokens:a.number().int().positive().optional(),maxOutputTokens:a.number().int().positive().optional(),maxContextTokens:a.number().int().positive().optional(),maxPayloadBytes:a.number().int().positive().optional(),enforcement:a.enum(["enforce","track"]).default("enforce"),failMode:a.enum(["open","closed"]).default("open"),tokenCountSource:a.enum(["declared","estimated"]).optional(),scope:Fn.optional(),provenance:Ok.optional()}).refine(ig,{message:"capacity requires at least one ceiling (maxInputTokens / maxOutputTokens / maxContextTokens / maxPayloadBytes)"}),Nl=a.discriminatedUnion("kind",[mk,pk,fk,gk,hk,_k,vk,yk,xk,Sk,Ik,Ek,$k,wk,Tk]);var Mn=["customer_feature","control_plane","admin_internal","background_job","webhook","healthcheck","unclassified"],LT=new Set(Mn);var Hi=a.object({trafficClass:a.enum(Mn),policySource:a.enum(["declared","inherited","defaulted","legacy_inferred"]),limitParticipation:a.object({profile:a.enum(["customer_usage","business_capacity","control_plane","admin_internal","platform_abuse_only","healthcheck","none"]),pools:a.array(a.string().min(1)).optional(),scopes:a.array(a.object({endpoint:a.string().optional(),apiKey:a.string().optional(),workspace:a.string().optional(),region:a.string().optional(),feature:a.string().optional()}).passthrough()).optional(),metrics:a.array(a.string().min(1)).optional()}).passthrough(),customerBillingPolicy:a.object({customerBillable:a.boolean(),meterKey:a.string().min(1).optional(),chargeableOutcomes:a.enum(["success_only","success_and_partial","attempted","trusted_actual_usage_only"]),invoiceBehavior:a.string().optional()}).passthrough(),providerCostPolicy:a.object({providerCostTracked:a.boolean(),declaredProviderHint:a.string().optional(),declaredModelHint:a.string().optional()}).passthrough()}).passthrough();var JT=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 og=a.object({unit:a.enum(["requests","tokens","computeMs","dollars"]),window:a.enum(["second","minute","hour","day","week","month"]),capacity:a.number()}),Ak=a.object({id:a.string().min(1),slug:a.string().optional(),transportMode:a.enum(["direct","tunnel"]),verificationRequired:a.boolean().optional(),originUrl:a.string().optional(),originHostname:a.string().optional(),accessCredentialRef:a.string().optional(),policyVersion:a.string().optional()}),YT=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(og).readonly().optional(),userLimits:a.array(og).readonly().optional(),environmentId:a.string().optional(),contextTokenSecret:a.string().nullable().optional(),timeoutMs:a.number().positive().optional(),idleTimeoutMs:a.number().positive().optional(),backends:a.array(Ak).optional(),defaultBackendId:a.string().optional(),verificationRequired:a.boolean().optional()});var Ck=a.object({perRequestMinUnitsByDim:a.record(a.string(),a.number()).optional(),creditPoolMicros:a.number().optional(),perDimUnitCostMicros:a.record(a.string(),a.number()).optional()}),Pk=a.object({source:a.enum(["fixed","provider_catalog"]),meterKey:a.string(),selector:a.string().optional(),measures:a.array(a.string()),catalog:a.string().optional(),pricePolicy:a.string().optional(),markupPercent:a.number().optional(),fixedRatesMicros:a.record(a.string(),a.record(a.string(),a.number())).optional()}),Nk=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()}),Rk=a.object({feature:a.string(),method:a.string(),path:a.string(),meters:a.array(a.string()).optional(),usagePolicy:Hi.optional(),policyResolutionMode:a.enum(["legacy","policy"]).optional()}),XT=a.object({v:a.number(),sub:a.string(),compiledPlanId:a.string().min(1),planType:a.string(),ts:a.number(),constraints:a.array(Nl),cv:a.number(),policyResolutionMode:a.enum(["legacy","policy"]).optional(),dm:a.record(a.string(),a.number()),dmv:a.number().optional(),floor:Ck.nullable().optional(),displayDims:a.array(a.number()).optional(),meterSemantics:a.record(a.string(),Nk).optional(),rp:a.record(a.string(),Pk).optional(),fr:a.array(Rk).optional(),sig:a.string().min(1),sigKid:a.string().optional(),environmentId:a.string().optional()}).passthrough();var QT=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({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 Dk=["DRAFT","ACTIVE"],nA=a.enum(Dk),Uk=["ONBOARDING","ACTIVE","SUSPENDED"],ag=a.enum(Uk),zk=["ACTIVE","REVOKED"],rA=a.enum(zk),jk=["BLOCK","ALLOW_AND_BILL"],sg=a.enum(jk),Lk=["ACTIVE","ARCHIVED"],iA=a.enum(Lk),Fk=["ACTIVE","EXPERIMENTAL","LEGACY_STABLE","PHASING_OUT","SUPERSEDED","ARCHIVED"],oA=a.enum(Fk);var cg=["input","output","total","cached_read_input","cache_creation_input","context","max_output","estimated_output","actual_output","streaming_output"],Ki=[{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/backend 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/backend.",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/backend. 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/backend reports.",meters:[{key:"requests",display:"Requests",unit:"request"},{key:"compute_ms",display:"Compute Time",unit:"ms"}]}];function ug(t){let e=t.trim().toLowerCase();return Ki.find(r=>r.id===e)}function lg(){return Ki.map(t=>t.id)}var Mk="FS_RUNTIME_TOKEN";var Zk={payload:"x-fs-metering",signature:"x-fs-metering-sig",token:"x-fs-metering-token"};var lA={environmentVariable:Mk,presentation:Zk.token,storage:"sha256-hash-only"};var dg={missingSignature:"missing_signature",malformedSignature:"malformed_signature",unknownKeyId:"unknown_key_id",jwksUnavailable:"jwks_unavailable",badSignature:"bad_signature",bodyHashMismatch:"body_hash_mismatch",routeMismatch:"route_mismatch",clockSkew:"clock_skew",expiredSignature:"expired_signature",replayedNonce:"replayed_nonce",bodyTooLarge:"body_too_large",environmentMismatch:"environment_mismatch",missingToken:"missing_token",invalidToken:"invalid_token"};var dA=10*1024*1024;var Vk=["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","MIN_SPEND_TRUE_UP"],fA=a.enum(Vk);var vA=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 Bk=a.object({d:a.number(),w:a.number(),capacity:a.number(),remaining:a.number(),windowStart:a.number(),windowEnd:a.number()}),Hk=a.record(a.string(),Bk),Kk=a.object({allocations:a.array(a.number()),expiresAt:a.number()}),Gk=a.record(a.string(),Kk),Wk=a.record(a.string(),a.bigint()),SA=a.object({subscriptionId:a.string(),handoffToken:a.string(),targetShardId:a.string(),policyVersion:a.number(),entitlementVersion:a.number().nullable(),windowStates:Hk,activeLeases:Gk,totalsByDimension:Wk.optional(),billingCycleId:a.string().nullable().optional(),billingCycleStartMs:a.number().optional()});var qk={gatewayProjectRead:"gateway:project:read",gatewayResourceWrite:"gateway:resource:write",usageWrite:"usage:write",authzDeniedWrite:"authz-denied:write",reservationAuthorize:"reservation:authorize",reservationFinalize:"reservation:finalize",internalCronRun:"internal:cron:run",personaManage:"persona:manage"},OA=Object.values(qk);var Jk=["managed_frontend","custom_frontend","embedded_sdk","public_api","cli","agent","webhook","admin","internal"],pg=a.enum(Jk),mg=a.string().min(1).max(128),Yk=a.object({d:a.number().int().nonnegative(),w:a.number().int().positive(),rem:a.number(),cap:a.number()}).strict(),fg=a.object({v:a.literal(1),entV:a.number().int().nonnegative().optional(),entHash:mg.optional(),featureGrant:a.boolean().optional(),gates:a.array(mg).max(16).optional(),limits:a.array(Yk).max(16).optional()}).strict();var Xk=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:ag,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(),customerBillable: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:sg.optional(),environment:a.enum(["production","sandbox"]).optional(),surface:pg.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:fg.optional(),decisionId:a.string().min(1).max(256).optional(),denyClass:a.enum(["quota","rate","concurrency","capacity","spend","adaptive"]).optional(),blockingConstraintId:a.string().min(1).max(256).optional(),providerSettlements:a.array(a.object({meterId:a.string(),providerReported:a.number(),reconciled:a.number()})).optional(),usagePolicyId:a.string().min(1).max(256).optional(),policySource:a.enum(["declared","inherited","defaulted","legacy_inferred"]).optional(),trafficClass:a.enum(Mn).optional(),limitProfile:a.enum(["customer_usage","business_capacity","control_plane","admin_internal","platform_abuse_only","healthcheck","none"]).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 Qk=a.object({path:a.string(),code:a.string(),message:a.string()}),jA=a.object({reason:a.literal("schema_validation_failed"),receivedAt:a.string(),rawPayload:a.unknown(),issues:a.array(Qk),consumerVersion:a.string().optional(),originalMessageId:a.string().optional()});var Rl=["subscription.created","subscription.updated","subscription.canceled","payment.succeeded","payment.failed","rate_limit.exceeded","entitlement.changed","usage.threshold_reached"],Ft=a.enum(Rl);var fe=a.enum(["immediate","period_end"]),Zn=a.object({default:fe.default("period_end"),when:a.object({price_increase:fe.optional(),price_decrease:fe.optional(),feature_added:fe.optional(),feature_removed:fe.optional(),limit_increased:fe.optional(),limit_reduced:fe.optional(),credit_increased:fe.optional(),credit_reduced:fe.optional(),rating_changed:fe.optional()}).strict().default({price_increase:"period_end",price_decrease:"immediate",feature_added:"immediate",feature_removed:"period_end",limit_increased:"immediate",limit_reduced:"period_end",credit_increased:"immediate",credit_reduced:"period_end",rating_changed:"period_end"}),allowImmediatePriceIncrease:a.boolean().default(!1),allowImmediateEntitlementReduction:a.boolean().default(!1)}).strict().superRefine((t,e)=>{(t.when.price_increase??t.default)==="immediate"&&!t.allowImmediatePriceIncrease&&e.addIssue({code:"custom",path:["when","price_increase"],message:"price_increase cannot switch immediately without allowImmediatePriceIncrease: true"});for(let r of["feature_removed","limit_reduced","credit_reduced"])(t.when[r]??t.default)==="immediate"&&!t.allowImmediateEntitlementReduction&&e.addIssue({code:"custom",path:["when",r],message:`${r} cannot switch immediately without allowImmediateEntitlementReduction: true`})});var ex=a.object({kind:a.literal("credit"),amount_cents:a.number().int().nonnegative(),recurs:a.boolean().optional(),expires_after_days:a.number().int().positive().optional(),label:a.string().min(1).max(120).optional()}),tx=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()}),ge=a.discriminatedUnion("kind",[ex,tx]);function gg(t){return t.kind==="credit"&&t.recurs===!0&&t.label===void 0}function hg(t){return t.kind==="credit"&&t.recurs!==!0&&t.label===void 0}function Dl(t,e,r=["grants"]){if(!t)return;let o=0,n=0;for(let i of t)gg(i)?o+=1:hg(i)&&(n+=1);o>1&&e.addIssue({code:"custom",message:"At most one recurring `credit` grant (recurs:true, no label) is allowed \u2014 recurring credit is a single canonical entry.",path:r}),n>1&&e.addIssue({code:"custom",message:"At most one one-time `credit` grant (recurs:false, no label) is allowed \u2014 one-time credit is a single canonical entry.",path:r})}function _g(t){return t.grants&&t.grants.length>0?[...t.grants]:[]}function Vn(t){return _g(t).find(gg)?.amount_cents??0}function Mt(t){return _g(t).find(hg)?.amount_cents??0}var nx=a.object({percent:a.number().int().min(0).max(100)}),rx=a.object({threshold_cents:a.number().int().nonnegative(),refill_cents:a.number().int().positive()}),Ae=a.object({rollover:nx.optional(),auto_recharge:rx.optional()});var vg=a.enum(["linear","active_count"]);var ix=a.object({up_to:a.number().int().positive().nullable(),price_per_unit_micros:a.number().int().nonnegative()}),ox=a.object({strategy:a.enum(["graduated","volume"]),tiers:a.array(ix).min(1).max(20)}),he=a.object({dimension:a.string().min(1).max(64).regex(/^[a-z0-9_]+$/,"Meter dimension must be lowercase alphanumeric with underscores"),kind:vg.default("linear"),price_per_unit_micros:a.number().int().nonnegative().default(0),tiered:ox.optional(),included_units:a.number().int().positive().optional()}).superRefine((t,e)=>{if(t.tiered&&t.price_per_unit_micros>0&&e.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&&e.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 r=0,o=!1;for(let n=0;n<t.tiered.tiers.length;n++){let i=t.tiered.tiers[n];if(o){e.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&&e.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||e.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"]})}}),Ce=a.enum(["month","year"]),ax=a.object({meters:a.array(he).default([]),recurring_fee_cents:a.number().int().nonnegative().default(0),billing_interval:Ce.default("month"),grants:a.array(ge).max(40).default([]),creditPolicy:Ae.optional(),trial_days:a.number().int().nonnegative().default(0),max_monthly_spend_cents:a.number().int().nonnegative().optional()});var sx=a.string().min(1),cx=a.object({type:a.literal("named"),name:a.enum(["second","minute","hour","day","week","month"])}),ux=a.object({type:a.literal("custom"),seconds:a.number().int().positive(),label:a.string().optional()}),lx=a.discriminatedUnion("type",[cx,ux]),Be=a.object({dimension:sx,window:lx,capacity:a.number().nonnegative(),enforcement:a.enum(["enforce","track"]).optional(),warnAt:a.number().min(0).max(1).optional(),scope:Fn.optional(),acknowledgeUnreachable:a.boolean().optional()}),eC=a.array(Be).max(20);var dx=a.enum(["NONE","PRORATE","CREDIT"]).default("NONE"),mx={meters:a.array(he).default([]),recurring_fee_cents:a.number().int().nonnegative().default(0),billing_interval:Ce.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(ge).max(40).default([]),creditPolicy:Ae.optional()},px={meters:a.array(he).optional(),recurring_fee_cents:a.number().int().nonnegative().optional(),billing_interval:Ce.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(ge).max(40).optional(),creditPolicy:Ae.optional()},fx=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:dx,...px,limits:a.array(Be).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(),capacity:Bi.optional()}),bg=fx.superRefine((t,e)=>{Dl(t.grants,e)}),yg=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(),...mx,free:a.boolean().default(!1),limits:a.array(Be).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),capacity:Bi.optional(),legacy:a.boolean().optional().default(!1),variants:a.array(bg).max(4).optional(),archive:a.object({at:a.string().datetime().optional(),transitionTo:a.string().optional(),strategy:a.enum(["auto","explicit","block"]).default("auto")}).optional()}),Gi=yg.superRefine((t,e)=>{Dl(t.grants,e)});var gx=/^\$\{[A-Z][A-Z0-9_]{0,127}\}$/,Ul=a.string().min(3).max(200).refine(t=>gx.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."}),zl=a.object({maxAttempts:a.number().int().min(1).max(20).default(5),backoff:a.enum(["exponential","fixed"]).default("exponential")}),jl=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:Ul,events:a.array(Ft).min(1,"webhooks.endpoints[].events must subscribe to \u2265 1 event"),enabled:a.boolean().default(!0),retryPolicy:zl.default({maxAttempts:5,backoff:"exponential"})}),Ll=a.object({endpoints:a.array(jl).max(50).default([])});var hx=a.object({meters:a.array(he).optional(),recurring_fee_cents:a.number().int().nonnegative().optional(),billing_interval:Ce.optional(),grants:a.array(ge).max(40).optional(),creditPolicy:Ae.optional(),trial_days:a.number().int().nonnegative().optional(),max_monthly_spend_cents:a.number().int().nonnegative().optional(),limits:a.array(Be).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(),_x=a.object({url:a.string().url().optional(),secret:Ul.optional(),events:a.array(Ft).optional(),enabled:a.boolean().optional(),retryPolicy:zl.partial().optional()}).strict(),vx=a.object({plans:a.record(a.string(),hx).optional(),webhooks:a.object({endpoints:a.record(a.string(),_x).optional()}).strict().optional()}).strict(),Fl=a.record(a.string().min(1).max(64),vx);var kg=1,xg=["plans_table","usage_card","api_keys_panel","billing_summary","credit_balance","feature_panel","business_docs","audit_log","team_panel","markdown"],Sg=["/","/pricing","/dashboard","/dashboard/*","/settings","/settings/*","/team","/audit-log","/docs","/docs/*","/terms","/privacy","/persona","/persona-sign-in"],$g=a.string().min(1).max(200).regex(/^\/[a-zA-Z0-9_./-]*$/,"path must start with / and contain only [a-zA-Z0-9_./-]"),Ml=a.string().min(1).max(120).regex(/^[a-z0-9_-]+$/),Ig=a.object({label:a.string().min(1).max(80),path:$g,capability:Ml.optional()}),Eg=a.enum(xg),wg=a.object({component:Eg,props:a.record(a.string().min(1).max(80),a.unknown()).optional(),capability:Ml.optional(),gateMode:a.enum(["hide","disable","upsell"]).default("hide")}),Og=a.object({path:$g,title:a.string().min(1).max(120),requiresAuth:a.boolean(),capability:Ml.optional(),components:a.array(wg).max(12).default([])}),Zl=a.object({version:a.literal(kg),nav:a.array(Ig).max(12).default([]),pages:a.array(Og).max(24).default([])}).superRefine((t,e)=>{let r=new Set;t.pages.forEach((o,n)=>{r.has(o.path)&&e.addIssue({code:"custom",message:`duplicate frontend page path "${o.path}"`,path:["pages",n,"path"]}),r.add(o.path),Tg(o.path)&&e.addIssue({code:"custom",message:`frontend page path "${o.path}" is reserved by the template`,path:["pages",n,"path"]})})});function Tg(t){return Sg.some(e=>{if(e.endsWith("/*")){let r=e.slice(0,-2);return t===r||t.startsWith(`${r}/`)}return t===e})}var Ag=a.enum(["subscription","subject"]),Cg=a.enum(["reported","action_inferred"]),Pg=a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/),Ng=a.object({name:Pg,display:a.string().min(1).max(120).optional(),scope:Ag.default("subscription"),subjectType:a.string().min(1).max(64).regex(/^[a-zA-Z0-9_.:-]+$/).optional(),countSource:Cg.default("reported")}).superRefine((t,e)=>{t.scope==="subject"&&!t.subjectType&&e.addIssue({code:"custom",path:["subjectType"],message:"subjectType is required when resource scope is subject"}),t.scope==="subscription"&&t.subjectType&&e.addIssue({code:"custom",path:["subjectType"],message:"subjectType is only valid for subject-scoped counted resources"})}),Vl=a.array(Ng).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:Ce.default("month"),meters:a.array(he).default([]),grants:a.array(ge).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)}),Rg=a.record(a.string().min(1).max(64),bx).default({}),yx=a.enum(["active","canceled","paused","pending_activation"]),wC=a.object({addOnKey:a.string().min(1).max(64),status:yx.default("active"),activatedAt:a.string().datetime().optional(),canceledAt:a.string().datetime().nullable().optional(),stripeSubscriptionItemId:a.string().optional()});var Dg=/^[a-z0-9][a-z0-9_-]*$/,Bl=a.string().min(1).max(64).regex(Dg,"backend id must be a lowercase slug ([a-z0-9][a-z0-9_-]*)"),Ug=a.enum(["direct","tunnel"]),zg=a.enum(["embedded","sidecar"]);var jg=a.object({mode:Ug.default("direct"),runner:zg.optional()}).strict(),Lg=a.object({required:a.boolean().default(!1)}).strict(),Fg=a.object({name:a.string().min(1).max(120).optional(),slug:Bl.optional(),transport:jg.default({mode:"direct"}),verification:Lg.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(),Hl=a.record(Bl,Fg),Zt=Bl,Vt={unknownBackendInRoute:"UNKNOWN_BACKEND_IN_ROUTE",ambiguousDefaultBackend:"AMBIGUOUS_DEFAULT_BACKEND",routeMeterNotAllowedByBackend:"ROUTE_METER_NOT_ALLOWED_BY_BACKEND",unknownMeterInBackend:"UNKNOWN_METER_IN_BACKEND"};function Kl(t){let e=Object.keys(t??{});if(e.length===0)return{defaultId:null,ambiguous:!1};if(e.length===1)return{defaultId:e[0],ambiguous:!1};let r=e.filter(o=>t[o]?.default===!0);return r.length===1?{defaultId:r[0],ambiguous:!1}:{defaultId:null,ambiguous:!0}}var kx=a.string().min(2).max(20).regex(/^\d+(ms|s|m|h)$/,"rate_limit window must look like `60s`, `5m`, `1h`"),Mg=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:kx,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"})}),Zg=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")}),Vg=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"})}),Bg=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})}),Hg=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 Gl=a.discriminatedUnion("type",[a.object({type:a.literal("rate_limit"),config:Mg}),a.object({type:a.literal("auth"),config:Zg}),a.object({type:a.literal("concurrency"),config:Vg}),a.object({type:a.literal("retry"),config:Bg}),a.object({type:a.literal("transform"),config:Hg})]);var Wi=a.enum(["long","short","blocking"]).default("long"),Kg=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 Wl=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:Kg.default({}),mutation_class:a.enum(["runtime","contractual"]).default("runtime"),cacheProfile:Wi}),Gl);var xx=a.enum(["query","mutation"]),Sx=a.enum(["none","metadata","full"]),$x=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)}),Ix=a.object({resource:a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/),effect:a.enum(["create","delete"])}),Gg=a.object({id:a.string().min(1).max(160).regex(/^[a-z0-9_.:-]+$/),title:a.string().min(1).max(160).optional(),kind:xx,actorType:a.string().min(1).max(64).regex(/^[a-zA-Z0-9_.:-]+$/).optional(),subject:$x.optional(),inputSchemaRef:a.string().min(1).max(240).optional(),audit:Sx.default("metadata"),resource:Ix.optional()});var Wg=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 Ex(t){let e=t.trim();if(!e)return!1;let[r,o,n]=e.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 qg(t){return t.split(",").every(Ex)}var qi=a.union([a.string().min(1).max(100).refine(qg,{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)]),Jg=a.object({match:Wg,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:qi.optional()}).optional(),unmetered:a.boolean().optional(),inheritDefaultMeters:a.boolean().optional(),action:a.string().min(1).max(160).regex(/^[a-z0-9_.:-]+$/).optional(),backend:Zt.optional(),usagePolicy:Hi.optional()}).strict(),Yg=a.object({override_origin:a.string().url("override_origin must be a valid URL").nullable().default(null)}),Xg=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()}),ql=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:Wi,routes:a.array(Jg).min(1).max(50),upstream:Yg.default({override_origin:null}),policies:a.array(a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/)).max(20).default([]),runtime:Xg.default({}),plans:a.array(a.string().min(1).max(64)).max(20).default([]),actions:a.array(Gg).max(100).optional(),backend:Zt.optional()}).strict();function Qg(t,e){t.usagePricing!==void 0&&e.addIssue({code:"custom",path:["usagePricing"],message:"usagePricing is not supported. Define usage.meters.<key>.rating instead."})}function eh(t,e){t.filter(o=>o.free).length>1&&e.addIssue({code:"custom",path:["plans"],message:"Only one free plan is allowed per product"}),t.forEach((o,n)=>{o.free&&(wx(o,n,e),Ox(o,n,e))})}function wx(t,e,r){(sh(t)??0)!==0&&r.addIssue({code:"custom",path:["plans",e,"recurring_fee_cents"],message:"Free plans must have zero price"})}function Ox(t,e,r){t.limits.some(n=>!n.enforcement||n.enforcement==="enforce")||r.addIssue({code:"custom",path:["plans",e,"limits"],message:"Free plans must include at least one hard enforced limit"})}function th(t,e){let r=new Map;t.forEach((o,n)=>{if(o.free)return;let i=sh(o);if(i===void 0||i<=0)return;let s=Nx(o,i),c=r.get(s);if(c){e.addIssue({code:"custom",path:["plans",n,"recurring_fee_cents"],message:`Paid plan price duplicates plan "${c}" (${s})`});return}r.set(s,o.key)})}function nh(t,e){let r=new Set((t.metering?.meters??[]).map(n=>n.key).filter(n=>typeof n=="string"&&n.length>0)),o=new Set(Object.keys(t.usage?.meters??{}));t.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)||e.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 rh(t,e){if(!t.features)return;let r=new Set(t.plans.map(o=>o.key));for(let[o,n]of Object.entries(t.features)){if(!n.plans)continue;n.plans.forEach((s,c)=>{r.has(s)||e.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)&&e.addIssue({code:"custom",path:["features",o,"plans",c],message:`Feature "${o}" lists plan "${s}" more than once`}),i.add(s)})}}function ih(t,e){if(!t.features)return;let r=new Set((t.metering?.meters??[]).map(n=>n.key).filter(n=>typeof n=="string"&&n.length>0)),o=!1;for(let[n,i]of Object.entries(t.features))(i.routes??[]).forEach((c,u)=>{let l=Jl(c);l.length!==0&&(o=!0,l.forEach((d,m)=>{r.has(d)||e.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&&e.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 Tx(t,e){let r=new Map;for(let o of t.plans)r.set(o.key,new Set);if(!t.features){for(let o of r.values())for(let n of e)o.add(n);return r}for(let o of Object.values(t.features))Ax(o,r);return r}function Ax(t,e){let r=t.plans??[],o=t.routes??[];for(let n of r){let i=e.get(n);if(i)for(let s of o){if(s.unmetered===!0)continue;let c=Jl(s);if(c.length>0){for(let u of c)i.add(u);continue}}}}function Jl(t){let e=new Set;for(let r of Object.keys(t.metering?.defaults??{}))e.add(r);for(let r of t.metering?.reports??[])e.add(r);for(let r of Object.keys(t.metering?.estimates??{}))e.add(r);return[...e]}function Cx(t){if(!t||typeof t!="object")return null;let e=t;return typeof e.dimension=="string"?e.dimension:null}var Px=new Set(["credits"]);function oh(t,e){if(!t.plans||t.plans.length===0)return;let r=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??{})),n=Tx(t,r);t.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=Cx(l);g&&(u.has(g)||o.has(g)||Px.has(g)||e.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 ah(t,e){let r=t.backend;if(!r||Object.keys(r).length===0)return;let o=new Set(Object.keys(r)),n=new Set((t.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)||e.addIssue({code:"custom",path:["backend",u,"meters",m],message:`${Vt.unknownMeterInBackend}: backend "${u}" allows meter "${d}" but no metering.meters[] entry declares it.`})});let{defaultId:i,ambiguous:s}=Kl(r),c=!1;for(let u of Object.values(t.features??{}))for(let l of u.routes??[])l.backend===void 0&&(c=!0);s&&c&&e.addIssue({code:"custom",path:["backend"],message:`${Vt.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(t.features??{}))(l.routes??[]).forEach((d,m)=>{let g=d.backend??i;if(d.backend!==void 0&&!o.has(d.backend)){e.addIssue({code:"custom",path:["features",u,"routes",m,"backend"],message:`${Vt.unknownBackendInRoute}: route binds backend "${d.backend}" which is not declared in the product \`backend\` block.`});return}if(!g)return;let x=r[g]?.meters;if(!x)return;let A=new Set(x);for(let C of Jl(d))A.has(C)||e.addIssue({code:"custom",path:["features",u,"routes",m,"metering"],message:`${Vt.routeMeterNotAllowedByBackend}: route meters "${C}" but backend "${g}" does not allow it (backend.meters[] = [${x.join(", ")}]).`})})}function sh(t){return t.recurring_fee_cents}function Nx(t,e){return`USD:month:${e}`}var Rx=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")}),ch=a.enum(["exact_pre_request","estimated_then_settled","postpaid","strict_concurrency"]),Dx=a.enum(cg),Yl=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:ch.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(),tokenCategory:Dx.optional(),reserveStrategy:a.enum(["reserve_max","estimate","count_actual"]).optional(),reserveCeiling:a.number().int().positive().optional(),pairsWith:a.string().min(1).max(64).optional()}),uh=a.string().min(1).max(64).regex(/^[a-z0-9_]+$/,"Usage measure must be lowercase alphanumeric with underscores"),Ux=a.enum(["pass_through","markup"]),zx=a.object({source:a.literal("fixed"),rates:a.record(a.string().min(1),a.record(uh,a.number().int().nonnegative()))}),jx=a.object({source:a.literal("provider_catalog"),catalog:a.string().min(1).max(100),pricePolicy:Ux.default("pass_through"),markupPercent:a.number().nonnegative().max(1e4).optional(),marginMicros:a.number().int().nonnegative().optional()}),lh=a.discriminatedUnion("source",[zx,jx]),dh=a.object({selector:a.string().min(1).max(100).optional(),measures:a.array(uh).min(1).max(20),rating:lh.optional()}),mh=a.object({meters:a.record(a.string().min(1).max(64).regex(/^[a-z0-9_]+$/),dh)}),Lx=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:qi.optional()}),ph=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:Lx.optional(),inheritDefaultMeters:a.boolean().optional(),backend:Zt.optional()}).strict(),Xl=a.object({description:a.string().max(500).optional(),routes:a.array(ph).min(1).max(50),plans:a.array(a.string().min(1)).min(1).max(20)}),fh=a.record(a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/),Xl),gh=a.enum(["report","pull_request"]),hh=a.enum(["safe","non_blocking","economic_risk","blocking"]),_h=a.object({cleanup:a.object({enabled:a.boolean().default(!1),mode:gh.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(hh).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"]}}),vh=a.enum(["org_only","org_and_user"]),bh=a.enum(["clerk","test-personas"]),yh=a.object({identity_requirement:vh.optional(),context_tokens:a.object({enabled:a.boolean().default(!0)}).optional(),portal_auth:a.object({strategy:bh}).optional()}),kh=a.enum(["frontend","api","docs","widget","dashboard","webhook","worker","agent"]),xh=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Surface key must be lowercase alphanumeric with hyphens/underscores"),type:kh,display:a.string().min(1).max(100).optional(),description:a.string().max(500).optional()}),Sh=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(Be).max(100).optional(),meters:a.array(a.string().min(1).max(64)).max(100).optional()}),$h=a.array(xh).max(20).default([]),Ih=a.array(Sh).max(100).default([]),Eh=a.enum(["async_job","agent_task","scheduled","lifecycle","background"]),wh=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)})]),Oh=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:Eh,trigger:wh,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()}),Th=a.array(Oh).max(100).default([]),nt=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(Yl).max(10).default([]),billOn4xx:a.boolean().default(!1)}).default({meters:[],billOn4xx:!1}),backend:Hl.optional(),usage:mh.optional(),usagePricing:a.never({error:"usagePricing is not supported. Define usage.meters.<key>.rating instead."}).optional(),features:fh.optional(),resources:Vl,policies:_h,customer_context:yh.optional(),surfaces:$h,entitlements:Ih,workflows:Th,frontend:Zl.optional(),billing:a.object({applyLimitUpgradesInstantly:a.boolean().optional(),subscriberChangePolicy:Zn.default({default:"period_end",when:{price_increase:"period_end",price_decrease:"immediate",feature_added:"immediate",feature_removed:"period_end",limit_increased:"immediate",limit_reduced:"period_end",credit_increased:"immediate",credit_reduced:"period_end",rating_changed:"period_end"},allowImmediatePriceIncrease:!1,allowImmediateEntitlementReduction:!1})}).default({subscriberChangePolicy:{default:"period_end",when:{price_increase:"period_end",price_decrease:"immediate",feature_added:"immediate",feature_removed:"period_end",limit_increased:"immediate",limit_reduced:"period_end",credit_increased:"immediate",credit_reduced:"period_end",rating_changed:"period_end"},allowImmediatePriceIncrease:!1,allowImmediateEntitlementReduction:!1}}),plans:a.array(Gi).max(4).default([]),add_ons:Rg,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:Ll.optional(),environments:Fl.optional(),ephemeral:a.object({defaultPlan:a.string().min(1).optional()}).optional()}).superRefine((t,e)=>{Qg(t,e),eh(t.plans,e),th(t.plans,e),nh(t,e),rh(t,e),ih(t,e),oh(t,e),ah(t,e)}),Fx=a.object({product:nt.shape.product}),Mx=a.object({gateway:nt.shape.gateway}),Zx=a.object({metering:nt.shape.metering}),Vx=a.object({plans:nt.shape.plans});var Ql=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 Ah=1;var Bx=a.object({irVersion:a.literal(Ah),sdkVersion:a.string().min(1).max(64),product:nt,routes:a.array(ql).max(200).default([]),policies:a.array(Wl).max(200).default([]),capabilities:a.array(Ql).max(200).default([])}).strict();var ZP=a.object({subscriberChangePolicy:Zn.optional()}),VP=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()}),BP=a.object({id:a.string(),actorUserId:a.string().optional(),action:a.string(),decision:a.string().optional(),timestamp:a.string(),details:a.unknown().optional()}),HP=a.object({name:a.string(),branch:a.string().optional(),isProduction:a.boolean().optional()}),KP=a.object({id:a.string(),name:a.string(),apiKeyId:a.string().optional()});var Hx=["IMMEDIATE_NO_PRORATE","IMMEDIATE_PRORATE_CHARGE_NEW","IMMEDIATE_PRORATE_REFUND_OLD","IMMEDIATE_PRORATE_BOTH","DEFER_TO_PERIOD_END"],QP=a.enum(Hx);var Ch=a.object({id:a.string(),billingCycleId:a.string(),effectiveStart:a.string(),effectiveEnd:a.string(),compiledPlanId:a.string()}),Ph=a.object({currentPeriod:Ch,priorPeriod:Ch.optional()});var Kx=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({featureGateOverrides:a.record(a.string(),a.boolean()).optional()}).optional(),subscriptionStatus:a.string(),subscriberStatus:a.string(),scopes:a.array(a.string()),periods:Ph,expiresAt:a.number().optional(),trialEndsAt:a.string().optional()}),Gx=a.discriminatedUnion("kind",[a.object({kind:a.literal("found"),state:Kx,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)})]),oN=a.object({environmentId:a.string().nullable(),subjectKeys:a.array(a.string()).min(1).max(500)}),aN=a.object({results:a.array(a.object({subjectKey:a.string(),result:Gx}))}),Wx=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()}),sN=a.discriminatedUnion("kind",[a.object({kind:a.literal("found"),record:Wx,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)})]),cN=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)})]),qx=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()}),uN=a.discriminatedUnion("kind",[a.object({kind:a.literal("found"),tenant:qx,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 Ji=["consumer_api_key","consumer_session_token","test_persona_session_token","builder_master_key","builder_session_token","maker_jwt","service_jwt","internal_service","context_token"],Nh=a.enum(Ji);var Jx=a.object({fromIssuer:a.string().min(1),fromTokenId:a.string().min(1),intent:a.string().min(1)}),Rh=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(Jx)});var ed=["template","embedded","provisioned","agent"],Yx=a.enum(ed),Xx=["builder_user","builder_org","maker","consumer_subject","internal_service","service_jwt","agent_runtime"],Qx=a.enum(Xx),Dh=a.object({kind:Qx,id:a.string().min(1),label:a.string().optional()}),eS=["subscription","organization","platform"],tS=a.enum(eS),nS=a.object({kind:tS,id:a.string().min(1)}),rS=a.object({type:Nh,id:a.string().min(1),hint:a.string().max(8).optional()}),iS=a.object({compiledPlanId:a.string().min(1),fromCache:a.boolean().optional()}),Uh=a.object({requestId:a.string().min(1),surface:Yx,builderOrgId:a.string().min(1),productId:a.string().min(1).optional(),runtimeId:a.string().min(1).optional(),template:a.string().optional(),caller:Dh,actor:Dh,billingSubject:nS,credential:rS,capability:a.string().min(1),scopes:a.array(a.string()),entitlement:iS.optional(),trust:Rh});var Bn;(function(t){t.AUTHZ_DECISION="authz_decision",t.ENTITLEMENT_DECISION="entitlement_decision",t.RUNTIME_LIMIT_DECISION="runtime_limit_decision",t.RESOURCE_GOVERNANCE_DECISION="resource_governance_decision",t.RESOURCE_MUTATION="resource_mutation",t.LIFECYCLE_EVENT="lifecycle_event",t.RUNTIME_CONTEXT_CREATED="runtime_context_created",t.SYSTEM_ACTION="system_action"})(Bn||(Bn={}));var zh=Object.values(Bn),ON=a.enum(zh),jh=a.object({decisionId:a.string().optional(),ctx:Uh,details:a.record(a.string(),a.unknown()).optional(),createdAt:a.string().min(1)}),oS=zh.filter(t=>t!==Bn.SYSTEM_ACTION),aS=jh.extend({kind:a.enum(oS)}),sS=jh.extend({kind:a.literal(Bn.SYSTEM_ACTION),actorType:a.string().min(1),action:a.string().min(1)}),TN=a.discriminatedUnion("kind",[aS,sS]);var O=["template","agent"],cS=["provisioned"],Lh=[...ed],T=["builder_master_key","builder_session_token","maker_jwt"],Bt=["service_jwt","internal_service"],td=["consumer_api_key","consumer_session_token","test_persona_session_token","context_token"],Fh=[...Ji],Hn="subscriptions:write",uS=[{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:[Hn],allowedSurfaces:O,allowedCredentialTypes:[...T,...Bt],description:"Provision a new subscription for a subscriber"},{id:"subscriptions.update",operation:"Update a subscription",requiredScopes:[Hn],allowedSurfaces:O,allowedCredentialTypes:[...T,...Bt],description:"Change plan, enforcement mode, or schedule"},{id:"subscriptions.cancel",operation:"Cancel a subscription",requiredScopes:[Hn],allowedSurfaces:O,allowedCredentialTypes:[...T,...Bt],description:"Cancel a subscription (immediate or end-of-period)"},{id:"subscriptions.pause",operation:"Pause a subscription",requiredScopes:[Hn],allowedSurfaces:O,allowedCredentialTypes:[...T,...Bt],description:"Pause a subscription (no usage, no billing)"},{id:"subscriptions.resume",operation:"Resume a subscription",requiredScopes:[Hn],allowedSurfaces:O,allowedCredentialTypes:[...T,...Bt],description:"Resume a paused subscription"},{id:"subscriptions.read",operation:"Read a subscription",requiredScopes:["subscriptions:read"],allowedSurfaces:O,allowedCredentialTypes:[...T,...Bt],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,...td],description:"Mint a one-time Stripe portal-session redirect URL"},{id:"billing.read",operation:"Read billing state",requiredScopes:["billing:read"],allowedSurfaces:O,allowedCredentialTypes:[...T,...td],description:"Read invoices, balances, scheduled changes"},{id:"runtime-context.read",operation:"Read the caller's runtime context",requiredScopes:[],allowedSurfaces:Lh,allowedCredentialTypes:Fh,description:"Introspect the resolved RuntimeContext (minus secrets)"},{id:"capabilities.list",operation:"List registered capabilities",requiredScopes:[],allowedSurfaces:Lh,allowedCredentialTypes:Fh,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 business.config.ts to a previous commit (dry-run capable)"},{id:"api.invoke",operation:"Invoke a consumer-facing gateway route",requiredScopes:[],allowedSurfaces:cS,allowedCredentialTypes:td,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."}],NN=Object.freeze(uS);var lS=["BusinessApplyWorkflow","RollbackWorkflow","StripeSyncWorkflow","WebhookDispatchWorkflow","SubscriptionTransitionWorkflow","CompiledPlanLifecycleWorkflow","ShardReshardWorkflow","MaintenanceJobWorkflow"],zN=a.enum(lS),dS=["transient","permanent","rollback-required","human-intervention"],jN=a.enum(dS);var mS=["SAFE_AUTOMATIC","REQUIRES_APPROVAL","IRREVERSIBLE","BILLING_IMPACTING","EDGE_BREAKING"],LN=a.enum(mS);var HN=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(t=>({...t,workflowExecutionId:t.workflowExecutionId,stepId:t.stepId===void 0?void 0:t.stepId}));var pS=["GATEWAY","HOSTED_UI_PAGE","HOSTED_UI_PROXY"],fS=["platform_requests"],gS=a.object({requestId:a.string().optional(),productId:a.string().optional(),route:a.string().optional(),usageEventId:a.string().optional()}).strict(),hS=a.object({organizationId:a.string().min(1),source:a.enum(pS),dimension:a.enum(fS),quantity:a.number().int().positive(),idempotencyKey:a.string().min(1).max(512),occurredAt:a.string().datetime(),metadata:gS.optional()}).strict(),pR=a.object({entries:a.array(hS).min(1).max(500)});var ie={VALIDATION_ERROR:"VALIDATION_ERROR",CONFLICT:"CONFLICT",NOT_FOUND:"NOT_FOUND",NOT_IMPLEMENTED:"NOT_IMPLEMENTED",NOT_CONFIGURED:"NOT_CONFIGURED",INTERNAL_ERROR:"INTERNAL_ERROR",SERVICE_UNAVAILABLE:"SERVICE_UNAVAILABLE",RATE_LIMIT_EXCEEDED:"RATE_LIMIT_EXCEEDED",DELETE_CONFIRMATION_REQUIRED:"DELETE_CONFIRMATION_REQUIRED",MISSING_HOST:"MISSING_HOST",MISSING_CONNECTIONS:"MISSING_CONNECTIONS",SECRET_NOT_CONFIGURED:"SECRET_NOT_CONFIGURED",UNAUTHORIZED:"UNAUTHORIZED",FORBIDDEN:"FORBIDDEN",INVALID_ACCESS_KEY:"INVALID_ACCESS_KEY",AUTO_KEY_CREATION_FAILED:"AUTO_KEY_CREATION_FAILED",PERSONA_NOT_FOUND:"PERSONA_NOT_FOUND",PERSONA_REVOKED:"PERSONA_REVOKED",PERSONA_SESSIONS_NOT_SUPPORTED:"PERSONA_SESSIONS_NOT_SUPPORTED",NOT_TEST_PERSONA_ENV:"NOT_TEST_PERSONA_ENV",PERSONA_AUTH_DISABLED_IN_PROD:"PERSONA_AUTH_DISABLED_IN_PROD",MAKER_TOKEN_NOT_FOUND:"MAKER_TOKEN_NOT_FOUND",MAKER_TOKEN_NOT_REVOKED:"MAKER_TOKEN_NOT_REVOKED",MAKER_TOKEN_NO_PRODUCT:"MAKER_TOKEN_NO_PRODUCT",MAKER_TOKEN_REVOKED:"MAKER_TOKEN_REVOKED",ORGANIZATION_NOT_FOUND:"ORGANIZATION_NOT_FOUND",ORG_HAS_ACTIVE_SUBSCRIPTIONS:"ORG_HAS_ACTIVE_SUBSCRIPTIONS",ORG_HAS_OUTSTANDING_BALANCE:"ORG_HAS_OUTSTANDING_BALANCE",PERSONAL_ORG_NOT_DELETABLE:"PERSONAL_ORG_NOT_DELETABLE",MEMBER_NOT_FOUND:"MEMBER_NOT_FOUND",INVITATION_NOT_FOUND:"INVITATION_NOT_FOUND",CUSTOMER_NOT_FOUND:"CUSTOMER_NOT_FOUND",PRODUCT_NOT_FOUND:"PRODUCT_NOT_FOUND",PRODUCT_DELETE_BLOCKED:"PRODUCT_DELETE_BLOCKED",PRODUCT_REPO_NOT_LINKED:"PRODUCT_REPO_NOT_LINKED",PRODUCT_SCOPE_MISMATCH:"PRODUCT_SCOPE_MISMATCH",YAML_PARSE_ERROR:"YAML_PARSE_ERROR",COMPILATION_NOT_FOUND:"COMPILATION_NOT_FOUND",PLAN_NOT_FOUND:"PLAN_NOT_FOUND",PLAN_HAS_ACTIVE_SUBSCRIPTIONS:"PLAN_HAS_ACTIVE_SUBSCRIPTIONS",PLAN_SLUG_CONFLICT:"PLAN_SLUG_CONFLICT",PLAN_UPGRADE_REQUIRED:"PLAN_UPGRADE_REQUIRED",SLUG_CONFLICT:"SLUG_CONFLICT",SLUG_BLOCKED:"SLUG_BLOCKED",SLUG_OFFENSIVE:"SLUG_OFFENSIVE",SLUG_RESERVED:"SLUG_RESERVED",SLUG_IMPERSONATION:"SLUG_IMPERSONATION",SLUG_INVALID_FORMAT:"SLUG_INVALID_FORMAT",SLUG_VALIDATOR_NOT_READY:"SLUG_VALIDATOR_NOT_READY",PRICING_PREVIEW_FAILED:"PRICING_PREVIEW_FAILED",PRICING_REPLAY_FAILED:"PRICING_REPLAY_FAILED",RESERVATION_NOT_FOUND:"RESERVATION_NOT_FOUND",PROMO_CODE_NOT_FOUND:"PROMO_CODE_NOT_FOUND",PROMO_CODE_INVALID:"PROMO_CODE_INVALID",BILLING_EVENT_NOT_FOUND:"BILLING_EVENT_NOT_FOUND",BILLING_NOT_CONFIGURED:"BILLING_NOT_CONFIGURED",SUBSCRIPTION_NOT_READY:"SUBSCRIPTION_NOT_READY",SUBSCRIPTION_FETCH_FAILED:"SUBSCRIPTION_FETCH_FAILED",INVALID_STATE:"INVALID_STATE",DUPLICATE_TRANSITION:"DUPLICATE_TRANSITION",LEGACY_STABLE_NOT_SELF_SERVICE:"LEGACY_STABLE_NOT_SELF_SERVICE",ARCHIVED_TARGET:"ARCHIVED_TARGET",FREE_TO_PAID_VIA_CHECKOUT_ONLY:"FREE_TO_PAID_VIA_CHECKOUT_ONLY",CAPABILITY_LIMIT_EXCEEDED:"CAPABILITY_LIMIT_EXCEEDED",CAPABILITY_CHECK_UNAVAILABLE:"CAPABILITY_CHECK_UNAVAILABLE",STRIPE_NOT_CONFIGURED:"STRIPE_NOT_CONFIGURED",STRIPE_BALANCE_OUTSTANDING:"STRIPE_BALANCE_OUTSTANDING",STRIPE_OPERATION_FAILED:"STRIPE_OPERATION_FAILED",STRIPE_RESYNC_FAILED:"STRIPE_RESYNC_FAILED",CHECKOUT_SESSION_FAILED:"CHECKOUT_SESSION_FAILED",POLAR_PRODUCT_NOT_CONFIGURED:"POLAR_PRODUCT_NOT_CONFIGURED",BILLING_TAX_NOT_ENROLLED:"BILLING_TAX_NOT_ENROLLED",WEBHOOK_NOT_FOUND:"WEBHOOK_NOT_FOUND",WEBHOOK_DISPATCH_FAILED:"WEBHOOK_DISPATCH_FAILED",WEBHOOK_SECRET_NOT_CONFIGURED:"WEBHOOK_SECRET_NOT_CONFIGURED",INVALID_WEBHOOK_SIGNATURE:"INVALID_WEBHOOK_SIGNATURE",MISSING_RAW_BODY:"MISSING_RAW_BODY",WEBHOOK_REDIRECTED:"WEBHOOK_REDIRECTED",MANAGED_BY_CODE:"MANAGED_BY_CODE",GITHUB_CONNECTION_NOT_FOUND:"GITHUB_CONNECTION_NOT_FOUND",GITHUB_NOT_CONNECTED:"GITHUB_NOT_CONNECTED",GITHUB_SYNC_FAILED:"GITHUB_SYNC_FAILED",GITHUB_SYNC_UNAVAILABLE:"GITHUB_SYNC_UNAVAILABLE",GITHUB_TOKEN_FAILED:"GITHUB_TOKEN_FAILED",GIT_PROVIDER_NOT_CONFIGURED:"GIT_PROVIDER_NOT_CONFIGURED",ENVIRONMENT_NOT_FOUND:"ENVIRONMENT_NOT_FOUND",ENVIRONMENT_CLEANUP_FAILED:"ENVIRONMENT_CLEANUP_FAILED",DEPLOYMENT_RUN_NOT_FOUND:"DEPLOYMENT_RUN_NOT_FOUND",BRANCH_NO_MATCHING_ENV:"BRANCH_NO_MATCHING_ENV",APPLY_SPEC_FAILED:"APPLY_SPEC_FAILED",BOOTSTRAP_FAILED:"BOOTSTRAP_FAILED",JOB_ALREADY_RUNNING:"JOB_ALREADY_RUNNING",LOGO_DELETE_FAILED:"LOGO_DELETE_FAILED",LOGO_UPLOAD_FAILED:"LOGO_UPLOAD_FAILED",INVALID_LOGO_FORMAT:"INVALID_LOGO_FORMAT"};var vR={missing_token:ie.UNAUTHORIZED,invalid_token:ie.UNAUTHORIZED,missing_signature:ie.UNAUTHORIZED,malformed_signature:ie.UNAUTHORIZED,unknown_key_id:ie.UNAUTHORIZED,bad_signature:ie.UNAUTHORIZED,expired_signature:ie.UNAUTHORIZED,clock_skew:ie.UNAUTHORIZED,replayed_nonce:ie.UNAUTHORIZED,body_hash_mismatch:ie.UNAUTHORIZED,route_mismatch:ie.UNAUTHORIZED,environment_mismatch:ie.UNAUTHORIZED,jwks_unavailable:ie.SERVICE_UNAVAILABLE,body_too_large:ie.VALIDATION_ERROR};var bR=Object.values(dg);var Mh={limit_allocator_unavailable:{statuses:[503],source:"batcher-enum",retryAfter:!0,verifiedAt:["engine/enforcement/runtime.ts:471"]},limit_exceeded:{statuses:[402],source:"batcher-enum",retryAfter:!0,verifiedAt:["engine/enforcement/batcher.ts:326","engine/enforcement/constraints/quota.ts:69"]},rate_limited:{statuses:[429],source:"batcher-enum",retryAfter:!0,verifiedAt:["engine/enforcement/batcher.ts:328","engine/enforcement/constraints/rate-limit.ts:74","engine/pipeline/rate-limit.ts:83"]},credit_exhausted:{statuses:[402],source:"batcher-enum",retryAfter:!0,verifiedAt:["engine/enforcement/batcher.ts:333"]},enforcement_denied:{statuses:[402],source:"batcher-enum",retryAfter:!0,verifiedAt:["engine/enforcement/batcher.ts:335"]},feature_not_enabled:{statuses:[403],source:"runtime-inline",retryAfter:!1,verifiedAt:["engine/enforcement/runtime.ts:188"]},invalid_entitlement_shape:{statuses:[503],source:"runtime-inline",retryAfter:!0,verifiedAt:["engine/enforcement/runtime.ts:144"]},unsupported_constraint_schema:{statuses:[503],source:"runtime-inline",retryAfter:!1,verifiedAt:["engine/enforcement/runtime.ts:154"]},enforcement_error:{statuses:[500],source:"runtime-inline",retryAfter:!1,verifiedAt:["engine/enforcement/runtime.ts:342"]},enforcement_dependency_unavailable:{statuses:[503],source:"runtime-inline",retryAfter:!1,verifiedAt:["engine/enforcement/runtime.ts:427"]},concurrency_limit_exceeded:{statuses:[429],source:"constraint",retryAfter:!0,verifiedAt:["engine/enforcement/constraints/concurrency.ts"]},concurrency_context_unavailable:{statuses:[503],source:"constraint",retryAfter:!0,verifiedAt:["engine/enforcement/constraints/concurrency.ts:291"]},concurrency_coordinator_unavailable:{statuses:[503],source:"constraint",retryAfter:!0,verifiedAt:["engine/enforcement/constraints/concurrency.ts:305"]},key_expired:{statuses:[401],source:"constraint",retryAfter:!1,verifiedAt:["engine/enforcement/constraints/credential-validity.ts:33"]},geo_context_unavailable:{statuses:[503],source:"constraint",retryAfter:!0,verifiedAt:["engine/enforcement/constraints/geo-restriction.ts:44"]},geo_blocked:{statuses:[403],source:"constraint",retryAfter:!1,verifiedAt:["engine/enforcement/constraints/geo-restriction.ts:51"]},geo_not_allowed:{statuses:[403],source:"constraint",retryAfter:!1,verifiedAt:["engine/enforcement/constraints/geo-restriction.ts:58"]},resource_count_limit_exceeded:{statuses:[403,402],source:"constraint",retryAfter:!1,verifiedAt:["engine/enforcement/constraints/resource-count.ts:95","apps/core:routes/internal/gateway-resources.ts:144"]},request_too_large:{statuses:[413],source:"constraint",retryAfter:!1,verifiedAt:["engine/enforcement/constraints/capacity.ts"]},resolver_rate_limited:{statuses:[503],source:"gateway-error",retryAfter:!0,verifiedAt:["engine/errors.ts:55"]},resolver_unavailable:{statuses:[503],source:"gateway-error",retryAfter:!0,verifiedAt:["engine/errors.ts:73"]},credential_resolver_miss_rate_limited:{statuses:[429],source:"gateway-error",retryAfter:!0,verifiedAt:["engine/errors.ts:89"]},provider_throttled:{statuses:[503],source:"gateway-error",retryAfter:!0,verifiedAt:["engine/pipeline/provider-adapter.ts"]}},_S=Object.keys(Mh);var vS=new Set([429,503]),kR=new Set(_S.filter(t=>Mh[t].statuses.every(e=>vS.has(e))));var bS=["quota","rate","concurrency","capacity","spend","adaptive"],SR=new Set(bS);var yS=[402,403,413,429],IR=new Set(yS);var kS={MANAGED_BY_CODE:"This business's contract is managed as code. Edit the Business SDK program in its GitHub repo (business/) and push \u2014 do NOT retry the API. (Branding stays editable via `farthershore business 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 business publish`.",STRIPE_NOT_VERIFIED:"Your Stripe account isn't fully verified yet. Finish Stripe onboarding, then re-run `farthershore business publish`.",BILLING_TAX_NOT_ENROLLED:"Stripe Tax isn't enrolled for this account. Enable it from the dashboard Connections page, then re-run `farthershore business 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 business slug. Run `farthershore` (no args) for a list of businesses you can see.",PRODUCT_REPO_NOT_LINKED:"Link a GitHub repo to this business before publishing or validating business manifests.",YAML_PARSE_ERROR:"Business manifest is not valid. Run `farthershore build` locally, fix business/ 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 business settings or pass --branch explicitly.",PLAN_NOT_FOUND:"Plan key doesn't exist on this business. Check the `plans` block in your local business 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 business 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 nd(t){if(t)return kS[t]}function Vh(t){process.stdout.write(`${JSON.stringify(t,null,2)}
98
+ `)}function xS(t,e){return{schema_version:1,ok:!0,op:t,data:e}}function SS(t,e){let r=e.status??0;return{schema_version:1,ok:!1,op:t,error:{code:e.code??"INTERNAL_ERROR",message:e.message,status:r,param:e.param,retryable:ES(r,e.code),details:e.details,hint:nd(e.code)}}}function Z(t,e,r=Kh()){if(de()==="json"){Vh(xS(r,t));return}e&&tm(e)}function $S(t){return t===0?1:t===400||t===422?2:t===401||t===403?3:t===409?4:t>=500?5:1}var IS=new Set(["RATE_LIMIT_EXCEEDED","SERVICE_UNAVAILABLE"]);function ES(t,e){return t>=500||t===429||t===503?!0:e?IS.has(e):!1}function rd(t,e=Kh()){let r=t.status??0;if(de()==="json")Vh(SS(e,t));else{let o=nd(t.code),n=t.code?` [${t.code}]`:"";process.stderr.write(`Error${n}: ${t.message}
99
99
  `),o&&process.stderr.write(`Hint: ${o}
100
- `)}return Jk(r)}var Oh="unknown";function Th(e){Oh=e}function Ah(){return Oh}async function eS(e){if(!Xt())throw new k("No token provided. Pass --token, set FARTHERSHORE_TOKEN, or run interactively.",void 0,{code:"AUTH_NO_TOKEN"});let t=Qk({input:process.stdin,output:process.stdout,terminal:!0});return new Promise(r=>{t.question(e,o=>{t.close(),r(o.trim())})})}function Ph(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 eS("Maker token: ");if(!n||n.length<10)throw new k("Token looks malformed.",void 0,{code:"AUTH_INVALID_TOKEN"});let i=Hn();Id({...i??{},token:n}),V({},"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);V({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(()=>{Ed(),V({},"Logged out.")})}import{createInterface as uS}from"node:readline";var ie={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 tS}from"node:crypto";async function ji(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 Li(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 nS="Reuse the same key on retry so it replays instead of double-creating (auto-generated if omitted).",rS="Preview the change without applying it.",iS="Skip confirmation; required for this destructive action";function oS(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 Nh(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)oS(s,c);r.cli.destructive&&s.option("--yes",iS),r.cli.idempotent&&(s.option("--idempotency-key <key>",nS),s.option("--dry-run",rS)),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 P=o[C],nt=l[C];m[P.field]=P.resolveProduct?await ji(d,nt):nt}let g=r.cli.idempotent?{idempotencyKey:u.idempotencyKey??tS(),dryRun:u.dryRun}:{},S={client:d,args:m,opts:u,reqOpts:g,emit:V,emitDryRunPreview:C=>C?.dryRun===!0?(V({preview:C.wouldHave,dryRun:!0},"Dry run \u2014 no changes applied."),!0):!1};await r.cli.handler(S)})}var aS={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",frontend:"Managed Frontend Hosting: deploy/status/rollback (+ local preview)",persona:"Mint and manage test-env personas (test API keys)",usage:"Usage observability for a product",token:"Maker-token management (list, create, revoke)"};function sS(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=aS[n],u=o.command(i);c&&u.description(c),o=u}return o}function K(e,t,r){for(let o of r){let n=sS(e,o.cli.group);Nh(n,t,o)}}var Zt=["frontend","api","docs","widget","dashboard","webhook","worker","agent"],cS=["frontend","api"];function Ch(e){let t=e.trim().toLowerCase();if(!Zt.includes(t))throw new k(`Unknown product surface "${e}". Available: ${Zt.join(", ")}.`,void 0,{code:"UNKNOWN_PRODUCT_SURFACE"});return t}function Un(e){let t=(e.surface??[]).map(Ch);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 Bl(e){return e&&e.length>0?e:[...cS]}function Rh(e){let t={};return typeof e.bump=="string"&&(t.bump=e.bump),typeof e.version=="string"&&(t.version=e.version),e.acceptBreaking===!0&&(t.acceptBreaking=!0),t}async function lS(e){let t=uS({input:process.stdin,output:process.stderr,terminal:!0});return new Promise(r=>{t.question(`Cut release ${e}? [y/N] `,o=>{t.close(),r(/^y(es)?$/i.test(o.trim()))})})}function dS(e){return e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function mS(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()||dS(t),unit:o?.trim()||void 0}}function pS(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(mS);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=Kf(e.meters);if(!r)throw new k(`Unknown meter template "${e.meters}". Available: ${Wf().join(", ")}.`,void 0,{code:"UNKNOWN_METER_TEMPLATE"});return r.meters.map(o=>({...o}))}}function fS(e){return{...e,product:e.product}}var gS=[{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.status",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"product",command:"status",summary:"Show a product's lifecycle/release/live state (status, latest release version, latest deployment, and a derived `live` boolean) \u2014 verify a product is serving after publish.",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=await e.getDeployments(o),i=n.data[0]??null,s={id:n.product.id,status:n.product.status,latestReleaseVersion:n.product.latestReleaseVersion,live:n.live,latestDeployment:i?{id:i.id,status:i.status,edgePublishStatus:i.edgePublishStatus,createdAt:i.createdAt}:null};r(s,`Product ${o}: ${n.product.status}${n.product.latestReleaseVersion?` @ ${n.product.latestReleaseVersion}`:""} (${n.live?"live":"not live"})`)}},mcp:{tool:"fs_product_status",title:"Product status",description:"Verify a product's lifecycle/release state: its status (DRAFT|ACTIVE), latest release version, latest deployment run, and a derived `live` boolean (ACTIVE + a real non-bootstrap release applied + the edge serving the snapshot). Read-only; use this to confirm a product is live after publishing.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id to check.")},handler:async(e,t)=>{let r=await e.getDeployments(t.productId),o=r.data[0]??null;return{id:r.product.id,status:r.product.status,latestReleaseVersion:r.product.latestReleaseVersion,live:r.live,latestDeployment:o?{id:o.id,status:o.status,edgePublishStatus:o.edgePublishStatus,createdAt:o.createdAt}: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: ${Ci.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: ${Zt.join(", ")}.`,parser:(e,t)=>[...t,e],defaultValue:[]}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=pS({meters:t.meters,meter:t.meter}),s=Un({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:fS(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) and cut a versioned release with an auto-computed semver. Requires at least one plan, an origin, and a verified Stripe connection.",idempotent:!0,args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"bump",kind:"flag",token:"--bump <bump>",describe:"Force the semver bump (major|minor|patch). Omit to auto-derive from the change."},{field:"version",kind:"flag",token:"--version <version>",describe:"Pin the exact next release tag (vX.Y.Z), skipping derivation."},{field:"acceptBreaking",kind:"flag",token:"--accept-breaking",describe:"Consent to publish a breaking (blocking-risk) change as a major release."}],helpTextAfter:`
100
+ `)}return $S(r)}var Bh="unknown";function Hh(t){Bh=t}function Kh(){return Bh}async function OS(t){if(!an())throw new S("No token provided. Pass --token, set FARTHERSHORE_TOKEN, or run interactively.",void 0,{code:"AUTH_NO_TOKEN"});let e=wS({input:process.stdin,output:process.stdout,terminal:!0});return new Promise(r=>{e.question(t,o=>{e.close(),r(o.trim())})})}function Gh(t,e){let r=t.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 OS("Maker token: ");if(!n||n.length<10)throw new S("Token looks malformed.",void 0,{code:"AUTH_INVALID_TOKEN"});let i=nr();Ld({...i??{},token:n}),Z({},"Token stored.")}),r.command("whoami").description("Show current auth identity (org, role, scopes)").action(async()=>{let n=await e().bootstrap(),i=n.memberships.find(s=>s.organization.id===n.activeOrganization.id);Z({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(()=>{Fd(),Z({},"Logged out.")})}import{createInterface as zS}from"node:readline";import{readFile as jS}from"node:fs/promises";import{extname as LS}from"node:path";var Q={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 TS}from"node:crypto";function Wh(t){let e=t?.trim().toLowerCase();return e?e.split(".")[0]??null:null}async function Pe(t,e){if(e){if(e.length===36)return e;let r=e.trim().toLowerCase(),n=(await t.listProducts()).find(i=>i.id===e||i.name.toLowerCase()===r||i.runtimeHostname?.toLowerCase()===r||i.portalHostname?.toLowerCase()===r||Wh(i.runtimeHostname)===r||Wh(i.portalHostname)===r);if(n)return n.id}throw new Error("No business selected. Pass a business id or slug, or run `farthershore business create` first.")}async function Yi(t,e,r){let n=await t.listEnvironments(e),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 ${e}.`);return s.id}var AS="Reuse the same key on retry so it replays instead of double-creating (auto-generated if omitted).",CS="Preview the change without applying it.",PS="Skip confirmation; required for this destructive action";function NS(t,e){let r=typeof e.parser=="function",o=e.defaultValue!==void 0,n=[e.token];(e.describe!==void 0||r||o)&&n.push(e.describe??""),r&&n.push(e.parser),o&&n.push(e.defaultValue),e.required?t.requiredOption(...n):t.option(...n)}function qh(t,e,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=t.command(i).description(r.cli.summary);for(let c of n)NS(s,c);r.cli.destructive&&s.option("--yes",PS),r.cli.idempotent&&(s.option("--idempotency-key <key>",AS),s.option("--dry-run",CS)),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 S(r.cli.yesMessage??"Pass --yes to confirm this destructive action.",void 0,{code:"DESTRUCTIVE_OP_REQUIRES_YES"});let d=e(),m={...u};for(let A=0;A<o.length;A++){let C=o[A],ee=l[A];m[C.field]=C.resolveProduct?await Pe(d,ee):ee}let g=r.cli.idempotent?{idempotencyKey:u.idempotencyKey??TS(),dryRun:u.dryRun}:{},x={client:d,args:m,opts:u,reqOpts:g,emit:Z,emitDryRunPreview:A=>A?.dryRun===!0?(Z({preview:A.wouldHave,dryRun:!0},"Dry run \u2014 no changes applied."),!0):!1};await r.cli.handler(x)})}var RS={business:"Business bootstrap, status, release, and presentation metadata","change-set":"Inspect repo-backed product changes: PRs, previews, checks, releases",plan:"Plan operations: list code-managed plans and migrate subscribers",env:"Manage business environments (preview branches, prod)",backend:"Manage BYO backends and their runtime tokens","backend tokens":"Manage runtime tokens (fsrt_) for BYO backends",frontend:"Managed Frontend Hosting: deploy/status/rollback (+ local preview)","frontend env":"Manage public frontend build/runtime variables",persona:"Mint and manage test-env personas (test API keys)",usage:"Usage observability for a business",token:"Maker-token management (list, create, revoke)"};function DS(t,e){let r=e.split(" "),o=t,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=RS[n],u=o.command(i);c&&u.description(c),o=u}return o}function B(t,e,r){for(let o of r){let n=DS(t,o.cli.group);qh(n,e,o)}}var Ht=["frontend","api","docs","widget","dashboard","webhook","worker","agent"],US=["frontend","api"];function Jh(t){let e=t.trim().toLowerCase();if(!Ht.includes(e))throw new S(`Unknown business surface "${t}". Available: ${Ht.join(", ")}.`,void 0,{code:"UNKNOWN_BUSINESS_SURFACE"});return e}function Kn(t){let e=(t.surface??[]).map(Jh);if(e.length===0)return;if(new Set(e).size!==e.length)throw new S("Duplicate business surfaces in --surface flags.",void 0,{code:"INVALID_BUSINESS_SURFACES"});return e}function id(t){return t&&t.length>0?t:[...US]}function Yh(t){let e={};return typeof t.bump=="string"&&(e.bump=t.bump),typeof t.version=="string"&&(e.version=t.version),t.acceptBreaking===!0&&(e.acceptBreaking=!0),e}async function FS(t){let e=zS({input:process.stdin,output:process.stderr,terminal:!0});return new Promise(r=>{e.question(`Cut release ${t}? [y/N] `,o=>{e.close(),r(/^y(es)?$/i.test(o.trim()))})})}function MS(t){return t.split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function ZS(t){let[e="",r,o]=t.split(":");if(!/^[a-z0-9_]+$/.test(e))throw new S(`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:e,display:r?.trim()||MS(e),unit:o?.trim()||void 0}}function VS(t){let e=t.meter??[];if(e.length>0&&t.meters)throw new S("Pass either --meters <template> or repeated --meter entries, not both.",void 0,{code:"CONFLICTING_METER_FLAGS"});if(e.length>0){let r=e.map(ZS);if(new Set(r.map(n=>n.key)).size!==r.length)throw new S("Duplicate meter keys in --meter flags.",void 0,{code:"INVALID_METER_SPEC"});return r}if(t.meters){let r=ug(t.meters);if(!r)throw new S(`Unknown meter template "${t.meters}". Available: ${lg().join(", ")}.`,void 0,{code:"UNKNOWN_METER_TEMPLATE"});return r.meters.map(o=>({...o}))}}var Gn="<businessIdOrName>",BS={".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".webp":"image/webp"};function HS(t){let{product:e,...r}=t;return{...r,business:e}}function KS(t){let e=BS[LS(t).toLowerCase()];if(!e)throw new S(`Cannot infer image Content-Type for "${t}". Use a .png, .jpg, .jpeg, or .webp file.`,void 0,{code:"UNSUPPORTED_BRAND_ASSET_TYPE"});return e}function GS(t){return t.filter(e=>e!==void 0&&e!==!1).length}function Xh(t,e){let r=e==="icon"?"icon":"logo",o=e==="icon"?"icon":"logo",n=e==="icon"?"clearIcon":"clearLogo";if(GS([t[`${o}Url`],t[`${o}File`],t[n]])>1)throw new S(`Choose only one ${r} operation: --${o}-url, --${o}-file, or --clear-${o}.`,void 0,{code:"CONFLICTING_BRAND_ASSET_FLAGS"})}async function Qh(t,e,r,o){let n=await jS(o);return t.uploadBrandAsset(e,r,n,KS(o))}var WS=[{opKey:"business.list",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"business",command:"list",summary:"List businesses in the current org",args:[],handler:async({client:t,emit:e})=>{let r=await t.listProducts();e({count:r.length,businesses:r.map(o=>({...o,displayName:o.displayName??null,status:o.status??null}))},`${r.length} business(es)`)}},mcp:{tool:"fs_business_list",title:"List businesses",description:"List every business in the authenticated FartherShore workspace (id, name, status). Read-only; use this to discover business ids for the other tools.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{},handler:async t=>{let e=await t.listProducts();return{count:e.length,businesses:e.map(r=>({id:r.id,name:r.name,status:r.status??null}))}}}},{opKey:"business.read",operationClass:"dual",scope:["products:read"],sideEffect:"read",cli:{group:"business",command:"show",summary:"Show a business",args:[{field:"productId",kind:"positional",token:Gn,resolveProduct:!0},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment scope (preview branch name)"}],handler:async({client:t,args:e,emit:r})=>{let o=e.productId,n=await t.getProduct(o,{env:e.env});r({business:n},`Business ${o}`)}},mcp:null},{opKey:"business.status",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"business",command:"status",summary:"Show a business's lifecycle/release/live state (status, latest release version, latest deployment, and a derived `live` boolean) \u2014 verify a business is serving after publish.",args:[{field:"productId",kind:"positional",token:Gn,resolveProduct:!0}],handler:async({client:t,args:e,emit:r})=>{let o=e.productId,n=await t.getDeployments(o),i=n.data[0]??null,s={id:n.product.id,status:n.product.status,latestReleaseVersion:n.product.latestReleaseVersion,live:n.live,latestDeployment:i?{id:i.id,status:i.status,edgePublishStatus:i.edgePublishStatus,createdAt:i.createdAt}:null};r(s,`Business ${o}: ${n.product.status}${n.product.latestReleaseVersion?` @ ${n.product.latestReleaseVersion}`:""} (${n.live?"live":"not live"})`)}},mcp:{tool:"fs_business_status",title:"Business status",description:"Verify a business's lifecycle/release state by id or slug: its status (DRAFT|ACTIVE), latest release version, latest deployment run, and a derived `live` boolean (ACTIVE + a real non-bootstrap release applied + the edge serving the snapshot). Read-only; use this to confirm a business is live after publishing.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The business id or slug to check.")},handler:async(t,e)=>{let r=await Pe(t,e.productId),o=await t.getDeployments(r),n=o.data[0]??null;return{id:o.product.id,status:o.product.status,latestReleaseVersion:o.product.latestReleaseVersion,live:o.live,latestDeployment:n?{id:n.id,status:n.status,edgePublishStatus:n.edgePublishStatus,createdAt:n.createdAt}:null}}}},{opKey:"business.create",operationClass:"dual",scope:["products:create"],sideEffect:"write",cli:{group:"business",command:"create",summary:"Create a new business and provision the frontend starter repo",idempotent:!0,args:[{field:"name",kind:"flag",token:"--name <name>",describe:"Business slug (becomes the subdomain)",required:!0},{field:"displayName",kind:"flag",token:"--display-name <displayName>",describe:"Human-friendly business name"},{field:"description",kind:"flag",token:"--description <description>"},{field:"origin",kind:"flag",token:"--origin <url>",describe:"Optional business origin Farther Shore calls for customer-facing actions"},{field:"meters",kind:"flag",token:"--meters <template>",describe:`Meter template: ${Ki.map(t=>`${t.id} (${t.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:(t,e)=>[...e,t],defaultValue:[]},{field:"surface",kind:"flag",token:"--surface <surface>",describe:`Initial Business SDK surface, repeatable. Available: ${Ht.join(", ")}.`,parser:(t,e)=>[...e,t],defaultValue:[]}],handler:async({client:t,args:e,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=VS({meters:e.meters,meter:e.meter}),s=Kn({surface:e.surface}),c=await t.initProduct({name:e.name,...typeof e.origin=="string"?{origin:e.origin}:{},description:e.description,displayName:e.displayName,meters:i,surfaces:s},r);n(c)||o({result:HS(c)},`Business created: ${e.name}`)}},mcp:null},{opKey:"brand.update",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"business",command:"update",summary:"Update business presentation metadata",args:[{field:"productId",kind:"positional",token:Gn,resolveProduct:!0},{field:"displayName",kind:"flag",token:"--display-name <displayName>"},{field:"description",kind:"flag",token:"--description <description>"},{field:"primaryColor",kind:"flag",token:"--primary-color <hex>",describe:"Primary brand color, e.g. #22c55e"},{field:"clearPrimaryColor",kind:"flag",token:"--clear-primary-color",describe:"Clear the primary brand color"},{field:"iconUrl",kind:"flag",token:"--icon-url <url>",describe:"Set the square icon/favicon URL"},{field:"iconFile",kind:"flag",token:"--icon-file <path>",describe:"Upload a local PNG, JPEG, or WEBP square icon"},{field:"clearIcon",kind:"flag",token:"--clear-icon",describe:"Remove the current icon asset"},{field:"logoUrl",kind:"flag",token:"--logo-url <url>",describe:"Set the wordmark/logo URL"},{field:"logoFile",kind:"flag",token:"--logo-file <path>",describe:"Upload a local PNG, JPEG, or WEBP wordmark/logo"},{field:"clearLogo",kind:"flag",token:"--clear-logo",describe:"Remove the current logo asset"},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment scope"}],handler:async({client:t,args:e,emit:r})=>{let o=e.productId;if(Xh(e,"icon"),Xh(e,"logo"),e.primaryColor!==void 0&&e.clearPrimaryColor===!0)throw new S("Choose only one color operation: --primary-color or --clear-primary-color.",void 0,{code:"CONFLICTING_BRAND_COLOR_FLAGS"});let n={};e.displayName!==void 0&&(n.displayName=e.displayName),e.description!==void 0&&(n.description=e.description),e.primaryColor!==void 0&&(n.primaryColor=e.primaryColor),e.clearPrimaryColor===!0&&(n.primaryColor=null),e.iconUrl!==void 0&&(n.iconUrl=e.iconUrl),e.logoUrl!==void 0&&(n.logoUrl=e.logoUrl);let i=[];if(typeof e.iconFile=="string"&&i.push(()=>Qh(t,o,"icon",e.iconFile)),typeof e.logoFile=="string"&&i.push(()=>Qh(t,o,"logo",e.logoFile)),e.clearIcon===!0&&i.push(()=>t.deleteBrandAsset(o,"icon")),e.clearLogo===!0&&i.push(()=>t.deleteBrandAsset(o,"logo")),Object.keys(n).length===0&&i.length===0)throw new S("No fields to update. Pass presentation metadata flags such as --display-name, --description, --primary-color, --icon-file, --logo-file, or a clear flag.",void 0,{code:"BUSINESS_UPDATE_NO_FIELDS"});let s=Object.keys(n).length>0?await t.updateProduct(o,n,{env:e.env}):await t.getProduct(o,{env:e.env}),c=await Promise.all(i.map(u=>u()));r({business:s,assets:c},`Business ${o} updated`)}},mcp:{tool:"fs_brand_update",title:"Update business brand",description:"Update a business's brand/presentation only \u2014 display name, description, icon, logo (wordmark), primary color. Plans, pricing, and routes are managed as code in the business 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 business id or slug to update."),displayName:a.string().optional().describe("Display name."),description:a.string().optional().describe("Short business description."),iconUrl:a.string().nullable().optional().describe("Square icon/favicon URL, or null to clear it."),logoUrl:a.string().nullable().optional().describe("Wordmark/logo URL, or null to clear it."),primaryColor:a.string().nullable().optional().describe("Primary brand color (hex).")},handler:async(t,e)=>{let r=await Pe(t,e.productId),o={};return e.displayName!==void 0&&(o.displayName=e.displayName),e.description!==void 0&&(o.description=e.description),e.iconUrl!==void 0&&(o.iconUrl=e.iconUrl),e.logoUrl!==void 0&&(o.logoUrl=e.logoUrl),e.primaryColor!==void 0&&(o.primaryColor=e.primaryColor),t.updateProduct(r,o)}}},{opKey:"business.publish",operationClass:"dual",scope:["products:publish"],sideEffect:"write",cli:{group:"business",command:"publish",summary:"Publish a draft business (make it live) and cut a versioned release with an auto-computed semver. Requires at least one plan, an origin, and a verified Stripe connection.",idempotent:!0,args:[{field:"productId",kind:"positional",token:Gn,resolveProduct:!0},{field:"bump",kind:"flag",token:"--bump <bump>",describe:"Force the semver bump (major|minor|patch). Omit to auto-derive from the change."},{field:"version",kind:"flag",token:"--version <version>",describe:"Pin the exact next release tag (vX.Y.Z), skipping derivation."},{field:"acceptBreaking",kind:"flag",token:"--accept-breaking",describe:"Consent to publish a breaking (blocking-risk) change as a major release."}],helpTextAfter:`
101
101
  Publish auto-derives the semver bump from the change and cuts a vX.Y.Z release.
102
102
  Use --dry-run to preview the computed bump + reasons without cutting a tag.
103
- A blocking-risk (breaking) change is refused unless --accept-breaking is passed.`,handler:async({client:e,args:t,opts:r,reqOpts:o,emit:n,emitDryRunPreview:i})=>{let s=t.productId,c=Rh(r);if(o.dryRun){let l=await e.publishProduct(s,c,o);if(i(l))return}if(Xt()&&r.input!==!1){let d=(await e.publishProduct(s,c,{...o,dryRun:!0,idempotencyKey:void 0})).wouldHave?._release;if(d){Vd(`Publishing ${s}: ${d.computedBump} \u2192 ${d.version}`+(d.previousVersion?` (from ${d.previousVersion})`:" (first release)"));for(let g of d.reasons)Ie(` \u2022 ${g}`);if(!await lS(d.version)){n({cancelled:!0},"Publish cancelled.");return}}}let u=await e.publishProduct(s,c,o);n({product:u,_release:u._release??null},`Product ${s} published`)}},mcp:{tool:"fs_product_publish",title:"Publish a product",description:"Publish a product \u2014 deploy its current spec live and cut a versioned release with an auto-computed semver. Equivalent to a repo-driven deploy (operationClass=dual); both reconcile to the same published state.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id to publish."),bump:a.enum(["major","minor","patch"]).optional().describe("Force the semver bump. Omit to auto-derive from the change."),version:a.string().optional().describe("Pin the exact next release tag (vX.Y.Z)."),acceptBreaking:a.boolean().optional().describe("Consent to publish a breaking (blocking-risk) change as major."),dryRun:a.boolean().optional().describe("Preview the change (computed semver + reasons) without cutting a release."),...ie},handler:async(e,t)=>{let r=Rh({bump:t.bump,version:t.version,acceptBreaking:t.acceptBreaking});return e.publishProduct(t.productId,r,{idempotencyKey:t.idempotencyKey,dryRun:t.dryRun})}}},{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 Dh(e,t){K(e,t,gS)}function hS(e){if(!e||typeof e!="object")return[];let t=e;return Array.isArray(t.data)?t.data:Array.isArray(t.environments)?t.environments:[]}var _S=[{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=hS(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."),...ie},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 zh(e,t){K(e,t,_S)}var ge=["free","starter","pro","prepaid","metered"],vS={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}},bS={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:"credit",amount_cents:2e3,recurs:!0}],trial_days:0}},yS={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:"credit",amount_cents:2e4,recurs:!0}],trial_days:14}},xS={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:"credit",amount_cents:5e3,recurs:!1}],trial_days:0}},kS={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}},Uh=Object.freeze({free:vS,starter:bS,pro:yS,prepaid:xS,metered:kS});function Fi(e){return Uh[e]}function Hl(){return ge.map(e=>Uh[e])}var mD=a.object({recurring_fee_cents:a.number().int().nonnegative().optional(),grants:a.array(pe).max(40).optional(),creditPolicy:Te.optional(),min_monthly_spend_cents:a.number().int().nonnegative().optional(),max_monthly_spend_cents:a.number().int().nonnegative().optional(),meters:a.array(fe).optional(),notes:a.string().max(2e3).optional()});function SS(e){return(e??[]).some(t=>t.kind==="credit"?t.amount_cents>0:t.kind==="top_up"?t.price_cents>0:!1)}function jh(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=SS(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}var Mi=["grandfather","next_renewal","immediate","by_date","opt_in"];function $S(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 Lh(e){let t=e??[];if(t.length===0)return;let r=t.map($S);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 IS(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"});let n=Number.parseInt(o.trim(),10);return{grant:r==="recurring"?{kind:"credit",amount_cents:n,recurs:!0}:{kind:"credit",amount_cents:n},flavour:r}}function Fh(e){let t=e??[];if(t.length===0)return;let r=t.map(IS),o=r.map(n=>n.flavour);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.map(n=>n.grant)}function ES(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 wS(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(`
104
- `)}var OS=[{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:`
103
+ A blocking-risk (breaking) change is refused unless --accept-breaking is passed.`,handler:async({client:t,args:e,opts:r,reqOpts:o,emit:n,emitDryRunPreview:i})=>{let s=e.productId,c=Yh(r);if(o.dryRun){let l=await t.publishProduct(s,c,o);if(i(l))return}if(an()&&r.input!==!1){let d=(await t.publishProduct(s,c,{...o,dryRun:!0,idempotencyKey:void 0})).wouldHave?._release;if(d){rm(`Publishing ${s}: ${d.computedBump} \u2192 ${d.version}`+(d.previousVersion?` (from ${d.previousVersion})`:" (first release)"));for(let g of d.reasons)G(` \u2022 ${g}`);if(!await FS(d.version)){n({cancelled:!0},"Publish cancelled.");return}}}let u=await t.publishProduct(s,c,o);n({business:u,_release:u._release??null},`Business ${s} published`)}},mcp:{tool:"fs_business_publish",title:"Publish a business",description:"Publish a business \u2014 deploy its current spec live and cut a versioned release with an auto-computed semver. Equivalent to a repo-driven deploy (operationClass=dual); both reconcile to the same published state.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The business id to publish."),bump:a.enum(["major","minor","patch"]).optional().describe("Force the semver bump. Omit to auto-derive from the change."),version:a.string().optional().describe("Pin the exact next release tag (vX.Y.Z)."),acceptBreaking:a.boolean().optional().describe("Consent to publish a breaking (blocking-risk) change as major."),dryRun:a.boolean().optional().describe("Preview the change (computed semver + reasons) without cutting a release."),...Q},handler:async(t,e)=>{let r=Yh({bump:e.bump,version:e.version,acceptBreaking:e.acceptBreaking});return t.publishProduct(e.productId,r,{idempotencyKey:e.idempotencyKey,dryRun:e.dryRun})}}},{opKey:"business.delete",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"business",command:"delete",summary:"Permanently delete a business. Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm business deletion.",args:[{field:"productId",kind:"positional",token:Gn,resolveProduct:!0}],handler:async({client:t,args:e,emit:r})=>{let o=e.productId;try{await t.deleteProduct(o)}catch(n){throw n instanceof S&&(n.status===403||n.code==="FORBIDDEN")?new S("Deleting a whole business requires a builder/browser session \u2014 open the business 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},`Business ${o} deleted`)}},mcp:null}];function e_(t,e){B(t,e,WS)}function qS(t){if(!t||typeof t!="object")return[];let e=t;return Array.isArray(e.data)?e.data:Array.isArray(e.environments)?e.environments:[]}var JS=[{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:t,args:e,emit:r})=>{let o=e.productId,n=qS(await t.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(t,{productId:e})=>t.listEnvironments(e)}},{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:t,args:e,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=e.productId,s=await t.createEnvironment(i,{name:e.name,branch:e.branch},r);n(s)||o({productId:i,environment:s},`Environment ${e.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."),...Q},handler:async(t,e)=>{let r=await t.createEnvironment(e.productId,{name:e.name,branch:e.branch},{idempotencyKey:e.idempotencyKey});return{ok:!0,productId:e.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:t,args:e,emit:r})=>{let o=e.productId,n=e.envName;await t.deleteEnvironment(o,n),r({productId:o,deleted:n},`Environment ${n} deleted`)}},mcp:null}];function t_(t,e){B(t,e,JS)}var _e=["free","starter","pro","prepaid","metered"],YS={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}},XS={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:"credit",amount_cents:2e3,recurs:!0}],trial_days:0}},QS={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:"credit",amount_cents:2e4,recurs:!0}],trial_days:14}},e$={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:"credit",amount_cents:5e3,recurs:!1}],trial_days:0}},t$={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}},n_=Object.freeze({free:YS,starter:XS,pro:QS,prepaid:e$,metered:t$});function Xi(t){return n_[t]}function od(){return _e.map(t=>n_[t])}var k0=a.object({recurring_fee_cents:a.number().int().nonnegative().optional(),grants:a.array(ge).max(40).optional(),creditPolicy:Ae.optional(),min_monthly_spend_cents:a.number().int().nonnegative().optional(),max_monthly_spend_cents:a.number().int().nonnegative().optional(),meters:a.array(he).optional(),notes:a.string().max(2e3).optional()});var Qi=["grandfather","next_renewal","immediate","by_date","opt_in"];function n$(t){if(!t||typeof t!="object")return[];let e=t;return Array.isArray(e.data)?e.data:Array.isArray(e.plans)?e.plans:Array.isArray(t)?t:[]}function r$(t){if(t.length===0)return"(no plans)";let e=["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=t.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=e.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(e),s,...o.map(i)].join(`
104
+ `)}var i$=[{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:`
105
105
  Output:
106
106
  --format json \u2014 stable agent-friendly JSON envelope (default for non-TTY)
107
107
  --format table \u2014 human-readable summary table (default for TTY)
108
- `,handler:async({client:e,args:t,emit:r})=>{let o=t.productId,i=ES(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:Rn({grants:s.grants}),one_time_grant_cents:jt({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}`),ue()!=="json"&&console.log(wS(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=Lh(t.meter),c=Fh(t.grant),u=jh({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=Fh(t.grant);s&&(i.grants=s);let c=Lh(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},{opKey:"plan.migration_batch.create",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"plan",command:"migrate",summary:"Migrate subscribers between plan versions under a policy (owner-only)",idempotent:!0,args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"planKey",kind:"positional",token:"<planKey>"},{field:"from",kind:"flag",token:"--from <version>",describe:"Source plan version to migrate FROM: an integer (e.g. 1) or head/latest.",required:!0},{field:"to",kind:"flag",token:"--to <version>",describe:"Target plan version to migrate TO: an integer (e.g. 2) or head/latest.",required:!0},{field:"policy",kind:"flag",token:"--policy <policy>",describe:`Migration policy: ${Mi.join(" | ")}.`,required:!0},{field:"proration",kind:"flag",token:"--proration <proration>",describe:"Optional proration: none | prorate | credit."},{field:"completeBy",kind:"flag",token:"--complete-by <iso8601>",describe:"Deadline (ISO 8601) \u2014 required by the by_date policy."}],helpTextAfter:`
108
+ `,handler:async({client:t,args:e,emit:r})=>{let o=e.productId,i=n$(await t.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:Vn({grants:s.grants}),one_time_grant_cents:Mt({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}`),de()!=="json"&&console.log(r$(i))}},mcp:{tool:"fs_plan_list",title:"List plans",description:"List a business's pricing plans (read-only). Plans are managed as code in the business's GitHub repo \u2014 to add/change/remove a plan, edit business/ and push; this tool only reads the current state. Pass the business id from fs_business_list.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The business id whose plans to list.")},handler:async(t,{productId:e})=>t.managementListPlans(e)}},{opKey:"plan.migration_batch.create",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"plan",command:"migrate",summary:"Migrate subscribers between plan versions under a policy (owner-only)",idempotent:!0,args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"planKey",kind:"positional",token:"<planKey>"},{field:"from",kind:"flag",token:"--from <version>",describe:"Source plan version to migrate FROM: an integer (e.g. 1) or head/latest.",required:!0},{field:"to",kind:"flag",token:"--to <version>",describe:"Target plan version to migrate TO: an integer (e.g. 2) or head/latest.",required:!0},{field:"policy",kind:"flag",token:"--policy <policy>",describe:`Migration policy: ${Qi.join(" | ")}.`,required:!0},{field:"proration",kind:"flag",token:"--proration <proration>",describe:"Optional proration: none | prorate | credit."},{field:"completeBy",kind:"flag",token:"--complete-by <iso8601>",describe:"Deadline (ISO 8601) \u2014 required by the by_date policy."}],helpTextAfter:`
109
109
  Examples:
110
110
  farthershore plan migrate my-product pro --from 1 --to head --policy next_renewal
111
111
  farthershore plan migrate my-product pro --from 1 --to 2 --policy immediate --proration prorate
112
- `,handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=t.productId,s=t.planKey,c=t.policy;if(!Mi.includes(c))throw new k(`Invalid --policy "${c}". Supported: ${Mi.join(", ")}.`,void 0,{code:"INVALID_MIGRATION_POLICY"});let u=await e.migratePlan(i,s,{fromVersion:t.from,toVersion:t.to,policy:c,proration:t.proration,completeBy:t.completeBy},r);n(u)||o({productId:i,planKey:s,migration:u},`Migration scheduled for plan ${s}`)}},mcp:{tool:"fs_plan_migrate",title:"Migrate subscribers between plan versions",description:"Schedule a subscriber migration for a plan: move subscribers from one plan version to another under a policy. Pass the plan KEY plus fromVersion/toVersion (each an integer or 'head'/'latest') \u2014 the server resolves them to the right plan versions. Policies: grandfather (keep existing subs as-is), next_renewal (migrate at each sub's renewal), immediate (migrate now), by_date (migrate everyone by a deadline), opt_in (subs choose). This is an OPERATE action (it changes live subscriber state, not the product's code-managed definition).",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id whose subscribers to migrate."),planKey:a.string().describe("The stable plan key (e.g. 'pro') to migrate within."),fromVersion:a.union([a.string(),a.number().int().positive()]).describe("Source plan version: an integer or 'head'/'latest'."),toVersion:a.union([a.string(),a.number().int().positive()]).describe("Target plan version: an integer or 'head'/'latest'."),policy:a.enum(Mi).describe("Migration policy: grandfather | next_renewal | immediate | by_date | opt_in."),proration:a.enum(["none","prorate","credit"]).optional().describe("Optional proration behaviour."),completeBy:a.string().optional().describe("ISO 8601 deadline \u2014 required by the by_date policy."),...ie},handler:async(e,t)=>e.migratePlan(t.productId,t.planKey,{fromVersion:t.fromVersion,toVersion:t.toVersion,policy:t.policy,proration:t.proration,completeBy:t.completeBy},{idempotencyKey:t.idempotencyKey})}}];function Mh(e,t){K(e,t,OS)}var TS=[{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 Gl(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 Gl(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 Gl(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 Zh(e,t){K(e,t,TS)}async function Gl(e,t,r){try{return await Li(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 AS=[{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 Vh(e,t){K(e,t,AS)}function Bh(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();V({status:n},"GitHub status")}),r.command("stripe <productIdOrName>").description("Print Stripe Connect status for a product").action(async o=>{let n=t(),i=await ji(n,o),s=await n.productStripeStatus(i);V({productId:i,status:s},"Stripe status")})}function PS(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 NS=[{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=PS(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 Hh(e,t){K(e,t,NS)}var Kl=["gateway_verification","metering","health","tunnel"],CS="<productId>",jn="products:update",Ln="The product id.",tt={field:"productId",kind:"positional",token:CS};function Gh(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:[]}function RS(e){let t=e.status;if(typeof t=="string"&&t.length>0)return t;let r=typeof e.readinessState=="string"?e.readinessState:null,o=typeof e.provisionStatus=="string"?e.provisionStatus:null;return r??o??"unknown"}function DS(e){return{id:e.id,name:e.name,slug:e.slug,transport:e.transportMode,default:e.isDefault??!1,status:RS(e),originUrl:e.originUrl??null,lastSeenAt:e.lastSeenAt??null}}async function Kh(e,t,r){if(!r)return null;try{return await Li(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 Wl=e=>typeof e=="string"&&e.length>0?e.split(",").map(t=>t.trim()).filter(t=>t.length>0):void 0,zS=[{opKey:"backend.read",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"backend",command:"list",summary:"List backends for a product (id, name, transport, status)",args:[tt],handler:async({client:e,args:t,emit:r})=>{let n=Gh(await e.builderListBackends(t.productId)).map(DS);r({count:n.length,backends:n},`${n.length} backend(s)`)}},mcp:{tool:"fs_backend_list",title:"List backends",description:"List a product's backends (origins) \u2014 id, name, slug, transport (direct|tunnel), default flag, and derived status. 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:[jn],sideEffect:"write",cli:{group:"backend",command:"create",summary:"Create a backend (default transport: direct)",idempotent:!0,args:[tt,{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: direct | tunnel",defaultValue:"direct"},{field:"runner",kind:"flag",token:"--runner <runner>",describe:"embedded | sidecar"},{field:"runtime",kind:"flag",token:"--runtime <runtime>",describe:"Container/runtime descriptor"},{field:"originUrl",kind:"flag",token:"--origin-url <url>",describe:"Builder origin URL (direct)"},{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 Kh(e,i,t.env),c=t.transport==="tunnel"?"tunnel":"direct",u=await e.builderCreateBackend(i,{name:t.name,slug:t.slug,environmentId:s,transportMode:c,runner:t.runner==="embedded"||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: direct (public HTTPS URL, secured by Ed25519 request signing) or tunnel (private outbound-only cloudflared, 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(["direct","tunnel"]).optional().describe("How the gateway reaches the origin; defaults to direct."),originUrl:a.string().optional().describe("The origin URL (for direct mode)."),isDefault:a.boolean().optional().describe("Route traffic to this backend by default."),...ie},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:[jn],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:[tt,{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(Ln),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:[tt],handler:async({client:e,args:t,emit:r})=>{let o=Gh(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(Ln)},handler:async(e,{productId:t})=>e.builderListRuntimeTokens(t)}},{opKey:"runtime_token.mint",operationClass:"operate",scope:[jn],sideEffect:"write",cli:{group:"backend tokens",command:"create",summary:"Create a runtime token (returns FS_RUNTIME_TOKEN once)",idempotent:!0,args:[tt,{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: ${Kl.join(" | ")}. Default: core's DEFAULT_CAPABILITIES. Use tunnel for 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 Kh(e,i,t.env),c=t.kind==="test"||t.kind==="live"?t.kind:void 0,u=Wl(t.capabilities);if(u){for(let d of u)if(!Kl.includes(d))throw new k(`Unknown capability "${d}". Available: ${Kl.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:Wl(t.meters),allowedRoutes:Wl(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(Ln),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)."),...ie},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:[jn],sideEffect:"write",cli:{group:"backend tokens",command:"rotate",summary:"Rotate a runtime token (returns a fresh FS_RUNTIME_TOKEN once)",args:[tt,{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(Ln),tokenId:a.string().describe("The runtime token id to rotate."),...ie},handler:async(e,t)=>e.builderRotateRuntimeToken(t.productId,t.tokenId,{idempotencyKey:t.idempotencyKey})}},{opKey:"runtime_token.revoke",operationClass:"operate",scope:[jn],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:[tt,{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(Ln),tokenId:a.string().describe("The runtime token id to revoke.")},handler:async(e,{productId:t,tokenId:r})=>e.builderRevokeRuntimeToken(t,r)}}];function Wh(e,t){K(e,t,zS)}var ql="The product id.",Jl={field:"productId",kind:"positional",token:"<productId>"},Yl={field:"env",kind:"flag",token:"--env <environmentId>",describe:"Scope to a preview environment id (omit for production)."},US=[{opKey:"frontend.deploy",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"frontend",command:"deploy",summary:"Trigger a frontend build (deploy) for a product's connected repo",idempotent:!0,args:[Jl,Yl,{field:"ref",kind:"flag",token:"--ref <ref>",describe:"Git ref to build (defaults to the env branch / repo default)."},{field:"buildCmd",kind:"flag",token:"--build-cmd <cmd>",describe:"Override the build command."}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=await e.builderFrontendDeploy(t.productId,{ref:t.ref,buildCmd:t.buildCmd,environmentId:t.env},r);n(i)||o({result:i},"Frontend build triggered")}},mcp:{tool:"fs_frontend_deploy",title:"Deploy a product frontend",description:"Trigger a Managed Frontend Hosting build for the product's connected repo (production by default; pass environmentId for a preview env). Returns the enqueued build.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(ql),ref:a.string().optional().describe("Git ref to build (defaults to the env branch / repo default)."),buildCmd:a.string().optional().describe("Override the build command."),environmentId:a.string().optional().describe("Scope to a preview environment (omit for production)."),...ie},handler:async(e,t)=>e.builderFrontendDeploy(t.productId,{ref:t.ref,buildCmd:t.buildCmd,environmentId:t.environmentId},{idempotencyKey:t.idempotencyKey})}},{opKey:"frontend.status",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"frontend",command:"status",summary:"Show the product's current frontend release + recent release history",args:[Jl,Yl],handler:async({client:e,args:t,emit:r})=>{let o=await e.builderFrontendStatus(t.productId,t.env);r(o,"Frontend status")}},mcp:{tool:"fs_frontend_status",title:"Get frontend status",description:"Read a product's current frontend serve state (uiMode, active release hash + producing build, pin flag) plus the recent SUCCEEDED releases (rollback targets). Read-only.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(ql),environmentId:a.string().optional().describe("Scope to a preview environment (omit for production).")},handler:async(e,t)=>e.builderFrontendStatus(t.productId,t.environmentId)}},{opKey:"frontend.rollback",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"frontend",command:"rollback",summary:"Roll the product frontend back to a prior release (re-activate its releaseId)",idempotent:!0,args:[Jl,{field:"releaseId",kind:"flag",token:"--release-id <releaseId>",describe:"The prior release id (manifest hash) to re-activate \u2014 see `frontend status`.",required:!0},Yl],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=await e.builderFrontendRollback(t.productId,{releaseId:t.releaseId,environmentId:t.env},r);n(i)||o({result:i},"Frontend rolled back")}},mcp:{tool:"fs_frontend_rollback",title:"Roll back a product frontend",description:"Roll a product's frontend back to a prior release by its releaseId (manifest hash, from fs_frontend_status). Flips the live pointer back and pins it. The releaseId must belong to this target's build history.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(ql),releaseId:a.string().describe("The prior release id (manifest hash) to re-activate."),environmentId:a.string().optional().describe("Scope to a preview environment (omit for production)."),...ie},handler:async(e,t)=>e.builderFrontendRollback(t.productId,{releaseId:t.releaseId,environmentId:t.environmentId},{idempotencyKey:t.idempotencyKey})}}];function qh(e,t){K(e,t,US)}import{existsSync as Yh,mkdirSync as HS,writeFileSync as GS}from"node:fs";import{basename as KS,dirname as Xl,join as WS,resolve as qS}from"node:path";import{createInterface as JS}from"node:readline/promises";import{stdin as Xh,stdout as Qh}from"node:process";var jS="@farthershore/farthershore-js";function LS(e){let t={...e.packageName?{name:e.packageName}:{},private:!0,type:"module",scripts:{dev:"vite",build:"tsc -b && vite build",preview:"vite preview"},dependencies:{[jS]:e.frontendSdkRange,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"}};return`${JSON.stringify(t,null,2)}
113
- `}function FS(e){return["<!doctype html>",'<html lang="en">'," <head>",' <meta charset="UTF-8" />',' <meta name="viewport" content="width=device-width, initial-scale=1.0" />',` <title>${e}</title>`," </head>"," <body>",' <div id="root"></div>',' <script type="module" src="/src/App.tsx"></script>'," </body>","</html>",""].join(`
114
- `)}function MS(){return`// Customer-facing portal \u2014 the editable frontend for your product.
112
+ `,handler:async({client:t,args:e,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=e.productId,s=e.planKey,c=e.policy;if(!Qi.includes(c))throw new S(`Invalid --policy "${c}". Supported: ${Qi.join(", ")}.`,void 0,{code:"INVALID_MIGRATION_POLICY"});let u=await t.migratePlan(i,s,{fromVersion:e.from,toVersion:e.to,policy:c,proration:e.proration,completeBy:e.completeBy},r);n(u)||o({productId:i,planKey:s,migration:u},`Migration scheduled for plan ${s}`)}},mcp:{tool:"fs_plan_migrate",title:"Migrate subscribers between plan versions",description:"Schedule a subscriber migration for a plan: move subscribers from one plan version to another under a policy. Pass the plan KEY plus fromVersion/toVersion (each an integer or 'head'/'latest') \u2014 the server resolves them to the right plan versions. Policies: grandfather (keep existing subs as-is), next_renewal (migrate at each sub's renewal), immediate (migrate now), by_date (migrate everyone by a deadline), opt_in (subs choose). This is an OPERATE action (it changes live subscriber state, not the product's code-managed definition).",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id whose subscribers to migrate."),planKey:a.string().describe("The stable plan key (e.g. 'pro') to migrate within."),fromVersion:a.union([a.string(),a.number().int().positive()]).describe("Source plan version: an integer or 'head'/'latest'."),toVersion:a.union([a.string(),a.number().int().positive()]).describe("Target plan version: an integer or 'head'/'latest'."),policy:a.enum(Qi).describe("Migration policy: grandfather | next_renewal | immediate | by_date | opt_in."),proration:a.enum(["none","prorate","credit"]).optional().describe("Optional proration behaviour."),completeBy:a.string().optional().describe("ISO 8601 deadline \u2014 required by the by_date policy."),...Q},handler:async(t,e)=>t.migratePlan(e.productId,e.planKey,{fromVersion:e.fromVersion,toVersion:e.toVersion,policy:e.policy,proration:e.proration,completeBy:e.completeBy},{idempotencyKey:e.idempotencyKey})}}];function r_(t,e){B(t,e,i$)}var o$=[{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:t,args:e,emit:r})=>{let o=e.productId,n=await ad(t,o,e.env),i=await t.issuePersonaBootstrapKey(o,n,{planKey:e.plan,displayName:e.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(t,{productId:e,environmentId:r})=>t.issuePersonaBootstrapKey(e,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:t,args:e,emit:r})=>{let o=e.productId,n=await ad(t,o,e.env),i=await t.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(t,{productId:e,environmentId:r})=>t.listPersonas(e,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:t,args:e,emit:r})=>{let o=e.productId,n=e.personaId,i=await ad(t,o,e.env),s=await t.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(t,{productId:e,environmentId:r,personaId:o})=>t.revokePersona(e,r,o)}}];function i_(t,e){B(t,e,o$)}async function ad(t,e,r){try{return await Yi(t,e,r)}catch(o){throw new S(o instanceof Error?o.message:`Environment "${r}" not found on product ${e}.`,void 0,{code:"ENV_NOT_FOUND"})}}var a$=[{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:t,args:e,emit:r})=>{let o=e.productId,n=await t.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(t,{productId:e})=>t.managementGetUsage(e)}}];function o_(t,e){B(t,e,a$)}function a_(t,e){let r=t.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 e().builderGitHubStatus();Z({status:n},"GitHub status")}),r.command("stripe <productIdOrName>").description("Print Stripe Connect status for a product").action(async o=>{let n=e(),i=await Pe(n,o),s=await n.productStripeStatus(i);Z({productId:i,status:s},"Stripe status")})}function s$(t){if(!t||typeof t!="object")return[];let e=t;return Array.isArray(e.data)?e.data:Array.isArray(e.tokens)?e.tokens:Array.isArray(t)?t:[]}var c$=[{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:t,emit:e})=>{let r=s$(await t.managementListMakerTokens());e({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 t=>t.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:t,args:e,emit:r})=>{let o=await t.managementCreateMakerToken({name:e.name,scopes:e.scope,productId:e.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:t,args:e,emit:r})=>{let o=e.tokenId;await t.managementRevokeMakerToken(o),r({revoked:o},`Token ${o} revoked`)}},mcp:null}];function s_(t,e){B(t,e,c$)}var sd=["gateway_verification","metering","health","tunnel"],u$="<productId>",Wn="products:update",qn="The product id.",rt={field:"productId",kind:"positional",token:u$};function c_(t){if(!t||typeof t!="object")return[];let e=t;return Array.isArray(e.data)?e.data:Array.isArray(e.backends)?e.backends:Array.isArray(e.tokens)?e.tokens:Array.isArray(t)?t:[]}function l$(t){let e=t.status;if(typeof e=="string"&&e.length>0)return e;let r=typeof t.readinessState=="string"?t.readinessState:null,o=typeof t.provisionStatus=="string"?t.provisionStatus:null;return r??o??"unknown"}function d$(t){return{id:t.id,name:t.name,slug:t.slug,transport:t.transportMode,default:t.isDefault??!1,status:l$(t),originUrl:t.originUrl??null,lastSeenAt:t.lastSeenAt??null}}async function u_(t,e,r){if(!r)return null;try{return await Yi(t,e,r)}catch(o){throw new S(o instanceof Error?o.message:`Environment "${r}" not found on product ${e}.`,void 0,{code:"ENV_NOT_FOUND"})}}var cd=t=>typeof t=="string"&&t.length>0?t.split(",").map(e=>e.trim()).filter(e=>e.length>0):void 0,m$=[{opKey:"backend.read",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"backend",command:"list",summary:"List backends for a product (id, name, transport, status)",args:[rt],handler:async({client:t,args:e,emit:r})=>{let n=c_(await t.builderListBackends(e.productId)).map(d$);r({count:n.length,backends:n},`${n.length} backend(s)`)}},mcp:{tool:"fs_backend_list",title:"List backends",description:"List a product's backends (origins) \u2014 id, name, slug, transport (direct|tunnel), default flag, and derived status. Read-only.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id whose backends to list.")},handler:async(t,{productId:e})=>t.builderListBackends(e)}},{opKey:"backend.create",operationClass:"operate",scope:[Wn],sideEffect:"write",cli:{group:"backend",command:"create",summary:"Create a backend (default transport: direct)",idempotent:!0,args:[rt,{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: direct | tunnel",defaultValue:"direct"},{field:"runner",kind:"flag",token:"--runner <runner>",describe:"embedded | sidecar"},{field:"runtime",kind:"flag",token:"--runtime <runtime>",describe:"Container/runtime descriptor"},{field:"originUrl",kind:"flag",token:"--origin-url <url>",describe:"Builder origin URL (direct)"},{field:"default",kind:"flag",token:"--default",describe:"Mark this backend the product default"}],handler:async({client:t,args:e,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=e.productId,s=await u_(t,i,e.env),c=e.transport==="tunnel"?"tunnel":"direct",u=await t.builderCreateBackend(i,{name:e.name,slug:e.slug,environmentId:s,transportMode:c,runner:e.runner==="embedded"||e.runner==="sidecar"?e.runner:null,runtime:e.runtime??null,originUrl:e.originUrl??null,isDefault:e.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: direct (public HTTPS URL, secured by Ed25519 request signing) or tunnel (private outbound-only cloudflared, 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(["direct","tunnel"]).optional().describe("How the gateway reaches the origin; defaults to direct."),originUrl:a.string().optional().describe("The origin URL (for direct mode)."),isDefault:a.boolean().optional().describe("Route traffic to this backend by default."),...Q},handler:async(t,e)=>t.builderCreateBackend(e.productId,{name:e.name,slug:e.slug,transportMode:e.transportMode,originUrl:e.originUrl,isDefault:e.isDefault},{idempotencyKey:e.idempotencyKey})}},{opKey:"backend.delete",operationClass:"operate",scope:[Wn],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:[rt,{field:"backendId",kind:"positional",token:"<backendId>"}],handler:async({client:t,args:e,emit:r})=>{let o=e.productId,n=e.backendId;await t.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(qn),backendId:a.string().describe("The backend id to delete.")},handler:async(t,{productId:e,backendId:r})=>t.builderDeleteBackend(e,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:[rt],handler:async({client:t,args:e,emit:r})=>{let o=c_(await t.builderListRuntimeTokens(e.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(qn)},handler:async(t,{productId:e})=>t.builderListRuntimeTokens(e)}},{opKey:"runtime_token.mint",operationClass:"operate",scope:[Wn],sideEffect:"write",cli:{group:"backend tokens",command:"create",summary:"Create a runtime token (returns FS_RUNTIME_TOKEN once)",idempotent:!0,args:[rt,{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: ${sd.join(" | ")}. Default: core's DEFAULT_CAPABILITIES. Use tunnel for 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:t,args:e,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=e.productId,s=await u_(t,i,e.env),c=e.kind==="test"||e.kind==="live"?e.kind:void 0,u=cd(e.capabilities);if(u){for(let d of u)if(!sd.includes(d))throw new S(`Unknown capability "${d}". Available: ${sd.join(", ")}.`,void 0,{code:"UNKNOWN_RUNTIME_TOKEN_CAPABILITY"})}let l=await t.builderCreateRuntimeToken(i,{environmentId:s,backendId:e.backend??null,kind:c,capabilities:u,allowedMeters:cd(e.meters),allowedRoutes:cd(e.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(qn),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)."),...Q},handler:async(t,e)=>t.builderCreateRuntimeToken(e.productId,{backendId:e.backendId??null,environmentId:e.environmentId??null,kind:e.kind,capabilities:e.capabilities},{idempotencyKey:e.idempotencyKey})}},{opKey:"runtime_token.rotate",operationClass:"operate",scope:[Wn],sideEffect:"write",cli:{group:"backend tokens",command:"rotate",summary:"Rotate a runtime token (returns a fresh FS_RUNTIME_TOKEN once)",args:[rt,{field:"tokenId",kind:"positional",token:"<tokenId>"}],handler:async({client:t,args:e,emit:r})=>{let o=e.productId,n=e.tokenId,i=await t.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(qn),tokenId:a.string().describe("The runtime token id to rotate."),...Q},handler:async(t,e)=>t.builderRotateRuntimeToken(e.productId,e.tokenId,{idempotencyKey:e.idempotencyKey})}},{opKey:"runtime_token.revoke",operationClass:"operate",scope:[Wn],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:[rt,{field:"tokenId",kind:"positional",token:"<tokenId>"}],handler:async({client:t,args:e,emit:r})=>{let o=e.productId,n=e.tokenId;await t.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(qn),tokenId:a.string().describe("The runtime token id to revoke.")},handler:async(t,{productId:e,tokenId:r})=>t.builderRevokeRuntimeToken(e,r)}}];function l_(t,e){B(t,e,m$)}var it="The business id or slug.",Kt="Scope to a preview environment (omit for production).",Gt={field:"productId",kind:"positional",token:"<businessIdOrSlug>",describe:it,resolveProduct:!0},Wt={field:"env",kind:"flag",token:"--env <environmentId>",describe:"Scope to a preview environment id (omit for production)."},p$={field:"target",kind:"flag",token:"--target <target>",describe:"BUILD, RUNTIME, or BOTH (default)."};async function qt(t,e){return Pe(t,e)}var f$=[{opKey:"frontend.deploy",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"frontend",command:"deploy",summary:"Trigger a frontend build (deploy) for a product's connected repo",idempotent:!0,args:[Gt,Wt,{field:"ref",kind:"flag",token:"--ref <ref>",describe:"Git ref to build (defaults to the env branch / repo default)."},{field:"buildCmd",kind:"flag",token:"--build-cmd <cmd>",describe:"Override the build command."}],handler:async({client:t,args:e,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=await t.builderFrontendDeploy(e.productId,{ref:e.ref,buildCmd:e.buildCmd,environmentId:e.env},r);n(i)||o({result:i},"Frontend build triggered")}},mcp:{tool:"fs_frontend_deploy",title:"Deploy a product frontend",description:"Trigger a Managed Frontend Hosting build for the product's connected repo (production by default; pass environmentId for a preview env). Returns the enqueued build.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(it),ref:a.string().optional().describe("Git ref to build (defaults to the env branch / repo default)."),buildCmd:a.string().optional().describe("Override the build command."),environmentId:a.string().optional().describe(Kt),...Q},handler:async(t,e)=>{let r=await qt(t,e.productId);return t.builderFrontendDeploy(r,{ref:e.ref,buildCmd:e.buildCmd,environmentId:e.environmentId},{idempotencyKey:e.idempotencyKey})}}},{opKey:"frontend.status",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"frontend",command:"status",summary:"Show the product's current frontend release + recent release history",args:[Gt,Wt],handler:async({client:t,args:e,emit:r})=>{let o=await t.builderFrontendStatus(e.productId,e.env);r(o,"Frontend status")}},mcp:{tool:"fs_frontend_status",title:"Get frontend status",description:"Read a product's current frontend serve state (uiMode, active release hash + producing build, pin flag) plus the recent SUCCEEDED releases (rollback targets). Read-only.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(it),environmentId:a.string().optional().describe(Kt)},handler:async(t,e)=>{let r=await qt(t,e.productId);return t.builderFrontendStatus(r,e.environmentId)}}},{opKey:"frontend.rollback",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"frontend",command:"rollback",summary:"Roll the product frontend back to a prior release (re-activate its releaseId)",idempotent:!0,args:[Gt,{field:"releaseId",kind:"flag",token:"--release-id <releaseId>",describe:"The prior release id (manifest hash) to re-activate \u2014 see `frontend status`.",required:!0},Wt],handler:async({client:t,args:e,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=await t.builderFrontendRollback(e.productId,{releaseId:e.releaseId,environmentId:e.env},r);n(i)||o({result:i},"Frontend rolled back")}},mcp:{tool:"fs_frontend_rollback",title:"Roll back a product frontend",description:"Roll a product's frontend back to a prior release by its releaseId (manifest hash, from fs_frontend_status). Flips the live pointer back and pins it. The releaseId must belong to this target's build history.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(it),releaseId:a.string().describe("The prior release id (manifest hash) to re-activate."),environmentId:a.string().optional().describe(Kt),...Q},handler:async(t,e)=>{let r=await qt(t,e.productId);return t.builderFrontendRollback(r,{releaseId:e.releaseId,environmentId:e.environmentId},{idempotencyKey:e.idempotencyKey})}}},{opKey:"frontend.env.read",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"frontend env",command:"list",summary:"List public frontend build/runtime variables",args:[Gt,Wt],handler:async({client:t,args:e,emit:r})=>{let o=await t.builderFrontendVariables(e.productId,e.env);r(o,"Frontend variables")}},mcp:{tool:"fs_frontend_env_list",title:"List frontend variables",description:"List public browser-visible frontend build/runtime variables for a product. Includes effective build/runtime maps after production inheritance and environment overrides.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(it),environmentId:a.string().optional().describe(Kt)},handler:async(t,e)=>{let r=await qt(t,e.productId);return t.builderFrontendVariables(r,e.environmentId)}}},{opKey:"frontend.env.set",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"frontend env",command:"set",summary:"Set a public frontend build/runtime variable",idempotent:!0,args:[Gt,{field:"name",kind:"positional",token:"<name>"},{field:"value",kind:"positional",token:"<value>"},Wt,p$],handler:async({client:t,args:e,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=await t.builderSetFrontendVariable(e.productId,{name:e.name,value:e.value,target:e.target??"BOTH",environmentId:e.env},r);n(i)||o({result:i},"Frontend variable saved")}},mcp:{tool:"fs_frontend_env_set",title:"Set a frontend variable",description:"Create or update a public browser-visible frontend variable. target is BUILD, RUNTIME, or BOTH.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(it),name:a.string().describe("Frontend variable name."),value:a.string().describe("Frontend variable value."),target:a.enum(["BUILD","RUNTIME","BOTH"]).optional().describe("Where the variable is exposed. Default: BOTH."),environmentId:a.string().optional().describe(Kt),...Q},handler:async(t,e)=>{let r=await qt(t,e.productId);return t.builderSetFrontendVariable(r,{name:e.name,value:e.value,target:e.target??"BOTH",environmentId:e.environmentId},{idempotencyKey:e.idempotencyKey})}}},{opKey:"frontend.env.delete",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"frontend env",command:"delete",summary:"Delete a public frontend variable",idempotent:!0,args:[Gt,{field:"name",kind:"positional",token:"<name>"},Wt],handler:async({client:t,args:e,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=await t.builderDeleteFrontendVariable(e.productId,e.name,e.env,r);n(i)||o({result:i},"Frontend variable deleted")}},mcp:{tool:"fs_frontend_env_delete",title:"Delete a frontend variable",description:"Delete a public browser-visible frontend variable.",annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(it),name:a.string().describe("Frontend variable name."),environmentId:a.string().optional().describe(Kt),...Q},handler:async(t,e)=>{let r=await qt(t,e.productId);return t.builderDeleteFrontendVariable(r,e.name,e.environmentId,{idempotencyKey:e.idempotencyKey})}}}];function d_(t,e){B(t,e,f$)}import{existsSync as p_,mkdirSync as x$,writeFileSync as S$}from"node:fs";import{basename as $$,dirname as ud,join as I$,resolve as E$}from"node:path";import{createInterface as w$}from"node:readline/promises";import{stdin as f_,stdout as g_}from"node:process";var g$="@farthershore/farthershore-js";function h$(t){let e={...t.packageName?{name:t.packageName}:{},private:!0,type:"module",scripts:{dev:"vite",build:"tsc -b && vite build",preview:"vite preview"},dependencies:{[g$]:t.frontendSdkRange,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"}};return`${JSON.stringify(e,null,2)}
113
+ `}function _$(t){return["<!doctype html>",'<html lang="en">'," <head>",' <meta charset="UTF-8" />',' <meta name="viewport" content="width=device-width, initial-scale=1.0" />',` <title>${t}</title>`," </head>"," <body>",' <div id="root"></div>',' <script type="module" src="/src/App.tsx"></script>'," </body>","</html>",""].join(`
114
+ `)}function v$(){return`// Customer-facing portal \u2014 the editable frontend for your business.
115
115
  //
116
116
  // PORTAL CUSTOMIZATION = EDIT THIS \`frontend/\` TREE (the fork model). The
117
117
  // platform serves a generic managed template by default; once you edit and
118
- // build this frontend, the platform serves YOUR build instead. Your product's
119
- // CONTRACT (plans, pricing, routes, meters) lives in \`product/\` and is managed
118
+ // build this frontend, the platform serves YOUR build instead. Your business's
119
+ // CONTRACT (plans, pricing, routes, meters) lives in \`business/\` and is managed
120
120
  // as code \u2014 change pricing there, change the UI here.
121
121
  //
122
122
  // The SDK is self-managed: one client + one <FartherShoreRoot> wrapper owns
123
- // bootstrap, theming (brand color from your product), and auth (Clerk satellite
123
+ // bootstrap, theming (brand color from your business), and auth (Clerk satellite
124
124
  // or persona sessions, picked from the environment). Data components are
125
125
  // zero-prop \u2014 they read everything from the resolved client.
126
126
  import { StrictMode } from "react";
@@ -174,7 +174,7 @@ createRoot(root).render(
174
174
  </FartherShoreRoot>
175
175
  </StrictMode>,
176
176
  );
177
- `}function ZS(){return`:root {
177
+ `}function b$(){return`:root {
178
178
  color-scheme: light;
179
179
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
180
180
  color: #18181b;
@@ -206,20 +206,20 @@ body {
206
206
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
207
207
  align-items: start;
208
208
  }
209
- `}function VS(){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",types:["vite/client"]},include:["src"],references:[]},null,2)}
210
- `}function BS(){return`import { defineConfig } from "vite";
209
+ `}function y$(){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",types:["vite/client"]},include:["src"],references:[]},null,2)}
210
+ `}function k$(){return`import { defineConfig } from "vite";
211
211
  import react from "@vitejs/plugin-react";
212
212
 
213
213
  export default defineConfig({
214
214
  plugins: [react()],
215
215
  });
216
- `}function Jh(e){let t=e.productName??"Farther Shore Product";return[{path:"frontend/package.json",content:LS(e)},{path:"frontend/index.html",content:FS(t)},{path:"frontend/src/App.tsx",content:MS()},{path:"frontend/src/styles.css",content:ZS()},{path:"frontend/tsconfig.json",content:VS()},{path:"frontend/vite.config.ts",content:BS()}]}var Zi="product/product.config.ts",YS="0.8.2",XS="0.8.2";function QS(e){if(!e)throw new k(`--template is required. Choose one of: ${ge.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_REQUIRED"});let t=e.toLowerCase();if(!ge.includes(t))throw new k(`Unknown template "${e}". Choose one of: ${ge.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_UNKNOWN"});return t}var e$='limits: { requests: { rate: 600, interval: "minute" } },';function t$(e){let t=e.pricing,r=e.kind==="free",o=[` name: "${n$(e)}",`];r?o.push(" price: { free: true },"):t.recurring_fee_cents>0&&o.push(` price: { amount: ${t.recurring_fee_cents}, currency: "usd", interval: "${t.billing_interval}" },`);let n=(t.meters??[]).filter(i=>typeof i.dimension=="string").map(i=>`${i.dimension}: { micros: ${i.price_per_unit_micros??0} }`);if(n.length>0&&o.push(` meter: { ${n.join(", ")} },`),(t.grants??[]).length>0){let i=(t.grants??[]).map(Ql).join(", ");o.push(` grants: [${i}],`)}return t.trial_days>0&&o.push(` trialDays: ${t.trial_days},`),o.push(` ${e$}`),o}function e_(e,t){let r=Bl(t),n=r.includes("api"),i=["Product","Plan","Requests","Surface"];n&&i.push("Feature");let s=[];s.push("import {");for(let c of i)s.push(` ${c},`);s.push('} from "@farthershore/product";'),s.push(""),s.push("@Product({"),s.push(' name: "my-product",'),s.push(' origin: "https://app.example.com",'),s.push(' displayName: "My Product",'),s.push("})"),s.push("export default class MyProduct {");for(let c of r)s.push(` @Surface("${c}")`),s.push(` ${r$(c)}Surface!: unknown;`),s.push("");s.push(" @Requests()"),s.push(" requests!: unknown;"),s.push(""),n&&(s.push(' @Feature("api", {'),s.push(' routes: { "GET /v1/example": {} },'),s.push(" })"),s.push(" apiFeature!: unknown;"),s.push("")),s.push(` @Plan("${e.kind}", {`);for(let c of t$(e))s.push(c);return s.push(" })"),s.push(` ${e.kind}!: unknown;`),s.push("}"),s.push(""),s.join(`
217
- `)}function n$(e){return e.label.split(" \u2014 ")[0]??e.label}function r$(e){return e.replace(/-/g,"_")}function Ql(e){return Array.isArray(e)?`[${e.map(Ql).join(", ")}]`:e&&typeof e=="object"?`{ ${Object.entries(e).map(([r,o])=>`${/^[A-Za-z_$][\w$]*$/.test(r)?r:JSON.stringify(r)}: ${Ql(o)}`).join(", ")} }`:JSON.stringify(e)}function i$(e,t=Zi,r){let o=Xl(t),n=u=>o==="."?u:`${o}/${u}`,i=KS(o)==="product"?Xl(o):o,s=u=>i==="."?u:WS(i,u),c=Jh({frontendSdkRange:XS}).map(u=>({path:s(u.path),content:u.content}));return[{path:s(".gitignore"),content:s$()},{path:t,content:e_(e,r)},{path:n("package.json"),content:o$()},{path:n("tsconfig.json"),content:a$()},...c]}function o$(){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":YS},devDependencies:{typescript:"^6.0.2"}},null,2)}
218
- `}function a$(){return`${JSON.stringify({compilerOptions:{target:"ES2022",useDefineForClassFields:!0,module:"NodeNext",moduleResolution:"NodeNext",strict:!0,noEmit:!0,skipLibCheck:!0},include:["**/*.ts"]},null,2)}
219
- `}function s$(){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(`
220
- `)}function c$(){return Hl().map((e,t)=>` ${t+1}) ${e.kind.padEnd(8)} \u2014 ${e.description}`).join(`
221
- `)}function u$(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) ${Rn(t)}`,` one-time credit (grant) ${jt(t)}`,` trial_days ${t.trial_days}`];return r&&o.push(` meters ${r}`),o.join(`
222
- `)}async function l$(e){e.log("FartherShore init \u2014 pick a starter plan preset:"),e.log(""),e.log(c$()),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<=ge.length?o=ge[r-1]??null:ge.includes(t.toLowerCase())&&(o=t.toLowerCase()),!o)throw new k(`Unknown preset "${t}". Choose one of: ${ge.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_UNKNOWN"});e.log(""),e.log(`Preview \u2014 ${Fi(o).label}:`),e.log(u$(Fi(o))),e.log("");let n=(await e.ask(`Output path (default: ${Zi}): `)).trim();return{kind:o,path:n||Zi}}function t_(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: ${ge.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: ${Zt.join(", ")}. Default: frontend, api.`,(t,r)=>[...r,t],[]).addHelpText("after",`
216
+ `}function m_(t){let e=t.productName??"Farther Shore Business";return[{path:"frontend/package.json",content:h$(t)},{path:"frontend/index.html",content:_$(e)},{path:"frontend/src/App.tsx",content:v$()},{path:"frontend/src/styles.css",content:b$()},{path:"frontend/tsconfig.json",content:y$()},{path:"frontend/vite.config.ts",content:k$()}]}var eo="business/business.config.ts",O$="0.1.0",T$="0.8.2";function A$(t){if(!t)throw new S(`--template is required. Choose one of: ${_e.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_REQUIRED"});let e=t.toLowerCase();if(!_e.includes(e))throw new S(`Unknown template "${t}". Choose one of: ${_e.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_UNKNOWN"});return e}var C$='limits: { requests: { rate: 600, interval: "minute" } },';function P$(t){let e=t.pricing,r=t.kind==="free",o=[` name: "${N$(t)}",`];r?o.push(" price: { free: true },"):e.recurring_fee_cents>0&&o.push(` price: { amount: ${e.recurring_fee_cents}, currency: "usd", interval: "${e.billing_interval}" },`);let n=(e.meters??[]).filter(i=>typeof i.dimension=="string").map(i=>`${i.dimension}: { micros: ${i.price_per_unit_micros??0} }`);if(n.length>0&&o.push(` meter: { ${n.join(", ")} },`),(e.grants??[]).length>0){let i=(e.grants??[]).map(ld).join(", ");o.push(` grants: [${i}],`)}return e.trial_days>0&&o.push(` trialDays: ${e.trial_days},`),o.push(` ${C$}`),o}function h_(t,e){let r=id(e),n=r.includes("api"),i=["Business","Plan","Requests","Surface"];n&&i.push("Feature");let s=[];s.push("import {");for(let c of i)s.push(` ${c},`);s.push('} from "@farthershore/business";'),s.push(""),s.push("@Business({"),s.push(' name: "my-business",'),s.push(' origin: "https://app.example.com",'),s.push(' displayName: "My Business",'),s.push("})"),s.push("export default class MyBusiness {");for(let c of r)s.push(` @Surface("${c}")`),s.push(` ${R$(c)}Surface!: unknown;`),s.push("");s.push(" @Requests()"),s.push(" requests!: unknown;"),s.push(""),n&&(s.push(' @Feature("api", {'),s.push(' routes: { "GET /v1/example": {} },'),s.push(" })"),s.push(" apiFeature!: unknown;"),s.push("")),s.push(` @Plan("${t.kind}", {`);for(let c of P$(t))s.push(c);return s.push(" })"),s.push(` ${t.kind}!: unknown;`),s.push("}"),s.push(""),s.join(`
217
+ `)}function N$(t){return t.label.split(" \u2014 ")[0]??t.label}function R$(t){return t.replace(/-/g,"_")}function ld(t){return Array.isArray(t)?`[${t.map(ld).join(", ")}]`:t&&typeof t=="object"?`{ ${Object.entries(t).map(([r,o])=>`${/^[A-Za-z_$][\w$]*$/.test(r)?r:JSON.stringify(r)}: ${ld(o)}`).join(", ")} }`:JSON.stringify(t)}function D$(t,e=eo,r){let o=ud(e),n=u=>o==="."?u:`${o}/${u}`,i=$$(o)==="business"?ud(o):o,s=u=>i==="."?u:I$(i,u),c=m_({frontendSdkRange:T$}).map(u=>({path:s(u.path),content:u.content}));return[{path:s(".gitignore"),content:j$()},{path:e,content:h_(t,r)},{path:n("package.json"),content:U$()},{path:n("tsconfig.json"),content:z$()},...c]}function U$(){return`${JSON.stringify({private:!0,type:"module",scripts:{build:"farthershore-manifest-build --out business-build.json",validate:"farthershore-manifest-build --out business-build.json"},dependencies:{"@farthershore/business":O$},devDependencies:{typescript:"^6.0.2"}},null,2)}
218
+ `}function z$(){return`${JSON.stringify({compilerOptions:{target:"ES2022",useDefineForClassFields:!0,module:"NodeNext",moduleResolution:"NodeNext",strict:!0,noEmit:!0,skipLibCheck:!0},include:["**/*.ts"]},null,2)}
219
+ `}function j$(){return["# OS",".DS_Store","Thumbs.db","","# Dependencies and local output","business/node_modules/","business/business-build.json","business/manifest-diagnostics.json","frontend/node_modules/","frontend/dist/","business-build.json","manifest-diagnostics.json","","# Local env + tooling",".env",".env.local",".vscode/",".idea/",""].join(`
220
+ `)}function L$(){return od().map((t,e)=>` ${e+1}) ${t.kind.padEnd(8)} \u2014 ${t.description}`).join(`
221
+ `)}function F$(t){let e=t.pricing,r=(e.meters??[]).map(n=>`${n.dimension} @ ${n.price_per_unit_micros} micros/unit`).join(", "),o=[` recurring_fee_cents ${e.recurring_fee_cents}`,` recurring credit (grant) ${Vn(e)}`,` one-time credit (grant) ${Mt(e)}`,` trial_days ${e.trial_days}`];return r&&o.push(` meters ${r}`),o.join(`
222
+ `)}async function M$(t){t.log("FartherShore init \u2014 pick a starter plan preset:"),t.log(""),t.log(L$()),t.log("");let e=(await t.ask("Preset (number or name, blank to cancel): ")).trim();if(!e)return null;let r=Number.parseInt(e,10),o=null;if(Number.isInteger(r)&&r>=1&&r<=_e.length?o=_e[r-1]??null:_e.includes(e.toLowerCase())&&(o=e.toLowerCase()),!o)throw new S(`Unknown preset "${e}". Choose one of: ${_e.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_UNKNOWN"});t.log(""),t.log(`Preview \u2014 ${Xi(o).label}:`),t.log(F$(Xi(o))),t.log("");let n=(await t.ask(`Output path (default: ${eo}): `)).trim();return{kind:o,path:n||eo}}function __(t){t.command("init").description("Scaffold a starter business/business.config.ts from a named plan preset (free | starter | pro | prepaid | metered)").option("--template <kind>",`Plan preset to scaffold. One of: ${_e.join(" | ")}`).option("--force","Overwrite business/business.config.ts if it already exists").option("--path <path>","Output path for the generated product config (default: ./business/business.config.ts)").option("--surface <surface>",`Initial Business SDK surface, repeatable. Available: ${Ht.join(", ")}. Default: frontend, api.`,(e,r)=>[...r,e],[]).addHelpText("after",`
223
223
  Examples:
224
224
  farthershore init # interactive (TTY only)
225
225
  farthershore init --template free
@@ -228,25 +228,25 @@ Examples:
228
228
  farthershore init --template starter --surface frontend --surface agent
229
229
 
230
230
  Available templates:
231
- ${Hl().map(t=>` ${t.kind.padEnd(8)} ${t.description}`).join(`
231
+ ${od().map(e=>` ${e.kind.padEnd(8)} ${e.description}`).join(`
232
232
  `)}
233
- `).action(async t=>{let r,o=t.path;if(t.template)r=QS(t.template);else if(Xh.isTTY&&Qh.isTTY){let d=JS({input:Xh,output:Qh});try{let m=await l$({ask:g=>d.question(g),log:g=>{console.log(g)}});if(!m){Ie("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: ${ge.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_REQUIRED"});let n=Fi(r),i=qS(o??Zi),s=Un(t);if(Yh(i)&&!t.force)throw new k(`${i} already exists. Pass --force to overwrite.`,void 0,{code:"INIT_FILE_EXISTS"});let c=i$(n,i,s),u=c.map(d=>d.path).filter(d=>Yh(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)HS(Xl(d.path),{recursive:!0}),GS(d.path,d.content,"utf-8");let l=c.find(d=>d.path===i)?.content??e_(n,s);V({template:r,path:i,surfaces:Bl(s),preset:{kind:n.kind,label:n.label},content:l,files:c},`Scaffolded ${i} from preset "${n.label}".`),Ie("Next: edit product/product.config.ts, then run `farthershore build`.")})}var d$="x-fs-surface",m$="cli",p$=["ProductApplyWorkflow","RollbackWorkflow","StripeSyncWorkflow","WebhookDispatchWorkflow"];function f$(){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 g$(){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 n_(e){let t=f$(),r=g$(),o=await fetch(`${t}${e}`,{method:"GET",headers:{"content-type":"application/json","x-admin-service-secret":r,"x-admin-actor-id":"farthershore-cli",[d$]:m$}});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 td(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 r_(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 Vi(e){switch(e){case"COMPLETED":case"SUCCEEDED":case"CONVERGED":return z.green;case"RUNNING":case"PENDING":case"PAUSED":case"RETRYING":case"WAITING_FOR_APPROVAL":return z.yellow;case"FAILED":case"DIVERGED":case"STALLED":case"REQUIRES_HUMAN_INTERVENTION":case"TIMEOUT":return z.red;case"ROLLED_BACK":case"CANCELLED":case"COMPENSATED":return z.magenta;default:return t=>t}}function w(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 h$(e,t=new Date){let r=z.dim([w("ID",Z.id),w("TYPE",Z.type),w("PRODUCT",Z.product),w("STATUS",Z.status),w("PHASE",Z.phase),w("STARTED",Z.started),w("DURATION",Z.duration)].join(" ")),o=z.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=td(r_(i,t)),c=Vi(i.status)(w(i.status,Z.status));return[w(i.id,Z.id),w(i.workflowType,Z.type),w(i.productId??"\u2014",Z.product),c,w(i.currentPhase??"\u2014",Z.phase),w(i.startedAt,Z.started),w(s,Z.duration)].join(" ")});return[r,o,...n].join(`
234
- `)}function he(e,t){let r;return t==null||t===""?r=z.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),` ${z.dim(e.padEnd(20))}${r}`}var ke={stepName:28,phase:26,status:14,attempt:8,duration:10},Vt={eventType:28,occurredAt:24,payload:60},Bt={surface:24,status:14,delta:60};function _$(e){if(e.length===0)return z.dim(" (no steps recorded)");let t=z.dim([w("STEP",ke.stepName),w("PHASE",ke.phase),w("STATUS",ke.status),w("ATTEMPT",ke.attempt),w("DURATION",ke.duration)].join(" ")),r=e.map(o=>[w(o.stepName,ke.stepName),w(o.phase,ke.phase),Vi(o.status)(w(o.status,ke.status)),w(String(o.attempt),ke.attempt),w(td(o.durationMs),ke.duration)].join(" "));return[t,...r].join(`
235
- `)}function v$(e){return Object.keys(e).length===0?"(empty)":JSON.stringify(e)}function b$(e){if(e.length===0)return z.dim(" (no events recorded)");let t=z.dim([w("EVENT",Vt.eventType),w("OCCURRED AT",Vt.occurredAt),w("PAYLOAD",Vt.payload)].join(" ")),r=e.map(o=>[w(o.eventType,Vt.eventType),w(o.occurredAt,Vt.occurredAt),w(v$(o.payload),Vt.payload)].join(" "));return[t,...r].join(`
236
- `)}function y$(e){if(e.length===0)return z.dim(" (no convergence state recorded)");let t=z.dim([w("SURFACE",Bt.surface),w("STATUS",Bt.status),w("DELTA",Bt.delta)].join(" ")),r=e.map(o=>[w(o.surface,Bt.surface),Vi(o.status)(w(o.status,Bt.status)),w(o.deltaDescription??"\u2014",Bt.delta)].join(" "));return[t,...r].join(`
237
- `)}function x$(e){let{execution:t,steps:r,events:o,convergence:n}=e,i=[];return i.push(z.bold(`Workflow ${t.id}`)),i.push(he("type",t.workflowType)),i.push(he("status",Vi(t.status)(t.status))),i.push(he("currentPhase",t.currentPhase)),i.push(he("startedAt",t.startedAt)),i.push(he("completedAt",t.completedAt)),i.push(he("triggeredBy",t.triggeredBy)),i.push(he("correlationId",t.correlationId)),i.push(he("productId",t.productId)),i.push(he("duration",td(r_(t)))),i.push(""),i.push(z.bold("Steps")),i.push(_$(r)),i.push(""),i.push(z.bold("Events")),i.push(b$(o)),i.push(""),i.push(z.bold("Convergence")),i.push(y$(n)),t.errorReason&&(i.push(""),i.push(z.bold(z.red("Error"))),i.push(he("reason",t.errorReason)),i.push(he("classification",t.errorClassification))),i.join(`
238
- `)}var ed=["RUNNING","COMPLETED","FAILED","ROLLED_BACK","STALLED","REQUIRES_HUMAN_INTERVENTION","WAITING_FOR_APPROVAL","CANCELLED"];function k$(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 S$(e){let t=new URLSearchParams;if(e.status){if(!ed.includes(e.status))throw new k(`--status must be one of: ${ed.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(k$(e.limit)));let r=t.toString();return r?`?${r}`:""}function i_(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: ${ed.join(", ")})`).option("--type <type>",`Filter by workflow type (e.g. ${p$.join(", ")})`).option("--product <productId>","Filter by productId").option("--limit <N>","Maximum number of rows to return (default 50)").action(async r=>{let o=S$(r),n=await n_(`/internal/admin/workflow/executions${o}`);V(n),ue()!=="json"&&(console.log(h$(n.items)),console.log(z.dim(`
239
- ${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 n_(`/internal/admin/workflow/executions/${encodeURIComponent(r)}`);V(o),ue()!=="json"&&console.log(x$(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 $$}from"node:child_process";import{existsSync as a_}from"node:fs";import{readFile as I$}from"node:fs/promises";var E$="product/product.config.ts",w$="manifest-ir.json",o_="./product/node_modules/.bin/farthershore-manifest-build",O$="./node_modules/.bin/farthershore-manifest-build";function T$(e=a_){return e(o_)?o_:O$}async function A$(e,t=$$,r=a_){let o=T$(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}
240
- `,d(1,null)}),i.on("close",(m,g)=>{d(m??(g?1:0),g)})})}async function P$(e){let t=await I$(e,"utf8"),r=JSON.parse(t);if(!U$(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 s_(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",`
233
+ `).action(async e=>{let r,o=e.path;if(e.template)r=A$(e.template);else if(f_.isTTY&&g_.isTTY){let d=w$({input:f_,output:g_});try{let m=await M$({ask:g=>d.question(g),log:g=>{console.log(g)}});if(!m){G("Cancelled.");return}r=m.kind,o=o??m.path}finally{d.close()}}else throw new S(`--template is required when stdin is not a TTY. Choose one of: ${_e.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_REQUIRED"});let n=Xi(r),i=E$(o??eo),s=Kn(e);if(p_(i)&&!e.force)throw new S(`${i} already exists. Pass --force to overwrite.`,void 0,{code:"INIT_FILE_EXISTS"});let c=D$(n,i,s),u=c.map(d=>d.path).filter(d=>p_(d));if(u.length>0&&!e.force)throw new S(`${u[0]} already exists. Pass --force to overwrite.`,void 0,{code:"INIT_FILE_EXISTS"});for(let d of c)x$(ud(d.path),{recursive:!0}),S$(d.path,d.content,"utf-8");let l=c.find(d=>d.path===i)?.content??h_(n,s);Z({template:r,path:i,surfaces:id(s),preset:{kind:n.kind,label:n.label},content:l,files:c},`Scaffolded ${i} from preset "${n.label}".`),G("Next: edit business/business.config.ts, then run `farthershore build`.")})}var Z$="x-fs-surface",V$="cli",B$=["BusinessApplyWorkflow","RollbackWorkflow","StripeSyncWorkflow","WebhookDispatchWorkflow"];function H$(){let t=process.env.FARTHERSHORE_API_URL;if(!t)throw new S("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 K$(){let t=process.env.FARTHERSHORE_ADMIN_SECRET;if(!t)throw new S("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 v_(t){let e=H$(),r=K$(),o=await fetch(`${e}${t}`,{method:"GET",headers:{"content-type":"application/json","x-admin-service-secret":r,"x-admin-actor-id":"farthershore-cli",[Z$]:V$}});if(!o.ok){let i=(await o.json().catch(()=>null))?.error;throw new S(i?.message??o.statusText,o.status,{code:i?.code,details:i?.details})}if(o.status!==204)return o.json()}function md(t){if(t==null)return"\u2014";if(t<1e3)return`${t}ms`;let e=t/1e3;if(e<60)return`${e.toFixed(1)}s`;let r=e/60;return r<60?`${r.toFixed(1)}m`:`${(r/60).toFixed(1)}h`}function b_(t,e=new Date){let r=new Date(t.startedAt).getTime(),o=t.completedAt?new Date(t.completedAt).getTime():t.failedAt?new Date(t.failedAt).getTime():e.getTime();return Math.max(0,o-r)}function to(t){switch(t){case"COMPLETED":case"SUCCEEDED":case"CONVERGED":return R.green;case"RUNNING":case"PENDING":case"PAUSED":case"RETRYING":case"WAITING_FOR_APPROVAL":return R.yellow;case"FAILED":case"DIVERGED":case"STALLED":case"REQUIRES_HUMAN_INTERVENTION":case"TIMEOUT":return R.red;case"ROLLED_BACK":case"CANCELLED":case"COMPENSATED":return R.magenta;default:return e=>e}}function w(t,e){return t.length<=e?t.padEnd(e):e<=1?t.slice(0,e):`${t.slice(0,e-1)}\u2026`}var V={id:30,type:24,product:18,status:16,phase:26,started:24,duration:10};function G$(t,e=new Date){let r=R.dim([w("ID",V.id),w("TYPE",V.type),w("PRODUCT",V.product),w("STATUS",V.status),w("PHASE",V.phase),w("STARTED",V.started),w("DURATION",V.duration)].join(" ")),o=R.dim(["-".repeat(V.id),"-".repeat(V.type),"-".repeat(V.product),"-".repeat(V.status),"-".repeat(V.phase),"-".repeat(V.started),"-".repeat(V.duration)].join(" ")),n=t.map(i=>{let s=md(b_(i,e)),c=to(i.status)(w(i.status,V.status));return[w(i.id,V.id),w(i.workflowType,V.type),w(i.productId??"\u2014",V.product),c,w(i.currentPhase??"\u2014",V.phase),w(i.startedAt,V.started),w(s,V.duration)].join(" ")});return[r,o,...n].join(`
234
+ `)}function ve(t,e){let r;return e==null||e===""?r=R.dim("(unset)"):typeof e=="object"?r=JSON.stringify(e):typeof e=="string"||typeof e=="number"||typeof e=="boolean"?r=String(e):r=JSON.stringify(e),` ${R.dim(t.padEnd(20))}${r}`}var $e={stepName:28,phase:26,status:14,attempt:8,duration:10},Jt={eventType:28,occurredAt:24,payload:60},Yt={surface:24,status:14,delta:60};function W$(t){if(t.length===0)return R.dim(" (no steps recorded)");let e=R.dim([w("STEP",$e.stepName),w("PHASE",$e.phase),w("STATUS",$e.status),w("ATTEMPT",$e.attempt),w("DURATION",$e.duration)].join(" ")),r=t.map(o=>[w(o.stepName,$e.stepName),w(o.phase,$e.phase),to(o.status)(w(o.status,$e.status)),w(String(o.attempt),$e.attempt),w(md(o.durationMs),$e.duration)].join(" "));return[e,...r].join(`
235
+ `)}function q$(t){return Object.keys(t).length===0?"(empty)":JSON.stringify(t)}function J$(t){if(t.length===0)return R.dim(" (no events recorded)");let e=R.dim([w("EVENT",Jt.eventType),w("OCCURRED AT",Jt.occurredAt),w("PAYLOAD",Jt.payload)].join(" ")),r=t.map(o=>[w(o.eventType,Jt.eventType),w(o.occurredAt,Jt.occurredAt),w(q$(o.payload),Jt.payload)].join(" "));return[e,...r].join(`
236
+ `)}function Y$(t){if(t.length===0)return R.dim(" (no convergence state recorded)");let e=R.dim([w("SURFACE",Yt.surface),w("STATUS",Yt.status),w("DELTA",Yt.delta)].join(" ")),r=t.map(o=>[w(o.surface,Yt.surface),to(o.status)(w(o.status,Yt.status)),w(o.deltaDescription??"\u2014",Yt.delta)].join(" "));return[e,...r].join(`
237
+ `)}function X$(t){let{execution:e,steps:r,events:o,convergence:n}=t,i=[];return i.push(R.bold(`Workflow ${e.id}`)),i.push(ve("type",e.workflowType)),i.push(ve("status",to(e.status)(e.status))),i.push(ve("currentPhase",e.currentPhase)),i.push(ve("startedAt",e.startedAt)),i.push(ve("completedAt",e.completedAt)),i.push(ve("triggeredBy",e.triggeredBy)),i.push(ve("correlationId",e.correlationId)),i.push(ve("productId",e.productId)),i.push(ve("duration",md(b_(e)))),i.push(""),i.push(R.bold("Steps")),i.push(W$(r)),i.push(""),i.push(R.bold("Events")),i.push(J$(o)),i.push(""),i.push(R.bold("Convergence")),i.push(Y$(n)),e.errorReason&&(i.push(""),i.push(R.bold(R.red("Error"))),i.push(ve("reason",e.errorReason)),i.push(ve("classification",e.errorClassification))),i.join(`
238
+ `)}var dd=["RUNNING","COMPLETED","FAILED","ROLLED_BACK","STALLED","REQUIRES_HUMAN_INTERVENTION","WAITING_FOR_APPROVAL","CANCELLED"];function Q$(t){if(!t)return 50;let e=Number.parseInt(t,10);if(Number.isNaN(e)||e<=0)throw new S(`--limit must be a positive integer (got "${t}")`,void 0,{code:"INVALID_LIMIT"});return e}function eI(t){let e=new URLSearchParams;if(t.status){if(!dd.includes(t.status))throw new S(`--status must be one of: ${dd.join(", ")} (got "${t.status}")`,void 0,{code:"INVALID_STATUS"});e.set("status",t.status)}t.type&&e.set("workflowType",t.type),t.product&&e.set("productId",t.product),e.set("limit",String(Q$(t.limit)));let r=e.toString();return r?`?${r}`:""}function y_(t){let e=t.command("workflows").description("Inspect durable lifecycle workflow executions (list / show / replay)");e.command("ls").description("List workflow executions as a table").option("--status <status>",`Filter by status (one of: ${dd.join(", ")})`).option("--type <type>",`Filter by workflow type (e.g. ${B$.join(", ")})`).option("--product <productId>","Filter by productId").option("--limit <N>","Maximum number of rows to return (default 50)").action(async r=>{let o=eI(r),n=await v_(`/internal/admin/workflow/executions${o}`);Z(n),de()!=="json"&&(console.log(G$(n.items)),console.log(R.dim(`
239
+ ${n.items.length} executions${n.nextCursor?" (more available \u2014 pass --limit to see more)":""}`)))}),e.command("show <workflowExecutionId>").description("Show a single workflow execution: header, steps, events, convergence panel").action(async r=>{let o=await v_(`/internal/admin/workflow/executions/${encodeURIComponent(r)}`);Z(o),de()!=="json"&&console.log(X$(o))}),e.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 S("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 tI}from"node:child_process";import{existsSync as x_}from"node:fs";import{readFile as nI}from"node:fs/promises";var rI="business/business.config.ts",iI="business-build.json",k_="./business/node_modules/.bin/farthershore-manifest-build",oI="./node_modules/.bin/farthershore-manifest-build";function aI(t=x_){return t(k_)?k_:oI}async function sI(t,e=tI,r=x_){let o=aI(r),n=["--entry",t.entry,"--out",t.out],i=e(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}
240
+ `,d(1,null)}),i.on("close",(m,g)=>{d(m??(g?1:0),g)})})}async function cI(t){let e=await nI(t,"utf8"),r=JSON.parse(e);if(!fI(r)||!("ir"in r))throw new Error(`${t} is not a Manifest IR envelope with an ir field`);return{ir:r.ir,irHash:typeof r.irHash=="string"?r.irHash:void 0}}function S_(t,e,r={}){t.command("build").description("Build business/business.config.ts into a Manifest IR envelope").option("--entry <path>","Business-as-code entry file (default: business/business.config.ts)").option("--out <path>","Output path for the build output (default: business-build.json)").addHelpText("after",`
241
241
  Examples:
242
242
  farthershore build
243
- farthershore build --entry product/product.config.ts --out manifest-ir.json
243
+ farthershore build --entry business/business.config.ts --out business-build.json
244
244
  farthershore build --format json
245
- `).action(async o=>{let n=e.opts(),i=qn(n.format),s=o.entry??E$,c=o.out??w$,u=r.runLocalManifestBuild??A$,l=r.readManifestEnvelope??P$,d=await u({entry:s,out:c});N$(d,i),d.exitCode!==0&&C$(d,s,c);let m;try{m=await l(c)}catch(g){R$(g,s,c)}D$({entry:s,out:c,envelope:m})})}function N$(e,t){t!=="json"&&(e.stdout&&process.stdout.write(e.stdout),e.stderr&&process.stderr.write(e.stderr))}function C$(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 R$(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 D$(e){V({success:!0,entry:e.entry,out:e.out,irHash:e.envelope.irHash??null,mode:null,validation:null,errors:[],warnings:[],lifecyclePlan:null,nextActions:z$()},`Manifest IR written to ${e.out}`),Ie("Commit and push product/ changes for the GitHub bot to compile and publish accepted lifecycle state.")}function z$(){return["Commit and push product/ changes; the GitHub bot will compile and publish accepted lifecycle state"]}function U$(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}import{spawn as j$}from"node:child_process";import{existsSync as L$,mkdtempSync as F$,writeFileSync as M$}from"node:fs";import{tmpdir as Z$}from"node:os";import{join as Bi,resolve as V$}from"node:path";function B$(e,t){let r=e.coreUrl??t.VITE_FS_CORE_URL;if(!r)throw new k("frontend preview needs a Core URL to shim window.__FS_CONFIG__ (the edge injects it in production). Pass --core-url <url> or set VITE_FS_CORE_URL.",void 0,{code:"FRONTEND_PREVIEW_CORE_URL_REQUIRED"});let o=e.clerkPublishableKey??t.VITE_CLERK_PUBLISHABLE_KEY,n=e.clerkSignInUrl??t.VITE_CLERK_SIGN_IN_URL,i=e.clerkSatelliteDomain??t.VITE_CLERK_SATELLITE_DOMAIN,s={};return o&&(s.publishableKey=o),n&&(s.signInUrl=n),i&&(s.satelliteDomain=i),{coreUrl:r,...Object.keys(s).length>0?{clerk:s}:{}}}function H$(e){return`<script>window.__FS_CONFIG__ = ${JSON.stringify(e).replace(/</g,"\\u003c")};</script>`}function G$(e){return`import { defineConfig, mergeConfig, loadConfigFromFile } from "vite";
245
+ `).action(async o=>{let n=t.opts(),i=ar(n.format),s=o.entry??rI,c=o.out??iI,u=r.runLocalManifestBuild??sI,l=r.readManifestEnvelope??cI,d=await u({entry:s,out:c});uI(d,i),d.exitCode!==0&&lI(d,s,c);let m;try{m=await l(c)}catch(g){dI(g,s,c)}mI({entry:s,out:c,envelope:m})})}function uI(t,e){e!=="json"&&(t.stdout&&process.stdout.write(t.stdout),t.stderr&&process.stderr.write(t.stderr))}function lI(t,e,r){throw new S(`Manifest build failed with exit code ${t.exitCode||1}`,0,{code:"MANIFEST_BUILD_FAILED",details:{success:!1,phase:"local_build",entry:e,out:r,command:t.command,args:t.args,exitCode:t.exitCode,signal:t.signal,stdout:t.stdout,stderr:t.stderr,nextActions:["Fix business/business.config.ts and run farthershore build again"]}})}function dI(t,e,r){let o=t instanceof Error?t.message:"Manifest IR output could not be read";throw new S(o,0,{code:"MANIFEST_IR_READ_FAILED",details:{success:!1,phase:"read_manifest_ir",entry:e,out:r,errors:[{message:o}],nextActions:["Check the manifest build output path and run farthershore build again"]}})}function mI(t){Z({success:!0,entry:t.entry,out:t.out,irHash:t.envelope.irHash??null,mode:null,validation:null,errors:[],warnings:[],lifecyclePlan:null,nextActions:pI()},`Manifest IR written to ${t.out}`),G("Commit and push business/ changes for the GitHub bot to compile and publish accepted lifecycle state.")}function pI(){return["Commit and push business/ changes; the GitHub bot will compile and publish accepted lifecycle state"]}function fI(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}import{spawn as gI}from"node:child_process";import{existsSync as hI,mkdtempSync as _I,writeFileSync as vI}from"node:fs";import{tmpdir as bI}from"node:os";import{join as no,resolve as yI}from"node:path";function kI(t,e){let r=t.coreUrl??e.VITE_FS_CORE_URL;if(!r)throw new S("frontend preview needs a Core URL to shim window.__FS_CONFIG__ (the edge injects it in production). Pass --core-url <url> or set VITE_FS_CORE_URL.",void 0,{code:"FRONTEND_PREVIEW_CORE_URL_REQUIRED"});let o=t.clerkPublishableKey??e.VITE_CLERK_PUBLISHABLE_KEY,n=t.clerkSignInUrl??e.VITE_CLERK_SIGN_IN_URL,i=t.clerkSatelliteDomain??e.VITE_CLERK_SATELLITE_DOMAIN,s={};return o&&(s.publishableKey=o),n&&(s.signInUrl=n),i&&(s.satelliteDomain=i),{coreUrl:r,...Object.keys(s).length>0?{clerk:s}:{}}}function xI(t){return`<script>window.__FS_CONFIG__ = ${JSON.stringify(t).replace(/</g,"\\u003c")};</script>`}function SI(t){return`import { defineConfig, mergeConfig, loadConfigFromFile } from "vite";
246
246
 
247
247
  // Generated by \`farthershore frontend preview\` \u2014 injects window.__FS_CONFIG__
248
248
  // (the edge does this in production). Throwaway; safe to delete.
249
- const FS_CONFIG_SHIM = ${JSON.stringify(e)};
249
+ const FS_CONFIG_SHIM = ${JSON.stringify(t)};
250
250
 
251
251
  export default defineConfig(async (configEnv) => {
252
252
  const loaded = await loadConfigFromFile(
@@ -281,9 +281,10 @@ export default defineConfig(async (configEnv) => {
281
281
  ],
282
282
  });
283
283
  });
284
- `}function K$(e){let t=F$(Bi(Z$(),"fs-frontend-preview-")),r=Bi(t,"vite.preview.config.mjs");return M$(r,e,"utf-8"),r}function W$(e,t,r={}){let o=r.existsImpl??L$,n=r.writeTempConfig??K$,i=V$(e.dir??"frontend");if(!o(Bi(i,"package.json")))throw new k(`No frontend/ project at ${i} (expected ${Bi(i,"package.json")}). Run from a product repo root, or pass --dir <path>.`,void 0,{code:"FRONTEND_PREVIEW_NO_PROJECT"});let s=B$(e,t),c=H$(s),u=G$(c),l=n(u),d=["vite","--config",l];return e.port&&d.push("--port",e.port),{cwd:i,config:s,configPath:l,command:"npx",args:d}}function c_(e,t={}){(e.commands.find(o=>o.name()==="frontend")??e.command("frontend").description("Managed Frontend Hosting: deploy/status/rollback (+ local preview)")).command("preview").alias("dev").description("Run the frontend's `vite dev` with an injected window.__FS_CONFIG__ shim so the portal renders as it serves (coreUrl + optional Clerk).").option("--dir <path>","Frontend project directory (default: ./frontend)").option("--core-url <url>","Platform Core base URL to shim (default: VITE_FS_CORE_URL)").option("--clerk-publishable-key <key>","Clerk publishable key for clerk-strategy envs (default: VITE_CLERK_PUBLISHABLE_KEY)").option("--clerk-sign-in-url <url>","Clerk hosted sign-in URL (default: VITE_CLERK_SIGN_IN_URL)").option("--clerk-satellite-domain <domain>","Clerk satellite domain (default: VITE_CLERK_SATELLITE_DOMAIN)").option("--port <port>","Dev server port (passed to vite)").addHelpText("after",`
284
+ `}function $I(t){let e=_I(no(bI(),"fs-frontend-preview-")),r=no(e,"vite.preview.config.mjs");return vI(r,t,"utf-8"),r}function II(t,e,r={}){let o=r.existsImpl??hI,n=r.writeTempConfig??$I,i=yI(t.dir??"frontend");if(!o(no(i,"package.json")))throw new S(`No frontend/ project at ${i} (expected ${no(i,"package.json")}). Run from a business repo root, or pass --dir <path>.`,void 0,{code:"FRONTEND_PREVIEW_NO_PROJECT"});let s=kI(t,e),c=xI(s),u=SI(c),l=n(u),d=["vite","--config",l];return t.port&&d.push("--port",t.port),{cwd:i,config:s,configPath:l,command:"npx",args:d}}function $_(t,e={}){(t.commands.find(o=>o.name()==="frontend")??t.command("frontend").description("Managed Frontend Hosting: deploy/status/rollback (+ local preview)")).command("preview").alias("dev").description("Run the frontend's `vite dev` with an injected window.__FS_CONFIG__ shim so the portal renders as it serves (coreUrl + optional Clerk).").option("--dir <path>","Frontend project directory (default: ./frontend)").option("--core-url <url>","Platform Core base URL to shim (default: VITE_FS_CORE_URL)").option("--clerk-publishable-key <key>","Clerk publishable key for clerk-strategy envs (default: VITE_CLERK_PUBLISHABLE_KEY)").option("--clerk-sign-in-url <url>","Clerk hosted sign-in URL (default: VITE_CLERK_SIGN_IN_URL)").option("--clerk-satellite-domain <domain>","Clerk satellite domain (default: VITE_CLERK_SATELLITE_DOMAIN)").option("--port <port>","Dev server port (passed to vite)").addHelpText("after",`
285
285
  Examples:
286
286
  farthershore frontend preview --core-url http://localhost:8787
287
287
  VITE_FS_CORE_URL=http://localhost:8787 farthershore frontend preview
288
288
  farthershore frontend preview --dir ./frontend --port 4321
289
- `).action(async o=>{let n=W$(o,process.env,t);if(V({action:"frontend_preview",dir:n.cwd,coreUrl:n.config.coreUrl,clerk:n.config.clerk??null,command:`${n.command} ${n.args.join(" ")}`},`Previewing ${n.cwd} with window.__FS_CONFIG__ shimmed (coreUrl ${n.config.coreUrl}).`),t.spawnVite===!1||ue()==="json")return;Ie(`Starting vite in ${n.cwd} (window.__FS_CONFIG__ injected). Ctrl-C to stop.`);let s=(t.spawnImpl??j$)(n.command,n.args,{cwd:n.cwd,stdio:"inherit"});await new Promise(c=>{s.on("close",()=>c()),s.on("error",u=>{Zd(`vite failed to start: ${u.message}`),c()})})})}function u_(e,t){Ph(e,t),Dh(e,t),zh(e,t),Mh(e,t),Zh(e,t),Vh(e,t),Bh(e,t),Hh(e,t),Wh(e,t),qh(e,t),t_(e),s_(e,t),c_(e),i_(e)}var Q$=Y$(J$(import.meta.url)),eI=JSON.parse(await q$(X$(Q$,"..","package.json"),"utf-8")),Ze=new _d;Ze.name("farthershore").description("FartherShore CLI \u2014 agent-friendly commands for product configuration").version(eI.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");Ze.hook("preAction",(e,t)=>{Fd(Ze.opts().format),Th(tI(t))});function tI(e){let t=[],r=e;for(;r&&r.name()&&r.name()!==Ze.name();)t.unshift(r.name()),r=r.parent;return t.join(".")||"unknown"}function nI(){let e=$d(),t=Ze.opts(),r=wd(t.token),o=t.apiUrl??process.env.FARTHERSHORE_API_URL??e.apiUrl;return vd({apiUrl:o,token:r})}u_(Ze,nI);Ze.exitOverride();async function rI(){try{await Ze.parseAsync(process.argv)}catch(e){if(e instanceof k)process.exitCode=Vl(e);else if(e instanceof Error){let t=e.code;t==="commander.helpDisplayed"||t==="commander.version"||e.message!=="(outputHelp)"&&(process.exitCode=Vl(new k(e.message,0)))}}}rI();
289
+ `).action(async o=>{let n=II(o,process.env,e);if(Z({action:"frontend_preview",dir:n.cwd,coreUrl:n.config.coreUrl,clerk:n.config.clerk??null,command:`${n.command} ${n.args.join(" ")}`},`Previewing ${n.cwd} with window.__FS_CONFIG__ shimmed (coreUrl ${n.config.coreUrl}).`),e.spawnVite===!1||de()==="json")return;G(`Starting vite in ${n.cwd} (window.__FS_CONFIG__ injected). Ctrl-C to stop.`);let s=(e.spawnImpl??gI)(n.command,n.args,{cwd:n.cwd,stdio:"inherit"});await new Promise(c=>{s.on("close",()=>c()),s.on("error",u=>{nm(`vite failed to start: ${u.message}`),c()})})})}var EI=[{opKey:"change_set.list",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"change-set",command:"list",summary:"List repo-backed change sets for a business: PRs, pushes, releases, checks, semantic diffs, and apply state.",args:[{field:"productId",kind:"positional",token:"<businessIdOrName>",resolveProduct:!0},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment scope: production, all, or a preview environment name."}],handler:async({client:t,args:e,emit:r})=>{let o=e.productId,n=await t.listChangeSets(o,{env:e.env});r({productId:o,count:n.data.length,changeSets:n.data},`${n.data.length} change set(s)`)}},mcp:null},{opKey:"change_set.read",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"change-set",command:"inspect",summary:"Inspect one repo-backed change set by id, PR number, branch, or commit SHA.",args:[{field:"productId",kind:"positional",token:"<businessIdOrName>",resolveProduct:!0},{field:"selector",kind:"positional",token:"<id|pr|branch|sha>"},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment scope: production, all, or a preview environment name."}],handler:async({client:t,args:e,emit:r})=>{let o=e.productId,n=String(e.selector),i=await t.listChangeSets(o,{env:e.env}),s=i.data.find(c=>c.id===n)??i.data.find(c=>c.prNumber!==null&&String(c.prNumber)===n)??i.data.find(c=>c.branch===n)??i.data.find(c=>c.commitSha.startsWith(n));if(!s)throw new S(`Change set ${n} was not found.`,404,{code:"CHANGE_SET_NOT_FOUND"});r({productId:o,changeSet:s},`Change set ${s.id}: ${s.status}`)}},mcp:null}];function I_(t,e){B(t,e,EI)}import{existsSync as ro,readFileSync as wI}from"node:fs";import{dirname as T_,join as io,parse as A_,resolve as pd}from"node:path";var C_="farther-shore/skills",OI="v1.1.0",E_=["farthershore-overview","farthershore-onboarding","farthershore-sdk-operating-model","farthershore-environments-and-releasing","farthershore-operating-and-escalation"],TI=[{packageName:"@farthershore/business",major:0,minor:1,skills:["farthershore-product-as-code","farthershore-plans-and-billing","farthershore-business-sdk-0-1"]},{packageName:"@farthershore/farthershore-js",major:0,minor:8,skills:["farthershore-frontend-hosting","farthershore-frontend-sdk-0-8"]},{packageName:"@farthershore/backend",major:0,minor:8,skills:["farthershore-backends-and-tokens","farthershore-backend-sdk-0-8"]}];function P_(t){let e=t.match(/(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)/);return e?.groups?{major:Number(e.groups.major),minor:Number(e.groups.minor),patch:Number(e.groups.patch)}:null}function AI(t){let e=pd(t),r=A_(e).root;for(;;){if(ro(io(e,".git"))||ro(io(e,"AGENTS.md")))return e;if(e===r)return pd(t);e=T_(e)}}function CI(t){let e=AI(t),r=new Set;for(let i of["business/package.json","frontend/package.json","backend/package.json","package.json"]){let s=io(e,i);ro(s)&&r.add(s)}let o=pd(t),n=A_(o).root;for(;;){let i=io(o,"package.json");if(ro(i)&&r.add(i),o===e||o===n)break;o=T_(o)}return[...r]}function PI(t,e){for(let r of["dependencies","devDependencies","peerDependencies","optionalDependencies"]){let o=t[r];if(!o||typeof o!="object"||Array.isArray(o))continue;let n=o[e];if(typeof n=="string")return n}return null}function NI(t=process.cwd()){let e=new Map;for(let r of CI(t)){let o;try{o=JSON.parse(wI(r,"utf8"))}catch{continue}for(let n of["@farthershore/business","@farthershore/farthershore-js","@farthershore/backend"]){if(e.has(n))continue;let i=PI(o,n);if(!i)continue;let s=P_(i);s&&e.set(n,{packageName:n,requestedRange:i,version:`${s.major}.${s.minor}.${s.patch}`,packageJsonPath:r})}}return[...e.values()]}function RI(t){let e=P_(t.version);return e?TI.find(o=>o.packageName===t.packageName&&o.major===e.major&&o.minor===e.minor)?.skills??null:null}function w_(t){return["npx --yes skills add",C_,"-g -y","--skill",t.join(" ")].join(" ")}function DI(t){let e=new Set(E_),r=[],o=[];for(let i of t){let s=RI(i);if(!s){o.push({...i,reason:"No compatible Farther Shore skill file is known for this SDK major/minor version."});continue}let c=[...s].sort();r.push({...i,skills:c,command:w_(c)});for(let u of c)e.add(u)}let n=[...e].sort();return{package:C_,release:OI,baseSkills:[...E_].sort(),detected:t,tracks:r,unsupported:o,skills:n,command:w_(n)}}function fd(t=process.cwd()){return DI(NI(t))}var O_=!1;function N_(t=process.cwd()){if(O_||process.env.FARTHERSHORE_SKIP_SKILLS_NOTICE==="1")return;let e=fd(t);if(e.unsupported.length===0)return;O_=!0;let r=e.unsupported.map(o=>`${o.packageName}@${o.requestedRange}`).join(", ");process.stderr.write([`Farther Shore skills: no compatible skill file is known for ${r}.`,"Run `farthershore skills recommend --format json`; the returned tracks are per SDK, so update only the Business or Frontend skill track that matches the SDK you changed.",""].join(`
290
+ `))}function R_(t){t.command("skills").description("Recommend SDK-compatible Farther Shore agent skills").command("recommend").description("Read local Farther Shore SDK package versions and recommend compatible skills").option("--dir <path>","Repository or package directory to inspect",process.cwd()).action(r=>{let o=fd(r.dir);Z({recommendation:o},"Farther Shore skills recommendation"),G(`Package: ${o.package}@${o.release}`),o.detected.length>0?G(`Detected SDKs: ${o.detected.map(n=>`${n.packageName}@${n.requestedRange}`).join(", ")}`):or("No @farthershore SDK package versions found."),o.unsupported.length>0&&or(`Unsupported SDK versions: ${o.unsupported.map(n=>`${n.packageName}@${n.requestedRange}`).join(", ")}`),o.tracks.length>0&&(G(`SDK skill tracks: ${o.tracks.map(n=>`${n.packageName}@${n.requestedRange} -> ${n.skills.join(", ")}`).join("; ")}`),G(`Track installs: ${o.tracks.map(n=>`${n.packageName}: ${n.command}`).join("; ")}`),G("Use a track install when only that SDK changed; use the full install for fresh setup.")),G(`Install: ${o.command}`)})}function D_(t,e){Gh(t,e),e_(t,e),I_(t,e),t_(t,e),r_(t,e),i_(t,e),o_(t,e),a_(t,e),s_(t,e),l_(t,e),d_(t,e),__(t),S_(t,e),R_(t),$_(t),y_(t)}var FI=jI(zI(import.meta.url)),MI=JSON.parse(await UI(LI(FI,"..","package.json"),"utf-8")),He=new Ad;He.name("farthershore").description("FartherShore CLI \u2014 agent-friendly commands for business operations").version(MI.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");He.hook("preAction",(t,e)=>{em(He.opts().format),Hh(ZI(e)),N_()});function ZI(t){let e=[],r=t;for(;r&&r.name()&&r.name()!==He.name();)e.unshift(r.name()),r=r.parent;return e.join(".")||"unknown"}function VI(){let t=jd(),e=He.opts(),r=Md(e.token),o=e.apiUrl??process.env.FARTHERSHORE_API_URL??t.apiUrl;return Pd({apiUrl:o,token:r})}D_(He,VI);He.exitOverride();async function BI(){try{await He.parseAsync(process.argv)}catch(t){if(t instanceof S)process.exitCode=rd(t);else if(t instanceof Error){let e=t.code;e==="commander.helpDisplayed"||e==="commander.version"||t.message!=="(outputHelp)"&&(process.exitCode=rd(new S(t.message,0)))}}}BI();