@heylatch/cli 0.4.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/latch.js +71 -53
- package/package.json +45 -45
package/dist/latch.js
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __latchRequire } from "node:module";const require = __latchRequire(import.meta.url);
|
|
3
|
-
var xP=Object.create;var kp=Object.defineProperty;var SP=Object.getOwnPropertyDescriptor;var IP=Object.getOwnPropertyNames;var zP=Object.getPrototypeOf,PP=Object.prototype.hasOwnProperty;var N=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Ar=(e,t)=>{for(var n in t)kp(e,n,{get:t[n],enumerable:!0})},TP=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of IP(t))!PP.call(e,r)&&r!==n&&kp(e,r,{get:()=>t[r],enumerable:!(i=SP(t,r))||i.enumerable});return e};var v$=(e,t,n)=>(n=e!=null?xP(zP(e)):{},TP(t||!e||!e.__esModule?kp(n,"default",{value:e,enumerable:!0}):n,e));var Js=N(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.regexpCode=ve.getEsmExportName=ve.getProperty=ve.safeStringify=ve.stringify=ve.strConcat=ve.addCodeArg=ve.str=ve._=ve.nil=ve._Code=ve.Name=ve.IDENTIFIER=ve._CodeOrName=void 0;var Bs=class{};ve._CodeOrName=Bs;ve.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Qn=class extends Bs{constructor(t){if(super(),!ve.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};ve.Name=Qn;var Qt=class extends Bs{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((n,i)=>`${n}${i}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((n,i)=>(i instanceof Qn&&(n[i.str]=(n[i.str]||0)+1),n),{})}};ve._Code=Qt;ve.nil=new Qt("");function j0(e,...t){let n=[e[0]],i=0;for(;i<t.length;)Jv(n,t[i]),n.push(e[++i]);return new Qt(n)}ve._=j0;var Hv=new Qt("+");function E0(e,...t){let n=[Hs(e[0])],i=0;for(;i<t.length;)n.push(Hv),Jv(n,t[i]),n.push(Hv,Hs(e[++i]));return y4(n),new Qt(n)}ve.str=E0;function Jv(e,t){t instanceof Qt?e.push(...t._items):t instanceof Qn?e.push(t):e.push(b4(t))}ve.addCodeArg=Jv;function y4(e){let t=1;for(;t<e.length-1;){if(e[t]===Hv){let n=_4(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]="+"}t++}}function _4(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof Qn||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof Qn))return`"${e}${t.slice(1)}`}function $4(e,t){return t.emptyStr()?e:e.emptyStr()?t:E0`${e}${t}`}ve.strConcat=$4;function b4(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Hs(Array.isArray(e)?e.join(","):e)}function w4(e){return new Qt(Hs(e))}ve.stringify=w4;function Hs(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ve.safeStringify=Hs;function k4(e){return typeof e=="string"&&ve.IDENTIFIER.test(e)?new Qt(`.${e}`):j0`[${e}]`}ve.getProperty=k4;function x4(e){if(typeof e=="string"&&ve.IDENTIFIER.test(e))return new Qt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}ve.getEsmExportName=x4;function S4(e){return new Qt(e.toString())}ve.regexpCode=S4});var Wv=N(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.ValueScope=Et.ValueScopeName=Et.Scope=Et.varKinds=Et.UsedValueState=void 0;var jt=Js(),Kv=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},kf;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(kf||(Et.UsedValueState=kf={}));Et.varKinds={const:new jt.Name("const"),let:new jt.Name("let"),var:new jt.Name("var")};var xf=class{constructor({prefixes:t,parent:n}={}){this._names={},this._prefixes=t,this._parent=n}toName(t){return t instanceof jt.Name?t:this.name(t)}name(t){return new jt.Name(this._newName(t))}_newName(t){let n=this._names[t]||this._nameGroup(t);return`${t}${n.index++}`}_nameGroup(t){var n,i;if(!((i=(n=this._parent)===null||n===void 0?void 0:n._prefixes)===null||i===void 0)&&i.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};Et.Scope=xf;var Sf=class extends jt.Name{constructor(t,n){super(n),this.prefix=t}setValue(t,{property:n,itemIndex:i}){this.value=t,this.scopePath=(0,jt._)`.${new jt.Name(n)}[${i}]`}};Et.ValueScopeName=Sf;var I4=(0,jt._)`\n`,Gv=class extends xf{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?I4:jt.nil}}get(){return this._scope}name(t){return new Sf(t,this._newName(t))}value(t,n){var i;if(n.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let r=this.toName(t),{prefix:o}=r,a=(i=n.key)!==null&&i!==void 0?i:n.ref,s=this._values[o];if(s){let l=s.get(a);if(l)return l}else s=this._values[o]=new Map;s.set(a,r);let c=this._scope[o]||(this._scope[o]=[]),u=c.length;return c[u]=n.ref,r.setValue(n,{property:o,itemIndex:u}),r}getValue(t,n){let i=this._values[t];if(i)return i.get(n)}scopeRefs(t,n=this._values){return this._reduceValues(n,i=>{if(i.scopePath===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return(0,jt._)`${t}${i.scopePath}`})}scopeCode(t=this._values,n,i){return this._reduceValues(t,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},n,i)}_reduceValues(t,n,i={},r){let o=jt.nil;for(let a in t){let s=t[a];if(!s)continue;let c=i[a]=i[a]||new Map;s.forEach(u=>{if(c.has(u))return;c.set(u,kf.Started);let l=n(u);if(l){let d=this.opts.es5?Et.varKinds.var:Et.varKinds.const;o=(0,jt._)`${o}${d} ${u} = ${l};${this.opts._n}`}else if(l=r?.(u))o=(0,jt._)`${o}${l}${this.opts._n}`;else throw new Kv(u);c.set(u,kf.Completed)})}return o}};Et.ValueScope=Gv});var ie=N(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.or=se.and=se.not=se.CodeGen=se.operators=se.varKinds=se.ValueScopeName=se.ValueScope=se.Scope=se.Name=se.regexpCode=se.stringify=se.getProperty=se.nil=se.strConcat=se.str=se._=void 0;var fe=Js(),fr=Wv(),yn=Js();Object.defineProperty(se,"_",{enumerable:!0,get:function(){return yn._}});Object.defineProperty(se,"str",{enumerable:!0,get:function(){return yn.str}});Object.defineProperty(se,"strConcat",{enumerable:!0,get:function(){return yn.strConcat}});Object.defineProperty(se,"nil",{enumerable:!0,get:function(){return yn.nil}});Object.defineProperty(se,"getProperty",{enumerable:!0,get:function(){return yn.getProperty}});Object.defineProperty(se,"stringify",{enumerable:!0,get:function(){return yn.stringify}});Object.defineProperty(se,"regexpCode",{enumerable:!0,get:function(){return yn.regexpCode}});Object.defineProperty(se,"Name",{enumerable:!0,get:function(){return yn.Name}});var Tf=Wv();Object.defineProperty(se,"Scope",{enumerable:!0,get:function(){return Tf.Scope}});Object.defineProperty(se,"ValueScope",{enumerable:!0,get:function(){return Tf.ValueScope}});Object.defineProperty(se,"ValueScopeName",{enumerable:!0,get:function(){return Tf.ValueScopeName}});Object.defineProperty(se,"varKinds",{enumerable:!0,get:function(){return Tf.varKinds}});se.operators={GT:new fe._Code(">"),GTE:new fe._Code(">="),LT:new fe._Code("<"),LTE:new fe._Code("<="),EQ:new fe._Code("==="),NEQ:new fe._Code("!=="),NOT:new fe._Code("!"),OR:new fe._Code("||"),AND:new fe._Code("&&"),ADD:new fe._Code("+")};var Fr=class{optimizeNodes(){return this}optimizeNames(t,n){return this}},Xv=class extends Fr{constructor(t,n,i){super(),this.varKind=t,this.name=n,this.rhs=i}render({es5:t,_n:n}){let i=t?fr.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${i} ${this.name}${r};`+n}optimizeNames(t,n){if(t[this.name.str])return this.rhs&&(this.rhs=Co(this.rhs,t,n)),this}get names(){return this.rhs instanceof fe._CodeOrName?this.rhs.names:{}}},If=class extends Fr{constructor(t,n,i){super(),this.lhs=t,this.rhs=n,this.sideEffects=i}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,n){if(!(this.lhs instanceof fe.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=Co(this.rhs,t,n),this}get names(){let t=this.lhs instanceof fe.Name?{}:{...this.lhs.names};return Pf(t,this.rhs)}},Yv=class extends If{constructor(t,n,i,r){super(t,i,r),this.op=n}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},Qv=class extends Fr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},ey=class extends Fr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},ty=class extends Fr{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},ry=class extends Fr{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,n){return this.code=Co(this.code,t,n),this}get names(){return this.code instanceof fe._CodeOrName?this.code.names:{}}},Ks=class extends Fr{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((n,i)=>n+i.render(t),"")}optimizeNodes(){let{nodes:t}=this,n=t.length;for(;n--;){let i=t[n].optimizeNodes();Array.isArray(i)?t.splice(n,1,...i):i?t[n]=i:t.splice(n,1)}return t.length>0?this:void 0}optimizeNames(t,n){let{nodes:i}=this,r=i.length;for(;r--;){let o=i[r];o.optimizeNames(t,n)||(z4(t,o.names),i.splice(r,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((t,n)=>ri(t,n.names),{})}},qr=class extends Ks{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},ny=class extends Ks{},Ro=class extends qr{};Ro.kind="else";var ei=class e extends qr{constructor(t,n){super(n),this.condition=t}render(t){let n=`if(${this.condition})`+super.render(t);return this.else&&(n+="else "+this.else.render(t)),n}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let i=n.optimizeNodes();n=this.else=Array.isArray(i)?new Ro(i):i}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(N0(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,n){var i;if(this.else=(i=this.else)===null||i===void 0?void 0:i.optimizeNames(t,n),!!(super.optimizeNames(t,n)||this.else))return this.condition=Co(this.condition,t,n),this}get names(){let t=super.names;return Pf(t,this.condition),this.else&&ri(t,this.else.names),t}};ei.kind="if";var ti=class extends qr{};ti.kind="for";var iy=class extends ti{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,n){if(super.optimizeNames(t,n))return this.iteration=Co(this.iteration,t,n),this}get names(){return ri(super.names,this.iteration.names)}},oy=class extends ti{constructor(t,n,i,r){super(),this.varKind=t,this.name=n,this.from=i,this.to=r}render(t){let n=t.es5?fr.varKinds.var:this.varKind,{name:i,from:r,to:o}=this;return`for(${n} ${i}=${r}; ${i}<${o}; ${i}++)`+super.render(t)}get names(){let t=Pf(super.names,this.from);return Pf(t,this.to)}},zf=class extends ti{constructor(t,n,i,r){super(),this.loop=t,this.varKind=n,this.name=i,this.iterable=r}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,n){if(super.optimizeNames(t,n))return this.iterable=Co(this.iterable,t,n),this}get names(){return ri(super.names,this.iterable.names)}},Gs=class extends qr{constructor(t,n,i){super(),this.name=t,this.args=n,this.async=i}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};Gs.kind="func";var Ws=class extends Ks{render(t){return"return "+super.render(t)}};Ws.kind="return";var ay=class extends qr{render(t){let n="try"+super.render(t);return this.catch&&(n+=this.catch.render(t)),this.finally&&(n+=this.finally.render(t)),n}optimizeNodes(){var t,n;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(n=this.finally)===null||n===void 0||n.optimizeNodes(),this}optimizeNames(t,n){var i,r;return super.optimizeNames(t,n),(i=this.catch)===null||i===void 0||i.optimizeNames(t,n),(r=this.finally)===null||r===void 0||r.optimizeNames(t,n),this}get names(){let t=super.names;return this.catch&&ri(t,this.catch.names),this.finally&&ri(t,this.finally.names),t}},Xs=class extends qr{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};Xs.kind="catch";var Ys=class extends qr{render(t){return"finally"+super.render(t)}};Ys.kind="finally";var sy=class{constructor(t,n={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...n,_n:n.lines?`
|
|
4
|
-
`:""},this._extScope=t,this._scope=new fr.Scope({parent:t}),this._nodes=[new ny]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,n){let i=this._extScope.value(t,n);return(this._values[i.prefix]||(this._values[i.prefix]=new Set)).add(i),i}getScopeValue(t,n){return this._extScope.getValue(t,n)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,n,i,r){let o=this._scope.toName(n);return i!==void 0&&r&&(this._constants[o.str]=i),this._leafNode(new Xv(t,o,i)),o}const(t,n,i){return this._def(fr.varKinds.const,t,n,i)}let(t,n,i){return this._def(fr.varKinds.let,t,n,i)}var(t,n,i){return this._def(fr.varKinds.var,t,n,i)}assign(t,n,i){return this._leafNode(new If(t,n,i))}add(t,n){return this._leafNode(new Yv(t,se.operators.ADD,n))}code(t){return typeof t=="function"?t():t!==fe.nil&&this._leafNode(new ry(t)),this}object(...t){let n=["{"];for(let[i,r]of t)n.length>1&&n.push(","),n.push(i),(i!==r||this.opts.es5)&&(n.push(":"),(0,fe.addCodeArg)(n,r));return n.push("}"),new fe._Code(n)}if(t,n,i){if(this._blockNode(new ei(t)),n&&i)this.code(n).else().code(i).endIf();else if(n)this.code(n).endIf();else if(i)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new ei(t))}else(){return this._elseNode(new Ro)}endIf(){return this._endBlockNode(ei,Ro)}_for(t,n){return this._blockNode(t),n&&this.code(n).endFor(),this}for(t,n){return this._for(new iy(t),n)}forRange(t,n,i,r,o=this.opts.es5?fr.varKinds.var:fr.varKinds.let){let a=this._scope.toName(t);return this._for(new oy(o,a,n,i),()=>r(a))}forOf(t,n,i,r=fr.varKinds.const){let o=this._scope.toName(t);if(this.opts.es5){let a=n instanceof fe.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,fe._)`${a}.length`,s=>{this.var(o,(0,fe._)`${a}[${s}]`),i(o)})}return this._for(new zf("of",r,o,n),()=>i(o))}forIn(t,n,i,r=this.opts.es5?fr.varKinds.var:fr.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,fe._)`Object.keys(${n})`,i);let o=this._scope.toName(t);return this._for(new zf("in",r,o,n),()=>i(o))}endFor(){return this._endBlockNode(ti)}label(t){return this._leafNode(new Qv(t))}break(t){return this._leafNode(new ey(t))}return(t){let n=new Ws;if(this._blockNode(n),this.code(t),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Ws)}try(t,n,i){if(!n&&!i)throw new Error('CodeGen: "try" without "catch" and "finally"');let r=new ay;if(this._blockNode(r),this.code(t),n){let o=this.name("e");this._currNode=r.catch=new Xs(o),n(o)}return i&&(this._currNode=r.finally=new Ys,this.code(i)),this._endBlockNode(Xs,Ys)}throw(t){return this._leafNode(new ty(t))}block(t,n){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(n),this}endBlock(t){let n=this._blockStarts.pop();if(n===void 0)throw new Error("CodeGen: not in self-balancing block");let i=this._nodes.length-n;if(i<0||t!==void 0&&i!==t)throw new Error(`CodeGen: wrong number of nodes: ${i} vs ${t} expected`);return this._nodes.length=n,this}func(t,n=fe.nil,i,r){return this._blockNode(new Gs(t,n,i)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(Gs)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,n){let i=this._currNode;if(i instanceof t||n&&i instanceof n)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${n?`${t.kind}/${n.kind}`:t.kind}"`)}_elseNode(t){let n=this._currNode;if(!(n instanceof ei))throw new Error('CodeGen: "else" without "if"');return this._currNode=n.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let n=this._nodes;n[n.length-1]=t}};se.CodeGen=sy;function ri(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function Pf(e,t){return t instanceof fe._CodeOrName?ri(e,t.names):e}function Co(e,t,n){if(e instanceof fe.Name)return i(e);if(!r(e))return e;return new fe._Code(e._items.reduce((o,a)=>(a instanceof fe.Name&&(a=i(a)),a instanceof fe._Code?o.push(...a._items):o.push(a),o),[]));function i(o){let a=n[o.str];return a===void 0||t[o.str]!==1?o:(delete t[o.str],a)}function r(o){return o instanceof fe._Code&&o._items.some(a=>a instanceof fe.Name&&t[a.str]===1&&n[a.str]!==void 0)}}function z4(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function N0(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,fe._)`!${cy(e)}`}se.not=N0;var P4=A0(se.operators.AND);function T4(...e){return e.reduce(P4)}se.and=T4;var O4=A0(se.operators.OR);function j4(...e){return e.reduce(O4)}se.or=j4;function A0(e){return(t,n)=>t===fe.nil?n:n===fe.nil?t:(0,fe._)`${cy(t)} ${e} ${cy(n)}`}function cy(e){return e instanceof fe.Name?e:(0,fe._)`(${e})`}});var pe=N(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.checkStrictMode=ue.getErrorPath=ue.Type=ue.useFunc=ue.setEvaluated=ue.evaluatedPropsToName=ue.mergeEvaluated=ue.eachItem=ue.unescapeJsonPointer=ue.escapeJsonPointer=ue.escapeFragment=ue.unescapeFragment=ue.schemaRefOrVal=ue.schemaHasRulesButRef=ue.schemaHasRules=ue.checkUnknownRules=ue.alwaysValidSchema=ue.toHash=void 0;var Oe=ie(),E4=Js();function N4(e){let t={};for(let n of e)t[n]=!0;return t}ue.toHash=N4;function A4(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(C0(e,t),!U0(t,e.self.RULES.all))}ue.alwaysValidSchema=A4;function C0(e,t=e.schema){let{opts:n,self:i}=e;if(!n.strictSchema||typeof t=="boolean")return;let r=i.RULES.keywords;for(let o in t)r[o]||L0(e,`unknown keyword: "${o}"`)}ue.checkUnknownRules=C0;function U0(e,t){if(typeof e=="boolean")return!e;for(let n in e)if(t[n])return!0;return!1}ue.schemaHasRules=U0;function D4(e,t){if(typeof e=="boolean")return!e;for(let n in e)if(n!=="$ref"&&t.all[n])return!0;return!1}ue.schemaHasRulesButRef=D4;function R4({topSchemaRef:e,schemaPath:t},n,i,r){if(!r){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return(0,Oe._)`${n}`}return(0,Oe._)`${e}${t}${(0,Oe.getProperty)(i)}`}ue.schemaRefOrVal=R4;function C4(e){return Z0(decodeURIComponent(e))}ue.unescapeFragment=C4;function U4(e){return encodeURIComponent(ly(e))}ue.escapeFragment=U4;function ly(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ue.escapeJsonPointer=ly;function Z0(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ue.unescapeJsonPointer=Z0;function Z4(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}ue.eachItem=Z4;function D0({mergeNames:e,mergeToName:t,mergeValues:n,resultToName:i}){return(r,o,a,s)=>{let c=a===void 0?o:a instanceof Oe.Name?(o instanceof Oe.Name?e(r,o,a):t(r,o,a),a):o instanceof Oe.Name?(t(r,a,o),o):n(o,a);return s===Oe.Name&&!(c instanceof Oe.Name)?i(r,c):c}}ue.mergeEvaluated={props:D0({mergeNames:(e,t,n)=>e.if((0,Oe._)`${n} !== true && ${t} !== undefined`,()=>{e.if((0,Oe._)`${t} === true`,()=>e.assign(n,!0),()=>e.assign(n,(0,Oe._)`${n} || {}`).code((0,Oe._)`Object.assign(${n}, ${t})`))}),mergeToName:(e,t,n)=>e.if((0,Oe._)`${n} !== true`,()=>{t===!0?e.assign(n,!0):(e.assign(n,(0,Oe._)`${n} || {}`),dy(e,n,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:M0}),items:D0({mergeNames:(e,t,n)=>e.if((0,Oe._)`${n} !== true && ${t} !== undefined`,()=>e.assign(n,(0,Oe._)`${t} === true ? true : ${n} > ${t} ? ${n} : ${t}`)),mergeToName:(e,t,n)=>e.if((0,Oe._)`${n} !== true`,()=>e.assign(n,t===!0?!0:(0,Oe._)`${n} > ${t} ? ${n} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function M0(e,t){if(t===!0)return e.var("props",!0);let n=e.var("props",(0,Oe._)`{}`);return t!==void 0&&dy(e,n,t),n}ue.evaluatedPropsToName=M0;function dy(e,t,n){Object.keys(n).forEach(i=>e.assign((0,Oe._)`${t}${(0,Oe.getProperty)(i)}`,!0))}ue.setEvaluated=dy;var R0={};function M4(e,t){return e.scopeValue("func",{ref:t,code:R0[t.code]||(R0[t.code]=new E4._Code(t.code))})}ue.useFunc=M4;var uy;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(uy||(ue.Type=uy={}));function L4(e,t,n){if(e instanceof Oe.Name){let i=t===uy.Num;return n?i?(0,Oe._)`"[" + ${e} + "]"`:(0,Oe._)`"['" + ${e} + "']"`:i?(0,Oe._)`"/" + ${e}`:(0,Oe._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,Oe.getProperty)(e).toString():"/"+ly(e)}ue.getErrorPath=L4;function L0(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw new Error(t);e.self.logger.warn(t)}}ue.checkStrictMode=L0});var Br=N(fy=>{"use strict";Object.defineProperty(fy,"__esModule",{value:!0});var ut=ie(),V4={data:new ut.Name("data"),valCxt:new ut.Name("valCxt"),instancePath:new ut.Name("instancePath"),parentData:new ut.Name("parentData"),parentDataProperty:new ut.Name("parentDataProperty"),rootData:new ut.Name("rootData"),dynamicAnchors:new ut.Name("dynamicAnchors"),vErrors:new ut.Name("vErrors"),errors:new ut.Name("errors"),this:new ut.Name("this"),self:new ut.Name("self"),scope:new ut.Name("scope"),json:new ut.Name("json"),jsonPos:new ut.Name("jsonPos"),jsonLen:new ut.Name("jsonLen"),jsonPart:new ut.Name("jsonPart")};fy.default=V4});var Qs=N(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.extendErrors=lt.resetErrorsCount=lt.reportExtraError=lt.reportError=lt.keyword$DataError=lt.keywordError=void 0;var me=ie(),Of=pe(),wt=Br();lt.keywordError={message:({keyword:e})=>(0,me.str)`must pass "${e}" keyword validation`};lt.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,me.str)`"${e}" keyword must be ${t} ($data)`:(0,me.str)`"${e}" keyword is invalid ($data)`};function F4(e,t=lt.keywordError,n,i){let{it:r}=e,{gen:o,compositeRule:a,allErrors:s}=r,c=q0(e,t,n);i??(a||s)?V0(o,c):F0(r,(0,me._)`[${c}]`)}lt.reportError=F4;function q4(e,t=lt.keywordError,n){let{it:i}=e,{gen:r,compositeRule:o,allErrors:a}=i,s=q0(e,t,n);V0(r,s),o||a||F0(i,wt.default.vErrors)}lt.reportExtraError=q4;function B4(e,t){e.assign(wt.default.errors,t),e.if((0,me._)`${wt.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,me._)`${wt.default.vErrors}.length`,t),()=>e.assign(wt.default.vErrors,null)))}lt.resetErrorsCount=B4;function H4({gen:e,keyword:t,schemaValue:n,data:i,errsCount:r,it:o}){if(r===void 0)throw new Error("ajv implementation error");let a=e.name("err");e.forRange("i",r,wt.default.errors,s=>{e.const(a,(0,me._)`${wt.default.vErrors}[${s}]`),e.if((0,me._)`${a}.instancePath === undefined`,()=>e.assign((0,me._)`${a}.instancePath`,(0,me.strConcat)(wt.default.instancePath,o.errorPath))),e.assign((0,me._)`${a}.schemaPath`,(0,me.str)`${o.errSchemaPath}/${t}`),o.opts.verbose&&(e.assign((0,me._)`${a}.schema`,n),e.assign((0,me._)`${a}.data`,i))})}lt.extendErrors=H4;function V0(e,t){let n=e.const("err",t);e.if((0,me._)`${wt.default.vErrors} === null`,()=>e.assign(wt.default.vErrors,(0,me._)`[${n}]`),(0,me._)`${wt.default.vErrors}.push(${n})`),e.code((0,me._)`${wt.default.errors}++`)}function F0(e,t){let{gen:n,validateName:i,schemaEnv:r}=e;r.$async?n.throw((0,me._)`new ${e.ValidationError}(${t})`):(n.assign((0,me._)`${i}.errors`,t),n.return(!1))}var ni={keyword:new me.Name("keyword"),schemaPath:new me.Name("schemaPath"),params:new me.Name("params"),propertyName:new me.Name("propertyName"),message:new me.Name("message"),schema:new me.Name("schema"),parentSchema:new me.Name("parentSchema")};function q0(e,t,n){let{createErrors:i}=e.it;return i===!1?(0,me._)`{}`:J4(e,t,n)}function J4(e,t,n={}){let{gen:i,it:r}=e,o=[K4(r,n),G4(e,n)];return W4(e,t,o),i.object(...o)}function K4({errorPath:e},{instancePath:t}){let n=t?(0,me.str)`${e}${(0,Of.getErrorPath)(t,Of.Type.Str)}`:e;return[wt.default.instancePath,(0,me.strConcat)(wt.default.instancePath,n)]}function G4({keyword:e,it:{errSchemaPath:t}},{schemaPath:n,parentSchema:i}){let r=i?t:(0,me.str)`${t}/${e}`;return n&&(r=(0,me.str)`${r}${(0,Of.getErrorPath)(n,Of.Type.Str)}`),[ni.schemaPath,r]}function W4(e,{params:t,message:n},i){let{keyword:r,data:o,schemaValue:a,it:s}=e,{opts:c,propertyName:u,topSchemaRef:l,schemaPath:d}=s;i.push([ni.keyword,r],[ni.params,typeof t=="function"?t(e):t||(0,me._)`{}`]),c.messages&&i.push([ni.message,typeof n=="function"?n(e):n]),c.verbose&&i.push([ni.schema,a],[ni.parentSchema,(0,me._)`${l}${d}`],[wt.default.data,o]),u&&i.push([ni.propertyName,u])}});var H0=N(Uo=>{"use strict";Object.defineProperty(Uo,"__esModule",{value:!0});Uo.boolOrEmptySchema=Uo.topBoolOrEmptySchema=void 0;var X4=Qs(),Y4=ie(),Q4=Br(),eA={message:"boolean schema is false"};function tA(e){let{gen:t,schema:n,validateName:i}=e;n===!1?B0(e,!1):typeof n=="object"&&n.$async===!0?t.return(Q4.default.data):(t.assign((0,Y4._)`${i}.errors`,null),t.return(!0))}Uo.topBoolOrEmptySchema=tA;function rA(e,t){let{gen:n,schema:i}=e;i===!1?(n.var(t,!1),B0(e)):n.var(t,!0)}Uo.boolOrEmptySchema=rA;function B0(e,t){let{gen:n,data:i}=e,r={gen:n,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,X4.reportError)(r,eA,void 0,t)}});var py=N(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});Zo.getRules=Zo.isJSONType=void 0;var nA=["string","number","integer","boolean","null","object","array"],iA=new Set(nA);function oA(e){return typeof e=="string"&&iA.has(e)}Zo.isJSONType=oA;function aA(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Zo.getRules=aA});var my=N(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.shouldUseRule=_n.shouldUseGroup=_n.schemaHasRulesForType=void 0;function sA({schema:e,self:t},n){let i=t.RULES.types[n];return i&&i!==!0&&J0(e,i)}_n.schemaHasRulesForType=sA;function J0(e,t){return t.rules.some(n=>K0(e,n))}_n.shouldUseGroup=J0;function K0(e,t){var n;return e[t.keyword]!==void 0||((n=t.definition.implements)===null||n===void 0?void 0:n.some(i=>e[i]!==void 0))}_n.shouldUseRule=K0});var ec=N(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.reportTypeError=dt.checkDataTypes=dt.checkDataType=dt.coerceAndCheckDataType=dt.getJSONTypes=dt.getSchemaTypes=dt.DataType=void 0;var cA=py(),uA=my(),lA=Qs(),ne=ie(),G0=pe(),Mo;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Mo||(dt.DataType=Mo={}));function dA(e){let t=W0(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}dt.getSchemaTypes=dA;function W0(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(cA.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}dt.getJSONTypes=W0;function fA(e,t){let{gen:n,data:i,opts:r}=e,o=pA(t,r.coerceTypes),a=t.length>0&&!(o.length===0&&t.length===1&&(0,uA.schemaHasRulesForType)(e,t[0]));if(a){let s=gy(t,i,r.strictNumbers,Mo.Wrong);n.if(s,()=>{o.length?mA(e,t,o):vy(e)})}return a}dt.coerceAndCheckDataType=fA;var X0=new Set(["string","number","integer","boolean","null"]);function pA(e,t){return t?e.filter(n=>X0.has(n)||t==="array"&&n==="array"):[]}function mA(e,t,n){let{gen:i,data:r,opts:o}=e,a=i.let("dataType",(0,ne._)`typeof ${r}`),s=i.let("coerced",(0,ne._)`undefined`);o.coerceTypes==="array"&&i.if((0,ne._)`${a} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,()=>i.assign(r,(0,ne._)`${r}[0]`).assign(a,(0,ne._)`typeof ${r}`).if(gy(t,r,o.strictNumbers),()=>i.assign(s,r))),i.if((0,ne._)`${s} !== undefined`);for(let u of n)(X0.has(u)||u==="array"&&o.coerceTypes==="array")&&c(u);i.else(),vy(e),i.endIf(),i.if((0,ne._)`${s} !== undefined`,()=>{i.assign(r,s),hA(e,s)});function c(u){switch(u){case"string":i.elseIf((0,ne._)`${a} == "number" || ${a} == "boolean"`).assign(s,(0,ne._)`"" + ${r}`).elseIf((0,ne._)`${r} === null`).assign(s,(0,ne._)`""`);return;case"number":i.elseIf((0,ne._)`${a} == "boolean" || ${r} === null
|
|
3
|
+
var TP=Object.create;var zp=Object.defineProperty;var EP=Object.getOwnPropertyDescriptor;var OP=Object.getOwnPropertyNames;var jP=Object.getPrototypeOf,NP=Object.prototype.hasOwnProperty;var A=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Ar=(e,t)=>{for(var n in t)zp(e,n,{get:t[n],enumerable:!0})},AP=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of OP(t))!NP.call(e,r)&&r!==n&&zp(e,r,{get:()=>t[r],enumerable:!(i=EP(t,r))||i.enumerable});return e};var b$=(e,t,n)=>(n=e!=null?TP(jP(e)):{},AP(t||!e||!e.__esModule?zp(n,"default",{value:e,enumerable:!0}):n,e));var Xs=A(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.regexpCode=ve.getEsmExportName=ve.getProperty=ve.safeStringify=ve.stringify=ve.strConcat=ve.addCodeArg=ve.str=ve._=ve.nil=ve._Code=ve.Name=ve.IDENTIFIER=ve._CodeOrName=void 0;var Gs=class{};ve._CodeOrName=Gs;ve.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var ei=class extends Gs{constructor(t){if(super(),!ve.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};ve.Name=ei;var er=class extends Gs{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((n,i)=>`${n}${i}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((n,i)=>(i instanceof ei&&(n[i.str]=(n[i.str]||0)+1),n),{})}};ve._Code=er;ve.nil=new er("");function D0(e,...t){let n=[e[0]],i=0;for(;i<t.length;)Xv(n,t[i]),n.push(e[++i]);return new er(n)}ve._=D0;var Wv=new er("+");function R0(e,...t){let n=[Ws(e[0])],i=0;for(;i<t.length;)n.push(Wv),Xv(n,t[i]),n.push(Wv,Ws(e[++i]));return zA(n),new er(n)}ve.str=R0;function Xv(e,t){t instanceof er?e.push(...t._items):t instanceof ei?e.push(t):e.push(EA(t))}ve.addCodeArg=Xv;function zA(e){let t=1;for(;t<e.length-1;){if(e[t]===Wv){let n=PA(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]="+"}t++}}function PA(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof ei||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof ei))return`"${e}${t.slice(1)}`}function TA(e,t){return t.emptyStr()?e:e.emptyStr()?t:R0`${e}${t}`}ve.strConcat=TA;function EA(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Ws(Array.isArray(e)?e.join(","):e)}function OA(e){return new er(Ws(e))}ve.stringify=OA;function Ws(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ve.safeStringify=Ws;function jA(e){return typeof e=="string"&&ve.IDENTIFIER.test(e)?new er(`.${e}`):D0`[${e}]`}ve.getProperty=jA;function NA(e){if(typeof e=="string"&&ve.IDENTIFIER.test(e))return new er(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}ve.getEsmExportName=NA;function AA(e){return new er(e.toString())}ve.regexpCode=AA});var ey=A(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.ValueScope=Nt.ValueScopeName=Nt.Scope=Nt.varKinds=Nt.UsedValueState=void 0;var jt=Xs(),Yv=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},Pf;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Pf||(Nt.UsedValueState=Pf={}));Nt.varKinds={const:new jt.Name("const"),let:new jt.Name("let"),var:new jt.Name("var")};var Tf=class{constructor({prefixes:t,parent:n}={}){this._names={},this._prefixes=t,this._parent=n}toName(t){return t instanceof jt.Name?t:this.name(t)}name(t){return new jt.Name(this._newName(t))}_newName(t){let n=this._names[t]||this._nameGroup(t);return`${t}${n.index++}`}_nameGroup(t){var n,i;if(!((i=(n=this._parent)===null||n===void 0?void 0:n._prefixes)===null||i===void 0)&&i.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};Nt.Scope=Tf;var Ef=class extends jt.Name{constructor(t,n){super(n),this.prefix=t}setValue(t,{property:n,itemIndex:i}){this.value=t,this.scopePath=(0,jt._)`.${new jt.Name(n)}[${i}]`}};Nt.ValueScopeName=Ef;var DA=(0,jt._)`\n`,Qv=class extends Tf{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?DA:jt.nil}}get(){return this._scope}name(t){return new Ef(t,this._newName(t))}value(t,n){var i;if(n.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let r=this.toName(t),{prefix:o}=r,a=(i=n.key)!==null&&i!==void 0?i:n.ref,s=this._values[o];if(s){let l=s.get(a);if(l)return l}else s=this._values[o]=new Map;s.set(a,r);let c=this._scope[o]||(this._scope[o]=[]),u=c.length;return c[u]=n.ref,r.setValue(n,{property:o,itemIndex:u}),r}getValue(t,n){let i=this._values[t];if(i)return i.get(n)}scopeRefs(t,n=this._values){return this._reduceValues(n,i=>{if(i.scopePath===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return(0,jt._)`${t}${i.scopePath}`})}scopeCode(t=this._values,n,i){return this._reduceValues(t,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},n,i)}_reduceValues(t,n,i={},r){let o=jt.nil;for(let a in t){let s=t[a];if(!s)continue;let c=i[a]=i[a]||new Map;s.forEach(u=>{if(c.has(u))return;c.set(u,Pf.Started);let l=n(u);if(l){let d=this.opts.es5?Nt.varKinds.var:Nt.varKinds.const;o=(0,jt._)`${o}${d} ${u} = ${l};${this.opts._n}`}else if(l=r?.(u))o=(0,jt._)`${o}${l}${this.opts._n}`;else throw new Yv(u);c.set(u,Pf.Completed)})}return o}};Nt.ValueScope=Qv});var ie=A(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.or=se.and=se.not=se.CodeGen=se.operators=se.varKinds=se.ValueScopeName=se.ValueScope=se.Scope=se.Name=se.regexpCode=se.stringify=se.getProperty=se.nil=se.strConcat=se.str=se._=void 0;var fe=Xs(),fr=ey(),_n=Xs();Object.defineProperty(se,"_",{enumerable:!0,get:function(){return _n._}});Object.defineProperty(se,"str",{enumerable:!0,get:function(){return _n.str}});Object.defineProperty(se,"strConcat",{enumerable:!0,get:function(){return _n.strConcat}});Object.defineProperty(se,"nil",{enumerable:!0,get:function(){return _n.nil}});Object.defineProperty(se,"getProperty",{enumerable:!0,get:function(){return _n.getProperty}});Object.defineProperty(se,"stringify",{enumerable:!0,get:function(){return _n.stringify}});Object.defineProperty(se,"regexpCode",{enumerable:!0,get:function(){return _n.regexpCode}});Object.defineProperty(se,"Name",{enumerable:!0,get:function(){return _n.Name}});var Af=ey();Object.defineProperty(se,"Scope",{enumerable:!0,get:function(){return Af.Scope}});Object.defineProperty(se,"ValueScope",{enumerable:!0,get:function(){return Af.ValueScope}});Object.defineProperty(se,"ValueScopeName",{enumerable:!0,get:function(){return Af.ValueScopeName}});Object.defineProperty(se,"varKinds",{enumerable:!0,get:function(){return Af.varKinds}});se.operators={GT:new fe._Code(">"),GTE:new fe._Code(">="),LT:new fe._Code("<"),LTE:new fe._Code("<="),EQ:new fe._Code("==="),NEQ:new fe._Code("!=="),NOT:new fe._Code("!"),OR:new fe._Code("||"),AND:new fe._Code("&&"),ADD:new fe._Code("+")};var qr=class{optimizeNodes(){return this}optimizeNames(t,n){return this}},ty=class extends qr{constructor(t,n,i){super(),this.varKind=t,this.name=n,this.rhs=i}render({es5:t,_n:n}){let i=t?fr.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${i} ${this.name}${r};`+n}optimizeNames(t,n){if(t[this.name.str])return this.rhs&&(this.rhs=Zo(this.rhs,t,n)),this}get names(){return this.rhs instanceof fe._CodeOrName?this.rhs.names:{}}},Of=class extends qr{constructor(t,n,i){super(),this.lhs=t,this.rhs=n,this.sideEffects=i}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,n){if(!(this.lhs instanceof fe.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=Zo(this.rhs,t,n),this}get names(){let t=this.lhs instanceof fe.Name?{}:{...this.lhs.names};return Nf(t,this.rhs)}},ry=class extends Of{constructor(t,n,i,r){super(t,i,r),this.op=n}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},ny=class extends qr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},iy=class extends qr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},oy=class extends qr{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},ay=class extends qr{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,n){return this.code=Zo(this.code,t,n),this}get names(){return this.code instanceof fe._CodeOrName?this.code.names:{}}},Ys=class extends qr{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((n,i)=>n+i.render(t),"")}optimizeNodes(){let{nodes:t}=this,n=t.length;for(;n--;){let i=t[n].optimizeNodes();Array.isArray(i)?t.splice(n,1,...i):i?t[n]=i:t.splice(n,1)}return t.length>0?this:void 0}optimizeNames(t,n){let{nodes:i}=this,r=i.length;for(;r--;){let o=i[r];o.optimizeNames(t,n)||(RA(t,o.names),i.splice(r,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((t,n)=>ni(t,n.names),{})}},Br=class extends Ys{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},sy=class extends Ys{},Uo=class extends Br{};Uo.kind="else";var ti=class e extends Br{constructor(t,n){super(n),this.condition=t}render(t){let n=`if(${this.condition})`+super.render(t);return this.else&&(n+="else "+this.else.render(t)),n}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let i=n.optimizeNodes();n=this.else=Array.isArray(i)?new Uo(i):i}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(C0(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,n){var i;if(this.else=(i=this.else)===null||i===void 0?void 0:i.optimizeNames(t,n),!!(super.optimizeNames(t,n)||this.else))return this.condition=Zo(this.condition,t,n),this}get names(){let t=super.names;return Nf(t,this.condition),this.else&&ni(t,this.else.names),t}};ti.kind="if";var ri=class extends Br{};ri.kind="for";var cy=class extends ri{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,n){if(super.optimizeNames(t,n))return this.iteration=Zo(this.iteration,t,n),this}get names(){return ni(super.names,this.iteration.names)}},uy=class extends ri{constructor(t,n,i,r){super(),this.varKind=t,this.name=n,this.from=i,this.to=r}render(t){let n=t.es5?fr.varKinds.var:this.varKind,{name:i,from:r,to:o}=this;return`for(${n} ${i}=${r}; ${i}<${o}; ${i}++)`+super.render(t)}get names(){let t=Nf(super.names,this.from);return Nf(t,this.to)}},jf=class extends ri{constructor(t,n,i,r){super(),this.loop=t,this.varKind=n,this.name=i,this.iterable=r}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,n){if(super.optimizeNames(t,n))return this.iterable=Zo(this.iterable,t,n),this}get names(){return ni(super.names,this.iterable.names)}},Qs=class extends Br{constructor(t,n,i){super(),this.name=t,this.args=n,this.async=i}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};Qs.kind="func";var ec=class extends Ys{render(t){return"return "+super.render(t)}};ec.kind="return";var ly=class extends Br{render(t){let n="try"+super.render(t);return this.catch&&(n+=this.catch.render(t)),this.finally&&(n+=this.finally.render(t)),n}optimizeNodes(){var t,n;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(n=this.finally)===null||n===void 0||n.optimizeNodes(),this}optimizeNames(t,n){var i,r;return super.optimizeNames(t,n),(i=this.catch)===null||i===void 0||i.optimizeNames(t,n),(r=this.finally)===null||r===void 0||r.optimizeNames(t,n),this}get names(){let t=super.names;return this.catch&&ni(t,this.catch.names),this.finally&&ni(t,this.finally.names),t}},tc=class extends Br{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};tc.kind="catch";var rc=class extends Br{render(t){return"finally"+super.render(t)}};rc.kind="finally";var dy=class{constructor(t,n={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...n,_n:n.lines?`
|
|
4
|
+
`:""},this._extScope=t,this._scope=new fr.Scope({parent:t}),this._nodes=[new sy]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,n){let i=this._extScope.value(t,n);return(this._values[i.prefix]||(this._values[i.prefix]=new Set)).add(i),i}getScopeValue(t,n){return this._extScope.getValue(t,n)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,n,i,r){let o=this._scope.toName(n);return i!==void 0&&r&&(this._constants[o.str]=i),this._leafNode(new ty(t,o,i)),o}const(t,n,i){return this._def(fr.varKinds.const,t,n,i)}let(t,n,i){return this._def(fr.varKinds.let,t,n,i)}var(t,n,i){return this._def(fr.varKinds.var,t,n,i)}assign(t,n,i){return this._leafNode(new Of(t,n,i))}add(t,n){return this._leafNode(new ry(t,se.operators.ADD,n))}code(t){return typeof t=="function"?t():t!==fe.nil&&this._leafNode(new ay(t)),this}object(...t){let n=["{"];for(let[i,r]of t)n.length>1&&n.push(","),n.push(i),(i!==r||this.opts.es5)&&(n.push(":"),(0,fe.addCodeArg)(n,r));return n.push("}"),new fe._Code(n)}if(t,n,i){if(this._blockNode(new ti(t)),n&&i)this.code(n).else().code(i).endIf();else if(n)this.code(n).endIf();else if(i)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new ti(t))}else(){return this._elseNode(new Uo)}endIf(){return this._endBlockNode(ti,Uo)}_for(t,n){return this._blockNode(t),n&&this.code(n).endFor(),this}for(t,n){return this._for(new cy(t),n)}forRange(t,n,i,r,o=this.opts.es5?fr.varKinds.var:fr.varKinds.let){let a=this._scope.toName(t);return this._for(new uy(o,a,n,i),()=>r(a))}forOf(t,n,i,r=fr.varKinds.const){let o=this._scope.toName(t);if(this.opts.es5){let a=n instanceof fe.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,fe._)`${a}.length`,s=>{this.var(o,(0,fe._)`${a}[${s}]`),i(o)})}return this._for(new jf("of",r,o,n),()=>i(o))}forIn(t,n,i,r=this.opts.es5?fr.varKinds.var:fr.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,fe._)`Object.keys(${n})`,i);let o=this._scope.toName(t);return this._for(new jf("in",r,o,n),()=>i(o))}endFor(){return this._endBlockNode(ri)}label(t){return this._leafNode(new ny(t))}break(t){return this._leafNode(new iy(t))}return(t){let n=new ec;if(this._blockNode(n),this.code(t),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(ec)}try(t,n,i){if(!n&&!i)throw new Error('CodeGen: "try" without "catch" and "finally"');let r=new ly;if(this._blockNode(r),this.code(t),n){let o=this.name("e");this._currNode=r.catch=new tc(o),n(o)}return i&&(this._currNode=r.finally=new rc,this.code(i)),this._endBlockNode(tc,rc)}throw(t){return this._leafNode(new oy(t))}block(t,n){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(n),this}endBlock(t){let n=this._blockStarts.pop();if(n===void 0)throw new Error("CodeGen: not in self-balancing block");let i=this._nodes.length-n;if(i<0||t!==void 0&&i!==t)throw new Error(`CodeGen: wrong number of nodes: ${i} vs ${t} expected`);return this._nodes.length=n,this}func(t,n=fe.nil,i,r){return this._blockNode(new Qs(t,n,i)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(Qs)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,n){let i=this._currNode;if(i instanceof t||n&&i instanceof n)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${n?`${t.kind}/${n.kind}`:t.kind}"`)}_elseNode(t){let n=this._currNode;if(!(n instanceof ti))throw new Error('CodeGen: "else" without "if"');return this._currNode=n.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let n=this._nodes;n[n.length-1]=t}};se.CodeGen=dy;function ni(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function Nf(e,t){return t instanceof fe._CodeOrName?ni(e,t.names):e}function Zo(e,t,n){if(e instanceof fe.Name)return i(e);if(!r(e))return e;return new fe._Code(e._items.reduce((o,a)=>(a instanceof fe.Name&&(a=i(a)),a instanceof fe._Code?o.push(...a._items):o.push(a),o),[]));function i(o){let a=n[o.str];return a===void 0||t[o.str]!==1?o:(delete t[o.str],a)}function r(o){return o instanceof fe._Code&&o._items.some(a=>a instanceof fe.Name&&t[a.str]===1&&n[a.str]!==void 0)}}function RA(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function C0(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,fe._)`!${fy(e)}`}se.not=C0;var CA=U0(se.operators.AND);function UA(...e){return e.reduce(CA)}se.and=UA;var ZA=U0(se.operators.OR);function MA(...e){return e.reduce(ZA)}se.or=MA;function U0(e){return(t,n)=>t===fe.nil?n:n===fe.nil?t:(0,fe._)`${fy(t)} ${e} ${fy(n)}`}function fy(e){return e instanceof fe.Name?e:(0,fe._)`(${e})`}});var pe=A(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.checkStrictMode=ue.getErrorPath=ue.Type=ue.useFunc=ue.setEvaluated=ue.evaluatedPropsToName=ue.mergeEvaluated=ue.eachItem=ue.unescapeJsonPointer=ue.escapeJsonPointer=ue.escapeFragment=ue.unescapeFragment=ue.schemaRefOrVal=ue.schemaHasRulesButRef=ue.schemaHasRules=ue.checkUnknownRules=ue.alwaysValidSchema=ue.toHash=void 0;var je=ie(),LA=Xs();function VA(e){let t={};for(let n of e)t[n]=!0;return t}ue.toHash=VA;function FA(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(L0(e,t),!V0(t,e.self.RULES.all))}ue.alwaysValidSchema=FA;function L0(e,t=e.schema){let{opts:n,self:i}=e;if(!n.strictSchema||typeof t=="boolean")return;let r=i.RULES.keywords;for(let o in t)r[o]||B0(e,`unknown keyword: "${o}"`)}ue.checkUnknownRules=L0;function V0(e,t){if(typeof e=="boolean")return!e;for(let n in e)if(t[n])return!0;return!1}ue.schemaHasRules=V0;function qA(e,t){if(typeof e=="boolean")return!e;for(let n in e)if(n!=="$ref"&&t.all[n])return!0;return!1}ue.schemaHasRulesButRef=qA;function BA({topSchemaRef:e,schemaPath:t},n,i,r){if(!r){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return(0,je._)`${n}`}return(0,je._)`${e}${t}${(0,je.getProperty)(i)}`}ue.schemaRefOrVal=BA;function HA(e){return F0(decodeURIComponent(e))}ue.unescapeFragment=HA;function JA(e){return encodeURIComponent(my(e))}ue.escapeFragment=JA;function my(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ue.escapeJsonPointer=my;function F0(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ue.unescapeJsonPointer=F0;function KA(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}ue.eachItem=KA;function Z0({mergeNames:e,mergeToName:t,mergeValues:n,resultToName:i}){return(r,o,a,s)=>{let c=a===void 0?o:a instanceof je.Name?(o instanceof je.Name?e(r,o,a):t(r,o,a),a):o instanceof je.Name?(t(r,a,o),o):n(o,a);return s===je.Name&&!(c instanceof je.Name)?i(r,c):c}}ue.mergeEvaluated={props:Z0({mergeNames:(e,t,n)=>e.if((0,je._)`${n} !== true && ${t} !== undefined`,()=>{e.if((0,je._)`${t} === true`,()=>e.assign(n,!0),()=>e.assign(n,(0,je._)`${n} || {}`).code((0,je._)`Object.assign(${n}, ${t})`))}),mergeToName:(e,t,n)=>e.if((0,je._)`${n} !== true`,()=>{t===!0?e.assign(n,!0):(e.assign(n,(0,je._)`${n} || {}`),hy(e,n,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:q0}),items:Z0({mergeNames:(e,t,n)=>e.if((0,je._)`${n} !== true && ${t} !== undefined`,()=>e.assign(n,(0,je._)`${t} === true ? true : ${n} > ${t} ? ${n} : ${t}`)),mergeToName:(e,t,n)=>e.if((0,je._)`${n} !== true`,()=>e.assign(n,t===!0?!0:(0,je._)`${n} > ${t} ? ${n} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function q0(e,t){if(t===!0)return e.var("props",!0);let n=e.var("props",(0,je._)`{}`);return t!==void 0&&hy(e,n,t),n}ue.evaluatedPropsToName=q0;function hy(e,t,n){Object.keys(n).forEach(i=>e.assign((0,je._)`${t}${(0,je.getProperty)(i)}`,!0))}ue.setEvaluated=hy;var M0={};function GA(e,t){return e.scopeValue("func",{ref:t,code:M0[t.code]||(M0[t.code]=new LA._Code(t.code))})}ue.useFunc=GA;var py;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(py||(ue.Type=py={}));function WA(e,t,n){if(e instanceof je.Name){let i=t===py.Num;return n?i?(0,je._)`"[" + ${e} + "]"`:(0,je._)`"['" + ${e} + "']"`:i?(0,je._)`"/" + ${e}`:(0,je._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,je.getProperty)(e).toString():"/"+my(e)}ue.getErrorPath=WA;function B0(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw new Error(t);e.self.logger.warn(t)}}ue.checkStrictMode=B0});var Hr=A(gy=>{"use strict";Object.defineProperty(gy,"__esModule",{value:!0});var ut=ie(),XA={data:new ut.Name("data"),valCxt:new ut.Name("valCxt"),instancePath:new ut.Name("instancePath"),parentData:new ut.Name("parentData"),parentDataProperty:new ut.Name("parentDataProperty"),rootData:new ut.Name("rootData"),dynamicAnchors:new ut.Name("dynamicAnchors"),vErrors:new ut.Name("vErrors"),errors:new ut.Name("errors"),this:new ut.Name("this"),self:new ut.Name("self"),scope:new ut.Name("scope"),json:new ut.Name("json"),jsonPos:new ut.Name("jsonPos"),jsonLen:new ut.Name("jsonLen"),jsonPart:new ut.Name("jsonPart")};gy.default=XA});var nc=A(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.extendErrors=lt.resetErrorsCount=lt.reportExtraError=lt.reportError=lt.keyword$DataError=lt.keywordError=void 0;var me=ie(),Df=pe(),wt=Hr();lt.keywordError={message:({keyword:e})=>(0,me.str)`must pass "${e}" keyword validation`};lt.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,me.str)`"${e}" keyword must be ${t} ($data)`:(0,me.str)`"${e}" keyword is invalid ($data)`};function YA(e,t=lt.keywordError,n,i){let{it:r}=e,{gen:o,compositeRule:a,allErrors:s}=r,c=K0(e,t,n);i??(a||s)?H0(o,c):J0(r,(0,me._)`[${c}]`)}lt.reportError=YA;function QA(e,t=lt.keywordError,n){let{it:i}=e,{gen:r,compositeRule:o,allErrors:a}=i,s=K0(e,t,n);H0(r,s),o||a||J0(i,wt.default.vErrors)}lt.reportExtraError=QA;function e4(e,t){e.assign(wt.default.errors,t),e.if((0,me._)`${wt.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,me._)`${wt.default.vErrors}.length`,t),()=>e.assign(wt.default.vErrors,null)))}lt.resetErrorsCount=e4;function t4({gen:e,keyword:t,schemaValue:n,data:i,errsCount:r,it:o}){if(r===void 0)throw new Error("ajv implementation error");let a=e.name("err");e.forRange("i",r,wt.default.errors,s=>{e.const(a,(0,me._)`${wt.default.vErrors}[${s}]`),e.if((0,me._)`${a}.instancePath === undefined`,()=>e.assign((0,me._)`${a}.instancePath`,(0,me.strConcat)(wt.default.instancePath,o.errorPath))),e.assign((0,me._)`${a}.schemaPath`,(0,me.str)`${o.errSchemaPath}/${t}`),o.opts.verbose&&(e.assign((0,me._)`${a}.schema`,n),e.assign((0,me._)`${a}.data`,i))})}lt.extendErrors=t4;function H0(e,t){let n=e.const("err",t);e.if((0,me._)`${wt.default.vErrors} === null`,()=>e.assign(wt.default.vErrors,(0,me._)`[${n}]`),(0,me._)`${wt.default.vErrors}.push(${n})`),e.code((0,me._)`${wt.default.errors}++`)}function J0(e,t){let{gen:n,validateName:i,schemaEnv:r}=e;r.$async?n.throw((0,me._)`new ${e.ValidationError}(${t})`):(n.assign((0,me._)`${i}.errors`,t),n.return(!1))}var ii={keyword:new me.Name("keyword"),schemaPath:new me.Name("schemaPath"),params:new me.Name("params"),propertyName:new me.Name("propertyName"),message:new me.Name("message"),schema:new me.Name("schema"),parentSchema:new me.Name("parentSchema")};function K0(e,t,n){let{createErrors:i}=e.it;return i===!1?(0,me._)`{}`:r4(e,t,n)}function r4(e,t,n={}){let{gen:i,it:r}=e,o=[n4(r,n),i4(e,n)];return o4(e,t,o),i.object(...o)}function n4({errorPath:e},{instancePath:t}){let n=t?(0,me.str)`${e}${(0,Df.getErrorPath)(t,Df.Type.Str)}`:e;return[wt.default.instancePath,(0,me.strConcat)(wt.default.instancePath,n)]}function i4({keyword:e,it:{errSchemaPath:t}},{schemaPath:n,parentSchema:i}){let r=i?t:(0,me.str)`${t}/${e}`;return n&&(r=(0,me.str)`${r}${(0,Df.getErrorPath)(n,Df.Type.Str)}`),[ii.schemaPath,r]}function o4(e,{params:t,message:n},i){let{keyword:r,data:o,schemaValue:a,it:s}=e,{opts:c,propertyName:u,topSchemaRef:l,schemaPath:d}=s;i.push([ii.keyword,r],[ii.params,typeof t=="function"?t(e):t||(0,me._)`{}`]),c.messages&&i.push([ii.message,typeof n=="function"?n(e):n]),c.verbose&&i.push([ii.schema,a],[ii.parentSchema,(0,me._)`${l}${d}`],[wt.default.data,o]),u&&i.push([ii.propertyName,u])}});var W0=A(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});Mo.boolOrEmptySchema=Mo.topBoolOrEmptySchema=void 0;var a4=nc(),s4=ie(),c4=Hr(),u4={message:"boolean schema is false"};function l4(e){let{gen:t,schema:n,validateName:i}=e;n===!1?G0(e,!1):typeof n=="object"&&n.$async===!0?t.return(c4.default.data):(t.assign((0,s4._)`${i}.errors`,null),t.return(!0))}Mo.topBoolOrEmptySchema=l4;function d4(e,t){let{gen:n,schema:i}=e;i===!1?(n.var(t,!1),G0(e)):n.var(t,!0)}Mo.boolOrEmptySchema=d4;function G0(e,t){let{gen:n,data:i}=e,r={gen:n,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,a4.reportError)(r,u4,void 0,t)}});var vy=A(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});Lo.getRules=Lo.isJSONType=void 0;var f4=["string","number","integer","boolean","null","object","array"],p4=new Set(f4);function m4(e){return typeof e=="string"&&p4.has(e)}Lo.isJSONType=m4;function h4(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Lo.getRules=h4});var yy=A($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.shouldUseRule=$n.shouldUseGroup=$n.schemaHasRulesForType=void 0;function g4({schema:e,self:t},n){let i=t.RULES.types[n];return i&&i!==!0&&X0(e,i)}$n.schemaHasRulesForType=g4;function X0(e,t){return t.rules.some(n=>Y0(e,n))}$n.shouldUseGroup=X0;function Y0(e,t){var n;return e[t.keyword]!==void 0||((n=t.definition.implements)===null||n===void 0?void 0:n.some(i=>e[i]!==void 0))}$n.shouldUseRule=Y0});var ic=A(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.reportTypeError=dt.checkDataTypes=dt.checkDataType=dt.coerceAndCheckDataType=dt.getJSONTypes=dt.getSchemaTypes=dt.DataType=void 0;var v4=vy(),y4=yy(),_4=nc(),ne=ie(),Q0=pe(),Vo;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Vo||(dt.DataType=Vo={}));function $4(e){let t=eS(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}dt.getSchemaTypes=$4;function eS(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(v4.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}dt.getJSONTypes=eS;function b4(e,t){let{gen:n,data:i,opts:r}=e,o=w4(t,r.coerceTypes),a=t.length>0&&!(o.length===0&&t.length===1&&(0,y4.schemaHasRulesForType)(e,t[0]));if(a){let s=$y(t,i,r.strictNumbers,Vo.Wrong);n.if(s,()=>{o.length?x4(e,t,o):by(e)})}return a}dt.coerceAndCheckDataType=b4;var tS=new Set(["string","number","integer","boolean","null"]);function w4(e,t){return t?e.filter(n=>tS.has(n)||t==="array"&&n==="array"):[]}function x4(e,t,n){let{gen:i,data:r,opts:o}=e,a=i.let("dataType",(0,ne._)`typeof ${r}`),s=i.let("coerced",(0,ne._)`undefined`);o.coerceTypes==="array"&&i.if((0,ne._)`${a} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,()=>i.assign(r,(0,ne._)`${r}[0]`).assign(a,(0,ne._)`typeof ${r}`).if($y(t,r,o.strictNumbers),()=>i.assign(s,r))),i.if((0,ne._)`${s} !== undefined`);for(let u of n)(tS.has(u)||u==="array"&&o.coerceTypes==="array")&&c(u);i.else(),by(e),i.endIf(),i.if((0,ne._)`${s} !== undefined`,()=>{i.assign(r,s),k4(e,s)});function c(u){switch(u){case"string":i.elseIf((0,ne._)`${a} == "number" || ${a} == "boolean"`).assign(s,(0,ne._)`"" + ${r}`).elseIf((0,ne._)`${r} === null`).assign(s,(0,ne._)`""`);return;case"number":i.elseIf((0,ne._)`${a} == "boolean" || ${r} === null
|
|
5
5
|
|| (${a} == "string" && ${r} && ${r} == +${r})`).assign(s,(0,ne._)`+${r}`);return;case"integer":i.elseIf((0,ne._)`${a} === "boolean" || ${r} === null
|
|
6
6
|
|| (${a} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(s,(0,ne._)`+${r}`);return;case"boolean":i.elseIf((0,ne._)`${r} === "false" || ${r} === 0 || ${r} === null`).assign(s,!1).elseIf((0,ne._)`${r} === "true" || ${r} === 1`).assign(s,!0);return;case"null":i.elseIf((0,ne._)`${r} === "" || ${r} === 0 || ${r} === false`),i.assign(s,null);return;case"array":i.elseIf((0,ne._)`${a} === "string" || ${a} === "number"
|
|
7
|
-
|| ${a} === "boolean" || ${r} === null`).assign(s,(0,ne._)`[${r}]`)}}}function hA({gen:e,parentData:t,parentDataProperty:n},i){e.if((0,ne._)`${t} !== undefined`,()=>e.assign((0,ne._)`${t}[${n}]`,i))}function hy(e,t,n,i=Mo.Correct){let r=i===Mo.Correct?ne.operators.EQ:ne.operators.NEQ,o;switch(e){case"null":return(0,ne._)`${t} ${r} null`;case"array":o=(0,ne._)`Array.isArray(${t})`;break;case"object":o=(0,ne._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=a((0,ne._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=a();break;default:return(0,ne._)`typeof ${t} ${r} ${e}`}return i===Mo.Correct?o:(0,ne.not)(o);function a(s=ne.nil){return(0,ne.and)((0,ne._)`typeof ${t} == "number"`,s,n?(0,ne._)`isFinite(${t})`:ne.nil)}}dt.checkDataType=hy;function gy(e,t,n,i){if(e.length===1)return hy(e[0],t,n,i);let r,o=(0,G0.toHash)(e);if(o.array&&o.object){let a=(0,ne._)`typeof ${t} != "object"`;r=o.null?a:(0,ne._)`!${t} || ${a}`,delete o.null,delete o.array,delete o.object}else r=ne.nil;o.number&&delete o.integer;for(let a in o)r=(0,ne.and)(r,hy(a,t,n,i));return r}dt.checkDataTypes=gy;var gA={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,ne._)`{type: ${e}}`:(0,ne._)`{type: ${t}}`};function vy(e){let t=vA(e);(0,lA.reportError)(t,gA)}dt.reportTypeError=vy;function vA(e){let{gen:t,data:n,schema:i}=e,r=(0,G0.schemaRefOrVal)(e,i,"type");return{gen:t,keyword:"type",data:n,schema:i.type,schemaCode:r,schemaValue:r,parentSchema:i,params:{},it:e}}});var Q0=N(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});jf.assignDefaults=void 0;var Lo=ie(),yA=pe();function _A(e,t){let{properties:n,items:i}=e.schema;if(t==="object"&&n)for(let r in n)Y0(e,r,n[r].default);else t==="array"&&Array.isArray(i)&&i.forEach((r,o)=>Y0(e,o,r.default))}jf.assignDefaults=_A;function Y0(e,t,n){let{gen:i,compositeRule:r,data:o,opts:a}=e;if(n===void 0)return;let s=(0,Lo._)`${o}${(0,Lo.getProperty)(t)}`;if(r){(0,yA.checkStrictMode)(e,`default is ignored for: ${s}`);return}let c=(0,Lo._)`${s} === undefined`;a.useDefaults==="empty"&&(c=(0,Lo._)`${c} || ${s} === null || ${s} === ""`),i.if(c,(0,Lo._)`${s} = ${(0,Lo.stringify)(n)}`)}});var er=N(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.validateUnion=ze.validateArray=ze.usePattern=ze.callValidateCode=ze.schemaProperties=ze.allSchemaProperties=ze.noPropertyInData=ze.propertyInData=ze.isOwnProperty=ze.hasPropFunc=ze.reportMissingProp=ze.checkMissingProp=ze.checkReportMissingProp=void 0;var Ee=ie(),yy=pe(),$n=Br(),$A=pe();function bA(e,t){let{gen:n,data:i,it:r}=e;n.if($y(n,i,t,r.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Ee._)`${t}`},!0),e.error()})}ze.checkReportMissingProp=bA;function wA({gen:e,data:t,it:{opts:n}},i,r){return(0,Ee.or)(...i.map(o=>(0,Ee.and)($y(e,t,o,n.ownProperties),(0,Ee._)`${r} = ${o}`)))}ze.checkMissingProp=wA;function kA(e,t){e.setParams({missingProperty:t},!0),e.error()}ze.reportMissingProp=kA;function eS(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Ee._)`Object.prototype.hasOwnProperty`})}ze.hasPropFunc=eS;function _y(e,t,n){return(0,Ee._)`${eS(e)}.call(${t}, ${n})`}ze.isOwnProperty=_y;function xA(e,t,n,i){let r=(0,Ee._)`${t}${(0,Ee.getProperty)(n)} !== undefined`;return i?(0,Ee._)`${r} && ${_y(e,t,n)}`:r}ze.propertyInData=xA;function $y(e,t,n,i){let r=(0,Ee._)`${t}${(0,Ee.getProperty)(n)} === undefined`;return i?(0,Ee.or)(r,(0,Ee.not)(_y(e,t,n))):r}ze.noPropertyInData=$y;function tS(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}ze.allSchemaProperties=tS;function SA(e,t){return tS(t).filter(n=>!(0,yy.alwaysValidSchema)(e,t[n]))}ze.schemaProperties=SA;function IA({schemaCode:e,data:t,it:{gen:n,topSchemaRef:i,schemaPath:r,errorPath:o},it:a},s,c,u){let l=u?(0,Ee._)`${e}, ${t}, ${i}${r}`:t,d=[[$n.default.instancePath,(0,Ee.strConcat)($n.default.instancePath,o)],[$n.default.parentData,a.parentData],[$n.default.parentDataProperty,a.parentDataProperty],[$n.default.rootData,$n.default.rootData]];a.opts.dynamicRef&&d.push([$n.default.dynamicAnchors,$n.default.dynamicAnchors]);let f=(0,Ee._)`${l}, ${n.object(...d)}`;return c!==Ee.nil?(0,Ee._)`${s}.call(${c}, ${f})`:(0,Ee._)`${s}(${f})`}ze.callValidateCode=IA;var zA=(0,Ee._)`new RegExp`;function PA({gen:e,it:{opts:t}},n){let i=t.unicodeRegExp?"u":"",{regExp:r}=t.code,o=r(n,i);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,Ee._)`${r.code==="new RegExp"?zA:(0,$A.useFunc)(e,r)}(${n}, ${i})`})}ze.usePattern=PA;function TA(e){let{gen:t,data:n,keyword:i,it:r}=e,o=t.name("valid");if(r.allErrors){let s=t.let("valid",!0);return a(()=>t.assign(s,!1)),s}return t.var(o,!0),a(()=>t.break()),o;function a(s){let c=t.const("len",(0,Ee._)`${n}.length`);t.forRange("i",0,c,u=>{e.subschema({keyword:i,dataProp:u,dataPropType:yy.Type.Num},o),t.if((0,Ee.not)(o),s)})}}ze.validateArray=TA;function OA(e){let{gen:t,schema:n,keyword:i,it:r}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some(c=>(0,yy.alwaysValidSchema)(r,c))&&!r.opts.unevaluated)return;let a=t.let("valid",!1),s=t.name("_valid");t.block(()=>n.forEach((c,u)=>{let l=e.subschema({keyword:i,schemaProp:u,compositeRule:!0},s);t.assign(a,(0,Ee._)`${a} || ${s}`),e.mergeValidEvaluated(l,s)||t.if((0,Ee.not)(a))})),e.result(a,()=>e.reset(),()=>e.error(!0))}ze.validateUnion=OA});var iS=N(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.validateKeywordUsage=Ir.validSchemaType=Ir.funcKeywordCode=Ir.macroKeywordCode=void 0;var kt=ie(),ii=Br(),jA=er(),EA=Qs();function NA(e,t){let{gen:n,keyword:i,schema:r,parentSchema:o,it:a}=e,s=t.macro.call(a.self,r,o,a),c=nS(n,i,s);a.opts.validateSchema!==!1&&a.self.validateSchema(s,!0);let u=n.name("valid");e.subschema({schema:s,schemaPath:kt.nil,errSchemaPath:`${a.errSchemaPath}/${i}`,topSchemaRef:c,compositeRule:!0},u),e.pass(u,()=>e.error(!0))}Ir.macroKeywordCode=NA;function AA(e,t){var n;let{gen:i,keyword:r,schema:o,parentSchema:a,$data:s,it:c}=e;RA(c,t);let u=!s&&t.compile?t.compile.call(c.self,o,a,c):t.validate,l=nS(i,r,u),d=i.let("valid");e.block$data(d,f),e.ok((n=t.valid)!==null&&n!==void 0?n:d);function f(){if(t.errors===!1)h(),t.modifying&&rS(e),g(()=>e.error());else{let _=t.async?p():m();t.modifying&&rS(e),g(()=>DA(e,_))}}function p(){let _=i.let("ruleErrs",null);return i.try(()=>h((0,kt._)`await `),$=>i.assign(d,!1).if((0,kt._)`${$} instanceof ${c.ValidationError}`,()=>i.assign(_,(0,kt._)`${$}.errors`),()=>i.throw($))),_}function m(){let _=(0,kt._)`${l}.errors`;return i.assign(_,null),h(kt.nil),_}function h(_=t.async?(0,kt._)`await `:kt.nil){let $=c.opts.passContext?ii.default.this:ii.default.self,x=!("compile"in t&&!s||t.schema===!1);i.assign(d,(0,kt._)`${_}${(0,jA.callValidateCode)(e,l,$,x)}`,t.modifying)}function g(_){var $;i.if((0,kt.not)(($=t.valid)!==null&&$!==void 0?$:d),_)}}Ir.funcKeywordCode=AA;function rS(e){let{gen:t,data:n,it:i}=e;t.if(i.parentData,()=>t.assign(n,(0,kt._)`${i.parentData}[${i.parentDataProperty}]`))}function DA(e,t){let{gen:n}=e;n.if((0,kt._)`Array.isArray(${t})`,()=>{n.assign(ii.default.vErrors,(0,kt._)`${ii.default.vErrors} === null ? ${t} : ${ii.default.vErrors}.concat(${t})`).assign(ii.default.errors,(0,kt._)`${ii.default.vErrors}.length`),(0,EA.extendErrors)(e)},()=>e.error())}function RA({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function nS(e,t,n){if(n===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof n=="function"?{ref:n}:{ref:n,code:(0,kt.stringify)(n)})}function CA(e,t,n=!1){return!t.length||t.some(i=>i==="array"?Array.isArray(e):i==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==i||n&&typeof e>"u")}Ir.validSchemaType=CA;function UA({schema:e,opts:t,self:n,errSchemaPath:i},r,o){if(Array.isArray(r.keyword)?!r.keyword.includes(o):r.keyword!==o)throw new Error("ajv implementation error");let a=r.dependencies;if(a?.some(s=>!Object.prototype.hasOwnProperty.call(e,s)))throw new Error(`parent schema must have dependencies of ${o}: ${a.join(",")}`);if(r.validateSchema&&!r.validateSchema(e[o])){let c=`keyword "${o}" value is invalid at path "${i}": `+n.errorsText(r.validateSchema.errors);if(t.validateSchema==="log")n.logger.error(c);else throw new Error(c)}}Ir.validateKeywordUsage=UA});var aS=N(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.extendSubschemaMode=bn.extendSubschemaData=bn.getSubschema=void 0;var zr=ie(),oS=pe();function ZA(e,{keyword:t,schemaProp:n,schema:i,schemaPath:r,errSchemaPath:o,topSchemaRef:a}){if(t!==void 0&&i!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let s=e.schema[t];return n===void 0?{schema:s,schemaPath:(0,zr._)`${e.schemaPath}${(0,zr.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:s[n],schemaPath:(0,zr._)`${e.schemaPath}${(0,zr.getProperty)(t)}${(0,zr.getProperty)(n)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,oS.escapeFragment)(n)}`}}if(i!==void 0){if(r===void 0||o===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:r,topSchemaRef:a,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}bn.getSubschema=ZA;function MA(e,t,{dataProp:n,dataPropType:i,data:r,dataTypes:o,propertyName:a}){if(r!==void 0&&n!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:s}=t;if(n!==void 0){let{errorPath:u,dataPathArr:l,opts:d}=t,f=s.let("data",(0,zr._)`${t.data}${(0,zr.getProperty)(n)}`,!0);c(f),e.errorPath=(0,zr.str)`${u}${(0,oS.getErrorPath)(n,i,d.jsPropertySyntax)}`,e.parentDataProperty=(0,zr._)`${n}`,e.dataPathArr=[...l,e.parentDataProperty]}if(r!==void 0){let u=r instanceof zr.Name?r:s.let("data",r,!0);c(u),a!==void 0&&(e.propertyName=a)}o&&(e.dataTypes=o);function c(u){e.data=u,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,u]}}bn.extendSubschemaData=MA;function LA(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:i,createErrors:r,allErrors:o}){i!==void 0&&(e.compositeRule=i),r!==void 0&&(e.createErrors=r),o!==void 0&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=n}bn.extendSubschemaMode=LA});var by=N((I5,sS)=>{"use strict";sS.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var i,r,o;if(Array.isArray(t)){if(i=t.length,i!=n.length)return!1;for(r=i;r--!==0;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(o=Object.keys(t),i=o.length,i!==Object.keys(n).length)return!1;for(r=i;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[r]))return!1;for(r=i;r--!==0;){var a=o[r];if(!e(t[a],n[a]))return!1}return!0}return t!==t&&n!==n}});var uS=N((z5,cS)=>{"use strict";var wn=cS.exports=function(e,t,n){typeof t=="function"&&(n=t,t={}),n=t.cb||n;var i=typeof n=="function"?n:n.pre||function(){},r=n.post||function(){};Ef(t,i,r,e,"",e)};wn.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};wn.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};wn.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};wn.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function Ef(e,t,n,i,r,o,a,s,c,u){if(i&&typeof i=="object"&&!Array.isArray(i)){t(i,r,o,a,s,c,u);for(var l in i){var d=i[l];if(Array.isArray(d)){if(l in wn.arrayKeywords)for(var f=0;f<d.length;f++)Ef(e,t,n,d[f],r+"/"+l+"/"+f,o,r,l,i,f)}else if(l in wn.propsKeywords){if(d&&typeof d=="object")for(var p in d)Ef(e,t,n,d[p],r+"/"+l+"/"+VA(p),o,r,l,i,p)}else(l in wn.keywords||e.allKeys&&!(l in wn.skipKeywords))&&Ef(e,t,n,d,r+"/"+l,o,r,l,i)}n(i,r,o,a,s,c,u)}}function VA(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var tc=N(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.getSchemaRefs=Nt.resolveUrl=Nt.normalizeId=Nt._getFullPath=Nt.getFullPath=Nt.inlineRef=void 0;var FA=pe(),qA=by(),BA=uS(),HA=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function JA(e,t=!0){return typeof e=="boolean"?!0:t===!0?!wy(e):t?lS(e)<=t:!1}Nt.inlineRef=JA;var KA=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function wy(e){for(let t in e){if(KA.has(t))return!0;let n=e[t];if(Array.isArray(n)&&n.some(wy)||typeof n=="object"&&wy(n))return!0}return!1}function lS(e){let t=0;for(let n in e){if(n==="$ref")return 1/0;if(t++,!HA.has(n)&&(typeof e[n]=="object"&&(0,FA.eachItem)(e[n],i=>t+=lS(i)),t===1/0))return 1/0}return t}function dS(e,t="",n){n!==!1&&(t=Vo(t));let i=e.parse(t);return fS(e,i)}Nt.getFullPath=dS;function fS(e,t){return e.serialize(t).split("#")[0]+"#"}Nt._getFullPath=fS;var GA=/#\/?$/;function Vo(e){return e?e.replace(GA,""):""}Nt.normalizeId=Vo;function WA(e,t,n){return n=Vo(n),e.resolve(t,n)}Nt.resolveUrl=WA;var XA=/^[a-z_][-a-z0-9._]*$/i;function YA(e,t){if(typeof e=="boolean")return{};let{schemaId:n,uriResolver:i}=this.opts,r=Vo(e[n]||t),o={"":r},a=dS(i,r,!1),s={},c=new Set;return BA(e,{allKeys:!0},(d,f,p,m)=>{if(m===void 0)return;let h=a+f,g=o[m];typeof d[n]=="string"&&(g=_.call(this,d[n])),$.call(this,d.$anchor),$.call(this,d.$dynamicAnchor),o[f]=g;function _(x){let O=this.opts.uriResolver.resolve;if(x=Vo(g?O(g,x):x),c.has(x))throw l(x);c.add(x);let T=this.refs[x];return typeof T=="string"&&(T=this.refs[T]),typeof T=="object"?u(d,T.schema,x):x!==Vo(h)&&(x[0]==="#"?(u(d,s[x],x),s[x]=d):this.refs[x]=h),x}function $(x){if(typeof x=="string"){if(!XA.test(x))throw new Error(`invalid anchor "${x}"`);_.call(this,`#${x}`)}}}),s;function u(d,f,p){if(f!==void 0&&!qA(d,f))throw l(p)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}Nt.getSchemaRefs=YA});var ic=N(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.getData=kn.KeywordCxt=kn.validateFunctionCode=void 0;var vS=H0(),pS=ec(),xy=my(),Nf=ec(),QA=Q0(),nc=iS(),ky=aS(),L=ie(),Y=Br(),eD=tc(),Hr=pe(),rc=Qs();function tD(e){if($S(e)&&(bS(e),_S(e))){iD(e);return}yS(e,()=>(0,vS.topBoolOrEmptySchema)(e))}kn.validateFunctionCode=tD;function yS({gen:e,validateName:t,schema:n,schemaEnv:i,opts:r},o){r.code.es5?e.func(t,(0,L._)`${Y.default.data}, ${Y.default.valCxt}`,i.$async,()=>{e.code((0,L._)`"use strict"; ${mS(n,r)}`),nD(e,r),e.code(o)}):e.func(t,(0,L._)`${Y.default.data}, ${rD(r)}`,i.$async,()=>e.code(mS(n,r)).code(o))}function rD(e){return(0,L._)`{${Y.default.instancePath}="", ${Y.default.parentData}, ${Y.default.parentDataProperty}, ${Y.default.rootData}=${Y.default.data}${e.dynamicRef?(0,L._)`, ${Y.default.dynamicAnchors}={}`:L.nil}}={}`}function nD(e,t){e.if(Y.default.valCxt,()=>{e.var(Y.default.instancePath,(0,L._)`${Y.default.valCxt}.${Y.default.instancePath}`),e.var(Y.default.parentData,(0,L._)`${Y.default.valCxt}.${Y.default.parentData}`),e.var(Y.default.parentDataProperty,(0,L._)`${Y.default.valCxt}.${Y.default.parentDataProperty}`),e.var(Y.default.rootData,(0,L._)`${Y.default.valCxt}.${Y.default.rootData}`),t.dynamicRef&&e.var(Y.default.dynamicAnchors,(0,L._)`${Y.default.valCxt}.${Y.default.dynamicAnchors}`)},()=>{e.var(Y.default.instancePath,(0,L._)`""`),e.var(Y.default.parentData,(0,L._)`undefined`),e.var(Y.default.parentDataProperty,(0,L._)`undefined`),e.var(Y.default.rootData,Y.default.data),t.dynamicRef&&e.var(Y.default.dynamicAnchors,(0,L._)`{}`)})}function iD(e){let{schema:t,opts:n,gen:i}=e;yS(e,()=>{n.$comment&&t.$comment&&kS(e),uD(e),i.let(Y.default.vErrors,null),i.let(Y.default.errors,0),n.unevaluated&&oD(e),wS(e),fD(e)})}function oD(e){let{gen:t,validateName:n}=e;e.evaluated=t.const("evaluated",(0,L._)`${n}.evaluated`),t.if((0,L._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,L._)`${e.evaluated}.props`,(0,L._)`undefined`)),t.if((0,L._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,L._)`${e.evaluated}.items`,(0,L._)`undefined`))}function mS(e,t){let n=typeof e=="object"&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,L._)`/*# sourceURL=${n} */`:L.nil}function aD(e,t){if($S(e)&&(bS(e),_S(e))){sD(e,t);return}(0,vS.boolOrEmptySchema)(e,t)}function _S({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let n in e)if(t.RULES.all[n])return!0;return!1}function $S(e){return typeof e.schema!="boolean"}function sD(e,t){let{schema:n,gen:i,opts:r}=e;r.$comment&&n.$comment&&kS(e),lD(e),dD(e);let o=i.const("_errs",Y.default.errors);wS(e,o),i.var(t,(0,L._)`${o} === ${Y.default.errors}`)}function bS(e){(0,Hr.checkUnknownRules)(e),cD(e)}function wS(e,t){if(e.opts.jtd)return hS(e,[],!1,t);let n=(0,pS.getSchemaTypes)(e.schema),i=(0,pS.coerceAndCheckDataType)(e,n);hS(e,n,!i,t)}function cD(e){let{schema:t,errSchemaPath:n,opts:i,self:r}=e;t.$ref&&i.ignoreKeywordsWithRef&&(0,Hr.schemaHasRulesButRef)(t,r.RULES)&&r.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function uD(e){let{schema:t,opts:n}=e;t.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,Hr.checkStrictMode)(e,"default is ignored in the schema root")}function lD(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,eD.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function dD(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function kS({gen:e,schemaEnv:t,schema:n,errSchemaPath:i,opts:r}){let o=n.$comment;if(r.$comment===!0)e.code((0,L._)`${Y.default.self}.logger.log(${o})`);else if(typeof r.$comment=="function"){let a=(0,L.str)`${i}/$comment`,s=e.scopeValue("root",{ref:t.root});e.code((0,L._)`${Y.default.self}.opts.$comment(${o}, ${a}, ${s}.schema)`)}}function fD(e){let{gen:t,schemaEnv:n,validateName:i,ValidationError:r,opts:o}=e;n.$async?t.if((0,L._)`${Y.default.errors} === 0`,()=>t.return(Y.default.data),()=>t.throw((0,L._)`new ${r}(${Y.default.vErrors})`)):(t.assign((0,L._)`${i}.errors`,Y.default.vErrors),o.unevaluated&&pD(e),t.return((0,L._)`${Y.default.errors} === 0`))}function pD({gen:e,evaluated:t,props:n,items:i}){n instanceof L.Name&&e.assign((0,L._)`${t}.props`,n),i instanceof L.Name&&e.assign((0,L._)`${t}.items`,i)}function hS(e,t,n,i){let{gen:r,schema:o,data:a,allErrors:s,opts:c,self:u}=e,{RULES:l}=u;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,Hr.schemaHasRulesButRef)(o,l))){r.block(()=>SS(e,"$ref",l.all.$ref.definition));return}c.jtd||mD(e,t),r.block(()=>{for(let f of l.rules)d(f);d(l.post)});function d(f){(0,xy.shouldUseGroup)(o,f)&&(f.type?(r.if((0,Nf.checkDataType)(f.type,a,c.strictNumbers)),gS(e,f),t.length===1&&t[0]===f.type&&n&&(r.else(),(0,Nf.reportTypeError)(e)),r.endIf()):gS(e,f),s||r.if((0,L._)`${Y.default.errors} === ${i||0}`))}}function gS(e,t){let{gen:n,schema:i,opts:{useDefaults:r}}=e;r&&(0,QA.assignDefaults)(e,t.type),n.block(()=>{for(let o of t.rules)(0,xy.shouldUseRule)(i,o)&&SS(e,o.keyword,o.definition,t.type)})}function mD(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(hD(e,t),e.opts.allowUnionTypes||gD(e,t),vD(e,e.dataTypes))}function hD(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(n=>{xS(e.dataTypes,n)||Sy(e,`type "${n}" not allowed by context "${e.dataTypes.join(",")}"`)}),_D(e,t)}}function gD(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Sy(e,"use allowUnionTypes to allow union type keyword")}function vD(e,t){let n=e.self.RULES.all;for(let i in n){let r=n[i];if(typeof r=="object"&&(0,xy.shouldUseRule)(e.schema,r)){let{type:o}=r.definition;o.length&&!o.some(a=>yD(t,a))&&Sy(e,`missing type "${o.join(",")}" for keyword "${i}"`)}}}function yD(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function xS(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function _D(e,t){let n=[];for(let i of e.dataTypes)xS(t,i)?n.push(i):t.includes("integer")&&i==="number"&&n.push("integer");e.dataTypes=n}function Sy(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,Hr.checkStrictMode)(e,t,e.opts.strictTypes)}var Af=class{constructor(t,n,i){if((0,nc.validateKeywordUsage)(t,n,i),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=i,this.data=t.data,this.schema=t.schema[i],this.$data=n.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Hr.schemaRefOrVal)(t,this.schema,i,this.$data),this.schemaType=n.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=n,this.$data)this.schemaCode=t.gen.const("vSchema",IS(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,nc.validSchemaType)(this.schema,n.schemaType,n.allowUndefined))throw new Error(`${i} value must be ${JSON.stringify(n.schemaType)}`);("code"in n?n.trackErrors:n.errors!==!1)&&(this.errsCount=t.gen.const("_errs",Y.default.errors))}result(t,n,i){this.failResult((0,L.not)(t),n,i)}failResult(t,n,i){this.gen.if(t),i?i():this.error(),n?(this.gen.else(),n(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,n){this.failResult((0,L.not)(t),void 0,n)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:n}=this;this.fail((0,L._)`${n} !== undefined && (${(0,L.or)(this.invalid$data(),t)})`)}error(t,n,i){if(n){this.setParams(n),this._error(t,i),this.setParams({});return}this._error(t,i)}_error(t,n){(t?rc.reportExtraError:rc.reportError)(this,this.def.error,n)}$dataError(){(0,rc.reportError)(this,this.def.$dataError||rc.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,rc.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,n){n?Object.assign(this.params,t):this.params=t}block$data(t,n,i=L.nil){this.gen.block(()=>{this.check$data(t,i),n()})}check$data(t=L.nil,n=L.nil){if(!this.$data)return;let{gen:i,schemaCode:r,schemaType:o,def:a}=this;i.if((0,L.or)((0,L._)`${r} === undefined`,n)),t!==L.nil&&i.assign(t,!0),(o.length||a.validateSchema)&&(i.elseIf(this.invalid$data()),this.$dataError(),t!==L.nil&&i.assign(t,!1)),i.else()}invalid$data(){let{gen:t,schemaCode:n,schemaType:i,def:r,it:o}=this;return(0,L.or)(a(),s());function a(){if(i.length){if(!(n instanceof L.Name))throw new Error("ajv implementation error");let c=Array.isArray(i)?i:[i];return(0,L._)`${(0,Nf.checkDataTypes)(c,n,o.opts.strictNumbers,Nf.DataType.Wrong)}`}return L.nil}function s(){if(r.validateSchema){let c=t.scopeValue("validate$data",{ref:r.validateSchema});return(0,L._)`!${c}(${n})`}return L.nil}}subschema(t,n){let i=(0,ky.getSubschema)(this.it,t);(0,ky.extendSubschemaData)(i,this.it,t),(0,ky.extendSubschemaMode)(i,t);let r={...this.it,...i,items:void 0,props:void 0};return aD(r,n),r}mergeEvaluated(t,n){let{it:i,gen:r}=this;i.opts.unevaluated&&(i.props!==!0&&t.props!==void 0&&(i.props=Hr.mergeEvaluated.props(r,t.props,i.props,n)),i.items!==!0&&t.items!==void 0&&(i.items=Hr.mergeEvaluated.items(r,t.items,i.items,n)))}mergeValidEvaluated(t,n){let{it:i,gen:r}=this;if(i.opts.unevaluated&&(i.props!==!0||i.items!==!0))return r.if(n,()=>this.mergeEvaluated(t,L.Name)),!0}};kn.KeywordCxt=Af;function SS(e,t,n,i){let r=new Af(e,n,t);"code"in n?n.code(r,i):r.$data&&n.validate?(0,nc.funcKeywordCode)(r,n):"macro"in n?(0,nc.macroKeywordCode)(r,n):(n.compile||n.validate)&&(0,nc.funcKeywordCode)(r,n)}var $D=/^\/(?:[^~]|~0|~1)*$/,bD=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function IS(e,{dataLevel:t,dataNames:n,dataPathArr:i}){let r,o;if(e==="")return Y.default.rootData;if(e[0]==="/"){if(!$D.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);r=e,o=Y.default.rootData}else{let u=bD.exec(e);if(!u)throw new Error(`Invalid JSON-pointer: ${e}`);let l=+u[1];if(r=u[2],r==="#"){if(l>=t)throw new Error(c("property/index",l));return i[t-l]}if(l>t)throw new Error(c("data",l));if(o=n[t-l],!r)return o}let a=o,s=r.split("/");for(let u of s)u&&(o=(0,L._)`${o}${(0,L.getProperty)((0,Hr.unescapeJsonPointer)(u))}`,a=(0,L._)`${a} && ${o}`);return a;function c(u,l){return`Cannot access ${u} ${l} levels up, current level is ${t}`}}kn.getData=IS});var Df=N(zy=>{"use strict";Object.defineProperty(zy,"__esModule",{value:!0});var Iy=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};zy.default=Iy});var oc=N(Oy=>{"use strict";Object.defineProperty(Oy,"__esModule",{value:!0});var Py=tc(),Ty=class extends Error{constructor(t,n,i,r){super(r||`can't resolve reference ${i} from id ${n}`),this.missingRef=(0,Py.resolveUrl)(t,n,i),this.missingSchema=(0,Py.normalizeId)((0,Py.getFullPath)(t,this.missingRef))}};Oy.default=Ty});var Cf=N(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.resolveSchema=tr.getCompilingSchema=tr.resolveRef=tr.compileSchema=tr.SchemaEnv=void 0;var pr=ie(),wD=Df(),oi=Br(),mr=tc(),zS=pe(),kD=ic(),Fo=class{constructor(t){var n;this.refs={},this.dynamicAnchors={};let i;typeof t.schema=="object"&&(i=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(n=t.baseId)!==null&&n!==void 0?n:(0,mr.normalizeId)(i?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=i?.$async,this.refs={}}};tr.SchemaEnv=Fo;function Ey(e){let t=PS.call(this,e);if(t)return t;let n=(0,mr.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:i,lines:r}=this.opts.code,{ownProperties:o}=this.opts,a=new pr.CodeGen(this.scope,{es5:i,lines:r,ownProperties:o}),s;e.$async&&(s=a.scopeValue("Error",{ref:wD.default,code:(0,pr._)`require("ajv/dist/runtime/validation_error").default`}));let c=a.scopeName("validate");e.validateName=c;let u={gen:a,allErrors:this.opts.allErrors,data:oi.default.data,parentData:oi.default.parentData,parentDataProperty:oi.default.parentDataProperty,dataNames:[oi.default.data],dataPathArr:[pr.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,pr.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:s,schema:e.schema,schemaEnv:e,rootId:n,baseId:e.baseId||n,schemaPath:pr.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,pr._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(e),(0,kD.validateFunctionCode)(u),a.optimize(this.opts.code.optimize);let d=a.toString();l=`${a.scopeRefs(oi.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,e));let p=new Function(`${oi.default.self}`,`${oi.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:p}),p.errors=null,p.schema=e.schema,p.schemaEnv=e,e.$async&&(p.$async=!0),this.opts.code.source===!0&&(p.source={validateName:c,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:m,items:h}=u;p.evaluated={props:m instanceof pr.Name?void 0:m,items:h instanceof pr.Name?void 0:h,dynamicProps:m instanceof pr.Name,dynamicItems:h instanceof pr.Name},p.source&&(p.source.evaluated=(0,pr.stringify)(p.evaluated))}return e.validate=p,e}catch(d){throw delete e.validate,delete e.validateName,l&&this.logger.error("Error compiling schema, function code:",l),d}finally{this._compilations.delete(e)}}tr.compileSchema=Ey;function xD(e,t,n){var i;n=(0,mr.resolveUrl)(this.opts.uriResolver,t,n);let r=e.refs[n];if(r)return r;let o=zD.call(this,e,n);if(o===void 0){let a=(i=e.localRefs)===null||i===void 0?void 0:i[n],{schemaId:s}=this.opts;a&&(o=new Fo({schema:a,schemaId:s,root:e,baseId:t}))}if(o!==void 0)return e.refs[n]=SD.call(this,o)}tr.resolveRef=xD;function SD(e){return(0,mr.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Ey.call(this,e)}function PS(e){for(let t of this._compilations)if(ID(t,e))return t}tr.getCompilingSchema=PS;function ID(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function zD(e,t){let n;for(;typeof(n=this.refs[t])=="string";)t=n;return n||this.schemas[t]||Rf.call(this,e,t)}function Rf(e,t){let n=this.opts.uriResolver.parse(t),i=(0,mr._getFullPath)(this.opts.uriResolver,n),r=(0,mr.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&i===r)return jy.call(this,n,e);let o=(0,mr.normalizeId)(i),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){let s=Rf.call(this,e,a);return typeof s?.schema!="object"?void 0:jy.call(this,n,s)}if(typeof a?.schema=="object"){if(a.validate||Ey.call(this,a),o===(0,mr.normalizeId)(t)){let{schema:s}=a,{schemaId:c}=this.opts,u=s[c];return u&&(r=(0,mr.resolveUrl)(this.opts.uriResolver,r,u)),new Fo({schema:s,schemaId:c,root:e,baseId:r})}return jy.call(this,n,a)}}tr.resolveSchema=Rf;var PD=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function jy(e,{baseId:t,schema:n,root:i}){var r;if(((r=e.fragment)===null||r===void 0?void 0:r[0])!=="/")return;for(let s of e.fragment.slice(1).split("/")){if(typeof n=="boolean")return;let c=n[(0,zS.unescapeFragment)(s)];if(c===void 0)return;n=c;let u=typeof n=="object"&&n[this.opts.schemaId];!PD.has(s)&&u&&(t=(0,mr.resolveUrl)(this.opts.uriResolver,t,u))}let o;if(typeof n!="boolean"&&n.$ref&&!(0,zS.schemaHasRulesButRef)(n,this.RULES)){let s=(0,mr.resolveUrl)(this.opts.uriResolver,t,n.$ref);o=Rf.call(this,i,s)}let{schemaId:a}=this.opts;if(o=o||new Fo({schema:n,schemaId:a,root:i,baseId:t}),o.schema!==o.root.schema)return o}});var TS=N((N5,TD)=>{TD.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var Uy=N((A5,CS)=>{"use strict";var OD=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Ay=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),jD=RegExp.prototype.test.bind(/^\d*$/u),ai=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Dy=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),jS=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),Ry=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),ED=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),At=new Array(256);{let e="0123456789ABCDEF";for(let t=0;t<256;t++)At[t]="%"+e[t>>4]+e[t&15]}function ft(e){return e<2048?At[192|e>>6]+At[128|e&63]:e<65536?At[224|e>>12]+At[128|e>>6&63]+At[128|e&63]:At[240|e>>18]+At[128|e>>12&63]+At[128|e>>6&63]+At[128|e&63]}function ND(e){let t="",n=0,i=0;for(i=0;i<e.length;i++)if(n=e[i].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";t+=e[i];break}for(i+=1;i<e.length;i++){if(n=e[i].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";t+=e[i]}return t}var AD=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),DD=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),RD=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),CD=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function UD(e){if(e.length===0)return!1;for(let t=0;t<e.length;t++)if(!RD(e[t])){if(e[t]==="%"&&t+2<e.length&&ai(e.slice(t+1,t+3))){t+=2;continue}return!1}return!0}function OS(e){let t=-1,n=0,i=-1,r=0;for(let s=0;s<e.length;s++)e[s]==="0"?(i===-1&&(i=s),r++,r>n&&(n=r,t=i)):(i=-1,r=0);if(n<2)return e.join(":");let o=e.slice(0,t).join(":"),a=e.slice(t+n).join(":");return o+"::"+a}function ZD(e){let t=e.indexOf("::");if(t!==-1&&e.indexOf("::",t+1)!==-1)return;let n=t===-1?e.split(":"):e.slice(0,t).split(":"),i=t===-1?[]:e.slice(t+2).split(":");t!==-1&&(n.length===1&&n[0]===""&&(n.length=0),i.length===1&&i[0]===""&&(i.length=0));let r=n.concat(i),o=0;for(let s=0;s<r.length;s++){let c=r[s];if(c==="")return;if(c.indexOf(".")!==-1){if(s!==r.length-1||t!==-1&&i.length===0||!Ay(c))return;o+=2;continue}if(!AD(c))return;r[s]=parseInt(c,16).toString(16),o++}if(t===-1)return o!==8?void 0:OS(r);if(o>=8)return;let a=r.slice(0,n.length);for(let s=o;s<8;s++)a.push("0");for(let s=n.length;s<r.length;s++)a.push(r[s]);return OS(a)}function Ny(e){let t=e[0]==="["&&e[e.length-1]==="]";if((e[0]==="["||e[e.length-1]==="]")&&!t)return{host:e,isIPV6:!1,error:!0};let i=t?e.slice(1,-1):e;if(t&&DD(i))return i=i.toLowerCase(),{host:`[${i}]`,escapedHost:i,isIPV6:!1,isIPVFuture:!0};if(MD(i,":")<2)return{host:e,isIPV6:!1,error:t};let r="",o=i.indexOf("%");if(o!==-1){let s=i.slice(o,o+3).toLowerCase()==="%25"?3:1;if(r=i.slice(o+s),!UD(r))return{host:e,isIPV6:!1,error:!0};i=i.slice(0,o)}let a=ZD(i);return a===void 0?{host:e,isIPV6:!1,error:!0}:{host:a+(r?"%"+r:""),escapedHost:a+(r?"%25"+r:""),isIPV6:!0}}function MD(e,t){let n=0;for(let i=0;i<e.length;i++)e[i]===t&&n++;return n}function ES(e){let t=e,n=[],i=-1,r=0;for(;r=t.length;){if(r===1){if(t===".")break;if(t==="/"){n.push("/");break}else{n.push(t);break}}else if(r===2){if(t[0]==="."){if(t[1]===".")break;if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&(t[1]==="."||t[1]==="/")){n.push("/");break}}else if(r===3&&t==="/.."){n.length!==0&&n.pop(),n.push("/");break}if(t[0]==="."){if(t[1]==="."){if(t[2]==="/"){t=t.slice(3);continue}}else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."&&t[3]==="/"){t=t.slice(3),n.length!==0&&n.pop();continue}}if((i=t.indexOf("/",1))===-1){n.push(t);break}else n.push(t.slice(0,i)),t=t.slice(i)}return n.join("")}function LD(e){if(e===""||e[0]==="/")return ES(e);let t=e.split("/"),n=t.length-1,i=[],r=!1;for(let o=0;o<=n;o++){let a=t[o];a==="."||a===".."?(a===".."&&(i.length!==0&&i[i.length-1]!==".."?i.pop():i.push("..")),r=o===n):i.push(a)}return r&&i[i.length-1]!==".."&&i.push(""),(i.length===0||i[0]===""||i[0].includes(":"))&&i.unshift("."),i.join("/")}var VD={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},FD=/[@/?#:]/g,qD=/[@/?#]/g;function NS(e,t){let n=t?qD:FD;return n.lastIndex=0,e.replace(n,i=>VD[i])}function AS(e,t=!1){if(e.indexOf("%")===-1)return e;let n="";for(let i=0;i<e.length;i++){if(e[i]==="%"&&i+2<e.length){let r=e.slice(i+1,i+3);if(ai(r)){let o=r.toUpperCase(),a=String.fromCharCode(parseInt(o,16));t&&Dy(a)?n+=a:n+="%"+o,i+=2;continue}}n+=e[i]}return n}function BD(e){let t="";for(let n=0;n<e.length;n++){let i=e[n];if(i==="%"&&n+2<e.length){let r=e.slice(n+1,n+3);if(ai(r)){let o=r.toUpperCase(),a=String.fromCharCode(parseInt(o,16));a!=="."&&Dy(a)?t+=a:t+="%"+o,n+=2;continue}}if(jS(i))t+=i;else{let r=e.charCodeAt(n);if(r<128)t+=RS(r)?i:At[r];else if(r<55296||r>57343)t+=ft(r);else if(r<=56319&&n+1<e.length){let o=e.charCodeAt(n+1);o>=56320&&o<=57343?(t+=ft(65536+(r-55296<<10)+(o-56320)),n++):t+=ft(65533)}else t+=ft(65533)}}return t}function HD(e,t=!1){let n="",i=t&&e[0]!=="/";for(let r=0;r<e.length;r++){let o=e[r];if(o==="%"&&r+2<e.length){let a=e.slice(r+1,r+3);if(ai(a)){n+="%"+a.toUpperCase(),r+=2;continue}}if(o==="/"&&(i=!1),jS(o)&&(o!==":"||!i))n+=o;else{let a=e.charCodeAt(r);if(a<128)n+=At[a];else if(a<55296||a>57343)n+=ft(a);else if(a<=56319&&r+1<e.length){let s=e.charCodeAt(r+1);s>=56320&&s<=57343?(n+=ft(65536+(a-55296<<10)+(s-56320)),r++):n+=ft(65533)}else n+=ft(65533)}}return n}function Cy(e,t){let n="";for(let i=0;i<e.length;i++){let r=e[i];if(r==="%"&&i+2<e.length){let o=e.slice(i+1,i+3);if(ai(o)){n+="%"+o.toUpperCase(),i+=2;continue}}if(t(r))n+=r;else{let o=e.charCodeAt(i);if(o<128)n+=At[o];else if(o<55296||o>57343)n+=ft(o);else if(o<=56319&&i+1<e.length){let a=e.charCodeAt(i+1);a>=56320&&a<=57343?(n+=ft(65536+(o-55296<<10)+(a-56320)),i++):n+=ft(65533)}else n+=ft(65533)}}return n}function DS(e){return Cy(e,ED)}function JD(e){return Cy(e,Ry)}function KD(e){return Cy(e,Ry)}function RS(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===42||e===43||e===45||e===46||e===47||e===64||e===95}function GD(e){let t="";for(let n=0;n<e.length;n++){let i=e[n];if(i==="%"&&n+2<e.length){let r=e.slice(n+1,n+3);if(ai(r)){let o=r.toUpperCase(),a=String.fromCharCode(parseInt(o,16));Dy(a)?t+=a:t+="%"+o,n+=2;continue}}if(Ry(i))t+=i;else{let r=e.charCodeAt(n);if(r<128)t+=RS(r)?i:At[r];else if(r<55296||r>57343)t+=ft(r);else if(r<=56319&&n+1<e.length){let o=e.charCodeAt(n+1);o>=56320&&o<=57343?(t+=ft(65536+(r-55296<<10)+(o-56320)),n++):t+=ft(65533)}else t+=ft(65533)}}return t}function WD(e){let t="";for(let n=0;n<e.length;n++){if(e[n]==="%"&&n+2<e.length){let i=e.slice(n+1,n+3);if(ai(i)){t+="%"+i.toUpperCase(),n+=2;continue}}t+=escape(e[n])}return t}function XD(e){let t=[];if(e.userinfo!==void 0&&(t.push(DS(e.userinfo)),t.push("@")),e.host!==void 0){let n=e.host;if(!Ay(n)){let i=Ny(n);i.isIPV6!==!0&&i.isIPVFuture!==!0&&(n=AS(n,!0),i=Ny(n)),i.isIPV6===!0||i.isIPVFuture===!0?n=`[${i.escapedHost}]`:n=NS(n,!1)}t.push(n)}if(typeof e.port=="number"||typeof e.port=="string"){let n=String(e.port);if(!jD(n))throw new TypeError("URI port is malformed.");t.push(":"),t.push(n)}return t.length?t.join(""):void 0}CS.exports={nonSimpleDomain:CD,recomposeAuthority:XD,reescapeHostDelimiters:NS,normalizePercentEncoding:AS,normalizePathEncoding:BD,serializePathEncoding:HD,normalizeQueryFragmentEncoding:GD,encodeUserinfo:DS,encodeQuery:JD,encodeFragment:KD,escapePreservingEscapes:WD,removeDotSegments:ES,removeDotSegmentsRelative:LD,isIPv4:Ay,isUUID:OD,normalizeIPv6:Ny,stringArrayToHexStripped:ND}});var VS=N((D5,LS)=>{"use strict";var{isUUID:YD}=Uy(),QD=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,eR=["http","https","ws","wss","urn","urn:uuid"];function tR(e){return eR.indexOf(e)!==-1}function Zy(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S"):!1}function US(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function ZS(e){let t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function rR(e){return e.secure=Zy(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function nR(e){if((e.port===(Zy(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let t=e.resourceName.indexOf("?"),n=t===-1?e.resourceName:e.resourceName.slice(0,t);e.path=n&&n!=="/"?n:void 0,e.query=t===-1?void 0:e.resourceName.slice(t+1),e.resourceName=void 0}return e.fragment=void 0,e}function iR(e,t){if(!e.path)return e.error="URN can not be parsed",e;let n=e.path.match(QD);if(n&&n[0]===e.path){let i=t.scheme||e.scheme||"urn";e.nid=n[1].toLowerCase(),e.nss=n[2];let r=`${i}:${t.nid||e.nid}`,o=My(r);e.path=void 0,o&&(e=o.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function oR(e,t){if(e.nid===void 0)throw new Error("URN without nid cannot be serialized");let n=t.scheme||e.scheme||"urn",i=e.nid.toLowerCase(),r=`${n}:${t.nid||i}`,o=My(r);o&&(e=o.serialize(e,t));let a=e,s=e.nss;return a.path=`${i||t.nid}:${s}`,t.skipEscape=!0,a}function aR(e,t){let n=e;return n.uuid=n.nss,n.nss=void 0,!t.tolerant&&(!n.uuid||!YD(n.uuid))&&(n.error=n.error||"UUID is not valid."),n}function sR(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var MS={scheme:"http",domainHost:!0,parse:US,serialize:ZS},cR={scheme:"https",domainHost:MS.domainHost,parse:US,serialize:ZS},Uf={scheme:"ws",domainHost:!0,parse:rR,serialize:nR},uR={scheme:"wss",domainHost:Uf.domainHost,parse:Uf.parse,serialize:Uf.serialize},lR={scheme:"urn",parse:iR,serialize:oR,skipNormalize:!0},dR={scheme:"urn:uuid",parse:aR,serialize:sR,skipNormalize:!0},Zf={http:MS,https:cR,ws:Uf,wss:uR,urn:lR,"urn:uuid":dR};Object.setPrototypeOf(Zf,null);function My(e){return e&&(Zf[e]||Zf[e.toLowerCase()])||void 0}LS.exports={wsIsSecure:Zy,SCHEMES:Zf,isValidSchemeName:tR,getSchemeHandler:My}});var nI=N((R5,qf)=>{"use strict";var{normalizeIPv6:JS,removeDotSegments:sc,removeDotSegmentsRelative:KS,recomposeAuthority:fR,normalizePercentEncoding:Ly,normalizePathEncoding:pR,serializePathEncoding:FS,normalizeQueryFragmentEncoding:qS,encodeQuery:mR,encodeFragment:hR,reescapeHostDelimiters:gR,isIPv4:GS,nonSimpleDomain:vR}=Uy(),{SCHEMES:WS,getSchemeHandler:Vy}=VS(),XS=/^[A-Za-z][A-Za-z0-9+.-]*$/u,YS="URI scheme is malformed.",Mf="URI host is malformed.",yR=/[\0-\x20"#/:<>?@[\\\]^`{|}\x7F]/u;function BS(e){let t=String(e);if(!XS.test(t))throw new TypeError(YS);return t}function _R(e,t){return typeof e=="string"?e=PR(e,t):typeof e=="object"&&(e=Vf(si(e,t),t)),e}function $R(e,t,n){let i=n?Object.assign({scheme:"null"},n):{scheme:"null"},{parsed:r,malformedAuthorityOrPort:o,malformedPercentEncoding:a,malformedSchemeSpecific:s,malformedHost:c,malformedScheme:u}=Lf(e,i),{parsed:l,malformedAuthorityOrPort:d,malformedPercentEncoding:f,malformedSchemeSpecific:p,malformedHost:m,malformedScheme:h}=Lf(t,i);if(o||d||a||f||s||p||c||m||u||h)throw new Error(r.error||l.error||"URI is malformed.");let g=QS(r,l,i,!0),_=Vy(n&&n.scheme||g.scheme),$=g.host,x=$!==void 0&&$!==""&&(GS($)||JS($).isIPV6);if(tI(g,n||{},_,x))throw new Error(Mf);eI(g,n||{},_,x);let O=$&&$.indexOf("%")!==-1&&!new RegExp("\\P{ASCII}","u").test($);if(g.error&&!O)throw new Error(g.error);return i.skipEscape=!0,si(g,i)}function QS(e,t,n,i){let r={};if(i||(e=Vf(si(e,n),n),t=Vf(si(t,n),n)),n=n||{},!n.tolerant&&t.scheme)r.scheme=t.scheme,r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=sc(t.path||""),r.query=t.query;else{if(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=sc(t.path||""),r.query=t.query;else{if(!t.path)r.path=e.path,t.query!==void 0?r.query=t.query:r.query=e.query;else{if(t.path[0]==="/")r.path=sc(t.path);else{let o=e.userinfo!==void 0||e.host!==void 0||e.port!==void 0;o&&!e.path?r.path="/"+t.path:e.path?r.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:r.path=t.path,r.path=e.scheme===void 0&&!o&&r.path[0]!=="/"?KS(r.path):sc(r.path)}r.query=t.query}r.userinfo=e.userinfo,r.host=e.host,r.port=e.port}r.scheme=e.scheme}return r.fragment=t.fragment,r}function bR(e,t,n){let i=HS(e,n),r=HS(t,n);return i!==void 0&&r!==void 0&&i===r}function si(e,t){let n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},i=Object.assign({},t),r=[];n.scheme&&(n.scheme=BS(n.scheme));let o=Vy(i.scheme||n.scheme);o&&o.serialize&&o.serialize(n,i);let a=n.userinfo!==void 0||n.host!==void 0||n.port!==void 0,s=(n.scheme===void 0||i.reference==="suffix")&&!a,c=!i.skipEscape&&s;n.path!==void 0&&(i.skipEscape?n.path=Ly(n.path):n.path=FS(n.path,c)),i.reference!=="suffix"&&n.scheme&&(n.scheme=BS(n.scheme),r.push(n.scheme,":"));let u=fR(n);if(u!==void 0&&(i.reference!=="suffix"&&r.push("//"),r.push(u),n.path&&n.path[0]!=="/"&&r.push("/")),n.path!==void 0){let l=n.path;!i.absolutePath&&(!o||!o.absolutePath)&&(l=s&&l[0]!=="/"?KS(l):sc(l)),s&&(l=FS(l,!0)),u===void 0&&l[0]==="/"&&l[1]==="/"&&(l="/%2F"+l.slice(2)),r.push(l)}return n.query!==void 0&&r.push("?",mR(n.query)),n.fragment!==void 0&&r.push("#",hR(n.fragment)),r.join("")}var wR=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,kR=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,xR=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function SR(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof e.port=="number"&&(e.port<0||e.port>65535))return"URI port is malformed."}function ac(e){if(e===void 0)return!1;let t=e.indexOf("%");for(;t!==-1;){if(t+2>=e.length||!/^[\da-f]{2}$/iu.test(e.slice(t+1,t+3)))return!0;t=e.indexOf("%",t+3)}return!1}function Ff(e){return e[0]==="["&&e[e.length-1]==="]"}function IR(e){let t=e[4];return ac(e[3])||t!==void 0&&!Ff(t)&&ac(t)||ac(e[6])||ac(e[7])||ac(e[8])}function eI(e,t,n,i){if(tI(e,t,n,i))return e.error=e.error||Mf,!0;if(!t.unicodeSupport&&(!n||!n.unicodeSupport)&&e.host&&!Ff(e.host)&&(t.domainHost||n&&n.domainHost)&&i===!1&&vR(e.host)){let r;try{r=new URL("http://"+e.host)}catch(o){return e.error=e.error||"Host's domain name can not be converted to ASCII: "+o,!0}if(!zR(r))return e.error=e.error||Mf,!0;e.host=r.hostname}return!1}function tI(e,t,n,i){return!!(e.host&&i===!1&&!Ff(e.host)&&(t.domainHost||n&&n.domainHost)&&yR.test(e.host))}function zR(e){return e.username===""&&e.password===""&&e.port===""&&e.pathname==="/"&&e.search===""&&e.hash===""&&e.hostname!==""}function Lf(e,t){let n=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},r=!1,o=!1,a=!1,s=!1,c=!1,u=!1,l=!1;n.reference==="suffix"&&(n.scheme?e=n.scheme+":"+e:e="//"+e);let d=e.match(kR);d!==null&&d[1].indexOf("\\")!==-1&&(i.error="URI authority must not contain a literal backslash.",r=!0);let f=e.match(xR);if(f!==null){let m=f[1],h=m.replace(/[\t\n\r]/g,"");h.length>=2&&(h.slice(0,2)!=="//"?(i.error=i.error||"URI authority must not contain a literal backslash.",r=!0):m.length!==h.length&&(i.error=i.error||"URI authority introducer must not contain whitespace.",r=!0))}let p=e.match(wR);if(p){i.scheme=p[1],i.userinfo=p[3],i.host=p[4],i.port=parseInt(p[5],10),i.path=p[6]||"",i.query=p[7],i.fragment=p[8],i.scheme!==void 0&&(XS.test(i.scheme)?i.scheme=i.scheme.toLowerCase():(i.error=i.error||YS,u=!0)),o=IR(p),o&&(i.error=i.error||"URI contains malformed percent-encoding."),isNaN(i.port)&&(i.port=p[5]);let m=SR(i,p);if(m!==void 0&&(i.error=i.error||m,r=!0),i.host)if(GS(i.host)===!1){let _=Ff(i.host),$=i.host.indexOf("[")!==-1||i.host.indexOf("]")!==-1,x=JS(i.host);l=x.isIPV6||x.isIPVFuture===!0,c=$&&(!_||x.error===!0),i.host=l?x.host:x.host.toLowerCase(),c&&(i.error=i.error||Mf,r=!0)}else l=!0;i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path?i.reference="same-document":i.scheme===void 0?i.reference="relative":i.fragment===void 0?i.reference="absolute":i.reference="uri",n.reference&&n.reference!=="suffix"&&n.reference!==i.reference&&(i.error=i.error||"URI is not a "+n.reference+" reference.");let h=Vy(n.scheme||i.scheme);if(c||(s=eI(i,n,h,l)),e.indexOf("%")!==-1&&i.host!==void 0&&!c){let g=l?i.host:Ly(i.host,!0);l||(g=Ly(g.toLowerCase())),i.host=l||n.scheme!=="null"?gR(g,l):g}(!h||h&&!h.skipNormalize)&&(i.path&&(i.path=pR(i.path)),i.query&&(i.query=qS(i.query)),i.fragment&&(i.fragment=qS(i.fragment))),h&&h.parse&&(h.parse(i,n),h===WS.urn&&i.nid===void 0&&(a=!0))}else i.error=i.error||"URI can not be parsed.";return{parsed:i,malformedAuthorityOrPort:r,malformedPercentEncoding:o,malformedSchemeSpecific:a,malformedHost:s,malformedScheme:u}}function Vf(e,t){return Lf(e,t).parsed}function PR(e,t){return rI(e,t).normalized}function rI(e,t){let{parsed:n,malformedAuthorityOrPort:i,malformedPercentEncoding:r,malformedSchemeSpecific:o,malformedHost:a,malformedScheme:s}=Lf(e,t);return{normalized:i||r||o||a||s?e:si(n,t),malformedAuthorityOrPort:i,malformedPercentEncoding:r,malformedSchemeSpecific:o,malformedHost:a,malformedScheme:s}}function HS(e,t){if(typeof e!="string"&&typeof e!="object")return;let n;try{n=typeof e=="string"?e:si(e,t)}catch{return}let{normalized:i,malformedAuthorityOrPort:r,malformedPercentEncoding:o,malformedSchemeSpecific:a,malformedHost:s,malformedScheme:c}=rI(n,t);return r||o||a||s||c?void 0:i}var Fy={SCHEMES:WS,normalize:_R,resolve:$R,resolveComponent:QS,equal:bR,serialize:si,parse:Vf};qf.exports=Fy;qf.exports.default=Fy;qf.exports.fastUri=Fy});var oI=N(qy=>{"use strict";Object.defineProperty(qy,"__esModule",{value:!0});var iI=nI();iI.code='require("ajv/dist/runtime/uri").default';qy.default=iI});var pI=N(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.CodeGen=it.Name=it.nil=it.stringify=it.str=it._=it.KeywordCxt=void 0;var TR=ic();Object.defineProperty(it,"KeywordCxt",{enumerable:!0,get:function(){return TR.KeywordCxt}});var qo=ie();Object.defineProperty(it,"_",{enumerable:!0,get:function(){return qo._}});Object.defineProperty(it,"str",{enumerable:!0,get:function(){return qo.str}});Object.defineProperty(it,"stringify",{enumerable:!0,get:function(){return qo.stringify}});Object.defineProperty(it,"nil",{enumerable:!0,get:function(){return qo.nil}});Object.defineProperty(it,"Name",{enumerable:!0,get:function(){return qo.Name}});Object.defineProperty(it,"CodeGen",{enumerable:!0,get:function(){return qo.CodeGen}});var OR=Df(),lI=oc(),jR=py(),cc=Cf(),ER=ie(),uc=tc(),Bf=ec(),Hy=pe(),aI=TS(),NR=oI(),dI=(e,t)=>new RegExp(e,t);dI.code="new RegExp";var AR=["removeAdditional","useDefaults","coerceTypes"],DR=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),RR={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},CR={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},sI=200;function UR(e){var t,n,i,r,o,a,s,c,u,l,d,f,p,m,h,g,_,$,x,O,T,C,G,Q,X;let Pe=e.strict,je=(t=e.code)===null||t===void 0?void 0:t.optimize,Ve=je===!0||je===void 0?1:je||0,Rt=(i=(n=e.code)===null||n===void 0?void 0:n.regExp)!==null&&i!==void 0?i:dI,mt=(r=e.uriResolver)!==null&&r!==void 0?r:NR.default;return{strictSchema:(a=(o=e.strictSchema)!==null&&o!==void 0?o:Pe)!==null&&a!==void 0?a:!0,strictNumbers:(c=(s=e.strictNumbers)!==null&&s!==void 0?s:Pe)!==null&&c!==void 0?c:!0,strictTypes:(l=(u=e.strictTypes)!==null&&u!==void 0?u:Pe)!==null&&l!==void 0?l:"log",strictTuples:(f=(d=e.strictTuples)!==null&&d!==void 0?d:Pe)!==null&&f!==void 0?f:"log",strictRequired:(m=(p=e.strictRequired)!==null&&p!==void 0?p:Pe)!==null&&m!==void 0?m:!1,code:e.code?{...e.code,optimize:Ve,regExp:Rt}:{optimize:Ve,regExp:Rt},loopRequired:(h=e.loopRequired)!==null&&h!==void 0?h:sI,loopEnum:(g=e.loopEnum)!==null&&g!==void 0?g:sI,meta:(_=e.meta)!==null&&_!==void 0?_:!0,messages:($=e.messages)!==null&&$!==void 0?$:!0,inlineRefs:(x=e.inlineRefs)!==null&&x!==void 0?x:!0,schemaId:(O=e.schemaId)!==null&&O!==void 0?O:"$id",addUsedSchema:(T=e.addUsedSchema)!==null&&T!==void 0?T:!0,validateSchema:(C=e.validateSchema)!==null&&C!==void 0?C:!0,validateFormats:(G=e.validateFormats)!==null&&G!==void 0?G:!0,unicodeRegExp:(Q=e.unicodeRegExp)!==null&&Q!==void 0?Q:!0,int32range:(X=e.int32range)!==null&&X!==void 0?X:!0,uriResolver:mt}}var lc=class{constructor(t={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...UR(t)};let{es5:n,lines:i}=this.opts.code;this.scope=new ER.ValueScope({scope:{},prefixes:DR,es5:n,lines:i}),this.logger=qR(t.logger);let r=t.validateFormats;t.validateFormats=!1,this.RULES=(0,jR.getRules)(),cI.call(this,RR,t,"NOT SUPPORTED"),cI.call(this,CR,t,"DEPRECATED","warn"),this._metaOpts=VR.call(this),t.formats&&MR.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&LR.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),ZR.call(this),t.validateFormats=r}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:n,schemaId:i}=this.opts,r=aI;i==="id"&&(r={...aI},r.id=r.$id,delete r.$id),n&&t&&this.addMetaSchema(r,r[i],!1)}defaultMeta(){let{meta:t,schemaId:n}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[n]||t:void 0}validate(t,n){let i;if(typeof t=="string"){if(i=this.getSchema(t),!i)throw new Error(`no schema with key or ref "${t}"`)}else i=this.compile(t);let r=i(n);return"$async"in i||(this.errors=i.errors),r}compile(t,n){let i=this._addSchema(t,n);return i.validate||this._compileSchemaEnv(i)}compileAsync(t,n){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:i}=this.opts;return r.call(this,t,n);async function r(l,d){await o.call(this,l.$schema);let f=this._addSchema(l,d);return f.validate||a.call(this,f)}async function o(l){l&&!this.getSchema(l)&&await r.call(this,{$ref:l},!0)}async function a(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof lI.default))throw d;return s.call(this,d),await c.call(this,d.missingSchema),a.call(this,l)}}function s({missingSchema:l,missingRef:d}){if(this.refs[l])throw new Error(`AnySchema ${l} is loaded but ${d} cannot be resolved`)}async function c(l){let d=await u.call(this,l);this.refs[l]||await o.call(this,d.$schema),this.refs[l]||this.addSchema(d,l,n)}async function u(l){let d=this._loading[l];if(d)return d;try{return await(this._loading[l]=i(l))}finally{delete this._loading[l]}}}addSchema(t,n,i,r=this.opts.validateSchema){if(Array.isArray(t)){for(let a of t)this.addSchema(a,void 0,i,r);return this}let o;if(typeof t=="object"){let{schemaId:a}=this.opts;if(o=t[a],o!==void 0&&typeof o!="string")throw new Error(`schema ${a} must be string`)}return n=(0,uc.normalizeId)(n||o),this._checkUnique(n),this.schemas[n]=this._addSchema(t,i,n,r,!0),this}addMetaSchema(t,n,i=this.opts.validateSchema){return this.addSchema(t,n,!0,i),this}validateSchema(t,n){if(typeof t=="boolean")return!0;let i;if(i=t.$schema,i!==void 0&&typeof i!="string")throw new Error("$schema must be a string");if(i=i||this.opts.defaultMeta||this.defaultMeta(),!i)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let r=this.validate(i,t);if(!r&&n){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return r}getSchema(t){let n;for(;typeof(n=uI.call(this,t))=="string";)t=n;if(n===void 0){let{schemaId:i}=this.opts,r=new cc.SchemaEnv({schema:{},schemaId:i});if(n=cc.resolveSchema.call(this,r,t),!n)return;this.refs[t]=n}return n.validate||this._compileSchemaEnv(n)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let n=uI.call(this,t);return typeof n=="object"&&this._cache.delete(n.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let n=t;this._cache.delete(n);let i=t[this.opts.schemaId];return i&&(i=(0,uc.normalizeId)(i),delete this.schemas[i],delete this.refs[i]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let n of t)this.addKeyword(n);return this}addKeyword(t,n){let i;if(typeof t=="string")i=t,typeof n=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),n.keyword=i);else if(typeof t=="object"&&n===void 0){if(n=t,i=n.keyword,Array.isArray(i)&&!i.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(HR.call(this,i,n),!n)return(0,Hy.eachItem)(i,o=>By.call(this,o)),this;KR.call(this,n);let r={...n,type:(0,Bf.getJSONTypes)(n.type),schemaType:(0,Bf.getJSONTypes)(n.schemaType)};return(0,Hy.eachItem)(i,r.type.length===0?o=>By.call(this,o,r):o=>r.type.forEach(a=>By.call(this,o,r,a))),this}getKeyword(t){let n=this.RULES.all[t];return typeof n=="object"?n.definition:!!n}removeKeyword(t){let{RULES:n}=this;delete n.keywords[t],delete n.all[t];for(let i of n.rules){let r=i.rules.findIndex(o=>o.keyword===t);r>=0&&i.rules.splice(r,1)}return this}addFormat(t,n){return typeof n=="string"&&(n=new RegExp(n)),this.formats[t]=n,this}errorsText(t=this.errors,{separator:n=", ",dataVar:i="data"}={}){return!t||t.length===0?"No errors":t.map(r=>`${i}${r.instancePath} ${r.message}`).reduce((r,o)=>r+n+o)}$dataMetaSchema(t,n){let i=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let r of n){let o=r.split("/").slice(1),a=t;for(let s of o)a=a[s];for(let s in i){let c=i[s];if(typeof c!="object")continue;let{$data:u}=c.definition,l=a[s];u&&l&&(a[s]=fI(l))}}return t}_removeAllSchemas(t,n){for(let i in t){let r=t[i];(!n||n.test(i))&&(typeof r=="string"?delete t[i]:r&&!r.meta&&(this._cache.delete(r.schema),delete t[i]))}}_addSchema(t,n,i,r=this.opts.validateSchema,o=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof t=="object")a=t[s];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(t);if(c!==void 0)return c;i=(0,uc.normalizeId)(a||i);let u=uc.getSchemaRefs.call(this,t,i);return c=new cc.SchemaEnv({schema:t,schemaId:s,meta:n,baseId:i,localRefs:u}),this._cache.set(c.schema,c),o&&!i.startsWith("#")&&(i&&this._checkUnique(i),this.refs[i]=c),r&&this.validateSchema(t,!0),c}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):cc.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let n=this.opts;this.opts=this._metaOpts;try{cc.compileSchema.call(this,t)}finally{this.opts=n}}};lc.ValidationError=OR.default;lc.MissingRefError=lI.default;it.default=lc;function cI(e,t,n,i="error"){for(let r in e){let o=r;o in t&&this.logger[i](`${n}: option ${r}. ${e[o]}`)}}function uI(e){return e=(0,uc.normalizeId)(e),this.schemas[e]||this.refs[e]}function ZR(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function MR(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function LR(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let n=e[t];n.keyword||(n.keyword=t),this.addKeyword(n)}}function VR(){let e={...this.opts};for(let t of AR)delete e[t];return e}var FR={log(){},warn(){},error(){}};function qR(e){if(e===!1)return FR;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}var BR=/^[a-z_$][a-z0-9_$:-]*$/i;function HR(e,t){let{RULES:n}=this;if((0,Hy.eachItem)(e,i=>{if(n.keywords[i])throw new Error(`Keyword ${i} is already defined`);if(!BR.test(i))throw new Error(`Keyword ${i} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function By(e,t,n){var i;let r=t?.post;if(n&&r)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,a=r?o.post:o.rules.find(({type:c})=>c===n);if(a||(a={type:n,rules:[]},o.rules.push(a)),o.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,Bf.getJSONTypes)(t.type),schemaType:(0,Bf.getJSONTypes)(t.schemaType)}};t.before?JR.call(this,a,s,t.before):a.rules.push(s),o.all[e]=s,(i=t.implements)===null||i===void 0||i.forEach(c=>this.addKeyword(c))}function JR(e,t,n){let i=e.rules.findIndex(r=>r.keyword===n);i>=0?e.rules.splice(i,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function KR(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=fI(t)),e.validateSchema=this.compile(t,!0))}var GR={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function fI(e){return{anyOf:[e,GR]}}});var mI=N(Jy=>{"use strict";Object.defineProperty(Jy,"__esModule",{value:!0});var WR={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Jy.default=WR});var yI=N(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.callRef=ci.getValidate=void 0;var XR=oc(),hI=er(),Dt=ie(),Bo=Br(),gI=Cf(),Hf=pe(),YR={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:n,it:i}=e,{baseId:r,schemaEnv:o,validateName:a,opts:s,self:c}=i,{root:u}=o;if((n==="#"||n==="#/")&&r===u.baseId)return d();let l=gI.resolveRef.call(c,u,r,n);if(l===void 0)throw new XR.default(i.opts.uriResolver,r,n);if(l instanceof gI.SchemaEnv)return f(l);return p(l);function d(){if(o===u)return Jf(e,a,o,o.$async);let m=t.scopeValue("root",{ref:u});return Jf(e,(0,Dt._)`${m}.validate`,u,u.$async)}function f(m){let h=vI(e,m);Jf(e,h,m,m.$async)}function p(m){let h=t.scopeValue("schema",s.code.source===!0?{ref:m,code:(0,Dt.stringify)(m)}:{ref:m}),g=t.name("valid"),_=e.subschema({schema:m,dataTypes:[],schemaPath:Dt.nil,topSchemaRef:h,errSchemaPath:n},g);e.mergeEvaluated(_),e.ok(g)}}};function vI(e,t){let{gen:n}=e;return t.validate?n.scopeValue("validate",{ref:t.validate}):(0,Dt._)`${n.scopeValue("wrapper",{ref:t})}.validate`}ci.getValidate=vI;function Jf(e,t,n,i){let{gen:r,it:o}=e,{allErrors:a,schemaEnv:s,opts:c}=o,u=c.passContext?Bo.default.this:Dt.nil;i?l():d();function l(){if(!s.$async)throw new Error("async schema referenced by sync schema");let m=r.let("valid");r.try(()=>{r.code((0,Dt._)`await ${(0,hI.callValidateCode)(e,t,u)}`),p(t),a||r.assign(m,!0)},h=>{r.if((0,Dt._)`!(${h} instanceof ${o.ValidationError})`,()=>r.throw(h)),f(h),a||r.assign(m,!1)}),e.ok(m)}function d(){e.result((0,hI.callValidateCode)(e,t,u),()=>p(t),()=>f(t))}function f(m){let h=(0,Dt._)`${m}.errors`;r.assign(Bo.default.vErrors,(0,Dt._)`${Bo.default.vErrors} === null ? ${h} : ${Bo.default.vErrors}.concat(${h})`),r.assign(Bo.default.errors,(0,Dt._)`${Bo.default.vErrors}.length`)}function p(m){var h;if(!o.opts.unevaluated)return;let g=(h=n?.validate)===null||h===void 0?void 0:h.evaluated;if(o.props!==!0)if(g&&!g.dynamicProps)g.props!==void 0&&(o.props=Hf.mergeEvaluated.props(r,g.props,o.props));else{let _=r.var("props",(0,Dt._)`${m}.evaluated.props`);o.props=Hf.mergeEvaluated.props(r,_,o.props,Dt.Name)}if(o.items!==!0)if(g&&!g.dynamicItems)g.items!==void 0&&(o.items=Hf.mergeEvaluated.items(r,g.items,o.items));else{let _=r.var("items",(0,Dt._)`${m}.evaluated.items`);o.items=Hf.mergeEvaluated.items(r,_,o.items,Dt.Name)}}}ci.callRef=Jf;ci.default=YR});var _I=N(Ky=>{"use strict";Object.defineProperty(Ky,"__esModule",{value:!0});var QR=mI(),eC=yI(),tC=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",QR.default,eC.default];Ky.default=tC});var $I=N(Gy=>{"use strict";Object.defineProperty(Gy,"__esModule",{value:!0});var Kf=ie(),xn=Kf.operators,Gf={maximum:{okStr:"<=",ok:xn.LTE,fail:xn.GT},minimum:{okStr:">=",ok:xn.GTE,fail:xn.LT},exclusiveMaximum:{okStr:"<",ok:xn.LT,fail:xn.GTE},exclusiveMinimum:{okStr:">",ok:xn.GT,fail:xn.LTE}},rC={message:({keyword:e,schemaCode:t})=>(0,Kf.str)`must be ${Gf[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Kf._)`{comparison: ${Gf[e].okStr}, limit: ${t}}`},nC={keyword:Object.keys(Gf),type:"number",schemaType:"number",$data:!0,error:rC,code(e){let{keyword:t,data:n,schemaCode:i}=e;e.fail$data((0,Kf._)`${n} ${Gf[t].fail} ${i} || isNaN(${n})`)}};Gy.default=nC});var bI=N(Wy=>{"use strict";Object.defineProperty(Wy,"__esModule",{value:!0});var dc=ie(),iC={message:({schemaCode:e})=>(0,dc.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,dc._)`{multipleOf: ${e}}`},oC={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:iC,code(e){let{gen:t,data:n,schemaCode:i,it:r}=e,o=r.opts.multipleOfPrecision,a=t.let("res"),s=o?(0,dc._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:(0,dc._)`${a} !== parseInt(${a})`;e.fail$data((0,dc._)`(${i} === 0 || (${a} = ${n}/${i}, ${s}))`)}};Wy.default=oC});var kI=N(Xy=>{"use strict";Object.defineProperty(Xy,"__esModule",{value:!0});function wI(e){let t=e.length,n=0,i=0,r;for(;i<t;)n++,r=e.charCodeAt(i++),r>=55296&&r<=56319&&i<t&&(r=e.charCodeAt(i),(r&64512)===56320&&i++);return n}Xy.default=wI;wI.code='require("ajv/dist/runtime/ucs2length").default'});var xI=N(Yy=>{"use strict";Object.defineProperty(Yy,"__esModule",{value:!0});var ui=ie(),aC=pe(),sC=kI(),cC={message({keyword:e,schemaCode:t}){let n=e==="maxLength"?"more":"fewer";return(0,ui.str)`must NOT have ${n} than ${t} characters`},params:({schemaCode:e})=>(0,ui._)`{limit: ${e}}`},uC={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:cC,code(e){let{keyword:t,data:n,schemaCode:i,it:r}=e,o=t==="maxLength"?ui.operators.GT:ui.operators.LT,a=r.opts.unicode===!1?(0,ui._)`${n}.length`:(0,ui._)`${(0,aC.useFunc)(e.gen,sC.default)}(${n})`;e.fail$data((0,ui._)`${a} ${o} ${i}`)}};Yy.default=uC});var SI=N(Qy=>{"use strict";Object.defineProperty(Qy,"__esModule",{value:!0});var lC=er(),dC=pe(),Ho=ie(),fC={message:({schemaCode:e})=>(0,Ho.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Ho._)`{pattern: ${e}}`},pC={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:fC,code(e){let{gen:t,data:n,$data:i,schema:r,schemaCode:o,it:a}=e,s=a.opts.unicodeRegExp?"u":"";if(i){let{regExp:c}=a.opts.code,u=c.code==="new RegExp"?(0,Ho._)`new RegExp`:(0,dC.useFunc)(t,c),l=t.let("valid");t.try(()=>t.assign(l,(0,Ho._)`${u}(${o}, ${s}).test(${n})`),()=>t.assign(l,!1)),e.fail$data((0,Ho._)`!${l}`)}else{let c=(0,lC.usePattern)(e,r);e.fail$data((0,Ho._)`!${c}.test(${n})`)}}};Qy.default=pC});var II=N(e_=>{"use strict";Object.defineProperty(e_,"__esModule",{value:!0});var fc=ie(),mC={message({keyword:e,schemaCode:t}){let n=e==="maxProperties"?"more":"fewer";return(0,fc.str)`must NOT have ${n} than ${t} properties`},params:({schemaCode:e})=>(0,fc._)`{limit: ${e}}`},hC={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:mC,code(e){let{keyword:t,data:n,schemaCode:i}=e,r=t==="maxProperties"?fc.operators.GT:fc.operators.LT;e.fail$data((0,fc._)`Object.keys(${n}).length ${r} ${i}`)}};e_.default=hC});var zI=N(t_=>{"use strict";Object.defineProperty(t_,"__esModule",{value:!0});var pc=er(),mc=ie(),gC=pe(),vC={message:({params:{missingProperty:e}})=>(0,mc.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,mc._)`{missingProperty: ${e}}`},yC={keyword:"required",type:"object",schemaType:"array",$data:!0,error:vC,code(e){let{gen:t,schema:n,schemaCode:i,data:r,$data:o,it:a}=e,{opts:s}=a;if(!o&&n.length===0)return;let c=n.length>=s.loopRequired;if(a.allErrors?u():l(),s.strictRequired){let p=e.parentSchema.properties,{definedProperties:m}=e.it;for(let h of n)if(p?.[h]===void 0&&!m.has(h)){let g=a.schemaEnv.baseId+a.errSchemaPath,_=`required property "${h}" is not defined at "${g}" (strictRequired)`;(0,gC.checkStrictMode)(a,_,a.opts.strictRequired)}}function u(){if(c||o)e.block$data(mc.nil,d);else for(let p of n)(0,pc.checkReportMissingProp)(e,p)}function l(){let p=t.let("missing");if(c||o){let m=t.let("valid",!0);e.block$data(m,()=>f(p,m)),e.ok(m)}else t.if((0,pc.checkMissingProp)(e,n,p)),(0,pc.reportMissingProp)(e,p),t.else()}function d(){t.forOf("prop",i,p=>{e.setParams({missingProperty:p}),t.if((0,pc.noPropertyInData)(t,r,p,s.ownProperties),()=>e.error())})}function f(p,m){e.setParams({missingProperty:p}),t.forOf(p,i,()=>{t.assign(m,(0,pc.propertyInData)(t,r,p,s.ownProperties)),t.if((0,mc.not)(m),()=>{e.error(),t.break()})},mc.nil)}}};t_.default=yC});var PI=N(r_=>{"use strict";Object.defineProperty(r_,"__esModule",{value:!0});var hc=ie(),_C={message({keyword:e,schemaCode:t}){let n=e==="maxItems"?"more":"fewer";return(0,hc.str)`must NOT have ${n} than ${t} items`},params:({schemaCode:e})=>(0,hc._)`{limit: ${e}}`},$C={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:_C,code(e){let{keyword:t,data:n,schemaCode:i}=e,r=t==="maxItems"?hc.operators.GT:hc.operators.LT;e.fail$data((0,hc._)`${n}.length ${r} ${i}`)}};r_.default=$C});var Wf=N(n_=>{"use strict";Object.defineProperty(n_,"__esModule",{value:!0});var TI=by();TI.code='require("ajv/dist/runtime/equal").default';n_.default=TI});var OI=N(o_=>{"use strict";Object.defineProperty(o_,"__esModule",{value:!0});var i_=ec(),ot=ie(),bC=pe(),wC=Wf(),kC={message:({params:{i:e,j:t}})=>(0,ot.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,ot._)`{i: ${e}, j: ${t}}`},xC={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:kC,code(e){let{gen:t,data:n,$data:i,schema:r,parentSchema:o,schemaCode:a,it:s}=e;if(!i&&!r)return;let c=t.let("valid"),u=o.items?(0,i_.getSchemaTypes)(o.items):[];e.block$data(c,l,(0,ot._)`${a} === false`),e.ok(c);function l(){let m=t.let("i",(0,ot._)`${n}.length`),h=t.let("j");e.setParams({i:m,j:h}),t.assign(c,!0),t.if((0,ot._)`${m} > 1`,()=>(d()?f:p)(m,h))}function d(){return u.length>0&&!u.some(m=>m==="object"||m==="array")}function f(m,h){let g=t.name("item"),_=(0,i_.checkDataTypes)(u,g,s.opts.strictNumbers,i_.DataType.Wrong),$=t.const("indices",(0,ot._)`{}`);t.for((0,ot._)`;${m}--;`,()=>{t.let(g,(0,ot._)`${n}[${m}]`),t.if(_,(0,ot._)`continue`),u.length>1&&t.if((0,ot._)`typeof ${g} == "string"`,(0,ot._)`${g} += "_"`),t.if((0,ot._)`typeof ${$}[${g}] == "number"`,()=>{t.assign(h,(0,ot._)`${$}[${g}]`),e.error(),t.assign(c,!1).break()}).code((0,ot._)`${$}[${g}] = ${m}`)})}function p(m,h){let g=(0,bC.useFunc)(t,wC.default),_=t.name("outer");t.label(_).for((0,ot._)`;${m}--;`,()=>t.for((0,ot._)`${h} = ${m}; ${h}--;`,()=>t.if((0,ot._)`${g}(${n}[${m}], ${n}[${h}])`,()=>{e.error(),t.assign(c,!1).break(_)})))}}};o_.default=xC});var jI=N(s_=>{"use strict";Object.defineProperty(s_,"__esModule",{value:!0});var a_=ie(),SC=pe(),IC=Wf(),zC={message:"must be equal to constant",params:({schemaCode:e})=>(0,a_._)`{allowedValue: ${e}}`},PC={keyword:"const",$data:!0,error:zC,code(e){let{gen:t,data:n,$data:i,schemaCode:r,schema:o}=e;i||o&&typeof o=="object"?e.fail$data((0,a_._)`!${(0,SC.useFunc)(t,IC.default)}(${n}, ${r})`):e.fail((0,a_._)`${o} !== ${n}`)}};s_.default=PC});var EI=N(c_=>{"use strict";Object.defineProperty(c_,"__esModule",{value:!0});var gc=ie(),TC=pe(),OC=Wf(),jC={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,gc._)`{allowedValues: ${e}}`},EC={keyword:"enum",schemaType:"array",$data:!0,error:jC,code(e){let{gen:t,data:n,$data:i,schema:r,schemaCode:o,it:a}=e;if(!i&&r.length===0)throw new Error("enum must have non-empty array");let s=r.length>=a.opts.loopEnum,c,u=()=>c??(c=(0,TC.useFunc)(t,OC.default)),l;if(s||i)l=t.let("valid"),e.block$data(l,d);else{if(!Array.isArray(r))throw new Error("ajv implementation error");let p=t.const("vSchema",o);l=(0,gc.or)(...r.map((m,h)=>f(p,h)))}e.pass(l);function d(){t.assign(l,!1),t.forOf("v",o,p=>t.if((0,gc._)`${u()}(${n}, ${p})`,()=>t.assign(l,!0).break()))}function f(p,m){let h=r[m];return typeof h=="object"&&h!==null?(0,gc._)`${u()}(${n}, ${p}[${m}])`:(0,gc._)`${n} === ${h}`}}};c_.default=EC});var NI=N(u_=>{"use strict";Object.defineProperty(u_,"__esModule",{value:!0});var NC=$I(),AC=bI(),DC=xI(),RC=SI(),CC=II(),UC=zI(),ZC=PI(),MC=OI(),LC=jI(),VC=EI(),FC=[NC.default,AC.default,DC.default,RC.default,CC.default,UC.default,ZC.default,MC.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},LC.default,VC.default];u_.default=FC});var d_=N(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});vc.validateAdditionalItems=void 0;var li=ie(),l_=pe(),qC={message:({params:{len:e}})=>(0,li.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,li._)`{limit: ${e}}`},BC={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:qC,code(e){let{parentSchema:t,it:n}=e,{items:i}=t;if(!Array.isArray(i)){(0,l_.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}AI(e,i)}};function AI(e,t){let{gen:n,schema:i,data:r,keyword:o,it:a}=e;a.items=!0;let s=n.const("len",(0,li._)`${r}.length`);if(i===!1)e.setParams({len:t.length}),e.pass((0,li._)`${s} <= ${t.length}`);else if(typeof i=="object"&&!(0,l_.alwaysValidSchema)(a,i)){let u=n.var("valid",(0,li._)`${s} <= ${t.length}`);n.if((0,li.not)(u),()=>c(u)),e.ok(u)}function c(u){n.forRange("i",t.length,s,l=>{e.subschema({keyword:o,dataProp:l,dataPropType:l_.Type.Num},u),a.allErrors||n.if((0,li.not)(u),()=>n.break())})}}vc.validateAdditionalItems=AI;vc.default=BC});var f_=N(yc=>{"use strict";Object.defineProperty(yc,"__esModule",{value:!0});yc.validateTuple=void 0;var DI=ie(),Xf=pe(),HC=er(),JC={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:n}=e;if(Array.isArray(t))return RI(e,"additionalItems",t);n.items=!0,!(0,Xf.alwaysValidSchema)(n,t)&&e.ok((0,HC.validateArray)(e))}};function RI(e,t,n=e.schema){let{gen:i,parentSchema:r,data:o,keyword:a,it:s}=e;l(r),s.opts.unevaluated&&n.length&&s.items!==!0&&(s.items=Xf.mergeEvaluated.items(i,n.length,s.items));let c=i.name("valid"),u=i.const("len",(0,DI._)`${o}.length`);n.forEach((d,f)=>{(0,Xf.alwaysValidSchema)(s,d)||(i.if((0,DI._)`${u} > ${f}`,()=>e.subschema({keyword:a,schemaProp:f,dataProp:f},c)),e.ok(c))});function l(d){let{opts:f,errSchemaPath:p}=s,m=n.length,h=m===d.minItems&&(m===d.maxItems||d[t]===!1);if(f.strictTuples&&!h){let g=`"${a}" is ${m}-tuple, but minItems or maxItems/${t} are not specified or different at path "${p}"`;(0,Xf.checkStrictMode)(s,g,f.strictTuples)}}}yc.validateTuple=RI;yc.default=JC});var CI=N(p_=>{"use strict";Object.defineProperty(p_,"__esModule",{value:!0});var KC=f_(),GC={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,KC.validateTuple)(e,"items")};p_.default=GC});var ZI=N(m_=>{"use strict";Object.defineProperty(m_,"__esModule",{value:!0});var UI=ie(),WC=pe(),XC=er(),YC=d_(),QC={message:({params:{len:e}})=>(0,UI.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,UI._)`{limit: ${e}}`},e6={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:QC,code(e){let{schema:t,parentSchema:n,it:i}=e,{prefixItems:r}=n;i.items=!0,!(0,WC.alwaysValidSchema)(i,t)&&(r?(0,YC.validateAdditionalItems)(e,r):e.ok((0,XC.validateArray)(e)))}};m_.default=e6});var MI=N(h_=>{"use strict";Object.defineProperty(h_,"__esModule",{value:!0});var rr=ie(),Yf=pe(),t6={message:({params:{min:e,max:t}})=>t===void 0?(0,rr.str)`must contain at least ${e} valid item(s)`:(0,rr.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,rr._)`{minContains: ${e}}`:(0,rr._)`{minContains: ${e}, maxContains: ${t}}`},r6={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:t6,code(e){let{gen:t,schema:n,parentSchema:i,data:r,it:o}=e,a,s,{minContains:c,maxContains:u}=i;o.opts.next?(a=c===void 0?1:c,s=u):a=1;let l=t.const("len",(0,rr._)`${r}.length`);if(e.setParams({min:a,max:s}),s===void 0&&a===0){(0,Yf.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&a>s){(0,Yf.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Yf.alwaysValidSchema)(o,n)){let h=(0,rr._)`${l} >= ${a}`;s!==void 0&&(h=(0,rr._)`${h} && ${l} <= ${s}`),e.pass(h);return}o.items=!0;let d=t.name("valid");s===void 0&&a===1?p(d,()=>t.if(d,()=>t.break())):a===0?(t.let(d,!0),s!==void 0&&t.if((0,rr._)`${r}.length > 0`,f)):(t.let(d,!1),f()),e.result(d,()=>e.reset());function f(){let h=t.name("_valid"),g=t.let("count",0);p(h,()=>t.if(h,()=>m(g)))}function p(h,g){t.forRange("i",0,l,_=>{e.subschema({keyword:"contains",dataProp:_,dataPropType:Yf.Type.Num,compositeRule:!0},h),g()})}function m(h){t.code((0,rr._)`${h}++`),s===void 0?t.if((0,rr._)`${h} >= ${a}`,()=>t.assign(d,!0).break()):(t.if((0,rr._)`${h} > ${s}`,()=>t.assign(d,!1).break()),a===1?t.assign(d,!0):t.if((0,rr._)`${h} >= ${a}`,()=>t.assign(d,!0)))}}};h_.default=r6});var FI=N(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.validateSchemaDeps=Pr.validatePropertyDeps=Pr.error=void 0;var g_=ie(),n6=pe(),_c=er();Pr.error={message:({params:{property:e,depsCount:t,deps:n}})=>{let i=t===1?"property":"properties";return(0,g_.str)`must have ${i} ${n} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:n,missingProperty:i}})=>(0,g_._)`{property: ${e},
|
|
7
|
+
|| ${a} === "boolean" || ${r} === null`).assign(s,(0,ne._)`[${r}]`)}}}function k4({gen:e,parentData:t,parentDataProperty:n},i){e.if((0,ne._)`${t} !== undefined`,()=>e.assign((0,ne._)`${t}[${n}]`,i))}function _y(e,t,n,i=Vo.Correct){let r=i===Vo.Correct?ne.operators.EQ:ne.operators.NEQ,o;switch(e){case"null":return(0,ne._)`${t} ${r} null`;case"array":o=(0,ne._)`Array.isArray(${t})`;break;case"object":o=(0,ne._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=a((0,ne._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=a();break;default:return(0,ne._)`typeof ${t} ${r} ${e}`}return i===Vo.Correct?o:(0,ne.not)(o);function a(s=ne.nil){return(0,ne.and)((0,ne._)`typeof ${t} == "number"`,s,n?(0,ne._)`isFinite(${t})`:ne.nil)}}dt.checkDataType=_y;function $y(e,t,n,i){if(e.length===1)return _y(e[0],t,n,i);let r,o=(0,Q0.toHash)(e);if(o.array&&o.object){let a=(0,ne._)`typeof ${t} != "object"`;r=o.null?a:(0,ne._)`!${t} || ${a}`,delete o.null,delete o.array,delete o.object}else r=ne.nil;o.number&&delete o.integer;for(let a in o)r=(0,ne.and)(r,_y(a,t,n,i));return r}dt.checkDataTypes=$y;var S4={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,ne._)`{type: ${e}}`:(0,ne._)`{type: ${t}}`};function by(e){let t=I4(e);(0,_4.reportError)(t,S4)}dt.reportTypeError=by;function I4(e){let{gen:t,data:n,schema:i}=e,r=(0,Q0.schemaRefOrVal)(e,i,"type");return{gen:t,keyword:"type",data:n,schema:i.type,schemaCode:r,schemaValue:r,parentSchema:i,params:{},it:e}}});var nS=A(Rf=>{"use strict";Object.defineProperty(Rf,"__esModule",{value:!0});Rf.assignDefaults=void 0;var Fo=ie(),z4=pe();function P4(e,t){let{properties:n,items:i}=e.schema;if(t==="object"&&n)for(let r in n)rS(e,r,n[r].default);else t==="array"&&Array.isArray(i)&&i.forEach((r,o)=>rS(e,o,r.default))}Rf.assignDefaults=P4;function rS(e,t,n){let{gen:i,compositeRule:r,data:o,opts:a}=e;if(n===void 0)return;let s=(0,Fo._)`${o}${(0,Fo.getProperty)(t)}`;if(r){(0,z4.checkStrictMode)(e,`default is ignored for: ${s}`);return}let c=(0,Fo._)`${s} === undefined`;a.useDefaults==="empty"&&(c=(0,Fo._)`${c} || ${s} === null || ${s} === ""`),i.if(c,(0,Fo._)`${s} = ${(0,Fo.stringify)(n)}`)}});var tr=A(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.validateUnion=Pe.validateArray=Pe.usePattern=Pe.callValidateCode=Pe.schemaProperties=Pe.allSchemaProperties=Pe.noPropertyInData=Pe.propertyInData=Pe.isOwnProperty=Pe.hasPropFunc=Pe.reportMissingProp=Pe.checkMissingProp=Pe.checkReportMissingProp=void 0;var Ae=ie(),wy=pe(),bn=Hr(),T4=pe();function E4(e,t){let{gen:n,data:i,it:r}=e;n.if(ky(n,i,t,r.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Ae._)`${t}`},!0),e.error()})}Pe.checkReportMissingProp=E4;function O4({gen:e,data:t,it:{opts:n}},i,r){return(0,Ae.or)(...i.map(o=>(0,Ae.and)(ky(e,t,o,n.ownProperties),(0,Ae._)`${r} = ${o}`)))}Pe.checkMissingProp=O4;function j4(e,t){e.setParams({missingProperty:t},!0),e.error()}Pe.reportMissingProp=j4;function iS(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Ae._)`Object.prototype.hasOwnProperty`})}Pe.hasPropFunc=iS;function xy(e,t,n){return(0,Ae._)`${iS(e)}.call(${t}, ${n})`}Pe.isOwnProperty=xy;function N4(e,t,n,i){let r=(0,Ae._)`${t}${(0,Ae.getProperty)(n)} !== undefined`;return i?(0,Ae._)`${r} && ${xy(e,t,n)}`:r}Pe.propertyInData=N4;function ky(e,t,n,i){let r=(0,Ae._)`${t}${(0,Ae.getProperty)(n)} === undefined`;return i?(0,Ae.or)(r,(0,Ae.not)(xy(e,t,n))):r}Pe.noPropertyInData=ky;function oS(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}Pe.allSchemaProperties=oS;function A4(e,t){return oS(t).filter(n=>!(0,wy.alwaysValidSchema)(e,t[n]))}Pe.schemaProperties=A4;function D4({schemaCode:e,data:t,it:{gen:n,topSchemaRef:i,schemaPath:r,errorPath:o},it:a},s,c,u){let l=u?(0,Ae._)`${e}, ${t}, ${i}${r}`:t,d=[[bn.default.instancePath,(0,Ae.strConcat)(bn.default.instancePath,o)],[bn.default.parentData,a.parentData],[bn.default.parentDataProperty,a.parentDataProperty],[bn.default.rootData,bn.default.rootData]];a.opts.dynamicRef&&d.push([bn.default.dynamicAnchors,bn.default.dynamicAnchors]);let p=(0,Ae._)`${l}, ${n.object(...d)}`;return c!==Ae.nil?(0,Ae._)`${s}.call(${c}, ${p})`:(0,Ae._)`${s}(${p})`}Pe.callValidateCode=D4;var R4=(0,Ae._)`new RegExp`;function C4({gen:e,it:{opts:t}},n){let i=t.unicodeRegExp?"u":"",{regExp:r}=t.code,o=r(n,i);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,Ae._)`${r.code==="new RegExp"?R4:(0,T4.useFunc)(e,r)}(${n}, ${i})`})}Pe.usePattern=C4;function U4(e){let{gen:t,data:n,keyword:i,it:r}=e,o=t.name("valid");if(r.allErrors){let s=t.let("valid",!0);return a(()=>t.assign(s,!1)),s}return t.var(o,!0),a(()=>t.break()),o;function a(s){let c=t.const("len",(0,Ae._)`${n}.length`);t.forRange("i",0,c,u=>{e.subschema({keyword:i,dataProp:u,dataPropType:wy.Type.Num},o),t.if((0,Ae.not)(o),s)})}}Pe.validateArray=U4;function Z4(e){let{gen:t,schema:n,keyword:i,it:r}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some(c=>(0,wy.alwaysValidSchema)(r,c))&&!r.opts.unevaluated)return;let a=t.let("valid",!1),s=t.name("_valid");t.block(()=>n.forEach((c,u)=>{let l=e.subschema({keyword:i,schemaProp:u,compositeRule:!0},s);t.assign(a,(0,Ae._)`${a} || ${s}`),e.mergeValidEvaluated(l,s)||t.if((0,Ae.not)(a))})),e.result(a,()=>e.reset(),()=>e.error(!0))}Pe.validateUnion=Z4});var cS=A(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.validateKeywordUsage=Ir.validSchemaType=Ir.funcKeywordCode=Ir.macroKeywordCode=void 0;var xt=ie(),oi=Hr(),M4=tr(),L4=nc();function V4(e,t){let{gen:n,keyword:i,schema:r,parentSchema:o,it:a}=e,s=t.macro.call(a.self,r,o,a),c=sS(n,i,s);a.opts.validateSchema!==!1&&a.self.validateSchema(s,!0);let u=n.name("valid");e.subschema({schema:s,schemaPath:xt.nil,errSchemaPath:`${a.errSchemaPath}/${i}`,topSchemaRef:c,compositeRule:!0},u),e.pass(u,()=>e.error(!0))}Ir.macroKeywordCode=V4;function F4(e,t){var n;let{gen:i,keyword:r,schema:o,parentSchema:a,$data:s,it:c}=e;B4(c,t);let u=!s&&t.compile?t.compile.call(c.self,o,a,c):t.validate,l=sS(i,r,u),d=i.let("valid");e.block$data(d,p),e.ok((n=t.valid)!==null&&n!==void 0?n:d);function p(){if(t.errors===!1)h(),t.modifying&&aS(e),g(()=>e.error());else{let _=t.async?f():m();t.modifying&&aS(e),g(()=>q4(e,_))}}function f(){let _=i.let("ruleErrs",null);return i.try(()=>h((0,xt._)`await `),$=>i.assign(d,!1).if((0,xt._)`${$} instanceof ${c.ValidationError}`,()=>i.assign(_,(0,xt._)`${$}.errors`),()=>i.throw($))),_}function m(){let _=(0,xt._)`${l}.errors`;return i.assign(_,null),h(xt.nil),_}function h(_=t.async?(0,xt._)`await `:xt.nil){let $=c.opts.passContext?oi.default.this:oi.default.self,k=!("compile"in t&&!s||t.schema===!1);i.assign(d,(0,xt._)`${_}${(0,M4.callValidateCode)(e,l,$,k)}`,t.modifying)}function g(_){var $;i.if((0,xt.not)(($=t.valid)!==null&&$!==void 0?$:d),_)}}Ir.funcKeywordCode=F4;function aS(e){let{gen:t,data:n,it:i}=e;t.if(i.parentData,()=>t.assign(n,(0,xt._)`${i.parentData}[${i.parentDataProperty}]`))}function q4(e,t){let{gen:n}=e;n.if((0,xt._)`Array.isArray(${t})`,()=>{n.assign(oi.default.vErrors,(0,xt._)`${oi.default.vErrors} === null ? ${t} : ${oi.default.vErrors}.concat(${t})`).assign(oi.default.errors,(0,xt._)`${oi.default.vErrors}.length`),(0,L4.extendErrors)(e)},()=>e.error())}function B4({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function sS(e,t,n){if(n===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof n=="function"?{ref:n}:{ref:n,code:(0,xt.stringify)(n)})}function H4(e,t,n=!1){return!t.length||t.some(i=>i==="array"?Array.isArray(e):i==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==i||n&&typeof e>"u")}Ir.validSchemaType=H4;function J4({schema:e,opts:t,self:n,errSchemaPath:i},r,o){if(Array.isArray(r.keyword)?!r.keyword.includes(o):r.keyword!==o)throw new Error("ajv implementation error");let a=r.dependencies;if(a?.some(s=>!Object.prototype.hasOwnProperty.call(e,s)))throw new Error(`parent schema must have dependencies of ${o}: ${a.join(",")}`);if(r.validateSchema&&!r.validateSchema(e[o])){let c=`keyword "${o}" value is invalid at path "${i}": `+n.errorsText(r.validateSchema.errors);if(t.validateSchema==="log")n.logger.error(c);else throw new Error(c)}}Ir.validateKeywordUsage=J4});var lS=A(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.extendSubschemaMode=wn.extendSubschemaData=wn.getSubschema=void 0;var zr=ie(),uS=pe();function K4(e,{keyword:t,schemaProp:n,schema:i,schemaPath:r,errSchemaPath:o,topSchemaRef:a}){if(t!==void 0&&i!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let s=e.schema[t];return n===void 0?{schema:s,schemaPath:(0,zr._)`${e.schemaPath}${(0,zr.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:s[n],schemaPath:(0,zr._)`${e.schemaPath}${(0,zr.getProperty)(t)}${(0,zr.getProperty)(n)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,uS.escapeFragment)(n)}`}}if(i!==void 0){if(r===void 0||o===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:r,topSchemaRef:a,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}wn.getSubschema=K4;function G4(e,t,{dataProp:n,dataPropType:i,data:r,dataTypes:o,propertyName:a}){if(r!==void 0&&n!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:s}=t;if(n!==void 0){let{errorPath:u,dataPathArr:l,opts:d}=t,p=s.let("data",(0,zr._)`${t.data}${(0,zr.getProperty)(n)}`,!0);c(p),e.errorPath=(0,zr.str)`${u}${(0,uS.getErrorPath)(n,i,d.jsPropertySyntax)}`,e.parentDataProperty=(0,zr._)`${n}`,e.dataPathArr=[...l,e.parentDataProperty]}if(r!==void 0){let u=r instanceof zr.Name?r:s.let("data",r,!0);c(u),a!==void 0&&(e.propertyName=a)}o&&(e.dataTypes=o);function c(u){e.data=u,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,u]}}wn.extendSubschemaData=G4;function W4(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:i,createErrors:r,allErrors:o}){i!==void 0&&(e.compositeRule=i),r!==void 0&&(e.createErrors=r),o!==void 0&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=n}wn.extendSubschemaMode=W4});var Sy=A((M5,dS)=>{"use strict";dS.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var i,r,o;if(Array.isArray(t)){if(i=t.length,i!=n.length)return!1;for(r=i;r--!==0;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(o=Object.keys(t),i=o.length,i!==Object.keys(n).length)return!1;for(r=i;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[r]))return!1;for(r=i;r--!==0;){var a=o[r];if(!e(t[a],n[a]))return!1}return!0}return t!==t&&n!==n}});var pS=A((L5,fS)=>{"use strict";var xn=fS.exports=function(e,t,n){typeof t=="function"&&(n=t,t={}),n=t.cb||n;var i=typeof n=="function"?n:n.pre||function(){},r=n.post||function(){};Cf(t,i,r,e,"",e)};xn.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};xn.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};xn.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};xn.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function Cf(e,t,n,i,r,o,a,s,c,u){if(i&&typeof i=="object"&&!Array.isArray(i)){t(i,r,o,a,s,c,u);for(var l in i){var d=i[l];if(Array.isArray(d)){if(l in xn.arrayKeywords)for(var p=0;p<d.length;p++)Cf(e,t,n,d[p],r+"/"+l+"/"+p,o,r,l,i,p)}else if(l in xn.propsKeywords){if(d&&typeof d=="object")for(var f in d)Cf(e,t,n,d[f],r+"/"+l+"/"+X4(f),o,r,l,i,f)}else(l in xn.keywords||e.allKeys&&!(l in xn.skipKeywords))&&Cf(e,t,n,d,r+"/"+l,o,r,l,i)}n(i,r,o,a,s,c,u)}}function X4(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var oc=A(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.getSchemaRefs=At.resolveUrl=At.normalizeId=At._getFullPath=At.getFullPath=At.inlineRef=void 0;var Y4=pe(),Q4=Sy(),eD=pS(),tD=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function rD(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Iy(e):t?mS(e)<=t:!1}At.inlineRef=rD;var nD=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Iy(e){for(let t in e){if(nD.has(t))return!0;let n=e[t];if(Array.isArray(n)&&n.some(Iy)||typeof n=="object"&&Iy(n))return!0}return!1}function mS(e){let t=0;for(let n in e){if(n==="$ref")return 1/0;if(t++,!tD.has(n)&&(typeof e[n]=="object"&&(0,Y4.eachItem)(e[n],i=>t+=mS(i)),t===1/0))return 1/0}return t}function hS(e,t="",n){n!==!1&&(t=qo(t));let i=e.parse(t);return gS(e,i)}At.getFullPath=hS;function gS(e,t){return e.serialize(t).split("#")[0]+"#"}At._getFullPath=gS;var iD=/#\/?$/;function qo(e){return e?e.replace(iD,""):""}At.normalizeId=qo;function oD(e,t,n){return n=qo(n),e.resolve(t,n)}At.resolveUrl=oD;var aD=/^[a-z_][-a-z0-9._]*$/i;function sD(e,t){if(typeof e=="boolean")return{};let{schemaId:n,uriResolver:i}=this.opts,r=qo(e[n]||t),o={"":r},a=hS(i,r,!1),s={},c=new Set;return eD(e,{allKeys:!0},(d,p,f,m)=>{if(m===void 0)return;let h=a+p,g=o[m];typeof d[n]=="string"&&(g=_.call(this,d[n])),$.call(this,d.$anchor),$.call(this,d.$dynamicAnchor),o[p]=g;function _(k){let E=this.opts.uriResolver.resolve;if(k=qo(g?E(g,k):k),c.has(k))throw l(k);c.add(k);let T=this.refs[k];return typeof T=="string"&&(T=this.refs[T]),typeof T=="object"?u(d,T.schema,k):k!==qo(h)&&(k[0]==="#"?(u(d,s[k],k),s[k]=d):this.refs[k]=h),k}function $(k){if(typeof k=="string"){if(!aD.test(k))throw new Error(`invalid anchor "${k}"`);_.call(this,`#${k}`)}}}),s;function u(d,p,f){if(p!==void 0&&!Q4(d,p))throw l(f)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}At.getSchemaRefs=sD});var cc=A(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.getData=kn.KeywordCxt=kn.validateFunctionCode=void 0;var bS=W0(),vS=ic(),Py=yy(),Uf=ic(),cD=nS(),sc=cS(),zy=lS(),q=ie(),Y=Hr(),uD=oc(),Jr=pe(),ac=nc();function lD(e){if(kS(e)&&(SS(e),xS(e))){pD(e);return}wS(e,()=>(0,bS.topBoolOrEmptySchema)(e))}kn.validateFunctionCode=lD;function wS({gen:e,validateName:t,schema:n,schemaEnv:i,opts:r},o){r.code.es5?e.func(t,(0,q._)`${Y.default.data}, ${Y.default.valCxt}`,i.$async,()=>{e.code((0,q._)`"use strict"; ${yS(n,r)}`),fD(e,r),e.code(o)}):e.func(t,(0,q._)`${Y.default.data}, ${dD(r)}`,i.$async,()=>e.code(yS(n,r)).code(o))}function dD(e){return(0,q._)`{${Y.default.instancePath}="", ${Y.default.parentData}, ${Y.default.parentDataProperty}, ${Y.default.rootData}=${Y.default.data}${e.dynamicRef?(0,q._)`, ${Y.default.dynamicAnchors}={}`:q.nil}}={}`}function fD(e,t){e.if(Y.default.valCxt,()=>{e.var(Y.default.instancePath,(0,q._)`${Y.default.valCxt}.${Y.default.instancePath}`),e.var(Y.default.parentData,(0,q._)`${Y.default.valCxt}.${Y.default.parentData}`),e.var(Y.default.parentDataProperty,(0,q._)`${Y.default.valCxt}.${Y.default.parentDataProperty}`),e.var(Y.default.rootData,(0,q._)`${Y.default.valCxt}.${Y.default.rootData}`),t.dynamicRef&&e.var(Y.default.dynamicAnchors,(0,q._)`${Y.default.valCxt}.${Y.default.dynamicAnchors}`)},()=>{e.var(Y.default.instancePath,(0,q._)`""`),e.var(Y.default.parentData,(0,q._)`undefined`),e.var(Y.default.parentDataProperty,(0,q._)`undefined`),e.var(Y.default.rootData,Y.default.data),t.dynamicRef&&e.var(Y.default.dynamicAnchors,(0,q._)`{}`)})}function pD(e){let{schema:t,opts:n,gen:i}=e;wS(e,()=>{n.$comment&&t.$comment&&zS(e),yD(e),i.let(Y.default.vErrors,null),i.let(Y.default.errors,0),n.unevaluated&&mD(e),IS(e),bD(e)})}function mD(e){let{gen:t,validateName:n}=e;e.evaluated=t.const("evaluated",(0,q._)`${n}.evaluated`),t.if((0,q._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,q._)`${e.evaluated}.props`,(0,q._)`undefined`)),t.if((0,q._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,q._)`${e.evaluated}.items`,(0,q._)`undefined`))}function yS(e,t){let n=typeof e=="object"&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,q._)`/*# sourceURL=${n} */`:q.nil}function hD(e,t){if(kS(e)&&(SS(e),xS(e))){gD(e,t);return}(0,bS.boolOrEmptySchema)(e,t)}function xS({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let n in e)if(t.RULES.all[n])return!0;return!1}function kS(e){return typeof e.schema!="boolean"}function gD(e,t){let{schema:n,gen:i,opts:r}=e;r.$comment&&n.$comment&&zS(e),_D(e),$D(e);let o=i.const("_errs",Y.default.errors);IS(e,o),i.var(t,(0,q._)`${o} === ${Y.default.errors}`)}function SS(e){(0,Jr.checkUnknownRules)(e),vD(e)}function IS(e,t){if(e.opts.jtd)return _S(e,[],!1,t);let n=(0,vS.getSchemaTypes)(e.schema),i=(0,vS.coerceAndCheckDataType)(e,n);_S(e,n,!i,t)}function vD(e){let{schema:t,errSchemaPath:n,opts:i,self:r}=e;t.$ref&&i.ignoreKeywordsWithRef&&(0,Jr.schemaHasRulesButRef)(t,r.RULES)&&r.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function yD(e){let{schema:t,opts:n}=e;t.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,Jr.checkStrictMode)(e,"default is ignored in the schema root")}function _D(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,uD.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function $D(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function zS({gen:e,schemaEnv:t,schema:n,errSchemaPath:i,opts:r}){let o=n.$comment;if(r.$comment===!0)e.code((0,q._)`${Y.default.self}.logger.log(${o})`);else if(typeof r.$comment=="function"){let a=(0,q.str)`${i}/$comment`,s=e.scopeValue("root",{ref:t.root});e.code((0,q._)`${Y.default.self}.opts.$comment(${o}, ${a}, ${s}.schema)`)}}function bD(e){let{gen:t,schemaEnv:n,validateName:i,ValidationError:r,opts:o}=e;n.$async?t.if((0,q._)`${Y.default.errors} === 0`,()=>t.return(Y.default.data),()=>t.throw((0,q._)`new ${r}(${Y.default.vErrors})`)):(t.assign((0,q._)`${i}.errors`,Y.default.vErrors),o.unevaluated&&wD(e),t.return((0,q._)`${Y.default.errors} === 0`))}function wD({gen:e,evaluated:t,props:n,items:i}){n instanceof q.Name&&e.assign((0,q._)`${t}.props`,n),i instanceof q.Name&&e.assign((0,q._)`${t}.items`,i)}function _S(e,t,n,i){let{gen:r,schema:o,data:a,allErrors:s,opts:c,self:u}=e,{RULES:l}=u;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,Jr.schemaHasRulesButRef)(o,l))){r.block(()=>TS(e,"$ref",l.all.$ref.definition));return}c.jtd||xD(e,t),r.block(()=>{for(let p of l.rules)d(p);d(l.post)});function d(p){(0,Py.shouldUseGroup)(o,p)&&(p.type?(r.if((0,Uf.checkDataType)(p.type,a,c.strictNumbers)),$S(e,p),t.length===1&&t[0]===p.type&&n&&(r.else(),(0,Uf.reportTypeError)(e)),r.endIf()):$S(e,p),s||r.if((0,q._)`${Y.default.errors} === ${i||0}`))}}function $S(e,t){let{gen:n,schema:i,opts:{useDefaults:r}}=e;r&&(0,cD.assignDefaults)(e,t.type),n.block(()=>{for(let o of t.rules)(0,Py.shouldUseRule)(i,o)&&TS(e,o.keyword,o.definition,t.type)})}function xD(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(kD(e,t),e.opts.allowUnionTypes||SD(e,t),ID(e,e.dataTypes))}function kD(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(n=>{PS(e.dataTypes,n)||Ty(e,`type "${n}" not allowed by context "${e.dataTypes.join(",")}"`)}),PD(e,t)}}function SD(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Ty(e,"use allowUnionTypes to allow union type keyword")}function ID(e,t){let n=e.self.RULES.all;for(let i in n){let r=n[i];if(typeof r=="object"&&(0,Py.shouldUseRule)(e.schema,r)){let{type:o}=r.definition;o.length&&!o.some(a=>zD(t,a))&&Ty(e,`missing type "${o.join(",")}" for keyword "${i}"`)}}}function zD(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function PS(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function PD(e,t){let n=[];for(let i of e.dataTypes)PS(t,i)?n.push(i):t.includes("integer")&&i==="number"&&n.push("integer");e.dataTypes=n}function Ty(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,Jr.checkStrictMode)(e,t,e.opts.strictTypes)}var Zf=class{constructor(t,n,i){if((0,sc.validateKeywordUsage)(t,n,i),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=i,this.data=t.data,this.schema=t.schema[i],this.$data=n.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Jr.schemaRefOrVal)(t,this.schema,i,this.$data),this.schemaType=n.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=n,this.$data)this.schemaCode=t.gen.const("vSchema",ES(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,sc.validSchemaType)(this.schema,n.schemaType,n.allowUndefined))throw new Error(`${i} value must be ${JSON.stringify(n.schemaType)}`);("code"in n?n.trackErrors:n.errors!==!1)&&(this.errsCount=t.gen.const("_errs",Y.default.errors))}result(t,n,i){this.failResult((0,q.not)(t),n,i)}failResult(t,n,i){this.gen.if(t),i?i():this.error(),n?(this.gen.else(),n(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,n){this.failResult((0,q.not)(t),void 0,n)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:n}=this;this.fail((0,q._)`${n} !== undefined && (${(0,q.or)(this.invalid$data(),t)})`)}error(t,n,i){if(n){this.setParams(n),this._error(t,i),this.setParams({});return}this._error(t,i)}_error(t,n){(t?ac.reportExtraError:ac.reportError)(this,this.def.error,n)}$dataError(){(0,ac.reportError)(this,this.def.$dataError||ac.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,ac.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,n){n?Object.assign(this.params,t):this.params=t}block$data(t,n,i=q.nil){this.gen.block(()=>{this.check$data(t,i),n()})}check$data(t=q.nil,n=q.nil){if(!this.$data)return;let{gen:i,schemaCode:r,schemaType:o,def:a}=this;i.if((0,q.or)((0,q._)`${r} === undefined`,n)),t!==q.nil&&i.assign(t,!0),(o.length||a.validateSchema)&&(i.elseIf(this.invalid$data()),this.$dataError(),t!==q.nil&&i.assign(t,!1)),i.else()}invalid$data(){let{gen:t,schemaCode:n,schemaType:i,def:r,it:o}=this;return(0,q.or)(a(),s());function a(){if(i.length){if(!(n instanceof q.Name))throw new Error("ajv implementation error");let c=Array.isArray(i)?i:[i];return(0,q._)`${(0,Uf.checkDataTypes)(c,n,o.opts.strictNumbers,Uf.DataType.Wrong)}`}return q.nil}function s(){if(r.validateSchema){let c=t.scopeValue("validate$data",{ref:r.validateSchema});return(0,q._)`!${c}(${n})`}return q.nil}}subschema(t,n){let i=(0,zy.getSubschema)(this.it,t);(0,zy.extendSubschemaData)(i,this.it,t),(0,zy.extendSubschemaMode)(i,t);let r={...this.it,...i,items:void 0,props:void 0};return hD(r,n),r}mergeEvaluated(t,n){let{it:i,gen:r}=this;i.opts.unevaluated&&(i.props!==!0&&t.props!==void 0&&(i.props=Jr.mergeEvaluated.props(r,t.props,i.props,n)),i.items!==!0&&t.items!==void 0&&(i.items=Jr.mergeEvaluated.items(r,t.items,i.items,n)))}mergeValidEvaluated(t,n){let{it:i,gen:r}=this;if(i.opts.unevaluated&&(i.props!==!0||i.items!==!0))return r.if(n,()=>this.mergeEvaluated(t,q.Name)),!0}};kn.KeywordCxt=Zf;function TS(e,t,n,i){let r=new Zf(e,n,t);"code"in n?n.code(r,i):r.$data&&n.validate?(0,sc.funcKeywordCode)(r,n):"macro"in n?(0,sc.macroKeywordCode)(r,n):(n.compile||n.validate)&&(0,sc.funcKeywordCode)(r,n)}var TD=/^\/(?:[^~]|~0|~1)*$/,ED=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ES(e,{dataLevel:t,dataNames:n,dataPathArr:i}){let r,o;if(e==="")return Y.default.rootData;if(e[0]==="/"){if(!TD.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);r=e,o=Y.default.rootData}else{let u=ED.exec(e);if(!u)throw new Error(`Invalid JSON-pointer: ${e}`);let l=+u[1];if(r=u[2],r==="#"){if(l>=t)throw new Error(c("property/index",l));return i[t-l]}if(l>t)throw new Error(c("data",l));if(o=n[t-l],!r)return o}let a=o,s=r.split("/");for(let u of s)u&&(o=(0,q._)`${o}${(0,q.getProperty)((0,Jr.unescapeJsonPointer)(u))}`,a=(0,q._)`${a} && ${o}`);return a;function c(u,l){return`Cannot access ${u} ${l} levels up, current level is ${t}`}}kn.getData=ES});var Mf=A(Oy=>{"use strict";Object.defineProperty(Oy,"__esModule",{value:!0});var Ey=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};Oy.default=Ey});var uc=A(Ay=>{"use strict";Object.defineProperty(Ay,"__esModule",{value:!0});var jy=oc(),Ny=class extends Error{constructor(t,n,i,r){super(r||`can't resolve reference ${i} from id ${n}`),this.missingRef=(0,jy.resolveUrl)(t,n,i),this.missingSchema=(0,jy.normalizeId)((0,jy.getFullPath)(t,this.missingRef))}};Ay.default=Ny});var Vf=A(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.resolveSchema=rr.getCompilingSchema=rr.resolveRef=rr.compileSchema=rr.SchemaEnv=void 0;var pr=ie(),OD=Mf(),ai=Hr(),mr=oc(),OS=pe(),jD=cc(),Bo=class{constructor(t){var n;this.refs={},this.dynamicAnchors={};let i;typeof t.schema=="object"&&(i=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(n=t.baseId)!==null&&n!==void 0?n:(0,mr.normalizeId)(i?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=i?.$async,this.refs={}}};rr.SchemaEnv=Bo;function Ry(e){let t=jS.call(this,e);if(t)return t;let n=(0,mr.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:i,lines:r}=this.opts.code,{ownProperties:o}=this.opts,a=new pr.CodeGen(this.scope,{es5:i,lines:r,ownProperties:o}),s;e.$async&&(s=a.scopeValue("Error",{ref:OD.default,code:(0,pr._)`require("ajv/dist/runtime/validation_error").default`}));let c=a.scopeName("validate");e.validateName=c;let u={gen:a,allErrors:this.opts.allErrors,data:ai.default.data,parentData:ai.default.parentData,parentDataProperty:ai.default.parentDataProperty,dataNames:[ai.default.data],dataPathArr:[pr.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,pr.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:s,schema:e.schema,schemaEnv:e,rootId:n,baseId:e.baseId||n,schemaPath:pr.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,pr._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(e),(0,jD.validateFunctionCode)(u),a.optimize(this.opts.code.optimize);let d=a.toString();l=`${a.scopeRefs(ai.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,e));let f=new Function(`${ai.default.self}`,`${ai.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:f}),f.errors=null,f.schema=e.schema,f.schemaEnv=e,e.$async&&(f.$async=!0),this.opts.code.source===!0&&(f.source={validateName:c,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:m,items:h}=u;f.evaluated={props:m instanceof pr.Name?void 0:m,items:h instanceof pr.Name?void 0:h,dynamicProps:m instanceof pr.Name,dynamicItems:h instanceof pr.Name},f.source&&(f.source.evaluated=(0,pr.stringify)(f.evaluated))}return e.validate=f,e}catch(d){throw delete e.validate,delete e.validateName,l&&this.logger.error("Error compiling schema, function code:",l),d}finally{this._compilations.delete(e)}}rr.compileSchema=Ry;function ND(e,t,n){var i;n=(0,mr.resolveUrl)(this.opts.uriResolver,t,n);let r=e.refs[n];if(r)return r;let o=RD.call(this,e,n);if(o===void 0){let a=(i=e.localRefs)===null||i===void 0?void 0:i[n],{schemaId:s}=this.opts;a&&(o=new Bo({schema:a,schemaId:s,root:e,baseId:t}))}if(o!==void 0)return e.refs[n]=AD.call(this,o)}rr.resolveRef=ND;function AD(e){return(0,mr.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Ry.call(this,e)}function jS(e){for(let t of this._compilations)if(DD(t,e))return t}rr.getCompilingSchema=jS;function DD(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function RD(e,t){let n;for(;typeof(n=this.refs[t])=="string";)t=n;return n||this.schemas[t]||Lf.call(this,e,t)}function Lf(e,t){let n=this.opts.uriResolver.parse(t),i=(0,mr._getFullPath)(this.opts.uriResolver,n),r=(0,mr.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&i===r)return Dy.call(this,n,e);let o=(0,mr.normalizeId)(i),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){let s=Lf.call(this,e,a);return typeof s?.schema!="object"?void 0:Dy.call(this,n,s)}if(typeof a?.schema=="object"){if(a.validate||Ry.call(this,a),o===(0,mr.normalizeId)(t)){let{schema:s}=a,{schemaId:c}=this.opts,u=s[c];return u&&(r=(0,mr.resolveUrl)(this.opts.uriResolver,r,u)),new Bo({schema:s,schemaId:c,root:e,baseId:r})}return Dy.call(this,n,a)}}rr.resolveSchema=Lf;var CD=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Dy(e,{baseId:t,schema:n,root:i}){var r;if(((r=e.fragment)===null||r===void 0?void 0:r[0])!=="/")return;for(let s of e.fragment.slice(1).split("/")){if(typeof n=="boolean")return;let c=n[(0,OS.unescapeFragment)(s)];if(c===void 0)return;n=c;let u=typeof n=="object"&&n[this.opts.schemaId];!CD.has(s)&&u&&(t=(0,mr.resolveUrl)(this.opts.uriResolver,t,u))}let o;if(typeof n!="boolean"&&n.$ref&&!(0,OS.schemaHasRulesButRef)(n,this.RULES)){let s=(0,mr.resolveUrl)(this.opts.uriResolver,t,n.$ref);o=Lf.call(this,i,s)}let{schemaId:a}=this.opts;if(o=o||new Bo({schema:n,schemaId:a,root:i,baseId:t}),o.schema!==o.root.schema)return o}});var NS=A((J5,UD)=>{UD.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var Vy=A((K5,LS)=>{"use strict";var ZD=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Uy=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),MD=RegExp.prototype.test.bind(/^\d*$/u),si=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Zy=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),DS=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),My=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),LD=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),Dt=new Array(256);{let e="0123456789ABCDEF";for(let t=0;t<256;t++)Dt[t]="%"+e[t>>4]+e[t&15]}function ft(e){return e<2048?Dt[192|e>>6]+Dt[128|e&63]:e<65536?Dt[224|e>>12]+Dt[128|e>>6&63]+Dt[128|e&63]:Dt[240|e>>18]+Dt[128|e>>12&63]+Dt[128|e>>6&63]+Dt[128|e&63]}function VD(e){let t="",n=0,i=0;for(i=0;i<e.length;i++)if(n=e[i].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";t+=e[i];break}for(i+=1;i<e.length;i++){if(n=e[i].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";t+=e[i]}return t}var FD=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),qD=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),BD=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),HD=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function JD(e){if(e.length===0)return!1;for(let t=0;t<e.length;t++)if(!BD(e[t])){if(e[t]==="%"&&t+2<e.length&&si(e.slice(t+1,t+3))){t+=2;continue}return!1}return!0}function AS(e){let t=-1,n=0,i=-1,r=0;for(let s=0;s<e.length;s++)e[s]==="0"?(i===-1&&(i=s),r++,r>n&&(n=r,t=i)):(i=-1,r=0);if(n<2)return e.join(":");let o=e.slice(0,t).join(":"),a=e.slice(t+n).join(":");return o+"::"+a}function KD(e){let t=e.indexOf("::");if(t!==-1&&e.indexOf("::",t+1)!==-1)return;let n=t===-1?e.split(":"):e.slice(0,t).split(":"),i=t===-1?[]:e.slice(t+2).split(":");t!==-1&&(n.length===1&&n[0]===""&&(n.length=0),i.length===1&&i[0]===""&&(i.length=0));let r=n.concat(i),o=0;for(let s=0;s<r.length;s++){let c=r[s];if(c==="")return;if(c.indexOf(".")!==-1){if(s!==r.length-1||t!==-1&&i.length===0||!Uy(c))return;o+=2;continue}if(!FD(c))return;r[s]=parseInt(c,16).toString(16),o++}if(t===-1)return o!==8?void 0:AS(r);if(o>=8)return;let a=r.slice(0,n.length);for(let s=o;s<8;s++)a.push("0");for(let s=n.length;s<r.length;s++)a.push(r[s]);return AS(a)}function Cy(e){let t=e[0]==="["&&e[e.length-1]==="]";if((e[0]==="["||e[e.length-1]==="]")&&!t)return{host:e,isIPV6:!1,error:!0};let i=t?e.slice(1,-1):e;if(t&&qD(i))return i=i.toLowerCase(),{host:`[${i}]`,escapedHost:i,isIPV6:!1,isIPVFuture:!0};if(GD(i,":")<2)return{host:e,isIPV6:!1,error:t};let r="",o=i.indexOf("%");if(o!==-1){let s=i.slice(o,o+3).toLowerCase()==="%25"?3:1;if(r=i.slice(o+s),!JD(r))return{host:e,isIPV6:!1,error:!0};i=i.slice(0,o)}let a=KD(i);return a===void 0?{host:e,isIPV6:!1,error:!0}:{host:a+(r?"%"+r:""),escapedHost:a+(r?"%25"+r:""),isIPV6:!0}}function GD(e,t){let n=0;for(let i=0;i<e.length;i++)e[i]===t&&n++;return n}function RS(e){let t=e,n=[],i=-1,r=0;for(;r=t.length;){if(r===1){if(t===".")break;if(t==="/"){n.push("/");break}else{n.push(t);break}}else if(r===2){if(t[0]==="."){if(t[1]===".")break;if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&(t[1]==="."||t[1]==="/")){n.push("/");break}}else if(r===3&&t==="/.."){n.length!==0&&n.pop(),n.push("/");break}if(t[0]==="."){if(t[1]==="."){if(t[2]==="/"){t=t.slice(3);continue}}else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."&&t[3]==="/"){t=t.slice(3),n.length!==0&&n.pop();continue}}if((i=t.indexOf("/",1))===-1){n.push(t);break}else n.push(t.slice(0,i)),t=t.slice(i)}return n.join("")}function WD(e){if(e===""||e[0]==="/")return RS(e);let t=e.split("/"),n=t.length-1,i=[],r=!1;for(let o=0;o<=n;o++){let a=t[o];a==="."||a===".."?(a===".."&&(i.length!==0&&i[i.length-1]!==".."?i.pop():i.push("..")),r=o===n):i.push(a)}return r&&i[i.length-1]!==".."&&i.push(""),(i.length===0||i[0]===""||i[0].includes(":"))&&i.unshift("."),i.join("/")}var XD={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},YD=/[@/?#:]/g,QD=/[@/?#]/g;function CS(e,t){let n=t?QD:YD;return n.lastIndex=0,e.replace(n,i=>XD[i])}function US(e,t=!1){if(e.indexOf("%")===-1)return e;let n="";for(let i=0;i<e.length;i++){if(e[i]==="%"&&i+2<e.length){let r=e.slice(i+1,i+3);if(si(r)){let o=r.toUpperCase(),a=String.fromCharCode(parseInt(o,16));t&&Zy(a)?n+=a:n+="%"+o,i+=2;continue}}n+=e[i]}return n}function eR(e){let t="";for(let n=0;n<e.length;n++){let i=e[n];if(i==="%"&&n+2<e.length){let r=e.slice(n+1,n+3);if(si(r)){let o=r.toUpperCase(),a=String.fromCharCode(parseInt(o,16));a!=="."&&Zy(a)?t+=a:t+="%"+o,n+=2;continue}}if(DS(i))t+=i;else{let r=e.charCodeAt(n);if(r<128)t+=MS(r)?i:Dt[r];else if(r<55296||r>57343)t+=ft(r);else if(r<=56319&&n+1<e.length){let o=e.charCodeAt(n+1);o>=56320&&o<=57343?(t+=ft(65536+(r-55296<<10)+(o-56320)),n++):t+=ft(65533)}else t+=ft(65533)}}return t}function tR(e,t=!1){let n="",i=t&&e[0]!=="/";for(let r=0;r<e.length;r++){let o=e[r];if(o==="%"&&r+2<e.length){let a=e.slice(r+1,r+3);if(si(a)){n+="%"+a.toUpperCase(),r+=2;continue}}if(o==="/"&&(i=!1),DS(o)&&(o!==":"||!i))n+=o;else{let a=e.charCodeAt(r);if(a<128)n+=Dt[a];else if(a<55296||a>57343)n+=ft(a);else if(a<=56319&&r+1<e.length){let s=e.charCodeAt(r+1);s>=56320&&s<=57343?(n+=ft(65536+(a-55296<<10)+(s-56320)),r++):n+=ft(65533)}else n+=ft(65533)}}return n}function Ly(e,t){let n="";for(let i=0;i<e.length;i++){let r=e[i];if(r==="%"&&i+2<e.length){let o=e.slice(i+1,i+3);if(si(o)){n+="%"+o.toUpperCase(),i+=2;continue}}if(t(r))n+=r;else{let o=e.charCodeAt(i);if(o<128)n+=Dt[o];else if(o<55296||o>57343)n+=ft(o);else if(o<=56319&&i+1<e.length){let a=e.charCodeAt(i+1);a>=56320&&a<=57343?(n+=ft(65536+(o-55296<<10)+(a-56320)),i++):n+=ft(65533)}else n+=ft(65533)}}return n}function ZS(e){return Ly(e,LD)}function rR(e){return Ly(e,My)}function nR(e){return Ly(e,My)}function MS(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===42||e===43||e===45||e===46||e===47||e===64||e===95}function iR(e){let t="";for(let n=0;n<e.length;n++){let i=e[n];if(i==="%"&&n+2<e.length){let r=e.slice(n+1,n+3);if(si(r)){let o=r.toUpperCase(),a=String.fromCharCode(parseInt(o,16));Zy(a)?t+=a:t+="%"+o,n+=2;continue}}if(My(i))t+=i;else{let r=e.charCodeAt(n);if(r<128)t+=MS(r)?i:Dt[r];else if(r<55296||r>57343)t+=ft(r);else if(r<=56319&&n+1<e.length){let o=e.charCodeAt(n+1);o>=56320&&o<=57343?(t+=ft(65536+(r-55296<<10)+(o-56320)),n++):t+=ft(65533)}else t+=ft(65533)}}return t}function oR(e){let t="";for(let n=0;n<e.length;n++){if(e[n]==="%"&&n+2<e.length){let i=e.slice(n+1,n+3);if(si(i)){t+="%"+i.toUpperCase(),n+=2;continue}}t+=escape(e[n])}return t}function aR(e){let t=[];if(e.userinfo!==void 0&&(t.push(ZS(e.userinfo)),t.push("@")),e.host!==void 0){let n=e.host;if(!Uy(n)){let i=Cy(n);i.isIPV6!==!0&&i.isIPVFuture!==!0&&(n=US(n,!0),i=Cy(n)),i.isIPV6===!0||i.isIPVFuture===!0?n=`[${i.escapedHost}]`:n=CS(n,!1)}t.push(n)}if(typeof e.port=="number"||typeof e.port=="string"){let n=String(e.port);if(!MD(n))throw new TypeError("URI port is malformed.");t.push(":"),t.push(n)}return t.length?t.join(""):void 0}LS.exports={nonSimpleDomain:HD,recomposeAuthority:aR,reescapeHostDelimiters:CS,normalizePercentEncoding:US,normalizePathEncoding:eR,serializePathEncoding:tR,normalizeQueryFragmentEncoding:iR,encodeUserinfo:ZS,encodeQuery:rR,encodeFragment:nR,escapePreservingEscapes:oR,removeDotSegments:RS,removeDotSegmentsRelative:WD,isIPv4:Uy,isUUID:ZD,normalizeIPv6:Cy,stringArrayToHexStripped:VD}});var HS=A((G5,BS)=>{"use strict";var{isUUID:sR}=Vy(),cR=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,uR=["http","https","ws","wss","urn","urn:uuid"];function lR(e){return uR.indexOf(e)!==-1}function Fy(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S"):!1}function VS(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function FS(e){let t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function dR(e){return e.secure=Fy(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function fR(e){if((e.port===(Fy(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let t=e.resourceName.indexOf("?"),n=t===-1?e.resourceName:e.resourceName.slice(0,t);e.path=n&&n!=="/"?n:void 0,e.query=t===-1?void 0:e.resourceName.slice(t+1),e.resourceName=void 0}return e.fragment=void 0,e}function pR(e,t){if(!e.path)return e.error="URN can not be parsed",e;let n=e.path.match(cR);if(n&&n[0]===e.path){let i=t.scheme||e.scheme||"urn";e.nid=n[1].toLowerCase(),e.nss=n[2];let r=`${i}:${t.nid||e.nid}`,o=qy(r);e.path=void 0,o&&(e=o.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function mR(e,t){if(e.nid===void 0)throw new Error("URN without nid cannot be serialized");let n=t.scheme||e.scheme||"urn",i=e.nid.toLowerCase(),r=`${n}:${t.nid||i}`,o=qy(r);o&&(e=o.serialize(e,t));let a=e,s=e.nss;return a.path=`${i||t.nid}:${s}`,t.skipEscape=!0,a}function hR(e,t){let n=e;return n.uuid=n.nss,n.nss=void 0,!t.tolerant&&(!n.uuid||!sR(n.uuid))&&(n.error=n.error||"UUID is not valid."),n}function gR(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var qS={scheme:"http",domainHost:!0,parse:VS,serialize:FS},vR={scheme:"https",domainHost:qS.domainHost,parse:VS,serialize:FS},Ff={scheme:"ws",domainHost:!0,parse:dR,serialize:fR},yR={scheme:"wss",domainHost:Ff.domainHost,parse:Ff.parse,serialize:Ff.serialize},_R={scheme:"urn",parse:pR,serialize:mR,skipNormalize:!0},$R={scheme:"urn:uuid",parse:hR,serialize:gR,skipNormalize:!0},qf={http:qS,https:vR,ws:Ff,wss:yR,urn:_R,"urn:uuid":$R};Object.setPrototypeOf(qf,null);function qy(e){return e&&(qf[e]||qf[e.toLowerCase()])||void 0}BS.exports={wsIsSecure:Fy,SCHEMES:qf,isValidSchemeName:lR,getSchemeHandler:qy}});var sI=A((W5,Gf)=>{"use strict";var{normalizeIPv6:XS,removeDotSegments:dc,removeDotSegmentsRelative:YS,recomposeAuthority:bR,normalizePercentEncoding:By,normalizePathEncoding:wR,serializePathEncoding:JS,normalizeQueryFragmentEncoding:KS,encodeQuery:xR,encodeFragment:kR,reescapeHostDelimiters:SR,isIPv4:QS,nonSimpleDomain:IR}=Vy(),{SCHEMES:eI,getSchemeHandler:Hy}=HS(),tI=/^[A-Za-z][A-Za-z0-9+.-]*$/u,rI="URI scheme is malformed.",Bf="URI host is malformed.",zR=/[\0-\x20"#/:<>?@[\\\]^`{|}\x7F]/u;function GS(e){let t=String(e);if(!tI.test(t))throw new TypeError(rI);return t}function PR(e,t){return typeof e=="string"?e=CR(e,t):typeof e=="object"&&(e=Jf(ci(e,t),t)),e}function TR(e,t,n){let i=n?Object.assign({scheme:"null"},n):{scheme:"null"},{parsed:r,malformedAuthorityOrPort:o,malformedPercentEncoding:a,malformedSchemeSpecific:s,malformedHost:c,malformedScheme:u}=Hf(e,i),{parsed:l,malformedAuthorityOrPort:d,malformedPercentEncoding:p,malformedSchemeSpecific:f,malformedHost:m,malformedScheme:h}=Hf(t,i);if(o||d||a||p||s||f||c||m||u||h)throw new Error(r.error||l.error||"URI is malformed.");let g=nI(r,l,i,!0),_=Hy(n&&n.scheme||g.scheme),$=g.host,k=$!==void 0&&$!==""&&(QS($)||XS($).isIPV6);if(oI(g,n||{},_,k))throw new Error(Bf);iI(g,n||{},_,k);let E=$&&$.indexOf("%")!==-1&&!new RegExp("\\P{ASCII}","u").test($);if(g.error&&!E)throw new Error(g.error);return i.skipEscape=!0,ci(g,i)}function nI(e,t,n,i){let r={};if(i||(e=Jf(ci(e,n),n),t=Jf(ci(t,n),n)),n=n||{},!n.tolerant&&t.scheme)r.scheme=t.scheme,r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=dc(t.path||""),r.query=t.query;else{if(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=dc(t.path||""),r.query=t.query;else{if(!t.path)r.path=e.path,t.query!==void 0?r.query=t.query:r.query=e.query;else{if(t.path[0]==="/")r.path=dc(t.path);else{let o=e.userinfo!==void 0||e.host!==void 0||e.port!==void 0;o&&!e.path?r.path="/"+t.path:e.path?r.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:r.path=t.path,r.path=e.scheme===void 0&&!o&&r.path[0]!=="/"?YS(r.path):dc(r.path)}r.query=t.query}r.userinfo=e.userinfo,r.host=e.host,r.port=e.port}r.scheme=e.scheme}return r.fragment=t.fragment,r}function ER(e,t,n){let i=WS(e,n),r=WS(t,n);return i!==void 0&&r!==void 0&&i===r}function ci(e,t){let n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},i=Object.assign({},t),r=[];n.scheme&&(n.scheme=GS(n.scheme));let o=Hy(i.scheme||n.scheme);o&&o.serialize&&o.serialize(n,i);let a=n.userinfo!==void 0||n.host!==void 0||n.port!==void 0,s=(n.scheme===void 0||i.reference==="suffix")&&!a,c=!i.skipEscape&&s;n.path!==void 0&&(i.skipEscape?n.path=By(n.path):n.path=JS(n.path,c)),i.reference!=="suffix"&&n.scheme&&(n.scheme=GS(n.scheme),r.push(n.scheme,":"));let u=bR(n);if(u!==void 0&&(i.reference!=="suffix"&&r.push("//"),r.push(u),n.path&&n.path[0]!=="/"&&r.push("/")),n.path!==void 0){let l=n.path;!i.absolutePath&&(!o||!o.absolutePath)&&(l=s&&l[0]!=="/"?YS(l):dc(l)),s&&(l=JS(l,!0)),u===void 0&&l[0]==="/"&&l[1]==="/"&&(l="/%2F"+l.slice(2)),r.push(l)}return n.query!==void 0&&r.push("?",xR(n.query)),n.fragment!==void 0&&r.push("#",kR(n.fragment)),r.join("")}var OR=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,jR=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,NR=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function AR(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof e.port=="number"&&(e.port<0||e.port>65535))return"URI port is malformed."}function lc(e){if(e===void 0)return!1;let t=e.indexOf("%");for(;t!==-1;){if(t+2>=e.length||!/^[\da-f]{2}$/iu.test(e.slice(t+1,t+3)))return!0;t=e.indexOf("%",t+3)}return!1}function Kf(e){return e[0]==="["&&e[e.length-1]==="]"}function DR(e){let t=e[4];return lc(e[3])||t!==void 0&&!Kf(t)&&lc(t)||lc(e[6])||lc(e[7])||lc(e[8])}function iI(e,t,n,i){if(oI(e,t,n,i))return e.error=e.error||Bf,!0;if(!t.unicodeSupport&&(!n||!n.unicodeSupport)&&e.host&&!Kf(e.host)&&(t.domainHost||n&&n.domainHost)&&i===!1&&IR(e.host)){let r;try{r=new URL("http://"+e.host)}catch(o){return e.error=e.error||"Host's domain name can not be converted to ASCII: "+o,!0}if(!RR(r))return e.error=e.error||Bf,!0;e.host=r.hostname}return!1}function oI(e,t,n,i){return!!(e.host&&i===!1&&!Kf(e.host)&&(t.domainHost||n&&n.domainHost)&&zR.test(e.host))}function RR(e){return e.username===""&&e.password===""&&e.port===""&&e.pathname==="/"&&e.search===""&&e.hash===""&&e.hostname!==""}function Hf(e,t){let n=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},r=!1,o=!1,a=!1,s=!1,c=!1,u=!1,l=!1;n.reference==="suffix"&&(n.scheme?e=n.scheme+":"+e:e="//"+e);let d=e.match(jR);d!==null&&d[1].indexOf("\\")!==-1&&(i.error="URI authority must not contain a literal backslash.",r=!0);let p=e.match(NR);if(p!==null){let m=p[1],h=m.replace(/[\t\n\r]/g,"");h.length>=2&&(h.slice(0,2)!=="//"?(i.error=i.error||"URI authority must not contain a literal backslash.",r=!0):m.length!==h.length&&(i.error=i.error||"URI authority introducer must not contain whitespace.",r=!0))}let f=e.match(OR);if(f){i.scheme=f[1],i.userinfo=f[3],i.host=f[4],i.port=parseInt(f[5],10),i.path=f[6]||"",i.query=f[7],i.fragment=f[8],i.scheme!==void 0&&(tI.test(i.scheme)?i.scheme=i.scheme.toLowerCase():(i.error=i.error||rI,u=!0)),o=DR(f),o&&(i.error=i.error||"URI contains malformed percent-encoding."),isNaN(i.port)&&(i.port=f[5]);let m=AR(i,f);if(m!==void 0&&(i.error=i.error||m,r=!0),i.host)if(QS(i.host)===!1){let _=Kf(i.host),$=i.host.indexOf("[")!==-1||i.host.indexOf("]")!==-1,k=XS(i.host);l=k.isIPV6||k.isIPVFuture===!0,c=$&&(!_||k.error===!0),i.host=l?k.host:k.host.toLowerCase(),c&&(i.error=i.error||Bf,r=!0)}else l=!0;i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path?i.reference="same-document":i.scheme===void 0?i.reference="relative":i.fragment===void 0?i.reference="absolute":i.reference="uri",n.reference&&n.reference!=="suffix"&&n.reference!==i.reference&&(i.error=i.error||"URI is not a "+n.reference+" reference.");let h=Hy(n.scheme||i.scheme);if(c||(s=iI(i,n,h,l)),e.indexOf("%")!==-1&&i.host!==void 0&&!c){let g=l?i.host:By(i.host,!0);l||(g=By(g.toLowerCase())),i.host=l||n.scheme!=="null"?SR(g,l):g}(!h||h&&!h.skipNormalize)&&(i.path&&(i.path=wR(i.path)),i.query&&(i.query=KS(i.query)),i.fragment&&(i.fragment=KS(i.fragment))),h&&h.parse&&(h.parse(i,n),h===eI.urn&&i.nid===void 0&&(a=!0))}else i.error=i.error||"URI can not be parsed.";return{parsed:i,malformedAuthorityOrPort:r,malformedPercentEncoding:o,malformedSchemeSpecific:a,malformedHost:s,malformedScheme:u}}function Jf(e,t){return Hf(e,t).parsed}function CR(e,t){return aI(e,t).normalized}function aI(e,t){let{parsed:n,malformedAuthorityOrPort:i,malformedPercentEncoding:r,malformedSchemeSpecific:o,malformedHost:a,malformedScheme:s}=Hf(e,t);return{normalized:i||r||o||a||s?e:ci(n,t),malformedAuthorityOrPort:i,malformedPercentEncoding:r,malformedSchemeSpecific:o,malformedHost:a,malformedScheme:s}}function WS(e,t){if(typeof e!="string"&&typeof e!="object")return;let n;try{n=typeof e=="string"?e:ci(e,t)}catch{return}let{normalized:i,malformedAuthorityOrPort:r,malformedPercentEncoding:o,malformedSchemeSpecific:a,malformedHost:s,malformedScheme:c}=aI(n,t);return r||o||a||s||c?void 0:i}var Jy={SCHEMES:eI,normalize:PR,resolve:TR,resolveComponent:nI,equal:ER,serialize:ci,parse:Jf};Gf.exports=Jy;Gf.exports.default=Jy;Gf.exports.fastUri=Jy});var uI=A(Ky=>{"use strict";Object.defineProperty(Ky,"__esModule",{value:!0});var cI=sI();cI.code='require("ajv/dist/runtime/uri").default';Ky.default=cI});var vI=A(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.CodeGen=it.Name=it.nil=it.stringify=it.str=it._=it.KeywordCxt=void 0;var UR=cc();Object.defineProperty(it,"KeywordCxt",{enumerable:!0,get:function(){return UR.KeywordCxt}});var Ho=ie();Object.defineProperty(it,"_",{enumerable:!0,get:function(){return Ho._}});Object.defineProperty(it,"str",{enumerable:!0,get:function(){return Ho.str}});Object.defineProperty(it,"stringify",{enumerable:!0,get:function(){return Ho.stringify}});Object.defineProperty(it,"nil",{enumerable:!0,get:function(){return Ho.nil}});Object.defineProperty(it,"Name",{enumerable:!0,get:function(){return Ho.Name}});Object.defineProperty(it,"CodeGen",{enumerable:!0,get:function(){return Ho.CodeGen}});var ZR=Mf(),mI=uc(),MR=vy(),fc=Vf(),LR=ie(),pc=oc(),Wf=ic(),Wy=pe(),lI=NS(),VR=uI(),hI=(e,t)=>new RegExp(e,t);hI.code="new RegExp";var FR=["removeAdditional","useDefaults","coerceTypes"],qR=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),BR={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},HR={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},dI=200;function JR(e){var t,n,i,r,o,a,s,c,u,l,d,p,f,m,h,g,_,$,k,E,T,M,G,Q,X;let Oe=e.strict,Ne=(t=e.code)===null||t===void 0?void 0:t.optimize,Ve=Ne===!0||Ne===void 0?1:Ne||0,Ct=(i=(n=e.code)===null||n===void 0?void 0:n.regExp)!==null&&i!==void 0?i:hI,mt=(r=e.uriResolver)!==null&&r!==void 0?r:VR.default;return{strictSchema:(a=(o=e.strictSchema)!==null&&o!==void 0?o:Oe)!==null&&a!==void 0?a:!0,strictNumbers:(c=(s=e.strictNumbers)!==null&&s!==void 0?s:Oe)!==null&&c!==void 0?c:!0,strictTypes:(l=(u=e.strictTypes)!==null&&u!==void 0?u:Oe)!==null&&l!==void 0?l:"log",strictTuples:(p=(d=e.strictTuples)!==null&&d!==void 0?d:Oe)!==null&&p!==void 0?p:"log",strictRequired:(m=(f=e.strictRequired)!==null&&f!==void 0?f:Oe)!==null&&m!==void 0?m:!1,code:e.code?{...e.code,optimize:Ve,regExp:Ct}:{optimize:Ve,regExp:Ct},loopRequired:(h=e.loopRequired)!==null&&h!==void 0?h:dI,loopEnum:(g=e.loopEnum)!==null&&g!==void 0?g:dI,meta:(_=e.meta)!==null&&_!==void 0?_:!0,messages:($=e.messages)!==null&&$!==void 0?$:!0,inlineRefs:(k=e.inlineRefs)!==null&&k!==void 0?k:!0,schemaId:(E=e.schemaId)!==null&&E!==void 0?E:"$id",addUsedSchema:(T=e.addUsedSchema)!==null&&T!==void 0?T:!0,validateSchema:(M=e.validateSchema)!==null&&M!==void 0?M:!0,validateFormats:(G=e.validateFormats)!==null&&G!==void 0?G:!0,unicodeRegExp:(Q=e.unicodeRegExp)!==null&&Q!==void 0?Q:!0,int32range:(X=e.int32range)!==null&&X!==void 0?X:!0,uriResolver:mt}}var mc=class{constructor(t={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...JR(t)};let{es5:n,lines:i}=this.opts.code;this.scope=new LR.ValueScope({scope:{},prefixes:qR,es5:n,lines:i}),this.logger=QR(t.logger);let r=t.validateFormats;t.validateFormats=!1,this.RULES=(0,MR.getRules)(),fI.call(this,BR,t,"NOT SUPPORTED"),fI.call(this,HR,t,"DEPRECATED","warn"),this._metaOpts=XR.call(this),t.formats&&GR.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&WR.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),KR.call(this),t.validateFormats=r}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:n,schemaId:i}=this.opts,r=lI;i==="id"&&(r={...lI},r.id=r.$id,delete r.$id),n&&t&&this.addMetaSchema(r,r[i],!1)}defaultMeta(){let{meta:t,schemaId:n}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[n]||t:void 0}validate(t,n){let i;if(typeof t=="string"){if(i=this.getSchema(t),!i)throw new Error(`no schema with key or ref "${t}"`)}else i=this.compile(t);let r=i(n);return"$async"in i||(this.errors=i.errors),r}compile(t,n){let i=this._addSchema(t,n);return i.validate||this._compileSchemaEnv(i)}compileAsync(t,n){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:i}=this.opts;return r.call(this,t,n);async function r(l,d){await o.call(this,l.$schema);let p=this._addSchema(l,d);return p.validate||a.call(this,p)}async function o(l){l&&!this.getSchema(l)&&await r.call(this,{$ref:l},!0)}async function a(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof mI.default))throw d;return s.call(this,d),await c.call(this,d.missingSchema),a.call(this,l)}}function s({missingSchema:l,missingRef:d}){if(this.refs[l])throw new Error(`AnySchema ${l} is loaded but ${d} cannot be resolved`)}async function c(l){let d=await u.call(this,l);this.refs[l]||await o.call(this,d.$schema),this.refs[l]||this.addSchema(d,l,n)}async function u(l){let d=this._loading[l];if(d)return d;try{return await(this._loading[l]=i(l))}finally{delete this._loading[l]}}}addSchema(t,n,i,r=this.opts.validateSchema){if(Array.isArray(t)){for(let a of t)this.addSchema(a,void 0,i,r);return this}let o;if(typeof t=="object"){let{schemaId:a}=this.opts;if(o=t[a],o!==void 0&&typeof o!="string")throw new Error(`schema ${a} must be string`)}return n=(0,pc.normalizeId)(n||o),this._checkUnique(n),this.schemas[n]=this._addSchema(t,i,n,r,!0),this}addMetaSchema(t,n,i=this.opts.validateSchema){return this.addSchema(t,n,!0,i),this}validateSchema(t,n){if(typeof t=="boolean")return!0;let i;if(i=t.$schema,i!==void 0&&typeof i!="string")throw new Error("$schema must be a string");if(i=i||this.opts.defaultMeta||this.defaultMeta(),!i)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let r=this.validate(i,t);if(!r&&n){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return r}getSchema(t){let n;for(;typeof(n=pI.call(this,t))=="string";)t=n;if(n===void 0){let{schemaId:i}=this.opts,r=new fc.SchemaEnv({schema:{},schemaId:i});if(n=fc.resolveSchema.call(this,r,t),!n)return;this.refs[t]=n}return n.validate||this._compileSchemaEnv(n)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let n=pI.call(this,t);return typeof n=="object"&&this._cache.delete(n.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let n=t;this._cache.delete(n);let i=t[this.opts.schemaId];return i&&(i=(0,pc.normalizeId)(i),delete this.schemas[i],delete this.refs[i]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let n of t)this.addKeyword(n);return this}addKeyword(t,n){let i;if(typeof t=="string")i=t,typeof n=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),n.keyword=i);else if(typeof t=="object"&&n===void 0){if(n=t,i=n.keyword,Array.isArray(i)&&!i.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(tC.call(this,i,n),!n)return(0,Wy.eachItem)(i,o=>Gy.call(this,o)),this;nC.call(this,n);let r={...n,type:(0,Wf.getJSONTypes)(n.type),schemaType:(0,Wf.getJSONTypes)(n.schemaType)};return(0,Wy.eachItem)(i,r.type.length===0?o=>Gy.call(this,o,r):o=>r.type.forEach(a=>Gy.call(this,o,r,a))),this}getKeyword(t){let n=this.RULES.all[t];return typeof n=="object"?n.definition:!!n}removeKeyword(t){let{RULES:n}=this;delete n.keywords[t],delete n.all[t];for(let i of n.rules){let r=i.rules.findIndex(o=>o.keyword===t);r>=0&&i.rules.splice(r,1)}return this}addFormat(t,n){return typeof n=="string"&&(n=new RegExp(n)),this.formats[t]=n,this}errorsText(t=this.errors,{separator:n=", ",dataVar:i="data"}={}){return!t||t.length===0?"No errors":t.map(r=>`${i}${r.instancePath} ${r.message}`).reduce((r,o)=>r+n+o)}$dataMetaSchema(t,n){let i=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let r of n){let o=r.split("/").slice(1),a=t;for(let s of o)a=a[s];for(let s in i){let c=i[s];if(typeof c!="object")continue;let{$data:u}=c.definition,l=a[s];u&&l&&(a[s]=gI(l))}}return t}_removeAllSchemas(t,n){for(let i in t){let r=t[i];(!n||n.test(i))&&(typeof r=="string"?delete t[i]:r&&!r.meta&&(this._cache.delete(r.schema),delete t[i]))}}_addSchema(t,n,i,r=this.opts.validateSchema,o=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof t=="object")a=t[s];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(t);if(c!==void 0)return c;i=(0,pc.normalizeId)(a||i);let u=pc.getSchemaRefs.call(this,t,i);return c=new fc.SchemaEnv({schema:t,schemaId:s,meta:n,baseId:i,localRefs:u}),this._cache.set(c.schema,c),o&&!i.startsWith("#")&&(i&&this._checkUnique(i),this.refs[i]=c),r&&this.validateSchema(t,!0),c}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):fc.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let n=this.opts;this.opts=this._metaOpts;try{fc.compileSchema.call(this,t)}finally{this.opts=n}}};mc.ValidationError=ZR.default;mc.MissingRefError=mI.default;it.default=mc;function fI(e,t,n,i="error"){for(let r in e){let o=r;o in t&&this.logger[i](`${n}: option ${r}. ${e[o]}`)}}function pI(e){return e=(0,pc.normalizeId)(e),this.schemas[e]||this.refs[e]}function KR(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function GR(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function WR(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let n=e[t];n.keyword||(n.keyword=t),this.addKeyword(n)}}function XR(){let e={...this.opts};for(let t of FR)delete e[t];return e}var YR={log(){},warn(){},error(){}};function QR(e){if(e===!1)return YR;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}var eC=/^[a-z_$][a-z0-9_$:-]*$/i;function tC(e,t){let{RULES:n}=this;if((0,Wy.eachItem)(e,i=>{if(n.keywords[i])throw new Error(`Keyword ${i} is already defined`);if(!eC.test(i))throw new Error(`Keyword ${i} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function Gy(e,t,n){var i;let r=t?.post;if(n&&r)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,a=r?o.post:o.rules.find(({type:c})=>c===n);if(a||(a={type:n,rules:[]},o.rules.push(a)),o.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,Wf.getJSONTypes)(t.type),schemaType:(0,Wf.getJSONTypes)(t.schemaType)}};t.before?rC.call(this,a,s,t.before):a.rules.push(s),o.all[e]=s,(i=t.implements)===null||i===void 0||i.forEach(c=>this.addKeyword(c))}function rC(e,t,n){let i=e.rules.findIndex(r=>r.keyword===n);i>=0?e.rules.splice(i,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function nC(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=gI(t)),e.validateSchema=this.compile(t,!0))}var iC={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function gI(e){return{anyOf:[e,iC]}}});var yI=A(Xy=>{"use strict";Object.defineProperty(Xy,"__esModule",{value:!0});var oC={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Xy.default=oC});var wI=A(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.callRef=ui.getValidate=void 0;var aC=uc(),_I=tr(),Rt=ie(),Jo=Hr(),$I=Vf(),Xf=pe(),sC={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:n,it:i}=e,{baseId:r,schemaEnv:o,validateName:a,opts:s,self:c}=i,{root:u}=o;if((n==="#"||n==="#/")&&r===u.baseId)return d();let l=$I.resolveRef.call(c,u,r,n);if(l===void 0)throw new aC.default(i.opts.uriResolver,r,n);if(l instanceof $I.SchemaEnv)return p(l);return f(l);function d(){if(o===u)return Yf(e,a,o,o.$async);let m=t.scopeValue("root",{ref:u});return Yf(e,(0,Rt._)`${m}.validate`,u,u.$async)}function p(m){let h=bI(e,m);Yf(e,h,m,m.$async)}function f(m){let h=t.scopeValue("schema",s.code.source===!0?{ref:m,code:(0,Rt.stringify)(m)}:{ref:m}),g=t.name("valid"),_=e.subschema({schema:m,dataTypes:[],schemaPath:Rt.nil,topSchemaRef:h,errSchemaPath:n},g);e.mergeEvaluated(_),e.ok(g)}}};function bI(e,t){let{gen:n}=e;return t.validate?n.scopeValue("validate",{ref:t.validate}):(0,Rt._)`${n.scopeValue("wrapper",{ref:t})}.validate`}ui.getValidate=bI;function Yf(e,t,n,i){let{gen:r,it:o}=e,{allErrors:a,schemaEnv:s,opts:c}=o,u=c.passContext?Jo.default.this:Rt.nil;i?l():d();function l(){if(!s.$async)throw new Error("async schema referenced by sync schema");let m=r.let("valid");r.try(()=>{r.code((0,Rt._)`await ${(0,_I.callValidateCode)(e,t,u)}`),f(t),a||r.assign(m,!0)},h=>{r.if((0,Rt._)`!(${h} instanceof ${o.ValidationError})`,()=>r.throw(h)),p(h),a||r.assign(m,!1)}),e.ok(m)}function d(){e.result((0,_I.callValidateCode)(e,t,u),()=>f(t),()=>p(t))}function p(m){let h=(0,Rt._)`${m}.errors`;r.assign(Jo.default.vErrors,(0,Rt._)`${Jo.default.vErrors} === null ? ${h} : ${Jo.default.vErrors}.concat(${h})`),r.assign(Jo.default.errors,(0,Rt._)`${Jo.default.vErrors}.length`)}function f(m){var h;if(!o.opts.unevaluated)return;let g=(h=n?.validate)===null||h===void 0?void 0:h.evaluated;if(o.props!==!0)if(g&&!g.dynamicProps)g.props!==void 0&&(o.props=Xf.mergeEvaluated.props(r,g.props,o.props));else{let _=r.var("props",(0,Rt._)`${m}.evaluated.props`);o.props=Xf.mergeEvaluated.props(r,_,o.props,Rt.Name)}if(o.items!==!0)if(g&&!g.dynamicItems)g.items!==void 0&&(o.items=Xf.mergeEvaluated.items(r,g.items,o.items));else{let _=r.var("items",(0,Rt._)`${m}.evaluated.items`);o.items=Xf.mergeEvaluated.items(r,_,o.items,Rt.Name)}}}ui.callRef=Yf;ui.default=sC});var xI=A(Yy=>{"use strict";Object.defineProperty(Yy,"__esModule",{value:!0});var cC=yI(),uC=wI(),lC=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",cC.default,uC.default];Yy.default=lC});var kI=A(Qy=>{"use strict";Object.defineProperty(Qy,"__esModule",{value:!0});var Qf=ie(),Sn=Qf.operators,ep={maximum:{okStr:"<=",ok:Sn.LTE,fail:Sn.GT},minimum:{okStr:">=",ok:Sn.GTE,fail:Sn.LT},exclusiveMaximum:{okStr:"<",ok:Sn.LT,fail:Sn.GTE},exclusiveMinimum:{okStr:">",ok:Sn.GT,fail:Sn.LTE}},dC={message:({keyword:e,schemaCode:t})=>(0,Qf.str)`must be ${ep[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Qf._)`{comparison: ${ep[e].okStr}, limit: ${t}}`},fC={keyword:Object.keys(ep),type:"number",schemaType:"number",$data:!0,error:dC,code(e){let{keyword:t,data:n,schemaCode:i}=e;e.fail$data((0,Qf._)`${n} ${ep[t].fail} ${i} || isNaN(${n})`)}};Qy.default=fC});var SI=A(e_=>{"use strict";Object.defineProperty(e_,"__esModule",{value:!0});var hc=ie(),pC={message:({schemaCode:e})=>(0,hc.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,hc._)`{multipleOf: ${e}}`},mC={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:pC,code(e){let{gen:t,data:n,schemaCode:i,it:r}=e,o=r.opts.multipleOfPrecision,a=t.let("res"),s=o?(0,hc._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:(0,hc._)`${a} !== parseInt(${a})`;e.fail$data((0,hc._)`(${i} === 0 || (${a} = ${n}/${i}, ${s}))`)}};e_.default=mC});var zI=A(t_=>{"use strict";Object.defineProperty(t_,"__esModule",{value:!0});function II(e){let t=e.length,n=0,i=0,r;for(;i<t;)n++,r=e.charCodeAt(i++),r>=55296&&r<=56319&&i<t&&(r=e.charCodeAt(i),(r&64512)===56320&&i++);return n}t_.default=II;II.code='require("ajv/dist/runtime/ucs2length").default'});var PI=A(r_=>{"use strict";Object.defineProperty(r_,"__esModule",{value:!0});var li=ie(),hC=pe(),gC=zI(),vC={message({keyword:e,schemaCode:t}){let n=e==="maxLength"?"more":"fewer";return(0,li.str)`must NOT have ${n} than ${t} characters`},params:({schemaCode:e})=>(0,li._)`{limit: ${e}}`},yC={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:vC,code(e){let{keyword:t,data:n,schemaCode:i,it:r}=e,o=t==="maxLength"?li.operators.GT:li.operators.LT,a=r.opts.unicode===!1?(0,li._)`${n}.length`:(0,li._)`${(0,hC.useFunc)(e.gen,gC.default)}(${n})`;e.fail$data((0,li._)`${a} ${o} ${i}`)}};r_.default=yC});var TI=A(n_=>{"use strict";Object.defineProperty(n_,"__esModule",{value:!0});var _C=tr(),$C=pe(),Ko=ie(),bC={message:({schemaCode:e})=>(0,Ko.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Ko._)`{pattern: ${e}}`},wC={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:bC,code(e){let{gen:t,data:n,$data:i,schema:r,schemaCode:o,it:a}=e,s=a.opts.unicodeRegExp?"u":"";if(i){let{regExp:c}=a.opts.code,u=c.code==="new RegExp"?(0,Ko._)`new RegExp`:(0,$C.useFunc)(t,c),l=t.let("valid");t.try(()=>t.assign(l,(0,Ko._)`${u}(${o}, ${s}).test(${n})`),()=>t.assign(l,!1)),e.fail$data((0,Ko._)`!${l}`)}else{let c=(0,_C.usePattern)(e,r);e.fail$data((0,Ko._)`!${c}.test(${n})`)}}};n_.default=wC});var EI=A(i_=>{"use strict";Object.defineProperty(i_,"__esModule",{value:!0});var gc=ie(),xC={message({keyword:e,schemaCode:t}){let n=e==="maxProperties"?"more":"fewer";return(0,gc.str)`must NOT have ${n} than ${t} properties`},params:({schemaCode:e})=>(0,gc._)`{limit: ${e}}`},kC={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:xC,code(e){let{keyword:t,data:n,schemaCode:i}=e,r=t==="maxProperties"?gc.operators.GT:gc.operators.LT;e.fail$data((0,gc._)`Object.keys(${n}).length ${r} ${i}`)}};i_.default=kC});var OI=A(o_=>{"use strict";Object.defineProperty(o_,"__esModule",{value:!0});var vc=tr(),yc=ie(),SC=pe(),IC={message:({params:{missingProperty:e}})=>(0,yc.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,yc._)`{missingProperty: ${e}}`},zC={keyword:"required",type:"object",schemaType:"array",$data:!0,error:IC,code(e){let{gen:t,schema:n,schemaCode:i,data:r,$data:o,it:a}=e,{opts:s}=a;if(!o&&n.length===0)return;let c=n.length>=s.loopRequired;if(a.allErrors?u():l(),s.strictRequired){let f=e.parentSchema.properties,{definedProperties:m}=e.it;for(let h of n)if(f?.[h]===void 0&&!m.has(h)){let g=a.schemaEnv.baseId+a.errSchemaPath,_=`required property "${h}" is not defined at "${g}" (strictRequired)`;(0,SC.checkStrictMode)(a,_,a.opts.strictRequired)}}function u(){if(c||o)e.block$data(yc.nil,d);else for(let f of n)(0,vc.checkReportMissingProp)(e,f)}function l(){let f=t.let("missing");if(c||o){let m=t.let("valid",!0);e.block$data(m,()=>p(f,m)),e.ok(m)}else t.if((0,vc.checkMissingProp)(e,n,f)),(0,vc.reportMissingProp)(e,f),t.else()}function d(){t.forOf("prop",i,f=>{e.setParams({missingProperty:f}),t.if((0,vc.noPropertyInData)(t,r,f,s.ownProperties),()=>e.error())})}function p(f,m){e.setParams({missingProperty:f}),t.forOf(f,i,()=>{t.assign(m,(0,vc.propertyInData)(t,r,f,s.ownProperties)),t.if((0,yc.not)(m),()=>{e.error(),t.break()})},yc.nil)}}};o_.default=zC});var jI=A(a_=>{"use strict";Object.defineProperty(a_,"__esModule",{value:!0});var _c=ie(),PC={message({keyword:e,schemaCode:t}){let n=e==="maxItems"?"more":"fewer";return(0,_c.str)`must NOT have ${n} than ${t} items`},params:({schemaCode:e})=>(0,_c._)`{limit: ${e}}`},TC={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:PC,code(e){let{keyword:t,data:n,schemaCode:i}=e,r=t==="maxItems"?_c.operators.GT:_c.operators.LT;e.fail$data((0,_c._)`${n}.length ${r} ${i}`)}};a_.default=TC});var tp=A(s_=>{"use strict";Object.defineProperty(s_,"__esModule",{value:!0});var NI=Sy();NI.code='require("ajv/dist/runtime/equal").default';s_.default=NI});var AI=A(u_=>{"use strict";Object.defineProperty(u_,"__esModule",{value:!0});var c_=ic(),ot=ie(),EC=pe(),OC=tp(),jC={message:({params:{i:e,j:t}})=>(0,ot.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,ot._)`{i: ${e}, j: ${t}}`},NC={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:jC,code(e){let{gen:t,data:n,$data:i,schema:r,parentSchema:o,schemaCode:a,it:s}=e;if(!i&&!r)return;let c=t.let("valid"),u=o.items?(0,c_.getSchemaTypes)(o.items):[];e.block$data(c,l,(0,ot._)`${a} === false`),e.ok(c);function l(){let m=t.let("i",(0,ot._)`${n}.length`),h=t.let("j");e.setParams({i:m,j:h}),t.assign(c,!0),t.if((0,ot._)`${m} > 1`,()=>(d()?p:f)(m,h))}function d(){return u.length>0&&!u.some(m=>m==="object"||m==="array")}function p(m,h){let g=t.name("item"),_=(0,c_.checkDataTypes)(u,g,s.opts.strictNumbers,c_.DataType.Wrong),$=t.const("indices",(0,ot._)`{}`);t.for((0,ot._)`;${m}--;`,()=>{t.let(g,(0,ot._)`${n}[${m}]`),t.if(_,(0,ot._)`continue`),u.length>1&&t.if((0,ot._)`typeof ${g} == "string"`,(0,ot._)`${g} += "_"`),t.if((0,ot._)`typeof ${$}[${g}] == "number"`,()=>{t.assign(h,(0,ot._)`${$}[${g}]`),e.error(),t.assign(c,!1).break()}).code((0,ot._)`${$}[${g}] = ${m}`)})}function f(m,h){let g=(0,EC.useFunc)(t,OC.default),_=t.name("outer");t.label(_).for((0,ot._)`;${m}--;`,()=>t.for((0,ot._)`${h} = ${m}; ${h}--;`,()=>t.if((0,ot._)`${g}(${n}[${m}], ${n}[${h}])`,()=>{e.error(),t.assign(c,!1).break(_)})))}}};u_.default=NC});var DI=A(d_=>{"use strict";Object.defineProperty(d_,"__esModule",{value:!0});var l_=ie(),AC=pe(),DC=tp(),RC={message:"must be equal to constant",params:({schemaCode:e})=>(0,l_._)`{allowedValue: ${e}}`},CC={keyword:"const",$data:!0,error:RC,code(e){let{gen:t,data:n,$data:i,schemaCode:r,schema:o}=e;i||o&&typeof o=="object"?e.fail$data((0,l_._)`!${(0,AC.useFunc)(t,DC.default)}(${n}, ${r})`):e.fail((0,l_._)`${o} !== ${n}`)}};d_.default=CC});var RI=A(f_=>{"use strict";Object.defineProperty(f_,"__esModule",{value:!0});var $c=ie(),UC=pe(),ZC=tp(),MC={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,$c._)`{allowedValues: ${e}}`},LC={keyword:"enum",schemaType:"array",$data:!0,error:MC,code(e){let{gen:t,data:n,$data:i,schema:r,schemaCode:o,it:a}=e;if(!i&&r.length===0)throw new Error("enum must have non-empty array");let s=r.length>=a.opts.loopEnum,c,u=()=>c??(c=(0,UC.useFunc)(t,ZC.default)),l;if(s||i)l=t.let("valid"),e.block$data(l,d);else{if(!Array.isArray(r))throw new Error("ajv implementation error");let f=t.const("vSchema",o);l=(0,$c.or)(...r.map((m,h)=>p(f,h)))}e.pass(l);function d(){t.assign(l,!1),t.forOf("v",o,f=>t.if((0,$c._)`${u()}(${n}, ${f})`,()=>t.assign(l,!0).break()))}function p(f,m){let h=r[m];return typeof h=="object"&&h!==null?(0,$c._)`${u()}(${n}, ${f}[${m}])`:(0,$c._)`${n} === ${h}`}}};f_.default=LC});var CI=A(p_=>{"use strict";Object.defineProperty(p_,"__esModule",{value:!0});var VC=kI(),FC=SI(),qC=PI(),BC=TI(),HC=EI(),JC=OI(),KC=jI(),GC=AI(),WC=DI(),XC=RI(),YC=[VC.default,FC.default,qC.default,BC.default,HC.default,JC.default,KC.default,GC.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},WC.default,XC.default];p_.default=YC});var h_=A(bc=>{"use strict";Object.defineProperty(bc,"__esModule",{value:!0});bc.validateAdditionalItems=void 0;var di=ie(),m_=pe(),QC={message:({params:{len:e}})=>(0,di.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,di._)`{limit: ${e}}`},e6={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:QC,code(e){let{parentSchema:t,it:n}=e,{items:i}=t;if(!Array.isArray(i)){(0,m_.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}UI(e,i)}};function UI(e,t){let{gen:n,schema:i,data:r,keyword:o,it:a}=e;a.items=!0;let s=n.const("len",(0,di._)`${r}.length`);if(i===!1)e.setParams({len:t.length}),e.pass((0,di._)`${s} <= ${t.length}`);else if(typeof i=="object"&&!(0,m_.alwaysValidSchema)(a,i)){let u=n.var("valid",(0,di._)`${s} <= ${t.length}`);n.if((0,di.not)(u),()=>c(u)),e.ok(u)}function c(u){n.forRange("i",t.length,s,l=>{e.subschema({keyword:o,dataProp:l,dataPropType:m_.Type.Num},u),a.allErrors||n.if((0,di.not)(u),()=>n.break())})}}bc.validateAdditionalItems=UI;bc.default=e6});var g_=A(wc=>{"use strict";Object.defineProperty(wc,"__esModule",{value:!0});wc.validateTuple=void 0;var ZI=ie(),rp=pe(),t6=tr(),r6={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:n}=e;if(Array.isArray(t))return MI(e,"additionalItems",t);n.items=!0,!(0,rp.alwaysValidSchema)(n,t)&&e.ok((0,t6.validateArray)(e))}};function MI(e,t,n=e.schema){let{gen:i,parentSchema:r,data:o,keyword:a,it:s}=e;l(r),s.opts.unevaluated&&n.length&&s.items!==!0&&(s.items=rp.mergeEvaluated.items(i,n.length,s.items));let c=i.name("valid"),u=i.const("len",(0,ZI._)`${o}.length`);n.forEach((d,p)=>{(0,rp.alwaysValidSchema)(s,d)||(i.if((0,ZI._)`${u} > ${p}`,()=>e.subschema({keyword:a,schemaProp:p,dataProp:p},c)),e.ok(c))});function l(d){let{opts:p,errSchemaPath:f}=s,m=n.length,h=m===d.minItems&&(m===d.maxItems||d[t]===!1);if(p.strictTuples&&!h){let g=`"${a}" is ${m}-tuple, but minItems or maxItems/${t} are not specified or different at path "${f}"`;(0,rp.checkStrictMode)(s,g,p.strictTuples)}}}wc.validateTuple=MI;wc.default=r6});var LI=A(v_=>{"use strict";Object.defineProperty(v_,"__esModule",{value:!0});var n6=g_(),i6={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n6.validateTuple)(e,"items")};v_.default=i6});var FI=A(y_=>{"use strict";Object.defineProperty(y_,"__esModule",{value:!0});var VI=ie(),o6=pe(),a6=tr(),s6=h_(),c6={message:({params:{len:e}})=>(0,VI.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,VI._)`{limit: ${e}}`},u6={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:c6,code(e){let{schema:t,parentSchema:n,it:i}=e,{prefixItems:r}=n;i.items=!0,!(0,o6.alwaysValidSchema)(i,t)&&(r?(0,s6.validateAdditionalItems)(e,r):e.ok((0,a6.validateArray)(e)))}};y_.default=u6});var qI=A(__=>{"use strict";Object.defineProperty(__,"__esModule",{value:!0});var nr=ie(),np=pe(),l6={message:({params:{min:e,max:t}})=>t===void 0?(0,nr.str)`must contain at least ${e} valid item(s)`:(0,nr.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,nr._)`{minContains: ${e}}`:(0,nr._)`{minContains: ${e}, maxContains: ${t}}`},d6={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:l6,code(e){let{gen:t,schema:n,parentSchema:i,data:r,it:o}=e,a,s,{minContains:c,maxContains:u}=i;o.opts.next?(a=c===void 0?1:c,s=u):a=1;let l=t.const("len",(0,nr._)`${r}.length`);if(e.setParams({min:a,max:s}),s===void 0&&a===0){(0,np.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&a>s){(0,np.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,np.alwaysValidSchema)(o,n)){let h=(0,nr._)`${l} >= ${a}`;s!==void 0&&(h=(0,nr._)`${h} && ${l} <= ${s}`),e.pass(h);return}o.items=!0;let d=t.name("valid");s===void 0&&a===1?f(d,()=>t.if(d,()=>t.break())):a===0?(t.let(d,!0),s!==void 0&&t.if((0,nr._)`${r}.length > 0`,p)):(t.let(d,!1),p()),e.result(d,()=>e.reset());function p(){let h=t.name("_valid"),g=t.let("count",0);f(h,()=>t.if(h,()=>m(g)))}function f(h,g){t.forRange("i",0,l,_=>{e.subschema({keyword:"contains",dataProp:_,dataPropType:np.Type.Num,compositeRule:!0},h),g()})}function m(h){t.code((0,nr._)`${h}++`),s===void 0?t.if((0,nr._)`${h} >= ${a}`,()=>t.assign(d,!0).break()):(t.if((0,nr._)`${h} > ${s}`,()=>t.assign(d,!1).break()),a===1?t.assign(d,!0):t.if((0,nr._)`${h} >= ${a}`,()=>t.assign(d,!0)))}}};__.default=d6});var JI=A(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.validateSchemaDeps=Pr.validatePropertyDeps=Pr.error=void 0;var $_=ie(),f6=pe(),xc=tr();Pr.error={message:({params:{property:e,depsCount:t,deps:n}})=>{let i=t===1?"property":"properties";return(0,$_.str)`must have ${i} ${n} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:n,missingProperty:i}})=>(0,$_._)`{property: ${e},
|
|
8
8
|
missingProperty: ${i},
|
|
9
9
|
depsCount: ${t},
|
|
10
|
-
deps: ${n}}`};var i6={keyword:"dependencies",type:"object",schemaType:"object",error:Pr.error,code(e){let[t,n]=o6(e);LI(e,t),VI(e,n)}};function o6({schema:e}){let t={},n={};for(let i in e){if(i==="__proto__")continue;let r=Array.isArray(e[i])?t:n;r[i]=e[i]}return[t,n]}function LI(e,t=e.schema){let{gen:n,data:i,it:r}=e;if(Object.keys(t).length===0)return;let o=n.let("missing");for(let a in t){let s=t[a];if(s.length===0)continue;let c=(0,_c.propertyInData)(n,i,a,r.opts.ownProperties);e.setParams({property:a,depsCount:s.length,deps:s.join(", ")}),r.allErrors?n.if(c,()=>{for(let u of s)(0,_c.checkReportMissingProp)(e,u)}):(n.if((0,g_._)`${c} && (${(0,_c.checkMissingProp)(e,s,o)})`),(0,_c.reportMissingProp)(e,o),n.else())}}Pr.validatePropertyDeps=LI;function VI(e,t=e.schema){let{gen:n,data:i,keyword:r,it:o}=e,a=n.name("valid");for(let s in t)(0,n6.alwaysValidSchema)(o,t[s])||(n.if((0,_c.propertyInData)(n,i,s,o.opts.ownProperties),()=>{let c=e.subschema({keyword:r,schemaProp:s},a);e.mergeValidEvaluated(c,a)},()=>n.var(a,!0)),e.ok(a))}Pr.validateSchemaDeps=VI;Pr.default=i6});var BI=N(v_=>{"use strict";Object.defineProperty(v_,"__esModule",{value:!0});var qI=ie(),a6=pe(),s6={message:"property name must be valid",params:({params:e})=>(0,qI._)`{propertyName: ${e.propertyName}}`},c6={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:s6,code(e){let{gen:t,schema:n,data:i,it:r}=e;if((0,a6.alwaysValidSchema)(r,n))return;let o=t.name("valid");t.forIn("key",i,a=>{e.setParams({propertyName:a}),e.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),t.if((0,qI.not)(o),()=>{e.error(!0),r.allErrors||t.break()})}),e.ok(o)}};v_.default=c6});var __=N(y_=>{"use strict";Object.defineProperty(y_,"__esModule",{value:!0});var Qf=er(),hr=ie(),u6=Br(),ep=pe(),l6={message:"must NOT have additional properties",params:({params:e})=>(0,hr._)`{additionalProperty: ${e.additionalProperty}}`},d6={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:l6,code(e){let{gen:t,schema:n,parentSchema:i,data:r,errsCount:o,it:a}=e;if(!o)throw new Error("ajv implementation error");let{allErrors:s,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,ep.alwaysValidSchema)(a,n))return;let u=(0,Qf.allSchemaProperties)(i.properties),l=(0,Qf.allSchemaProperties)(i.patternProperties);d(),e.ok((0,hr._)`${o} === ${u6.default.errors}`);function d(){t.forIn("key",r,g=>{!u.length&&!l.length?m(g):t.if(f(g),()=>m(g))})}function f(g){let _;if(u.length>8){let $=(0,ep.schemaRefOrVal)(a,i.properties,"properties");_=(0,Qf.isOwnProperty)(t,$,g)}else u.length?_=(0,hr.or)(...u.map($=>(0,hr._)`${g} === ${$}`)):_=hr.nil;return l.length&&(_=(0,hr.or)(_,...l.map($=>(0,hr._)`${(0,Qf.usePattern)(e,$)}.test(${g})`))),(0,hr.not)(_)}function p(g){t.code((0,hr._)`delete ${r}[${g}]`)}function m(g){if(c.removeAdditional==="all"||c.removeAdditional&&n===!1){p(g);return}if(n===!1){e.setParams({additionalProperty:g}),e.error(),s||t.break();return}if(typeof n=="object"&&!(0,ep.alwaysValidSchema)(a,n)){let _=t.name("valid");c.removeAdditional==="failing"?(h(g,_,!1),t.if((0,hr.not)(_),()=>{e.reset(),p(g)})):(h(g,_),s||t.if((0,hr.not)(_),()=>t.break()))}}function h(g,_,$){let x={keyword:"additionalProperties",dataProp:g,dataPropType:ep.Type.Str};$===!1&&Object.assign(x,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(x,_)}}};y_.default=d6});var KI=N(b_=>{"use strict";Object.defineProperty(b_,"__esModule",{value:!0});var f6=ic(),HI=er(),$_=pe(),JI=__(),p6={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:n,parentSchema:i,data:r,it:o}=e;o.opts.removeAdditional==="all"&&i.additionalProperties===void 0&&JI.default.code(new f6.KeywordCxt(o,JI.default,"additionalProperties"));let a=(0,HI.allSchemaProperties)(n);for(let d of a)o.definedProperties.add(d);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=$_.mergeEvaluated.props(t,(0,$_.toHash)(a),o.props));let s=a.filter(d=>!(0,$_.alwaysValidSchema)(o,n[d]));if(s.length===0)return;let c=t.name("valid");for(let d of s)u(d)?l(d):(t.if((0,HI.propertyInData)(t,r,d,o.opts.ownProperties)),l(d),o.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(c);function u(d){return o.opts.useDefaults&&!o.compositeRule&&n[d].default!==void 0}function l(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};b_.default=p6});var YI=N(w_=>{"use strict";Object.defineProperty(w_,"__esModule",{value:!0});var GI=er(),tp=ie(),WI=pe(),XI=pe(),m6={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:n,data:i,parentSchema:r,it:o}=e,{opts:a}=o,s=(0,GI.allSchemaProperties)(n),c=s.filter(h=>(0,WI.alwaysValidSchema)(o,n[h]));if(s.length===0||c.length===s.length&&(!o.opts.unevaluated||o.props===!0))return;let u=a.strictSchema&&!a.allowMatchingProperties&&r.properties,l=t.name("valid");o.props!==!0&&!(o.props instanceof tp.Name)&&(o.props=(0,XI.evaluatedPropsToName)(t,o.props));let{props:d}=o;f();function f(){for(let h of s)u&&p(h),o.allErrors?m(h):(t.var(l,!0),m(h),t.if(l))}function p(h){for(let g in u)new RegExp(h).test(g)&&(0,WI.checkStrictMode)(o,`property ${g} matches pattern ${h} (use allowMatchingProperties)`)}function m(h){t.forIn("key",i,g=>{t.if((0,tp._)`${(0,GI.usePattern)(e,h)}.test(${g})`,()=>{let _=c.includes(h);_||e.subschema({keyword:"patternProperties",schemaProp:h,dataProp:g,dataPropType:XI.Type.Str},l),o.opts.unevaluated&&d!==!0?t.assign((0,tp._)`${d}[${g}]`,!0):!_&&!o.allErrors&&t.if((0,tp.not)(l),()=>t.break())})})}}};w_.default=m6});var QI=N(k_=>{"use strict";Object.defineProperty(k_,"__esModule",{value:!0});var h6=pe(),g6={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:n,it:i}=e;if((0,h6.alwaysValidSchema)(i,n)){e.fail();return}let r=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},r),e.failResult(r,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};k_.default=g6});var ez=N(x_=>{"use strict";Object.defineProperty(x_,"__esModule",{value:!0});var v6=er(),y6={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:v6.validateUnion,error:{message:"must match a schema in anyOf"}};x_.default=y6});var tz=N(S_=>{"use strict";Object.defineProperty(S_,"__esModule",{value:!0});var rp=ie(),_6=pe(),$6={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,rp._)`{passingSchemas: ${e.passing}}`},b6={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:$6,code(e){let{gen:t,schema:n,parentSchema:i,it:r}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(r.opts.discriminator&&i.discriminator)return;let o=n,a=t.let("valid",!1),s=t.let("passing",null),c=t.name("_valid");e.setParams({passing:s}),t.block(u),e.result(a,()=>e.reset(),()=>e.error(!0));function u(){o.forEach((l,d)=>{let f;(0,_6.alwaysValidSchema)(r,l)?t.var(c,!0):f=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,rp._)`${c} && ${a}`).assign(a,!1).assign(s,(0,rp._)`[${s}, ${d}]`).else(),t.if(c,()=>{t.assign(a,!0),t.assign(s,d),f&&e.mergeEvaluated(f,rp.Name)})})}}};S_.default=b6});var rz=N(I_=>{"use strict";Object.defineProperty(I_,"__esModule",{value:!0});var w6=pe(),k6={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:n,it:i}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");let r=t.name("valid");n.forEach((o,a)=>{if((0,w6.alwaysValidSchema)(i,o))return;let s=e.subschema({keyword:"allOf",schemaProp:a},r);e.ok(r),e.mergeEvaluated(s)})}};I_.default=k6});var oz=N(z_=>{"use strict";Object.defineProperty(z_,"__esModule",{value:!0});var np=ie(),iz=pe(),x6={message:({params:e})=>(0,np.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,np._)`{failingKeyword: ${e.ifClause}}`},S6={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:x6,code(e){let{gen:t,parentSchema:n,it:i}=e;n.then===void 0&&n.else===void 0&&(0,iz.checkStrictMode)(i,'"if" without "then" and "else" is ignored');let r=nz(i,"then"),o=nz(i,"else");if(!r&&!o)return;let a=t.let("valid",!0),s=t.name("_valid");if(c(),e.reset(),r&&o){let l=t.let("ifClause");e.setParams({ifClause:l}),t.if(s,u("then",l),u("else",l))}else r?t.if(s,u("then")):t.if((0,np.not)(s),u("else"));e.pass(a,()=>e.error(!0));function c(){let l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},s);e.mergeEvaluated(l)}function u(l,d){return()=>{let f=e.subschema({keyword:l},s);t.assign(a,s),e.mergeValidEvaluated(f,a),d?t.assign(d,(0,np._)`${l}`):e.setParams({ifClause:l})}}}};function nz(e,t){let n=e.schema[t];return n!==void 0&&!(0,iz.alwaysValidSchema)(e,n)}z_.default=S6});var az=N(P_=>{"use strict";Object.defineProperty(P_,"__esModule",{value:!0});var I6=pe(),z6={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:n}){t.if===void 0&&(0,I6.checkStrictMode)(n,`"${e}" without "if" is ignored`)}};P_.default=z6});var sz=N(T_=>{"use strict";Object.defineProperty(T_,"__esModule",{value:!0});var P6=d_(),T6=CI(),O6=f_(),j6=ZI(),E6=MI(),N6=FI(),A6=BI(),D6=__(),R6=KI(),C6=YI(),U6=QI(),Z6=ez(),M6=tz(),L6=rz(),V6=oz(),F6=az();function q6(e=!1){let t=[U6.default,Z6.default,M6.default,L6.default,V6.default,F6.default,A6.default,D6.default,N6.default,R6.default,C6.default];return e?t.push(T6.default,j6.default):t.push(P6.default,O6.default),t.push(E6.default),t}T_.default=q6});var cz=N(O_=>{"use strict";Object.defineProperty(O_,"__esModule",{value:!0});var qe=ie(),B6={message:({schemaCode:e})=>(0,qe.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,qe._)`{format: ${e}}`},H6={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:B6,code(e,t){let{gen:n,data:i,$data:r,schema:o,schemaCode:a,it:s}=e,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=s;if(!c.validateFormats)return;r?f():p();function f(){let m=n.scopeValue("formats",{ref:d.formats,code:c.code.formats}),h=n.const("fDef",(0,qe._)`${m}[${a}]`),g=n.let("fType"),_=n.let("format");n.if((0,qe._)`typeof ${h} == "object" && !(${h} instanceof RegExp)`,()=>n.assign(g,(0,qe._)`${h}.type || "string"`).assign(_,(0,qe._)`${h}.validate`),()=>n.assign(g,(0,qe._)`"string"`).assign(_,h)),e.fail$data((0,qe.or)($(),x()));function $(){return c.strictSchema===!1?qe.nil:(0,qe._)`${a} && !${_}`}function x(){let O=l.$async?(0,qe._)`(${h}.async ? await ${_}(${i}) : ${_}(${i}))`:(0,qe._)`${_}(${i})`,T=(0,qe._)`(typeof ${_} == "function" ? ${O} : ${_}.test(${i}))`;return(0,qe._)`${_} && ${_} !== true && ${g} === ${t} && !${T}`}}function p(){let m=d.formats[o];if(!m){$();return}if(m===!0)return;let[h,g,_]=x(m);h===t&&e.pass(O());function $(){if(c.strictSchema===!1){d.logger.warn(T());return}throw new Error(T());function T(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function x(T){let C=T instanceof RegExp?(0,qe.regexpCode)(T):c.code.formats?(0,qe._)`${c.code.formats}${(0,qe.getProperty)(o)}`:void 0,G=n.scopeValue("formats",{key:o,ref:T,code:C});return typeof T=="object"&&!(T instanceof RegExp)?[T.type||"string",T.validate,(0,qe._)`${G}.validate`]:["string",T,G]}function O(){if(typeof m=="object"&&!(m instanceof RegExp)&&m.async){if(!l.$async)throw new Error("async format in sync schema");return(0,qe._)`await ${_}(${i})`}return typeof g=="function"?(0,qe._)`${_}(${i})`:(0,qe._)`${_}.test(${i})`}}}};O_.default=H6});var uz=N(j_=>{"use strict";Object.defineProperty(j_,"__esModule",{value:!0});var J6=cz(),K6=[J6.default];j_.default=K6});var lz=N(Jo=>{"use strict";Object.defineProperty(Jo,"__esModule",{value:!0});Jo.contentVocabulary=Jo.metadataVocabulary=void 0;Jo.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Jo.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var fz=N(E_=>{"use strict";Object.defineProperty(E_,"__esModule",{value:!0});var G6=_I(),W6=NI(),X6=sz(),Y6=uz(),dz=lz(),Q6=[G6.default,W6.default,(0,X6.default)(),Y6.default,dz.metadataVocabulary,dz.contentVocabulary];E_.default=Q6});var mz=N(ip=>{"use strict";Object.defineProperty(ip,"__esModule",{value:!0});ip.DiscrError=void 0;var pz;(function(e){e.Tag="tag",e.Mapping="mapping"})(pz||(ip.DiscrError=pz={}))});var gz=N(A_=>{"use strict";Object.defineProperty(A_,"__esModule",{value:!0});var Ko=ie(),N_=mz(),hz=Cf(),eU=oc(),tU=pe(),rU={message:({params:{discrError:e,tagName:t}})=>e===N_.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:n}})=>(0,Ko._)`{error: ${e}, tag: ${n}, tagValue: ${t}}`},nU={keyword:"discriminator",type:"object",schemaType:"object",error:rU,code(e){let{gen:t,data:n,schema:i,parentSchema:r,it:o}=e,{oneOf:a}=r;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let s=i.propertyName;if(typeof s!="string")throw new Error("discriminator: requires propertyName");if(i.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),u=t.const("tag",(0,Ko._)`${n}${(0,Ko.getProperty)(s)}`);t.if((0,Ko._)`typeof ${u} == "string"`,()=>l(),()=>e.error(!1,{discrError:N_.DiscrError.Tag,tag:u,tagName:s})),e.ok(c);function l(){let p=f();t.if(!1);for(let m in p)t.elseIf((0,Ko._)`${u} === ${m}`),t.assign(c,d(p[m]));t.else(),e.error(!1,{discrError:N_.DiscrError.Mapping,tag:u,tagName:s}),t.endIf()}function d(p){let m=t.name("valid"),h=e.subschema({keyword:"oneOf",schemaProp:p},m);return e.mergeEvaluated(h,Ko.Name),m}function f(){var p;let m={},h=_(r),g=!0;for(let O=0;O<a.length;O++){let T=a[O];if(T?.$ref&&!(0,tU.schemaHasRulesButRef)(T,o.self.RULES)){let G=T.$ref;if(T=hz.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,G),T instanceof hz.SchemaEnv&&(T=T.schema),T===void 0)throw new eU.default(o.opts.uriResolver,o.baseId,G)}let C=(p=T?.properties)===null||p===void 0?void 0:p[s];if(typeof C!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);g=g&&(h||_(T)),$(C,O)}if(!g)throw new Error(`discriminator: "${s}" must be required`);return m;function _({required:O}){return Array.isArray(O)&&O.includes(s)}function $(O,T){if(O.const)x(O.const,T);else if(O.enum)for(let C of O.enum)x(C,T);else throw new Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function x(O,T){if(typeof O!="string"||O in m)throw new Error(`discriminator: "${s}" values must be unique strings`);m[O]=T}}}};A_.default=nU});var vz=N((xB,iU)=>{iU.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var R_=N((Ne,D_)=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.MissingRefError=Ne.ValidationError=Ne.CodeGen=Ne.Name=Ne.nil=Ne.stringify=Ne.str=Ne._=Ne.KeywordCxt=Ne.Ajv=void 0;var oU=pI(),aU=fz(),sU=gz(),yz=vz(),cU=["/properties"],op="http://json-schema.org/draft-07/schema",Go=class extends oU.default{_addVocabularies(){super._addVocabularies(),aU.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(sU.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(yz,cU):yz;this.addMetaSchema(t,op,!1),this.refs["http://json-schema.org/schema"]=op}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(op)?op:void 0)}};Ne.Ajv=Go;D_.exports=Ne=Go;D_.exports.Ajv=Go;Object.defineProperty(Ne,"__esModule",{value:!0});Ne.default=Go;var uU=ic();Object.defineProperty(Ne,"KeywordCxt",{enumerable:!0,get:function(){return uU.KeywordCxt}});var Wo=ie();Object.defineProperty(Ne,"_",{enumerable:!0,get:function(){return Wo._}});Object.defineProperty(Ne,"str",{enumerable:!0,get:function(){return Wo.str}});Object.defineProperty(Ne,"stringify",{enumerable:!0,get:function(){return Wo.stringify}});Object.defineProperty(Ne,"nil",{enumerable:!0,get:function(){return Wo.nil}});Object.defineProperty(Ne,"Name",{enumerable:!0,get:function(){return Wo.Name}});Object.defineProperty(Ne,"CodeGen",{enumerable:!0,get:function(){return Wo.CodeGen}});var lU=Df();Object.defineProperty(Ne,"ValidationError",{enumerable:!0,get:function(){return lU.default}});var dU=oc();Object.defineProperty(Ne,"MissingRefError",{enumerable:!0,get:function(){return dU.default}})});var Iz=N(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.formatNames=Or.fastFormats=Or.fullFormats=void 0;function Tr(e,t){return{validate:e,compare:t}}Or.fullFormats={date:Tr(wz,M_),time:Tr(U_(!0),L_),"date-time":Tr(_z(!0),xz),"iso-time":Tr(U_(),kz),"iso-date-time":Tr(_z(),Sz),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:vU,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:xU,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:yU,int32:{type:"number",validate:bU},int64:{type:"number",validate:wU},float:{type:"number",validate:bz},double:{type:"number",validate:bz},password:!0,binary:!0};Or.fastFormats={...Or.fullFormats,date:Tr(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,M_),time:Tr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,L_),"date-time":Tr(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,xz),"iso-time":Tr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,kz),"iso-date-time":Tr(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Sz),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};Or.formatNames=Object.keys(Or.fullFormats);function fU(e){return e%4===0&&(e%100!==0||e%400===0)}var pU=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,mU=[0,31,28,31,30,31,30,31,31,30,31,30,31];function wz(e){let t=pU.exec(e);if(!t)return!1;let n=+t[1],i=+t[2],r=+t[3];return i>=1&&i<=12&&r>=1&&r<=(i===2&&fU(n)?29:mU[i])}function M_(e,t){if(e&&t)return e>t?1:e<t?-1:0}var C_=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function U_(e){return function(n){let i=C_.exec(n);if(!i)return!1;let r=+i[1],o=+i[2],a=+i[3],s=i[4],c=i[5]==="-"?-1:1,u=+(i[6]||0),l=+(i[7]||0);if(u>23||l>59||e&&!s)return!1;if(r<=23&&o<=59&&a<60)return!0;let d=o-l*c,f=r-u*c-(d<0?1:0);return(f===23||f===-1)&&(d===59||d===-1)&&a<61}}function L_(e,t){if(!(e&&t))return;let n=new Date("2020-01-01T"+e).valueOf(),i=new Date("2020-01-01T"+t).valueOf();if(n&&i)return n-i}function kz(e,t){if(!(e&&t))return;let n=C_.exec(e),i=C_.exec(t);if(n&&i)return e=n[1]+n[2]+n[3],t=i[1]+i[2]+i[3],e>t?1:e<t?-1:0}var Z_=/t|\s/i;function _z(e){let t=U_(e);return function(i){let r=i.split(Z_);return r.length===2&&wz(r[0])&&t(r[1])}}function xz(e,t){if(!(e&&t))return;let n=new Date(e).valueOf(),i=new Date(t).valueOf();if(n&&i)return n-i}function Sz(e,t){if(!(e&&t))return;let[n,i]=e.split(Z_),[r,o]=t.split(Z_),a=M_(n,r);if(a!==void 0)return a||L_(i,o)}var hU=/\/|:/,gU=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function vU(e){return hU.test(e)&&gU.test(e)}var $z=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function yU(e){return $z.lastIndex=0,$z.test(e)}var _U=-(2**31),$U=2**31-1;function bU(e){return Number.isInteger(e)&&e<=$U&&e>=_U}function wU(e){return Number.isInteger(e)}function bz(){return!0}var kU=/[^\\]\\Z/;function xU(e){if(kU.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var zz=N(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.formatLimitDefinition=void 0;var SU=R_(),gr=ie(),Sn=gr.operators,ap={formatMaximum:{okStr:"<=",ok:Sn.LTE,fail:Sn.GT},formatMinimum:{okStr:">=",ok:Sn.GTE,fail:Sn.LT},formatExclusiveMaximum:{okStr:"<",ok:Sn.LT,fail:Sn.GTE},formatExclusiveMinimum:{okStr:">",ok:Sn.GT,fail:Sn.LTE}},IU={message:({keyword:e,schemaCode:t})=>(0,gr.str)`should be ${ap[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,gr._)`{comparison: ${ap[e].okStr}, limit: ${t}}`};Xo.formatLimitDefinition={keyword:Object.keys(ap),type:"string",schemaType:"string",$data:!0,error:IU,code(e){let{gen:t,data:n,schemaCode:i,keyword:r,it:o}=e,{opts:a,self:s}=o;if(!a.validateFormats)return;let c=new SU.KeywordCxt(o,s.RULES.all.format.definition,"format");c.$data?u():l();function u(){let f=t.scopeValue("formats",{ref:s.formats,code:a.code.formats}),p=t.const("fmt",(0,gr._)`${f}[${c.schemaCode}]`);e.fail$data((0,gr.or)((0,gr._)`typeof ${p} != "object"`,(0,gr._)`${p} instanceof RegExp`,(0,gr._)`typeof ${p}.compare != "function"`,d(p)))}function l(){let f=c.schema,p=s.formats[f];if(!p||p===!0)return;if(typeof p!="object"||p instanceof RegExp||typeof p.compare!="function")throw new Error(`"${r}": format "${f}" does not define "compare" function`);let m=t.scopeValue("formats",{key:f,ref:p,code:a.code.formats?(0,gr._)`${a.code.formats}${(0,gr.getProperty)(f)}`:void 0});e.fail$data(d(m))}function d(f){return(0,gr._)`${f}.compare(${n}, ${i}) ${ap[r].fail} 0`}},dependencies:["format"]};var zU=e=>(e.addKeyword(Xo.formatLimitDefinition),e);Xo.default=zU});var jz=N(($c,Oz)=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});var Yo=Iz(),PU=zz(),V_=ie(),Pz=new V_.Name("fullFormats"),TU=new V_.Name("fastFormats"),F_=(e,t={keywords:!0})=>{if(Array.isArray(t))return Tz(e,t,Yo.fullFormats,Pz),e;let[n,i]=t.mode==="fast"?[Yo.fastFormats,TU]:[Yo.fullFormats,Pz],r=t.formats||Yo.formatNames;return Tz(e,r,n,i),t.keywords&&(0,PU.default)(e),e};F_.get=(e,t="full")=>{let i=(t==="fast"?Yo.fastFormats:Yo.fullFormats)[e];if(!i)throw new Error(`Unknown format "${e}"`);return i};function Tz(e,t,n,i){var r,o;(r=(o=e.opts.code).formats)!==null&&r!==void 0||(o.formats=(0,V_._)`require("ajv-formats/dist/formats").${i}`);for(let a of t)e.addFormat(a,n[a])}Oz.exports=$c=F_;Object.defineProperty($c,"__esModule",{value:!0});$c.default=F_});import{readFile as GZ}from"node:fs/promises";import{parseArgs as WZ}from"node:util";import{readFileSync as OP}from"node:fs";import{dirname as jP,join as EP}from"node:path";var gi="0.4.0",NP="https://api.heylatch.app";function AP(e=process.cwd()){let t=e;for(;;){let n="";try{n=OP(EP(t,".env"),"utf8")}catch{}let i=/^[ \t]*(?:export[ \t]+)?LATCH_API_KEY[ \t]*=[ \t]*["']?([^"'\s#]+)/m.exec(n);if(i)return i[1];let r=jP(t);if(r===t)return;t=r}}var V=class extends Error{constructor(n,i,r=0,o={}){super(i);this.code=n;this.status=r;this.params=o}code;status;params},y$=4,hi=class{key;kind;baseUrl;fetcher;retryDelayMs;constructor({key:t=process.env.LATCH_API_KEY||AP(),baseUrl:n=process.env.LATCH_API_URL??NP,fetch:i=fetch,retryDelayMs:r=3e3}={}){if(!t)throw new V("noApiKey","No API key. Set LATCH_API_KEY (or add it to a .env file). Developers: a workspace key (ltk_) from your workspace's API page. Server owners: an account key (lta_) from Settings > API keys on heylatch.app.");if(!t.startsWith("ltk_")&&!t.startsWith("lta_"))throw new V("noApiKey","LATCH_API_KEY doesn't look like a Latch API key (it should start with ltk_ or lta_).");this.key=t,this.kind=t.startsWith("lta_")?"account":"workspace",this.baseUrl=n.replace(/\/+$/,""),this.fetcher=i,this.retryDelayMs=r}async request(t,n,i){if(this.kind==="account"&&!n.startsWith("/me"))throw new V("accountKeyForWorkspace","This is an account key (lta_). It only installs scripts from your Library: latch pull <script...> --to <dir> or latch pull --all --to <dir>. Publishing and managing scripts needs a workspace key (ltk_) from your workspace's API page.");let r=0,o=()=>new Promise(a=>setTimeout(a,this.retryDelayMs));for(let a=0;;a++){let s;try{s=await this.fetcher(`${this.baseUrl}/public/v1${n}`,{method:t,headers:{authorization:`Bearer ${this.key}`,"user-agent":`latch-cli/${gi}`,...i!==void 0?{"content-type":"application/json"}:{}},body:i!==void 0?JSON.stringify(i):void 0})}catch(f){if(t==="GET"&&++r<y$){await o();continue}throw new V("network",`Couldn't reach ${this.baseUrl}: ${f.message}`)}let c=await s.json().catch(()=>null);if(s.ok)return c;let u=c?.error;if(!u?.code&&(s.status===502||t==="GET"&&(s.status===503||s.status===504))&&++r<y$){await o();continue}let d=Number(u?.params?.seconds);if(s.status===429&&a<3&&d>0&&d<=90){await new Promise(f=>setTimeout(f,d*1e3));continue}throw new V(u?.code??"generic",u?.message??`Request failed (${s.status}).`,s.status,u?.params??{})}}async fetchPackage(t){let n=await this.fetcher(t);if(!n.ok)throw new V("downloadFailed",`Downloading the package failed (${n.status}). Try again.`,n.status);return new Uint8Array(await n.arrayBuffer())}async upload(t,n){let i=await this.fetcher(t,{method:"PUT",headers:{"content-type":"application/zip"},body:n});if(!i.ok)throw new V("uploadFailed",`Uploading the package failed (${i.status}). The upload link may have expired; try again.`,i.status)}account=()=>this.request("GET","/me");library=()=>this.request("GET","/me/library").then(t=>t.data);downloadLibrary=(t,n)=>this.request("POST",`/me/library/${Te(t)}/versions/${Te(n)}/download`);workspace=()=>this.request("GET","/workspace");listScripts=()=>this.request("GET","/scripts").then(t=>t.data);getScript=t=>this.request("GET",`/scripts/${Te(t)}`);createScript=t=>this.request("POST","/scripts",t);createVersion=(t,n)=>this.request("POST",`/scripts/${Te(t)}/versions`,n);getVersion=(t,n)=>this.request("GET",`/scripts/${Te(t)}/versions/${Te(n)}`);publishVersion=(t,n)=>this.request("POST",`/scripts/${Te(t)}/versions/${Te(n)}/publish`);withdrawVersion=(t,n)=>this.request("POST",`/scripts/${Te(t)}/versions/${Te(n)}/withdraw`);downloadVersion=(t,n)=>this.request("POST",`/scripts/${Te(t)}/versions/${Te(n)}/download`);listGrants=(t,n={})=>this.request("GET",`/scripts/${Te(t)}/grants${Nc(n)}`);grant=(t,n)=>this.request("POST",`/scripts/${Te(t)}/grants`,{accountId:n});grantBulk=(t,n)=>this.request("POST",`/scripts/${Te(t)}/grants/bulk`,{accountIds:n});revoke=(t,n)=>this.request("POST",`/scripts/${Te(t)}/grants/revoke`,{accountId:n});listActivations=(t,n={})=>this.request("GET",`/scripts/${Te(t)}/activations${Nc(n)}`);listFlags=(t,n={})=>this.request("GET",`/scripts/${Te(t)}/flags${Nc(n)}`);resolveFlag=t=>this.request("POST",`/flags/${Te(t)}/resolve`);getListing=t=>this.request("GET",`/scripts/${Te(t)}/listing`);updateListing=(t,n)=>this.request("PATCH",`/scripts/${Te(t)}/listing`,n);listBundles=()=>this.request("GET","/bundles");getBundle=t=>this.request("GET",`/bundles/${Te(t)}`);createBundle=(t,n)=>this.request("POST","/bundles",{name:t,scripts:n});updateBundle=(t,n)=>this.request("PATCH",`/bundles/${Te(t)}`,n);deleteBundle=t=>this.request("DELETE",`/bundles/${Te(t)}`);listBundleGrants=(t,n={})=>this.request("GET",`/bundles/${Te(t)}/grants${Nc(n)}`);grantBundle=(t,n)=>this.request("POST",`/bundles/${Te(t)}/grants`,{accountId:n});revokeBundle=(t,n)=>this.request("POST",`/bundles/${Te(t)}/grants/revoke`,{accountId:n})},Te=encodeURIComponent;function Nc(e){let t=Object.entries(e).filter(([,n])=>n!=null&&n!=="");return t.length?`?${new URLSearchParams(t.map(([n,i])=>[n,String(i)]))}`:""}var Ac='# Latch guide for AI agents\n\nYou are an AI coding agent, and a developer wants their game server scripts protected with Latch. This guide has everything you need to do that from start to finish. Follow it rather than guessing. When a step needs something only the developer can do, stop and ask for it, and say exactly where to get it.\n\nLatch (https://heylatch.app) protects and licenses game server scripts. The developer uploads a resource. Latch encrypts its server code and returns a package that only runs on servers with a valid license key. Supported games: Arcane MP, Kingdoms Connected, Mafia 2 Online and Fallout MP (MafiaHub resources), and Hytale (Java plugins).\n\nLatch doesn\'t change the developer\'s source. Keep working in the source as usual: it stays readable and in their repository. The protected package is a build output that goes to servers.\n\n## Rules\n\n- Never write a protected package over source code. Keep the source and the server\'s install folder separate.\n- Never commit, print or paste keys. API keys (`ltk_...`) and license keys (`LT-...`) go in a git-ignored `.env` file or a CI secret.\n- Publish the original resource, never a package you downloaded from Latch.\n- Don\'t edit files inside a protected package. Modified packages won\'t run. Change the source and publish a new version.\n- Ask before granting or revoking access, withdrawing a version, or publishing to servers real players are on. Those actions affect other people.\n- Show the developer the result of `preview` or `publish-all --dry-run` before the first real publish.\n\n## What you need from the developer\n\nAsk for these once, together, and explain why:\n\n1. **A Latch account and workspace.** Sign up at https://heylatch.app and create a workspace at https://heylatch.app/app/w/new. Plans are per workspace, and the plan limits how many scripts it can hold (see [Projects with many resources](#projects-with-many-resources)).\n2. **An API key.** Workspace > API page (`https://heylatch.app/app/w/<workspace>/api`). The **Publish** preset is enough to publish and install. Choose **Full** only if you\'ll also manage access. Ask them to put it in a git-ignored `.env` at the project root, so you never see the value:\n ```\n LATCH_API_KEY=ltk_...\n ```\n3. **A license key**, only when installing on a server. Get it at https://heylatch.app/app/keys. It goes on the server, not in the project (see [Install on a server](#install-on-a-server)).\n\nYou can\'t create these yourself: the API has no endpoint for accounts, workspaces, API keys or license keys.\n\n## Set up the tools\n\nUse the CLI (needs Node.js 20 or newer). There\'s nothing to install globally:\n\n```sh\nnpx -y @heylatch/cli@latest whoami\n```\n\nThis prints the workspace, plan, script usage and the key\'s permissions. The CLI reads `LATCH_API_KEY` from the environment, or from a `.env` file in the current folder or any folder above it. Add `--json` to any command for machine-readable output. Commands exit with code 1 on failure.\n\nIf your client supports MCP, the same package also runs an MCP server. The developer can add it with:\n\n```sh\nclaude mcp add latch -e LATCH_API_KEY=ltk_... -- npx -y @heylatch/cli@latest mcp\n```\n\nTools: `get_guide`, `whoami`, `list_scripts`, `get_script`, `preview_package`, `publish_version`, `publish_all`, `pull_version`, `get_version_status`, `withdraw_version`, `list_access`, `grant_access`, `revoke_access`, `list_activations`, `list_flags`, `resolve_flag`.\n\nThis guide uses CLI commands. Each one maps directly to an MCP tool.\n\nIf you can\'t run commands (a browser-based assistant, for example), the developer can connect the hosted MCP server at `https://api.heylatch.app/mcp` instead. It signs in with OAuth, so no key is copied: the developer approves the connection on heylatch.app and picks one workspace and its access. It can\'t read local files or check a package first, so prefer the CLI when you have a shell. To publish through it: `create_version`, HTTP PUT the package to the returned URL, `publish_version`, then poll `get_version_status`.\n\n## Prepare the package\n\nLatch protects what the game server loads, so point it at the built resource (with its compiled JavaScript or `.class` files), not an unbuilt project. Build first if the project has a build step.\n\n### MafiaHub resources (Arcane MP, Kingdoms Connected, Mafia 2 Online, Fallout MP)\n\n`package.json` at the resource root needs a `mafiahub` block:\n\n```json\n{\n "name": "my-resource",\n "version": "1.0.0",\n "description": "What it does",\n "mafiahub": {\n "serverScripts": ["dist/server.js"],\n "clientScripts": ["dist/client.js"],\n "files": ["dist/client.js"],\n "resourceDependencies": ["other-resource"]\n },\n "latch": {\n "ecosystem": "mafiahub",\n "ignore": ["config.json"]\n }\n}\n```\n\nWhat happens to each file:\n\n| File | In the package |\n|---|---|\n| `serverScripts`, and other `.js`/`.cjs`/`.json` files | Encrypted. Decrypted only in memory, after the license check. |\n| `clientScripts`, `sharedScripts`, `files` | Sent to players by the game, so they can\'t be encrypted. Their JavaScript is obfuscated. |\n| Anything in `latch.ignore` | Stays readable. Use it for config the server owner edits. |\n| `node_modules/`, images, sounds, other assets | Stay readable. |\n| `.ts`, `.tsx`, `.map` | Left out. |\n| `.git`, `.env`, `server.env`, `latch.env` (when publishing a folder) | Left out. |\n\nThe `latch` block is removed from the published package. Its optional fields:\n\n| Field | Meaning |\n|---|---|\n| `ignore` | Server files to leave readable. Wildcards work: `data/*`, `data/**`. |\n| `obfuscateClient` | `false` ships client JavaScript without obfuscation. |\n| `script` | Script slug on Latch, if it should differ from `name`. |\n| `name` | Display name on Latch, if it should differ from `name`. |\n| `ecosystem` | `mafiahub` for every MafiaHub game. Needed the first time a script is created, unless you pass `--ecosystem`. |\n| `category` | `gameplay`, `economy`, `vehicles`, `ui`, `world`, `admin` or `other`. |\n\nCheck the code for these before publishing:\n\n- **ES modules.** Encrypted server code runs as CommonJS, so `import`/`export` statements won\'t run. Compile server scripts to CommonJS, for example with esbuild\'s `--format=cjs`. `import()` works. Files ending in `.mjs` aren\'t encrypted at all. `preview` warns about this, but the build won\'t fail, so don\'t ignore the warning.\n- **Reading its own files.** Encrypted files aren\'t on disk. `require("./data.json")` works, but `fs.readFile` on an encrypted file doesn\'t. List any file the code reads with `fs` under `latch.ignore`, or switch to `require`.\n- **Server scripts listed for players.** A file in `serverScripts` can\'t also be in `clientScripts`, `sharedScripts` or `files`. This blocks the publish.\n- **Secrets in the bundle.** `node_modules/` stays readable. If server code must stay private, bundle it into `dist/` with its dependencies.\n- **Programs and native files** (`.exe`, `.dll`, `.node`...) aren\'t blocked, but they\'re flagged for the Latch team to review.\n\n### Hytale plugins\n\nPublish the compiled plugin `.jar`. It needs `manifest.json` at its root with a `Main` class, and that class must be in the JAR:\n\n```json\n{\n "Group": "com.acme",\n "Name": "MyPlugin",\n "Version": "1.0.0",\n "Description": "What it does",\n "ServerVersion": "0.7.0-pre.2",\n "Main": "com.acme.Main"\n}\n```\n\nAll classes and resources are encrypted, and the result is a single `.jar` for the server\'s `mods/` folder. Keep asset packs streamed to players (models, textures) out of the code JAR: they can\'t be protected.\n\n## Publish\n\n```sh\n# 1. See what happens to each file. Uploads nothing. Fix anything it reports.\nnpx -y @heylatch/cli@latest preview ./my-resource\n\n# 2. Upload, publish and wait for the build\nnpx -y @heylatch/cli@latest publish ./my-resource --changelog "Fixed spawn bug"\n\n# 3. If you need to check again later\nnpx -y @heylatch/cli@latest status my-resource\n```\n\n`publish` takes the script\'s slug, version, name and description from the manifest. Flags override them: `--script`, `--version`, `--name`, `--description`, `--ecosystem`, `--category`, `--tags`. A script that doesn\'t exist yet is created on first publish; it only needs an ecosystem (`--ecosystem mafiahub|kcdc|hytale`, or `latch.ecosystem`).\n\nVersions:\n\n- Use `1.2.0` form. A new version must be higher than the last one, and a number can\'t be reused, even if its build failed. Raise it in the manifest and publish again.\n- Keep the version in the manifest as the single source, so dependency version checks and Latch agree.\n- Everyone with access is notified when a version is ready, and sees the changelog.\n- If the newest version turns out to be broken, roll it back on Pro and up: `POST /public/v1/scripts/{script}/versions/{version}/rollback`, or the MCP tool `rollback_version`. It\'s withdrawn, and everyone who downloaded it is told to go back. Ask the developer first, because this reaches other people.\n\nSlugs are unique across all of Latch. If a publish fails with `slugTaken`, pass another with `--script` or `latch.script`. That only changes the name on Latch: the resource on the server keeps its `name` from `package.json`, so other resources\' dependencies and `Imports.get` calls keep working.\n\n## Projects with many resources\n\nEach resource folder is one script on Latch. Plans limit scripts per workspace:\n\n| Plan | Scripts |\n|---|---|\n| Free | 1 |\n| Pro | 5 |\n| Studio | 50 |\n| Enterprise | Unlimited |\n\nBefore publishing a large project, count what needs protecting and compare it with `whoami`. If the plan is too small, tell the developer what the options are; don\'t pick for them. They can upgrade, or protect only the resources that hold the valuable logic. Protected and unprotected resources work side by side.\n\nTo publish a folder of resources:\n\n```sh\n# See what would happen. Changes nothing.\nnpx -y @heylatch/cli@latest publish-all ./resources --ecosystem mafiahub --dry-run\n\n# Do it. Safe to rerun: published versions are skipped.\nnpx -y @heylatch/cli@latest publish-all ./resources --ecosystem mafiahub --changelog "..."\n```\n\n- It stops before uploading anything if the new scripts wouldn\'t fit the plan. Narrow it down with `--only a,b` or `--skip a,b` (folder names).\n- One resource failing doesn\'t stop the others. The summary lists each one, and the exit code is 1 if any failed. Fix those and rerun.\n- A changed resource whose version wasn\'t raised is reported as `unchanged`. Raise the version to publish it.\n- The target script comes from each manifest. Read the dry run: if a line says the manifest names the script, check it\'s the script you meant, especially for code you didn\'t write. Publishing an update notifies everyone with access to that script.\n- Resources with no `serverScripts` (client-only UI, for example) are `skipped`. They have nothing Latch can encrypt, so install them on the server as they are.\n\nDependencies between resources keep working: load order, `resourceDependencies`, `Exports.register`, `Exports.get` and `Imports.get` behave as they do unprotected, including calls at the top level of a dependent\'s script. If a dependency\'s license fails, its exports don\'t exist, so resources that need them fail to start and the console says why.\n\n## Install on a server\n\n```sh\n# One script, or several\nnpx -y @heylatch/cli@latest pull my-resource other-resource --to /path/to/server/resources\n\n# Every published script in the workspace\nnpx -y @heylatch/cli@latest pull --all --to /path/to/server/resources\n\n# Hytale plugins go in mods/\nnpx -y @heylatch/cli@latest pull my-plugin --to /path/to/server/mods\n```\n\n`pull` installs the newest ready version and skips scripts that are already on it. With a workspace key it installs the workspace\'s scripts on the developer\'s own servers. Server owners who were granted access use an account key instead (`lta_\u2026`, from Settings > API keys on heylatch.app): the same `pull` then installs the scripts in their Library, and `--all` means every script they can use. Either way it\'s the only safe way to install here:\n\n- It refuses to write through a symlink or junction. Development servers often link source folders into `resources/`, and writing through one would overwrite the source. If `pull` refuses, don\'t work around it: remove the link or use a separate server folder, and tell the developer.\n- It refuses to overwrite a folder that isn\'t a Latch package unless you pass `--force`. Don\'t pass `--force` without asking.\n- Files in the package replace the ones on the server, including readable config. Protect edited files with `--keep config.json,data/*`.\n- Run it with the server stopped, then start the server.\n\n### The license key\n\nEach server needs one key. Set it as an environment variable, or in a `.env`, `server.env` or `latch.env` file in the server folder or a folder above it:\n\n```\nLATCH_LICENSE=LT-XXXX-XXXX-XXXX-XXXX\n```\n\n- One key runs on one server at a time. The same key on a second server is refused and flagged, so a second server (for example main and test) needs an extra key from https://heylatch.app/app/keys.\n- A key isn\'t per script. It opens every script the account can access, so write it once.\n- Workspace members can run their own workspace\'s scripts with their own key, without being granted access.\n- The server needs outbound HTTPS (443) to `api.heylatch.app`.\n\n### Check that it works\n\nStart the server and read the console. For each protected resource, you should see:\n\n```\n[Latch] my-resource: License verified.\n```\n\nThen test the resource\'s actual behavior in-game or through its commands.\n\nEach protected resource checks its license once while it loads, usually in under half a second. The load waits for it, so the script\'s exports are ready for resources that depend on it. This only happens at startup: later checks run in the background and never block the server. Don\'t start long-running work that needs the event loop to finish before later resources load, such as waiting on a database connection at the top level.\n\n## Give others access\n\nServer owners share their account ID, which looks like `LA-7K2M-9QXD`. They\'ll find it in Settings (https://heylatch.app/app/settings).\n\n```sh\nnpx -y @heylatch/cli@latest grant my-resource LA-7K2M-9QXD # safe to retry\nnpx -y @heylatch/cli@latest access my-resource\nnpx -y @heylatch/cli@latest revoke my-resource LA-7K2M-9QXD\n```\n\nThey then download the package from their Library (https://heylatch.app/app/scripts), extract it into `resources/` (Hytale: put the `.jar` in `mods/`), and add their own key. Granting several accounts in one command needs the Studio plan.\n\n### Several scripts at once: bundles\n\nA bundle groups scripts so an account gets all of them in one step and one email. Bundles are live: a script you add later reaches everyone holding the bundle, and a script you remove is taken from them unless they also have it directly or through another bundle. Revoking a bundle never removes scripts that were granted on their own.\n\n```sh\nnpx -y @heylatch/cli@latest bundle create "Full Pack" core-ui inventory phone\nnpx -y @heylatch/cli@latest bundle grant "Full Pack" LA-7K2M-9QXD # safe to retry\nnpx -y @heylatch/cli@latest bundle add "Full Pack" garage # every holder gets it\nnpx -y @heylatch/cli@latest bundles\n```\n\nRefer to a bundle by its id or exact name. MCP tools: `create_bundle`, `update_bundle`, `grant_bundle`, `revoke_bundle`, `list_bundles`, `list_bundle_access`, `delete_bundle`.\n\n### Show a script on Explore\n\nExplore (https://heylatch.app/explore) is Latch\'s public directory of studios and their scripts. It needs a Pro plan or above, and the workspace\'s studio page turned on in workspace settings (a person does that once in the panel). Listing a script makes its page public; "free to use" lets anyone signed in add it to their Library in one click. Nothing is sold on Explore.\n\n```sh\nnpx -y @heylatch/cli@latest listing my-resource # current state\nnpx -y @heylatch/cli@latest listing my-resource --list --about README.md # list it, Markdown text\nnpx -y @heylatch/cli@latest listing my-resource --free # one-click adds\nnpx -y @heylatch/cli@latest listing my-resource --unlist # hide the page; access stays\n```\n\nOnly list or make free what the developer asked for: free scripts reach anyone. Turning free off stops new adds but keeps access people already have. MCP tools: `get_listing`, `update_listing`.\n\n## What happens at runtime\n\n| Situation | Result |\n|---|---|\n| No key, invalid key or no access | The script doesn\'t run and the console says why. The server and other resources keep running. |\n| The script itself throws while starting | Handled like an unprotected resource: that resource fails to start and the server continues. |\n| Access revoked or key revoked while running | The script stops at its next license check, within about 5 minutes. The server keeps running. |\n| License server unreachable at startup | The resource retries every 30 seconds and starts when it gets through. Resources that depend on it at startup can fail, so restart the server once the connection is back. |\n| License server unreachable while running | The script keeps running and retries. After 30 minutes without contact, it stops. |\n\nStopping on MafiaHub: the runtime can\'t unload a resource, so Latch cuts it off instead. Its timers stop, and its handlers for `Events`, `Chat`, `Messages` and `WorldEvents` stop responding. Two things remain until the server restarts: what the script already created in the world, and exports other resources already hold. For cleanup on stop, export a hook from the last server script:\n\n```js\nmodule.exports.onLatchStop = (reason) => {\n // remove spawned entities, close connections\n}\n```\n\nOn Hytale, the plugin is shut down through its normal shutdown.\n\n## Troubleshooting\n\nConsole messages on the server (packages built before loader 5 print them in lowercase, with `stopped:` instead of `Stopped.`):\n\n| Message | Fix |\n|---|---|\n| `License key not found` | `LATCH_LICENSE` is missing or misnamed. See [The license key](#the-license-key). |\n| `Key already active on another server` | Stop the other server, or use an extra key. After moving to a new machine, the key frees up in about 10 minutes. |\n| `This account has no access to this script` | The key\'s account has no grant and isn\'t in the workspace. Grant access, or use a member\'s key. |\n| `This package is outdated` | The script\'s encryption key was rotated. Run `pull` again. |\n| `This package is damaged or was modified` | Files in the package changed. Run `pull` again and don\'t edit them. |\n| `Could not reach the license server (CODE)` | The network failed; `CODE` says how, such as `ENOTFOUND` or `ETIMEDOUT`. Allow outbound HTTPS to `api.heylatch.app`. |\n| `Too many license checks` | Temporary. The loader waits and retries by itself. |\n| `The license server had a problem` | Temporary and not caused by the server. The loader retries by itself. |\n| `Stopped. This key was revoked or replaced.` | A running script stopped because its key changed. Use the current key. |\n| `Stopped. Access to this script was removed.` | The key\'s account lost access. Grant it again, or use a member\'s key. |\n| `Stopped. License server unreachable for 30 minutes.` | Outbound HTTPS was down for over 30 minutes. Fix it and restart the server. |\n| `Cannot find module` or a missing file | The code reads an encrypted file. See [Prepare the package](#prepare-the-package). |\n\nAPI and CLI error codes:\n\n| Code | Fix |\n|---|---|\n| `apiKeyInvalid` | The key is wrong, revoked or expired. Ask for a new one. |\n| `scopeMissing` | The key lacks the permission named in the message. Ask for a key with that scope. |\n| `earlyAccess`, `maintenance` | Latch is limited to invited accounts right now, and the account that created this key isn\'t one. Tell the developer. |\n| `planLimit` | The workspace is at its script limit. Ask the developer how to proceed. |\n| `planRequired` | The feature needs a higher plan. |\n| `versionExists`, `versionLower` | Raise the version. |\n| `slugTaken` | Another script has this slug. Use `--script`. |\n| `packageBlocked` | `preview` lists the problems. Fix them and retry. |\n| `linkedTarget`, `notLatchFolder` | `pull` protected a folder that may hold source. See [Install on a server](#install-on-a-server). |\n| `rateLimited` | The CLI waits and retries by itself. Only seen after repeated limits. |\n\nIf a build fails with status `error`, `buildError` says why. Fix the package, raise the version and publish again.\n\n## React to events\n\nOn Studio and Enterprise, Latch can POST to the developer\'s own server when something happens, for example to deliver a purchase or post in Discord. Use this instead of polling.\n\nAdd one on the workspace\'s API page, or with `POST /public/v1/webhooks` and a key with the `webhooks.manage` permission (the **Full** preset). Events: `version.ready`, `version.failed`, `version.withdrawn`, `version.rolled_back`, `access.granted`, `access.revoked`, `flag.opened`.\n\n- Save the signing secret to the same place as other secrets. It\'s shown once.\n- Always verify `Latch-Signature` before trusting a request: `t=<time>,v1=<hex>`, the HMAC-SHA256 of `<time>.<raw body>`. Reject old timestamps.\n- Answer with a 2xx within 10 seconds and do slow work afterwards. Anything else is retried, up to 8 attempts over about 2 days.\n- The same event can arrive twice. Skip repeats using `id` in the body.\n- Check it works with `POST /public/v1/webhooks/{id}/test`.\n- A Discord channel webhook address also works: Latch posts a formatted message to the channel, with no JSON or signature to handle. Set `language` (`en`, `tr`, `pt`, `fr`, `de`, `es`, `it` or `ru`) for the message language. Treat the address as a secret, because anyone with it can post there.\n\nFull example: https://heylatch.app/docs/api\n\n## Automate releases\n\n```yaml\n# .github/workflows/release.yml, on a tag like v1.2.0\n- run: npx -y @heylatch/cli@latest publish ./dist-resource --version "${GITHUB_REF_NAME#v}"\n env:\n LATCH_API_KEY: ${{ secrets.LATCH_API_KEY }}\n```\n\nOffer to add this block to the project\'s `CLAUDE.md` or `AGENTS.md`, so future sessions keep to the setup:\n\n```markdown\n## Latch\nServer code is protected with Latch. Guide: https://heylatch.app/agents.md\n- Publish from the built resource: `npx -y @heylatch/cli@latest publish <folder>`. Raise `version` first.\n- Install on servers with `npx -y @heylatch/cli@latest pull <script> --to <server>/resources`. Never over source folders.\n- `LATCH_API_KEY` and `LATCH_LICENSE` live in git-ignored `.env` files. Never commit or print them.\n```\n\n## More\n\n- CLI help: `npx -y @heylatch/cli@latest --help`\n- This guide offline, matching the installed version: `latch guide`, or the MCP tool `get_guide`\n- Human docs: https://heylatch.app/docs\n- REST API: https://heylatch.app/docs/api, spec at https://api.heylatch.app/public/v1/openapi.json\n';var le;(function(e){e.assertEqual=r=>{};function t(r){}e.assertIs=t;function n(r){throw new Error}e.assertNever=n,e.arrayToEnum=r=>{let o={};for(let a of r)o[a]=a;return o},e.getValidEnumValues=r=>{let o=e.objectKeys(r).filter(s=>typeof r[r[s]]!="number"),a={};for(let s of o)a[s]=r[s];return e.objectValues(a)},e.objectValues=r=>e.objectKeys(r).map(function(o){return r[o]}),e.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{let o=[];for(let a in r)Object.prototype.hasOwnProperty.call(r,a)&&o.push(a);return o},e.find=(r,o)=>{for(let a of r)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function i(r,o=" | "){return r.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=i,e.jsonStringifyReplacer=(r,o)=>typeof o=="bigint"?o.toString():o})(le||(le={}));var _$;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(_$||(_$={}));var D=le.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Dr=e=>{switch(typeof e){case"undefined":return D.undefined;case"string":return D.string;case"number":return Number.isNaN(e)?D.nan:D.number;case"boolean":return D.boolean;case"function":return D.function;case"bigint":return D.bigint;case"symbol":return D.symbol;case"object":return Array.isArray(e)?D.array:e===null?D.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?D.promise:typeof Map<"u"&&e instanceof Map?D.map:typeof Set<"u"&&e instanceof Set?D.set:typeof Date<"u"&&e instanceof Date?D.date:D.object;default:return D.unknown}};var I=le.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);var Zt=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){let n=t||function(o){return o.message},i={_errors:[]},r=o=>{for(let a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(r);else if(a.code==="invalid_return_type")r(a.returnTypeError);else if(a.code==="invalid_arguments")r(a.argumentsError);else if(a.path.length===0)i._errors.push(n(a));else{let s=i,c=0;for(;c<a.path.length;){let u=a.path[c],l=c===a.path.length-1;if(u==="_errors"){l&&s._errors.push(n(a)),c++;continue}Object.prototype.hasOwnProperty.call(s,u)||(u==="__proto__"?Object.defineProperty(s,u,{value:{_errors:[]},writable:!0,enumerable:!0,configurable:!0}):s[u]={_errors:[]}),s=s[u],l&&s._errors.push(n(a)),c++}}};return r(this),i}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,le.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){let n=Object.create(null),i=[];for(let r of this.issues)if(r.path.length>0){let o=r.path[0];n[o]=n[o]||[],n[o].push(t(r))}else i.push(t(r));return{formErrors:i,fieldErrors:n}}get formErrors(){return this.flatten()}};Zt.create=e=>new Zt(e);var DP=(e,t)=>{let n;switch(e.code){case I.invalid_type:e.received===D.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case I.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,le.jsonStringifyReplacer)}`;break;case I.unrecognized_keys:n=`Unrecognized key(s) in object: ${le.joinValues(e.keys,", ")}`;break;case I.invalid_union:n="Invalid input";break;case I.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${le.joinValues(e.options)}`;break;case I.invalid_enum_value:n=`Invalid enum value. Expected ${le.joinValues(e.options)}, received '${e.received}'`;break;case I.invalid_arguments:n="Invalid function arguments";break;case I.invalid_return_type:n="Invalid function return type";break;case I.invalid_date:n="Invalid date";break;case I.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:le.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case I.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case I.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case I.custom:n="Invalid input";break;case I.invalid_intersection_types:n="Intersection results could not be merged";break;case I.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case I.not_finite:n="Number must be finite";break;default:n=t.defaultError,le.assertNever(e)}return{message:n}},Wr=DP;var RP=Wr;function sa(){return RP}var Dc=e=>{let{data:t,path:n,errorMaps:i,issueData:r}=e,o=[...n,...r.path||[]],a={...r,path:o};if(r.message!==void 0)return{...r,path:o,message:r.message};let s="",c=i.filter(u=>!!u).slice().reverse();for(let u of c)s=u(a,{data:t,defaultError:s}).message;return{...r,path:o,message:s}};function j(e,t){let n=sa(),i=Dc({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Wr?void 0:Wr].filter(r=>!!r)});e.common.issues.push(i)}var st=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){let i=[];for(let r of n){if(r.status==="aborted")return H;r.status==="dirty"&&t.dirty(),i.push(r.value)}return{status:t.value,value:i}}static async mergeObjectAsync(t,n){let i=[];for(let r of n){let o=await r.key,a=await r.value;i.push({key:o,value:a})}return e.mergeObjectSync(t,i)}static mergeObjectSync(t,n){let i={};for(let r of n){let{key:o,value:a}=r;if(o.status==="aborted"||a.status==="aborted")return H;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||r.alwaysSet)&&(i[o.value]=a.value)}return{status:t.value,value:i}}},H=Object.freeze({status:"aborted"}),vi=e=>({status:"dirty",value:e}),ht=e=>({status:"valid",value:e}),xp=e=>e.status==="aborted",Sp=e=>e.status==="dirty",jn=e=>e.status==="valid",ca=e=>typeof Promise<"u"&&e instanceof Promise;var U;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(U||(U={}));var Jt=class{constructor(t,n,i,r){this._cachedPath=[],this.parent=t,this.data=n,this._path=i,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},$$=(e,t)=>{if(jn(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new Zt(e.common.issues);return this._error=n,this._error}}};function ee(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:i,description:r}=e;if(t&&(n||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:r}:{errorMap:(a,s)=>{let{message:c}=e;return a.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:c??i??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:c??n??s.defaultError}},description:r}}var oe=class{get description(){return this._def.description}_getType(t){return Dr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Dr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new st,ctx:{common:t.parent.common,data:t.data,parsedType:Dr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(ca(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){let n=this._parse(t);return Promise.resolve(n)}parse(t,n){let i=this.safeParse(t,n);if(i.success)return i.data;throw i.error}safeParse(t,n){let i={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Dr(t)},r=this._parseSync({data:t,path:i.path,parent:i});return $$(i,r)}"~validate"(t){let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Dr(t)};if(!this["~standard"].async)try{let i=this._parseSync({data:t,path:[],parent:n});return jn(i)?{value:i.value}:{issues:n.common.issues}}catch(i){i?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(i=>jn(i)?{value:i.value}:{issues:n.common.issues})}async parseAsync(t,n){let i=await this.safeParseAsync(t,n);if(i.success)return i.data;throw i.error}async safeParseAsync(t,n){let i={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Dr(t)},r=this._parse({data:t,path:i.path,parent:i}),o=await(ca(r)?r:Promise.resolve(r));return $$(i,o)}refine(t,n){let i=r=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(r):n;return this._refinement((r,o)=>{let a=t(r),s=()=>o.addIssue({code:I.custom,...i(r)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((i,r)=>t(i)?!0:(r.addIssue(typeof n=="function"?n(i,r):n),!1))}_refinement(t){return new ar({schema:this,typeName:P.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return or.create(this,this._def)}nullable(){return Ur.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Yr.create(this)}promise(){return En.create(this,this._def)}or(t){return wi.create([this,t],this._def)}and(t){return ki.create(this,t,this._def)}transform(t){return new ar({...ee(this._def),schema:this,typeName:P.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t=="function"?t:()=>t;return new Pi({...ee(this._def),innerType:this,defaultValue:n,typeName:P.ZodDefault})}brand(){return new Rc({typeName:P.ZodBranded,type:this,...ee(this._def)})}catch(t){let n=typeof t=="function"?t:()=>t;return new Ti({...ee(this._def),innerType:this,catchValue:n,typeName:P.ZodCatch})}describe(t){let n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Cc.create(this,t)}readonly(){return Oi.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},CP=/^c[^\s-]{8,}$/i,UP=/^[0-9a-z]+$/,ZP=/^[0-9A-HJKMNP-TV-Z]{26}$/i,MP=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,LP=/^[a-z0-9_-]{21}$/i,VP=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,FP=/^[-+]?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)?)??$/,qP=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,BP="^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$",Ip,HP=/^(?:(?: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])$/,JP=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,KP=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,GP=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,WP=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,XP=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,b$="((\\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])))",YP=new RegExp(`^${b$}$`);function w$(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function QP(e){return new RegExp(`^${w$(e)}$`)}function eT(e){let t=`${b$}T${w$(e)}`,n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function tT(e,t){return!!((t==="v4"||!t)&&HP.test(e)||(t==="v6"||!t)&&KP.test(e))}function rT(e,t){if(!VP.test(e))return!1;try{let[n]=e.split(".");if(!n)return!1;let i=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),r=JSON.parse(atob(i));return!(typeof r!="object"||r===null||"typ"in r&&r?.typ!=="JWT"||!r.alg||t&&r.alg!==t)}catch{return!1}}function nT(e,t){return!!((t==="v4"||!t)&&JP.test(e)||(t==="v6"||!t)&&GP.test(e))}var _i=class e extends oe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==D.string){let o=this._getOrReturnCtx(t);return j(o,{code:I.invalid_type,expected:D.string,received:o.parsedType}),H}let i=new st,r;for(let o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(r=this._getOrReturnCtx(t,r),j(r,{code:I.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),i.dirty());else if(o.kind==="max")t.data.length>o.value&&(r=this._getOrReturnCtx(t,r),j(r,{code:I.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),i.dirty());else if(o.kind==="length"){let a=t.data.length>o.value,s=t.data.length<o.value;(a||s)&&(r=this._getOrReturnCtx(t,r),a?j(r,{code:I.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&j(r,{code:I.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),i.dirty())}else if(o.kind==="email")qP.test(t.data)||(r=this._getOrReturnCtx(t,r),j(r,{validation:"email",code:I.invalid_string,message:o.message}),i.dirty());else if(o.kind==="emoji")Ip||(Ip=new RegExp(BP,"u")),Ip.test(t.data)||(r=this._getOrReturnCtx(t,r),j(r,{validation:"emoji",code:I.invalid_string,message:o.message}),i.dirty());else if(o.kind==="uuid")MP.test(t.data)||(r=this._getOrReturnCtx(t,r),j(r,{validation:"uuid",code:I.invalid_string,message:o.message}),i.dirty());else if(o.kind==="nanoid")LP.test(t.data)||(r=this._getOrReturnCtx(t,r),j(r,{validation:"nanoid",code:I.invalid_string,message:o.message}),i.dirty());else if(o.kind==="cuid")CP.test(t.data)||(r=this._getOrReturnCtx(t,r),j(r,{validation:"cuid",code:I.invalid_string,message:o.message}),i.dirty());else if(o.kind==="cuid2")UP.test(t.data)||(r=this._getOrReturnCtx(t,r),j(r,{validation:"cuid2",code:I.invalid_string,message:o.message}),i.dirty());else if(o.kind==="ulid")ZP.test(t.data)||(r=this._getOrReturnCtx(t,r),j(r,{validation:"ulid",code:I.invalid_string,message:o.message}),i.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{r=this._getOrReturnCtx(t,r),j(r,{validation:"url",code:I.invalid_string,message:o.message}),i.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(r=this._getOrReturnCtx(t,r),j(r,{validation:"regex",code:I.invalid_string,message:o.message}),i.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(r=this._getOrReturnCtx(t,r),j(r,{code:I.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),i.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(r=this._getOrReturnCtx(t,r),j(r,{code:I.invalid_string,validation:{startsWith:o.value},message:o.message}),i.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(r=this._getOrReturnCtx(t,r),j(r,{code:I.invalid_string,validation:{endsWith:o.value},message:o.message}),i.dirty()):o.kind==="datetime"?eT(o).test(t.data)||(r=this._getOrReturnCtx(t,r),j(r,{code:I.invalid_string,validation:"datetime",message:o.message}),i.dirty()):o.kind==="date"?YP.test(t.data)||(r=this._getOrReturnCtx(t,r),j(r,{code:I.invalid_string,validation:"date",message:o.message}),i.dirty()):o.kind==="time"?QP(o).test(t.data)||(r=this._getOrReturnCtx(t,r),j(r,{code:I.invalid_string,validation:"time",message:o.message}),i.dirty()):o.kind==="duration"?FP.test(t.data)||(r=this._getOrReturnCtx(t,r),j(r,{validation:"duration",code:I.invalid_string,message:o.message}),i.dirty()):o.kind==="ip"?tT(t.data,o.version)||(r=this._getOrReturnCtx(t,r),j(r,{validation:"ip",code:I.invalid_string,message:o.message}),i.dirty()):o.kind==="jwt"?rT(t.data,o.alg)||(r=this._getOrReturnCtx(t,r),j(r,{validation:"jwt",code:I.invalid_string,message:o.message}),i.dirty()):o.kind==="cidr"?nT(t.data,o.version)||(r=this._getOrReturnCtx(t,r),j(r,{validation:"cidr",code:I.invalid_string,message:o.message}),i.dirty()):o.kind==="base64"?WP.test(t.data)||(r=this._getOrReturnCtx(t,r),j(r,{validation:"base64",code:I.invalid_string,message:o.message}),i.dirty()):o.kind==="base64url"?XP.test(t.data)||(r=this._getOrReturnCtx(t,r),j(r,{validation:"base64url",code:I.invalid_string,message:o.message}),i.dirty()):le.assertNever(o);return{status:i.value,value:t.data}}_regex(t,n,i){return this.refinement(r=>t.test(r),{validation:n,code:I.invalid_string,...U.errToObj(i)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...U.errToObj(t)})}url(t){return this._addCheck({kind:"url",...U.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...U.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...U.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...U.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...U.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...U.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...U.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...U.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...U.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...U.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...U.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...U.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...U.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...U.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...U.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...U.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...U.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...U.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...U.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...U.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...U.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...U.errToObj(n)})}nonempty(t){return this.min(1,U.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};_i.create=e=>new _i({checks:[],typeName:P.ZodString,coerce:e?.coerce??!1,...ee(e)});function iT(e,t){let n=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,r=n>i?n:i,o=Number.parseInt(e.toFixed(r).replace(".","")),a=Number.parseInt(t.toFixed(r).replace(".",""));return o%a/10**r}var ua=class e extends oe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==D.number){let o=this._getOrReturnCtx(t);return j(o,{code:I.invalid_type,expected:D.number,received:o.parsedType}),H}let i,r=new st;for(let o of this._def.checks)o.kind==="int"?le.isInteger(t.data)||(i=this._getOrReturnCtx(t,i),j(i,{code:I.invalid_type,expected:"integer",received:"float",message:o.message}),r.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(i=this._getOrReturnCtx(t,i),j(i,{code:I.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),r.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(i=this._getOrReturnCtx(t,i),j(i,{code:I.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),r.dirty()):o.kind==="multipleOf"?iT(t.data,o.value)!==0&&(i=this._getOrReturnCtx(t,i),j(i,{code:I.not_multiple_of,multipleOf:o.value,message:o.message}),r.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(i=this._getOrReturnCtx(t,i),j(i,{code:I.not_finite,message:o.message}),r.dirty()):le.assertNever(o);return{status:r.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,U.toString(n))}gt(t,n){return this.setLimit("min",t,!1,U.toString(n))}lte(t,n){return this.setLimit("max",t,!0,U.toString(n))}lt(t,n){return this.setLimit("max",t,!1,U.toString(n))}setLimit(t,n,i,r){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:i,message:U.toString(r)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:U.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:U.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:U.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:U.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:U.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:U.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:U.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:U.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:U.toString(t)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&le.isInteger(t.value))}get isFinite(){let t=null,n=null;for(let i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(n===null||i.value>n)&&(n=i.value):i.kind==="max"&&(t===null||i.value<t)&&(t=i.value)}return Number.isFinite(n)&&Number.isFinite(t)}};ua.create=e=>new ua({checks:[],typeName:P.ZodNumber,coerce:e?.coerce||!1,...ee(e)});var la=class e extends oe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==D.bigint)return this._getInvalidInput(t);let i,r=new st;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(i=this._getOrReturnCtx(t,i),j(i,{code:I.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),r.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(i=this._getOrReturnCtx(t,i),j(i,{code:I.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),r.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(i=this._getOrReturnCtx(t,i),j(i,{code:I.not_multiple_of,multipleOf:o.value,message:o.message}),r.dirty()):le.assertNever(o);return{status:r.value,value:t.data}}_getInvalidInput(t){let n=this._getOrReturnCtx(t);return j(n,{code:I.invalid_type,expected:D.bigint,received:n.parsedType}),H}gte(t,n){return this.setLimit("min",t,!0,U.toString(n))}gt(t,n){return this.setLimit("min",t,!1,U.toString(n))}lte(t,n){return this.setLimit("max",t,!0,U.toString(n))}lt(t,n){return this.setLimit("max",t,!1,U.toString(n))}setLimit(t,n,i,r){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:i,message:U.toString(r)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:U.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:U.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:U.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:U.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:U.toString(n)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};la.create=e=>new la({checks:[],typeName:P.ZodBigInt,coerce:e?.coerce??!1,...ee(e)});var da=class extends oe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==D.boolean){let i=this._getOrReturnCtx(t);return j(i,{code:I.invalid_type,expected:D.boolean,received:i.parsedType}),H}return ht(t.data)}};da.create=e=>new da({typeName:P.ZodBoolean,coerce:e?.coerce||!1,...ee(e)});var fa=class e extends oe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==D.date){let o=this._getOrReturnCtx(t);return j(o,{code:I.invalid_type,expected:D.date,received:o.parsedType}),H}if(Number.isNaN(t.data.getTime())){let o=this._getOrReturnCtx(t);return j(o,{code:I.invalid_date}),H}let i=new st,r;for(let o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(r=this._getOrReturnCtx(t,r),j(r,{code:I.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),i.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(r=this._getOrReturnCtx(t,r),j(r,{code:I.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),i.dirty()):le.assertNever(o);return{status:i.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:U.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:U.toString(n)})}get minDate(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}};fa.create=e=>new fa({checks:[],coerce:e?.coerce||!1,typeName:P.ZodDate,...ee(e)});var pa=class extends oe{_parse(t){if(this._getType(t)!==D.symbol){let i=this._getOrReturnCtx(t);return j(i,{code:I.invalid_type,expected:D.symbol,received:i.parsedType}),H}return ht(t.data)}};pa.create=e=>new pa({typeName:P.ZodSymbol,...ee(e)});var $i=class extends oe{_parse(t){if(this._getType(t)!==D.undefined){let i=this._getOrReturnCtx(t);return j(i,{code:I.invalid_type,expected:D.undefined,received:i.parsedType}),H}return ht(t.data)}};$i.create=e=>new $i({typeName:P.ZodUndefined,...ee(e)});var bi=class extends oe{_parse(t){if(this._getType(t)!==D.null){let i=this._getOrReturnCtx(t);return j(i,{code:I.invalid_type,expected:D.null,received:i.parsedType}),H}return ht(t.data)}};bi.create=e=>new bi({typeName:P.ZodNull,...ee(e)});var ma=class extends oe{constructor(){super(...arguments),this._any=!0}_parse(t){return ht(t.data)}};ma.create=e=>new ma({typeName:P.ZodAny,...ee(e)});var Xr=class extends oe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ht(t.data)}};Xr.create=e=>new Xr({typeName:P.ZodUnknown,...ee(e)});var _r=class extends oe{_parse(t){let n=this._getOrReturnCtx(t);return j(n,{code:I.invalid_type,expected:D.never,received:n.parsedType}),H}};_r.create=e=>new _r({typeName:P.ZodNever,...ee(e)});var ha=class extends oe{_parse(t){if(this._getType(t)!==D.undefined){let i=this._getOrReturnCtx(t);return j(i,{code:I.invalid_type,expected:D.void,received:i.parsedType}),H}return ht(t.data)}};ha.create=e=>new ha({typeName:P.ZodVoid,...ee(e)});var Yr=class e extends oe{_parse(t){let{ctx:n,status:i}=this._processInputParams(t),r=this._def;if(n.parsedType!==D.array)return j(n,{code:I.invalid_type,expected:D.array,received:n.parsedType}),H;if(r.exactLength!==null){let a=n.data.length>r.exactLength.value,s=n.data.length<r.exactLength.value;(a||s)&&(j(n,{code:a?I.too_big:I.too_small,minimum:s?r.exactLength.value:void 0,maximum:a?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),i.dirty())}if(r.minLength!==null&&n.data.length<r.minLength.value&&(j(n,{code:I.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),i.dirty()),r.maxLength!==null&&n.data.length>r.maxLength.value&&(j(n,{code:I.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),i.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>r.type._parseAsync(new Jt(n,a,n.path,s)))).then(a=>st.mergeArray(i,a));let o=[...n.data].map((a,s)=>r.type._parseSync(new Jt(n,a,n.path,s)));return st.mergeArray(i,o)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:U.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:U.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:U.toString(n)}})}nonempty(t){return this.min(1,t)}};Yr.create=(e,t)=>new Yr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:P.ZodArray,...ee(t)});function yi(e){if(e instanceof Mt){let t={};for(let n in e.shape){let i=e.shape[n];t[n]=or.create(yi(i))}return new Mt({...e._def,shape:()=>t})}else return e instanceof Yr?new Yr({...e._def,type:yi(e.element)}):e instanceof or?or.create(yi(e.unwrap())):e instanceof Ur?Ur.create(yi(e.unwrap())):e instanceof Cr?Cr.create(e.items.map(t=>yi(t))):e}var Mt=class e extends oe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),n=le.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==D.object){let u=this._getOrReturnCtx(t);return j(u,{code:I.invalid_type,expected:D.object,received:u.parsedType}),H}let{status:i,ctx:r}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof _r&&this._def.unknownKeys==="strip"))for(let u in r.data)a.includes(u)||s.push(u);let c=[];for(let u of a){let l=o[u],d=r.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new Jt(r,d,r.path,u)),alwaysSet:u in r.data})}if(this._def.catchall instanceof _r){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of s)c.push({key:{status:"valid",value:l},value:{status:"valid",value:r.data[l]}});else if(u==="strict")s.length>0&&(j(r,{code:I.unrecognized_keys,keys:s}),i.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let l of s){let d=r.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new Jt(r,d,r.path,l)),alwaysSet:l in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let d=await l.key,f=await l.value;u.push({key:d,value:f,alwaysSet:l.alwaysSet})}return u}).then(u=>st.mergeObjectSync(i,u)):st.mergeObjectSync(i,c)}get shape(){return this._def.shape()}strict(t){return U.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,i)=>{let r=this._def.errorMap?.(n,i).message??i.defaultError;return n.code==="unrecognized_keys"?{message:U.errToObj(t).message??r}:{message:r}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:P.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let i of le.objectKeys(t))t[i]&&this.shape[i]&&(n[i]=this.shape[i]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let i of le.objectKeys(this.shape))t[i]||(n[i]=this.shape[i]);return new e({...this._def,shape:()=>n})}deepPartial(){return yi(this)}partial(t){let n={};for(let i of le.objectKeys(this.shape)){let r=this.shape[i];t&&!t[i]?n[i]=r:n[i]=r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let i of le.objectKeys(this.shape))if(t&&!t[i])n[i]=this.shape[i];else{let o=this.shape[i];for(;o instanceof or;)o=o._def.innerType;n[i]=o}return new e({...this._def,shape:()=>n})}keyof(){return k$(le.objectKeys(this.shape))}};Mt.create=(e,t)=>new Mt({shape:()=>e,unknownKeys:"strip",catchall:_r.create(),typeName:P.ZodObject,...ee(t)});Mt.strictCreate=(e,t)=>new Mt({shape:()=>e,unknownKeys:"strict",catchall:_r.create(),typeName:P.ZodObject,...ee(t)});Mt.lazycreate=(e,t)=>new Mt({shape:e,unknownKeys:"strip",catchall:_r.create(),typeName:P.ZodObject,...ee(t)});var wi=class extends oe{_parse(t){let{ctx:n}=this._processInputParams(t),i=this._def.options;function r(o){for(let s of o)if(s.result.status==="valid")return s.result;for(let s of o)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;let a=o.map(s=>new Zt(s.ctx.common.issues));return j(n,{code:I.invalid_union,unionErrors:a}),H}if(n.common.async)return Promise.all(i.map(async o=>{let a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(r);{let o,a=[];for(let c of i){let u={...n,common:{...n.common,issues:[]},parent:null},l=c._parseSync({data:n.data,path:n.path,parent:u});if(l.status==="valid")return l;l.status==="dirty"&&!o&&(o={result:l,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;let s=a.map(c=>new Zt(c));return j(n,{code:I.invalid_union,unionErrors:s}),H}}get options(){return this._def.options}};wi.create=(e,t)=>new wi({options:e,typeName:P.ZodUnion,...ee(t)});var Rr=e=>e instanceof xi?Rr(e.schema):e instanceof ar?Rr(e.innerType()):e instanceof Si?[e.value]:e instanceof Ii?e.options:e instanceof zi?le.objectValues(e.enum):e instanceof Pi?Rr(e._def.innerType):e instanceof $i?[void 0]:e instanceof bi?[null]:e instanceof or?[void 0,...Rr(e.unwrap())]:e instanceof Ur?[null,...Rr(e.unwrap())]:e instanceof Rc||e instanceof Oi?Rr(e.unwrap()):e instanceof Ti?Rr(e._def.innerType):[],zp=class e extends oe{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==D.object)return j(n,{code:I.invalid_type,expected:D.object,received:n.parsedType}),H;let i=this.discriminator,r=n.data[i],o=this.optionsMap.get(r);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(j(n,{code:I.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),H)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,i){let r=new Map;for(let o of n){let a=Rr(o.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let s of a){if(r.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);r.set(s,o)}}return new e({typeName:P.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:r,...ee(i)})}};function Pp(e,t){let n=Dr(e),i=Dr(t);if(e===t)return{valid:!0,data:e};if(n===D.object&&i===D.object){let r=le.objectKeys(t),o=le.objectKeys(e).filter(s=>r.indexOf(s)!==-1),a={...e,...t};Object.prototype.hasOwnProperty.call(a,"__proto__")&&delete a.__proto__;for(let s of o){if(s==="__proto__")continue;let c=Pp(e[s],t[s]);if(!c.valid)return{valid:!1};a[s]=c.data}return{valid:!0,data:a}}else if(n===D.array&&i===D.array){if(e.length!==t.length)return{valid:!1};let r=[];for(let o=0;o<e.length;o++){let a=e[o],s=t[o],c=Pp(a,s);if(!c.valid)return{valid:!1};r.push(c.data)}return{valid:!0,data:r}}else return n===D.date&&i===D.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var ki=class extends oe{_parse(t){let{status:n,ctx:i}=this._processInputParams(t),r=(o,a)=>{if(xp(o)||xp(a))return H;let s=Pp(o.value,a.value);return s.valid?((Sp(o)||Sp(a))&&n.dirty(),{status:n.value,value:s.data}):(j(i,{code:I.invalid_intersection_types}),H)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([o,a])=>r(o,a)):r(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}};ki.create=(e,t,n)=>new ki({left:e,right:t,typeName:P.ZodIntersection,...ee(n)});var Cr=class e extends oe{_parse(t){let{status:n,ctx:i}=this._processInputParams(t);if(i.parsedType!==D.array)return j(i,{code:I.invalid_type,expected:D.array,received:i.parsedType}),H;if(i.data.length<this._def.items.length)return j(i,{code:I.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),H;!this._def.rest&&i.data.length>this._def.items.length&&(j(i,{code:I.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let o=[...i.data].map((a,s)=>{let c=this._def.items[s]||this._def.rest;return c?c._parse(new Jt(i,a,i.path,s)):null}).filter(a=>!!a);return i.common.async?Promise.all(o).then(a=>st.mergeArray(n,a)):st.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Cr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Cr({items:e,typeName:P.ZodTuple,rest:null,...ee(t)})};var Tp=class e extends oe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:i}=this._processInputParams(t);if(i.parsedType!==D.object)return j(i,{code:I.invalid_type,expected:D.object,received:i.parsedType}),H;let r=[],o=this._def.keyType,a=this._def.valueType;for(let s in i.data)r.push({key:o._parse(new Jt(i,s,i.path,s)),value:a._parse(new Jt(i,i.data[s],i.path,s)),alwaysSet:s in i.data});return i.common.async?st.mergeObjectAsync(n,r):st.mergeObjectSync(n,r)}get element(){return this._def.valueType}static create(t,n,i){return n instanceof oe?new e({keyType:t,valueType:n,typeName:P.ZodRecord,...ee(i)}):new e({keyType:_i.create(),valueType:t,typeName:P.ZodRecord,...ee(n)})}},ga=class extends oe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:i}=this._processInputParams(t);if(i.parsedType!==D.map)return j(i,{code:I.invalid_type,expected:D.map,received:i.parsedType}),H;let r=this._def.keyType,o=this._def.valueType,a=[...i.data.entries()].map(([s,c],u)=>({key:r._parse(new Jt(i,s,i.path,[u,"key"])),value:o._parse(new Jt(i,c,i.path,[u,"value"]))}));if(i.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let c of a){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return H;(u.status==="dirty"||l.status==="dirty")&&n.dirty(),s.set(u.value,l.value)}return{status:n.value,value:s}})}else{let s=new Map;for(let c of a){let u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return H;(u.status==="dirty"||l.status==="dirty")&&n.dirty(),s.set(u.value,l.value)}return{status:n.value,value:s}}}};ga.create=(e,t,n)=>new ga({valueType:t,keyType:e,typeName:P.ZodMap,...ee(n)});var va=class e extends oe{_parse(t){let{status:n,ctx:i}=this._processInputParams(t);if(i.parsedType!==D.set)return j(i,{code:I.invalid_type,expected:D.set,received:i.parsedType}),H;let r=this._def;r.minSize!==null&&i.data.size<r.minSize.value&&(j(i,{code:I.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),n.dirty()),r.maxSize!==null&&i.data.size>r.maxSize.value&&(j(i,{code:I.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),n.dirty());let o=this._def.valueType;function a(c){let u=new Set;for(let l of c){if(l.status==="aborted")return H;l.status==="dirty"&&n.dirty(),u.add(l.value)}return{status:n.value,value:u}}let s=[...i.data.values()].map((c,u)=>o._parse(new Jt(i,c,i.path,u)));return i.common.async?Promise.all(s).then(c=>a(c)):a(s)}min(t,n){return new e({...this._def,minSize:{value:t,message:U.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:U.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};va.create=(e,t)=>new va({valueType:e,minSize:null,maxSize:null,typeName:P.ZodSet,...ee(t)});var Op=class e extends oe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==D.function)return j(n,{code:I.invalid_type,expected:D.function,received:n.parsedType}),H;function i(s,c){return Dc({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,sa(),Wr].filter(u=>!!u),issueData:{code:I.invalid_arguments,argumentsError:c}})}function r(s,c){return Dc({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,sa(),Wr].filter(u=>!!u),issueData:{code:I.invalid_return_type,returnTypeError:c}})}let o={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof En){let s=this;return ht(async function(...c){let u=new Zt([]),l=await s._def.args.parseAsync(c,o).catch(p=>{throw u.addIssue(i(c,p)),u}),d=await Reflect.apply(a,this,l);return await s._def.returns._def.type.parseAsync(d,o).catch(p=>{throw u.addIssue(r(d,p)),u})})}else{let s=this;return ht(function(...c){let u=s._def.args.safeParse(c,o);if(!u.success)throw new Zt([i(c,u.error)]);let l=Reflect.apply(a,this,u.data),d=s._def.returns.safeParse(l,o);if(!d.success)throw new Zt([r(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:Cr.create(t).rest(Xr.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,i){return new e({args:t||Cr.create([]).rest(Xr.create()),returns:n||Xr.create(),typeName:P.ZodFunction,...ee(i)})}},xi=class extends oe{get schema(){return this._def.getter()}_parse(t){let{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};xi.create=(e,t)=>new xi({getter:e,typeName:P.ZodLazy,...ee(t)});var Si=class extends oe{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return j(n,{received:n.data,code:I.invalid_literal,expected:this._def.value}),H}return{status:"valid",value:t.data}}get value(){return this._def.value}};Si.create=(e,t)=>new Si({value:e,typeName:P.ZodLiteral,...ee(t)});function k$(e,t){return new Ii({values:e,typeName:P.ZodEnum,...ee(t)})}var Ii=class e extends oe{_parse(t){if(typeof t.data!="string"){let n=this._getOrReturnCtx(t),i=this._def.values;return j(n,{expected:le.joinValues(i),received:n.parsedType,code:I.invalid_type}),H}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let n=this._getOrReturnCtx(t),i=this._def.values;return j(n,{received:n.data,code:I.invalid_enum_value,options:i}),H}return ht(t.data)}get options(){return this._def.values}get enum(){let t={};for(let n of this._def.values)t[n]=n;return t}get Values(){let t={};for(let n of this._def.values)t[n]=n;return t}get Enum(){let t={};for(let n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(i=>!t.includes(i)),{...this._def,...n})}};Ii.create=k$;var zi=class extends oe{_parse(t){let n=le.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(t);if(i.parsedType!==D.string&&i.parsedType!==D.number){let r=le.objectValues(n);return j(i,{expected:le.joinValues(r),received:i.parsedType,code:I.invalid_type}),H}if(this._cache||(this._cache=new Set(le.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let r=le.objectValues(n);return j(i,{received:i.data,code:I.invalid_enum_value,options:r}),H}return ht(t.data)}get enum(){return this._def.values}};zi.create=(e,t)=>new zi({values:e,typeName:P.ZodNativeEnum,...ee(t)});var En=class extends oe{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==D.promise&&n.common.async===!1)return j(n,{code:I.invalid_type,expected:D.promise,received:n.parsedType}),H;let i=n.parsedType===D.promise?n.data:Promise.resolve(n.data);return ht(i.then(r=>this._def.type.parseAsync(r,{path:n.path,errorMap:n.common.contextualErrorMap})))}};En.create=(e,t)=>new En({type:e,typeName:P.ZodPromise,...ee(t)});var ar=class extends oe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===P.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:n,ctx:i}=this._processInputParams(t),r=this._def.effect||null,o={addIssue:a=>{j(i,a),a.fatal?n.abort():n.dirty()},get path(){return i.path}};if(o.addIssue=o.addIssue.bind(o),r.type==="preprocess"){let a=r.transform(i.data,o);if(i.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return H;let c=await this._def.schema._parseAsync({data:s,path:i.path,parent:i});return c.status==="aborted"?H:c.status==="dirty"?vi(c.value):n.value==="dirty"?vi(c.value):c});{if(n.value==="aborted")return H;let s=this._def.schema._parseSync({data:a,path:i.path,parent:i});return s.status==="aborted"?H:s.status==="dirty"?vi(s.value):n.value==="dirty"?vi(s.value):s}}if(r.type==="refinement"){let a=s=>{let c=r.refinement(s,o);if(i.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(i.common.async===!1){let s=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return s.status==="aborted"?H:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(s=>s.status==="aborted"?H:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(r.type==="transform")if(i.common.async===!1){let a=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!jn(a))return H;let s=r.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(a=>jn(a)?Promise.resolve(r.transform(a.value,o)).then(s=>({status:n.value,value:s})):H);le.assertNever(r)}};ar.create=(e,t,n)=>new ar({schema:e,typeName:P.ZodEffects,effect:t,...ee(n)});ar.createWithPreprocess=(e,t,n)=>new ar({schema:t,effect:{type:"preprocess",transform:e},typeName:P.ZodEffects,...ee(n)});var or=class extends oe{_parse(t){return this._getType(t)===D.undefined?ht(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};or.create=(e,t)=>new or({innerType:e,typeName:P.ZodOptional,...ee(t)});var Ur=class extends oe{_parse(t){return this._getType(t)===D.null?ht(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Ur.create=(e,t)=>new Ur({innerType:e,typeName:P.ZodNullable,...ee(t)});var Pi=class extends oe{_parse(t){let{ctx:n}=this._processInputParams(t),i=n.data;return n.parsedType===D.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};Pi.create=(e,t)=>new Pi({innerType:e,typeName:P.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ee(t)});var Ti=class extends oe{_parse(t){let{ctx:n}=this._processInputParams(t),i={...n,common:{...n.common,issues:[]}},r=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return ca(r)?r.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Zt(i.common.issues)},input:i.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new Zt(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}};Ti.create=(e,t)=>new Ti({innerType:e,typeName:P.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ee(t)});var ya=class extends oe{_parse(t){if(this._getType(t)!==D.nan){let i=this._getOrReturnCtx(t);return j(i,{code:I.invalid_type,expected:D.nan,received:i.parsedType}),H}return{status:"valid",value:t.data}}};ya.create=e=>new ya({typeName:P.ZodNaN,...ee(e)});var Rc=class extends oe{_parse(t){let{ctx:n}=this._processInputParams(t),i=n.data;return this._def.type._parse({data:i,path:n.path,parent:n})}unwrap(){return this._def.type}},Cc=class e extends oe{_parse(t){let{status:n,ctx:i}=this._processInputParams(t);if(i.common.async)return(async()=>{let o=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return o.status==="aborted"?H:o.status==="dirty"?(n.dirty(),vi(o.value)):this._def.out._parseAsync({data:o.value,path:i.path,parent:i})})();{let r=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return r.status==="aborted"?H:r.status==="dirty"?(n.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:i.path,parent:i})}}static create(t,n){return new e({in:t,out:n,typeName:P.ZodPipeline})}},Oi=class extends oe{_parse(t){let n=this._def.innerType._parse(t),i=r=>(jn(r)&&(r.value=Object.freeze(r.value)),r);return ca(n)?n.then(r=>i(r)):i(n)}unwrap(){return this._def.innerType}};Oi.create=(e,t)=>new Oi({innerType:e,typeName:P.ZodReadonly,...ee(t)});var wM={object:Mt.lazycreate},P;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(P||(P={}));var kM=_i.create,xM=ua.create,SM=ya.create,IM=la.create,zM=da.create,PM=fa.create,TM=pa.create,OM=$i.create,jM=bi.create,EM=ma.create,NM=Xr.create,AM=_r.create,DM=ha.create,RM=Yr.create,x$=Mt.create,CM=Mt.strictCreate,UM=wi.create,ZM=zp.create,MM=ki.create,LM=Cr.create,VM=Tp.create,FM=ga.create,qM=va.create,BM=Op.create,HM=xi.create,JM=Si.create,KM=Ii.create,GM=zi.create,WM=En.create,XM=ar.create,YM=or.create,QM=Ur.create,e2=ar.createWithPreprocess,t2=Cc.create;var ur={};Ar(ur,{$ZodAny:()=>Bu,$ZodArray:()=>Wu,$ZodAsyncError:()=>Pt,$ZodBase64:()=>Tu,$ZodBase64URL:()=>ju,$ZodBigInt:()=>Ma,$ZodBigIntFormat:()=>Lu,$ZodBoolean:()=>Gi,$ZodCIDRv4:()=>Su,$ZodCIDRv6:()=>zu,$ZodCUID:()=>vu,$ZodCUID2:()=>yu,$ZodCatch:()=>ml,$ZodCheck:()=>we,$ZodCheckBigIntFormat:()=>Rm,$ZodCheckEndsWith:()=>Km,$ZodCheckGreaterThan:()=>ru,$ZodCheckIncludes:()=>Hm,$ZodCheckLengthEquals:()=>Vm,$ZodCheckLessThan:()=>tu,$ZodCheckLowerCase:()=>qm,$ZodCheckMaxLength:()=>Mm,$ZodCheckMaxSize:()=>Cm,$ZodCheckMimeType:()=>Xm,$ZodCheckMinLength:()=>Lm,$ZodCheckMinSize:()=>Um,$ZodCheckMultipleOf:()=>Am,$ZodCheckNumberFormat:()=>Dm,$ZodCheckOverwrite:()=>Ym,$ZodCheckProperties:()=>Wm,$ZodCheckProperty:()=>Gm,$ZodCheckRegex:()=>Fm,$ZodCheckSizeEquals:()=>Zm,$ZodCheckStartsWith:()=>Jm,$ZodCheckStringFormat:()=>Ji,$ZodCheckUpperCase:()=>Bm,$ZodCodec:()=>Xi,$ZodCreditCard:()=>Au,$ZodCustom:()=>$l,$ZodCustomStringFormat:()=>Zu,$ZodCyclicError:()=>xl,$ZodDate:()=>Gu,$ZodDefault:()=>ll,$ZodDiscriminatedUnion:()=>Qu,$ZodE164:()=>Eu,$ZodEmail:()=>lu,$ZodEmoji:()=>hu,$ZodEncodeError:()=>en,$ZodEnum:()=>il,$ZodError:()=>Kp,$ZodExactOptional:()=>cl,$ZodFile:()=>al,$ZodFunction:()=>yl,$ZodGUID:()=>cu,$ZodIBAN:()=>Ru,$ZodIPv4:()=>wu,$ZodIPv6:()=>ku,$ZodISODate:()=>ih,$ZodISODateTime:()=>nh,$ZodISODuration:()=>ah,$ZodISOTime:()=>oh,$ZodIntersection:()=>el,$ZodJWT:()=>Uu,$ZodKSUID:()=>bu,$ZodLazy:()=>Yi,$ZodLiteral:()=>ol,$ZodMAC:()=>xu,$ZodMap:()=>rl,$ZodNaN:()=>hl,$ZodNanoID:()=>gu,$ZodNever:()=>Ju,$ZodNonOptional:()=>fl,$ZodNull:()=>qu,$ZodNullable:()=>ul,$ZodNumber:()=>Za,$ZodNumberFormat:()=>Mu,$ZodObject:()=>Xu,$ZodObjectJIT:()=>ch,$ZodOptional:()=>Va,$ZodPipe:()=>Fa,$ZodPrefault:()=>dl,$ZodPreprocess:()=>lh,$ZodPromise:()=>_l,$ZodReadonly:()=>gl,$ZodRealError:()=>Tt,$ZodRecord:()=>tl,$ZodRegistry:()=>Ol,$ZodSet:()=>nl,$ZodString:()=>tn,$ZodStringFormat:()=>ye,$ZodSuccess:()=>pl,$ZodSymbol:()=>Vu,$ZodTemplateLiteral:()=>vl,$ZodTransform:()=>sl,$ZodTuple:()=>La,$ZodType:()=>W,$ZodULID:()=>_u,$ZodURL:()=>mu,$ZodUUID:()=>uu,$ZodUndefined:()=>Fu,$ZodUnion:()=>Wi,$ZodUnknown:()=>Hu,$ZodVoid:()=>Ku,$ZodXID:()=>$u,$ZodXor:()=>Yu,$brand:()=>Bp,$constructor:()=>v,$input:()=>mh,$output:()=>ph,Doc:()=>Zn,INVALID:()=>yt,JSONSchema:()=>ak,JSONSchemaGenerator:()=>_d,NEVER:()=>qp,TimePrecision:()=>wh,URL_BAD_FORMAT:()=>th,URL_UNPARSEABLE:()=>Aa,ZodCompileAsyncError:()=>sr,ZodCompileUnsupportedError:()=>ce,_any:()=>Yl,_array:()=>zh,_base64:()=>ds,_base64url:()=>fs,_bigint:()=>Hl,_boolean:()=>Bl,_catch:()=>Jj,_check:()=>qw,_cidrv4:()=>us,_cidrv6:()=>ls,_coercedBigint:()=>Sh,_coercedBoolean:()=>xh,_coercedDate:()=>Ih,_coercedNumber:()=>kh,_coercedString:()=>bh,_creditCard:()=>Cl,_cuid:()=>rs,_cuid2:()=>ns,_custom:()=>ld,_date:()=>rd,_decode:()=>qc,_decodeAsync:()=>Hc,_default:()=>qj,_discriminatedUnion:()=>Ej,_e164:()=>ps,_email:()=>Ka,_emoji:()=>es,_encode:()=>Fc,_encodeAsync:()=>Bc,_endsWith:()=>uo,_enum:()=>Uj,_file:()=>ud,_float32:()=>Ll,_float64:()=>Vl,_gt:()=>wr,_gte:()=>Ft,_guid:()=>Ga,_iban:()=>Ul,_includes:()=>so,_int:()=>Ml,_int32:()=>Fl,_int64:()=>Jl,_intersection:()=>Nj,_ipv4:()=>ss,_ipv6:()=>cs,_isoDate:()=>gs,_isoDateTime:()=>hs,_isoDuration:()=>ys,_isoTime:()=>vs,_jwt:()=>ms,_ksuid:()=>as,_lazy:()=>Xj,_length:()=>Bn,_literal:()=>Mj,_lowercase:()=>oo,_lt:()=>br,_lte:()=>Vt,_mac:()=>Rl,_map:()=>Rj,_max:()=>Vt,_maxLength:()=>qn,_maxSize:()=>on,_mime:()=>fo,_min:()=>Ft,_minLength:()=>Vr,_minSize:()=>kr,_multipleOf:()=>nn,_nan:()=>nd,_nanoid:()=>ts,_nativeEnum:()=>Zj,_negative:()=>od,_never:()=>ed,_nonnegative:()=>sd,_nonoptional:()=>Bj,_nonpositive:()=>ad,_normalize:()=>po,_null:()=>Xl,_nullable:()=>Fj,_number:()=>Zl,_optional:()=>Vj,_overwrite:()=>cr,_parse:()=>Zi,_parseAsync:()=>Mi,_pipe:()=>Kj,_positive:()=>id,_promise:()=>Yj,_properties:()=>lo,_property:()=>cd,_readonly:()=>Gj,_record:()=>Dj,_refine:()=>dd,_regex:()=>io,_safeDecode:()=>Kc,_safeDecodeAsync:()=>Wc,_safeEncode:()=>Jc,_safeEncodeAsync:()=>Gc,_safeParse:()=>Li,_safeParseAsync:()=>Fi,_set:()=>Cj,_size:()=>Fn,_slugify:()=>vo,_startsWith:()=>co,_string:()=>Dl,_stringFormat:()=>an,_stringbool:()=>hd,_success:()=>Hj,_superRefine:()=>fd,_symbol:()=>Gl,_templateLiteral:()=>Wj,_toLowerCase:()=>ho,_toUpperCase:()=>go,_transform:()=>Lj,_trim:()=>mo,_tuple:()=>Aj,_uint32:()=>ql,_uint64:()=>Kl,_ulid:()=>is,_undefined:()=>Wl,_union:()=>Oj,_unknown:()=>Ql,_uppercase:()=>ao,_url:()=>no,_uuid:()=>Wa,_uuidv4:()=>Xa,_uuidv6:()=>Ya,_uuidv7:()=>Qa,_void:()=>td,_xid:()=>os,_xor:()=>jj,base64Charset:()=>Pu,base64urlCharset:()=>Ua,canParseURL:()=>rh,clone:()=>he,compile:()=>yh,compileFn:()=>Nl,config:()=>Me,createStandardJSONSchemaMethod:()=>yo,createToJSONSchemaMethod:()=>Th,decode:()=>B$,decodeAsync:()=>J$,describe:()=>pd,encode:()=>q$,encodeAsync:()=>H$,extractDefs:()=>cn,finalize:()=>un,flattenError:()=>Pa,formatError:()=>Ta,getDiscriminatedOption:()=>uh,globalConfig:()=>Ge,globalRegistry:()=>Qe,handleUnrepresentable:()=>Be,initializeContext:()=>sn,isBackEdge:()=>Il,isRecursiveSchema:()=>Sl,isValidBase64:()=>Ca,isValidBase64URL:()=>Ou,isValidCIDRv6:()=>Iu,isValidCreditCard:()=>Nu,isValidIBAN:()=>Du,isValidIPv6:()=>Ra,isValidJWT:()=>Cu,locales:()=>to,memoizer:()=>Ha,mergeValues:()=>Ki,meta:()=>md,parse:()=>Rn,parseAsync:()=>Cn,parseURLObject:()=>vb,prettifyError:()=>Wp,process:()=>$e,processSchema:()=>$e,regexes:()=>Lt,registry:()=>jl,safeDecode:()=>G$,safeDecodeAsync:()=>X$,safeEncode:()=>K$,safeEncodeAsync:()=>W$,safeParse:()=>Vi,safeParseAsync:()=>qi,standardProps:()=>su,stripTabAndNewline:()=>Da,toDotPath:()=>V$,toJSONSchema:()=>Hn,toZod:()=>_a,treeifyError:()=>Gp,urlHostnameOk:()=>fu,urlProtocolOk:()=>pu,util:()=>w,validate:()=>Bi,validateAsync:()=>Hi,validateURL:()=>du,version:()=>Qm,withParser:()=>El});var w={};Ar(w,{BIGINT_FORMAT_RANGES:()=>ka,CONSTANT_CATCH:()=>Lc,Class:()=>Np,NUMBER_FORMAT_RANGES:()=>wa,aborted:()=>vt,allowsEval:()=>Rp,assert:()=>uT,assertEqual:()=>oT,assertIs:()=>sT,assertNever:()=>cT,assertNotEqual:()=>aT,assignProp:()=>Ye,attachSchema:()=>xa,base64ToUint8Array:()=>R$,base64urlToUint8Array:()=>bT,cached:()=>Ai,captureStackTrace:()=>Zc,cleanEnum:()=>$T,cleanRegex:()=>Mr,clone:()=>he,cloneDef:()=>fT,codePointLength:()=>Dn,constantCatch:()=>Vp,createTransparentProxy:()=>yT,defineLazy:()=>Ap,defineLazyInternal:()=>re,derived:()=>ST,esc:()=>gt,escapeRegex:()=>Wt,explicitlyAborted:()=>Zp,extend:()=>O$,finalizeIssue:()=>zt,floatSafeRemainder:()=>$a,getElementAtPath:()=>pT,getEnumValues:()=>Ei,getLengthableOrigin:()=>Ia,getParsedType:()=>vT,getSizableOrigin:()=>Sa,hexToUint8Array:()=>kT,hide:()=>za,installLazyProp:()=>Lp,isObject:()=>An,isPlainObject:()=>Gt,issue:()=>Ui,joinValues:()=>y,jsonStringifyReplacer:()=>Ni,members:()=>Mp,merge:()=>N$,mergeDefs:()=>Kt,normalizeParams:()=>z,nullish:()=>Uc,numKeys:()=>gT,objectClone:()=>lT,omit:()=>T$,optionalKeys:()=>Up,own:()=>$r,parsedType:()=>S,partial:()=>A$,pick:()=>P$,prefixIssues:()=>It,primitiveTypes:()=>Cp,promiseAllObject:()=>mT,propertyKeyTypes:()=>ba,randomString:()=>hT,rawShape:()=>Di,required:()=>D$,safeExtend:()=>E$,shallowClone:()=>Ri,sizeCaps:()=>Ci,slugify:()=>Dp,stringifyPrimitive:()=>k,toZod:()=>_a,uint8ArrayToBase64:()=>C$,uint8ArrayToBase64url:()=>wT,uint8ArrayToHex:()=>xT,unwrapMessage:()=>ji});function oT(e){return e}function aT(e){return e}function _a(){return e=>e}function sT(e){}function cT(e){throw new Error("Unexpected value in exhaustive check")}function uT(e){}function Ei(e){let t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,r])=>t.indexOf(+i)===-1).map(([i,r])=>r)}function y(e,t="|"){return e.map(n=>k(n)).join(t)}function Ni(e,t){return typeof t=="bigint"?t.toString():t}var Ep=class{constructor(t){this._getter=t,this._value=void 0}get value(){let t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}};function Ai(e){return new Ep(e)}function Uc(e){return e==null}function Mr(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function $a(e,t){let n=e/t,i=Math.round(n),r=4*Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-i)<r?0:n-i}var S$=Symbol("evaluating");function Ap(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==S$)return i===void 0&&(i=S$,i=n()),i},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function lT(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Ye(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Di(e){let t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function Zr(e){return Di(e._zod.def)??e._zod.def.shape}function I$(e,t,n){Object.defineProperty(e,t,{get(){let i=n();return Ye(this,t,i),i},enumerable:!0,configurable:!0})}function z$(e,t,n){t in e?Ye(e,t,n):e[t]=n}function Nn(e,t,n,i){let r=Zr(t);for(let o of n){let a=Object.getOwnPropertyDescriptor(r,o);a.enumerable&&(a.get?I$(e,o,()=>{let s=t._zod.def.shape[o];return i?i(s,o):s}):z$(e,o,i?i(a.value,o):a.value))}}function dT(e,t){for(let n of Reflect.ownKeys(t)){let i=Object.getOwnPropertyDescriptor(t,n);i.enumerable&&(i.get?I$(e,n,()=>t[n]):z$(e,n,i.value))}}function Kt(...e){let t={};for(let n of e){let i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function fT(e){return Kt(e._zod.def)}function pT(e,t){return t?t.reduce((n,i)=>n?.[i],e):e}function mT(e){let t=Object.keys(e),n=t.map(i=>e[i]);return Promise.all(n).then(i=>{let r={};for(let o=0;o<t.length;o++)r[t[o]]=i[o];return r})}function hT(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<e;i++)n+=t[Math.floor(Math.random()*t.length)];return n}function gt(e){return JSON.stringify(e)}function Dp(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Zc="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function An(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Rp=Ai(()=>{if(Ge.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Gt(e){if(An(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(An(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Ri(e){return Gt(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function gT(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var vT=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}`)}},ba=new Set(["string","number","symbol"]),Cp=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Wt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function he(e,t,n){let i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}function z(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 yT(e){let t;return new Proxy({},{get(n,i,r){return t??(t=e()),Reflect.get(t,i,r)},set(n,i,r,o){return t??(t=e()),Reflect.set(t,i,r,o)},has(n,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(n,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(n,i,r){return t??(t=e()),Reflect.defineProperty(t,i,r)}})}function k(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Up(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}var wa={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]},ka={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function P$(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o={};return Nn(o,e,Mc(e,t)),he(e,Kt(n,{shape:o,checks:[]}))}function Mc(e,t){let n=Zr(e),i=[];for(let r of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,r)?.enumerable)throw new Error(`Unrecognized key: "${String(r)}"`);t[r]&&i.push(r)}return i}function T$(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=new Set(Mc(e,t)),a={};return Nn(a,e,Reflect.ownKeys(Zr(e)).filter(s=>!o.has(s))),he(e,Kt(n,{shape:a,checks:[]}))}function O$(e,t){if(!Gt(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let r=Zr(e);for(let o of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(r,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return he(e,Kt(e._zod.def,{shape:j$(e,t)}))}function j$(e,t){let n={};return Nn(n,e,Reflect.ownKeys(Zr(e))),dT(n,t),n}function E$(e,t){if(!Gt(t))throw new Error("Invalid input to safeExtend: expected a plain object");return he(e,Kt(e._zod.def,{shape:j$(e,t)}))}function N$(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n={};Nn(n,e,Reflect.ownKeys(Zr(e))),Nn(n,t,Reflect.ownKeys(Zr(t)));let i=Kt(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return he(e,i)}function A$(e,t,n,i="partial"){let o=t._zod.def.checks;if(o&&o.length>0)throw new Error(`.${i}() cannot be used on object schemas containing refinements`);let s=n?new Set(Mc(t,n)):void 0,c={};return Nn(c,t,Reflect.ownKeys(Zr(t)),e&&((u,l)=>s&&!s.has(l)?u:new e({type:"optional",innerType:u}))),he(t,Kt(t._zod.def,{shape:c,checks:[]}))}function D$(e,t,n){let i=n?new Set(Mc(t,n)):void 0,r={};return Nn(r,t,Reflect.ownKeys(Zr(t)),(o,a)=>i&&!i.has(a)?o:new e({type:"nonoptional",innerType:o})),he(t,Kt(t._zod.def,{shape:r}))}function vt(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Zp(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function It(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function ji(e){return typeof e=="string"?e:e?.message}function Ci(e){let t=[];for(let n of e??[]){let i=n._zod.def;if(!/_(length|size)$|_equals$/.test(i.check))break;let r=i.maximum??i.length??i.size;r>=0&&t.push([r,n])}return t}function xa(e,t,n){var i;for(let r=t;r<e.length;r++)(i=e[r]).schema??(i.schema=n)}function zt(e,t,n){var i;let r=e.inst?._zod?.traits;r?.has("$ZodType")&&(r.has("$ZodCheck")?(i=e).schema??(i.schema=e.inst):e.schema=e.inst);let o=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,a=e.message?e.message:ji(e.inst?._zod.def?.error?.(e))??ji(o?.(e))??ji(t?.error?.(e))??ji(n.customError?.(e))??ji(n.localeError?.(e))??"Invalid input",s={};for(let c of Object.keys(e))c==="inst"||c==="schema"||c==="continue"||c==="input"||c==="__proto__"||(s[c]=e[c]);return s.path??(s.path=[]),s.message=a,t?.reportInput&&(s.input=e.input),s}function Sa(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}var _T=/[\uD800-\uDBFF]/;function Dn(e){let t=e.length;if(!_T.test(e))return t;let n=t;for(let i=0;i<t-1;i++)(e.charCodeAt(i)&64512)===55296&&(e.charCodeAt(i+1)&64512)===56320&&(n--,i++);return n}function Ia(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function S(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 n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function Ui(...e){let[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}function $T(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function R$(e){let t=atob(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}function C$(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function bT(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return R$(t+n)}function wT(e){return C$(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function kT(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)n[i/2]=Number.parseInt(t.slice(i,i+2),16);return n}function xT(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Np=class{constructor(...t){}};function Mp(e,t){for(let n in t){let i=Object.getOwnPropertyDescriptor(t,n);i.get?Object.defineProperty(e,n,{...i,enumerable:!1}):IT(e,n,i.value)}}function $r(e,t,n,i=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:i,value:n}),n}function za(e,t,n){return $r(e,t,n,!1)}function ST(e,t){for(let n in e){let i=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return $r(this,n,i(this))},set(r){$r(this,n,r)}})}return t}function IT(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:$r(this,t,n.bind(this))},set(i){$r(this,t,i)}})}function zT(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var jp,Qr=!1,PT={configurable:!0,get(){Qr=!0}};function re(e,t,n){let i=Object.getPrototypeOf(e._zod);if(t in i&&jp!==e._zod){jp=void 0;return}jp=e._zod,Object.defineProperty(i,t,{configurable:!0,get(){Object.defineProperty(this,t,PT);let r=Qr;Qr=!1;try{let o=n(this);return Qr?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o}),Qr=Qr||r,o}catch(o){throw delete this[t],Qr=Qr||r,o}},set(r){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r})}})}function Lp(e,t,n,i){let r=zT(e,t);r&&Object.defineProperty(r,t,{configurable:!0,get(){let o={configurable:!0,writable:!0,enumerable:i,value:void 0};return Object.defineProperty(this,t,o),o.value=n(this),Object.defineProperty(this,t,o),o.value},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:i,value:o})}})}var Lc="~constantCatch";function Vp(e){let t=()=>e;return t[Lc]=!0,t}var U$,qp=Object.freeze({status:"aborted"}),Fp={value:void 0,enumerable:!1},Z$="captureStackTrace"in Error?Error:null;function TT(e){let t=Z$;if(t){let n=t.stackTraceLimit;if(typeof n=="number"){try{t.stackTraceLimit=0}catch{return Z$=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function v(e,t,n,i){let r={};function o(f){this.def=f,this.constr=d,this.traits=new Set}o.prototype=r;let a=n,s=a&&new WeakSet;function c(f,p){if(f._zod){if(f._zod.traits.has(e))return}else{Fp.value=new o(p);try{Object.defineProperty(f,"_zod",Fp)}finally{Fp.value=void 0}}if(f._zod.traits.add(e),t(f,p),s){let h=Object.getPrototypeOf(f),g=f._zod.constr.prototype,_=h;for(;_&&_!==g;)_=Object.getPrototypeOf(_);let $=_??h;s.has($)||(s.add($),Mp($,a))}let m=d.prototype;for(let h in m)Object.prototype.hasOwnProperty.call(m,h)&&(h in f||(f[h]=m[h].bind(f)))}let u=i?.Parent??Object;class l extends u{}Object.defineProperty(l,"name",{value:e});function d(f){let p=i?.Parent?TT(l):this;c(p,f);let m=p._zod.deferred;if(m){for(let g of m)g();p._zod.deferred=void 0}let h=globalThis.__zod_globalConfig?.postProcessor;return h&&h(p),p}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:f=>i?.Parent&&f instanceof i.Parent?!0:f?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var Bp=Symbol("zod_brand"),Pt=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},en=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(U$=globalThis).__zod_globalConfig??(U$.__zod_globalConfig={});var Ge=globalThis.__zod_globalConfig;function Me(e){return e&&Object.assign(Ge,e),Ge}function OT(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Ni,2)),e.message}function jT(e){this._zod.message=e}var ET={get:OT,set:jT,enumerable:!0,configurable:!0},Jp={value:void 0,enumerable:!1},M$=new WeakSet([Object.prototype,Error.prototype]),L$=(e,t)=>{e.name="$ZodError",Jp.value=t,Object.defineProperty(e,"issues",Jp),Jp.value=void 0,Object.defineProperty(e,"message",ET);let n=Object.getPrototypeOf(e);M$.has(n)||(M$.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let i=()=>this.message;return Object.defineProperty(this,"toString",{value:i,configurable:!0,writable:!0}),i},set(i){Object.defineProperty(this,"toString",{value:i,configurable:!0,writable:!0})}}))},Kp=v("$ZodError",L$),Tt=v("$ZodError",L$,void 0,{Parent:Error});function NT(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Pa(e,t=n=>n.message){let n={},i=[];for(let r of e.issues)r.path.length>0?NT(n,r.path[0],()=>[]).push(t(r)):i.push(t(r));return{formErrors:i,fieldErrors:n}}function Ta(e,t=n=>n.message){let n={_errors:[]},i=(r,o=[])=>{for(let a of r.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>i({issues:s},[...o,...a.path]));else if(a.code==="invalid_key")i({issues:a.issues},[...o,...a.path]);else if(a.code==="invalid_element")i({issues:a.issues},[...o,...a.path]);else{let s=[...o,...a.path];if(s.length===0)n._errors.push(t(a));else{let c=n,u=0;for(;u<s.length;){let l=s[u],d=u===s.length-1;if(l==="_errors"){d&&c._errors.push(t(a)),u++;continue}Object.prototype.hasOwnProperty.call(c,l)||Object.defineProperty(c,l,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let f=c[l];d&&f._errors.push(t(a)),c=f,u++}}}};return i(e),n}function Gp(e,t=n=>n.message){let n={errors:[]},i=(r,o=[])=>{var a;for(let s of r.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(c=>i({issues:c},[...o,...s.path]));else if(s.code==="invalid_key")i({issues:s.issues},[...o,...s.path]);else if(s.code==="invalid_element")i({issues:s.issues},[...o,...s.path]);else{let c=[...o,...s.path];if(c.length===0){n.errors.push(t(s));continue}let u=n,l=0;for(;l<c.length;){let d=c[l],f=l===c.length-1;typeof d=="string"?(u.properties??(u.properties={}),Object.prototype.hasOwnProperty.call(u.properties,d)||Object.defineProperty(u.properties,d,{value:{errors:[]},enumerable:!0,writable:!0,configurable:!0}),u=u.properties[d]):(u.items??(u.items=[]),(a=u.items)[d]??(a[d]={errors:[]}),u=u.items[d]),f&&u.errors.push(t(s)),l++}}};return i(e),n}function V$(e){let t=[],n=e.map(i=>typeof i=="object"?i.key:i);for(let i of n)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function Wp(e){let t=[],n=[...e.issues].sort((i,r)=>(i.path??[]).length-(r.path??[]).length);for(let i of n)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${V$(i.path)}`);return t.join(`
|
|
11
|
-
`)}function Vc(e,t){return{callee:t?.callee??e,Err:t?.Err}}var Zi=e=>{let t=(n,i,r,o)=>{let a=r?{...r,async:!1}:{async:!1},s=n._zod.run({value:i,issues:[]},a);if(s instanceof Promise)throw new Pt;if(s.issues.length){let c=new(o?.Err??e)(s.issues.map(u=>zt(u,a,Me())));throw Zc(c,o?.callee??t),c}return s.value};return t},Rn=Zi(Tt),Mi=e=>{let t=async(n,i,r,o)=>{let a=r?{...r,async:!0}:{async:!0},s=n._zod.run({value:i,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let c=new(o?.Err??e)(s.issues.map(u=>zt(u,a,Me())));throw Zc(c,o?.callee??t),c}return s.value};return t},Cn=Mi(Tt),Li=e=>(t,n,i)=>{let r=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},r);if(o instanceof Promise)throw new Pt;return o.issues.length?F$(e,o.issues,r):{success:!0,data:o.value}},Vi=Li(Tt);function F$(e,t,n){let i;return{success:!1,get error(){return i||(i=new e(t.map(r=>zt(r,n,Me()))),t=void 0,n=void 0),i},set error(r){i=r,t=void 0,n=void 0}}}var Fi=e=>async(t,n,i)=>{let r=i?{...i,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?F$(e,o.issues,r):{success:!0,data:o.value}},qi=Fi(Tt),DT=Symbol.for("zod.compile.invalid"),RT=Symbol.for("zod.compile.fallback"),Bi=((e,t,n)=>{let i=e._zod.bag.validator;if(i!==void 0){if(i(t)!==DT)return!0;if(i.definite===!0&&n===void 0)return!1}return CT(e,t,n)});function CT(e,t,n){let i=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},r=e._zod.bag.fallbackRun,o;if(r?(i[RT]=!0,o=r({value:t,issues:[]},i)):o=e._zod.run({value:t,issues:[]},i),o instanceof Promise)throw new Pt;return o.issues.length===0}var Hi=async(e,t,n)=>{let i=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},r=e._zod.run({value:t,issues:[]},i);return r instanceof Promise&&(r=await r),r.issues.length===0},Fc=e=>{let t=Zi(e),n=(i,r,o,a)=>{let s=o?{...o,direction:"backward"}:{direction:"backward"};return t(i,r,s,Vc(n,a))};return n},q$=Fc(Tt),qc=e=>{let t=Zi(e),n=(i,r,o,a)=>t(i,r,o,Vc(n,a));return n},B$=qc(Tt),Bc=e=>{let t=Mi(e),n=async(i,r,o,a)=>{let s=o?{...o,direction:"backward"}:{direction:"backward"};return await t(i,r,s,Vc(n,a))};return n},H$=Bc(Tt),Hc=e=>{let t=Mi(e),n=async(i,r,o,a)=>await t(i,r,o,Vc(n,a));return n},J$=Hc(Tt),Jc=e=>(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Li(e)(t,n,r)},K$=Jc(Tt),Kc=e=>(t,n,i)=>Li(e)(t,n,i),G$=Kc(Tt),Gc=e=>async(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Fi(e)(t,n,r)},W$=Gc(Tt),Wc=e=>async(t,n,i)=>Fi(e)(t,n,i),X$=Wc(Tt);var Lt={};Ar(Lt,{anyString:()=>km,base64:()=>mm,base64url:()=>hm,bigint:()=>Sm,boolean:()=>Im,browserEmail:()=>BT,cidrv4:()=>fm,cidrv6:()=>pm,creditCard:()=>Xc,cuid:()=>Yp,cuid2:()=>Qp,currencyCode:()=>_m,date:()=>$m,datetime:()=>wm,domain:()=>vm,duration:()=>om,e164:()=>ym,email:()=>sm,emoji:()=>cm,extendedDuration:()=>UT,guid:()=>am,hex:()=>jm,hostname:()=>gm,html5Email:()=>VT,httpProtocol:()=>Oa,iban:()=>Yc,idnEmail:()=>qT,integer:()=>ja,ipv4:()=>um,ipv6:()=>lm,ksuid:()=>rm,lowercase:()=>Tm,mac:()=>dm,md5_base64:()=>GT,md5_base64url:()=>WT,md5_hex:()=>KT,nanoid:()=>nm,nanoidOfLength:()=>im,null:()=>zm,number:()=>Lr,rfc5322Email:()=>FT,sha1_base64:()=>YT,sha1_base64url:()=>QT,sha1_hex:()=>XT,sha256_base64:()=>t1,sha256_base64url:()=>r1,sha256_hex:()=>e1,sha384_base64:()=>i1,sha384_base64url:()=>o1,sha384_hex:()=>n1,sha512_base64:()=>s1,sha512_base64url:()=>c1,sha512_hex:()=>a1,string:()=>xm,time:()=>bm,ulid:()=>em,undefined:()=>Pm,unicodeEmail:()=>Y$,uppercase:()=>Om,uuid:()=>Un,uuid4:()=>ZT,uuid6:()=>MT,uuid7:()=>LT,xid:()=>tm});var Yp=/^[cC][0-9a-z]{6,}$/,Qp=/^[0-9a-z]+$/,em=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,tm=/^[0-9a-vA-V]{20}$/,rm=/^[A-Za-z0-9]{27}$/,nm=/^[a-zA-Z0-9_-]{21}$/;function im(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var om=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,UT=/^[-+]?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)?)??$/,am=/^([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})$/,Un=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)$/,ZT=Un(4),MT=Un(6),LT=Un(7),sm=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,VT=/^[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])?)*$/,FT=/^(([^<>()\[\]\\.,;:\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,}))$/,Y$=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,qT=Y$,BT=/^[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])?)*$/,HT="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function cm(){return new RegExp(HT,"u")}var um=/^(?:(?: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])$/,lm=/^(([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}|:))$/,dm=e=>{let t=Wt(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},fm=/^((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])$/,pm=/^(([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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,mm=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,hm=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,gm=/^(?=.{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])?)*\.?$/,vm=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,Oa=/^https?$/,ym=/^\+[1-9]\d{6,14}$/,Xc=/^\d(?:[ -]?\d){11,18}$/,_m=/^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/,Yc=/^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/,Q$="(?:(?:\\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])))";function JT(e){return new RegExp(`^${e}$`)}var $m=JT(Q$);function Xp(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}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function bm(e){return new RegExp(`^${Xp(e)}$`)}function wm(e){let t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${Xp({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,i=e.local?`${n}|${Xp({precision:e.precision})}`:n;return new RegExp(`^${Q$}T(?:${i})$`)}var km=/^[\s\S]{0,}$/,xm=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Sm=/^-?\d+n?$/,ja=/^-?\d+$/,Lr=/^-?\d+(?:\.\d+)?$/,Im=/^(?:true|false)$/i,zm=/^null$/i;var Pm=/^undefined$/i;var Tm=/^[^A-Z]*$/,Om=/^[^a-z]*$/,jm=/^[0-9a-fA-F]*$/;function Ea(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Na(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var KT=/^[0-9a-fA-F]{32}$/,GT=Ea(22,"=="),WT=Na(22),XT=/^[0-9a-fA-F]{40}$/,YT=Ea(27,"="),QT=Na(27),e1=/^[0-9a-fA-F]{64}$/,t1=Ea(43,"="),r1=Na(43),n1=/^[0-9a-fA-F]{96}$/,i1=Ea(64,""),o1=Na(64),a1=/^[0-9a-fA-F]{128}$/,s1=Ea(86,"=="),c1=Na(86);var we=v("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Em=e=>{let t=e.value;return!Uc(t)&&t.size!==void 0},Nm=e=>{let t=e.value;return!Uc(t)&&t.length!==void 0},Qc={number:"number",bigint:"bigint",object:"date"},tu=v("$ZodCheckLessThan",(e,t)=>{we.init(e,t);let n=Qc[typeof t.value];e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:Qc[typeof i.value]??n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ru=v("$ZodCheckGreaterThan",(e,t)=>{we.init(e,t);let n=Qc[typeof t.value];e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:Qc[typeof i.value]??n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Am=v("$ZodCheckMultipleOf",(e,t)=>{we.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):$a(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Dm=v("$ZodCheckNumberFormat",(e,t)=>{we.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),i=n?"int":"number",[r,o]=wa[t.format];e._zod.check=a=>{let s=a.value;if(n){if(!Number.isInteger(s)){a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}s<r&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),s>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),Rm=v("$ZodCheckBigIntFormat",(e,t)=>{we.init(e,t);let[n,i]=ka[t.format];e._zod.check=r=>{let o=r.value;o<n&&r.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),o>i&&r.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Cm=v("$ZodCheckMaxSize",(e,t)=>{var n;we.init(e,t),(n=e._zod.def).when??(n.when=Em),e._zod.check=i=>{let r=i.value;r.size<=t.maximum||i.issues.push({origin:Sa(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Um=v("$ZodCheckMinSize",(e,t)=>{var n;we.init(e,t),(n=e._zod.def).when??(n.when=Em),e._zod.check=i=>{let r=i.value;r.size>=t.minimum||i.issues.push({origin:Sa(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Zm=v("$ZodCheckSizeEquals",(e,t)=>{var n;we.init(e,t),(n=e._zod.def).when??(n.when=Em),e._zod.check=i=>{let r=i.value,o=r.size;if(o===t.size)return;let a=o>t.size;i.issues.push({origin:Sa(r),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Mm=v("$ZodCheckMaxLength",(e,t)=>{var n;we.init(e,t),(n=e._zod.def).when??(n.when=Nm),e._zod.check=i=>{let r=i.value,o=r.length;if((typeof r=="string"&&o>t.maximum?Dn(r):o)<=t.maximum)return;let s=Ia(r);i.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Lm=v("$ZodCheckMinLength",(e,t)=>{var n;we.init(e,t),(n=e._zod.def).when??(n.when=Nm),e._zod.check=i=>{let r=i.value,o=r.length;if((typeof r=="string"&&o>=t.minimum&&o<t.minimum*2?Dn(r):o)>=t.minimum)return;let s=Ia(r);i.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Vm=v("$ZodCheckLengthEquals",(e,t)=>{var n;we.init(e,t),(n=e._zod.def).when??(n.when=Nm),e._zod.check=i=>{let r=i.value,o=r.length,a=typeof r=="string"&&o>=t.length&&o<=t.length*2?Dn(r):o;if(a===t.length)return;let s=Ia(r),c=a>t.length;i.issues.push({origin:s,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Ji=v("$ZodCheckStringFormat",(e,t)=>{var n,i;we.init(e,t),t.pattern?(n=e._zod).check??(n.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),Fm=v("$ZodCheckRegex",(e,t)=>{Ji.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),qm=v("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Tm),Ji.init(e,t)}),Bm=v("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Om),Ji.init(e,t)}),Hm=v("$ZodCheckIncludes",(e,t)=>{we.init(e,t);let n=Wt(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position},}${n}`:n);t.pattern=i,e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),Jm=v("$ZodCheckStartsWith",(e,t)=>{we.init(e,t);let n=new RegExp(`^${Wt(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),Km=v("$ZodCheckEndsWith",(e,t)=>{we.init(e,t);let n=new RegExp(`.*${Wt(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function eu(e,t,n){e.issues.length&&t.issues.push(...It(n,e.issues))}var Gm=v("$ZodCheckProperty",(e,t)=>{we.init(e,t),e._zod.check=n=>{let i=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(r=>eu(r,n,t.property));eu(i,n,t.property)}}),Wm=v("$ZodCheckProperties",(e,t)=>{we.init(e,t),za(e,Symbol.iterator,function*(){yield e});let n;e._zod.check=i=>{if(i.value==null){i.issues.push({expected:"object",code:"invalid_type",input:i.value,inst:e});return}n??(n=Reflect.ownKeys(t.shape).map(a=>[a,t.shape[a]]));let r=i.value,o;for(let[a,s]of n){let c=s._zod.run({value:r[a],issues:[]},{});c instanceof Promise?(o??(o=[]),o.push(c.then(u=>eu(u,i,a)))):eu(c,i,a)}if(o)return Promise.all(o).then(()=>{})}}),Xm=v("$ZodCheckMimeType",(e,t)=>{we.init(e,t);let n=new Set(t.mime);e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),Ym=v("$ZodCheckOverwrite",(e,t)=>{we.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});var Zn=class{constructor(t=[],n={}){this.content=[],this.indent=0,this.args=t,this.closed=n}indented(t){this.indent+=1;try{t(this)}finally{this.indent-=1}}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let i=t.split(`
|
|
10
|
+
deps: ${n}}`};var p6={keyword:"dependencies",type:"object",schemaType:"object",error:Pr.error,code(e){let[t,n]=m6(e);BI(e,t),HI(e,n)}};function m6({schema:e}){let t={},n={};for(let i in e){if(i==="__proto__")continue;let r=Array.isArray(e[i])?t:n;r[i]=e[i]}return[t,n]}function BI(e,t=e.schema){let{gen:n,data:i,it:r}=e;if(Object.keys(t).length===0)return;let o=n.let("missing");for(let a in t){let s=t[a];if(s.length===0)continue;let c=(0,xc.propertyInData)(n,i,a,r.opts.ownProperties);e.setParams({property:a,depsCount:s.length,deps:s.join(", ")}),r.allErrors?n.if(c,()=>{for(let u of s)(0,xc.checkReportMissingProp)(e,u)}):(n.if((0,$_._)`${c} && (${(0,xc.checkMissingProp)(e,s,o)})`),(0,xc.reportMissingProp)(e,o),n.else())}}Pr.validatePropertyDeps=BI;function HI(e,t=e.schema){let{gen:n,data:i,keyword:r,it:o}=e,a=n.name("valid");for(let s in t)(0,f6.alwaysValidSchema)(o,t[s])||(n.if((0,xc.propertyInData)(n,i,s,o.opts.ownProperties),()=>{let c=e.subschema({keyword:r,schemaProp:s},a);e.mergeValidEvaluated(c,a)},()=>n.var(a,!0)),e.ok(a))}Pr.validateSchemaDeps=HI;Pr.default=p6});var GI=A(b_=>{"use strict";Object.defineProperty(b_,"__esModule",{value:!0});var KI=ie(),h6=pe(),g6={message:"property name must be valid",params:({params:e})=>(0,KI._)`{propertyName: ${e.propertyName}}`},v6={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:g6,code(e){let{gen:t,schema:n,data:i,it:r}=e;if((0,h6.alwaysValidSchema)(r,n))return;let o=t.name("valid");t.forIn("key",i,a=>{e.setParams({propertyName:a}),e.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),t.if((0,KI.not)(o),()=>{e.error(!0),r.allErrors||t.break()})}),e.ok(o)}};b_.default=v6});var x_=A(w_=>{"use strict";Object.defineProperty(w_,"__esModule",{value:!0});var ip=tr(),hr=ie(),y6=Hr(),op=pe(),_6={message:"must NOT have additional properties",params:({params:e})=>(0,hr._)`{additionalProperty: ${e.additionalProperty}}`},$6={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:_6,code(e){let{gen:t,schema:n,parentSchema:i,data:r,errsCount:o,it:a}=e;if(!o)throw new Error("ajv implementation error");let{allErrors:s,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,op.alwaysValidSchema)(a,n))return;let u=(0,ip.allSchemaProperties)(i.properties),l=(0,ip.allSchemaProperties)(i.patternProperties);d(),e.ok((0,hr._)`${o} === ${y6.default.errors}`);function d(){t.forIn("key",r,g=>{!u.length&&!l.length?m(g):t.if(p(g),()=>m(g))})}function p(g){let _;if(u.length>8){let $=(0,op.schemaRefOrVal)(a,i.properties,"properties");_=(0,ip.isOwnProperty)(t,$,g)}else u.length?_=(0,hr.or)(...u.map($=>(0,hr._)`${g} === ${$}`)):_=hr.nil;return l.length&&(_=(0,hr.or)(_,...l.map($=>(0,hr._)`${(0,ip.usePattern)(e,$)}.test(${g})`))),(0,hr.not)(_)}function f(g){t.code((0,hr._)`delete ${r}[${g}]`)}function m(g){if(c.removeAdditional==="all"||c.removeAdditional&&n===!1){f(g);return}if(n===!1){e.setParams({additionalProperty:g}),e.error(),s||t.break();return}if(typeof n=="object"&&!(0,op.alwaysValidSchema)(a,n)){let _=t.name("valid");c.removeAdditional==="failing"?(h(g,_,!1),t.if((0,hr.not)(_),()=>{e.reset(),f(g)})):(h(g,_),s||t.if((0,hr.not)(_),()=>t.break()))}}function h(g,_,$){let k={keyword:"additionalProperties",dataProp:g,dataPropType:op.Type.Str};$===!1&&Object.assign(k,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(k,_)}}};w_.default=$6});var YI=A(S_=>{"use strict";Object.defineProperty(S_,"__esModule",{value:!0});var b6=cc(),WI=tr(),k_=pe(),XI=x_(),w6={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:n,parentSchema:i,data:r,it:o}=e;o.opts.removeAdditional==="all"&&i.additionalProperties===void 0&&XI.default.code(new b6.KeywordCxt(o,XI.default,"additionalProperties"));let a=(0,WI.allSchemaProperties)(n);for(let d of a)o.definedProperties.add(d);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=k_.mergeEvaluated.props(t,(0,k_.toHash)(a),o.props));let s=a.filter(d=>!(0,k_.alwaysValidSchema)(o,n[d]));if(s.length===0)return;let c=t.name("valid");for(let d of s)u(d)?l(d):(t.if((0,WI.propertyInData)(t,r,d,o.opts.ownProperties)),l(d),o.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(c);function u(d){return o.opts.useDefaults&&!o.compositeRule&&n[d].default!==void 0}function l(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};S_.default=w6});var rz=A(I_=>{"use strict";Object.defineProperty(I_,"__esModule",{value:!0});var QI=tr(),ap=ie(),ez=pe(),tz=pe(),x6={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:n,data:i,parentSchema:r,it:o}=e,{opts:a}=o,s=(0,QI.allSchemaProperties)(n),c=s.filter(h=>(0,ez.alwaysValidSchema)(o,n[h]));if(s.length===0||c.length===s.length&&(!o.opts.unevaluated||o.props===!0))return;let u=a.strictSchema&&!a.allowMatchingProperties&&r.properties,l=t.name("valid");o.props!==!0&&!(o.props instanceof ap.Name)&&(o.props=(0,tz.evaluatedPropsToName)(t,o.props));let{props:d}=o;p();function p(){for(let h of s)u&&f(h),o.allErrors?m(h):(t.var(l,!0),m(h),t.if(l))}function f(h){for(let g in u)new RegExp(h).test(g)&&(0,ez.checkStrictMode)(o,`property ${g} matches pattern ${h} (use allowMatchingProperties)`)}function m(h){t.forIn("key",i,g=>{t.if((0,ap._)`${(0,QI.usePattern)(e,h)}.test(${g})`,()=>{let _=c.includes(h);_||e.subschema({keyword:"patternProperties",schemaProp:h,dataProp:g,dataPropType:tz.Type.Str},l),o.opts.unevaluated&&d!==!0?t.assign((0,ap._)`${d}[${g}]`,!0):!_&&!o.allErrors&&t.if((0,ap.not)(l),()=>t.break())})})}}};I_.default=x6});var nz=A(z_=>{"use strict";Object.defineProperty(z_,"__esModule",{value:!0});var k6=pe(),S6={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:n,it:i}=e;if((0,k6.alwaysValidSchema)(i,n)){e.fail();return}let r=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},r),e.failResult(r,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};z_.default=S6});var iz=A(P_=>{"use strict";Object.defineProperty(P_,"__esModule",{value:!0});var I6=tr(),z6={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:I6.validateUnion,error:{message:"must match a schema in anyOf"}};P_.default=z6});var oz=A(T_=>{"use strict";Object.defineProperty(T_,"__esModule",{value:!0});var sp=ie(),P6=pe(),T6={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,sp._)`{passingSchemas: ${e.passing}}`},E6={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:T6,code(e){let{gen:t,schema:n,parentSchema:i,it:r}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(r.opts.discriminator&&i.discriminator)return;let o=n,a=t.let("valid",!1),s=t.let("passing",null),c=t.name("_valid");e.setParams({passing:s}),t.block(u),e.result(a,()=>e.reset(),()=>e.error(!0));function u(){o.forEach((l,d)=>{let p;(0,P6.alwaysValidSchema)(r,l)?t.var(c,!0):p=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,sp._)`${c} && ${a}`).assign(a,!1).assign(s,(0,sp._)`[${s}, ${d}]`).else(),t.if(c,()=>{t.assign(a,!0),t.assign(s,d),p&&e.mergeEvaluated(p,sp.Name)})})}}};T_.default=E6});var az=A(E_=>{"use strict";Object.defineProperty(E_,"__esModule",{value:!0});var O6=pe(),j6={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:n,it:i}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");let r=t.name("valid");n.forEach((o,a)=>{if((0,O6.alwaysValidSchema)(i,o))return;let s=e.subschema({keyword:"allOf",schemaProp:a},r);e.ok(r),e.mergeEvaluated(s)})}};E_.default=j6});var uz=A(O_=>{"use strict";Object.defineProperty(O_,"__esModule",{value:!0});var cp=ie(),cz=pe(),N6={message:({params:e})=>(0,cp.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,cp._)`{failingKeyword: ${e.ifClause}}`},A6={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:N6,code(e){let{gen:t,parentSchema:n,it:i}=e;n.then===void 0&&n.else===void 0&&(0,cz.checkStrictMode)(i,'"if" without "then" and "else" is ignored');let r=sz(i,"then"),o=sz(i,"else");if(!r&&!o)return;let a=t.let("valid",!0),s=t.name("_valid");if(c(),e.reset(),r&&o){let l=t.let("ifClause");e.setParams({ifClause:l}),t.if(s,u("then",l),u("else",l))}else r?t.if(s,u("then")):t.if((0,cp.not)(s),u("else"));e.pass(a,()=>e.error(!0));function c(){let l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},s);e.mergeEvaluated(l)}function u(l,d){return()=>{let p=e.subschema({keyword:l},s);t.assign(a,s),e.mergeValidEvaluated(p,a),d?t.assign(d,(0,cp._)`${l}`):e.setParams({ifClause:l})}}}};function sz(e,t){let n=e.schema[t];return n!==void 0&&!(0,cz.alwaysValidSchema)(e,n)}O_.default=A6});var lz=A(j_=>{"use strict";Object.defineProperty(j_,"__esModule",{value:!0});var D6=pe(),R6={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:n}){t.if===void 0&&(0,D6.checkStrictMode)(n,`"${e}" without "if" is ignored`)}};j_.default=R6});var dz=A(N_=>{"use strict";Object.defineProperty(N_,"__esModule",{value:!0});var C6=h_(),U6=LI(),Z6=g_(),M6=FI(),L6=qI(),V6=JI(),F6=GI(),q6=x_(),B6=YI(),H6=rz(),J6=nz(),K6=iz(),G6=oz(),W6=az(),X6=uz(),Y6=lz();function Q6(e=!1){let t=[J6.default,K6.default,G6.default,W6.default,X6.default,Y6.default,F6.default,q6.default,V6.default,B6.default,H6.default];return e?t.push(U6.default,M6.default):t.push(C6.default,Z6.default),t.push(L6.default),t}N_.default=Q6});var fz=A(A_=>{"use strict";Object.defineProperty(A_,"__esModule",{value:!0});var qe=ie(),eU={message:({schemaCode:e})=>(0,qe.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,qe._)`{format: ${e}}`},tU={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:eU,code(e,t){let{gen:n,data:i,$data:r,schema:o,schemaCode:a,it:s}=e,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=s;if(!c.validateFormats)return;r?p():f();function p(){let m=n.scopeValue("formats",{ref:d.formats,code:c.code.formats}),h=n.const("fDef",(0,qe._)`${m}[${a}]`),g=n.let("fType"),_=n.let("format");n.if((0,qe._)`typeof ${h} == "object" && !(${h} instanceof RegExp)`,()=>n.assign(g,(0,qe._)`${h}.type || "string"`).assign(_,(0,qe._)`${h}.validate`),()=>n.assign(g,(0,qe._)`"string"`).assign(_,h)),e.fail$data((0,qe.or)($(),k()));function $(){return c.strictSchema===!1?qe.nil:(0,qe._)`${a} && !${_}`}function k(){let E=l.$async?(0,qe._)`(${h}.async ? await ${_}(${i}) : ${_}(${i}))`:(0,qe._)`${_}(${i})`,T=(0,qe._)`(typeof ${_} == "function" ? ${E} : ${_}.test(${i}))`;return(0,qe._)`${_} && ${_} !== true && ${g} === ${t} && !${T}`}}function f(){let m=d.formats[o];if(!m){$();return}if(m===!0)return;let[h,g,_]=k(m);h===t&&e.pass(E());function $(){if(c.strictSchema===!1){d.logger.warn(T());return}throw new Error(T());function T(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function k(T){let M=T instanceof RegExp?(0,qe.regexpCode)(T):c.code.formats?(0,qe._)`${c.code.formats}${(0,qe.getProperty)(o)}`:void 0,G=n.scopeValue("formats",{key:o,ref:T,code:M});return typeof T=="object"&&!(T instanceof RegExp)?[T.type||"string",T.validate,(0,qe._)`${G}.validate`]:["string",T,G]}function E(){if(typeof m=="object"&&!(m instanceof RegExp)&&m.async){if(!l.$async)throw new Error("async format in sync schema");return(0,qe._)`await ${_}(${i})`}return typeof g=="function"?(0,qe._)`${_}(${i})`:(0,qe._)`${_}.test(${i})`}}}};A_.default=tU});var pz=A(D_=>{"use strict";Object.defineProperty(D_,"__esModule",{value:!0});var rU=fz(),nU=[rU.default];D_.default=nU});var mz=A(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.contentVocabulary=Go.metadataVocabulary=void 0;Go.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Go.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var gz=A(R_=>{"use strict";Object.defineProperty(R_,"__esModule",{value:!0});var iU=xI(),oU=CI(),aU=dz(),sU=pz(),hz=mz(),cU=[iU.default,oU.default,(0,aU.default)(),sU.default,hz.metadataVocabulary,hz.contentVocabulary];R_.default=cU});var yz=A(up=>{"use strict";Object.defineProperty(up,"__esModule",{value:!0});up.DiscrError=void 0;var vz;(function(e){e.Tag="tag",e.Mapping="mapping"})(vz||(up.DiscrError=vz={}))});var $z=A(U_=>{"use strict";Object.defineProperty(U_,"__esModule",{value:!0});var Wo=ie(),C_=yz(),_z=Vf(),uU=uc(),lU=pe(),dU={message:({params:{discrError:e,tagName:t}})=>e===C_.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:n}})=>(0,Wo._)`{error: ${e}, tag: ${n}, tagValue: ${t}}`},fU={keyword:"discriminator",type:"object",schemaType:"object",error:dU,code(e){let{gen:t,data:n,schema:i,parentSchema:r,it:o}=e,{oneOf:a}=r;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let s=i.propertyName;if(typeof s!="string")throw new Error("discriminator: requires propertyName");if(i.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),u=t.const("tag",(0,Wo._)`${n}${(0,Wo.getProperty)(s)}`);t.if((0,Wo._)`typeof ${u} == "string"`,()=>l(),()=>e.error(!1,{discrError:C_.DiscrError.Tag,tag:u,tagName:s})),e.ok(c);function l(){let f=p();t.if(!1);for(let m in f)t.elseIf((0,Wo._)`${u} === ${m}`),t.assign(c,d(f[m]));t.else(),e.error(!1,{discrError:C_.DiscrError.Mapping,tag:u,tagName:s}),t.endIf()}function d(f){let m=t.name("valid"),h=e.subschema({keyword:"oneOf",schemaProp:f},m);return e.mergeEvaluated(h,Wo.Name),m}function p(){var f;let m={},h=_(r),g=!0;for(let E=0;E<a.length;E++){let T=a[E];if(T?.$ref&&!(0,lU.schemaHasRulesButRef)(T,o.self.RULES)){let G=T.$ref;if(T=_z.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,G),T instanceof _z.SchemaEnv&&(T=T.schema),T===void 0)throw new uU.default(o.opts.uriResolver,o.baseId,G)}let M=(f=T?.properties)===null||f===void 0?void 0:f[s];if(typeof M!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);g=g&&(h||_(T)),$(M,E)}if(!g)throw new Error(`discriminator: "${s}" must be required`);return m;function _({required:E}){return Array.isArray(E)&&E.includes(s)}function $(E,T){if(E.const)k(E.const,T);else if(E.enum)for(let M of E.enum)k(M,T);else throw new Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function k(E,T){if(typeof E!="string"||E in m)throw new Error(`discriminator: "${s}" values must be unique strings`);m[E]=T}}}};U_.default=fU});var bz=A((UB,pU)=>{pU.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var M_=A((De,Z_)=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.MissingRefError=De.ValidationError=De.CodeGen=De.Name=De.nil=De.stringify=De.str=De._=De.KeywordCxt=De.Ajv=void 0;var mU=vI(),hU=gz(),gU=$z(),wz=bz(),vU=["/properties"],lp="http://json-schema.org/draft-07/schema",Xo=class extends mU.default{_addVocabularies(){super._addVocabularies(),hU.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(gU.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(wz,vU):wz;this.addMetaSchema(t,lp,!1),this.refs["http://json-schema.org/schema"]=lp}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(lp)?lp:void 0)}};De.Ajv=Xo;Z_.exports=De=Xo;Z_.exports.Ajv=Xo;Object.defineProperty(De,"__esModule",{value:!0});De.default=Xo;var yU=cc();Object.defineProperty(De,"KeywordCxt",{enumerable:!0,get:function(){return yU.KeywordCxt}});var Yo=ie();Object.defineProperty(De,"_",{enumerable:!0,get:function(){return Yo._}});Object.defineProperty(De,"str",{enumerable:!0,get:function(){return Yo.str}});Object.defineProperty(De,"stringify",{enumerable:!0,get:function(){return Yo.stringify}});Object.defineProperty(De,"nil",{enumerable:!0,get:function(){return Yo.nil}});Object.defineProperty(De,"Name",{enumerable:!0,get:function(){return Yo.Name}});Object.defineProperty(De,"CodeGen",{enumerable:!0,get:function(){return Yo.CodeGen}});var _U=Mf();Object.defineProperty(De,"ValidationError",{enumerable:!0,get:function(){return _U.default}});var $U=uc();Object.defineProperty(De,"MissingRefError",{enumerable:!0,get:function(){return $U.default}})});var Ez=A(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.formatNames=Er.fastFormats=Er.fullFormats=void 0;function Tr(e,t){return{validate:e,compare:t}}Er.fullFormats={date:Tr(Iz,q_),time:Tr(V_(!0),B_),"date-time":Tr(xz(!0),Pz),"iso-time":Tr(V_(),zz),"iso-date-time":Tr(xz(),Tz),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:IU,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:NU,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:zU,int32:{type:"number",validate:EU},int64:{type:"number",validate:OU},float:{type:"number",validate:Sz},double:{type:"number",validate:Sz},password:!0,binary:!0};Er.fastFormats={...Er.fullFormats,date:Tr(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,q_),time:Tr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,B_),"date-time":Tr(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Pz),"iso-time":Tr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,zz),"iso-date-time":Tr(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Tz),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};Er.formatNames=Object.keys(Er.fullFormats);function bU(e){return e%4===0&&(e%100!==0||e%400===0)}var wU=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,xU=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Iz(e){let t=wU.exec(e);if(!t)return!1;let n=+t[1],i=+t[2],r=+t[3];return i>=1&&i<=12&&r>=1&&r<=(i===2&&bU(n)?29:xU[i])}function q_(e,t){if(e&&t)return e>t?1:e<t?-1:0}var L_=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function V_(e){return function(n){let i=L_.exec(n);if(!i)return!1;let r=+i[1],o=+i[2],a=+i[3],s=i[4],c=i[5]==="-"?-1:1,u=+(i[6]||0),l=+(i[7]||0);if(u>23||l>59||e&&!s)return!1;if(r<=23&&o<=59&&a<60)return!0;let d=o-l*c,p=r-u*c-(d<0?1:0);return(p===23||p===-1)&&(d===59||d===-1)&&a<61}}function B_(e,t){if(!(e&&t))return;let n=new Date("2020-01-01T"+e).valueOf(),i=new Date("2020-01-01T"+t).valueOf();if(n&&i)return n-i}function zz(e,t){if(!(e&&t))return;let n=L_.exec(e),i=L_.exec(t);if(n&&i)return e=n[1]+n[2]+n[3],t=i[1]+i[2]+i[3],e>t?1:e<t?-1:0}var F_=/t|\s/i;function xz(e){let t=V_(e);return function(i){let r=i.split(F_);return r.length===2&&Iz(r[0])&&t(r[1])}}function Pz(e,t){if(!(e&&t))return;let n=new Date(e).valueOf(),i=new Date(t).valueOf();if(n&&i)return n-i}function Tz(e,t){if(!(e&&t))return;let[n,i]=e.split(F_),[r,o]=t.split(F_),a=q_(n,r);if(a!==void 0)return a||B_(i,o)}var kU=/\/|:/,SU=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function IU(e){return kU.test(e)&&SU.test(e)}var kz=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function zU(e){return kz.lastIndex=0,kz.test(e)}var PU=-(2**31),TU=2**31-1;function EU(e){return Number.isInteger(e)&&e<=TU&&e>=PU}function OU(e){return Number.isInteger(e)}function Sz(){return!0}var jU=/[^\\]\\Z/;function NU(e){if(jU.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var Oz=A(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});Qo.formatLimitDefinition=void 0;var AU=M_(),gr=ie(),In=gr.operators,dp={formatMaximum:{okStr:"<=",ok:In.LTE,fail:In.GT},formatMinimum:{okStr:">=",ok:In.GTE,fail:In.LT},formatExclusiveMaximum:{okStr:"<",ok:In.LT,fail:In.GTE},formatExclusiveMinimum:{okStr:">",ok:In.GT,fail:In.LTE}},DU={message:({keyword:e,schemaCode:t})=>(0,gr.str)`should be ${dp[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,gr._)`{comparison: ${dp[e].okStr}, limit: ${t}}`};Qo.formatLimitDefinition={keyword:Object.keys(dp),type:"string",schemaType:"string",$data:!0,error:DU,code(e){let{gen:t,data:n,schemaCode:i,keyword:r,it:o}=e,{opts:a,self:s}=o;if(!a.validateFormats)return;let c=new AU.KeywordCxt(o,s.RULES.all.format.definition,"format");c.$data?u():l();function u(){let p=t.scopeValue("formats",{ref:s.formats,code:a.code.formats}),f=t.const("fmt",(0,gr._)`${p}[${c.schemaCode}]`);e.fail$data((0,gr.or)((0,gr._)`typeof ${f} != "object"`,(0,gr._)`${f} instanceof RegExp`,(0,gr._)`typeof ${f}.compare != "function"`,d(f)))}function l(){let p=c.schema,f=s.formats[p];if(!f||f===!0)return;if(typeof f!="object"||f instanceof RegExp||typeof f.compare!="function")throw new Error(`"${r}": format "${p}" does not define "compare" function`);let m=t.scopeValue("formats",{key:p,ref:f,code:a.code.formats?(0,gr._)`${a.code.formats}${(0,gr.getProperty)(p)}`:void 0});e.fail$data(d(m))}function d(p){return(0,gr._)`${p}.compare(${n}, ${i}) ${dp[r].fail} 0`}},dependencies:["format"]};var RU=e=>(e.addKeyword(Qo.formatLimitDefinition),e);Qo.default=RU});var Dz=A((kc,Az)=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});var ea=Ez(),CU=Oz(),H_=ie(),jz=new H_.Name("fullFormats"),UU=new H_.Name("fastFormats"),J_=(e,t={keywords:!0})=>{if(Array.isArray(t))return Nz(e,t,ea.fullFormats,jz),e;let[n,i]=t.mode==="fast"?[ea.fastFormats,UU]:[ea.fullFormats,jz],r=t.formats||ea.formatNames;return Nz(e,r,n,i),t.keywords&&(0,CU.default)(e),e};J_.get=(e,t="full")=>{let i=(t==="fast"?ea.fastFormats:ea.fullFormats)[e];if(!i)throw new Error(`Unknown format "${e}"`);return i};function Nz(e,t,n,i){var r,o;(r=(o=e.opts.code).formats)!==null&&r!==void 0||(o.formats=(0,H_._)`require("ajv-formats/dist/formats").${i}`);for(let a of t)e.addFormat(a,n[a])}Az.exports=kc=J_;Object.defineProperty(kc,"__esModule",{value:!0});kc.default=J_});import{readFile as PP}from"node:fs/promises";import{parseArgs as aM}from"node:util";import{readFileSync as DP}from"node:fs";import{dirname as RP,join as CP}from"node:path";var vi="0.5.1",UP="https://api.heylatch.app";function ZP(e=process.cwd()){let t=e;for(;;){let n="";try{n=DP(CP(t,".env"),"utf8")}catch{}let i=/^[ \t]*(?:export[ \t]+)?LATCH_API_KEY[ \t]*=[ \t]*["']?([^"'\s#]+)/m.exec(n);if(i)return i[1];let r=RP(t);if(r===t)return;t=r}}var U=class extends Error{constructor(n,i,r=0,o={}){super(i);this.code=n;this.status=r;this.params=o}code;status;params},yi=["neutral","blue","emerald","amber","rose","violet"],w$=4,gi=class{key;kind;baseUrl;fetcher;retryDelayMs;constructor({key:t=process.env.LATCH_API_KEY||ZP(),baseUrl:n=process.env.LATCH_API_URL??UP,fetch:i=fetch,retryDelayMs:r=3e3}={}){if(!t)throw new U("noApiKey","No API key. Set LATCH_API_KEY (or add it to a .env file). Developers: a workspace key (ltk_) from your workspace's API page. Server owners: an account key (lta_) from Settings > API keys on heylatch.app.");if(!t.startsWith("ltk_")&&!t.startsWith("lta_"))throw new U("noApiKey","LATCH_API_KEY doesn't look like a Latch API key (it should start with ltk_ or lta_).");this.key=t,this.kind=t.startsWith("lta_")?"account":"workspace",this.baseUrl=n.replace(/\/+$/,""),this.fetcher=i,this.retryDelayMs=r}async request(t,n,i){if(this.kind==="account"&&!n.startsWith("/me"))throw new U("accountKeyForWorkspace","This is an account key (lta_). It only installs scripts from your Library: latch pull <script...> --to <dir> or latch pull --all --to <dir>. Publishing and managing scripts needs a workspace key (ltk_) from your workspace's API page.");let r=0,o=()=>new Promise(a=>setTimeout(a,this.retryDelayMs));for(let a=0;;a++){let s;try{s=await this.fetcher(`${this.baseUrl}/public/v1${n}`,{method:t,headers:{authorization:`Bearer ${this.key}`,"user-agent":`latch-cli/${vi}`,...i!==void 0?{"content-type":"application/json"}:{}},body:i!==void 0?JSON.stringify(i):void 0})}catch(p){if(t==="GET"&&++r<w$){await o();continue}throw new U("network",`Couldn't reach ${this.baseUrl}: ${p.message}`)}let c=await s.json().catch(()=>null);if(s.ok)return c;let u=c?.error;if(!u?.code&&(s.status===502||t==="GET"&&(s.status===503||s.status===504))&&++r<w$){await o();continue}let d=Number(u?.params?.seconds);if(s.status===429&&a<3&&d>0&&d<=90){await new Promise(p=>setTimeout(p,d*1e3));continue}throw new U(u?.code??"generic",u?.message??`Request failed (${s.status}).`,s.status,u?.params??{})}}async fetchPackage(t){let n=await this.fetcher(t);if(!n.ok)throw new U("downloadFailed",`Downloading the package failed (${n.status}). Try again.`,n.status);return new Uint8Array(await n.arrayBuffer())}async upload(t,n){let i=await this.fetcher(t,{method:"PUT",headers:{"content-type":"application/zip"},body:n});if(!i.ok)throw new U("uploadFailed",`Uploading the package failed (${i.status}). The upload link may have expired; try again.`,i.status)}account=()=>this.request("GET","/me");library=()=>this.request("GET","/me/library").then(t=>t.data);downloadLibrary=(t,n)=>this.request("POST",`/me/library/${ye(t)}/versions/${ye(n)}/download`);workspace=()=>this.request("GET","/workspace");listScripts=()=>this.request("GET","/scripts").then(t=>t.data);getScript=t=>this.request("GET",`/scripts/${ye(t)}`);createScript=t=>this.request("POST","/scripts",t);createVersion=(t,n)=>this.request("POST",`/scripts/${ye(t)}/versions`,n);getVersion=(t,n)=>this.request("GET",`/scripts/${ye(t)}/versions/${ye(n)}`);publishVersion=(t,n)=>this.request("POST",`/scripts/${ye(t)}/versions/${ye(n)}/publish`);withdrawVersion=(t,n)=>this.request("POST",`/scripts/${ye(t)}/versions/${ye(n)}/withdraw`);downloadVersion=(t,n)=>this.request("POST",`/scripts/${ye(t)}/versions/${ye(n)}/download`);listGrants=(t,n={})=>this.request("GET",`/scripts/${ye(t)}/grants${Cc(n)}`);grant=(t,n)=>this.request("POST",`/scripts/${ye(t)}/grants`,{accountId:n});grantBulk=(t,n)=>this.request("POST",`/scripts/${ye(t)}/grants/bulk`,{accountIds:n});revoke=(t,n)=>this.request("POST",`/scripts/${ye(t)}/grants/revoke`,{accountId:n});listActivations=(t,n={})=>this.request("GET",`/scripts/${ye(t)}/activations${Cc(n)}`);listFlags=(t,n={})=>this.request("GET",`/scripts/${ye(t)}/flags${Cc(n)}`);resolveFlag=t=>this.request("POST",`/flags/${ye(t)}/resolve`);getListing=t=>this.request("GET",`/scripts/${ye(t)}/listing`);updateListing=(t,n)=>this.request("PATCH",`/scripts/${ye(t)}/listing`,n);listImages=t=>this.request("GET",`/scripts/${ye(t)}/images`).then(n=>n.data);addImage=(t,n)=>this.request("POST",`/scripts/${ye(t)}/images`,{image:n});removeImage=(t,n)=>this.request("DELETE",`/scripts/${ye(t)}/images/${ye(n)}`);getStudio=()=>this.request("GET","/studio");updateStudio=t=>this.request("PATCH","/studio",t);listBundles=()=>this.request("GET","/bundles");getBundle=t=>this.request("GET",`/bundles/${ye(t)}`);createBundle=(t,n)=>this.request("POST","/bundles",{name:t,scripts:n});updateBundle=(t,n)=>this.request("PATCH",`/bundles/${ye(t)}`,n);deleteBundle=t=>this.request("DELETE",`/bundles/${ye(t)}`);listBundleGrants=(t,n={})=>this.request("GET",`/bundles/${ye(t)}/grants${Cc(n)}`);grantBundle=(t,n)=>this.request("POST",`/bundles/${ye(t)}/grants`,{accountId:n});revokeBundle=(t,n)=>this.request("POST",`/bundles/${ye(t)}/grants/revoke`,{accountId:n})},ye=encodeURIComponent;function Cc(e){let t=Object.entries(e).filter(([,n])=>n!=null&&n!=="");return t.length?`?${new URLSearchParams(t.map(([n,i])=>[n,String(i)]))}`:""}var Uc='# Latch guide for AI agents\r\n\r\nYou are an AI coding agent, and a developer wants their game server scripts protected with Latch. This guide has everything you need to do that from start to finish. Follow it rather than guessing. When a step needs something only the developer can do, stop and ask for it, and say exactly where to get it.\r\n\r\nLatch (https://heylatch.app) protects and licenses game server scripts. The developer uploads a resource. Latch encrypts its server code and returns a package that only runs on servers with a valid license key. Supported games: Arcane MP, Kingdoms Connected, Mafia 2 Online and Fallout MP (MafiaHub resources), and Hytale (Java plugins).\r\n\r\nLatch doesn\'t change the developer\'s source. Keep working in the source as usual: it stays readable and in their repository. The protected package is a build output that goes to servers.\r\n\r\n## Rules\r\n\r\n- Never write a protected package over source code. Keep the source and the server\'s install folder separate.\r\n- Never commit, print or paste keys. API keys (`ltk_...`) and license keys (`LT-...`) go in a git-ignored `.env` file or a CI secret.\r\n- Publish the original resource, never a package you downloaded from Latch.\r\n- Don\'t edit files inside a protected package. Modified packages won\'t run. Change the source and publish a new version.\r\n- Ask before granting or revoking access, withdrawing a version, or publishing to servers real players are on. Those actions affect other people.\r\n- Show the developer the result of `preview` or `publish-all --dry-run` before the first real publish.\r\n\r\n## What you need from the developer\r\n\r\nAsk for these once, together, and explain why:\r\n\r\n1. **A Latch account and a workspace on Pro or above.** Sign up at https://heylatch.app and create a workspace at https://heylatch.app/app/w/new. API keys, the CLI and MCP need the Pro plan or above; on Free the developer can only use the dashboard. Plans are per workspace, and the plan limits how many scripts it can hold (see [Projects with many resources](#projects-with-many-resources)).\r\n2. **An API key.** Workspace > API page (`https://heylatch.app/app/w/<workspace>/api`). The **Publish** preset is enough to publish and install. Choose **Full** only if you\'ll also manage access or the Explore studio page. Ask them to put it in a git-ignored `.env` at the project root, so you never see the value:\r\n ```\r\n LATCH_API_KEY=ltk_...\r\n ```\r\n3. **A license key**, only when installing on a server. Get it at https://heylatch.app/app/keys. It goes on the server, not in the project (see [Install on a server](#install-on-a-server)).\r\n\r\nYou can\'t create these yourself: the API has no endpoint for accounts, workspaces, API keys or license keys.\r\n\r\n## Set up the tools\r\n\r\nUse the CLI (needs Node.js 20 or newer). There\'s nothing to install globally:\r\n\r\n```sh\r\nnpx -y @heylatch/cli@latest whoami\r\n```\r\n\r\nThis prints the workspace, plan, script usage and the key\'s permissions. The CLI reads `LATCH_API_KEY` from the environment, or from a `.env` file in the current folder or any folder above it. Add `--json` to any command for machine-readable output. Commands exit with code 1 on failure.\r\n\r\nIf your client supports MCP, the same package also runs an MCP server. The developer can add it with:\r\n\r\n```sh\r\nclaude mcp add latch -e LATCH_API_KEY=ltk_... -- npx -y @heylatch/cli@latest mcp\r\n```\r\n\r\nTools: `get_guide`, `whoami`, `list_scripts`, `get_script`, `preview_package`, `publish_version`, `publish_all`, `pull_version`, `get_version_status`, `withdraw_version`, `list_access`, `grant_access`, `revoke_access`, `list_activations`, `list_flags`, `resolve_flag`.\r\n\r\nThis guide uses CLI commands. Each one maps directly to an MCP tool.\r\n\r\nIf you can\'t run commands (a browser-based assistant, for example), the developer can connect the hosted MCP server at `https://api.heylatch.app/mcp` instead. It signs in with OAuth, so no key is copied: the developer approves the connection on heylatch.app and picks one workspace and its access. It can\'t read local files or check a package first, so prefer the CLI when you have a shell. To publish through it: `create_version`, HTTP PUT the package to the returned URL, `publish_version`, then poll `get_version_status`.\r\n\r\n## Prepare the package\r\n\r\nLatch protects what the game server loads, so point it at the built resource (with its compiled JavaScript or `.class` files), not an unbuilt project. Build first if the project has a build step.\r\n\r\n### MafiaHub resources (Arcane MP, Kingdoms Connected, Mafia 2 Online, Fallout MP)\r\n\r\n`package.json` at the resource root needs a `mafiahub` block:\r\n\r\n```json\r\n{\r\n "name": "my-resource",\r\n "version": "1.0.0",\r\n "description": "What it does",\r\n "mafiahub": {\r\n "serverScripts": ["dist/server.js"],\r\n "clientScripts": ["dist/client.js"],\r\n "files": ["dist/client.js"],\r\n "resourceDependencies": ["other-resource"]\r\n },\r\n "latch": {\r\n "ecosystem": "mafiahub",\r\n "ignore": ["config.json"]\r\n }\r\n}\r\n```\r\n\r\nWhat happens to each file:\r\n\r\n| File | In the package |\r\n|---|---|\r\n| `serverScripts`, and other `.js`/`.cjs`/`.json` files | Encrypted. Decrypted only in memory, after the license check. |\r\n| `clientScripts`, `sharedScripts`, `files` | Sent to players by the game, so they can\'t be encrypted. Their JavaScript is obfuscated. |\r\n| Anything in `latch.ignore` | Stays readable. Use it for config the server owner edits. |\r\n| `node_modules/`, images, sounds, other assets | Stay readable. |\r\n| `.ts`, `.tsx`, `.map` | Left out. |\r\n| `.git`, `.env`, `server.env`, `latch.env` (when publishing a folder) | Left out. |\r\n\r\nThe `latch` block is removed from the published package. Its optional fields:\r\n\r\n| Field | Meaning |\r\n|---|---|\r\n| `ignore` | Server files to leave readable. Wildcards work: `data/*`, `data/**`. |\r\n| `obfuscateClient` | `false` ships client JavaScript without obfuscation. |\r\n| `script` | Script slug on Latch, if it should differ from `name`. |\r\n| `name` | Display name on Latch, if it should differ from `name`. |\r\n| `ecosystem` | `mafiahub` for every MafiaHub game. Needed the first time a script is created, unless you pass `--ecosystem`. |\r\n| `category` | `gameplay`, `economy`, `vehicles`, `ui`, `world`, `admin` or `other`. |\r\n| `permissions` | What the server code needs beyond normal resource code: `"process"` for `child_process`, `worker_threads`, `cluster` or `module`, and `"native"` for `.node` add-ons. The loader refuses these modules through `require` unless they\'re declared, and server owners see the list before they install. Other routes to them, like `import()`, are flagged by the upload scan and hold the version for review. MafiaHub only. |\r\n\r\nCheck the code for these before publishing:\r\n\r\n- **ES modules.** Encrypted server code runs as CommonJS, so `import`/`export` statements won\'t run. Compile server scripts to CommonJS, for example with esbuild\'s `--format=cjs`. `import()` works. Files ending in `.mjs` aren\'t encrypted at all. `preview` warns about this, but the build won\'t fail, so don\'t ignore the warning.\r\n- **Reading its own files.** Encrypted files aren\'t on disk. `require("./data.json")` works, but `fs.readFile` on an encrypted file doesn\'t. List any file the code reads with `fs` under `latch.ignore`, or switch to `require`.\r\n- **Server scripts listed for players.** A file in `serverScripts` can\'t also be in `clientScripts`, `sharedScripts` or `files`. This blocks the publish.\r\n- **Secrets in the bundle.** `node_modules/` stays readable. If server code must stay private, bundle it into `dist/` with its dependencies.\r\n- **Programs and native files** (`.exe`, `.dll`, `.node`...) are flagged for the Latch team to review.\r\n- **Starting programs or loading native code.** If the server code uses `child_process` (or `worker_threads`, `cluster`, `module`) add `"process"` to `latch.permissions`; for `.node` add-ons add `"native"`. Without it, the protected script stops with an error naming the missing permission.\r\n- **Checks on every upload.** Each package goes through an antivirus scan and a code scan. A version with high-risk findings (system commands, code downloaded and run, obfuscated code, native files, known malware) gets status `review` and isn\'t sent to anyone until the Latch team approves it; the previous version stays in use. Don\'t obfuscate server code before uploading: Latch protects it, and obfuscated code is held for review.\r\n\r\n### Hytale plugins\r\n\r\nPublish the compiled plugin `.jar`. It needs `manifest.json` at its root with a `Main` class, and that class must be in the JAR:\r\n\r\n```json\r\n{\r\n "Group": "com.acme",\r\n "Name": "MyPlugin",\r\n "Version": "1.0.0",\r\n "Description": "What it does",\r\n "ServerVersion": "0.7.0-pre.2",\r\n "Main": "com.acme.Main"\r\n}\r\n```\r\n\r\nAll classes and resources are encrypted, and the result is a single `.jar` for the server\'s `mods/` folder. Keep asset packs streamed to players (models, textures) out of the code JAR: they can\'t be protected.\r\n\r\n## Publish\r\n\r\n```sh\r\n# 1. See what happens to each file. Uploads nothing. Fix anything it reports.\r\nnpx -y @heylatch/cli@latest preview ./my-resource\r\n\r\n# 2. Upload, publish and wait for the build\r\nnpx -y @heylatch/cli@latest publish ./my-resource --changelog "Fixed spawn bug"\r\n\r\n# 3. If you need to check again later\r\nnpx -y @heylatch/cli@latest status my-resource\r\n```\r\n\r\n`publish` takes the script\'s slug, version, name and description from the manifest. Flags override them: `--script`, `--version`, `--name`, `--description`, `--ecosystem`, `--category`, `--tags`. A script that doesn\'t exist yet is created on first publish; it only needs an ecosystem (`--ecosystem mafiahub|kcdc|hytale`, or `latch.ecosystem`).\r\n\r\nVersions:\r\n\r\n- Use `1.2.0` form. A new version must be higher than the last one, and a number can\'t be reused, even if its build failed. Raise it in the manifest and publish again.\r\n- Keep the version in the manifest as the single source, so dependency version checks and Latch agree.\r\n- Everyone with access is notified when a version is ready, and sees the changelog.\r\n- If the newest version turns out to be broken, roll it back on Pro and up: `POST /public/v1/scripts/{script}/versions/{version}/rollback`, or the MCP tool `rollback_version`. It\'s withdrawn, and everyone who downloaded it is told to go back. Ask the developer first, because this reaches other people.\r\n\r\nSlugs are unique across all of Latch. If a publish fails with `slugTaken`, pass another with `--script` or `latch.script`. That only changes the name on Latch: the resource on the server keeps its `name` from `package.json`, so other resources\' dependencies and `Imports.get` calls keep working.\r\n\r\n## Projects with many resources\r\n\r\nEach resource folder is one script on Latch. Plans limit scripts per workspace:\r\n\r\n| Plan | Scripts |\r\n|---|---|\r\n| Free | 1 (dashboard only, no API) |\r\n| Pro | 10 |\r\n| Studio | 50 |\r\n| Enterprise | Unlimited |\r\n\r\nBefore publishing a large project, count what needs protecting and compare it with `whoami`. If the plan is too small, tell the developer what the options are; don\'t pick for them. They can upgrade, or protect only the resources that hold the valuable logic. Protected and unprotected resources work side by side.\r\n\r\nTo publish a folder of resources:\r\n\r\n```sh\r\n# See what would happen. Changes nothing.\r\nnpx -y @heylatch/cli@latest publish-all ./resources --ecosystem mafiahub --dry-run\r\n\r\n# Do it. Safe to rerun: published versions are skipped.\r\nnpx -y @heylatch/cli@latest publish-all ./resources --ecosystem mafiahub --changelog "..."\r\n```\r\n\r\n- It stops before uploading anything if the new scripts wouldn\'t fit the plan. Narrow it down with `--only a,b` or `--skip a,b` (folder names).\r\n- One resource failing doesn\'t stop the others. The summary lists each one, and the exit code is 1 if any failed. Fix those and rerun.\r\n- A changed resource whose version wasn\'t raised is reported as `unchanged`. Raise the version to publish it.\r\n- The target script comes from each manifest. Read the dry run: if a line says the manifest names the script, check it\'s the script you meant, especially for code you didn\'t write. Publishing an update notifies everyone with access to that script.\r\n- Resources with no `serverScripts` (client-only UI, for example) are `skipped`. They have nothing Latch can encrypt, so install them on the server as they are.\r\n\r\nDependencies between resources keep working: load order, `resourceDependencies`, `Exports.register`, `Exports.get` and `Imports.get` behave as they do unprotected, including calls at the top level of a dependent\'s script. If a dependency\'s license fails, its exports don\'t exist, so resources that need them fail to start and the console says why.\r\n\r\n## Install on a server\r\n\r\n```sh\r\n# One script, or several\r\nnpx -y @heylatch/cli@latest pull my-resource other-resource --to /path/to/server/resources\r\n\r\n# Every published script in the workspace\r\nnpx -y @heylatch/cli@latest pull --all --to /path/to/server/resources\r\n\r\n# Hytale plugins go in mods/\r\nnpx -y @heylatch/cli@latest pull my-plugin --to /path/to/server/mods\r\n```\r\n\r\n`pull` installs the newest ready version and skips scripts that are already on it. With a workspace key it installs the workspace\'s scripts on the developer\'s own servers. Server owners who were granted access use an account key instead (`lta_\u2026`, from Settings > API keys on heylatch.app): the same `pull` then installs the scripts in their Library, and `--all` means every script they can use. Either way it\'s the only safe way to install here:\r\n\r\n- It refuses to write through a symlink or junction. Development servers often link source folders into `resources/`, and writing through one would overwrite the source. If `pull` refuses, don\'t work around it: remove the link or use a separate server folder, and tell the developer.\r\n- It refuses to overwrite a folder that isn\'t a Latch package unless you pass `--force`. Don\'t pass `--force` without asking.\r\n- Files in the package replace the ones on the server, including readable config. Protect edited files with `--keep config.json,data/*`.\r\n- Run it with the server stopped, then start the server.\r\n\r\n### The license key\r\n\r\nEach server needs one key. Set it as an environment variable, or in a `.env`, `server.env` or `latch.env` file in the server folder or a folder above it:\r\n\r\n```\r\nLATCH_LICENSE=LT-XXXX-XXXX-XXXX-XXXX\r\n```\r\n\r\n- One key runs on one server at a time. The same key on a second server is refused and flagged, so a second server (for example main and test) needs an extra key from https://heylatch.app/app/keys.\r\n- A key isn\'t per script. It opens every script the account can access, so write it once.\r\n- Workspace members can run their own workspace\'s scripts with their own key, without being granted access.\r\n- The server needs outbound HTTPS (443) to `api.heylatch.app`.\r\n\r\n### Check that it works\r\n\r\nStart the server and read the console. For each protected resource, you should see:\r\n\r\n```\r\n[Latch] my-resource: License verified.\r\n```\r\n\r\nThen test the resource\'s actual behavior in-game or through its commands.\r\n\r\nEach protected resource checks its license once while it loads, usually in under half a second. The load waits for it, so the script\'s exports are ready for resources that depend on it. This only happens at startup: later checks run in the background and never block the server. Don\'t start long-running work that needs the event loop to finish before later resources load, such as waiting on a database connection at the top level.\r\n\r\n## Give others access\r\n\r\nServer owners share their account ID, which looks like `LA-7K2M-9QXD`. They\'ll find it in Settings (https://heylatch.app/app/settings).\r\n\r\n```sh\r\nnpx -y @heylatch/cli@latest grant my-resource LA-7K2M-9QXD # safe to retry\r\nnpx -y @heylatch/cli@latest access my-resource\r\nnpx -y @heylatch/cli@latest revoke my-resource LA-7K2M-9QXD\r\n```\r\n\r\nThey then download the package from their Library (https://heylatch.app/app/scripts), extract it into `resources/` (Hytale: put the `.jar` in `mods/`), and add their own key. Granting several accounts in one command needs the Studio plan.\r\n\r\n### Several scripts at once: bundles\r\n\r\nA bundle groups scripts so an account gets all of them in one step and one email. Bundles are live: a script you add later reaches everyone holding the bundle, and a script you remove is taken from them unless they also have it directly or through another bundle. Revoking a bundle never removes scripts that were granted on their own.\r\n\r\n```sh\r\nnpx -y @heylatch/cli@latest bundle create "Full Pack" core-ui inventory phone\r\nnpx -y @heylatch/cli@latest bundle grant "Full Pack" LA-7K2M-9QXD # safe to retry\r\nnpx -y @heylatch/cli@latest bundle add "Full Pack" garage # every holder gets it\r\nnpx -y @heylatch/cli@latest bundles\r\n```\r\n\r\nRefer to a bundle by its id or exact name. MCP tools: `create_bundle`, `update_bundle`, `grant_bundle`, `revoke_bundle`, `list_bundles`, `list_bundle_access`, `delete_bundle`.\r\n\r\n### Show a script on Explore\r\n\r\nExplore (https://heylatch.app/explore) is Latch\'s public directory of studios and their scripts. It needs a Pro plan or above. A script shows there once the workspace\'s studio page is on, the script is listed, and its gallery has at least one image (the first one is the cover). Listing a script makes its page public; "free to use" lets anyone signed in add it to their Library in one click. Nothing is sold on Explore.\r\n\r\n```sh\r\nnpx -y @heylatch/cli@latest studio # studio page and each script\'s Explore state\r\nnpx -y @heylatch/cli@latest studio --show --tagline "Roleplay tools" --about STUDIO.md\r\nnpx -y @heylatch/cli@latest images my-resource --add cover.png screenshot.jpg # png, jpg or webp; 4 MB each, 6 per script\r\nnpx -y @heylatch/cli@latest images my-resource # image ids in order; --remove <id> deletes one\r\nnpx -y @heylatch/cli@latest listing my-resource --list --about README.md # list it, Markdown text\r\nnpx -y @heylatch/cli@latest listing my-resource --free # one-click adds\r\nnpx -y @heylatch/cli@latest listing my-resource --unlist # hide the page; access stays\r\n```\r\n\r\n`studio` also takes `--website <url>`, `--discord <invite>`, `--accent <color>`, `--banner <file>` (or `--no-banner`), `--pin <script>` (or `--unpin`) and `--stats` or `--no-stats`. Changing the studio page needs the `settings.manage` permission: the **Full** preset, on a key made by an owner or admin.\r\n\r\nOnly turn on the studio page, list or make free what the developer asked for: these pages are public, and free scripts reach anyone. Use images the developer provides. Turning free off stops new adds but keeps access people already have. MCP tools: `get_studio`, `update_studio`, `list_images`, `add_image`, `remove_image`, `get_listing`, `update_listing`. The hosted MCP server can\'t read files, so there `add_image` and the banner of `update_studio` take a base64 data URL (`data:image/png;base64,...`).\r\n\r\n## What happens at runtime\r\n\r\n| Situation | Result |\r\n|---|---|\r\n| No key, invalid key or no access | The script doesn\'t run and the console says why. The server and other resources keep running. |\r\n| The script itself throws while starting | Handled like an unprotected resource: that resource fails to start and the server continues. |\r\n| Access revoked or key revoked while running | The script stops at its next license check, within about 5 minutes. The server keeps running. |\r\n| License server unreachable at startup | The resource retries every 30 seconds and starts when it gets through. Resources that depend on it at startup can fail, so restart the server once the connection is back. |\r\n| License server unreachable while running | The script keeps running and retries. After 30 minutes without contact, it stops. |\r\n\r\nStopping on MafiaHub: the runtime can\'t unload a resource, so Latch cuts it off instead. Its timers stop, and its handlers for `Events`, `Chat`, `Messages` and `WorldEvents` stop responding. Two things remain until the server restarts: what the script already created in the world, and exports other resources already hold. For cleanup on stop, export a hook from the last server script:\r\n\r\n```js\r\nmodule.exports.onLatchStop = (reason) => {\r\n // remove spawned entities, close connections\r\n}\r\n```\r\n\r\nOn Hytale, the plugin is shut down through its normal shutdown.\r\n\r\n## Troubleshooting\r\n\r\nConsole messages on the server (packages built before loader 5 print them in lowercase, with `stopped:` instead of `Stopped.`):\r\n\r\n| Message | Fix |\r\n|---|---|\r\n| `License key not found` | `LATCH_LICENSE` is missing or misnamed. See [The license key](#the-license-key). |\r\n| `Key already active on another server` | Stop the other server, or use an extra key. After moving to a new machine, the key frees up in about 10 minutes. |\r\n| `This account has no access to this script` | The key\'s account has no grant and isn\'t in the workspace. Grant access, or use a member\'s key. |\r\n| `This package is outdated` | The script\'s encryption key was rotated. Run `pull` again. |\r\n| `This package is damaged or was modified` | Files in the package changed. Run `pull` again and don\'t edit them. |\r\n| `Could not reach the license server (CODE)` | The network failed; `CODE` says how, such as `ENOTFOUND` or `ETIMEDOUT`. Allow outbound HTTPS to `api.heylatch.app`. |\r\n| `Too many license checks` | Temporary. The loader waits and retries by itself. |\r\n| `The license server had a problem` | Temporary and not caused by the server. The loader retries by itself. |\r\n| `Stopped. This key was revoked or replaced.` | A running script stopped because its key changed. Use the current key. |\r\n| `Stopped. Access to this script was removed.` | The key\'s account lost access. Grant it again, or use a member\'s key. |\r\n| `Stopped. License server unreachable for 30 minutes.` | Outbound HTTPS was down for over 30 minutes. Fix it and restart the server. |\r\n| `Cannot find module` or a missing file | The code reads an encrypted file. See [Prepare the package](#prepare-the-package). |\r\n\r\nAPI and CLI error codes:\r\n\r\n| Code | Fix |\r\n|---|---|\r\n| `apiKeyInvalid` | The key is wrong, revoked or expired. Ask for a new one. |\r\n| `scopeMissing` | The key lacks the permission named in the message. Ask for a key with that scope. |\r\n| `earlyAccess`, `maintenance` | Latch is limited to invited accounts right now, and the account that created this key isn\'t one. Tell the developer. |\r\n| `planLimit` | The workspace is at its script limit. Ask the developer how to proceed. |\r\n| `planRequired` | The feature needs a higher plan (`params.plan` says which). API keys on a Free workspace return this for every call. |\r\n| `versionExists`, `versionLower` | Raise the version. |\r\n| `slugTaken` | Another script has this slug. Use `--script`. |\r\n| `packageBlocked` | `preview` lists the problems. Fix them and retry. |\r\n| `linkedTarget`, `notLatchFolder` | `pull` protected a folder that may hold source. See [Install on a server](#install-on-a-server). |\r\n| `rateLimited` | The CLI waits and retries by itself. Only seen after repeated limits. |\r\n\r\nIf a build fails with status `error`, `buildError` says why. Fix the package, raise the version and publish again. Status `review` isn\'t a failure: the version is built and waits for the Latch team; tell the developer and don\'t publish again.\r\n\r\n## React to events\r\n\r\nOn Studio and Enterprise, Latch can POST to the developer\'s own server when something happens, for example to deliver a purchase or post in Discord. Use this instead of polling.\r\n\r\nAdd one on the workspace\'s API page, or with `POST /public/v1/webhooks` and a key with the `webhooks.manage` permission (the **Full** preset). Events: `version.ready`, `version.failed`, `version.withdrawn`, `version.rolled_back`, `access.granted`, `access.revoked`, `flag.opened`.\r\n\r\n- Save the signing secret to the same place as other secrets. It\'s shown once.\r\n- Always verify `Latch-Signature` before trusting a request: `t=<time>,v1=<hex>`, the HMAC-SHA256 of `<time>.<raw body>`. Reject old timestamps.\r\n- Answer with a 2xx within 10 seconds and do slow work afterwards. Anything else is retried, up to 8 attempts over about 2 days.\r\n- The same event can arrive twice. Skip repeats using `id` in the body.\r\n- Check it works with `POST /public/v1/webhooks/{id}/test`.\r\n- A Discord channel webhook address also works: Latch posts a formatted message to the channel, with no JSON or signature to handle. Set `language` (`en`, `tr`, `pt`, `fr`, `de`, `es`, `it` or `ru`) for the message language. Treat the address as a secret, because anyone with it can post there.\r\n\r\nFull example: https://heylatch.app/docs/api\r\n\r\n## Automate releases\r\n\r\n```yaml\r\n# .github/workflows/release.yml, on a tag like v1.2.0\r\n- run: npx -y @heylatch/cli@latest publish ./dist-resource --version "${GITHUB_REF_NAME#v}"\r\n env:\r\n LATCH_API_KEY: ${{ secrets.LATCH_API_KEY }}\r\n```\r\n\r\nOffer to add this block to the project\'s `CLAUDE.md` or `AGENTS.md`, so future sessions keep to the setup:\r\n\r\n```markdown\r\n## Latch\r\nServer code is protected with Latch. Guide: https://heylatch.app/agents.md\r\n- Publish from the built resource: `npx -y @heylatch/cli@latest publish <folder>`. Raise `version` first.\r\n- Install on servers with `npx -y @heylatch/cli@latest pull <script> --to <server>/resources`. Never over source folders.\r\n- `LATCH_API_KEY` and `LATCH_LICENSE` live in git-ignored `.env` files. Never commit or print them.\r\n```\r\n\r\n## More\r\n\r\n- CLI help: `npx -y @heylatch/cli@latest --help`\r\n- This guide offline, matching the installed version: `latch guide`, or the MCP tool `get_guide`\r\n- Human docs: https://heylatch.app/docs\r\n- REST API: https://heylatch.app/docs/api, spec at https://api.heylatch.app/public/v1/openapi.json\r\n';import{readFile as MP,stat as LP}from"node:fs/promises";var VP=4*1024*1024,Dr=6;function FP(e){if(e[0]===137&&e[1]===80&&e[2]===78&&e[3]===71)return"image/png";if(e[0]===255&&e[1]===216&&e[2]===255)return"image/jpeg";let t=(n,i)=>String.fromCharCode(...e.subarray(n,i));return e.length>=12&&t(0,4)==="RIFF"&&t(8,12)==="WEBP"?"image/webp":null}async function la(e){let t;try{let r=await LP(e);if(!r.isFile())throw new Error("not a file");t=r.size}catch(r){throw new U("badImage",`Couldn't read ${e}: ${r.message}`)}if(t>VP)throw new U("imageTooLarge",`${e} is ${(t/1024/1024).toFixed(1)} MB. Images can be up to 4 MB.`);let n=await MP(e),i=FP(n);if(!i)throw new U("badImage",`${e} isn't a PNG, JPEG or WebP image.`);return`data:${i};base64,${n.toString("base64")}`}async function Zc(e,t,n,i){let r=[];for(let s of n)r.push(await la(s));let o=await e.listImages(t);if(o.length+n.length>Dr)throw new U("imageLimit",`The gallery has ${o.length} of ${Dr} images, so there's room for ${Dr-o.length}. Remove some first with --remove <id>.`);let a=[];for(let[s,c]of r.entries())i?.(`Uploading ${n[s]}`),a.push(await e.addImage(t,c));return{added:a,total:o.length+a.length}}var le;(function(e){e.assertEqual=r=>{};function t(r){}e.assertIs=t;function n(r){throw new Error}e.assertNever=n,e.arrayToEnum=r=>{let o={};for(let a of r)o[a]=a;return o},e.getValidEnumValues=r=>{let o=e.objectKeys(r).filter(s=>typeof r[r[s]]!="number"),a={};for(let s of o)a[s]=r[s];return e.objectValues(a)},e.objectValues=r=>e.objectKeys(r).map(function(o){return r[o]}),e.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{let o=[];for(let a in r)Object.prototype.hasOwnProperty.call(r,a)&&o.push(a);return o},e.find=(r,o)=>{for(let a of r)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function i(r,o=" | "){return r.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=i,e.jsonStringifyReplacer=(r,o)=>typeof o=="bigint"?o.toString():o})(le||(le={}));var x$;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(x$||(x$={}));var R=le.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Rr=e=>{switch(typeof e){case"undefined":return R.undefined;case"string":return R.string;case"number":return Number.isNaN(e)?R.nan:R.number;case"boolean":return R.boolean;case"function":return R.function;case"bigint":return R.bigint;case"symbol":return R.symbol;case"object":return Array.isArray(e)?R.array:e===null?R.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?R.promise:typeof Map<"u"&&e instanceof Map?R.map:typeof Set<"u"&&e instanceof Set?R.set:typeof Date<"u"&&e instanceof Date?R.date:R.object;default:return R.unknown}};var I=le.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);var Mt=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){let n=t||function(o){return o.message},i={_errors:[]},r=o=>{for(let a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(r);else if(a.code==="invalid_return_type")r(a.returnTypeError);else if(a.code==="invalid_arguments")r(a.argumentsError);else if(a.path.length===0)i._errors.push(n(a));else{let s=i,c=0;for(;c<a.path.length;){let u=a.path[c],l=c===a.path.length-1;if(u==="_errors"){l&&s._errors.push(n(a)),c++;continue}Object.prototype.hasOwnProperty.call(s,u)||(u==="__proto__"?Object.defineProperty(s,u,{value:{_errors:[]},writable:!0,enumerable:!0,configurable:!0}):s[u]={_errors:[]}),s=s[u],l&&s._errors.push(n(a)),c++}}};return r(this),i}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,le.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){let n=Object.create(null),i=[];for(let r of this.issues)if(r.path.length>0){let o=r.path[0];n[o]=n[o]||[],n[o].push(t(r))}else i.push(t(r));return{formErrors:i,fieldErrors:n}}get formErrors(){return this.flatten()}};Mt.create=e=>new Mt(e);var qP=(e,t)=>{let n;switch(e.code){case I.invalid_type:e.received===R.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case I.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,le.jsonStringifyReplacer)}`;break;case I.unrecognized_keys:n=`Unrecognized key(s) in object: ${le.joinValues(e.keys,", ")}`;break;case I.invalid_union:n="Invalid input";break;case I.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${le.joinValues(e.options)}`;break;case I.invalid_enum_value:n=`Invalid enum value. Expected ${le.joinValues(e.options)}, received '${e.received}'`;break;case I.invalid_arguments:n="Invalid function arguments";break;case I.invalid_return_type:n="Invalid function return type";break;case I.invalid_date:n="Invalid date";break;case I.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:le.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case I.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case I.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case I.custom:n="Invalid input";break;case I.invalid_intersection_types:n="Intersection results could not be merged";break;case I.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case I.not_finite:n="Number must be finite";break;default:n=t.defaultError,le.assertNever(e)}return{message:n}},Xr=qP;var BP=Xr;function da(){return BP}var Mc=e=>{let{data:t,path:n,errorMaps:i,issueData:r}=e,o=[...n,...r.path||[]],a={...r,path:o};if(r.message!==void 0)return{...r,path:o,message:r.message};let s="",c=i.filter(u=>!!u).slice().reverse();for(let u of c)s=u(a,{data:t,defaultError:s}).message;return{...r,path:o,message:s}};function j(e,t){let n=da(),i=Mc({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Xr?void 0:Xr].filter(r=>!!r)});e.common.issues.push(i)}var st=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){let i=[];for(let r of n){if(r.status==="aborted")return H;r.status==="dirty"&&t.dirty(),i.push(r.value)}return{status:t.value,value:i}}static async mergeObjectAsync(t,n){let i=[];for(let r of n){let o=await r.key,a=await r.value;i.push({key:o,value:a})}return e.mergeObjectSync(t,i)}static mergeObjectSync(t,n){let i={};for(let r of n){let{key:o,value:a}=r;if(o.status==="aborted"||a.status==="aborted")return H;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||r.alwaysSet)&&(i[o.value]=a.value)}return{status:t.value,value:i}}},H=Object.freeze({status:"aborted"}),_i=e=>({status:"dirty",value:e}),ht=e=>({status:"valid",value:e}),Pp=e=>e.status==="aborted",Tp=e=>e.status==="dirty",jn=e=>e.status==="valid",fa=e=>typeof Promise<"u"&&e instanceof Promise;var L;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(L||(L={}));var Kt=class{constructor(t,n,i,r){this._cachedPath=[],this.parent=t,this.data=n,this._path=i,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},k$=(e,t)=>{if(jn(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new Mt(e.common.issues);return this._error=n,this._error}}};function ee(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:i,description:r}=e;if(t&&(n||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:r}:{errorMap:(a,s)=>{let{message:c}=e;return a.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:c??i??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:c??n??s.defaultError}},description:r}}var oe=class{get description(){return this._def.description}_getType(t){return Rr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Rr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new st,ctx:{common:t.parent.common,data:t.data,parsedType:Rr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(fa(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){let n=this._parse(t);return Promise.resolve(n)}parse(t,n){let i=this.safeParse(t,n);if(i.success)return i.data;throw i.error}safeParse(t,n){let i={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Rr(t)},r=this._parseSync({data:t,path:i.path,parent:i});return k$(i,r)}"~validate"(t){let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Rr(t)};if(!this["~standard"].async)try{let i=this._parseSync({data:t,path:[],parent:n});return jn(i)?{value:i.value}:{issues:n.common.issues}}catch(i){i?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(i=>jn(i)?{value:i.value}:{issues:n.common.issues})}async parseAsync(t,n){let i=await this.safeParseAsync(t,n);if(i.success)return i.data;throw i.error}async safeParseAsync(t,n){let i={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Rr(t)},r=this._parse({data:t,path:i.path,parent:i}),o=await(fa(r)?r:Promise.resolve(r));return k$(i,o)}refine(t,n){let i=r=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(r):n;return this._refinement((r,o)=>{let a=t(r),s=()=>o.addIssue({code:I.custom,...i(r)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((i,r)=>t(i)?!0:(r.addIssue(typeof n=="function"?n(i,r):n),!1))}_refinement(t){return new ar({schema:this,typeName:P.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return or.create(this,this._def)}nullable(){return Zr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Qr.create(this)}promise(){return Nn.create(this,this._def)}or(t){return ki.create([this,t],this._def)}and(t){return Si.create(this,t,this._def)}transform(t){return new ar({...ee(this._def),schema:this,typeName:P.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t=="function"?t:()=>t;return new Ei({...ee(this._def),innerType:this,defaultValue:n,typeName:P.ZodDefault})}brand(){return new Lc({typeName:P.ZodBranded,type:this,...ee(this._def)})}catch(t){let n=typeof t=="function"?t:()=>t;return new Oi({...ee(this._def),innerType:this,catchValue:n,typeName:P.ZodCatch})}describe(t){let n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Vc.create(this,t)}readonly(){return ji.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},HP=/^c[^\s-]{8,}$/i,JP=/^[0-9a-z]+$/,KP=/^[0-9A-HJKMNP-TV-Z]{26}$/i,GP=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,WP=/^[a-z0-9_-]{21}$/i,XP=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,YP=/^[-+]?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)?)??$/,QP=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,eT="^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$",Ep,tT=/^(?:(?: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])$/,rT=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,nT=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,iT=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,oT=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,aT=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,S$="((\\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])))",sT=new RegExp(`^${S$}$`);function I$(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function cT(e){return new RegExp(`^${I$(e)}$`)}function uT(e){let t=`${S$}T${I$(e)}`,n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function lT(e,t){return!!((t==="v4"||!t)&&tT.test(e)||(t==="v6"||!t)&&nT.test(e))}function dT(e,t){if(!XP.test(e))return!1;try{let[n]=e.split(".");if(!n)return!1;let i=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),r=JSON.parse(atob(i));return!(typeof r!="object"||r===null||"typ"in r&&r?.typ!=="JWT"||!r.alg||t&&r.alg!==t)}catch{return!1}}function fT(e,t){return!!((t==="v4"||!t)&&rT.test(e)||(t==="v6"||!t)&&iT.test(e))}var bi=class e extends oe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==R.string){let o=this._getOrReturnCtx(t);return j(o,{code:I.invalid_type,expected:R.string,received:o.parsedType}),H}let i=new st,r;for(let o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(r=this._getOrReturnCtx(t,r),j(r,{code:I.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),i.dirty());else if(o.kind==="max")t.data.length>o.value&&(r=this._getOrReturnCtx(t,r),j(r,{code:I.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),i.dirty());else if(o.kind==="length"){let a=t.data.length>o.value,s=t.data.length<o.value;(a||s)&&(r=this._getOrReturnCtx(t,r),a?j(r,{code:I.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&j(r,{code:I.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),i.dirty())}else if(o.kind==="email")QP.test(t.data)||(r=this._getOrReturnCtx(t,r),j(r,{validation:"email",code:I.invalid_string,message:o.message}),i.dirty());else if(o.kind==="emoji")Ep||(Ep=new RegExp(eT,"u")),Ep.test(t.data)||(r=this._getOrReturnCtx(t,r),j(r,{validation:"emoji",code:I.invalid_string,message:o.message}),i.dirty());else if(o.kind==="uuid")GP.test(t.data)||(r=this._getOrReturnCtx(t,r),j(r,{validation:"uuid",code:I.invalid_string,message:o.message}),i.dirty());else if(o.kind==="nanoid")WP.test(t.data)||(r=this._getOrReturnCtx(t,r),j(r,{validation:"nanoid",code:I.invalid_string,message:o.message}),i.dirty());else if(o.kind==="cuid")HP.test(t.data)||(r=this._getOrReturnCtx(t,r),j(r,{validation:"cuid",code:I.invalid_string,message:o.message}),i.dirty());else if(o.kind==="cuid2")JP.test(t.data)||(r=this._getOrReturnCtx(t,r),j(r,{validation:"cuid2",code:I.invalid_string,message:o.message}),i.dirty());else if(o.kind==="ulid")KP.test(t.data)||(r=this._getOrReturnCtx(t,r),j(r,{validation:"ulid",code:I.invalid_string,message:o.message}),i.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{r=this._getOrReturnCtx(t,r),j(r,{validation:"url",code:I.invalid_string,message:o.message}),i.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(r=this._getOrReturnCtx(t,r),j(r,{validation:"regex",code:I.invalid_string,message:o.message}),i.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(r=this._getOrReturnCtx(t,r),j(r,{code:I.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),i.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(r=this._getOrReturnCtx(t,r),j(r,{code:I.invalid_string,validation:{startsWith:o.value},message:o.message}),i.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(r=this._getOrReturnCtx(t,r),j(r,{code:I.invalid_string,validation:{endsWith:o.value},message:o.message}),i.dirty()):o.kind==="datetime"?uT(o).test(t.data)||(r=this._getOrReturnCtx(t,r),j(r,{code:I.invalid_string,validation:"datetime",message:o.message}),i.dirty()):o.kind==="date"?sT.test(t.data)||(r=this._getOrReturnCtx(t,r),j(r,{code:I.invalid_string,validation:"date",message:o.message}),i.dirty()):o.kind==="time"?cT(o).test(t.data)||(r=this._getOrReturnCtx(t,r),j(r,{code:I.invalid_string,validation:"time",message:o.message}),i.dirty()):o.kind==="duration"?YP.test(t.data)||(r=this._getOrReturnCtx(t,r),j(r,{validation:"duration",code:I.invalid_string,message:o.message}),i.dirty()):o.kind==="ip"?lT(t.data,o.version)||(r=this._getOrReturnCtx(t,r),j(r,{validation:"ip",code:I.invalid_string,message:o.message}),i.dirty()):o.kind==="jwt"?dT(t.data,o.alg)||(r=this._getOrReturnCtx(t,r),j(r,{validation:"jwt",code:I.invalid_string,message:o.message}),i.dirty()):o.kind==="cidr"?fT(t.data,o.version)||(r=this._getOrReturnCtx(t,r),j(r,{validation:"cidr",code:I.invalid_string,message:o.message}),i.dirty()):o.kind==="base64"?oT.test(t.data)||(r=this._getOrReturnCtx(t,r),j(r,{validation:"base64",code:I.invalid_string,message:o.message}),i.dirty()):o.kind==="base64url"?aT.test(t.data)||(r=this._getOrReturnCtx(t,r),j(r,{validation:"base64url",code:I.invalid_string,message:o.message}),i.dirty()):le.assertNever(o);return{status:i.value,value:t.data}}_regex(t,n,i){return this.refinement(r=>t.test(r),{validation:n,code:I.invalid_string,...L.errToObj(i)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...L.errToObj(t)})}url(t){return this._addCheck({kind:"url",...L.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...L.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...L.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...L.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...L.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...L.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...L.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...L.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...L.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...L.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...L.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...L.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...L.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...L.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...L.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...L.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...L.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...L.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...L.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...L.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...L.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...L.errToObj(n)})}nonempty(t){return this.min(1,L.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};bi.create=e=>new bi({checks:[],typeName:P.ZodString,coerce:e?.coerce??!1,...ee(e)});function pT(e,t){let n=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,r=n>i?n:i,o=Number.parseInt(e.toFixed(r).replace(".","")),a=Number.parseInt(t.toFixed(r).replace(".",""));return o%a/10**r}var pa=class e extends oe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==R.number){let o=this._getOrReturnCtx(t);return j(o,{code:I.invalid_type,expected:R.number,received:o.parsedType}),H}let i,r=new st;for(let o of this._def.checks)o.kind==="int"?le.isInteger(t.data)||(i=this._getOrReturnCtx(t,i),j(i,{code:I.invalid_type,expected:"integer",received:"float",message:o.message}),r.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(i=this._getOrReturnCtx(t,i),j(i,{code:I.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),r.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(i=this._getOrReturnCtx(t,i),j(i,{code:I.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),r.dirty()):o.kind==="multipleOf"?pT(t.data,o.value)!==0&&(i=this._getOrReturnCtx(t,i),j(i,{code:I.not_multiple_of,multipleOf:o.value,message:o.message}),r.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(i=this._getOrReturnCtx(t,i),j(i,{code:I.not_finite,message:o.message}),r.dirty()):le.assertNever(o);return{status:r.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,L.toString(n))}gt(t,n){return this.setLimit("min",t,!1,L.toString(n))}lte(t,n){return this.setLimit("max",t,!0,L.toString(n))}lt(t,n){return this.setLimit("max",t,!1,L.toString(n))}setLimit(t,n,i,r){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:i,message:L.toString(r)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:L.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:L.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:L.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:L.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:L.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:L.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:L.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:L.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:L.toString(t)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&le.isInteger(t.value))}get isFinite(){let t=null,n=null;for(let i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(n===null||i.value>n)&&(n=i.value):i.kind==="max"&&(t===null||i.value<t)&&(t=i.value)}return Number.isFinite(n)&&Number.isFinite(t)}};pa.create=e=>new pa({checks:[],typeName:P.ZodNumber,coerce:e?.coerce||!1,...ee(e)});var ma=class e extends oe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==R.bigint)return this._getInvalidInput(t);let i,r=new st;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(i=this._getOrReturnCtx(t,i),j(i,{code:I.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),r.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(i=this._getOrReturnCtx(t,i),j(i,{code:I.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),r.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(i=this._getOrReturnCtx(t,i),j(i,{code:I.not_multiple_of,multipleOf:o.value,message:o.message}),r.dirty()):le.assertNever(o);return{status:r.value,value:t.data}}_getInvalidInput(t){let n=this._getOrReturnCtx(t);return j(n,{code:I.invalid_type,expected:R.bigint,received:n.parsedType}),H}gte(t,n){return this.setLimit("min",t,!0,L.toString(n))}gt(t,n){return this.setLimit("min",t,!1,L.toString(n))}lte(t,n){return this.setLimit("max",t,!0,L.toString(n))}lt(t,n){return this.setLimit("max",t,!1,L.toString(n))}setLimit(t,n,i,r){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:i,message:L.toString(r)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:L.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:L.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:L.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:L.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:L.toString(n)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};ma.create=e=>new ma({checks:[],typeName:P.ZodBigInt,coerce:e?.coerce??!1,...ee(e)});var ha=class extends oe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==R.boolean){let i=this._getOrReturnCtx(t);return j(i,{code:I.invalid_type,expected:R.boolean,received:i.parsedType}),H}return ht(t.data)}};ha.create=e=>new ha({typeName:P.ZodBoolean,coerce:e?.coerce||!1,...ee(e)});var ga=class e extends oe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==R.date){let o=this._getOrReturnCtx(t);return j(o,{code:I.invalid_type,expected:R.date,received:o.parsedType}),H}if(Number.isNaN(t.data.getTime())){let o=this._getOrReturnCtx(t);return j(o,{code:I.invalid_date}),H}let i=new st,r;for(let o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(r=this._getOrReturnCtx(t,r),j(r,{code:I.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),i.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(r=this._getOrReturnCtx(t,r),j(r,{code:I.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),i.dirty()):le.assertNever(o);return{status:i.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:L.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:L.toString(n)})}get minDate(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}};ga.create=e=>new ga({checks:[],coerce:e?.coerce||!1,typeName:P.ZodDate,...ee(e)});var va=class extends oe{_parse(t){if(this._getType(t)!==R.symbol){let i=this._getOrReturnCtx(t);return j(i,{code:I.invalid_type,expected:R.symbol,received:i.parsedType}),H}return ht(t.data)}};va.create=e=>new va({typeName:P.ZodSymbol,...ee(e)});var wi=class extends oe{_parse(t){if(this._getType(t)!==R.undefined){let i=this._getOrReturnCtx(t);return j(i,{code:I.invalid_type,expected:R.undefined,received:i.parsedType}),H}return ht(t.data)}};wi.create=e=>new wi({typeName:P.ZodUndefined,...ee(e)});var xi=class extends oe{_parse(t){if(this._getType(t)!==R.null){let i=this._getOrReturnCtx(t);return j(i,{code:I.invalid_type,expected:R.null,received:i.parsedType}),H}return ht(t.data)}};xi.create=e=>new xi({typeName:P.ZodNull,...ee(e)});var ya=class extends oe{constructor(){super(...arguments),this._any=!0}_parse(t){return ht(t.data)}};ya.create=e=>new ya({typeName:P.ZodAny,...ee(e)});var Yr=class extends oe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ht(t.data)}};Yr.create=e=>new Yr({typeName:P.ZodUnknown,...ee(e)});var _r=class extends oe{_parse(t){let n=this._getOrReturnCtx(t);return j(n,{code:I.invalid_type,expected:R.never,received:n.parsedType}),H}};_r.create=e=>new _r({typeName:P.ZodNever,...ee(e)});var _a=class extends oe{_parse(t){if(this._getType(t)!==R.undefined){let i=this._getOrReturnCtx(t);return j(i,{code:I.invalid_type,expected:R.void,received:i.parsedType}),H}return ht(t.data)}};_a.create=e=>new _a({typeName:P.ZodVoid,...ee(e)});var Qr=class e extends oe{_parse(t){let{ctx:n,status:i}=this._processInputParams(t),r=this._def;if(n.parsedType!==R.array)return j(n,{code:I.invalid_type,expected:R.array,received:n.parsedType}),H;if(r.exactLength!==null){let a=n.data.length>r.exactLength.value,s=n.data.length<r.exactLength.value;(a||s)&&(j(n,{code:a?I.too_big:I.too_small,minimum:s?r.exactLength.value:void 0,maximum:a?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),i.dirty())}if(r.minLength!==null&&n.data.length<r.minLength.value&&(j(n,{code:I.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),i.dirty()),r.maxLength!==null&&n.data.length>r.maxLength.value&&(j(n,{code:I.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),i.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>r.type._parseAsync(new Kt(n,a,n.path,s)))).then(a=>st.mergeArray(i,a));let o=[...n.data].map((a,s)=>r.type._parseSync(new Kt(n,a,n.path,s)));return st.mergeArray(i,o)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:L.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:L.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:L.toString(n)}})}nonempty(t){return this.min(1,t)}};Qr.create=(e,t)=>new Qr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:P.ZodArray,...ee(t)});function $i(e){if(e instanceof Lt){let t={};for(let n in e.shape){let i=e.shape[n];t[n]=or.create($i(i))}return new Lt({...e._def,shape:()=>t})}else return e instanceof Qr?new Qr({...e._def,type:$i(e.element)}):e instanceof or?or.create($i(e.unwrap())):e instanceof Zr?Zr.create($i(e.unwrap())):e instanceof Ur?Ur.create(e.items.map(t=>$i(t))):e}var Lt=class e extends oe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),n=le.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==R.object){let u=this._getOrReturnCtx(t);return j(u,{code:I.invalid_type,expected:R.object,received:u.parsedType}),H}let{status:i,ctx:r}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof _r&&this._def.unknownKeys==="strip"))for(let u in r.data)a.includes(u)||s.push(u);let c=[];for(let u of a){let l=o[u],d=r.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new Kt(r,d,r.path,u)),alwaysSet:u in r.data})}if(this._def.catchall instanceof _r){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of s)c.push({key:{status:"valid",value:l},value:{status:"valid",value:r.data[l]}});else if(u==="strict")s.length>0&&(j(r,{code:I.unrecognized_keys,keys:s}),i.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let l of s){let d=r.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new Kt(r,d,r.path,l)),alwaysSet:l in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let d=await l.key,p=await l.value;u.push({key:d,value:p,alwaysSet:l.alwaysSet})}return u}).then(u=>st.mergeObjectSync(i,u)):st.mergeObjectSync(i,c)}get shape(){return this._def.shape()}strict(t){return L.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,i)=>{let r=this._def.errorMap?.(n,i).message??i.defaultError;return n.code==="unrecognized_keys"?{message:L.errToObj(t).message??r}:{message:r}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:P.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let i of le.objectKeys(t))t[i]&&this.shape[i]&&(n[i]=this.shape[i]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let i of le.objectKeys(this.shape))t[i]||(n[i]=this.shape[i]);return new e({...this._def,shape:()=>n})}deepPartial(){return $i(this)}partial(t){let n={};for(let i of le.objectKeys(this.shape)){let r=this.shape[i];t&&!t[i]?n[i]=r:n[i]=r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let i of le.objectKeys(this.shape))if(t&&!t[i])n[i]=this.shape[i];else{let o=this.shape[i];for(;o instanceof or;)o=o._def.innerType;n[i]=o}return new e({...this._def,shape:()=>n})}keyof(){return z$(le.objectKeys(this.shape))}};Lt.create=(e,t)=>new Lt({shape:()=>e,unknownKeys:"strip",catchall:_r.create(),typeName:P.ZodObject,...ee(t)});Lt.strictCreate=(e,t)=>new Lt({shape:()=>e,unknownKeys:"strict",catchall:_r.create(),typeName:P.ZodObject,...ee(t)});Lt.lazycreate=(e,t)=>new Lt({shape:e,unknownKeys:"strip",catchall:_r.create(),typeName:P.ZodObject,...ee(t)});var ki=class extends oe{_parse(t){let{ctx:n}=this._processInputParams(t),i=this._def.options;function r(o){for(let s of o)if(s.result.status==="valid")return s.result;for(let s of o)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;let a=o.map(s=>new Mt(s.ctx.common.issues));return j(n,{code:I.invalid_union,unionErrors:a}),H}if(n.common.async)return Promise.all(i.map(async o=>{let a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(r);{let o,a=[];for(let c of i){let u={...n,common:{...n.common,issues:[]},parent:null},l=c._parseSync({data:n.data,path:n.path,parent:u});if(l.status==="valid")return l;l.status==="dirty"&&!o&&(o={result:l,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;let s=a.map(c=>new Mt(c));return j(n,{code:I.invalid_union,unionErrors:s}),H}}get options(){return this._def.options}};ki.create=(e,t)=>new ki({options:e,typeName:P.ZodUnion,...ee(t)});var Cr=e=>e instanceof Ii?Cr(e.schema):e instanceof ar?Cr(e.innerType()):e instanceof zi?[e.value]:e instanceof Pi?e.options:e instanceof Ti?le.objectValues(e.enum):e instanceof Ei?Cr(e._def.innerType):e instanceof wi?[void 0]:e instanceof xi?[null]:e instanceof or?[void 0,...Cr(e.unwrap())]:e instanceof Zr?[null,...Cr(e.unwrap())]:e instanceof Lc||e instanceof ji?Cr(e.unwrap()):e instanceof Oi?Cr(e._def.innerType):[],Op=class e extends oe{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==R.object)return j(n,{code:I.invalid_type,expected:R.object,received:n.parsedType}),H;let i=this.discriminator,r=n.data[i],o=this.optionsMap.get(r);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(j(n,{code:I.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),H)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,i){let r=new Map;for(let o of n){let a=Cr(o.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let s of a){if(r.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);r.set(s,o)}}return new e({typeName:P.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:r,...ee(i)})}};function jp(e,t){let n=Rr(e),i=Rr(t);if(e===t)return{valid:!0,data:e};if(n===R.object&&i===R.object){let r=le.objectKeys(t),o=le.objectKeys(e).filter(s=>r.indexOf(s)!==-1),a={...e,...t};Object.prototype.hasOwnProperty.call(a,"__proto__")&&delete a.__proto__;for(let s of o){if(s==="__proto__")continue;let c=jp(e[s],t[s]);if(!c.valid)return{valid:!1};a[s]=c.data}return{valid:!0,data:a}}else if(n===R.array&&i===R.array){if(e.length!==t.length)return{valid:!1};let r=[];for(let o=0;o<e.length;o++){let a=e[o],s=t[o],c=jp(a,s);if(!c.valid)return{valid:!1};r.push(c.data)}return{valid:!0,data:r}}else return n===R.date&&i===R.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Si=class extends oe{_parse(t){let{status:n,ctx:i}=this._processInputParams(t),r=(o,a)=>{if(Pp(o)||Pp(a))return H;let s=jp(o.value,a.value);return s.valid?((Tp(o)||Tp(a))&&n.dirty(),{status:n.value,value:s.data}):(j(i,{code:I.invalid_intersection_types}),H)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([o,a])=>r(o,a)):r(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}};Si.create=(e,t,n)=>new Si({left:e,right:t,typeName:P.ZodIntersection,...ee(n)});var Ur=class e extends oe{_parse(t){let{status:n,ctx:i}=this._processInputParams(t);if(i.parsedType!==R.array)return j(i,{code:I.invalid_type,expected:R.array,received:i.parsedType}),H;if(i.data.length<this._def.items.length)return j(i,{code:I.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),H;!this._def.rest&&i.data.length>this._def.items.length&&(j(i,{code:I.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let o=[...i.data].map((a,s)=>{let c=this._def.items[s]||this._def.rest;return c?c._parse(new Kt(i,a,i.path,s)):null}).filter(a=>!!a);return i.common.async?Promise.all(o).then(a=>st.mergeArray(n,a)):st.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Ur.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ur({items:e,typeName:P.ZodTuple,rest:null,...ee(t)})};var Np=class e extends oe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:i}=this._processInputParams(t);if(i.parsedType!==R.object)return j(i,{code:I.invalid_type,expected:R.object,received:i.parsedType}),H;let r=[],o=this._def.keyType,a=this._def.valueType;for(let s in i.data)r.push({key:o._parse(new Kt(i,s,i.path,s)),value:a._parse(new Kt(i,i.data[s],i.path,s)),alwaysSet:s in i.data});return i.common.async?st.mergeObjectAsync(n,r):st.mergeObjectSync(n,r)}get element(){return this._def.valueType}static create(t,n,i){return n instanceof oe?new e({keyType:t,valueType:n,typeName:P.ZodRecord,...ee(i)}):new e({keyType:bi.create(),valueType:t,typeName:P.ZodRecord,...ee(n)})}},$a=class extends oe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:i}=this._processInputParams(t);if(i.parsedType!==R.map)return j(i,{code:I.invalid_type,expected:R.map,received:i.parsedType}),H;let r=this._def.keyType,o=this._def.valueType,a=[...i.data.entries()].map(([s,c],u)=>({key:r._parse(new Kt(i,s,i.path,[u,"key"])),value:o._parse(new Kt(i,c,i.path,[u,"value"]))}));if(i.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let c of a){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return H;(u.status==="dirty"||l.status==="dirty")&&n.dirty(),s.set(u.value,l.value)}return{status:n.value,value:s}})}else{let s=new Map;for(let c of a){let u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return H;(u.status==="dirty"||l.status==="dirty")&&n.dirty(),s.set(u.value,l.value)}return{status:n.value,value:s}}}};$a.create=(e,t,n)=>new $a({valueType:t,keyType:e,typeName:P.ZodMap,...ee(n)});var ba=class e extends oe{_parse(t){let{status:n,ctx:i}=this._processInputParams(t);if(i.parsedType!==R.set)return j(i,{code:I.invalid_type,expected:R.set,received:i.parsedType}),H;let r=this._def;r.minSize!==null&&i.data.size<r.minSize.value&&(j(i,{code:I.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),n.dirty()),r.maxSize!==null&&i.data.size>r.maxSize.value&&(j(i,{code:I.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),n.dirty());let o=this._def.valueType;function a(c){let u=new Set;for(let l of c){if(l.status==="aborted")return H;l.status==="dirty"&&n.dirty(),u.add(l.value)}return{status:n.value,value:u}}let s=[...i.data.values()].map((c,u)=>o._parse(new Kt(i,c,i.path,u)));return i.common.async?Promise.all(s).then(c=>a(c)):a(s)}min(t,n){return new e({...this._def,minSize:{value:t,message:L.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:L.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};ba.create=(e,t)=>new ba({valueType:e,minSize:null,maxSize:null,typeName:P.ZodSet,...ee(t)});var Ap=class e extends oe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==R.function)return j(n,{code:I.invalid_type,expected:R.function,received:n.parsedType}),H;function i(s,c){return Mc({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,da(),Xr].filter(u=>!!u),issueData:{code:I.invalid_arguments,argumentsError:c}})}function r(s,c){return Mc({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,da(),Xr].filter(u=>!!u),issueData:{code:I.invalid_return_type,returnTypeError:c}})}let o={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Nn){let s=this;return ht(async function(...c){let u=new Mt([]),l=await s._def.args.parseAsync(c,o).catch(f=>{throw u.addIssue(i(c,f)),u}),d=await Reflect.apply(a,this,l);return await s._def.returns._def.type.parseAsync(d,o).catch(f=>{throw u.addIssue(r(d,f)),u})})}else{let s=this;return ht(function(...c){let u=s._def.args.safeParse(c,o);if(!u.success)throw new Mt([i(c,u.error)]);let l=Reflect.apply(a,this,u.data),d=s._def.returns.safeParse(l,o);if(!d.success)throw new Mt([r(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:Ur.create(t).rest(Yr.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,i){return new e({args:t||Ur.create([]).rest(Yr.create()),returns:n||Yr.create(),typeName:P.ZodFunction,...ee(i)})}},Ii=class extends oe{get schema(){return this._def.getter()}_parse(t){let{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};Ii.create=(e,t)=>new Ii({getter:e,typeName:P.ZodLazy,...ee(t)});var zi=class extends oe{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return j(n,{received:n.data,code:I.invalid_literal,expected:this._def.value}),H}return{status:"valid",value:t.data}}get value(){return this._def.value}};zi.create=(e,t)=>new zi({value:e,typeName:P.ZodLiteral,...ee(t)});function z$(e,t){return new Pi({values:e,typeName:P.ZodEnum,...ee(t)})}var Pi=class e extends oe{_parse(t){if(typeof t.data!="string"){let n=this._getOrReturnCtx(t),i=this._def.values;return j(n,{expected:le.joinValues(i),received:n.parsedType,code:I.invalid_type}),H}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let n=this._getOrReturnCtx(t),i=this._def.values;return j(n,{received:n.data,code:I.invalid_enum_value,options:i}),H}return ht(t.data)}get options(){return this._def.values}get enum(){let t={};for(let n of this._def.values)t[n]=n;return t}get Values(){let t={};for(let n of this._def.values)t[n]=n;return t}get Enum(){let t={};for(let n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(i=>!t.includes(i)),{...this._def,...n})}};Pi.create=z$;var Ti=class extends oe{_parse(t){let n=le.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(t);if(i.parsedType!==R.string&&i.parsedType!==R.number){let r=le.objectValues(n);return j(i,{expected:le.joinValues(r),received:i.parsedType,code:I.invalid_type}),H}if(this._cache||(this._cache=new Set(le.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let r=le.objectValues(n);return j(i,{received:i.data,code:I.invalid_enum_value,options:r}),H}return ht(t.data)}get enum(){return this._def.values}};Ti.create=(e,t)=>new Ti({values:e,typeName:P.ZodNativeEnum,...ee(t)});var Nn=class extends oe{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==R.promise&&n.common.async===!1)return j(n,{code:I.invalid_type,expected:R.promise,received:n.parsedType}),H;let i=n.parsedType===R.promise?n.data:Promise.resolve(n.data);return ht(i.then(r=>this._def.type.parseAsync(r,{path:n.path,errorMap:n.common.contextualErrorMap})))}};Nn.create=(e,t)=>new Nn({type:e,typeName:P.ZodPromise,...ee(t)});var ar=class extends oe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===P.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:n,ctx:i}=this._processInputParams(t),r=this._def.effect||null,o={addIssue:a=>{j(i,a),a.fatal?n.abort():n.dirty()},get path(){return i.path}};if(o.addIssue=o.addIssue.bind(o),r.type==="preprocess"){let a=r.transform(i.data,o);if(i.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return H;let c=await this._def.schema._parseAsync({data:s,path:i.path,parent:i});return c.status==="aborted"?H:c.status==="dirty"?_i(c.value):n.value==="dirty"?_i(c.value):c});{if(n.value==="aborted")return H;let s=this._def.schema._parseSync({data:a,path:i.path,parent:i});return s.status==="aborted"?H:s.status==="dirty"?_i(s.value):n.value==="dirty"?_i(s.value):s}}if(r.type==="refinement"){let a=s=>{let c=r.refinement(s,o);if(i.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(i.common.async===!1){let s=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return s.status==="aborted"?H:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(s=>s.status==="aborted"?H:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(r.type==="transform")if(i.common.async===!1){let a=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!jn(a))return H;let s=r.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(a=>jn(a)?Promise.resolve(r.transform(a.value,o)).then(s=>({status:n.value,value:s})):H);le.assertNever(r)}};ar.create=(e,t,n)=>new ar({schema:e,typeName:P.ZodEffects,effect:t,...ee(n)});ar.createWithPreprocess=(e,t,n)=>new ar({schema:t,effect:{type:"preprocess",transform:e},typeName:P.ZodEffects,...ee(n)});var or=class extends oe{_parse(t){return this._getType(t)===R.undefined?ht(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};or.create=(e,t)=>new or({innerType:e,typeName:P.ZodOptional,...ee(t)});var Zr=class extends oe{_parse(t){return this._getType(t)===R.null?ht(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Zr.create=(e,t)=>new Zr({innerType:e,typeName:P.ZodNullable,...ee(t)});var Ei=class extends oe{_parse(t){let{ctx:n}=this._processInputParams(t),i=n.data;return n.parsedType===R.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};Ei.create=(e,t)=>new Ei({innerType:e,typeName:P.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ee(t)});var Oi=class extends oe{_parse(t){let{ctx:n}=this._processInputParams(t),i={...n,common:{...n.common,issues:[]}},r=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return fa(r)?r.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Mt(i.common.issues)},input:i.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new Mt(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}};Oi.create=(e,t)=>new Oi({innerType:e,typeName:P.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ee(t)});var wa=class extends oe{_parse(t){if(this._getType(t)!==R.nan){let i=this._getOrReturnCtx(t);return j(i,{code:I.invalid_type,expected:R.nan,received:i.parsedType}),H}return{status:"valid",value:t.data}}};wa.create=e=>new wa({typeName:P.ZodNaN,...ee(e)});var Lc=class extends oe{_parse(t){let{ctx:n}=this._processInputParams(t),i=n.data;return this._def.type._parse({data:i,path:n.path,parent:n})}unwrap(){return this._def.type}},Vc=class e extends oe{_parse(t){let{status:n,ctx:i}=this._processInputParams(t);if(i.common.async)return(async()=>{let o=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return o.status==="aborted"?H:o.status==="dirty"?(n.dirty(),_i(o.value)):this._def.out._parseAsync({data:o.value,path:i.path,parent:i})})();{let r=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return r.status==="aborted"?H:r.status==="dirty"?(n.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:i.path,parent:i})}}static create(t,n){return new e({in:t,out:n,typeName:P.ZodPipeline})}},ji=class extends oe{_parse(t){let n=this._def.innerType._parse(t),i=r=>(jn(r)&&(r.value=Object.freeze(r.value)),r);return fa(n)?n.then(r=>i(r)):i(n)}unwrap(){return this._def.innerType}};ji.create=(e,t)=>new ji({innerType:e,typeName:P.ZodReadonly,...ee(t)});var RM={object:Lt.lazycreate},P;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(P||(P={}));var CM=bi.create,UM=pa.create,ZM=wa.create,MM=ma.create,LM=ha.create,VM=ga.create,FM=va.create,qM=wi.create,BM=xi.create,HM=ya.create,JM=Yr.create,KM=_r.create,GM=_a.create,WM=Qr.create,P$=Lt.create,XM=Lt.strictCreate,YM=ki.create,QM=Op.create,e2=Si.create,t2=Ur.create,r2=Np.create,n2=$a.create,i2=ba.create,o2=Ap.create,a2=Ii.create,s2=zi.create,c2=Pi.create,u2=Ti.create,l2=Nn.create,d2=ar.create,f2=or.create,p2=Zr.create,m2=ar.createWithPreprocess,h2=Vc.create;var ur={};Ar(ur,{$ZodAny:()=>Wu,$ZodArray:()=>tl,$ZodAsyncError:()=>Tt,$ZodBase64:()=>Au,$ZodBase64URL:()=>Ru,$ZodBigInt:()=>qa,$ZodBigIntFormat:()=>Hu,$ZodBoolean:()=>Xi,$ZodCIDRv4:()=>Eu,$ZodCIDRv6:()=>ju,$ZodCUID:()=>wu,$ZodCUID2:()=>xu,$ZodCatch:()=>_l,$ZodCheck:()=>xe,$ZodCheckBigIntFormat:()=>Mm,$ZodCheckEndsWith:()=>Ym,$ZodCheckGreaterThan:()=>su,$ZodCheckIncludes:()=>Wm,$ZodCheckLengthEquals:()=>Hm,$ZodCheckLessThan:()=>au,$ZodCheckLowerCase:()=>Km,$ZodCheckMaxLength:()=>qm,$ZodCheckMaxSize:()=>Lm,$ZodCheckMimeType:()=>th,$ZodCheckMinLength:()=>Bm,$ZodCheckMinSize:()=>Vm,$ZodCheckMultipleOf:()=>Um,$ZodCheckNumberFormat:()=>Zm,$ZodCheckOverwrite:()=>rh,$ZodCheckProperties:()=>eh,$ZodCheckProperty:()=>Qm,$ZodCheckRegex:()=>Jm,$ZodCheckSizeEquals:()=>Fm,$ZodCheckStartsWith:()=>Xm,$ZodCheckStringFormat:()=>Gi,$ZodCheckUpperCase:()=>Gm,$ZodCodec:()=>Qi,$ZodCreditCard:()=>Zu,$ZodCustom:()=>Sl,$ZodCustomStringFormat:()=>qu,$ZodCyclicError:()=>Tl,$ZodDate:()=>el,$ZodDefault:()=>hl,$ZodDiscriminatedUnion:()=>il,$ZodE164:()=>Cu,$ZodEmail:()=>hu,$ZodEmoji:()=>$u,$ZodEncodeError:()=>tn,$ZodEnum:()=>ul,$ZodError:()=>Yp,$ZodExactOptional:()=>pl,$ZodFile:()=>dl,$ZodFunction:()=>xl,$ZodGUID:()=>pu,$ZodIBAN:()=>Lu,$ZodIPv4:()=>zu,$ZodIPv6:()=>Pu,$ZodISODate:()=>ch,$ZodISODateTime:()=>sh,$ZodISODuration:()=>lh,$ZodISOTime:()=>uh,$ZodIntersection:()=>ol,$ZodJWT:()=>Fu,$ZodKSUID:()=>Iu,$ZodLazy:()=>eo,$ZodLiteral:()=>ll,$ZodMAC:()=>Tu,$ZodMap:()=>sl,$ZodNaN:()=>$l,$ZodNanoID:()=>bu,$ZodNever:()=>Yu,$ZodNonOptional:()=>vl,$ZodNull:()=>Gu,$ZodNullable:()=>ml,$ZodNumber:()=>Fa,$ZodNumberFormat:()=>Bu,$ZodObject:()=>rl,$ZodObjectJIT:()=>fh,$ZodOptional:()=>Ha,$ZodPipe:()=>Ja,$ZodPrefault:()=>gl,$ZodPreprocess:()=>mh,$ZodPromise:()=>kl,$ZodReadonly:()=>bl,$ZodRealError:()=>Et,$ZodRecord:()=>al,$ZodRegistry:()=>Dl,$ZodSet:()=>cl,$ZodString:()=>rn,$ZodStringFormat:()=>_e,$ZodSuccess:()=>yl,$ZodSymbol:()=>Ju,$ZodTemplateLiteral:()=>wl,$ZodTransform:()=>fl,$ZodTuple:()=>Ba,$ZodType:()=>W,$ZodULID:()=>ku,$ZodURL:()=>_u,$ZodUUID:()=>mu,$ZodUndefined:()=>Ku,$ZodUnion:()=>Yi,$ZodUnknown:()=>Xu,$ZodVoid:()=>Qu,$ZodXID:()=>Su,$ZodXor:()=>nl,$brand:()=>Gp,$constructor:()=>v,$input:()=>yh,$output:()=>vh,Doc:()=>Mn,INVALID:()=>yt,JSONSchema:()=>lx,JSONSchemaGenerator:()=>kd,NEVER:()=>Kp,TimePrecision:()=>Ih,URL_BAD_FORMAT:()=>oh,URL_UNPARSEABLE:()=>Ua,ZodCompileAsyncError:()=>sr,ZodCompileUnsupportedError:()=>ce,_any:()=>nd,_array:()=>Oh,_base64:()=>hs,_base64url:()=>gs,_bigint:()=>Xl,_boolean:()=>Wl,_catch:()=>rj,_check:()=>Kw,_cidrv4:()=>ps,_cidrv6:()=>ms,_coercedBigint:()=>Th,_coercedBoolean:()=>Ph,_coercedDate:()=>Eh,_coercedNumber:()=>zh,_coercedString:()=>Sh,_creditCard:()=>Vl,_cuid:()=>as,_cuid2:()=>ss,_custom:()=>hd,_date:()=>sd,_decode:()=>Gc,_decodeAsync:()=>Xc,_default:()=>QO,_discriminatedUnion:()=>LO,_e164:()=>vs,_email:()=>Ya,_emoji:()=>is,_encode:()=>Kc,_encodeAsync:()=>Wc,_endsWith:()=>fo,_enum:()=>JO,_file:()=>md,_float32:()=>Hl,_float64:()=>Jl,_gt:()=>wr,_gte:()=>qt,_guid:()=>Qa,_iban:()=>Fl,_includes:()=>uo,_int:()=>Bl,_int32:()=>Kl,_int64:()=>Yl,_intersection:()=>VO,_ipv4:()=>ds,_ipv6:()=>fs,_isoDate:()=>$s,_isoDateTime:()=>_s,_isoDuration:()=>ws,_isoTime:()=>bs,_jwt:()=>ys,_ksuid:()=>ls,_lazy:()=>aj,_length:()=>Hn,_literal:()=>GO,_lowercase:()=>so,_lt:()=>br,_lte:()=>Ft,_mac:()=>Ll,_map:()=>BO,_max:()=>Ft,_maxLength:()=>Bn,_maxSize:()=>an,_mime:()=>mo,_min:()=>qt,_minLength:()=>Fr,_minSize:()=>xr,_multipleOf:()=>on,_nan:()=>cd,_nanoid:()=>os,_nativeEnum:()=>KO,_negative:()=>ld,_never:()=>od,_nonnegative:()=>fd,_nonoptional:()=>ej,_nonpositive:()=>dd,_normalize:()=>ho,_null:()=>rd,_nullable:()=>YO,_number:()=>ql,_optional:()=>XO,_overwrite:()=>cr,_parse:()=>Li,_parseAsync:()=>Vi,_pipe:()=>nj,_positive:()=>ud,_promise:()=>sj,_properties:()=>po,_property:()=>pd,_readonly:()=>ij,_record:()=>qO,_refine:()=>gd,_regex:()=>ao,_safeDecode:()=>Qc,_safeDecodeAsync:()=>tu,_safeEncode:()=>Yc,_safeEncodeAsync:()=>eu,_safeParse:()=>Fi,_safeParseAsync:()=>Bi,_set:()=>HO,_size:()=>qn,_slugify:()=>_o,_startsWith:()=>lo,_string:()=>Ml,_stringFormat:()=>sn,_stringbool:()=>$d,_success:()=>tj,_superRefine:()=>vd,_symbol:()=>ed,_templateLiteral:()=>oj,_toLowerCase:()=>vo,_toUpperCase:()=>yo,_transform:()=>WO,_trim:()=>go,_tuple:()=>FO,_uint32:()=>Gl,_uint64:()=>Ql,_ulid:()=>cs,_undefined:()=>td,_union:()=>ZO,_unknown:()=>id,_uppercase:()=>co,_url:()=>oo,_uuid:()=>es,_uuidv4:()=>ts,_uuidv6:()=>rs,_uuidv7:()=>ns,_void:()=>ad,_xid:()=>us,_xor:()=>MO,base64Charset:()=>Nu,base64urlCharset:()=>Va,canParseURL:()=>ah,clone:()=>he,compile:()=>wh,compileFn:()=>Ul,config:()=>Me,createStandardJSONSchemaMethod:()=>$o,createToJSONSchemaMethod:()=>Nh,decode:()=>G$,decodeAsync:()=>X$,describe:()=>yd,encode:()=>K$,encodeAsync:()=>W$,extractDefs:()=>un,finalize:()=>ln,flattenError:()=>ja,formatError:()=>Na,getDiscriminatedOption:()=>ph,globalConfig:()=>Ge,globalRegistry:()=>Qe,handleUnrepresentable:()=>He,initializeContext:()=>cn,isBackEdge:()=>Ol,isRecursiveSchema:()=>El,isValidBase64:()=>La,isValidBase64URL:()=>Du,isValidCIDRv6:()=>Ou,isValidCreditCard:()=>Uu,isValidIBAN:()=>Mu,isValidIPv6:()=>Ma,isValidJWT:()=>Vu,locales:()=>no,memoizer:()=>Wa,mergeValues:()=>Wi,meta:()=>_d,parse:()=>Cn,parseAsync:()=>Un,parseURLObject:()=>bb,prettifyError:()=>em,process:()=>be,processSchema:()=>be,regexes:()=>Vt,registry:()=>Rl,safeDecode:()=>Q$,safeDecodeAsync:()=>tb,safeEncode:()=>Y$,safeEncodeAsync:()=>eb,safeParse:()=>qi,safeParseAsync:()=>Hi,standardProps:()=>fu,stripTabAndNewline:()=>Za,toDotPath:()=>H$,toJSONSchema:()=>Jn,toZod:()=>xa,treeifyError:()=>Qp,urlHostnameOk:()=>vu,urlProtocolOk:()=>yu,util:()=>w,validate:()=>Ji,validateAsync:()=>Ki,validateURL:()=>gu,version:()=>nh,withParser:()=>Cl});var w={};Ar(w,{BIGINT_FORMAT_RANGES:()=>za,CONSTANT_CATCH:()=>Hc,Class:()=>Cp,NUMBER_FORMAT_RANGES:()=>Ia,aborted:()=>vt,allowsEval:()=>Mp,assert:()=>yT,assertEqual:()=>mT,assertIs:()=>gT,assertNever:()=>vT,assertNotEqual:()=>hT,assignProp:()=>Ye,attachSchema:()=>Pa,base64ToUint8Array:()=>M$,base64urlToUint8Array:()=>ET,cached:()=>Ri,captureStackTrace:()=>qc,cleanEnum:()=>TT,cleanRegex:()=>Lr,clone:()=>he,cloneDef:()=>bT,codePointLength:()=>Rn,constantCatch:()=>Hp,createTransparentProxy:()=>zT,defineLazy:()=>Up,defineLazyInternal:()=>re,derived:()=>AT,esc:()=>gt,escapeRegex:()=>Xt,explicitlyAborted:()=>Fp,extend:()=>A$,finalizeIssue:()=>Pt,floatSafeRemainder:()=>ka,getElementAtPath:()=>wT,getEnumValues:()=>Ai,getLengthableOrigin:()=>Ea,getParsedType:()=>IT,getSizableOrigin:()=>Ta,hexToUint8Array:()=>jT,hide:()=>Oa,installLazyProp:()=>Bp,isObject:()=>Dn,isPlainObject:()=>Wt,issue:()=>Mi,joinValues:()=>y,jsonStringifyReplacer:()=>Di,members:()=>qp,merge:()=>C$,mergeDefs:()=>Gt,normalizeParams:()=>z,nullish:()=>Fc,numKeys:()=>ST,objectClone:()=>_T,omit:()=>N$,optionalKeys:()=>Vp,own:()=>$r,parsedType:()=>S,partial:()=>U$,pick:()=>j$,prefixIssues:()=>zt,primitiveTypes:()=>Lp,promiseAllObject:()=>xT,propertyKeyTypes:()=>Sa,randomString:()=>kT,rawShape:()=>Ci,required:()=>Z$,safeExtend:()=>R$,shallowClone:()=>Ui,sizeCaps:()=>Zi,slugify:()=>Zp,stringifyPrimitive:()=>x,toZod:()=>xa,uint8ArrayToBase64:()=>L$,uint8ArrayToBase64url:()=>OT,uint8ArrayToHex:()=>NT,unwrapMessage:()=>Ni});function mT(e){return e}function hT(e){return e}function xa(){return e=>e}function gT(e){}function vT(e){throw new Error("Unexpected value in exhaustive check")}function yT(e){}function Ai(e){let t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,r])=>t.indexOf(+i)===-1).map(([i,r])=>r)}function y(e,t="|"){return e.map(n=>x(n)).join(t)}function Di(e,t){return typeof t=="bigint"?t.toString():t}var Rp=class{constructor(t){this._getter=t,this._value=void 0}get value(){let t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}};function Ri(e){return new Rp(e)}function Fc(e){return e==null}function Lr(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function ka(e,t){let n=e/t,i=Math.round(n),r=4*Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-i)<r?0:n-i}var T$=Symbol("evaluating");function Up(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==T$)return i===void 0&&(i=T$,i=n()),i},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function _T(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Ye(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Ci(e){let t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function Mr(e){return Ci(e._zod.def)??e._zod.def.shape}function E$(e,t,n){Object.defineProperty(e,t,{get(){let i=n();return Ye(this,t,i),i},enumerable:!0,configurable:!0})}function O$(e,t,n){t in e?Ye(e,t,n):e[t]=n}function An(e,t,n,i){let r=Mr(t);for(let o of n){let a=Object.getOwnPropertyDescriptor(r,o);a.enumerable&&(a.get?E$(e,o,()=>{let s=t._zod.def.shape[o];return i?i(s,o):s}):O$(e,o,i?i(a.value,o):a.value))}}function $T(e,t){for(let n of Reflect.ownKeys(t)){let i=Object.getOwnPropertyDescriptor(t,n);i.enumerable&&(i.get?E$(e,n,()=>t[n]):O$(e,n,i.value))}}function Gt(...e){let t={};for(let n of e){let i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function bT(e){return Gt(e._zod.def)}function wT(e,t){return t?t.reduce((n,i)=>n?.[i],e):e}function xT(e){let t=Object.keys(e),n=t.map(i=>e[i]);return Promise.all(n).then(i=>{let r={};for(let o=0;o<t.length;o++)r[t[o]]=i[o];return r})}function kT(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<e;i++)n+=t[Math.floor(Math.random()*t.length)];return n}function gt(e){return JSON.stringify(e)}function Zp(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var qc="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Dn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Mp=Ri(()=>{if(Ge.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Wt(e){if(Dn(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(Dn(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Ui(e){return Wt(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function ST(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var IT=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}`)}},Sa=new Set(["string","number","symbol"]),Lp=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Xt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function he(e,t,n){let i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}function z(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 zT(e){let t;return new Proxy({},{get(n,i,r){return t??(t=e()),Reflect.get(t,i,r)},set(n,i,r,o){return t??(t=e()),Reflect.set(t,i,r,o)},has(n,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(n,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(n,i,r){return t??(t=e()),Reflect.defineProperty(t,i,r)}})}function x(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Vp(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}var Ia={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]},za={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function j$(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o={};return An(o,e,Bc(e,t)),he(e,Gt(n,{shape:o,checks:[]}))}function Bc(e,t){let n=Mr(e),i=[];for(let r of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,r)?.enumerable)throw new Error(`Unrecognized key: "${String(r)}"`);t[r]&&i.push(r)}return i}function N$(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=new Set(Bc(e,t)),a={};return An(a,e,Reflect.ownKeys(Mr(e)).filter(s=>!o.has(s))),he(e,Gt(n,{shape:a,checks:[]}))}function A$(e,t){if(!Wt(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let r=Mr(e);for(let o of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(r,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return he(e,Gt(e._zod.def,{shape:D$(e,t)}))}function D$(e,t){let n={};return An(n,e,Reflect.ownKeys(Mr(e))),$T(n,t),n}function R$(e,t){if(!Wt(t))throw new Error("Invalid input to safeExtend: expected a plain object");return he(e,Gt(e._zod.def,{shape:D$(e,t)}))}function C$(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n={};An(n,e,Reflect.ownKeys(Mr(e))),An(n,t,Reflect.ownKeys(Mr(t)));let i=Gt(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return he(e,i)}function U$(e,t,n,i="partial"){let o=t._zod.def.checks;if(o&&o.length>0)throw new Error(`.${i}() cannot be used on object schemas containing refinements`);let s=n?new Set(Bc(t,n)):void 0,c={};return An(c,t,Reflect.ownKeys(Mr(t)),e&&((u,l)=>s&&!s.has(l)?u:new e({type:"optional",innerType:u}))),he(t,Gt(t._zod.def,{shape:c,checks:[]}))}function Z$(e,t,n){let i=n?new Set(Bc(t,n)):void 0,r={};return An(r,t,Reflect.ownKeys(Mr(t)),(o,a)=>i&&!i.has(a)?o:new e({type:"nonoptional",innerType:o})),he(t,Gt(t._zod.def,{shape:r}))}function vt(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Fp(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function zt(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function Ni(e){return typeof e=="string"?e:e?.message}function Zi(e){let t=[];for(let n of e??[]){let i=n._zod.def;if(!/_(length|size)$|_equals$/.test(i.check))break;let r=i.maximum??i.length??i.size;r>=0&&t.push([r,n])}return t}function Pa(e,t,n){var i;for(let r=t;r<e.length;r++)(i=e[r]).schema??(i.schema=n)}function Pt(e,t,n){var i;let r=e.inst?._zod?.traits;r?.has("$ZodType")&&(r.has("$ZodCheck")?(i=e).schema??(i.schema=e.inst):e.schema=e.inst);let o=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,a=e.message?e.message:Ni(e.inst?._zod.def?.error?.(e))??Ni(o?.(e))??Ni(t?.error?.(e))??Ni(n.customError?.(e))??Ni(n.localeError?.(e))??"Invalid input",s={};for(let c of Object.keys(e))c==="inst"||c==="schema"||c==="continue"||c==="input"||c==="__proto__"||(s[c]=e[c]);return s.path??(s.path=[]),s.message=a,t?.reportInput&&(s.input=e.input),s}function Ta(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}var PT=/[\uD800-\uDBFF]/;function Rn(e){let t=e.length;if(!PT.test(e))return t;let n=t;for(let i=0;i<t-1;i++)(e.charCodeAt(i)&64512)===55296&&(e.charCodeAt(i+1)&64512)===56320&&(n--,i++);return n}function Ea(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function S(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 n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function Mi(...e){let[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}function TT(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function M$(e){let t=atob(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}function L$(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function ET(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return M$(t+n)}function OT(e){return L$(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function jT(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)n[i/2]=Number.parseInt(t.slice(i,i+2),16);return n}function NT(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Cp=class{constructor(...t){}};function qp(e,t){for(let n in t){let i=Object.getOwnPropertyDescriptor(t,n);i.get?Object.defineProperty(e,n,{...i,enumerable:!1}):DT(e,n,i.value)}}function $r(e,t,n,i=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:i,value:n}),n}function Oa(e,t,n){return $r(e,t,n,!1)}function AT(e,t){for(let n in e){let i=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return $r(this,n,i(this))},set(r){$r(this,n,r)}})}return t}function DT(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:$r(this,t,n.bind(this))},set(i){$r(this,t,i)}})}function RT(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Dp,en=!1,CT={configurable:!0,get(){en=!0}};function re(e,t,n){let i=Object.getPrototypeOf(e._zod);if(t in i&&Dp!==e._zod){Dp=void 0;return}Dp=e._zod,Object.defineProperty(i,t,{configurable:!0,get(){Object.defineProperty(this,t,CT);let r=en;en=!1;try{let o=n(this);return en?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o}),en=en||r,o}catch(o){throw delete this[t],en=en||r,o}},set(r){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r})}})}function Bp(e,t,n,i){let r=RT(e,t);r&&Object.defineProperty(r,t,{configurable:!0,get(){let o={configurable:!0,writable:!0,enumerable:i,value:void 0};return Object.defineProperty(this,t,o),o.value=n(this),Object.defineProperty(this,t,o),o.value},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:i,value:o})}})}var Hc="~constantCatch";function Hp(e){let t=()=>e;return t[Hc]=!0,t}var V$,Kp=Object.freeze({status:"aborted"}),Jp={value:void 0,enumerable:!1},F$="captureStackTrace"in Error?Error:null;function UT(e){let t=F$;if(t){let n=t.stackTraceLimit;if(typeof n=="number"){try{t.stackTraceLimit=0}catch{return F$=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function v(e,t,n,i){let r={};function o(p){this.def=p,this.constr=d,this.traits=new Set}o.prototype=r;let a=n,s=a&&new WeakSet;function c(p,f){if(p._zod){if(p._zod.traits.has(e))return}else{Jp.value=new o(f);try{Object.defineProperty(p,"_zod",Jp)}finally{Jp.value=void 0}}if(p._zod.traits.add(e),t(p,f),s){let h=Object.getPrototypeOf(p),g=p._zod.constr.prototype,_=h;for(;_&&_!==g;)_=Object.getPrototypeOf(_);let $=_??h;s.has($)||(s.add($),qp($,a))}let m=d.prototype;for(let h in m)Object.prototype.hasOwnProperty.call(m,h)&&(h in p||(p[h]=m[h].bind(p)))}let u=i?.Parent??Object;class l extends u{}Object.defineProperty(l,"name",{value:e});function d(p){let f=i?.Parent?UT(l):this;c(f,p);let m=f._zod.deferred;if(m){for(let g of m)g();f._zod.deferred=void 0}let h=globalThis.__zod_globalConfig?.postProcessor;return h&&h(f),f}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:p=>i?.Parent&&p instanceof i.Parent?!0:p?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var Gp=Symbol("zod_brand"),Tt=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},tn=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(V$=globalThis).__zod_globalConfig??(V$.__zod_globalConfig={});var Ge=globalThis.__zod_globalConfig;function Me(e){return e&&Object.assign(Ge,e),Ge}function ZT(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Di,2)),e.message}function MT(e){this._zod.message=e}var LT={get:ZT,set:MT,enumerable:!0,configurable:!0},Xp={value:void 0,enumerable:!1},q$=new WeakSet([Object.prototype,Error.prototype]),B$=(e,t)=>{e.name="$ZodError",Xp.value=t,Object.defineProperty(e,"issues",Xp),Xp.value=void 0,Object.defineProperty(e,"message",LT);let n=Object.getPrototypeOf(e);q$.has(n)||(q$.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let i=()=>this.message;return Object.defineProperty(this,"toString",{value:i,configurable:!0,writable:!0}),i},set(i){Object.defineProperty(this,"toString",{value:i,configurable:!0,writable:!0})}}))},Yp=v("$ZodError",B$),Et=v("$ZodError",B$,void 0,{Parent:Error});function VT(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function ja(e,t=n=>n.message){let n={},i=[];for(let r of e.issues)r.path.length>0?VT(n,r.path[0],()=>[]).push(t(r)):i.push(t(r));return{formErrors:i,fieldErrors:n}}function Na(e,t=n=>n.message){let n={_errors:[]},i=(r,o=[])=>{for(let a of r.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>i({issues:s},[...o,...a.path]));else if(a.code==="invalid_key")i({issues:a.issues},[...o,...a.path]);else if(a.code==="invalid_element")i({issues:a.issues},[...o,...a.path]);else{let s=[...o,...a.path];if(s.length===0)n._errors.push(t(a));else{let c=n,u=0;for(;u<s.length;){let l=s[u],d=u===s.length-1;if(l==="_errors"){d&&c._errors.push(t(a)),u++;continue}Object.prototype.hasOwnProperty.call(c,l)||Object.defineProperty(c,l,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let p=c[l];d&&p._errors.push(t(a)),c=p,u++}}}};return i(e),n}function Qp(e,t=n=>n.message){let n={errors:[]},i=(r,o=[])=>{var a;for(let s of r.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(c=>i({issues:c},[...o,...s.path]));else if(s.code==="invalid_key")i({issues:s.issues},[...o,...s.path]);else if(s.code==="invalid_element")i({issues:s.issues},[...o,...s.path]);else{let c=[...o,...s.path];if(c.length===0){n.errors.push(t(s));continue}let u=n,l=0;for(;l<c.length;){let d=c[l],p=l===c.length-1;typeof d=="string"?(u.properties??(u.properties={}),Object.prototype.hasOwnProperty.call(u.properties,d)||Object.defineProperty(u.properties,d,{value:{errors:[]},enumerable:!0,writable:!0,configurable:!0}),u=u.properties[d]):(u.items??(u.items=[]),(a=u.items)[d]??(a[d]={errors:[]}),u=u.items[d]),p&&u.errors.push(t(s)),l++}}};return i(e),n}function H$(e){let t=[],n=e.map(i=>typeof i=="object"?i.key:i);for(let i of n)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function em(e){let t=[],n=[...e.issues].sort((i,r)=>(i.path??[]).length-(r.path??[]).length);for(let i of n)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${H$(i.path)}`);return t.join(`
|
|
11
|
+
`)}function Jc(e,t){return{callee:t?.callee??e,Err:t?.Err}}var Li=e=>{let t=(n,i,r,o)=>{let a=r?{...r,async:!1}:{async:!1},s=n._zod.run({value:i,issues:[]},a);if(s instanceof Promise)throw new Tt;if(s.issues.length){let c=new(o?.Err??e)(s.issues.map(u=>Pt(u,a,Me())));throw qc(c,o?.callee??t),c}return s.value};return t},Cn=Li(Et),Vi=e=>{let t=async(n,i,r,o)=>{let a=r?{...r,async:!0}:{async:!0},s=n._zod.run({value:i,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let c=new(o?.Err??e)(s.issues.map(u=>Pt(u,a,Me())));throw qc(c,o?.callee??t),c}return s.value};return t},Un=Vi(Et),Fi=e=>(t,n,i)=>{let r=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},r);if(o instanceof Promise)throw new Tt;return o.issues.length?J$(e,o.issues,r):{success:!0,data:o.value}},qi=Fi(Et);function J$(e,t,n){let i;return{success:!1,get error(){return i||(i=new e(t.map(r=>Pt(r,n,Me()))),t=void 0,n=void 0),i},set error(r){i=r,t=void 0,n=void 0}}}var Bi=e=>async(t,n,i)=>{let r=i?{...i,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?J$(e,o.issues,r):{success:!0,data:o.value}},Hi=Bi(Et),qT=Symbol.for("zod.compile.invalid"),BT=Symbol.for("zod.compile.fallback"),Ji=((e,t,n)=>{let i=e._zod.bag.validator;if(i!==void 0){if(i(t)!==qT)return!0;if(i.definite===!0&&n===void 0)return!1}return HT(e,t,n)});function HT(e,t,n){let i=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},r=e._zod.bag.fallbackRun,o;if(r?(i[BT]=!0,o=r({value:t,issues:[]},i)):o=e._zod.run({value:t,issues:[]},i),o instanceof Promise)throw new Tt;return o.issues.length===0}var Ki=async(e,t,n)=>{let i=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},r=e._zod.run({value:t,issues:[]},i);return r instanceof Promise&&(r=await r),r.issues.length===0},Kc=e=>{let t=Li(e),n=(i,r,o,a)=>{let s=o?{...o,direction:"backward"}:{direction:"backward"};return t(i,r,s,Jc(n,a))};return n},K$=Kc(Et),Gc=e=>{let t=Li(e),n=(i,r,o,a)=>t(i,r,o,Jc(n,a));return n},G$=Gc(Et),Wc=e=>{let t=Vi(e),n=async(i,r,o,a)=>{let s=o?{...o,direction:"backward"}:{direction:"backward"};return await t(i,r,s,Jc(n,a))};return n},W$=Wc(Et),Xc=e=>{let t=Vi(e),n=async(i,r,o,a)=>await t(i,r,o,Jc(n,a));return n},X$=Xc(Et),Yc=e=>(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Fi(e)(t,n,r)},Y$=Yc(Et),Qc=e=>(t,n,i)=>Fi(e)(t,n,i),Q$=Qc(Et),eu=e=>async(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Bi(e)(t,n,r)},eb=eu(Et),tu=e=>async(t,n,i)=>Bi(e)(t,n,i),tb=tu(Et);var Vt={};Ar(Vt,{anyString:()=>zm,base64:()=>ym,base64url:()=>_m,bigint:()=>Tm,boolean:()=>Em,browserEmail:()=>e1,cidrv4:()=>gm,cidrv6:()=>vm,creditCard:()=>ru,cuid:()=>rm,cuid2:()=>nm,currencyCode:()=>xm,date:()=>km,datetime:()=>Im,domain:()=>bm,duration:()=>um,e164:()=>wm,email:()=>dm,emoji:()=>fm,extendedDuration:()=>JT,guid:()=>lm,hex:()=>Dm,hostname:()=>$m,html5Email:()=>XT,httpProtocol:()=>Aa,iban:()=>nu,idnEmail:()=>QT,integer:()=>Da,ipv4:()=>pm,ipv6:()=>mm,ksuid:()=>am,lowercase:()=>Nm,mac:()=>hm,md5_base64:()=>i1,md5_base64url:()=>o1,md5_hex:()=>n1,nanoid:()=>sm,nanoidOfLength:()=>cm,null:()=>Om,number:()=>Vr,rfc5322Email:()=>YT,sha1_base64:()=>s1,sha1_base64url:()=>c1,sha1_hex:()=>a1,sha256_base64:()=>l1,sha256_base64url:()=>d1,sha256_hex:()=>u1,sha384_base64:()=>p1,sha384_base64url:()=>m1,sha384_hex:()=>f1,sha512_base64:()=>g1,sha512_base64url:()=>v1,sha512_hex:()=>h1,string:()=>Pm,time:()=>Sm,ulid:()=>im,undefined:()=>jm,unicodeEmail:()=>rb,uppercase:()=>Am,uuid:()=>Zn,uuid4:()=>KT,uuid6:()=>GT,uuid7:()=>WT,xid:()=>om});var rm=/^[cC][0-9a-z]{6,}$/,nm=/^[0-9a-z]+$/,im=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,om=/^[0-9a-vA-V]{20}$/,am=/^[A-Za-z0-9]{27}$/,sm=/^[a-zA-Z0-9_-]{21}$/;function cm(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var um=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,JT=/^[-+]?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)?)??$/,lm=/^([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})$/,Zn=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)$/,KT=Zn(4),GT=Zn(6),WT=Zn(7),dm=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,XT=/^[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])?)*$/,YT=/^(([^<>()\[\]\\.,;:\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,}))$/,rb=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,QT=rb,e1=/^[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])?)*$/,t1="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function fm(){return new RegExp(t1,"u")}var pm=/^(?:(?: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])$/,mm=/^(([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}|:))$/,hm=e=>{let t=Xt(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},gm=/^((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])$/,vm=/^(([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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ym=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,_m=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,$m=/^(?=.{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])?)*\.?$/,bm=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,Aa=/^https?$/,wm=/^\+[1-9]\d{6,14}$/,ru=/^\d(?:[ -]?\d){11,18}$/,xm=/^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/,nu=/^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/,nb="(?:(?:\\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])))";function r1(e){return new RegExp(`^${e}$`)}var km=r1(nb);function tm(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}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Sm(e){return new RegExp(`^${tm(e)}$`)}function Im(e){let t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${tm({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,i=e.local?`${n}|${tm({precision:e.precision})}`:n;return new RegExp(`^${nb}T(?:${i})$`)}var zm=/^[\s\S]{0,}$/,Pm=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Tm=/^-?\d+n?$/,Da=/^-?\d+$/,Vr=/^-?\d+(?:\.\d+)?$/,Em=/^(?:true|false)$/i,Om=/^null$/i;var jm=/^undefined$/i;var Nm=/^[^A-Z]*$/,Am=/^[^a-z]*$/,Dm=/^[0-9a-fA-F]*$/;function Ra(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Ca(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var n1=/^[0-9a-fA-F]{32}$/,i1=Ra(22,"=="),o1=Ca(22),a1=/^[0-9a-fA-F]{40}$/,s1=Ra(27,"="),c1=Ca(27),u1=/^[0-9a-fA-F]{64}$/,l1=Ra(43,"="),d1=Ca(43),f1=/^[0-9a-fA-F]{96}$/,p1=Ra(64,""),m1=Ca(64),h1=/^[0-9a-fA-F]{128}$/,g1=Ra(86,"=="),v1=Ca(86);var xe=v("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Rm=e=>{let t=e.value;return!Fc(t)&&t.size!==void 0},Cm=e=>{let t=e.value;return!Fc(t)&&t.length!==void 0},iu={number:"number",bigint:"bigint",object:"date"},au=v("$ZodCheckLessThan",(e,t)=>{xe.init(e,t);let n=iu[typeof t.value];e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:iu[typeof i.value]??n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),su=v("$ZodCheckGreaterThan",(e,t)=>{xe.init(e,t);let n=iu[typeof t.value];e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:iu[typeof i.value]??n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Um=v("$ZodCheckMultipleOf",(e,t)=>{xe.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):ka(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Zm=v("$ZodCheckNumberFormat",(e,t)=>{xe.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),i=n?"int":"number",[r,o]=Ia[t.format];e._zod.check=a=>{let s=a.value;if(n){if(!Number.isInteger(s)){a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}s<r&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),s>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),Mm=v("$ZodCheckBigIntFormat",(e,t)=>{xe.init(e,t);let[n,i]=za[t.format];e._zod.check=r=>{let o=r.value;o<n&&r.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),o>i&&r.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Lm=v("$ZodCheckMaxSize",(e,t)=>{var n;xe.init(e,t),(n=e._zod.def).when??(n.when=Rm),e._zod.check=i=>{let r=i.value;r.size<=t.maximum||i.issues.push({origin:Ta(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Vm=v("$ZodCheckMinSize",(e,t)=>{var n;xe.init(e,t),(n=e._zod.def).when??(n.when=Rm),e._zod.check=i=>{let r=i.value;r.size>=t.minimum||i.issues.push({origin:Ta(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Fm=v("$ZodCheckSizeEquals",(e,t)=>{var n;xe.init(e,t),(n=e._zod.def).when??(n.when=Rm),e._zod.check=i=>{let r=i.value,o=r.size;if(o===t.size)return;let a=o>t.size;i.issues.push({origin:Ta(r),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),qm=v("$ZodCheckMaxLength",(e,t)=>{var n;xe.init(e,t),(n=e._zod.def).when??(n.when=Cm),e._zod.check=i=>{let r=i.value,o=r.length;if((typeof r=="string"&&o>t.maximum?Rn(r):o)<=t.maximum)return;let s=Ea(r);i.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Bm=v("$ZodCheckMinLength",(e,t)=>{var n;xe.init(e,t),(n=e._zod.def).when??(n.when=Cm),e._zod.check=i=>{let r=i.value,o=r.length;if((typeof r=="string"&&o>=t.minimum&&o<t.minimum*2?Rn(r):o)>=t.minimum)return;let s=Ea(r);i.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Hm=v("$ZodCheckLengthEquals",(e,t)=>{var n;xe.init(e,t),(n=e._zod.def).when??(n.when=Cm),e._zod.check=i=>{let r=i.value,o=r.length,a=typeof r=="string"&&o>=t.length&&o<=t.length*2?Rn(r):o;if(a===t.length)return;let s=Ea(r),c=a>t.length;i.issues.push({origin:s,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Gi=v("$ZodCheckStringFormat",(e,t)=>{var n,i;xe.init(e,t),t.pattern?(n=e._zod).check??(n.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),Jm=v("$ZodCheckRegex",(e,t)=>{Gi.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Km=v("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Nm),Gi.init(e,t)}),Gm=v("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Am),Gi.init(e,t)}),Wm=v("$ZodCheckIncludes",(e,t)=>{xe.init(e,t);let n=Xt(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position},}${n}`:n);t.pattern=i,e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),Xm=v("$ZodCheckStartsWith",(e,t)=>{xe.init(e,t);let n=new RegExp(`^${Xt(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),Ym=v("$ZodCheckEndsWith",(e,t)=>{xe.init(e,t);let n=new RegExp(`.*${Xt(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function ou(e,t,n){e.issues.length&&t.issues.push(...zt(n,e.issues))}var Qm=v("$ZodCheckProperty",(e,t)=>{xe.init(e,t),e._zod.check=n=>{let i=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(r=>ou(r,n,t.property));ou(i,n,t.property)}}),eh=v("$ZodCheckProperties",(e,t)=>{xe.init(e,t),Oa(e,Symbol.iterator,function*(){yield e});let n;e._zod.check=i=>{if(i.value==null){i.issues.push({expected:"object",code:"invalid_type",input:i.value,inst:e});return}n??(n=Reflect.ownKeys(t.shape).map(a=>[a,t.shape[a]]));let r=i.value,o;for(let[a,s]of n){let c=s._zod.run({value:r[a],issues:[]},{});c instanceof Promise?(o??(o=[]),o.push(c.then(u=>ou(u,i,a)))):ou(c,i,a)}if(o)return Promise.all(o).then(()=>{})}}),th=v("$ZodCheckMimeType",(e,t)=>{xe.init(e,t);let n=new Set(t.mime);e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),rh=v("$ZodCheckOverwrite",(e,t)=>{xe.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});var Mn=class{constructor(t=[],n={}){this.content=[],this.indent=0,this.args=t,this.closed=n}indented(t){this.indent+=1;try{t(this)}finally{this.indent-=1}}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let i=t.split(`
|
|
12
12
|
`).filter(a=>a),r=Math.min(...i.map(a=>a.length-a.trimStart().length)),o=i.map(a=>a.slice(r)).map(a=>" ".repeat(this.indent*2)+a);for(let a of o)this.content.push(a)}compile(){let t=Function,n=this?.content??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
|
|
13
13
|
${n.join(`
|
|
14
14
|
`)}
|
|
15
|
-
};`)(...Object.values(this.closed))}};var Qm={major:4,minor:6,patch:7};var W=v("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Qm;let i=e._zod.def.checks,r=e._zod.traits.has("$ZodCheck")?[e,...i??[]]:i?.length?[...i]:[];for(let o of r)for(let a of o._zod.onattach)a(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let o=(s,c,u)=>{if(s.memo)return s;let l=vt(s),d;for(let f of c){if(f._zod.def.when){if(Zp(s)||!f._zod.def.when(s))continue}else if(l)continue;let p=s.issues.length,m=f._zod.check(s);if(m instanceof Promise&&u?.async===!1)throw new Pt;if(d||m instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await m,s.issues.length!==p&&(xa(s.issues,p,e),l||(l=vt(s,p)))});else{if(s.issues.length===p)continue;xa(s.issues,p,e),l||(l=vt(s,p))}}return d?d.then(()=>s):s},a=(s,c,u)=>{if(vt(s))return s.aborted=!0,s;let l=o(c,r,u);if(l instanceof Promise){if(u.async===!1)throw new Pt;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=>a(d,s,c)):a(l,s,c)}let u=e._zod.parse(s,c);if(u instanceof Promise){if(c.async===!1)throw new Pt;return u.then(l=>o(l,r,c))}return o(u,r,c)}}},{get"~standard"(){return za(this,"~standard",su(this))},set"~standard"(e){$r(this,"~standard",e)}}),gb=(e,t)=>e.issues.length?{issues:e.issues.map(n=>zt(n,t,Me()))}:{value:e.value};async function u1(e,t){let n={async:!0};return gb(await e._zod.run({value:t,issues:[]},n),n)}function su(e){return{validate:t=>{let n={async:!1};try{let i=e._zod.run({value:t,issues:[]},n);if(!(i instanceof Promise))return gb(i,n)}catch{}return u1(e,t)},vendor:"zod",version:1}}var tn=v("$ZodString",(e,t)=>{W.init(e,t),e._zod.pattern=t.pattern??km,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),ye=v("$ZodStringFormat",(e,t)=>{Ji.init(e,t),tn.init(e,t)}),cu=v("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=am),ye.init(e,t)}),uu=v("$ZodUUID",(e,t)=>{if(t.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Un(i))}else t.pattern??(t.pattern=Un());ye.init(e,t)}),lu=v("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=sm),ye.init(e,t)}),th=1,Aa=2;function rh(e){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function du(e,t){return!("normalize"in t)&&!("hostname"in t)&&!("protocol"in t)?rh(e)||Aa:vb(e,t)}function vb(e,t){if(!t.normalize&&t.protocol?.source===Oa.source&&!/^https?:\/\//i.test(e))return th;try{if(typeof URL<"u"){let n=URL;if(typeof n.parse=="function")return n.parse(e)??Aa}return new URL(e)}catch{return Aa}}var l1=/[\t\n\r]/g;function Da(e){return e.replace(l1,"")}function fu(e,t){return t.lastIndex=0,t.test(e.hostname)}function pu(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}var mu=v("$ZodURL",(e,t)=>{ye.init(e,t),e._zod.check=n=>{try{let i=n.value.trim(),r=du(i,t);if(r===th){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}if(r===Aa){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort});return}if(r===!0){n.value=Da(i);return}t.hostname&&!fu(r,t.hostname)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!pu(r,t.protocol)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?r.href:Da(i);return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),hu=v("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=cm()),ye.init(e,t)}),gu=v("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?nm:im(t.length)),ye.init(e,t)}),vu=v("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Yp),ye.init(e,t)}),yu=v("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Qp),ye.init(e,t)}),_u=v("$ZodULID",(e,t)=>{t.pattern??(t.pattern=em),ye.init(e,t)}),$u=v("$ZodXID",(e,t)=>{t.pattern??(t.pattern=tm),ye.init(e,t)}),bu=v("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=rm),ye.init(e,t)}),nh=v("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=wm(t)),ye.init(e,t)}),ih=v("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=$m),ye.init(e,t)}),oh=v("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=bm(t)),ye.init(e,t)}),ah=v("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=om),ye.init(e,t)}),wu=v("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=um),ye.init(e,t)}),d1=/^[0-9a-fA-F:.]+$/;function Ra(e){return d1.test(e)?rh(`http://[${e}]`):!1}var ku=v("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=lm),ye.init(e,t),e._zod.check=n=>{Ra(n.value)||n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}),xu=v("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=dm(t.delimiter)),ye.init(e,t)}),Su=v("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=fm),ye.init(e,t)});function Iu(e){let t=e.split("/");if(t.length!==2)return!1;let[n,i]=t;if(!i)return!1;let r=Number(i);return`${r}`!==i||r<0||r>128?!1:Ra(n)}var zu=v("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=pm),ye.init(e,t),e._zod.check=n=>{Iu(n.value)||n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}});function Ca(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Pu=/^[0-9a-zA-Z+/]*={0,2}$/,Tu=v("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Pu),ye.init(e,t),e._zod.check=n=>{Ca(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),Ua=/^[A-Za-z0-9_-]*$/;function Ou(e){if(!Ua.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Ca(n)}var ju=v("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ua),ye.init(e,t),e._zod.check=n=>{Ou(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Eu=v("$ZodE164",(e,t)=>{t.pattern??(t.pattern=ym),ye.init(e,t)}),f1=/[- ]/g;function p1(e){let t=e.length,n=1,i=0;for(;t;){let r=e.charCodeAt(--t)-48;n^=1,i+=n?[0,2,4,6,8,1,3,5,7,9][r]:r}return i%10===0}function Nu(e){return Xc.test(e)?p1(e.replace(f1,"")):!1}var Au=v("$ZodCreditCard",(e,t)=>{t.pattern??(t.pattern=Xc),ye.init(e,t),e._zod.check=n=>{Nu(n.value)||n.issues.push({code:"invalid_format",format:"credit_card",input:n.value,inst:e,continue:!t.abort})}});function m1(e){let t=0,n=e.length;for(let i=4;i<n;i++){let r=e.charCodeAt(i);t=(r>=65?t*100+(r-55):t*10+(r-48))%97}for(let i=0;i<4;i++){let r=e.charCodeAt(i);t=(r>=65?t*100+(r-55):t*10+(r-48))%97}return t===1}function Du(e){return Yc.test(e)?m1(e):!1}var Ru=v("$ZodIBAN",(e,t)=>{t.pattern??(t.pattern=Yc),ye.init(e,t),e._zod.check=n=>{Du(n.value)||n.issues.push({code:"invalid_format",format:"iban",input:n.value,inst:e,continue:!t.abort})}});function Cu(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let r=JSON.parse(atob(i));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}var Uu=v("$ZodJWT",(e,t)=>{ye.init(e,t),e._zod.check=n=>{Cu(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Zu=v("$ZodCustomStringFormat",(e,t)=>{ye.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Za=v("$ZodNumber",(e,t)=>{W.init(e,t),e._zod.pattern=Lr,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let o=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:String(r):void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...o?{received:o}:{}}),n}}),Mu=v("$ZodNumberFormat",(e,t)=>{Dm.init(e,t),Za.init(e,t)}),Gi=v("$ZodBoolean",(e,t)=>{W.init(e,t),e._zod.pattern=Im,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=!!n.value}catch{}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),Ma=v("$ZodBigInt",(e,t)=>{W.init(e,t),e._zod.pattern=Sm,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),Lu=v("$ZodBigIntFormat",(e,t)=>{Rm.init(e,t),Ma.init(e,t)}),Vu=v("$ZodSymbol",(e,t)=>{W.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n}}),Fu=v("$ZodUndefined",(e,t)=>{W.init(e,t),e._zod.pattern=Pm,e._zod.values=new Set([void 0]),e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}}),qu=v("$ZodNull",(e,t)=>{W.init(e,t),e._zod.pattern=zm,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}}),Bu=v("$ZodAny",(e,t)=>{W.init(e,t),e._zod.parse=n=>n}),Hu=v("$ZodUnknown",(e,t)=>{W.init(e,t),e._zod.parse=n=>n}),Ju=v("$ZodNever",(e,t)=>{W.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),Ku=v("$ZodVoid",(e,t)=>{W.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n}}),Gu=v("$ZodDate",(e,t)=>{W.init(e,t),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let r=n.value,o=r instanceof Date;return o&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...o?{received:"Invalid Date"}:{},inst:e}),n}});function sh(e,t){let n=Ci(e._zod.def.checks);if(!n.length)return;let i=Math.min(...n.map(o=>o[0])),r=e._zod.parse;e._zod.parse=(o,a)=>{let s=t(o.value);if(s>i&&!a?.skipChecks&&a?.direction!=="backward"){for(let[c,u]of Ci(e._zod.def.checks))if(s>c&&u._zod.def.when(o)){let l=o.issues.length;return u._zod.check(o),o.issues[l].continue=!1,xa(o.issues,l,e),o}}return r(o,a)}}var h1=e=>Array.isArray(e)?e.length:-1,g1=e=>e instanceof Map?e.size:-1,v1=e=>e instanceof Set?e.size:-1;function tb(e,t,n){e.issues.length&&t.issues.push(...It(n,e.issues)),t.value[n]=e.value}var Wu=v("$ZodArray",(e,t)=>{W.init(e,t);let n=Ge.memoizer;n?.attach(e),e._zod.parse=(i,r)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),i;i.value=n?n.alloc(e,i,Array(o.length),r):Array(o.length);let a=[],s=r?.abortEarly;for(let c=0;c<o.length;c++){let u=o[c],l=t.element._zod.run({value:u,issues:[]},r);if(l instanceof Promise)a.push(l.then(d=>tb(d,i,c)));else if(tb(l,i,c),s&&l.issues.length!==0&&vt(l))break}return a.length?Promise.all(a).then(()=>i):i},sh(e,h1)});function au(e,t,n,i,r,o){let a=n in i,s=o==="optional";if(!(!a&&s&&r==="optional")){if(e.issues.length){if(r!==void 0&&s&&!a)return;t.issues.push(...It(n,e.issues))}if(!a&&r===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?(a||r==="defaulted"&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var y1=[];function yb(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),i=n.length?n:y1,r=i.length?[...t,...i]:t;for(let a of r)if(!e.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(a)}": expected a Zod schema`);let o=Up(e.shape);return{...e,allKeys:r,symbolKeys:i,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(o)}}function _b(e,t,n,i,r,o,a){let s=[],c=r.keySet,u=r.catchall._zod,l=u.def.type,d=u.optin,f=u.optout,p=0;for(let m in t){if(a&&n.issues.length!==p){if(vt(n,p))break;p=n.issues.length}if(c.has(m))continue;if(m==="__proto__"){l==="never"&&s.push(m);continue}if(l==="never"){s.push(m);continue}let h=u.run({value:t[m],issues:[]},i);h instanceof Promise?e.push(h.then(g=>au(g,n,m,t,d,f))):au(h,n,m,t,d,f)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:o,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var Xu=v("$ZodObject",(e,t)=>{W.init(e,t);let n=Object.getOwnPropertyDescriptor(t,"shape"),i=n?.get?n.get.raw:t.shape??{};if(i){let u=()=>{let l={...i};return Object.defineProperty(t,"shape",{value:l}),u.raw=l,l};u.raw=i,Object.defineProperty(t,"shape",{get:u})}let r=Ai(()=>yb(t));re(e,"propValues",u=>{let l=u.def.shape,d={};for(let f in l){let p=l[f]._zod;if(p.values){Object.prototype.hasOwnProperty.call(d,f)||Ye(d,f,new Set);for(let m of p.values)d[f].add(m);p.optin!==void 0&&d[f].add(void 0)}}return d});let o=An,a=t.catchall,s,c=Ge.memoizer;c?.attach(e),e._zod.parse=(u,l)=>{s??(s=r.value);let d=u.value;if(!o(d))return u.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),u;u.value=c?c.alloc(e,u,{},l):{};let f=[],p=s.shape,m=l?.abortEarly,h=u.issues.length;for(let g of s.allKeys){if(m&&u.issues.length!==h){if(vt(u,h))break;h=u.issues.length}if(g==="__proto__")continue;let _=p[g],$=_._zod.optin,x=_._zod.optout,O=_._zod.run({value:d[g],issues:[]},l);O instanceof Promise?f.push(O.then(T=>au(T,u,g,d,$,x))):au(O,u,g,d,$,x)}return a?_b(f,d,u,l,r.value,e,m===!0):f.length?Promise.all(f).then(()=>u):u}}),ch=v("$ZodObjectJIT",(e,t)=>{Xu.init(e,t);let n=e._zod.parse,i=Ai(()=>yb(t)),r=Ge.memoizer,o=p=>{let m=i.value,h=m.symbolKeys,g=new Zn(["payload","ctx"],{shape:p,inst:e,memo:r,syms:h}),_=T=>`shape[${T}]._zod.run({ value: input[${T}], issues: [] }, ctx)`,$=(T,C)=>`
|
|
15
|
+
};`)(...Object.values(this.closed))}};var nh={major:4,minor:6,patch:7};var W=v("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=nh;let i=e._zod.def.checks,r=e._zod.traits.has("$ZodCheck")?[e,...i??[]]:i?.length?[...i]:[];for(let o of r)for(let a of o._zod.onattach)a(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let o=(s,c,u)=>{if(s.memo)return s;let l=vt(s),d;for(let p of c){if(p._zod.def.when){if(Fp(s)||!p._zod.def.when(s))continue}else if(l)continue;let f=s.issues.length,m=p._zod.check(s);if(m instanceof Promise&&u?.async===!1)throw new Tt;if(d||m instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await m,s.issues.length!==f&&(Pa(s.issues,f,e),l||(l=vt(s,f)))});else{if(s.issues.length===f)continue;Pa(s.issues,f,e),l||(l=vt(s,f))}}return d?d.then(()=>s):s},a=(s,c,u)=>{if(vt(s))return s.aborted=!0,s;let l=o(c,r,u);if(l instanceof Promise){if(u.async===!1)throw new Tt;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=>a(d,s,c)):a(l,s,c)}let u=e._zod.parse(s,c);if(u instanceof Promise){if(c.async===!1)throw new Tt;return u.then(l=>o(l,r,c))}return o(u,r,c)}}},{get"~standard"(){return Oa(this,"~standard",fu(this))},set"~standard"(e){$r(this,"~standard",e)}}),$b=(e,t)=>e.issues.length?{issues:e.issues.map(n=>Pt(n,t,Me()))}:{value:e.value};async function y1(e,t){let n={async:!0};return $b(await e._zod.run({value:t,issues:[]},n),n)}function fu(e){return{validate:t=>{let n={async:!1};try{let i=e._zod.run({value:t,issues:[]},n);if(!(i instanceof Promise))return $b(i,n)}catch{}return y1(e,t)},vendor:"zod",version:1}}var rn=v("$ZodString",(e,t)=>{W.init(e,t),e._zod.pattern=t.pattern??zm,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),_e=v("$ZodStringFormat",(e,t)=>{Gi.init(e,t),rn.init(e,t)}),pu=v("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=lm),_e.init(e,t)}),mu=v("$ZodUUID",(e,t)=>{if(t.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Zn(i))}else t.pattern??(t.pattern=Zn());_e.init(e,t)}),hu=v("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=dm),_e.init(e,t)}),oh=1,Ua=2;function ah(e){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function gu(e,t){return!("normalize"in t)&&!("hostname"in t)&&!("protocol"in t)?ah(e)||Ua:bb(e,t)}function bb(e,t){if(!t.normalize&&t.protocol?.source===Aa.source&&!/^https?:\/\//i.test(e))return oh;try{if(typeof URL<"u"){let n=URL;if(typeof n.parse=="function")return n.parse(e)??Ua}return new URL(e)}catch{return Ua}}var _1=/[\t\n\r]/g;function Za(e){return e.replace(_1,"")}function vu(e,t){return t.lastIndex=0,t.test(e.hostname)}function yu(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}var _u=v("$ZodURL",(e,t)=>{_e.init(e,t),e._zod.check=n=>{try{let i=n.value.trim(),r=gu(i,t);if(r===oh){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}if(r===Ua){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort});return}if(r===!0){n.value=Za(i);return}t.hostname&&!vu(r,t.hostname)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!yu(r,t.protocol)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?r.href:Za(i);return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),$u=v("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=fm()),_e.init(e,t)}),bu=v("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?sm:cm(t.length)),_e.init(e,t)}),wu=v("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=rm),_e.init(e,t)}),xu=v("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=nm),_e.init(e,t)}),ku=v("$ZodULID",(e,t)=>{t.pattern??(t.pattern=im),_e.init(e,t)}),Su=v("$ZodXID",(e,t)=>{t.pattern??(t.pattern=om),_e.init(e,t)}),Iu=v("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=am),_e.init(e,t)}),sh=v("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Im(t)),_e.init(e,t)}),ch=v("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=km),_e.init(e,t)}),uh=v("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Sm(t)),_e.init(e,t)}),lh=v("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=um),_e.init(e,t)}),zu=v("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=pm),_e.init(e,t)}),$1=/^[0-9a-fA-F:.]+$/;function Ma(e){return $1.test(e)?ah(`http://[${e}]`):!1}var Pu=v("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=mm),_e.init(e,t),e._zod.check=n=>{Ma(n.value)||n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}),Tu=v("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=hm(t.delimiter)),_e.init(e,t)}),Eu=v("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=gm),_e.init(e,t)});function Ou(e){let t=e.split("/");if(t.length!==2)return!1;let[n,i]=t;if(!i)return!1;let r=Number(i);return`${r}`!==i||r<0||r>128?!1:Ma(n)}var ju=v("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=vm),_e.init(e,t),e._zod.check=n=>{Ou(n.value)||n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}});function La(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Nu=/^[0-9a-zA-Z+/]*={0,2}$/,Au=v("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Nu),_e.init(e,t),e._zod.check=n=>{La(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),Va=/^[A-Za-z0-9_-]*$/;function Du(e){if(!Va.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return La(n)}var Ru=v("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Va),_e.init(e,t),e._zod.check=n=>{Du(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Cu=v("$ZodE164",(e,t)=>{t.pattern??(t.pattern=wm),_e.init(e,t)}),b1=/[- ]/g;function w1(e){let t=e.length,n=1,i=0;for(;t;){let r=e.charCodeAt(--t)-48;n^=1,i+=n?[0,2,4,6,8,1,3,5,7,9][r]:r}return i%10===0}function Uu(e){return ru.test(e)?w1(e.replace(b1,"")):!1}var Zu=v("$ZodCreditCard",(e,t)=>{t.pattern??(t.pattern=ru),_e.init(e,t),e._zod.check=n=>{Uu(n.value)||n.issues.push({code:"invalid_format",format:"credit_card",input:n.value,inst:e,continue:!t.abort})}});function x1(e){let t=0,n=e.length;for(let i=4;i<n;i++){let r=e.charCodeAt(i);t=(r>=65?t*100+(r-55):t*10+(r-48))%97}for(let i=0;i<4;i++){let r=e.charCodeAt(i);t=(r>=65?t*100+(r-55):t*10+(r-48))%97}return t===1}function Mu(e){return nu.test(e)?x1(e):!1}var Lu=v("$ZodIBAN",(e,t)=>{t.pattern??(t.pattern=nu),_e.init(e,t),e._zod.check=n=>{Mu(n.value)||n.issues.push({code:"invalid_format",format:"iban",input:n.value,inst:e,continue:!t.abort})}});function Vu(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let r=JSON.parse(atob(i));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}var Fu=v("$ZodJWT",(e,t)=>{_e.init(e,t),e._zod.check=n=>{Vu(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),qu=v("$ZodCustomStringFormat",(e,t)=>{_e.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Fa=v("$ZodNumber",(e,t)=>{W.init(e,t),e._zod.pattern=Vr,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let o=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:String(r):void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...o?{received:o}:{}}),n}}),Bu=v("$ZodNumberFormat",(e,t)=>{Zm.init(e,t),Fa.init(e,t)}),Xi=v("$ZodBoolean",(e,t)=>{W.init(e,t),e._zod.pattern=Em,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=!!n.value}catch{}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),qa=v("$ZodBigInt",(e,t)=>{W.init(e,t),e._zod.pattern=Tm,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),Hu=v("$ZodBigIntFormat",(e,t)=>{Mm.init(e,t),qa.init(e,t)}),Ju=v("$ZodSymbol",(e,t)=>{W.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n}}),Ku=v("$ZodUndefined",(e,t)=>{W.init(e,t),e._zod.pattern=jm,e._zod.values=new Set([void 0]),e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}}),Gu=v("$ZodNull",(e,t)=>{W.init(e,t),e._zod.pattern=Om,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}}),Wu=v("$ZodAny",(e,t)=>{W.init(e,t),e._zod.parse=n=>n}),Xu=v("$ZodUnknown",(e,t)=>{W.init(e,t),e._zod.parse=n=>n}),Yu=v("$ZodNever",(e,t)=>{W.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),Qu=v("$ZodVoid",(e,t)=>{W.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n}}),el=v("$ZodDate",(e,t)=>{W.init(e,t),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let r=n.value,o=r instanceof Date;return o&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...o?{received:"Invalid Date"}:{},inst:e}),n}});function dh(e,t){let n=Zi(e._zod.def.checks);if(!n.length)return;let i=Math.min(...n.map(o=>o[0])),r=e._zod.parse;e._zod.parse=(o,a)=>{let s=t(o.value);if(s>i&&!a?.skipChecks&&a?.direction!=="backward"){for(let[c,u]of Zi(e._zod.def.checks))if(s>c&&u._zod.def.when(o)){let l=o.issues.length;return u._zod.check(o),o.issues[l].continue=!1,Pa(o.issues,l,e),o}}return r(o,a)}}var k1=e=>Array.isArray(e)?e.length:-1,S1=e=>e instanceof Map?e.size:-1,I1=e=>e instanceof Set?e.size:-1;function ob(e,t,n){e.issues.length&&t.issues.push(...zt(n,e.issues)),t.value[n]=e.value}var tl=v("$ZodArray",(e,t)=>{W.init(e,t);let n=Ge.memoizer;n?.attach(e),e._zod.parse=(i,r)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),i;i.value=n?n.alloc(e,i,Array(o.length),r):Array(o.length);let a=[],s=r?.abortEarly;for(let c=0;c<o.length;c++){let u=o[c],l=t.element._zod.run({value:u,issues:[]},r);if(l instanceof Promise)a.push(l.then(d=>ob(d,i,c)));else if(ob(l,i,c),s&&l.issues.length!==0&&vt(l))break}return a.length?Promise.all(a).then(()=>i):i},dh(e,k1)});function du(e,t,n,i,r,o){let a=n in i,s=o==="optional";if(!(!a&&s&&r==="optional")){if(e.issues.length){if(r!==void 0&&s&&!a)return;t.issues.push(...zt(n,e.issues))}if(!a&&r===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?(a||r==="defaulted"&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var z1=[];function wb(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),i=n.length?n:z1,r=i.length?[...t,...i]:t;for(let a of r)if(!e.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(a)}": expected a Zod schema`);let o=Vp(e.shape);return{...e,allKeys:r,symbolKeys:i,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(o)}}function xb(e,t,n,i,r,o,a){let s=[],c=r.keySet,u=r.catchall._zod,l=u.def.type,d=u.optin,p=u.optout,f=0;for(let m in t){if(a&&n.issues.length!==f){if(vt(n,f))break;f=n.issues.length}if(c.has(m))continue;if(m==="__proto__"){l==="never"&&s.push(m);continue}if(l==="never"){s.push(m);continue}let h=u.run({value:t[m],issues:[]},i);h instanceof Promise?e.push(h.then(g=>du(g,n,m,t,d,p))):du(h,n,m,t,d,p)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:o,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var rl=v("$ZodObject",(e,t)=>{W.init(e,t);let n=Object.getOwnPropertyDescriptor(t,"shape"),i=n?.get?n.get.raw:t.shape??{};if(i){let u=()=>{let l={...i};return Object.defineProperty(t,"shape",{value:l}),u.raw=l,l};u.raw=i,Object.defineProperty(t,"shape",{get:u})}let r=Ri(()=>wb(t));re(e,"propValues",u=>{let l=u.def.shape,d={};for(let p in l){let f=l[p]._zod;if(f.values){Object.prototype.hasOwnProperty.call(d,p)||Ye(d,p,new Set);for(let m of f.values)d[p].add(m);f.optin!==void 0&&d[p].add(void 0)}}return d});let o=Dn,a=t.catchall,s,c=Ge.memoizer;c?.attach(e),e._zod.parse=(u,l)=>{s??(s=r.value);let d=u.value;if(!o(d))return u.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),u;u.value=c?c.alloc(e,u,{},l):{};let p=[],f=s.shape,m=l?.abortEarly,h=u.issues.length;for(let g of s.allKeys){if(m&&u.issues.length!==h){if(vt(u,h))break;h=u.issues.length}if(g==="__proto__")continue;let _=f[g],$=_._zod.optin,k=_._zod.optout,E=_._zod.run({value:d[g],issues:[]},l);E instanceof Promise?p.push(E.then(T=>du(T,u,g,d,$,k))):du(E,u,g,d,$,k)}return a?xb(p,d,u,l,r.value,e,m===!0):p.length?Promise.all(p).then(()=>u):u}}),fh=v("$ZodObjectJIT",(e,t)=>{rl.init(e,t);let n=e._zod.parse,i=Ri(()=>wb(t)),r=Ge.memoizer,o=f=>{let m=i.value,h=m.symbolKeys,g=new Mn(["payload","ctx"],{shape:f,inst:e,memo:r,syms:h}),_=T=>`shape[${T}]._zod.run({ value: input[${T}], issues: [] }, ctx)`,$=(T,M)=>`
|
|
16
16
|
let ${T}_ab = false;
|
|
17
17
|
for (let i = 0; i < ${T}.issues.length; i++) {
|
|
18
18
|
const iss = ${T}.issues[i];
|
|
19
|
-
iss.path = iss.path ? [${
|
|
19
|
+
iss.path = iss.path ? [${M}, ...iss.path] : [${M}];
|
|
20
20
|
payload.issues.push(iss);
|
|
21
21
|
if (iss.continue !== true) ${T}_ab = true;
|
|
22
22
|
}
|
|
23
23
|
if (${T}_ab && ctx && ctx.abortEarly) {
|
|
24
24
|
payload.value = newResult;
|
|
25
25
|
return payload;
|
|
26
|
-
}`;g.write("const input = payload.value;");let
|
|
27
|
-
const ${
|
|
28
|
-
if (!${
|
|
29
|
-
if (${
|
|
26
|
+
}`;g.write("const input = payload.value;");let k=Object.create(null),E=0;for(let T of m.allKeys)k[T]=`key_${E++}`;g.write(r?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(let T of m.allKeys){if(T==="__proto__")continue;let M=k[T],G=typeof T=="symbol"?`syms[${h.indexOf(T)}]`:gt(T),Q=`${G} in input`,X=f[T],Oe=X?._zod?.optin,Ne=Oe!==void 0,Ve=X?._zod?.optout==="optional";if(g.write(`const ${M} = ${_(G)};`),Ne&&Ve){let Ct=Oe==="optional"?`${M}_present`:`${M}.value !== undefined || ${M}_present`;g.write(`
|
|
27
|
+
const ${M}_present = ${Q};
|
|
28
|
+
if (!${M}.issues.length || ${M}_present) {
|
|
29
|
+
if (${M}.issues.length) {${$(M,G)}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
if (${
|
|
33
|
-
newResult[${G}] = ${
|
|
32
|
+
if (${Ct}) {
|
|
33
|
+
newResult[${G}] = ${M}.value;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
`)}else
|
|
38
|
-
if (${
|
|
37
|
+
`)}else Ne?(g.write(`
|
|
38
|
+
if (${M}.issues.length) {${$(M,G)}
|
|
39
39
|
}
|
|
40
|
-
`),
|
|
41
|
-
if (${
|
|
42
|
-
newResult[${G}] = ${
|
|
40
|
+
`),Oe==="defaulted"?g.write(`newResult[${G}] = ${M}.value;`):g.write(`
|
|
41
|
+
if (${M}.value !== undefined || ${Q}) {
|
|
42
|
+
newResult[${G}] = ${M}.value;
|
|
43
43
|
}
|
|
44
44
|
`)):g.write(`
|
|
45
|
-
const ${
|
|
46
|
-
if (${
|
|
45
|
+
const ${M}_present = ${Q};
|
|
46
|
+
if (${M}.issues.length) {${$(M,G)}
|
|
47
47
|
}
|
|
48
|
-
if (!${
|
|
48
|
+
if (!${M}_present && !${M}.issues.length) {
|
|
49
49
|
payload.issues.push({
|
|
50
50
|
code: "invalid_type",
|
|
51
51
|
expected: "nonoptional",
|
|
@@ -58,26 +58,26 @@ ${n.join(`
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
if (${
|
|
62
|
-
newResult[${G}] = ${
|
|
61
|
+
if (${M}_present) {
|
|
62
|
+
newResult[${G}] = ${M}.value;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
`)}return g.write("payload.value = newResult;"),g.write("return payload;"),g.compile()},a,s=An,c=!Ge.jitless,l=c&&Rp.value,d=t.catchall,f;e._zod.parse=(p,m)=>{f??(f=i.value);let h=p.value;return s(h)?c&&l&&m?.async===!1&&m.jitless!==!0?(a||(a=o(t.shape)),p=a(p,m),d?_b([],h,p,m,f,e,m?.abortEarly===!0):p):n(p,m):(p.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),p)}});function rb(e,t,n,i){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let r=e.filter(o=>!vt(o));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(a=>zt(a,i,Me())))}),t)}var Wi=v("$ZodUnion",(e,t)=>{W.init(e,t),re(e,"optin",i=>i.def.options.some(r=>r._zod.optin==="defaulted")?"defaulted":i.def.options.some(r=>r._zod.optin!==void 0)?"optional":void 0),re(e,"optout",i=>i.def.options.some(r=>r._zod.optout==="optional")?"optional":void 0),re(e,"values",i=>{if(i.def.options.every(r=>r._zod.values))return new Set(i.def.options.flatMap(r=>Array.from(r._zod.values)))}),re(e,"pattern",i=>{if(i.def.options.every(r=>r._zod.pattern)){let r=i.def.options.map(o=>o._zod.pattern);return new RegExp(`^(${r.map(o=>Mr(o.source)).join("|")})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1,a=[];for(let s of t.options){let c=s._zod.run({value:i.value,issues:[]},r);if(c instanceof Promise)a.push(c),o=!0;else{if(c.issues.length===0)return c;a.push(c)}}return o?Promise.all(a).then(s=>rb(s,i,e,r)):rb(a,i,e,r)}});function nb(e,t,n,i){let r=[];for(let o=0;o<e.length;o++)e[o].issues.length===0&&r.push(o);return r.length===1?(t.value=e[r[0]].value,t):(r.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(a=>zt(a,i,Me())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1,matches:r}),t)}var Yu=v("$ZodXor",(e,t)=>{Wi.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1,a=[];for(let s of t.options){let c=s._zod.run({value:i.value,issues:[]},r);c instanceof Promise?(a.push(c),o=!0):a.push(c)}return o?Promise.all(a).then(s=>nb(s,i,e,r)):nb(a,i,e,r)}});function uh(e,t){let n=e._zod,i=n.bag.optionsMap;i||(i=$b(n.def),n.bag.optionsMap=i);let r=i.get(t);if(r===null)throw new Error(`Ambiguous discriminator value "${String(t)}"`);return r}function $b(e){let t=new Map;for(let n of e.options){let i=n._zod.propValues?.[e.discriminator];if(!i||i.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let r of i)if(t.has(r)){if(r!==void 0)throw new Error(`Duplicate discriminator value "${String(r)}"`);t.set(r,null)}else t.set(r,n)}return t}var Qu=v("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Wi.init(e,t);let n=e._zod.parse;re(e,"propValues",r=>{let o={},a=0;for(let s of r.def.options){let c=s._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${r.def.options.indexOf(s)}"`);c[r.def.discriminator]?.has(void 0)&&a++;for(let[u,l]of Object.entries(c)){Object.prototype.hasOwnProperty.call(o,u)||Ye(o,u,new Set);for(let d of l)o[u].add(d)}}return!r.def.unionFallback&&a>1&&o[r.def.discriminator]?.delete(void 0),o}),t.options.forEach((r,o)=>{let a=Di(r._zod.def);if(a&&!Object.prototype.hasOwnProperty.call(a,t.discriminator))throw new Error(`Invalid discriminated union option at index "${o}"`)});let i=Ai(()=>$b(t));e._zod.parse=(r,o)=>{let a=r.value;if(!An(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;let s=a?.[t.discriminator],c=i.value.get(s);return c&&(s!==void 0||o.direction!=="backward")?c._zod.run(r,o):t.unionFallback||o.direction==="backward"?n(r,o):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()).filter(u=>i.value.get(u)!==null),input:a,path:[t.discriminator],inst:e}),r)}}),el=v("$ZodIntersection",(e,t)=>{W.init(e,t),e._zod.parse=(n,i)=>{let r=n.value,o=t.left._zod.run({value:r,issues:[]},i),a=t.right._zod.run({value:r,issues:[]},i);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([c,u])=>ib(n,c,u)):ib(n,o,a)}});function Ki(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(Gt(e)&&Gt(t)){let n=Object.keys(t),i=Object.keys(e).filter(o=>n.indexOf(o)!==-1),r={...e,...t};Object.prototype.hasOwnProperty.call(r,"__proto__")&&delete r.__proto__;for(let o of i){if(o==="__proto__")continue;let a=Ki(e[o],t[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};r[o]=a.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<e.length;i++){let r=e[i],o=t[i],a=Ki(r,o);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function ib(e,t,n){let i=new Map,r,o=new Map,a=(u,l)=>{let d;if(u.code==="unrecognized_keys"&&!u.path?.length)r??(r=u),d=u.keys;else if(u.code==="invalid_key"&&u.origin==="record"&&u.path?.length===1){let f=String(u.path[0]);o.has(f)||o.set(f,u),d=[f]}else return!1;for(let f of d)i.has(f)||i.set(f,{}),i.get(f)[l]=!0;return!0};for(let u of t.issues)a(u,"l")||e.issues.push(u);for(let u of n.issues)a(u,"r")||e.issues.push(u);let s=[...i].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(s.length){let u=r?s.filter(l=>r.keys.includes(l)):[];u.length&&e.issues.push({...r,keys:u});for(let l of s)!u.includes(l)&&o.has(l)&&e.issues.push(o.get(l))}let c=Ki(t.value,n.value);if(!c.valid){if(vt(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var La=v("$ZodTuple",(e,t)=>{W.init(e,t);let n=t.items,i=Ge.memoizer;i?.attach(e),e._zod.parse=(r,o)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=i?i.alloc(e,r,[],o):[];let s=[],c=ob(n,"optin"),u=ob(n,"optout");if(!t.rest){if(a.length<c)return r.issues.push({code:"too_small",minimum:c,inclusive:!0,input:a,inst:e,origin:"array"}),r;a.length>n.length&&r.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:a,inst:e,origin:"array"})}let l=new Array(n.length),d=t.rest?o?.abortEarly:void 0,f=!1;for(let p=0;p<n.length;p++){let m=n[p]._zod.run({value:a[p],issues:[]},o);m instanceof Promise?s.push(m.then(h=>{l[p]=h})):(l[p]=m,d&&!f&&m.issues.length&&(f=vt(m)))}if(t.rest&&!f){let p=n.length-1,m=a.slice(n.length),h=r.issues.length;for(let g of m){if(d&&r.issues.length!==h){if(vt(r,h))break;h=r.issues.length}p++;let _=t.rest._zod.run({value:g,issues:[]},o);_ instanceof Promise?s.push(_.then($=>ab($,r,p))):ab(_,r,p)}}return s.length?Promise.all(s).then(()=>sb(l,r,n,a,u)):sb(l,r,n,a,u)}});function ob(e,t){for(let n=e.length-1;n>=0;n--)if(!(t==="optin"?e[n]._zod.optin!==void 0:e[n]._zod.optout==="optional"))return n+1;return 0}function ab(e,t,n){e.issues.length&&t.issues.push(...It(n,e.issues)),t.value[n]=e.value}function sb(e,t,n,i,r){for(let o=0;o<n.length;o++){let a=e[o],s=o<i.length;if(!s&&o>=r&&n[o]._zod.optin==="optional"){t.value.length=o;break}if(a.issues.length){if(!s&&o>=r){t.value.length=o;break}t.issues.push(...It(o,a.issues))}t.value[o]=a.value}for(let o=t.value.length-1;o>=i.length&&(n[o]._zod.optout==="optional"&&t.value[o]===void 0);o--)t.value.length=o;return t}var tl=v("$ZodRecord",(e,t)=>{W.init(e,t);let n=Ge.memoizer;n?.attach(e),e._zod.parse=(i,r)=>{let o=i.value;if(!Gt(o))return i.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),i;let a=[],s=t.keyType._zod.values;if(s&&!t.partial){i.value=n?n.alloc(e,i,{},r):{};let c=new Set;for(let l of s)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){if(c.add(typeof l=="number"?l.toString():l),l==="__proto__")continue;let d=t.keyType._zod.run({value:l,issues:[]},r);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){i.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(m=>zt(m,r,Me())),input:l,path:[l],inst:e});continue}let f=d.value;if(f==="__proto__")continue;let p=t.valueType._zod.run({value:o[l],issues:[]},r);p instanceof Promise?a.push(p.then(m=>{m.issues.length&&i.issues.push(...It(l,m.issues)),i.value[f]=m.value})):(p.issues.length&&i.issues.push(...It(l,p.issues)),i.value[f]=p.value)}let u;for(let l in o)if(!c.has(l))if(t.mode==="loose"){if(l==="__proto__")continue;i.value[l]=o[l]}else u=u??[],u.push(l);u&&u.length>0&&i.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:u,continue:!0})}else{i.value=n?n.alloc(e,i,{},r):{};let c;for(let u of Reflect.ownKeys(o)){if(u==="__proto__"||!Object.prototype.propertyIsEnumerable.call(o,u))continue;let l=t.keyType._zod.run({value:u,issues:[]},r);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&Lr.test(u)&&l.issues.length){let m=t.keyType._zod.run({value:Number(u),issues:[]},r);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");m.issues.length===0&&(l=m)}if(l.issues.length){t.mode==="loose"?i.value[u]=o[u]:s?(c=c??[],c.push(u)):i.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(m=>zt(m,r,Me())),input:u,path:[u],inst:e});continue}let f=l.value;if(f==="__proto__")continue;let p=t.valueType._zod.run({value:o[u],issues:[]},r);p instanceof Promise?a.push(p.then(m=>{m.issues.length&&i.issues.push(...It(u,m.issues)),i.value[f]=m.value})):(p.issues.length&&i.issues.push(...It(u,p.issues)),i.value[f]=p.value)}c&&c.length>0&&i.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:c,continue:!0})}return a.length?Promise.all(a).then(()=>i):i}}),rl=v("$ZodMap",(e,t)=>{W.init(e,t);let n=Ge.memoizer;n?.attach(e),e._zod.parse=(i,r)=>{let o=i.value;if(!(o instanceof Map))return i.issues.push({expected:"map",code:"invalid_type",input:o,inst:e}),i;let a=[];i.value=n?n.alloc(e,i,new Map,r):new Map;let s=r?.abortEarly,c=i.issues.length;for(let[u,l]of o){if(s&&i.issues.length!==c){if(vt(i,c))break;c=i.issues.length}let d=t.keyType._zod.run({value:u,issues:[]},r),f=t.valueType._zod.run({value:l,issues:[]},r);d instanceof Promise||f instanceof Promise?a.push(Promise.all([d,f]).then(([p,m])=>{cb(p,m,i,u,o,e,r)})):cb(d,f,i,u,o,e,r)}return a.length?Promise.all(a).then(()=>i):i},sh(e,g1)});function cb(e,t,n,i,r,o,a){e.issues.length&&(ba.has(typeof i)?n.issues.push(...It(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:o,issues:e.issues.map(s=>zt(s,a,Me()))})),t.issues.length&&(ba.has(typeof i)?n.issues.push(...It(i,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:o,key:i,issues:t.issues.map(s=>zt(s,a,Me()))})),n.value.set(e.value,t.value)}var nl=v("$ZodSet",(e,t)=>{W.init(e,t);let n=Ge.memoizer;n?.attach(e),e._zod.parse=(i,r)=>{let o=i.value;if(!(o instanceof Set))return i.issues.push({input:o,inst:e,expected:"set",code:"invalid_type"}),i;let a=[];i.value=n?n.alloc(e,i,new Set,r):new Set;let s=r?.abortEarly,c=i.issues.length;for(let u of o){if(s&&i.issues.length!==c){if(vt(i,c))break;c=i.issues.length}let l=t.valueType._zod.run({value:u,issues:[]},r);l instanceof Promise?a.push(l.then(d=>ub(d,i))):ub(l,i)}return a.length?Promise.all(a).then(()=>i):i},sh(e,v1)});function ub(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var il=v("$ZodEnum",(e,t)=>{W.init(e,t);let n=Ei(t.entries),i=new Set(n);e._zod.values=i,re(e,"pattern",r=>{let o=Ei(r.def.entries).filter(a=>ba.has(typeof a));return new RegExp(o.length?`^(${o.map(a=>Wt(a.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(r,o)=>{let a=r.value;return i.has(a)||r.issues.push({code:"invalid_value",values:n,input:a,inst:e}),r}}),ol=v("$ZodLiteral",(e,t)=>{W.init(e,t);let n=new Set(t.values);e._zod.values=n,re(e,"pattern",i=>{let r=i.def.values;return new RegExp(r.length?`^(${r.map(o=>typeof o=="string"?Wt(o):o?Wt(o.toString()):String(o)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(i,r)=>{let o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),al=v("$ZodFile",(e,t)=>{W.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n}}),sl=v("$ZodTransform",(e,t)=>{W.init(e,t),e._zod.optin="optional",Ge.memoizer?.guard(e),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new en(e.constructor.name);let r=t.transform(n.value,n);if(i.async)return(r instanceof Promise?r:Promise.resolve(r)).then(a=>(n.value=a,n));if(r instanceof Promise)throw new Pt;return n.value=r,n}});function lb(e,t){return e.value=t.issues.length?void 0:t.value,e}var Va=v("$ZodOptional",(e,t)=>{W.init(e,t),re(e,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",re(e,"values",n=>{let i=n.def.innerType._zod.values;return i?new Set([...i,void 0]):void 0}),re(e,"pattern",n=>{let i=n.def.innerType._zod.pattern;return i?new RegExp(`^(${Mr(i.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(n.value===void 0){if(t.innerType._zod.optin!=="defaulted")return n;let r=t.innerType._zod.run({value:n.value,issues:[]},i);return r instanceof Promise?r.then(o=>lb(n,o)):lb(n,r)}return t.innerType._zod.run(n,i)}}),cl=v("$ZodExactOptional",(e,t)=>{Va.init(e,t),re(e,"values",n=>n.def.innerType._zod.values),re(e,"pattern",n=>n.def.innerType._zod.pattern),e._zod.parse=(n,i)=>t.innerType._zod.run(n,i)}),ul=v("$ZodNullable",(e,t)=>{W.init(e,t),re(e,"optin",n=>n.def.innerType._zod.optin),re(e,"optout",n=>n.def.innerType._zod.optout),re(e,"pattern",n=>{let i=n.def.innerType._zod.pattern;return i?new RegExp(`^(${Mr(i.source)}|null)$`):void 0}),re(e,"values",n=>n.def.innerType._zod.values?new Set([...n.def.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)}),ll=v("$ZodDefault",(e,t)=>{W.init(e,t),e._zod.optin="defaulted",re(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>db(o,t)):db(r,t)}});function db(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var dl=v("$ZodPrefault",(e,t)=>{W.init(e,t),e._zod.optin="defaulted",re(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))}),fl=v("$ZodNonOptional",(e,t)=>{W.init(e,t),re(e,"values",n=>{let i=n.def.innerType._zod.values;return i?new Set([...i].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,i)=>{let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>fb(o,e)):fb(r,e)}});function fb(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 pl=v("$ZodSuccess",(e,t)=>{W.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new en("ZodSuccess");let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.issues.length===0,n)):(n.value=r.issues.length===0,n)}});function pb(e,t,n,i){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(r=>zt(r,i,Me()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var ml=v("$ZodCatch",(e,t)=>{W.init(e,t),re(e,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),re(e,"optout",n=>n.def.innerType._zod.optout),re(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run({value:n.value,issues:[]},i);return r instanceof Promise?r.then(o=>pb(n,o,t,i)):pb(n,r,t,i)}}),hl=v("$ZodNaN",(e,t)=>{W.init(e,t),e._zod.parse=(n,i)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),Fa=v("$ZodPipe",(e,t)=>{W.init(e,t),re(e,"values",n=>n.def.in._zod.values),re(e,"optin",n=>n.def.in._zod.optin),re(e,"optout",n=>n.def.out._zod.optout),re(e,"propValues",n=>n.def.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){let o=t.out._zod.run(n,i);return o instanceof Promise?o.then(a=>nu(a,t.in,i)):nu(o,t.in,i)}let r=t.in._zod.run(n,i);return r instanceof Promise?r.then(o=>nu(o,t.out,i)):nu(r,t.out,i)}});function nu(e,t,n){return e.issues.some(i=>i.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Xi=v("$ZodCodec",(e,t)=>{W.init(e,t),re(e,"values",n=>n.def.in._zod.values),re(e,"optin",n=>n.def.in._zod.optin),re(e,"optout",n=>n.def.out._zod.optout),re(e,"propValues",n=>n.def.in._zod.propValues),e._zod.parse=(n,i)=>{if((i.direction||"forward")==="forward"){let o=t.in._zod.run(n,i);return o instanceof Promise?o.then(a=>iu(a,t,i)):iu(o,t,i)}else{let o=t.out._zod.run(n,i);return o instanceof Promise?o.then(a=>iu(a,t,i)):iu(o,t,i)}}});function iu(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let r=t.transform(e.value,e);return r instanceof Promise?r.then(o=>ou(e,o,t.out,n)):ou(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(o=>ou(e,o,t.in,n)):ou(e,r,t.in,n)}}function ou(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}var lh=v("$ZodPreprocess",(e,t)=>{Fa.init(e,t)}),gl=v("$ZodReadonly",(e,t)=>{W.init(e,t),re(e,"propValues",n=>n.def.innerType._zod.propValues),re(e,"values",n=>n.def.innerType._zod.values),re(e,"optin",n=>n.def.innerType?._zod?.optin),re(e,"optout",n=>n.def.innerType?._zod?.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(mb):mb(r)}});function mb(e){return e.memo||(e.value=Object.freeze(e.value)),e}function _1(e){let t=e._zod.def,n=t.pattern,i=!!t.format?.includes("int"),r,o;for(let s of t.checks??[]){let c=s._zod.def;c.pattern&&(n=c.pattern),i||(i=!!c.format?.includes("int"));let u=c.minimum??c.length,l=c.maximum??c.length;u!==void 0&&(r===void 0||u>r)&&(r=u),l!==void 0&&(o===void 0||l<o)&&(o=l)}if(n)return n.source;if(r!==void 0&&o!==void 0&&r>o)return"(?!)";if(r!==void 0||o!==void 0)return xm({minimum:r,maximum:o}).source;let a=e._zod.pattern;return(i&&a===Lr?ja:a)?.source}function eh(e){let t=e._zod.def,n=e._zod.pattern?.source,i=t.innerType??e._zod.innerType;if(i){let r=i._zod.pattern?.source,o=eh(i);return n&&r&&o&&o!==r?n.replace(Mr(r),()=>Mr(o)):n}if(t.options){let r=t.options.map(eh);if(r.every(Boolean))return`^(${r.map(o=>Mr(o)).join("|")})$`}return _1(e)}var vl=v("$ZodTemplateLiteral",(e,t)=>{W.init(e,t);let n=[];for(let i of t.parts)if(typeof i=="object"&&i!==null){let r=eh(i);if(!r)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);n.push(Mr(r))}else if(i===null||Cp.has(typeof i))n.push(Wt(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(i,r)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),yl=v("$ZodFunction",(e,t)=>(W.init(e,t),Object.defineProperty(e,"_def",{value:t}),e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return Object.defineProperty(function(...i){let r=e._def.input?Rn(e._def.input,i):i,o=Reflect.apply(n,this,r);return e._def.output?Rn(e._def.output,o):o},"_zod",{value:e._zod,enumerable:!1})},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return Object.defineProperty(async function(...i){let r=e._def.input?await Cn(e._def.input,i):i,o=await Reflect.apply(n,this,r);return e._def.output?await Cn(e._def.output,o):o},"_zod",{value:e._zod,enumerable:!1})},e._zod.parse=(n,i)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let i=e.constructor;return Array.isArray(n[0])?new i({type:"function",input:new La({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new i({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:n})},e)),_l=v("$ZodPromise",(e,t)=>{W.init(e,t),e._zod.parse=(n,i)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},i))}),Yi=v("$ZodLazy",(e,t)=>{W.init(e,t),Ap(e._zod,"innerType",()=>{let n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),re(e,"pattern",n=>n.innerType?._zod?.pattern),re(e,"propValues",n=>n.innerType?._zod?.propValues),re(e,"optin",n=>n.innerType?._zod?.optin??void 0),re(e,"optout",n=>n.innerType?._zod?.optout??void 0),e._zod.parse=(n,i)=>e._zod.innerType._zod.run(n,i)}),$l=v("$ZodCustom",(e,t)=>{we.init(e,t),W.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{let i=n.value,r=t.fn(i);if(r instanceof Promise)return r.then(o=>hb(o,n,i,e));hb(r,n,i,e)}});function hb(e,t,n,i){if(!e){let r={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(r.params=i._zod.def.params),t.issues.push(Ui(r))}}var xl=class extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}},fh="~memo",wb=[];function kb(e){return e!==null&&typeof e=="object"}function dh(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}var xb=new WeakMap,Qi=0,kl=1,qa=2;function Ba(e,t,n){let i=xb.get(e);if(i!==void 0)return i?qa:Qi;if(t.has(e))return qa;t.add(e);let r=Qi,o=l=>{if(r!==qa&&l?._zod){let d=Ba(l,t,n);d>r&&(r=d)}},a=(l,d)=>{let f=Qi;for(let p of Reflect.ownKeys(l)){let m=Object.getOwnPropertyDescriptor(l,p);if(d&&!m.enumerable)continue;let h=m.get?kl:m.value?._zod?Ba(m.value,t,n):Qi;h>f&&(f=h)}return f},s=l=>{l>r&&(r=l)},c=e._zod.def,u=c.type;switch(u){case"object":{let l=Di(c);s(l?a(l,!0):kl),o(c.catchall);break}case"array":o(c.element);break;case"tuple":for(let l of c.items)o(l);o(c.rest);break;case"record":case"map":o(c.keyType),o(c.valueType);break;case"set":o(c.valueType);break;case"union":for(let l of c.options)o(l);break;case"intersection":o(c.left),o(c.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":o(c.innerType);break;case"pipe":o(c.in),o(c.out);break;case"function":o(c.input),o(c.output);break;case"lazy":{let l=c._cachedInner??(n?e._zod.innerType:void 0);s(l?Ba(l,t,!1):kl);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let l in c){let d=Object.getOwnPropertyDescriptor(c,l);if(!d||d.get)continue;let f=d.value;if(!(!f||typeof f!="object")){if(f._zod)o(f);else if(Array.isArray(f))for(let p of f)o(p)}}}return t.delete(e),$1(e,r)}function $1(e,t){return t!==kl&&xb.set(e,t===qa),t}function Sl(e){return Ba(e,new Set,!0)!==Qi}function b1(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var bl,wl=[],w1={alloc(e,t,n){let i=bl;if(!i)return n;bl=void 0;let r={value:n,issues:null};return i.set(t.value,r),wl.push(r),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let n=e._zod.parse,i=(r,o)=>{if(o.direction!=="backward"&&Il(o,r.value))throw new xl;return n(r,o)};e._zod.parse=i,e._zod.run===n&&(e._zod.run=i)})},attach(e){var t;let n,i=!1,r,o;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let a=e._zod.parse,s=(c,u)=>{if(n===void 0){let _=Ba(e,new Set,!1);if(_===Qi)return e._zod.parse=a,e._zod.run===s&&(e._zod.run=a),a(c,u);_===qa||i?n=!0:i=!0}let l=c.value;if(!kb(l))return a(c,u);let d=u[fh];d||(d={buckets:new WeakMap,backEdges:void 0},u[fh]=d);let f;r===u?f=o:(f=b1(d,e),r=u,o=f);let p=f.get(l);if(p)return c.value=p.value,p.issues?p.issues.length&&c.issues.push(...dh(p.issues)):(c.memo=!0,d.backEdges??(d.backEdges=new WeakSet),d.backEdges.add(p.value)),c;bl=f;let m=wl.length,h=a(c,u);bl=void 0;let g=wl.length>m?wl.pop():void 0;return h instanceof Promise?h.then(_=>(g&&(g.issues=_.issues.length?dh(_.issues):wb),_)):(g&&(g.issues=h.issues.length?dh(h.issues):wb),h)};e._zod.parse=s,e._zod.run===a&&(e._zod.run=s)})}};function Ha(){return w1}function Il(e,t){let n=e[fh]?.backEdges;return n!==void 0&&kb(t)&&n.has(t)}var to={};Ar(to,{ar:()=>Sb,az:()=>Ib,be:()=>Pb,bg:()=>Tb,bn:()=>Ob,ca:()=>jb,ckb:()=>Eb,cs:()=>Nb,da:()=>Ab,de:()=>Db,el:()=>Rb,en:()=>zl,eo:()=>Cb,es:()=>Ub,fa:()=>Zb,fi:()=>Mb,fr:()=>Lb,frCA:()=>Vb,gu:()=>Fb,he:()=>qb,hi:()=>Bb,hr:()=>Hb,hu:()=>Jb,hy:()=>Gb,id:()=>Wb,is:()=>Xb,it:()=>Yb,ja:()=>Qb,ka:()=>ew,kh:()=>tw,km:()=>Pl,kn:()=>rw,ko:()=>nw,lt:()=>ow,mk:()=>aw,ms:()=>sw,ne:()=>cw,nl:()=>uw,nn:()=>lw,no:()=>dw,ota:()=>fw,pl:()=>mw,ps:()=>pw,pt:()=>hw,ptBR:()=>gw,ro:()=>vw,ru:()=>_w,sk:()=>$w,sl:()=>bw,sv:()=>ww,ta:()=>kw,tg:()=>xw,th:()=>Sw,tk:()=>Iw,tr:()=>zw,ua:()=>Pw,uk:()=>Tl,ur:()=>Tw,uz:()=>Ow,vi:()=>jw,yo:()=>Aw,zhCN:()=>Ew,zhTW:()=>Nw});var k1=()=>{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"},map:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",mac:"\u0639\u0646\u0648\u0627\u0646 MAC",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",credit_card:"\u0631\u0642\u0645 \u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0627\u0626\u062A\u0645\u0627\u0646",currency_code:"\u0631\u0645\u0632 \u0627\u0644\u0639\u0645\u0644\u0629",iban:"IBAN",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.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 ${r.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${o}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}case"invalid_value":return r.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 ${k(r.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: ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${r.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${r.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`${n[o.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${r.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${r.keys.length>1?"\u0629":""}: ${y(r.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.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 ${r.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function Sb(){return{localeError:k1()}}var x1=()=>{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"},map:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",credit_card:"kredit kart\u0131 n\xF6mr\u0259si",currency_code:"valyuta kodu",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${r.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${s}`}case"invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${k(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[o.format]??r.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${r.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${r.keys.length>1?"lar":""}: ${y(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${r.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function Ib(){return{localeError:x1()}}function zb(e,t,n,i){let r=Math.abs(e),o=r%10,a=r%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?n:i}var S1=()=>{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"},map:{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(r){return e[r]??null}let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",mac:"MAC \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",credit_card:"\u043D\u0443\u043C\u0430\u0440 \u043A\u0440\u044D\u0434\u044B\u0442\u043D\u0430\u0439 \u043A\u0430\u0440\u0442\u044B",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",iban:"IBAN",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${r.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}case"invalid_value":return r.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 ${k(r.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 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),c=zb(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${r.maximum.toString()} ${c}`}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 ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),c=zb(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${r.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[o.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${r.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${y(r.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${r.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 ${r.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function Pb(){return{localeError:S1()}}var I1=()=>{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"},map:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",mac:"MAC \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",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0430",currency_code:"\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${k(r.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 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${r.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;if(o.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 "${o.prefix}"`;if(o.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 "${o.suffix}"`;if(o.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 "${o.includes}"`;if(o.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 ${o.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${n[o.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${r.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u043E\u0432\u0435":""}: ${y(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${r.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 ${r.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function Tb(){return{localeError:I1()}}var z1=()=>{let e={string:{unit:"\u0985\u0995\u09CD\u09B7\u09B0",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},file:{unit:"\u09AC\u09BE\u0987\u099F",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},array:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},set:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},map:{unit:"\u098F\u09A8\u09CD\u099F\u09CD\u09B0\u09BF",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"}};function t(r){return e[r]??null}let n={regex:"\u0987\u09A8\u09AA\u09C1\u099F",email:"\u0987\u09AE\u09C7\u0987\u09B2 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",url:"URL",emoji:"\u0987\u09AE\u09CB\u099C\u09BF",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u09A4\u09BE\u09B0\u09BF\u0996 \u0993 \u09B8\u09AE\u09AF\u09BC",date:"ISO \u09A4\u09BE\u09B0\u09BF\u0996",time:"ISO \u09B8\u09AE\u09AF\u09BC",duration:"ISO \u09B8\u09AE\u09AF\u09BC\u0995\u09BE\u09B2",ipv4:"IPv4 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",ipv6:"IPv6 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",mac:"MAC \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",cidrv4:"IPv4 \u09B0\u09C7\u099E\u09CD\u099C",cidrv6:"IPv6 \u09B0\u09C7\u099E\u09CD\u099C",base64:"base64-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",base64url:"base64url-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",json_string:"JSON \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",e164:"E.164 \u09A8\u09AE\u09CD\u09AC\u09B0",credit_card:"\u0995\u09CD\u09B0\u09C7\u09A1\u09BF\u099F \u0995\u09BE\u09B0\u09CD\u09A1 \u09A8\u09AE\u09CD\u09AC\u09B0",currency_code:"\u09AE\u09C1\u09A6\u09CD\u09B0\u09BE \u0995\u09CB\u09A1",iban:"IBAN",jwt:"JWT",template_literal:"\u0987\u09A8\u09AA\u09C1\u099F"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${o}, \u09AA\u09CD\u09B0\u09BE\u09AA\u09CD\u09A4 ${s}`}case"invalid_value":return r.values.length===1?`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${k(r.values[0])}`:`\u0985\u09AC\u09C8\u09A7 \u0985\u09AA\u09B6\u09A8: ${y(r.values," | ")} \u098F\u09B0 \u09AE\u09A7\u09CD\u09AF\u09C7 \u098F\u0995\u099F\u09BF \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${r.origin??"\u09AE\u09BE\u09A8"} ${o}${r.maximum.toString()} ${a.unit??"\u098F\u09B2\u09BF\u09AE\u09C7\u09A8\u09CD\u099F"} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${r.origin??"\u09AE\u09BE\u09A8"} ${o}${r.maximum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${r.origin} ${o}${r.minimum.toString()} ${a.unit} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${r.origin} ${o}${r.minimum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${o.prefix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C1\u09B0\u09C1 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:o.format==="ends_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${o.suffix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C7\u09B7 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:o.format==="includes"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${o.includes}" \u0985\u09A8\u09CD\u09A4\u09B0\u09CD\u09AD\u09C1\u0995\u09CD\u09A4 \u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7`:o.format==="regex"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: ${o.pattern} \u09AA\u09CD\u09AF\u09BE\u099F\u09BE\u09B0\u09CD\u09A8 \u09AE\u09BF\u09B2\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09AC\u09C8\u09A7 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0985\u09AC\u09C8\u09A7 \u09A8\u09AE\u09CD\u09AC\u09B0: ${r.divisor} \u098F\u09B0 \u0997\u09C1\u09A3\u09BF\u09A4\u0995 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`;case"unrecognized_keys":return`\u0985\u099A\u09C7\u09A8\u09BE \u0995\u09C0${r.keys.length>1?"\u0997\u09C1\u09B2\u09CB":""}: ${y(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u0995\u09C0`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`\u0985\u09AC\u09C8\u09A7 \u09A1\u09BF\u09B8\u0995\u09CD\u09B0\u09BF\u09AE\u09BF\u09A8\u09C7\u099F\u09B0 \u09AE\u09BE\u09A8\u0964 \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${r.options.map(a=>`'${a}'`).join(" | ")}`:"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F";case"invalid_element":return`${r.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u09AE\u09BE\u09A8`;default:return"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F"}}};function Ob(){return{localeError:z1()}}var P1=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"},map:{unit:"elements",verb:"contenir"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",mac:"adre\xE7a MAC",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",credit_card:"n\xFAmero de targeta de cr\xE8dit",currency_code:"codi de moneda",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${s}`}case"invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${k(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${y(r.values," o ")}`;case"too_big":{let o=r.inclusive?"com a m\xE0xim":"menys de",a=t(r.origin);return a?`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xE9s ${o} ${r.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(r.origin);return a?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${o} ${r.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${y(r.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${r.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${r.origin}`;default:return"Entrada inv\xE0lida"}}};function jb(){return{localeError:P1()}}var T1=()=>{let e={string:{unit:"\u067E\u06CC\u062A",verb:"\u0628\u06CE\u062A"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u0628\u06CE\u062A"},array:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},set:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},map:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"}};function t(r){return e[r]??null}let n={regex:"regex",email:"\u0626\u06CC\u0645\u06D5\u06CC\u06B5",url:"\u0628\u06D5\u0633\u062A\u06D5\u0631 (URL)",emoji:"\u0626\u06CC\u0645\u06C6\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0695\u06CE\u06A9\u06D5\u0648\u062A \u0648 \u06A9\u0627\u062A",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",time:"\u06A9\u0627\u062A",duration:"\u0645\u0627\u0648\u06D5",ipv4:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv4",ipv6:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv6",mac:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC MAC",cidrv4:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv4",cidrv6:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv6",base64:"\u062F\u06D5\u0642\u06CC base64",base64url:"\u062F\u06D5\u0642\u06CC base64url",json_string:"\u062F\u06D5\u0642\u06CC JSON",e164:"\u0698\u0645\u0627\u0631\u06D5\u06CC E.164",credit_card:"\u0698\u0645\u0627\u0631\u06D5\u06CC \u06A9\u0627\u0631\u062A\u06CC \u06A9\u0631\u06CE\u062F\u06CC\u062A",currency_code:"\u06A9\u06C6\u062F\u06CC \u062F\u0631\u0627\u0648",iban:"IBAN",jwt:"JWT",template_literal:"\u062A\u06CE\u06A9\u0631\u062F\u06D5"},i={nan:"NaN",string:"\u0646\u0648\u0648\u0633\u06CC\u0646",number:"\u0698\u0645\u0627\u0631\u06D5",boolean:"boolean",array:"array",object:"object",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",integer:"\u0698\u0645\u0627\u0631\u06D5",float:"\u0698\u0645\u0627\u0631\u06D5",null:"null",undefined:"undefined",function:"function",symbol:"symbol",unknown:"unknown",promise:"promise",void:"void",never:"never",map:"map",set:"set"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a,c=["\u0627","\u0648","\u06C6","\u0648\u0648","\u06D5","\u06CC","\u06CE"].some(l=>s.endsWith(l))?"\u06CC\u06D5":"\u06D5",u=/^[a-zA-Z]+$/.test(s);return a==="null"||a==="undefined"?"\u062F\u0627\u0648\u0627\u06A9\u0631\u0627\u0648\u06D5":`\u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${o} \u0628\u06CE\u062A\u060C \u0628\u06D5\u06B5\u0627\u0645 ${s}${u?"":c}`}case"invalid_value":return r.values.length===1?`\u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0648\u0633\u062A\u06D5: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${k(r.values[0])} \u0628\u06CE\u062A`:`\u0647\u06D5\u06B5\u0628\u0698\u0627\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 \u06CC\u06D5\u06A9\u06CE\u06A9 \u0628\u06CE\u062A \u0644\u06D5 ${y(r.values,"|")}`;case"too_big":{let o=t(r.origin);return o?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${r.maximum.toString()} ${o.unit} ${o.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${r.maximum.toString()} \u0628\u06CE\u062A`}case"too_small":{let o=t(r.origin);return o?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${r.minimum.toString()} ${o.unit} ${o.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${r.minimum.toString()} \u0628\u06CE\u062A`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u062F\u06D5\u0633\u062A\u067E\u06CE\u0628\u06A9\u0627\u062A \u0628\u06D5 "${o.prefix}"`:o.format==="ends_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u06A9\u06C6\u062A\u0627\u06CC\u06CC\u0628\u06CE\u062A \u0628\u06D5 "${o.suffix}"`:o.format==="includes"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 "${o.includes}" \u0644\u06D5\u062E\u06C6\u0628\u06AF\u0631\u06CE\u062A`:o.format==="regex"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0644\u06D5\u06AF\u06D5\u06B5 \u067E\u0627\u062A\u06CE\u0631\u0646\u06CC ${o.pattern} \u0628\u06AF\u0648\u0646\u062C\u06CE\u062A`:`\u0628\u06D5\u0647\u0627\u06CC ${n[o.format]??r.format} \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`}case"not_multiple_of":return`\u0698\u0645\u0627\u0631\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u062F\u06D5\u0628\u06CE\u062A \u0686\u06D5\u0646\u062F \u0647\u06CE\u0646\u062F\u06D5 \u0628\u06CE\u062A \u0628\u06C6 ${r.divisor}`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648: ${y(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A \u0644\u06D5 ${r.origin}`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`\u0628\u06D5\u0647\u0627\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648 \u0647\u06D5\u06CC\u06D5. \u0628\u06D5\u0647\u0627\u06CC \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648: ${r.options.map(a=>`'${a}'`).join(" | ")}`:"\u06CC\u06D5\u06A9\u06AF\u0631\u062A\u0646\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A";case"invalid_element":return`${r.origin} \u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`;default:return"\u062A\u06CE\u06A9\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A"}}};function Eb(){return{localeError:T1()}}var O1=()=>{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"},map:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(r){return e[r]??null}let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC 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",credit_card:"\u010D\xEDslo kreditn\xED karty",currency_code:"k\xF3d m\u011Bny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${r.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${s}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${k(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${n[o.format]??r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${y(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}};function Nb(){return{localeError:O1()}}var j1=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"},map:{unit:"elementer",verb:"indeholdt"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kreditkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldigt input: forventede instanceof ${r.expected}, fik ${s}`:`Ugyldigt input: forventede ${o}, fik ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig v\xE6rdi: forventede ${k(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),s=i[r.origin]??r.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${o} ${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),s=i[r.origin]??r.origin;return a?`For lille: forventede ${s} ${a.verb} ${o} ${r.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${y(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${r.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${r.origin}`;default:return"Ugyldigt input"}}};function Ab(){return{localeError:j1()}}var E1=()=>{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"},map:{unit:"Elemente",verb:"zu haben"}};function t(r){return e[r]??null}let n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",mac:"MAC-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",credit_card:"Kreditkartennummer",currency_code:"W\xE4hrungscode",iban:"IBAN",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${s}`}case"invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${k(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ist`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ist`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${n[o.format]??r.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${y(r.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${r.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${r.origin}`;default:return"Ung\xFCltige Eingabe"}}};function Db(){return{localeError:E1()}}var N1=()=>{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(r){return e[r]??null}let n={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",credit_card:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 \u03C0\u03B9\u03C3\u03C4\u03C9\u03C4\u03B9\u03BA\u03AE\u03C2 \u03BA\u03AC\u03C1\u03C4\u03B1\u03C2",currency_code:"\u03BA\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03BD\u03BF\u03BC\u03AF\u03C3\u03BC\u03B1\u03C4\u03BF\u03C2",iban:"IBAN",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return typeof r.expected=="string"&&/^[A-Z]/.test(r.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 ${r.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`}case"invalid_value":return r.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 ${k(r.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 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${r.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${r.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${n[o.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${r.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${r.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${y(r.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${r.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 ${r.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function Rb(){return{localeError:N1()}}var A1=()=>{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(o){return e[o]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};function r(o,a){return o==="number"&&typeof a=="number"&&!Number.isFinite(a)?String(a):i[o]??o}return o=>{switch(o.code){case"invalid_type":{let a=r(o.expected),s=S(o.input),c=r(s,o.input);return`Invalid input: expected ${a}, received ${c}`}case"invalid_value":return o.values.length===1?`Invalid input: expected ${k(o.values[0])}`:`Invalid option: expected one of ${y(o.values,"|")}`;case"too_big":{let a=o.exact?"exactly ":o.inclusive?"<=":"<",s=t(o.origin);return s?`Too big: expected ${o.origin??"value"} to have ${a}${o.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${a}${o.maximum.toString()}`}case"too_small":{let a=o.exact?"exactly ":o.inclusive?">=":">",s=t(o.origin);return s?`Too small: expected ${o.origin} to have ${a}${o.minimum.toString()} ${s.unit}`:`Too small: expected ${o.origin} to be ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`Invalid string: must start with "${a.prefix}"`:a.format==="ends_with"?`Invalid string: must end with "${a.suffix}"`:a.format==="includes"?`Invalid string: must include "${a.includes}"`:a.format==="regex"?`Invalid string: must match pattern ${a.pattern}`:`Invalid ${n[a.format]??o.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${o.divisor}`;case"unrecognized_keys":return`Unrecognized key${o.keys.length>1?"s":""}: ${y(o.keys,", ")}`;case"invalid_key":return`Invalid key in ${o.origin}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`Invalid discriminator value. Expected ${o.options.map(s=>`'${s}'`).join(" | ")}`:o.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${o.origin}`;default:return"Invalid input"}}};function zl(){return{localeError:A1()}}var D1=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"},map:{unit:"elementojn",verb:"havi"}};function t(r){return e[r]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",mac:"MAC-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",credit_card:"kreditkarta numero",currency_code:"valuta kodo",iban:"IBAN",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${r.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${s}`}case"invalid_value":return r.values.length===1?`Nevalida enigo: atendi\u011Dis ${k(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Tro malgranda: atendi\u011Dis ke ${r.origin} havu ${o}${r.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${r.origin} estu ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${n[o.format]??r.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} \u015Dlosilo${r.keys.length>1?"j":""}: ${y(r.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${r.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`;default:return"Nevalida enigo"}}};function Cb(){return{localeError:D1()}}var R1=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",mac:"direcci\xF3n MAC",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",credit_card:"n\xFAmero de tarjeta de cr\xE9dito",currency_code:"c\xF3digo de moneda",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},i={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 r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${r.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${s}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: se esperaba ${k(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),s=i[r.origin]??r.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${o}${r.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),s=i[r.origin]??r.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${o}${r.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${y(r.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[r.origin]??r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[r.origin]??r.origin}`;default:return"Entrada inv\xE1lida"}}};function Ub(){return{localeError:R1()}}var C1=()=>{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"},map:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",mac:"MAC \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",credit_card:"\u0634\u0645\u0627\u0631\u0647 \u06A9\u0627\u0631\u062A \u0627\u0639\u062A\u0628\u0627\u0631\u06CC",currency_code:"\u06A9\u062F \u0627\u0631\u0632",iban:"IBAN",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${r.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${o} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return r.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${k(r.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 ${y(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[o.format]??r.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 ${r.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${r.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${y(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${r.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 ${r.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function Zb(){return{localeError:C1()}}var U1=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},map:{unit:"alkiota",subject:"kuvauksen"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(r){return e[r]??null}let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",mac:"MAC-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",credit_card:"luottokortin numero",currency_code:"valuuttakoodi",iban:"IBAN",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${s}`}case"invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${k(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${o}${r.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${o}${r.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${n[o.format]??r.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${y(r.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 Mb(){return{localeError:U1()}}var Z1=()=>{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(r){return e[r]??null}let n={regex:"expression r\xE9guli\xE8re",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",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne de caract\xE8res encod\xE9e en base64",base64url:"cha\xEEne de caract\xE8res encod\xE9e en base64url",json_string:"cha\xEEne de caract\xE8res JSON",e164:"num\xE9ro au format E.164",credit_card:"num\xE9ro de carte de cr\xE9dit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entr\xE9e"},i={string:"cha\xEEne de caract\xE8res",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:"record",map:"map",set:"ensemble",file:"fichier",nonoptional:"non optionnel",nan:"NaN",function:"fonction"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : instance de ${r.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${s} re\xE7u`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${k(r.values[0])} attendu`:`Option invalide : une valeur parmi ${y(r.values,"|")} attendue`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Trop grand : ${i[r.origin]??"valeur"} doit ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i[r.origin]??"valeur"} doit \xEAtre ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Trop petit : ${i[r.origin]??"valeur"} doit ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Trop petit : ${i[r.origin]??"valeur"} doit \xEAtre ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne de caract\xE8res invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne de caract\xE8res invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne de caract\xE8res invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne de caract\xE8res invalide : doit correspondre au motif ${o.pattern}`:`${n[o.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${y(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function Lb(){return{localeError:Z1()}}var M1=()=>{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"},map:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let n={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",mac:"adresse MAC",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",credit_card:"num\xE9ro de carte de cr\xE9dit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : attendu instanceof ${r.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${s}`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${k(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u2264":"<",a=t(r.origin);return a?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${o}${r.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u2265":">",a=t(r.origin);return a?`Trop petit : attendu que ${r.origin} ait ${o}${r.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${r.origin} soit ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${n[o.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${y(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function Vb(){return{localeError:M1()}}var L1=()=>{let e={string:{unit:"\u0A85\u0A95\u0ACD\u0AB7\u0AB0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},file:{unit:"\u0AAC\u0ABE\u0AAF\u0A9F",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},array:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},set:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},map:{unit:"\u0A8F\u0AA8\u0ACD\u0A9F\u0ACD\u0AB0\u0AC0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"}};function t(r){return e[r]??null}let n={regex:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F",email:"\u0A88\u0AAE\u0AC7\u0A87\u0AB2 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",url:"URL",emoji:"\u0A87\u0AAE\u0ACB\u0A9C\u0AC0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96 \u0A85\u0AA8\u0AC7 \u0AB8\u0AAE\u0AAF",date:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96",time:"ISO \u0AB8\u0AAE\u0AAF",duration:"ISO \u0A85\u0AB5\u0AA7\u0ABF",ipv4:"IPv4 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",ipv6:"IPv6 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",mac:"MAC \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",cidrv4:"IPv4 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",cidrv6:"IPv6 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",base64:"base64-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",base64url:"base64url-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",json_string:"JSON \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",e164:"E.164 \u0AA8\u0A82\u0AAC\u0AB0",credit_card:"\u0A95\u0ACD\u0AB0\u0AC7\u0AA1\u0ABF\u0A9F \u0A95\u0ABE\u0AB0\u0ACD\u0AA1 \u0AA8\u0A82\u0AAC\u0AB0",currency_code:"\u0A9A\u0AB2\u0AA3 \u0A95\u0ACB\u0AA1",iban:"IBAN",jwt:"JWT",template_literal:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${o}, \u0AAA\u0ACD\u0AB0\u0ABE\u0AAA\u0ACD\u0AA4 ${s}`}case"invalid_value":return r.values.length===1?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${k(r.values[0])}`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB5\u0ABF\u0A95\u0AB2\u0ACD\u0AAA: ${y(r.values," | ")} \u0AAE\u0ABE\u0AA7\u0ACD\u0AAF\u0AAE\u0AA5\u0AC0 \u0A8F\u0A95 \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${r.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${o}${r.maximum.toString()} ${a.unit??"\u0A8F\u0AB2\u0ABF\u0AAE\u0AC7\u0AA8\u0ACD\u0A9F"} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${r.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${o}${r.maximum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${r.origin} ${o}${r.minimum.toString()} ${a.unit} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${r.origin} ${o}${r.minimum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${o.prefix}" \u0AA5\u0AC0 \u0AB6\u0AB0\u0AC2 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:o.format==="ends_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${o.suffix}" \u0AAA\u0AB0 \u0AB8\u0AAE\u0ABE\u0AAA\u0ACD\u0AA4 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:o.format==="includes"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${o.includes}" \u0AB6\u0ABE\u0AAE\u0AC7\u0AB2 \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:o.format==="regex"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: \u0AAA\u0AC7\u0A9F\u0AB0\u0ACD\u0AA8 ${o.pattern} \u0AB8\u0ABE\u0AA5\u0AC7 \u0AAE\u0AC7\u0AB3 \u0A96\u0ABE\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA8\u0A82\u0AAC\u0AB0: ${r.divisor} \u0AA8\u0ACB \u0A97\u0AC1\u0AA3\u0ABE\u0A82\u0A95 \u0AB9\u0ACB\u0AB5\u0ACB \u0A9C\u0ACB\u0A88\u0A8F`;case"unrecognized_keys":return`\u0A93\u0AB3\u0A96\u0AC0 \u0AB6\u0A95\u0ABE\u0AA4\u0ABE \u0AA8\u0AB9\u0AC0\u0A82 \u0AA4\u0AC7 \u0A95\u0AC0${r.keys.length>1?"\u0A93":""}: ${y(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A95\u0AC0`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA1\u0ABF\u0AB8\u0ACD\u0A95\u0ACD\u0AB0\u0ABF\u0AAE\u0ABF\u0AA8\u0AC7\u0A9F\u0AB0 \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF. \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${r.options.map(a=>`'${a}'`).join(" | ")}`:"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F";case"invalid_element":return`${r.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF`;default:return"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F"}}};function Fb(){return{localeError:L1()}}var V1=()=>{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"}},n=u=>u?e[u]:void 0,i=u=>{let l=n(u);return l?l.label:u??e.unknown.label},r=u=>`\u05D4${i(u)}`,o=u=>(n(u)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",a=u=>u?t[u]??null:null,s={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},uuidv4:{label:"UUIDv4",gender:"m"},uuidv6:{label:"UUIDv6",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"},mac:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA MAC",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"},credit_card:{label:"\u05DE\u05E1\u05E4\u05E8 \u05DB\u05E8\u05D8\u05D9\u05E1 \u05D0\u05E9\u05E8\u05D0\u05D9",gender:"m"},currency_code:{label:"\u05E7\u05D5\u05D3 \u05DE\u05D8\u05D1\u05E2",gender:"m"},iban:{label:"IBAN",gender:"m"},jwt:{label:"JWT",gender:"m"},template_literal:{label:"\u05E7\u05DC\u05D8",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"}},c={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let l=u.expected,d=c[l??""]??i(l),f=S(u.input),p=c[f]??e[f]?.label??f;return/^[A-Z]/.test(u.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${u.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${p}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${p}`}case"invalid_value":{if(u.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 ${k(u.values[0])}`;let l=u.values.map(p=>k(p));if(u.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 ${l[0]} \u05D0\u05D5 ${l[1]}`;let d=l[l.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 ${l.slice(0,-1).join(", ")} \u05D0\u05D5 ${d}`}case"too_big":{let l=a(u.origin),d=r(u.origin??"value");if(u.origin==="string")return`${l?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.maximum.toString()} ${l?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(u.origin==="number"){let m=u.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${u.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}`}if(u.origin==="array"||u.origin==="set"){let m=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",h=u.inclusive?`${u.maximum} ${l?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${u.maximum} ${l?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`.trim()}let f=u.inclusive?"<=":"<",p=o(u.origin??"value");return l?.unit?`${l.longLabel} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${u.maximum.toString()} ${l.unit}`:`${l?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${u.maximum.toString()}`}case"too_small":{let l=a(u.origin),d=r(u.origin??"value");if(u.origin==="string")return`${l?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.minimum.toString()} ${l?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(u.origin==="number"){let m=u.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${u.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}`}if(u.origin==="array"||u.origin==="set"){let m=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(u.minimum===1&&u.inclusive){let g=(u.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${g}`}let h=u.inclusive?`${u.minimum} ${l?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${u.minimum} ${l?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`.trim()}let f=u.inclusive?">=":">",p=o(u.origin??"value");return l?.unit?`${l.shortLabel} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${u.minimum.toString()} ${l.unit}`:`${l?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${u.minimum.toString()}`}case"invalid_format":{let l=u;if(l.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${l.prefix}"`;if(l.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${l.suffix}"`;if(l.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${l.includes}"`;if(l.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 ${l.pattern}`;let d=s[l.format],f=d?.label??l.format,m=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${f} \u05DC\u05D0 ${m}`}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 ${u.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${u.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${u.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${y(u.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${r(u.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function qb(){return{localeError:V1()}}var F1=()=>{let e={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},file:{unit:"\u092C\u093E\u0907\u091F\u094D\u0938",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F\u092F\u093E\u0901",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"}};function t(r){return e[r]??null}let n={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0908\u092E\u0947\u0932 \u092A\u0924\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0924\u093F\u0925\u093F \u0914\u0930 \u0938\u092E\u092F",date:"ISO \u0924\u093F\u0925\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u092A\u0924\u093E",ipv6:"IPv6 \u092A\u0924\u093E",mac:"MAC \u092A\u0924\u093E",cidrv4:"IPv4 \u0936\u094D\u0930\u0947\u0923\u0940",cidrv6:"IPv6 \u0936\u094D\u0930\u0947\u0923\u0940",base64:"Base64-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",base64url:"Base64URL-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",e164:"E.164 \u0938\u0902\u0916\u094D\u092F\u093E",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0938\u0902\u0916\u094D\u092F\u093E",currency_code:"\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",iban:"IBAN",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${o}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${s}`}case"invalid_value":return r.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${k(r.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u094B\u0902 \u092E\u0947\u0902 \u0938\u0947 \u090F\u0915 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${r.origin??"\u092E\u093E\u0928"} \u092E\u0947\u0902 ${o}${r.maximum} ${a.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${r.origin??"\u092E\u093E\u0928"} ${o}${r.maximum} \u0939\u094B`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${r.origin} \u092E\u0947\u0902 ${o}${r.minimum} ${a.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${r.origin} ${o}${r.minimum} \u0939\u094B`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${o.prefix}" \u0938\u0947 \u0936\u0941\u0930\u0942 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:o.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${o.suffix}" \u092A\u0930 \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:o.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u0907\u0938\u092E\u0947\u0902 "${o.includes}" \u0936\u093E\u092E\u093F\u0932 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:o.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u092A\u0948\u091F\u0930\u094D\u0928 ${o.pattern} \u0938\u0947 \u092E\u0947\u0932 \u0916\u093E\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:`\u0905\u092E\u093E\u0928\u094D\u092F ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: \u092F\u0939 ${r.divisor} \u0915\u093E \u0917\u0941\u0923\u091C \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u0902\u091C\u0940${r.keys.length>1?"\u092F\u093E\u0901":""}: ${y(r.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u0902\u091C\u0940: ${r.origin} \u092E\u0947\u0902`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${r.options.map(a=>`'${a}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${r.origin} \u092E\u0947\u0902`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function Bb(){return{localeError:F1()}}var q1=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(r){return e[r]??null}let n={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",credit_card:"broj kreditne kartice",currency_code:"kod valute",iban:"IBAN",jwt:"JWT",template_literal:"unos"},i={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 r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${r.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${o}, a primljeno je ${s}`}case"invalid_value":return r.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${k(r.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),s=i[r.origin]??r.origin;return a?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${o}${r.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),s=i[r.origin]??r.origin;return a?`Premalo: o\u010Dekivano da ${s} ima ${o}${r.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${o.prefix}"`:o.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${o.suffix}"`:o.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${o.includes}"`:o.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${o.pattern}`:`Neispravna ${n[o.format]??r.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${r.divisor}`;case"unrecognized_keys":return`Neprepoznat${r.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${y(r.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${i[r.origin]??r.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[r.origin]??r.origin}`;default:return"Neispravan unos"}}};function Hb(){return{localeError:q1()}}var B1=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"},map:{unit:"elem",verb:"legyen"}};function t(r){return e[r]??null}let n={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",mac:"MAC 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",credit_card:"hitelk\xE1rtyasz\xE1m",currency_code:"p\xE9nznemk\xF3d",iban:"IBAN",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${r.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${k(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${r.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${o}${r.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[o.format]??r.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${r.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${y(r.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${r.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${r.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function Jb(){return{localeError:B1()}}function Kb(e,t,n){return Math.abs(e)===1?t:n}function eo(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=e[e.length-1];return e+(t.includes(n)?"\u0576":"\u0568")}var H1=()=>{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"},map:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(r){return e[r]??null}let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",mac:"MAC \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",credit_card:"\u056F\u0580\u0565\u0564\u056B\u057F \u0584\u0561\u0580\u057F\u056B \u0570\u0561\u0574\u0561\u0580",currency_code:"\u0561\u0580\u056A\u0578\u0582\u0575\u0569\u056B \u056F\u0578\u0564",iban:"IBAN",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.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 ${r.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${o}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}case"invalid_value":return r.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 ${k(r.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 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),c=Kb(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${eo(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.maximum.toString()} ${c}`}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 ${eo(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),c=Kb(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${eo(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.minimum.toString()} ${c}`}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 ${eo(r.origin)} \u056C\u056B\u0576\u056B ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.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 ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[o.format]??r.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 ${r.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${r.keys.length>1?"\u0576\u0565\u0580":""}. ${y(r.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${eo(r.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 ${eo(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function Gb(){return{localeError:H1()}}var J1=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"},map:{unit:"item",verb:"memiliki"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",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",credit_card:"nomor kartu kredit",currency_code:"kode mata uang",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${o}, diterima ${s}`}case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${k(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${o}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: diharapkan ${r.origin} memiliki ${o}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${n[o.format]??r.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${y(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`;default:return"Input tidak valid"}}};function Wb(){return{localeError:J1()}}var K1=()=>{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"},map:{unit:"hluti",verb:"a\xF0 hafa"}};function t(r){return e[r]??null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",credit_card:"kreditkortan\xFAmer",currency_code:"gjaldmi\xF0ilsk\xF3\xF0i",iban:"IBAN",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${r.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return r.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${k(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} hafi ${o}${r.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} s\xE9 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} hafi ${o}${r.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} s\xE9 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${n[o.format]??r.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${y(r.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${r.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${r.origin}`;default:return"Rangt gildi"}}};function Xb(){return{localeError:K1()}}var G1=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"},map:{unit:"elementi",verb:"avere"}};function t(r){return e[r]??null}let n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",mac:"indirizzo MAC",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",credit_card:"numero di carta di credito",currency_code:"codice valuta",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input non valido: atteso instanceof ${r.expected}, ricevuto ${s}`:`Input non valido: atteso ${o}, ricevuto ${s}`}case"invalid_value":return r.values.length===1?`Input non valido: atteso ${k(r.values[0])}`:`Opzione non valida: atteso uno tra ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Troppo grande: ${r.origin??"valore"} deve avere ${o}${r.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Troppo piccolo: ${r.origin} deve avere ${o}${r.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${r.origin} deve essere ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Input non valido: ${n[o.format]??r.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${y(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`;default:return"Input non valido"}}};function Yb(){return{localeError:G1()}}var W1=()=>{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"},map:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(r){return e[r]??null}let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",mac:"MAC\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",credit_card:"\u30AF\u30EC\u30B8\u30C3\u30C8\u30AB\u30FC\u30C9\u756A\u53F7",currency_code:"\u901A\u8CA8\u30B3\u30FC\u30C9",iban:"IBAN",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${r.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${k(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${y(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(r.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${a.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(r.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${a.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[o.format]??r.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${r.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${r.keys.length>1?"\u7FA4":""}: ${y(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function Qb(){return{localeError:W1()}}var X1=()=>{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"},map:{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(r){return e[r]??null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",mac:"MAC \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",credit_card:"\u10E1\u10D0\u10D9\u10E0\u10D4\u10D3\u10D8\u10E2\u10DD \u10D1\u10D0\u10E0\u10D0\u10D7\u10D8\u10E1 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",currency_code:"\u10D5\u10D0\u10DA\u10E3\u10E2\u10D8\u10E1 \u10D9\u10DD\u10D3\u10D8",iban:"IBAN",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={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 r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.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 ${r.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}case"invalid_value":return r.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 ${k(r.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 ${y(r.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"-\u10D8\u10D7`:o.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 "${o.suffix}"-\u10D8\u10D7`:o.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 "${o.includes}"-\u10E1`:o.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 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[o.format]??r.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 ${r.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${r.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${y(r.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${r.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 ${r.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function ew(){return{localeError:X1()}}var Y1=()=>{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"},map:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(r){return e[r]??null}let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",mac:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 MAC",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",credit_card:"\u179B\u17C1\u1781\u1794\u17D0\u178E\u17D2\u178E\u17A5\u178E\u1791\u17B6\u1793",currency_code:"\u1780\u17BC\u178A\u179A\u17BC\u1794\u17B7\u1799\u1794\u17D0\u178E\u17D2\u178E",iban:"IBAN",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={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 r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.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 ${r.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}case"invalid_value":return r.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 ${k(r.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 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[o.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${y(r.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 ${r.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 ${r.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 Pl(){return{localeError:Y1()}}function tw(){return Pl()}var Q1=()=>{let e={string:{unit:"\u0C85\u0C95\u0CCD\u0CB7\u0CB0\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},file:{unit:"\u0CAC\u0CC8\u0C9F\u0CCD\u200C\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},array:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},set:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},map:{unit:"entries",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"}};function t(r){return e[r]??null}let n={regex:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD",email:"email \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",url:"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 \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95\u0CA6 \u0CB8\u0CAE\u0CAF",date:"ISO \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95",time:"ISO \u0CB8\u0CAE\u0CAF",duration:"ISO \u0C85\u0CB5\u0CA7\u0CBF",ipv4:"IPv4 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",ipv6:"IPv6 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",mac:"MAC \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",cidrv4:"IPv4 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",cidrv6:"IPv6 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",base64:"base64-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",base64url:"base64url-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",json_string:"JSON\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",e164:"E.164 \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",credit_card:"\u0C95\u0CCD\u0CB0\u0CC6\u0CA1\u0CBF\u0C9F\u0CCD \u0C95\u0CBE\u0CB0\u0CCD\u0CA1\u0CCD \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",currency_code:"\u0C95\u0CB0\u0CC6\u0CA8\u0CCD\u0CB8\u0CBF \u0C95\u0CCB\u0CA1\u0CCD",iban:"IBAN",jwt:"JWT",template_literal:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o}, \u0CB8\u0CCD\u0CB5\u0CC0\u0C95\u0CB0\u0CBF\u0CB8\u0CBF\u0CA6\u0CA8\u0CC1 ${s}`}case"invalid_value":return r.values.length===1?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${k(r.values[0])}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C86\u0CAF\u0CCD\u0C95\u0CC6: \u0C87\u0CB5\u0CC1\u0C97\u0CB3\u0CB2\u0CCD\u0CB2\u0CBF \u0C92\u0C82\u0CA6\u0CA8\u0CCD\u0CA8\u0CC1 \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${r.origin??"value"} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${o}${r.maximum.toString()} ${a.unit??"\u0C85\u0C82\u0CB6\u0C97\u0CB3\u0CC1"}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${r.origin??"value"} \u0C8E\u0C82\u0CA6\u0CC1 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${r.origin} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${o}${r.minimum.toString()} ${a.unit}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${r.origin} \u0C8E\u0C82\u0CA6\u0CC1 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0CAA\u0CCD\u0CB0\u0CBE\u0CB0\u0C82\u0CAD\u0CBF\u0CB8\u0CAC\u0CC7\u0C95\u0CC1 "${o.prefix}"`:o.format==="ends_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0C95\u0CCA\u0CA8\u0CC6\u0C97\u0CCA\u0CB3\u0CCD\u0CB3\u0CAC\u0CC7\u0C95\u0CC1 "${o.suffix}"`:o.format==="includes"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C92\u0CB3\u0C97\u0CCA\u0C82\u0CA1\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 "${o.includes}"`:o.format==="regex"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0CAE\u0CBE\u0CA6\u0CB0\u0CBF\u0C97\u0CC6 \u0CB9\u0CCA\u0C82\u0CA6\u0CBF\u0C95\u0CC6\u0CAF\u0CBE\u0C97\u0CAC\u0CC7\u0C95\u0CC1 ${o.pattern}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6: \u0CAC\u0CB9\u0CC1\u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6\u0CAF\u0CBE\u0C97\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 ${r.divisor}`;case"unrecognized_keys":return`\u0C97\u0CC1\u0CB0\u0CC1\u0CA4\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CA6 \u0C95\u0CC0 ${r.keys.length>1?"s":""}: ${y(r.keys,", ")}`;case"invalid_key":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0C95\u0CC0 \u0C87\u0CA8\u0CCD ${r.origin}`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CA4\u0CBE\u0CB0\u0CA4\u0CAE\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF. \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${r.options.map(a=>`'${a}'`).join(" | ")}`:"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD";case"invalid_element":return`\u0CB0\u0CB2\u0CCD\u0CB2\u0CBF \u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF ${r.origin}`;default:return"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD"}}};function rw(){return{localeError:Q1()}}var eO=()=>{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"},map:{unit:"\uAC1C",verb:"to have"}};function t(r){return e[r]??null}let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",mac:"MAC \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",credit_card:"\uC2E0\uC6A9\uCE74\uB4DC \uBC88\uD638",currency_code:"\uD1B5\uD654 \uCF54\uB4DC",iban:"IBAN",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${r.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${k(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${y(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(r.origin),c=s?.unit??"\uC694\uC18C";return s?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${c} ${o}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${o}${a}`}case"too_small":{let o=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(r.origin),c=s?.unit??"\uC694\uC18C";return s?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${c} ${o}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${o}${a}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[o.format]??r.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${r.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${y(r.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${r.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${r.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function nw(){return{localeError:eO()}}var Ja=e=>e.charAt(0).toUpperCase()+e.slice(1);function iw(e){let t=Math.abs(e),n=t%10,i=t%100;return i>=11&&i<=19||n===0?"many":n===1?"one":"few"}var tO=()=>{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(r,o,a,s){let c=e[r]??null;return c===null?c:{unit:c.unit[o],verb:c.verb[s][a?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",mac:"MAC 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",credit_card:"kredito kortel\u0117s numeris",currency_code:"valiutos kodas",iban:"IBAN",jwt:"JWT",template_literal:"\u012Fvestis"},i={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 r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${r.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${o}`}case"invalid_value":return r.values.length===1?`Privalo b\u016Bti ${k(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${y(r.values,"|")} pasirinkim\u0173`;case"too_big":{let o=i[r.origin]??r.origin,a=t(r.origin,iw(Number(r.maximum)),r.inclusive??!1,"smaller");if(a?.verb)return`${Ja(o??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.maximum.toString()} ${a.unit??"element\u0173"}`;let s=r.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Ja(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${r.maximum.toString()} ${a?.unit}`}case"too_small":{let o=i[r.origin]??r.origin,a=t(r.origin,iw(Number(r.minimum)),r.inclusive??!1,"bigger");if(a?.verb)return`${Ja(o??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.minimum.toString()} ${a.unit??"element\u0173"}`;let s=r.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Ja(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${r.minimum.toString()} ${a?.unit}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${n[o.format]??r.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${r.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${y(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=i[r.origin]??r.origin;return`${Ja(o??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function ow(){return{localeError:tO()}}var rO=()=>{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"},map:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(r){return e[r]??null}let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",mac:"MAC \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",credit_card:"\u0431\u0440\u043E\u0458 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u0447\u043A\u0430",currency_code:"\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${r.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${k(r.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 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${r.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`Invalid ${n[o.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`${r.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"}: ${y(r.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${r.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 ${r.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function aw(){return{localeError:rO()}}var nO=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"},map:{unit:"elemen",verb:"mempunyai"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",credit_card:"nombor kad kredit",currency_code:"kod mata wang",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${s}`:`Input tidak sah: dijangka ${o}, diterima ${s}`}case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${k(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: dijangka ${r.origin??"nilai"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: dijangka ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${n[o.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${y(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`;default:return"Input tidak sah"}}};function sw(){return{localeError:nO()}}var iO=()=>{let e={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},file:{unit:"\u092C\u093E\u0907\u091F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"}};function t(r){return e[r]??null}let n={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0907\u092E\u0947\u0932 \u0920\u0947\u0917\u093E\u0928\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u092E\u093F\u0924\u093F \u0930 \u0938\u092E\u092F",date:"ISO \u092E\u093F\u0924\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u0920\u0947\u0917\u093E\u0928\u093E",ipv6:"IPv6 \u0920\u0947\u0917\u093E\u0928\u093E",mac:"MAC \u0920\u0947\u0917\u093E\u0928\u093E",cidrv4:"IPv4 \u0926\u093E\u092F\u0930\u093E",cidrv6:"IPv6 \u0926\u093E\u092F\u0930\u093E",base64:"base64-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",base64url:"base64url-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0919",e164:"E.164 \u0928\u092E\u094D\u092C\u0930",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0928\u092E\u094D\u092C\u0930",currency_code:"\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",iban:"IBAN",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${o}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${s}`}case"invalid_value":return r.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${k(r.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u0939\u0930\u0942 \u092E\u0927\u094D\u092F\u0947 \u090F\u0915 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${r.origin??"\u092E\u093E\u0928"} \u092E\u093E ${o}${r.maximum.toString()} ${a.unit} ${a.verb}`:`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${r.origin??"\u092E\u093E\u0928"} ${o}${r.maximum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${r.origin} \u092E\u093E ${o}${r.minimum.toString()} ${a.unit} ${a.verb}`:`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${r.origin} ${o}${r.minimum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${o.prefix}" \u092C\u093E\u091F \u0938\u0941\u0930\u0941 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:o.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${o.suffix}" \u092E\u093E \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:o.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${o.includes}" \u0938\u092E\u093E\u0935\u0947\u0936 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:o.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: \u0922\u093E\u0901\u091A\u093E ${o.pattern} \u0938\u0901\u0917 \u092E\u0947\u0932 \u0916\u093E\u0928\u0941\u092A\u0930\u094D\u091B`:`\u0905\u092E\u093E\u0928\u094D\u092F ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: ${r.divisor} \u0915\u094B \u0917\u0941\u0923\u091C \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u091E\u094D\u091C\u0940${r.keys.length>1?"\u0939\u0930\u0942":""}: ${y(r.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u091E\u094D\u091C\u0940: ${r.origin} \u092E\u093E`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${r.options.map(a=>`'${a}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${r.origin} \u092E\u093E`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function cw(){return{localeError:iO()}}var oO=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"},map:{unit:"elementen",verb:"heeft"}};function t(r){return e[r]??null}let n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",mac:"MAC-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",credit_card:"creditcardnummer",currency_code:"valutacode",iban:"IBAN",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${o}, ontving ${s}`}case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${k(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),s=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} is`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),s=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} is`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${n[o.format]??r.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${y(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`;default:return"Ongeldige invoer"}}};function uw(){return{localeError:oO()}}var aO=()=>{let e={string:{unit:"teikn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"element",verb:"\xE5 innehalde"},set:{unit:"element",verb:"\xE5 innehalde"},map:{unit:"element",verb:"\xE5 innehalde"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varigheit",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkoda streng",base64url:"base64url-enkoda streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tal",array:"liste"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventa instanceof ${r.expected}, fekk ${s}`:`Ugyldig input: forventa ${o}, fekk ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventa ${k(r.values[0])}`:`Ugyldig val: forventa eitt av ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`For stor(t): forventa ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()} ${a.unit??"element"}`:`For stor(t): forventa ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`For lite(n): forventa ${r.origin} til \xE5 ha ${o}${r.minimum.toString()} ${a.unit}`:`For lite(n): forventa ${r.origin} til \xE5 ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 slutte med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 innehalde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldig tal: m\xE5 vere eit multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjende n\xF8klar":"Ukjend n\xF8kkel"}: ${y(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}};function lw(){return{localeError:aO()}}var sO=()=>{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"},map:{unit:"elementer",verb:"\xE5 inneholde"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventet instanceof ${r.expected}, fikk ${s}`:`Ugyldig input: forventet ${o}, fikk ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${k(r.values[0])}`:`Ugyldig valg: forventet en av ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${y(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}};function dw(){return{localeError:sO()}}var cO=()=>{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"},map:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",mac:"MAC 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",credit_card:"i'tib\xE2r kart\u0131 numaras\u0131",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`F\xE2sit giren: umulan instanceof ${r.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${s}`}case"invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${k(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=r;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[o.format]??r.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${r.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${r.keys.length>1?"s":""}: ${y(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${r.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function fw(){return{localeError:cO()}}var uO=()=>{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"},map:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",mac:"\u062F MAC \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",credit_card:"\u062F \u06A9\u0631\u06CC\u0689\u06CC\u067C \u06A9\u0627\u0631\u062A \u0634\u0645\u06CC\u0631\u0647",currency_code:"\u062F \u0627\u0633\u0639\u0627\u0631\u0648 \u06A9\u0648\u0689",iban:"IBAN",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${r.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return r.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${k(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${y(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} \u0648\u064A`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[o.format]??r.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${r.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${r.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${y(r.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${r.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 ${r.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function pw(){return{localeError:uO()}}var lO=()=>{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"},map:{unit:"element\xF3w",verb:"mie\u0107"}};function t(r){return e[r]??null}let n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",mac:"adres MAC",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",credit_card:"numer karty kredytowej",currency_code:"kod waluty",iban:"IBAN",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${r.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${s}`}case"invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${k(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[o.format]??r.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${y(r.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${r.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${r.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function mw(){return{localeError:lO()}}var dO=()=>{let e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(a){return e[a]??null}let n={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"o intervalo de endere\xE7os IPv4",cidrv6:"o intervalo de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",currency_code:"o c\xF3digo de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},i={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},r={string:{name:"texto",articles:i.masculine},number:{name:"n\xFAmero",articles:i.masculine},int:{name:"n\xFAmero inteiro",articles:i.masculine},boolean:{name:"valor booleano",articles:i.masculine},bigint:{name:"n\xFAmero bigint",articles:i.masculine},symbol:{name:"s\xEDmbolo",articles:i.masculine},undefined:{name:'valor "undefined"',articles:i.masculine},null:{name:'valor "nulo"',articles:i.masculine},never:{name:'valor "never"',articles:i.masculine},void:{name:'valor "void"',articles:i.masculine},date:{name:"data",articles:i.feminine},array:{name:"vetor",articles:i.masculine},object:{name:"objeto",articles:i.masculine},tuple:{name:"tuplo",articles:i.masculine},record:{name:"registo",articles:i.masculine},map:{name:"mapa",articles:i.masculine},set:{name:"conjunto",articles:i.masculine},file:{name:"ficheiro",articles:i.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:i.masculine},nan:{name:'valor "NaN"',articles:i.masculine},function:{name:"fun\xE7\xE3o",articles:i.feminine}};function o(a,s){let c=r[a]??{name:`valor "${a}"`,articles:i.masculine};return`${c.articles[s]} ${c.name}`}return a=>{switch(a.code){case"invalid_type":{let s=o(a.expected,"indefinite"),c=S(a.input),u=o(c,"indefinite");return`Entrada inv\xE1lida: esperava ${s}, recebeu ${u}`}case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: esperava ${k(a.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${y(a.values,"|")}`;case"too_big":{let s=a.inclusive?"<=":"<",c=t(a.origin);return c?`Demasiado grande: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.maximum.toString()} ${c.unit??"elementos"}`:`Demasiado grande: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.maximum.toString()}`}case"too_small":{let s=a.inclusive?">=":">",c=t(a.origin);return c?`Demasiado pequeno: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.minimum.toString()} ${c.unit??"elementos"}`:`Demasiado pequeno: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.minimum.toString()}`}case"invalid_format":{let s=a;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar por "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar em "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`Formato d${n[s.format]??a.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":{let s=a.keys.length>1?"s":"";return`Chave${s} inv\xE1lida${s}: ${y(a.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;case"invalid_union":return a.options&&Array.isArray(a.options)&&a.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${a.options.map(c=>`'${c}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function hw(){return{localeError:dO()}}var fO=()=>{let e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(a){return e[a]??null}let n={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"a faixa de endere\xE7os IPv4",cidrv6:"a faixa de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",currency_code:"o c\xF3digo de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},i={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},r={string:{name:"texto",articles:i.masculine},number:{name:"n\xFAmero",articles:i.masculine},int:{name:"n\xFAmero inteiro",articles:i.masculine},boolean:{name:"valor booleano",articles:i.masculine},bigint:{name:"n\xFAmero bigint",articles:i.masculine},symbol:{name:"s\xEDmbolo",articles:i.masculine},undefined:{name:'valor "undefined"',articles:i.masculine},null:{name:'valor "nulo"',articles:i.masculine},never:{name:'valor "never"',articles:i.masculine},void:{name:'valor "void"',articles:i.masculine},date:{name:"data",articles:i.feminine},array:{name:"vetor",articles:i.masculine},object:{name:"objeto",articles:i.masculine},tuple:{name:"tupla",articles:i.feminine},record:{name:"registro",articles:i.masculine},map:{name:"mapa",articles:i.masculine},set:{name:"conjunto",articles:i.masculine},file:{name:"arquivo",articles:i.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:i.masculine},nan:{name:'valor "NaN"',articles:i.masculine},function:{name:"fun\xE7\xE3o",articles:i.feminine}};function o(a,s){let c=r[a]??{name:`valor "${a}"`,articles:i.masculine};return`${c.articles[s]} ${c.name}`}return a=>{switch(a.code){case"invalid_type":{let s=o(a.expected,"indefinite"),c=S(a.input),u=o(c,"indefinite");return`Entrada inv\xE1lida: esperava ${s}, recebeu ${u}`}case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: esperava ${k(a.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${y(a.values,"|")}`;case"too_big":{let s=a.inclusive?"<=":"<",c=t(a.origin);return c?`Grande demais: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.maximum.toString()} ${c.unit??"elementos"}`:`Grande demais: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.maximum.toString()}`}case"too_small":{let s=a.inclusive?">=":">",c=t(a.origin);return c?`Pequeno demais: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.minimum.toString()} ${c.unit??"elementos"}`:`Pequeno demais: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.minimum.toString()}`}case"invalid_format":{let s=a;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`Formato d${n[s.format]??a.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":{let s=a.keys.length>1?"s":"";return`Chave${s} inv\xE1lida${s}: ${y(a.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;case"invalid_union":return a.options&&Array.isArray(a.options)&&a.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${a.options.map(c=>`'${c}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function gw(){return{localeError:fO()}}var pO=()=>{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(r){return e[r]??null}let n={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",credit_card:"num\u0103r de card de credit",currency_code:"cod valutar",iban:"IBAN",jwt:"JWT",template_literal:"intrare"},i={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 r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${o}, primit ${s}`}case"invalid_value":return r.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${k(r.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} s\u0103 fie ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Prea mic: a\u0219teptat ca ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${r.origin} s\u0103 fie ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${o.prefix}"`:o.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${o.suffix}"`:o.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${o.includes}"`:o.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${o.pattern}`:`Format invalid: ${n[o.format]??r.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${r.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${y(r.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${r.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${r.origin}`;default:return"Intrare invalid\u0103"}}};function vw(){return{localeError:pO()}}function yw(e,t,n,i){let r=Math.abs(e),o=r%10,a=r%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?n:i}var mO=()=>{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"},map:{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(r){return e[r]??null}let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",mac:"MAC \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",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0439 \u043A\u0430\u0440\u0442\u044B",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${k(r.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 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),c=yw(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${r.maximum.toString()} ${c}`}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 ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),c=yw(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${r.minimum.toString()} ${c}`}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 ${r.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[o.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${r.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0438":""}: ${y(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${r.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 ${r.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 _w(){return{localeError:mO()}}var hO=()=>{let e={string:{unit:"znakov",verb:"ma\u0165"},file:{unit:"bajtov",verb:"ma\u0165"},array:{unit:"prvkov",verb:"ma\u0165"},set:{unit:"prvkov",verb:"ma\u0165"},map:{unit:"polo\u017Eiek",verb:"ma\u0165"}};function t(r){return e[r]??null}let n={regex:"regul\xE1rny 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:"d\xE1tum a \u010Das vo form\xE1te ISO",date:"d\xE1tum vo form\xE1te ISO",time:"\u010Das vo form\xE1te ISO",duration:"doba trvania ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64",base64url:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64url",json_string:"re\u0165azec vo form\xE1te JSON",e164:"\u010D\xEDslo E.164",credit_card:"\u010D\xEDslo kreditnej karty",currency_code:"k\xF3d meny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"re\u0165azec",function:"funkcia",array:"pole"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 instanceof ${r.expected}, obdr\u017Ean\xE9 ${s}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${o}, obdr\u017Ean\xE9 ${s}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${k(r.values[0])}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE1 jedna z hodn\xF4t ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${r.origin??"hodnota"} mus\xED ma\u0165 ${o}${r.maximum.toString()} ${a.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${r.origin??"hodnota"} mus\xED by\u0165 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Hodnota je pr\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED ma\u0165 ${o}${r.minimum.toString()} ${a.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED by\u0165 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neplatn\xFD re\u0165azec: mus\xED za\u010D\xEDna\u0165 na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD re\u0165azec: mus\xED kon\u010Di\u0165 na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD re\u0165azec: mus\xED obsahova\u0165 "${o.includes}"`:o.format==="regex"?`Neplatn\xFD re\u0165azec: mus\xED zodpoveda\u0165 vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${n[o.format]??r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED by\u0165 n\xE1sobkom ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1me kl\xFA\u010De: ${y(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xFA\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}};function $w(){return{localeError:hO()}}var gO=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"},map:{unit:"elementov",verb:"imeti"}};function t(r){return e[r]??null}let n={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",mac:"MAC naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",credit_card:"\u0161tevilka kreditne kartice",currency_code:"koda valute",iban:"IBAN",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${r.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${s}`}case"invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${k(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${o}${r.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${o}${r.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${n[o.format]??r.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${y(r.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${r.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`;default:return"Neveljaven vnos"}}};function bw(){return{localeError:gO()}}var vO=()=>{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"},map:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(r){return e[r]??null}let n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-adress",ipv6:"IPv6-adress",mac:"MAC-adress",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",credit_card:"kreditkortsnummer",currency_code:"valutakod",iban:"IBAN",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${r.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${s}`}case"invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${k(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${n[o.format]??r.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${y(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${r.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function ww(){return{localeError:vO()}}var yO=()=>{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"},map:{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(r){return e[r]??null}let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",mac:"MAC \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",credit_card:"\u0B95\u0B9F\u0BA9\u0BCD \u0B85\u0B9F\u0BCD\u0B9F\u0BC8 \u0B8E\u0BA3\u0BCD",currency_code:"\u0BA8\u0BBE\u0BA3\u0BAF\u0B95\u0BCD \u0B95\u0BC1\u0BB1\u0BBF\u0BAF\u0BC0\u0B9F\u0BC1",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.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 ${r.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}case"invalid_value":return r.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 ${k(r.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 ${y(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${r.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${o}${r.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${o}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${r.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${r.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${y(r.keys,", ")}`;case"invalid_key":return`${r.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`${r.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 kw(){return{localeError:yO()}}var _O=()=>{let e={string:{unit:"\u0430\u043B\u043E\u043C\u0430\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},file:{unit:"\u0431\u0430\u0439\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},array:{unit:"\u0443\u043D\u0441\u0443\u0440",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},set:{unit:"\u0443\u043D\u0441\u0443\u0440",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},map:{unit:"\u0441\u0430\u0431\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0443\u0440\u0443\u0434",email:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 email",url:"URL",emoji:"\u044D\u043C\u043E\u04B7\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0441\u0430\u043D\u0430\u0432\u0443 \u0432\u0430\u049B\u0442\u0438 ISO",date:"\u0441\u0430\u043D\u0430\u0438 ISO",time:"\u0432\u0430\u049B\u0442\u0438 ISO",duration:"\u0434\u0430\u0432\u043E\u043C\u043D\u043E\u043A\u0438\u0438 ISO",ipv4:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv4",ipv6:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv6",mac:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 MAC",cidrv4:"\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv4",cidrv6:"\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv6",base64:"\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64",base64url:"\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64url",json_string:"\u0441\u0430\u0442\u0440\u0438 JSON",e164:"\u0440\u0430\u049B\u0430\u043C\u0438 E.164",credit_card:"\u0440\u0430\u049B\u0430\u043C\u0438 \u043A\u043E\u0440\u0442\u0438 \u043A\u0440\u0435\u0434\u0438\u0442\u04E3",currency_code:"\u0440\u0430\u043C\u0437\u0438 \u0430\u0441\u044A\u043E\u0440",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0443\u0440\u0443\u0434"},i={nan:"NaN",number:"\u0440\u0430\u049B\u0430\u043C",string:"\u0441\u0430\u0442\u0440",array:"\u043C\u0430\u0441\u0441\u0438\u0432",object:"\u043E\u0431\u044A\u0435\u043A\u0442",date:"\u0441\u0430\u043D\u0430"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return`\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${o} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442, ${s} \u0433\u0438\u0440\u0438\u0444\u0442\u0430 \u0448\u0443\u0434`}case"invalid_value":return r.values.length===1?`\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${k(r.values[0])} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`:`\u0418\u043D\u0442\u0438\u0445\u043E\u0431\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u044F\u043A\u0435 \u0430\u0437 ${y(r.values,"|")} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${r.origin??"\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${o}${r.maximum.toString()} ${a.unit} ${a.verb}`:`\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${r.origin??"\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${o}${r.maximum.toString()} \u0431\u043E\u0448\u0430\u0434`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${r.origin} \u0431\u043E\u044F\u0434 ${o}${r.minimum.toString()} ${a.unit} ${a.verb}`:`\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${r.origin} \u0431\u043E\u044F\u0434 ${o}${r.minimum.toString()} \u0431\u043E\u0448\u0430\u0434`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${o.prefix}" \u043E\u0493\u043E\u0437 \u0448\u0430\u0432\u0430\u0434`:o.format==="ends_with"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${o.suffix}" \u0430\u043D\u04B7\u043E\u043C \u0451\u0431\u0430\u0434`:o.format==="includes"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 "${o.includes}"-\u0440\u043E \u0434\u0430\u0440 \u0431\u0430\u0440 \u0433\u0438\u0440\u0430\u0434`:o.format==="regex"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 \u043D\u0430\u043C\u0443\u043D\u0430\u0438 ${o.pattern} \u043C\u0443\u0432\u043E\u0444\u0438\u049B\u0430\u0442 \u043A\u0443\u043D\u0430\u0434`:`${n[o.format]??r.format}-\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442`}case"not_multiple_of":return`\u0420\u0430\u049B\u0430\u043C\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 ${r.divisor} \u0431\u0435 \u0431\u0430\u049B\u0438\u044F \u0442\u0430\u049B\u0441\u0438\u043C \u0448\u0430\u0432\u0430\u0434`;case"unrecognized_keys":return`\u041A\u0430\u043B\u0438\u0434${r.keys.length>1?"\u04B3\u043E\u0438":"\u0438"} \u043D\u043E\u043C\u0430\u044A\u043B\u0443\u043C: ${y(r.keys,", ")}`;case"invalid_key":return`\u041A\u0430\u043B\u0438\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${r.origin}`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442\u0438 \u0434\u0438\u0441\u043A\u0440\u0438\u043C\u0438\u043D\u0430\u0442\u043E\u0440: ${r.options.map(a=>`'${a}'`).join(" | ")} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`:"\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442";case"invalid_element":return`\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${r.origin}`;default:return"\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442"}}};function xw(){return{localeError:_O()}}var $O=()=>{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"},map:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(r){return e[r]??null}let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",mac:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 MAC",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)",credit_card:"\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E25\u0E02\u0E1A\u0E31\u0E15\u0E23\u0E40\u0E04\u0E23\u0E14\u0E34\u0E15",currency_code:"\u0E23\u0E2B\u0E31\u0E2A\u0E2A\u0E01\u0E38\u0E25\u0E40\u0E07\u0E34\u0E19",iban:"IBAN",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={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 r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.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 ${r.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${o} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}case"invalid_value":return r.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${k(r.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 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.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 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[o.format]??r.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 ${r.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: ${y(r.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.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 ${r.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function Sw(){return{localeError:$O()}}var bO=()=>{let e={string:{unit:"simwol",verb:"bolmaly"},file:{unit:"ba\xFDt",verb:"bolmaly"},array:{unit:"elementler",verb:"bolmaly"},set:{unit:"elementler",verb:"bolmaly"},map:{unit:"elementler",verb:"bolmaly"}};function t(r){return e[r]??null}let n={regex:"giri\u015F",email:"e-po\xE7ta salgysy",url:"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 sene we wagt",date:"ISO sene",time:"ISO wagt",duration:"ISO wagt aralygy",ipv4:"IPv4 salgysy",ipv6:"IPv6 salgysy",mac:"MAC salgysy",cidrv4:"IPv4 aralygy",cidrv6:"IPv6 aralygy",base64:"base64 bilen \u015Fifrlenen setir",base64url:"base64url bilen \u015Fifrlenen setir",json_string:"JSON setiri",e164:"E.164 nomeri",credit_card:"kredit kartyny\u0148 nomeri",currency_code:"wal\xFDuta kody",iban:"IBAN",jwt:"JWT",template_literal:"\u015Fablon"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return`N\xE4dogry baha: gara\u015Fylan ${o} \xFDerine ${s} alyndy`}case"invalid_value":return r.values.length===1?`N\xE4dogry baha: ${k(r.values[0])} bolmaly`:`N\xE4dogry sa\xFDlaw: a\u015Fakdakylardan biri bolmaly: ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Has uly: gara\u015Fyl\xFDan ${r.origin??"baha"} ${o} ${r.maximum.toString()} ${a.unit??"element"}`:`Has uly: gara\u015Fyl\xFDan ${r.origin??"baha"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Has ki\xE7i: gara\u015Fyl\xFDan ${r.origin} ${o} ${r.minimum.toString()} ${a.unit}`:`Has ki\xE7i: gara\u015Fyl\xFDan ${r.origin} ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`N\xE4dogry setir: "${o.prefix}" bilen ba\u015Flamaly`:o.format==="ends_with"?`N\xE4dogry setir: "${o.suffix}" bilen gutarmaly`:o.format==="includes"?`N\xE4dogry setir: "${o.includes}" saklamaly`:o.format==="regex"?`N\xE4dogry setir: ${o.pattern} nusga la\xFDyk bolmaly`:`N\xE4dogry ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xE4dogry san: ${r.divisor} bilen galyndysyz b\xF6l\xFCnmeli`;case"unrecognized_keys":return`Tanalma\xFDan a\xE7ar${r.keys.length>1?"lar":""}: ${y(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7inde n\xE4dogry a\xE7ar`;case"invalid_union":return"N\xE4dogry baha";case"invalid_element":return`${r.origin} i\xE7inde n\xE4dogry baha`;default:return"N\xE4dogry baha"}}};function Iw(){return{localeError:bO()}}var wO=()=>{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"},map:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(r){return e[r]??null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",mac:"MAC 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",credit_card:"kredi kart\u0131 numaras\u0131",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${r.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${s}`}case"invalid_value":return r.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${k(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[o.format]??r.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${r.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${r.keys.length>1?"lar":""}: ${y(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${r.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function zw(){return{localeError:wO()}}var kO=()=>{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"},map:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",mac:"\u0430\u0434\u0440\u0435\u0441\u0430 MAC",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",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0457 \u043A\u0430\u0440\u0442\u043A\u0438",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u0438",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.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 ${r.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${o}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}case"invalid_value":return r.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 ${k(r.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 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} \u0431\u0443\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[o.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0456":""}: ${y(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${r.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 ${r.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 Tl(){return{localeError:kO()}}function Pw(){return Tl()}var xO=()=>{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"},map:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(r){return e[r]??null}let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",mac:"\u0627\u06CC\u0645 \u0627\u06D2 \u0633\u06CC \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",credit_card:"\u06A9\u0631\u06CC\u0688\u0679 \u06A9\u0627\u0631\u0688 \u0646\u0645\u0628\u0631",currency_code:"\u06A9\u0631\u0646\u0633\u06CC \u06A9\u0648\u0688",iban:"IBAN",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${r.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${k(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${y(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${o}${r.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u0627 ${o}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${r.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${r.keys.length>1?"\u0632":""}: ${y(r.keys,"\u060C ")}`;case"invalid_key":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function Tw(){return{localeError:xO()}}var SO=()=>{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(r){return e[r]??null}let n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",credit_card:"kredit karta raqami",currency_code:"valyuta kodi",iban:"IBAN",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${s}`}case"invalid_value":return r.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${k(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[o.format]??r.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${r.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${r.keys.length>1?"lar":""}: ${y(r.keys,", ")}`;case"invalid_key":return`${r.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${r.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function Ow(){return{localeError:SO()}}var IO=()=>{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"},map:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(r){return e[r]??null}let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",mac:"\u0111\u1ECBa ch\u1EC9 MAC",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",credit_card:"s\u1ED1 th\u1EBB t\xEDn d\u1EE5ng",currency_code:"m\xE3 ti\u1EC1n t\u1EC7",iban:"IBAN",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${r.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${k(r.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${n[o.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${y(r.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.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 ${r.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function jw(){return{localeError:IO()}}var zO=()=>{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"},map:{unit:"\u9879",verb:"\u5305\u542B"}};function t(r){return e[r]??null}let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",mac:"MAC\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",credit_card:"\u4FE1\u7528\u5361\u53F7",currency_code:"\u8D27\u5E01\u4EE3\u7801",iban:"IBAN",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${r.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${k(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${n[o.format]??r.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${r.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${y(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${r.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function Ew(){return{localeError:zO()}}var PO=()=>{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"},map:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(r){return e[r]??null}let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",mac:"MAC \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",credit_card:"\u4FE1\u7528\u5361\u865F",currency_code:"\u8CA8\u5E63\u4EE3\u78BC",iban:"IBAN",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${r.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${k(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${r.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${r.keys.length>1?"\u5011":""}\uFF1A${y(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function Nw(){return{localeError:PO()}}var TO=()=>{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"},map:{unit:"nkan",verb:"n\xED"}};function t(r){return e[r]??null}let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",mac:"\xE0d\xEDr\u1EB9\u0301s\xEC MAC",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",credit_card:"n\u1ECDmba kaadi gbese",currency_code:"koodu ow\xF3",iban:"IBAN",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${r.expected}, \xE0m\u1ECD\u0300 a r\xED ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${k(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin??"iye"} ${a.verb} ${o}${r.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.maximum}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${a.verb} ${o}${r.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.minimum}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${n[o.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${y(r.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.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 ${r.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function Aw(){return{localeError:TO()}}var Dw,ph=Symbol("ZodOutput"),mh=Symbol("ZodInput"),Ol=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let i=n[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){let n=t._zod.parent;if(n){let i={...this.get(n)??{}};delete i.id;let r={...i,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function jl(){return new Ol}(Dw=globalThis).__zod_globalRegistry??(Dw.__zod_globalRegistry=jl());var Qe=globalThis.__zod_globalRegistry;var yt=Symbol.for("zod.compile.invalid"),Rw=Symbol.for("zod.compile.fallback"),sr=class extends Error{constructor(t="z.compile does not support async refinements, transforms, or checks"){super(t),this.name="ZodCompileAsyncError"}},ce=class extends Error{constructor(t,n=!0){super(`z.compile does not support ${t}; this schema must use the runtime parser`),this.name="ZodCompileUnsupportedError",this.islandable=n}};function jO(e,t){try{return Nl(e,{assertOnly:!0})}catch{return t}}function yh(e,t){try{let n=Nl(e),i=El(e,n);return i._zod.bag.validator=jO(e,n),i}catch(n){if(t?.strict)throw n;return e}}function El(e,t){if(Sl(e))throw new ce("a schema whose subtree contains a reference cycle");let n=he(e),i=e._zod.run,r=i.__originalRun??i,o=(a,s)=>{if(s?.async||s?.direction==="backward"||s?.skipChecks||s?.[Rw]||s&&Il(s,a.value))return r(a,s);let c=t(a.value);return c!==yt?(a.value=c,a):(s&&(s[Rw]=!0),r(a,s))};return o.__originalRun=r,n._zod.bag.fallbackRun=r,n._zod.bag.validator=t,n._zod.run=o,i.__originalRun||EO(n,e,t),n}function EO(e,t,n){let i=e,r=t;if(typeof r.safeParse=="function"){let o=r.safeParse;i.safeParse=(a,s)=>{let c=n(a);return c!==yt?{success:!0,data:c}:o(a,s)}}if(typeof r.parse=="function"){let o=r.parse;i.parse=(a,s)=>{let c=n(a);return c!==yt?c:o(a,s)}}}function Nl(e,t){let n=!0;try{n=Sl(e)}catch{}if(n)throw new ce("a schema whose subtree contains a reference cycle");let i={constants:new Map,constantCounter:0,varCounter:0,definite:!0},r=new Zn(["input"]),o=Ae(r,i,e,"input",!t?.assertOnly);r.write(o===null?"return true;":`return ${o};`);let a=["INVALID",...i.constants.keys()],s=[yt,...i.constants.values()],c=r.content.join(`
|
|
65
|
+
`)}return g.write("payload.value = newResult;"),g.write("return payload;"),g.compile()},a,s=Dn,c=!Ge.jitless,l=c&&Mp.value,d=t.catchall,p;e._zod.parse=(f,m)=>{p??(p=i.value);let h=f.value;return s(h)?c&&l&&m?.async===!1&&m.jitless!==!0?(a||(a=o(t.shape)),f=a(f,m),d?xb([],h,f,m,p,e,m?.abortEarly===!0):f):n(f,m):(f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f)}});function ab(e,t,n,i){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let r=e.filter(o=>!vt(o));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(a=>Pt(a,i,Me())))}),t)}var Yi=v("$ZodUnion",(e,t)=>{W.init(e,t),re(e,"optin",i=>i.def.options.some(r=>r._zod.optin==="defaulted")?"defaulted":i.def.options.some(r=>r._zod.optin!==void 0)?"optional":void 0),re(e,"optout",i=>i.def.options.some(r=>r._zod.optout==="optional")?"optional":void 0),re(e,"values",i=>{if(i.def.options.every(r=>r._zod.values))return new Set(i.def.options.flatMap(r=>Array.from(r._zod.values)))}),re(e,"pattern",i=>{if(i.def.options.every(r=>r._zod.pattern)){let r=i.def.options.map(o=>o._zod.pattern);return new RegExp(`^(${r.map(o=>Lr(o.source)).join("|")})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1,a=[];for(let s of t.options){let c=s._zod.run({value:i.value,issues:[]},r);if(c instanceof Promise)a.push(c),o=!0;else{if(c.issues.length===0)return c;a.push(c)}}return o?Promise.all(a).then(s=>ab(s,i,e,r)):ab(a,i,e,r)}});function sb(e,t,n,i){let r=[];for(let o=0;o<e.length;o++)e[o].issues.length===0&&r.push(o);return r.length===1?(t.value=e[r[0]].value,t):(r.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(a=>Pt(a,i,Me())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1,matches:r}),t)}var nl=v("$ZodXor",(e,t)=>{Yi.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1,a=[];for(let s of t.options){let c=s._zod.run({value:i.value,issues:[]},r);c instanceof Promise?(a.push(c),o=!0):a.push(c)}return o?Promise.all(a).then(s=>sb(s,i,e,r)):sb(a,i,e,r)}});function ph(e,t){let n=e._zod,i=n.bag.optionsMap;i||(i=kb(n.def),n.bag.optionsMap=i);let r=i.get(t);if(r===null)throw new Error(`Ambiguous discriminator value "${String(t)}"`);return r}function kb(e){let t=new Map;for(let n of e.options){let i=n._zod.propValues?.[e.discriminator];if(!i||i.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let r of i)if(t.has(r)){if(r!==void 0)throw new Error(`Duplicate discriminator value "${String(r)}"`);t.set(r,null)}else t.set(r,n)}return t}var il=v("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Yi.init(e,t);let n=e._zod.parse;re(e,"propValues",r=>{let o={},a=0;for(let s of r.def.options){let c=s._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${r.def.options.indexOf(s)}"`);c[r.def.discriminator]?.has(void 0)&&a++;for(let[u,l]of Object.entries(c)){Object.prototype.hasOwnProperty.call(o,u)||Ye(o,u,new Set);for(let d of l)o[u].add(d)}}return!r.def.unionFallback&&a>1&&o[r.def.discriminator]?.delete(void 0),o}),t.options.forEach((r,o)=>{let a=Ci(r._zod.def);if(a&&!Object.prototype.hasOwnProperty.call(a,t.discriminator))throw new Error(`Invalid discriminated union option at index "${o}"`)});let i=Ri(()=>kb(t));e._zod.parse=(r,o)=>{let a=r.value;if(!Dn(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;let s=a?.[t.discriminator],c=i.value.get(s);return c&&(s!==void 0||o.direction!=="backward")?c._zod.run(r,o):t.unionFallback||o.direction==="backward"?n(r,o):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()).filter(u=>i.value.get(u)!==null),input:a,path:[t.discriminator],inst:e}),r)}}),ol=v("$ZodIntersection",(e,t)=>{W.init(e,t),e._zod.parse=(n,i)=>{let r=n.value,o=t.left._zod.run({value:r,issues:[]},i),a=t.right._zod.run({value:r,issues:[]},i);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([c,u])=>cb(n,c,u)):cb(n,o,a)}});function Wi(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(Wt(e)&&Wt(t)){let n=Object.keys(t),i=Object.keys(e).filter(o=>n.indexOf(o)!==-1),r={...e,...t};Object.prototype.hasOwnProperty.call(r,"__proto__")&&delete r.__proto__;for(let o of i){if(o==="__proto__")continue;let a=Wi(e[o],t[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};r[o]=a.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<e.length;i++){let r=e[i],o=t[i],a=Wi(r,o);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function cb(e,t,n){let i=new Map,r,o=new Map,a=(u,l)=>{let d;if(u.code==="unrecognized_keys"&&!u.path?.length)r??(r=u),d=u.keys;else if(u.code==="invalid_key"&&u.origin==="record"&&u.path?.length===1){let p=String(u.path[0]);o.has(p)||o.set(p,u),d=[p]}else return!1;for(let p of d)i.has(p)||i.set(p,{}),i.get(p)[l]=!0;return!0};for(let u of t.issues)a(u,"l")||e.issues.push(u);for(let u of n.issues)a(u,"r")||e.issues.push(u);let s=[...i].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(s.length){let u=r?s.filter(l=>r.keys.includes(l)):[];u.length&&e.issues.push({...r,keys:u});for(let l of s)!u.includes(l)&&o.has(l)&&e.issues.push(o.get(l))}let c=Wi(t.value,n.value);if(!c.valid){if(vt(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var Ba=v("$ZodTuple",(e,t)=>{W.init(e,t);let n=t.items,i=Ge.memoizer;i?.attach(e),e._zod.parse=(r,o)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=i?i.alloc(e,r,[],o):[];let s=[],c=ub(n,"optin"),u=ub(n,"optout");if(!t.rest){if(a.length<c)return r.issues.push({code:"too_small",minimum:c,inclusive:!0,input:a,inst:e,origin:"array"}),r;a.length>n.length&&r.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:a,inst:e,origin:"array"})}let l=new Array(n.length),d=t.rest?o?.abortEarly:void 0,p=!1;for(let f=0;f<n.length;f++){let m=n[f]._zod.run({value:a[f],issues:[]},o);m instanceof Promise?s.push(m.then(h=>{l[f]=h})):(l[f]=m,d&&!p&&m.issues.length&&(p=vt(m)))}if(t.rest&&!p){let f=n.length-1,m=a.slice(n.length),h=r.issues.length;for(let g of m){if(d&&r.issues.length!==h){if(vt(r,h))break;h=r.issues.length}f++;let _=t.rest._zod.run({value:g,issues:[]},o);_ instanceof Promise?s.push(_.then($=>lb($,r,f))):lb(_,r,f)}}return s.length?Promise.all(s).then(()=>db(l,r,n,a,u)):db(l,r,n,a,u)}});function ub(e,t){for(let n=e.length-1;n>=0;n--)if(!(t==="optin"?e[n]._zod.optin!==void 0:e[n]._zod.optout==="optional"))return n+1;return 0}function lb(e,t,n){e.issues.length&&t.issues.push(...zt(n,e.issues)),t.value[n]=e.value}function db(e,t,n,i,r){for(let o=0;o<n.length;o++){let a=e[o],s=o<i.length;if(!s&&o>=r&&n[o]._zod.optin==="optional"){t.value.length=o;break}if(a.issues.length){if(!s&&o>=r){t.value.length=o;break}t.issues.push(...zt(o,a.issues))}t.value[o]=a.value}for(let o=t.value.length-1;o>=i.length&&(n[o]._zod.optout==="optional"&&t.value[o]===void 0);o--)t.value.length=o;return t}var al=v("$ZodRecord",(e,t)=>{W.init(e,t);let n=Ge.memoizer;n?.attach(e),e._zod.parse=(i,r)=>{let o=i.value;if(!Wt(o))return i.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),i;let a=[],s=t.keyType._zod.values;if(s&&!t.partial){i.value=n?n.alloc(e,i,{},r):{};let c=new Set;for(let l of s)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){if(c.add(typeof l=="number"?l.toString():l),l==="__proto__")continue;let d=t.keyType._zod.run({value:l,issues:[]},r);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){i.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(m=>Pt(m,r,Me())),input:l,path:[l],inst:e});continue}let p=d.value;if(p==="__proto__")continue;let f=t.valueType._zod.run({value:o[l],issues:[]},r);f instanceof Promise?a.push(f.then(m=>{m.issues.length&&i.issues.push(...zt(l,m.issues)),i.value[p]=m.value})):(f.issues.length&&i.issues.push(...zt(l,f.issues)),i.value[p]=f.value)}let u;for(let l in o)if(!c.has(l))if(t.mode==="loose"){if(l==="__proto__")continue;i.value[l]=o[l]}else u=u??[],u.push(l);u&&u.length>0&&i.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:u,continue:!0})}else{i.value=n?n.alloc(e,i,{},r):{};let c;for(let u of Reflect.ownKeys(o)){if(u==="__proto__"||!Object.prototype.propertyIsEnumerable.call(o,u))continue;let l=t.keyType._zod.run({value:u,issues:[]},r);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&Vr.test(u)&&l.issues.length){let m=t.keyType._zod.run({value:Number(u),issues:[]},r);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");m.issues.length===0&&(l=m)}if(l.issues.length){t.mode==="loose"?i.value[u]=o[u]:s?(c=c??[],c.push(u)):i.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(m=>Pt(m,r,Me())),input:u,path:[u],inst:e});continue}let p=l.value;if(p==="__proto__")continue;let f=t.valueType._zod.run({value:o[u],issues:[]},r);f instanceof Promise?a.push(f.then(m=>{m.issues.length&&i.issues.push(...zt(u,m.issues)),i.value[p]=m.value})):(f.issues.length&&i.issues.push(...zt(u,f.issues)),i.value[p]=f.value)}c&&c.length>0&&i.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:c,continue:!0})}return a.length?Promise.all(a).then(()=>i):i}}),sl=v("$ZodMap",(e,t)=>{W.init(e,t);let n=Ge.memoizer;n?.attach(e),e._zod.parse=(i,r)=>{let o=i.value;if(!(o instanceof Map))return i.issues.push({expected:"map",code:"invalid_type",input:o,inst:e}),i;let a=[];i.value=n?n.alloc(e,i,new Map,r):new Map;let s=r?.abortEarly,c=i.issues.length;for(let[u,l]of o){if(s&&i.issues.length!==c){if(vt(i,c))break;c=i.issues.length}let d=t.keyType._zod.run({value:u,issues:[]},r),p=t.valueType._zod.run({value:l,issues:[]},r);d instanceof Promise||p instanceof Promise?a.push(Promise.all([d,p]).then(([f,m])=>{fb(f,m,i,u,o,e,r)})):fb(d,p,i,u,o,e,r)}return a.length?Promise.all(a).then(()=>i):i},dh(e,S1)});function fb(e,t,n,i,r,o,a){e.issues.length&&(Sa.has(typeof i)?n.issues.push(...zt(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:o,issues:e.issues.map(s=>Pt(s,a,Me()))})),t.issues.length&&(Sa.has(typeof i)?n.issues.push(...zt(i,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:o,key:i,issues:t.issues.map(s=>Pt(s,a,Me()))})),n.value.set(e.value,t.value)}var cl=v("$ZodSet",(e,t)=>{W.init(e,t);let n=Ge.memoizer;n?.attach(e),e._zod.parse=(i,r)=>{let o=i.value;if(!(o instanceof Set))return i.issues.push({input:o,inst:e,expected:"set",code:"invalid_type"}),i;let a=[];i.value=n?n.alloc(e,i,new Set,r):new Set;let s=r?.abortEarly,c=i.issues.length;for(let u of o){if(s&&i.issues.length!==c){if(vt(i,c))break;c=i.issues.length}let l=t.valueType._zod.run({value:u,issues:[]},r);l instanceof Promise?a.push(l.then(d=>pb(d,i))):pb(l,i)}return a.length?Promise.all(a).then(()=>i):i},dh(e,I1)});function pb(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var ul=v("$ZodEnum",(e,t)=>{W.init(e,t);let n=Ai(t.entries),i=new Set(n);e._zod.values=i,re(e,"pattern",r=>{let o=Ai(r.def.entries).filter(a=>Sa.has(typeof a));return new RegExp(o.length?`^(${o.map(a=>Xt(a.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(r,o)=>{let a=r.value;return i.has(a)||r.issues.push({code:"invalid_value",values:n,input:a,inst:e}),r}}),ll=v("$ZodLiteral",(e,t)=>{W.init(e,t);let n=new Set(t.values);e._zod.values=n,re(e,"pattern",i=>{let r=i.def.values;return new RegExp(r.length?`^(${r.map(o=>typeof o=="string"?Xt(o):o?Xt(o.toString()):String(o)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(i,r)=>{let o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),dl=v("$ZodFile",(e,t)=>{W.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n}}),fl=v("$ZodTransform",(e,t)=>{W.init(e,t),e._zod.optin="optional",Ge.memoizer?.guard(e),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new tn(e.constructor.name);let r=t.transform(n.value,n);if(i.async)return(r instanceof Promise?r:Promise.resolve(r)).then(a=>(n.value=a,n));if(r instanceof Promise)throw new Tt;return n.value=r,n}});function mb(e,t){return e.value=t.issues.length?void 0:t.value,e}var Ha=v("$ZodOptional",(e,t)=>{W.init(e,t),re(e,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",re(e,"values",n=>{let i=n.def.innerType._zod.values;return i?new Set([...i,void 0]):void 0}),re(e,"pattern",n=>{let i=n.def.innerType._zod.pattern;return i?new RegExp(`^(${Lr(i.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(n.value===void 0){if(t.innerType._zod.optin!=="defaulted")return n;let r=t.innerType._zod.run({value:n.value,issues:[]},i);return r instanceof Promise?r.then(o=>mb(n,o)):mb(n,r)}return t.innerType._zod.run(n,i)}}),pl=v("$ZodExactOptional",(e,t)=>{Ha.init(e,t),re(e,"values",n=>n.def.innerType._zod.values),re(e,"pattern",n=>n.def.innerType._zod.pattern),e._zod.parse=(n,i)=>t.innerType._zod.run(n,i)}),ml=v("$ZodNullable",(e,t)=>{W.init(e,t),re(e,"optin",n=>n.def.innerType._zod.optin),re(e,"optout",n=>n.def.innerType._zod.optout),re(e,"pattern",n=>{let i=n.def.innerType._zod.pattern;return i?new RegExp(`^(${Lr(i.source)}|null)$`):void 0}),re(e,"values",n=>n.def.innerType._zod.values?new Set([...n.def.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)}),hl=v("$ZodDefault",(e,t)=>{W.init(e,t),e._zod.optin="defaulted",re(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>hb(o,t)):hb(r,t)}});function hb(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var gl=v("$ZodPrefault",(e,t)=>{W.init(e,t),e._zod.optin="defaulted",re(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))}),vl=v("$ZodNonOptional",(e,t)=>{W.init(e,t),re(e,"values",n=>{let i=n.def.innerType._zod.values;return i?new Set([...i].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,i)=>{let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>gb(o,e)):gb(r,e)}});function gb(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 yl=v("$ZodSuccess",(e,t)=>{W.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new tn("ZodSuccess");let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.issues.length===0,n)):(n.value=r.issues.length===0,n)}});function vb(e,t,n,i){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(r=>Pt(r,i,Me()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var _l=v("$ZodCatch",(e,t)=>{W.init(e,t),re(e,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),re(e,"optout",n=>n.def.innerType._zod.optout),re(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run({value:n.value,issues:[]},i);return r instanceof Promise?r.then(o=>vb(n,o,t,i)):vb(n,r,t,i)}}),$l=v("$ZodNaN",(e,t)=>{W.init(e,t),e._zod.parse=(n,i)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),Ja=v("$ZodPipe",(e,t)=>{W.init(e,t),re(e,"values",n=>n.def.in._zod.values),re(e,"optin",n=>n.def.in._zod.optin),re(e,"optout",n=>n.def.out._zod.optout),re(e,"propValues",n=>n.def.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){let o=t.out._zod.run(n,i);return o instanceof Promise?o.then(a=>cu(a,t.in,i)):cu(o,t.in,i)}let r=t.in._zod.run(n,i);return r instanceof Promise?r.then(o=>cu(o,t.out,i)):cu(r,t.out,i)}});function cu(e,t,n){return e.issues.some(i=>i.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Qi=v("$ZodCodec",(e,t)=>{W.init(e,t),re(e,"values",n=>n.def.in._zod.values),re(e,"optin",n=>n.def.in._zod.optin),re(e,"optout",n=>n.def.out._zod.optout),re(e,"propValues",n=>n.def.in._zod.propValues),e._zod.parse=(n,i)=>{if((i.direction||"forward")==="forward"){let o=t.in._zod.run(n,i);return o instanceof Promise?o.then(a=>uu(a,t,i)):uu(o,t,i)}else{let o=t.out._zod.run(n,i);return o instanceof Promise?o.then(a=>uu(a,t,i)):uu(o,t,i)}}});function uu(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let r=t.transform(e.value,e);return r instanceof Promise?r.then(o=>lu(e,o,t.out,n)):lu(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(o=>lu(e,o,t.in,n)):lu(e,r,t.in,n)}}function lu(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}var mh=v("$ZodPreprocess",(e,t)=>{Ja.init(e,t)}),bl=v("$ZodReadonly",(e,t)=>{W.init(e,t),re(e,"propValues",n=>n.def.innerType._zod.propValues),re(e,"values",n=>n.def.innerType._zod.values),re(e,"optin",n=>n.def.innerType?._zod?.optin),re(e,"optout",n=>n.def.innerType?._zod?.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(yb):yb(r)}});function yb(e){return e.memo||(e.value=Object.freeze(e.value)),e}function P1(e){let t=e._zod.def,n=t.pattern,i=!!t.format?.includes("int"),r,o;for(let s of t.checks??[]){let c=s._zod.def;c.pattern&&(n=c.pattern),i||(i=!!c.format?.includes("int"));let u=c.minimum??c.length,l=c.maximum??c.length;u!==void 0&&(r===void 0||u>r)&&(r=u),l!==void 0&&(o===void 0||l<o)&&(o=l)}if(n)return n.source;if(r!==void 0&&o!==void 0&&r>o)return"(?!)";if(r!==void 0||o!==void 0)return Pm({minimum:r,maximum:o}).source;let a=e._zod.pattern;return(i&&a===Vr?Da:a)?.source}function ih(e){let t=e._zod.def,n=e._zod.pattern?.source,i=t.innerType??e._zod.innerType;if(i){let r=i._zod.pattern?.source,o=ih(i);return n&&r&&o&&o!==r?n.replace(Lr(r),()=>Lr(o)):n}if(t.options){let r=t.options.map(ih);if(r.every(Boolean))return`^(${r.map(o=>Lr(o)).join("|")})$`}return P1(e)}var wl=v("$ZodTemplateLiteral",(e,t)=>{W.init(e,t);let n=[];for(let i of t.parts)if(typeof i=="object"&&i!==null){let r=ih(i);if(!r)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);n.push(Lr(r))}else if(i===null||Lp.has(typeof i))n.push(Xt(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(i,r)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),xl=v("$ZodFunction",(e,t)=>(W.init(e,t),Object.defineProperty(e,"_def",{value:t}),e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return Object.defineProperty(function(...i){let r=e._def.input?Cn(e._def.input,i):i,o=Reflect.apply(n,this,r);return e._def.output?Cn(e._def.output,o):o},"_zod",{value:e._zod,enumerable:!1})},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return Object.defineProperty(async function(...i){let r=e._def.input?await Un(e._def.input,i):i,o=await Reflect.apply(n,this,r);return e._def.output?await Un(e._def.output,o):o},"_zod",{value:e._zod,enumerable:!1})},e._zod.parse=(n,i)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let i=e.constructor;return Array.isArray(n[0])?new i({type:"function",input:new Ba({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new i({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:n})},e)),kl=v("$ZodPromise",(e,t)=>{W.init(e,t),e._zod.parse=(n,i)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},i))}),eo=v("$ZodLazy",(e,t)=>{W.init(e,t),Up(e._zod,"innerType",()=>{let n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),re(e,"pattern",n=>n.innerType?._zod?.pattern),re(e,"propValues",n=>n.innerType?._zod?.propValues),re(e,"optin",n=>n.innerType?._zod?.optin??void 0),re(e,"optout",n=>n.innerType?._zod?.optout??void 0),e._zod.parse=(n,i)=>e._zod.innerType._zod.run(n,i)}),Sl=v("$ZodCustom",(e,t)=>{xe.init(e,t),W.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{let i=n.value,r=t.fn(i);if(r instanceof Promise)return r.then(o=>_b(o,n,i,e));_b(r,n,i,e)}});function _b(e,t,n,i){if(!e){let r={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(r.params=i._zod.def.params),t.issues.push(Mi(r))}}var Tl=class extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}},gh="~memo",Ib=[];function zb(e){return e!==null&&typeof e=="object"}function hh(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}var Pb=new WeakMap,to=0,Pl=1,Ka=2;function Ga(e,t,n){let i=Pb.get(e);if(i!==void 0)return i?Ka:to;if(t.has(e))return Ka;t.add(e);let r=to,o=l=>{if(r!==Ka&&l?._zod){let d=Ga(l,t,n);d>r&&(r=d)}},a=(l,d)=>{let p=to;for(let f of Reflect.ownKeys(l)){let m=Object.getOwnPropertyDescriptor(l,f);if(d&&!m.enumerable)continue;let h=m.get?Pl:m.value?._zod?Ga(m.value,t,n):to;h>p&&(p=h)}return p},s=l=>{l>r&&(r=l)},c=e._zod.def,u=c.type;switch(u){case"object":{let l=Ci(c);s(l?a(l,!0):Pl),o(c.catchall);break}case"array":o(c.element);break;case"tuple":for(let l of c.items)o(l);o(c.rest);break;case"record":case"map":o(c.keyType),o(c.valueType);break;case"set":o(c.valueType);break;case"union":for(let l of c.options)o(l);break;case"intersection":o(c.left),o(c.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":o(c.innerType);break;case"pipe":o(c.in),o(c.out);break;case"function":o(c.input),o(c.output);break;case"lazy":{let l=c._cachedInner??(n?e._zod.innerType:void 0);s(l?Ga(l,t,!1):Pl);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let l in c){let d=Object.getOwnPropertyDescriptor(c,l);if(!d||d.get)continue;let p=d.value;if(!(!p||typeof p!="object")){if(p._zod)o(p);else if(Array.isArray(p))for(let f of p)o(f)}}}return t.delete(e),T1(e,r)}function T1(e,t){return t!==Pl&&Pb.set(e,t===Ka),t}function El(e){return Ga(e,new Set,!0)!==to}function E1(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var Il,zl=[],O1={alloc(e,t,n){let i=Il;if(!i)return n;Il=void 0;let r={value:n,issues:null};return i.set(t.value,r),zl.push(r),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let n=e._zod.parse,i=(r,o)=>{if(o.direction!=="backward"&&Ol(o,r.value))throw new Tl;return n(r,o)};e._zod.parse=i,e._zod.run===n&&(e._zod.run=i)})},attach(e){var t;let n,i=!1,r,o;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let a=e._zod.parse,s=(c,u)=>{if(n===void 0){let _=Ga(e,new Set,!1);if(_===to)return e._zod.parse=a,e._zod.run===s&&(e._zod.run=a),a(c,u);_===Ka||i?n=!0:i=!0}let l=c.value;if(!zb(l))return a(c,u);let d=u[gh];d||(d={buckets:new WeakMap,backEdges:void 0},u[gh]=d);let p;r===u?p=o:(p=E1(d,e),r=u,o=p);let f=p.get(l);if(f)return c.value=f.value,f.issues?f.issues.length&&c.issues.push(...hh(f.issues)):(c.memo=!0,d.backEdges??(d.backEdges=new WeakSet),d.backEdges.add(f.value)),c;Il=p;let m=zl.length,h=a(c,u);Il=void 0;let g=zl.length>m?zl.pop():void 0;return h instanceof Promise?h.then(_=>(g&&(g.issues=_.issues.length?hh(_.issues):Ib),_)):(g&&(g.issues=h.issues.length?hh(h.issues):Ib),h)};e._zod.parse=s,e._zod.run===a&&(e._zod.run=s)})}};function Wa(){return O1}function Ol(e,t){let n=e[gh]?.backEdges;return n!==void 0&&zb(t)&&n.has(t)}var no={};Ar(no,{ar:()=>Tb,az:()=>Eb,be:()=>jb,bg:()=>Nb,bn:()=>Ab,ca:()=>Db,ckb:()=>Rb,cs:()=>Cb,da:()=>Ub,de:()=>Zb,el:()=>Mb,en:()=>jl,eo:()=>Lb,es:()=>Vb,fa:()=>Fb,fi:()=>qb,fr:()=>Bb,frCA:()=>Hb,gu:()=>Jb,he:()=>Kb,hi:()=>Gb,hr:()=>Wb,hu:()=>Xb,hy:()=>Qb,id:()=>ew,is:()=>tw,it:()=>rw,ja:()=>nw,ka:()=>iw,kh:()=>ow,km:()=>Nl,kn:()=>aw,ko:()=>sw,lt:()=>uw,mk:()=>lw,ms:()=>dw,ne:()=>fw,nl:()=>pw,nn:()=>mw,no:()=>hw,ota:()=>gw,pl:()=>yw,ps:()=>vw,pt:()=>_w,ptBR:()=>$w,ro:()=>bw,ru:()=>xw,sk:()=>kw,sl:()=>Sw,sv:()=>Iw,ta:()=>zw,tg:()=>Pw,th:()=>Tw,tk:()=>Ew,tr:()=>Ow,ua:()=>jw,uk:()=>Al,ur:()=>Nw,uz:()=>Aw,vi:()=>Dw,yo:()=>Uw,zhCN:()=>Rw,zhTW:()=>Cw});var j1=()=>{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"},map:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",mac:"\u0639\u0646\u0648\u0627\u0646 MAC",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",credit_card:"\u0631\u0642\u0645 \u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0627\u0626\u062A\u0645\u0627\u0646",currency_code:"\u0631\u0645\u0632 \u0627\u0644\u0639\u0645\u0644\u0629",iban:"IBAN",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.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 ${r.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${o}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}case"invalid_value":return r.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 ${x(r.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: ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${r.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${r.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`${n[o.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${r.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${r.keys.length>1?"\u0629":""}: ${y(r.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.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 ${r.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function Tb(){return{localeError:j1()}}var N1=()=>{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"},map:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",credit_card:"kredit kart\u0131 n\xF6mr\u0259si",currency_code:"valyuta kodu",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${r.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${s}`}case"invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${x(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[o.format]??r.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${r.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${r.keys.length>1?"lar":""}: ${y(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${r.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function Eb(){return{localeError:N1()}}function Ob(e,t,n,i){let r=Math.abs(e),o=r%10,a=r%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?n:i}var A1=()=>{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"},map:{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(r){return e[r]??null}let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",mac:"MAC \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",credit_card:"\u043D\u0443\u043C\u0430\u0440 \u043A\u0440\u044D\u0434\u044B\u0442\u043D\u0430\u0439 \u043A\u0430\u0440\u0442\u044B",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",iban:"IBAN",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${r.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}case"invalid_value":return r.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 ${x(r.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 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),c=Ob(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${r.maximum.toString()} ${c}`}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 ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),c=Ob(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${r.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[o.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${r.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${y(r.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${r.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 ${r.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function jb(){return{localeError:A1()}}var D1=()=>{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"},map:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",mac:"MAC \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",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0430",currency_code:"\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${x(r.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 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${r.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;if(o.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 "${o.prefix}"`;if(o.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 "${o.suffix}"`;if(o.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 "${o.includes}"`;if(o.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 ${o.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${n[o.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${r.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u043E\u0432\u0435":""}: ${y(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${r.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 ${r.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function Nb(){return{localeError:D1()}}var R1=()=>{let e={string:{unit:"\u0985\u0995\u09CD\u09B7\u09B0",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},file:{unit:"\u09AC\u09BE\u0987\u099F",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},array:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},set:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},map:{unit:"\u098F\u09A8\u09CD\u099F\u09CD\u09B0\u09BF",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"}};function t(r){return e[r]??null}let n={regex:"\u0987\u09A8\u09AA\u09C1\u099F",email:"\u0987\u09AE\u09C7\u0987\u09B2 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",url:"URL",emoji:"\u0987\u09AE\u09CB\u099C\u09BF",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u09A4\u09BE\u09B0\u09BF\u0996 \u0993 \u09B8\u09AE\u09AF\u09BC",date:"ISO \u09A4\u09BE\u09B0\u09BF\u0996",time:"ISO \u09B8\u09AE\u09AF\u09BC",duration:"ISO \u09B8\u09AE\u09AF\u09BC\u0995\u09BE\u09B2",ipv4:"IPv4 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",ipv6:"IPv6 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",mac:"MAC \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",cidrv4:"IPv4 \u09B0\u09C7\u099E\u09CD\u099C",cidrv6:"IPv6 \u09B0\u09C7\u099E\u09CD\u099C",base64:"base64-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",base64url:"base64url-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",json_string:"JSON \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",e164:"E.164 \u09A8\u09AE\u09CD\u09AC\u09B0",credit_card:"\u0995\u09CD\u09B0\u09C7\u09A1\u09BF\u099F \u0995\u09BE\u09B0\u09CD\u09A1 \u09A8\u09AE\u09CD\u09AC\u09B0",currency_code:"\u09AE\u09C1\u09A6\u09CD\u09B0\u09BE \u0995\u09CB\u09A1",iban:"IBAN",jwt:"JWT",template_literal:"\u0987\u09A8\u09AA\u09C1\u099F"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${o}, \u09AA\u09CD\u09B0\u09BE\u09AA\u09CD\u09A4 ${s}`}case"invalid_value":return r.values.length===1?`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${x(r.values[0])}`:`\u0985\u09AC\u09C8\u09A7 \u0985\u09AA\u09B6\u09A8: ${y(r.values," | ")} \u098F\u09B0 \u09AE\u09A7\u09CD\u09AF\u09C7 \u098F\u0995\u099F\u09BF \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${r.origin??"\u09AE\u09BE\u09A8"} ${o}${r.maximum.toString()} ${a.unit??"\u098F\u09B2\u09BF\u09AE\u09C7\u09A8\u09CD\u099F"} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${r.origin??"\u09AE\u09BE\u09A8"} ${o}${r.maximum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${r.origin} ${o}${r.minimum.toString()} ${a.unit} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${r.origin} ${o}${r.minimum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${o.prefix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C1\u09B0\u09C1 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:o.format==="ends_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${o.suffix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C7\u09B7 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:o.format==="includes"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${o.includes}" \u0985\u09A8\u09CD\u09A4\u09B0\u09CD\u09AD\u09C1\u0995\u09CD\u09A4 \u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7`:o.format==="regex"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: ${o.pattern} \u09AA\u09CD\u09AF\u09BE\u099F\u09BE\u09B0\u09CD\u09A8 \u09AE\u09BF\u09B2\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09AC\u09C8\u09A7 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0985\u09AC\u09C8\u09A7 \u09A8\u09AE\u09CD\u09AC\u09B0: ${r.divisor} \u098F\u09B0 \u0997\u09C1\u09A3\u09BF\u09A4\u0995 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`;case"unrecognized_keys":return`\u0985\u099A\u09C7\u09A8\u09BE \u0995\u09C0${r.keys.length>1?"\u0997\u09C1\u09B2\u09CB":""}: ${y(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u0995\u09C0`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`\u0985\u09AC\u09C8\u09A7 \u09A1\u09BF\u09B8\u0995\u09CD\u09B0\u09BF\u09AE\u09BF\u09A8\u09C7\u099F\u09B0 \u09AE\u09BE\u09A8\u0964 \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${r.options.map(a=>`'${a}'`).join(" | ")}`:"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F";case"invalid_element":return`${r.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u09AE\u09BE\u09A8`;default:return"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F"}}};function Ab(){return{localeError:R1()}}var C1=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"},map:{unit:"elements",verb:"contenir"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",mac:"adre\xE7a MAC",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",credit_card:"n\xFAmero de targeta de cr\xE8dit",currency_code:"codi de moneda",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${s}`}case"invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${x(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${y(r.values," o ")}`;case"too_big":{let o=r.inclusive?"com a m\xE0xim":"menys de",a=t(r.origin);return a?`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xE9s ${o} ${r.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(r.origin);return a?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${o} ${r.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${y(r.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${r.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${r.origin}`;default:return"Entrada inv\xE0lida"}}};function Db(){return{localeError:C1()}}var U1=()=>{let e={string:{unit:"\u067E\u06CC\u062A",verb:"\u0628\u06CE\u062A"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u0628\u06CE\u062A"},array:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},set:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},map:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"}};function t(r){return e[r]??null}let n={regex:"regex",email:"\u0626\u06CC\u0645\u06D5\u06CC\u06B5",url:"\u0628\u06D5\u0633\u062A\u06D5\u0631 (URL)",emoji:"\u0626\u06CC\u0645\u06C6\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0695\u06CE\u06A9\u06D5\u0648\u062A \u0648 \u06A9\u0627\u062A",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",time:"\u06A9\u0627\u062A",duration:"\u0645\u0627\u0648\u06D5",ipv4:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv4",ipv6:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv6",mac:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC MAC",cidrv4:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv4",cidrv6:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv6",base64:"\u062F\u06D5\u0642\u06CC base64",base64url:"\u062F\u06D5\u0642\u06CC base64url",json_string:"\u062F\u06D5\u0642\u06CC JSON",e164:"\u0698\u0645\u0627\u0631\u06D5\u06CC E.164",credit_card:"\u0698\u0645\u0627\u0631\u06D5\u06CC \u06A9\u0627\u0631\u062A\u06CC \u06A9\u0631\u06CE\u062F\u06CC\u062A",currency_code:"\u06A9\u06C6\u062F\u06CC \u062F\u0631\u0627\u0648",iban:"IBAN",jwt:"JWT",template_literal:"\u062A\u06CE\u06A9\u0631\u062F\u06D5"},i={nan:"NaN",string:"\u0646\u0648\u0648\u0633\u06CC\u0646",number:"\u0698\u0645\u0627\u0631\u06D5",boolean:"boolean",array:"array",object:"object",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",integer:"\u0698\u0645\u0627\u0631\u06D5",float:"\u0698\u0645\u0627\u0631\u06D5",null:"null",undefined:"undefined",function:"function",symbol:"symbol",unknown:"unknown",promise:"promise",void:"void",never:"never",map:"map",set:"set"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a,c=["\u0627","\u0648","\u06C6","\u0648\u0648","\u06D5","\u06CC","\u06CE"].some(l=>s.endsWith(l))?"\u06CC\u06D5":"\u06D5",u=/^[a-zA-Z]+$/.test(s);return a==="null"||a==="undefined"?"\u062F\u0627\u0648\u0627\u06A9\u0631\u0627\u0648\u06D5":`\u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${o} \u0628\u06CE\u062A\u060C \u0628\u06D5\u06B5\u0627\u0645 ${s}${u?"":c}`}case"invalid_value":return r.values.length===1?`\u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0648\u0633\u062A\u06D5: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${x(r.values[0])} \u0628\u06CE\u062A`:`\u0647\u06D5\u06B5\u0628\u0698\u0627\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 \u06CC\u06D5\u06A9\u06CE\u06A9 \u0628\u06CE\u062A \u0644\u06D5 ${y(r.values,"|")}`;case"too_big":{let o=t(r.origin);return o?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${r.maximum.toString()} ${o.unit} ${o.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${r.maximum.toString()} \u0628\u06CE\u062A`}case"too_small":{let o=t(r.origin);return o?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${r.minimum.toString()} ${o.unit} ${o.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${r.minimum.toString()} \u0628\u06CE\u062A`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u062F\u06D5\u0633\u062A\u067E\u06CE\u0628\u06A9\u0627\u062A \u0628\u06D5 "${o.prefix}"`:o.format==="ends_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u06A9\u06C6\u062A\u0627\u06CC\u06CC\u0628\u06CE\u062A \u0628\u06D5 "${o.suffix}"`:o.format==="includes"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 "${o.includes}" \u0644\u06D5\u062E\u06C6\u0628\u06AF\u0631\u06CE\u062A`:o.format==="regex"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0644\u06D5\u06AF\u06D5\u06B5 \u067E\u0627\u062A\u06CE\u0631\u0646\u06CC ${o.pattern} \u0628\u06AF\u0648\u0646\u062C\u06CE\u062A`:`\u0628\u06D5\u0647\u0627\u06CC ${n[o.format]??r.format} \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`}case"not_multiple_of":return`\u0698\u0645\u0627\u0631\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u062F\u06D5\u0628\u06CE\u062A \u0686\u06D5\u0646\u062F \u0647\u06CE\u0646\u062F\u06D5 \u0628\u06CE\u062A \u0628\u06C6 ${r.divisor}`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648: ${y(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A \u0644\u06D5 ${r.origin}`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`\u0628\u06D5\u0647\u0627\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648 \u0647\u06D5\u06CC\u06D5. \u0628\u06D5\u0647\u0627\u06CC \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648: ${r.options.map(a=>`'${a}'`).join(" | ")}`:"\u06CC\u06D5\u06A9\u06AF\u0631\u062A\u0646\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A";case"invalid_element":return`${r.origin} \u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`;default:return"\u062A\u06CE\u06A9\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A"}}};function Rb(){return{localeError:U1()}}var Z1=()=>{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"},map:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(r){return e[r]??null}let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC 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",credit_card:"\u010D\xEDslo kreditn\xED karty",currency_code:"k\xF3d m\u011Bny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${r.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${s}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${x(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${n[o.format]??r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${y(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}};function Cb(){return{localeError:Z1()}}var M1=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"},map:{unit:"elementer",verb:"indeholdt"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kreditkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldigt input: forventede instanceof ${r.expected}, fik ${s}`:`Ugyldigt input: forventede ${o}, fik ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig v\xE6rdi: forventede ${x(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),s=i[r.origin]??r.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${o} ${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),s=i[r.origin]??r.origin;return a?`For lille: forventede ${s} ${a.verb} ${o} ${r.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${y(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${r.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${r.origin}`;default:return"Ugyldigt input"}}};function Ub(){return{localeError:M1()}}var L1=()=>{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"},map:{unit:"Elemente",verb:"zu haben"}};function t(r){return e[r]??null}let n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",mac:"MAC-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",credit_card:"Kreditkartennummer",currency_code:"W\xE4hrungscode",iban:"IBAN",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${s}`}case"invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${x(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ist`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ist`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${n[o.format]??r.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${y(r.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${r.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${r.origin}`;default:return"Ung\xFCltige Eingabe"}}};function Zb(){return{localeError:L1()}}var V1=()=>{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(r){return e[r]??null}let n={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",credit_card:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 \u03C0\u03B9\u03C3\u03C4\u03C9\u03C4\u03B9\u03BA\u03AE\u03C2 \u03BA\u03AC\u03C1\u03C4\u03B1\u03C2",currency_code:"\u03BA\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03BD\u03BF\u03BC\u03AF\u03C3\u03BC\u03B1\u03C4\u03BF\u03C2",iban:"IBAN",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return typeof r.expected=="string"&&/^[A-Z]/.test(r.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 ${r.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`}case"invalid_value":return r.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 ${x(r.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 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${r.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${r.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${n[o.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${r.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${r.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${y(r.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${r.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 ${r.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function Mb(){return{localeError:V1()}}var F1=()=>{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(o){return e[o]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};function r(o,a){return o==="number"&&typeof a=="number"&&!Number.isFinite(a)?String(a):i[o]??o}return o=>{switch(o.code){case"invalid_type":{let a=r(o.expected),s=S(o.input),c=r(s,o.input);return`Invalid input: expected ${a}, received ${c}`}case"invalid_value":return o.values.length===1?`Invalid input: expected ${x(o.values[0])}`:`Invalid option: expected one of ${y(o.values,"|")}`;case"too_big":{let a=o.exact?"exactly ":o.inclusive?"<=":"<",s=t(o.origin);return s?`Too big: expected ${o.origin??"value"} to have ${a}${o.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${a}${o.maximum.toString()}`}case"too_small":{let a=o.exact?"exactly ":o.inclusive?">=":">",s=t(o.origin);return s?`Too small: expected ${o.origin} to have ${a}${o.minimum.toString()} ${s.unit}`:`Too small: expected ${o.origin} to be ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`Invalid string: must start with "${a.prefix}"`:a.format==="ends_with"?`Invalid string: must end with "${a.suffix}"`:a.format==="includes"?`Invalid string: must include "${a.includes}"`:a.format==="regex"?`Invalid string: must match pattern ${a.pattern}`:`Invalid ${n[a.format]??o.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${o.divisor}`;case"unrecognized_keys":return`Unrecognized key${o.keys.length>1?"s":""}: ${y(o.keys,", ")}`;case"invalid_key":return`Invalid key in ${o.origin}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`Invalid discriminator value. Expected ${o.options.map(s=>`'${s}'`).join(" | ")}`:o.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${o.origin}`;default:return"Invalid input"}}};function jl(){return{localeError:F1()}}var q1=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"},map:{unit:"elementojn",verb:"havi"}};function t(r){return e[r]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",mac:"MAC-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",credit_card:"kreditkarta numero",currency_code:"valuta kodo",iban:"IBAN",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${r.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${s}`}case"invalid_value":return r.values.length===1?`Nevalida enigo: atendi\u011Dis ${x(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Tro malgranda: atendi\u011Dis ke ${r.origin} havu ${o}${r.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${r.origin} estu ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${n[o.format]??r.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} \u015Dlosilo${r.keys.length>1?"j":""}: ${y(r.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${r.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`;default:return"Nevalida enigo"}}};function Lb(){return{localeError:q1()}}var B1=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",mac:"direcci\xF3n MAC",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",credit_card:"n\xFAmero de tarjeta de cr\xE9dito",currency_code:"c\xF3digo de moneda",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},i={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 r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${r.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${s}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: se esperaba ${x(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),s=i[r.origin]??r.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${o}${r.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),s=i[r.origin]??r.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${o}${r.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${y(r.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[r.origin]??r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[r.origin]??r.origin}`;default:return"Entrada inv\xE1lida"}}};function Vb(){return{localeError:B1()}}var H1=()=>{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"},map:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",mac:"MAC \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",credit_card:"\u0634\u0645\u0627\u0631\u0647 \u06A9\u0627\u0631\u062A \u0627\u0639\u062A\u0628\u0627\u0631\u06CC",currency_code:"\u06A9\u062F \u0627\u0631\u0632",iban:"IBAN",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${r.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${o} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return r.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${x(r.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 ${y(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[o.format]??r.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 ${r.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${r.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${y(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${r.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 ${r.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function Fb(){return{localeError:H1()}}var J1=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},map:{unit:"alkiota",subject:"kuvauksen"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(r){return e[r]??null}let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",mac:"MAC-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",credit_card:"luottokortin numero",currency_code:"valuuttakoodi",iban:"IBAN",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${s}`}case"invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${x(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${o}${r.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${o}${r.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${n[o.format]??r.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${y(r.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 qb(){return{localeError:J1()}}var K1=()=>{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(r){return e[r]??null}let n={regex:"expression r\xE9guli\xE8re",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",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne de caract\xE8res encod\xE9e en base64",base64url:"cha\xEEne de caract\xE8res encod\xE9e en base64url",json_string:"cha\xEEne de caract\xE8res JSON",e164:"num\xE9ro au format E.164",credit_card:"num\xE9ro de carte de cr\xE9dit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entr\xE9e"},i={string:"cha\xEEne de caract\xE8res",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:"record",map:"map",set:"ensemble",file:"fichier",nonoptional:"non optionnel",nan:"NaN",function:"fonction"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : instance de ${r.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${s} re\xE7u`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${x(r.values[0])} attendu`:`Option invalide : une valeur parmi ${y(r.values,"|")} attendue`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Trop grand : ${i[r.origin]??"valeur"} doit ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i[r.origin]??"valeur"} doit \xEAtre ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Trop petit : ${i[r.origin]??"valeur"} doit ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Trop petit : ${i[r.origin]??"valeur"} doit \xEAtre ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne de caract\xE8res invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne de caract\xE8res invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne de caract\xE8res invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne de caract\xE8res invalide : doit correspondre au motif ${o.pattern}`:`${n[o.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${y(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function Bb(){return{localeError:K1()}}var G1=()=>{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"},map:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let n={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",mac:"adresse MAC",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",credit_card:"num\xE9ro de carte de cr\xE9dit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : attendu instanceof ${r.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${s}`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${x(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u2264":"<",a=t(r.origin);return a?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${o}${r.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u2265":">",a=t(r.origin);return a?`Trop petit : attendu que ${r.origin} ait ${o}${r.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${r.origin} soit ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${n[o.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${y(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function Hb(){return{localeError:G1()}}var W1=()=>{let e={string:{unit:"\u0A85\u0A95\u0ACD\u0AB7\u0AB0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},file:{unit:"\u0AAC\u0ABE\u0AAF\u0A9F",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},array:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},set:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},map:{unit:"\u0A8F\u0AA8\u0ACD\u0A9F\u0ACD\u0AB0\u0AC0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"}};function t(r){return e[r]??null}let n={regex:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F",email:"\u0A88\u0AAE\u0AC7\u0A87\u0AB2 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",url:"URL",emoji:"\u0A87\u0AAE\u0ACB\u0A9C\u0AC0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96 \u0A85\u0AA8\u0AC7 \u0AB8\u0AAE\u0AAF",date:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96",time:"ISO \u0AB8\u0AAE\u0AAF",duration:"ISO \u0A85\u0AB5\u0AA7\u0ABF",ipv4:"IPv4 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",ipv6:"IPv6 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",mac:"MAC \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",cidrv4:"IPv4 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",cidrv6:"IPv6 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",base64:"base64-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",base64url:"base64url-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",json_string:"JSON \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",e164:"E.164 \u0AA8\u0A82\u0AAC\u0AB0",credit_card:"\u0A95\u0ACD\u0AB0\u0AC7\u0AA1\u0ABF\u0A9F \u0A95\u0ABE\u0AB0\u0ACD\u0AA1 \u0AA8\u0A82\u0AAC\u0AB0",currency_code:"\u0A9A\u0AB2\u0AA3 \u0A95\u0ACB\u0AA1",iban:"IBAN",jwt:"JWT",template_literal:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${o}, \u0AAA\u0ACD\u0AB0\u0ABE\u0AAA\u0ACD\u0AA4 ${s}`}case"invalid_value":return r.values.length===1?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${x(r.values[0])}`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB5\u0ABF\u0A95\u0AB2\u0ACD\u0AAA: ${y(r.values," | ")} \u0AAE\u0ABE\u0AA7\u0ACD\u0AAF\u0AAE\u0AA5\u0AC0 \u0A8F\u0A95 \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${r.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${o}${r.maximum.toString()} ${a.unit??"\u0A8F\u0AB2\u0ABF\u0AAE\u0AC7\u0AA8\u0ACD\u0A9F"} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${r.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${o}${r.maximum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${r.origin} ${o}${r.minimum.toString()} ${a.unit} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${r.origin} ${o}${r.minimum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${o.prefix}" \u0AA5\u0AC0 \u0AB6\u0AB0\u0AC2 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:o.format==="ends_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${o.suffix}" \u0AAA\u0AB0 \u0AB8\u0AAE\u0ABE\u0AAA\u0ACD\u0AA4 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:o.format==="includes"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${o.includes}" \u0AB6\u0ABE\u0AAE\u0AC7\u0AB2 \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:o.format==="regex"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: \u0AAA\u0AC7\u0A9F\u0AB0\u0ACD\u0AA8 ${o.pattern} \u0AB8\u0ABE\u0AA5\u0AC7 \u0AAE\u0AC7\u0AB3 \u0A96\u0ABE\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA8\u0A82\u0AAC\u0AB0: ${r.divisor} \u0AA8\u0ACB \u0A97\u0AC1\u0AA3\u0ABE\u0A82\u0A95 \u0AB9\u0ACB\u0AB5\u0ACB \u0A9C\u0ACB\u0A88\u0A8F`;case"unrecognized_keys":return`\u0A93\u0AB3\u0A96\u0AC0 \u0AB6\u0A95\u0ABE\u0AA4\u0ABE \u0AA8\u0AB9\u0AC0\u0A82 \u0AA4\u0AC7 \u0A95\u0AC0${r.keys.length>1?"\u0A93":""}: ${y(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A95\u0AC0`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA1\u0ABF\u0AB8\u0ACD\u0A95\u0ACD\u0AB0\u0ABF\u0AAE\u0ABF\u0AA8\u0AC7\u0A9F\u0AB0 \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF. \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${r.options.map(a=>`'${a}'`).join(" | ")}`:"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F";case"invalid_element":return`${r.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF`;default:return"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F"}}};function Jb(){return{localeError:W1()}}var X1=()=>{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"}},n=u=>u?e[u]:void 0,i=u=>{let l=n(u);return l?l.label:u??e.unknown.label},r=u=>`\u05D4${i(u)}`,o=u=>(n(u)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",a=u=>u?t[u]??null:null,s={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},uuidv4:{label:"UUIDv4",gender:"m"},uuidv6:{label:"UUIDv6",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"},mac:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA MAC",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"},credit_card:{label:"\u05DE\u05E1\u05E4\u05E8 \u05DB\u05E8\u05D8\u05D9\u05E1 \u05D0\u05E9\u05E8\u05D0\u05D9",gender:"m"},currency_code:{label:"\u05E7\u05D5\u05D3 \u05DE\u05D8\u05D1\u05E2",gender:"m"},iban:{label:"IBAN",gender:"m"},jwt:{label:"JWT",gender:"m"},template_literal:{label:"\u05E7\u05DC\u05D8",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"}},c={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let l=u.expected,d=c[l??""]??i(l),p=S(u.input),f=c[p]??e[p]?.label??p;return/^[A-Z]/.test(u.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${u.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`}case"invalid_value":{if(u.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 ${x(u.values[0])}`;let l=u.values.map(f=>x(f));if(u.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 ${l[0]} \u05D0\u05D5 ${l[1]}`;let d=l[l.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 ${l.slice(0,-1).join(", ")} \u05D0\u05D5 ${d}`}case"too_big":{let l=a(u.origin),d=r(u.origin??"value");if(u.origin==="string")return`${l?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.maximum.toString()} ${l?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(u.origin==="number"){let m=u.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${u.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}`}if(u.origin==="array"||u.origin==="set"){let m=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",h=u.inclusive?`${u.maximum} ${l?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${u.maximum} ${l?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`.trim()}let p=u.inclusive?"<=":"<",f=o(u.origin??"value");return l?.unit?`${l.longLabel} \u05DE\u05D3\u05D9: ${d} ${f} ${p}${u.maximum.toString()} ${l.unit}`:`${l?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${f} ${p}${u.maximum.toString()}`}case"too_small":{let l=a(u.origin),d=r(u.origin??"value");if(u.origin==="string")return`${l?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.minimum.toString()} ${l?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(u.origin==="number"){let m=u.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${u.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}`}if(u.origin==="array"||u.origin==="set"){let m=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(u.minimum===1&&u.inclusive){let g=(u.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${g}`}let h=u.inclusive?`${u.minimum} ${l?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${u.minimum} ${l?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`.trim()}let p=u.inclusive?">=":">",f=o(u.origin??"value");return l?.unit?`${l.shortLabel} \u05DE\u05D3\u05D9: ${d} ${f} ${p}${u.minimum.toString()} ${l.unit}`:`${l?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${f} ${p}${u.minimum.toString()}`}case"invalid_format":{let l=u;if(l.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${l.prefix}"`;if(l.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${l.suffix}"`;if(l.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${l.includes}"`;if(l.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 ${l.pattern}`;let d=s[l.format],p=d?.label??l.format,m=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${p} \u05DC\u05D0 ${m}`}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 ${u.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${u.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${u.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${y(u.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${r(u.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function Kb(){return{localeError:X1()}}var Y1=()=>{let e={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},file:{unit:"\u092C\u093E\u0907\u091F\u094D\u0938",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F\u092F\u093E\u0901",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"}};function t(r){return e[r]??null}let n={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0908\u092E\u0947\u0932 \u092A\u0924\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0924\u093F\u0925\u093F \u0914\u0930 \u0938\u092E\u092F",date:"ISO \u0924\u093F\u0925\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u092A\u0924\u093E",ipv6:"IPv6 \u092A\u0924\u093E",mac:"MAC \u092A\u0924\u093E",cidrv4:"IPv4 \u0936\u094D\u0930\u0947\u0923\u0940",cidrv6:"IPv6 \u0936\u094D\u0930\u0947\u0923\u0940",base64:"Base64-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",base64url:"Base64URL-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",e164:"E.164 \u0938\u0902\u0916\u094D\u092F\u093E",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0938\u0902\u0916\u094D\u092F\u093E",currency_code:"\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",iban:"IBAN",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${o}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${s}`}case"invalid_value":return r.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${x(r.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u094B\u0902 \u092E\u0947\u0902 \u0938\u0947 \u090F\u0915 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${r.origin??"\u092E\u093E\u0928"} \u092E\u0947\u0902 ${o}${r.maximum} ${a.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${r.origin??"\u092E\u093E\u0928"} ${o}${r.maximum} \u0939\u094B`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${r.origin} \u092E\u0947\u0902 ${o}${r.minimum} ${a.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${r.origin} ${o}${r.minimum} \u0939\u094B`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${o.prefix}" \u0938\u0947 \u0936\u0941\u0930\u0942 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:o.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${o.suffix}" \u092A\u0930 \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:o.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u0907\u0938\u092E\u0947\u0902 "${o.includes}" \u0936\u093E\u092E\u093F\u0932 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:o.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u092A\u0948\u091F\u0930\u094D\u0928 ${o.pattern} \u0938\u0947 \u092E\u0947\u0932 \u0916\u093E\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:`\u0905\u092E\u093E\u0928\u094D\u092F ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: \u092F\u0939 ${r.divisor} \u0915\u093E \u0917\u0941\u0923\u091C \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u0902\u091C\u0940${r.keys.length>1?"\u092F\u093E\u0901":""}: ${y(r.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u0902\u091C\u0940: ${r.origin} \u092E\u0947\u0902`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${r.options.map(a=>`'${a}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${r.origin} \u092E\u0947\u0902`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function Gb(){return{localeError:Y1()}}var Q1=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(r){return e[r]??null}let n={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",credit_card:"broj kreditne kartice",currency_code:"kod valute",iban:"IBAN",jwt:"JWT",template_literal:"unos"},i={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 r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${r.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${o}, a primljeno je ${s}`}case"invalid_value":return r.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${x(r.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),s=i[r.origin]??r.origin;return a?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${o}${r.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),s=i[r.origin]??r.origin;return a?`Premalo: o\u010Dekivano da ${s} ima ${o}${r.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${o.prefix}"`:o.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${o.suffix}"`:o.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${o.includes}"`:o.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${o.pattern}`:`Neispravna ${n[o.format]??r.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${r.divisor}`;case"unrecognized_keys":return`Neprepoznat${r.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${y(r.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${i[r.origin]??r.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[r.origin]??r.origin}`;default:return"Neispravan unos"}}};function Wb(){return{localeError:Q1()}}var eE=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"},map:{unit:"elem",verb:"legyen"}};function t(r){return e[r]??null}let n={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",mac:"MAC 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",credit_card:"hitelk\xE1rtyasz\xE1m",currency_code:"p\xE9nznemk\xF3d",iban:"IBAN",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${r.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${x(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${r.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${o}${r.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[o.format]??r.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${r.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${y(r.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${r.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${r.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function Xb(){return{localeError:eE()}}function Yb(e,t,n){return Math.abs(e)===1?t:n}function ro(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=e[e.length-1];return e+(t.includes(n)?"\u0576":"\u0568")}var tE=()=>{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"},map:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(r){return e[r]??null}let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",mac:"MAC \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",credit_card:"\u056F\u0580\u0565\u0564\u056B\u057F \u0584\u0561\u0580\u057F\u056B \u0570\u0561\u0574\u0561\u0580",currency_code:"\u0561\u0580\u056A\u0578\u0582\u0575\u0569\u056B \u056F\u0578\u0564",iban:"IBAN",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.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 ${r.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${o}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}case"invalid_value":return r.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 ${x(r.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 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),c=Yb(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${ro(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.maximum.toString()} ${c}`}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 ${ro(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),c=Yb(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${ro(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.minimum.toString()} ${c}`}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 ${ro(r.origin)} \u056C\u056B\u0576\u056B ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.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 ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[o.format]??r.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 ${r.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${r.keys.length>1?"\u0576\u0565\u0580":""}. ${y(r.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${ro(r.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 ${ro(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function Qb(){return{localeError:tE()}}var rE=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"},map:{unit:"item",verb:"memiliki"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",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",credit_card:"nomor kartu kredit",currency_code:"kode mata uang",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${o}, diterima ${s}`}case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${x(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${o}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: diharapkan ${r.origin} memiliki ${o}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${n[o.format]??r.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${y(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`;default:return"Input tidak valid"}}};function ew(){return{localeError:rE()}}var nE=()=>{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"},map:{unit:"hluti",verb:"a\xF0 hafa"}};function t(r){return e[r]??null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",credit_card:"kreditkortan\xFAmer",currency_code:"gjaldmi\xF0ilsk\xF3\xF0i",iban:"IBAN",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${r.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return r.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${x(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} hafi ${o}${r.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} s\xE9 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} hafi ${o}${r.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} s\xE9 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${n[o.format]??r.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${y(r.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${r.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${r.origin}`;default:return"Rangt gildi"}}};function tw(){return{localeError:nE()}}var iE=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"},map:{unit:"elementi",verb:"avere"}};function t(r){return e[r]??null}let n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",mac:"indirizzo MAC",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",credit_card:"numero di carta di credito",currency_code:"codice valuta",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input non valido: atteso instanceof ${r.expected}, ricevuto ${s}`:`Input non valido: atteso ${o}, ricevuto ${s}`}case"invalid_value":return r.values.length===1?`Input non valido: atteso ${x(r.values[0])}`:`Opzione non valida: atteso uno tra ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Troppo grande: ${r.origin??"valore"} deve avere ${o}${r.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Troppo piccolo: ${r.origin} deve avere ${o}${r.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${r.origin} deve essere ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Input non valido: ${n[o.format]??r.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${y(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`;default:return"Input non valido"}}};function rw(){return{localeError:iE()}}var oE=()=>{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"},map:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(r){return e[r]??null}let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",mac:"MAC\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",credit_card:"\u30AF\u30EC\u30B8\u30C3\u30C8\u30AB\u30FC\u30C9\u756A\u53F7",currency_code:"\u901A\u8CA8\u30B3\u30FC\u30C9",iban:"IBAN",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${r.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${x(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${y(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(r.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${a.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(r.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${a.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[o.format]??r.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${r.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${r.keys.length>1?"\u7FA4":""}: ${y(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function nw(){return{localeError:oE()}}var aE=()=>{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"},map:{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(r){return e[r]??null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",mac:"MAC \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",credit_card:"\u10E1\u10D0\u10D9\u10E0\u10D4\u10D3\u10D8\u10E2\u10DD \u10D1\u10D0\u10E0\u10D0\u10D7\u10D8\u10E1 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",currency_code:"\u10D5\u10D0\u10DA\u10E3\u10E2\u10D8\u10E1 \u10D9\u10DD\u10D3\u10D8",iban:"IBAN",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={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 r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.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 ${r.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}case"invalid_value":return r.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 ${x(r.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 ${y(r.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"-\u10D8\u10D7`:o.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 "${o.suffix}"-\u10D8\u10D7`:o.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 "${o.includes}"-\u10E1`:o.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 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[o.format]??r.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 ${r.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${r.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${y(r.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${r.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 ${r.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function iw(){return{localeError:aE()}}var sE=()=>{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"},map:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(r){return e[r]??null}let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",mac:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 MAC",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",credit_card:"\u179B\u17C1\u1781\u1794\u17D0\u178E\u17D2\u178E\u17A5\u178E\u1791\u17B6\u1793",currency_code:"\u1780\u17BC\u178A\u179A\u17BC\u1794\u17B7\u1799\u1794\u17D0\u178E\u17D2\u178E",iban:"IBAN",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={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 r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.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 ${r.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}case"invalid_value":return r.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 ${x(r.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 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[o.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${y(r.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 ${r.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 ${r.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 Nl(){return{localeError:sE()}}function ow(){return Nl()}var cE=()=>{let e={string:{unit:"\u0C85\u0C95\u0CCD\u0CB7\u0CB0\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},file:{unit:"\u0CAC\u0CC8\u0C9F\u0CCD\u200C\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},array:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},set:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},map:{unit:"entries",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"}};function t(r){return e[r]??null}let n={regex:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD",email:"email \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",url:"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 \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95\u0CA6 \u0CB8\u0CAE\u0CAF",date:"ISO \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95",time:"ISO \u0CB8\u0CAE\u0CAF",duration:"ISO \u0C85\u0CB5\u0CA7\u0CBF",ipv4:"IPv4 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",ipv6:"IPv6 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",mac:"MAC \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",cidrv4:"IPv4 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",cidrv6:"IPv6 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",base64:"base64-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",base64url:"base64url-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",json_string:"JSON\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",e164:"E.164 \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",credit_card:"\u0C95\u0CCD\u0CB0\u0CC6\u0CA1\u0CBF\u0C9F\u0CCD \u0C95\u0CBE\u0CB0\u0CCD\u0CA1\u0CCD \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",currency_code:"\u0C95\u0CB0\u0CC6\u0CA8\u0CCD\u0CB8\u0CBF \u0C95\u0CCB\u0CA1\u0CCD",iban:"IBAN",jwt:"JWT",template_literal:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o}, \u0CB8\u0CCD\u0CB5\u0CC0\u0C95\u0CB0\u0CBF\u0CB8\u0CBF\u0CA6\u0CA8\u0CC1 ${s}`}case"invalid_value":return r.values.length===1?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${x(r.values[0])}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C86\u0CAF\u0CCD\u0C95\u0CC6: \u0C87\u0CB5\u0CC1\u0C97\u0CB3\u0CB2\u0CCD\u0CB2\u0CBF \u0C92\u0C82\u0CA6\u0CA8\u0CCD\u0CA8\u0CC1 \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${r.origin??"value"} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${o}${r.maximum.toString()} ${a.unit??"\u0C85\u0C82\u0CB6\u0C97\u0CB3\u0CC1"}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${r.origin??"value"} \u0C8E\u0C82\u0CA6\u0CC1 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${r.origin} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${o}${r.minimum.toString()} ${a.unit}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${r.origin} \u0C8E\u0C82\u0CA6\u0CC1 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0CAA\u0CCD\u0CB0\u0CBE\u0CB0\u0C82\u0CAD\u0CBF\u0CB8\u0CAC\u0CC7\u0C95\u0CC1 "${o.prefix}"`:o.format==="ends_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0C95\u0CCA\u0CA8\u0CC6\u0C97\u0CCA\u0CB3\u0CCD\u0CB3\u0CAC\u0CC7\u0C95\u0CC1 "${o.suffix}"`:o.format==="includes"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C92\u0CB3\u0C97\u0CCA\u0C82\u0CA1\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 "${o.includes}"`:o.format==="regex"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0CAE\u0CBE\u0CA6\u0CB0\u0CBF\u0C97\u0CC6 \u0CB9\u0CCA\u0C82\u0CA6\u0CBF\u0C95\u0CC6\u0CAF\u0CBE\u0C97\u0CAC\u0CC7\u0C95\u0CC1 ${o.pattern}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6: \u0CAC\u0CB9\u0CC1\u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6\u0CAF\u0CBE\u0C97\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 ${r.divisor}`;case"unrecognized_keys":return`\u0C97\u0CC1\u0CB0\u0CC1\u0CA4\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CA6 \u0C95\u0CC0 ${r.keys.length>1?"s":""}: ${y(r.keys,", ")}`;case"invalid_key":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0C95\u0CC0 \u0C87\u0CA8\u0CCD ${r.origin}`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CA4\u0CBE\u0CB0\u0CA4\u0CAE\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF. \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${r.options.map(a=>`'${a}'`).join(" | ")}`:"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD";case"invalid_element":return`\u0CB0\u0CB2\u0CCD\u0CB2\u0CBF \u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF ${r.origin}`;default:return"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD"}}};function aw(){return{localeError:cE()}}var uE=()=>{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"},map:{unit:"\uAC1C",verb:"to have"}};function t(r){return e[r]??null}let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",mac:"MAC \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",credit_card:"\uC2E0\uC6A9\uCE74\uB4DC \uBC88\uD638",currency_code:"\uD1B5\uD654 \uCF54\uB4DC",iban:"IBAN",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${r.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${x(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${y(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(r.origin),c=s?.unit??"\uC694\uC18C";return s?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${c} ${o}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${o}${a}`}case"too_small":{let o=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(r.origin),c=s?.unit??"\uC694\uC18C";return s?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${c} ${o}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${o}${a}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[o.format]??r.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${r.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${y(r.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${r.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${r.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function sw(){return{localeError:uE()}}var Xa=e=>e.charAt(0).toUpperCase()+e.slice(1);function cw(e){let t=Math.abs(e),n=t%10,i=t%100;return i>=11&&i<=19||n===0?"many":n===1?"one":"few"}var lE=()=>{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(r,o,a,s){let c=e[r]??null;return c===null?c:{unit:c.unit[o],verb:c.verb[s][a?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",mac:"MAC 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",credit_card:"kredito kortel\u0117s numeris",currency_code:"valiutos kodas",iban:"IBAN",jwt:"JWT",template_literal:"\u012Fvestis"},i={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 r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${r.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${o}`}case"invalid_value":return r.values.length===1?`Privalo b\u016Bti ${x(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${y(r.values,"|")} pasirinkim\u0173`;case"too_big":{let o=i[r.origin]??r.origin,a=t(r.origin,cw(Number(r.maximum)),r.inclusive??!1,"smaller");if(a?.verb)return`${Xa(o??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.maximum.toString()} ${a.unit??"element\u0173"}`;let s=r.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Xa(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${r.maximum.toString()} ${a?.unit}`}case"too_small":{let o=i[r.origin]??r.origin,a=t(r.origin,cw(Number(r.minimum)),r.inclusive??!1,"bigger");if(a?.verb)return`${Xa(o??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.minimum.toString()} ${a.unit??"element\u0173"}`;let s=r.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Xa(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${r.minimum.toString()} ${a?.unit}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${n[o.format]??r.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${r.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${y(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=i[r.origin]??r.origin;return`${Xa(o??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function uw(){return{localeError:lE()}}var dE=()=>{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"},map:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(r){return e[r]??null}let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",mac:"MAC \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",credit_card:"\u0431\u0440\u043E\u0458 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u0447\u043A\u0430",currency_code:"\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${r.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${x(r.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 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${r.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`Invalid ${n[o.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`${r.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"}: ${y(r.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${r.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 ${r.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function lw(){return{localeError:dE()}}var fE=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"},map:{unit:"elemen",verb:"mempunyai"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",credit_card:"nombor kad kredit",currency_code:"kod mata wang",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${s}`:`Input tidak sah: dijangka ${o}, diterima ${s}`}case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${x(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: dijangka ${r.origin??"nilai"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: dijangka ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${n[o.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${y(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`;default:return"Input tidak sah"}}};function dw(){return{localeError:fE()}}var pE=()=>{let e={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},file:{unit:"\u092C\u093E\u0907\u091F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"}};function t(r){return e[r]??null}let n={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0907\u092E\u0947\u0932 \u0920\u0947\u0917\u093E\u0928\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u092E\u093F\u0924\u093F \u0930 \u0938\u092E\u092F",date:"ISO \u092E\u093F\u0924\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u0920\u0947\u0917\u093E\u0928\u093E",ipv6:"IPv6 \u0920\u0947\u0917\u093E\u0928\u093E",mac:"MAC \u0920\u0947\u0917\u093E\u0928\u093E",cidrv4:"IPv4 \u0926\u093E\u092F\u0930\u093E",cidrv6:"IPv6 \u0926\u093E\u092F\u0930\u093E",base64:"base64-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",base64url:"base64url-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0919",e164:"E.164 \u0928\u092E\u094D\u092C\u0930",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0928\u092E\u094D\u092C\u0930",currency_code:"\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",iban:"IBAN",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${o}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${s}`}case"invalid_value":return r.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${x(r.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u0939\u0930\u0942 \u092E\u0927\u094D\u092F\u0947 \u090F\u0915 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${r.origin??"\u092E\u093E\u0928"} \u092E\u093E ${o}${r.maximum.toString()} ${a.unit} ${a.verb}`:`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${r.origin??"\u092E\u093E\u0928"} ${o}${r.maximum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${r.origin} \u092E\u093E ${o}${r.minimum.toString()} ${a.unit} ${a.verb}`:`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${r.origin} ${o}${r.minimum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${o.prefix}" \u092C\u093E\u091F \u0938\u0941\u0930\u0941 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:o.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${o.suffix}" \u092E\u093E \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:o.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${o.includes}" \u0938\u092E\u093E\u0935\u0947\u0936 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:o.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: \u0922\u093E\u0901\u091A\u093E ${o.pattern} \u0938\u0901\u0917 \u092E\u0947\u0932 \u0916\u093E\u0928\u0941\u092A\u0930\u094D\u091B`:`\u0905\u092E\u093E\u0928\u094D\u092F ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: ${r.divisor} \u0915\u094B \u0917\u0941\u0923\u091C \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u091E\u094D\u091C\u0940${r.keys.length>1?"\u0939\u0930\u0942":""}: ${y(r.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u091E\u094D\u091C\u0940: ${r.origin} \u092E\u093E`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${r.options.map(a=>`'${a}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${r.origin} \u092E\u093E`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function fw(){return{localeError:pE()}}var mE=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"},map:{unit:"elementen",verb:"heeft"}};function t(r){return e[r]??null}let n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",mac:"MAC-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",credit_card:"creditcardnummer",currency_code:"valutacode",iban:"IBAN",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${o}, ontving ${s}`}case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${x(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),s=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} is`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),s=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} is`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${n[o.format]??r.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${y(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`;default:return"Ongeldige invoer"}}};function pw(){return{localeError:mE()}}var hE=()=>{let e={string:{unit:"teikn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"element",verb:"\xE5 innehalde"},set:{unit:"element",verb:"\xE5 innehalde"},map:{unit:"element",verb:"\xE5 innehalde"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varigheit",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkoda streng",base64url:"base64url-enkoda streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tal",array:"liste"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventa instanceof ${r.expected}, fekk ${s}`:`Ugyldig input: forventa ${o}, fekk ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventa ${x(r.values[0])}`:`Ugyldig val: forventa eitt av ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`For stor(t): forventa ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()} ${a.unit??"element"}`:`For stor(t): forventa ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`For lite(n): forventa ${r.origin} til \xE5 ha ${o}${r.minimum.toString()} ${a.unit}`:`For lite(n): forventa ${r.origin} til \xE5 ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 slutte med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 innehalde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldig tal: m\xE5 vere eit multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjende n\xF8klar":"Ukjend n\xF8kkel"}: ${y(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}};function mw(){return{localeError:hE()}}var gE=()=>{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"},map:{unit:"elementer",verb:"\xE5 inneholde"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventet instanceof ${r.expected}, fikk ${s}`:`Ugyldig input: forventet ${o}, fikk ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${x(r.values[0])}`:`Ugyldig valg: forventet en av ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${y(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}};function hw(){return{localeError:gE()}}var vE=()=>{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"},map:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",mac:"MAC 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",credit_card:"i'tib\xE2r kart\u0131 numaras\u0131",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`F\xE2sit giren: umulan instanceof ${r.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${s}`}case"invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${x(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=r;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[o.format]??r.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${r.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${r.keys.length>1?"s":""}: ${y(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${r.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function gw(){return{localeError:vE()}}var yE=()=>{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"},map:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",mac:"\u062F MAC \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",credit_card:"\u062F \u06A9\u0631\u06CC\u0689\u06CC\u067C \u06A9\u0627\u0631\u062A \u0634\u0645\u06CC\u0631\u0647",currency_code:"\u062F \u0627\u0633\u0639\u0627\u0631\u0648 \u06A9\u0648\u0689",iban:"IBAN",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${r.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return r.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${x(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${y(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} \u0648\u064A`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[o.format]??r.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${r.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${r.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${y(r.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${r.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 ${r.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function vw(){return{localeError:yE()}}var _E=()=>{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"},map:{unit:"element\xF3w",verb:"mie\u0107"}};function t(r){return e[r]??null}let n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",mac:"adres MAC",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",credit_card:"numer karty kredytowej",currency_code:"kod waluty",iban:"IBAN",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${r.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${s}`}case"invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${x(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[o.format]??r.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${y(r.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${r.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${r.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function yw(){return{localeError:_E()}}var $E=()=>{let e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(a){return e[a]??null}let n={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"o intervalo de endere\xE7os IPv4",cidrv6:"o intervalo de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",currency_code:"o c\xF3digo de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},i={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},r={string:{name:"texto",articles:i.masculine},number:{name:"n\xFAmero",articles:i.masculine},int:{name:"n\xFAmero inteiro",articles:i.masculine},boolean:{name:"valor booleano",articles:i.masculine},bigint:{name:"n\xFAmero bigint",articles:i.masculine},symbol:{name:"s\xEDmbolo",articles:i.masculine},undefined:{name:'valor "undefined"',articles:i.masculine},null:{name:'valor "nulo"',articles:i.masculine},never:{name:'valor "never"',articles:i.masculine},void:{name:'valor "void"',articles:i.masculine},date:{name:"data",articles:i.feminine},array:{name:"vetor",articles:i.masculine},object:{name:"objeto",articles:i.masculine},tuple:{name:"tuplo",articles:i.masculine},record:{name:"registo",articles:i.masculine},map:{name:"mapa",articles:i.masculine},set:{name:"conjunto",articles:i.masculine},file:{name:"ficheiro",articles:i.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:i.masculine},nan:{name:'valor "NaN"',articles:i.masculine},function:{name:"fun\xE7\xE3o",articles:i.feminine}};function o(a,s){let c=r[a]??{name:`valor "${a}"`,articles:i.masculine};return`${c.articles[s]} ${c.name}`}return a=>{switch(a.code){case"invalid_type":{let s=o(a.expected,"indefinite"),c=S(a.input),u=o(c,"indefinite");return`Entrada inv\xE1lida: esperava ${s}, recebeu ${u}`}case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: esperava ${x(a.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${y(a.values,"|")}`;case"too_big":{let s=a.inclusive?"<=":"<",c=t(a.origin);return c?`Demasiado grande: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.maximum.toString()} ${c.unit??"elementos"}`:`Demasiado grande: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.maximum.toString()}`}case"too_small":{let s=a.inclusive?">=":">",c=t(a.origin);return c?`Demasiado pequeno: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.minimum.toString()} ${c.unit??"elementos"}`:`Demasiado pequeno: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.minimum.toString()}`}case"invalid_format":{let s=a;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar por "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar em "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`Formato d${n[s.format]??a.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":{let s=a.keys.length>1?"s":"";return`Chave${s} inv\xE1lida${s}: ${y(a.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;case"invalid_union":return a.options&&Array.isArray(a.options)&&a.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${a.options.map(c=>`'${c}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function _w(){return{localeError:$E()}}var bE=()=>{let e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(a){return e[a]??null}let n={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"a faixa de endere\xE7os IPv4",cidrv6:"a faixa de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",currency_code:"o c\xF3digo de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},i={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},r={string:{name:"texto",articles:i.masculine},number:{name:"n\xFAmero",articles:i.masculine},int:{name:"n\xFAmero inteiro",articles:i.masculine},boolean:{name:"valor booleano",articles:i.masculine},bigint:{name:"n\xFAmero bigint",articles:i.masculine},symbol:{name:"s\xEDmbolo",articles:i.masculine},undefined:{name:'valor "undefined"',articles:i.masculine},null:{name:'valor "nulo"',articles:i.masculine},never:{name:'valor "never"',articles:i.masculine},void:{name:'valor "void"',articles:i.masculine},date:{name:"data",articles:i.feminine},array:{name:"vetor",articles:i.masculine},object:{name:"objeto",articles:i.masculine},tuple:{name:"tupla",articles:i.feminine},record:{name:"registro",articles:i.masculine},map:{name:"mapa",articles:i.masculine},set:{name:"conjunto",articles:i.masculine},file:{name:"arquivo",articles:i.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:i.masculine},nan:{name:'valor "NaN"',articles:i.masculine},function:{name:"fun\xE7\xE3o",articles:i.feminine}};function o(a,s){let c=r[a]??{name:`valor "${a}"`,articles:i.masculine};return`${c.articles[s]} ${c.name}`}return a=>{switch(a.code){case"invalid_type":{let s=o(a.expected,"indefinite"),c=S(a.input),u=o(c,"indefinite");return`Entrada inv\xE1lida: esperava ${s}, recebeu ${u}`}case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: esperava ${x(a.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${y(a.values,"|")}`;case"too_big":{let s=a.inclusive?"<=":"<",c=t(a.origin);return c?`Grande demais: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.maximum.toString()} ${c.unit??"elementos"}`:`Grande demais: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.maximum.toString()}`}case"too_small":{let s=a.inclusive?">=":">",c=t(a.origin);return c?`Pequeno demais: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.minimum.toString()} ${c.unit??"elementos"}`:`Pequeno demais: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.minimum.toString()}`}case"invalid_format":{let s=a;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`Formato d${n[s.format]??a.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":{let s=a.keys.length>1?"s":"";return`Chave${s} inv\xE1lida${s}: ${y(a.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;case"invalid_union":return a.options&&Array.isArray(a.options)&&a.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${a.options.map(c=>`'${c}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function $w(){return{localeError:bE()}}var wE=()=>{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(r){return e[r]??null}let n={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",credit_card:"num\u0103r de card de credit",currency_code:"cod valutar",iban:"IBAN",jwt:"JWT",template_literal:"intrare"},i={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 r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${o}, primit ${s}`}case"invalid_value":return r.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${x(r.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} s\u0103 fie ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Prea mic: a\u0219teptat ca ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${r.origin} s\u0103 fie ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${o.prefix}"`:o.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${o.suffix}"`:o.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${o.includes}"`:o.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${o.pattern}`:`Format invalid: ${n[o.format]??r.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${r.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${y(r.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${r.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${r.origin}`;default:return"Intrare invalid\u0103"}}};function bw(){return{localeError:wE()}}function ww(e,t,n,i){let r=Math.abs(e),o=r%10,a=r%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?n:i}var xE=()=>{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"},map:{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(r){return e[r]??null}let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",mac:"MAC \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",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0439 \u043A\u0430\u0440\u0442\u044B",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${x(r.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 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),c=ww(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${r.maximum.toString()} ${c}`}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 ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),c=ww(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${r.minimum.toString()} ${c}`}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 ${r.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[o.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${r.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0438":""}: ${y(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${r.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 ${r.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 xw(){return{localeError:xE()}}var kE=()=>{let e={string:{unit:"znakov",verb:"ma\u0165"},file:{unit:"bajtov",verb:"ma\u0165"},array:{unit:"prvkov",verb:"ma\u0165"},set:{unit:"prvkov",verb:"ma\u0165"},map:{unit:"polo\u017Eiek",verb:"ma\u0165"}};function t(r){return e[r]??null}let n={regex:"regul\xE1rny 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:"d\xE1tum a \u010Das vo form\xE1te ISO",date:"d\xE1tum vo form\xE1te ISO",time:"\u010Das vo form\xE1te ISO",duration:"doba trvania ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64",base64url:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64url",json_string:"re\u0165azec vo form\xE1te JSON",e164:"\u010D\xEDslo E.164",credit_card:"\u010D\xEDslo kreditnej karty",currency_code:"k\xF3d meny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"re\u0165azec",function:"funkcia",array:"pole"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 instanceof ${r.expected}, obdr\u017Ean\xE9 ${s}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${o}, obdr\u017Ean\xE9 ${s}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${x(r.values[0])}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE1 jedna z hodn\xF4t ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${r.origin??"hodnota"} mus\xED ma\u0165 ${o}${r.maximum.toString()} ${a.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${r.origin??"hodnota"} mus\xED by\u0165 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Hodnota je pr\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED ma\u0165 ${o}${r.minimum.toString()} ${a.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED by\u0165 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neplatn\xFD re\u0165azec: mus\xED za\u010D\xEDna\u0165 na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD re\u0165azec: mus\xED kon\u010Di\u0165 na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD re\u0165azec: mus\xED obsahova\u0165 "${o.includes}"`:o.format==="regex"?`Neplatn\xFD re\u0165azec: mus\xED zodpoveda\u0165 vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${n[o.format]??r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED by\u0165 n\xE1sobkom ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1me kl\xFA\u010De: ${y(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xFA\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}};function kw(){return{localeError:kE()}}var SE=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"},map:{unit:"elementov",verb:"imeti"}};function t(r){return e[r]??null}let n={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",mac:"MAC naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",credit_card:"\u0161tevilka kreditne kartice",currency_code:"koda valute",iban:"IBAN",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${r.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${s}`}case"invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${x(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${o}${r.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${o}${r.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${n[o.format]??r.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${y(r.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${r.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`;default:return"Neveljaven vnos"}}};function Sw(){return{localeError:SE()}}var IE=()=>{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"},map:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(r){return e[r]??null}let n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-adress",ipv6:"IPv6-adress",mac:"MAC-adress",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",credit_card:"kreditkortsnummer",currency_code:"valutakod",iban:"IBAN",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${r.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${s}`}case"invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${x(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${n[o.format]??r.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${y(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${r.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function Iw(){return{localeError:IE()}}var zE=()=>{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"},map:{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(r){return e[r]??null}let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",mac:"MAC \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",credit_card:"\u0B95\u0B9F\u0BA9\u0BCD \u0B85\u0B9F\u0BCD\u0B9F\u0BC8 \u0B8E\u0BA3\u0BCD",currency_code:"\u0BA8\u0BBE\u0BA3\u0BAF\u0B95\u0BCD \u0B95\u0BC1\u0BB1\u0BBF\u0BAF\u0BC0\u0B9F\u0BC1",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.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 ${r.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}case"invalid_value":return r.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 ${x(r.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 ${y(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${r.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${o}${r.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${o}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${r.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${r.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${y(r.keys,", ")}`;case"invalid_key":return`${r.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`${r.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 zw(){return{localeError:zE()}}var PE=()=>{let e={string:{unit:"\u0430\u043B\u043E\u043C\u0430\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},file:{unit:"\u0431\u0430\u0439\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},array:{unit:"\u0443\u043D\u0441\u0443\u0440",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},set:{unit:"\u0443\u043D\u0441\u0443\u0440",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},map:{unit:"\u0441\u0430\u0431\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0443\u0440\u0443\u0434",email:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 email",url:"URL",emoji:"\u044D\u043C\u043E\u04B7\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0441\u0430\u043D\u0430\u0432\u0443 \u0432\u0430\u049B\u0442\u0438 ISO",date:"\u0441\u0430\u043D\u0430\u0438 ISO",time:"\u0432\u0430\u049B\u0442\u0438 ISO",duration:"\u0434\u0430\u0432\u043E\u043C\u043D\u043E\u043A\u0438\u0438 ISO",ipv4:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv4",ipv6:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv6",mac:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 MAC",cidrv4:"\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv4",cidrv6:"\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv6",base64:"\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64",base64url:"\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64url",json_string:"\u0441\u0430\u0442\u0440\u0438 JSON",e164:"\u0440\u0430\u049B\u0430\u043C\u0438 E.164",credit_card:"\u0440\u0430\u049B\u0430\u043C\u0438 \u043A\u043E\u0440\u0442\u0438 \u043A\u0440\u0435\u0434\u0438\u0442\u04E3",currency_code:"\u0440\u0430\u043C\u0437\u0438 \u0430\u0441\u044A\u043E\u0440",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0443\u0440\u0443\u0434"},i={nan:"NaN",number:"\u0440\u0430\u049B\u0430\u043C",string:"\u0441\u0430\u0442\u0440",array:"\u043C\u0430\u0441\u0441\u0438\u0432",object:"\u043E\u0431\u044A\u0435\u043A\u0442",date:"\u0441\u0430\u043D\u0430"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return`\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${o} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442, ${s} \u0433\u0438\u0440\u0438\u0444\u0442\u0430 \u0448\u0443\u0434`}case"invalid_value":return r.values.length===1?`\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${x(r.values[0])} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`:`\u0418\u043D\u0442\u0438\u0445\u043E\u0431\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u044F\u043A\u0435 \u0430\u0437 ${y(r.values,"|")} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${r.origin??"\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${o}${r.maximum.toString()} ${a.unit} ${a.verb}`:`\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${r.origin??"\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${o}${r.maximum.toString()} \u0431\u043E\u0448\u0430\u0434`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${r.origin} \u0431\u043E\u044F\u0434 ${o}${r.minimum.toString()} ${a.unit} ${a.verb}`:`\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${r.origin} \u0431\u043E\u044F\u0434 ${o}${r.minimum.toString()} \u0431\u043E\u0448\u0430\u0434`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${o.prefix}" \u043E\u0493\u043E\u0437 \u0448\u0430\u0432\u0430\u0434`:o.format==="ends_with"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${o.suffix}" \u0430\u043D\u04B7\u043E\u043C \u0451\u0431\u0430\u0434`:o.format==="includes"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 "${o.includes}"-\u0440\u043E \u0434\u0430\u0440 \u0431\u0430\u0440 \u0433\u0438\u0440\u0430\u0434`:o.format==="regex"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 \u043D\u0430\u043C\u0443\u043D\u0430\u0438 ${o.pattern} \u043C\u0443\u0432\u043E\u0444\u0438\u049B\u0430\u0442 \u043A\u0443\u043D\u0430\u0434`:`${n[o.format]??r.format}-\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442`}case"not_multiple_of":return`\u0420\u0430\u049B\u0430\u043C\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 ${r.divisor} \u0431\u0435 \u0431\u0430\u049B\u0438\u044F \u0442\u0430\u049B\u0441\u0438\u043C \u0448\u0430\u0432\u0430\u0434`;case"unrecognized_keys":return`\u041A\u0430\u043B\u0438\u0434${r.keys.length>1?"\u04B3\u043E\u0438":"\u0438"} \u043D\u043E\u043C\u0430\u044A\u043B\u0443\u043C: ${y(r.keys,", ")}`;case"invalid_key":return`\u041A\u0430\u043B\u0438\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${r.origin}`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442\u0438 \u0434\u0438\u0441\u043A\u0440\u0438\u043C\u0438\u043D\u0430\u0442\u043E\u0440: ${r.options.map(a=>`'${a}'`).join(" | ")} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`:"\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442";case"invalid_element":return`\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${r.origin}`;default:return"\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442"}}};function Pw(){return{localeError:PE()}}var TE=()=>{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"},map:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(r){return e[r]??null}let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",mac:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 MAC",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)",credit_card:"\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E25\u0E02\u0E1A\u0E31\u0E15\u0E23\u0E40\u0E04\u0E23\u0E14\u0E34\u0E15",currency_code:"\u0E23\u0E2B\u0E31\u0E2A\u0E2A\u0E01\u0E38\u0E25\u0E40\u0E07\u0E34\u0E19",iban:"IBAN",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={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 r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.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 ${r.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${o} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}case"invalid_value":return r.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${x(r.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 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.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 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[o.format]??r.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 ${r.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: ${y(r.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.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 ${r.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function Tw(){return{localeError:TE()}}var EE=()=>{let e={string:{unit:"simwol",verb:"bolmaly"},file:{unit:"ba\xFDt",verb:"bolmaly"},array:{unit:"elementler",verb:"bolmaly"},set:{unit:"elementler",verb:"bolmaly"},map:{unit:"elementler",verb:"bolmaly"}};function t(r){return e[r]??null}let n={regex:"giri\u015F",email:"e-po\xE7ta salgysy",url:"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 sene we wagt",date:"ISO sene",time:"ISO wagt",duration:"ISO wagt aralygy",ipv4:"IPv4 salgysy",ipv6:"IPv6 salgysy",mac:"MAC salgysy",cidrv4:"IPv4 aralygy",cidrv6:"IPv6 aralygy",base64:"base64 bilen \u015Fifrlenen setir",base64url:"base64url bilen \u015Fifrlenen setir",json_string:"JSON setiri",e164:"E.164 nomeri",credit_card:"kredit kartyny\u0148 nomeri",currency_code:"wal\xFDuta kody",iban:"IBAN",jwt:"JWT",template_literal:"\u015Fablon"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return`N\xE4dogry baha: gara\u015Fylan ${o} \xFDerine ${s} alyndy`}case"invalid_value":return r.values.length===1?`N\xE4dogry baha: ${x(r.values[0])} bolmaly`:`N\xE4dogry sa\xFDlaw: a\u015Fakdakylardan biri bolmaly: ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Has uly: gara\u015Fyl\xFDan ${r.origin??"baha"} ${o} ${r.maximum.toString()} ${a.unit??"element"}`:`Has uly: gara\u015Fyl\xFDan ${r.origin??"baha"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Has ki\xE7i: gara\u015Fyl\xFDan ${r.origin} ${o} ${r.minimum.toString()} ${a.unit}`:`Has ki\xE7i: gara\u015Fyl\xFDan ${r.origin} ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`N\xE4dogry setir: "${o.prefix}" bilen ba\u015Flamaly`:o.format==="ends_with"?`N\xE4dogry setir: "${o.suffix}" bilen gutarmaly`:o.format==="includes"?`N\xE4dogry setir: "${o.includes}" saklamaly`:o.format==="regex"?`N\xE4dogry setir: ${o.pattern} nusga la\xFDyk bolmaly`:`N\xE4dogry ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xE4dogry san: ${r.divisor} bilen galyndysyz b\xF6l\xFCnmeli`;case"unrecognized_keys":return`Tanalma\xFDan a\xE7ar${r.keys.length>1?"lar":""}: ${y(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7inde n\xE4dogry a\xE7ar`;case"invalid_union":return"N\xE4dogry baha";case"invalid_element":return`${r.origin} i\xE7inde n\xE4dogry baha`;default:return"N\xE4dogry baha"}}};function Ew(){return{localeError:EE()}}var OE=()=>{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"},map:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(r){return e[r]??null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",mac:"MAC 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",credit_card:"kredi kart\u0131 numaras\u0131",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${r.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${s}`}case"invalid_value":return r.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${x(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[o.format]??r.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${r.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${r.keys.length>1?"lar":""}: ${y(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${r.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function Ow(){return{localeError:OE()}}var jE=()=>{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"},map:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",mac:"\u0430\u0434\u0440\u0435\u0441\u0430 MAC",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",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0457 \u043A\u0430\u0440\u0442\u043A\u0438",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u0438",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.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 ${r.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${o}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}case"invalid_value":return r.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 ${x(r.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 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} \u0431\u0443\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[o.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0456":""}: ${y(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${r.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 ${r.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 Al(){return{localeError:jE()}}function jw(){return Al()}var NE=()=>{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"},map:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(r){return e[r]??null}let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",mac:"\u0627\u06CC\u0645 \u0627\u06D2 \u0633\u06CC \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",credit_card:"\u06A9\u0631\u06CC\u0688\u0679 \u06A9\u0627\u0631\u0688 \u0646\u0645\u0628\u0631",currency_code:"\u06A9\u0631\u0646\u0633\u06CC \u06A9\u0648\u0688",iban:"IBAN",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${r.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${x(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${y(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${o}${r.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u0627 ${o}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${r.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${r.keys.length>1?"\u0632":""}: ${y(r.keys,"\u060C ")}`;case"invalid_key":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function Nw(){return{localeError:NE()}}var AE=()=>{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(r){return e[r]??null}let n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",credit_card:"kredit karta raqami",currency_code:"valyuta kodi",iban:"IBAN",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${s}`}case"invalid_value":return r.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${x(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[o.format]??r.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${r.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${r.keys.length>1?"lar":""}: ${y(r.keys,", ")}`;case"invalid_key":return`${r.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${r.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function Aw(){return{localeError:AE()}}var DE=()=>{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"},map:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(r){return e[r]??null}let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",mac:"\u0111\u1ECBa ch\u1EC9 MAC",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",credit_card:"s\u1ED1 th\u1EBB t\xEDn d\u1EE5ng",currency_code:"m\xE3 ti\u1EC1n t\u1EC7",iban:"IBAN",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${r.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${x(r.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${n[o.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${y(r.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.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 ${r.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function Dw(){return{localeError:DE()}}var RE=()=>{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"},map:{unit:"\u9879",verb:"\u5305\u542B"}};function t(r){return e[r]??null}let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",mac:"MAC\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",credit_card:"\u4FE1\u7528\u5361\u53F7",currency_code:"\u8D27\u5E01\u4EE3\u7801",iban:"IBAN",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${r.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${x(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${n[o.format]??r.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${r.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${y(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${r.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function Rw(){return{localeError:RE()}}var CE=()=>{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"},map:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(r){return e[r]??null}let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",mac:"MAC \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",credit_card:"\u4FE1\u7528\u5361\u865F",currency_code:"\u8CA8\u5E63\u4EE3\u78BC",iban:"IBAN",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${r.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${x(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${r.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${r.keys.length>1?"\u5011":""}\uFF1A${y(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function Cw(){return{localeError:CE()}}var UE=()=>{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"},map:{unit:"nkan",verb:"n\xED"}};function t(r){return e[r]??null}let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",mac:"\xE0d\xEDr\u1EB9\u0301s\xEC MAC",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",credit_card:"n\u1ECDmba kaadi gbese",currency_code:"koodu ow\xF3",iban:"IBAN",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${r.expected}, \xE0m\u1ECD\u0300 a r\xED ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${x(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin??"iye"} ${a.verb} ${o}${r.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.maximum}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${a.verb} ${o}${r.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.minimum}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${n[o.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${y(r.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.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 ${r.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function Uw(){return{localeError:UE()}}var Zw,vh=Symbol("ZodOutput"),yh=Symbol("ZodInput"),Dl=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let i=n[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){let n=t._zod.parent;if(n){let i={...this.get(n)??{}};delete i.id;let r={...i,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Rl(){return new Dl}(Zw=globalThis).__zod_globalRegistry??(Zw.__zod_globalRegistry=Rl());var Qe=globalThis.__zod_globalRegistry;var yt=Symbol.for("zod.compile.invalid"),Mw=Symbol.for("zod.compile.fallback"),sr=class extends Error{constructor(t="z.compile does not support async refinements, transforms, or checks"){super(t),this.name="ZodCompileAsyncError"}},ce=class extends Error{constructor(t,n=!0){super(`z.compile does not support ${t}; this schema must use the runtime parser`),this.name="ZodCompileUnsupportedError",this.islandable=n}};function ME(e,t){try{return Ul(e,{assertOnly:!0})}catch{return t}}function wh(e,t){try{let n=Ul(e),i=Cl(e,n);return i._zod.bag.validator=ME(e,n),i}catch(n){if(t?.strict)throw n;return e}}function Cl(e,t){if(El(e))throw new ce("a schema whose subtree contains a reference cycle");let n=he(e),i=e._zod.run,r=i.__originalRun??i,o=(a,s)=>{if(s?.async||s?.direction==="backward"||s?.skipChecks||s?.[Mw]||s&&Ol(s,a.value))return r(a,s);let c=t(a.value);return c!==yt?(a.value=c,a):(s&&(s[Mw]=!0),r(a,s))};return o.__originalRun=r,n._zod.bag.fallbackRun=r,n._zod.bag.validator=t,n._zod.run=o,i.__originalRun||LE(n,e,t),n}function LE(e,t,n){let i=e,r=t;if(typeof r.safeParse=="function"){let o=r.safeParse;i.safeParse=(a,s)=>{let c=n(a);return c!==yt?{success:!0,data:c}:o(a,s)}}if(typeof r.parse=="function"){let o=r.parse;i.parse=(a,s)=>{let c=n(a);return c!==yt?c:o(a,s)}}}function Ul(e,t){let n=!0;try{n=El(e)}catch{}if(n)throw new ce("a schema whose subtree contains a reference cycle");let i={constants:new Map,constantCounter:0,varCounter:0,definite:!0},r=new Mn(["input"]),o=Re(r,i,e,"input",!t?.assertOnly);r.write(o===null?"return true;":`return ${o};`);let a=["INVALID",...i.constants.keys()],s=[yt,...i.constants.values()],c=r.content.join(`
|
|
66
66
|
`),u=t?.debug?a.length>0?`// Constants: ${a.join(", ")}
|
|
67
67
|
${c}`:c:"",l=Function,d=`return (input) => {
|
|
68
68
|
${c}
|
|
69
|
-
}`,f;try{f=new l(...a,d)(...s)}catch(p){throw new ce(`this schema (generated code failed to evaluate: ${p.message})`)}return t?.debug&&(f.code=u),f.definite=i.definite,f}function J(e,t){for(let[i,r]of e.constants)if(r===t)return i;let n=`c${e.constantCounter++}`;return e.constants.set(n,t),n}function Ln(e,t){return e.definite=!1,J(e,t)}function q(e){return`v${e.varCounter++}`}function NO(e,t){let n=e._zod.run({value:t,issues:[]},{});if(n&&typeof n.then=="function")return yt;let i=n;return i.issues.length===0?i.value:yt}function ct(e,t,n,i,r=!0){let o=e.content.length,a=t.constants.size,s=t.constantCounter,c=t.varCounter;try{return Ae(e,t,n,i,r)}catch(u){if(!(u instanceof ce)||!u.islandable)throw u;if(e.content.length=o,t.constants.size>a){let l=Array.from(t.constants.keys()).slice(a);for(let d of l)t.constants.delete(d)}return t.constantCounter=s,t.varCounter=c,AO(e,t,n,i)}}function AO(e,t,n,i){t.definite=!1;let r=J(t,n),o=J(t,NO),a=q(t);return e.write(`const ${a} = ${o}(${r}, ${i});`),e.write(`if (${a} === INVALID) return INVALID;`),a}var DO=new Set(["max_size","min_size","size_equals","max_length","min_length","length_equals"]);function RO(e,t,n,i){let r=n._zod.def.checks;if(!r||r.length===0)return i;let o=i;for(let a of r){let s=a._zod.def;if(s.when&&!DO.has(s.check))throw new ce('check with a custom "when" condition');switch(s.check){case"greater_than":CO(e,t,s,o);break;case"less_than":UO(e,t,s,o);break;case"multiple_of":ZO(e,t,s,o);break;case"number_format":Vw(e,s,o);break;case"min_length":{let c=rn(s.minimum,"min_length"),u=hh(e,t,o,`${o}.length >= ${c} && ${o}.length < ${s.minimum*2}`);e.write(`if (${u} < ${c}) return INVALID;`);break}case"max_length":{let c=rn(s.maximum,"max_length"),u=hh(e,t,o,`${o}.length > ${c}`);e.write(`if (${u} > ${c}) return INVALID;`);break}case"length_equals":{let c=rn(s.length,"length_equals"),u=hh(e,t,o,`${o}.length >= ${c} && ${o}.length <= ${s.length*2}`);e.write(`if (${u} !== ${c}) return INVALID;`);break}case"min_size":e.write(`if (${o}.size < ${rn(s.minimum,"min_size")}) return INVALID;`);break;case"max_size":e.write(`if (${o}.size > ${rn(s.maximum,"max_size")}) return INVALID;`);break;case"size_equals":e.write(`if (${o}.size !== ${rn(s.size,"size_equals")}) return INVALID;`);break;case"string_format":o=Fw(e,t,s,o);break;case"custom":o=BO(e,t,a,o);break;case"bigint_format":MO(e,s,o);break;case"mime_type":LO(e,t,s,o);break;case"property":FO(e,t,s,o);break;case"properties":VO(e,t,s,o);break;case"overwrite":{let c=q(t);qO(e,t,a,o,c),o=c;break}default:throw new ce(`check type ${s.check}`)}}return o}function hh(e,t,n,i){let r=J(t,Dn),o=q(t);return e.write(`const ${o} = typeof ${n} === "string" && ${i} ? ${r}(${n}) : ${n}.length;`),o}function rn(e,t){if(typeof e!="number"||!Number.isFinite(e))throw new ce(`${t} bound of type ${typeof e}`);return`${e}`}function Lw(e,t){if(typeof t=="bigint")return`${t}n`;if(typeof t=="number"){if(Number.isNaN(t))throw new ce("comparison check with NaN bound");return`${t}`}if(t instanceof Date){if(Number.isNaN(t.getTime()))throw new ce("comparison check with Invalid Date bound");return J(e,t)}throw new ce(`comparison check bound of type ${typeof t}`)}function CO(e,t,n,i){let r=n.inclusive?"<":"<=";e.write(`if (${i} ${r} ${Lw(t,n.value)}) return INVALID;`)}function UO(e,t,n,i){let r=n.inclusive?">":">=";e.write(`if (${i} ${r} ${Lw(t,n.value)}) return INVALID;`)}function ZO(e,t,n,i){if(typeof n.value=="bigint"){if(n.value===BigInt(0))throw new ce("multiple_of check with a zero divisor");e.write(`if (${i} % ${n.value}n !== 0n) return INVALID;`)}else{let r=J(t,$a);e.write(`if (${r}(${i}, ${rn(n.value,"multiple_of")}) !== 0) return INVALID;`)}}function Vw(e,t,n){let i=t.format;switch(i){case"safeint":e.write(`if (!Number.isSafeInteger(${n})) return INVALID;`);break;case"int32":e.write(`if (!Number.isInteger(${n}) || ${n} < -2147483648 || ${n} > 2147483647) return INVALID;`);break;case"uint32":e.write(`if (!Number.isInteger(${n}) || ${n} < 0 || ${n} > 4294967295) return INVALID;`);break;case"float32":e.write(`if (!Number.isFinite(${n}) || ${n} < -3.4028234663852886e38 || ${n} > 3.4028234663852886e38) return INVALID;`);break;case"float64":e.write(`if (!Number.isFinite(${n})) return INVALID;`);break;default:throw new ce(`number format ${i}`)}}function MO(e,t,n){let i=t.format;if(i)switch(i){case"int64":e.write(`if (${n} < -9223372036854775808n || ${n} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${n} < 0n || ${n} > 18446744073709551615n) return INVALID;`);break;default:throw new ce(`bigint format ${i}`)}}function LO(e,t,n,i){let r=n.mime;if(r&&r.length>0){let o=J(t,new Set(r));e.write(`if (!${o}.has(${i}.type)) return INVALID;`)}}function VO(e,t,n,i){if(n.when)throw new ce('check with a custom "when" condition');e.write(`if (${i} == null) return INVALID;`);let r=n.shape;for(let o of Reflect.ownKeys(r)){let a=typeof o=="symbol"?J(t,o):gt(o),s=q(t);e.write(`const ${s} = ${i}[${a}];`),ct(e,t,r[o],s,!1)}}function FO(e,t,n,i){let r=`${i}[${JSON.stringify(n.property)}]`;Ae(e,t,n.schema,r)}function qO(e,t,n,i,r){let o=n._zod.def.tx;if(!o)throw new ce("overwrite check without a transform function");if(Vn(o))throw new sr("z.compile: async overwrite transforms are not supported");let a=J(t,o);e.write(`const ${r} = ${a}(${i});`)}function gh(){throw new Pt}function _h(e){this.issues.push(e)}function BO(e,t,n,i){let r=n._zod.def;if(r.fn){if(Vn(r.fn))throw new sr("z.compile: async .refine() predicates are not supported");let o=Ln(t,r.fn),a=J(t,gh),s=q(t);return e.write(`const ${s} = ${o}(${i});`),e.write(`if (${s} instanceof Promise) ${a}();`),e.write(`if (!${s}) return INVALID;`),i}if(n._zod.check){if(Vn(n._zod.check))throw new sr("z.compile: async .superRefine() / check functions are not supported");let o=n._zod.check,s=Ln(t,u=>{let l={value:u,issues:[],addIssue:_h};return o(l)instanceof Promise&&gh(),l.issues.length===0?l.value:yt}),c=q(t);return e.write(`const ${c} = ${s}(${i});`),e.write(`if (${c} === INVALID) return INVALID;`),c}throw new ce("custom check without a predicate or check function")}var HO=new Set(["cidrv4","cuid","cuid2","date","datetime","duration","e164","email","emoji","ends_with","guid","includes","ipv4","ksuid","lowercase","mac","nanoid","regex","starts_with","time","ulid","uppercase","uuid","xid"]);function Fw(e,t,n,i,r=!0){let o=n.format;if(o==="base64"){let u=J(t,Ca);return e.write(`if (!${u}(${i})) return INVALID;`),i}if(o==="base64url"){let u=J(t,Ou);return e.write(`if (!${u}(${i})) return INVALID;`),i}if(o==="jwt"){let u=J(t,Cu),l=J(t,n.alg??null);return e.write(`if (!${u}(${i}, ${l})) return INVALID;`),i}if(o==="ipv6"){let u=J(t,Ra);return e.write(`if (!${u}(${i})) return INVALID;`),i}if(o==="cidrv6"){let u=J(t,Iu);return e.write(`if (!${u}(${i})) return INVALID;`),i}if(o==="credit_card"){let u=J(t,Nu);return e.write(`if (!${u}(${i})) return INVALID;`),i}if(o==="iban"){let u=J(t,Du);return e.write(`if (!${u}(${i})) return INVALID;`),i}let a=n;if(o==="url"||o==="httpurl"||a.normalize||a.hostname!==void 0||a.protocol!==void 0){let u=J(t,du),l=J(t,n),d=q(t),f=q(t);if(e.write(`const ${d} = ${i}.trim();`),e.write(`const ${f} = ${u}(${d}, ${l});`),e.write(`if (typeof ${f} === "number") return INVALID;`),a.hostname!==void 0){let h=J(t,fu);e.write(`if (!${h}(${f}, ${l}.hostname)) return INVALID;`)}if(a.protocol!==void 0){let h=J(t,pu);e.write(`if (!${h}(${f}, ${l}.protocol)) return INVALID;`)}if(!r)return null;let p=q(t),m=a.normalize?`${f}.href`:`${J(t,Da)}(${d})`;return e.write(`const ${p} = ${m};`),p}let s=n.fn;if(s){if(Vn(s))throw new ce(`async string format ${o}`);let u=J(t,s);return e.write(`if (!${u}(${i})) return INVALID;`),i}if(HO.has(o)&&n.pattern){let u=J(t,n.pattern);return e.write(`${u}.lastIndex = 0;`),e.write(`if (!${u}.test(${i})) return INVALID;`),i}let c=n.format;switch(c){case"regex":throw new ce("regex format without a pattern");case"lowercase":e.write(`if (${i} !== ${i}.toLowerCase()) return INVALID;`);break;case"uppercase":e.write(`if (${i} !== ${i}.toUpperCase()) return INVALID;`);break;case"includes":e.write(`if (!${i}.includes(${gt(n.includes)})) return INVALID;`);break;case"starts_with":{let u=n.prefix;e.write(`if (${i}.slice(0, ${u.length}) !== ${gt(u)}) return INVALID;`);break}case"ends_with":{let u=n.suffix;e.write(`if (${i}.slice(-${u.length}) !== ${gt(u)}) return INVALID;`);break}default:throw new ce(`string format ${c}`)}return i}function Ae(e,t,n,i,r=!0){let o=n._zod.def,a=o.type;if(o.coerce)throw new ce(`coercion (z.coerce.${a}())`);let s=r||!!o.checks?.length,c;switch(a){case"string":c=JO(e,t,n,i,s);break;case"number":c=KO(e,n,i);break;case"boolean":c=GO(e,i);break;case"bigint":c=WO(e,n,i);break;case"symbol":c=XO(e,i);break;case"undefined":c=YO(e,i);break;case"null":c=QO(e,i);break;case"any":case"unknown":c=i;break;case"never":e.write("return INVALID;"),c=i;break;case"void":c=ej(e,i);break;case"nan":c=tj(e,i);break;case"date":c=rj(e,i);break;case"object":c=nj(e,t,n,i,s);break;case"optional":c=ij(e,t,n,i,s);break;case"nullable":c=sj(e,t,n,i,s);break;case"array":c=cj(e,t,n,i,s);break;case"literal":c=uj(e,t,n,i);break;case"enum":c=lj(e,t,n,i);break;case"readonly":{let u=Uw(e,t,n,i),l=q(t);e.write(`const ${l} = Object.freeze(${u});`),c=l;break}case"success":Uw(e,t,n,i),c="true";break;case"default":case"prefault":c=dj(e,t,n,i);break;case"nonoptional":c=fj(e,t,n,i);break;case"tuple":c=pj(e,t,n,i);break;case"union":c=mj(e,t,n,i);break;case"intersection":c=vj(e,t,n,i);break;case"record":c=yj(e,t,n,i);break;case"map":c=$j(e,t,n,i);break;case"set":c=bj(e,t,n,i);break;case"file":c=wj(e,i);break;case"template_literal":c=kj(e,t,n,i);break;case"lazy":c=xj(e,t,n,i);break;case"pipe":c=Sj(e,t,n,i);break;case"custom":c=Ij(e,t,n,i);break;case"transform":c=Tj(e,t,n,i);break;case"catch":c=Pj(e,t,n,i);break;default:throw new ce(`schema type ${a}`)}return c===null?null:RO(e,t,n,c)}function JO(e,t,n,i,r=!0){e.write(`if (typeof ${i} !== "string") return INVALID;`);let o=n._zod.def;return o.format===void 0?i:Fw(e,t,o,i,r)}function KO(e,t,n){e.write(`if (typeof ${n} !== "number" || !Number.isFinite(${n})) return INVALID;`);let i=t._zod.def;return i.check==="number_format"&&i.format&&Vw(e,{format:i.format},n),n}function GO(e,t){return e.write(`if (typeof ${t} !== "boolean") return INVALID;`),t}function WO(e,t,n){e.write(`if (typeof ${n} !== "bigint") return INVALID;`);let i=t._zod.def;if(i.format)switch(i.format){case"int64":e.write(`if (${n} < -9223372036854775808n || ${n} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${n} < 0n || ${n} > 18446744073709551615n) return INVALID;`);break}return n}function XO(e,t){return e.write(`if (typeof ${t} !== "symbol") return INVALID;`),t}function YO(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function QO(e,t){return e.write(`if (${t} !== null) return INVALID;`),t}function ej(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function tj(e,t){return e.write(`if (typeof ${t} !== "number" || !Number.isNaN(${t})) return INVALID;`),t}function rj(e,t){return e.write(`if (!(${t} instanceof Date) || Number.isNaN(${t}.getTime())) return INVALID;`),t}function nj(e,t,n,i,r=!0){let o=n._zod.def;e.write(`if (typeof ${i} !== "object" || ${i} === null || Array.isArray(${i})) return INVALID;`);let a=o.shape,s=Object.keys(a),c=Object.getOwnPropertySymbols(a),u=c.length?[...s,...c]:s,l=$=>typeof $=="symbol"?J(t,$):gt($),d=$=>typeof $=="symbol"?`[${l($)}]`:gt($),f=a;if(s.includes("__proto__"))throw new ce('object shape key "__proto__"');let p=new Map;for(let $ of u){let x=f[$],O=l($),T=q(t);if(e.write(`const ${T} = ${i}[${O}];`),x._zod.optin!==void 0){let C=q(t);e.write(`let ${C} = (() => {`),e.indented(G=>{let Q=ct(G,t,x,T);G.write(`return ${Q};`)}),e.write("})();"),x._zod.optout==="optional"?(e.write(`if (${C} === INVALID) {`),e.indented(G=>{G.write(`if (${O} in ${i}) return INVALID;`),G.write(`${C} = undefined;`)}),e.write("}")):e.write(`if (${C} === INVALID) return INVALID;`),p.set($,C)}else{aj(x)&&e.write(`if (!(${O} in ${i})) return INVALID;`);let C=ct(e,t,x,T,r);C!==null&&p.set($,C)}}let m=o.catchall,h="none";if(m){let $=m._zod.def.type;if($==="never"){let x=s.map(O=>`k !== ${gt(O)}`).join(" && ")||"true";e.write(`for (const k in ${i}) {`),e.indented(O=>{O.write(`if (${x}) return INVALID;`)}),e.write("}")}else($==="unknown"||$==="any")&&!m._zod.def.checks?.length?h="passthrough":h="schema"}let g=q(t),_=u.some($=>Cw(f[$])||vh(f[$]));if(!r){if(h==="schema"){let $=s.length>0?J(t,new Set(s)):null;e.write(`for (const k in ${i}) {`),e.indented(x=>{x.write('if (k === "__proto__") continue;'),$&&x.write(`if (${$}.has(k)) continue;`);let O=q(t);x.write(`const ${O} = ${i}[k];`),ct(x,t,m,O,!1)}),e.write("}")}return null}if(_){e.write(`const ${g} = {};`);for(let $ of u){let x=l($),O=p.get($);vh(f[$])?e.write(`if (${x} in ${i}) ${g}[${x}] = ${O};`):Cw(f[$])?e.write(`if (${O} !== undefined || ${x} in ${i}) ${g}[${x}] = ${O};`):e.write(`${g}[${x}] = ${O};`)}}else{let $=u.map(x=>`${d(x)}: ${p.get(x)}`).join(", ");e.write(`const ${g} = { ${$} };`)}if(h!=="none"){let $=s.length>0?J(t,new Set(s)):null;e.write(`for (const k in ${i}) {`),e.indented(x=>{if(x.write('if (k === "__proto__") continue;'),$&&x.write(`if (${$}.has(k)) continue;`),h==="passthrough")x.write(`${g}[k] = ${i}[k];`);else{let O=q(t);x.write(`const ${O} = ${i}[k];`);let T=ct(x,t,m,O);x.write(`${g}[k] = ${T};`)}}),e.write("}")}return g}function ij(e,t,n,i,r=!0){let o=n._zod.def;if(oj(n))return Ae(e,t,o.innerType,i,r);if(o.innerType._zod.optin==="defaulted"){let s=q(t),c=q(t);return e.write(`let ${s};`),e.write(`if (${i} === undefined) {`),e.indented(u=>{u.write(`const ${c} = (() => {`),u.indented(l=>{let d=Ae(l,t,o.innerType,i);l.write(`return ${d};`)}),u.write("})();"),u.write(`if (${c} !== INVALID) ${s} = ${c};`)}),e.write("} else {"),e.indented(u=>{let l=Ae(u,t,o.innerType,i);u.write(`${s} = ${l};`)}),e.write("}"),s}let a=r?q(t):null;return a&&e.write(`let ${a};`),e.write(`if (${i} !== undefined) {`),e.indented(s=>{let c=Ae(s,t,o.innerType,i,r);a&&c!==null&&s.write(`${a} = ${c};`)}),e.write("}"),a}function oj(e){return e._zod.traits?.has("$ZodExactOptional")===!0}function aj(e){return e._zod.optin===void 0&&Mn(e)}function Mn(e){if(e._zod.def.coerce)return!0;let t=e._zod.def;switch(t.type){case"any":case"unknown":case"undefined":case"void":case"default":case"prefault":case"transform":case"custom":case"lazy":return!0;case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"never":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":return!1;case"nonoptional":return t.innerType?Mn(t.innerType):!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":case"nullable":case"readonly":case"success":return t.innerType?Mn(t.innerType):!0;case"catch":return!0;case"union":return t.options?t.options.some(Mn):!0;case"intersection":return!t.left||!t.right?!0:Mn(t.left)&&Mn(t.right);case"pipe":return t.in?Mn(t.in):!0;default:return!0}}function vh(e){return e._zod.optin==="optional"&&e._zod.optout==="optional"}function Cw(e){return(e._zod.optin!=="defaulted"||e._zod.optout==="optional")&&ro(e)}function ro(e){let t=e._zod.def;switch(t.type){case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":case"never":case"success":return!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":return!0;case"nullable":case"readonly":case"nonoptional":return t.innerType?ro(t.innerType):!0;case"union":return t.options?t.options.some(ro):!0;case"intersection":return!t.left||!t.right||ro(t.left)||ro(t.right);case"pipe":return t.out?ro(t.out):!0;default:return!0}}function sj(e,t,n,i,r=!0){let o=n._zod.def,a=r?q(t):null;return a&&e.write(`let ${a} = null;`),e.write(`if (${i} !== null) {`),e.indented(s=>{let c=Ae(s,t,o.innerType,i,r);a&&c!==null&&s.write(`${a} = ${c};`)}),e.write("}"),a}function $h(e,t,n){for(let[i,r]of Ci(t._zod.def.checks))e.write(`if (${n} > ${rn(i,r._zod.def.check)}) return INVALID;`)}function cj(e,t,n,i,r=!0){let o=n._zod.def;e.write(`if (!Array.isArray(${i})) return INVALID;`),$h(e,n,`${i}.length`);let a=r?q(t):null,s=q(t),c=q(t);return a&&e.write(`const ${a} = new Array(${i}.length);`),e.write(`for (let ${s} = 0; ${s} < ${i}.length; ${s}++) {`),e.indented(u=>{u.write(`const ${c} = ${i}[${s}];`);let l=ct(u,t,o.element,c,r);a&&l!==null&&u.write(`${a}[${s}] = ${l};`)}),e.write("}"),a}function uj(e,t,n,i){let o=n._zod.def.values;if(o.length!==1){let s=J(t,new Set(o));return e.write(`if (!${s}.has(${i})) return INVALID;`),i}let a=o[0];if(typeof a=="number"&&Number.isNaN(a)){let s=J(t,new Set(o));return e.write(`if (!${s}.has(${i})) return INVALID;`),i}if(typeof a=="string")e.write(`if (${i} !== ${gt(a)}) return INVALID;`);else if(typeof a=="number"||typeof a=="boolean")e.write(`if (${i} !== ${a}) return INVALID;`);else if(a===null)e.write(`if (${i} !== null) return INVALID;`);else if(a===void 0)e.write(`if (${i} !== undefined) return INVALID;`);else if(typeof a=="bigint")e.write(`if (${i} !== ${a}n) return INVALID;`);else throw new ce(`literal type ${typeof a}`);return i}function lj(e,t,n,i){let r=n._zod.values;if(!r)throw new ce("enum schema without enumerated values");let o=J(t,r);return e.write(`if (!${o}.has(${i})) return INVALID;`),i}function Uw(e,t,n,i){let r=n._zod.def;return Ae(e,t,r.innerType,i)}function dj(e,t,n,i){let r=n._zod.def,a=Object.getOwnPropertyDescriptor(n._zod.def,"defaultValue")?()=>n._zod.def.defaultValue:void 0;if(n._zod.def.type==="prefault"){if(!a)return Ae(e,t,r.innerType,i);let c=J(t,a),u=q(t);return e.write(`let ${u} = ${i};`),e.write(`if (${i} === undefined) ${u} = ${c}();`),Ae(e,t,r.innerType,u)}let s=q(t);if(a){let c=J(t,a),u=J(t,Ri);e.write(`let ${s};`),e.write(`if (${i} === undefined) {`),e.indented(l=>{l.write(`${s} = ${u}(${c}());`)}),e.write("} else {"),e.indented(l=>{let d=Ae(l,t,r.innerType,i);l.write(`${s} = ${d} === undefined ? ${u}(${c}()) : ${d};`)}),e.write("}")}else e.write(`let ${s};`),e.write(`if (${i} !== undefined) {`),e.indented(c=>{let u=Ae(c,t,r.innerType,i);c.write(`${s} = ${u};`)}),e.write("}");return s}function fj(e,t,n,i){let r=n._zod.def,o=Ae(e,t,r.innerType,i),a=q(t);return e.write(`const ${a} = ${o};`),e.write(`if (${a} === undefined) return INVALID;`),a}function pj(e,t,n,i){let r=n._zod.def,o=r.items,a=r.rest;e.write(`if (!Array.isArray(${i})) return INVALID;`);let s=Zw(o,"optin"),c=Zw(o,"optout");a?e.write(`if (${i}.length < ${s}) return INVALID;`):e.write(`if (${i}.length < ${s} || ${i}.length > ${o.length}) return INVALID;`);let u=q(t);e.write(`const ${u} = [];`);for(let l=0;l<o.length;l++){let d=o[l];if(l>=c)e.write(`if (${u}.length === ${l}) {`),e.indented(f=>{f.write(`if (${l} < ${i}.length) {`),f.indented(p=>{let m=q(t);p.write(`const ${m} = ${i}[${l}];`);let h=ct(p,t,d,m);p.write(`${u}[${l}] = ${h};`)}),f.write("} else {"),f.indented(p=>{if(vh(d)){p.write(`${u}.length = ${l};`);return}let m=q(t),h=q(t);p.write(`const ${m} = undefined;`),p.write(`const ${h} = (() => {`),p.indented(g=>{let _=ct(g,t,d,m);g.write(`return ${_};`)}),p.write("})();"),p.write(`if (${h} === INVALID || ${h} === undefined) ${u}.length = ${l};`),p.write(`else ${u}[${l}] = ${h};`)}),f.write("}")}),e.write("}");else{let f=q(t);e.write(`const ${f} = ${i}[${l}];`);let p=ct(e,t,d,f);e.write(`${u}[${l}] = ${p};`)}}if(a){let l=q(t),d=q(t);e.write(`for (let ${l} = ${o.length}; ${l} < ${i}.length; ${l}++) {`),e.indented(f=>{f.write(`const ${d} = ${i}[${l}];`);let p=ct(f,t,a,d);f.write(`${u}[${l}] = ${p};`)}),e.write("}")}return u}function Zw(e,t){for(let n=e.length-1;n>=0;n--)if(!(t==="optin"?e[n]._zod.optin!==void 0:e[n]._zod.optout==="optional"))return n+1;return 0}function mj(e,t,n,i){let r=n._zod.def,o=r.options;if(r.discriminator)return hj(e,t,r,i);if(r.inclusive===!1)throw new ce("exclusive unions (z.xor)");if(o.length===0)return e.write("return INVALID;"),i;if(o.length===1)return Ae(e,t,o[0],i);if(o.every(c=>c._zod.def.type==="literal"&&!c._zod.def.checks?.length)){let c=new Set(o.flatMap(l=>l._zod.def.values)),u=J(t,c);return e.write(`if (!${u}.has(${i})) return INVALID;`),i}let s=q(t);e.write(`let ${s};`);for(let c=0;c<o.length;c++){let u=o[c];c===0?e.write(`${s} = (() => {`):e.write(`if (${s} === INVALID) ${s} = (() => {`),e.indented(l=>{let d=Ae(l,t,u,i);l.write(`return ${d};`)}),e.write("})();")}return e.write(`if (${s} === INVALID) return INVALID;`),s}function hj(e,t,n,i){if(n.unionFallback)throw new ce("discriminated union with unionFallback");if(n.options.length===0)return e.write("return INVALID;"),i;let r=q(t),o=q(t);e.write(`const ${r} = ${i}?.[${gt(n.discriminator)}];`),e.write(`let ${o};`);let a=!0,s=new Set;for(let c of n.options){let u=c._zod.propValues?.[n.discriminator];if(!u||u.size===0)throw new ce("discriminated union option without static discriminator values");for(let f of u){if(s.has(f))throw new ce(`duplicate discriminator value ${String(f)}`);s.add(f)}let l=Array.from(u,f=>gj(t,r,f)),d=a?"if":"else if";e.write(`${d} (${l.join(" || ")}) {`),e.indented(f=>{let p=Ae(f,t,c,i);f.write(`${o} = ${p};`)}),e.write("}"),a=!1}return e.write("else { return INVALID; }"),o}function gj(e,t,n){if(typeof n=="string")return`${t} === ${gt(n)}`;if(typeof n=="number")return Number.isNaN(n)?`Number.isNaN(${t})`:`${t} === ${n}`;if(typeof n=="boolean")return`${t} === ${n}`;if(n===null)return`${t} === null`;if(n===void 0)return`${t} === undefined`;if(typeof n=="bigint")return`${t} === ${n}n`;if(typeof n=="symbol"){let i=J(e,n);return`${t} === ${i}`}throw new ce(`literal discriminator value ${String(n)}`)}function vj(e,t,n,i){let r=n._zod.def;t.definite=!1;let o=ct(e,t,r.left,i),a=ct(e,t,r.right,i),s=J(t,Ki),c=q(t);return e.write(`const ${c} = ${s}(${o}, ${a});`),e.write(`if (!${c}.valid) return INVALID;`),`${c}.data`}function yj(e,t,n,i){let r=n._zod.def,o=J(t,Gt);e.write(`if (!${o}(${i})) return INVALID;`);let a=q(t),s=q(t),c=q(t);e.write(`const ${a} = {};`);let u=r,l=u.partial?void 0:r.keyType._zod.values;if(l){let p=[];for(let h of l){if(!(typeof h=="string"||typeof h=="number"||typeof h=="symbol"))throw new ce(`record key value ${String(h)}`);let g=typeof h=="number"?h.toString():h;if(g==="__proto__")throw new ce('record key "__proto__"');p.push(g);let _=J(t,h),$=Ae(e,t,r.keyType,_),x=q(t);e.write(`const ${x} = ${i}[${_j(t,g)}];`);let O=ct(e,t,r.valueType,x);e.write(`${a}[${$}] = ${O};`)}let m=J(t,new Set(p));return e.write(`for (const ${s} in ${i}) {`),e.indented(h=>{h.write(`if (${m}.has(${s})) continue;`),u.mode==="loose"?h.write(`if (${s} !== "__proto__") ${a}[${s}] = ${i}[${s}];`):h.write("return INVALID;")}),e.write("}"),a}let d=r.keyType._zod.def;if(!(d.type==="string"&&d.format===void 0&&!d.coerce&&(d.checks?.length??0)===0)){let p=r.mode==="loose",m=Nl(r.keyType);m.definite===!1&&(t.definite=!1);let h=J(t,m),g=J(t,Lr),_=q(t);return Mw(e,t,i,s,$=>{$.write(`let ${_} = ${h}(${s});`),$.write(`if (${_} === INVALID && typeof ${s} === "string" && ${g}.test(${s})) ${_} = ${h}(Number(${s}));`),p?$.write(`if (${_} === INVALID) { ${a}[${s}] = ${i}[${s}]; continue; }`):$.write(`if (${_} === INVALID) return INVALID;`),$.write(`if (${_} === "__proto__") continue;`);let x=q(t);$.write(`const ${x} = ${i}[${s}];`);let O=ct($,t,r.valueType,x);$.write(`${a}[${_}] = ${O};`)}),a}return Mw(e,t,i,s,p=>{p.write(`const ${c} = ${i}[${s}];`);let m=ct(p,t,r.valueType,c);p.write(`${a}[${s}] = ${m};`)},"return INVALID;"),a}function Mw(e,t,n,i,r,o){let a=J(t,Object.prototype.propertyIsEnumerable),s=q(t),c=q(t),u=q(t);e.write(`const ${s} = Object.getOwnPropertySymbols(${n});`),e.write(`const ${c} = Object.getOwnPropertyNames(${n});`),e.write(`for (let ${u} = 0; ${u} < ${c}.length; ${u}++) {`),e.indented(l=>{l.write(`const ${i} = ${c}[${u}];`),l.write(`if (${i} === "__proto__" || !${a}.call(${n}, ${i})) continue;`),r(l)}),e.write("}"),e.write(`for (let ${u} = 0; ${u} < ${s}.length; ${u}++) {`),e.indented(l=>{l.write(`const ${i} = ${s}[${u}];`),l.write(`if (!${a}.call(${n}, ${i})) continue;`),o?l.write(o):r(l)}),e.write("}")}function _j(e,t){return typeof t=="string"?gt(t):J(e,t)}function $j(e,t,n,i){let r=n._zod.def;e.write(`if (!(${i} instanceof Map)) return INVALID;`),$h(e,n,`${i}.size`);let o=q(t),a=q(t),s=q(t);return e.write(`const ${o} = new Map();`),e.write(`for (const [${a}, ${s}] of ${i}) {`),e.indented(c=>{let u=Ae(c,t,r.keyType,a),l=Ae(c,t,r.valueType,s);c.write(`${o}.set(${u}, ${l});`)}),e.write("}"),o}function bj(e,t,n,i){let r=n._zod.def;e.write(`if (!(${i} instanceof Set)) return INVALID;`),$h(e,n,`${i}.size`);let o=q(t),a=q(t);return e.write(`const ${o} = new Set();`),e.write(`for (const ${a} of ${i}) {`),e.indented(s=>{let c=Ae(s,t,r.valueType,a);s.write(`${o}.add(${c});`)}),e.write("}"),o}function wj(e,t){return e.write(`if (!(${t} instanceof File)) return INVALID;`),t}function kj(e,t,n,i){e.write(`if (typeof ${i} !== "string") return INVALID;`);let r=n._zod.pattern;if(r){let o=J(t,r);e.write(`${o}.lastIndex = 0;`),e.write(`if (!${o}.test(${i})) return INVALID;`)}return i}function xj(e,t,n,i){let r=n._zod.def,o=Ln(t,r.getter),a=J(t,{parser:null});e.write(`if (!${a}.parser) {`),e.indented(c=>{c.write(`const inner = ${o}();`),c.write(`${a}.parser = function(input) {`),c.indented(u=>{u.write("const result = inner._zod.run({ value: input, issues: [] }, {});"),u.write("return result.issues.length === 0 ? result.value : INVALID;")}),c.write("};")}),e.write("}");let s=q(t);return e.write(`const ${s} = ${a}.parser(${i});`),e.write(`if (${s} === INVALID) return INVALID;`),s}function Sj(e,t,n,i){let r=n._zod.def,o=Ae(e,t,r.in,i);if(r.transform){if(Vn(r.transform))throw new sr("z.compile: async transforms in pipes are not supported");let a=r.transform,c=Ln(t,l=>{let d={value:l,issues:[],addIssue:_h},f=a(l,d);return f instanceof Promise?yt:d.issues.length===0?f:yt}),u=q(t);return e.write(`const ${u} = ${c}(${o});`),e.write(`if (${u} === INVALID) return INVALID;`),Ae(e,t,r.out,u)}else return Ae(e,t,r.out,o)}function Vn(e){return typeof e=="function"&&(e.constructor.name==="AsyncFunction"||e[Symbol.toStringTag]==="AsyncFunction")}function Ij(e,t,n,i){let r=n._zod.def;if(r.fn){if(Vn(r.fn))throw new sr("z.compile: async custom predicates are not supported");let o=Ln(t,r.fn),a=J(t,gh),s=q(t);e.write(`const ${s} = ${o}(${i});`),e.write(`if (${s} instanceof Promise) ${a}();`),e.write(`if (!${s}) return INVALID;`)}else throw new ce("custom schema without a predicate function");return i}function zj(e,t,n){let i=e._zod.run({value:n,issues:[]},{});if(i&&typeof i.then=="function")return yt;let r=i;return r.issues.length===0?r.value:t()}function Pj(e,t,n,i){let r=n._zod.def;if(!r.catchValue[Lc])throw new ce("catch with a callback (only a constant catch value compiles)",!1);let o=q(t);e.write(`let ${o} = (() => {`),e.indented(u=>{let l=ct(u,t,r.innerType,i);u.write(`return ${l};`)}),e.write("})();");let a=J(t,r.innerType),s=Ln(t,r.catchValue),c=J(t,zj);return e.write(`if (${o} === INVALID) {`),e.indented(u=>{u.write(`${o} = ${c}(${a}, ${s}, ${i});`),u.write(`if (${o} === INVALID) return INVALID;`)}),e.write("}"),o}function Tj(e,t,n,i){let r=n._zod.def;if(r.transform){if(Vn(r.transform))throw new sr("z.compile: async transforms are not supported");let o=r.transform,s=Ln(t,u=>{let l={value:u,issues:[],addIssue:_h},d=o(u,l);return d instanceof Promise?yt:l.issues.length===0?d:yt}),c=q(t);return e.write(`const ${c} = ${s}(${i});`),e.write(`if (${c} === INVALID) return INVALID;`),c}return i}function Al(e){return e.checks&&(e.checks=[...e.checks]),e}function Dl(e,t){return new e(Al({type:"string",...z(t)}))}function bh(e,t){return new e(Al({type:"string",coerce:!0,...z(t)}))}function Ka(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...z(t)})}function Ga(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...z(t)})}function Wa(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...z(t)})}function Xa(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...z(t)})}function Ya(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...z(t)})}function Qa(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...z(t)})}function no(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...z(t)})}function es(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...z(t)})}function ts(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...z(t)})}function rs(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...z(t)})}function ns(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...z(t)})}function is(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...z(t)})}function os(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...z(t)})}function as(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...z(t)})}function ss(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...z(t)})}function cs(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...z(t)})}function Rl(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...z(t)})}function us(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...z(t)})}function ls(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...z(t)})}function ds(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...z(t)})}function fs(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...z(t)})}function ps(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...z(t)})}function Cl(e,t){return new e({type:"string",format:"credit_card",check:"string_format",abort:!1,...z(t)})}function Ul(e,t){return new e({type:"string",format:"iban",check:"string_format",abort:!1,...z(t)})}function ms(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...z(t)})}var wh={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function hs(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...z(t)})}function gs(e,t){return new e({type:"string",format:"date",check:"string_format",...z(t)})}function vs(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...z(t)})}function ys(e,t){return new e({type:"string",format:"duration",check:"string_format",...z(t)})}function Zl(e,t){return new e(Al({type:"number",checks:[],...z(t)}))}function kh(e,t){return new e(Al({type:"number",coerce:!0,checks:[],...z(t)}))}function Ml(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...z(t)})}function Ll(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...z(t)})}function Vl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...z(t)})}function Fl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...z(t)})}function ql(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...z(t)})}function Bl(e,t){return new e({type:"boolean",...z(t)})}function xh(e,t){return new e({type:"boolean",coerce:!0,...z(t)})}function Hl(e,t){return new e({type:"bigint",...z(t)})}function Sh(e,t){return new e({type:"bigint",coerce:!0,...z(t)})}function Jl(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...z(t)})}function Kl(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...z(t)})}function Gl(e,t){return new e({type:"symbol",...z(t)})}function Wl(e,t){return new e({type:"undefined",...z(t)})}function Xl(e,t){return new e({type:"null",...z(t)})}function Yl(e){return new e({type:"any"})}function Ql(e){return new e({type:"unknown"})}function ed(e,t){return new e({type:"never",...z(t)})}function td(e,t){return new e({type:"void",...z(t)})}function rd(e,t){return new e({type:"date",...z(t)})}function Ih(e,t){return new e({type:"date",coerce:!0,...z(t)})}function nd(e,t){return new e({type:"nan",...z(t)})}function br(e,t){return new tu({check:"less_than",...z(t),value:e,inclusive:!1})}function Vt(e,t){return new tu({check:"less_than",...z(t),value:e,inclusive:!0})}function wr(e,t){return new ru({check:"greater_than",...z(t),value:e,inclusive:!1})}function Ft(e,t){return new ru({check:"greater_than",...z(t),value:e,inclusive:!0})}function id(e){return wr(0,e)}function od(e){return br(0,e)}function ad(e){return Vt(0,e)}function sd(e){return Ft(0,e)}function nn(e,t){return new Am({check:"multiple_of",...z(t),value:e})}function on(e,t){return new Cm({check:"max_size",...z(t),maximum:e})}function kr(e,t){return new Um({check:"min_size",...z(t),minimum:e})}function Fn(e,t){return new Zm({check:"size_equals",...z(t),size:e})}function qn(e,t){return new Mm({check:"max_length",...z(t),maximum:e})}function Vr(e,t){return new Lm({check:"min_length",...z(t),minimum:e})}function Bn(e,t){return new Vm({check:"length_equals",...z(t),length:e})}function io(e,t){return new Fm({check:"string_format",format:"regex",...z(t),pattern:e})}function oo(e){return new qm({check:"string_format",format:"lowercase",...z(e)})}function ao(e){return new Bm({check:"string_format",format:"uppercase",...z(e)})}function so(e,t){return new Hm({check:"string_format",format:"includes",...z(t),includes:e})}function co(e,t){return new Jm({check:"string_format",format:"starts_with",...z(t),prefix:e})}function uo(e,t){return new Km({check:"string_format",format:"ends_with",...z(t),suffix:e})}function cd(e,t,n){return new Gm({check:"property",property:e,schema:t,...z(n)})}function lo(e,t){return new Wm({check:"properties",shape:e,...z(t)})}function fo(e,t){return new Xm({check:"mime_type",mime:e,...z(t)})}function cr(e){return new Ym({check:"overwrite",tx:e})}function po(e){return cr(t=>t.normalize(e))}function mo(){return cr(e=>e.trim())}function ho(){return cr(e=>e.toLowerCase())}function go(){return cr(e=>e.toUpperCase())}function vo(){return cr(e=>Dp(e))}function zh(e,t,n){return new e({type:"array",element:t,...z(n)})}function Oj(e,t,n){return new e({type:"union",options:t,...z(n)})}function jj(e,t,n){return new e({type:"union",options:t,inclusive:!1,...z(n)})}function Ej(e,t,n,i){return new e({type:"union",options:n,discriminator:t,...z(i)})}function Nj(e,t,n){return new e({type:"intersection",left:t,right:n})}function Aj(e,t,n,i){let r=n instanceof W,o=r?i:n,a=r?n:null;return new e({type:"tuple",items:t,rest:a,...z(o)})}function Dj(e,t,n,i){return new e({type:"record",keyType:t,valueType:n,...z(i)})}function Rj(e,t,n,i){return new e({type:"map",keyType:t,valueType:n,...z(i)})}function Cj(e,t,n){return new e({type:"set",valueType:t,...z(n)})}function Uj(e,t,n){let i=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e({type:"enum",entries:i,...z(n)})}function Zj(e,t,n){return new e({type:"enum",entries:t,...z(n)})}function Mj(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...z(n)})}function ud(e,t){return new e({type:"file",...z(t)})}function Lj(e,t){return new e({type:"transform",transform:t})}function Vj(e,t){return new e({type:"optional",innerType:t})}function Fj(e,t){return new e({type:"nullable",innerType:t})}function qj(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():Ri(n)}})}function Bj(e,t,n){return new e({type:"nonoptional",innerType:t,...z(n)})}function Hj(e,t){return new e({type:"success",innerType:t})}function Jj(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:Vp(n)})}function Kj(e,t,n){return new e({type:"pipe",in:t,out:n})}function Gj(e,t){return new e({type:"readonly",innerType:t})}function Wj(e,t,n){return new e({type:"template_literal",parts:t,...z(n)})}function Xj(e,t){return new e({type:"lazy",getter:t})}function Yj(e,t){return new e({type:"promise",innerType:t})}function ld(e,t,n){let i=z(n);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function dd(e,t,n){return new e({type:"custom",check:"custom",fn:t,...z(n)})}function fd(e,t){let n=qw(i=>(i.addIssue=r=>{if(typeof r=="string")i.issues.push(Ui(r,i.value,n._zod.def));else{let o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),"input"in o||(o.input=i.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),i.issues.push(Ui(o))}},e(i.value,i)),t);return n}function qw(e,t){let n=new we({check:"custom",...z(t)});return n._zod.check=e,n}function pd(e){let t=new we({check:"describe"});return t._zod.onattach=[n=>{let i=Qe.get(n)??{};Qe.add(n,{...i,description:e})}],t._zod.check=()=>{},t}function md(e){let t=new we({check:"meta"});return t._zod.onattach=[n=>{let i=Qe.get(n)??{};Qe.add(n,{...i,...e})}],t._zod.check=()=>{},t}function hd(e,t){let n=z(t),i=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(i=i.map(p=>typeof p=="string"?p.toLowerCase():p),r=r.map(p=>typeof p=="string"?p.toLowerCase():p));let o=new Set(i),a=new Set(r),s=e.Codec??Xi,c=e.Boolean??Gi,u=e.String??tn,l=new u({type:"string",error:n.error}),d=new c({type:"boolean",error:n.error}),f=new s({type:"pipe",in:l,out:d,transform:((p,m)=>{let h=p;return n.case!=="sensitive"&&(h=h.toLowerCase()),o.has(h)?!0:a.has(h)?!1:(m.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:m.value,inst:f,continue:!1}),{})}),reverseTransform:((p,m)=>p===!0?i[0]||"true":r[0]||"false"),error:n.error});return f._zod.bag.truthy=i,f._zod.bag.falsy=r,f._zod.bag.case=n.case??"insensitive",f}function an(e,t,n,i={}){let r=z(i),o={check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:s=>n.test(s),...r};return n instanceof RegExp&&(o.pattern=n),new e(o)}function _s(e,...t){for(let n of t)for(let i of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,i)&&Ye(e,i,n[i]);return e}function sn(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??Qe,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function Be(e,t,n,i,r){let o=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:i.path,message:r}):t.unrepresentable;if(o==="any")return!1;if(o===void 0||o==="throw")throw new Error(r);return Object.assign(n,o),!0}function $e(e,t,n={path:[],schemaPath:[]}){var i;let r=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let l={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,l);else{let f=a.schema,p=t.processors[r.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);p(e,t,f,l)}let d=e._zod.parent;d&&(a.ref||(a.ref=d),$e(d,t,l),t.seen.get(d).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&_s(a.schema,c),t.io==="input"&&_t(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function Bw(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function cn(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;let i=new Map;for(let a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let c=i.get(s);if(c&&c!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(s,a[0])}}let r=a=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let d=e.external.registry.get(a[0])?.id,f=e.external.uri??(m=>m);if(d)return{ref:f(d)};let p=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=p,{defId:p,ref:`${f("__shared")}#/${s}/${Bw(p)}`}}let c="#",u=`${c}/${s}/`;if(a[1]===n&&!a[1].schema.id)return{ref:c};let l=a[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:u+Bw(l)}},o=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:c,defId:u}=r(a);s.def={...s.schema},u&&(s.defId=u);let l=s.schema;for(let d in l)delete l[d];l.$ref=c};if(e.cycles==="throw")for(let a of e.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
|
|
69
|
+
}`,p;try{p=new l(...a,d)(...s)}catch(f){throw new ce(`this schema (generated code failed to evaluate: ${f.message})`)}return t?.debug&&(p.code=u),p.definite=i.definite,p}function J(e,t){for(let[i,r]of e.constants)if(r===t)return i;let n=`c${e.constantCounter++}`;return e.constants.set(n,t),n}function Vn(e,t){return e.definite=!1,J(e,t)}function B(e){return`v${e.varCounter++}`}function VE(e,t){let n=e._zod.run({value:t,issues:[]},{});if(n&&typeof n.then=="function")return yt;let i=n;return i.issues.length===0?i.value:yt}function ct(e,t,n,i,r=!0){let o=e.content.length,a=t.constants.size,s=t.constantCounter,c=t.varCounter;try{return Re(e,t,n,i,r)}catch(u){if(!(u instanceof ce)||!u.islandable)throw u;if(e.content.length=o,t.constants.size>a){let l=Array.from(t.constants.keys()).slice(a);for(let d of l)t.constants.delete(d)}return t.constantCounter=s,t.varCounter=c,FE(e,t,n,i)}}function FE(e,t,n,i){t.definite=!1;let r=J(t,n),o=J(t,VE),a=B(t);return e.write(`const ${a} = ${o}(${r}, ${i});`),e.write(`if (${a} === INVALID) return INVALID;`),a}var qE=new Set(["max_size","min_size","size_equals","max_length","min_length","length_equals"]);function BE(e,t,n,i){let r=n._zod.def.checks;if(!r||r.length===0)return i;let o=i;for(let a of r){let s=a._zod.def;if(s.when&&!qE.has(s.check))throw new ce('check with a custom "when" condition');switch(s.check){case"greater_than":HE(e,t,s,o);break;case"less_than":JE(e,t,s,o);break;case"multiple_of":KE(e,t,s,o);break;case"number_format":Hw(e,s,o);break;case"min_length":{let c=nn(s.minimum,"min_length"),u=_h(e,t,o,`${o}.length >= ${c} && ${o}.length < ${s.minimum*2}`);e.write(`if (${u} < ${c}) return INVALID;`);break}case"max_length":{let c=nn(s.maximum,"max_length"),u=_h(e,t,o,`${o}.length > ${c}`);e.write(`if (${u} > ${c}) return INVALID;`);break}case"length_equals":{let c=nn(s.length,"length_equals"),u=_h(e,t,o,`${o}.length >= ${c} && ${o}.length <= ${s.length*2}`);e.write(`if (${u} !== ${c}) return INVALID;`);break}case"min_size":e.write(`if (${o}.size < ${nn(s.minimum,"min_size")}) return INVALID;`);break;case"max_size":e.write(`if (${o}.size > ${nn(s.maximum,"max_size")}) return INVALID;`);break;case"size_equals":e.write(`if (${o}.size !== ${nn(s.size,"size_equals")}) return INVALID;`);break;case"string_format":o=Jw(e,t,s,o);break;case"custom":o=eO(e,t,a,o);break;case"bigint_format":GE(e,s,o);break;case"mime_type":WE(e,t,s,o);break;case"property":YE(e,t,s,o);break;case"properties":XE(e,t,s,o);break;case"overwrite":{let c=B(t);QE(e,t,a,o,c),o=c;break}default:throw new ce(`check type ${s.check}`)}}return o}function _h(e,t,n,i){let r=J(t,Rn),o=B(t);return e.write(`const ${o} = typeof ${n} === "string" && ${i} ? ${r}(${n}) : ${n}.length;`),o}function nn(e,t){if(typeof e!="number"||!Number.isFinite(e))throw new ce(`${t} bound of type ${typeof e}`);return`${e}`}function Bw(e,t){if(typeof t=="bigint")return`${t}n`;if(typeof t=="number"){if(Number.isNaN(t))throw new ce("comparison check with NaN bound");return`${t}`}if(t instanceof Date){if(Number.isNaN(t.getTime()))throw new ce("comparison check with Invalid Date bound");return J(e,t)}throw new ce(`comparison check bound of type ${typeof t}`)}function HE(e,t,n,i){let r=n.inclusive?"<":"<=";e.write(`if (${i} ${r} ${Bw(t,n.value)}) return INVALID;`)}function JE(e,t,n,i){let r=n.inclusive?">":">=";e.write(`if (${i} ${r} ${Bw(t,n.value)}) return INVALID;`)}function KE(e,t,n,i){if(typeof n.value=="bigint"){if(n.value===BigInt(0))throw new ce("multiple_of check with a zero divisor");e.write(`if (${i} % ${n.value}n !== 0n) return INVALID;`)}else{let r=J(t,ka);e.write(`if (${r}(${i}, ${nn(n.value,"multiple_of")}) !== 0) return INVALID;`)}}function Hw(e,t,n){let i=t.format;switch(i){case"safeint":e.write(`if (!Number.isSafeInteger(${n})) return INVALID;`);break;case"int32":e.write(`if (!Number.isInteger(${n}) || ${n} < -2147483648 || ${n} > 2147483647) return INVALID;`);break;case"uint32":e.write(`if (!Number.isInteger(${n}) || ${n} < 0 || ${n} > 4294967295) return INVALID;`);break;case"float32":e.write(`if (!Number.isFinite(${n}) || ${n} < -3.4028234663852886e38 || ${n} > 3.4028234663852886e38) return INVALID;`);break;case"float64":e.write(`if (!Number.isFinite(${n})) return INVALID;`);break;default:throw new ce(`number format ${i}`)}}function GE(e,t,n){let i=t.format;if(i)switch(i){case"int64":e.write(`if (${n} < -9223372036854775808n || ${n} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${n} < 0n || ${n} > 18446744073709551615n) return INVALID;`);break;default:throw new ce(`bigint format ${i}`)}}function WE(e,t,n,i){let r=n.mime;if(r&&r.length>0){let o=J(t,new Set(r));e.write(`if (!${o}.has(${i}.type)) return INVALID;`)}}function XE(e,t,n,i){if(n.when)throw new ce('check with a custom "when" condition');e.write(`if (${i} == null) return INVALID;`);let r=n.shape;for(let o of Reflect.ownKeys(r)){let a=typeof o=="symbol"?J(t,o):gt(o),s=B(t);e.write(`const ${s} = ${i}[${a}];`),ct(e,t,r[o],s,!1)}}function YE(e,t,n,i){let r=`${i}[${JSON.stringify(n.property)}]`;Re(e,t,n.schema,r)}function QE(e,t,n,i,r){let o=n._zod.def.tx;if(!o)throw new ce("overwrite check without a transform function");if(Fn(o))throw new sr("z.compile: async overwrite transforms are not supported");let a=J(t,o);e.write(`const ${r} = ${a}(${i});`)}function $h(){throw new Tt}function xh(e){this.issues.push(e)}function eO(e,t,n,i){let r=n._zod.def;if(r.fn){if(Fn(r.fn))throw new sr("z.compile: async .refine() predicates are not supported");let o=Vn(t,r.fn),a=J(t,$h),s=B(t);return e.write(`const ${s} = ${o}(${i});`),e.write(`if (${s} instanceof Promise) ${a}();`),e.write(`if (!${s}) return INVALID;`),i}if(n._zod.check){if(Fn(n._zod.check))throw new sr("z.compile: async .superRefine() / check functions are not supported");let o=n._zod.check,s=Vn(t,u=>{let l={value:u,issues:[],addIssue:xh};return o(l)instanceof Promise&&$h(),l.issues.length===0?l.value:yt}),c=B(t);return e.write(`const ${c} = ${s}(${i});`),e.write(`if (${c} === INVALID) return INVALID;`),c}throw new ce("custom check without a predicate or check function")}var tO=new Set(["cidrv4","cuid","cuid2","date","datetime","duration","e164","email","emoji","ends_with","guid","includes","ipv4","ksuid","lowercase","mac","nanoid","regex","starts_with","time","ulid","uppercase","uuid","xid"]);function Jw(e,t,n,i,r=!0){let o=n.format;if(o==="base64"){let u=J(t,La);return e.write(`if (!${u}(${i})) return INVALID;`),i}if(o==="base64url"){let u=J(t,Du);return e.write(`if (!${u}(${i})) return INVALID;`),i}if(o==="jwt"){let u=J(t,Vu),l=J(t,n.alg??null);return e.write(`if (!${u}(${i}, ${l})) return INVALID;`),i}if(o==="ipv6"){let u=J(t,Ma);return e.write(`if (!${u}(${i})) return INVALID;`),i}if(o==="cidrv6"){let u=J(t,Ou);return e.write(`if (!${u}(${i})) return INVALID;`),i}if(o==="credit_card"){let u=J(t,Uu);return e.write(`if (!${u}(${i})) return INVALID;`),i}if(o==="iban"){let u=J(t,Mu);return e.write(`if (!${u}(${i})) return INVALID;`),i}let a=n;if(o==="url"||o==="httpurl"||a.normalize||a.hostname!==void 0||a.protocol!==void 0){let u=J(t,gu),l=J(t,n),d=B(t),p=B(t);if(e.write(`const ${d} = ${i}.trim();`),e.write(`const ${p} = ${u}(${d}, ${l});`),e.write(`if (typeof ${p} === "number") return INVALID;`),a.hostname!==void 0){let h=J(t,vu);e.write(`if (!${h}(${p}, ${l}.hostname)) return INVALID;`)}if(a.protocol!==void 0){let h=J(t,yu);e.write(`if (!${h}(${p}, ${l}.protocol)) return INVALID;`)}if(!r)return null;let f=B(t),m=a.normalize?`${p}.href`:`${J(t,Za)}(${d})`;return e.write(`const ${f} = ${m};`),f}let s=n.fn;if(s){if(Fn(s))throw new ce(`async string format ${o}`);let u=J(t,s);return e.write(`if (!${u}(${i})) return INVALID;`),i}if(tO.has(o)&&n.pattern){let u=J(t,n.pattern);return e.write(`${u}.lastIndex = 0;`),e.write(`if (!${u}.test(${i})) return INVALID;`),i}let c=n.format;switch(c){case"regex":throw new ce("regex format without a pattern");case"lowercase":e.write(`if (${i} !== ${i}.toLowerCase()) return INVALID;`);break;case"uppercase":e.write(`if (${i} !== ${i}.toUpperCase()) return INVALID;`);break;case"includes":e.write(`if (!${i}.includes(${gt(n.includes)})) return INVALID;`);break;case"starts_with":{let u=n.prefix;e.write(`if (${i}.slice(0, ${u.length}) !== ${gt(u)}) return INVALID;`);break}case"ends_with":{let u=n.suffix;e.write(`if (${i}.slice(-${u.length}) !== ${gt(u)}) return INVALID;`);break}default:throw new ce(`string format ${c}`)}return i}function Re(e,t,n,i,r=!0){let o=n._zod.def,a=o.type;if(o.coerce)throw new ce(`coercion (z.coerce.${a}())`);let s=r||!!o.checks?.length,c;switch(a){case"string":c=rO(e,t,n,i,s);break;case"number":c=nO(e,n,i);break;case"boolean":c=iO(e,i);break;case"bigint":c=oO(e,n,i);break;case"symbol":c=aO(e,i);break;case"undefined":c=sO(e,i);break;case"null":c=cO(e,i);break;case"any":case"unknown":c=i;break;case"never":e.write("return INVALID;"),c=i;break;case"void":c=uO(e,i);break;case"nan":c=lO(e,i);break;case"date":c=dO(e,i);break;case"object":c=fO(e,t,n,i,s);break;case"optional":c=pO(e,t,n,i,s);break;case"nullable":c=gO(e,t,n,i,s);break;case"array":c=vO(e,t,n,i,s);break;case"literal":c=yO(e,t,n,i);break;case"enum":c=_O(e,t,n,i);break;case"readonly":{let u=Vw(e,t,n,i),l=B(t);e.write(`const ${l} = Object.freeze(${u});`),c=l;break}case"success":Vw(e,t,n,i),c="true";break;case"default":case"prefault":c=$O(e,t,n,i);break;case"nonoptional":c=bO(e,t,n,i);break;case"tuple":c=wO(e,t,n,i);break;case"union":c=xO(e,t,n,i);break;case"intersection":c=IO(e,t,n,i);break;case"record":c=zO(e,t,n,i);break;case"map":c=TO(e,t,n,i);break;case"set":c=EO(e,t,n,i);break;case"file":c=OO(e,i);break;case"template_literal":c=jO(e,t,n,i);break;case"lazy":c=NO(e,t,n,i);break;case"pipe":c=AO(e,t,n,i);break;case"custom":c=DO(e,t,n,i);break;case"transform":c=UO(e,t,n,i);break;case"catch":c=CO(e,t,n,i);break;default:throw new ce(`schema type ${a}`)}return c===null?null:BE(e,t,n,c)}function rO(e,t,n,i,r=!0){e.write(`if (typeof ${i} !== "string") return INVALID;`);let o=n._zod.def;return o.format===void 0?i:Jw(e,t,o,i,r)}function nO(e,t,n){e.write(`if (typeof ${n} !== "number" || !Number.isFinite(${n})) return INVALID;`);let i=t._zod.def;return i.check==="number_format"&&i.format&&Hw(e,{format:i.format},n),n}function iO(e,t){return e.write(`if (typeof ${t} !== "boolean") return INVALID;`),t}function oO(e,t,n){e.write(`if (typeof ${n} !== "bigint") return INVALID;`);let i=t._zod.def;if(i.format)switch(i.format){case"int64":e.write(`if (${n} < -9223372036854775808n || ${n} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${n} < 0n || ${n} > 18446744073709551615n) return INVALID;`);break}return n}function aO(e,t){return e.write(`if (typeof ${t} !== "symbol") return INVALID;`),t}function sO(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function cO(e,t){return e.write(`if (${t} !== null) return INVALID;`),t}function uO(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function lO(e,t){return e.write(`if (typeof ${t} !== "number" || !Number.isNaN(${t})) return INVALID;`),t}function dO(e,t){return e.write(`if (!(${t} instanceof Date) || Number.isNaN(${t}.getTime())) return INVALID;`),t}function fO(e,t,n,i,r=!0){let o=n._zod.def;e.write(`if (typeof ${i} !== "object" || ${i} === null || Array.isArray(${i})) return INVALID;`);let a=o.shape,s=Object.keys(a),c=Object.getOwnPropertySymbols(a),u=c.length?[...s,...c]:s,l=$=>typeof $=="symbol"?J(t,$):gt($),d=$=>typeof $=="symbol"?`[${l($)}]`:gt($),p=a;if(s.includes("__proto__"))throw new ce('object shape key "__proto__"');let f=new Map;for(let $ of u){let k=p[$],E=l($),T=B(t);if(e.write(`const ${T} = ${i}[${E}];`),k._zod.optin!==void 0){let M=B(t);e.write(`let ${M} = (() => {`),e.indented(G=>{let Q=ct(G,t,k,T);G.write(`return ${Q};`)}),e.write("})();"),k._zod.optout==="optional"?(e.write(`if (${M} === INVALID) {`),e.indented(G=>{G.write(`if (${E} in ${i}) return INVALID;`),G.write(`${M} = undefined;`)}),e.write("}")):e.write(`if (${M} === INVALID) return INVALID;`),f.set($,M)}else{hO(k)&&e.write(`if (!(${E} in ${i})) return INVALID;`);let M=ct(e,t,k,T,r);M!==null&&f.set($,M)}}let m=o.catchall,h="none";if(m){let $=m._zod.def.type;if($==="never"){let k=s.map(E=>`k !== ${gt(E)}`).join(" && ")||"true";e.write(`for (const k in ${i}) {`),e.indented(E=>{E.write(`if (${k}) return INVALID;`)}),e.write("}")}else($==="unknown"||$==="any")&&!m._zod.def.checks?.length?h="passthrough":h="schema"}let g=B(t),_=u.some($=>Lw(p[$])||bh(p[$]));if(!r){if(h==="schema"){let $=s.length>0?J(t,new Set(s)):null;e.write(`for (const k in ${i}) {`),e.indented(k=>{k.write('if (k === "__proto__") continue;'),$&&k.write(`if (${$}.has(k)) continue;`);let E=B(t);k.write(`const ${E} = ${i}[k];`),ct(k,t,m,E,!1)}),e.write("}")}return null}if(_){e.write(`const ${g} = {};`);for(let $ of u){let k=l($),E=f.get($);bh(p[$])?e.write(`if (${k} in ${i}) ${g}[${k}] = ${E};`):Lw(p[$])?e.write(`if (${E} !== undefined || ${k} in ${i}) ${g}[${k}] = ${E};`):e.write(`${g}[${k}] = ${E};`)}}else{let $=u.map(k=>`${d(k)}: ${f.get(k)}`).join(", ");e.write(`const ${g} = { ${$} };`)}if(h!=="none"){let $=s.length>0?J(t,new Set(s)):null;e.write(`for (const k in ${i}) {`),e.indented(k=>{if(k.write('if (k === "__proto__") continue;'),$&&k.write(`if (${$}.has(k)) continue;`),h==="passthrough")k.write(`${g}[k] = ${i}[k];`);else{let E=B(t);k.write(`const ${E} = ${i}[k];`);let T=ct(k,t,m,E);k.write(`${g}[k] = ${T};`)}}),e.write("}")}return g}function pO(e,t,n,i,r=!0){let o=n._zod.def;if(mO(n))return Re(e,t,o.innerType,i,r);if(o.innerType._zod.optin==="defaulted"){let s=B(t),c=B(t);return e.write(`let ${s};`),e.write(`if (${i} === undefined) {`),e.indented(u=>{u.write(`const ${c} = (() => {`),u.indented(l=>{let d=Re(l,t,o.innerType,i);l.write(`return ${d};`)}),u.write("})();"),u.write(`if (${c} !== INVALID) ${s} = ${c};`)}),e.write("} else {"),e.indented(u=>{let l=Re(u,t,o.innerType,i);u.write(`${s} = ${l};`)}),e.write("}"),s}let a=r?B(t):null;return a&&e.write(`let ${a};`),e.write(`if (${i} !== undefined) {`),e.indented(s=>{let c=Re(s,t,o.innerType,i,r);a&&c!==null&&s.write(`${a} = ${c};`)}),e.write("}"),a}function mO(e){return e._zod.traits?.has("$ZodExactOptional")===!0}function hO(e){return e._zod.optin===void 0&&Ln(e)}function Ln(e){if(e._zod.def.coerce)return!0;let t=e._zod.def;switch(t.type){case"any":case"unknown":case"undefined":case"void":case"default":case"prefault":case"transform":case"custom":case"lazy":return!0;case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"never":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":return!1;case"nonoptional":return t.innerType?Ln(t.innerType):!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":case"nullable":case"readonly":case"success":return t.innerType?Ln(t.innerType):!0;case"catch":return!0;case"union":return t.options?t.options.some(Ln):!0;case"intersection":return!t.left||!t.right?!0:Ln(t.left)&&Ln(t.right);case"pipe":return t.in?Ln(t.in):!0;default:return!0}}function bh(e){return e._zod.optin==="optional"&&e._zod.optout==="optional"}function Lw(e){return(e._zod.optin!=="defaulted"||e._zod.optout==="optional")&&io(e)}function io(e){let t=e._zod.def;switch(t.type){case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":case"never":case"success":return!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":return!0;case"nullable":case"readonly":case"nonoptional":return t.innerType?io(t.innerType):!0;case"union":return t.options?t.options.some(io):!0;case"intersection":return!t.left||!t.right||io(t.left)||io(t.right);case"pipe":return t.out?io(t.out):!0;default:return!0}}function gO(e,t,n,i,r=!0){let o=n._zod.def,a=r?B(t):null;return a&&e.write(`let ${a} = null;`),e.write(`if (${i} !== null) {`),e.indented(s=>{let c=Re(s,t,o.innerType,i,r);a&&c!==null&&s.write(`${a} = ${c};`)}),e.write("}"),a}function kh(e,t,n){for(let[i,r]of Zi(t._zod.def.checks))e.write(`if (${n} > ${nn(i,r._zod.def.check)}) return INVALID;`)}function vO(e,t,n,i,r=!0){let o=n._zod.def;e.write(`if (!Array.isArray(${i})) return INVALID;`),kh(e,n,`${i}.length`);let a=r?B(t):null,s=B(t),c=B(t);return a&&e.write(`const ${a} = new Array(${i}.length);`),e.write(`for (let ${s} = 0; ${s} < ${i}.length; ${s}++) {`),e.indented(u=>{u.write(`const ${c} = ${i}[${s}];`);let l=ct(u,t,o.element,c,r);a&&l!==null&&u.write(`${a}[${s}] = ${l};`)}),e.write("}"),a}function yO(e,t,n,i){let o=n._zod.def.values;if(o.length!==1){let s=J(t,new Set(o));return e.write(`if (!${s}.has(${i})) return INVALID;`),i}let a=o[0];if(typeof a=="number"&&Number.isNaN(a)){let s=J(t,new Set(o));return e.write(`if (!${s}.has(${i})) return INVALID;`),i}if(typeof a=="string")e.write(`if (${i} !== ${gt(a)}) return INVALID;`);else if(typeof a=="number"||typeof a=="boolean")e.write(`if (${i} !== ${a}) return INVALID;`);else if(a===null)e.write(`if (${i} !== null) return INVALID;`);else if(a===void 0)e.write(`if (${i} !== undefined) return INVALID;`);else if(typeof a=="bigint")e.write(`if (${i} !== ${a}n) return INVALID;`);else throw new ce(`literal type ${typeof a}`);return i}function _O(e,t,n,i){let r=n._zod.values;if(!r)throw new ce("enum schema without enumerated values");let o=J(t,r);return e.write(`if (!${o}.has(${i})) return INVALID;`),i}function Vw(e,t,n,i){let r=n._zod.def;return Re(e,t,r.innerType,i)}function $O(e,t,n,i){let r=n._zod.def,a=Object.getOwnPropertyDescriptor(n._zod.def,"defaultValue")?()=>n._zod.def.defaultValue:void 0;if(n._zod.def.type==="prefault"){if(!a)return Re(e,t,r.innerType,i);let c=J(t,a),u=B(t);return e.write(`let ${u} = ${i};`),e.write(`if (${i} === undefined) ${u} = ${c}();`),Re(e,t,r.innerType,u)}let s=B(t);if(a){let c=J(t,a),u=J(t,Ui);e.write(`let ${s};`),e.write(`if (${i} === undefined) {`),e.indented(l=>{l.write(`${s} = ${u}(${c}());`)}),e.write("} else {"),e.indented(l=>{let d=Re(l,t,r.innerType,i);l.write(`${s} = ${d} === undefined ? ${u}(${c}()) : ${d};`)}),e.write("}")}else e.write(`let ${s};`),e.write(`if (${i} !== undefined) {`),e.indented(c=>{let u=Re(c,t,r.innerType,i);c.write(`${s} = ${u};`)}),e.write("}");return s}function bO(e,t,n,i){let r=n._zod.def,o=Re(e,t,r.innerType,i),a=B(t);return e.write(`const ${a} = ${o};`),e.write(`if (${a} === undefined) return INVALID;`),a}function wO(e,t,n,i){let r=n._zod.def,o=r.items,a=r.rest;e.write(`if (!Array.isArray(${i})) return INVALID;`);let s=Fw(o,"optin"),c=Fw(o,"optout");a?e.write(`if (${i}.length < ${s}) return INVALID;`):e.write(`if (${i}.length < ${s} || ${i}.length > ${o.length}) return INVALID;`);let u=B(t);e.write(`const ${u} = [];`);for(let l=0;l<o.length;l++){let d=o[l];if(l>=c)e.write(`if (${u}.length === ${l}) {`),e.indented(p=>{p.write(`if (${l} < ${i}.length) {`),p.indented(f=>{let m=B(t);f.write(`const ${m} = ${i}[${l}];`);let h=ct(f,t,d,m);f.write(`${u}[${l}] = ${h};`)}),p.write("} else {"),p.indented(f=>{if(bh(d)){f.write(`${u}.length = ${l};`);return}let m=B(t),h=B(t);f.write(`const ${m} = undefined;`),f.write(`const ${h} = (() => {`),f.indented(g=>{let _=ct(g,t,d,m);g.write(`return ${_};`)}),f.write("})();"),f.write(`if (${h} === INVALID || ${h} === undefined) ${u}.length = ${l};`),f.write(`else ${u}[${l}] = ${h};`)}),p.write("}")}),e.write("}");else{let p=B(t);e.write(`const ${p} = ${i}[${l}];`);let f=ct(e,t,d,p);e.write(`${u}[${l}] = ${f};`)}}if(a){let l=B(t),d=B(t);e.write(`for (let ${l} = ${o.length}; ${l} < ${i}.length; ${l}++) {`),e.indented(p=>{p.write(`const ${d} = ${i}[${l}];`);let f=ct(p,t,a,d);p.write(`${u}[${l}] = ${f};`)}),e.write("}")}return u}function Fw(e,t){for(let n=e.length-1;n>=0;n--)if(!(t==="optin"?e[n]._zod.optin!==void 0:e[n]._zod.optout==="optional"))return n+1;return 0}function xO(e,t,n,i){let r=n._zod.def,o=r.options;if(r.discriminator)return kO(e,t,r,i);if(r.inclusive===!1)throw new ce("exclusive unions (z.xor)");if(o.length===0)return e.write("return INVALID;"),i;if(o.length===1)return Re(e,t,o[0],i);if(o.every(c=>c._zod.def.type==="literal"&&!c._zod.def.checks?.length)){let c=new Set(o.flatMap(l=>l._zod.def.values)),u=J(t,c);return e.write(`if (!${u}.has(${i})) return INVALID;`),i}let s=B(t);e.write(`let ${s};`);for(let c=0;c<o.length;c++){let u=o[c];c===0?e.write(`${s} = (() => {`):e.write(`if (${s} === INVALID) ${s} = (() => {`),e.indented(l=>{let d=Re(l,t,u,i);l.write(`return ${d};`)}),e.write("})();")}return e.write(`if (${s} === INVALID) return INVALID;`),s}function kO(e,t,n,i){if(n.unionFallback)throw new ce("discriminated union with unionFallback");if(n.options.length===0)return e.write("return INVALID;"),i;let r=B(t),o=B(t);e.write(`const ${r} = ${i}?.[${gt(n.discriminator)}];`),e.write(`let ${o};`);let a=!0,s=new Set;for(let c of n.options){let u=c._zod.propValues?.[n.discriminator];if(!u||u.size===0)throw new ce("discriminated union option without static discriminator values");for(let p of u){if(s.has(p))throw new ce(`duplicate discriminator value ${String(p)}`);s.add(p)}let l=Array.from(u,p=>SO(t,r,p)),d=a?"if":"else if";e.write(`${d} (${l.join(" || ")}) {`),e.indented(p=>{let f=Re(p,t,c,i);p.write(`${o} = ${f};`)}),e.write("}"),a=!1}return e.write("else { return INVALID; }"),o}function SO(e,t,n){if(typeof n=="string")return`${t} === ${gt(n)}`;if(typeof n=="number")return Number.isNaN(n)?`Number.isNaN(${t})`:`${t} === ${n}`;if(typeof n=="boolean")return`${t} === ${n}`;if(n===null)return`${t} === null`;if(n===void 0)return`${t} === undefined`;if(typeof n=="bigint")return`${t} === ${n}n`;if(typeof n=="symbol"){let i=J(e,n);return`${t} === ${i}`}throw new ce(`literal discriminator value ${String(n)}`)}function IO(e,t,n,i){let r=n._zod.def;t.definite=!1;let o=ct(e,t,r.left,i),a=ct(e,t,r.right,i),s=J(t,Wi),c=B(t);return e.write(`const ${c} = ${s}(${o}, ${a});`),e.write(`if (!${c}.valid) return INVALID;`),`${c}.data`}function zO(e,t,n,i){let r=n._zod.def,o=J(t,Wt);e.write(`if (!${o}(${i})) return INVALID;`);let a=B(t),s=B(t),c=B(t);e.write(`const ${a} = {};`);let u=r,l=u.partial?void 0:r.keyType._zod.values;if(l){let f=[];for(let h of l){if(!(typeof h=="string"||typeof h=="number"||typeof h=="symbol"))throw new ce(`record key value ${String(h)}`);let g=typeof h=="number"?h.toString():h;if(g==="__proto__")throw new ce('record key "__proto__"');f.push(g);let _=J(t,h),$=Re(e,t,r.keyType,_),k=B(t);e.write(`const ${k} = ${i}[${PO(t,g)}];`);let E=ct(e,t,r.valueType,k);e.write(`${a}[${$}] = ${E};`)}let m=J(t,new Set(f));return e.write(`for (const ${s} in ${i}) {`),e.indented(h=>{h.write(`if (${m}.has(${s})) continue;`),u.mode==="loose"?h.write(`if (${s} !== "__proto__") ${a}[${s}] = ${i}[${s}];`):h.write("return INVALID;")}),e.write("}"),a}let d=r.keyType._zod.def;if(!(d.type==="string"&&d.format===void 0&&!d.coerce&&(d.checks?.length??0)===0)){let f=r.mode==="loose",m=Ul(r.keyType);m.definite===!1&&(t.definite=!1);let h=J(t,m),g=J(t,Vr),_=B(t);return qw(e,t,i,s,$=>{$.write(`let ${_} = ${h}(${s});`),$.write(`if (${_} === INVALID && typeof ${s} === "string" && ${g}.test(${s})) ${_} = ${h}(Number(${s}));`),f?$.write(`if (${_} === INVALID) { ${a}[${s}] = ${i}[${s}]; continue; }`):$.write(`if (${_} === INVALID) return INVALID;`),$.write(`if (${_} === "__proto__") continue;`);let k=B(t);$.write(`const ${k} = ${i}[${s}];`);let E=ct($,t,r.valueType,k);$.write(`${a}[${_}] = ${E};`)}),a}return qw(e,t,i,s,f=>{f.write(`const ${c} = ${i}[${s}];`);let m=ct(f,t,r.valueType,c);f.write(`${a}[${s}] = ${m};`)},"return INVALID;"),a}function qw(e,t,n,i,r,o){let a=J(t,Object.prototype.propertyIsEnumerable),s=B(t),c=B(t),u=B(t);e.write(`const ${s} = Object.getOwnPropertySymbols(${n});`),e.write(`const ${c} = Object.getOwnPropertyNames(${n});`),e.write(`for (let ${u} = 0; ${u} < ${c}.length; ${u}++) {`),e.indented(l=>{l.write(`const ${i} = ${c}[${u}];`),l.write(`if (${i} === "__proto__" || !${a}.call(${n}, ${i})) continue;`),r(l)}),e.write("}"),e.write(`for (let ${u} = 0; ${u} < ${s}.length; ${u}++) {`),e.indented(l=>{l.write(`const ${i} = ${s}[${u}];`),l.write(`if (!${a}.call(${n}, ${i})) continue;`),o?l.write(o):r(l)}),e.write("}")}function PO(e,t){return typeof t=="string"?gt(t):J(e,t)}function TO(e,t,n,i){let r=n._zod.def;e.write(`if (!(${i} instanceof Map)) return INVALID;`),kh(e,n,`${i}.size`);let o=B(t),a=B(t),s=B(t);return e.write(`const ${o} = new Map();`),e.write(`for (const [${a}, ${s}] of ${i}) {`),e.indented(c=>{let u=Re(c,t,r.keyType,a),l=Re(c,t,r.valueType,s);c.write(`${o}.set(${u}, ${l});`)}),e.write("}"),o}function EO(e,t,n,i){let r=n._zod.def;e.write(`if (!(${i} instanceof Set)) return INVALID;`),kh(e,n,`${i}.size`);let o=B(t),a=B(t);return e.write(`const ${o} = new Set();`),e.write(`for (const ${a} of ${i}) {`),e.indented(s=>{let c=Re(s,t,r.valueType,a);s.write(`${o}.add(${c});`)}),e.write("}"),o}function OO(e,t){return e.write(`if (!(${t} instanceof File)) return INVALID;`),t}function jO(e,t,n,i){e.write(`if (typeof ${i} !== "string") return INVALID;`);let r=n._zod.pattern;if(r){let o=J(t,r);e.write(`${o}.lastIndex = 0;`),e.write(`if (!${o}.test(${i})) return INVALID;`)}return i}function NO(e,t,n,i){let r=n._zod.def,o=Vn(t,r.getter),a=J(t,{parser:null});e.write(`if (!${a}.parser) {`),e.indented(c=>{c.write(`const inner = ${o}();`),c.write(`${a}.parser = function(input) {`),c.indented(u=>{u.write("const result = inner._zod.run({ value: input, issues: [] }, {});"),u.write("return result.issues.length === 0 ? result.value : INVALID;")}),c.write("};")}),e.write("}");let s=B(t);return e.write(`const ${s} = ${a}.parser(${i});`),e.write(`if (${s} === INVALID) return INVALID;`),s}function AO(e,t,n,i){let r=n._zod.def,o=Re(e,t,r.in,i);if(r.transform){if(Fn(r.transform))throw new sr("z.compile: async transforms in pipes are not supported");let a=r.transform,c=Vn(t,l=>{let d={value:l,issues:[],addIssue:xh},p=a(l,d);return p instanceof Promise?yt:d.issues.length===0?p:yt}),u=B(t);return e.write(`const ${u} = ${c}(${o});`),e.write(`if (${u} === INVALID) return INVALID;`),Re(e,t,r.out,u)}else return Re(e,t,r.out,o)}function Fn(e){return typeof e=="function"&&(e.constructor.name==="AsyncFunction"||e[Symbol.toStringTag]==="AsyncFunction")}function DO(e,t,n,i){let r=n._zod.def;if(r.fn){if(Fn(r.fn))throw new sr("z.compile: async custom predicates are not supported");let o=Vn(t,r.fn),a=J(t,$h),s=B(t);e.write(`const ${s} = ${o}(${i});`),e.write(`if (${s} instanceof Promise) ${a}();`),e.write(`if (!${s}) return INVALID;`)}else throw new ce("custom schema without a predicate function");return i}function RO(e,t,n){let i=e._zod.run({value:n,issues:[]},{});if(i&&typeof i.then=="function")return yt;let r=i;return r.issues.length===0?r.value:t()}function CO(e,t,n,i){let r=n._zod.def;if(!r.catchValue[Hc])throw new ce("catch with a callback (only a constant catch value compiles)",!1);let o=B(t);e.write(`let ${o} = (() => {`),e.indented(u=>{let l=ct(u,t,r.innerType,i);u.write(`return ${l};`)}),e.write("})();");let a=J(t,r.innerType),s=Vn(t,r.catchValue),c=J(t,RO);return e.write(`if (${o} === INVALID) {`),e.indented(u=>{u.write(`${o} = ${c}(${a}, ${s}, ${i});`),u.write(`if (${o} === INVALID) return INVALID;`)}),e.write("}"),o}function UO(e,t,n,i){let r=n._zod.def;if(r.transform){if(Fn(r.transform))throw new sr("z.compile: async transforms are not supported");let o=r.transform,s=Vn(t,u=>{let l={value:u,issues:[],addIssue:xh},d=o(u,l);return d instanceof Promise?yt:l.issues.length===0?d:yt}),c=B(t);return e.write(`const ${c} = ${s}(${i});`),e.write(`if (${c} === INVALID) return INVALID;`),c}return i}function Zl(e){return e.checks&&(e.checks=[...e.checks]),e}function Ml(e,t){return new e(Zl({type:"string",...z(t)}))}function Sh(e,t){return new e(Zl({type:"string",coerce:!0,...z(t)}))}function Ya(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...z(t)})}function Qa(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...z(t)})}function es(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...z(t)})}function ts(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...z(t)})}function rs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...z(t)})}function ns(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...z(t)})}function oo(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...z(t)})}function is(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...z(t)})}function os(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...z(t)})}function as(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...z(t)})}function ss(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...z(t)})}function cs(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...z(t)})}function us(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...z(t)})}function ls(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...z(t)})}function ds(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...z(t)})}function fs(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...z(t)})}function Ll(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...z(t)})}function ps(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...z(t)})}function ms(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...z(t)})}function hs(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...z(t)})}function gs(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...z(t)})}function vs(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...z(t)})}function Vl(e,t){return new e({type:"string",format:"credit_card",check:"string_format",abort:!1,...z(t)})}function Fl(e,t){return new e({type:"string",format:"iban",check:"string_format",abort:!1,...z(t)})}function ys(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...z(t)})}var Ih={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function _s(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...z(t)})}function $s(e,t){return new e({type:"string",format:"date",check:"string_format",...z(t)})}function bs(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...z(t)})}function ws(e,t){return new e({type:"string",format:"duration",check:"string_format",...z(t)})}function ql(e,t){return new e(Zl({type:"number",checks:[],...z(t)}))}function zh(e,t){return new e(Zl({type:"number",coerce:!0,checks:[],...z(t)}))}function Bl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...z(t)})}function Hl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...z(t)})}function Jl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...z(t)})}function Kl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...z(t)})}function Gl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...z(t)})}function Wl(e,t){return new e({type:"boolean",...z(t)})}function Ph(e,t){return new e({type:"boolean",coerce:!0,...z(t)})}function Xl(e,t){return new e({type:"bigint",...z(t)})}function Th(e,t){return new e({type:"bigint",coerce:!0,...z(t)})}function Yl(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...z(t)})}function Ql(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...z(t)})}function ed(e,t){return new e({type:"symbol",...z(t)})}function td(e,t){return new e({type:"undefined",...z(t)})}function rd(e,t){return new e({type:"null",...z(t)})}function nd(e){return new e({type:"any"})}function id(e){return new e({type:"unknown"})}function od(e,t){return new e({type:"never",...z(t)})}function ad(e,t){return new e({type:"void",...z(t)})}function sd(e,t){return new e({type:"date",...z(t)})}function Eh(e,t){return new e({type:"date",coerce:!0,...z(t)})}function cd(e,t){return new e({type:"nan",...z(t)})}function br(e,t){return new au({check:"less_than",...z(t),value:e,inclusive:!1})}function Ft(e,t){return new au({check:"less_than",...z(t),value:e,inclusive:!0})}function wr(e,t){return new su({check:"greater_than",...z(t),value:e,inclusive:!1})}function qt(e,t){return new su({check:"greater_than",...z(t),value:e,inclusive:!0})}function ud(e){return wr(0,e)}function ld(e){return br(0,e)}function dd(e){return Ft(0,e)}function fd(e){return qt(0,e)}function on(e,t){return new Um({check:"multiple_of",...z(t),value:e})}function an(e,t){return new Lm({check:"max_size",...z(t),maximum:e})}function xr(e,t){return new Vm({check:"min_size",...z(t),minimum:e})}function qn(e,t){return new Fm({check:"size_equals",...z(t),size:e})}function Bn(e,t){return new qm({check:"max_length",...z(t),maximum:e})}function Fr(e,t){return new Bm({check:"min_length",...z(t),minimum:e})}function Hn(e,t){return new Hm({check:"length_equals",...z(t),length:e})}function ao(e,t){return new Jm({check:"string_format",format:"regex",...z(t),pattern:e})}function so(e){return new Km({check:"string_format",format:"lowercase",...z(e)})}function co(e){return new Gm({check:"string_format",format:"uppercase",...z(e)})}function uo(e,t){return new Wm({check:"string_format",format:"includes",...z(t),includes:e})}function lo(e,t){return new Xm({check:"string_format",format:"starts_with",...z(t),prefix:e})}function fo(e,t){return new Ym({check:"string_format",format:"ends_with",...z(t),suffix:e})}function pd(e,t,n){return new Qm({check:"property",property:e,schema:t,...z(n)})}function po(e,t){return new eh({check:"properties",shape:e,...z(t)})}function mo(e,t){return new th({check:"mime_type",mime:e,...z(t)})}function cr(e){return new rh({check:"overwrite",tx:e})}function ho(e){return cr(t=>t.normalize(e))}function go(){return cr(e=>e.trim())}function vo(){return cr(e=>e.toLowerCase())}function yo(){return cr(e=>e.toUpperCase())}function _o(){return cr(e=>Zp(e))}function Oh(e,t,n){return new e({type:"array",element:t,...z(n)})}function ZO(e,t,n){return new e({type:"union",options:t,...z(n)})}function MO(e,t,n){return new e({type:"union",options:t,inclusive:!1,...z(n)})}function LO(e,t,n,i){return new e({type:"union",options:n,discriminator:t,...z(i)})}function VO(e,t,n){return new e({type:"intersection",left:t,right:n})}function FO(e,t,n,i){let r=n instanceof W,o=r?i:n,a=r?n:null;return new e({type:"tuple",items:t,rest:a,...z(o)})}function qO(e,t,n,i){return new e({type:"record",keyType:t,valueType:n,...z(i)})}function BO(e,t,n,i){return new e({type:"map",keyType:t,valueType:n,...z(i)})}function HO(e,t,n){return new e({type:"set",valueType:t,...z(n)})}function JO(e,t,n){let i=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e({type:"enum",entries:i,...z(n)})}function KO(e,t,n){return new e({type:"enum",entries:t,...z(n)})}function GO(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...z(n)})}function md(e,t){return new e({type:"file",...z(t)})}function WO(e,t){return new e({type:"transform",transform:t})}function XO(e,t){return new e({type:"optional",innerType:t})}function YO(e,t){return new e({type:"nullable",innerType:t})}function QO(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():Ui(n)}})}function ej(e,t,n){return new e({type:"nonoptional",innerType:t,...z(n)})}function tj(e,t){return new e({type:"success",innerType:t})}function rj(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:Hp(n)})}function nj(e,t,n){return new e({type:"pipe",in:t,out:n})}function ij(e,t){return new e({type:"readonly",innerType:t})}function oj(e,t,n){return new e({type:"template_literal",parts:t,...z(n)})}function aj(e,t){return new e({type:"lazy",getter:t})}function sj(e,t){return new e({type:"promise",innerType:t})}function hd(e,t,n){let i=z(n);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function gd(e,t,n){return new e({type:"custom",check:"custom",fn:t,...z(n)})}function vd(e,t){let n=Kw(i=>(i.addIssue=r=>{if(typeof r=="string")i.issues.push(Mi(r,i.value,n._zod.def));else{let o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),"input"in o||(o.input=i.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),i.issues.push(Mi(o))}},e(i.value,i)),t);return n}function Kw(e,t){let n=new xe({check:"custom",...z(t)});return n._zod.check=e,n}function yd(e){let t=new xe({check:"describe"});return t._zod.onattach=[n=>{let i=Qe.get(n)??{};Qe.add(n,{...i,description:e})}],t._zod.check=()=>{},t}function _d(e){let t=new xe({check:"meta"});return t._zod.onattach=[n=>{let i=Qe.get(n)??{};Qe.add(n,{...i,...e})}],t._zod.check=()=>{},t}function $d(e,t){let n=z(t),i=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(i=i.map(f=>typeof f=="string"?f.toLowerCase():f),r=r.map(f=>typeof f=="string"?f.toLowerCase():f));let o=new Set(i),a=new Set(r),s=e.Codec??Qi,c=e.Boolean??Xi,u=e.String??rn,l=new u({type:"string",error:n.error}),d=new c({type:"boolean",error:n.error}),p=new s({type:"pipe",in:l,out:d,transform:((f,m)=>{let h=f;return n.case!=="sensitive"&&(h=h.toLowerCase()),o.has(h)?!0:a.has(h)?!1:(m.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:m.value,inst:p,continue:!1}),{})}),reverseTransform:((f,m)=>f===!0?i[0]||"true":r[0]||"false"),error:n.error});return p._zod.bag.truthy=i,p._zod.bag.falsy=r,p._zod.bag.case=n.case??"insensitive",p}function sn(e,t,n,i={}){let r=z(i),o={check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:s=>n.test(s),...r};return n instanceof RegExp&&(o.pattern=n),new e(o)}function xs(e,...t){for(let n of t)for(let i of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,i)&&Ye(e,i,n[i]);return e}function cn(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??Qe,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function He(e,t,n,i,r){let o=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:i.path,message:r}):t.unrepresentable;if(o==="any")return!1;if(o===void 0||o==="throw")throw new Error(r);return Object.assign(n,o),!0}function be(e,t,n={path:[],schemaPath:[]}){var i;let r=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let l={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,l);else{let p=a.schema,f=t.processors[r.type];if(!f)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);f(e,t,p,l)}let d=e._zod.parent;d&&(a.ref||(a.ref=d),be(d,t,l),t.seen.get(d).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&xs(a.schema,c),t.io==="input"&&_t(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function Gw(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function un(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;let i=new Map;for(let a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let c=i.get(s);if(c&&c!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(s,a[0])}}let r=a=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let d=e.external.registry.get(a[0])?.id,p=e.external.uri??(m=>m);if(d)return{ref:p(d)};let f=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=f,{defId:f,ref:`${p("__shared")}#/${s}/${Gw(f)}`}}let c="#",u=`${c}/${s}/`;if(a[1]===n&&!a[1].schema.id)return{ref:c};let l=a[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:u+Gw(l)}},o=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:c,defId:u}=r(a);s.def={...s.schema},u&&(s.defId=u);let l=s.schema;for(let d in l)delete l[d];l.$ref=c};if(e.cycles==="throw")for(let a of e.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
|
|
70
70
|
|
|
71
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(t===a[0]){o(a);continue}if(e.external){let u=e.external.registry.get(a[0])?.id;if(t!==a[0]&&u){o(a);continue}}if(e.metadataRegistry.get(a[0])?.id){o(a);continue}if(s.cycle){o(a);continue}s.count>1&&e.reused==="ref"&&o(a)}e.external&&(e.sharedDefsExtractedFor=e.external)}function Kw(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let i of t){if(!i||typeof i!="object")return;Kw(i);let r=Object.keys(i);if(r.length!==1||r[0]!=="type")return;let o=i.type;for(let a of Array.isArray(o)?o:[o]){if(typeof a!="string")return;n.includes(a)||n.push(a)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var Gw=new Set(["type","properties","required","additionalProperties"]),Hw=["oneOf","anyOf"];function Jw(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function Ph(e){let t=[];for(let o of e){if(typeof o!="object"||o.type!=="object")return null;for(let a in o)if(!Gw.has(a))return null;t.push(o)}let n={},i=new Set;for(let o of t){for(let a in o.properties){if(Object.prototype.hasOwnProperty.call(n,a))continue;let s=[];for(let u of t){let l=u.properties?.[a]??Jw(u);l!=null&&(s.some(d=>JSON.stringify(d)===JSON.stringify(l))||s.push(l))}let c=s.length===1?s[0]:Ph(s)??{allOf:s};Ye(n,a,c)}for(let a of o.required??[])i.add(a)}let r={type:"object",properties:n};if(i.size&&(r.required=[...i]),t.every(o=>o.additionalProperties===!1))r.additionalProperties=!1;else{let o=[];for(let a of t){let s=Jw(a);s&&!o.some(c=>JSON.stringify(c)===JSON.stringify(s))&&o.push(s)}o.length===1?r.additionalProperties=o[0]:o.length>1&&(r.additionalProperties={allOf:o})}return r}function Qj(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let r of Gw)if(r in e)return;let n=t.filter(r=>Hw.some(o=>Array.isArray(r[o]))),i=null;if(!n.length)i=Ph(t);else{let r=n[0],o=Hw.find(c=>Array.isArray(r[c]));if(Object.keys(r).length!==1)return;let a=t.filter(c=>c!==r),s=r[o].map(c=>Ph([...a,c]));if(s.some(c=>!c))return;i={[o]:s}}i&&(delete e.allOf,_s(e,i))}function un(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=s=>{let c=e.seen.get(s);if(c.ref===null)return;let u=c.def??c.schema,l={...u},d=c.ref;if(c.ref=null,d){i(d);let p=e.seen.get(d),m=p.schema;if(m.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(m)):_s(u,m),_s(u,l),s._zod.parent===d)for(let g in u)g==="$ref"||g==="allOf"||g in l||delete u[g];if(m.$ref&&p.def)for(let g in u)g==="$ref"||g==="allOf"||g in p.def&&JSON.stringify(u[g])===JSON.stringify(p.def[g])&&delete u[g]}let f=s._zod.parent;if(f&&f!==d){i(f);let p=e.seen.get(f);if(p?.schema.$ref&&(u.$ref=p.schema.$ref,p.def))for(let m in u)m==="$ref"||m==="allOf"||m in p.def&&JSON.stringify(u[m])===JSON.stringify(p.def[m])&&delete u[m]}e.override({zodSchema:s,jsonSchema:u,path:c.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let s of[...e.seen.entries()].reverse())i(s[0]);if(e.target!=="openapi-3.0")for(let s of e.seen.entries())Kw(s[1].def??s[1].schema);for(let s of e.deferred)s();if(e.intersections.length){let s=new Map;for(let c of e.seen.values())for(let u of[c.schema,c.def]){let l=u?.allOf;if(!Array.isArray(l))continue;let d=s.get(l);d?d.push(u):s.set(l,[u])}for(let c of e.intersections)for(let u of s.get(c)??[])Qj(u)}}let r={};if(e.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(s)}_s(r,n.defId?n.schema:n.def??n.schema);let o=e.metadataRegistry.get(t)?.id;o!==void 0&&r.id===o&&delete r.id;let a=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let s of e.seen.entries()){let c=s[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,Ye(a,c.defId,c.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?r.$defs=a:r.definitions=a);try{let s=JSON.parse(JSON.stringify(r));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:yo(t,"input",e.processors),output:yo(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function _t(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return _t(i.element,n);if(i.type==="set")return _t(i.valueType,n);if(i.type==="lazy")return _t(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault"||i.type==="catch")return _t(i.innerType,n);if(i.type==="intersection")return _t(i.left,n)||_t(i.right,n);if(i.type==="record"||i.type==="map")return _t(i.keyType,n)||_t(i.valueType,n);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:_t(i.in,n)||_t(i.out,n);if(i.type==="object"){for(let r in i.shape)if(_t(i.shape[r],n))return!0;return!1}if(i.type==="union"){for(let r of i.options)if(_t(r,n))return!0;return!1}if(i.type==="tuple"){for(let r of i.items)if(_t(r,n))return!0;return!!(i.rest&&_t(i.rest,n))}return!1}var Th=(e,t={})=>n=>{let i=sn({...n,processors:t});return $e(e,i),cn(i,e),un(i,e)},yo=(e,t,n={})=>i=>{let{libraryOptions:r,target:o}=i??{},a=sn({...r??{},target:o,io:t,processors:n});return $e(e,a),cn(a,e),un(a,e)};var _o=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},$o=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},Ww=(e,t)=>{_o(e,"minimum",t),$o(e,"maximum",t)},ek=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},tk=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},rk=(e,t)=>{e.mime=e.mime?e.mime.filter(n=>t.includes(n)):[...t]},nk=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},Xw=(e,t)=>_o(e,"minimum",t.minimum),Yw=(e,t)=>$o(e,"maximum",t.maximum),Qw=e=>(t,n)=>{nk(t,n.format);let[i,r]=e[n.format];_o(t,"minimum",i),$o(t,"maximum",r)},eE={greater_than:(e,t)=>_o(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>$o(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>ek(e,t.value),number_format:Qw(wa),bigint_format:Qw(ka),min_length:Xw,max_length:Yw,length_equals:(e,t)=>Ww(e,t.length),min_size:Xw,max_size:Yw,size_equals:(e,t)=>Ww(e,t.size),string_format:(e,t)=>{nk(e,t.format),t.pattern&&tk(e,t.pattern),(t.format==="base64"||t.format==="base64url")&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>rk(e,t.mime)};function He(e){let t={},n=e._zod.def,i=e._zod.traits.has("$ZodCheck")?[e,...n.checks??[]]:n.checks??[];for(let o of i)eE[o._zod.def.check]?.(t,o._zod.def);let r=e._zod.bag;r.minimum!==void 0&&_o(t,"minimum",r.minimum),r.exclusiveMinimum!==void 0&&_o(t,"exclusiveMinimum",r.exclusiveMinimum),r.maximum!==void 0&&$o(t,"maximum",r.maximum),r.exclusiveMaximum!==void 0&&$o(t,"exclusiveMaximum",r.exclusiveMaximum),r.multipleOf!==void 0&&ek(t,r.multipleOf),r.format!==void 0&&(t.format??(t.format=r.format),r.format.includes("int")&&(t.isInt=!0)),r.mime&&rk(t,r.mime);for(let o of r.patterns??[])tk(t,o);return t}var tE={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},rE=new Map([[Pu,mm],[Ua,hm]]),ik=e=>rE.get(e)??e,Eh=(e,t,n,i)=>{let r=n;r.type="string";let{minimum:o,maximum:a,format:s,patterns:c,contentEncoding:u,laxFormat:l}=He(e);if(typeof o=="number"&&(r.minLength=o),typeof a=="number"&&(r.maxLength=a),s&&(r.format=tE[s]??s,r.format===""&&delete r.format,(s==="time"||l)&&delete r.format),u&&(r.contentEncoding=u),c&&c.size>0){let d=[...c].map(ik);d.length===1?r.pattern=d[0].source:d.length>1&&(r.allOf=[...d.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},Nh=(e,t,n,i)=>{let r=n,{minimum:o,maximum:a,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:u,isInt:l}=He(e);r.type=l?"integer":"number";let d=typeof u=="number"&&u>=(o??Number.NEGATIVE_INFINITY),f=typeof c=="number"&&c<=(a??Number.POSITIVE_INFINITY),p=t.target==="draft-04"||t.target==="openapi-3.0";if(d?p?(r.minimum=u,r.exclusiveMinimum=!0):r.exclusiveMinimum=u:typeof o=="number"&&(r.minimum=o),f?p?(r.maximum=c,r.exclusiveMaximum=!0):r.exclusiveMaximum=c:typeof a=="number"&&(r.maximum=a),s){let m=new Set;for(let _ of s)Number.isFinite(_)&&_!==0?m.add(Math.abs(_)):Be(e,t,r,i,`A multipleOf divisor of ${_} cannot be represented in JSON Schema`);let[h,...g]=m;h!==void 0&&(r.multipleOf=h),g.length&&(r.allOf=[...r.allOf??[],...g.map(_=>({multipleOf:_}))])}},Ah=(e,t,n,i)=>{n.type="boolean"},Dh=(e,t,n,i)=>{Be(e,t,n,i,"BigInt cannot be represented in JSON Schema")},Rh=(e,t,n,i)=>{Be(e,t,n,i,"Symbols cannot be represented in JSON Schema")},Ch=(e,t,n,i)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},Uh=(e,t,n,i)=>{Be(e,t,n,i,"Undefined cannot be represented in JSON Schema")},Zh=(e,t,n,i)=>{Be(e,t,n,i,"Void cannot be represented in JSON Schema")},Mh=(e,t,n,i)=>{n.not={}},Lh=(e,t,n,i)=>{},Vh=(e,t,n,i)=>{},Fh=(e,t,n,i)=>{Be(e,t,n,i,"Date cannot be represented in JSON Schema")},qh=(e,t,n,i)=>{let r=e._zod.def,o=Ei(r.entries);if(o.length===0){n.not={};return}o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),n.enum=o},Bh=(e,t,n,i)=>{let r=e._zod.def;if(r.values.length===0){n.not={};return}let o=[];for(let a of r.values)if(a===void 0){if(Be(e,t,n,i,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof a=="bigint"){if(Be(e,t,n,i,"BigInt literals cannot be represented in JSON Schema"))return;o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){let a=o[0];n.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[a]:n.const=a}else o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),o.every(a=>typeof a=="boolean")&&(n.type="boolean"),o.every(a=>a===null)&&(n.type="null"),n.enum=o},Hh=(e,t,n,i)=>{Be(e,t,n,i,"NaN cannot be represented in JSON Schema")},Jh=(e,t,n,i)=>{let r=n,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=o.source},Kh=(e,t,n,i)=>{let r=n;r.type="string",r.format="binary",r.contentEncoding="binary";let{minimum:o,maximum:a,mime:s}=He(e);o!==void 0&&(r.minLength=o),a!==void 0&&(r.maxLength=a),s&&(s.length===0?r.not={}:s.length===1?r.contentMediaType=s[0]:r.anyOf=s.map(c=>({contentMediaType:c})))},Gh=(e,t,n,i)=>{n.type="boolean"},Wh=(e,t,n,i)=>{Be(e,t,n,i,"Custom types cannot be represented in JSON Schema")},Xh=(e,t,n,i)=>{Be(e,t,n,i,"Function types cannot be represented in JSON Schema")},Yh=(e,t,n,i)=>{Be(e,t,n,i,"Transforms cannot be represented in JSON Schema")},Qh=(e,t,n,i)=>{Be(e,t,n,i,"Map cannot be represented in JSON Schema")},eg=(e,t,n,i)=>{Be(e,t,n,i,"Set cannot be represented in JSON Schema")},tg=(e,t,n,i)=>{let r=n,o=e._zod.def,{minimum:a,maximum:s}=He(e);typeof a=="number"&&(r.minItems=a),typeof s=="number"&&(r.maxItems=s),r.type="array",r.items=$e(o.element,t,{...i,path:[...i.path,"items"]})};function $s(e){let t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?$s(t.out):t.type==="catch"?$s(t.innerType):e._zod.optin}var rg=(e,t,n,i)=>{let r=n,o=e._zod.def,a=o.shape;if(Object.getOwnPropertySymbols(a).length&&Be(e,t,r,i,"Symbol keys cannot be represented in JSON Schema"))return;r.type="object",r.properties={};for(let u in a)Ye(r.properties,u,$e(a[u],t,{...i,path:[...i.path,"properties",u]}));let c=[];for(let u of Object.keys(a)){let l=o.shape[u];(t.io==="input"?$s(l)===void 0:l._zod.optout===void 0)&&c.push(u)}c.length>0&&(r.required=c),o.catchall?._zod.def.type==="never"?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=$e(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},vd=(e,t,n,i)=>{let r=e._zod.def,o=r.inclusive===!1,a=r.options.map((s,c)=>$e(s,t,{...i,path:[...i.path,o?"oneOf":"anyOf",c]}));o?n.oneOf=a:n.anyOf=a},ng=(e,t,n,i)=>{let r=e._zod.def,o=$e(r.left,t,{...i,path:[...i.path,"allOf",0]}),a=$e(r.right,t,{...i,path:[...i.path,"allOf",1]}),s=u=>"allOf"in u&&Object.keys(u).length===1,c=[...s(o)?o.allOf:[o],...s(a)?a.allOf:[a]];n.allOf=c,t.intersections.push(c)},ig=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=o.items.map((h,g)=>$e(h,t,{...i,path:[...i.path,a,g]})),u=o.rest?$e(o.rest,t,{...i,path:[...i.path,s,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null,l=o.items.length;for(;l>0;){let h=o.items[l-1];if(!(t.io==="input"?$s(h)!==void 0:h._zod.optout==="optional"))break;l--}let d=o.items.length,f=!o.rest;t.target==="draft-2020-12"?(r.prefixItems=c,f?r.items=!1:u&&(r.items=u),l>0&&(r.minItems=l),f&&(r.maxItems=d)):t.target==="openapi-3.0"?(r.items={anyOf:c},u&&r.items.anyOf.push(u),l>0&&(r.minItems=l),f&&(r.maxItems=d)):(r.items=c,f?r.additionalItems=!1:u&&(r.additionalItems=u),l>0&&(r.minItems=l),f&&(r.maxItems=d));let{minimum:p,maximum:m}=He(e);typeof p=="number"&&(r.minItems=p),typeof m=="number"&&(r.maxItems=m)};function Oh(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let m=e.get(t)?.def;if(!m)return t;let h=Oh(e,m,n);return h===m?t:h}for(let m of["anyOf","oneOf"]){let h=t[m];if(!Array.isArray(h))continue;let g=h.map(_=>Oh(e,_,n));g.some((_,$)=>_!==h[$])&&(t={...t,[m]:g})}let i=Array.isArray(t.type)?t.type:[t.type],r=!i.includes("string")&&i.some(m=>m==="number"||m==="integer"),o=t.enum??(t.const!==void 0?[t.const]:void 0);if(!r&&!o?.some(m=>typeof m=="number"))return t;let{minimum:a,maximum:s,exclusiveMinimum:c,exclusiveMaximum:u,multipleOf:l,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(m=>typeof m=="number"?String(m):m):typeof p.const=="number"&&(p.const=String(p.const)),r&&(p.type="string",o||(p.pattern=(i.includes("number")?Lr:ja).source)),p}var jh=new WeakMap;function nE(e){let t=new Map;for(let i of e.seen.values())i.def&&!t.has(i.schema)&&t.set(i.schema,i);let n=new Map;for(let i of jh.get(e)??[]){let r=e.seen.get(i),o=(r?.def??r?.schema)?.propertyNames;if(!o||o===!0||n.has(o))continue;let a=Oh(t,o,new Set);a!==o&&n.set(o,a)}if(n.size)for(let i of e.seen.values())for(let r of[i.schema,i.def]){let o=r&&n.get(r.propertyNames);o&&(r.propertyNames=o)}}var og=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="object";let a=o.keyType,s=He(a).patterns;if(o.mode==="loose"&&s&&s.size>0){let l=$e(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});r.patternProperties={};for(let d of s)Ye(r.patternProperties,ik(d).source,l)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){r.propertyNames=$e(o.keyType,t,{...i,path:[...i.path,"propertyNames"]});let l=jh.get(t);l||(l=[],jh.set(t,l),t.deferred.push(()=>nE(t))),l.push(e)}r.additionalProperties=$e(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]})}let c=a._zod.values,u=t.io==="input"&&$s(o.valueType)!==void 0;if(c&&!o.partial&&!u){let l=[...c].filter(d=>typeof d=="string"||typeof d=="number");l.length>0&&(r.required=l.map(String))}},ag=(e,t,n,i)=>{let r=e._zod.def,o=$e(r.innerType,t,i),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=r.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},sg=(e,t,n,i)=>{let r=e._zod.def;$e(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},cg=Symbol();function ok(e,t,n,i,r){let o=!1,a=JSON.stringify(e,(s,c)=>typeof c!="bigint"?c:(o=!0,null));return o?(Be(t,n,i,r,"BigInt defaults cannot be represented in JSON Schema"),cg):JSON.parse(a)}var ug=(e,t,n,i)=>{let r=e._zod.def;$e(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType;let a=ok(r.defaultValue,e,t,n,i);a!==cg&&(n.default=a)},lg=(e,t,n,i)=>{let r=e._zod.def;$e(r.innerType,t,i);let o=t.seen.get(e);if(o.ref=r.innerType,t.io!=="input")return;let a=ok(r.defaultValue,e,t,n,i);a!==cg&&(n._prefault=a)},dg=(e,t,n,i)=>{let r=e._zod.def;$e(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType;let a;try{a=r.catchValue(void 0)}catch{Be(e,t,n,i,"Dynamic catch values are not supported in JSON Schema");return}n.default=a},fg=(e,t,n,i)=>{let r=e._zod.def,o=r.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?o?r.out:r.in:r.out;$e(a,t,i);let s=t.seen.get(e);s.ref=a},pg=(e,t,n,i)=>{let r=e._zod.def;$e(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.readOnly=!0},mg=(e,t,n,i)=>{let r=e._zod.def;$e(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},yd=(e,t,n,i)=>{let r=e._zod.def;$e(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},hg=(e,t,n,i)=>{let r=e._zod.innerType;$e(r,t,i);let o=t.seen.get(e);o.ref=r},gd={string:Eh,number:Nh,boolean:Ah,bigint:Dh,symbol:Rh,null:Ch,undefined:Uh,void:Zh,never:Mh,any:Lh,unknown:Vh,date:Fh,enum:qh,literal:Bh,nan:Hh,template_literal:Jh,file:Kh,success:Gh,custom:Wh,function:Xh,transform:Yh,map:Qh,set:eg,array:tg,object:rg,union:vd,intersection:ng,tuple:ig,record:og,nullable:ag,nonoptional:sg,default:ug,prefault:lg,catch:dg,pipe:fg,readonly:pg,promise:mg,optional:yd,lazy:hg};function Hn(e,t){if("_idmap"in e){let i=e,r=sn({...t,processors:gd}),o={};for(let c of i._idmap.entries()){let[u,l]=c;$e(l,r)}let a={},s={registry:i,uri:t?.uri,defs:o};r.external=s;for(let c of i._idmap.entries()){let[u,l]=c;cn(r,l),Ye(a,u,un(r,l))}if(Object.keys(o).length>0){let c=r.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[c]:o}}return{schemas:a}}let n=sn({...t,processors:gd});return $e(e,n),cn(n,e),un(n,e)}var _d=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 n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=sn({processors:gd,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return $e(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,cn(this.ctx,t);let i=un(this.ctx,t),{"~standard":r,...o}=i;return o}};var ak={};var aE=v("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");W.init(e,t),e.def=t,e.type=t.type},{get with(){return this.check},set with(e){$r(this,"with",e)},parse(e,t){return Rn(this,e,t,{callee:this.parse})},parseAsync(e,t){return Cn(this,e,t,{callee:this.parseAsync})},safeParse(e,t){return Vi(this,e,t)},safeParseAsync(e,t){return qi(this,e,t)},check(...e){let t=this.def;return this.clone({...t,checks:[...t.checks??[],...e.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0})},clone(e,t){return he(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},apply(e,...t){return t.length===0?e(this):e(this,...t)}});var sE=v("ZodMiniObject",(e,t)=>{Xu.init(e,t),aE.init(e,t),Lp(e,"shape",n=>n._zod.def.shape,!1)});function gg(e,t){let n={type:"object",shape:e??{},...z(t)};return new sE(n)}var sk=Symbol("z.visit/resolving");function bs(e,t){let n=typeof t=="function"?t:(a,s)=>{let c=t[a._zod.def.type];return c?c(a,s):a},i=new Map;function r(a){let s=i.get(a);if(s===sk)return new Yi({type:"lazy",getter:()=>i.get(a)});if(s!==void 0)return s;i.set(a,sk);let c=o(a),u=n(c,c!==a);return i.set(a,u),u}function o(a){let s=a._zod.def,c=s.type;switch(c){case"object":{let u=s.shape,l=Object.keys(u),d=!1,f={};for(let m of l){let h=r(u[m]);h!==u[m]&&(d=!0),f[m]=h}let p=s.catchall;return s.catchall&&(p=r(s.catchall),p!==s.catchall&&(d=!0)),d?he(a,{...s,shape:f,catchall:p}):a}case"array":{let u=r(s.element);return u===s.element?a:he(a,{...s,element:u})}case"tuple":{let u=s.items,l=!1,d=[];for(let p of u){let m=r(p);m!==p&&(l=!0),d.push(m)}let f=s.rest;return s.rest&&(f=r(s.rest),f!==s.rest&&(l=!0)),l?he(a,{...s,items:d,rest:f}):a}case"record":case"map":{let u=r(s.keyType),l=r(s.valueType);return u===s.keyType&&l===s.valueType?a:he(a,{...s,keyType:u,valueType:l})}case"set":{let u=r(s.valueType);return u===s.valueType?a:he(a,{...s,valueType:u})}case"union":{let u=s.options,l=!1,d=[];for(let f of u){let p=r(f);p!==f&&(l=!0),d.push(p)}return l?he(a,{...s,options:d}):a}case"intersection":{let u=r(s.left),l=r(s.right);return u===s.left&&l===s.right?a:he(a,{...s,left:u,right:l})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{let u=r(s.innerType);return u===s.innerType?a:he(a,{...s,innerType:u})}case"pipe":{let u=r(s.in),l=r(s.out);return u===s.in&&l===s.out?a:he(a,{...s,in:u,out:l})}case"function":{let u=r(s.input),l=r(s.output);return u===s.input&&l===s.output?a:he(a,{...s,input:u,output:l})}case"lazy":{let u=s.getter,{_cachedInner:l,...d}=s;return he(a,{...d,getter:()=>r(u())})}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":return a;default:return a}}return r(e)}function xr(e){return!!e._zod}function Jn(e){let t=Object.values(e);if(t.length===0)return gg({});let n=t.every(xr),i=t.every(r=>!xr(r));if(n)return gg(e);if(i)return x$(e);throw new Error("Mixed Zod versions detected in object shape.")}function ln(e,t){return xr(e)?Vi(e,t):e.safeParse(t)}async function $d(e,t){return xr(e)?await qi(e,t):await e.safeParseAsync(t)}function dn(e){if(!e)return;let t;if(xr(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function bo(e){if(e){if(typeof e=="object"){let t=e,n=e;if(!t._def&&!n._zod){let i=Object.values(e);if(i.length>0&&i.every(r=>typeof r=="object"&&r!==null&&(r._def!==void 0||r._zod!==void 0||typeof r.parse=="function")))return Jn(e)}}if(xr(e)){let n=e._zod?.def;if(n&&(n.type==="object"||n.shape!==void 0))return e}else if(e.shape!==void 0)return e}}function uE(e){return e.length===0?"object root":e.reduce((t,n,i)=>i===0?String(n):typeof n=="number"?`${t}[${n}]`:`${t}.${n}`,"")}function bd(e){if(e&&typeof e=="object"){if("issues"in e&&Array.isArray(e.issues)&&e.issues.length>0)return e.issues.map(t=>t.path?.length?`${t.message} at ${uE(t.path)}`:t.message).join(`
|
|
72
|
-
`);if("message"in e&&typeof e.message=="string")return e.message;try{return JSON.stringify(e)}catch{return String(e)}}return String(e)}function ck(e){return e.description}function uk(e){if(xr(e))return e._zod?.def?.type==="optional";let t=e;return typeof e.isOptional=="function"?e.isOptional():t._def?.typeName==="ZodOptional"}function wo(e){if(xr(e)){let o=e._zod?.def;if(o){if(o.value!==void 0)return o.value;if(Array.isArray(o.values)&&o.values.length>0)return o.values[0]}}let n=e._def;if(n){if(n.value!==void 0)return n.value;if(Array.isArray(n.values)&&n.values.length>0)return n.values[0]}let i=e.value;if(i!==void 0)return i}var F={};Ar(F,{$brand:()=>Bp,$input:()=>mh,$output:()=>ph,INVALID:()=>yt,NEVER:()=>qp,TimePrecision:()=>wh,ZodAny:()=>Dg,ZodArray:()=>Zg,ZodBase64:()=>Md,ZodBase64URL:()=>Ld,ZodBigInt:()=>Po,ZodBigIntFormat:()=>qd,ZodBoolean:()=>zo,ZodCIDRv4:()=>Ud,ZodCIDRv6:()=>Zd,ZodCUID:()=>jd,ZodCUID2:()=>Ed,ZodCatch:()=>iv,ZodCodec:()=>Os,ZodCompileAsyncError:()=>sr,ZodCompileUnsupportedError:()=>ce,ZodCreditCard:()=>Og,ZodCustom:()=>js,ZodCustomStringFormat:()=>Gn,ZodDate:()=>Ss,ZodDefault:()=>Yg,ZodDiscriminatedUnion:()=>Lg,ZodE164:()=>Vd,ZodEmail:()=>zd,ZodEmoji:()=>Td,ZodEnum:()=>xo,ZodError:()=>lE,ZodExactOptional:()=>Jd,ZodFile:()=>Kg,ZodFirstPartyTypeKind:()=>yv,ZodFunction:()=>mv,ZodGUID:()=>Pd,ZodIBAN:()=>jg,ZodIPv4:()=>Rd,ZodIPv6:()=>Cd,ZodISODate:()=>pn,ZodISODateTime:()=>fn,ZodISODuration:()=>hn,ZodISOTime:()=>mn,ZodInstanceOf:()=>vv,ZodIntersection:()=>Vg,ZodIssueCode:()=>pE,ZodJWT:()=>Fd,ZodKSUID:()=>Dd,ZodLazy:()=>dv,ZodLiteral:()=>Jg,ZodMAC:()=>Tg,ZodMap:()=>Bg,ZodNaN:()=>av,ZodNanoID:()=>Od,ZodNever:()=>Cg,ZodNonOptional:()=>Kd,ZodNull:()=>Ag,ZodNullable:()=>Xg,ZodNumber:()=>Io,ZodNumberFormat:()=>Wn,ZodObject:()=>Is,ZodOptional:()=>Xn,ZodPipe:()=>Ts,ZodPrefault:()=>ev,ZodPreprocess:()=>sv,ZodPromise:()=>pv,ZodReadonly:()=>cv,ZodRealError:()=>Ot,ZodRecord:()=>ko,ZodSet:()=>Hg,ZodString:()=>So,ZodStringFormat:()=>xe,ZodSuccess:()=>nv,ZodSymbol:()=>Eg,ZodTemplateLiteral:()=>lv,ZodTransform:()=>Gg,ZodTuple:()=>Fg,ZodType:()=>te,ZodULID:()=>Nd,ZodURL:()=>ks,ZodUUID:()=>Sr,ZodUndefined:()=>Ng,ZodUnion:()=>zs,ZodUnknown:()=>Rg,ZodVoid:()=>Ug,ZodXID:()=>Ad,ZodXor:()=>Mg,_ZodString:()=>Id,_default:()=>Qg,_function:()=>vx,any:()=>Yk,array:()=>ae,base64:()=>Ek,base64url:()=>Nk,bigint:()=>Jk,boolean:()=>Fe,catch:()=>ov,check:()=>yx,cidrv4:()=>Ok,cidrv6:()=>jk,clone:()=>he,codec:()=>px,coerce:()=>$v,compile:()=>yh,config:()=>Me,core:()=>ur,creditCard:()=>Dk,cuid:()=>wk,cuid2:()=>kk,currencyCode:()=>Lk,custom:()=>Gd,date:()=>ex,decode:()=>wg,decodeAsync:()=>xg,deepPartial:()=>Tx,describe:()=>_x,discriminatedUnion:()=>Ps,e164:()=>Ak,email:()=>fk,emoji:()=>$k,encode:()=>bg,encodeAsync:()=>kg,endsWith:()=>uo,enum:()=>tt,exactOptional:()=>Wg,file:()=>ux,flattenError:()=>Pa,float32:()=>Fk,float64:()=>qk,formatError:()=>Ta,fromJSONSchema:()=>Px,function:()=>vx,getDiscriminatedOption:()=>uh,getErrorMap:()=>hE,globalRegistry:()=>Qe,gt:()=>wr,gte:()=>Ft,guid:()=>pk,hash:()=>Vk,hex:()=>Mk,hostname:()=>Zk,httpUrl:()=>_k,iban:()=>Rk,includes:()=>so,input:()=>jx,instanceof:()=>bx,int:()=>xd,int32:()=>Bk,int64:()=>Kk,intersection:()=>To,invertCodec:()=>mx,ipv4:()=>zk,ipv6:()=>Tk,iso:()=>Yn,json:()=>kx,jwt:()=>Ck,keyof:()=>tx,ksuid:()=>Ik,lazy:()=>fv,length:()=>Bn,literal:()=>Z,locales:()=>to,looseObject:()=>et,looseRecord:()=>ox,lowercase:()=>oo,lt:()=>br,lte:()=>Vt,mac:()=>Pk,map:()=>ax,maxLength:()=>qn,maxSize:()=>on,memoizer:()=>Ha,meta:()=>$x,mime:()=>fo,minLength:()=>Vr,minSize:()=>kr,multipleOf:()=>nn,nan:()=>fx,nanoid:()=>bk,nativeEnum:()=>cx,negative:()=>od,never:()=>Bd,nonnegative:()=>sd,nonoptional:()=>rv,nonpositive:()=>ad,normalize:()=>po,null:()=>xs,nullable:()=>ws,nullish:()=>lx,number:()=>ge,object:()=>A,optional:()=>ke,output:()=>Ex,overwrite:()=>cr,parse:()=>vg,parseAsync:()=>yg,partialRecord:()=>ix,pipe:()=>Sd,positive:()=>id,prefault:()=>tv,preprocess:()=>Es,prettifyError:()=>Wp,promise:()=>gx,properties:()=>lo,property:()=>cd,readonly:()=>uv,record:()=>Se,refine:()=>hv,regex:()=>io,regexes:()=>Lt,registry:()=>jl,safeDecode:()=>Ig,safeDecodeAsync:()=>Pg,safeEncode:()=>Sg,safeEncodeAsync:()=>zg,safeParse:()=>_g,safeParseAsync:()=>$g,set:()=>sx,setErrorMap:()=>mE,size:()=>Fn,slugify:()=>vo,startsWith:()=>co,strictObject:()=>rx,string:()=>b,stringFormat:()=>Uk,stringbool:()=>wx,success:()=>dx,superRefine:()=>gv,symbol:()=>Wk,templateLiteral:()=>hx,toJSONSchema:()=>Hn,toLowerCase:()=>ho,toUpperCase:()=>go,toZod:()=>_a,transform:()=>Hd,treeifyError:()=>Gp,trim:()=>mo,tuple:()=>qg,uint32:()=>Hk,uint64:()=>Gk,ulid:()=>xk,undefined:()=>Xk,union:()=>be,unknown:()=>Ie,uppercase:()=>ao,url:()=>yk,util:()=>w,uuid:()=>mk,uuidv4:()=>hk,uuidv6:()=>gk,uuidv7:()=>vk,validate:()=>Bi,validateAsync:()=>Hi,void:()=>Qk,withParser:()=>El,xid:()=>Sk,xor:()=>nx});var Oo={};Ar(Oo,{ZodAny:()=>Dg,ZodArray:()=>Zg,ZodBase64:()=>Md,ZodBase64URL:()=>Ld,ZodBigInt:()=>Po,ZodBigIntFormat:()=>qd,ZodBoolean:()=>zo,ZodCIDRv4:()=>Ud,ZodCIDRv6:()=>Zd,ZodCUID:()=>jd,ZodCUID2:()=>Ed,ZodCatch:()=>iv,ZodCodec:()=>Os,ZodCreditCard:()=>Og,ZodCustom:()=>js,ZodCustomStringFormat:()=>Gn,ZodDate:()=>Ss,ZodDefault:()=>Yg,ZodDiscriminatedUnion:()=>Lg,ZodE164:()=>Vd,ZodEmail:()=>zd,ZodEmoji:()=>Td,ZodEnum:()=>xo,ZodExactOptional:()=>Jd,ZodFile:()=>Kg,ZodFunction:()=>mv,ZodGUID:()=>Pd,ZodIBAN:()=>jg,ZodIPv4:()=>Rd,ZodIPv6:()=>Cd,ZodISODate:()=>pn,ZodISODateTime:()=>fn,ZodISODuration:()=>hn,ZodISOTime:()=>mn,ZodInstanceOf:()=>vv,ZodIntersection:()=>Vg,ZodJWT:()=>Fd,ZodKSUID:()=>Dd,ZodLazy:()=>dv,ZodLiteral:()=>Jg,ZodMAC:()=>Tg,ZodMap:()=>Bg,ZodNaN:()=>av,ZodNanoID:()=>Od,ZodNever:()=>Cg,ZodNonOptional:()=>Kd,ZodNull:()=>Ag,ZodNullable:()=>Xg,ZodNumber:()=>Io,ZodNumberFormat:()=>Wn,ZodObject:()=>Is,ZodOptional:()=>Xn,ZodPipe:()=>Ts,ZodPrefault:()=>ev,ZodPreprocess:()=>sv,ZodPromise:()=>pv,ZodReadonly:()=>cv,ZodRecord:()=>ko,ZodSet:()=>Hg,ZodString:()=>So,ZodStringFormat:()=>xe,ZodSuccess:()=>nv,ZodSymbol:()=>Eg,ZodTemplateLiteral:()=>lv,ZodTransform:()=>Gg,ZodTuple:()=>Fg,ZodType:()=>te,ZodULID:()=>Nd,ZodURL:()=>ks,ZodUUID:()=>Sr,ZodUndefined:()=>Ng,ZodUnion:()=>zs,ZodUnknown:()=>Rg,ZodVoid:()=>Ug,ZodXID:()=>Ad,ZodXor:()=>Mg,_ZodString:()=>Id,_default:()=>Qg,_function:()=>vx,any:()=>Yk,array:()=>ae,base64:()=>Ek,base64url:()=>Nk,bigint:()=>Jk,boolean:()=>Fe,catch:()=>ov,check:()=>yx,cidrv4:()=>Ok,cidrv6:()=>jk,codec:()=>px,creditCard:()=>Dk,cuid:()=>wk,cuid2:()=>kk,currencyCode:()=>Lk,custom:()=>Gd,date:()=>ex,describe:()=>_x,discriminatedUnion:()=>Ps,e164:()=>Ak,email:()=>fk,emoji:()=>$k,enum:()=>tt,exactOptional:()=>Wg,file:()=>ux,float32:()=>Fk,float64:()=>qk,function:()=>vx,guid:()=>pk,hash:()=>Vk,hex:()=>Mk,hostname:()=>Zk,httpUrl:()=>_k,iban:()=>Rk,instanceof:()=>bx,int:()=>xd,int32:()=>Bk,int64:()=>Kk,intersection:()=>To,invertCodec:()=>mx,ipv4:()=>zk,ipv6:()=>Tk,json:()=>kx,jwt:()=>Ck,keyof:()=>tx,ksuid:()=>Ik,lazy:()=>fv,literal:()=>Z,looseObject:()=>et,looseRecord:()=>ox,mac:()=>Pk,map:()=>ax,meta:()=>$x,nan:()=>fx,nanoid:()=>bk,nativeEnum:()=>cx,never:()=>Bd,nonoptional:()=>rv,null:()=>xs,nullable:()=>ws,nullish:()=>lx,number:()=>ge,object:()=>A,optional:()=>ke,partialRecord:()=>ix,pipe:()=>Sd,prefault:()=>tv,preprocess:()=>Es,promise:()=>gx,readonly:()=>uv,record:()=>Se,refine:()=>hv,set:()=>sx,strictObject:()=>rx,string:()=>b,stringFormat:()=>Uk,stringbool:()=>wx,success:()=>dx,superRefine:()=>gv,symbol:()=>Wk,templateLiteral:()=>hx,transform:()=>Hd,tuple:()=>qg,uint32:()=>Hk,uint64:()=>Gk,ulid:()=>xk,undefined:()=>Xk,union:()=>be,unknown:()=>Ie,url:()=>yk,uuid:()=>mk,uuidv4:()=>hk,uuidv6:()=>gk,uuidv7:()=>vk,void:()=>Qk,xid:()=>Sk,xor:()=>nx});var wd={};Ar(wd,{endsWith:()=>uo,gt:()=>wr,gte:()=>Ft,includes:()=>so,length:()=>Bn,lowercase:()=>oo,lt:()=>br,lte:()=>Vt,maxLength:()=>qn,maxSize:()=>on,mime:()=>fo,minLength:()=>Vr,minSize:()=>kr,multipleOf:()=>nn,negative:()=>od,nonnegative:()=>sd,nonpositive:()=>ad,normalize:()=>po,overwrite:()=>cr,positive:()=>id,properties:()=>lo,property:()=>cd,regex:()=>io,size:()=>Fn,slugify:()=>vo,startsWith:()=>co,toLowerCase:()=>ho,toUpperCase:()=>go,trim:()=>mo,uppercase:()=>ao});var lk=new WeakSet([Object.prototype,Error.prototype]);function kd(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let i=n(this);return Object.defineProperty(this,t,{value:i,configurable:!0,writable:!0}),i},set(i){Object.defineProperty(this,t,{value:i,configurable:!0,writable:!0})}})}var dk=(e,t)=>{Kp.init(e,t),e.name="ZodError";let n=Object.getPrototypeOf(e);lk.has(n)||(lk.add(n),kd(n,"format",i=>r=>Ta(i,r)),kd(n,"flatten",i=>r=>Pa(i,r)),kd(n,"addIssue",i=>r=>{i.issues.push(r),i.message=JSON.stringify(i.issues,Ni,2)}),kd(n,"addIssues",i=>r=>{i.issues.push(...r),i.message=JSON.stringify(i.issues,Ni,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},lE=v("ZodError",dk),Ot=v("ZodError",dk,void 0,{Parent:Error});var vg=Zi(Ot),yg=Mi(Ot),_g=Li(Ot),$g=Fi(Ot),bg=Fc(Ot),wg=qc(Ot),kg=Bc(Ot),xg=Hc(Ot),Sg=Jc(Ot),Ig=Kc(Ot),zg=Gc(Ot),Pg=Wc(Ot);function fE(){Ge.localeError||Me(zl())}function Kn(){Ge.memoizer||Me({memoizer:Ha()})}var te=v("ZodType",(e,t)=>(fE(),W.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(w.mergeDefs(t,{checks:[...t.checks??[],...e.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return he(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(hv(e,t))},superRefine(e,t){return this.check(gv(e,t))},overwrite(e){return this.check(cr(e))},optional(){return ke(this)},exactOptional(){return Wg(this)},nullable(){return ws(this)},nullish(){return ke(ws(this))},nonoptional(e){return rv(this,e)},array(){return ae(this)},or(e){return be([this,e])},and(e){return To(this,e)},transform(e){return Sd(this,Hd(e))},default(e){return Qg(this,e)},prefault(e){return tv(this,e)},catch(e){return ov(this,e)},pipe(e){return Sd(this,e)},readonly(){return uv(this)},describe(e){let t=this.clone();return Qe.add(t,{description:e}),t},meta(...e){if(e.length===0)return Qe.get(this);let t=this.clone();return Qe.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return w.hide(this,"~standard",{...su(this),jsonSchema:{input:yo(this,"input"),output:yo(this,"output")}})},set"~standard"(e){w.own(this,"~standard",e)},parse:function e(t,n){return vg(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await yg(this,t,n,{callee:e})},safeParse(e,t){return _g(this,e,t)},async safeParseAsync(e,t){return $g(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){w.own(this,"spa",e)},validate(e,t){return Bi(this,e,t)},validateAsync(e,t){return Hi(this,e,t)},encode:function e(t,n){return bg(this,t,n,{callee:e})},decode:function e(t,n){return wg(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await kg(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await xg(this,t,n,{callee:e})},safeEncode(e,t){return Sg(this,e,t)},safeDecode(e,t){return Ig(this,e,t)},async safeEncodeAsync(e,t){return zg(this,e,t)},async safeDecodeAsync(e,t){return Pg(this,e,t)},toJSONSchema(e){return Th(this,{})(e)},get description(){return Qe.get(this)?.description},get _def(){return this._zod.def}}),Id=v("_ZodString",(e,t)=>{tn.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Eh(e,n,i,r)},w.derived({format:e=>He(e).format??null,minLength:e=>He(e).minimum??null,maxLength:e=>He(e).maximum??null},{regex(...e){return this.check(io(...e))},includes(...e){return this.check(so(...e))},startsWith(...e){return this.check(co(...e))},endsWith(...e){return this.check(uo(...e))},min(...e){return this.check(Vr(...e))},max(...e){return this.check(qn(...e))},length(...e){return this.check(Bn(...e))},nonempty(...e){return this.check(Vr(1,...e))},lowercase(e){return this.check(oo(e))},uppercase(e){return this.check(ao(e))},trim(){return this.check(mo())},normalize(...e){return this.check(po(...e))},toLowerCase(){return this.check(ho())},toUpperCase(){return this.check(go())},slugify(){return this.check(vo())}})),So=v("ZodString",(e,t)=>{tn.init(e,t),Id.init(e,t)},{email(e){return this.check(Ka(zd,e))},url(e){return this.check(no(ks,e))},jwt(e){return this.check(ms(Fd,e))},emoji(e){return this.check(es(Td,e))},guid(e){return this.check(Ga(Pd,e))},uuid(e){return this.check(Wa(Sr,e))},uuidv4(e){return this.check(Xa(Sr,e))},uuidv6(e){return this.check(Ya(Sr,e))},uuidv7(e){return this.check(Qa(Sr,e))},nanoid(e){return this.check(ts(Od,e))},cuid(e){return this.check(rs(jd,e))},cuid2(e){return this.check(ns(Ed,e))},ulid(e){return this.check(is(Nd,e))},base64(e){return this.check(ds(Md,e))},base64url(e){return this.check(fs(Ld,e))},xid(e){return this.check(os(Ad,e))},ksuid(e){return this.check(as(Dd,e))},ipv4(e){return this.check(ss(Rd,e))},ipv6(e){return this.check(cs(Cd,e))},cidrv4(e){return this.check(us(Ud,e))},cidrv6(e){return this.check(ls(Zd,e))},e164(e){return this.check(ps(Vd,e))},datetime(e){return this.check(hs(fn,e))},date(e){return this.check(gs(pn,e))},time(e){return this.check(vs(mn,e))},duration(e){return this.check(ys(hn,e))}});function b(e){return Dl(So,e)}var xe=v("ZodStringFormat",(e,t)=>{ye.init(e,t),Id.init(e,t)}),fn=v("ZodISODateTime",(e,t)=>{nh.init(e,t),xe.init(e,t)}),pn=v("ZodISODate",(e,t)=>{ih.init(e,t),xe.init(e,t)}),mn=v("ZodISOTime",(e,t)=>{oh.init(e,t),xe.init(e,t)}),hn=v("ZodISODuration",(e,t)=>{ah.init(e,t),xe.init(e,t)}),zd=v("ZodEmail",(e,t)=>{lu.init(e,t),xe.init(e,t)});function fk(e){return Ka(zd,e)}var Pd=v("ZodGUID",(e,t)=>{cu.init(e,t),xe.init(e,t)});function pk(e){return Ga(Pd,e)}var Sr=v("ZodUUID",(e,t)=>{uu.init(e,t),xe.init(e,t)});function mk(e){return Wa(Sr,e)}function hk(e){return Xa(Sr,e)}function gk(e){return Ya(Sr,e)}function vk(e){return Qa(Sr,e)}var ks=v("ZodURL",(e,t)=>{mu.init(e,t),xe.init(e,t)});function yk(e){return no(ks,e)}function _k(e){return no(ks,{protocol:Oa,hostname:vm,...w.normalizeParams(e)})}var Td=v("ZodEmoji",(e,t)=>{hu.init(e,t),xe.init(e,t)});function $k(e){return es(Td,e)}var Od=v("ZodNanoID",(e,t)=>{gu.init(e,t),xe.init(e,t)});function bk(e){return ts(Od,e)}var jd=v("ZodCUID",(e,t)=>{vu.init(e,t),xe.init(e,t)});function wk(e){return rs(jd,e)}var Ed=v("ZodCUID2",(e,t)=>{yu.init(e,t),xe.init(e,t)});function kk(e){return ns(Ed,e)}var Nd=v("ZodULID",(e,t)=>{_u.init(e,t),xe.init(e,t)});function xk(e){return is(Nd,e)}var Ad=v("ZodXID",(e,t)=>{$u.init(e,t),xe.init(e,t)});function Sk(e){return os(Ad,e)}var Dd=v("ZodKSUID",(e,t)=>{bu.init(e,t),xe.init(e,t)});function Ik(e){return as(Dd,e)}var Rd=v("ZodIPv4",(e,t)=>{wu.init(e,t),xe.init(e,t)});function zk(e){return ss(Rd,e)}var Tg=v("ZodMAC",(e,t)=>{xu.init(e,t),xe.init(e,t)});function Pk(e){return Rl(Tg,e)}var Cd=v("ZodIPv6",(e,t)=>{ku.init(e,t),xe.init(e,t)});function Tk(e){return cs(Cd,e)}var Ud=v("ZodCIDRv4",(e,t)=>{Su.init(e,t),xe.init(e,t)});function Ok(e){return us(Ud,e)}var Zd=v("ZodCIDRv6",(e,t)=>{zu.init(e,t),xe.init(e,t)});function jk(e){return ls(Zd,e)}var Md=v("ZodBase64",(e,t)=>{Tu.init(e,t),xe.init(e,t)});function Ek(e){return ds(Md,e)}var Ld=v("ZodBase64URL",(e,t)=>{ju.init(e,t),xe.init(e,t)});function Nk(e){return fs(Ld,e)}var Vd=v("ZodE164",(e,t)=>{Eu.init(e,t),xe.init(e,t)});function Ak(e){return ps(Vd,e)}var Og=v("ZodCreditCard",(e,t)=>{Au.init(e,t),xe.init(e,t)});function Dk(e){return Cl(Og,e)}var jg=v("ZodIBAN",(e,t)=>{Ru.init(e,t),xe.init(e,t)});function Rk(e){return Ul(jg,e)}var Fd=v("ZodJWT",(e,t)=>{Uu.init(e,t),xe.init(e,t)});function Ck(e){return ms(Fd,e)}var Gn=v("ZodCustomStringFormat",(e,t)=>{Zu.init(e,t),xe.init(e,t)});function Uk(e,t,n={}){return an(Gn,e,t,n)}function Zk(e){return an(Gn,"hostname",gm,e)}function Mk(e){return an(Gn,"hex",jm,e)}function Lk(e){return an(Gn,"currency_code",_m,e)}function Vk(e,t){let n=t?.enc??"hex",i=`${e}_${n}`,r=Lt[i];if(!r)throw new Error(`Unrecognized hash format: ${i}`);return an(Gn,i,r,t)}var Io=v("ZodNumber",(e,t)=>{Za.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Nh(e,n,i,r),e.isFinite=!0},w.derived({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=He(e);return Math.max(t??Number.NEGATIVE_INFINITY,n??Number.NEGATIVE_INFINITY)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=He(e);return Math.min(t??Number.POSITIVE_INFINITY,n??Number.POSITIVE_INFINITY)},isInt:e=>{let{isInt:t,multipleOf:n}=He(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>He(e).format??null},{gt(e,t){return this.check(wr(e,t))},gte(e,t){return this.check(Ft(e,t))},min(e,t){return this.check(Ft(e,t))},lt(e,t){return this.check(br(e,t))},lte(e,t){return this.check(Vt(e,t))},max(e,t){return this.check(Vt(e,t))},int(e){return this.check(xd(e))},safe(e){return this.check(xd(e))},positive(e){return this.check(wr(0,e))},nonnegative(e){return this.check(Ft(0,e))},negative(e){return this.check(br(0,e))},nonpositive(e){return this.check(Vt(0,e))},multipleOf(e,t){return this.check(nn(e,t))},step(e,t){return this.check(nn(e,t))},finite(){return this}}));function ge(e){return Zl(Io,e)}var Wn=v("ZodNumberFormat",(e,t)=>{Mu.init(e,t),Io.init(e,t)});function xd(e){return Ml(Wn,e)}function Fk(e){return Ll(Wn,e)}function qk(e){return Vl(Wn,e)}function Bk(e){return Fl(Wn,e)}function Hk(e){return ql(Wn,e)}var zo=v("ZodBoolean",(e,t)=>{Gi.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ah(e,n,i,r)});function Fe(e){return Bl(zo,e)}var Po=v("ZodBigInt",(e,t)=>{Ma.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Dh(e,n,i,r)},w.derived({minValue:e=>He(e).minimum??null,maxValue:e=>He(e).maximum??null,format:e=>He(e).format??null},{gte(e,t){return this.check(Ft(e,t))},min(e,t){return this.check(Ft(e,t))},gt(e,t){return this.check(wr(e,t))},lt(e,t){return this.check(br(e,t))},lte(e,t){return this.check(Vt(e,t))},max(e,t){return this.check(Vt(e,t))},positive(e){return this.check(wr(BigInt(0),e))},negative(e){return this.check(br(BigInt(0),e))},nonpositive(e){return this.check(Vt(BigInt(0),e))},nonnegative(e){return this.check(Ft(BigInt(0),e))},multipleOf(e,t){return this.check(nn(e,t))}}));function Jk(e){return Hl(Po,e)}var qd=v("ZodBigIntFormat",(e,t)=>{Lu.init(e,t),Po.init(e,t)});function Kk(e){return Jl(qd,e)}function Gk(e){return Kl(qd,e)}var Eg=v("ZodSymbol",(e,t)=>{Vu.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Rh(e,n,i,r)});function Wk(e){return Gl(Eg,e)}var Ng=v("ZodUndefined",(e,t)=>{Fu.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Uh(e,n,i,r)});function Xk(e){return Wl(Ng,e)}var Ag=v("ZodNull",(e,t)=>{qu.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ch(e,n,i,r)});function xs(e){return Xl(Ag,e)}var Dg=v("ZodAny",(e,t)=>{Bu.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Lh(e,n,i,r)});function Yk(){return Yl(Dg)}var Rg=v("ZodUnknown",(e,t)=>{Hu.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Vh(e,n,i,r)});function Ie(){return Ql(Rg)}var Cg=v("ZodNever",(e,t)=>{Ju.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Mh(e,n,i,r)});function Bd(e){return ed(Cg,e)}var Ug=v("ZodVoid",(e,t)=>{Ku.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Zh(e,n,i,r)});function Qk(e){return td(Ug,e)}var Ss=v("ZodDate",(e,t)=>{Gu.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Fh(e,n,i,r),e.min=(n,i)=>e.check(Ft(n,i)),e.max=(n,i)=>e.check(Vt(n,i))},w.derived({minDate:e=>{let{minimum:t}=He(e);return t?new Date(t):null},maxDate:e=>{let{maximum:t}=He(e);return t?new Date(t):null}},{}));function ex(e){return rd(Ss,e)}var Zg=v("ZodArray",(e,t)=>{Kn(),Wu.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>tg(e,n,i,r),e.element=t.element},{min(e,t){return this.check(Vr(e,t))},nonempty(e){return this.check(Vr(1,e))},max(e,t){return this.check(qn(e,t))},length(e,t){return this.check(Bn(e,t))},unwrap(){return this.element}});function ae(e,t){return zh(Zg,e,t)}function tx(e){let t=e._zod.def.shape;return tt(Object.keys(t))}var Is=v("ZodObject",(e,t)=>{Kn(),ch.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>rg(e,n,i,r),w.installLazyProp(e,"shape",n=>n._zod.def.shape,!1)},{keyof(){return tt(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(w.mergeDefs(this._zod.def,{catchall:e}))},passthrough(){return this.clone(w.mergeDefs(this._zod.def,{catchall:Ie()}))},loose(){return this.clone(w.mergeDefs(this._zod.def,{catchall:Ie()}))},strict(){return this.clone(w.mergeDefs(this._zod.def,{catchall:Bd()}))},strip(){return this.clone(w.mergeDefs(this._zod.def,{catchall:void 0}))},extend(e){return w.extend(this,e)},safeExtend(e){return w.safeExtend(this,e)},merge(e){return w.merge(this,e)},pick(e){return w.pick(this,e)},omit(e){return w.omit(this,e)},partial(...e){return w.partial(Xn,this,e[0])},exactPartial(...e){return w.partial(Jd,this,e[0],"exactPartial")},required(...e){return w.required(Kd,this,e[0])}});function A(e,t){let n={type:"object",shape:e??{},...w.normalizeParams(t)};return new Is(n)}function rx(e,t){return new Is({type:"object",shape:e,catchall:Bd(),...w.normalizeParams(t)})}function et(e,t){return new Is({type:"object",shape:e,catchall:Ie(),...w.normalizeParams(t)})}var zs=v("ZodUnion",(e,t)=>{Wi.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>vd(e,n,i,r),e.options=t.options});function be(e,t){return new zs({type:"union",options:e,...w.normalizeParams(t)})}var Mg=v("ZodXor",(e,t)=>{zs.init(e,t),Yu.init(e,t),e._zod.processJSONSchema=(n,i,r)=>vd(e,n,i,r),e.options=t.options});function nx(e,t){return new Mg({type:"union",options:e,inclusive:!1,...w.normalizeParams(t)})}var Lg=v("ZodDiscriminatedUnion",(e,t)=>{zs.init(e,t),Qu.init(e,t)});function Ps(e,t,n){return new Lg({type:"union",options:t,discriminator:e,...w.normalizeParams(n)})}var Vg=v("ZodIntersection",(e,t)=>{el.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ng(e,n,i,r)});function To(e,t){return new Vg({type:"intersection",left:e,right:t})}var Fg=v("ZodTuple",(e,t)=>{Kn(),La.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ig(e,n,i,r)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...e,items:e.items.map(t=>new Xn({type:"optional",innerType:t}))})}});function qg(e,t,n){let i=t instanceof W,r=i?n:t,o=i?t:null;return new Fg({type:"tuple",items:e,rest:o,...w.normalizeParams(r)})}var ko=v("ZodRecord",(e,t)=>{Kn(),tl.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>og(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType});function Se(e,t,n){return!t||!t._zod?new ko({type:"record",keyType:b(),valueType:e,...w.normalizeParams(t)}):new ko({type:"record",keyType:e,valueType:t,...w.normalizeParams(n)})}function ix(e,t,n){return new ko({type:"record",keyType:e,valueType:t,...w.normalizeParams(n),partial:!0})}function ox(e,t,n){return new ko({type:"record",keyType:e,valueType:t,mode:"loose",...w.normalizeParams(n)})}var Bg=v("ZodMap",(e,t)=>{Kn(),rl.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Qh(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(kr(...n)),e.nonempty=n=>e.check(kr(1,n)),e.max=(...n)=>e.check(on(...n)),e.size=(...n)=>e.check(Fn(...n))});function ax(e,t,n){return new Bg({type:"map",keyType:e,valueType:t,...w.normalizeParams(n)})}var Hg=v("ZodSet",(e,t)=>{Kn(),nl.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>eg(e,n,i,r),e.min=(...n)=>e.check(kr(...n)),e.nonempty=n=>e.check(kr(1,n)),e.max=(...n)=>e.check(on(...n)),e.size=(...n)=>e.check(Fn(...n))});function sx(e,t){return new Hg({type:"set",valueType:e,...w.normalizeParams(t)})}var xo=v("ZodEnum",(e,t)=>{il.init(e,t),te.init(e,t),e._zod.processJSONSchema=(i,r,o)=>qh(e,i,r,o),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(i,r)=>{let o={};for(let a of i)if(n.has(a))o[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new xo({...t,checks:[],...w.normalizeParams(r),entries:o})},e.exclude=(i,r)=>{let o={...t.entries};for(let a of i)if(n.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new xo({...t,checks:[],...w.normalizeParams(r),entries:o})}});function tt(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new xo({type:"enum",entries:n,...w.normalizeParams(t)})}function cx(e,t){return new xo({type:"enum",entries:e,...w.normalizeParams(t)})}var Jg=v("ZodLiteral",(e,t)=>{ol.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Bh(e,n,i,r),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 Z(e,t){return new Jg({type:"literal",values:Array.isArray(e)?e:[e],...w.normalizeParams(t)})}var Kg=v("ZodFile",(e,t)=>{al.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Kh(e,n,i,r),e.min=(n,i)=>e.check(kr(n,i)),e.max=(n,i)=>e.check(on(n,i)),e.mime=(n,i)=>e.check(fo(Array.isArray(n)?n:[n],i))});function ux(e){return ud(Kg,e)}var Gg=v("ZodTransform",(e,t)=>{Kn(),sl.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Yh(e,n,i,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new en(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(w.issue(o,n.value,t));else{let a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),"input"in a||(a.input=n.value),a.inst??(a.inst=e),n.issues.push(w.issue(a))}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(o=>(n.value=o,n)):(n.value=r,n)}});function Hd(e){return new Gg({type:"transform",transform:e})}var Xn=v("ZodOptional",(e,t)=>{Va.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>yd(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function ke(e){return new Xn({type:"optional",innerType:e})}var Jd=v("ZodExactOptional",(e,t)=>{cl.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>yd(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Wg(e){return new Jd({type:"optional",innerType:e})}var Xg=v("ZodNullable",(e,t)=>{ul.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ag(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function ws(e){return new Xg({type:"nullable",innerType:e})}function lx(e){return ke(ws(e))}var Yg=v("ZodDefault",(e,t)=>{ll.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ug(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Qg(e,t){return new Yg({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():w.shallowClone(t)}})}var ev=v("ZodPrefault",(e,t)=>{dl.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>lg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function tv(e,t){return new ev({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():w.shallowClone(t)}})}var Kd=v("ZodNonOptional",(e,t)=>{fl.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>sg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function rv(e,t){return new Kd({type:"nonoptional",innerType:e,...w.normalizeParams(t)})}var nv=v("ZodSuccess",(e,t)=>{pl.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Gh(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function dx(e){return new nv({type:"success",innerType:e})}var iv=v("ZodCatch",(e,t)=>{ml.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>dg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ov(e,t){return new iv({type:"catch",innerType:e,catchValue:typeof t=="function"?t:w.constantCatch(t)})}var av=v("ZodNaN",(e,t)=>{hl.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Hh(e,n,i,r)});function fx(e){return nd(av,e)}var Ts=v("ZodPipe",(e,t)=>{Fa.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>fg(e,n,i,r),e.in=t.in,e.out=t.out});function Sd(e,t){return new Ts({type:"pipe",in:e,out:t})}var Os=v("ZodCodec",(e,t)=>{Ts.init(e,t),Xi.init(e,t)});function px(e,t,n){return new Os({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function mx(e){let t=e._zod.def;return new Os({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var sv=v("ZodPreprocess",(e,t)=>{Ts.init(e,t),lh.init(e,t)}),cv=v("ZodReadonly",(e,t)=>{gl.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>pg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function uv(e){return new cv({type:"readonly",innerType:e})}var lv=v("ZodTemplateLiteral",(e,t)=>{vl.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Jh(e,n,i,r)});function hx(e,t){return new lv({type:"template_literal",parts:e,...w.normalizeParams(t)})}var dv=v("ZodLazy",(e,t)=>{Yi.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>hg(e,n,i,r),e.unwrap=()=>e._zod.def.getter()});function fv(e){return new dv({type:"lazy",getter:e})}var pv=v("ZodPromise",(e,t)=>{_l.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>mg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function gx(e){return new pv({type:"promise",innerType:e})}var mv=v("ZodFunction",(e,t)=>{yl.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Xh(e,n,i,r)});function vx(e){return new mv({type:"function",input:Array.isArray(e?.input)?qg(e?.input):e?.input??ae(Ie()),output:e?.output??Ie()})}var js=v("ZodCustom",(e,t)=>{$l.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Wh(e,n,i,r)});function yx(e){let t=new we({check:"custom"});return t._zod.check=e,t}function Gd(e,t){return ld(js,e??(()=>!0),t)}function hv(e,t={}){return dd(js,e,t)}function gv(e,t){return fd(e,t)}var _x=pd,$x=md,vv=v("ZodInstanceOf",(e,t)=>{js.init(e,t)},{properties(e,t){return this.check(lo(e,t))}});function bx(e,t={}){let n=new vv({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...w.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:n,path:[...n._zod.def.path??[]]})},n}var wx=(...e)=>hd({Codec:Os,Boolean:zo,String:So},...e);function kx(e){let t=fv(()=>be([b(e),ge(),Fe(),xs(),ae(t),Se(b(),t)]));return t}function Es(e,t){return new sv({type:"pipe",in:Hd(e),out:t})}var pE={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 mE(e){Me({customError:e})}function hE(){return Me().customError}var yv;yv||(yv={});var Yn={};Ar(Yn,{ZodISODate:()=>pn,ZodISODateTime:()=>fn,ZodISODuration:()=>hn,ZodISOTime:()=>mn,date:()=>vE,datetime:()=>gE,duration:()=>_E,time:()=>yE});function gE(e){return hs(fn,e)}function vE(e){return gs(pn,e)}function yE(e){return vs(mn,e)}function _E(e){return ys(hn,e)}var E={...Oo,...wd,iso:Yn},$E=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 bE(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function xx(e,t){return e.map((n,i)=>i<t?n:n.optional())}function wE(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function kE(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let i=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===i){let r=n[1]===void 0?void 0:wE(n[1]);if(!r||!t.defs[r])throw new Error(`Reference not found: ${e}`);return t.defs[r]}throw new Error(`Reference not found: ${e}`)}function xE(e,t){return E.transform(i=>i).check(i=>{let r=i.value;if(typeof r!="object"||r===null||Array.isArray(r))return;let o=Object.getOwnPropertyNames(r);if(t.minProperties!==void 0&&o.length<t.minProperties&&i.issues.push({origin:"object",code:"too_small",minimum:t.minProperties,inclusive:!0,message:`Too small: expected object to have >=${t.minProperties} properties`,input:r,inst:e,continue:!0}),t.maxProperties!==void 0&&o.length>t.maxProperties&&i.issues.push({origin:"object",code:"too_big",maximum:t.maxProperties,inclusive:!0,message:`Too big: expected object to have <=${t.maxProperties} properties`,input:r,inst:e,continue:!0}),t.keySchema)for(let a of o){let s=t.keySchema.safeParse(a);s.success||i.issues.push({code:"invalid_key",origin:"record",issues:s.error.issues,input:a,path:[a],continue:!0})}}).pipe(e)}function _v(e,t){if(e===null)return"z";let n=typeof e;if(n!=="object"){if(n==="number"&&Number.isNaN(e))return null;let i=String(e);return`${n[0]}${i.length}:${i}`}if(t.has(e))return null;t.add(e);try{if(Array.isArray(e)){let o=[];for(let a of e){let s=_v(a,t);if(s===null)return null;o.push(s)}return`a${o.length}:[${o.join(",")}]`}let i=Object.keys(e).sort(),r=[];for(let o of i){let a=_v(e[o],t);if(a===null)return null;r.push(`${o.length}:${o}=${a}`)}return`o${r.length}:{${r.join(",")}}`}finally{t.delete(e)}}var SE=new Set(["items","prefixItems","additionalItems","additionalProperties","contains","propertyNames","not","if","then","else","allOf","anyOf","oneOf","unevaluatedItems","unevaluatedProperties","contentSchema"]),IE=new Set(["properties","patternProperties","dependentSchemas","dependencies","$defs","definitions"]);function Ns(e){return typeof e!="object"||e===null?!1:Array.isArray(e)?e.some(Ns):typeof e.$ref=="string"?!0:Object.entries(e).some(([t,n])=>SE.has(t)?Ns(n):!IE.has(t)||typeof n!="object"||n===null?!1:Object.values(n).some(Ns))}function Sx(e){return e===1?"element":"elements"}function zE(e,t){return E.transform(i=>i).check(i=>{let r=i.value;if(Array.isArray(r)){if(t.uniqueItems===!0){let o=new Map;for(let a=0;a<r.length;a++){let s=_v(r[a],new Set);if(s===null)continue;let c=o.get(s);if(c===void 0){o.set(s,a);continue}i.issues.push({code:"custom",message:`Array items must be unique: element at index ${a} duplicates the one at index ${c}`,input:r,path:[a],continue:!0})}}if(t.containsSchema){let o=t.minContains??1,a=t.maxContains!==void 0?t.maxContains+1:Number.POSITIVE_INFINITY,s=0;for(let c of r)if(t.containsSchema.safeParse(c).success&&++s>=a)break;s<o&&i.issues.push({code:"custom",message:`Array must contain at least ${o} matching ${Sx(o)}; found ${s}`,input:r,continue:!0}),t.maxContains!==void 0&&s>t.maxContains&&i.issues.push({code:"custom",message:`Array must contain at most ${t.maxContains} matching ${Sx(t.maxContains)}`,input:r,continue:!0})}}}).pipe(e)}function Ix(e,t){if(e!==!1)return e===void 0||e===!0?E.any():$t(e,t)}var PE=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function zx(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return E.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 r=e.$ref;if(t.refs.has(r))return t.refs.get(r);if(t.processing.has(r))return E.lazy(()=>{if(!t.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let o=kE(r,t),a=$t(o,t);return t.refs.set(r,a),t.processing.delete(r),a}if(e.enum!==void 0){let r=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&r.length===1&&r[0]===null)return E.null();if(r.length===0)return E.never();if(r.length===1)return E.literal(r[0]);if(r.every(a=>typeof a=="string"))return E.enum(r);let o=r.map(a=>E.literal(a));return o.length<2?o[0]:E.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return E.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(o=>{let a={...e,type:o};return zx(a,t)});return r.length===0?E.never():r.length===1?r[0]:E.union(r)}if(!n)return E.any();let i;switch(n){case"string":{let r=E.string();if(e.format){let o=e.format;o==="email"?r=r.check(E.email()):o==="uri"||o==="uri-reference"?r=r.check(E.url()):o==="uuid"||o==="guid"?r=r.check(E.uuid()):o==="date-time"?r=r.check(E.iso.datetime({offset:!0})):o==="date"?r=r.check(E.iso.date()):o==="time"?r=r.check(E.regex(PE)):o==="duration"?r=r.check(E.iso.duration()):o==="hostname"?r=r.check(E.hostname()):o==="ipv4"?r=r.check(E.ipv4()):o==="ipv6"?r=r.check(E.ipv6()):o==="mac"?r=r.check(E.mac()):o==="cidr"?r=r.check(E.cidrv4()):o==="cidr-v6"?r=r.check(E.cidrv6()):o==="base64"?r=r.check(E.base64()):o==="base64url"?r=r.check(E.base64url()):o==="e164"?r=r.check(E.e164()):o==="credit_card"?r=r.check(E.creditCard()):o==="iban"?r=r.check(E.iban()):o==="jwt"?r=r.check(E.jwt()):o==="emoji"?r=r.check(E.emoji()):o==="nanoid"?r=r.check(E.nanoid()):o==="cuid"?r=r.check(E.cuid()):o==="cuid2"?r=r.check(E.cuid2()):o==="ulid"?r=r.check(E.ulid()):o==="xid"?r=r.check(E.xid()):o==="ksuid"&&(r=r.check(E.ksuid()))}typeof e.minLength=="number"&&(r=r.min(e.minLength)),typeof e.maxLength=="number"&&(r=r.max(e.maxLength)),e.pattern&&(r=r.regex(new RegExp(e.pattern))),i=r;break}case"number":case"integer":{let r=n==="integer"?E.number().int():E.number();typeof e.minimum=="number"&&e.exclusiveMinimum!==!0&&(r=r.min(e.minimum)),typeof e.maximum=="number"&&e.exclusiveMaximum!==!0&&(r=r.max(e.maximum)),typeof e.exclusiveMinimum=="number"?r=r.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(r=r.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?r=r.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(r=r.lt(e.maximum)),typeof e.multipleOf=="number"&&(r=r.multipleOf(e.multipleOf)),i=r;break}case"boolean":{i=E.boolean();break}case"null":{i=E.null();break}case"object":{let r={},o=e.properties||{},a=new Set(e.required||[]),s=typeof e.additionalProperties=="object"?$t(e.additionalProperties,t):void 0;for(let[d,f]of Object.entries(o)){let p=$t(f,t);Ye(r,d,a.has(d)?p:p.optional())}if(e.patternProperties){let d=e.patternProperties,f=Object.keys(d),p=[];for(let h of f){let g=$t(d[h],t),_=E.string().regex(new RegExp(h));p.push(E.looseRecord(_,g))}let m=[];if(Object.keys(r).length>0&&m.push(E.object(r).passthrough()),m.push(...p),m.length===0)i=E.object({}).passthrough();else if(m.length===1)i=m[0];else{let h=E.intersection(m[0],m[1]);for(let g=2;g<m.length;g++)h=E.intersection(h,m[g]);i=h}if(e.additionalProperties===!1){let h=Object.keys(r),g=f.map($=>new RegExp($)),_=i;i=i.check($=>{if(!Gt($.value))return;let x=[];for(let O of Object.keys($.value))h.includes(O)||g.some(T=>T.test(O))||x.push(O);x.length&&$.issues.push({code:"unrecognized_keys",keys:x,input:$.value,inst:_})})}}else{let d=E.object(r);e.additionalProperties===!1?i=d.strict():s?i=d.catchall(s):i=d.passthrough()}let c=e.propertyNames!==void 0&&e.propertyNames!==!0,u=typeof e.minProperties=="number"?e.minProperties:void 0,l=typeof e.maxProperties=="number"?e.maxProperties:void 0;if(c||u!==void 0||l!==void 0){let d;if(c){let f=typeof e.propertyNames=="object"&&e.propertyNames.type===void 0?{type:"string",...e.propertyNames}:e.propertyNames;d=$t(f,t)}i=xE(i,{keySchema:d,minProperties:u,maxProperties:l})}break}case"array":{let r=e.prefixItems,o=e.items;if(r&&Array.isArray(r)){let a=typeof e.minItems=="number"?e.minItems:0,s=r.map(d=>$t(d,t)),c=xx(s,a),u=Array.isArray(o)?void 0:Ix(o,t),l=E.tuple(c);i=u?l.rest(u):l,typeof e.minItems=="number"&&(i=i.check(E.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(E.maxLength(e.maxItems)))}else if(Array.isArray(o)){let a=typeof e.minItems=="number"?e.minItems:0,s=o.map(d=>$t(d,t)),c=xx(s,a),u=Ix(e.additionalItems,t),l=E.tuple(c);i=u?l.rest(u):l,typeof e.minItems=="number"&&(i=i.check(E.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(E.maxLength(e.maxItems)))}else if(o!==void 0){let a=$t(o,t),s=E.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),i=s}else i=E.array(E.any());(e.uniqueItems===!0||e.contains!==void 0)&&(i=zE(i,{uniqueItems:e.uniqueItems===!0,containsSchema:e.contains!==void 0?$t(e.contains,t):void 0,minContains:typeof e.minContains=="number"?e.minContains:void 0,maxContains:typeof e.maxContains=="number"?e.maxContains:void 0}));break}default:throw new Error(`Unsupported type: ${n}`)}return i}function $t(e,t){if(typeof e=="boolean")return e?E.any():E.never();let n=zx(e,t),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(u=>$t(u,t)),c=E.union(s);n=i?E.intersection(n,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(u=>$t(u,t)),c=E.xor(s);n=i?E.intersection(n,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=i?n:E.any();else{let s=i?n:$t(e.allOf[0],t),c=i?0:1;for(let u=c;u<e.allOf.length;u++)s=E.intersection(s,$t(e.allOf[u],t));n=s}e.nullable===!0&&t.version==="openapi-3.0"&&(n=E.nullable(n)),e.readOnly===!0&&(n=E.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let r={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of o)s in e&&(r[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(r[s]=e[s]);if(e.type==="object"&&e.$ref===void 0){e.propertyNames!==void 0&&!Ns(e.propertyNames)&&(r.propertyNames=e.propertyNames);for(let s of["minProperties","maxProperties"])e[s]!==void 0&&(r[s]=e[s])}if(e.type==="array"&&e.$ref===void 0){e.contains!==void 0&&!Ns(e.contains)&&(r.contains=e.contains);for(let s of["uniqueItems","minContains","maxContains"])e[s]!==void 0&&(r[s]=e[s])}for(let s of Object.keys(e))$E.has(s)||Ye(r,s,e[s]);return Object.keys(r).length>0&&t.registry.add(n,r),e.description&&(n=n.describe(e.description)),n}function Px(e,t){if(typeof e=="boolean")return e?E.any():E.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let i=bE(n,t?.defaultTarget),r=n.$defs||n.definitions||{},o={version:i,defs:r,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Qe};return $t(n,o)}function Tx(e){return bs(e,{object:t=>t.partial(),union:t=>{let n=t._zod.def;return n.discriminator===void 0?t:be(n.options)}})}function TE(e,t){if(!t?.length)return e;let n=e._zod.def;return he(e,Kt(n,{checks:[...n.checks??[],...t]}),{parent:!0})}function Ox(e){return TE(e.out,e.checks)}function OE(e){return e.in._zod.traits.has("$ZodTransform")?Ox(e):e.in}function jx(e){return bs(e,{pipe:t=>OE(t._zod.def),default:(t,n)=>n?ke(t._zod.def.innerType):t,catch:(t,n)=>n?t._zod.def.innerType:t})}function Ex(e){return bs(e,{pipe:t=>Ox(t._zod.def),prefault:(t,n)=>n?t._zod.def.innerType:t})}var $v={};Ar($v,{bigint:()=>AE,boolean:()=>NE,date:()=>DE,number:()=>EE,string:()=>jE});function jE(e){return bh(So,e)}function EE(e){return kh(Io,e)}function NE(e){return xh(zo,e)}function AE(e){return Sh(Po,e)}function DE(e){return Ih(Ss,e)}var wv="2025-11-25";var Nx=[wv,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],gn="io.modelcontextprotocol/related-task",Xd="2.0",Je=Gd(e=>e!==null&&(typeof e=="object"||typeof e=="function")),Ax=be([b(),ge().int()]),Dx=b(),eq=et({ttl:ge().optional(),pollInterval:ge().optional()}),RE=A({ttl:ge().optional()}),CE=A({taskId:b()}),kv=et({progressToken:Ax.optional(),[gn]:CE.optional()}),qt=A({_meta:kv.optional()}),As=qt.extend({task:RE.optional()}),Rx=e=>As.safeParse(e).success,rt=A({method:b(),params:qt.loose().optional()}),Xt=A({_meta:kv.optional()}),Yt=A({method:b(),params:Xt.loose().optional()}),nt=et({_meta:kv.optional()}),Yd=be([b(),ge().int()]),Cx=A({jsonrpc:Z(Xd),id:Yd,...rt.shape}).strict(),xv=e=>Cx.safeParse(e).success,Ux=A({jsonrpc:Z(Xd),...Yt.shape}).strict(),Zx=e=>Ux.safeParse(e).success,Sv=A({jsonrpc:Z(Xd),id:Yd,result:nt}).strict(),Ds=e=>Sv.safeParse(e).success;var M;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(M||(M={}));var Iv=A({jsonrpc:Z(Xd),id:Yd.optional(),error:A({code:ge().int(),message:b(),data:Ie().optional()})}).strict();var Mx=e=>Iv.safeParse(e).success;var Lx=be([Cx,Ux,Sv,Iv]),tq=be([Sv,Iv]),Qd=nt.strict(),UE=Xt.extend({requestId:Yd.optional(),reason:b().optional()}),ef=Yt.extend({method:Z("notifications/cancelled"),params:UE}),ZE=A({src:b(),mimeType:b().optional(),sizes:ae(b()).optional(),theme:tt(["light","dark"]).optional()}),Rs=A({icons:ae(ZE).optional()}),jo=A({name:b(),title:b().optional()}),Vx=jo.extend({...jo.shape,...Rs.shape,version:b(),websiteUrl:b().optional(),description:b().optional()}),ME=To(A({applyDefaults:Fe().optional()}),Se(b(),Ie())),LE=Es(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,To(A({form:ME.optional(),url:Je.optional()}),Se(b(),Ie()).optional())),VE=et({list:Je.optional(),cancel:Je.optional(),requests:et({sampling:et({createMessage:Je.optional()}).optional(),elicitation:et({create:Je.optional()}).optional()}).optional()}),FE=et({list:Je.optional(),cancel:Je.optional(),requests:et({tools:et({call:Je.optional()}).optional()}).optional()}),qE=A({experimental:Se(b(),Je).optional(),sampling:A({context:Je.optional(),tools:Je.optional()}).optional(),elicitation:LE.optional(),roots:A({listChanged:Fe().optional()}).optional(),tasks:VE.optional(),extensions:Se(b(),Je).optional()}),BE=qt.extend({protocolVersion:b(),capabilities:qE,clientInfo:Vx}),zv=rt.extend({method:Z("initialize"),params:BE});var HE=A({experimental:Se(b(),Je).optional(),logging:Je.optional(),completions:Je.optional(),prompts:A({listChanged:Fe().optional()}).optional(),resources:A({subscribe:Fe().optional(),listChanged:Fe().optional()}).optional(),tools:A({listChanged:Fe().optional()}).optional(),tasks:FE.optional(),extensions:Se(b(),Je).optional()}),JE=nt.extend({protocolVersion:b(),capabilities:HE,serverInfo:Vx,instructions:b().optional()}),Pv=Yt.extend({method:Z("notifications/initialized"),params:Xt.optional()});var tf=rt.extend({method:Z("ping"),params:qt.optional()}),KE=A({progress:ge(),total:ke(ge()),message:ke(b())}),GE=A({...Xt.shape,...KE.shape,progressToken:Ax}),rf=Yt.extend({method:Z("notifications/progress"),params:GE}),WE=qt.extend({cursor:Dx.optional()}),Cs=rt.extend({params:WE.optional()}),Us=nt.extend({nextCursor:Dx.optional()}),XE=tt(["working","input_required","completed","failed","cancelled"]),Zs=A({taskId:b(),status:XE,ttl:be([ge(),xs()]),createdAt:b(),lastUpdatedAt:b(),pollInterval:ke(ge()),statusMessage:ke(b())}),Eo=nt.extend({task:Zs}),YE=Xt.merge(Zs),Ms=Yt.extend({method:Z("notifications/tasks/status"),params:YE}),nf=rt.extend({method:Z("tasks/get"),params:qt.extend({taskId:b()})}),of=nt.merge(Zs),af=rt.extend({method:Z("tasks/result"),params:qt.extend({taskId:b()})}),rq=nt.loose(),sf=Cs.extend({method:Z("tasks/list")}),cf=Us.extend({tasks:ae(Zs)}),uf=rt.extend({method:Z("tasks/cancel"),params:qt.extend({taskId:b()})}),Fx=nt.merge(Zs),qx=A({uri:b(),mimeType:ke(b()),_meta:Se(b(),Ie()).optional()}),Bx=qx.extend({text:b()}),Tv=b().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),Hx=qx.extend({blob:Tv}),Ls=tt(["user","assistant"]),No=A({audience:ae(Ls).optional(),priority:ge().min(0).max(1).optional(),lastModified:Yn.datetime({offset:!0}).optional()}),Jx=A({...jo.shape,...Rs.shape,uri:b(),description:ke(b()),mimeType:ke(b()),size:ke(ge()),annotations:No.optional(),_meta:ke(et({}))}),QE=A({...jo.shape,...Rs.shape,uriTemplate:b(),description:ke(b()),mimeType:ke(b()),annotations:No.optional(),_meta:ke(et({}))}),lf=Cs.extend({method:Z("resources/list")}),eN=Us.extend({resources:ae(Jx)}),df=Cs.extend({method:Z("resources/templates/list")}),tN=Us.extend({resourceTemplates:ae(QE)}),Ov=qt.extend({uri:b()}),rN=Ov,ff=rt.extend({method:Z("resources/read"),params:rN}),nN=nt.extend({contents:ae(be([Bx,Hx]))}),iN=Yt.extend({method:Z("notifications/resources/list_changed"),params:Xt.optional()}),oN=Ov,aN=rt.extend({method:Z("resources/subscribe"),params:oN}),sN=Ov,cN=rt.extend({method:Z("resources/unsubscribe"),params:sN}),uN=Xt.extend({uri:b()}),lN=Yt.extend({method:Z("notifications/resources/updated"),params:uN}),dN=A({name:b(),description:ke(b()),required:ke(Fe())}),fN=A({...jo.shape,...Rs.shape,description:ke(b()),arguments:ke(ae(dN)),_meta:ke(et({}))}),pf=Cs.extend({method:Z("prompts/list")}),pN=Us.extend({prompts:ae(fN)}),mN=qt.extend({name:b(),arguments:Se(b(),b()).optional()}),mf=rt.extend({method:Z("prompts/get"),params:mN}),jv=A({type:Z("text"),text:b(),annotations:No.optional(),_meta:Se(b(),Ie()).optional()}),Ev=A({type:Z("image"),data:Tv,mimeType:b(),annotations:No.optional(),_meta:Se(b(),Ie()).optional()}),Nv=A({type:Z("audio"),data:Tv,mimeType:b(),annotations:No.optional(),_meta:Se(b(),Ie()).optional()}),hN=A({type:Z("tool_use"),name:b(),id:b(),input:Se(b(),Ie()),_meta:Se(b(),Ie()).optional()}),gN=A({type:Z("resource"),resource:be([Bx,Hx]),annotations:No.optional(),_meta:Se(b(),Ie()).optional()}),vN=Jx.extend({type:Z("resource_link")}),Av=be([jv,Ev,Nv,vN,gN]),yN=A({role:Ls,content:Av}),_N=nt.extend({description:b().optional(),messages:ae(yN)}),$N=Yt.extend({method:Z("notifications/prompts/list_changed"),params:Xt.optional()}),bN=A({title:b().optional(),readOnlyHint:Fe().optional(),destructiveHint:Fe().optional(),idempotentHint:Fe().optional(),openWorldHint:Fe().optional()}),wN=A({taskSupport:tt(["required","optional","forbidden"]).optional()}),Kx=A({...jo.shape,...Rs.shape,description:b().optional(),inputSchema:A({type:Z("object"),properties:Se(b(),Je).optional(),required:ae(b()).optional()}).catchall(Ie()),outputSchema:A({type:Z("object"),properties:Se(b(),Je).optional(),required:ae(b()).optional()}).catchall(Ie()).optional(),annotations:bN.optional(),execution:wN.optional(),_meta:Se(b(),Ie()).optional()}),hf=Cs.extend({method:Z("tools/list")}),kN=Us.extend({tools:ae(Kx)}),gf=nt.extend({content:ae(Av).default([]),structuredContent:Se(b(),Ie()).optional(),isError:Fe().optional()}),nq=gf.or(nt.extend({toolResult:Ie()})),xN=As.extend({name:b(),arguments:Se(b(),Ie()).optional()}),Ao=rt.extend({method:Z("tools/call"),params:xN}),SN=Yt.extend({method:Z("notifications/tools/list_changed"),params:Xt.optional()}),iq=A({autoRefresh:Fe().default(!0),debounceMs:ge().int().nonnegative().default(300)}),Vs=tt(["debug","info","notice","warning","error","critical","alert","emergency"]),IN=qt.extend({level:Vs}),Dv=rt.extend({method:Z("logging/setLevel"),params:IN}),zN=Xt.extend({level:Vs,logger:b().optional(),data:Ie()}),PN=Yt.extend({method:Z("notifications/message"),params:zN}),TN=A({name:b().optional()}),ON=A({hints:ae(TN).optional(),costPriority:ge().min(0).max(1).optional(),speedPriority:ge().min(0).max(1).optional(),intelligencePriority:ge().min(0).max(1).optional()}),jN=A({mode:tt(["auto","required","none"]).optional()}),EN=A({type:Z("tool_result"),toolUseId:b().describe("The unique identifier for the corresponding tool call."),content:ae(Av).default([]),structuredContent:A({}).loose().optional(),isError:Fe().optional(),_meta:Se(b(),Ie()).optional()}),NN=Ps("type",[jv,Ev,Nv]),Wd=Ps("type",[jv,Ev,Nv,hN,EN]),AN=A({role:Ls,content:be([Wd,ae(Wd)]),_meta:Se(b(),Ie()).optional()}),DN=As.extend({messages:ae(AN),modelPreferences:ON.optional(),systemPrompt:b().optional(),includeContext:tt(["none","thisServer","allServers"]).optional(),temperature:ge().optional(),maxTokens:ge().int(),stopSequences:ae(b()).optional(),metadata:Je.optional(),tools:ae(Kx).optional(),toolChoice:jN.optional()}),RN=rt.extend({method:Z("sampling/createMessage"),params:DN}),Fs=nt.extend({model:b(),stopReason:ke(tt(["endTurn","stopSequence","maxTokens"]).or(b())),role:Ls,content:NN}),Rv=nt.extend({model:b(),stopReason:ke(tt(["endTurn","stopSequence","maxTokens","toolUse"]).or(b())),role:Ls,content:be([Wd,ae(Wd)])}),CN=A({type:Z("boolean"),title:b().optional(),description:b().optional(),default:Fe().optional()}),UN=A({type:Z("string"),title:b().optional(),description:b().optional(),minLength:ge().optional(),maxLength:ge().optional(),format:tt(["email","uri","date","date-time"]).optional(),default:b().optional()}),ZN=A({type:tt(["number","integer"]),title:b().optional(),description:b().optional(),minimum:ge().optional(),maximum:ge().optional(),default:ge().optional()}),MN=A({type:Z("string"),title:b().optional(),description:b().optional(),enum:ae(b()),default:b().optional()}),LN=A({type:Z("string"),title:b().optional(),description:b().optional(),oneOf:ae(A({const:b(),title:b()})),default:b().optional()}),VN=A({type:Z("string"),title:b().optional(),description:b().optional(),enum:ae(b()),enumNames:ae(b()).optional(),default:b().optional()}),FN=be([MN,LN]),qN=A({type:Z("array"),title:b().optional(),description:b().optional(),minItems:ge().optional(),maxItems:ge().optional(),items:A({type:Z("string"),enum:ae(b())}),default:ae(b()).optional()}),BN=A({type:Z("array"),title:b().optional(),description:b().optional(),minItems:ge().optional(),maxItems:ge().optional(),items:A({anyOf:ae(A({const:b(),title:b()}))}),default:ae(b()).optional()}),HN=be([qN,BN]),JN=be([VN,FN,HN]),KN=be([JN,CN,UN,ZN]),GN=As.extend({mode:Z("form").optional(),message:b(),requestedSchema:A({type:Z("object"),properties:Se(b(),KN),required:ae(b()).optional()})}),WN=As.extend({mode:Z("url"),message:b(),elicitationId:b(),url:b().url()}),XN=be([GN,WN]),YN=rt.extend({method:Z("elicitation/create"),params:XN}),QN=Xt.extend({elicitationId:b()}),e4=Yt.extend({method:Z("notifications/elicitation/complete"),params:QN}),Do=nt.extend({action:tt(["accept","decline","cancel"]),content:Es(e=>e===null?void 0:e,Se(b(),be([b(),ge(),Fe(),ae(b())])).optional())}),t4=A({type:Z("ref/resource"),uri:b()});var r4=A({type:Z("ref/prompt"),name:b()}),n4=qt.extend({ref:be([r4,t4]),argument:A({name:b(),value:b()}),context:A({arguments:Se(b(),b()).optional()}).optional()}),vf=rt.extend({method:Z("completion/complete"),params:n4});function Gx(e){if(e.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function Wx(e){if(e.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}var i4=nt.extend({completion:et({values:ae(b()).max(100),total:ke(ge().int()),hasMore:ke(Fe())})}),o4=A({uri:b().startsWith("file://"),name:b().optional(),_meta:Se(b(),Ie()).optional()}),a4=rt.extend({method:Z("roots/list"),params:qt.optional()}),Cv=nt.extend({roots:ae(o4)}),s4=Yt.extend({method:Z("notifications/roots/list_changed"),params:Xt.optional()}),oq=be([tf,zv,vf,Dv,mf,pf,lf,df,ff,aN,cN,Ao,hf,nf,af,sf,uf]),aq=be([ef,rf,Pv,s4,Ms]),sq=be([Qd,Fs,Rv,Do,Cv,of,cf,Eo]),cq=be([tf,RN,YN,a4,nf,af,sf,uf]),uq=be([ef,rf,PN,lN,iN,SN,$N,Ms,e4]),lq=be([Qd,JE,i4,_N,pN,eN,tN,nN,gf,kN,of,cf,Eo]),R=class e extends Error{constructor(t,n,i){super(`MCP error ${t}: ${n}`),this.code=t,this.data=i,this.name="McpError"}static fromError(t,n,i){if(t===M.UrlElicitationRequired&&i){let r=i;if(r.elicitations)return new bv(r.elicitations,n)}return new e(t,n,i)}},bv=class extends R{constructor(t,n=`URL elicitation${t.length>1?"s":""} required`){super(M.UrlElicitationRequired,n,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}};function vn(e){return e==="completed"||e==="failed"||e==="cancelled"}var Yx=Symbol("Let zodToJsonSchema decide on which parser to use");var Xx={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},Qx=e=>typeof e=="string"?{...Xx,name:e}:{...Xx,...e};var e0=e=>{let t=Qx(e),n=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,flags:{hasReferencedOpenAiAnyType:!1},currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([i,r])=>[r._def,{def:r._def,path:[...t.basePath,t.definitionPath,i],jsonSchema:void 0}]))}};function Uv(e,t,n,i){i?.errorMessages&&n&&(e.errorMessage={...e.errorMessage,[t]:n})}function de(e,t,n,i,r){e[t]=n,Uv(e,t,i,r)}var yf=(e,t)=>{let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];n++);return[(e.length-n).toString(),...t.slice(n)].join("/")};function De(e){if(e.target!=="openAi")return{};let t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:e.$refStrategy==="relative"?yf(t,e.currentPath):t.join("/")}}function t0(e,t){let n={type:"array"};return e.type?._def&&e.type?._def?.typeName!==P.ZodAny&&(n.items=K(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&de(n,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&de(n,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(de(n,"minItems",e.exactLength.value,e.exactLength.message,t),de(n,"maxItems",e.exactLength.value,e.exactLength.message,t)),n}function r0(e,t){let n={type:"integer",format:"int64"};if(!e.checks)return n;for(let i of e.checks)switch(i.kind){case"min":t.target==="jsonSchema7"?i.inclusive?de(n,"minimum",i.value,i.message,t):de(n,"exclusiveMinimum",i.value,i.message,t):(i.inclusive||(n.exclusiveMinimum=!0),de(n,"minimum",i.value,i.message,t));break;case"max":t.target==="jsonSchema7"?i.inclusive?de(n,"maximum",i.value,i.message,t):de(n,"exclusiveMaximum",i.value,i.message,t):(i.inclusive||(n.exclusiveMaximum=!0),de(n,"maximum",i.value,i.message,t));break;case"multipleOf":de(n,"multipleOf",i.value,i.message,t);break}return n}function n0(){return{type:"boolean"}}function _f(e,t){return K(e.type._def,t)}var i0=(e,t)=>K(e.innerType._def,t);function Zv(e,t,n){let i=n??t.dateStrategy;if(Array.isArray(i))return{anyOf:i.map((r,o)=>Zv(e,t,r))};switch(i){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return c4(e,t)}}var c4=(e,t)=>{let n={type:"integer",format:"unix-time"};if(t.target==="openApi3")return n;for(let i of e.checks)switch(i.kind){case"min":de(n,"minimum",i.value,i.message,t);break;case"max":de(n,"maximum",i.value,i.message,t);break}return n};function o0(e,t){return{...K(e.innerType._def,t),default:e.defaultValue()}}function a0(e,t){return t.effectStrategy==="input"?K(e.schema._def,t):De(t)}function s0(e){return{type:"string",enum:Array.from(e.values)}}var u4=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function c0(e,t){let n=[K(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),K(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(o=>!!o),i=t.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,r=[];return n.forEach(o=>{if(u4(o))r.push(...o.allOf),o.unevaluatedProperties===void 0&&(i=void 0);else{let a=o;if("additionalProperties"in o&&o.additionalProperties===!1){let{additionalProperties:s,...c}=o;a=c}else i=void 0;r.push(a)}}),r.length?{allOf:r,...i}:void 0}function u0(e,t){let n=typeof e.value;return n!=="bigint"&&n!=="number"&&n!=="boolean"&&n!=="string"?{type:Array.isArray(e.value)?"array":"object"}:t.target==="openApi3"?{type:n==="bigint"?"integer":n,enum:[e.value]}:{type:n==="bigint"?"integer":n,const:e.value}}var Mv,lr={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(Mv===void 0&&(Mv=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Mv),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?: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])$/,ipv4Cidr:/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function $f(e,t){let n={type:"string"};if(e.checks)for(let i of e.checks)switch(i.kind){case"min":de(n,"minLength",typeof n.minLength=="number"?Math.max(n.minLength,i.value):i.value,i.message,t);break;case"max":de(n,"maxLength",typeof n.maxLength=="number"?Math.min(n.maxLength,i.value):i.value,i.message,t);break;case"email":switch(t.emailStrategy){case"format:email":dr(n,"email",i.message,t);break;case"format:idn-email":dr(n,"idn-email",i.message,t);break;case"pattern:zod":bt(n,lr.email,i.message,t);break}break;case"url":dr(n,"uri",i.message,t);break;case"uuid":dr(n,"uuid",i.message,t);break;case"regex":bt(n,i.regex,i.message,t);break;case"cuid":bt(n,lr.cuid,i.message,t);break;case"cuid2":bt(n,lr.cuid2,i.message,t);break;case"startsWith":bt(n,RegExp(`^${Lv(i.value,t)}`),i.message,t);break;case"endsWith":bt(n,RegExp(`${Lv(i.value,t)}$`),i.message,t);break;case"datetime":dr(n,"date-time",i.message,t);break;case"date":dr(n,"date",i.message,t);break;case"time":dr(n,"time",i.message,t);break;case"duration":dr(n,"duration",i.message,t);break;case"length":de(n,"minLength",typeof n.minLength=="number"?Math.max(n.minLength,i.value):i.value,i.message,t),de(n,"maxLength",typeof n.maxLength=="number"?Math.min(n.maxLength,i.value):i.value,i.message,t);break;case"includes":{bt(n,RegExp(Lv(i.value,t)),i.message,t);break}case"ip":{i.version!=="v6"&&dr(n,"ipv4",i.message,t),i.version!=="v4"&&dr(n,"ipv6",i.message,t);break}case"base64url":bt(n,lr.base64url,i.message,t);break;case"jwt":bt(n,lr.jwt,i.message,t);break;case"cidr":{i.version!=="v6"&&bt(n,lr.ipv4Cidr,i.message,t),i.version!=="v4"&&bt(n,lr.ipv6Cidr,i.message,t);break}case"emoji":bt(n,lr.emoji(),i.message,t);break;case"ulid":{bt(n,lr.ulid,i.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{dr(n,"binary",i.message,t);break}case"contentEncoding:base64":{de(n,"contentEncoding","base64",i.message,t);break}case"pattern:zod":{bt(n,lr.base64,i.message,t);break}}break}case"nanoid":bt(n,lr.nanoid,i.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return n}function Lv(e,t){return t.patternStrategy==="escape"?d4(e):e}var l4=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function d4(e){let t="";for(let n=0;n<e.length;n++)l4.has(e[n])||(t+="\\"),t+=e[n];return t}function dr(e,t,n,i){e.format||e.anyOf?.some(r=>r.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&i.errorMessages&&{errorMessage:{format:e.errorMessage.format}}}),delete e.format,e.errorMessage&&(delete e.errorMessage.format,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.anyOf.push({format:t,...n&&i.errorMessages&&{errorMessage:{format:n}}})):de(e,"format",t,n,i)}function bt(e,t,n,i){e.pattern||e.allOf?.some(r=>r.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&i.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}}}),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.allOf.push({pattern:l0(t,i),...n&&i.errorMessages&&{errorMessage:{pattern:n}}})):de(e,"pattern",l0(t,i),n,i)}function l0(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;let n={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},i=n.i?e.source.toLowerCase():e.source,r="",o=!1,a=!1,s=!1;for(let c=0;c<i.length;c++){if(o){r+=i[c],o=!1;continue}if(n.i){if(a){if(i[c].match(/[a-z]/)){s?(r+=i[c],r+=`${i[c-2]}-${i[c]}`.toUpperCase(),s=!1):i[c+1]==="-"&&i[c+2]?.match(/[a-z]/)?(r+=i[c],s=!0):r+=`${i[c]}${i[c].toUpperCase()}`;continue}}else if(i[c].match(/[a-z]/)){r+=`[${i[c]}${i[c].toUpperCase()}]`;continue}}if(n.m){if(i[c]==="^"){r+=`(^|(?<=[\r
|
|
71
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(t===a[0]){o(a);continue}if(e.external){let u=e.external.registry.get(a[0])?.id;if(t!==a[0]&&u){o(a);continue}}if(e.metadataRegistry.get(a[0])?.id){o(a);continue}if(s.cycle){o(a);continue}s.count>1&&e.reused==="ref"&&o(a)}e.external&&(e.sharedDefsExtractedFor=e.external)}function Yw(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let i of t){if(!i||typeof i!="object")return;Yw(i);let r=Object.keys(i);if(r.length!==1||r[0]!=="type")return;let o=i.type;for(let a of Array.isArray(o)?o:[o]){if(typeof a!="string")return;n.includes(a)||n.push(a)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var Qw=new Set(["type","properties","required","additionalProperties"]),Ww=["oneOf","anyOf"];function Xw(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function jh(e){let t=[];for(let o of e){if(typeof o!="object"||o.type!=="object")return null;for(let a in o)if(!Qw.has(a))return null;t.push(o)}let n={},i=new Set;for(let o of t){for(let a in o.properties){if(Object.prototype.hasOwnProperty.call(n,a))continue;let s=[];for(let u of t){let l=u.properties?.[a]??Xw(u);l!=null&&(s.some(d=>JSON.stringify(d)===JSON.stringify(l))||s.push(l))}let c=s.length===1?s[0]:jh(s)??{allOf:s};Ye(n,a,c)}for(let a of o.required??[])i.add(a)}let r={type:"object",properties:n};if(i.size&&(r.required=[...i]),t.every(o=>o.additionalProperties===!1))r.additionalProperties=!1;else{let o=[];for(let a of t){let s=Xw(a);s&&!o.some(c=>JSON.stringify(c)===JSON.stringify(s))&&o.push(s)}o.length===1?r.additionalProperties=o[0]:o.length>1&&(r.additionalProperties={allOf:o})}return r}function cj(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let r of Qw)if(r in e)return;let n=t.filter(r=>Ww.some(o=>Array.isArray(r[o]))),i=null;if(!n.length)i=jh(t);else{let r=n[0],o=Ww.find(c=>Array.isArray(r[c]));if(Object.keys(r).length!==1)return;let a=t.filter(c=>c!==r),s=r[o].map(c=>jh([...a,c]));if(s.some(c=>!c))return;i={[o]:s}}i&&(delete e.allOf,xs(e,i))}function ln(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=s=>{let c=e.seen.get(s);if(c.ref===null)return;let u=c.def??c.schema,l={...u},d=c.ref;if(c.ref=null,d){i(d);let f=e.seen.get(d),m=f.schema;if(m.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(m)):xs(u,m),xs(u,l),s._zod.parent===d)for(let g in u)g==="$ref"||g==="allOf"||g in l||delete u[g];if(m.$ref&&f.def)for(let g in u)g==="$ref"||g==="allOf"||g in f.def&&JSON.stringify(u[g])===JSON.stringify(f.def[g])&&delete u[g]}let p=s._zod.parent;if(p&&p!==d){i(p);let f=e.seen.get(p);if(f?.schema.$ref&&(u.$ref=f.schema.$ref,f.def))for(let m in u)m==="$ref"||m==="allOf"||m in f.def&&JSON.stringify(u[m])===JSON.stringify(f.def[m])&&delete u[m]}e.override({zodSchema:s,jsonSchema:u,path:c.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let s of[...e.seen.entries()].reverse())i(s[0]);if(e.target!=="openapi-3.0")for(let s of e.seen.entries())Yw(s[1].def??s[1].schema);for(let s of e.deferred)s();if(e.intersections.length){let s=new Map;for(let c of e.seen.values())for(let u of[c.schema,c.def]){let l=u?.allOf;if(!Array.isArray(l))continue;let d=s.get(l);d?d.push(u):s.set(l,[u])}for(let c of e.intersections)for(let u of s.get(c)??[])cj(u)}}let r={};if(e.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(s)}xs(r,n.defId?n.schema:n.def??n.schema);let o=e.metadataRegistry.get(t)?.id;o!==void 0&&r.id===o&&delete r.id;let a=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let s of e.seen.entries()){let c=s[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,Ye(a,c.defId,c.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?r.$defs=a:r.definitions=a);try{let s=JSON.parse(JSON.stringify(r));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:$o(t,"input",e.processors),output:$o(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function _t(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return _t(i.element,n);if(i.type==="set")return _t(i.valueType,n);if(i.type==="lazy")return _t(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault"||i.type==="catch")return _t(i.innerType,n);if(i.type==="intersection")return _t(i.left,n)||_t(i.right,n);if(i.type==="record"||i.type==="map")return _t(i.keyType,n)||_t(i.valueType,n);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:_t(i.in,n)||_t(i.out,n);if(i.type==="object"){for(let r in i.shape)if(_t(i.shape[r],n))return!0;return!1}if(i.type==="union"){for(let r of i.options)if(_t(r,n))return!0;return!1}if(i.type==="tuple"){for(let r of i.items)if(_t(r,n))return!0;return!!(i.rest&&_t(i.rest,n))}return!1}var Nh=(e,t={})=>n=>{let i=cn({...n,processors:t});return be(e,i),un(i,e),ln(i,e)},$o=(e,t,n={})=>i=>{let{libraryOptions:r,target:o}=i??{},a=cn({...r??{},target:o,io:t,processors:n});return be(e,a),un(a,e),ln(a,e)};var bo=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},wo=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},ex=(e,t)=>{bo(e,"minimum",t),wo(e,"maximum",t)},ix=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},ox=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},ax=(e,t)=>{e.mime=e.mime?e.mime.filter(n=>t.includes(n)):[...t]},sx=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},tx=(e,t)=>bo(e,"minimum",t.minimum),rx=(e,t)=>wo(e,"maximum",t.maximum),nx=e=>(t,n)=>{sx(t,n.format);let[i,r]=e[n.format];bo(t,"minimum",i),wo(t,"maximum",r)},uj={greater_than:(e,t)=>bo(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>wo(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>ix(e,t.value),number_format:nx(Ia),bigint_format:nx(za),min_length:tx,max_length:rx,length_equals:(e,t)=>ex(e,t.length),min_size:tx,max_size:rx,size_equals:(e,t)=>ex(e,t.size),string_format:(e,t)=>{sx(e,t.format),t.pattern&&ox(e,t.pattern),(t.format==="base64"||t.format==="base64url")&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>ax(e,t.mime)};function Je(e){let t={},n=e._zod.def,i=e._zod.traits.has("$ZodCheck")?[e,...n.checks??[]]:n.checks??[];for(let o of i)uj[o._zod.def.check]?.(t,o._zod.def);let r=e._zod.bag;r.minimum!==void 0&&bo(t,"minimum",r.minimum),r.exclusiveMinimum!==void 0&&bo(t,"exclusiveMinimum",r.exclusiveMinimum),r.maximum!==void 0&&wo(t,"maximum",r.maximum),r.exclusiveMaximum!==void 0&&wo(t,"exclusiveMaximum",r.exclusiveMaximum),r.multipleOf!==void 0&&ix(t,r.multipleOf),r.format!==void 0&&(t.format??(t.format=r.format),r.format.includes("int")&&(t.isInt=!0)),r.mime&&ax(t,r.mime);for(let o of r.patterns??[])ox(t,o);return t}var lj={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},dj=new Map([[Nu,ym],[Va,_m]]),cx=e=>dj.get(e)??e,Rh=(e,t,n,i)=>{let r=n;r.type="string";let{minimum:o,maximum:a,format:s,patterns:c,contentEncoding:u,laxFormat:l}=Je(e);if(typeof o=="number"&&(r.minLength=o),typeof a=="number"&&(r.maxLength=a),s&&(r.format=lj[s]??s,r.format===""&&delete r.format,(s==="time"||l)&&delete r.format),u&&(r.contentEncoding=u),c&&c.size>0){let d=[...c].map(cx);d.length===1?r.pattern=d[0].source:d.length>1&&(r.allOf=[...d.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},Ch=(e,t,n,i)=>{let r=n,{minimum:o,maximum:a,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:u,isInt:l}=Je(e);r.type=l?"integer":"number";let d=typeof u=="number"&&u>=(o??Number.NEGATIVE_INFINITY),p=typeof c=="number"&&c<=(a??Number.POSITIVE_INFINITY),f=t.target==="draft-04"||t.target==="openapi-3.0";if(d?f?(r.minimum=u,r.exclusiveMinimum=!0):r.exclusiveMinimum=u:typeof o=="number"&&(r.minimum=o),p?f?(r.maximum=c,r.exclusiveMaximum=!0):r.exclusiveMaximum=c:typeof a=="number"&&(r.maximum=a),s){let m=new Set;for(let _ of s)Number.isFinite(_)&&_!==0?m.add(Math.abs(_)):He(e,t,r,i,`A multipleOf divisor of ${_} cannot be represented in JSON Schema`);let[h,...g]=m;h!==void 0&&(r.multipleOf=h),g.length&&(r.allOf=[...r.allOf??[],...g.map(_=>({multipleOf:_}))])}},Uh=(e,t,n,i)=>{n.type="boolean"},Zh=(e,t,n,i)=>{He(e,t,n,i,"BigInt cannot be represented in JSON Schema")},Mh=(e,t,n,i)=>{He(e,t,n,i,"Symbols cannot be represented in JSON Schema")},Lh=(e,t,n,i)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},Vh=(e,t,n,i)=>{He(e,t,n,i,"Undefined cannot be represented in JSON Schema")},Fh=(e,t,n,i)=>{He(e,t,n,i,"Void cannot be represented in JSON Schema")},qh=(e,t,n,i)=>{n.not={}},Bh=(e,t,n,i)=>{},Hh=(e,t,n,i)=>{},Jh=(e,t,n,i)=>{He(e,t,n,i,"Date cannot be represented in JSON Schema")},Kh=(e,t,n,i)=>{let r=e._zod.def,o=Ai(r.entries);if(o.length===0){n.not={};return}o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),n.enum=o},Gh=(e,t,n,i)=>{let r=e._zod.def;if(r.values.length===0){n.not={};return}let o=[];for(let a of r.values)if(a===void 0){if(He(e,t,n,i,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof a=="bigint"){if(He(e,t,n,i,"BigInt literals cannot be represented in JSON Schema"))return;o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){let a=o[0];n.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[a]:n.const=a}else o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),o.every(a=>typeof a=="boolean")&&(n.type="boolean"),o.every(a=>a===null)&&(n.type="null"),n.enum=o},Wh=(e,t,n,i)=>{He(e,t,n,i,"NaN cannot be represented in JSON Schema")},Xh=(e,t,n,i)=>{let r=n,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=o.source},Yh=(e,t,n,i)=>{let r=n;r.type="string",r.format="binary",r.contentEncoding="binary";let{minimum:o,maximum:a,mime:s}=Je(e);o!==void 0&&(r.minLength=o),a!==void 0&&(r.maxLength=a),s&&(s.length===0?r.not={}:s.length===1?r.contentMediaType=s[0]:r.anyOf=s.map(c=>({contentMediaType:c})))},Qh=(e,t,n,i)=>{n.type="boolean"},eg=(e,t,n,i)=>{He(e,t,n,i,"Custom types cannot be represented in JSON Schema")},tg=(e,t,n,i)=>{He(e,t,n,i,"Function types cannot be represented in JSON Schema")},rg=(e,t,n,i)=>{He(e,t,n,i,"Transforms cannot be represented in JSON Schema")},ng=(e,t,n,i)=>{He(e,t,n,i,"Map cannot be represented in JSON Schema")},ig=(e,t,n,i)=>{He(e,t,n,i,"Set cannot be represented in JSON Schema")},og=(e,t,n,i)=>{let r=n,o=e._zod.def,{minimum:a,maximum:s}=Je(e);typeof a=="number"&&(r.minItems=a),typeof s=="number"&&(r.maxItems=s),r.type="array",r.items=be(o.element,t,{...i,path:[...i.path,"items"]})};function ks(e){let t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?ks(t.out):t.type==="catch"?ks(t.innerType):e._zod.optin}var ag=(e,t,n,i)=>{let r=n,o=e._zod.def,a=o.shape;if(Object.getOwnPropertySymbols(a).length&&He(e,t,r,i,"Symbol keys cannot be represented in JSON Schema"))return;r.type="object",r.properties={};for(let u in a)Ye(r.properties,u,be(a[u],t,{...i,path:[...i.path,"properties",u]}));let c=[];for(let u of Object.keys(a)){let l=o.shape[u];(t.io==="input"?ks(l)===void 0:l._zod.optout===void 0)&&c.push(u)}c.length>0&&(r.required=c),o.catchall?._zod.def.type==="never"?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=be(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},wd=(e,t,n,i)=>{let r=e._zod.def,o=r.inclusive===!1,a=r.options.map((s,c)=>be(s,t,{...i,path:[...i.path,o?"oneOf":"anyOf",c]}));o?n.oneOf=a:n.anyOf=a},sg=(e,t,n,i)=>{let r=e._zod.def,o=be(r.left,t,{...i,path:[...i.path,"allOf",0]}),a=be(r.right,t,{...i,path:[...i.path,"allOf",1]}),s=u=>"allOf"in u&&Object.keys(u).length===1,c=[...s(o)?o.allOf:[o],...s(a)?a.allOf:[a]];n.allOf=c,t.intersections.push(c)},cg=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=o.items.map((h,g)=>be(h,t,{...i,path:[...i.path,a,g]})),u=o.rest?be(o.rest,t,{...i,path:[...i.path,s,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null,l=o.items.length;for(;l>0;){let h=o.items[l-1];if(!(t.io==="input"?ks(h)!==void 0:h._zod.optout==="optional"))break;l--}let d=o.items.length,p=!o.rest;t.target==="draft-2020-12"?(r.prefixItems=c,p?r.items=!1:u&&(r.items=u),l>0&&(r.minItems=l),p&&(r.maxItems=d)):t.target==="openapi-3.0"?(r.items={anyOf:c},u&&r.items.anyOf.push(u),l>0&&(r.minItems=l),p&&(r.maxItems=d)):(r.items=c,p?r.additionalItems=!1:u&&(r.additionalItems=u),l>0&&(r.minItems=l),p&&(r.maxItems=d));let{minimum:f,maximum:m}=Je(e);typeof f=="number"&&(r.minItems=f),typeof m=="number"&&(r.maxItems=m)};function Ah(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let m=e.get(t)?.def;if(!m)return t;let h=Ah(e,m,n);return h===m?t:h}for(let m of["anyOf","oneOf"]){let h=t[m];if(!Array.isArray(h))continue;let g=h.map(_=>Ah(e,_,n));g.some((_,$)=>_!==h[$])&&(t={...t,[m]:g})}let i=Array.isArray(t.type)?t.type:[t.type],r=!i.includes("string")&&i.some(m=>m==="number"||m==="integer"),o=t.enum??(t.const!==void 0?[t.const]:void 0);if(!r&&!o?.some(m=>typeof m=="number"))return t;let{minimum:a,maximum:s,exclusiveMinimum:c,exclusiveMaximum:u,multipleOf:l,format:d,id:p,...f}=t;return f.enum?f.enum=f.enum.map(m=>typeof m=="number"?String(m):m):typeof f.const=="number"&&(f.const=String(f.const)),r&&(f.type="string",o||(f.pattern=(i.includes("number")?Vr:Da).source)),f}var Dh=new WeakMap;function fj(e){let t=new Map;for(let i of e.seen.values())i.def&&!t.has(i.schema)&&t.set(i.schema,i);let n=new Map;for(let i of Dh.get(e)??[]){let r=e.seen.get(i),o=(r?.def??r?.schema)?.propertyNames;if(!o||o===!0||n.has(o))continue;let a=Ah(t,o,new Set);a!==o&&n.set(o,a)}if(n.size)for(let i of e.seen.values())for(let r of[i.schema,i.def]){let o=r&&n.get(r.propertyNames);o&&(r.propertyNames=o)}}var ug=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="object";let a=o.keyType,s=Je(a).patterns;if(o.mode==="loose"&&s&&s.size>0){let l=be(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});r.patternProperties={};for(let d of s)Ye(r.patternProperties,cx(d).source,l)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){r.propertyNames=be(o.keyType,t,{...i,path:[...i.path,"propertyNames"]});let l=Dh.get(t);l||(l=[],Dh.set(t,l),t.deferred.push(()=>fj(t))),l.push(e)}r.additionalProperties=be(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]})}let c=a._zod.values,u=t.io==="input"&&ks(o.valueType)!==void 0;if(c&&!o.partial&&!u){let l=[...c].filter(d=>typeof d=="string"||typeof d=="number");l.length>0&&(r.required=l.map(String))}},lg=(e,t,n,i)=>{let r=e._zod.def,o=be(r.innerType,t,i),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=r.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},dg=(e,t,n,i)=>{let r=e._zod.def;be(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},fg=Symbol();function ux(e,t,n,i,r){let o=!1,a=JSON.stringify(e,(s,c)=>typeof c!="bigint"?c:(o=!0,null));return o?(He(t,n,i,r,"BigInt defaults cannot be represented in JSON Schema"),fg):JSON.parse(a)}var pg=(e,t,n,i)=>{let r=e._zod.def;be(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType;let a=ux(r.defaultValue,e,t,n,i);a!==fg&&(n.default=a)},mg=(e,t,n,i)=>{let r=e._zod.def;be(r.innerType,t,i);let o=t.seen.get(e);if(o.ref=r.innerType,t.io!=="input")return;let a=ux(r.defaultValue,e,t,n,i);a!==fg&&(n._prefault=a)},hg=(e,t,n,i)=>{let r=e._zod.def;be(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType;let a;try{a=r.catchValue(void 0)}catch{He(e,t,n,i,"Dynamic catch values are not supported in JSON Schema");return}n.default=a},gg=(e,t,n,i)=>{let r=e._zod.def,o=r.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?o?r.out:r.in:r.out;be(a,t,i);let s=t.seen.get(e);s.ref=a},vg=(e,t,n,i)=>{let r=e._zod.def;be(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.readOnly=!0},yg=(e,t,n,i)=>{let r=e._zod.def;be(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},xd=(e,t,n,i)=>{let r=e._zod.def;be(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},_g=(e,t,n,i)=>{let r=e._zod.innerType;be(r,t,i);let o=t.seen.get(e);o.ref=r},bd={string:Rh,number:Ch,boolean:Uh,bigint:Zh,symbol:Mh,null:Lh,undefined:Vh,void:Fh,never:qh,any:Bh,unknown:Hh,date:Jh,enum:Kh,literal:Gh,nan:Wh,template_literal:Xh,file:Yh,success:Qh,custom:eg,function:tg,transform:rg,map:ng,set:ig,array:og,object:ag,union:wd,intersection:sg,tuple:cg,record:ug,nullable:lg,nonoptional:dg,default:pg,prefault:mg,catch:hg,pipe:gg,readonly:vg,promise:yg,optional:xd,lazy:_g};function Jn(e,t){if("_idmap"in e){let i=e,r=cn({...t,processors:bd}),o={};for(let c of i._idmap.entries()){let[u,l]=c;be(l,r)}let a={},s={registry:i,uri:t?.uri,defs:o};r.external=s;for(let c of i._idmap.entries()){let[u,l]=c;un(r,l),Ye(a,u,ln(r,l))}if(Object.keys(o).length>0){let c=r.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[c]:o}}return{schemas:a}}let n=cn({...t,processors:bd});return be(e,n),un(n,e),ln(n,e)}var kd=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 n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=cn({processors:bd,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return be(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,un(this.ctx,t);let i=ln(this.ctx,t),{"~standard":r,...o}=i;return o}};var lx={};var hj=v("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");W.init(e,t),e.def=t,e.type=t.type},{get with(){return this.check},set with(e){$r(this,"with",e)},parse(e,t){return Cn(this,e,t,{callee:this.parse})},parseAsync(e,t){return Un(this,e,t,{callee:this.parseAsync})},safeParse(e,t){return qi(this,e,t)},safeParseAsync(e,t){return Hi(this,e,t)},check(...e){let t=this.def;return this.clone({...t,checks:[...t.checks??[],...e.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0})},clone(e,t){return he(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},apply(e,...t){return t.length===0?e(this):e(this,...t)}});var gj=v("ZodMiniObject",(e,t)=>{rl.init(e,t),hj.init(e,t),Bp(e,"shape",n=>n._zod.def.shape,!1)});function $g(e,t){let n={type:"object",shape:e??{},...z(t)};return new gj(n)}var dx=Symbol("z.visit/resolving");function Ss(e,t){let n=typeof t=="function"?t:(a,s)=>{let c=t[a._zod.def.type];return c?c(a,s):a},i=new Map;function r(a){let s=i.get(a);if(s===dx)return new eo({type:"lazy",getter:()=>i.get(a)});if(s!==void 0)return s;i.set(a,dx);let c=o(a),u=n(c,c!==a);return i.set(a,u),u}function o(a){let s=a._zod.def,c=s.type;switch(c){case"object":{let u=s.shape,l=Object.keys(u),d=!1,p={};for(let m of l){let h=r(u[m]);h!==u[m]&&(d=!0),p[m]=h}let f=s.catchall;return s.catchall&&(f=r(s.catchall),f!==s.catchall&&(d=!0)),d?he(a,{...s,shape:p,catchall:f}):a}case"array":{let u=r(s.element);return u===s.element?a:he(a,{...s,element:u})}case"tuple":{let u=s.items,l=!1,d=[];for(let f of u){let m=r(f);m!==f&&(l=!0),d.push(m)}let p=s.rest;return s.rest&&(p=r(s.rest),p!==s.rest&&(l=!0)),l?he(a,{...s,items:d,rest:p}):a}case"record":case"map":{let u=r(s.keyType),l=r(s.valueType);return u===s.keyType&&l===s.valueType?a:he(a,{...s,keyType:u,valueType:l})}case"set":{let u=r(s.valueType);return u===s.valueType?a:he(a,{...s,valueType:u})}case"union":{let u=s.options,l=!1,d=[];for(let p of u){let f=r(p);f!==p&&(l=!0),d.push(f)}return l?he(a,{...s,options:d}):a}case"intersection":{let u=r(s.left),l=r(s.right);return u===s.left&&l===s.right?a:he(a,{...s,left:u,right:l})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{let u=r(s.innerType);return u===s.innerType?a:he(a,{...s,innerType:u})}case"pipe":{let u=r(s.in),l=r(s.out);return u===s.in&&l===s.out?a:he(a,{...s,in:u,out:l})}case"function":{let u=r(s.input),l=r(s.output);return u===s.input&&l===s.output?a:he(a,{...s,input:u,output:l})}case"lazy":{let u=s.getter,{_cachedInner:l,...d}=s;return he(a,{...d,getter:()=>r(u())})}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":return a;default:return a}}return r(e)}function kr(e){return!!e._zod}function Kn(e){let t=Object.values(e);if(t.length===0)return $g({});let n=t.every(kr),i=t.every(r=>!kr(r));if(n)return $g(e);if(i)return P$(e);throw new Error("Mixed Zod versions detected in object shape.")}function dn(e,t){return kr(e)?qi(e,t):e.safeParse(t)}async function Sd(e,t){return kr(e)?await Hi(e,t):await e.safeParseAsync(t)}function fn(e){if(!e)return;let t;if(kr(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function xo(e){if(e){if(typeof e=="object"){let t=e,n=e;if(!t._def&&!n._zod){let i=Object.values(e);if(i.length>0&&i.every(r=>typeof r=="object"&&r!==null&&(r._def!==void 0||r._zod!==void 0||typeof r.parse=="function")))return Kn(e)}}if(kr(e)){let n=e._zod?.def;if(n&&(n.type==="object"||n.shape!==void 0))return e}else if(e.shape!==void 0)return e}}function yj(e){return e.length===0?"object root":e.reduce((t,n,i)=>i===0?String(n):typeof n=="number"?`${t}[${n}]`:`${t}.${n}`,"")}function Id(e){if(e&&typeof e=="object"){if("issues"in e&&Array.isArray(e.issues)&&e.issues.length>0)return e.issues.map(t=>t.path?.length?`${t.message} at ${yj(t.path)}`:t.message).join(`
|
|
72
|
+
`);if("message"in e&&typeof e.message=="string")return e.message;try{return JSON.stringify(e)}catch{return String(e)}}return String(e)}function fx(e){return e.description}function px(e){if(kr(e))return e._zod?.def?.type==="optional";let t=e;return typeof e.isOptional=="function"?e.isOptional():t._def?.typeName==="ZodOptional"}function ko(e){if(kr(e)){let o=e._zod?.def;if(o){if(o.value!==void 0)return o.value;if(Array.isArray(o.values)&&o.values.length>0)return o.values[0]}}let n=e._def;if(n){if(n.value!==void 0)return n.value;if(Array.isArray(n.values)&&n.values.length>0)return n.values[0]}let i=e.value;if(i!==void 0)return i}var C={};Ar(C,{$brand:()=>Gp,$input:()=>yh,$output:()=>vh,INVALID:()=>yt,NEVER:()=>Kp,TimePrecision:()=>Ih,ZodAny:()=>Zg,ZodArray:()=>Fg,ZodBase64:()=>Bd,ZodBase64URL:()=>Hd,ZodBigInt:()=>Eo,ZodBigIntFormat:()=>Gd,ZodBoolean:()=>To,ZodCIDRv4:()=>Fd,ZodCIDRv6:()=>qd,ZodCUID:()=>Rd,ZodCUID2:()=>Cd,ZodCatch:()=>cv,ZodCodec:()=>As,ZodCompileAsyncError:()=>sr,ZodCompileUnsupportedError:()=>ce,ZodCreditCard:()=>Ag,ZodCustom:()=>Ds,ZodCustomStringFormat:()=>Wn,ZodDate:()=>Ts,ZodDefault:()=>rv,ZodDiscriminatedUnion:()=>Bg,ZodE164:()=>Jd,ZodEmail:()=>jd,ZodEmoji:()=>Ad,ZodEnum:()=>Io,ZodError:()=>_j,ZodExactOptional:()=>Yd,ZodFile:()=>Yg,ZodFirstPartyTypeKind:()=>wv,ZodFunction:()=>yv,ZodGUID:()=>Nd,ZodIBAN:()=>Dg,ZodIPv4:()=>Ld,ZodIPv6:()=>Vd,ZodISODate:()=>mn,ZodISODateTime:()=>pn,ZodISODuration:()=>gn,ZodISOTime:()=>hn,ZodInstanceOf:()=>bv,ZodIntersection:()=>Hg,ZodIssueCode:()=>wj,ZodJWT:()=>Kd,ZodKSUID:()=>Md,ZodLazy:()=>hv,ZodLiteral:()=>Xg,ZodMAC:()=>Ng,ZodMap:()=>Gg,ZodNaN:()=>lv,ZodNanoID:()=>Dd,ZodNever:()=>Lg,ZodNonOptional:()=>Qd,ZodNull:()=>Ug,ZodNullable:()=>tv,ZodNumber:()=>Po,ZodNumberFormat:()=>Xn,ZodObject:()=>Es,ZodOptional:()=>Yn,ZodPipe:()=>Ns,ZodPrefault:()=>iv,ZodPreprocess:()=>dv,ZodPromise:()=>vv,ZodReadonly:()=>fv,ZodRealError:()=>Ot,ZodRecord:()=>So,ZodSet:()=>Wg,ZodString:()=>zo,ZodStringFormat:()=>Se,ZodSuccess:()=>sv,ZodSymbol:()=>Rg,ZodTemplateLiteral:()=>mv,ZodTransform:()=>Qg,ZodTuple:()=>Jg,ZodType:()=>te,ZodULID:()=>Ud,ZodURL:()=>zs,ZodUUID:()=>Sr,ZodUndefined:()=>Cg,ZodUnion:()=>Os,ZodUnknown:()=>Mg,ZodVoid:()=>Vg,ZodXID:()=>Zd,ZodXor:()=>qg,_ZodString:()=>Od,_default:()=>nv,_function:()=>bk,any:()=>rk,array:()=>ae,base64:()=>Rx,base64url:()=>Cx,bigint:()=>Xx,boolean:()=>Fe,catch:()=>uv,check:()=>wk,cidrv4:()=>Ax,cidrv6:()=>Dx,clone:()=>he,codec:()=>vk,coerce:()=>kv,compile:()=>wh,config:()=>Me,core:()=>ur,creditCard:()=>Zx,cuid:()=>Ix,cuid2:()=>zx,currencyCode:()=>Bx,custom:()=>ef,date:()=>ik,decode:()=>Ig,decodeAsync:()=>Pg,deepPartial:()=>Nk,describe:()=>xk,discriminatedUnion:()=>js,e164:()=>Ux,email:()=>gx,emoji:()=>kx,encode:()=>Sg,encodeAsync:()=>zg,endsWith:()=>fo,enum:()=>tt,exactOptional:()=>ev,file:()=>pk,flattenError:()=>ja,float32:()=>Jx,float64:()=>Kx,formatError:()=>Na,fromJSONSchema:()=>jk,function:()=>bk,getDiscriminatedOption:()=>ph,getErrorMap:()=>kj,globalRegistry:()=>Qe,gt:()=>wr,gte:()=>qt,guid:()=>vx,hash:()=>Hx,hex:()=>qx,hostname:()=>Fx,httpUrl:()=>xx,iban:()=>Mx,includes:()=>uo,input:()=>Dk,instanceof:()=>Sk,int:()=>Td,int32:()=>Gx,int64:()=>Yx,intersection:()=>Oo,invertCodec:()=>yk,ipv4:()=>Ox,ipv6:()=>Nx,iso:()=>Qn,json:()=>zk,jwt:()=>Lx,keyof:()=>ok,ksuid:()=>Ex,lazy:()=>gv,length:()=>Hn,literal:()=>V,locales:()=>no,looseObject:()=>et,looseRecord:()=>uk,lowercase:()=>so,lt:()=>br,lte:()=>Ft,mac:()=>jx,map:()=>lk,maxLength:()=>Bn,maxSize:()=>an,memoizer:()=>Wa,meta:()=>kk,mime:()=>mo,minLength:()=>Fr,minSize:()=>xr,multipleOf:()=>on,nan:()=>gk,nanoid:()=>Sx,nativeEnum:()=>fk,negative:()=>ld,never:()=>Wd,nonnegative:()=>fd,nonoptional:()=>av,nonpositive:()=>dd,normalize:()=>ho,null:()=>Ps,nullable:()=>Is,nullish:()=>mk,number:()=>ge,object:()=>D,optional:()=>ke,output:()=>Rk,overwrite:()=>cr,parse:()=>bg,parseAsync:()=>wg,partialRecord:()=>ck,pipe:()=>Ed,positive:()=>ud,prefault:()=>ov,preprocess:()=>Rs,prettifyError:()=>em,promise:()=>$k,properties:()=>po,property:()=>pd,readonly:()=>pv,record:()=>Ie,refine:()=>_v,regex:()=>ao,regexes:()=>Vt,registry:()=>Rl,safeDecode:()=>Eg,safeDecodeAsync:()=>jg,safeEncode:()=>Tg,safeEncodeAsync:()=>Og,safeParse:()=>xg,safeParseAsync:()=>kg,set:()=>dk,setErrorMap:()=>xj,size:()=>qn,slugify:()=>_o,startsWith:()=>lo,strictObject:()=>ak,string:()=>b,stringFormat:()=>Vx,stringbool:()=>Ik,success:()=>hk,superRefine:()=>$v,symbol:()=>ek,templateLiteral:()=>_k,toJSONSchema:()=>Jn,toLowerCase:()=>vo,toUpperCase:()=>yo,toZod:()=>xa,transform:()=>Xd,treeifyError:()=>Qp,trim:()=>go,tuple:()=>Kg,uint32:()=>Wx,uint64:()=>Qx,ulid:()=>Px,undefined:()=>tk,union:()=>we,unknown:()=>ze,uppercase:()=>co,url:()=>wx,util:()=>w,uuid:()=>yx,uuidv4:()=>_x,uuidv6:()=>$x,uuidv7:()=>bx,validate:()=>Ji,validateAsync:()=>Ki,void:()=>nk,withParser:()=>Cl,xid:()=>Tx,xor:()=>sk});var jo={};Ar(jo,{ZodAny:()=>Zg,ZodArray:()=>Fg,ZodBase64:()=>Bd,ZodBase64URL:()=>Hd,ZodBigInt:()=>Eo,ZodBigIntFormat:()=>Gd,ZodBoolean:()=>To,ZodCIDRv4:()=>Fd,ZodCIDRv6:()=>qd,ZodCUID:()=>Rd,ZodCUID2:()=>Cd,ZodCatch:()=>cv,ZodCodec:()=>As,ZodCreditCard:()=>Ag,ZodCustom:()=>Ds,ZodCustomStringFormat:()=>Wn,ZodDate:()=>Ts,ZodDefault:()=>rv,ZodDiscriminatedUnion:()=>Bg,ZodE164:()=>Jd,ZodEmail:()=>jd,ZodEmoji:()=>Ad,ZodEnum:()=>Io,ZodExactOptional:()=>Yd,ZodFile:()=>Yg,ZodFunction:()=>yv,ZodGUID:()=>Nd,ZodIBAN:()=>Dg,ZodIPv4:()=>Ld,ZodIPv6:()=>Vd,ZodISODate:()=>mn,ZodISODateTime:()=>pn,ZodISODuration:()=>gn,ZodISOTime:()=>hn,ZodInstanceOf:()=>bv,ZodIntersection:()=>Hg,ZodJWT:()=>Kd,ZodKSUID:()=>Md,ZodLazy:()=>hv,ZodLiteral:()=>Xg,ZodMAC:()=>Ng,ZodMap:()=>Gg,ZodNaN:()=>lv,ZodNanoID:()=>Dd,ZodNever:()=>Lg,ZodNonOptional:()=>Qd,ZodNull:()=>Ug,ZodNullable:()=>tv,ZodNumber:()=>Po,ZodNumberFormat:()=>Xn,ZodObject:()=>Es,ZodOptional:()=>Yn,ZodPipe:()=>Ns,ZodPrefault:()=>iv,ZodPreprocess:()=>dv,ZodPromise:()=>vv,ZodReadonly:()=>fv,ZodRecord:()=>So,ZodSet:()=>Wg,ZodString:()=>zo,ZodStringFormat:()=>Se,ZodSuccess:()=>sv,ZodSymbol:()=>Rg,ZodTemplateLiteral:()=>mv,ZodTransform:()=>Qg,ZodTuple:()=>Jg,ZodType:()=>te,ZodULID:()=>Ud,ZodURL:()=>zs,ZodUUID:()=>Sr,ZodUndefined:()=>Cg,ZodUnion:()=>Os,ZodUnknown:()=>Mg,ZodVoid:()=>Vg,ZodXID:()=>Zd,ZodXor:()=>qg,_ZodString:()=>Od,_default:()=>nv,_function:()=>bk,any:()=>rk,array:()=>ae,base64:()=>Rx,base64url:()=>Cx,bigint:()=>Xx,boolean:()=>Fe,catch:()=>uv,check:()=>wk,cidrv4:()=>Ax,cidrv6:()=>Dx,codec:()=>vk,creditCard:()=>Zx,cuid:()=>Ix,cuid2:()=>zx,currencyCode:()=>Bx,custom:()=>ef,date:()=>ik,describe:()=>xk,discriminatedUnion:()=>js,e164:()=>Ux,email:()=>gx,emoji:()=>kx,enum:()=>tt,exactOptional:()=>ev,file:()=>pk,float32:()=>Jx,float64:()=>Kx,function:()=>bk,guid:()=>vx,hash:()=>Hx,hex:()=>qx,hostname:()=>Fx,httpUrl:()=>xx,iban:()=>Mx,instanceof:()=>Sk,int:()=>Td,int32:()=>Gx,int64:()=>Yx,intersection:()=>Oo,invertCodec:()=>yk,ipv4:()=>Ox,ipv6:()=>Nx,json:()=>zk,jwt:()=>Lx,keyof:()=>ok,ksuid:()=>Ex,lazy:()=>gv,literal:()=>V,looseObject:()=>et,looseRecord:()=>uk,mac:()=>jx,map:()=>lk,meta:()=>kk,nan:()=>gk,nanoid:()=>Sx,nativeEnum:()=>fk,never:()=>Wd,nonoptional:()=>av,null:()=>Ps,nullable:()=>Is,nullish:()=>mk,number:()=>ge,object:()=>D,optional:()=>ke,partialRecord:()=>ck,pipe:()=>Ed,prefault:()=>ov,preprocess:()=>Rs,promise:()=>$k,readonly:()=>pv,record:()=>Ie,refine:()=>_v,set:()=>dk,strictObject:()=>ak,string:()=>b,stringFormat:()=>Vx,stringbool:()=>Ik,success:()=>hk,superRefine:()=>$v,symbol:()=>ek,templateLiteral:()=>_k,transform:()=>Xd,tuple:()=>Kg,uint32:()=>Wx,uint64:()=>Qx,ulid:()=>Px,undefined:()=>tk,union:()=>we,unknown:()=>ze,url:()=>wx,uuid:()=>yx,uuidv4:()=>_x,uuidv6:()=>$x,uuidv7:()=>bx,void:()=>nk,xid:()=>Tx,xor:()=>sk});var zd={};Ar(zd,{endsWith:()=>fo,gt:()=>wr,gte:()=>qt,includes:()=>uo,length:()=>Hn,lowercase:()=>so,lt:()=>br,lte:()=>Ft,maxLength:()=>Bn,maxSize:()=>an,mime:()=>mo,minLength:()=>Fr,minSize:()=>xr,multipleOf:()=>on,negative:()=>ld,nonnegative:()=>fd,nonpositive:()=>dd,normalize:()=>ho,overwrite:()=>cr,positive:()=>ud,properties:()=>po,property:()=>pd,regex:()=>ao,size:()=>qn,slugify:()=>_o,startsWith:()=>lo,toLowerCase:()=>vo,toUpperCase:()=>yo,trim:()=>go,uppercase:()=>co});var mx=new WeakSet([Object.prototype,Error.prototype]);function Pd(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let i=n(this);return Object.defineProperty(this,t,{value:i,configurable:!0,writable:!0}),i},set(i){Object.defineProperty(this,t,{value:i,configurable:!0,writable:!0})}})}var hx=(e,t)=>{Yp.init(e,t),e.name="ZodError";let n=Object.getPrototypeOf(e);mx.has(n)||(mx.add(n),Pd(n,"format",i=>r=>Na(i,r)),Pd(n,"flatten",i=>r=>ja(i,r)),Pd(n,"addIssue",i=>r=>{i.issues.push(r),i.message=JSON.stringify(i.issues,Di,2)}),Pd(n,"addIssues",i=>r=>{i.issues.push(...r),i.message=JSON.stringify(i.issues,Di,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},_j=v("ZodError",hx),Ot=v("ZodError",hx,void 0,{Parent:Error});var bg=Li(Ot),wg=Vi(Ot),xg=Fi(Ot),kg=Bi(Ot),Sg=Kc(Ot),Ig=Gc(Ot),zg=Wc(Ot),Pg=Xc(Ot),Tg=Yc(Ot),Eg=Qc(Ot),Og=eu(Ot),jg=tu(Ot);function bj(){Ge.localeError||Me(jl())}function Gn(){Ge.memoizer||Me({memoizer:Wa()})}var te=v("ZodType",(e,t)=>(bj(),W.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(w.mergeDefs(t,{checks:[...t.checks??[],...e.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return he(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(_v(e,t))},superRefine(e,t){return this.check($v(e,t))},overwrite(e){return this.check(cr(e))},optional(){return ke(this)},exactOptional(){return ev(this)},nullable(){return Is(this)},nullish(){return ke(Is(this))},nonoptional(e){return av(this,e)},array(){return ae(this)},or(e){return we([this,e])},and(e){return Oo(this,e)},transform(e){return Ed(this,Xd(e))},default(e){return nv(this,e)},prefault(e){return ov(this,e)},catch(e){return uv(this,e)},pipe(e){return Ed(this,e)},readonly(){return pv(this)},describe(e){let t=this.clone();return Qe.add(t,{description:e}),t},meta(...e){if(e.length===0)return Qe.get(this);let t=this.clone();return Qe.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return w.hide(this,"~standard",{...fu(this),jsonSchema:{input:$o(this,"input"),output:$o(this,"output")}})},set"~standard"(e){w.own(this,"~standard",e)},parse:function e(t,n){return bg(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await wg(this,t,n,{callee:e})},safeParse(e,t){return xg(this,e,t)},async safeParseAsync(e,t){return kg(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){w.own(this,"spa",e)},validate(e,t){return Ji(this,e,t)},validateAsync(e,t){return Ki(this,e,t)},encode:function e(t,n){return Sg(this,t,n,{callee:e})},decode:function e(t,n){return Ig(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await zg(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Pg(this,t,n,{callee:e})},safeEncode(e,t){return Tg(this,e,t)},safeDecode(e,t){return Eg(this,e,t)},async safeEncodeAsync(e,t){return Og(this,e,t)},async safeDecodeAsync(e,t){return jg(this,e,t)},toJSONSchema(e){return Nh(this,{})(e)},get description(){return Qe.get(this)?.description},get _def(){return this._zod.def}}),Od=v("_ZodString",(e,t)=>{rn.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Rh(e,n,i,r)},w.derived({format:e=>Je(e).format??null,minLength:e=>Je(e).minimum??null,maxLength:e=>Je(e).maximum??null},{regex(...e){return this.check(ao(...e))},includes(...e){return this.check(uo(...e))},startsWith(...e){return this.check(lo(...e))},endsWith(...e){return this.check(fo(...e))},min(...e){return this.check(Fr(...e))},max(...e){return this.check(Bn(...e))},length(...e){return this.check(Hn(...e))},nonempty(...e){return this.check(Fr(1,...e))},lowercase(e){return this.check(so(e))},uppercase(e){return this.check(co(e))},trim(){return this.check(go())},normalize(...e){return this.check(ho(...e))},toLowerCase(){return this.check(vo())},toUpperCase(){return this.check(yo())},slugify(){return this.check(_o())}})),zo=v("ZodString",(e,t)=>{rn.init(e,t),Od.init(e,t)},{email(e){return this.check(Ya(jd,e))},url(e){return this.check(oo(zs,e))},jwt(e){return this.check(ys(Kd,e))},emoji(e){return this.check(is(Ad,e))},guid(e){return this.check(Qa(Nd,e))},uuid(e){return this.check(es(Sr,e))},uuidv4(e){return this.check(ts(Sr,e))},uuidv6(e){return this.check(rs(Sr,e))},uuidv7(e){return this.check(ns(Sr,e))},nanoid(e){return this.check(os(Dd,e))},cuid(e){return this.check(as(Rd,e))},cuid2(e){return this.check(ss(Cd,e))},ulid(e){return this.check(cs(Ud,e))},base64(e){return this.check(hs(Bd,e))},base64url(e){return this.check(gs(Hd,e))},xid(e){return this.check(us(Zd,e))},ksuid(e){return this.check(ls(Md,e))},ipv4(e){return this.check(ds(Ld,e))},ipv6(e){return this.check(fs(Vd,e))},cidrv4(e){return this.check(ps(Fd,e))},cidrv6(e){return this.check(ms(qd,e))},e164(e){return this.check(vs(Jd,e))},datetime(e){return this.check(_s(pn,e))},date(e){return this.check($s(mn,e))},time(e){return this.check(bs(hn,e))},duration(e){return this.check(ws(gn,e))}});function b(e){return Ml(zo,e)}var Se=v("ZodStringFormat",(e,t)=>{_e.init(e,t),Od.init(e,t)}),pn=v("ZodISODateTime",(e,t)=>{sh.init(e,t),Se.init(e,t)}),mn=v("ZodISODate",(e,t)=>{ch.init(e,t),Se.init(e,t)}),hn=v("ZodISOTime",(e,t)=>{uh.init(e,t),Se.init(e,t)}),gn=v("ZodISODuration",(e,t)=>{lh.init(e,t),Se.init(e,t)}),jd=v("ZodEmail",(e,t)=>{hu.init(e,t),Se.init(e,t)});function gx(e){return Ya(jd,e)}var Nd=v("ZodGUID",(e,t)=>{pu.init(e,t),Se.init(e,t)});function vx(e){return Qa(Nd,e)}var Sr=v("ZodUUID",(e,t)=>{mu.init(e,t),Se.init(e,t)});function yx(e){return es(Sr,e)}function _x(e){return ts(Sr,e)}function $x(e){return rs(Sr,e)}function bx(e){return ns(Sr,e)}var zs=v("ZodURL",(e,t)=>{_u.init(e,t),Se.init(e,t)});function wx(e){return oo(zs,e)}function xx(e){return oo(zs,{protocol:Aa,hostname:bm,...w.normalizeParams(e)})}var Ad=v("ZodEmoji",(e,t)=>{$u.init(e,t),Se.init(e,t)});function kx(e){return is(Ad,e)}var Dd=v("ZodNanoID",(e,t)=>{bu.init(e,t),Se.init(e,t)});function Sx(e){return os(Dd,e)}var Rd=v("ZodCUID",(e,t)=>{wu.init(e,t),Se.init(e,t)});function Ix(e){return as(Rd,e)}var Cd=v("ZodCUID2",(e,t)=>{xu.init(e,t),Se.init(e,t)});function zx(e){return ss(Cd,e)}var Ud=v("ZodULID",(e,t)=>{ku.init(e,t),Se.init(e,t)});function Px(e){return cs(Ud,e)}var Zd=v("ZodXID",(e,t)=>{Su.init(e,t),Se.init(e,t)});function Tx(e){return us(Zd,e)}var Md=v("ZodKSUID",(e,t)=>{Iu.init(e,t),Se.init(e,t)});function Ex(e){return ls(Md,e)}var Ld=v("ZodIPv4",(e,t)=>{zu.init(e,t),Se.init(e,t)});function Ox(e){return ds(Ld,e)}var Ng=v("ZodMAC",(e,t)=>{Tu.init(e,t),Se.init(e,t)});function jx(e){return Ll(Ng,e)}var Vd=v("ZodIPv6",(e,t)=>{Pu.init(e,t),Se.init(e,t)});function Nx(e){return fs(Vd,e)}var Fd=v("ZodCIDRv4",(e,t)=>{Eu.init(e,t),Se.init(e,t)});function Ax(e){return ps(Fd,e)}var qd=v("ZodCIDRv6",(e,t)=>{ju.init(e,t),Se.init(e,t)});function Dx(e){return ms(qd,e)}var Bd=v("ZodBase64",(e,t)=>{Au.init(e,t),Se.init(e,t)});function Rx(e){return hs(Bd,e)}var Hd=v("ZodBase64URL",(e,t)=>{Ru.init(e,t),Se.init(e,t)});function Cx(e){return gs(Hd,e)}var Jd=v("ZodE164",(e,t)=>{Cu.init(e,t),Se.init(e,t)});function Ux(e){return vs(Jd,e)}var Ag=v("ZodCreditCard",(e,t)=>{Zu.init(e,t),Se.init(e,t)});function Zx(e){return Vl(Ag,e)}var Dg=v("ZodIBAN",(e,t)=>{Lu.init(e,t),Se.init(e,t)});function Mx(e){return Fl(Dg,e)}var Kd=v("ZodJWT",(e,t)=>{Fu.init(e,t),Se.init(e,t)});function Lx(e){return ys(Kd,e)}var Wn=v("ZodCustomStringFormat",(e,t)=>{qu.init(e,t),Se.init(e,t)});function Vx(e,t,n={}){return sn(Wn,e,t,n)}function Fx(e){return sn(Wn,"hostname",$m,e)}function qx(e){return sn(Wn,"hex",Dm,e)}function Bx(e){return sn(Wn,"currency_code",xm,e)}function Hx(e,t){let n=t?.enc??"hex",i=`${e}_${n}`,r=Vt[i];if(!r)throw new Error(`Unrecognized hash format: ${i}`);return sn(Wn,i,r,t)}var Po=v("ZodNumber",(e,t)=>{Fa.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ch(e,n,i,r),e.isFinite=!0},w.derived({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=Je(e);return Math.max(t??Number.NEGATIVE_INFINITY,n??Number.NEGATIVE_INFINITY)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=Je(e);return Math.min(t??Number.POSITIVE_INFINITY,n??Number.POSITIVE_INFINITY)},isInt:e=>{let{isInt:t,multipleOf:n}=Je(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>Je(e).format??null},{gt(e,t){return this.check(wr(e,t))},gte(e,t){return this.check(qt(e,t))},min(e,t){return this.check(qt(e,t))},lt(e,t){return this.check(br(e,t))},lte(e,t){return this.check(Ft(e,t))},max(e,t){return this.check(Ft(e,t))},int(e){return this.check(Td(e))},safe(e){return this.check(Td(e))},positive(e){return this.check(wr(0,e))},nonnegative(e){return this.check(qt(0,e))},negative(e){return this.check(br(0,e))},nonpositive(e){return this.check(Ft(0,e))},multipleOf(e,t){return this.check(on(e,t))},step(e,t){return this.check(on(e,t))},finite(){return this}}));function ge(e){return ql(Po,e)}var Xn=v("ZodNumberFormat",(e,t)=>{Bu.init(e,t),Po.init(e,t)});function Td(e){return Bl(Xn,e)}function Jx(e){return Hl(Xn,e)}function Kx(e){return Jl(Xn,e)}function Gx(e){return Kl(Xn,e)}function Wx(e){return Gl(Xn,e)}var To=v("ZodBoolean",(e,t)=>{Xi.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Uh(e,n,i,r)});function Fe(e){return Wl(To,e)}var Eo=v("ZodBigInt",(e,t)=>{qa.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Zh(e,n,i,r)},w.derived({minValue:e=>Je(e).minimum??null,maxValue:e=>Je(e).maximum??null,format:e=>Je(e).format??null},{gte(e,t){return this.check(qt(e,t))},min(e,t){return this.check(qt(e,t))},gt(e,t){return this.check(wr(e,t))},lt(e,t){return this.check(br(e,t))},lte(e,t){return this.check(Ft(e,t))},max(e,t){return this.check(Ft(e,t))},positive(e){return this.check(wr(BigInt(0),e))},negative(e){return this.check(br(BigInt(0),e))},nonpositive(e){return this.check(Ft(BigInt(0),e))},nonnegative(e){return this.check(qt(BigInt(0),e))},multipleOf(e,t){return this.check(on(e,t))}}));function Xx(e){return Xl(Eo,e)}var Gd=v("ZodBigIntFormat",(e,t)=>{Hu.init(e,t),Eo.init(e,t)});function Yx(e){return Yl(Gd,e)}function Qx(e){return Ql(Gd,e)}var Rg=v("ZodSymbol",(e,t)=>{Ju.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Mh(e,n,i,r)});function ek(e){return ed(Rg,e)}var Cg=v("ZodUndefined",(e,t)=>{Ku.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Vh(e,n,i,r)});function tk(e){return td(Cg,e)}var Ug=v("ZodNull",(e,t)=>{Gu.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Lh(e,n,i,r)});function Ps(e){return rd(Ug,e)}var Zg=v("ZodAny",(e,t)=>{Wu.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Bh(e,n,i,r)});function rk(){return nd(Zg)}var Mg=v("ZodUnknown",(e,t)=>{Xu.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Hh(e,n,i,r)});function ze(){return id(Mg)}var Lg=v("ZodNever",(e,t)=>{Yu.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>qh(e,n,i,r)});function Wd(e){return od(Lg,e)}var Vg=v("ZodVoid",(e,t)=>{Qu.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Fh(e,n,i,r)});function nk(e){return ad(Vg,e)}var Ts=v("ZodDate",(e,t)=>{el.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Jh(e,n,i,r),e.min=(n,i)=>e.check(qt(n,i)),e.max=(n,i)=>e.check(Ft(n,i))},w.derived({minDate:e=>{let{minimum:t}=Je(e);return t?new Date(t):null},maxDate:e=>{let{maximum:t}=Je(e);return t?new Date(t):null}},{}));function ik(e){return sd(Ts,e)}var Fg=v("ZodArray",(e,t)=>{Gn(),tl.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>og(e,n,i,r),e.element=t.element},{min(e,t){return this.check(Fr(e,t))},nonempty(e){return this.check(Fr(1,e))},max(e,t){return this.check(Bn(e,t))},length(e,t){return this.check(Hn(e,t))},unwrap(){return this.element}});function ae(e,t){return Oh(Fg,e,t)}function ok(e){let t=e._zod.def.shape;return tt(Object.keys(t))}var Es=v("ZodObject",(e,t)=>{Gn(),fh.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ag(e,n,i,r),w.installLazyProp(e,"shape",n=>n._zod.def.shape,!1)},{keyof(){return tt(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(w.mergeDefs(this._zod.def,{catchall:e}))},passthrough(){return this.clone(w.mergeDefs(this._zod.def,{catchall:ze()}))},loose(){return this.clone(w.mergeDefs(this._zod.def,{catchall:ze()}))},strict(){return this.clone(w.mergeDefs(this._zod.def,{catchall:Wd()}))},strip(){return this.clone(w.mergeDefs(this._zod.def,{catchall:void 0}))},extend(e){return w.extend(this,e)},safeExtend(e){return w.safeExtend(this,e)},merge(e){return w.merge(this,e)},pick(e){return w.pick(this,e)},omit(e){return w.omit(this,e)},partial(...e){return w.partial(Yn,this,e[0])},exactPartial(...e){return w.partial(Yd,this,e[0],"exactPartial")},required(...e){return w.required(Qd,this,e[0])}});function D(e,t){let n={type:"object",shape:e??{},...w.normalizeParams(t)};return new Es(n)}function ak(e,t){return new Es({type:"object",shape:e,catchall:Wd(),...w.normalizeParams(t)})}function et(e,t){return new Es({type:"object",shape:e,catchall:ze(),...w.normalizeParams(t)})}var Os=v("ZodUnion",(e,t)=>{Yi.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>wd(e,n,i,r),e.options=t.options});function we(e,t){return new Os({type:"union",options:e,...w.normalizeParams(t)})}var qg=v("ZodXor",(e,t)=>{Os.init(e,t),nl.init(e,t),e._zod.processJSONSchema=(n,i,r)=>wd(e,n,i,r),e.options=t.options});function sk(e,t){return new qg({type:"union",options:e,inclusive:!1,...w.normalizeParams(t)})}var Bg=v("ZodDiscriminatedUnion",(e,t)=>{Os.init(e,t),il.init(e,t)});function js(e,t,n){return new Bg({type:"union",options:t,discriminator:e,...w.normalizeParams(n)})}var Hg=v("ZodIntersection",(e,t)=>{ol.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>sg(e,n,i,r)});function Oo(e,t){return new Hg({type:"intersection",left:e,right:t})}var Jg=v("ZodTuple",(e,t)=>{Gn(),Ba.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>cg(e,n,i,r)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...e,items:e.items.map(t=>new Yn({type:"optional",innerType:t}))})}});function Kg(e,t,n){let i=t instanceof W,r=i?n:t,o=i?t:null;return new Jg({type:"tuple",items:e,rest:o,...w.normalizeParams(r)})}var So=v("ZodRecord",(e,t)=>{Gn(),al.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ug(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType});function Ie(e,t,n){return!t||!t._zod?new So({type:"record",keyType:b(),valueType:e,...w.normalizeParams(t)}):new So({type:"record",keyType:e,valueType:t,...w.normalizeParams(n)})}function ck(e,t,n){return new So({type:"record",keyType:e,valueType:t,...w.normalizeParams(n),partial:!0})}function uk(e,t,n){return new So({type:"record",keyType:e,valueType:t,mode:"loose",...w.normalizeParams(n)})}var Gg=v("ZodMap",(e,t)=>{Gn(),sl.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ng(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(xr(...n)),e.nonempty=n=>e.check(xr(1,n)),e.max=(...n)=>e.check(an(...n)),e.size=(...n)=>e.check(qn(...n))});function lk(e,t,n){return new Gg({type:"map",keyType:e,valueType:t,...w.normalizeParams(n)})}var Wg=v("ZodSet",(e,t)=>{Gn(),cl.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ig(e,n,i,r),e.min=(...n)=>e.check(xr(...n)),e.nonempty=n=>e.check(xr(1,n)),e.max=(...n)=>e.check(an(...n)),e.size=(...n)=>e.check(qn(...n))});function dk(e,t){return new Wg({type:"set",valueType:e,...w.normalizeParams(t)})}var Io=v("ZodEnum",(e,t)=>{ul.init(e,t),te.init(e,t),e._zod.processJSONSchema=(i,r,o)=>Kh(e,i,r,o),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(i,r)=>{let o={};for(let a of i)if(n.has(a))o[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Io({...t,checks:[],...w.normalizeParams(r),entries:o})},e.exclude=(i,r)=>{let o={...t.entries};for(let a of i)if(n.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new Io({...t,checks:[],...w.normalizeParams(r),entries:o})}});function tt(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new Io({type:"enum",entries:n,...w.normalizeParams(t)})}function fk(e,t){return new Io({type:"enum",entries:e,...w.normalizeParams(t)})}var Xg=v("ZodLiteral",(e,t)=>{ll.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Gh(e,n,i,r),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 V(e,t){return new Xg({type:"literal",values:Array.isArray(e)?e:[e],...w.normalizeParams(t)})}var Yg=v("ZodFile",(e,t)=>{dl.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Yh(e,n,i,r),e.min=(n,i)=>e.check(xr(n,i)),e.max=(n,i)=>e.check(an(n,i)),e.mime=(n,i)=>e.check(mo(Array.isArray(n)?n:[n],i))});function pk(e){return md(Yg,e)}var Qg=v("ZodTransform",(e,t)=>{Gn(),fl.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>rg(e,n,i,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new tn(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(w.issue(o,n.value,t));else{let a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),"input"in a||(a.input=n.value),a.inst??(a.inst=e),n.issues.push(w.issue(a))}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(o=>(n.value=o,n)):(n.value=r,n)}});function Xd(e){return new Qg({type:"transform",transform:e})}var Yn=v("ZodOptional",(e,t)=>{Ha.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>xd(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function ke(e){return new Yn({type:"optional",innerType:e})}var Yd=v("ZodExactOptional",(e,t)=>{pl.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>xd(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function ev(e){return new Yd({type:"optional",innerType:e})}var tv=v("ZodNullable",(e,t)=>{ml.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>lg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Is(e){return new tv({type:"nullable",innerType:e})}function mk(e){return ke(Is(e))}var rv=v("ZodDefault",(e,t)=>{hl.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>pg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function nv(e,t){return new rv({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():w.shallowClone(t)}})}var iv=v("ZodPrefault",(e,t)=>{gl.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>mg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function ov(e,t){return new iv({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():w.shallowClone(t)}})}var Qd=v("ZodNonOptional",(e,t)=>{vl.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>dg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function av(e,t){return new Qd({type:"nonoptional",innerType:e,...w.normalizeParams(t)})}var sv=v("ZodSuccess",(e,t)=>{yl.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Qh(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function hk(e){return new sv({type:"success",innerType:e})}var cv=v("ZodCatch",(e,t)=>{_l.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>hg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function uv(e,t){return new cv({type:"catch",innerType:e,catchValue:typeof t=="function"?t:w.constantCatch(t)})}var lv=v("ZodNaN",(e,t)=>{$l.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Wh(e,n,i,r)});function gk(e){return cd(lv,e)}var Ns=v("ZodPipe",(e,t)=>{Ja.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>gg(e,n,i,r),e.in=t.in,e.out=t.out});function Ed(e,t){return new Ns({type:"pipe",in:e,out:t})}var As=v("ZodCodec",(e,t)=>{Ns.init(e,t),Qi.init(e,t)});function vk(e,t,n){return new As({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function yk(e){let t=e._zod.def;return new As({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var dv=v("ZodPreprocess",(e,t)=>{Ns.init(e,t),mh.init(e,t)}),fv=v("ZodReadonly",(e,t)=>{bl.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>vg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function pv(e){return new fv({type:"readonly",innerType:e})}var mv=v("ZodTemplateLiteral",(e,t)=>{wl.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Xh(e,n,i,r)});function _k(e,t){return new mv({type:"template_literal",parts:e,...w.normalizeParams(t)})}var hv=v("ZodLazy",(e,t)=>{eo.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>_g(e,n,i,r),e.unwrap=()=>e._zod.def.getter()});function gv(e){return new hv({type:"lazy",getter:e})}var vv=v("ZodPromise",(e,t)=>{kl.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>yg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function $k(e){return new vv({type:"promise",innerType:e})}var yv=v("ZodFunction",(e,t)=>{xl.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>tg(e,n,i,r)});function bk(e){return new yv({type:"function",input:Array.isArray(e?.input)?Kg(e?.input):e?.input??ae(ze()),output:e?.output??ze()})}var Ds=v("ZodCustom",(e,t)=>{Sl.init(e,t),te.init(e,t),e._zod.processJSONSchema=(n,i,r)=>eg(e,n,i,r)});function wk(e){let t=new xe({check:"custom"});return t._zod.check=e,t}function ef(e,t){return hd(Ds,e??(()=>!0),t)}function _v(e,t={}){return gd(Ds,e,t)}function $v(e,t){return vd(e,t)}var xk=yd,kk=_d,bv=v("ZodInstanceOf",(e,t)=>{Ds.init(e,t)},{properties(e,t){return this.check(po(e,t))}});function Sk(e,t={}){let n=new bv({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...w.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:n,path:[...n._zod.def.path??[]]})},n}var Ik=(...e)=>$d({Codec:As,Boolean:To,String:zo},...e);function zk(e){let t=gv(()=>we([b(e),ge(),Fe(),Ps(),ae(t),Ie(b(),t)]));return t}function Rs(e,t){return new dv({type:"pipe",in:Xd(e),out:t})}var wj={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function xj(e){Me({customError:e})}function kj(){return Me().customError}var wv;wv||(wv={});var Qn={};Ar(Qn,{ZodISODate:()=>mn,ZodISODateTime:()=>pn,ZodISODuration:()=>gn,ZodISOTime:()=>hn,date:()=>Ij,datetime:()=>Sj,duration:()=>Pj,time:()=>zj});function Sj(e){return _s(pn,e)}function Ij(e){return $s(mn,e)}function zj(e){return bs(hn,e)}function Pj(e){return ws(gn,e)}var N={...jo,...zd,iso:Qn},Tj=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 Ej(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function Pk(e,t){return e.map((n,i)=>i<t?n:n.optional())}function Oj(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function jj(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let i=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===i){let r=n[1]===void 0?void 0:Oj(n[1]);if(!r||!t.defs[r])throw new Error(`Reference not found: ${e}`);return t.defs[r]}throw new Error(`Reference not found: ${e}`)}function Nj(e,t){return N.transform(i=>i).check(i=>{let r=i.value;if(typeof r!="object"||r===null||Array.isArray(r))return;let o=Object.getOwnPropertyNames(r);if(t.minProperties!==void 0&&o.length<t.minProperties&&i.issues.push({origin:"object",code:"too_small",minimum:t.minProperties,inclusive:!0,message:`Too small: expected object to have >=${t.minProperties} properties`,input:r,inst:e,continue:!0}),t.maxProperties!==void 0&&o.length>t.maxProperties&&i.issues.push({origin:"object",code:"too_big",maximum:t.maxProperties,inclusive:!0,message:`Too big: expected object to have <=${t.maxProperties} properties`,input:r,inst:e,continue:!0}),t.keySchema)for(let a of o){let s=t.keySchema.safeParse(a);s.success||i.issues.push({code:"invalid_key",origin:"record",issues:s.error.issues,input:a,path:[a],continue:!0})}}).pipe(e)}function xv(e,t){if(e===null)return"z";let n=typeof e;if(n!=="object"){if(n==="number"&&Number.isNaN(e))return null;let i=String(e);return`${n[0]}${i.length}:${i}`}if(t.has(e))return null;t.add(e);try{if(Array.isArray(e)){let o=[];for(let a of e){let s=xv(a,t);if(s===null)return null;o.push(s)}return`a${o.length}:[${o.join(",")}]`}let i=Object.keys(e).sort(),r=[];for(let o of i){let a=xv(e[o],t);if(a===null)return null;r.push(`${o.length}:${o}=${a}`)}return`o${r.length}:{${r.join(",")}}`}finally{t.delete(e)}}var Aj=new Set(["items","prefixItems","additionalItems","additionalProperties","contains","propertyNames","not","if","then","else","allOf","anyOf","oneOf","unevaluatedItems","unevaluatedProperties","contentSchema"]),Dj=new Set(["properties","patternProperties","dependentSchemas","dependencies","$defs","definitions"]);function Cs(e){return typeof e!="object"||e===null?!1:Array.isArray(e)?e.some(Cs):typeof e.$ref=="string"?!0:Object.entries(e).some(([t,n])=>Aj.has(t)?Cs(n):!Dj.has(t)||typeof n!="object"||n===null?!1:Object.values(n).some(Cs))}function Tk(e){return e===1?"element":"elements"}function Rj(e,t){return N.transform(i=>i).check(i=>{let r=i.value;if(Array.isArray(r)){if(t.uniqueItems===!0){let o=new Map;for(let a=0;a<r.length;a++){let s=xv(r[a],new Set);if(s===null)continue;let c=o.get(s);if(c===void 0){o.set(s,a);continue}i.issues.push({code:"custom",message:`Array items must be unique: element at index ${a} duplicates the one at index ${c}`,input:r,path:[a],continue:!0})}}if(t.containsSchema){let o=t.minContains??1,a=t.maxContains!==void 0?t.maxContains+1:Number.POSITIVE_INFINITY,s=0;for(let c of r)if(t.containsSchema.safeParse(c).success&&++s>=a)break;s<o&&i.issues.push({code:"custom",message:`Array must contain at least ${o} matching ${Tk(o)}; found ${s}`,input:r,continue:!0}),t.maxContains!==void 0&&s>t.maxContains&&i.issues.push({code:"custom",message:`Array must contain at most ${t.maxContains} matching ${Tk(t.maxContains)}`,input:r,continue:!0})}}}).pipe(e)}function Ek(e,t){if(e!==!1)return e===void 0||e===!0?N.any():$t(e,t)}var Cj=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function Ok(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return N.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 r=e.$ref;if(t.refs.has(r))return t.refs.get(r);if(t.processing.has(r))return N.lazy(()=>{if(!t.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let o=jj(r,t),a=$t(o,t);return t.refs.set(r,a),t.processing.delete(r),a}if(e.enum!==void 0){let r=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&r.length===1&&r[0]===null)return N.null();if(r.length===0)return N.never();if(r.length===1)return N.literal(r[0]);if(r.every(a=>typeof a=="string"))return N.enum(r);let o=r.map(a=>N.literal(a));return o.length<2?o[0]:N.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return N.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(o=>{let a={...e,type:o};return Ok(a,t)});return r.length===0?N.never():r.length===1?r[0]:N.union(r)}if(!n)return N.any();let i;switch(n){case"string":{let r=N.string();if(e.format){let o=e.format;o==="email"?r=r.check(N.email()):o==="uri"||o==="uri-reference"?r=r.check(N.url()):o==="uuid"||o==="guid"?r=r.check(N.uuid()):o==="date-time"?r=r.check(N.iso.datetime({offset:!0})):o==="date"?r=r.check(N.iso.date()):o==="time"?r=r.check(N.regex(Cj)):o==="duration"?r=r.check(N.iso.duration()):o==="hostname"?r=r.check(N.hostname()):o==="ipv4"?r=r.check(N.ipv4()):o==="ipv6"?r=r.check(N.ipv6()):o==="mac"?r=r.check(N.mac()):o==="cidr"?r=r.check(N.cidrv4()):o==="cidr-v6"?r=r.check(N.cidrv6()):o==="base64"?r=r.check(N.base64()):o==="base64url"?r=r.check(N.base64url()):o==="e164"?r=r.check(N.e164()):o==="credit_card"?r=r.check(N.creditCard()):o==="iban"?r=r.check(N.iban()):o==="jwt"?r=r.check(N.jwt()):o==="emoji"?r=r.check(N.emoji()):o==="nanoid"?r=r.check(N.nanoid()):o==="cuid"?r=r.check(N.cuid()):o==="cuid2"?r=r.check(N.cuid2()):o==="ulid"?r=r.check(N.ulid()):o==="xid"?r=r.check(N.xid()):o==="ksuid"&&(r=r.check(N.ksuid()))}typeof e.minLength=="number"&&(r=r.min(e.minLength)),typeof e.maxLength=="number"&&(r=r.max(e.maxLength)),e.pattern&&(r=r.regex(new RegExp(e.pattern))),i=r;break}case"number":case"integer":{let r=n==="integer"?N.number().int():N.number();typeof e.minimum=="number"&&e.exclusiveMinimum!==!0&&(r=r.min(e.minimum)),typeof e.maximum=="number"&&e.exclusiveMaximum!==!0&&(r=r.max(e.maximum)),typeof e.exclusiveMinimum=="number"?r=r.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(r=r.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?r=r.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(r=r.lt(e.maximum)),typeof e.multipleOf=="number"&&(r=r.multipleOf(e.multipleOf)),i=r;break}case"boolean":{i=N.boolean();break}case"null":{i=N.null();break}case"object":{let r={},o=e.properties||{},a=new Set(e.required||[]),s=typeof e.additionalProperties=="object"?$t(e.additionalProperties,t):void 0;for(let[d,p]of Object.entries(o)){let f=$t(p,t);Ye(r,d,a.has(d)?f:f.optional())}if(e.patternProperties){let d=e.patternProperties,p=Object.keys(d),f=[];for(let h of p){let g=$t(d[h],t),_=N.string().regex(new RegExp(h));f.push(N.looseRecord(_,g))}let m=[];if(Object.keys(r).length>0&&m.push(N.object(r).passthrough()),m.push(...f),m.length===0)i=N.object({}).passthrough();else if(m.length===1)i=m[0];else{let h=N.intersection(m[0],m[1]);for(let g=2;g<m.length;g++)h=N.intersection(h,m[g]);i=h}if(e.additionalProperties===!1){let h=Object.keys(r),g=p.map($=>new RegExp($)),_=i;i=i.check($=>{if(!Wt($.value))return;let k=[];for(let E of Object.keys($.value))h.includes(E)||g.some(T=>T.test(E))||k.push(E);k.length&&$.issues.push({code:"unrecognized_keys",keys:k,input:$.value,inst:_})})}}else{let d=N.object(r);e.additionalProperties===!1?i=d.strict():s?i=d.catchall(s):i=d.passthrough()}let c=e.propertyNames!==void 0&&e.propertyNames!==!0,u=typeof e.minProperties=="number"?e.minProperties:void 0,l=typeof e.maxProperties=="number"?e.maxProperties:void 0;if(c||u!==void 0||l!==void 0){let d;if(c){let p=typeof e.propertyNames=="object"&&e.propertyNames.type===void 0?{type:"string",...e.propertyNames}:e.propertyNames;d=$t(p,t)}i=Nj(i,{keySchema:d,minProperties:u,maxProperties:l})}break}case"array":{let r=e.prefixItems,o=e.items;if(r&&Array.isArray(r)){let a=typeof e.minItems=="number"?e.minItems:0,s=r.map(d=>$t(d,t)),c=Pk(s,a),u=Array.isArray(o)?void 0:Ek(o,t),l=N.tuple(c);i=u?l.rest(u):l,typeof e.minItems=="number"&&(i=i.check(N.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(N.maxLength(e.maxItems)))}else if(Array.isArray(o)){let a=typeof e.minItems=="number"?e.minItems:0,s=o.map(d=>$t(d,t)),c=Pk(s,a),u=Ek(e.additionalItems,t),l=N.tuple(c);i=u?l.rest(u):l,typeof e.minItems=="number"&&(i=i.check(N.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(N.maxLength(e.maxItems)))}else if(o!==void 0){let a=$t(o,t),s=N.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),i=s}else i=N.array(N.any());(e.uniqueItems===!0||e.contains!==void 0)&&(i=Rj(i,{uniqueItems:e.uniqueItems===!0,containsSchema:e.contains!==void 0?$t(e.contains,t):void 0,minContains:typeof e.minContains=="number"?e.minContains:void 0,maxContains:typeof e.maxContains=="number"?e.maxContains:void 0}));break}default:throw new Error(`Unsupported type: ${n}`)}return i}function $t(e,t){if(typeof e=="boolean")return e?N.any():N.never();let n=Ok(e,t),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(u=>$t(u,t)),c=N.union(s);n=i?N.intersection(n,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(u=>$t(u,t)),c=N.xor(s);n=i?N.intersection(n,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=i?n:N.any();else{let s=i?n:$t(e.allOf[0],t),c=i?0:1;for(let u=c;u<e.allOf.length;u++)s=N.intersection(s,$t(e.allOf[u],t));n=s}e.nullable===!0&&t.version==="openapi-3.0"&&(n=N.nullable(n)),e.readOnly===!0&&(n=N.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let r={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of o)s in e&&(r[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(r[s]=e[s]);if(e.type==="object"&&e.$ref===void 0){e.propertyNames!==void 0&&!Cs(e.propertyNames)&&(r.propertyNames=e.propertyNames);for(let s of["minProperties","maxProperties"])e[s]!==void 0&&(r[s]=e[s])}if(e.type==="array"&&e.$ref===void 0){e.contains!==void 0&&!Cs(e.contains)&&(r.contains=e.contains);for(let s of["uniqueItems","minContains","maxContains"])e[s]!==void 0&&(r[s]=e[s])}for(let s of Object.keys(e))Tj.has(s)||Ye(r,s,e[s]);return Object.keys(r).length>0&&t.registry.add(n,r),e.description&&(n=n.describe(e.description)),n}function jk(e,t){if(typeof e=="boolean")return e?N.any():N.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let i=Ej(n,t?.defaultTarget),r=n.$defs||n.definitions||{},o={version:i,defs:r,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Qe};return $t(n,o)}function Nk(e){return Ss(e,{object:t=>t.partial(),union:t=>{let n=t._zod.def;return n.discriminator===void 0?t:we(n.options)}})}function Uj(e,t){if(!t?.length)return e;let n=e._zod.def;return he(e,Gt(n,{checks:[...n.checks??[],...t]}),{parent:!0})}function Ak(e){return Uj(e.out,e.checks)}function Zj(e){return e.in._zod.traits.has("$ZodTransform")?Ak(e):e.in}function Dk(e){return Ss(e,{pipe:t=>Zj(t._zod.def),default:(t,n)=>n?ke(t._zod.def.innerType):t,catch:(t,n)=>n?t._zod.def.innerType:t})}function Rk(e){return Ss(e,{pipe:t=>Ak(t._zod.def),prefault:(t,n)=>n?t._zod.def.innerType:t})}var kv={};Ar(kv,{bigint:()=>Fj,boolean:()=>Vj,date:()=>qj,number:()=>Lj,string:()=>Mj});function Mj(e){return Sh(zo,e)}function Lj(e){return zh(Po,e)}function Vj(e){return Ph(To,e)}function Fj(e){return Th(Eo,e)}function qj(e){return Eh(Ts,e)}var Iv="2025-11-25";var Ck=[Iv,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],vn="io.modelcontextprotocol/related-task",rf="2.0",Ke=ef(e=>e!==null&&(typeof e=="object"||typeof e=="function")),Uk=we([b(),ge().int()]),Zk=b(),mq=et({ttl:ge().optional(),pollInterval:ge().optional()}),Bj=D({ttl:ge().optional()}),Hj=D({taskId:b()}),zv=et({progressToken:Uk.optional(),[vn]:Hj.optional()}),Bt=D({_meta:zv.optional()}),Us=Bt.extend({task:Bj.optional()}),Mk=e=>Us.safeParse(e).success,rt=D({method:b(),params:Bt.loose().optional()}),Yt=D({_meta:zv.optional()}),Qt=D({method:b(),params:Yt.loose().optional()}),nt=et({_meta:zv.optional()}),nf=we([b(),ge().int()]),Lk=D({jsonrpc:V(rf),id:nf,...rt.shape}).strict(),Pv=e=>Lk.safeParse(e).success,Vk=D({jsonrpc:V(rf),...Qt.shape}).strict(),Fk=e=>Vk.safeParse(e).success,Tv=D({jsonrpc:V(rf),id:nf,result:nt}).strict(),Zs=e=>Tv.safeParse(e).success;var F;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(F||(F={}));var Ev=D({jsonrpc:V(rf),id:nf.optional(),error:D({code:ge().int(),message:b(),data:ze().optional()})}).strict();var qk=e=>Ev.safeParse(e).success;var Bk=we([Lk,Vk,Tv,Ev]),hq=we([Tv,Ev]),of=nt.strict(),Jj=Yt.extend({requestId:nf.optional(),reason:b().optional()}),af=Qt.extend({method:V("notifications/cancelled"),params:Jj}),Kj=D({src:b(),mimeType:b().optional(),sizes:ae(b()).optional(),theme:tt(["light","dark"]).optional()}),Ms=D({icons:ae(Kj).optional()}),No=D({name:b(),title:b().optional()}),Hk=No.extend({...No.shape,...Ms.shape,version:b(),websiteUrl:b().optional(),description:b().optional()}),Gj=Oo(D({applyDefaults:Fe().optional()}),Ie(b(),ze())),Wj=Rs(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Oo(D({form:Gj.optional(),url:Ke.optional()}),Ie(b(),ze()).optional())),Xj=et({list:Ke.optional(),cancel:Ke.optional(),requests:et({sampling:et({createMessage:Ke.optional()}).optional(),elicitation:et({create:Ke.optional()}).optional()}).optional()}),Yj=et({list:Ke.optional(),cancel:Ke.optional(),requests:et({tools:et({call:Ke.optional()}).optional()}).optional()}),Qj=D({experimental:Ie(b(),Ke).optional(),sampling:D({context:Ke.optional(),tools:Ke.optional()}).optional(),elicitation:Wj.optional(),roots:D({listChanged:Fe().optional()}).optional(),tasks:Xj.optional(),extensions:Ie(b(),Ke).optional()}),eN=Bt.extend({protocolVersion:b(),capabilities:Qj,clientInfo:Hk}),Ov=rt.extend({method:V("initialize"),params:eN});var tN=D({experimental:Ie(b(),Ke).optional(),logging:Ke.optional(),completions:Ke.optional(),prompts:D({listChanged:Fe().optional()}).optional(),resources:D({subscribe:Fe().optional(),listChanged:Fe().optional()}).optional(),tools:D({listChanged:Fe().optional()}).optional(),tasks:Yj.optional(),extensions:Ie(b(),Ke).optional()}),rN=nt.extend({protocolVersion:b(),capabilities:tN,serverInfo:Hk,instructions:b().optional()}),jv=Qt.extend({method:V("notifications/initialized"),params:Yt.optional()});var sf=rt.extend({method:V("ping"),params:Bt.optional()}),nN=D({progress:ge(),total:ke(ge()),message:ke(b())}),iN=D({...Yt.shape,...nN.shape,progressToken:Uk}),cf=Qt.extend({method:V("notifications/progress"),params:iN}),oN=Bt.extend({cursor:Zk.optional()}),Ls=rt.extend({params:oN.optional()}),Vs=nt.extend({nextCursor:Zk.optional()}),aN=tt(["working","input_required","completed","failed","cancelled"]),Fs=D({taskId:b(),status:aN,ttl:we([ge(),Ps()]),createdAt:b(),lastUpdatedAt:b(),pollInterval:ke(ge()),statusMessage:ke(b())}),Ao=nt.extend({task:Fs}),sN=Yt.merge(Fs),qs=Qt.extend({method:V("notifications/tasks/status"),params:sN}),uf=rt.extend({method:V("tasks/get"),params:Bt.extend({taskId:b()})}),lf=nt.merge(Fs),df=rt.extend({method:V("tasks/result"),params:Bt.extend({taskId:b()})}),gq=nt.loose(),ff=Ls.extend({method:V("tasks/list")}),pf=Vs.extend({tasks:ae(Fs)}),mf=rt.extend({method:V("tasks/cancel"),params:Bt.extend({taskId:b()})}),Jk=nt.merge(Fs),Kk=D({uri:b(),mimeType:ke(b()),_meta:Ie(b(),ze()).optional()}),Gk=Kk.extend({text:b()}),Nv=b().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),Wk=Kk.extend({blob:Nv}),Bs=tt(["user","assistant"]),Do=D({audience:ae(Bs).optional(),priority:ge().min(0).max(1).optional(),lastModified:Qn.datetime({offset:!0}).optional()}),Xk=D({...No.shape,...Ms.shape,uri:b(),description:ke(b()),mimeType:ke(b()),size:ke(ge()),annotations:Do.optional(),_meta:ke(et({}))}),cN=D({...No.shape,...Ms.shape,uriTemplate:b(),description:ke(b()),mimeType:ke(b()),annotations:Do.optional(),_meta:ke(et({}))}),hf=Ls.extend({method:V("resources/list")}),uN=Vs.extend({resources:ae(Xk)}),gf=Ls.extend({method:V("resources/templates/list")}),lN=Vs.extend({resourceTemplates:ae(cN)}),Av=Bt.extend({uri:b()}),dN=Av,vf=rt.extend({method:V("resources/read"),params:dN}),fN=nt.extend({contents:ae(we([Gk,Wk]))}),pN=Qt.extend({method:V("notifications/resources/list_changed"),params:Yt.optional()}),mN=Av,hN=rt.extend({method:V("resources/subscribe"),params:mN}),gN=Av,vN=rt.extend({method:V("resources/unsubscribe"),params:gN}),yN=Yt.extend({uri:b()}),_N=Qt.extend({method:V("notifications/resources/updated"),params:yN}),$N=D({name:b(),description:ke(b()),required:ke(Fe())}),bN=D({...No.shape,...Ms.shape,description:ke(b()),arguments:ke(ae($N)),_meta:ke(et({}))}),yf=Ls.extend({method:V("prompts/list")}),wN=Vs.extend({prompts:ae(bN)}),xN=Bt.extend({name:b(),arguments:Ie(b(),b()).optional()}),_f=rt.extend({method:V("prompts/get"),params:xN}),Dv=D({type:V("text"),text:b(),annotations:Do.optional(),_meta:Ie(b(),ze()).optional()}),Rv=D({type:V("image"),data:Nv,mimeType:b(),annotations:Do.optional(),_meta:Ie(b(),ze()).optional()}),Cv=D({type:V("audio"),data:Nv,mimeType:b(),annotations:Do.optional(),_meta:Ie(b(),ze()).optional()}),kN=D({type:V("tool_use"),name:b(),id:b(),input:Ie(b(),ze()),_meta:Ie(b(),ze()).optional()}),SN=D({type:V("resource"),resource:we([Gk,Wk]),annotations:Do.optional(),_meta:Ie(b(),ze()).optional()}),IN=Xk.extend({type:V("resource_link")}),Uv=we([Dv,Rv,Cv,IN,SN]),zN=D({role:Bs,content:Uv}),PN=nt.extend({description:b().optional(),messages:ae(zN)}),TN=Qt.extend({method:V("notifications/prompts/list_changed"),params:Yt.optional()}),EN=D({title:b().optional(),readOnlyHint:Fe().optional(),destructiveHint:Fe().optional(),idempotentHint:Fe().optional(),openWorldHint:Fe().optional()}),ON=D({taskSupport:tt(["required","optional","forbidden"]).optional()}),Yk=D({...No.shape,...Ms.shape,description:b().optional(),inputSchema:D({type:V("object"),properties:Ie(b(),Ke).optional(),required:ae(b()).optional()}).catchall(ze()),outputSchema:D({type:V("object"),properties:Ie(b(),Ke).optional(),required:ae(b()).optional()}).catchall(ze()).optional(),annotations:EN.optional(),execution:ON.optional(),_meta:Ie(b(),ze()).optional()}),$f=Ls.extend({method:V("tools/list")}),jN=Vs.extend({tools:ae(Yk)}),bf=nt.extend({content:ae(Uv).default([]),structuredContent:Ie(b(),ze()).optional(),isError:Fe().optional()}),vq=bf.or(nt.extend({toolResult:ze()})),NN=Us.extend({name:b(),arguments:Ie(b(),ze()).optional()}),Ro=rt.extend({method:V("tools/call"),params:NN}),AN=Qt.extend({method:V("notifications/tools/list_changed"),params:Yt.optional()}),yq=D({autoRefresh:Fe().default(!0),debounceMs:ge().int().nonnegative().default(300)}),Hs=tt(["debug","info","notice","warning","error","critical","alert","emergency"]),DN=Bt.extend({level:Hs}),Zv=rt.extend({method:V("logging/setLevel"),params:DN}),RN=Yt.extend({level:Hs,logger:b().optional(),data:ze()}),CN=Qt.extend({method:V("notifications/message"),params:RN}),UN=D({name:b().optional()}),ZN=D({hints:ae(UN).optional(),costPriority:ge().min(0).max(1).optional(),speedPriority:ge().min(0).max(1).optional(),intelligencePriority:ge().min(0).max(1).optional()}),MN=D({mode:tt(["auto","required","none"]).optional()}),LN=D({type:V("tool_result"),toolUseId:b().describe("The unique identifier for the corresponding tool call."),content:ae(Uv).default([]),structuredContent:D({}).loose().optional(),isError:Fe().optional(),_meta:Ie(b(),ze()).optional()}),VN=js("type",[Dv,Rv,Cv]),tf=js("type",[Dv,Rv,Cv,kN,LN]),FN=D({role:Bs,content:we([tf,ae(tf)]),_meta:Ie(b(),ze()).optional()}),qN=Us.extend({messages:ae(FN),modelPreferences:ZN.optional(),systemPrompt:b().optional(),includeContext:tt(["none","thisServer","allServers"]).optional(),temperature:ge().optional(),maxTokens:ge().int(),stopSequences:ae(b()).optional(),metadata:Ke.optional(),tools:ae(Yk).optional(),toolChoice:MN.optional()}),BN=rt.extend({method:V("sampling/createMessage"),params:qN}),Js=nt.extend({model:b(),stopReason:ke(tt(["endTurn","stopSequence","maxTokens"]).or(b())),role:Bs,content:VN}),Mv=nt.extend({model:b(),stopReason:ke(tt(["endTurn","stopSequence","maxTokens","toolUse"]).or(b())),role:Bs,content:we([tf,ae(tf)])}),HN=D({type:V("boolean"),title:b().optional(),description:b().optional(),default:Fe().optional()}),JN=D({type:V("string"),title:b().optional(),description:b().optional(),minLength:ge().optional(),maxLength:ge().optional(),format:tt(["email","uri","date","date-time"]).optional(),default:b().optional()}),KN=D({type:tt(["number","integer"]),title:b().optional(),description:b().optional(),minimum:ge().optional(),maximum:ge().optional(),default:ge().optional()}),GN=D({type:V("string"),title:b().optional(),description:b().optional(),enum:ae(b()),default:b().optional()}),WN=D({type:V("string"),title:b().optional(),description:b().optional(),oneOf:ae(D({const:b(),title:b()})),default:b().optional()}),XN=D({type:V("string"),title:b().optional(),description:b().optional(),enum:ae(b()),enumNames:ae(b()).optional(),default:b().optional()}),YN=we([GN,WN]),QN=D({type:V("array"),title:b().optional(),description:b().optional(),minItems:ge().optional(),maxItems:ge().optional(),items:D({type:V("string"),enum:ae(b())}),default:ae(b()).optional()}),eA=D({type:V("array"),title:b().optional(),description:b().optional(),minItems:ge().optional(),maxItems:ge().optional(),items:D({anyOf:ae(D({const:b(),title:b()}))}),default:ae(b()).optional()}),tA=we([QN,eA]),rA=we([XN,YN,tA]),nA=we([rA,HN,JN,KN]),iA=Us.extend({mode:V("form").optional(),message:b(),requestedSchema:D({type:V("object"),properties:Ie(b(),nA),required:ae(b()).optional()})}),oA=Us.extend({mode:V("url"),message:b(),elicitationId:b(),url:b().url()}),aA=we([iA,oA]),sA=rt.extend({method:V("elicitation/create"),params:aA}),cA=Yt.extend({elicitationId:b()}),uA=Qt.extend({method:V("notifications/elicitation/complete"),params:cA}),Co=nt.extend({action:tt(["accept","decline","cancel"]),content:Rs(e=>e===null?void 0:e,Ie(b(),we([b(),ge(),Fe(),ae(b())])).optional())}),lA=D({type:V("ref/resource"),uri:b()});var dA=D({type:V("ref/prompt"),name:b()}),fA=Bt.extend({ref:we([dA,lA]),argument:D({name:b(),value:b()}),context:D({arguments:Ie(b(),b()).optional()}).optional()}),wf=rt.extend({method:V("completion/complete"),params:fA});function Qk(e){if(e.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function e0(e){if(e.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}var pA=nt.extend({completion:et({values:ae(b()).max(100),total:ke(ge().int()),hasMore:ke(Fe())})}),mA=D({uri:b().startsWith("file://"),name:b().optional(),_meta:Ie(b(),ze()).optional()}),hA=rt.extend({method:V("roots/list"),params:Bt.optional()}),Lv=nt.extend({roots:ae(mA)}),gA=Qt.extend({method:V("notifications/roots/list_changed"),params:Yt.optional()}),_q=we([sf,Ov,wf,Zv,_f,yf,hf,gf,vf,hN,vN,Ro,$f,uf,df,ff,mf]),$q=we([af,cf,jv,gA,qs]),bq=we([of,Js,Mv,Co,Lv,lf,pf,Ao]),wq=we([sf,BN,sA,hA,uf,df,ff,mf]),xq=we([af,cf,CN,_N,pN,AN,TN,qs,uA]),kq=we([of,rN,pA,PN,wN,uN,lN,fN,bf,jN,lf,pf,Ao]),Z=class e extends Error{constructor(t,n,i){super(`MCP error ${t}: ${n}`),this.code=t,this.data=i,this.name="McpError"}static fromError(t,n,i){if(t===F.UrlElicitationRequired&&i){let r=i;if(r.elicitations)return new Sv(r.elicitations,n)}return new e(t,n,i)}},Sv=class extends Z{constructor(t,n=`URL elicitation${t.length>1?"s":""} required`){super(F.UrlElicitationRequired,n,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}};function yn(e){return e==="completed"||e==="failed"||e==="cancelled"}var r0=Symbol("Let zodToJsonSchema decide on which parser to use");var t0={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},n0=e=>typeof e=="string"?{...t0,name:e}:{...t0,...e};var i0=e=>{let t=n0(e),n=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,flags:{hasReferencedOpenAiAnyType:!1},currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([i,r])=>[r._def,{def:r._def,path:[...t.basePath,t.definitionPath,i],jsonSchema:void 0}]))}};function Vv(e,t,n,i){i?.errorMessages&&n&&(e.errorMessage={...e.errorMessage,[t]:n})}function de(e,t,n,i,r){e[t]=n,Vv(e,t,i,r)}var xf=(e,t)=>{let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];n++);return[(e.length-n).toString(),...t.slice(n)].join("/")};function Ce(e){if(e.target!=="openAi")return{};let t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:e.$refStrategy==="relative"?xf(t,e.currentPath):t.join("/")}}function o0(e,t){let n={type:"array"};return e.type?._def&&e.type?._def?.typeName!==P.ZodAny&&(n.items=K(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&de(n,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&de(n,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(de(n,"minItems",e.exactLength.value,e.exactLength.message,t),de(n,"maxItems",e.exactLength.value,e.exactLength.message,t)),n}function a0(e,t){let n={type:"integer",format:"int64"};if(!e.checks)return n;for(let i of e.checks)switch(i.kind){case"min":t.target==="jsonSchema7"?i.inclusive?de(n,"minimum",i.value,i.message,t):de(n,"exclusiveMinimum",i.value,i.message,t):(i.inclusive||(n.exclusiveMinimum=!0),de(n,"minimum",i.value,i.message,t));break;case"max":t.target==="jsonSchema7"?i.inclusive?de(n,"maximum",i.value,i.message,t):de(n,"exclusiveMaximum",i.value,i.message,t):(i.inclusive||(n.exclusiveMaximum=!0),de(n,"maximum",i.value,i.message,t));break;case"multipleOf":de(n,"multipleOf",i.value,i.message,t);break}return n}function s0(){return{type:"boolean"}}function kf(e,t){return K(e.type._def,t)}var c0=(e,t)=>K(e.innerType._def,t);function Fv(e,t,n){let i=n??t.dateStrategy;if(Array.isArray(i))return{anyOf:i.map((r,o)=>Fv(e,t,r))};switch(i){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return vA(e,t)}}var vA=(e,t)=>{let n={type:"integer",format:"unix-time"};if(t.target==="openApi3")return n;for(let i of e.checks)switch(i.kind){case"min":de(n,"minimum",i.value,i.message,t);break;case"max":de(n,"maximum",i.value,i.message,t);break}return n};function u0(e,t){return{...K(e.innerType._def,t),default:e.defaultValue()}}function l0(e,t){return t.effectStrategy==="input"?K(e.schema._def,t):Ce(t)}function d0(e){return{type:"string",enum:Array.from(e.values)}}var yA=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function f0(e,t){let n=[K(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),K(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(o=>!!o),i=t.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,r=[];return n.forEach(o=>{if(yA(o))r.push(...o.allOf),o.unevaluatedProperties===void 0&&(i=void 0);else{let a=o;if("additionalProperties"in o&&o.additionalProperties===!1){let{additionalProperties:s,...c}=o;a=c}else i=void 0;r.push(a)}}),r.length?{allOf:r,...i}:void 0}function p0(e,t){let n=typeof e.value;return n!=="bigint"&&n!=="number"&&n!=="boolean"&&n!=="string"?{type:Array.isArray(e.value)?"array":"object"}:t.target==="openApi3"?{type:n==="bigint"?"integer":n,enum:[e.value]}:{type:n==="bigint"?"integer":n,const:e.value}}var qv,lr={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(qv===void 0&&(qv=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),qv),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?: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])$/,ipv4Cidr:/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function Sf(e,t){let n={type:"string"};if(e.checks)for(let i of e.checks)switch(i.kind){case"min":de(n,"minLength",typeof n.minLength=="number"?Math.max(n.minLength,i.value):i.value,i.message,t);break;case"max":de(n,"maxLength",typeof n.maxLength=="number"?Math.min(n.maxLength,i.value):i.value,i.message,t);break;case"email":switch(t.emailStrategy){case"format:email":dr(n,"email",i.message,t);break;case"format:idn-email":dr(n,"idn-email",i.message,t);break;case"pattern:zod":bt(n,lr.email,i.message,t);break}break;case"url":dr(n,"uri",i.message,t);break;case"uuid":dr(n,"uuid",i.message,t);break;case"regex":bt(n,i.regex,i.message,t);break;case"cuid":bt(n,lr.cuid,i.message,t);break;case"cuid2":bt(n,lr.cuid2,i.message,t);break;case"startsWith":bt(n,RegExp(`^${Bv(i.value,t)}`),i.message,t);break;case"endsWith":bt(n,RegExp(`${Bv(i.value,t)}$`),i.message,t);break;case"datetime":dr(n,"date-time",i.message,t);break;case"date":dr(n,"date",i.message,t);break;case"time":dr(n,"time",i.message,t);break;case"duration":dr(n,"duration",i.message,t);break;case"length":de(n,"minLength",typeof n.minLength=="number"?Math.max(n.minLength,i.value):i.value,i.message,t),de(n,"maxLength",typeof n.maxLength=="number"?Math.min(n.maxLength,i.value):i.value,i.message,t);break;case"includes":{bt(n,RegExp(Bv(i.value,t)),i.message,t);break}case"ip":{i.version!=="v6"&&dr(n,"ipv4",i.message,t),i.version!=="v4"&&dr(n,"ipv6",i.message,t);break}case"base64url":bt(n,lr.base64url,i.message,t);break;case"jwt":bt(n,lr.jwt,i.message,t);break;case"cidr":{i.version!=="v6"&&bt(n,lr.ipv4Cidr,i.message,t),i.version!=="v4"&&bt(n,lr.ipv6Cidr,i.message,t);break}case"emoji":bt(n,lr.emoji(),i.message,t);break;case"ulid":{bt(n,lr.ulid,i.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{dr(n,"binary",i.message,t);break}case"contentEncoding:base64":{de(n,"contentEncoding","base64",i.message,t);break}case"pattern:zod":{bt(n,lr.base64,i.message,t);break}}break}case"nanoid":bt(n,lr.nanoid,i.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return n}function Bv(e,t){return t.patternStrategy==="escape"?$A(e):e}var _A=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function $A(e){let t="";for(let n=0;n<e.length;n++)_A.has(e[n])||(t+="\\"),t+=e[n];return t}function dr(e,t,n,i){e.format||e.anyOf?.some(r=>r.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&i.errorMessages&&{errorMessage:{format:e.errorMessage.format}}}),delete e.format,e.errorMessage&&(delete e.errorMessage.format,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.anyOf.push({format:t,...n&&i.errorMessages&&{errorMessage:{format:n}}})):de(e,"format",t,n,i)}function bt(e,t,n,i){e.pattern||e.allOf?.some(r=>r.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&i.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}}}),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.allOf.push({pattern:m0(t,i),...n&&i.errorMessages&&{errorMessage:{pattern:n}}})):de(e,"pattern",m0(t,i),n,i)}function m0(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;let n={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},i=n.i?e.source.toLowerCase():e.source,r="",o=!1,a=!1,s=!1;for(let c=0;c<i.length;c++){if(o){r+=i[c],o=!1;continue}if(n.i){if(a){if(i[c].match(/[a-z]/)){s?(r+=i[c],r+=`${i[c-2]}-${i[c]}`.toUpperCase(),s=!1):i[c+1]==="-"&&i[c+2]?.match(/[a-z]/)?(r+=i[c],s=!0):r+=`${i[c]}${i[c].toUpperCase()}`;continue}}else if(i[c].match(/[a-z]/)){r+=`[${i[c]}${i[c].toUpperCase()}]`;continue}}if(n.m){if(i[c]==="^"){r+=`(^|(?<=[\r
|
|
73
73
|
]))`;continue}else if(i[c]==="$"){r+=`($|(?=[\r
|
|
74
74
|
]))`;continue}}if(n.s&&i[c]==="."){r+=a?`${i[c]}\r
|
|
75
75
|
`:`[${i[c]}\r
|
|
76
|
-
]`;continue}r+=i[c],i[c]==="\\"?o=!0:a&&i[c]==="]"?a=!1:!a&&i[c]==="["&&(a=!0)}try{new RegExp(r)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return r}function bf(e,t){if(t.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),t.target==="openApi3"&&e.keyType?._def.typeName===P.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((i,r)=>({...i,[r]:K(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",r]})??De(t)}),{}),additionalProperties:t.rejectedAdditionalProperties};let n={type:"object",additionalProperties:K(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if(t.target==="openApi3")return n;if(e.keyType?._def.typeName===P.ZodString&&e.keyType._def.checks?.length){let{type:i,...r}=$f(e.keyType._def,t);return{...n,propertyNames:r}}else{if(e.keyType?._def.typeName===P.ZodEnum)return{...n,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===P.ZodBranded&&e.keyType._def.type._def.typeName===P.ZodString&&e.keyType._def.type._def.checks?.length){let{type:i,...r}=_f(e.keyType._def,t);return{...n,propertyNames:r}}}return n}function d0(e,t){if(t.mapStrategy==="record")return bf(e,t);let n=K(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||De(t),i=K(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||De(t);return{type:"array",maxItems:125,items:{type:"array",items:[n,i],minItems:2,maxItems:2}}}function f0(e){let t=e.values,i=Object.keys(e.values).filter(o=>typeof t[t[o]]!="number").map(o=>t[o]),r=Array.from(new Set(i.map(o=>typeof o)));return{type:r.length===1?r[0]==="string"?"string":"number":["string","number"],enum:i}}function p0(e){return e.target==="openAi"?void 0:{not:De({...e,currentPath:[...e.currentPath,"not"]})}}function m0(e){return e.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var qs={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function g0(e,t){if(t.target==="openApi3")return h0(e,t);let n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every(i=>i._def.typeName in qs&&(!i._def.checks||!i._def.checks.length))){let i=n.reduce((r,o)=>{let a=qs[o._def.typeName];return a&&!r.includes(a)?[...r,a]:r},[]);return{type:i.length>1?i:i[0]}}else if(n.every(i=>i._def.typeName==="ZodLiteral"&&!i.description)){let i=n.reduce((r,o)=>{let a=typeof o._def.value;switch(a){case"string":case"number":case"boolean":return[...r,a];case"bigint":return[...r,"integer"];case"object":if(o._def.value===null)return[...r,"null"];default:return r}},[]);if(i.length===n.length){let r=i.filter((o,a,s)=>s.indexOf(o)===a);return{type:r.length>1?r:r[0],enum:n.reduce((o,a)=>o.includes(a._def.value)?o:[...o,a._def.value],[])}}}else if(n.every(i=>i._def.typeName==="ZodEnum"))return{type:"string",enum:n.reduce((i,r)=>[...i,...r._def.values.filter(o=>!i.includes(o))],[])};return h0(e,t)}var h0=(e,t)=>{let n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((i,r)=>K(i._def,{...t,currentPath:[...t.currentPath,"anyOf",`${r}`]})).filter(i=>!!i&&(!t.strictUnions||typeof i=="object"&&Object.keys(i).length>0));return n.length?{anyOf:n}:void 0};function v0(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return t.target==="openApi3"?{type:qs[e.innerType._def.typeName],nullable:!0}:{type:[qs[e.innerType._def.typeName],"null"]};if(t.target==="openApi3"){let i=K(e.innerType._def,{...t,currentPath:[...t.currentPath]});return i&&"$ref"in i?{allOf:[i],nullable:!0}:i&&{...i,nullable:!0}}let n=K(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return n&&{anyOf:[n,{type:"null"}]}}function y0(e,t){let n={type:"number"};if(!e.checks)return n;for(let i of e.checks)switch(i.kind){case"int":n.type="integer",Uv(n,"type",i.message,t);break;case"min":t.target==="jsonSchema7"?i.inclusive?de(n,"minimum",i.value,i.message,t):de(n,"exclusiveMinimum",i.value,i.message,t):(i.inclusive||(n.exclusiveMinimum=!0),de(n,"minimum",i.value,i.message,t));break;case"max":t.target==="jsonSchema7"?i.inclusive?de(n,"maximum",i.value,i.message,t):de(n,"exclusiveMaximum",i.value,i.message,t):(i.inclusive||(n.exclusiveMaximum=!0),de(n,"maximum",i.value,i.message,t));break;case"multipleOf":de(n,"multipleOf",i.value,i.message,t);break}return n}function _0(e,t){let n=t.target==="openAi",i={type:"object",properties:{}},r=[],o=e.shape();for(let s in o){let c=o[s];if(c===void 0||c._def===void 0)continue;let u=p4(c);u&&n&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),u=!1);let l=K(c._def,{...t,currentPath:[...t.currentPath,"properties",s],propertyPath:[...t.currentPath,"properties",s]});l!==void 0&&(i.properties[s]=l,u||r.push(s))}r.length&&(i.required=r);let a=f4(e,t);return a!==void 0&&(i.additionalProperties=a),i}function f4(e,t){if(e.catchall._def.typeName!=="ZodNever")return K(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function p4(e){try{return e.isOptional()}catch{return!0}}var $0=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return K(e.innerType._def,t);let n=K(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return n?{anyOf:[{not:De(t)},n]}:De(t)};var b0=(e,t)=>{if(t.pipeStrategy==="input")return K(e.in._def,t);if(t.pipeStrategy==="output")return K(e.out._def,t);let n=K(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),i=K(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",n?"1":"0"]});return{allOf:[n,i].filter(r=>r!==void 0)}};function w0(e,t){return K(e.type._def,t)}function k0(e,t){let i={type:"array",uniqueItems:!0,items:K(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&de(i,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&de(i,"maxItems",e.maxSize.value,e.maxSize.message,t),i}function x0(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((n,i)=>K(n._def,{...t,currentPath:[...t.currentPath,"items",`${i}`]})).reduce((n,i)=>i===void 0?n:[...n,i],[]),additionalItems:K(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((n,i)=>K(n._def,{...t,currentPath:[...t.currentPath,"items",`${i}`]})).reduce((n,i)=>i===void 0?n:[...n,i],[])}}function S0(e){return{not:De(e)}}function I0(e){return De(e)}var z0=(e,t)=>K(e.innerType._def,t);var P0=(e,t,n)=>{switch(t){case P.ZodString:return $f(e,n);case P.ZodNumber:return y0(e,n);case P.ZodObject:return _0(e,n);case P.ZodBigInt:return r0(e,n);case P.ZodBoolean:return n0();case P.ZodDate:return Zv(e,n);case P.ZodUndefined:return S0(n);case P.ZodNull:return m0(n);case P.ZodArray:return t0(e,n);case P.ZodUnion:case P.ZodDiscriminatedUnion:return g0(e,n);case P.ZodIntersection:return c0(e,n);case P.ZodTuple:return x0(e,n);case P.ZodRecord:return bf(e,n);case P.ZodLiteral:return u0(e,n);case P.ZodEnum:return s0(e);case P.ZodNativeEnum:return f0(e);case P.ZodNullable:return v0(e,n);case P.ZodOptional:return $0(e,n);case P.ZodMap:return d0(e,n);case P.ZodSet:return k0(e,n);case P.ZodLazy:return()=>e.getter()._def;case P.ZodPromise:return w0(e,n);case P.ZodNaN:case P.ZodNever:return p0(n);case P.ZodEffects:return a0(e,n);case P.ZodAny:return De(n);case P.ZodUnknown:return I0(n);case P.ZodDefault:return o0(e,n);case P.ZodBranded:return _f(e,n);case P.ZodReadonly:return z0(e,n);case P.ZodCatch:return i0(e,n);case P.ZodPipeline:return b0(e,n);case P.ZodFunction:case P.ZodVoid:case P.ZodSymbol:return;default:return(i=>{})(t)}};function K(e,t,n=!1){let i=t.seen.get(e);if(t.override){let s=t.override?.(e,t,i,n);if(s!==Yx)return s}if(i&&!n){let s=m4(i,t);if(s!==void 0)return s}let r={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,r);let o=P0(e,e.typeName,t),a=typeof o=="function"?K(o(),t):o;if(a&&h4(e,t,a),t.postProcess){let s=t.postProcess(a,e,t);return r.jsonSchema=a,s}return r.jsonSchema=a,a}var m4=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:yf(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((n,i)=>t.currentPath[i]===n)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),De(t)):t.$refStrategy==="seen"?De(t):void 0}},h4=(e,t,n)=>(e.description&&(n.description=e.description,t.markdownDescription&&(n.markdownDescription=e.description)),n);var Vv=(e,t)=>{let n=e0(t),i=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[u,l])=>({...c,[u]:K(l._def,{...n,currentPath:[...n.basePath,n.definitionPath,u]},!0)??De(n)}),{}):void 0,r=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,o=K(e._def,r===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,r]},!1)??De(n),a=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;a!==void 0&&(o.title=a),n.flags.hasReferencedOpenAiAnyType&&(i||(i={}),i[n.openAiAnyTypeName]||(i[n.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:n.$refStrategy==="relative"?"1":[...n.basePath,n.definitionPath,n.openAiAnyTypeName].join("/")}}));let s=r===void 0?i?{...o,[n.definitionPath]:i}:o:{$ref:[...n.$refStrategy==="relative"?[]:n.basePath,n.definitionPath,r].join("/"),[n.definitionPath]:{...i,[r]:o}};return n.target==="jsonSchema7"?s.$schema="http://json-schema.org/draft-07/schema#":(n.target==="jsonSchema2019-09"||n.target==="openAi")&&(s.$schema="https://json-schema.org/draft/2019-09/schema#"),n.target==="openAi"&&("anyOf"in s||"oneOf"in s||"allOf"in s||"type"in s&&Array.isArray(s.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),s};function g4(e){return!e||e==="jsonSchema7"||e==="draft-7"?"draft-7":e==="jsonSchema2019-09"||e==="draft-2020-12"?"draft-2020-12":"draft-7"}function Fv(e,t){return xr(e)?Hn(e,{target:g4(t?.target),io:t?.pipeStrategy??"input"}):Vv(e,{strictUnions:t?.strictUnions??!0,pipeStrategy:t?.pipeStrategy??"input"})}function qv(e){let n=dn(e)?.method;if(!n)throw new Error("Schema is missing a method literal");let i=wo(n);if(typeof i!="string")throw new Error("Schema method literal must be a string");return i}function Bv(e,t){let n=ln(e,t);if(!n.success)throw n.error;return n.data}var v4=6e4,wf=class{constructor(t){this._options=t,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(ef,n=>{this._oncancel(n)}),this.setNotificationHandler(rf,n=>{this._onprogress(n)}),this.setRequestHandler(tf,n=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(nf,async(n,i)=>{let r=await this._taskStore.getTask(n.params.taskId,i.sessionId);if(!r)throw new R(M.InvalidParams,"Failed to retrieve task: Task not found");return{...r}}),this.setRequestHandler(af,async(n,i)=>{let r=async()=>{let o=n.params.taskId;if(!await this._taskStore.getTask(o,i.sessionId))throw new R(M.InvalidParams,`Task not found: ${o}`);if(this._taskMessageQueue){let s;for(;s=await this._taskMessageQueue.dequeue(o,i.sessionId);){if(s.type==="response"||s.type==="error"){let c=s.message,u=c.id,l=this._requestResolvers.get(u);if(l)if(this._requestResolvers.delete(u),s.type==="response")l(c);else{let d=c,f=new R(d.error.code,d.error.message,d.error.data);l(f)}else{let d=s.type==="response"?"Response":"Error";this._onerror(new Error(`${d} handler missing for request ${u}`))}continue}await this._transport?.send(s.message,{relatedRequestId:i.requestId})}}let a=await this._taskStore.getTask(o,i.sessionId);if(!a)throw new R(M.InvalidParams,`Task not found: ${o}`);if(!vn(a.status))return await this._waitForTaskUpdate(o,i.signal,i.sessionId),await r();if(vn(a.status)){let s=await this._taskStore.getTaskResult(o,i.sessionId);return this._clearTaskQueue(o,i.sessionId),{...s,_meta:{...s._meta,[gn]:{taskId:o}}}}return await r()};return await r()}),this.setRequestHandler(sf,async(n,i)=>{try{let{tasks:r,nextCursor:o}=await this._taskStore.listTasks(n.params?.cursor,i.sessionId);return{tasks:r,nextCursor:o,_meta:{}}}catch(r){throw new R(M.InvalidParams,`Failed to list tasks: ${r instanceof Error?r.message:String(r)}`)}}),this.setRequestHandler(uf,async(n,i)=>{try{let r=await this._taskStore.getTask(n.params.taskId,i.sessionId);if(!r)throw new R(M.InvalidParams,`Task not found: ${n.params.taskId}`);if(vn(r.status))throw new R(M.InvalidParams,`Cannot cancel task in terminal status: ${r.status}`);await this._taskStore.updateTaskStatus(n.params.taskId,"cancelled","Client cancelled task execution.",i.sessionId),this._clearTaskQueue(n.params.taskId,i.sessionId);let o=await this._taskStore.getTask(n.params.taskId,i.sessionId);if(!o)throw new R(M.InvalidParams,`Task not found after cancellation: ${n.params.taskId}`);return{_meta:{},...o}}catch(r){throw r instanceof R?r:new R(M.InvalidRequest,`Failed to cancel task: ${r instanceof Error?r.message:String(r)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,n,i,r,o=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(r,n),startTime:Date.now(),timeout:n,maxTotalTimeout:i,resetTimeoutOnProgress:o,onTimeout:r})}_resetTimeout(t){let n=this._timeoutInfo.get(t);if(!n)return!1;let i=Date.now()-n.startTime;if(n.maxTotalTimeout&&i>=n.maxTotalTimeout)throw this._timeoutInfo.delete(t),R.fromError(M.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:n.maxTotalTimeout,totalElapsed:i});return clearTimeout(n.timeoutId),n.timeoutId=setTimeout(n.onTimeout,n.timeout),!0}_cleanupTimeout(t){let n=this._timeoutInfo.get(t);n&&(clearTimeout(n.timeoutId),this._timeoutInfo.delete(t))}async connect(t){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=t;let n=this.transport?.onclose;this._transport.onclose=()=>{n?.(),this._onclose()};let i=this.transport?.onerror;this._transport.onerror=o=>{i?.(o),this._onerror(o)};let r=this._transport?.onmessage;this._transport.onmessage=(o,a)=>{r?.(o,a),Ds(o)||Mx(o)?this._onresponse(o):xv(o)?this._onrequest(o,a):Zx(o)?this._onnotification(o):this._onerror(new Error(`Unknown message type: ${JSON.stringify(o)}`))},await this._transport.start()}_onclose(){let t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let i of this._timeoutInfo.values())clearTimeout(i.timeoutId);this._timeoutInfo.clear();for(let i of this._requestHandlerAbortControllers.values())i.abort();this._requestHandlerAbortControllers.clear();let n=R.fromError(M.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let i of t.values())i(n)}_onerror(t){this.onerror?.(t)}_onnotification(t){let n=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;n!==void 0&&Promise.resolve().then(()=>n(t)).catch(i=>this._onerror(new Error(`Uncaught error in notification handler: ${i}`)))}_onrequest(t,n){let i=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,r=this._transport,o=t.params?._meta?.[gn]?.taskId,a=r?.sessionId,s=this._taskStore,c=!0,u;if(o&&s&&this._taskMessageQueue&&a!==void 0&&(c=!1,u=(async()=>{if(!await s.getTask(o,a))throw new R(M.InvalidParams,`Task not found: ${o}`);c=!0})()),i===void 0){let m={jsonrpc:"2.0",id:t.id,error:{code:M.MethodNotFound,message:"Method not found"}};if(o&&u){let h={type:"error",message:m,timestamp:Date.now()};u.then(()=>this._enqueueTaskMessage(o,h,a),()=>r?.send(m)).catch(g=>this._onerror(new Error(`Failed to send an error response: ${g}`)))}else o&&this._taskMessageQueue?this._enqueueTaskMessage(o,{type:"error",message:m,timestamp:Date.now()},r?.sessionId).catch(h=>this._onerror(new Error(`Failed to enqueue error response: ${h}`))):r?.send(m).catch(h=>this._onerror(new Error(`Failed to send an error response: ${h}`)));return}let l=new AbortController;this._requestHandlerAbortControllers.set(t.id,l);let d=Rx(t.params)?t.params.task:void 0,f=this._taskStore?this.requestTaskStore(t,r?.sessionId):void 0,p={signal:l.signal,sessionId:r?.sessionId,_meta:t.params?._meta,sendNotification:async m=>{if(l.signal.aborted)return;let h={relatedRequestId:t.id};o&&(h.relatedTask={taskId:o}),await this.notification(m,h)},sendRequest:async(m,h,g)=>{if(l.signal.aborted)throw new R(M.ConnectionClosed,"Request was cancelled");let _={...g,relatedRequestId:t.id};o&&!_.relatedTask&&(_.relatedTask={taskId:o});let $=_.relatedTask?.taskId??o;return $&&f&&await f.updateTaskStatus($,"input_required"),await this.request(m,h,_)},authInfo:n?.authInfo,requestId:t.id,requestInfo:n?.requestInfo,taskId:o,taskStore:f,taskRequestedTtl:d?.ttl,closeSSEStream:n?.closeSSEStream,closeStandaloneSSEStream:n?.closeStandaloneSSEStream};(u??Promise.resolve()).then(()=>{if(u&&l.signal.aborted)throw new R(M.ConnectionClosed,"Request was cancelled");d&&this.assertTaskHandlerCapability(t.method)}).then(()=>i(t,p)).then(async m=>{if(l.signal.aborted)return;let h={result:m,jsonrpc:"2.0",id:t.id};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"response",message:h,timestamp:Date.now()},r?.sessionId):await r?.send(h)},async m=>{if(l.signal.aborted)return;let h={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(m.code)?m.code:M.InternalError,message:m.message??"Internal error",...m.data!==void 0&&{data:m.data}}};o&&this._taskMessageQueue&&c?await this._enqueueTaskMessage(o,{type:"error",message:h,timestamp:Date.now()},r?.sessionId):await r?.send(h)}).catch(m=>this._onerror(new Error(`Failed to send response: ${m}`))).finally(()=>{this._requestHandlerAbortControllers.get(t.id)===l&&this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){let{progressToken:n,...i}=t.params,r=Number(n),o=this._progressHandlers.get(r);if(!o){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}let a=this._responseHandlers.get(r),s=this._timeoutInfo.get(r);if(s&&a&&s.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(c){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(c);return}o(i)}_onresponse(t){let n=Number(t.id),i=this._requestResolvers.get(n);if(i){if(this._requestResolvers.delete(n),Ds(t))i(t);else{let a=new R(t.error.code,t.error.message,t.error.data);i(a)}return}let r=this._responseHandlers.get(n);if(r===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(n),this._cleanupTimeout(n);let o=!1;if(Ds(t)&&t.result&&typeof t.result=="object"){let a=t.result;if(a.task&&typeof a.task=="object"){let s=a.task;typeof s.taskId=="string"&&(o=!0,this._taskProgressTokens.set(s.taskId,n))}}if(o||this._progressHandlers.delete(n),Ds(t))r(t);else{let a=R.fromError(t.error.code,t.error.message,t.error.data);r(a)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,n,i){let{task:r}=i??{};if(!r){try{yield{type:"result",result:await this.request(t,n,i)}}catch(a){yield{type:"error",error:a instanceof R?a:new R(M.InternalError,String(a))}}return}let o;try{let a=await this.request(t,Eo,i);if(a.task)o=a.task.taskId,yield{type:"taskCreated",task:a.task};else throw new R(M.InternalError,"Task creation did not return a task");for(;;){let s=await this.getTask({taskId:o},i);if(yield{type:"taskStatus",task:s},vn(s.status)){s.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:o},n,i)}:s.status==="failed"?yield{type:"error",error:new R(M.InternalError,`Task ${o} failed`)}:s.status==="cancelled"&&(yield{type:"error",error:new R(M.InternalError,`Task ${o} was cancelled`)});return}if(s.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:o},n,i)};return}let c=s.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(u=>setTimeout(u,c)),i?.signal?.throwIfAborted()}}catch(a){yield{type:"error",error:a instanceof R?a:new R(M.InternalError,String(a))}}}request(t,n,i){let{relatedRequestId:r,resumptionToken:o,onresumptiontoken:a,task:s,relatedTask:c}=i??{};return new Promise((u,l)=>{let d=$=>{l($)};if(!this._transport){d(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method),s&&this.assertTaskCapability(t.method)}catch($){d($);return}i?.signal?.throwIfAborted();let f=this._requestMessageId++,p={...t,jsonrpc:"2.0",id:f};i?.onprogress&&(this._progressHandlers.set(f,i.onprogress),p.params={...t.params,_meta:{...t.params?._meta||{},progressToken:f}}),s&&(p.params={...p.params,task:s}),c&&(p.params={...p.params,_meta:{...p.params?._meta||{},[gn]:c}});let m=$=>{this._responseHandlers.delete(f),this._progressHandlers.delete(f),this._cleanupTimeout(f),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:f,reason:String($)}},{relatedRequestId:r,resumptionToken:o,onresumptiontoken:a}).catch(O=>this._onerror(new Error(`Failed to send cancellation: ${O}`)));let x=$ instanceof R?$:new R(M.RequestTimeout,String($));l(x)};this._responseHandlers.set(f,$=>{if(!i?.signal?.aborted){if($ instanceof Error)return l($);try{let x=ln(n,$.result);x.success?u(x.data):l(x.error)}catch(x){l(x)}}}),i?.signal?.addEventListener("abort",()=>{m(i?.signal?.reason)});let h=i?.timeout??v4,g=()=>m(R.fromError(M.RequestTimeout,"Request timed out",{timeout:h}));this._setupTimeout(f,h,i?.maxTotalTimeout,g,i?.resetTimeoutOnProgress??!1);let _=c?.taskId;if(_){let $=x=>{let O=this._responseHandlers.get(f);O?O(x):this._onerror(new Error(`Response handler missing for side-channeled request ${f}`))};this._requestResolvers.set(f,$),this._enqueueTaskMessage(_,{type:"request",message:p,timestamp:Date.now()}).catch(x=>{this._cleanupTimeout(f),l(x)})}else this._transport.send(p,{relatedRequestId:r,resumptionToken:o,onresumptiontoken:a}).catch($=>{this._cleanupTimeout(f),l($)})})}async getTask(t,n){return this.request({method:"tasks/get",params:t},of,n)}async getTaskResult(t,n,i){return this.request({method:"tasks/result",params:t},n,i)}async listTasks(t,n){return this.request({method:"tasks/list",params:t},cf,n)}async cancelTask(t,n){return this.request({method:"tasks/cancel",params:t},Fx,n)}async notification(t,n){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);let i=n?.relatedTask?.taskId;if(i){let s={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[gn]:n.relatedTask}}};await this._enqueueTaskMessage(i,{type:"notification",message:s,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!n?.relatedRequestId&&!n?.relatedTask){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;let s={...t,jsonrpc:"2.0"};n?.relatedTask&&(s={...s,params:{...s.params,_meta:{...s.params?._meta||{},[gn]:n.relatedTask}}}),this._transport?.send(s,n).catch(c=>this._onerror(c))});return}let a={...t,jsonrpc:"2.0"};n?.relatedTask&&(a={...a,params:{...a.params,_meta:{...a.params?._meta||{},[gn]:n.relatedTask}}}),await this._transport.send(a,n)}setRequestHandler(t,n){let i=qv(t);this.assertRequestHandlerCapability(i),this._requestHandlers.set(i,(r,o)=>{let a=Bv(t,r);return Promise.resolve(n(a,o))})}removeRequestHandler(t){this._requestHandlers.delete(t)}assertCanSetRequestHandler(t){if(this._requestHandlers.has(t))throw new Error(`A request handler for ${t} already exists, which would be overridden`)}setNotificationHandler(t,n){let i=qv(t);this._notificationHandlers.set(i,r=>{let o=Bv(t,r);return Promise.resolve(n(o))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){let n=this._taskProgressTokens.get(t);n!==void 0&&(this._progressHandlers.delete(n),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,n,i){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,n,i??this._transport?.sessionId,r)}async _clearTaskQueue(t,n){if(this._taskMessageQueue){let i=await this._taskMessageQueue.dequeueAll(t,n);for(let r of i)if(r.type==="request"&&xv(r.message)){let o=r.message.id,a=this._requestResolvers.get(o);a?(a(new R(M.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(o)):this._onerror(new Error(`Resolver missing for request ${o} during task ${t} cleanup`))}}}async _waitForTaskUpdate(t,n,i){let r=this._options?.defaultTaskPollInterval??1e3;try{let o=await this._taskStore?.getTask(t,i);o?.pollInterval&&(r=o.pollInterval)}catch{}return new Promise((o,a)=>{if(n.aborted){a(new R(M.InvalidRequest,"Request cancelled"));return}let s=setTimeout(o,r);n.addEventListener("abort",()=>{clearTimeout(s),a(new R(M.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,n){let i=this._taskStore;if(!i)throw new Error("No task store configured");return{createTask:async r=>{if(!t)throw new Error("No request provided");return await i.createTask(r,t.id,{method:t.method,params:t.params},n)},getTask:async r=>{let o=await i.getTask(r,n);if(!o)throw new R(M.InvalidParams,"Failed to retrieve task: Task not found");return o},storeTaskResult:async(r,o,a)=>{await i.storeTaskResult(r,o,a,n);let s=await i.getTask(r,n);if(s){let c=Ms.parse({method:"notifications/tasks/status",params:s});await this.notification(c),vn(s.status)&&this._cleanupTaskProgressHandler(r)}},getTaskResult:r=>i.getTaskResult(r,n),updateTaskStatus:async(r,o,a)=>{let s=await i.getTask(r,n);if(!s)throw new R(M.InvalidParams,`Task "${r}" not found - it may have been cleaned up`);if(vn(s.status))throw new R(M.InvalidParams,`Cannot update task "${r}" from terminal status "${s.status}" to "${o}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await i.updateTaskStatus(r,o,a,n);let c=await i.getTask(r,n);if(c){let u=Ms.parse({method:"notifications/tasks/status",params:c});await this.notification(u),vn(c.status)&&this._cleanupTaskProgressHandler(r)}},listTasks:r=>i.listTasks(r,n)}}};function T0(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function O0(e,t){let n={...e};for(let i in t){let r=i,o=t[r];if(o===void 0)continue;let a=n[r];T0(a)&&T0(o)?n[r]={...a,...o}:n[r]=o}return n}var Ez=v$(R_(),1),Nz=v$(jz(),1);function OU(){let e=new Ez.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,Nz.default)(e),e}var sp=class{constructor(t){this._ajv=t??OU()}getValidator(t){let n="$id"in t&&typeof t.$id=="string"?this._ajv.getSchema(t.$id)??this._ajv.compile(t):this._ajv.compile(t);return i=>n(i)?{valid:!0,data:i,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(n.errors)}}};var cp=class{constructor(t){this._server=t}requestStream(t,n,i){return this._server.requestStream(t,n,i)}createMessageStream(t,n){let i=this._server.getClientCapabilities();if((t.tools||t.toolChoice)&&!i?.sampling?.tools)throw new Error("Client does not support sampling tools capability.");if(t.messages.length>0){let r=t.messages[t.messages.length-1],o=Array.isArray(r.content)?r.content:[r.content],a=o.some(l=>l.type==="tool_result"),s=t.messages.length>1?t.messages[t.messages.length-2]:void 0,c=s?Array.isArray(s.content)?s.content:[s.content]:[],u=c.some(l=>l.type==="tool_use");if(a){if(o.some(l=>l.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!u)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(u){let l=new Set(c.filter(f=>f.type==="tool_use").map(f=>f.id)),d=new Set(o.filter(f=>f.type==="tool_result").map(f=>f.toolUseId));if(l.size!==d.size||![...l].every(f=>d.has(f)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return this.requestStream({method:"sampling/createMessage",params:t},Fs,n)}elicitInputStream(t,n){let i=this._server.getClientCapabilities(),r=t.mode??"form";switch(r){case"url":{if(!i?.elicitation?.url)throw new Error("Client does not support url elicitation.");break}case"form":{if(!i?.elicitation?.form)throw new Error("Client does not support form elicitation.");break}}let o=r==="form"&&t.mode===void 0?{...t,mode:"form"}:t;return this.requestStream({method:"elicitation/create",params:o},Do,n)}async getTask(t,n){return this._server.getTask({taskId:t},n)}async getTaskResult(t,n,i){return this._server.getTaskResult({taskId:t},n,i)}async listTasks(t,n){return this._server.listTasks(t?{cursor:t}:void 0,n)}async cancelTask(t,n){return this._server.cancelTask({taskId:t},n)}};function Az(e,t,n){if(!e)throw new Error(`${n} does not support task creation (required for ${t})`);switch(t){case"tools/call":if(!e.tools?.call)throw new Error(`${n} does not support task creation for tools/call (required for ${t})`);break;default:break}}function Dz(e,t,n){if(!e)throw new Error(`${n} does not support task creation (required for ${t})`);switch(t){case"sampling/createMessage":if(!e.sampling?.createMessage)throw new Error(`${n} does not support task creation for sampling/createMessage (required for ${t})`);break;case"elicitation/create":if(!e.elicitation?.create)throw new Error(`${n} does not support task creation for elicitation/create (required for ${t})`);break;default:break}}var up=class extends wf{constructor(t,n){super(n),this._serverInfo=t,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(Vs.options.map((i,r)=>[i,r])),this.isMessageIgnored=(i,r)=>{let o=this._loggingLevels.get(r);return o?this.LOG_LEVEL_SEVERITY.get(i)<this.LOG_LEVEL_SEVERITY.get(o):!1},this._capabilities=n?.capabilities??{},this._instructions=n?.instructions,this._jsonSchemaValidator=n?.jsonSchemaValidator??new sp,this.setRequestHandler(zv,i=>this._oninitialize(i)),this.setNotificationHandler(Pv,()=>this.oninitialized?.()),this._capabilities.logging&&this.setRequestHandler(Dv,async(i,r)=>{let o=r.sessionId||r.requestInfo?.headers["mcp-session-id"]||void 0,{level:a}=i.params,s=Vs.safeParse(a);return s.success&&this._loggingLevels.set(o,s.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new cp(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=O0(this._capabilities,t)}setRequestHandler(t,n){let r=dn(t)?.method;if(!r)throw new Error("Schema is missing a method literal");let o=wo(r);if(typeof o!="string")throw new Error("Schema method literal must be a string");if(o==="tools/call"){let s=async(c,u)=>{let l=ln(Ao,c);if(!l.success){let m=l.error instanceof Error?l.error.message:String(l.error);throw new R(M.InvalidParams,`Invalid tools/call request: ${m}`)}let{params:d}=l.data,f=await Promise.resolve(n(c,u));if(d.task){let m=ln(Eo,f);if(!m.success){let h=m.error instanceof Error?m.error.message:String(m.error);throw new R(M.InvalidParams,`Invalid task creation result: ${h}`)}return m.data}let p=ln(gf,f);if(!p.success){let m=p.error instanceof Error?p.error.message:String(p.error);throw new R(M.InvalidParams,`Invalid tools/call result: ${m}`)}return p.data};return super.setRequestHandler(t,s)}return super.setRequestHandler(t,n)}assertCapabilityForMethod(t){switch(t){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new Error(`Client does not support sampling (required for ${t})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new Error(`Client does not support elicitation (required for ${t})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new Error(`Client does not support listing roots (required for ${t})`);break;case"ping":break}}assertNotificationCapability(t){switch(t){case"notifications/message":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new Error(`Server does not support notifying about resources (required for ${t})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new Error(`Server does not support notifying of tool list changes (required for ${t})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new Error(`Server does not support notifying of prompt list changes (required for ${t})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new Error(`Client does not support URL elicitation (required for ${t})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(t){if(this._capabilities)switch(t){case"completion/complete":if(!this._capabilities.completions)throw new Error(`Server does not support completions (required for ${t})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new Error(`Server does not support prompts (required for ${t})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new Error(`Server does not support resources (required for ${t})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new Error(`Server does not support tools (required for ${t})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Server does not support tasks capability (required for ${t})`);break;case"ping":case"initialize":break}}assertTaskCapability(t){Dz(this._clientCapabilities?.tasks?.requests,t,"Client")}assertTaskHandlerCapability(t){this._capabilities&&Az(this._capabilities.tasks?.requests,t,"Server")}async _oninitialize(t){let n=t.params.protocolVersion;return this._clientCapabilities=t.params.capabilities,this._clientVersion=t.params.clientInfo,{protocolVersion:Nx.includes(n)?n:wv,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getCapabilities(){return this._capabilities}async ping(){return this.request({method:"ping"},Qd)}async createMessage(t,n){if((t.tools||t.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new Error("Client does not support sampling tools capability.");if(t.messages.length>0){let i=t.messages[t.messages.length-1],r=Array.isArray(i.content)?i.content:[i.content],o=r.some(u=>u.type==="tool_result"),a=t.messages.length>1?t.messages[t.messages.length-2]:void 0,s=a?Array.isArray(a.content)?a.content:[a.content]:[],c=s.some(u=>u.type==="tool_use");if(o){if(r.some(u=>u.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!c)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(c){let u=new Set(s.filter(d=>d.type==="tool_use").map(d=>d.id)),l=new Set(r.filter(d=>d.type==="tool_result").map(d=>d.toolUseId));if(u.size!==l.size||![...u].every(d=>l.has(d)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return t.tools?this.request({method:"sampling/createMessage",params:t},Rv,n):this.request({method:"sampling/createMessage",params:t},Fs,n)}async elicitInput(t,n){switch(t.mode??"form"){case"url":{if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support url elicitation.");let r=t;return this.request({method:"elicitation/create",params:r},Do,n)}case"form":{if(!this._clientCapabilities?.elicitation?.form)throw new Error("Client does not support form elicitation.");let r=t.mode==="form"?t:{...t,mode:"form"},o=await this.request({method:"elicitation/create",params:r},Do,n);if(o.action==="accept"&&o.content&&r.requestedSchema)try{let s=this._jsonSchemaValidator.getValidator(r.requestedSchema)(o.content);if(!s.valid)throw new R(M.InvalidParams,`Elicitation response content does not match requested schema: ${s.errorMessage}`)}catch(a){throw a instanceof R?a:new R(M.InternalError,`Error validating elicitation response: ${a instanceof Error?a.message:String(a)}`)}return o}}}createElicitationCompletionNotifier(t,n){if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:t}},n)}async listRoots(t,n){return this.request({method:"roots/list",params:t},Cv,n)}async sendLoggingMessage(t,n){if(this._capabilities.logging&&!this.isMessageIgnored(t.level,n))return this.notification({method:"notifications/message",params:t})}async sendResourceUpdated(t){return this.notification({method:"notifications/resources/updated",params:t})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}};var Cz=Symbol.for("mcp.completable");function q_(e){return!!e&&typeof e=="object"&&Cz in e}function Uz(e){return e[Cz]?.complete}var Rz;(function(e){e.Completable="McpCompletable"})(Rz||(Rz={}));var jU=/^[A-Za-z0-9._-]{1,128}$/;function EU(e){let t=[];if(e.length===0)return{isValid:!1,warnings:["Tool name cannot be empty"]};if(e.length>128)return{isValid:!1,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${e.length})`]};if(e.includes(" ")&&t.push("Tool name contains spaces, which may cause parsing issues"),e.includes(",")&&t.push("Tool name contains commas, which may cause parsing issues"),(e.startsWith("-")||e.endsWith("-"))&&t.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts"),(e.startsWith(".")||e.endsWith("."))&&t.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts"),!jU.test(e)){let n=e.split("").filter(i=>!/[A-Za-z0-9._-]/.test(i)).filter((i,r,o)=>o.indexOf(i)===r);return t.push(`Tool name contains invalid characters: ${n.map(i=>`"${i}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:t}}return{isValid:!0,warnings:t}}function NU(e,t){if(t.length>0){console.warn(`Tool name validation warning for "${e}":`);for(let n of t)console.warn(` - ${n}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.")}}function B_(e){let t=EU(e);return NU(e,t.warnings),t.isValid}var lp=class{constructor(t){this._mcpServer=t}registerToolTask(t,n,i){let r={taskSupport:"required",...n.execution};if(r.taskSupport==="forbidden")throw new Error(`Cannot register task-based tool '${t}' with taskSupport 'forbidden'. Use registerTool() instead.`);return this._mcpServer._createRegisteredTool(t,n.title,n.description,n.inputSchema,n.outputSchema,n.annotations,r,n._meta,i)}};function AU(e,t){let n=0,i=[e];for(;i.length>0;){let r=i.pop();if(!(r===null||typeof r!="object"))if(Array.isArray(r))for(let o of r){if(++n>t)return n;o!==null&&typeof o=="object"&&i.push(o)}else for(let o in r){if(!Object.prototype.hasOwnProperty.call(r,o))continue;if(++n>t)return n;let a=r[o];a!==null&&typeof a=="object"&&i.push(a)}}return n}function DU(e){if(!(e===void 0||e===1/0)){if(typeof e!="number"||Number.isNaN(e)||e<1)throw new RangeError(`maxToolInputElements must be a number of at least 1, or Infinity, got ${String(e)}`);return e}}var dp=class{constructor(t,n){this._registeredResources={},this._registeredResourceTemplates={},this._registeredTools={},this._registeredPrompts={},this._toolHandlersInitialized=!1,this._completionHandlerInitialized=!1,this._resourceHandlersInitialized=!1,this._promptHandlersInitialized=!1,this.server=new up(t,n),this._maxToolInputElements=DU(n?.maxToolInputElements),n?.capabilities?.tools&&this.setToolRequestHandlers(),n?.capabilities?.resources&&this.setResourceRequestHandlers(),n?.capabilities?.prompts&&this.setPromptRequestHandlers()}get experimental(){return this._experimental||(this._experimental={tasks:new lp(this)}),this._experimental}async connect(t){return await this.server.connect(t)}async close(){await this.server.close()}setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler(In(hf)),this.server.assertCanSetRequestHandler(In(Ao)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(hf,()=>({tools:Object.entries(this._registeredTools).filter(([,t])=>t.enabled).map(([t,n])=>{let i={name:t,title:n.title,description:n.description,inputSchema:(()=>{let r=bo(n.inputSchema);return r?Fv(r,{strictUnions:!0,pipeStrategy:"input"}):RU})(),annotations:n.annotations,execution:n.execution,_meta:n._meta};if(n.outputSchema){let r=bo(n.outputSchema);r&&(i.outputSchema=Fv(r,{strictUnions:!0,pipeStrategy:"output"}))}return i})})),this.server.setRequestHandler(Ao,async(t,n)=>{try{let i=this._registeredTools[t.params.name];if(!i)throw new R(M.InvalidParams,`Tool ${t.params.name} not found`);if(!i.enabled)throw new R(M.InvalidParams,`Tool ${t.params.name} disabled`);let r=!!t.params.task,o=i.execution?.taskSupport,a="createTask"in i.handler;if((o==="required"||o==="optional")&&!a)throw new R(M.InternalError,`Tool ${t.params.name} has taskSupport '${o}' but was not registered with registerToolTask`);if(o==="required"&&!r)throw new R(M.MethodNotFound,`Tool ${t.params.name} requires task augmentation (taskSupport: 'required')`);if(o==="optional"&&!r&&a)return await this.handleAutomaticTaskPolling(i,t,n);let s=await this.validateToolInput(i,t.params.arguments,t.params.name),c=await this.executeToolHandler(i,s,n);return r||await this.validateToolOutput(i,c,t.params.name),c}catch(i){if(i instanceof R&&i.code===M.UrlElicitationRequired)throw i;return this.createToolError(i instanceof Error?i.message:String(i))}}),this._toolHandlersInitialized=!0)}createToolError(t){return{content:[{type:"text",text:t}],isError:!0}}async validateToolInput(t,n,i){if(this._maxToolInputElements!==void 0&&AU(n,this._maxToolInputElements)>this._maxToolInputElements)throw new R(M.InvalidParams,`Invalid arguments for tool ${i}: arguments contain more than the maximum of ${this._maxToolInputElements} elements`);if(!t.inputSchema)return;let o=bo(t.inputSchema)??t.inputSchema,a=await $d(o,n??{});if(!a.success){let s="error"in a?a.error:"Unknown error",c=bd(s);throw new R(M.InvalidParams,`Input validation error: Invalid arguments for tool ${i}: ${c}`)}return a.data}async validateToolOutput(t,n,i){if(!t.outputSchema||!("content"in n)||n.isError)return;if(!n.structuredContent)throw new R(M.InvalidParams,`Output validation error: Tool ${i} has an output schema but no structured content was provided`);let r=bo(t.outputSchema),o=await $d(r,n.structuredContent);if(!o.success){let a="error"in o?o.error:"Unknown error",s=bd(a);throw new R(M.InvalidParams,`Output validation error: Invalid structured content for tool ${i}: ${s}`)}}async executeToolHandler(t,n,i){let r=t.handler;if("createTask"in r){if(!i.taskStore)throw new Error("No task store provided.");let a={...i,taskStore:i.taskStore};if(t.inputSchema){let s=r;return await Promise.resolve(s.createTask(n,a))}else{let s=r;return await Promise.resolve(s.createTask(a))}}if(t.inputSchema){let a=r;return await Promise.resolve(a(n,i))}else{let a=r;return await Promise.resolve(a(i))}}async handleAutomaticTaskPolling(t,n,i){if(!i.taskStore)throw new Error("No task store provided for task-capable tool.");let r=await this.validateToolInput(t,n.params.arguments,n.params.name),o=t.handler,a={...i,taskStore:i.taskStore},s=r?await Promise.resolve(o.createTask(r,a)):await Promise.resolve(o.createTask(a)),c=s.task.taskId,u=s.task,l=u.pollInterval??5e3;for(;u.status!=="completed"&&u.status!=="failed"&&u.status!=="cancelled";){await new Promise(f=>setTimeout(f,l));let d=await i.taskStore.getTask(c);if(!d)throw new R(M.InternalError,`Task ${c} not found during polling`);u=d}return await i.taskStore.getTaskResult(c)}setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler(In(vf)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(vf,async t=>{switch(t.params.ref.type){case"ref/prompt":return Gx(t),this.handlePromptCompletion(t,t.params.ref);case"ref/resource":return Wx(t),this.handleResourceCompletion(t,t.params.ref);default:throw new R(M.InvalidParams,`Invalid completion reference: ${t.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(t,n){let i=this._registeredPrompts[n.name];if(!i)throw new R(M.InvalidParams,`Prompt ${n.name} not found`);if(!i.enabled)throw new R(M.InvalidParams,`Prompt ${n.name} disabled`);if(!i.argsSchema)return bc;let o=dn(i.argsSchema)?.[t.params.argument.name];if(!q_(o))return bc;let a=Uz(o);if(!a)return bc;let s=await a(t.params.argument.value,t.params.context);return Mz(s)}async handleResourceCompletion(t,n){let i=Object.values(this._registeredResourceTemplates).find(a=>a.resourceTemplate.uriTemplate.toString()===n.uri);if(!i){if(this._registeredResources[n.uri])return bc;throw new R(M.InvalidParams,`Resource template ${t.params.ref.uri} not found`)}let r=i.resourceTemplate.completeCallback(t.params.argument.name);if(!r)return bc;let o=await r(t.params.argument.value,t.params.context);return Mz(o)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(In(lf)),this.server.assertCanSetRequestHandler(In(df)),this.server.assertCanSetRequestHandler(In(ff)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(lf,async(t,n)=>{let i=Object.entries(this._registeredResources).filter(([o,a])=>a.enabled).map(([o,a])=>({uri:o,name:a.name,...a.metadata})),r=[];for(let o of Object.values(this._registeredResourceTemplates)){if(!o.resourceTemplate.listCallback)continue;let a=await o.resourceTemplate.listCallback(n);for(let s of a.resources)r.push({...o.metadata,...s})}return{resources:[...i,...r]}}),this.server.setRequestHandler(df,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([n,i])=>({name:n,uriTemplate:i.resourceTemplate.uriTemplate.toString(),...i.metadata}))})),this.server.setRequestHandler(ff,async(t,n)=>{let i=new URL(t.params.uri),r=this._registeredResources[i.toString()];if(r){if(!r.enabled)throw new R(M.InvalidParams,`Resource ${i} disabled`);return r.readCallback(i,n)}for(let o of Object.values(this._registeredResourceTemplates)){let a=o.resourceTemplate.uriTemplate.match(i.toString());if(a)return o.readCallback(i,a,n)}throw new R(M.InvalidParams,`Resource ${i} not found`)}),this._resourceHandlersInitialized=!0)}setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler(In(pf)),this.server.assertCanSetRequestHandler(In(mf)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(pf,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,t])=>t.enabled).map(([t,n])=>({name:t,title:n.title,description:n.description,arguments:n.argsSchema?CU(n.argsSchema):void 0}))})),this.server.setRequestHandler(mf,async(t,n)=>{let i=this._registeredPrompts[t.params.name];if(!i)throw new R(M.InvalidParams,`Prompt ${t.params.name} not found`);if(!i.enabled)throw new R(M.InvalidParams,`Prompt ${t.params.name} disabled`);if(i.argsSchema){let r=bo(i.argsSchema),o=await $d(r,t.params.arguments??{});if(!o.success){let c="error"in o?o.error:"Unknown error",u=bd(c);throw new R(M.InvalidParams,`Invalid arguments for prompt ${t.params.name}: ${u}`)}let a=o.data,s=i.callback;return await Promise.resolve(s(a,n))}else{let r=i.callback;return await Promise.resolve(r(n))}}),this._promptHandlersInitialized=!0)}resource(t,n,...i){let r;typeof i[0]=="object"&&(r=i.shift());let o=i[0];if(typeof n=="string"){if(this._registeredResources[n])throw new Error(`Resource ${n} is already registered`);let a=this._createRegisteredResource(t,void 0,n,r,o);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),a}else{if(this._registeredResourceTemplates[t])throw new Error(`Resource template ${t} is already registered`);let a=this._createRegisteredResourceTemplate(t,void 0,n,r,o);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),a}}registerResource(t,n,i,r){if(typeof n=="string"){if(this._registeredResources[n])throw new Error(`Resource ${n} is already registered`);let o=this._createRegisteredResource(t,i.title,n,i,r);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),o}else{if(this._registeredResourceTemplates[t])throw new Error(`Resource template ${t} is already registered`);let o=this._createRegisteredResourceTemplate(t,i.title,n,i,r);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),o}}_createRegisteredResource(t,n,i,r,o){let a={name:t,title:n,metadata:r,readCallback:o,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({uri:null}),update:s=>{typeof s.uri<"u"&&s.uri!==i&&(delete this._registeredResources[i],s.uri&&(this._registeredResources[s.uri]=a)),typeof s.name<"u"&&(a.name=s.name),typeof s.title<"u"&&(a.title=s.title),typeof s.metadata<"u"&&(a.metadata=s.metadata),typeof s.callback<"u"&&(a.readCallback=s.callback),typeof s.enabled<"u"&&(a.enabled=s.enabled),this.sendResourceListChanged()}};return this._registeredResources[i]=a,a}_createRegisteredResourceTemplate(t,n,i,r,o){let a={resourceTemplate:i,title:n,metadata:r,readCallback:o,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({name:null}),update:u=>{typeof u.name<"u"&&u.name!==t&&(delete this._registeredResourceTemplates[t],u.name&&(this._registeredResourceTemplates[u.name]=a)),typeof u.title<"u"&&(a.title=u.title),typeof u.template<"u"&&(a.resourceTemplate=u.template),typeof u.metadata<"u"&&(a.metadata=u.metadata),typeof u.callback<"u"&&(a.readCallback=u.callback),typeof u.enabled<"u"&&(a.enabled=u.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[t]=a;let s=i.uriTemplate.variableNames;return Array.isArray(s)&&s.some(u=>!!i.completeCallback(u))&&this.setCompletionRequestHandler(),a}_createRegisteredPrompt(t,n,i,r,o){let a={title:n,description:i,argsSchema:r===void 0?void 0:Jn(r),callback:o,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({name:null}),update:s=>{typeof s.name<"u"&&s.name!==t&&(delete this._registeredPrompts[t],s.name&&(this._registeredPrompts[s.name]=a)),typeof s.title<"u"&&(a.title=s.title),typeof s.description<"u"&&(a.description=s.description),typeof s.argsSchema<"u"&&(a.argsSchema=Jn(s.argsSchema)),typeof s.callback<"u"&&(a.callback=s.callback),typeof s.enabled<"u"&&(a.enabled=s.enabled),this.sendPromptListChanged()}};return this._registeredPrompts[t]=a,r&&Object.values(r).some(c=>{let u=c instanceof Xn?c._def?.innerType:c;return q_(u)})&&this.setCompletionRequestHandler(),a}_createRegisteredTool(t,n,i,r,o,a,s,c,u){B_(t);let l={title:n,description:i,inputSchema:Zz(r),outputSchema:Zz(o),annotations:a,execution:s,_meta:c,handler:u,enabled:!0,disable:()=>l.update({enabled:!1}),enable:()=>l.update({enabled:!0}),remove:()=>l.update({name:null}),update:d=>{typeof d.name<"u"&&d.name!==t&&(typeof d.name=="string"&&B_(d.name),delete this._registeredTools[t],d.name&&(this._registeredTools[d.name]=l)),typeof d.title<"u"&&(l.title=d.title),typeof d.description<"u"&&(l.description=d.description),typeof d.paramsSchema<"u"&&(l.inputSchema=Jn(d.paramsSchema)),typeof d.outputSchema<"u"&&(l.outputSchema=Jn(d.outputSchema)),typeof d.callback<"u"&&(l.handler=d.callback),typeof d.annotations<"u"&&(l.annotations=d.annotations),typeof d._meta<"u"&&(l._meta=d._meta),typeof d.enabled<"u"&&(l.enabled=d.enabled),this.sendToolListChanged()}};return this._registeredTools[t]=l,this.setToolRequestHandlers(),this.sendToolListChanged(),l}tool(t,...n){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let i,r,o,a;if(typeof n[0]=="string"&&(i=n.shift()),n.length>1){let c=n[0];if(H_(c))r=n.shift(),n.length>1&&typeof n[0]=="object"&&n[0]!==null&&!H_(n[0])&&(a=n.shift());else if(typeof c=="object"&&c!==null){if(Object.values(c).some(u=>typeof u=="object"&&u!==null))throw new Error(`Tool ${t} expected a Zod schema or ToolAnnotations, but received an unrecognized object`);a=n.shift()}}let s=n[0];return this._createRegisteredTool(t,void 0,i,r,o,a,{taskSupport:"forbidden"},void 0,s)}registerTool(t,n,i){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let{title:r,description:o,inputSchema:a,outputSchema:s,annotations:c,_meta:u}=n;return this._createRegisteredTool(t,r,o,a,s,c,{taskSupport:"forbidden"},u,i)}prompt(t,...n){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let i;typeof n[0]=="string"&&(i=n.shift());let r;n.length>1&&(r=n.shift());let o=n[0],a=this._createRegisteredPrompt(t,void 0,i,r,o);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),a}registerPrompt(t,n,i){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let{title:r,description:o,argsSchema:a}=n,s=this._createRegisteredPrompt(t,r,o,a,i);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),s}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(t,n){return this.server.sendLoggingMessage(t,n)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}};var RU={type:"object",properties:{}};function Lz(e){return e!==null&&typeof e=="object"&&"parse"in e&&typeof e.parse=="function"&&"safeParse"in e&&typeof e.safeParse=="function"}function Vz(e){return"_def"in e||"_zod"in e||Lz(e)}function H_(e){return typeof e!="object"||e===null||Vz(e)?!1:Object.keys(e).length===0?!0:Object.values(e).some(Lz)}function Zz(e){if(e){if(H_(e))return Jn(e);if(!Vz(e))throw new Error("inputSchema must be a Zod schema or raw shape, received an unrecognized object");return e}}function CU(e){let t=dn(e);return t?Object.entries(t).map(([n,i])=>{let r=ck(i),o=uk(i);return{name:n,description:r,required:!o}}):[]}function In(e){let n=dn(e)?.method;if(!n)throw new Error("Schema is missing a method literal");let i=wo(n);if(typeof i=="string")return i;throw new Error("Schema method literal must be a string")}function Mz(e){return{completion:{values:e.slice(0,100),total:e.length,hasMore:e.length>100}}}var bc={completion:{values:[],hasMore:!1}};import qz from"node:process";var UU=10*1024*1024,fp=class{constructor(t){this._maxBufferSize=t?.maxBufferSize??UU}append(t){if((this._buffer?.length??0)+t.length>this._maxBufferSize)throw this.clear(),new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);this._buffer=this._buffer?Buffer.concat([this._buffer,t]):t}readMessage(){if(!this._buffer)return null;let t=this._buffer.indexOf(`
|
|
77
|
-
`);if(t===-1)return null;let n=this._buffer.toString("utf8",0,t).replace(/\r$/,"");return this._buffer=this._buffer.subarray(t+1),
|
|
78
|
-
`}var pp=class{constructor(t=qz.stdin,n=qz.stdout,i){this._stdin=t,this._stdout=n,this._started=!1,this._ondata=r=>{try{this._readBuffer.append(r),this.processReadBuffer()}catch(o){this.onerror?.(o),this.close().catch(()=>{})}},this._onerror=r=>{this.onerror?.(r)},this._readBuffer=new fp({maxBufferSize:i?.maxBufferSize})}async start(){if(this._started)throw new Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=!0,this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror)}processReadBuffer(){for(;;)try{let t=this._readBuffer.readMessage();if(t===null)break;this.onmessage?.(t)}catch(t){this.onerror?.(t)}}async close(){this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.listenerCount("data")===0&&this._stdin.pause(),this._readBuffer.clear(),this.onclose?.()}send(t){return new Promise(n=>{let i=Fz(t);this._stdout.write(i)?n():this._stdout.once("drain",n)})}};import{readdir as bZ,readFile as uP,stat as wZ}from"node:fs/promises";import{basename as sP,join as kZ,relative as xZ,sep as SZ}from"node:path";import{createRequire as MU}from"module";var LU=MU("/"),Qo,VU,FU;try{Qo=LU("worker_threads"),VU=Qo.Worker,FU=Qo.isMarkedAsUntransferable}catch{}var Le=Uint8Array,Bt=Uint16Array,n$=Int32Array,mp=new Le([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),hp=new Le([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),X_=new Le([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Xz=function(e,t){for(var n=new Bt(31),i=0;i<31;++i)n[i]=t+=1<<e[i-1];for(var r=new n$(n[30]),i=1;i<30;++i)for(var o=n[i];o<n[i+1];++o)r[o]=o-n[i]<<5|i;return{b:n,r}},Qo=Xz(mp,2),Yz=Qo.b,Y_=Qo.r;Yz[28]=258,Y_[258]=28;var Qz=Xz(hp,0),qU=Qz.b,Bz=Qz.r,Q_=new Bt(32768);for(_e=0;_e<32768;++_e)Jr=(_e&43690)>>1|(_e&21845)<<1,Jr=(Jr&52428)>>2|(Jr&13107)<<2,Jr=(Jr&61680)>>4|(Jr&3855)<<4,Q_[_e]=((Jr&65280)>>8|(Jr&255)<<8)>>1;var Jr,_e,Er=(function(e,t,n){for(var i=e.length,r=0,o=new Bt(t);r<i;++r)e[r]&&++o[e[r]-1];var a=new Bt(t);for(r=1;r<t;++r)a[r]=a[r-1]+o[r-1]<<1;var s;if(n){s=new Bt(1<<t);var c=15-t;for(r=0;r<i;++r)if(e[r])for(var u=r<<4|e[r],l=t-e[r],d=a[e[r]-1]++<<l,f=d|(1<<l)-1;d<=f;++d)s[Q_[d]>>c]=u}else for(s=new Bt(i),r=0;r<i;++r)e[r]&&(s[r]=Q_[a[e[r]-1]++]>>15-e[r]);return s}),zn=new Le(288);for(_e=0;_e<144;++_e)zn[_e]=8;var _e;for(_e=144;_e<256;++_e)zn[_e]=9;var _e;for(_e=256;_e<280;++_e)zn[_e]=7;var _e;for(_e=280;_e<288;++_e)zn[_e]=8;var _e,xc=new Le(32);for(_e=0;_e<32;++_e)xc[_e]=5;var _e,BU=Er(zn,9,0),HU=Er(zn,9,1),JU=Er(xc,5,0),KU=Er(xc,5,1),J_=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},vr=function(e,t,n){var i=t/8|0;return(e[i]|e[i+1]<<8)>>(t&7)&n},K_=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},i$=function(e){return(e+7)/8|0},Sc=function(e,t,n){return(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new Le(e.subarray(t,n))};var GU=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],pt=function(e,t,n){var i=new Error(t||GU[e]);if(i.code=e,Error.captureStackTrace&&Error.captureStackTrace(i,pt),!n)throw i;return i},WU=function(e,t,n,i){var r=e.length,o=i?i.length:0;if(!r||t.f&&!t.l)return n||new Le(0);var a=!n,s=a||t.i!=2,c=t.i;a&&(n=new Le(r*3));var u=function(oa){var aa=n.length;if(oa>aa){var mi=new Le(Math.max(aa*2,oa));mi.set(n),n=mi}},l=t.f||0,d=t.p||0,f=t.b||0,p=t.l,m=t.d,h=t.m,g=t.n,_=r*8;do{if(!p){l=vr(e,d,1);var $=vr(e,d+1,3);if(d+=3,$)if($==1)p=HU,m=KU,h=9,g=5;else if($==2){var C=vr(e,d,31)+257,G=vr(e,d+10,15)+4,Q=C+vr(e,d+5,31)+1;d+=14;for(var X=new Le(Q),Pe=new Le(19),je=0;je<G;++je)Pe[X_[je]]=vr(e,d+je*3,7);d+=G*3;for(var Ve=J_(Pe),Rt=(1<<Ve)-1,mt=Er(Pe,Ve,1),je=0;je<Q;){var xt=mt[vr(e,d,Rt)];d+=xt&15;var x=xt>>4;if(x<16)X[je++]=x;else{var We=0,Ue=0;for(x==16?(Ue=3+vr(e,d,3),d+=2,We=X[je-1]):x==17?(Ue=3+vr(e,d,7),d+=3):x==18&&(Ue=11+vr(e,d,127),d+=7);Ue--;)X[je++]=We}}var St=X.subarray(0,C),Xe=X.subarray(C);h=J_(St),g=J_(Xe),p=Er(St,h,1),m=Er(Xe,g,1)}else pt(1);else{var x=i$(d)+4,O=e[x-4]|e[x-3]<<8,T=x+O;if(T>r){c&&pt(0);break}s&&u(f+O),n.set(e.subarray(x,T),f),t.b=f+=O,t.p=d=T*8,t.f=l;continue}if(d>_){c&&pt(0);break}}s&&u(f+131072);for(var ia=(1<<h)-1,Ht=(1<<g)-1,Nr=d;;Nr=d){var We=p[K_(e,d)&ia],Ct=We>>4;if(d+=We&15,d>_){c&&pt(0);break}if(We||pt(2),Ct<256)n[f++]=Ct;else if(Ct==256){Nr=d,p=null;break}else{var Ut=Ct-254;if(Ct>264){var je=Ct-257,Ze=mp[je];Ut=vr(e,d,(1<<Ze)-1)+Yz[je],d+=Ze}var yr=m[K_(e,d)&Ht],fi=yr>>4;yr||pt(3),d+=yr&15;var Xe=qU[fi];if(fi>3){var Ze=hp[fi];Xe+=K_(e,d)&(1<<Ze)-1,d+=Ze}if(d>_){c&&pt(0);break}s&&u(f+131072);var pi=f+Ut;if(f<Xe){var jc=o-Xe,Ec=Math.min(Xe,pi);for(jc+f<0&&pt(3);f<Ec;++f)n[f]=i[jc+f]}for(;f<pi;++f)n[f]=n[f-Xe]}}t.l=p,t.p=Nr,t.b=f,t.f=l,p&&(l=1,t.m=h,t.d=m,t.n=g)}while(!l);return f!=n.length&&a?Sc(n,0,f):n.subarray(0,f)},Kr=function(e,t,n){n<<=t&7;var i=t/8|0;e[i]|=n,e[i+1]|=n>>8},wc=function(e,t,n){n<<=t&7;var i=t/8|0;e[i]|=n,e[i+1]|=n>>8,e[i+2]|=n>>16},G_=function(e,t){for(var n=[],i=0;i<e.length;++i)e[i]&&n.push({s:i,f:e[i]});var r=n.length,o=n.slice();if(!r)return{t:tP,l:0};if(r==1){var a=new Le(n[0].s+1);return a[n[0].s]=1,{t:a,l:1}}n.sort(function(T,C){return T.f-C.f}),n.push({s:-1,f:25001});var s=n[0],c=n[1],u=0,l=1,d=2;for(n[0]={s:-1,f:s.f+c.f,l:s,r:c};l!=r-1;)s=n[n[u].f<n[d].f?u++:d++],c=n[u!=l&&n[u].f<n[d].f?u++:d++],n[l++]={s:-1,f:s.f+c.f,l:s,r:c};for(var f=o[0].s,i=1;i<r;++i)o[i].s>f&&(f=o[i].s);var p=new Bt(f+1),m=e$(n[l-1],p,0);if(m>t){var i=0,h=0,g=m-t,_=1<<g;for(o.sort(function(C,G){return p[G.s]-p[C.s]||C.f-G.f});i<r;++i){var $=o[i].s;if(p[$]>t)h+=_-(1<<m-p[$]),p[$]=t;else break}for(h>>=g;h>0;){var x=o[i].s;p[x]<t?h-=1<<t-p[x]++-1:++i}for(;i>=0&&h;--i){var O=o[i].s;p[O]==t&&(--p[O],++h)}m=t}return{t:new Le(p),l:m}},e$=function(e,t,n){return e.s==-1?Math.max(e$(e.l,t,n+1),e$(e.r,t,n+1)):t[e.s]=n},Hz=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Bt(++t),i=0,r=e[0],o=1,a=function(c){n[i++]=c},s=1;s<=t;++s)if(e[s]==r&&s!=t)++o;else{if(!r&&o>2){for(;o>138;o-=138)a(32754);o>2&&(a(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(a(r),--o;o>6;o-=6)a(8304);o>2&&(a(o-3<<5|8208),o=0)}for(;o--;)a(r);o=1,r=e[s]}return{c:n.subarray(0,i),n:t}},kc=function(e,t){for(var n=0,i=0;i<t.length;++i)n+=e[i]*t[i];return n},eP=function(e,t,n){var i=n.length,r=i$(t+2);e[r]=i&255,e[r+1]=i>>8,e[r+2]=e[r]^255,e[r+3]=e[r+1]^255;for(var o=0;o<i;++o)e[r+o+4]=n[o];return(r+4+i)*8},Jz=function(e,t,n,i,r,o,a,s,c,u,l){Kr(t,l++,n),++r[256];for(var d=G_(r,15),f=d.t,p=d.l,m=G_(o,15),h=m.t,g=m.l,_=Hz(f),$=_.c,x=_.n,O=Hz(h),T=O.c,C=O.n,G=new Bt(19),Q=0;Q<$.length;++Q)++G[$[Q]&31];for(var Q=0;Q<T.length;++Q)++G[T[Q]&31];for(var X=G_(G,7),Pe=X.t,je=X.l,Ve=19;Ve>4&&!Pe[X_[Ve-1]];--Ve);var Rt=u+5<<3,mt=kc(r,zn)+kc(o,xc)+a,xt=kc(r,f)+kc(o,h)+a+14+3*Ve+kc(G,Pe)+2*G[16]+3*G[17]+7*G[18];if(c>=0&&Rt<=mt&&Rt<=xt)return eP(t,l,e.subarray(c,c+u));var We,Ue,St,Xe;if(Kr(t,l,1+(xt<mt)),l+=2,xt<mt){We=Er(f,p,0),Ue=f,St=Er(h,g,0),Xe=h;var ia=Er(Pe,je,0);Kr(t,l,x-257),Kr(t,l+5,C-1),Kr(t,l+10,Ve-4),l+=14;for(var Q=0;Q<Ve;++Q)Kr(t,l+3*Q,Pe[X_[Q]]);l+=3*Ve;for(var Ht=[$,T],Nr=0;Nr<2;++Nr)for(var Ct=Ht[Nr],Q=0;Q<Ct.length;++Q){var Ut=Ct[Q]&31;Kr(t,l,ia[Ut]),l+=Pe[Ut],Ut>15&&(Kr(t,l,Ct[Q]>>5&127),l+=Ct[Q]>>12)}}else We=BU,Ue=zn,St=JU,Xe=xc;for(var Q=0;Q<s;++Q){var Ze=i[Q];if(Ze>255){var Ut=Ze>>18&31;wc(t,l,We[Ut+257]),l+=Ue[Ut+257],Ut>7&&(Kr(t,l,Ze>>23&31),l+=mp[Ut]);var yr=Ze&31;wc(t,l,St[yr]),l+=Xe[yr],yr>3&&(wc(t,l,Ze>>5&8191),l+=hp[yr])}else wc(t,l,We[Ze]),l+=Ue[Ze]}return wc(t,l,We[256]),l+Ue[256]},XU=new n$([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),tP=new Le(0),YU=function(e,t,n,i,r,o){var a=o.z||e.length,s=new Le(i+a+5*(1+Math.ceil(a/7e3))+r),c=s.subarray(i,s.length-r),u=o.l,l=(o.r||0)&7;if(t){l&&(c[0]=o.r>>3);for(var d=XU[t-1],f=d>>13,p=d&8191,m=(1<<n)-1,h=o.p||new Bt(32768),g=o.h||new Bt(m+1),_=Math.ceil(n/3),$=2*_,x=function(wp){return(e[wp]^e[wp+1]<<_^e[wp+2]<<$)&m},O=new n$(25e3),T=new Bt(288),C=new Bt(32),G=0,Q=0,X=o.i||0,Pe=0,je=o.w||0,Ve=0;X+2<a;++X){var Rt=x(X),mt=X&32767,xt=g[Rt];if(h[mt]=xt,g[Rt]=mt,je<=X){var We=a-X;if((G>7e3||Pe>24576)&&(We>423||!u)){l=Jz(e,c,0,O,T,C,Q,Pe,Ve,X-Ve,l),Pe=G=Q=0,Ve=X;for(var Ue=0;Ue<286;++Ue)T[Ue]=0;for(var Ue=0;Ue<30;++Ue)C[Ue]=0}var St=2,Xe=0,ia=p,Ht=mt-xt&32767;if(We>2&&Rt==x(X-Ht))for(var Nr=Math.min(f,We)-1,Ct=Math.min(32767,X),Ut=Math.min(258,We);Ht<=Ct&&--ia&&mt!=xt;){if(e[X+St]==e[X+St-Ht]){for(var Ze=0;Ze<Ut&&e[X+Ze]==e[X+Ze-Ht];++Ze);if(Ze>St){if(St=Ze,Xe=Ht,Ze>Nr)break;for(var yr=Math.min(Ht,Ze-2),fi=0,Ue=0;Ue<yr;++Ue){var pi=X-Ht+Ue&32767,jc=h[pi],Ec=pi-jc&32767;Ec>fi&&(fi=Ec,xt=pi)}}}mt=xt,xt=h[mt],Ht+=mt-xt&32767}if(Xe){O[Pe++]=268435456|Y_[St]<<18|Bz[Xe];var oa=Y_[St]&31,aa=Bz[Xe]&31;Q+=mp[oa]+hp[aa],++T[257+oa],++C[aa],je=X+St,++G}else O[Pe++]=e[X],++T[e[X]]}}for(X=Math.max(X,je);X<a;++X)O[Pe++]=e[X],++T[e[X]];l=Jz(e,c,u,O,T,C,Q,Pe,Ve,X-Ve,l),u||(o.r=l&7|c[l/8|0]<<3,l-=7,o.h=g,o.p=h,o.i=X,o.w=je)}else{for(var X=o.w||0;X<a+u;X+=65535){var mi=X+65535;mi>=a&&(c[l/8|0]=u,mi=a),l=eP(c,l+1,e.subarray(X,mi))}o.i=a}return Sc(s,0,i+i$(l)+r)},QU=(function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,i=9;--i;)n=(n&1&&-306674912)^n>>>1;e[t]=n}return e})(),eZ=function(){var e=-1;return{p:function(t){for(var n=e,i=0;i<t.length;++i)n=QU[n&255^t[i]]^n>>>8;e=n},d:function(){return~e}}};var tZ=function(e,t,n,i,r){if(!r&&(r={l:1},t.dictionary)){var o=t.dictionary.subarray(-32768),a=new Le(o.length+e.length);a.set(o),a.set(e,o.length),e=a,r.w=o.length}return YU(e,t.level==null?6:t.level,t.mem==null?r.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,n,i,r)},rP=function(e,t){var n={};for(var i in e)n[i]=e[i];for(var i in t)n[i]=t[i];return n};var jr=function(e,t){return e[t]|e[t+1]<<8},nr=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},W_=function(e,t){return nr(e,t)+nr(e,t+4)*4294967296},at=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function rZ(e,t){return tZ(e,t||{},0,0)}function nZ(e,t){return WU(e,{i:2},t&&t.out,t&&t.dictionary)}var nP=function(e,t,n,i){for(var r in e){var o=e[r],a=t+r,s=i;Array.isArray(o)&&(s=rP(i,o[1]),o=o[0]),ArrayBuffer.isView(o)?n[a]=[o,s]:(n[a+="/"]=[new Le(0),s],nP(o,a,n,i))}},Kz=typeof TextEncoder<"u"&&new TextEncoder,t$=typeof TextDecoder<"u"&&new TextDecoder,iZ=0;try{t$.decode(tP,{stream:!0}),iZ=1}catch{}var oZ=function(e){for(var t="",n=0;;){var i=e[n++],r=(i>127)+(i>223)+(i>239);if(n+r>e.length)return{s:t,r:Sc(e,n-1)};r?r==3?(i=((i&15)<<18|(e[n++]&63)<<12|(e[n++]&63)<<6|e[n++]&63)-65536,t+=String.fromCharCode(55296|i>>10,56320|i&1023)):r&1?t+=String.fromCharCode((i&31)<<6|e[n++]&63):t+=String.fromCharCode((i&15)<<12|(e[n++]&63)<<6|e[n++]&63):t+=String.fromCharCode(i)}};function Gz(e,t){if(t){for(var n=new Le(e.length),i=0;i<e.length;++i)n[i]=e.charCodeAt(i);return n}if(Kz)return Kz.encode(e);for(var r=e.length,o=new Le(e.length+(e.length>>1)),a=0,s=function(l){o[a++]=l},i=0;i<r;++i){if(a+5>o.length){var c=new Le(a+8+(r-i<<1));c.set(o),o=c}var u=e.charCodeAt(i);u<128||t?s(u):u<2048?(s(192|u>>6),s(128|u&63)):u>55295&&u<57344?(u=65536+(u&1047552)|e.charCodeAt(++i)&1023,s(240|u>>18),s(128|u>>12&63),s(128|u>>6&63),s(128|u&63)):(s(224|u>>12),s(128|u>>6&63),s(128|u&63))}return Sc(o,0,a)}function o$(e,t){if(t){for(var n="",i=0;i<e.length;i+=16384)n+=String.fromCharCode.apply(null,e.subarray(i,i+16384));return n}else{if(t$)return t$.decode(e);var r=oZ(e),o=r.s,n=r.r;return n.length&&pt(8),o}}var aZ=function(e,t){return t+30+jr(e,t+26)+jr(e,t+28)},sZ=function(e,t,n){var i=jr(e,t+28),r=jr(e,t+30),o=o$(e.subarray(t+46,t+46+i),!(jr(e,t+8)&2048)),a=t+46+i,s=cZ(e,a,r,n,nr(e,t+20),nr(e,t+24),nr(e,t+42)),c=s[0],u=s[1],l=s[2];return[jr(e,t+10),c,u,o,a+r+jr(e,t+32),l]},cZ=function(e,t,n,i,r,o,a){var s=r==4294967295,c=o==4294967295,u=a==4294967295,l=t+n,d=s+c+u;if(i&&d){for(;t+4<l;t+=4+jr(e,t+2))if(jr(e,t)==1)return[s?W_(e,t+4+8*c):r,c?W_(e,t+4):o,u?W_(e,t+4+8*(c+s)):a,1];i<2&&pt(13)}return[r,o,a,0]},r$=function(e){var t=0;if(e)for(var n in e){var i=e[n].length;i>65535&&pt(9),t+=i+4}return t},Wz=function(e,t,n,i,r,o,a,s){var c=i.length,u=n.extra,l=s&&s.length,d=r$(u);at(e,t,a!=null?33639248:67324752),t+=4,a!=null&&(e[t++]=20,e[t++]=n.os),e[t]=20,t+=2,e[t++]=n.flag<<1|(o<0&&8),e[t++]=r&&8,e[t++]=n.compression&255,e[t++]=n.compression>>8;var f=new Date(n.mtime==null?Date.now():n.mtime),p=f.getFullYear()-1980;if((p<0||p>119)&&pt(10),at(e,t,p<<25|f.getMonth()+1<<21|f.getDate()<<16|f.getHours()<<11|f.getMinutes()<<5|f.getSeconds()>>1),t+=4,o!=-1&&(at(e,t,n.crc),at(e,t+4,o<0?-o-2:o),at(e,t+8,n.size)),at(e,t+12,c),at(e,t+14,d),t+=16,a!=null&&(at(e,t,l),at(e,t+6,n.attrs),at(e,t+10,a),t+=14),e.set(i,t),t+=c,d)for(var m in u){var h=u[m],g=h.length;at(e,t,+m),at(e,t+2,g),e.set(h,t+4),t+=4+g}return l&&(e.set(s,t),t+=l),t},uZ=function(e,t,n,i,r){at(e,t,101010256),at(e,t+8,n),at(e,t+10,n),at(e,t+12,i),at(e,t+16,r)};function a$(e,t){t||(t={});var n={},i=[];nP(e,"",n,t);var r=0,o=0;for(var a in n){var s=n[a],c=s[0],u=s[1],l=u.level==0?0:8,d=Gz(a),f=d.length,p=u.comment,m=p&&Gz(p),h=m&&m.length,g=r$(u.extra);f>65535&&pt(11);var _=l?rZ(c,u):c,$=_.length,x=eZ();x.p(c),i.push(rP(u,{size:c.length,crc:x.d(),c:_,f:d,m,u:f!=a.length||m&&p.length!=h,o:r,compression:l})),r+=30+f+g+$,o+=76+2*(f+g)+(h||0)+$}for(var O=new Le(o+22),T=r,C=o-r,G=0;G<i.length;++G){var d=i[G];Wz(O,d.o,d,d.f,d.u,d.c.length);var Q=30+d.f.length+r$(d.extra);O.set(d.c,d.o+Q),Wz(O,r,d,d.f,d.u,d.c.length,d.o,d.m),r+=16+Q+(d.m?d.m.length:0)}return uZ(O,r,i.length,C,T),O}function ea(e,t){for(var n={},i=e.length-22;nr(e,i)!=101010256;--i)(!i||e.length-i>65558)&&pt(13);var r=jr(e,i+8);if(!r)return{};var o=nr(e,i+16),a=nr(e,i-20)==117853008;if(a){var s=nr(e,i-12);a=nr(e,s)==101075792,a&&(r=nr(e,s+32),o=nr(e,s+48))}for(var c=t&&t.filter,u=0;u<r;++u){var l=sZ(e,o,a),d=l[0],f=l[1],p=l[2],m=l[3],h=l[4],g=l[5],_=aZ(e,g);o=h,(!c||c({name:m,size:f,originalSize:p,compression:d}))&&(d?d==8?n[m]=nZ(e.subarray(_,_+f),{out:new Le(p)}):pt(14,"unknown compression type "+d):n[m]=Sc(e,_,_+f))}return n}var s$={hogwartsmp:"mafiahub",kcdc:"mafiahub"},Pn=e=>s$[e]??e;var iP=/\.(ts|tsx|mts|cts|map)$/i,gp=/(^|\/)(\.env(\.[^/]+)?|server\.env|latch\.env)$/i,lZ=/\.(c?js|json)$/i,dZ=/\.c?js$/i,fZ=/\.(node|exe|dll|so|dylib|bat|cmd|ps1|sh|vbs|jar|msi|scr|com)$/i;function pZ(e,t){let n=0,i=0,r=-1,o=0;for(;i<t.length;)if(n<e.length&&e[n]!=="*"&&e[n]===t[i])n++,i++;else if(n<e.length&&e[n]==="*")r=n++,o=i;else if(r!==-1)n=r+1,i=++o;else return!1;for(;n<e.length&&e[n]==="*";)n++;return n===e.length}function zc(e,t){return e.some(n=>n===t?!0:n.endsWith("/**")?t.startsWith(n.slice(0,-2)):n.endsWith("/*")?t.startsWith(n.slice(0,-1))&&!t.slice(n.length-1).includes("/"):n.includes("*")?pZ(n,t):!1)}var Ic=e=>Array.isArray(e)?e.map(String):e?[String(e)]:[];function ta(e){let t=new Set(e.map(n=>n.includes("/")?n.split("/")[0]:""));return t.size===1&&!t.has("")?`${[...t][0]}/`:""}var mZ=e=>!!(e&&typeof e=="object"&&e.mafiahub&&typeof e.mafiahub=="object"),hZ=(e,t=[])=>[...new Set([...Ic(e?.latch?.ignore),...t])],gZ=(e,t)=>typeof t=="boolean"?t:e?.latch?.obfuscateClient!==!1;function vZ(e,t,n={}){let i=t.mafiahub,r=Ic(i.serverScripts??i.server),o=new Set([...Ic(i.clientScripts??i.client),...Ic(i.sharedScripts)]),a=Ic(i.files??i.clientFiles),s=hZ(t,n.keepReadable),c=gZ(t,n.obfuscateClient),u=[],l=[];r.length||u.push({code:"noServerScripts"});let d=e.map(f=>iP.test(f)||gp.test(f)?{name:f,kind:"removed"}:f==="package.json"?{name:f,kind:"manifest"}:(fZ.test(f)&&l.push({code:"binary",file:f}),f.startsWith("node_modules/")?{name:f,kind:"readable",why:"dependency"}:o.has(f)||zc(a,f)?{name:f,kind:"client",obfuscated:c&&dZ.test(f)}:lZ.test(f)?zc(s,f)&&!r.includes(f)?{name:f,kind:"readable",why:"kept"}:{name:f,kind:"encrypted",entry:r.includes(f),keepable:!r.includes(f)}:{name:f,kind:"readable",why:"asset"}));for(let f of r){let p=d.find(m=>m.name===f);p?p.kind!=="encrypted"&&u.push({code:"serverScriptShipped",file:f}):u.push({code:"serverScriptMissing",file:f})}for(let f of s)r.some(p=>zc([f],p))&&l.push({code:"entryNotReadable",file:f});return{rows:d,errors:u,warnings:l,serverScripts:r,obfuscate:c}}var yZ=e=>!!(e&&typeof e=="object"&&typeof e.Main=="string"&&!e.mafiahub),_Z=/^[A-Za-z_$][\w$]*(\.[A-Za-z_$][\w$]*)+$/;function $Z(e,t){let n=[],i=[],r=typeof t?.Main=="string"?t.Main:null;r?_Z.test(r)||n.push({code:"badMain",file:r}):n.push({code:"noMain"});let o=e.map(a=>a==="manifest.json"?{name:a,kind:"manifest"}:iP.test(a)||gp.test(a)||a.endsWith(".java")?{name:a,kind:"removed"}:{name:a,kind:"encrypted",entry:r!=null&&a===r.replace(/\./g,"/")+".class"});return o.some(a=>a.kind==="encrypted"&&a.name.endsWith(".class"))||n.push({code:"noClasses"}),r&&!e.includes(r.replace(/\./g,"/")+".class")&&i.push({code:"mainClassMissing",file:r}),{rows:o,errors:n,warnings:i,realMain:r}}function oP(e,t={}){let n=Object.keys(e).filter(u=>!u.startsWith("__MACOSX/")&&!u.endsWith(".DS_Store")),i=ta(n),r=n.map(u=>u.slice(i.length)),o=u=>new TextDecoder().decode(u),a=e[`${i}package.json`],s=e[`${i}manifest.json`];if(t.ecosystem==="hytale"||!a&&s){if(!s)return{error:"noManifest",names:r,hytale:!0};let u;try{u=JSON.parse(o(s))}catch{return{error:"badManifest",names:r,hytale:!0}}return yZ(u)?{manifest:u,names:r,hytale:!0,plan:$Z(r,u)}:{error:"noHytaleMain",names:r,hytale:!0,manifest:u}}if(!a)return{error:"noManifest",names:r};let c;try{c=JSON.parse(o(a))}catch{return{error:"badManifest",names:r}}return mZ(c)?{pkg:c,names:r,plan:vZ(r,c,t)}:{error:"noMafiahub",names:r,pkg:c}}var aP=e=>!!(e?.error||e?.plan?.errors.length);var IZ=100*1024*1024,zZ=300*1024*1024,u$=6e3,PZ=e=>e===".git"||e===".DS_Store"||e==="__MACOSX"||e==="Thumbs.db"||/^(\.env(\..+)?|server\.env|latch\.env)$/.test(e),TZ=/^\s*(?:import\s+(?:[\w*{][^'"\n]*from\s+)?['"]|export\s+(?:default\b|const\b|let\b|var\b|function\b|class\b|async\b|\{|\*))/m;function OZ(e,t){let n=ta(Object.keys(e)),i=new TextDecoder;return(t.plan?.rows??[]).filter(r=>r.kind==="encrypted"&&/\.c?js$/i.test(r.name)&&TZ.test(i.decode(e[`${n}${r.name}`]??new Uint8Array))).map(r=>r.name)}function jZ(e){let t=ta(e);return e.includes(`${t}latch.json`)&&e.includes(`${t}server.latch`)}async function lP(e,t,n,i){for(let r of await bZ(t,{withFileTypes:!0})){let o=kZ(t,r.name),a=xZ(e,o).split(SZ).join("/");if(PZ(r.name)){i.push(a);continue}if(r.isSymbolicLink())i.push(a);else if(r.isDirectory())await lP(e,o,n,i);else if(r.isFile()&&(n[a]=new Uint8Array(await uP(o)),Object.keys(n).length>u$))throw new V("tooLarge",`The folder has more than ${u$} files.`)}}async function Tn(e,t={}){let n;try{n=await wZ(e)}catch{throw new V("notFound",`Nothing found at ${e}.`)}let i,r,o=[];if(n.isDirectory()){if(i={},await lP(e,e,i,o),!Object.keys(i).length)throw new V("emptyPackage",`${e} is empty.`);r=a$(i,{level:6})}else if(/\.(zip|jar)$/i.test(e)){r=new Uint8Array(await uP(e));try{i=Object.fromEntries(Object.entries(ea(r)).map(([u,l])=>[u.replace(/\\/g,"/"),l]).filter(([u])=>!u.endsWith("/")))}catch{throw new V("invalidArchive",`${e} isn't a valid zip archive.`)}let c=Object.keys(i).filter(u=>gp.test(u));if(c.length){for(let u of c)delete i[u];o.push(...c),r=a$(i,{level:6})}}else throw new V("unsupported","Pass a folder, a .zip or a .jar. Convert .rar/.7z archives to .zip first.");let a=Object.values(i).reduce((c,u)=>c+u.byteLength,0);if(r.byteLength>IZ)throw new V("tooLarge",`The package is ${EZ(r.byteLength)}; the limit is 100 MB.`);if(a>zZ||Object.keys(i).length>u$)throw new V("tooLarge","The package is too large once extracted (max 300 MB and 6,000 files).");let s=oP(i,t);return{bytes:r,fileName:n.isDirectory()?`${sP(e)}.zip`:sP(e),files:Object.keys(i).length,skipped:o,ecosystem:s.hytale?"hytale":null,alreadyProtected:jZ(Object.keys(i)),esModules:s.hytale?[]:OZ(i,s),preview:s}}var EZ=e=>`${(e/1024/1024).toFixed(1)} MB`,Gr=e=>typeof e=="string"&&e.trim()?e.trim():void 0,cP=e=>{let t=Gr(e);return t&&t.replace(/^@[^/]+\//,"").toLowerCase().replace(/[^a-z0-9-]+/g,"-").replace(/^-+|-+$/g,"").slice(0,40)||void 0};function vp(e){let t=e.preview;if(e.ecosystem==="hytale"){let r=t.manifest??{};return{script:cP(r.Name),version:Gr(r.Version),name:Gr(r.Name)?.slice(0,60),description:Gr(r.Description),ecosystem:"hytale"}}let n=t.pkg??{},i=n.latch??{};return{script:cP(i.script??n.name),version:Gr(n.version),name:Gr(i.name??n.name)?.slice(0,60),description:Gr(n.description),ecosystem:Pn(Gr(i.ecosystem)),category:Gr(i.category),tags:Array.isArray(i.tags)?i.tags.map(String):void 0}}function On(e){let t=e.preview,n=t.plan?.rows??[],i=r=>n.filter(o=>o.kind===r).length;return{ok:!aP(t)&&!e.alreadyProtected,fileName:e.fileName,size:e.bytes.byteLength,files:e.files,ecosystem:e.ecosystem??"mafiahub",error:e.alreadyProtected?l$.alreadyProtected:t.error?l$[t.error]??t.error:null,errors:(t.plan?.errors??[]).map(r=>c$(r)),warnings:[...(t.plan?.warnings??[]).map(r=>c$(r)),...e.esModules.map(r=>c$({code:"esModule",file:r}))],counts:{encrypted:i("encrypted"),sentToPlayers:i("client"),readable:i("readable"),leftOut:i("removed")},skipped:e.skipped,rows:n.filter(r=>r.kind!=="manifest").map(r=>({file:r.name,result:r.kind==="client"?r.obfuscated?"obfuscated":"sent as is":r.kind}))}}var l$={alreadyProtected:"This is already a protected Latch package. Publish the original resource, not the downloaded copy.",esModule:"{file} uses ES module syntax (import/export), which won't run once encrypted. Compile server code to CommonJS.",noManifest:"There's no package.json (or manifest.json for a Hytale plugin) at the root.",badManifest:"The manifest isn't valid JSON.",noMafiahub:'package.json has no "mafiahub" block.',noHytaleMain:`manifest.json has no "Main" field, so this isn't a Hytale plugin.`,noServerScripts:`"mafiahub.serverScripts" is empty, so there's nothing to protect.`,serverScriptMissing:"{file} is listed in serverScripts but isn't in the package.",serverScriptShipped:"{file} is a server script but is also listed for players (clientScripts, sharedScripts or files).",binary:"{file} is a program or native file. The team reviews packages that contain these.",entryNotReadable:'"{file}" in latch.ignore matches a server script. Server scripts always stay encrypted.',noMain:'manifest.json has no "Main" field.',badMain:`"Main" ({file}) isn't a valid class name.`,noClasses:"The .jar has no .class files to protect.",mainClassMissing:"The Main class {file} isn't in the .jar."},c$=e=>(l$[e.code]??e.code).replace("{file}",e.file??"");import{readdir as NZ,stat as pP}from"node:fs/promises";import{basename as Tc,join as mP}from"node:path";var d$=["gameplay","economy","vehicles","ui","world","admin","other"],Pc=["mafiahub","hytale"],f$=/^\d+\.\d+\.\d+$/;async function ra(e,t){let n=t.onProgress??(()=>{}),i={keepReadable:t.keepReadable??[],...t.obfuscateClient===void 0?{}:{obfuscateClient:t.obfuscateClient}};n(`Reading ${t.path}`);let r=await Tn(t.path,i),o=On(r);if(!o.ok){let m=[o.error,...o.errors].filter(Boolean).join(`
|
|
79
|
-
- `);throw new
|
|
80
|
-
- ${m}`)}let a=vp(r),s=t.script??a.script,c=t.version??a.version;if(!s)throw new V("usage","Couldn't tell the script's name from the manifest. Pass it with --script.");if(!c)throw new V("usage","The manifest has no version. Add one or pass --version.");if(!f$.test(c))throw new V("badVersion",`Version "${c}" isn't in the form 1.2.0.`);let u=await e.getScript(s).catch(m=>{if(m instanceof V&&m.code==="notFound")return null;throw m}),l={version:c,changelog:t.changelog??"",...i},d,f=!1;if(u)n(`Creating version ${c} of ${u.slug}`),d=(await e.createVersion(u.slug,l)).upload;else{let m=t.create?.name??a.name,h=t.create?.description??a.description??m,g=t.create?.ecosystem??a.ecosystem,_=g&&Pn(g);if(!m||!h||!_){let $=[!m&&"a name",!_&&`an ecosystem (${Pc.join(", ")})`].filter(Boolean).join(" and ");throw new V("scriptNotFound",`There's no script "${s}" in this workspace. To create it, also give ${$}.`)}n(`Creating script ${s}`),d=(await e.createScript({slug:s,name:m,description:h,ecosystem:_,category:t.create?.category??a.category??"other",tags:t.create?.tags??a.tags??[],...l})).upload,f=!0}if(!d)throw new V("generic","The API didn't return an upload link.");if(n(`Uploading ${r.fileName} (${(r.bytes.byteLength/1024).toFixed(0)} KB)`),await e.upload(d.url,r.bytes),t.draft)return{script:s,created:f,version:await e.getVersion(s,c),preview:o};n("Publishing");let p=await e.publishVersion(s,c);if(t.wait!==!1){n("Waiting for the build");let m=Date.now()+(t.timeoutMs??5*6e4);for(;p.status==="processing"&&Date.now()<m;)await new Promise(h=>setTimeout(h,t.pollMs??2e3)),p=await e.getVersion(s,c)}return{script:s,created:f,version:p,preview:o}}var AZ=async e=>{for(let t of["package.json","manifest.json"])if(await pP(mP(e,t)).catch(()=>null))return!0;return!1};async function DZ(e){let t;try{t=await NZ(e)}catch{throw new V("notFound",`Couldn't read the folder ${e}.`)}let n=[];for(let i of t.sort()){if(i.startsWith(".")||i==="node_modules")continue;let r=mP(e,i),o=await pP(r).catch(()=>null);(o?.isDirectory()?await AZ(r):o?.isFile()&&/\.(zip|jar)$/i.test(i))&&n.push(r)}return n}var dP=(e,t)=>{let[n,i]=[e,t].map(r=>r.split(".").map(Number));for(let r=0;r<3;r++)if(n[r]!==i[r])return n[r]-i[r];return 0};async function RZ(e,t,n){let i;try{i=await Tn(t)}catch(d){return{path:t,script:null,version:null,outcome:"failed",detail:d.message}}let r=i.preview,o=vp(i),a={path:t,script:o.script??null,version:o.version??null};if(i.alreadyProtected)return{...a,outcome:"skipped",detail:"already a protected package"};if(r.error==="noMafiahub"||r.error==="noHytaleMain")return{...a,outcome:"skipped",detail:"not a resource Latch can protect (no mafiahub block or Main class)"};if(r.plan?.errors.some(d=>d.code==="noServerScripts"))return{...a,outcome:"skipped",detail:"no server code; install it as it is"};let s=On(i);if(!s.ok)return{...a,outcome:"failed",detail:[s.error,...s.errors].filter(Boolean).join("; ")};if(!o.script)return{...a,outcome:"failed",detail:'the manifest has no usable name; set "latch.script"'};if(!o.version||!f$.test(o.version))return{...a,outcome:"failed",detail:`the manifest needs a version like 1.2.0 (found "${o.version??""}")`};let c=await e.getScript(o.script).catch(d=>{if(d instanceof V&&d.code==="notFound")return null;throw d});if(!c)return n.ecosystem??o.ecosystem?{...a,outcome:"would-create",isNew:!0}:{...a,outcome:"failed",detail:'new script without an ecosystem; pass --ecosystem or set "latch.ecosystem"'};let u=c.versions.find(d=>d.version===o.version);if(u?.status==="ready"||u?.status==="processing")return{...a,outcome:"unchanged",detail:"this version is already published; raise the version to publish changes"};if(u)return{...a,outcome:"failed",detail:`version ${u.version} exists as ${u.status}; raise the version`};let l=c.versions.map(d=>d.version).sort(dP).at(-1);return l&&dP(o.version,l)<0?{...a,outcome:"failed",detail:`version is lower than ${l}`}:{...a,outcome:"would-update"}}var fP=e=>e.reduce((t,n)=>({...t,[n.outcome]:(t[n.outcome]??0)+1}),{});async function yp(e,t){let n=t.onProgress??(()=>{}),i=p=>{let m=[Tc(p),Tc(p).replace(/\.(zip|jar)$/i,"")];return t.only?.length&&!t.only.some(h=>m.includes(h))?!1:!t.skip?.some(h=>m.includes(h))},r=(await DZ(t.dir)).filter(p=>i(p));if(!r.length)throw new V("notFound",`No resources found in ${t.dir}.`);n(`Checking ${r.length} resources`);let o=[];for(let p of r)o.push(await RZ(e,p,t));let a=p=>p==="would-create"||p==="would-update"||p==="unchanged";for(let p of o){if(!p.script||!a(p.outcome))continue;let m=o.filter(g=>g!==p&&g.script===p.script).map(g=>Tc(g.path));if(m.length){p.outcome="failed",p.isNew=!1,p.detail=`publishes to the same script as ${m.join(", ")}; set a different "latch.script"`;continue}Tc(p.path).replace(/\.(zip|jar)$/i,"")!==p.script&&p.outcome!=="unchanged"&&(p.detail=`${p.detail?`${p.detail}; `:""}from ${Tc(p.path)}, the manifest names this script`)}let s=o.filter(p=>p.isNew).length,{plan:c,usage:u}=await e.workspace(),l=u.limit===null?1/0:Math.max(u.limit-u.scripts,0),d=s>l?`This would create ${s} new scripts, but the ${c} plan has room for ${l} more (${u.scripts}/${u.limit} used). Upgrade the plan, or choose what to protect with --only or --skip.`:null,f=o.map(({isNew:p,...m})=>m);if(t.dryRun)return{dryRun:!0,blocked:d,results:f,counts:fP(f)};if(d)throw new V("planLimit",d);for(let p of f){if(p.outcome!=="would-create"&&p.outcome!=="would-update")continue;let m=p.outcome==="would-create";n(`${m?"Creating":"Updating"} ${p.script} ${p.version}`);try{let h=await ra(e,{path:p.path,changelog:t.changelog,pollMs:t.pollMs,create:{ecosystem:t.ecosystem,category:t.category}});h.version.status==="ready"?p.outcome=m?"created":"updated":(p.outcome="failed",p.detail=h.version.buildError??`the build is still ${h.version.status}`)}catch(h){p.outcome="failed",p.detail=h.message}}return{dryRun:!1,blocked:null,results:f,counts:fP(f)}}import{lstat as CZ,mkdir as hP,readdir as _P,readFile as _p,realpath as gP,rename as UZ,stat as ZZ,writeFile as $P}from"node:fs/promises";import{dirname as p$,join as di,resolve as MZ,sep as LZ}from"node:path";async function VZ(e,t,n){if(e.kind==="account"){let o=(n??await e.library()).find(a=>a.script.slug===t||a.script.id===t);if(!o)throw new V("noAccess",`${t} isn't in your Library. Ask the developer to give your account access.`);if(o.status!=="active"&&!o.own)throw new V("noAccess",`Your access to ${o.script.slug} was revoked.`);return{id:o.script.id,slug:o.script.slug,latestVersion:o.script.latestVersion,download:a=>e.downloadLibrary(o.script.slug,a)}}let i=await e.getScript(t);return{id:i.id,slug:i.slug,latestVersion:i.latestVersion,download:r=>e.downloadVersion(i.slug,r)}}var vP=e=>{try{return JSON.parse(e)}catch{return null}};async function FZ(e,t){let n=di(e,`${t.slug}.jar`);try{let i=ea(new Uint8Array(await _p(n)),{filter:o=>o.name==="latch.json"}),r=i["latch.json"]&&vP(o$(i["latch.json"]));if(t.id&&r?.scriptId===t.id&&r.version)return{version:r.version,path:n}}catch{}for(let i of await _P(e,{withFileTypes:!0}).catch(()=>[])){if(!i.isDirectory())continue;let r=vP(await _p(di(e,i.name,"latch.json"),"utf8").catch(()=>""));if(t.id&&r?.scriptId===t.id&&r.version)return{version:r.version,path:di(e,i.name)}}return null}async function m$(e){let t=await CZ(e).catch(()=>null);if(t?.isSymbolicLink())throw new V("linkedTarget",`${e} is a link to another folder, probably your source. Latch won't write through it. Use a separate server folder, or remove the link first.`);return t}var h$=e=>new V("notLatchFolder",`${e} exists but isn't a Latch package, so it may be your source. Install into a server folder, or pass --force to overwrite it.`);function qZ(e){let t=e.split("/");if(e.includes("\\")||e.startsWith("/")||/^[A-Za-z]:/.test(e)||t.includes("..")||t.includes("."))throw new V("badPackage",`The package has an unsafe path: ${e}`);return e}async function yP(e){if(process.env.LATCH_LICENSE||process.env.LATCH_KEY)return"found";let t=e;for(let n=0;n<6;n++){for(let r of[".env","server.env","latch.env"]){let o=await _p(di(t,r),"utf8").catch(()=>"");if(/^\s*LATCH_(LICENSE|KEY)\s*=\s*\S/m.test(o))return"found"}let i=p$(t);if(i===t)break;t=i}return"missing"}async function BZ(e,t,n){let i=await m$(t);if(i&&!n){let o=!1;try{o="latch.json"in ea(new Uint8Array(await _p(t)))}catch{}if(!o)throw h$(t)}let r=`${t}.tmp`;return await $P(r,e),await UZ(r,t),{path:t,files:1,updated:!!i,kept:[]}}async function HZ(e,t,n,i,r=[]){let o=Object.entries(ea(e)).filter(([f])=>!f.endsWith("/"));for(let[f]of o)qZ(f);let a=ta(o.map(([f])=>f)),s=di(t,a?a.slice(0,-1):n),c=await m$(s);if(c&&!c.isDirectory())throw h$(s);let u=!1;if(c){let f=await _P(s);if(u=f.includes("latch.json"),f.length&&!u&&!i)throw h$(s)}await hP(s,{recursive:!0});let l=await gP(s),d=[];for(let[f,p]of o){let m=f.slice(a.length),h=di(s,m);if(await m$(h)&&zc(r,m)){d.push(m);continue}await hP(p$(h),{recursive:!0});let _=await gP(p$(h));if(_!==l&&!_.startsWith(l+LZ))throw new V("linkedTarget",`${h} goes through a link outside the resource. Latch won't write through it.`);await $P(h,p)}return{path:s,files:o.length-d.length,updated:u,kept:d}}async function Oc(e,t){let n=t.onProgress??(()=>{}),i=MZ(t.to);if(!(await ZZ(i).catch(()=>null))?.isDirectory())throw new V("notFound",`The folder ${i} doesn't exist.`);let r=await VZ(e,t.script,t.library),o=t.version??r.latestVersion;if(!o)throw new V("notReady",`${r.slug} has no published version yet.`);let a=await FZ(i,r);if(a?.version===o&&!t.force)return n(`${r.slug} ${o} is already installed`),{script:r.slug,version:o,path:a.path,files:0,updated:!1,upToDate:!0,kept:[],license:await yP(i)};n(`Downloading ${r.slug} ${o}`);let{fileName:s,url:c}=await r.download(o),u=await e.fetchPackage(c),l=s.endsWith(".jar")?await BZ(u,di(i,`${r.slug}.jar`),t.force):await HZ(u,i,r.slug,t.force,t.keep);return{script:r.slug,version:o,...l,license:await yP(i)}}async function bP(e,t,n){let i=n.ecosystem&&Pn(n.ecosystem),r=e.kind==="account"?await e.library():void 0,o=t!=="all"?t:r?r.filter(s=>(s.status==="active"||s.own)&&s.script.latestVersion&&(!i||s.script.ecosystem===i)).map(s=>s.script.slug):(await e.listScripts()).filter(s=>s.latestVersion&&(!i||s.ecosystem===i)).map(s=>s.slug);if(!o.length)throw new V("notFound","No published scripts to install.");let a=[];for(let s of o)try{a.push(await Oc(e,{...n,script:s,library:r}))}catch(c){let u=c instanceof V?c:new V("generic",c.message);a.push({script:s,error:{code:u.code,message:u.message}})}return{results:a}}var JZ=`Latch protects and licenses game server scripts (MafiaHub resources for Arcane MP, Kingdoms Connected, Mafia 2 Online and Fallout MP, and Hytale plugins). Developers upload a package; Latch encrypts the server code and the script only runs on servers whose owners were granted access by account ID (like LA-7K2M-9QXD).
|
|
76
|
+
]`;continue}r+=i[c],i[c]==="\\"?o=!0:a&&i[c]==="]"?a=!1:!a&&i[c]==="["&&(a=!0)}try{new RegExp(r)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return r}function If(e,t){if(t.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),t.target==="openApi3"&&e.keyType?._def.typeName===P.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((i,r)=>({...i,[r]:K(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",r]})??Ce(t)}),{}),additionalProperties:t.rejectedAdditionalProperties};let n={type:"object",additionalProperties:K(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if(t.target==="openApi3")return n;if(e.keyType?._def.typeName===P.ZodString&&e.keyType._def.checks?.length){let{type:i,...r}=Sf(e.keyType._def,t);return{...n,propertyNames:r}}else{if(e.keyType?._def.typeName===P.ZodEnum)return{...n,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===P.ZodBranded&&e.keyType._def.type._def.typeName===P.ZodString&&e.keyType._def.type._def.checks?.length){let{type:i,...r}=kf(e.keyType._def,t);return{...n,propertyNames:r}}}return n}function h0(e,t){if(t.mapStrategy==="record")return If(e,t);let n=K(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||Ce(t),i=K(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||Ce(t);return{type:"array",maxItems:125,items:{type:"array",items:[n,i],minItems:2,maxItems:2}}}function g0(e){let t=e.values,i=Object.keys(e.values).filter(o=>typeof t[t[o]]!="number").map(o=>t[o]),r=Array.from(new Set(i.map(o=>typeof o)));return{type:r.length===1?r[0]==="string"?"string":"number":["string","number"],enum:i}}function v0(e){return e.target==="openAi"?void 0:{not:Ce({...e,currentPath:[...e.currentPath,"not"]})}}function y0(e){return e.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var Ks={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function $0(e,t){if(t.target==="openApi3")return _0(e,t);let n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every(i=>i._def.typeName in Ks&&(!i._def.checks||!i._def.checks.length))){let i=n.reduce((r,o)=>{let a=Ks[o._def.typeName];return a&&!r.includes(a)?[...r,a]:r},[]);return{type:i.length>1?i:i[0]}}else if(n.every(i=>i._def.typeName==="ZodLiteral"&&!i.description)){let i=n.reduce((r,o)=>{let a=typeof o._def.value;switch(a){case"string":case"number":case"boolean":return[...r,a];case"bigint":return[...r,"integer"];case"object":if(o._def.value===null)return[...r,"null"];default:return r}},[]);if(i.length===n.length){let r=i.filter((o,a,s)=>s.indexOf(o)===a);return{type:r.length>1?r:r[0],enum:n.reduce((o,a)=>o.includes(a._def.value)?o:[...o,a._def.value],[])}}}else if(n.every(i=>i._def.typeName==="ZodEnum"))return{type:"string",enum:n.reduce((i,r)=>[...i,...r._def.values.filter(o=>!i.includes(o))],[])};return _0(e,t)}var _0=(e,t)=>{let n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((i,r)=>K(i._def,{...t,currentPath:[...t.currentPath,"anyOf",`${r}`]})).filter(i=>!!i&&(!t.strictUnions||typeof i=="object"&&Object.keys(i).length>0));return n.length?{anyOf:n}:void 0};function b0(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return t.target==="openApi3"?{type:Ks[e.innerType._def.typeName],nullable:!0}:{type:[Ks[e.innerType._def.typeName],"null"]};if(t.target==="openApi3"){let i=K(e.innerType._def,{...t,currentPath:[...t.currentPath]});return i&&"$ref"in i?{allOf:[i],nullable:!0}:i&&{...i,nullable:!0}}let n=K(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return n&&{anyOf:[n,{type:"null"}]}}function w0(e,t){let n={type:"number"};if(!e.checks)return n;for(let i of e.checks)switch(i.kind){case"int":n.type="integer",Vv(n,"type",i.message,t);break;case"min":t.target==="jsonSchema7"?i.inclusive?de(n,"minimum",i.value,i.message,t):de(n,"exclusiveMinimum",i.value,i.message,t):(i.inclusive||(n.exclusiveMinimum=!0),de(n,"minimum",i.value,i.message,t));break;case"max":t.target==="jsonSchema7"?i.inclusive?de(n,"maximum",i.value,i.message,t):de(n,"exclusiveMaximum",i.value,i.message,t):(i.inclusive||(n.exclusiveMaximum=!0),de(n,"maximum",i.value,i.message,t));break;case"multipleOf":de(n,"multipleOf",i.value,i.message,t);break}return n}function x0(e,t){let n=t.target==="openAi",i={type:"object",properties:{}},r=[],o=e.shape();for(let s in o){let c=o[s];if(c===void 0||c._def===void 0)continue;let u=wA(c);u&&n&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),u=!1);let l=K(c._def,{...t,currentPath:[...t.currentPath,"properties",s],propertyPath:[...t.currentPath,"properties",s]});l!==void 0&&(i.properties[s]=l,u||r.push(s))}r.length&&(i.required=r);let a=bA(e,t);return a!==void 0&&(i.additionalProperties=a),i}function bA(e,t){if(e.catchall._def.typeName!=="ZodNever")return K(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function wA(e){try{return e.isOptional()}catch{return!0}}var k0=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return K(e.innerType._def,t);let n=K(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return n?{anyOf:[{not:Ce(t)},n]}:Ce(t)};var S0=(e,t)=>{if(t.pipeStrategy==="input")return K(e.in._def,t);if(t.pipeStrategy==="output")return K(e.out._def,t);let n=K(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),i=K(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",n?"1":"0"]});return{allOf:[n,i].filter(r=>r!==void 0)}};function I0(e,t){return K(e.type._def,t)}function z0(e,t){let i={type:"array",uniqueItems:!0,items:K(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&de(i,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&de(i,"maxItems",e.maxSize.value,e.maxSize.message,t),i}function P0(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((n,i)=>K(n._def,{...t,currentPath:[...t.currentPath,"items",`${i}`]})).reduce((n,i)=>i===void 0?n:[...n,i],[]),additionalItems:K(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((n,i)=>K(n._def,{...t,currentPath:[...t.currentPath,"items",`${i}`]})).reduce((n,i)=>i===void 0?n:[...n,i],[])}}function T0(e){return{not:Ce(e)}}function E0(e){return Ce(e)}var O0=(e,t)=>K(e.innerType._def,t);var j0=(e,t,n)=>{switch(t){case P.ZodString:return Sf(e,n);case P.ZodNumber:return w0(e,n);case P.ZodObject:return x0(e,n);case P.ZodBigInt:return a0(e,n);case P.ZodBoolean:return s0();case P.ZodDate:return Fv(e,n);case P.ZodUndefined:return T0(n);case P.ZodNull:return y0(n);case P.ZodArray:return o0(e,n);case P.ZodUnion:case P.ZodDiscriminatedUnion:return $0(e,n);case P.ZodIntersection:return f0(e,n);case P.ZodTuple:return P0(e,n);case P.ZodRecord:return If(e,n);case P.ZodLiteral:return p0(e,n);case P.ZodEnum:return d0(e);case P.ZodNativeEnum:return g0(e);case P.ZodNullable:return b0(e,n);case P.ZodOptional:return k0(e,n);case P.ZodMap:return h0(e,n);case P.ZodSet:return z0(e,n);case P.ZodLazy:return()=>e.getter()._def;case P.ZodPromise:return I0(e,n);case P.ZodNaN:case P.ZodNever:return v0(n);case P.ZodEffects:return l0(e,n);case P.ZodAny:return Ce(n);case P.ZodUnknown:return E0(n);case P.ZodDefault:return u0(e,n);case P.ZodBranded:return kf(e,n);case P.ZodReadonly:return O0(e,n);case P.ZodCatch:return c0(e,n);case P.ZodPipeline:return S0(e,n);case P.ZodFunction:case P.ZodVoid:case P.ZodSymbol:return;default:return(i=>{})(t)}};function K(e,t,n=!1){let i=t.seen.get(e);if(t.override){let s=t.override?.(e,t,i,n);if(s!==r0)return s}if(i&&!n){let s=xA(i,t);if(s!==void 0)return s}let r={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,r);let o=j0(e,e.typeName,t),a=typeof o=="function"?K(o(),t):o;if(a&&kA(e,t,a),t.postProcess){let s=t.postProcess(a,e,t);return r.jsonSchema=a,s}return r.jsonSchema=a,a}var xA=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:xf(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((n,i)=>t.currentPath[i]===n)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),Ce(t)):t.$refStrategy==="seen"?Ce(t):void 0}},kA=(e,t,n)=>(e.description&&(n.description=e.description,t.markdownDescription&&(n.markdownDescription=e.description)),n);var Hv=(e,t)=>{let n=i0(t),i=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[u,l])=>({...c,[u]:K(l._def,{...n,currentPath:[...n.basePath,n.definitionPath,u]},!0)??Ce(n)}),{}):void 0,r=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,o=K(e._def,r===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,r]},!1)??Ce(n),a=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;a!==void 0&&(o.title=a),n.flags.hasReferencedOpenAiAnyType&&(i||(i={}),i[n.openAiAnyTypeName]||(i[n.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:n.$refStrategy==="relative"?"1":[...n.basePath,n.definitionPath,n.openAiAnyTypeName].join("/")}}));let s=r===void 0?i?{...o,[n.definitionPath]:i}:o:{$ref:[...n.$refStrategy==="relative"?[]:n.basePath,n.definitionPath,r].join("/"),[n.definitionPath]:{...i,[r]:o}};return n.target==="jsonSchema7"?s.$schema="http://json-schema.org/draft-07/schema#":(n.target==="jsonSchema2019-09"||n.target==="openAi")&&(s.$schema="https://json-schema.org/draft/2019-09/schema#"),n.target==="openAi"&&("anyOf"in s||"oneOf"in s||"allOf"in s||"type"in s&&Array.isArray(s.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),s};function SA(e){return!e||e==="jsonSchema7"||e==="draft-7"?"draft-7":e==="jsonSchema2019-09"||e==="draft-2020-12"?"draft-2020-12":"draft-7"}function Jv(e,t){return kr(e)?Jn(e,{target:SA(t?.target),io:t?.pipeStrategy??"input"}):Hv(e,{strictUnions:t?.strictUnions??!0,pipeStrategy:t?.pipeStrategy??"input"})}function Kv(e){let n=fn(e)?.method;if(!n)throw new Error("Schema is missing a method literal");let i=ko(n);if(typeof i!="string")throw new Error("Schema method literal must be a string");return i}function Gv(e,t){let n=dn(e,t);if(!n.success)throw n.error;return n.data}var IA=6e4,zf=class{constructor(t){this._options=t,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(af,n=>{this._oncancel(n)}),this.setNotificationHandler(cf,n=>{this._onprogress(n)}),this.setRequestHandler(sf,n=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(uf,async(n,i)=>{let r=await this._taskStore.getTask(n.params.taskId,i.sessionId);if(!r)throw new Z(F.InvalidParams,"Failed to retrieve task: Task not found");return{...r}}),this.setRequestHandler(df,async(n,i)=>{let r=async()=>{let o=n.params.taskId;if(!await this._taskStore.getTask(o,i.sessionId))throw new Z(F.InvalidParams,`Task not found: ${o}`);if(this._taskMessageQueue){let s;for(;s=await this._taskMessageQueue.dequeue(o,i.sessionId);){if(s.type==="response"||s.type==="error"){let c=s.message,u=c.id,l=this._requestResolvers.get(u);if(l)if(this._requestResolvers.delete(u),s.type==="response")l(c);else{let d=c,p=new Z(d.error.code,d.error.message,d.error.data);l(p)}else{let d=s.type==="response"?"Response":"Error";this._onerror(new Error(`${d} handler missing for request ${u}`))}continue}await this._transport?.send(s.message,{relatedRequestId:i.requestId})}}let a=await this._taskStore.getTask(o,i.sessionId);if(!a)throw new Z(F.InvalidParams,`Task not found: ${o}`);if(!yn(a.status))return await this._waitForTaskUpdate(o,i.signal,i.sessionId),await r();if(yn(a.status)){let s=await this._taskStore.getTaskResult(o,i.sessionId);return this._clearTaskQueue(o,i.sessionId),{...s,_meta:{...s._meta,[vn]:{taskId:o}}}}return await r()};return await r()}),this.setRequestHandler(ff,async(n,i)=>{try{let{tasks:r,nextCursor:o}=await this._taskStore.listTasks(n.params?.cursor,i.sessionId);return{tasks:r,nextCursor:o,_meta:{}}}catch(r){throw new Z(F.InvalidParams,`Failed to list tasks: ${r instanceof Error?r.message:String(r)}`)}}),this.setRequestHandler(mf,async(n,i)=>{try{let r=await this._taskStore.getTask(n.params.taskId,i.sessionId);if(!r)throw new Z(F.InvalidParams,`Task not found: ${n.params.taskId}`);if(yn(r.status))throw new Z(F.InvalidParams,`Cannot cancel task in terminal status: ${r.status}`);await this._taskStore.updateTaskStatus(n.params.taskId,"cancelled","Client cancelled task execution.",i.sessionId),this._clearTaskQueue(n.params.taskId,i.sessionId);let o=await this._taskStore.getTask(n.params.taskId,i.sessionId);if(!o)throw new Z(F.InvalidParams,`Task not found after cancellation: ${n.params.taskId}`);return{_meta:{},...o}}catch(r){throw r instanceof Z?r:new Z(F.InvalidRequest,`Failed to cancel task: ${r instanceof Error?r.message:String(r)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,n,i,r,o=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(r,n),startTime:Date.now(),timeout:n,maxTotalTimeout:i,resetTimeoutOnProgress:o,onTimeout:r})}_resetTimeout(t){let n=this._timeoutInfo.get(t);if(!n)return!1;let i=Date.now()-n.startTime;if(n.maxTotalTimeout&&i>=n.maxTotalTimeout)throw this._timeoutInfo.delete(t),Z.fromError(F.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:n.maxTotalTimeout,totalElapsed:i});return clearTimeout(n.timeoutId),n.timeoutId=setTimeout(n.onTimeout,n.timeout),!0}_cleanupTimeout(t){let n=this._timeoutInfo.get(t);n&&(clearTimeout(n.timeoutId),this._timeoutInfo.delete(t))}async connect(t){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=t;let n=this.transport?.onclose;this._transport.onclose=()=>{n?.(),this._onclose()};let i=this.transport?.onerror;this._transport.onerror=o=>{i?.(o),this._onerror(o)};let r=this._transport?.onmessage;this._transport.onmessage=(o,a)=>{r?.(o,a),Zs(o)||qk(o)?this._onresponse(o):Pv(o)?this._onrequest(o,a):Fk(o)?this._onnotification(o):this._onerror(new Error(`Unknown message type: ${JSON.stringify(o)}`))},await this._transport.start()}_onclose(){let t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let i of this._timeoutInfo.values())clearTimeout(i.timeoutId);this._timeoutInfo.clear();for(let i of this._requestHandlerAbortControllers.values())i.abort();this._requestHandlerAbortControllers.clear();let n=Z.fromError(F.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let i of t.values())i(n)}_onerror(t){this.onerror?.(t)}_onnotification(t){let n=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;n!==void 0&&Promise.resolve().then(()=>n(t)).catch(i=>this._onerror(new Error(`Uncaught error in notification handler: ${i}`)))}_onrequest(t,n){let i=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,r=this._transport,o=t.params?._meta?.[vn]?.taskId,a=r?.sessionId,s=this._taskStore,c=!0,u;if(o&&s&&this._taskMessageQueue&&a!==void 0&&(c=!1,u=(async()=>{if(!await s.getTask(o,a))throw new Z(F.InvalidParams,`Task not found: ${o}`);c=!0})()),i===void 0){let m={jsonrpc:"2.0",id:t.id,error:{code:F.MethodNotFound,message:"Method not found"}};if(o&&u){let h={type:"error",message:m,timestamp:Date.now()};u.then(()=>this._enqueueTaskMessage(o,h,a),()=>r?.send(m)).catch(g=>this._onerror(new Error(`Failed to send an error response: ${g}`)))}else o&&this._taskMessageQueue?this._enqueueTaskMessage(o,{type:"error",message:m,timestamp:Date.now()},r?.sessionId).catch(h=>this._onerror(new Error(`Failed to enqueue error response: ${h}`))):r?.send(m).catch(h=>this._onerror(new Error(`Failed to send an error response: ${h}`)));return}let l=new AbortController;this._requestHandlerAbortControllers.set(t.id,l);let d=Mk(t.params)?t.params.task:void 0,p=this._taskStore?this.requestTaskStore(t,r?.sessionId):void 0,f={signal:l.signal,sessionId:r?.sessionId,_meta:t.params?._meta,sendNotification:async m=>{if(l.signal.aborted)return;let h={relatedRequestId:t.id};o&&(h.relatedTask={taskId:o}),await this.notification(m,h)},sendRequest:async(m,h,g)=>{if(l.signal.aborted)throw new Z(F.ConnectionClosed,"Request was cancelled");let _={...g,relatedRequestId:t.id};o&&!_.relatedTask&&(_.relatedTask={taskId:o});let $=_.relatedTask?.taskId??o;return $&&p&&await p.updateTaskStatus($,"input_required"),await this.request(m,h,_)},authInfo:n?.authInfo,requestId:t.id,requestInfo:n?.requestInfo,taskId:o,taskStore:p,taskRequestedTtl:d?.ttl,closeSSEStream:n?.closeSSEStream,closeStandaloneSSEStream:n?.closeStandaloneSSEStream};(u??Promise.resolve()).then(()=>{if(u&&l.signal.aborted)throw new Z(F.ConnectionClosed,"Request was cancelled");d&&this.assertTaskHandlerCapability(t.method)}).then(()=>i(t,f)).then(async m=>{if(l.signal.aborted)return;let h={result:m,jsonrpc:"2.0",id:t.id};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"response",message:h,timestamp:Date.now()},r?.sessionId):await r?.send(h)},async m=>{if(l.signal.aborted)return;let h={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(m.code)?m.code:F.InternalError,message:m.message??"Internal error",...m.data!==void 0&&{data:m.data}}};o&&this._taskMessageQueue&&c?await this._enqueueTaskMessage(o,{type:"error",message:h,timestamp:Date.now()},r?.sessionId):await r?.send(h)}).catch(m=>this._onerror(new Error(`Failed to send response: ${m}`))).finally(()=>{this._requestHandlerAbortControllers.get(t.id)===l&&this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){let{progressToken:n,...i}=t.params,r=Number(n),o=this._progressHandlers.get(r);if(!o){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}let a=this._responseHandlers.get(r),s=this._timeoutInfo.get(r);if(s&&a&&s.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(c){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(c);return}o(i)}_onresponse(t){let n=Number(t.id),i=this._requestResolvers.get(n);if(i){if(this._requestResolvers.delete(n),Zs(t))i(t);else{let a=new Z(t.error.code,t.error.message,t.error.data);i(a)}return}let r=this._responseHandlers.get(n);if(r===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(n),this._cleanupTimeout(n);let o=!1;if(Zs(t)&&t.result&&typeof t.result=="object"){let a=t.result;if(a.task&&typeof a.task=="object"){let s=a.task;typeof s.taskId=="string"&&(o=!0,this._taskProgressTokens.set(s.taskId,n))}}if(o||this._progressHandlers.delete(n),Zs(t))r(t);else{let a=Z.fromError(t.error.code,t.error.message,t.error.data);r(a)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,n,i){let{task:r}=i??{};if(!r){try{yield{type:"result",result:await this.request(t,n,i)}}catch(a){yield{type:"error",error:a instanceof Z?a:new Z(F.InternalError,String(a))}}return}let o;try{let a=await this.request(t,Ao,i);if(a.task)o=a.task.taskId,yield{type:"taskCreated",task:a.task};else throw new Z(F.InternalError,"Task creation did not return a task");for(;;){let s=await this.getTask({taskId:o},i);if(yield{type:"taskStatus",task:s},yn(s.status)){s.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:o},n,i)}:s.status==="failed"?yield{type:"error",error:new Z(F.InternalError,`Task ${o} failed`)}:s.status==="cancelled"&&(yield{type:"error",error:new Z(F.InternalError,`Task ${o} was cancelled`)});return}if(s.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:o},n,i)};return}let c=s.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(u=>setTimeout(u,c)),i?.signal?.throwIfAborted()}}catch(a){yield{type:"error",error:a instanceof Z?a:new Z(F.InternalError,String(a))}}}request(t,n,i){let{relatedRequestId:r,resumptionToken:o,onresumptiontoken:a,task:s,relatedTask:c}=i??{};return new Promise((u,l)=>{let d=$=>{l($)};if(!this._transport){d(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method),s&&this.assertTaskCapability(t.method)}catch($){d($);return}i?.signal?.throwIfAborted();let p=this._requestMessageId++,f={...t,jsonrpc:"2.0",id:p};i?.onprogress&&(this._progressHandlers.set(p,i.onprogress),f.params={...t.params,_meta:{...t.params?._meta||{},progressToken:p}}),s&&(f.params={...f.params,task:s}),c&&(f.params={...f.params,_meta:{...f.params?._meta||{},[vn]:c}});let m=$=>{this._responseHandlers.delete(p),this._progressHandlers.delete(p),this._cleanupTimeout(p),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:p,reason:String($)}},{relatedRequestId:r,resumptionToken:o,onresumptiontoken:a}).catch(E=>this._onerror(new Error(`Failed to send cancellation: ${E}`)));let k=$ instanceof Z?$:new Z(F.RequestTimeout,String($));l(k)};this._responseHandlers.set(p,$=>{if(!i?.signal?.aborted){if($ instanceof Error)return l($);try{let k=dn(n,$.result);k.success?u(k.data):l(k.error)}catch(k){l(k)}}}),i?.signal?.addEventListener("abort",()=>{m(i?.signal?.reason)});let h=i?.timeout??IA,g=()=>m(Z.fromError(F.RequestTimeout,"Request timed out",{timeout:h}));this._setupTimeout(p,h,i?.maxTotalTimeout,g,i?.resetTimeoutOnProgress??!1);let _=c?.taskId;if(_){let $=k=>{let E=this._responseHandlers.get(p);E?E(k):this._onerror(new Error(`Response handler missing for side-channeled request ${p}`))};this._requestResolvers.set(p,$),this._enqueueTaskMessage(_,{type:"request",message:f,timestamp:Date.now()}).catch(k=>{this._cleanupTimeout(p),l(k)})}else this._transport.send(f,{relatedRequestId:r,resumptionToken:o,onresumptiontoken:a}).catch($=>{this._cleanupTimeout(p),l($)})})}async getTask(t,n){return this.request({method:"tasks/get",params:t},lf,n)}async getTaskResult(t,n,i){return this.request({method:"tasks/result",params:t},n,i)}async listTasks(t,n){return this.request({method:"tasks/list",params:t},pf,n)}async cancelTask(t,n){return this.request({method:"tasks/cancel",params:t},Jk,n)}async notification(t,n){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);let i=n?.relatedTask?.taskId;if(i){let s={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[vn]:n.relatedTask}}};await this._enqueueTaskMessage(i,{type:"notification",message:s,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!n?.relatedRequestId&&!n?.relatedTask){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;let s={...t,jsonrpc:"2.0"};n?.relatedTask&&(s={...s,params:{...s.params,_meta:{...s.params?._meta||{},[vn]:n.relatedTask}}}),this._transport?.send(s,n).catch(c=>this._onerror(c))});return}let a={...t,jsonrpc:"2.0"};n?.relatedTask&&(a={...a,params:{...a.params,_meta:{...a.params?._meta||{},[vn]:n.relatedTask}}}),await this._transport.send(a,n)}setRequestHandler(t,n){let i=Kv(t);this.assertRequestHandlerCapability(i),this._requestHandlers.set(i,(r,o)=>{let a=Gv(t,r);return Promise.resolve(n(a,o))})}removeRequestHandler(t){this._requestHandlers.delete(t)}assertCanSetRequestHandler(t){if(this._requestHandlers.has(t))throw new Error(`A request handler for ${t} already exists, which would be overridden`)}setNotificationHandler(t,n){let i=Kv(t);this._notificationHandlers.set(i,r=>{let o=Gv(t,r);return Promise.resolve(n(o))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){let n=this._taskProgressTokens.get(t);n!==void 0&&(this._progressHandlers.delete(n),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,n,i){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,n,i??this._transport?.sessionId,r)}async _clearTaskQueue(t,n){if(this._taskMessageQueue){let i=await this._taskMessageQueue.dequeueAll(t,n);for(let r of i)if(r.type==="request"&&Pv(r.message)){let o=r.message.id,a=this._requestResolvers.get(o);a?(a(new Z(F.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(o)):this._onerror(new Error(`Resolver missing for request ${o} during task ${t} cleanup`))}}}async _waitForTaskUpdate(t,n,i){let r=this._options?.defaultTaskPollInterval??1e3;try{let o=await this._taskStore?.getTask(t,i);o?.pollInterval&&(r=o.pollInterval)}catch{}return new Promise((o,a)=>{if(n.aborted){a(new Z(F.InvalidRequest,"Request cancelled"));return}let s=setTimeout(o,r);n.addEventListener("abort",()=>{clearTimeout(s),a(new Z(F.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,n){let i=this._taskStore;if(!i)throw new Error("No task store configured");return{createTask:async r=>{if(!t)throw new Error("No request provided");return await i.createTask(r,t.id,{method:t.method,params:t.params},n)},getTask:async r=>{let o=await i.getTask(r,n);if(!o)throw new Z(F.InvalidParams,"Failed to retrieve task: Task not found");return o},storeTaskResult:async(r,o,a)=>{await i.storeTaskResult(r,o,a,n);let s=await i.getTask(r,n);if(s){let c=qs.parse({method:"notifications/tasks/status",params:s});await this.notification(c),yn(s.status)&&this._cleanupTaskProgressHandler(r)}},getTaskResult:r=>i.getTaskResult(r,n),updateTaskStatus:async(r,o,a)=>{let s=await i.getTask(r,n);if(!s)throw new Z(F.InvalidParams,`Task "${r}" not found - it may have been cleaned up`);if(yn(s.status))throw new Z(F.InvalidParams,`Cannot update task "${r}" from terminal status "${s.status}" to "${o}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await i.updateTaskStatus(r,o,a,n);let c=await i.getTask(r,n);if(c){let u=qs.parse({method:"notifications/tasks/status",params:c});await this.notification(u),yn(c.status)&&this._cleanupTaskProgressHandler(r)}},listTasks:r=>i.listTasks(r,n)}}};function N0(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function A0(e,t){let n={...e};for(let i in t){let r=i,o=t[r];if(o===void 0)continue;let a=n[r];N0(a)&&N0(o)?n[r]={...a,...o}:n[r]=o}return n}var Rz=b$(M_(),1),Cz=b$(Dz(),1);function ZU(){let e=new Rz.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,Cz.default)(e),e}var fp=class{constructor(t){this._ajv=t??ZU()}getValidator(t){let n="$id"in t&&typeof t.$id=="string"?this._ajv.getSchema(t.$id)??this._ajv.compile(t):this._ajv.compile(t);return i=>n(i)?{valid:!0,data:i,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(n.errors)}}};var pp=class{constructor(t){this._server=t}requestStream(t,n,i){return this._server.requestStream(t,n,i)}createMessageStream(t,n){let i=this._server.getClientCapabilities();if((t.tools||t.toolChoice)&&!i?.sampling?.tools)throw new Error("Client does not support sampling tools capability.");if(t.messages.length>0){let r=t.messages[t.messages.length-1],o=Array.isArray(r.content)?r.content:[r.content],a=o.some(l=>l.type==="tool_result"),s=t.messages.length>1?t.messages[t.messages.length-2]:void 0,c=s?Array.isArray(s.content)?s.content:[s.content]:[],u=c.some(l=>l.type==="tool_use");if(a){if(o.some(l=>l.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!u)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(u){let l=new Set(c.filter(p=>p.type==="tool_use").map(p=>p.id)),d=new Set(o.filter(p=>p.type==="tool_result").map(p=>p.toolUseId));if(l.size!==d.size||![...l].every(p=>d.has(p)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return this.requestStream({method:"sampling/createMessage",params:t},Js,n)}elicitInputStream(t,n){let i=this._server.getClientCapabilities(),r=t.mode??"form";switch(r){case"url":{if(!i?.elicitation?.url)throw new Error("Client does not support url elicitation.");break}case"form":{if(!i?.elicitation?.form)throw new Error("Client does not support form elicitation.");break}}let o=r==="form"&&t.mode===void 0?{...t,mode:"form"}:t;return this.requestStream({method:"elicitation/create",params:o},Co,n)}async getTask(t,n){return this._server.getTask({taskId:t},n)}async getTaskResult(t,n,i){return this._server.getTaskResult({taskId:t},n,i)}async listTasks(t,n){return this._server.listTasks(t?{cursor:t}:void 0,n)}async cancelTask(t,n){return this._server.cancelTask({taskId:t},n)}};function Uz(e,t,n){if(!e)throw new Error(`${n} does not support task creation (required for ${t})`);switch(t){case"tools/call":if(!e.tools?.call)throw new Error(`${n} does not support task creation for tools/call (required for ${t})`);break;default:break}}function Zz(e,t,n){if(!e)throw new Error(`${n} does not support task creation (required for ${t})`);switch(t){case"sampling/createMessage":if(!e.sampling?.createMessage)throw new Error(`${n} does not support task creation for sampling/createMessage (required for ${t})`);break;case"elicitation/create":if(!e.elicitation?.create)throw new Error(`${n} does not support task creation for elicitation/create (required for ${t})`);break;default:break}}var mp=class extends zf{constructor(t,n){super(n),this._serverInfo=t,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(Hs.options.map((i,r)=>[i,r])),this.isMessageIgnored=(i,r)=>{let o=this._loggingLevels.get(r);return o?this.LOG_LEVEL_SEVERITY.get(i)<this.LOG_LEVEL_SEVERITY.get(o):!1},this._capabilities=n?.capabilities??{},this._instructions=n?.instructions,this._jsonSchemaValidator=n?.jsonSchemaValidator??new fp,this.setRequestHandler(Ov,i=>this._oninitialize(i)),this.setNotificationHandler(jv,()=>this.oninitialized?.()),this._capabilities.logging&&this.setRequestHandler(Zv,async(i,r)=>{let o=r.sessionId||r.requestInfo?.headers["mcp-session-id"]||void 0,{level:a}=i.params,s=Hs.safeParse(a);return s.success&&this._loggingLevels.set(o,s.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new pp(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=A0(this._capabilities,t)}setRequestHandler(t,n){let r=fn(t)?.method;if(!r)throw new Error("Schema is missing a method literal");let o=ko(r);if(typeof o!="string")throw new Error("Schema method literal must be a string");if(o==="tools/call"){let s=async(c,u)=>{let l=dn(Ro,c);if(!l.success){let m=l.error instanceof Error?l.error.message:String(l.error);throw new Z(F.InvalidParams,`Invalid tools/call request: ${m}`)}let{params:d}=l.data,p=await Promise.resolve(n(c,u));if(d.task){let m=dn(Ao,p);if(!m.success){let h=m.error instanceof Error?m.error.message:String(m.error);throw new Z(F.InvalidParams,`Invalid task creation result: ${h}`)}return m.data}let f=dn(bf,p);if(!f.success){let m=f.error instanceof Error?f.error.message:String(f.error);throw new Z(F.InvalidParams,`Invalid tools/call result: ${m}`)}return f.data};return super.setRequestHandler(t,s)}return super.setRequestHandler(t,n)}assertCapabilityForMethod(t){switch(t){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new Error(`Client does not support sampling (required for ${t})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new Error(`Client does not support elicitation (required for ${t})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new Error(`Client does not support listing roots (required for ${t})`);break;case"ping":break}}assertNotificationCapability(t){switch(t){case"notifications/message":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new Error(`Server does not support notifying about resources (required for ${t})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new Error(`Server does not support notifying of tool list changes (required for ${t})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new Error(`Server does not support notifying of prompt list changes (required for ${t})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new Error(`Client does not support URL elicitation (required for ${t})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(t){if(this._capabilities)switch(t){case"completion/complete":if(!this._capabilities.completions)throw new Error(`Server does not support completions (required for ${t})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new Error(`Server does not support prompts (required for ${t})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new Error(`Server does not support resources (required for ${t})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new Error(`Server does not support tools (required for ${t})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Server does not support tasks capability (required for ${t})`);break;case"ping":case"initialize":break}}assertTaskCapability(t){Zz(this._clientCapabilities?.tasks?.requests,t,"Client")}assertTaskHandlerCapability(t){this._capabilities&&Uz(this._capabilities.tasks?.requests,t,"Server")}async _oninitialize(t){let n=t.params.protocolVersion;return this._clientCapabilities=t.params.capabilities,this._clientVersion=t.params.clientInfo,{protocolVersion:Ck.includes(n)?n:Iv,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getCapabilities(){return this._capabilities}async ping(){return this.request({method:"ping"},of)}async createMessage(t,n){if((t.tools||t.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new Error("Client does not support sampling tools capability.");if(t.messages.length>0){let i=t.messages[t.messages.length-1],r=Array.isArray(i.content)?i.content:[i.content],o=r.some(u=>u.type==="tool_result"),a=t.messages.length>1?t.messages[t.messages.length-2]:void 0,s=a?Array.isArray(a.content)?a.content:[a.content]:[],c=s.some(u=>u.type==="tool_use");if(o){if(r.some(u=>u.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!c)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(c){let u=new Set(s.filter(d=>d.type==="tool_use").map(d=>d.id)),l=new Set(r.filter(d=>d.type==="tool_result").map(d=>d.toolUseId));if(u.size!==l.size||![...u].every(d=>l.has(d)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return t.tools?this.request({method:"sampling/createMessage",params:t},Mv,n):this.request({method:"sampling/createMessage",params:t},Js,n)}async elicitInput(t,n){switch(t.mode??"form"){case"url":{if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support url elicitation.");let r=t;return this.request({method:"elicitation/create",params:r},Co,n)}case"form":{if(!this._clientCapabilities?.elicitation?.form)throw new Error("Client does not support form elicitation.");let r=t.mode==="form"?t:{...t,mode:"form"},o=await this.request({method:"elicitation/create",params:r},Co,n);if(o.action==="accept"&&o.content&&r.requestedSchema)try{let s=this._jsonSchemaValidator.getValidator(r.requestedSchema)(o.content);if(!s.valid)throw new Z(F.InvalidParams,`Elicitation response content does not match requested schema: ${s.errorMessage}`)}catch(a){throw a instanceof Z?a:new Z(F.InternalError,`Error validating elicitation response: ${a instanceof Error?a.message:String(a)}`)}return o}}}createElicitationCompletionNotifier(t,n){if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:t}},n)}async listRoots(t,n){return this.request({method:"roots/list",params:t},Lv,n)}async sendLoggingMessage(t,n){if(this._capabilities.logging&&!this.isMessageIgnored(t.level,n))return this.notification({method:"notifications/message",params:t})}async sendResourceUpdated(t){return this.notification({method:"notifications/resources/updated",params:t})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}};var Lz=Symbol.for("mcp.completable");function K_(e){return!!e&&typeof e=="object"&&Lz in e}function Vz(e){return e[Lz]?.complete}var Mz;(function(e){e.Completable="McpCompletable"})(Mz||(Mz={}));var MU=/^[A-Za-z0-9._-]{1,128}$/;function LU(e){let t=[];if(e.length===0)return{isValid:!1,warnings:["Tool name cannot be empty"]};if(e.length>128)return{isValid:!1,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${e.length})`]};if(e.includes(" ")&&t.push("Tool name contains spaces, which may cause parsing issues"),e.includes(",")&&t.push("Tool name contains commas, which may cause parsing issues"),(e.startsWith("-")||e.endsWith("-"))&&t.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts"),(e.startsWith(".")||e.endsWith("."))&&t.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts"),!MU.test(e)){let n=e.split("").filter(i=>!/[A-Za-z0-9._-]/.test(i)).filter((i,r,o)=>o.indexOf(i)===r);return t.push(`Tool name contains invalid characters: ${n.map(i=>`"${i}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:t}}return{isValid:!0,warnings:t}}function VU(e,t){if(t.length>0){console.warn(`Tool name validation warning for "${e}":`);for(let n of t)console.warn(` - ${n}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.")}}function G_(e){let t=LU(e);return VU(e,t.warnings),t.isValid}var hp=class{constructor(t){this._mcpServer=t}registerToolTask(t,n,i){let r={taskSupport:"required",...n.execution};if(r.taskSupport==="forbidden")throw new Error(`Cannot register task-based tool '${t}' with taskSupport 'forbidden'. Use registerTool() instead.`);return this._mcpServer._createRegisteredTool(t,n.title,n.description,n.inputSchema,n.outputSchema,n.annotations,r,n._meta,i)}};function FU(e,t){let n=0,i=[e];for(;i.length>0;){let r=i.pop();if(!(r===null||typeof r!="object"))if(Array.isArray(r))for(let o of r){if(++n>t)return n;o!==null&&typeof o=="object"&&i.push(o)}else for(let o in r){if(!Object.prototype.hasOwnProperty.call(r,o))continue;if(++n>t)return n;let a=r[o];a!==null&&typeof a=="object"&&i.push(a)}}return n}function qU(e){if(!(e===void 0||e===1/0)){if(typeof e!="number"||Number.isNaN(e)||e<1)throw new RangeError(`maxToolInputElements must be a number of at least 1, or Infinity, got ${String(e)}`);return e}}var gp=class{constructor(t,n){this._registeredResources={},this._registeredResourceTemplates={},this._registeredTools={},this._registeredPrompts={},this._toolHandlersInitialized=!1,this._completionHandlerInitialized=!1,this._resourceHandlersInitialized=!1,this._promptHandlersInitialized=!1,this.server=new mp(t,n),this._maxToolInputElements=qU(n?.maxToolInputElements),n?.capabilities?.tools&&this.setToolRequestHandlers(),n?.capabilities?.resources&&this.setResourceRequestHandlers(),n?.capabilities?.prompts&&this.setPromptRequestHandlers()}get experimental(){return this._experimental||(this._experimental={tasks:new hp(this)}),this._experimental}async connect(t){return await this.server.connect(t)}async close(){await this.server.close()}setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler(zn($f)),this.server.assertCanSetRequestHandler(zn(Ro)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler($f,()=>({tools:Object.entries(this._registeredTools).filter(([,t])=>t.enabled).map(([t,n])=>{let i={name:t,title:n.title,description:n.description,inputSchema:(()=>{let r=xo(n.inputSchema);return r?Jv(r,{strictUnions:!0,pipeStrategy:"input"}):BU})(),annotations:n.annotations,execution:n.execution,_meta:n._meta};if(n.outputSchema){let r=xo(n.outputSchema);r&&(i.outputSchema=Jv(r,{strictUnions:!0,pipeStrategy:"output"}))}return i})})),this.server.setRequestHandler(Ro,async(t,n)=>{try{let i=this._registeredTools[t.params.name];if(!i)throw new Z(F.InvalidParams,`Tool ${t.params.name} not found`);if(!i.enabled)throw new Z(F.InvalidParams,`Tool ${t.params.name} disabled`);let r=!!t.params.task,o=i.execution?.taskSupport,a="createTask"in i.handler;if((o==="required"||o==="optional")&&!a)throw new Z(F.InternalError,`Tool ${t.params.name} has taskSupport '${o}' but was not registered with registerToolTask`);if(o==="required"&&!r)throw new Z(F.MethodNotFound,`Tool ${t.params.name} requires task augmentation (taskSupport: 'required')`);if(o==="optional"&&!r&&a)return await this.handleAutomaticTaskPolling(i,t,n);let s=await this.validateToolInput(i,t.params.arguments,t.params.name),c=await this.executeToolHandler(i,s,n);return r||await this.validateToolOutput(i,c,t.params.name),c}catch(i){if(i instanceof Z&&i.code===F.UrlElicitationRequired)throw i;return this.createToolError(i instanceof Error?i.message:String(i))}}),this._toolHandlersInitialized=!0)}createToolError(t){return{content:[{type:"text",text:t}],isError:!0}}async validateToolInput(t,n,i){if(this._maxToolInputElements!==void 0&&FU(n,this._maxToolInputElements)>this._maxToolInputElements)throw new Z(F.InvalidParams,`Invalid arguments for tool ${i}: arguments contain more than the maximum of ${this._maxToolInputElements} elements`);if(!t.inputSchema)return;let o=xo(t.inputSchema)??t.inputSchema,a=await Sd(o,n??{});if(!a.success){let s="error"in a?a.error:"Unknown error",c=Id(s);throw new Z(F.InvalidParams,`Input validation error: Invalid arguments for tool ${i}: ${c}`)}return a.data}async validateToolOutput(t,n,i){if(!t.outputSchema||!("content"in n)||n.isError)return;if(!n.structuredContent)throw new Z(F.InvalidParams,`Output validation error: Tool ${i} has an output schema but no structured content was provided`);let r=xo(t.outputSchema),o=await Sd(r,n.structuredContent);if(!o.success){let a="error"in o?o.error:"Unknown error",s=Id(a);throw new Z(F.InvalidParams,`Output validation error: Invalid structured content for tool ${i}: ${s}`)}}async executeToolHandler(t,n,i){let r=t.handler;if("createTask"in r){if(!i.taskStore)throw new Error("No task store provided.");let a={...i,taskStore:i.taskStore};if(t.inputSchema){let s=r;return await Promise.resolve(s.createTask(n,a))}else{let s=r;return await Promise.resolve(s.createTask(a))}}if(t.inputSchema){let a=r;return await Promise.resolve(a(n,i))}else{let a=r;return await Promise.resolve(a(i))}}async handleAutomaticTaskPolling(t,n,i){if(!i.taskStore)throw new Error("No task store provided for task-capable tool.");let r=await this.validateToolInput(t,n.params.arguments,n.params.name),o=t.handler,a={...i,taskStore:i.taskStore},s=r?await Promise.resolve(o.createTask(r,a)):await Promise.resolve(o.createTask(a)),c=s.task.taskId,u=s.task,l=u.pollInterval??5e3;for(;u.status!=="completed"&&u.status!=="failed"&&u.status!=="cancelled";){await new Promise(p=>setTimeout(p,l));let d=await i.taskStore.getTask(c);if(!d)throw new Z(F.InternalError,`Task ${c} not found during polling`);u=d}return await i.taskStore.getTaskResult(c)}setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler(zn(wf)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(wf,async t=>{switch(t.params.ref.type){case"ref/prompt":return Qk(t),this.handlePromptCompletion(t,t.params.ref);case"ref/resource":return e0(t),this.handleResourceCompletion(t,t.params.ref);default:throw new Z(F.InvalidParams,`Invalid completion reference: ${t.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(t,n){let i=this._registeredPrompts[n.name];if(!i)throw new Z(F.InvalidParams,`Prompt ${n.name} not found`);if(!i.enabled)throw new Z(F.InvalidParams,`Prompt ${n.name} disabled`);if(!i.argsSchema)return Sc;let o=fn(i.argsSchema)?.[t.params.argument.name];if(!K_(o))return Sc;let a=Vz(o);if(!a)return Sc;let s=await a(t.params.argument.value,t.params.context);return qz(s)}async handleResourceCompletion(t,n){let i=Object.values(this._registeredResourceTemplates).find(a=>a.resourceTemplate.uriTemplate.toString()===n.uri);if(!i){if(this._registeredResources[n.uri])return Sc;throw new Z(F.InvalidParams,`Resource template ${t.params.ref.uri} not found`)}let r=i.resourceTemplate.completeCallback(t.params.argument.name);if(!r)return Sc;let o=await r(t.params.argument.value,t.params.context);return qz(o)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(zn(hf)),this.server.assertCanSetRequestHandler(zn(gf)),this.server.assertCanSetRequestHandler(zn(vf)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(hf,async(t,n)=>{let i=Object.entries(this._registeredResources).filter(([o,a])=>a.enabled).map(([o,a])=>({uri:o,name:a.name,...a.metadata})),r=[];for(let o of Object.values(this._registeredResourceTemplates)){if(!o.resourceTemplate.listCallback)continue;let a=await o.resourceTemplate.listCallback(n);for(let s of a.resources)r.push({...o.metadata,...s})}return{resources:[...i,...r]}}),this.server.setRequestHandler(gf,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([n,i])=>({name:n,uriTemplate:i.resourceTemplate.uriTemplate.toString(),...i.metadata}))})),this.server.setRequestHandler(vf,async(t,n)=>{let i=new URL(t.params.uri),r=this._registeredResources[i.toString()];if(r){if(!r.enabled)throw new Z(F.InvalidParams,`Resource ${i} disabled`);return r.readCallback(i,n)}for(let o of Object.values(this._registeredResourceTemplates)){let a=o.resourceTemplate.uriTemplate.match(i.toString());if(a)return o.readCallback(i,a,n)}throw new Z(F.InvalidParams,`Resource ${i} not found`)}),this._resourceHandlersInitialized=!0)}setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler(zn(yf)),this.server.assertCanSetRequestHandler(zn(_f)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(yf,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,t])=>t.enabled).map(([t,n])=>({name:t,title:n.title,description:n.description,arguments:n.argsSchema?HU(n.argsSchema):void 0}))})),this.server.setRequestHandler(_f,async(t,n)=>{let i=this._registeredPrompts[t.params.name];if(!i)throw new Z(F.InvalidParams,`Prompt ${t.params.name} not found`);if(!i.enabled)throw new Z(F.InvalidParams,`Prompt ${t.params.name} disabled`);if(i.argsSchema){let r=xo(i.argsSchema),o=await Sd(r,t.params.arguments??{});if(!o.success){let c="error"in o?o.error:"Unknown error",u=Id(c);throw new Z(F.InvalidParams,`Invalid arguments for prompt ${t.params.name}: ${u}`)}let a=o.data,s=i.callback;return await Promise.resolve(s(a,n))}else{let r=i.callback;return await Promise.resolve(r(n))}}),this._promptHandlersInitialized=!0)}resource(t,n,...i){let r;typeof i[0]=="object"&&(r=i.shift());let o=i[0];if(typeof n=="string"){if(this._registeredResources[n])throw new Error(`Resource ${n} is already registered`);let a=this._createRegisteredResource(t,void 0,n,r,o);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),a}else{if(this._registeredResourceTemplates[t])throw new Error(`Resource template ${t} is already registered`);let a=this._createRegisteredResourceTemplate(t,void 0,n,r,o);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),a}}registerResource(t,n,i,r){if(typeof n=="string"){if(this._registeredResources[n])throw new Error(`Resource ${n} is already registered`);let o=this._createRegisteredResource(t,i.title,n,i,r);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),o}else{if(this._registeredResourceTemplates[t])throw new Error(`Resource template ${t} is already registered`);let o=this._createRegisteredResourceTemplate(t,i.title,n,i,r);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),o}}_createRegisteredResource(t,n,i,r,o){let a={name:t,title:n,metadata:r,readCallback:o,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({uri:null}),update:s=>{typeof s.uri<"u"&&s.uri!==i&&(delete this._registeredResources[i],s.uri&&(this._registeredResources[s.uri]=a)),typeof s.name<"u"&&(a.name=s.name),typeof s.title<"u"&&(a.title=s.title),typeof s.metadata<"u"&&(a.metadata=s.metadata),typeof s.callback<"u"&&(a.readCallback=s.callback),typeof s.enabled<"u"&&(a.enabled=s.enabled),this.sendResourceListChanged()}};return this._registeredResources[i]=a,a}_createRegisteredResourceTemplate(t,n,i,r,o){let a={resourceTemplate:i,title:n,metadata:r,readCallback:o,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({name:null}),update:u=>{typeof u.name<"u"&&u.name!==t&&(delete this._registeredResourceTemplates[t],u.name&&(this._registeredResourceTemplates[u.name]=a)),typeof u.title<"u"&&(a.title=u.title),typeof u.template<"u"&&(a.resourceTemplate=u.template),typeof u.metadata<"u"&&(a.metadata=u.metadata),typeof u.callback<"u"&&(a.readCallback=u.callback),typeof u.enabled<"u"&&(a.enabled=u.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[t]=a;let s=i.uriTemplate.variableNames;return Array.isArray(s)&&s.some(u=>!!i.completeCallback(u))&&this.setCompletionRequestHandler(),a}_createRegisteredPrompt(t,n,i,r,o){let a={title:n,description:i,argsSchema:r===void 0?void 0:Kn(r),callback:o,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({name:null}),update:s=>{typeof s.name<"u"&&s.name!==t&&(delete this._registeredPrompts[t],s.name&&(this._registeredPrompts[s.name]=a)),typeof s.title<"u"&&(a.title=s.title),typeof s.description<"u"&&(a.description=s.description),typeof s.argsSchema<"u"&&(a.argsSchema=Kn(s.argsSchema)),typeof s.callback<"u"&&(a.callback=s.callback),typeof s.enabled<"u"&&(a.enabled=s.enabled),this.sendPromptListChanged()}};return this._registeredPrompts[t]=a,r&&Object.values(r).some(c=>{let u=c instanceof Yn?c._def?.innerType:c;return K_(u)})&&this.setCompletionRequestHandler(),a}_createRegisteredTool(t,n,i,r,o,a,s,c,u){G_(t);let l={title:n,description:i,inputSchema:Fz(r),outputSchema:Fz(o),annotations:a,execution:s,_meta:c,handler:u,enabled:!0,disable:()=>l.update({enabled:!1}),enable:()=>l.update({enabled:!0}),remove:()=>l.update({name:null}),update:d=>{typeof d.name<"u"&&d.name!==t&&(typeof d.name=="string"&&G_(d.name),delete this._registeredTools[t],d.name&&(this._registeredTools[d.name]=l)),typeof d.title<"u"&&(l.title=d.title),typeof d.description<"u"&&(l.description=d.description),typeof d.paramsSchema<"u"&&(l.inputSchema=Kn(d.paramsSchema)),typeof d.outputSchema<"u"&&(l.outputSchema=Kn(d.outputSchema)),typeof d.callback<"u"&&(l.handler=d.callback),typeof d.annotations<"u"&&(l.annotations=d.annotations),typeof d._meta<"u"&&(l._meta=d._meta),typeof d.enabled<"u"&&(l.enabled=d.enabled),this.sendToolListChanged()}};return this._registeredTools[t]=l,this.setToolRequestHandlers(),this.sendToolListChanged(),l}tool(t,...n){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let i,r,o,a;if(typeof n[0]=="string"&&(i=n.shift()),n.length>1){let c=n[0];if(W_(c))r=n.shift(),n.length>1&&typeof n[0]=="object"&&n[0]!==null&&!W_(n[0])&&(a=n.shift());else if(typeof c=="object"&&c!==null){if(Object.values(c).some(u=>typeof u=="object"&&u!==null))throw new Error(`Tool ${t} expected a Zod schema or ToolAnnotations, but received an unrecognized object`);a=n.shift()}}let s=n[0];return this._createRegisteredTool(t,void 0,i,r,o,a,{taskSupport:"forbidden"},void 0,s)}registerTool(t,n,i){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let{title:r,description:o,inputSchema:a,outputSchema:s,annotations:c,_meta:u}=n;return this._createRegisteredTool(t,r,o,a,s,c,{taskSupport:"forbidden"},u,i)}prompt(t,...n){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let i;typeof n[0]=="string"&&(i=n.shift());let r;n.length>1&&(r=n.shift());let o=n[0],a=this._createRegisteredPrompt(t,void 0,i,r,o);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),a}registerPrompt(t,n,i){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let{title:r,description:o,argsSchema:a}=n,s=this._createRegisteredPrompt(t,r,o,a,i);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),s}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(t,n){return this.server.sendLoggingMessage(t,n)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}};var BU={type:"object",properties:{}};function Bz(e){return e!==null&&typeof e=="object"&&"parse"in e&&typeof e.parse=="function"&&"safeParse"in e&&typeof e.safeParse=="function"}function Hz(e){return"_def"in e||"_zod"in e||Bz(e)}function W_(e){return typeof e!="object"||e===null||Hz(e)?!1:Object.keys(e).length===0?!0:Object.values(e).some(Bz)}function Fz(e){if(e){if(W_(e))return Kn(e);if(!Hz(e))throw new Error("inputSchema must be a Zod schema or raw shape, received an unrecognized object");return e}}function HU(e){let t=fn(e);return t?Object.entries(t).map(([n,i])=>{let r=fx(i),o=px(i);return{name:n,description:r,required:!o}}):[]}function zn(e){let n=fn(e)?.method;if(!n)throw new Error("Schema is missing a method literal");let i=ko(n);if(typeof i=="string")return i;throw new Error("Schema method literal must be a string")}function qz(e){return{completion:{values:e.slice(0,100),total:e.length,hasMore:e.length>100}}}var Sc={completion:{values:[],hasMore:!1}};import Kz from"node:process";var JU=10*1024*1024,vp=class{constructor(t){this._maxBufferSize=t?.maxBufferSize??JU}append(t){if((this._buffer?.length??0)+t.length>this._maxBufferSize)throw this.clear(),new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);this._buffer=this._buffer?Buffer.concat([this._buffer,t]):t}readMessage(){if(!this._buffer)return null;let t=this._buffer.indexOf(`
|
|
77
|
+
`);if(t===-1)return null;let n=this._buffer.toString("utf8",0,t).replace(/\r$/,"");return this._buffer=this._buffer.subarray(t+1),KU(n)}clear(){this._buffer=void 0}};function KU(e){return Bk.parse(JSON.parse(e))}function Jz(e){return JSON.stringify(e)+`
|
|
78
|
+
`}var yp=class{constructor(t=Kz.stdin,n=Kz.stdout,i){this._stdin=t,this._stdout=n,this._started=!1,this._ondata=r=>{try{this._readBuffer.append(r),this.processReadBuffer()}catch(o){this.onerror?.(o),this.close().catch(()=>{})}},this._onerror=r=>{this.onerror?.(r)},this._readBuffer=new vp({maxBufferSize:i?.maxBufferSize})}async start(){if(this._started)throw new Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=!0,this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror)}processReadBuffer(){for(;;)try{let t=this._readBuffer.readMessage();if(t===null)break;this.onmessage?.(t)}catch(t){this.onerror?.(t)}}async close(){this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.listenerCount("data")===0&&this._stdin.pause(),this._readBuffer.clear(),this.onclose?.()}send(t){return new Promise(n=>{let i=Jz(t);this._stdout.write(i)?n():this._stdout.once("drain",n)})}};import{readdir as jZ,readFile as pP,stat as NZ}from"node:fs/promises";import{basename as dP,join as AZ,relative as DZ,sep as RZ}from"node:path";import{createRequire as GU}from"module";var WU=GU("/"),ta,XU,YU;try{ta=WU("worker_threads"),XU=ta.Worker,YU=ta.isMarkedAsUntransferable}catch{}var Le=Uint8Array,Ht=Uint16Array,s$=Int32Array,_p=new Le([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),$p=new Le([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),t$=new Le([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),tP=function(e,t){for(var n=new Ht(31),i=0;i<31;++i)n[i]=t+=1<<e[i-1];for(var r=new s$(n[30]),i=1;i<30;++i)for(var o=n[i];o<n[i+1];++o)r[o]=o-n[i]<<5|i;return{b:n,r}},ta=tP(_p,2),rP=ta.b,r$=ta.r;rP[28]=258,r$[258]=28;var nP=tP($p,0),QU=nP.b,Gz=nP.r,n$=new Ht(32768);for($e=0;$e<32768;++$e)Kr=($e&43690)>>1|($e&21845)<<1,Kr=(Kr&52428)>>2|(Kr&13107)<<2,Kr=(Kr&61680)>>4|(Kr&3855)<<4,n$[$e]=((Kr&65280)>>8|(Kr&255)<<8)>>1;var Kr,$e,jr=(function(e,t,n){for(var i=e.length,r=0,o=new Ht(t);r<i;++r)e[r]&&++o[e[r]-1];var a=new Ht(t);for(r=1;r<t;++r)a[r]=a[r-1]+o[r-1]<<1;var s;if(n){s=new Ht(1<<t);var c=15-t;for(r=0;r<i;++r)if(e[r])for(var u=r<<4|e[r],l=t-e[r],d=a[e[r]-1]++<<l,p=d|(1<<l)-1;d<=p;++d)s[n$[d]>>c]=u}else for(s=new Ht(i),r=0;r<i;++r)e[r]&&(s[r]=n$[a[e[r]-1]++]>>15-e[r]);return s}),Pn=new Le(288);for($e=0;$e<144;++$e)Pn[$e]=8;var $e;for($e=144;$e<256;++$e)Pn[$e]=9;var $e;for($e=256;$e<280;++$e)Pn[$e]=7;var $e;for($e=280;$e<288;++$e)Pn[$e]=8;var $e,Pc=new Le(32);for($e=0;$e<32;++$e)Pc[$e]=5;var $e,eZ=jr(Pn,9,0),tZ=jr(Pn,9,1),rZ=jr(Pc,5,0),nZ=jr(Pc,5,1),X_=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},vr=function(e,t,n){var i=t/8|0;return(e[i]|e[i+1]<<8)>>(t&7)&n},Y_=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},c$=function(e){return(e+7)/8|0},Tc=function(e,t,n){return(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new Le(e.subarray(t,n))};var iZ=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],pt=function(e,t,n){var i=new Error(t||iZ[e]);if(i.code=e,Error.captureStackTrace&&Error.captureStackTrace(i,pt),!n)throw i;return i},oZ=function(e,t,n,i){var r=e.length,o=i?i.length:0;if(!r||t.f&&!t.l)return n||new Le(0);var a=!n,s=a||t.i!=2,c=t.i;a&&(n=new Le(r*3));var u=function(ca){var ua=n.length;if(ca>ua){var hi=new Le(Math.max(ua*2,ca));hi.set(n),n=hi}},l=t.f||0,d=t.p||0,p=t.b||0,f=t.l,m=t.d,h=t.m,g=t.n,_=r*8;do{if(!f){l=vr(e,d,1);var $=vr(e,d+1,3);if(d+=3,$)if($==1)f=tZ,m=nZ,h=9,g=5;else if($==2){var M=vr(e,d,31)+257,G=vr(e,d+10,15)+4,Q=M+vr(e,d+5,31)+1;d+=14;for(var X=new Le(Q),Oe=new Le(19),Ne=0;Ne<G;++Ne)Oe[t$[Ne]]=vr(e,d+Ne*3,7);d+=G*3;for(var Ve=X_(Oe),Ct=(1<<Ve)-1,mt=jr(Oe,Ve,1),Ne=0;Ne<Q;){var St=mt[vr(e,d,Ct)];d+=St&15;var k=St>>4;if(k<16)X[Ne++]=k;else{var We=0,Ue=0;for(k==16?(Ue=3+vr(e,d,3),d+=2,We=X[Ne-1]):k==17?(Ue=3+vr(e,d,7),d+=3):k==18&&(Ue=11+vr(e,d,127),d+=7);Ue--;)X[Ne++]=We}}var It=X.subarray(0,M),Xe=X.subarray(M);h=X_(It),g=X_(Xe),f=jr(It,h,1),m=jr(Xe,g,1)}else pt(1);else{var k=c$(d)+4,E=e[k-4]|e[k-3]<<8,T=k+E;if(T>r){c&&pt(0);break}s&&u(p+E),n.set(e.subarray(k,T),p),t.b=p+=E,t.p=d=T*8,t.f=l;continue}if(d>_){c&&pt(0);break}}s&&u(p+131072);for(var sa=(1<<h)-1,Jt=(1<<g)-1,Nr=d;;Nr=d){var We=f[Y_(e,d)&sa],Ut=We>>4;if(d+=We&15,d>_){c&&pt(0);break}if(We||pt(2),Ut<256)n[p++]=Ut;else if(Ut==256){Nr=d,f=null;break}else{var Zt=Ut-254;if(Ut>264){var Ne=Ut-257,Ze=_p[Ne];Zt=vr(e,d,(1<<Ze)-1)+rP[Ne],d+=Ze}var yr=m[Y_(e,d)&Jt],pi=yr>>4;yr||pt(3),d+=yr&15;var Xe=QU[pi];if(pi>3){var Ze=$p[pi];Xe+=Y_(e,d)&(1<<Ze)-1,d+=Ze}if(d>_){c&&pt(0);break}s&&u(p+131072);var mi=p+Zt;if(p<Xe){var Dc=o-Xe,Rc=Math.min(Xe,mi);for(Dc+p<0&&pt(3);p<Rc;++p)n[p]=i[Dc+p]}for(;p<mi;++p)n[p]=n[p-Xe]}}t.l=f,t.p=Nr,t.b=p,t.f=l,f&&(l=1,t.m=h,t.d=m,t.n=g)}while(!l);return p!=n.length&&a?Tc(n,0,p):n.subarray(0,p)},Gr=function(e,t,n){n<<=t&7;var i=t/8|0;e[i]|=n,e[i+1]|=n>>8},Ic=function(e,t,n){n<<=t&7;var i=t/8|0;e[i]|=n,e[i+1]|=n>>8,e[i+2]|=n>>16},Q_=function(e,t){for(var n=[],i=0;i<e.length;++i)e[i]&&n.push({s:i,f:e[i]});var r=n.length,o=n.slice();if(!r)return{t:oP,l:0};if(r==1){var a=new Le(n[0].s+1);return a[n[0].s]=1,{t:a,l:1}}n.sort(function(T,M){return T.f-M.f}),n.push({s:-1,f:25001});var s=n[0],c=n[1],u=0,l=1,d=2;for(n[0]={s:-1,f:s.f+c.f,l:s,r:c};l!=r-1;)s=n[n[u].f<n[d].f?u++:d++],c=n[u!=l&&n[u].f<n[d].f?u++:d++],n[l++]={s:-1,f:s.f+c.f,l:s,r:c};for(var p=o[0].s,i=1;i<r;++i)o[i].s>p&&(p=o[i].s);var f=new Ht(p+1),m=i$(n[l-1],f,0);if(m>t){var i=0,h=0,g=m-t,_=1<<g;for(o.sort(function(M,G){return f[G.s]-f[M.s]||M.f-G.f});i<r;++i){var $=o[i].s;if(f[$]>t)h+=_-(1<<m-f[$]),f[$]=t;else break}for(h>>=g;h>0;){var k=o[i].s;f[k]<t?h-=1<<t-f[k]++-1:++i}for(;i>=0&&h;--i){var E=o[i].s;f[E]==t&&(--f[E],++h)}m=t}return{t:new Le(f),l:m}},i$=function(e,t,n){return e.s==-1?Math.max(i$(e.l,t,n+1),i$(e.r,t,n+1)):t[e.s]=n},Wz=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Ht(++t),i=0,r=e[0],o=1,a=function(c){n[i++]=c},s=1;s<=t;++s)if(e[s]==r&&s!=t)++o;else{if(!r&&o>2){for(;o>138;o-=138)a(32754);o>2&&(a(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(a(r),--o;o>6;o-=6)a(8304);o>2&&(a(o-3<<5|8208),o=0)}for(;o--;)a(r);o=1,r=e[s]}return{c:n.subarray(0,i),n:t}},zc=function(e,t){for(var n=0,i=0;i<t.length;++i)n+=e[i]*t[i];return n},iP=function(e,t,n){var i=n.length,r=c$(t+2);e[r]=i&255,e[r+1]=i>>8,e[r+2]=e[r]^255,e[r+3]=e[r+1]^255;for(var o=0;o<i;++o)e[r+o+4]=n[o];return(r+4+i)*8},Xz=function(e,t,n,i,r,o,a,s,c,u,l){Gr(t,l++,n),++r[256];for(var d=Q_(r,15),p=d.t,f=d.l,m=Q_(o,15),h=m.t,g=m.l,_=Wz(p),$=_.c,k=_.n,E=Wz(h),T=E.c,M=E.n,G=new Ht(19),Q=0;Q<$.length;++Q)++G[$[Q]&31];for(var Q=0;Q<T.length;++Q)++G[T[Q]&31];for(var X=Q_(G,7),Oe=X.t,Ne=X.l,Ve=19;Ve>4&&!Oe[t$[Ve-1]];--Ve);var Ct=u+5<<3,mt=zc(r,Pn)+zc(o,Pc)+a,St=zc(r,p)+zc(o,h)+a+14+3*Ve+zc(G,Oe)+2*G[16]+3*G[17]+7*G[18];if(c>=0&&Ct<=mt&&Ct<=St)return iP(t,l,e.subarray(c,c+u));var We,Ue,It,Xe;if(Gr(t,l,1+(St<mt)),l+=2,St<mt){We=jr(p,f,0),Ue=p,It=jr(h,g,0),Xe=h;var sa=jr(Oe,Ne,0);Gr(t,l,k-257),Gr(t,l+5,M-1),Gr(t,l+10,Ve-4),l+=14;for(var Q=0;Q<Ve;++Q)Gr(t,l+3*Q,Oe[t$[Q]]);l+=3*Ve;for(var Jt=[$,T],Nr=0;Nr<2;++Nr)for(var Ut=Jt[Nr],Q=0;Q<Ut.length;++Q){var Zt=Ut[Q]&31;Gr(t,l,sa[Zt]),l+=Oe[Zt],Zt>15&&(Gr(t,l,Ut[Q]>>5&127),l+=Ut[Q]>>12)}}else We=eZ,Ue=Pn,It=rZ,Xe=Pc;for(var Q=0;Q<s;++Q){var Ze=i[Q];if(Ze>255){var Zt=Ze>>18&31;Ic(t,l,We[Zt+257]),l+=Ue[Zt+257],Zt>7&&(Gr(t,l,Ze>>23&31),l+=_p[Zt]);var yr=Ze&31;Ic(t,l,It[yr]),l+=Xe[yr],yr>3&&(Ic(t,l,Ze>>5&8191),l+=$p[yr])}else Ic(t,l,We[Ze]),l+=Ue[Ze]}return Ic(t,l,We[256]),l+Ue[256]},aZ=new s$([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),oP=new Le(0),sZ=function(e,t,n,i,r,o){var a=o.z||e.length,s=new Le(i+a+5*(1+Math.ceil(a/7e3))+r),c=s.subarray(i,s.length-r),u=o.l,l=(o.r||0)&7;if(t){l&&(c[0]=o.r>>3);for(var d=aZ[t-1],p=d>>13,f=d&8191,m=(1<<n)-1,h=o.p||new Ht(32768),g=o.h||new Ht(m+1),_=Math.ceil(n/3),$=2*_,k=function(Ip){return(e[Ip]^e[Ip+1]<<_^e[Ip+2]<<$)&m},E=new s$(25e3),T=new Ht(288),M=new Ht(32),G=0,Q=0,X=o.i||0,Oe=0,Ne=o.w||0,Ve=0;X+2<a;++X){var Ct=k(X),mt=X&32767,St=g[Ct];if(h[mt]=St,g[Ct]=mt,Ne<=X){var We=a-X;if((G>7e3||Oe>24576)&&(We>423||!u)){l=Xz(e,c,0,E,T,M,Q,Oe,Ve,X-Ve,l),Oe=G=Q=0,Ve=X;for(var Ue=0;Ue<286;++Ue)T[Ue]=0;for(var Ue=0;Ue<30;++Ue)M[Ue]=0}var It=2,Xe=0,sa=f,Jt=mt-St&32767;if(We>2&&Ct==k(X-Jt))for(var Nr=Math.min(p,We)-1,Ut=Math.min(32767,X),Zt=Math.min(258,We);Jt<=Ut&&--sa&&mt!=St;){if(e[X+It]==e[X+It-Jt]){for(var Ze=0;Ze<Zt&&e[X+Ze]==e[X+Ze-Jt];++Ze);if(Ze>It){if(It=Ze,Xe=Jt,Ze>Nr)break;for(var yr=Math.min(Jt,Ze-2),pi=0,Ue=0;Ue<yr;++Ue){var mi=X-Jt+Ue&32767,Dc=h[mi],Rc=mi-Dc&32767;Rc>pi&&(pi=Rc,St=mi)}}}mt=St,St=h[mt],Jt+=mt-St&32767}if(Xe){E[Oe++]=268435456|r$[It]<<18|Gz[Xe];var ca=r$[It]&31,ua=Gz[Xe]&31;Q+=_p[ca]+$p[ua],++T[257+ca],++M[ua],Ne=X+It,++G}else E[Oe++]=e[X],++T[e[X]]}}for(X=Math.max(X,Ne);X<a;++X)E[Oe++]=e[X],++T[e[X]];l=Xz(e,c,u,E,T,M,Q,Oe,Ve,X-Ve,l),u||(o.r=l&7|c[l/8|0]<<3,l-=7,o.h=g,o.p=h,o.i=X,o.w=Ne)}else{for(var X=o.w||0;X<a+u;X+=65535){var hi=X+65535;hi>=a&&(c[l/8|0]=u,hi=a),l=iP(c,l+1,e.subarray(X,hi))}o.i=a}return Tc(s,0,i+c$(l)+r)},cZ=(function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,i=9;--i;)n=(n&1&&-306674912)^n>>>1;e[t]=n}return e})(),uZ=function(){var e=-1;return{p:function(t){for(var n=e,i=0;i<t.length;++i)n=cZ[n&255^t[i]]^n>>>8;e=n},d:function(){return~e}}};var lZ=function(e,t,n,i,r){if(!r&&(r={l:1},t.dictionary)){var o=t.dictionary.subarray(-32768),a=new Le(o.length+e.length);a.set(o),a.set(e,o.length),e=a,r.w=o.length}return sZ(e,t.level==null?6:t.level,t.mem==null?r.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,n,i,r)},aP=function(e,t){var n={};for(var i in e)n[i]=e[i];for(var i in t)n[i]=t[i];return n};var Or=function(e,t){return e[t]|e[t+1]<<8},ir=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},e$=function(e,t){return ir(e,t)+ir(e,t+4)*4294967296},at=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function dZ(e,t){return lZ(e,t||{},0,0)}function fZ(e,t){return oZ(e,{i:2},t&&t.out,t&&t.dictionary)}var sP=function(e,t,n,i){for(var r in e){var o=e[r],a=t+r,s=i;Array.isArray(o)&&(s=aP(i,o[1]),o=o[0]),ArrayBuffer.isView(o)?n[a]=[o,s]:(n[a+="/"]=[new Le(0),s],sP(o,a,n,i))}},Yz=typeof TextEncoder<"u"&&new TextEncoder,o$=typeof TextDecoder<"u"&&new TextDecoder,pZ=0;try{o$.decode(oP,{stream:!0}),pZ=1}catch{}var mZ=function(e){for(var t="",n=0;;){var i=e[n++],r=(i>127)+(i>223)+(i>239);if(n+r>e.length)return{s:t,r:Tc(e,n-1)};r?r==3?(i=((i&15)<<18|(e[n++]&63)<<12|(e[n++]&63)<<6|e[n++]&63)-65536,t+=String.fromCharCode(55296|i>>10,56320|i&1023)):r&1?t+=String.fromCharCode((i&31)<<6|e[n++]&63):t+=String.fromCharCode((i&15)<<12|(e[n++]&63)<<6|e[n++]&63):t+=String.fromCharCode(i)}};function Qz(e,t){if(t){for(var n=new Le(e.length),i=0;i<e.length;++i)n[i]=e.charCodeAt(i);return n}if(Yz)return Yz.encode(e);for(var r=e.length,o=new Le(e.length+(e.length>>1)),a=0,s=function(l){o[a++]=l},i=0;i<r;++i){if(a+5>o.length){var c=new Le(a+8+(r-i<<1));c.set(o),o=c}var u=e.charCodeAt(i);u<128||t?s(u):u<2048?(s(192|u>>6),s(128|u&63)):u>55295&&u<57344?(u=65536+(u&1047552)|e.charCodeAt(++i)&1023,s(240|u>>18),s(128|u>>12&63),s(128|u>>6&63),s(128|u&63)):(s(224|u>>12),s(128|u>>6&63),s(128|u&63))}return Tc(o,0,a)}function u$(e,t){if(t){for(var n="",i=0;i<e.length;i+=16384)n+=String.fromCharCode.apply(null,e.subarray(i,i+16384));return n}else{if(o$)return o$.decode(e);var r=mZ(e),o=r.s,n=r.r;return n.length&&pt(8),o}}var hZ=function(e,t){return t+30+Or(e,t+26)+Or(e,t+28)},gZ=function(e,t,n){var i=Or(e,t+28),r=Or(e,t+30),o=u$(e.subarray(t+46,t+46+i),!(Or(e,t+8)&2048)),a=t+46+i,s=vZ(e,a,r,n,ir(e,t+20),ir(e,t+24),ir(e,t+42)),c=s[0],u=s[1],l=s[2];return[Or(e,t+10),c,u,o,a+r+Or(e,t+32),l]},vZ=function(e,t,n,i,r,o,a){var s=r==4294967295,c=o==4294967295,u=a==4294967295,l=t+n,d=s+c+u;if(i&&d){for(;t+4<l;t+=4+Or(e,t+2))if(Or(e,t)==1)return[s?e$(e,t+4+8*c):r,c?e$(e,t+4):o,u?e$(e,t+4+8*(c+s)):a,1];i<2&&pt(13)}return[r,o,a,0]},a$=function(e){var t=0;if(e)for(var n in e){var i=e[n].length;i>65535&&pt(9),t+=i+4}return t},eP=function(e,t,n,i,r,o,a,s){var c=i.length,u=n.extra,l=s&&s.length,d=a$(u);at(e,t,a!=null?33639248:67324752),t+=4,a!=null&&(e[t++]=20,e[t++]=n.os),e[t]=20,t+=2,e[t++]=n.flag<<1|(o<0&&8),e[t++]=r&&8,e[t++]=n.compression&255,e[t++]=n.compression>>8;var p=new Date(n.mtime==null?Date.now():n.mtime),f=p.getFullYear()-1980;if((f<0||f>119)&&pt(10),at(e,t,f<<25|p.getMonth()+1<<21|p.getDate()<<16|p.getHours()<<11|p.getMinutes()<<5|p.getSeconds()>>1),t+=4,o!=-1&&(at(e,t,n.crc),at(e,t+4,o<0?-o-2:o),at(e,t+8,n.size)),at(e,t+12,c),at(e,t+14,d),t+=16,a!=null&&(at(e,t,l),at(e,t+6,n.attrs),at(e,t+10,a),t+=14),e.set(i,t),t+=c,d)for(var m in u){var h=u[m],g=h.length;at(e,t,+m),at(e,t+2,g),e.set(h,t+4),t+=4+g}return l&&(e.set(s,t),t+=l),t},yZ=function(e,t,n,i,r){at(e,t,101010256),at(e,t+8,n),at(e,t+10,n),at(e,t+12,i),at(e,t+16,r)};function l$(e,t){t||(t={});var n={},i=[];sP(e,"",n,t);var r=0,o=0;for(var a in n){var s=n[a],c=s[0],u=s[1],l=u.level==0?0:8,d=Qz(a),p=d.length,f=u.comment,m=f&&Qz(f),h=m&&m.length,g=a$(u.extra);p>65535&&pt(11);var _=l?dZ(c,u):c,$=_.length,k=uZ();k.p(c),i.push(aP(u,{size:c.length,crc:k.d(),c:_,f:d,m,u:p!=a.length||m&&f.length!=h,o:r,compression:l})),r+=30+p+g+$,o+=76+2*(p+g)+(h||0)+$}for(var E=new Le(o+22),T=r,M=o-r,G=0;G<i.length;++G){var d=i[G];eP(E,d.o,d,d.f,d.u,d.c.length);var Q=30+d.f.length+a$(d.extra);E.set(d.c,d.o+Q),eP(E,r,d,d.f,d.u,d.c.length,d.o,d.m),r+=16+Q+(d.m?d.m.length:0)}return yZ(E,r,i.length,M,T),E}function ra(e,t){for(var n={},i=e.length-22;ir(e,i)!=101010256;--i)(!i||e.length-i>65558)&&pt(13);var r=Or(e,i+8);if(!r)return{};var o=ir(e,i+16),a=ir(e,i-20)==117853008;if(a){var s=ir(e,i-12);a=ir(e,s)==101075792,a&&(r=ir(e,s+32),o=ir(e,s+48))}for(var c=t&&t.filter,u=0;u<r;++u){var l=gZ(e,o,a),d=l[0],p=l[1],f=l[2],m=l[3],h=l[4],g=l[5],_=hZ(e,g);o=h,(!c||c({name:m,size:p,originalSize:f,compression:d}))&&(d?d==8?n[m]=fZ(e.subarray(_,_+p),{out:new Le(f)}):pt(14,"unknown compression type "+d):n[m]=Tc(e,_,_+p))}return n}var d$={hogwartsmp:"mafiahub",kcdc:"mafiahub"},Tn=e=>d$[e]??e;var cP=/\.(ts|tsx|mts|cts|map)$/i,bp=/(^|\/)(\.env(\.[^/]+)?|server\.env|latch\.env)$/i,_Z=/\.(c?js|json)$/i,$Z=/\.c?js$/i,bZ=/\.(node|exe|dll|so|dylib|bat|cmd|ps1|sh|vbs|jar|msi|scr|com)$/i;function wZ(e,t){let n=0,i=0,r=-1,o=0;for(;i<t.length;)if(n<e.length&&e[n]!=="*"&&e[n]===t[i])n++,i++;else if(n<e.length&&e[n]==="*")r=n++,o=i;else if(r!==-1)n=r+1,i=++o;else return!1;for(;n<e.length&&e[n]==="*";)n++;return n===e.length}function Ec(e,t){return e.some(n=>n===t?!0:n.endsWith("/**")?t.startsWith(n.slice(0,-2)):n.endsWith("/*")?t.startsWith(n.slice(0,-1))&&!t.slice(n.length-1).includes("/"):n.includes("*")?wZ(n,t):!1)}var na=e=>Array.isArray(e)?e.map(String):e?[String(e)]:[];function ia(e){let t=new Set(e.map(n=>n.includes("/")?n.split("/")[0]:""));return t.size===1&&!t.has("")?`${[...t][0]}/`:""}var xZ=e=>!!(e&&typeof e=="object"&&e.mafiahub&&typeof e.mafiahub=="object"),kZ=(e,t=[])=>[...new Set([...na(e?.latch?.ignore),...t])],SZ=["process","native"],IZ=e=>[...new Set(na(e?.latch?.permissions))].sort(),zZ=(e,t)=>typeof t=="boolean"?t:e?.latch?.obfuscateClient!==!1;function PZ(e,t,n={}){let i=t.mafiahub,r=na(i.serverScripts??i.server),o=new Set([...na(i.clientScripts??i.client),...na(i.sharedScripts)]),a=na(i.files??i.clientFiles),s=kZ(t,n.keepReadable),c=zZ(t,n.obfuscateClient),u=[],l=[];r.length||u.push({code:"noServerScripts"});let d=IZ(t);for(let f of d)SZ.includes(f)||u.push({code:"unknownPermission",file:String(f)});let p=e.map(f=>cP.test(f)||bp.test(f)?{name:f,kind:"removed"}:f==="package.json"?{name:f,kind:"manifest"}:(bZ.test(f)&&l.push({code:"binary",file:f}),f.startsWith("node_modules/")?{name:f,kind:"readable",why:"dependency"}:o.has(f)||Ec(a,f)?{name:f,kind:"client",obfuscated:c&&$Z.test(f)}:_Z.test(f)?Ec(s,f)&&!r.includes(f)?{name:f,kind:"readable",why:"kept"}:{name:f,kind:"encrypted",entry:r.includes(f),keepable:!r.includes(f)}:{name:f,kind:"readable",why:"asset"}));for(let f of r){let m=p.find(h=>h.name===f);m?m.kind!=="encrypted"&&u.push({code:"serverScriptShipped",file:f}):u.push({code:"serverScriptMissing",file:f})}for(let f of s)r.some(m=>Ec([f],m))&&l.push({code:"entryNotReadable",file:f});return{rows:p,errors:u,warnings:l,serverScripts:r,obfuscate:c,permissions:d}}var TZ=e=>!!(e&&typeof e=="object"&&typeof e.Main=="string"&&!e.mafiahub),EZ=/^[A-Za-z_$][\w$]*(\.[A-Za-z_$][\w$]*)+$/;function OZ(e,t){let n=[],i=[],r=typeof t?.Main=="string"?t.Main:null;r?EZ.test(r)||n.push({code:"badMain",file:r}):n.push({code:"noMain"});let o=e.map(a=>a==="manifest.json"?{name:a,kind:"manifest"}:cP.test(a)||bp.test(a)||a.endsWith(".java")?{name:a,kind:"removed"}:{name:a,kind:"encrypted",entry:r!=null&&a===r.replace(/\./g,"/")+".class"});return o.some(a=>a.kind==="encrypted"&&a.name.endsWith(".class"))||n.push({code:"noClasses"}),r&&!e.includes(r.replace(/\./g,"/")+".class")&&i.push({code:"mainClassMissing",file:r}),{rows:o,errors:n,warnings:i,realMain:r}}function uP(e,t={}){let n=Object.keys(e).filter(u=>!u.startsWith("__MACOSX/")&&!u.endsWith(".DS_Store")),i=ia(n),r=n.map(u=>u.slice(i.length)),o=u=>new TextDecoder().decode(u),a=e[`${i}package.json`],s=e[`${i}manifest.json`];if(t.ecosystem==="hytale"||!a&&s){if(!s)return{error:"noManifest",names:r,hytale:!0};let u;try{u=JSON.parse(o(s))}catch{return{error:"badManifest",names:r,hytale:!0}}return TZ(u)?{manifest:u,names:r,hytale:!0,plan:OZ(r,u)}:{error:"noHytaleMain",names:r,hytale:!0,manifest:u}}if(!a)return{error:"noManifest",names:r};let c;try{c=JSON.parse(o(a))}catch{return{error:"badManifest",names:r}}return xZ(c)?{pkg:c,names:r,plan:PZ(r,c,t)}:{error:"noMafiahub",names:r,pkg:c}}var lP=e=>!!(e?.error||e?.plan?.errors.length);var CZ=100*1024*1024,UZ=300*1024*1024,p$=6e3,ZZ=e=>e===".git"||e===".DS_Store"||e==="__MACOSX"||e==="Thumbs.db"||/^(\.env(\..+)?|server\.env|latch\.env)$/.test(e),MZ=/^\s*(?:import\s+(?:[\w*{][^'"\n]*from\s+)?['"]|export\s+(?:default\b|const\b|let\b|var\b|function\b|class\b|async\b|\{|\*))/m;function LZ(e,t){let n=ia(Object.keys(e)),i=new TextDecoder;return(t.plan?.rows??[]).filter(r=>r.kind==="encrypted"&&/\.c?js$/i.test(r.name)&&MZ.test(i.decode(e[`${n}${r.name}`]??new Uint8Array))).map(r=>r.name)}function VZ(e){let t=ia(e);return e.includes(`${t}latch.json`)&&e.includes(`${t}server.latch`)}async function mP(e,t,n,i){for(let r of await jZ(t,{withFileTypes:!0})){let o=AZ(t,r.name),a=DZ(e,o).split(RZ).join("/");if(ZZ(r.name)){i.push(a);continue}if(r.isSymbolicLink())i.push(a);else if(r.isDirectory())await mP(e,o,n,i);else if(r.isFile()&&(n[a]=new Uint8Array(await pP(o)),Object.keys(n).length>p$))throw new U("tooLarge",`The folder has more than ${p$} files.`)}}async function En(e,t={}){let n;try{n=await NZ(e)}catch{throw new U("notFound",`Nothing found at ${e}.`)}let i,r,o=[];if(n.isDirectory()){if(i={},await mP(e,e,i,o),!Object.keys(i).length)throw new U("emptyPackage",`${e} is empty.`);r=l$(i,{level:6})}else if(/\.(zip|jar)$/i.test(e)){r=new Uint8Array(await pP(e));try{i=Object.fromEntries(Object.entries(ra(r)).map(([u,l])=>[u.replace(/\\/g,"/"),l]).filter(([u])=>!u.endsWith("/")))}catch{throw new U("invalidArchive",`${e} isn't a valid zip archive.`)}let c=Object.keys(i).filter(u=>bp.test(u));if(c.length){for(let u of c)delete i[u];o.push(...c),r=l$(i,{level:6})}}else throw new U("unsupported","Pass a folder, a .zip or a .jar. Convert .rar/.7z archives to .zip first.");let a=Object.values(i).reduce((c,u)=>c+u.byteLength,0);if(r.byteLength>CZ)throw new U("tooLarge",`The package is ${FZ(r.byteLength)}; the limit is 100 MB.`);if(a>UZ||Object.keys(i).length>p$)throw new U("tooLarge","The package is too large once extracted (max 300 MB and 6,000 files).");let s=uP(i,t);return{bytes:r,fileName:n.isDirectory()?`${dP(e)}.zip`:dP(e),files:Object.keys(i).length,skipped:o,ecosystem:s.hytale?"hytale":null,alreadyProtected:VZ(Object.keys(i)),esModules:s.hytale?[]:LZ(i,s),preview:s}}var FZ=e=>`${(e/1024/1024).toFixed(1)} MB`,Wr=e=>typeof e=="string"&&e.trim()?e.trim():void 0,fP=e=>{let t=Wr(e);return t&&t.replace(/^@[^/]+\//,"").toLowerCase().replace(/[^a-z0-9-]+/g,"-").replace(/^-+|-+$/g,"").slice(0,40)||void 0};function wp(e){let t=e.preview;if(e.ecosystem==="hytale"){let r=t.manifest??{};return{script:fP(r.Name),version:Wr(r.Version),name:Wr(r.Name)?.slice(0,60),description:Wr(r.Description),ecosystem:"hytale"}}let n=t.pkg??{},i=n.latch??{};return{script:fP(i.script??n.name),version:Wr(n.version),name:Wr(i.name??n.name)?.slice(0,60),description:Wr(n.description),ecosystem:Tn(Wr(i.ecosystem)),category:Wr(i.category),tags:Array.isArray(i.tags)?i.tags.map(String):void 0}}function On(e){let t=e.preview,n=t.plan?.rows??[],i=r=>n.filter(o=>o.kind===r).length;return{ok:!lP(t)&&!e.alreadyProtected,fileName:e.fileName,size:e.bytes.byteLength,files:e.files,ecosystem:e.ecosystem??"mafiahub",error:e.alreadyProtected?m$.alreadyProtected:t.error?m$[t.error]??t.error:null,errors:(t.plan?.errors??[]).map(r=>f$(r)),warnings:[...(t.plan?.warnings??[]).map(r=>f$(r)),...e.esModules.map(r=>f$({code:"esModule",file:r}))],counts:{encrypted:i("encrypted"),sentToPlayers:i("client"),readable:i("readable"),leftOut:i("removed")},skipped:e.skipped,rows:n.filter(r=>r.kind!=="manifest").map(r=>({file:r.name,result:r.kind==="client"?r.obfuscated?"obfuscated":"sent as is":r.kind}))}}var m$={alreadyProtected:"This is already a protected Latch package. Publish the original resource, not the downloaded copy.",esModule:"{file} uses ES module syntax (import/export), which won't run once encrypted. Compile server code to CommonJS.",noManifest:"There's no package.json (or manifest.json for a Hytale plugin) at the root.",badManifest:"The manifest isn't valid JSON.",noMafiahub:'package.json has no "mafiahub" block.',noHytaleMain:`manifest.json has no "Main" field, so this isn't a Hytale plugin.`,noServerScripts:`"mafiahub.serverScripts" is empty, so there's nothing to protect.`,serverScriptMissing:"{file} is listed in serverScripts but isn't in the package.",serverScriptShipped:"{file} is a server script but is also listed for players (clientScripts, sharedScripts or files).",binary:"{file} is a program or native file. The team reviews packages that contain these.",entryNotReadable:'"{file}" in latch.ignore matches a server script. Server scripts always stay encrypted.',noMain:'manifest.json has no "Main" field.',badMain:`"Main" ({file}) isn't a valid class name.`,noClasses:"The .jar has no .class files to protect.",mainClassMissing:"The Main class {file} isn't in the .jar."},f$=e=>(m$[e.code]??e.code).replace("{file}",e.file??"");import{readdir as qZ,stat as vP}from"node:fs/promises";import{basename as jc,join as yP}from"node:path";var h$=["gameplay","economy","vehicles","ui","world","admin","other"],Oc=["mafiahub","hytale"],g$=/^\d+\.\d+\.\d+$/;async function oa(e,t){let n=t.onProgress??(()=>{}),i={keepReadable:t.keepReadable??[],...t.obfuscateClient===void 0?{}:{obfuscateClient:t.obfuscateClient}};n(`Reading ${t.path}`);let r=await En(t.path,i),o=On(r);if(!o.ok){let m=[o.error,...o.errors].filter(Boolean).join(`
|
|
79
|
+
- `);throw new U("packageBlocked",`The package can't be published:
|
|
80
|
+
- ${m}`)}let a=wp(r),s=t.script??a.script,c=t.version??a.version;if(!s)throw new U("usage","Couldn't tell the script's name from the manifest. Pass it with --script.");if(!c)throw new U("usage","The manifest has no version. Add one or pass --version.");if(!g$.test(c))throw new U("badVersion",`Version "${c}" isn't in the form 1.2.0.`);let u=await e.getScript(s).catch(m=>{if(m instanceof U&&m.code==="notFound")return null;throw m}),l={version:c,changelog:t.changelog??"",...i},d,p=!1;if(u)n(`Creating version ${c} of ${u.slug}`),d=(await e.createVersion(u.slug,l)).upload;else{let m=t.create?.name??a.name,h=t.create?.description??a.description??m,g=t.create?.ecosystem??a.ecosystem,_=g&&Tn(g);if(!m||!h||!_){let $=[!m&&"a name",!_&&`an ecosystem (${Oc.join(", ")})`].filter(Boolean).join(" and ");throw new U("scriptNotFound",`There's no script "${s}" in this workspace. To create it, also give ${$}.`)}n(`Creating script ${s}`),d=(await e.createScript({slug:s,name:m,description:h,ecosystem:_,category:t.create?.category??a.category??"other",tags:t.create?.tags??a.tags??[],...l})).upload,p=!0}if(!d)throw new U("generic","The API didn't return an upload link.");if(n(`Uploading ${r.fileName} (${(r.bytes.byteLength/1024).toFixed(0)} KB)`),await e.upload(d.url,r.bytes),t.draft)return{script:s,created:p,version:await e.getVersion(s,c),preview:o};n("Publishing");let f=await e.publishVersion(s,c);if(t.wait!==!1){n("Waiting for the build");let m=Date.now()+(t.timeoutMs??5*6e4);for(;f.status==="processing"&&Date.now()<m;)await new Promise(h=>setTimeout(h,t.pollMs??2e3)),f=await e.getVersion(s,c)}return{script:s,created:p,version:f,preview:o}}var BZ=async e=>{for(let t of["package.json","manifest.json"])if(await vP(yP(e,t)).catch(()=>null))return!0;return!1};async function HZ(e){let t;try{t=await qZ(e)}catch{throw new U("notFound",`Couldn't read the folder ${e}.`)}let n=[];for(let i of t.sort()){if(i.startsWith(".")||i==="node_modules")continue;let r=yP(e,i),o=await vP(r).catch(()=>null);(o?.isDirectory()?await BZ(r):o?.isFile()&&/\.(zip|jar)$/i.test(i))&&n.push(r)}return n}var hP=(e,t)=>{let[n,i]=[e,t].map(r=>r.split(".").map(Number));for(let r=0;r<3;r++)if(n[r]!==i[r])return n[r]-i[r];return 0};async function JZ(e,t,n){let i;try{i=await En(t)}catch(d){return{path:t,script:null,version:null,outcome:"failed",detail:d.message}}let r=i.preview,o=wp(i),a={path:t,script:o.script??null,version:o.version??null};if(i.alreadyProtected)return{...a,outcome:"skipped",detail:"already a protected package"};if(r.error==="noMafiahub"||r.error==="noHytaleMain")return{...a,outcome:"skipped",detail:"not a resource Latch can protect (no mafiahub block or Main class)"};if(r.plan?.errors.some(d=>d.code==="noServerScripts"))return{...a,outcome:"skipped",detail:"no server code; install it as it is"};let s=On(i);if(!s.ok)return{...a,outcome:"failed",detail:[s.error,...s.errors].filter(Boolean).join("; ")};if(!o.script)return{...a,outcome:"failed",detail:'the manifest has no usable name; set "latch.script"'};if(!o.version||!g$.test(o.version))return{...a,outcome:"failed",detail:`the manifest needs a version like 1.2.0 (found "${o.version??""}")`};let c=await e.getScript(o.script).catch(d=>{if(d instanceof U&&d.code==="notFound")return null;throw d});if(!c)return n.ecosystem??o.ecosystem?{...a,outcome:"would-create",isNew:!0}:{...a,outcome:"failed",detail:'new script without an ecosystem; pass --ecosystem or set "latch.ecosystem"'};let u=c.versions.find(d=>d.version===o.version);if(u?.status==="ready"||u?.status==="processing"||u?.status==="review")return{...a,outcome:"unchanged",detail:"this version is already published; raise the version to publish changes"};if(u)return{...a,outcome:"failed",detail:`version ${u.version} exists as ${u.status}; raise the version`};let l=c.versions.map(d=>d.version).sort(hP).at(-1);return l&&hP(o.version,l)<0?{...a,outcome:"failed",detail:`version is lower than ${l}`}:{...a,outcome:"would-update"}}var gP=e=>e.reduce((t,n)=>({...t,[n.outcome]:(t[n.outcome]??0)+1}),{});async function xp(e,t){let n=t.onProgress??(()=>{}),i=f=>{let m=[jc(f),jc(f).replace(/\.(zip|jar)$/i,"")];return t.only?.length&&!t.only.some(h=>m.includes(h))?!1:!t.skip?.some(h=>m.includes(h))},r=(await HZ(t.dir)).filter(f=>i(f));if(!r.length)throw new U("notFound",`No resources found in ${t.dir}.`);n(`Checking ${r.length} resources`);let o=[];for(let f of r)o.push(await JZ(e,f,t));let a=f=>f==="would-create"||f==="would-update"||f==="unchanged";for(let f of o){if(!f.script||!a(f.outcome))continue;let m=o.filter(g=>g!==f&&g.script===f.script).map(g=>jc(g.path));if(m.length){f.outcome="failed",f.isNew=!1,f.detail=`publishes to the same script as ${m.join(", ")}; set a different "latch.script"`;continue}jc(f.path).replace(/\.(zip|jar)$/i,"")!==f.script&&f.outcome!=="unchanged"&&(f.detail=`${f.detail?`${f.detail}; `:""}from ${jc(f.path)}, the manifest names this script`)}let s=o.filter(f=>f.isNew).length,{plan:c,usage:u}=await e.workspace(),l=u.limit===null?1/0:Math.max(u.limit-u.scripts,0),d=s>l?`This would create ${s} new scripts, but the ${c} plan has room for ${l} more (${u.scripts}/${u.limit} used). Upgrade the plan, or choose what to protect with --only or --skip.`:null,p=o.map(({isNew:f,...m})=>m);if(t.dryRun)return{dryRun:!0,blocked:d,results:p,counts:gP(p)};if(d)throw new U("planLimit",d);for(let f of p){if(f.outcome!=="would-create"&&f.outcome!=="would-update")continue;let m=f.outcome==="would-create";n(`${m?"Creating":"Updating"} ${f.script} ${f.version}`);try{let h=await oa(e,{path:f.path,changelog:t.changelog,pollMs:t.pollMs,create:{ecosystem:t.ecosystem,category:t.category}});h.version.status==="ready"?f.outcome=m?"created":"updated":h.version.status==="review"?(f.outcome=m?"created":"updated",f.detail="held for a check by the Latch team before anyone gets it"):(f.outcome="failed",f.detail=h.version.buildError??`the build is still ${h.version.status}`)}catch(h){f.outcome="failed",f.detail=h.message}}return{dryRun:!1,blocked:null,results:p,counts:gP(p)}}import{lstat as KZ,mkdir as _P,readdir as xP,readFile as kp,realpath as $P,rename as GZ,stat as WZ,writeFile as kP}from"node:fs/promises";import{dirname as v$,join as fi,resolve as XZ,sep as YZ}from"node:path";async function QZ(e,t,n){if(e.kind==="account"){let o=(n??await e.library()).find(a=>a.script.slug===t||a.script.id===t);if(!o)throw new U("noAccess",`${t} isn't in your Library. Ask the developer to give your account access.`);if(o.status!=="active"&&!o.own)throw new U("noAccess",`Your access to ${o.script.slug} was revoked.`);return{id:o.script.id,slug:o.script.slug,latestVersion:o.script.latestVersion,download:a=>e.downloadLibrary(o.script.slug,a)}}let i=await e.getScript(t);return{id:i.id,slug:i.slug,latestVersion:i.latestVersion,download:r=>e.downloadVersion(i.slug,r)}}var bP=e=>{try{return JSON.parse(e)}catch{return null}};async function eM(e,t){let n=fi(e,`${t.slug}.jar`);try{let i=ra(new Uint8Array(await kp(n)),{filter:o=>o.name==="latch.json"}),r=i["latch.json"]&&bP(u$(i["latch.json"]));if(t.id&&r?.scriptId===t.id&&r.version)return{version:r.version,path:n}}catch{}for(let i of await xP(e,{withFileTypes:!0}).catch(()=>[])){if(!i.isDirectory())continue;let r=bP(await kp(fi(e,i.name,"latch.json"),"utf8").catch(()=>""));if(t.id&&r?.scriptId===t.id&&r.version)return{version:r.version,path:fi(e,i.name)}}return null}async function y$(e){let t=await KZ(e).catch(()=>null);if(t?.isSymbolicLink())throw new U("linkedTarget",`${e} is a link to another folder, probably your source. Latch won't write through it. Use a separate server folder, or remove the link first.`);return t}var _$=e=>new U("notLatchFolder",`${e} exists but isn't a Latch package, so it may be your source. Install into a server folder, or pass --force to overwrite it.`);function tM(e){let t=e.split("/");if(e.includes("\\")||e.startsWith("/")||/^[A-Za-z]:/.test(e)||t.includes("..")||t.includes("."))throw new U("badPackage",`The package has an unsafe path: ${e}`);return e}async function wP(e){if(process.env.LATCH_LICENSE||process.env.LATCH_KEY)return"found";let t=e;for(let n=0;n<6;n++){for(let r of[".env","server.env","latch.env"]){let o=await kp(fi(t,r),"utf8").catch(()=>"");if(/^\s*LATCH_(LICENSE|KEY)\s*=\s*\S/m.test(o))return"found"}let i=v$(t);if(i===t)break;t=i}return"missing"}async function rM(e,t,n){let i=await y$(t);if(i&&!n){let o=!1;try{o="latch.json"in ra(new Uint8Array(await kp(t)))}catch{}if(!o)throw _$(t)}let r=`${t}.tmp`;return await kP(r,e),await GZ(r,t),{path:t,files:1,updated:!!i,kept:[]}}async function nM(e,t,n,i,r=[]){let o=Object.entries(ra(e)).filter(([p])=>!p.endsWith("/"));for(let[p]of o)tM(p);let a=ia(o.map(([p])=>p)),s=fi(t,a?a.slice(0,-1):n),c=await y$(s);if(c&&!c.isDirectory())throw _$(s);let u=!1;if(c){let p=await xP(s);if(u=p.includes("latch.json"),p.length&&!u&&!i)throw _$(s)}await _P(s,{recursive:!0});let l=await $P(s),d=[];for(let[p,f]of o){let m=p.slice(a.length),h=fi(s,m);if(await y$(h)&&Ec(r,m)){d.push(m);continue}await _P(v$(h),{recursive:!0});let _=await $P(v$(h));if(_!==l&&!_.startsWith(l+YZ))throw new U("linkedTarget",`${h} goes through a link outside the resource. Latch won't write through it.`);await kP(h,f)}return{path:s,files:o.length-d.length,updated:u,kept:d}}async function Nc(e,t){let n=t.onProgress??(()=>{}),i=XZ(t.to);if(!(await WZ(i).catch(()=>null))?.isDirectory())throw new U("notFound",`The folder ${i} doesn't exist.`);let r=await QZ(e,t.script,t.library),o=t.version??r.latestVersion;if(!o)throw new U("notReady",`${r.slug} has no published version yet.`);let a=await eM(i,r);if(a?.version===o&&!t.force)return n(`${r.slug} ${o} is already installed`),{script:r.slug,version:o,path:a.path,files:0,updated:!1,upToDate:!0,kept:[],license:await wP(i)};n(`Downloading ${r.slug} ${o}`);let{fileName:s,url:c}=await r.download(o),u=await e.fetchPackage(c),l=s.endsWith(".jar")?await rM(u,fi(i,`${r.slug}.jar`),t.force):await nM(u,i,r.slug,t.force,t.keep);return{script:r.slug,version:o,...l,license:await wP(i)}}async function SP(e,t,n){let i=n.ecosystem&&Tn(n.ecosystem),r=e.kind==="account"?await e.library():void 0,o=t!=="all"?t:r?r.filter(s=>(s.status==="active"||s.own)&&s.script.latestVersion&&(!i||s.script.ecosystem===i)).map(s=>s.script.slug):(await e.listScripts()).filter(s=>s.latestVersion&&(!i||s.ecosystem===i)).map(s=>s.slug);if(!o.length)throw new U("notFound","No published scripts to install.");let a=[];for(let s of o)try{a.push(await Nc(e,{...n,script:s,library:r}))}catch(c){let u=c instanceof U?c:new U("generic",c.message);a.push({script:s,error:{code:u.code,message:u.message}})}return{results:a}}var iM=`Latch protects and licenses game server scripts (MafiaHub resources for Arcane MP, Kingdoms Connected, Mafia 2 Online and Fallout MP, and Hytale plugins). Developers upload a package; Latch encrypts the server code and the script only runs on servers whose owners were granted access by account ID (like LA-7K2M-9QXD).
|
|
81
81
|
|
|
82
82
|
Setting Latch up on a project for the first time? Call get_guide first: it covers preparing packages, projects with many resources, installing on a server and what not to do.
|
|
83
83
|
|
|
@@ -87,7 +87,8 @@ Typical flows:
|
|
|
87
87
|
- Install on your own server: pull_version into the server's resources/ folder (mods/ for Hytale). Never point it at the source folder.
|
|
88
88
|
- Give a buyer access: grant_access with their account ID. It is safe to retry.
|
|
89
89
|
- Give a buyer several scripts at once: put them in a bundle (create_bundle), then grant_bundle. Bundles are live: scripts added later reach everyone holding the bundle.
|
|
90
|
-
- Scripts are identified by slug or id. Version numbers are semver (1.2.0) and must be higher than existing ones.`,ir=F.string().min(1).describe("Script slug or id"),$p=F.string().min(1).describe("Latch account ID the server owner shared, e.g. LA-7K2M-9QXD");function g$(e){return{content:[{type:"text",text:typeof e=="string"?e:JSON.stringify(e,null,2)}]}}function Ce(e){return async t=>{try{return g$(await e(t,new hi))}catch(n){let i=n instanceof V?n:new V("generic",n.message);return{content:[{type:"text",text:`Error (${i.code}): ${i.message}`}],isError:!0}}}}var wP=F.preprocess(e=>typeof e=="string"&&e in s$?Pn(e):e,F.enum(Pc));function KZ(){let e=new dp({name:"latch",version:gi},{instructions:JZ}),t={readOnlyHint:!0,openWorldHint:!0};e.registerTool("get_guide",{title:"Agent guide",description:"The full guide for AI agents: preparing packages, publishing, projects with many resources, installing on a server, limits and what not to do. Read it before a first setup.",annotations:{readOnlyHint:!0,openWorldHint:!1}},async()=>g$(Ac)),e.registerTool("whoami",{title:"Workspace info",description:"The workspace the API key belongs to: plan, script usage and the key's permissions.",annotations:t},Ce(async(o,a)=>a.workspace())),e.registerTool("list_scripts",{title:"List scripts",description:"All scripts in the workspace with their latest version, access and server counts.",annotations:t},Ce(async(o,a)=>a.listScripts())),e.registerTool("get_script",{title:"Get script",description:"A script and all its versions with build status.",inputSchema:{script:ir},annotations:t},Ce(async({script:o},a)=>a.getScript(o))),e.registerTool("preview_package",{title:"Preview package",description:"Check a local folder, .zip or .jar before publishing: which files get encrypted, sent to players, stay readable or are left out, plus any blocking problems. Uploads nothing.",inputSchema:{path:F.string().describe("Absolute path to the resource folder, .zip or .jar"),keepReadable:F.array(F.string()).optional().describe("Server files to leave readable, e.g. config.json"),obfuscateClient:F.boolean().optional().describe("Obfuscate client JavaScript (default true)")},annotations:{readOnlyHint:!0,openWorldHint:!1}},async({path:o,keepReadable:a,obfuscateClient:s})=>{try{return g$(On(await Tn(o,{keepReadable:a,obfuscateClient:s})))}catch(c){let u=c instanceof V?c:new V("generic",c.message);return{content:[{type:"text",text:`Error (${u.code}): ${u.message}`}],isError:!0}}}),e.registerTool("publish_version",{title:"Publish a version",description:"Package a local folder (or .zip/.jar), upload it as a new version and publish it, then wait for the build. Script and version default to the package's manifest. If the script doesn't exist yet, it is created (it needs an ecosystem, here or as latch.ecosystem in package.json). Everyone with access is notified when the version is ready.",inputSchema:{path:F.string().describe("Absolute path to the resource folder, .zip or .jar"),script:ir.optional().describe("Script slug or id. Default: latch.script or name from the manifest"),version:F.string().regex(/^\d+\.\d+\.\d+$/).optional().describe("Semver version, higher than existing ones, e.g. 1.2.0. Default: version from the manifest"),changelog:F.string().max(5e3).optional().describe("What changed; shown to everyone with access"),draft:F.boolean().optional().describe("Upload without publishing"),keepReadable:F.array(F.string()).optional().describe("Server files to leave readable"),obfuscateClient:F.boolean().optional().describe("Obfuscate client JavaScript (default true)"),name:F.string().max(60).optional().describe("Only when creating a new script"),description:F.string().max(5e3).optional().describe("Only when creating a new script"),ecosystem:wP.optional().describe("Only when creating a new script"),category:F.enum(d$).optional().describe("Only when creating a new script"),tags:F.array(F.string().max(30)).max(20).optional().describe("Only when creating a new script")},annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!0}},Ce(async(o,a)=>{let s=await ra(a,{...o,create:{name:o.name,description:o.description,ecosystem:o.ecosystem,category:o.category,tags:o.tags}});return{script:s.script,created:s.created,version:s.version,counts:s.preview.counts,warnings:s.preview.warnings}})),e.registerTool("publish_all",{title:"Publish a folder of resources",description:"Publish every resource found in a folder, using each manifest's name and version. Safe to rerun: published versions are skipped, and one failure doesn't stop the others. Resources with no server code are skipped, because they install as they are. Run with dryRun first and show the result: new scripts count against the plan's limit.",inputSchema:{dir:F.string().describe("Absolute path to the folder that holds the resource folders"),dryRun:F.boolean().optional().describe("Report what would happen without changing anything"),only:F.array(F.string()).optional().describe("Only these folder names"),skip:F.array(F.string()).optional().describe("Leave out these folder names"),changelog:F.string().max(5e3).optional(),ecosystem:wP.optional().describe("For new scripts without latch.ecosystem in package.json"),category:F.enum(d$).optional().describe("For new scripts")},annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!0}},Ce(async(o,a)=>yp(a,o))),e.registerTool("pull_version",{title:"Install a protected package",description:"Download a version's protected package and install it into a server folder: resources/ for MafiaHub, mods/ for Hytale. Refuses to write through a link or over a folder that isn't a Latch package, so source folders stay safe. Files in the package replace the ones on the server. The result says whether a license key was found near the folder. With an account key (lta_) it installs from your Library; a version already installed is skipped.",inputSchema:{script:ir,to:F.string().describe("Absolute path to the server's resources/ (or mods/) folder"),version:F.string().optional().describe("Default: the newest ready version"),keep:F.array(F.string()).optional().describe("Files already on the server that must not be overwritten, e.g. config.json")},annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!0}},Ce(async(o,a)=>Oc(a,o))),e.registerTool("get_version_status",{title:"Version status",description:"Build status of a version: processing, ready or error (with buildError).",inputSchema:{script:ir,version:F.string()},annotations:t},Ce(async({script:o,version:a},s)=>s.getVersion(o,a))),e.registerTool("withdraw_version",{title:"Withdraw a version",description:"Hide a version from downloads. Servers already running it keep running.",inputSchema:{script:ir,version:F.string()},annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!0}},Ce(async({script:o,version:a},s)=>s.withdrawVersion(o,a))),e.registerTool("list_access",{title:"List access",description:"Accounts that have (or had) access to a script.",inputSchema:{script:ir,status:F.enum(["active","revoked"]).optional(),limit:F.number().int().min(1).max(500).optional(),offset:F.number().int().min(0).optional()},annotations:t},Ce(async({script:o,...a},s)=>s.listGrants(o,a))),e.registerTool("grant_access",{title:"Grant access",description:"Give one or more accounts access to a script on all their servers. Safe to retry: accounts that already have access are reported, not duplicated. More than one account at a time needs the Studio plan.",inputSchema:{script:ir,accountIds:F.array($p).min(1).max(100)},annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!0}},Ce(async({script:o,accountIds:a},s)=>{let c=[...new Set(a)];return c.length===1?s.grant(o,c[0]):s.grantBulk(o,c)})),e.registerTool("revoke_access",{title:"Revoke access",description:"Remove an account's access. The script stops on their servers at the next license check; the servers keep running.",inputSchema:{script:ir,accountId:$p},annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!0}},Ce(async({script:o,accountId:a},s)=>s.revoke(o,a)));let n=F.string().min(1).describe("Bundle id or exact name"),i=F.array(F.string().min(1)).min(1).max(200).describe("Script slugs or ids from this workspace"),r={readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!0};return e.registerTool("get_listing",{title:"Explore listing",description:"Whether the script is listed on Explore, free to use, its listing text, 30-day views and free adds.",inputSchema:{script:ir},annotations:t},Ce(async({script:o},a)=>a.getListing(o))),e.registerTool("update_listing",{title:"Update Explore listing",description:"Show the script on the workspace's public Explore page (Pro and above, studio page turned on in workspace settings), make it free to use (anyone signed in can add it to their Library in one click; turning it off stops new adds, existing access stays) or set the listing text in Markdown.",inputSchema:{script:ir,listed:F.boolean().optional(),free:F.boolean().optional(),about:F.string().max(8e3).optional().describe("Markdown: headings, lists, links, code")},annotations:{readOnlyHint:!1,destructiveHint:!1,openWorldHint:!0}},Ce(async({script:o,...a},s)=>s.updateListing(o,a))),e.registerTool("list_bundles",{title:"List bundles",description:"Bundles of the workspace: each groups scripts so an account can get all of them at once.",annotations:t},Ce(async(o,a)=>a.listBundles())),e.registerTool("create_bundle",{title:"Create a bundle",description:"Group scripts under a name. Nobody gets access until you grant the bundle.",inputSchema:{name:F.string().min(1).max(60),scripts:i},annotations:{readOnlyHint:!1,destructiveHint:!1,openWorldHint:!0}},Ce(async({name:o,scripts:a},s)=>s.createBundle(o,a))),e.registerTool("update_bundle",{title:"Update a bundle",description:"Rename a bundle or replace its script list. Bundles are live: added scripts reach every account holding the bundle; removed scripts are taken from them unless they have them directly or through another bundle.",inputSchema:{bundle:n,name:F.string().min(1).max(60).optional(),scripts:i.optional()},annotations:{readOnlyHint:!1,destructiveHint:!1,openWorldHint:!0}},Ce(async({bundle:o,...a},s)=>s.updateBundle(o,a))),e.registerTool("delete_bundle",{title:"Delete a bundle",description:"Accounts holding the bundle lose its scripts unless they have them directly or through another bundle.",inputSchema:{bundle:n},annotations:r},Ce(async({bundle:o},a)=>a.deleteBundle(o))),e.registerTool("list_bundle_access",{title:"Bundle holders",description:"Accounts that hold (or held) a bundle.",inputSchema:{bundle:n,status:F.enum(["active","revoked"]).optional(),limit:F.number().int().min(1).max(500).optional(),offset:F.number().int().min(0).optional()},annotations:t},Ce(async({bundle:o,...a},s)=>s.listBundleGrants(o,a))),e.registerTool("grant_bundle",{title:"Grant a bundle",description:"Give one or more accounts every script in a bundle, now and as the bundle changes. Each account gets one email. Safe to retry; one failing account doesn't stop the others.",inputSchema:{bundle:n,accountIds:F.array($p).min(1).max(100)},annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!0}},Ce(async({bundle:o,accountIds:a},s)=>{let c=[];for(let u of[...new Set(a)])try{c.push({accountId:u,ok:!0,...await s.grantBundle(o,u)})}catch(l){if(!(l instanceof V))throw l;c.push({accountId:u,ok:!1,error:{code:l.code,message:l.message}})}return{results:c}})),e.registerTool("revoke_bundle",{title:"Revoke a bundle",description:"Take a bundle away from an account. Its scripts stop on their servers at the next license check, except ones they have directly or through another bundle.",inputSchema:{bundle:n,accountId:$p},annotations:r},Ce(async({bundle:o,accountId:a},s)=>s.revokeBundle(o,a))),e.registerTool("list_activations",{title:"Running servers",description:"Servers currently running the script.",inputSchema:{script:ir,limit:F.number().int().min(1).max(500).optional(),offset:F.number().int().min(0).optional()},annotations:t},Ce(async({script:o,...a},s)=>s.listActivations(o,a))),e.registerTool("list_flags",{title:"Key-sharing flags",description:"Flags raised when one license key ran on two servers at once.",inputSchema:{script:ir,status:F.enum(["open","investigating","resolved","dismissed"]).optional()},annotations:t},Ce(async({script:o,status:a},s)=>s.listFlags(o,{status:a}))),e.registerTool("resolve_flag",{title:"Resolve flag",description:"Mark a key-sharing flag as resolved.",inputSchema:{flagId:F.string()},annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!0}},Ce(async({flagId:o},a)=>a.resolveFlag(o))),e}async function kP(){await KZ().connect(new pp)}var XZ=`latch ${gi}: publish and manage Latch scripts
|
|
90
|
+
- Show a script on Explore (Pro and above): the studio page must be on (update_studio with public true), the script needs a gallery image (add_image), then update_listing with listed true.
|
|
91
|
+
- Scripts are identified by slug or id. Version numbers are semver (1.2.0) and must be higher than existing ones.`,kt=C.string().min(1).describe("Script slug or id"),Sp=C.string().min(1).describe("Latch account ID the server owner shared, e.g. LA-7K2M-9QXD");function $$(e){return{content:[{type:"text",text:typeof e=="string"?e:JSON.stringify(e,null,2)}]}}function Te(e){return async t=>{try{return $$(await e(t,new gi))}catch(n){let i=n instanceof U?n:new U("generic",n.message);return{content:[{type:"text",text:`Error (${i.code}): ${i.message}`}],isError:!0}}}}var IP=C.preprocess(e=>typeof e=="string"&&e in d$?Tn(e):e,C.enum(Oc));function oM(){let e=new gp({name:"latch",version:vi},{instructions:iM}),t={readOnlyHint:!0,openWorldHint:!0};e.registerTool("get_guide",{title:"Agent guide",description:"The full guide for AI agents: preparing packages, publishing, projects with many resources, installing on a server, limits and what not to do. Read it before a first setup.",annotations:{readOnlyHint:!0,openWorldHint:!1}},async()=>$$(Uc)),e.registerTool("whoami",{title:"Workspace info",description:"The workspace the API key belongs to: plan, script usage and the key's permissions.",annotations:t},Te(async(a,s)=>s.workspace())),e.registerTool("list_scripts",{title:"List scripts",description:"All scripts in the workspace with their latest version, access and server counts.",annotations:t},Te(async(a,s)=>s.listScripts())),e.registerTool("get_script",{title:"Get script",description:"A script and all its versions with build status.",inputSchema:{script:kt},annotations:t},Te(async({script:a},s)=>s.getScript(a))),e.registerTool("preview_package",{title:"Preview package",description:"Check a local folder, .zip or .jar before publishing: which files get encrypted, sent to players, stay readable or are left out, plus any blocking problems. Uploads nothing.",inputSchema:{path:C.string().describe("Absolute path to the resource folder, .zip or .jar"),keepReadable:C.array(C.string()).optional().describe("Server files to leave readable, e.g. config.json"),obfuscateClient:C.boolean().optional().describe("Obfuscate client JavaScript (default true)")},annotations:{readOnlyHint:!0,openWorldHint:!1}},async({path:a,keepReadable:s,obfuscateClient:c})=>{try{return $$(On(await En(a,{keepReadable:s,obfuscateClient:c})))}catch(u){let l=u instanceof U?u:new U("generic",u.message);return{content:[{type:"text",text:`Error (${l.code}): ${l.message}`}],isError:!0}}}),e.registerTool("publish_version",{title:"Publish a version",description:"Package a local folder (or .zip/.jar), upload it as a new version and publish it, then wait for the build. Script and version default to the package's manifest. If the script doesn't exist yet, it is created (it needs an ecosystem, here or as latch.ecosystem in package.json). Everyone with access is notified when the version is ready.",inputSchema:{path:C.string().describe("Absolute path to the resource folder, .zip or .jar"),script:kt.optional().describe("Script slug or id. Default: latch.script or name from the manifest"),version:C.string().regex(/^\d+\.\d+\.\d+$/).optional().describe("Semver version, higher than existing ones, e.g. 1.2.0. Default: version from the manifest"),changelog:C.string().max(5e3).optional().describe("What changed; shown to everyone with access"),draft:C.boolean().optional().describe("Upload without publishing"),keepReadable:C.array(C.string()).optional().describe("Server files to leave readable"),obfuscateClient:C.boolean().optional().describe("Obfuscate client JavaScript (default true)"),name:C.string().max(60).optional().describe("Only when creating a new script"),description:C.string().max(5e3).optional().describe("Only when creating a new script"),ecosystem:IP.optional().describe("Only when creating a new script"),category:C.enum(h$).optional().describe("Only when creating a new script"),tags:C.array(C.string().max(30)).max(20).optional().describe("Only when creating a new script")},annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!0}},Te(async(a,s)=>{let c=await oa(s,{...a,create:{name:a.name,description:a.description,ecosystem:a.ecosystem,category:a.category,tags:a.tags}});return{script:c.script,created:c.created,version:c.version,counts:c.preview.counts,warnings:c.preview.warnings}})),e.registerTool("publish_all",{title:"Publish a folder of resources",description:"Publish every resource found in a folder, using each manifest's name and version. Safe to rerun: published versions are skipped, and one failure doesn't stop the others. Resources with no server code are skipped, because they install as they are. Run with dryRun first and show the result: new scripts count against the plan's limit.",inputSchema:{dir:C.string().describe("Absolute path to the folder that holds the resource folders"),dryRun:C.boolean().optional().describe("Report what would happen without changing anything"),only:C.array(C.string()).optional().describe("Only these folder names"),skip:C.array(C.string()).optional().describe("Leave out these folder names"),changelog:C.string().max(5e3).optional(),ecosystem:IP.optional().describe("For new scripts without latch.ecosystem in package.json"),category:C.enum(h$).optional().describe("For new scripts")},annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!0}},Te(async(a,s)=>xp(s,a))),e.registerTool("pull_version",{title:"Install a protected package",description:"Download a version's protected package and install it into a server folder: resources/ for MafiaHub, mods/ for Hytale. Refuses to write through a link or over a folder that isn't a Latch package, so source folders stay safe. Files in the package replace the ones on the server. The result says whether a license key was found near the folder. With an account key (lta_) it installs from your Library; a version already installed is skipped.",inputSchema:{script:kt,to:C.string().describe("Absolute path to the server's resources/ (or mods/) folder"),version:C.string().optional().describe("Default: the newest ready version"),keep:C.array(C.string()).optional().describe("Files already on the server that must not be overwritten, e.g. config.json")},annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!0}},Te(async(a,s)=>Nc(s,a))),e.registerTool("get_version_status",{title:"Version status",description:"Build status of a version: processing, review (held for a check by the Latch team), ready or error (with buildError).",inputSchema:{script:kt,version:C.string()},annotations:t},Te(async({script:a,version:s},c)=>c.getVersion(a,s))),e.registerTool("withdraw_version",{title:"Withdraw a version",description:"Hide a version from downloads. Servers already running it keep running.",inputSchema:{script:kt,version:C.string()},annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!0}},Te(async({script:a,version:s},c)=>c.withdrawVersion(a,s))),e.registerTool("list_access",{title:"List access",description:"Accounts that have (or had) access to a script.",inputSchema:{script:kt,status:C.enum(["active","revoked"]).optional(),limit:C.number().int().min(1).max(500).optional(),offset:C.number().int().min(0).optional()},annotations:t},Te(async({script:a,...s},c)=>c.listGrants(a,s))),e.registerTool("grant_access",{title:"Grant access",description:"Give one or more accounts access to a script on all their servers. Safe to retry: accounts that already have access are reported, not duplicated. More than one account at a time needs the Studio plan.",inputSchema:{script:kt,accountIds:C.array(Sp).min(1).max(100)},annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!0}},Te(async({script:a,accountIds:s},c)=>{let u=[...new Set(s)];return u.length===1?c.grant(a,u[0]):c.grantBulk(a,u)})),e.registerTool("revoke_access",{title:"Revoke access",description:"Remove an account's access. The script stops on their servers at the next license check; the servers keep running.",inputSchema:{script:kt,accountId:Sp},annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!0}},Te(async({script:a,accountId:s},c)=>c.revoke(a,s)));let n=C.string().min(1).describe("Bundle id or exact name"),i=C.array(C.string().min(1)).min(1).max(200).describe("Script slugs or ids from this workspace"),r={readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!0};e.registerTool("get_listing",{title:"Explore listing",description:"Whether the script is listed on Explore, free to use, its listing text, 30-day views and free adds.",inputSchema:{script:kt},annotations:t},Te(async({script:a},s)=>s.getListing(a))),e.registerTool("update_listing",{title:"Update Explore listing",description:"Show the script on the workspace's public Explore page (Pro and above, studio page turned on with update_studio, at least one gallery image), make it free to use (anyone signed in can add it to their Library in one click; turning it off stops new adds, existing access stays) or set the listing text in Markdown.",inputSchema:{script:kt,listed:C.boolean().optional(),free:C.boolean().optional(),about:C.string().max(8e3).optional().describe("Markdown: headings, lists, tables, links, code")},annotations:{readOnlyHint:!1,destructiveHint:!1,openWorldHint:!0}},Te(async({script:a,...s},c)=>c.updateListing(a,s)));let o=C.string().describe("Absolute path to a .png, .jpg or .webp file, up to 4 MB");return e.registerTool("list_images",{title:"List gallery images",description:"A script's gallery images in order; the first is its cover on Explore. A script needs at least one to be listed.",inputSchema:{script:kt},annotations:t},Te(async({script:a},s)=>s.listImages(a))),e.registerTool("add_image",{title:"Add gallery images",description:`Upload local images to the end of a script's gallery (up to ${Dr} per script). Every file is checked before anything is uploaded. A script needs at least one image to be listed on Explore.`,inputSchema:{script:kt,paths:C.array(o).min(1).max(Dr)},annotations:{readOnlyHint:!1,destructiveHint:!1,openWorldHint:!0}},Te(async({script:a,paths:s},c)=>Zc(c,a,s))),e.registerTool("remove_image",{title:"Remove a gallery image",description:"Remove an image by its id (from list_images). Removing a listed script's last image takes its page off Explore.",inputSchema:{script:kt,image:C.string().min(1).describe("Image id")},annotations:r},Te(async({script:a,image:s},c)=>c.removeImage(a,s))),e.registerTool("get_studio",{title:"Explore studio page",description:"The workspace's public studio page on Explore: whether it's on and live, its text, links, banner and pinned script, and each published script's Explore state.",annotations:t},Te(async(a,s)=>s.getStudio())),e.registerTool("update_studio",{title:"Update studio page",description:"Pro and above. Turn the studio page on or off (public), or change its tagline, Markdown about text, links, accent, banner, pinned script or usage numbers. Send only what changes.",inputSchema:{public:C.boolean().optional().describe("Show on Explore. Off hides the studio page and every listed script; access people have isn't affected."),tagline:C.string().max(80).optional(),about:C.string().max(4e3).optional().describe("Markdown: headings, lists, tables, links, code"),website:C.string().max(300).optional().describe("https:// address; empty string removes it"),discord:C.string().max(300).optional().describe("discord.gg or discord.com invite; empty string removes it"),accent:C.enum(yi).optional(),bannerPath:o.nullable().optional().describe("Absolute path to the banner image (.png, .jpg or .webp, up to 4 MB), or null to remove the banner"),pinnedScript:C.string().min(1).nullable().optional().describe("Script slug or id to pin, or null to unpin"),showStats:C.boolean().optional().describe("Show how many accounts use the scripts and how many servers run them")},annotations:{readOnlyHint:!1,destructiveHint:!1,openWorldHint:!0}},Te(async({bannerPath:a,...s},c)=>c.updateStudio({...s,...a!==void 0?{banner:a&&await la(a)}:{}}))),e.registerTool("list_bundles",{title:"List bundles",description:"Bundles of the workspace: each groups scripts so an account can get all of them at once.",annotations:t},Te(async(a,s)=>s.listBundles())),e.registerTool("create_bundle",{title:"Create a bundle",description:"Group scripts under a name. Nobody gets access until you grant the bundle.",inputSchema:{name:C.string().min(1).max(60),scripts:i},annotations:{readOnlyHint:!1,destructiveHint:!1,openWorldHint:!0}},Te(async({name:a,scripts:s},c)=>c.createBundle(a,s))),e.registerTool("update_bundle",{title:"Update a bundle",description:"Rename a bundle or replace its script list. Bundles are live: added scripts reach every account holding the bundle; removed scripts are taken from them unless they have them directly or through another bundle.",inputSchema:{bundle:n,name:C.string().min(1).max(60).optional(),scripts:i.optional()},annotations:{readOnlyHint:!1,destructiveHint:!1,openWorldHint:!0}},Te(async({bundle:a,...s},c)=>c.updateBundle(a,s))),e.registerTool("delete_bundle",{title:"Delete a bundle",description:"Accounts holding the bundle lose its scripts unless they have them directly or through another bundle.",inputSchema:{bundle:n},annotations:r},Te(async({bundle:a},s)=>s.deleteBundle(a))),e.registerTool("list_bundle_access",{title:"Bundle holders",description:"Accounts that hold (or held) a bundle.",inputSchema:{bundle:n,status:C.enum(["active","revoked"]).optional(),limit:C.number().int().min(1).max(500).optional(),offset:C.number().int().min(0).optional()},annotations:t},Te(async({bundle:a,...s},c)=>c.listBundleGrants(a,s))),e.registerTool("grant_bundle",{title:"Grant a bundle",description:"Give one or more accounts every script in a bundle, now and as the bundle changes. Each account gets one email. Safe to retry; one failing account doesn't stop the others.",inputSchema:{bundle:n,accountIds:C.array(Sp).min(1).max(100)},annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!0}},Te(async({bundle:a,accountIds:s},c)=>{let u=[];for(let l of[...new Set(s)])try{u.push({accountId:l,ok:!0,...await c.grantBundle(a,l)})}catch(d){if(!(d instanceof U))throw d;u.push({accountId:l,ok:!1,error:{code:d.code,message:d.message}})}return{results:u}})),e.registerTool("revoke_bundle",{title:"Revoke a bundle",description:"Take a bundle away from an account. Its scripts stop on their servers at the next license check, except ones they have directly or through another bundle.",inputSchema:{bundle:n,accountId:Sp},annotations:r},Te(async({bundle:a,accountId:s},c)=>c.revokeBundle(a,s))),e.registerTool("list_activations",{title:"Running servers",description:"Servers currently running the script.",inputSchema:{script:kt,limit:C.number().int().min(1).max(500).optional(),offset:C.number().int().min(0).optional()},annotations:t},Te(async({script:a,...s},c)=>c.listActivations(a,s))),e.registerTool("list_flags",{title:"Key-sharing flags",description:"Flags raised when one license key ran on two servers at once.",inputSchema:{script:kt,status:C.enum(["open","investigating","resolved","dismissed"]).optional()},annotations:t},Te(async({script:a,status:s},c)=>c.listFlags(a,{status:s}))),e.registerTool("resolve_flag",{title:"Resolve flag",description:"Mark a key-sharing flag as resolved.",inputSchema:{flagId:C.string()},annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!0}},Te(async({flagId:a},s)=>s.resolveFlag(a))),e}async function zP(){await oM().connect(new yp)}var sM=`latch ${vi}: publish and manage Latch scripts
|
|
91
92
|
|
|
92
93
|
Usage
|
|
93
94
|
latch guide Print the full guide for AI agents
|
|
@@ -102,6 +103,10 @@ Usage
|
|
|
102
103
|
latch grant <script> <accountId...> Give accounts access (safe to retry)
|
|
103
104
|
latch revoke <script> <accountId> Remove an account's access
|
|
104
105
|
latch listing <script> [options] Show or change the script's Explore listing
|
|
106
|
+
latch images <script> List the script's gallery images (the first is its Explore cover)
|
|
107
|
+
latch images <script> --add <file...> Upload .png, .jpg or .webp images (up to 4 MB each, ${Dr} per script)
|
|
108
|
+
latch images <script> --remove <id...>
|
|
109
|
+
latch studio [options] Show or change the workspace's Explore studio page
|
|
105
110
|
latch bundles List bundles (groups of scripts given as one)
|
|
106
111
|
latch bundle <action> ... Manage a bundle, see Bundle actions
|
|
107
112
|
latch withdraw <script> <version> Hide a version from downloads
|
|
@@ -115,7 +120,7 @@ Publish options
|
|
|
115
120
|
--no-wait Don't wait for the build to finish
|
|
116
121
|
--keep-readable <a,b> Server files to leave readable
|
|
117
122
|
--no-obfuscate-client Ship client JavaScript without obfuscation
|
|
118
|
-
For a new script: --ecosystem ${
|
|
123
|
+
For a new script: --ecosystem ${Oc.join("|")} (or "latch.ecosystem")
|
|
119
124
|
--name <name> --description <text> --category <c> --tags a,b (default: from the manifest)
|
|
120
125
|
|
|
121
126
|
Publish-all options
|
|
@@ -123,10 +128,20 @@ Publish-all options
|
|
|
123
128
|
--only <a,b> --skip <a,b> Limit by folder name
|
|
124
129
|
--ecosystem <e> --category <c> --changelog <text>
|
|
125
130
|
|
|
126
|
-
Listing options (Pro and above; turn the studio page on
|
|
131
|
+
Listing options (Pro and above; turn the studio page on with "latch studio --show" and add an image first)
|
|
127
132
|
--list | --unlist Show or hide the script on Explore (access people have isn't affected)
|
|
128
133
|
--free | --no-free One-click adds for anyone signed in; turning it off keeps existing access
|
|
129
|
-
--about <file.md> Listing text in Markdown (headings, lists, links, code; no HTML or images)
|
|
134
|
+
--about <file.md> Listing text in Markdown (headings, lists, tables, links, code; no HTML or images)
|
|
135
|
+
|
|
136
|
+
Studio options (Pro and above; a script shows on Explore once it's listed and has an image)
|
|
137
|
+
--show | --hide Turn the studio page on or off (off hides every listed script too)
|
|
138
|
+
--tagline <text> One line on the studio card (up to 80 characters)
|
|
139
|
+
--about <file.md> Studio page text in Markdown
|
|
140
|
+
--website <url> --discord <invite> https:// links; pass "" to remove one
|
|
141
|
+
--accent <color> ${yi.join(", ")}
|
|
142
|
+
--banner <file> | --no-banner
|
|
143
|
+
--pin <script> | --unpin Script shown first and larger on the studio page
|
|
144
|
+
--stats | --no-stats Show or hide usage numbers (accounts and servers)
|
|
130
145
|
|
|
131
146
|
Bundle actions (<bundle> is the bundle's id or exact name)
|
|
132
147
|
latch bundle create <name> <script...> New bundle; nobody gets access until you grant it
|
|
@@ -154,21 +169,24 @@ Global
|
|
|
154
169
|
LATCH_API_URL API base URL (default https://api.heylatch.app)
|
|
155
170
|
|
|
156
171
|
[path] is a resource folder, a .zip or a .jar (default: this folder). Folders are zipped without .git and .env files.
|
|
157
|
-
Docs: https://heylatch.app/docs/automation \xB7 Agent guide: https://heylatch.app/agents.md`,{values:
|
|
158
|
-
`);function
|
|
159
|
-
`)),r.ok||(process.exitCode=1);return}let n=new
|
|
160
|
-
${o.length} scripts in your Library${a?`, ${a} with an update`:""}. Install them with: latch pull --all --to <dir>`)}let i=await n.workspace();return
|
|
161
|
-
Key "${i.apiKey.name}": ${i.apiKey.scopes.join(", ")||"no permissions"}`)}if(e==="scripts"){let i=await n.listScripts();return
|
|
162
|
-
`):"No scripts yet.")}if(e==="publish"){let i=await
|
|
163
|
-
`)),(i.blocked||i.results.some(r=>r.outcome==="failed"))&&(process.exitCode=1);return}if(e==="pull"){let i=
|
|
164
|
-
`))}if(
|
|
165
|
-
`)}),c.results.some(u=>"error"in u)&&(process.exitCode=1);return}if(e==="status"){let i=
|
|
166
|
-
${o.buildError}`:""}`)}let r=await n.getScript(i);return
|
|
167
|
-
`))}if(e==="access"){let i=
|
|
168
|
-
`):"Nobody has access yet.")}if(e==="grant"){let i=
|
|
169
|
-
`)),o.results.some(a=>!a.ok)&&(process.exitCode=1);return}if(e==="revoke"){let i=await n.revoke(
|
|
172
|
+
Docs: https://heylatch.app/docs/automation \xB7 Agent guide: https://heylatch.app/agents.md`,{values:O,positionals:cM}=aM({allowPositionals:!0,options:{script:{type:"string"},version:{type:"string"},changelog:{type:"string"},draft:{type:"boolean"},"no-wait":{type:"boolean"},"keep-readable":{type:"string"},"no-obfuscate-client":{type:"boolean"},name:{type:"string"},description:{type:"string"},ecosystem:{type:"string"},category:{type:"string"},tags:{type:"string"},status:{type:"string"},to:{type:"string"},all:{type:"boolean"},force:{type:"boolean"},keep:{type:"string"},only:{type:"string"},skip:{type:"string"},"dry-run":{type:"boolean"},list:{type:"boolean"},unlist:{type:"boolean"},free:{type:"boolean"},"no-free":{type:"boolean"},about:{type:"string"},add:{type:"string",multiple:!0},remove:{type:"string",multiple:!0},show:{type:"boolean"},hide:{type:"boolean"},tagline:{type:"string"},website:{type:"string"},discord:{type:"string"},accent:{type:"string"},banner:{type:"string"},"no-banner":{type:"boolean"},pin:{type:"string"},unpin:{type:"boolean"},stats:{type:"boolean"},"no-stats":{type:"boolean"},json:{type:"boolean"},help:{type:"boolean",short:"h"},version_:{type:"boolean",short:"v"}}}),aa=e=>e?e.split(",").map(t=>t.trim()).filter(Boolean):void 0,Ee=(e,t)=>console.log(O.json?JSON.stringify(e,null,2):t()),Ac=e=>process.stderr.write(`${e}
|
|
173
|
+
`);function Be(e,t){if(!e)throw new U("usage",`Missing ${t}. Run "latch --help".`);return e}async function uM(){let[e,...t]=cM;if(O.help||!e||e==="help")return console.log(sM);if(O.version_||e==="version")return console.log(vi);if(e==="mcp")return zP();if(e==="guide")return console.log(Uc);if(e==="preview"){let i=await En(t[0]??".",{keepReadable:aa(O["keep-readable"])??[],...O["no-obfuscate-client"]?{obfuscateClient:!1}:{}}),r=On(i);Ee(r,()=>[`${r.fileName}: ${r.files} files, ${(r.size/1024).toFixed(0)} KB (${r.ecosystem})`,` encrypted ${r.counts.encrypted} \xB7 sent to players ${r.counts.sentToPlayers} \xB7 readable ${r.counts.readable} \xB7 left out ${r.counts.leftOut}`,...r.skipped.length?[` not packed: ${r.skipped.join(", ")}`]:[],...[r.error,...r.errors].filter(Boolean).map(o=>` error: ${o}`),...r.warnings.map(o=>` warning: ${o}`),r.ok?"Ready to publish.":"Fix the errors above before publishing."].join(`
|
|
174
|
+
`)),r.ok||(process.exitCode=1);return}let n=new gi;if(e==="whoami"){if(n.kind==="account"){let r=await n.account(),o=await n.library(),a=o.filter(s=>s.updateAvailable).length;return Ee({...r,library:o},()=>`${r.displayName} (${r.accountId}) \xB7 account key "${r.apiKey.name}"
|
|
175
|
+
${o.length} scripts in your Library${a?`, ${a} with an update`:""}. Install them with: latch pull --all --to <dir>`)}let i=await n.workspace();return Ee(i,()=>`${i.name} (${i.slug}) \xB7 ${i.plan} plan \xB7 ${i.usage.scripts}/${i.usage.limit??"\u221E"} scripts
|
|
176
|
+
Key "${i.apiKey.name}": ${i.apiKey.scopes.join(", ")||"no permissions"}`)}if(e==="scripts"){let i=await n.listScripts();return Ee(i,()=>i.length?i.map(r=>`${r.slug.padEnd(28)} ${(r.latestVersion??"-").padEnd(10)} ${r.status.padEnd(10)} ${r.grantCount} with access \xB7 ${r.activationCount} servers`).join(`
|
|
177
|
+
`):"No scripts yet.")}if(e==="publish"){let i=await oa(n,{path:t[0]??".",script:O.script,version:O.version,changelog:O.changelog,draft:O.draft,wait:!O["no-wait"],keepReadable:aa(O["keep-readable"]),...O["no-obfuscate-client"]?{obfuscateClient:!1}:{},create:{name:O.name,description:O.description,ecosystem:O.ecosystem,category:O.category,tags:aa(O.tags)},onProgress:O.json?void 0:o=>Ac(`\xB7 ${o}`)}),r=i.version;Ee(i,()=>r.status==="ready"?`Published ${i.script} ${r.version}. Everyone with access is notified.`:r.status==="error"?`Build failed for ${i.script} ${r.version}: ${r.buildError??"unknown error"}`:r.status==="draft"?`Uploaded ${i.script} ${r.version} as a draft.`:r.status==="review"?`${i.script} ${r.version} is built and held for a check by the Latch team before anyone gets it. You'll see it go live in the dashboard, or check with: latch status ${i.script} ${r.version}`:`${i.script} ${r.version} is ${r.status}. Check later with: latch status ${i.script} ${r.version}`),r.status==="error"&&(process.exitCode=1);return}if(e==="publish-all"){let i=await xp(n,{dir:Be(t[0],"<dir>"),only:aa(O.only),skip:aa(O.skip),changelog:O.changelog,ecosystem:O.ecosystem,category:O.category,dryRun:O["dry-run"],onProgress:O.json?void 0:r=>Ac(`\xB7 ${r}`)});Ee(i,()=>[...i.results.map(r=>`${r.outcome.padEnd(13)} ${(r.script??r.path).padEnd(28)} ${(r.version??"-").padEnd(10)} ${r.detail??""}`.trimEnd()),"",Object.entries(i.counts).map(([r,o])=>`${o} ${r}`).join(" \xB7 "),...i.blocked?[i.blocked]:[]].join(`
|
|
178
|
+
`)),(i.blocked||i.results.some(r=>r.outcome==="failed"))&&(process.exitCode=1);return}if(e==="pull"){let i=Be(O.to,"--to"),r=aa(O.keep),o=u=>u.upToDate?`Up to date ${u.script} ${u.version}`:`${u.updated?"Updated":"Installed"} ${u.script} ${u.version} in ${u.path}${u.kept.length?` (kept ${u.kept.join(", ")})`:""}`,a="No LATCH_LICENSE found near this folder. The script won't start until the server has a key: https://heylatch.app/app/keys",s=O.json?void 0:u=>Ac(`\xB7 ${u}`);if(t.length===1&&!O.all){let u=await Nc(n,{script:t[0],version:O.version,to:i,force:O.force,keep:r,onProgress:s});return Ee(u,()=>[o(u),u.license==="missing"?a:u.upToDate?"":"Restart the server to load it."].filter(Boolean).join(`
|
|
179
|
+
`))}if(O.version)throw new U("usage","--version works with one script at a time.");O.all||Be(t[0],"<script> or --all");let c=await SP(n,O.all?"all":t,{to:i,force:O.force,keep:r,ecosystem:O.ecosystem,onProgress:s});Ee(c,()=>{let u=c.results.filter(l=>!("error"in l));return[...c.results.map(l=>"error"in l?`failed ${l.script}: ${l.error.message}`:o(l)),u.some(l=>l.license==="missing")?a:u.every(l=>l.upToDate)?"Everything is up to date.":"Restart the server to load them."].join(`
|
|
180
|
+
`)}),c.results.some(u=>"error"in u)&&(process.exitCode=1);return}if(e==="status"){let i=Be(t[0],"<script>");if(t[1]){let o=await n.getVersion(i,t[1]);return Ee(o,()=>`${i} ${o.version}: ${o.status}${o.buildError?`
|
|
181
|
+
${o.buildError}`:""}`)}let r=await n.getScript(i);return Ee(r,()=>[`${r.name} (${r.slug}) \xB7 ${r.status}`,...r.versions.map(o=>` ${o.version.padEnd(10)} ${o.status}${o.buildError?`: ${o.buildError}`:""}`)].join(`
|
|
182
|
+
`))}if(e==="access"){let i=Be(t[0],"<script>"),r=await n.listGrants(i,{status:O.status,limit:500});return Ee(r,()=>r.data.length?r.data.map(o=>`${o.account.accountId.padEnd(14)} ${o.account.displayName.padEnd(24)} ${o.status}`).join(`
|
|
183
|
+
`):"Nobody has access yet.")}if(e==="grant"){let i=Be(t[0],"<script>"),r=[...new Set(t.slice(1))];if(Be(r[0],"<accountId>"),r.length===1){let a=await n.grant(i,r[0]);return Ee(a,()=>`${a.created?"Granted":"Already had access:"} ${a.grant.account.displayName} (${a.grant.account.accountId})`)}let o=await n.grantBulk(i,r);Ee(o,()=>o.results.map(a=>a.ok?`${a.created?"granted":"already had access"} ${a.accountId}`:`failed ${a.accountId}: ${a.error?.message}`).join(`
|
|
184
|
+
`)),o.results.some(a=>!a.ok)&&(process.exitCode=1);return}if(e==="revoke"){let i=await n.revoke(Be(t[0],"<script>"),Be(t[1],"<accountId>"));return Ee(i,()=>`Revoked ${i.grant.account.displayName} (${i.grant.account.accountId}). The script stops on their servers at the next license check.`)}if(e==="listing"){let i=Be(t[0],"<script>");if(O.list&&O.unlist)throw new U("usage","Use either --list or --unlist.");if(O.free&&O["no-free"])throw new U("usage","Use either --free or --no-free.");let r={};(O.list||O.unlist)&&(r.listed=!!O.list),(O.free||O["no-free"])&&(r.free=!!O.free),O.about&&(r.about=await PP(O.about,"utf8"));let o=Object.keys(r).length?await n.updateListing(i,r):await n.getListing(i);return Ee(o,()=>[`Explore: ${o.enabled?o.hidden?"hidden by the Latch team":o.live?"live":o.listed?"listed, not visible yet":"not listed":"studio page is off (turn it on with: latch studio --show)"}`,`Free to use: ${o.free?"yes":"no"}`,`Views (30d): ${o.views}`,`Free adds: ${o.freeAdds}`,o.url?`Page: ${o.url}`:null,`Listing text: ${o.about.trim()?`${o.about.trim().split(`
|
|
170
185
|
`).length} lines`:"none"}`].filter(Boolean).join(`
|
|
171
|
-
`))}if(e==="
|
|
172
|
-
`)
|
|
173
|
-
`):"
|
|
174
|
-
`)
|
|
186
|
+
`))}if(e==="images"){let i=Be(t[0],"<script>");if(O.add&&O.remove)throw new U("usage","Use either --add or --remove.");let r=t.slice(1);if(O.add){let a=await Zc(n,i,[...O.add,...r],O.json?void 0:s=>Ac(`\xB7 ${s}`));return Ee(a,()=>`Added ${a.added.length} image${a.added.length===1?"":"s"} to ${i} (${a.total} of ${Dr}).`)}if(O.remove){let a=[...new Set([...O.remove,...r])];for(let c of a)await n.removeImage(i,c);let s=await n.listImages(i);return Ee({removed:a,images:s},()=>`Removed ${a.length} image${a.length===1?"":"s"} from ${i}.${s.length?"":" The gallery is empty: the script can't be listed on Explore until you add one."}`)}let o=await n.listImages(i);return Ee(o,()=>o.length?o.map((a,s)=>`${String(s+1).padStart(2)}. ${a.id} ${a.url}${s===0?" (cover)":""}`).join(`
|
|
187
|
+
`):`No images yet. A script needs at least one to be listed on Explore: latch images ${i} --add cover.png`)}if(e==="studio"){let i=(c,u,l)=>{if(c&&u)throw new U("usage",`Use either ${l}.`);return c||u?!!c:void 0},r={},o=i(O.show,O.hide,"--show or --hide");o!==void 0&&(r.public=o);let a=i(O.stats,O["no-stats"],"--stats or --no-stats");if(a!==void 0&&(r.showStats=a),O.tagline!==void 0&&(r.tagline=O.tagline),O.about&&(r.about=await PP(O.about,"utf8")),O.website!==void 0&&(r.website=O.website),O.discord!==void 0&&(r.discord=O.discord),O.accent!==void 0){if(!yi.includes(O.accent))throw new U("usage",`--accent is one of ${yi.join(", ")}.`);r.accent=O.accent}if(O.banner&&O["no-banner"])throw new U("usage","Use either --banner or --no-banner.");if(O.banner&&(r.banner=await la(O.banner)),O["no-banner"]&&(r.banner=null),O.pin&&O.unpin)throw new U("usage","Use either --pin or --unpin.");O.pin&&(r.pinnedScript=O.pin),O.unpin&&(r.pinnedScript=null);let s=Object.keys(r).length?await n.updateStudio(r):await n.getStudio();return Ee(s,()=>lM(s))}if(e==="bundles"){let{data:i}=await n.listBundles();return Ee(i,()=>i.length?i.map(r=>`${r.name.padEnd(28)} ${String(r.scripts.length).padStart(3)} scripts ${String(r.holders).padStart(4)} holders`).join(`
|
|
188
|
+
`):"No bundles yet.")}if(e==="bundle"){let i=Be(t[0],"<action>"),r=()=>Be(t[1],"<bundle>"),o=()=>{let s=[...new Set(t.slice(2))];return Be(s[0],"<script...>"),s},a=s=>`${s.bundle.name}: ${s.bundle.scripts.length} scripts${s.granted?`, ${s.granted} accesses opened`:""}${s.revoked?`, ${s.revoked} accesses closed`:""}`;if(i==="create"){let s=await n.createBundle(Be(t[1],"<name>"),o());return Ee(s,()=>`Created ${s.name} with ${s.scripts.length} scripts. Give it to accounts with "latch bundle grant".`)}if(i==="add"||i==="remove"){let s=await n.getBundle(r()),c=o(),u=(p,f)=>p.id===f||p.slug===f,l=i==="add"?[...s.scripts.map(p=>p.slug),...c.filter(p=>!s.scripts.some(f=>u(f,p)))]:s.scripts.filter(p=>!c.some(f=>u(p,f))).map(p=>p.slug),d=await n.updateBundle(s.id,{scripts:l});return Ee(d,()=>a(d))}if(i==="rename"){let s=await n.updateBundle(r(),{name:Be(t[2],"<name>")});return Ee(s,()=>`Renamed to ${s.bundle.name}.`)}if(i==="delete"){let s=await n.deleteBundle(r());return Ee(s,()=>`Deleted.${s.revoked?` ${s.revoked} accesses closed.`:""}`)}if(i==="access"){let s=await n.listBundleGrants(r(),{status:O.status,limit:500});return Ee(s,()=>s.data.length?s.data.map(c=>`${c.account.accountId.padEnd(14)} ${c.account.displayName.padEnd(24)} ${c.status}`).join(`
|
|
189
|
+
`):"Nobody holds this bundle yet.")}if(i==="grant"){let s=r(),c=[...new Set(t.slice(2))];Be(c[0],"<accountId>");let u=[];for(let l of c)try{let d=await n.grantBundle(s,l);u.push({accountId:l,ok:!0,...d})}catch(d){if(!(d instanceof U))throw d;u.push({accountId:l,ok:!1,error:{code:d.code,message:d.message}})}Ee({results:u},()=>u.map(l=>l.ok?`${l.created?"granted":"already held"} ${l.accountId}`:`failed ${l.accountId}: ${l.error?.message}`).join(`
|
|
190
|
+
`)),u.some(l=>!l.ok)&&(process.exitCode=1);return}if(i==="revoke"){let s=await n.revokeBundle(r(),Be(t[2],"<accountId>"));return Ee(s,()=>`Revoked the bundle from ${s.grant.account.displayName} (${s.grant.account.accountId}).${s.revoked?` ${s.revoked} scripts stop on their servers at the next license check.`:" They keep every script through direct access or another bundle."}`)}throw new U("usage",`Unknown bundle action "${i}". Run "latch --help".`)}if(e==="withdraw"){let i=await n.withdrawVersion(Be(t[0],"<script>"),Be(t[1],"<version>"));return Ee(i,()=>`Withdrew ${t[0]} ${i.version}. Servers already running it keep running.`)}throw new U("usage",`Unknown command "${e}". Run "latch --help".`)}function lM(e){let t=e.allowed?e.hidden?`hidden by the Latch team${e.hiddenReason?`: ${e.hiddenReason}`:""}`:e.live?"live":e.public?"on, not visible yet (list a script that has an image)":"off":"not on this plan (Pro and above)",n=i=>` ${i.slug.padEnd(28)} ${i.live?"live":i.listed?i.images?"listed, not visible yet":"listed, needs an image":"not listed"}${i.images?` ${i.images} image${i.images===1?"":"s"}`:""}`;return[`Studio page: ${t}`,e.url?`Page: ${e.url}`:null,`Tagline: ${e.tagline||"none"}`,`About: ${e.about.trim()?`${e.about.trim().split(`
|
|
191
|
+
`).length} lines`:"none"}`,`Website: ${e.website??"none"}`,`Discord: ${e.discord??"none"}`,`Accent: ${e.accent}`,`Banner: ${e.banner??"none"}`,`Pinned: ${e.pinnedScript?.slug??"none"}`,`Usage numbers: ${e.showStats?"shown":"hidden"}`,`Views (30d): ${e.views}`,...e.scripts.length?["Scripts:",...e.scripts.map(n)]:[]].filter(Boolean).join(`
|
|
192
|
+
`)}uM().catch(e=>{let t=e instanceof U?e.code:"generic";O.json?console.log(JSON.stringify({error:{code:t,message:e.message}},null,2)):Ac(`error: ${e.message}${t!=="generic"&&t!=="usage"?` (${t})`:""}`),process.exitCode=1});
|