@magic5644/graph-it-live 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +712 -0
- package/bin/graph-it +2 -0
- package/dist/astWorker.js +42176 -0
- package/dist/graph-it.js +42584 -0
- package/dist/indexerWorker.js +42178 -0
- package/dist/mcpServer.mjs +435 -0
- package/dist/mcpWorker.js +42313 -0
- package/dist/queries/python.scm +65 -0
- package/dist/queries/rust.scm +82 -0
- package/dist/queries/typescript.scm +104 -0
- package/dist/wasm/sqljs.wasm +0 -0
- package/dist/wasm/tree-sitter-python.wasm +0 -0
- package/dist/wasm/tree-sitter-rust.wasm +0 -0
- package/dist/wasm/tree-sitter-typescript.wasm +0 -0
- package/dist/wasm/tree-sitter.wasm +0 -0
- package/package.json +1150 -0
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
4
|
+
import { dirname } from 'path';
|
|
5
|
+
const require = createRequire(import.meta.url);
|
|
6
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
7
|
+
const __dirname = dirname(__filename);
|
|
8
|
+
var Cw=Object.create;var bd=Object.defineProperty;var Aw=Object.getOwnPropertyDescriptor;var Uw=Object.getOwnPropertyNames;var Zw=Object.getPrototypeOf,Mw=Object.prototype.hasOwnProperty;var E=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Kt=(e,t)=>{for(var n in t)bd(e,n,{get:t[n],enumerable:!0})},Lw=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Uw(t))!Mw.call(e,r)&&r!==n&&bd(e,r,{get:()=>t[r],enumerable:!(o=Aw(t,r))||o.enumerable});return e};var nv=(e,t,n)=>(n=e!=null?Cw(Zw(e)):{},Lw(t||!e||!e.__esModule?bd(n,"default",{value:e,enumerable:!0}):n,e));var ca=E(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.regexpCode=ue.getEsmExportName=ue.getProperty=ue.safeStringify=ue.stringify=ue.strConcat=ue.addCodeArg=ue.str=ue._=ue.nil=ue._Code=ue.Name=ue.IDENTIFIER=ue._CodeOrName=void 0;var aa=class{};ue._CodeOrName=aa;ue.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var ln=class extends aa{constructor(t){if(super(),!ue.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}}};ue.Name=ln;var xt=class extends aa{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,o)=>`${n}${o}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((n,o)=>(o instanceof ln&&(n[o.str]=(n[o.str]||0)+1),n),{})}};ue._Code=xt;ue.nil=new xt("");function f$(e,...t){let n=[e[0]],o=0;for(;o<t.length;)Ym(n,t[o]),n.push(e[++o]);return new xt(n)}ue._=f$;var Xm=new xt("+");function m$(e,...t){let n=[sa(e[0])],o=0;for(;o<t.length;)n.push(Xm),Ym(n,t[o]),n.push(Xm,sa(e[++o]));return ET(n),new xt(n)}ue.str=m$;function Ym(e,t){t instanceof xt?e.push(...t._items):t instanceof ln?e.push(t):e.push(RT(t))}ue.addCodeArg=Ym;function ET(e){let t=1;for(;t<e.length-1;){if(e[t]===Xm){let n=OT(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]="+"}t++}}function OT(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof ln||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 ln))return`"${e}${t.slice(1)}`}function jT(e,t){return t.emptyStr()?e:e.emptyStr()?t:m$`${e}${t}`}ue.strConcat=jT;function RT(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:sa(Array.isArray(e)?e.join(","):e)}function NT(e){return new xt(sa(e))}ue.stringify=NT;function sa(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ue.safeStringify=sa;function DT(e){return typeof e=="string"&&ue.IDENTIFIER.test(e)?new xt(`.${e}`):f$`[${e}]`}ue.getProperty=DT;function CT(e){if(typeof e=="string"&&ue.IDENTIFIER.test(e))return new xt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}ue.getEsmExportName=CT;function AT(e){return new xt(e.toString())}ue.regexpCode=AT});var th=E(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.ValueScope=ct.ValueScopeName=ct.Scope=ct.varKinds=ct.UsedValueState=void 0;var st=ca(),Qm=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},kl;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(kl||(ct.UsedValueState=kl={}));ct.varKinds={const:new st.Name("const"),let:new st.Name("let"),var:new st.Name("var")};var wl=class{constructor({prefixes:t,parent:n}={}){this._names={},this._prefixes=t,this._parent=n}toName(t){return t instanceof st.Name?t:this.name(t)}name(t){return new st.Name(this._newName(t))}_newName(t){let n=this._names[t]||this._nameGroup(t);return`${t}${n.index++}`}_nameGroup(t){var n,o;if(!((o=(n=this._parent)===null||n===void 0?void 0:n._prefixes)===null||o===void 0)&&o.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}}};ct.Scope=wl;var Sl=class extends st.Name{constructor(t,n){super(n),this.prefix=t}setValue(t,{property:n,itemIndex:o}){this.value=t,this.scopePath=(0,st._)`.${new st.Name(n)}[${o}]`}};ct.ValueScopeName=Sl;var UT=(0,st._)`\n`,eh=class extends wl{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?UT:st.nil}}get(){return this._scope}name(t){return new Sl(t,this._newName(t))}value(t,n){var o;if(n.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let r=this.toName(t),{prefix:i}=r,a=(o=n.key)!==null&&o!==void 0?o:n.ref,s=this._values[i];if(s){let l=s.get(a);if(l)return l}else s=this._values[i]=new Map;s.set(a,r);let c=this._scope[i]||(this._scope[i]=[]),u=c.length;return c[u]=n.ref,r.setValue(n,{property:i,itemIndex:u}),r}getValue(t,n){let o=this._values[t];if(o)return o.get(n)}scopeRefs(t,n=this._values){return this._reduceValues(n,o=>{if(o.scopePath===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return(0,st._)`${t}${o.scopePath}`})}scopeCode(t=this._values,n,o){return this._reduceValues(t,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},n,o)}_reduceValues(t,n,o={},r){let i=st.nil;for(let a in t){let s=t[a];if(!s)continue;let c=o[a]=o[a]||new Map;s.forEach(u=>{if(c.has(u))return;c.set(u,kl.Started);let l=n(u);if(l){let d=this.opts.es5?ct.varKinds.var:ct.varKinds.const;i=(0,st._)`${i}${d} ${u} = ${l};${this.opts._n}`}else if(l=r?.(u))i=(0,st._)`${i}${l}${this.opts._n}`;else throw new Qm(u);c.set(u,kl.Completed)})}return i}};ct.ValueScope=eh});var Y=E(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.or=te.and=te.not=te.CodeGen=te.operators=te.varKinds=te.ValueScopeName=te.ValueScope=te.Scope=te.Name=te.regexpCode=te.stringify=te.getProperty=te.nil=te.strConcat=te.str=te._=void 0;var ae=ca(),Ct=th(),jr=ca();Object.defineProperty(te,"_",{enumerable:!0,get:function(){return jr._}});Object.defineProperty(te,"str",{enumerable:!0,get:function(){return jr.str}});Object.defineProperty(te,"strConcat",{enumerable:!0,get:function(){return jr.strConcat}});Object.defineProperty(te,"nil",{enumerable:!0,get:function(){return jr.nil}});Object.defineProperty(te,"getProperty",{enumerable:!0,get:function(){return jr.getProperty}});Object.defineProperty(te,"stringify",{enumerable:!0,get:function(){return jr.stringify}});Object.defineProperty(te,"regexpCode",{enumerable:!0,get:function(){return jr.regexpCode}});Object.defineProperty(te,"Name",{enumerable:!0,get:function(){return jr.Name}});var Pl=th();Object.defineProperty(te,"Scope",{enumerable:!0,get:function(){return Pl.Scope}});Object.defineProperty(te,"ValueScope",{enumerable:!0,get:function(){return Pl.ValueScope}});Object.defineProperty(te,"ValueScopeName",{enumerable:!0,get:function(){return Pl.ValueScopeName}});Object.defineProperty(te,"varKinds",{enumerable:!0,get:function(){return Pl.varKinds}});te.operators={GT:new ae._Code(">"),GTE:new ae._Code(">="),LT:new ae._Code("<"),LTE:new ae._Code("<="),EQ:new ae._Code("==="),NEQ:new ae._Code("!=="),NOT:new ae._Code("!"),OR:new ae._Code("||"),AND:new ae._Code("&&"),ADD:new ae._Code("+")};var or=class{optimizeNodes(){return this}optimizeNames(t,n){return this}},rh=class extends or{constructor(t,n,o){super(),this.varKind=t,this.name=n,this.rhs=o}render({es5:t,_n:n}){let o=t?Ct.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${o} ${this.name}${r};`+n}optimizeNames(t,n){if(t[this.name.str])return this.rhs&&(this.rhs=ho(this.rhs,t,n)),this}get names(){return this.rhs instanceof ae._CodeOrName?this.rhs.names:{}}},zl=class extends or{constructor(t,n,o){super(),this.lhs=t,this.rhs=n,this.sideEffects=o}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,n){if(!(this.lhs instanceof ae.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=ho(this.rhs,t,n),this}get names(){let t=this.lhs instanceof ae.Name?{}:{...this.lhs.names};return Tl(t,this.rhs)}},nh=class extends zl{constructor(t,n,o,r){super(t,o,r),this.op=n}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},oh=class extends or{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},ih=class extends or{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},ah=class extends or{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},sh=class extends or{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=ho(this.code,t,n),this}get names(){return this.code instanceof ae._CodeOrName?this.code.names:{}}},ua=class extends or{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((n,o)=>n+o.render(t),"")}optimizeNodes(){let{nodes:t}=this,n=t.length;for(;n--;){let o=t[n].optimizeNodes();Array.isArray(o)?t.splice(n,1,...o):o?t[n]=o:t.splice(n,1)}return t.length>0?this:void 0}optimizeNames(t,n){let{nodes:o}=this,r=o.length;for(;r--;){let i=o[r];i.optimizeNames(t,n)||(ZT(t,i.names),o.splice(r,1))}return o.length>0?this:void 0}get names(){return this.nodes.reduce((t,n)=>fn(t,n.names),{})}},ir=class extends ua{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},ch=class extends ua{},mo=class extends ir{};mo.kind="else";var dn=class e extends ir{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 o=n.optimizeNodes();n=this.else=Array.isArray(o)?new mo(o):o}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(h$(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,n){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,n),!!(super.optimizeNames(t,n)||this.else))return this.condition=ho(this.condition,t,n),this}get names(){let t=super.names;return Tl(t,this.condition),this.else&&fn(t,this.else.names),t}};dn.kind="if";var pn=class extends ir{};pn.kind="for";var uh=class extends pn{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=ho(this.iteration,t,n),this}get names(){return fn(super.names,this.iteration.names)}},lh=class extends pn{constructor(t,n,o,r){super(),this.varKind=t,this.name=n,this.from=o,this.to=r}render(t){let n=t.es5?Ct.varKinds.var:this.varKind,{name:o,from:r,to:i}=this;return`for(${n} ${o}=${r}; ${o}<${i}; ${o}++)`+super.render(t)}get names(){let t=Tl(super.names,this.from);return Tl(t,this.to)}},Il=class extends pn{constructor(t,n,o,r){super(),this.loop=t,this.varKind=n,this.name=o,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=ho(this.iterable,t,n),this}get names(){return fn(super.names,this.iterable.names)}},la=class extends ir{constructor(t,n,o){super(),this.name=t,this.args=n,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};la.kind="func";var da=class extends ua{render(t){return"return "+super.render(t)}};da.kind="return";var dh=class extends ir{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 o,r;return super.optimizeNames(t,n),(o=this.catch)===null||o===void 0||o.optimizeNames(t,n),(r=this.finally)===null||r===void 0||r.optimizeNames(t,n),this}get names(){let t=super.names;return this.catch&&fn(t,this.catch.names),this.finally&&fn(t,this.finally.names),t}},pa=class extends ir{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};pa.kind="catch";var fa=class extends ir{render(t){return"finally"+super.render(t)}};fa.kind="finally";var ph=class{constructor(t,n={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...n,_n:n.lines?`
|
|
9
|
+
`:""},this._extScope=t,this._scope=new Ct.Scope({parent:t}),this._nodes=[new ch]}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 o=this._extScope.value(t,n);return(this._values[o.prefix]||(this._values[o.prefix]=new Set)).add(o),o}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,o,r){let i=this._scope.toName(n);return o!==void 0&&r&&(this._constants[i.str]=o),this._leafNode(new rh(t,i,o)),i}const(t,n,o){return this._def(Ct.varKinds.const,t,n,o)}let(t,n,o){return this._def(Ct.varKinds.let,t,n,o)}var(t,n,o){return this._def(Ct.varKinds.var,t,n,o)}assign(t,n,o){return this._leafNode(new zl(t,n,o))}add(t,n){return this._leafNode(new nh(t,te.operators.ADD,n))}code(t){return typeof t=="function"?t():t!==ae.nil&&this._leafNode(new sh(t)),this}object(...t){let n=["{"];for(let[o,r]of t)n.length>1&&n.push(","),n.push(o),(o!==r||this.opts.es5)&&(n.push(":"),(0,ae.addCodeArg)(n,r));return n.push("}"),new ae._Code(n)}if(t,n,o){if(this._blockNode(new dn(t)),n&&o)this.code(n).else().code(o).endIf();else if(n)this.code(n).endIf();else if(o)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new dn(t))}else(){return this._elseNode(new mo)}endIf(){return this._endBlockNode(dn,mo)}_for(t,n){return this._blockNode(t),n&&this.code(n).endFor(),this}for(t,n){return this._for(new uh(t),n)}forRange(t,n,o,r,i=this.opts.es5?Ct.varKinds.var:Ct.varKinds.let){let a=this._scope.toName(t);return this._for(new lh(i,a,n,o),()=>r(a))}forOf(t,n,o,r=Ct.varKinds.const){let i=this._scope.toName(t);if(this.opts.es5){let a=n instanceof ae.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,ae._)`${a}.length`,s=>{this.var(i,(0,ae._)`${a}[${s}]`),o(i)})}return this._for(new Il("of",r,i,n),()=>o(i))}forIn(t,n,o,r=this.opts.es5?Ct.varKinds.var:Ct.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,ae._)`Object.keys(${n})`,o);let i=this._scope.toName(t);return this._for(new Il("in",r,i,n),()=>o(i))}endFor(){return this._endBlockNode(pn)}label(t){return this._leafNode(new oh(t))}break(t){return this._leafNode(new ih(t))}return(t){let n=new da;if(this._blockNode(n),this.code(t),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(da)}try(t,n,o){if(!n&&!o)throw new Error('CodeGen: "try" without "catch" and "finally"');let r=new dh;if(this._blockNode(r),this.code(t),n){let i=this.name("e");this._currNode=r.catch=new pa(i),n(i)}return o&&(this._currNode=r.finally=new fa,this.code(o)),this._endBlockNode(pa,fa)}throw(t){return this._leafNode(new ah(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 o=this._nodes.length-n;if(o<0||t!==void 0&&o!==t)throw new Error(`CodeGen: wrong number of nodes: ${o} vs ${t} expected`);return this._nodes.length=n,this}func(t,n=ae.nil,o,r){return this._blockNode(new la(t,n,o)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(la)}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 o=this._currNode;if(o instanceof t||n&&o 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 dn))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}};te.CodeGen=ph;function fn(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function Tl(e,t){return t instanceof ae._CodeOrName?fn(e,t.names):e}function ho(e,t,n){if(e instanceof ae.Name)return o(e);if(!r(e))return e;return new ae._Code(e._items.reduce((i,a)=>(a instanceof ae.Name&&(a=o(a)),a instanceof ae._Code?i.push(...a._items):i.push(a),i),[]));function o(i){let a=n[i.str];return a===void 0||t[i.str]!==1?i:(delete t[i.str],a)}function r(i){return i instanceof ae._Code&&i._items.some(a=>a instanceof ae.Name&&t[a.str]===1&&n[a.str]!==void 0)}}function ZT(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function h$(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,ae._)`!${fh(e)}`}te.not=h$;var MT=g$(te.operators.AND);function LT(...e){return e.reduce(MT)}te.and=LT;var qT=g$(te.operators.OR);function FT(...e){return e.reduce(qT)}te.or=FT;function g$(e){return(t,n)=>t===ae.nil?n:n===ae.nil?t:(0,ae._)`${fh(t)} ${e} ${fh(n)}`}function fh(e){return e instanceof ae.Name?e:(0,ae._)`(${e})`}});var se=E(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.checkStrictMode=ne.getErrorPath=ne.Type=ne.useFunc=ne.setEvaluated=ne.evaluatedPropsToName=ne.mergeEvaluated=ne.eachItem=ne.unescapeJsonPointer=ne.escapeJsonPointer=ne.escapeFragment=ne.unescapeFragment=ne.schemaRefOrVal=ne.schemaHasRulesButRef=ne.schemaHasRules=ne.checkUnknownRules=ne.alwaysValidSchema=ne.toHash=void 0;var _e=Y(),VT=ca();function HT(e){let t={};for(let n of e)t[n]=!0;return t}ne.toHash=HT;function WT(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(_$(e,t),!b$(t,e.self.RULES.all))}ne.alwaysValidSchema=WT;function _$(e,t=e.schema){let{opts:n,self:o}=e;if(!n.strictSchema||typeof t=="boolean")return;let r=o.RULES.keywords;for(let i in t)r[i]||k$(e,`unknown keyword: "${i}"`)}ne.checkUnknownRules=_$;function b$(e,t){if(typeof e=="boolean")return!e;for(let n in e)if(t[n])return!0;return!1}ne.schemaHasRules=b$;function JT(e,t){if(typeof e=="boolean")return!e;for(let n in e)if(n!=="$ref"&&t.all[n])return!0;return!1}ne.schemaHasRulesButRef=JT;function GT({topSchemaRef:e,schemaPath:t},n,o,r){if(!r){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return(0,_e._)`${n}`}return(0,_e._)`${e}${t}${(0,_e.getProperty)(o)}`}ne.schemaRefOrVal=GT;function BT(e){return $$(decodeURIComponent(e))}ne.unescapeFragment=BT;function KT(e){return encodeURIComponent(hh(e))}ne.escapeFragment=KT;function hh(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ne.escapeJsonPointer=hh;function $$(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ne.unescapeJsonPointer=$$;function XT(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}ne.eachItem=XT;function v$({mergeNames:e,mergeToName:t,mergeValues:n,resultToName:o}){return(r,i,a,s)=>{let c=a===void 0?i:a instanceof _e.Name?(i instanceof _e.Name?e(r,i,a):t(r,i,a),a):i instanceof _e.Name?(t(r,a,i),i):n(i,a);return s===_e.Name&&!(c instanceof _e.Name)?o(r,c):c}}ne.mergeEvaluated={props:v$({mergeNames:(e,t,n)=>e.if((0,_e._)`${n} !== true && ${t} !== undefined`,()=>{e.if((0,_e._)`${t} === true`,()=>e.assign(n,!0),()=>e.assign(n,(0,_e._)`${n} || {}`).code((0,_e._)`Object.assign(${n}, ${t})`))}),mergeToName:(e,t,n)=>e.if((0,_e._)`${n} !== true`,()=>{t===!0?e.assign(n,!0):(e.assign(n,(0,_e._)`${n} || {}`),gh(e,n,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:x$}),items:v$({mergeNames:(e,t,n)=>e.if((0,_e._)`${n} !== true && ${t} !== undefined`,()=>e.assign(n,(0,_e._)`${t} === true ? true : ${n} > ${t} ? ${n} : ${t}`)),mergeToName:(e,t,n)=>e.if((0,_e._)`${n} !== true`,()=>e.assign(n,t===!0?!0:(0,_e._)`${n} > ${t} ? ${n} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function x$(e,t){if(t===!0)return e.var("props",!0);let n=e.var("props",(0,_e._)`{}`);return t!==void 0&&gh(e,n,t),n}ne.evaluatedPropsToName=x$;function gh(e,t,n){Object.keys(n).forEach(o=>e.assign((0,_e._)`${t}${(0,_e.getProperty)(o)}`,!0))}ne.setEvaluated=gh;var y$={};function YT(e,t){return e.scopeValue("func",{ref:t,code:y$[t.code]||(y$[t.code]=new VT._Code(t.code))})}ne.useFunc=YT;var mh;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(mh||(ne.Type=mh={}));function QT(e,t,n){if(e instanceof _e.Name){let o=t===mh.Num;return n?o?(0,_e._)`"[" + ${e} + "]"`:(0,_e._)`"['" + ${e} + "']"`:o?(0,_e._)`"/" + ${e}`:(0,_e._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,_e.getProperty)(e).toString():"/"+hh(e)}ne.getErrorPath=QT;function k$(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw new Error(t);e.self.logger.warn(t)}}ne.checkStrictMode=k$});var ar=E(vh=>{"use strict";Object.defineProperty(vh,"__esModule",{value:!0});var We=Y(),eP={data:new We.Name("data"),valCxt:new We.Name("valCxt"),instancePath:new We.Name("instancePath"),parentData:new We.Name("parentData"),parentDataProperty:new We.Name("parentDataProperty"),rootData:new We.Name("rootData"),dynamicAnchors:new We.Name("dynamicAnchors"),vErrors:new We.Name("vErrors"),errors:new We.Name("errors"),this:new We.Name("this"),self:new We.Name("self"),scope:new We.Name("scope"),json:new We.Name("json"),jsonPos:new We.Name("jsonPos"),jsonLen:new We.Name("jsonLen"),jsonPart:new We.Name("jsonPart")};vh.default=eP});var ma=E(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.extendErrors=Je.resetErrorsCount=Je.reportExtraError=Je.reportError=Je.keyword$DataError=Je.keywordError=void 0;var ce=Y(),El=se(),Qe=ar();Je.keywordError={message:({keyword:e})=>(0,ce.str)`must pass "${e}" keyword validation`};Je.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,ce.str)`"${e}" keyword must be ${t} ($data)`:(0,ce.str)`"${e}" keyword is invalid ($data)`};function tP(e,t=Je.keywordError,n,o){let{it:r}=e,{gen:i,compositeRule:a,allErrors:s}=r,c=z$(e,t,n);o??(a||s)?w$(i,c):S$(r,(0,ce._)`[${c}]`)}Je.reportError=tP;function rP(e,t=Je.keywordError,n){let{it:o}=e,{gen:r,compositeRule:i,allErrors:a}=o,s=z$(e,t,n);w$(r,s),i||a||S$(o,Qe.default.vErrors)}Je.reportExtraError=rP;function nP(e,t){e.assign(Qe.default.errors,t),e.if((0,ce._)`${Qe.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,ce._)`${Qe.default.vErrors}.length`,t),()=>e.assign(Qe.default.vErrors,null)))}Je.resetErrorsCount=nP;function oP({gen:e,keyword:t,schemaValue:n,data:o,errsCount:r,it:i}){if(r===void 0)throw new Error("ajv implementation error");let a=e.name("err");e.forRange("i",r,Qe.default.errors,s=>{e.const(a,(0,ce._)`${Qe.default.vErrors}[${s}]`),e.if((0,ce._)`${a}.instancePath === undefined`,()=>e.assign((0,ce._)`${a}.instancePath`,(0,ce.strConcat)(Qe.default.instancePath,i.errorPath))),e.assign((0,ce._)`${a}.schemaPath`,(0,ce.str)`${i.errSchemaPath}/${t}`),i.opts.verbose&&(e.assign((0,ce._)`${a}.schema`,n),e.assign((0,ce._)`${a}.data`,o))})}Je.extendErrors=oP;function w$(e,t){let n=e.const("err",t);e.if((0,ce._)`${Qe.default.vErrors} === null`,()=>e.assign(Qe.default.vErrors,(0,ce._)`[${n}]`),(0,ce._)`${Qe.default.vErrors}.push(${n})`),e.code((0,ce._)`${Qe.default.errors}++`)}function S$(e,t){let{gen:n,validateName:o,schemaEnv:r}=e;r.$async?n.throw((0,ce._)`new ${e.ValidationError}(${t})`):(n.assign((0,ce._)`${o}.errors`,t),n.return(!1))}var mn={keyword:new ce.Name("keyword"),schemaPath:new ce.Name("schemaPath"),params:new ce.Name("params"),propertyName:new ce.Name("propertyName"),message:new ce.Name("message"),schema:new ce.Name("schema"),parentSchema:new ce.Name("parentSchema")};function z$(e,t,n){let{createErrors:o}=e.it;return o===!1?(0,ce._)`{}`:iP(e,t,n)}function iP(e,t,n={}){let{gen:o,it:r}=e,i=[aP(r,n),sP(e,n)];return cP(e,t,i),o.object(...i)}function aP({errorPath:e},{instancePath:t}){let n=t?(0,ce.str)`${e}${(0,El.getErrorPath)(t,El.Type.Str)}`:e;return[Qe.default.instancePath,(0,ce.strConcat)(Qe.default.instancePath,n)]}function sP({keyword:e,it:{errSchemaPath:t}},{schemaPath:n,parentSchema:o}){let r=o?t:(0,ce.str)`${t}/${e}`;return n&&(r=(0,ce.str)`${r}${(0,El.getErrorPath)(n,El.Type.Str)}`),[mn.schemaPath,r]}function cP(e,{params:t,message:n},o){let{keyword:r,data:i,schemaValue:a,it:s}=e,{opts:c,propertyName:u,topSchemaRef:l,schemaPath:d}=s;o.push([mn.keyword,r],[mn.params,typeof t=="function"?t(e):t||(0,ce._)`{}`]),c.messages&&o.push([mn.message,typeof n=="function"?n(e):n]),c.verbose&&o.push([mn.schema,a],[mn.parentSchema,(0,ce._)`${l}${d}`],[Qe.default.data,i]),u&&o.push([mn.propertyName,u])}});var T$=E(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});go.boolOrEmptySchema=go.topBoolOrEmptySchema=void 0;var uP=ma(),lP=Y(),dP=ar(),pP={message:"boolean schema is false"};function fP(e){let{gen:t,schema:n,validateName:o}=e;n===!1?I$(e,!1):typeof n=="object"&&n.$async===!0?t.return(dP.default.data):(t.assign((0,lP._)`${o}.errors`,null),t.return(!0))}go.topBoolOrEmptySchema=fP;function mP(e,t){let{gen:n,schema:o}=e;o===!1?(n.var(t,!1),I$(e)):n.var(t,!0)}go.boolOrEmptySchema=mP;function I$(e,t){let{gen:n,data:o}=e,r={gen:n,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,uP.reportError)(r,pP,void 0,t)}});var yh=E(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.getRules=vo.isJSONType=void 0;var hP=["string","number","integer","boolean","null","object","array"],gP=new Set(hP);function vP(e){return typeof e=="string"&&gP.has(e)}vo.isJSONType=vP;function yP(){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:{}}}vo.getRules=yP});var _h=E(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.shouldUseRule=Rr.shouldUseGroup=Rr.schemaHasRulesForType=void 0;function _P({schema:e,self:t},n){let o=t.RULES.types[n];return o&&o!==!0&&P$(e,o)}Rr.schemaHasRulesForType=_P;function P$(e,t){return t.rules.some(n=>E$(e,n))}Rr.shouldUseGroup=P$;function E$(e,t){var n;return e[t.keyword]!==void 0||((n=t.definition.implements)===null||n===void 0?void 0:n.some(o=>e[o]!==void 0))}Rr.shouldUseRule=E$});var ha=E(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.reportTypeError=Ge.checkDataTypes=Ge.checkDataType=Ge.coerceAndCheckDataType=Ge.getJSONTypes=Ge.getSchemaTypes=Ge.DataType=void 0;var bP=yh(),$P=_h(),xP=ma(),X=Y(),O$=se(),yo;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(yo||(Ge.DataType=yo={}));function kP(e){let t=j$(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}Ge.getSchemaTypes=kP;function j$(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(bP.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}Ge.getJSONTypes=j$;function wP(e,t){let{gen:n,data:o,opts:r}=e,i=SP(t,r.coerceTypes),a=t.length>0&&!(i.length===0&&t.length===1&&(0,$P.schemaHasRulesForType)(e,t[0]));if(a){let s=$h(t,o,r.strictNumbers,yo.Wrong);n.if(s,()=>{i.length?zP(e,t,i):xh(e)})}return a}Ge.coerceAndCheckDataType=wP;var R$=new Set(["string","number","integer","boolean","null"]);function SP(e,t){return t?e.filter(n=>R$.has(n)||t==="array"&&n==="array"):[]}function zP(e,t,n){let{gen:o,data:r,opts:i}=e,a=o.let("dataType",(0,X._)`typeof ${r}`),s=o.let("coerced",(0,X._)`undefined`);i.coerceTypes==="array"&&o.if((0,X._)`${a} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,()=>o.assign(r,(0,X._)`${r}[0]`).assign(a,(0,X._)`typeof ${r}`).if($h(t,r,i.strictNumbers),()=>o.assign(s,r))),o.if((0,X._)`${s} !== undefined`);for(let u of n)(R$.has(u)||u==="array"&&i.coerceTypes==="array")&&c(u);o.else(),xh(e),o.endIf(),o.if((0,X._)`${s} !== undefined`,()=>{o.assign(r,s),IP(e,s)});function c(u){switch(u){case"string":o.elseIf((0,X._)`${a} == "number" || ${a} == "boolean"`).assign(s,(0,X._)`"" + ${r}`).elseIf((0,X._)`${r} === null`).assign(s,(0,X._)`""`);return;case"number":o.elseIf((0,X._)`${a} == "boolean" || ${r} === null
|
|
10
|
+
|| (${a} == "string" && ${r} && ${r} == +${r})`).assign(s,(0,X._)`+${r}`);return;case"integer":o.elseIf((0,X._)`${a} === "boolean" || ${r} === null
|
|
11
|
+
|| (${a} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(s,(0,X._)`+${r}`);return;case"boolean":o.elseIf((0,X._)`${r} === "false" || ${r} === 0 || ${r} === null`).assign(s,!1).elseIf((0,X._)`${r} === "true" || ${r} === 1`).assign(s,!0);return;case"null":o.elseIf((0,X._)`${r} === "" || ${r} === 0 || ${r} === false`),o.assign(s,null);return;case"array":o.elseIf((0,X._)`${a} === "string" || ${a} === "number"
|
|
12
|
+
|| ${a} === "boolean" || ${r} === null`).assign(s,(0,X._)`[${r}]`)}}}function IP({gen:e,parentData:t,parentDataProperty:n},o){e.if((0,X._)`${t} !== undefined`,()=>e.assign((0,X._)`${t}[${n}]`,o))}function bh(e,t,n,o=yo.Correct){let r=o===yo.Correct?X.operators.EQ:X.operators.NEQ,i;switch(e){case"null":return(0,X._)`${t} ${r} null`;case"array":i=(0,X._)`Array.isArray(${t})`;break;case"object":i=(0,X._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=a((0,X._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=a();break;default:return(0,X._)`typeof ${t} ${r} ${e}`}return o===yo.Correct?i:(0,X.not)(i);function a(s=X.nil){return(0,X.and)((0,X._)`typeof ${t} == "number"`,s,n?(0,X._)`isFinite(${t})`:X.nil)}}Ge.checkDataType=bh;function $h(e,t,n,o){if(e.length===1)return bh(e[0],t,n,o);let r,i=(0,O$.toHash)(e);if(i.array&&i.object){let a=(0,X._)`typeof ${t} != "object"`;r=i.null?a:(0,X._)`!${t} || ${a}`,delete i.null,delete i.array,delete i.object}else r=X.nil;i.number&&delete i.integer;for(let a in i)r=(0,X.and)(r,bh(a,t,n,o));return r}Ge.checkDataTypes=$h;var TP={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,X._)`{type: ${e}}`:(0,X._)`{type: ${t}}`};function xh(e){let t=PP(e);(0,xP.reportError)(t,TP)}Ge.reportTypeError=xh;function PP(e){let{gen:t,data:n,schema:o}=e,r=(0,O$.schemaRefOrVal)(e,o,"type");return{gen:t,keyword:"type",data:n,schema:o.type,schemaCode:r,schemaValue:r,parentSchema:o,params:{},it:e}}});var D$=E(Ol=>{"use strict";Object.defineProperty(Ol,"__esModule",{value:!0});Ol.assignDefaults=void 0;var _o=Y(),EP=se();function OP(e,t){let{properties:n,items:o}=e.schema;if(t==="object"&&n)for(let r in n)N$(e,r,n[r].default);else t==="array"&&Array.isArray(o)&&o.forEach((r,i)=>N$(e,i,r.default))}Ol.assignDefaults=OP;function N$(e,t,n){let{gen:o,compositeRule:r,data:i,opts:a}=e;if(n===void 0)return;let s=(0,_o._)`${i}${(0,_o.getProperty)(t)}`;if(r){(0,EP.checkStrictMode)(e,`default is ignored for: ${s}`);return}let c=(0,_o._)`${s} === undefined`;a.useDefaults==="empty"&&(c=(0,_o._)`${c} || ${s} === null || ${s} === ""`),o.if(c,(0,_o._)`${s} = ${(0,_o.stringify)(n)}`)}});var kt=E(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.validateUnion=ve.validateArray=ve.usePattern=ve.callValidateCode=ve.schemaProperties=ve.allSchemaProperties=ve.noPropertyInData=ve.propertyInData=ve.isOwnProperty=ve.hasPropFunc=ve.reportMissingProp=ve.checkMissingProp=ve.checkReportMissingProp=void 0;var $e=Y(),kh=se(),Nr=ar(),jP=se();function RP(e,t){let{gen:n,data:o,it:r}=e;n.if(Sh(n,o,t,r.opts.ownProperties),()=>{e.setParams({missingProperty:(0,$e._)`${t}`},!0),e.error()})}ve.checkReportMissingProp=RP;function NP({gen:e,data:t,it:{opts:n}},o,r){return(0,$e.or)(...o.map(i=>(0,$e.and)(Sh(e,t,i,n.ownProperties),(0,$e._)`${r} = ${i}`)))}ve.checkMissingProp=NP;function DP(e,t){e.setParams({missingProperty:t},!0),e.error()}ve.reportMissingProp=DP;function C$(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,$e._)`Object.prototype.hasOwnProperty`})}ve.hasPropFunc=C$;function wh(e,t,n){return(0,$e._)`${C$(e)}.call(${t}, ${n})`}ve.isOwnProperty=wh;function CP(e,t,n,o){let r=(0,$e._)`${t}${(0,$e.getProperty)(n)} !== undefined`;return o?(0,$e._)`${r} && ${wh(e,t,n)}`:r}ve.propertyInData=CP;function Sh(e,t,n,o){let r=(0,$e._)`${t}${(0,$e.getProperty)(n)} === undefined`;return o?(0,$e.or)(r,(0,$e.not)(wh(e,t,n))):r}ve.noPropertyInData=Sh;function A$(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}ve.allSchemaProperties=A$;function AP(e,t){return A$(t).filter(n=>!(0,kh.alwaysValidSchema)(e,t[n]))}ve.schemaProperties=AP;function UP({schemaCode:e,data:t,it:{gen:n,topSchemaRef:o,schemaPath:r,errorPath:i},it:a},s,c,u){let l=u?(0,$e._)`${e}, ${t}, ${o}${r}`:t,d=[[Nr.default.instancePath,(0,$e.strConcat)(Nr.default.instancePath,i)],[Nr.default.parentData,a.parentData],[Nr.default.parentDataProperty,a.parentDataProperty],[Nr.default.rootData,Nr.default.rootData]];a.opts.dynamicRef&&d.push([Nr.default.dynamicAnchors,Nr.default.dynamicAnchors]);let p=(0,$e._)`${l}, ${n.object(...d)}`;return c!==$e.nil?(0,$e._)`${s}.call(${c}, ${p})`:(0,$e._)`${s}(${p})`}ve.callValidateCode=UP;var ZP=(0,$e._)`new RegExp`;function MP({gen:e,it:{opts:t}},n){let o=t.unicodeRegExp?"u":"",{regExp:r}=t.code,i=r(n,o);return e.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,$e._)`${r.code==="new RegExp"?ZP:(0,jP.useFunc)(e,r)}(${n}, ${o})`})}ve.usePattern=MP;function LP(e){let{gen:t,data:n,keyword:o,it:r}=e,i=t.name("valid");if(r.allErrors){let s=t.let("valid",!0);return a(()=>t.assign(s,!1)),s}return t.var(i,!0),a(()=>t.break()),i;function a(s){let c=t.const("len",(0,$e._)`${n}.length`);t.forRange("i",0,c,u=>{e.subschema({keyword:o,dataProp:u,dataPropType:kh.Type.Num},i),t.if((0,$e.not)(i),s)})}}ve.validateArray=LP;function qP(e){let{gen:t,schema:n,keyword:o,it:r}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some(c=>(0,kh.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:o,schemaProp:u,compositeRule:!0},s);t.assign(a,(0,$e._)`${a} || ${s}`),e.mergeValidEvaluated(l,s)||t.if((0,$e.not)(a))})),e.result(a,()=>e.reset(),()=>e.error(!0))}ve.validateUnion=qP});var M$=E(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.validateKeywordUsage=Vt.validSchemaType=Vt.funcKeywordCode=Vt.macroKeywordCode=void 0;var et=Y(),hn=ar(),FP=kt(),VP=ma();function HP(e,t){let{gen:n,keyword:o,schema:r,parentSchema:i,it:a}=e,s=t.macro.call(a.self,r,i,a),c=Z$(n,o,s);a.opts.validateSchema!==!1&&a.self.validateSchema(s,!0);let u=n.name("valid");e.subschema({schema:s,schemaPath:et.nil,errSchemaPath:`${a.errSchemaPath}/${o}`,topSchemaRef:c,compositeRule:!0},u),e.pass(u,()=>e.error(!0))}Vt.macroKeywordCode=HP;function WP(e,t){var n;let{gen:o,keyword:r,schema:i,parentSchema:a,$data:s,it:c}=e;GP(c,t);let u=!s&&t.compile?t.compile.call(c.self,i,a,c):t.validate,l=Z$(o,r,u),d=o.let("valid");e.block$data(d,p),e.ok((n=t.valid)!==null&&n!==void 0?n:d);function p(){if(t.errors===!1)y(),t.modifying&&U$(e),S(()=>e.error());else{let P=t.async?f():g();t.modifying&&U$(e),S(()=>JP(e,P))}}function f(){let P=o.let("ruleErrs",null);return o.try(()=>y((0,et._)`await `),Z=>o.assign(d,!1).if((0,et._)`${Z} instanceof ${c.ValidationError}`,()=>o.assign(P,(0,et._)`${Z}.errors`),()=>o.throw(Z))),P}function g(){let P=(0,et._)`${l}.errors`;return o.assign(P,null),y(et.nil),P}function y(P=t.async?(0,et._)`await `:et.nil){let Z=c.opts.passContext?hn.default.this:hn.default.self,D=!("compile"in t&&!s||t.schema===!1);o.assign(d,(0,et._)`${P}${(0,FP.callValidateCode)(e,l,Z,D)}`,t.modifying)}function S(P){var Z;o.if((0,et.not)((Z=t.valid)!==null&&Z!==void 0?Z:d),P)}}Vt.funcKeywordCode=WP;function U$(e){let{gen:t,data:n,it:o}=e;t.if(o.parentData,()=>t.assign(n,(0,et._)`${o.parentData}[${o.parentDataProperty}]`))}function JP(e,t){let{gen:n}=e;n.if((0,et._)`Array.isArray(${t})`,()=>{n.assign(hn.default.vErrors,(0,et._)`${hn.default.vErrors} === null ? ${t} : ${hn.default.vErrors}.concat(${t})`).assign(hn.default.errors,(0,et._)`${hn.default.vErrors}.length`),(0,VP.extendErrors)(e)},()=>e.error())}function GP({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function Z$(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,et.stringify)(n)})}function BP(e,t,n=!1){return!t.length||t.some(o=>o==="array"?Array.isArray(e):o==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==o||n&&typeof e>"u")}Vt.validSchemaType=BP;function KP({schema:e,opts:t,self:n,errSchemaPath:o},r,i){if(Array.isArray(r.keyword)?!r.keyword.includes(i):r.keyword!==i)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 ${i}: ${a.join(",")}`);if(r.validateSchema&&!r.validateSchema(e[i])){let c=`keyword "${i}" value is invalid at path "${o}": `+n.errorsText(r.validateSchema.errors);if(t.validateSchema==="log")n.logger.error(c);else throw new Error(c)}}Vt.validateKeywordUsage=KP});var q$=E(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.extendSubschemaMode=Dr.extendSubschemaData=Dr.getSubschema=void 0;var Ht=Y(),L$=se();function XP(e,{keyword:t,schemaProp:n,schema:o,schemaPath:r,errSchemaPath:i,topSchemaRef:a}){if(t!==void 0&&o!==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,Ht._)`${e.schemaPath}${(0,Ht.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:s[n],schemaPath:(0,Ht._)`${e.schemaPath}${(0,Ht.getProperty)(t)}${(0,Ht.getProperty)(n)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,L$.escapeFragment)(n)}`}}if(o!==void 0){if(r===void 0||i===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:r,topSchemaRef:a,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}Dr.getSubschema=XP;function YP(e,t,{dataProp:n,dataPropType:o,data:r,dataTypes:i,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,Ht._)`${t.data}${(0,Ht.getProperty)(n)}`,!0);c(p),e.errorPath=(0,Ht.str)`${u}${(0,L$.getErrorPath)(n,o,d.jsPropertySyntax)}`,e.parentDataProperty=(0,Ht._)`${n}`,e.dataPathArr=[...l,e.parentDataProperty]}if(r!==void 0){let u=r instanceof Ht.Name?r:s.let("data",r,!0);c(u),a!==void 0&&(e.propertyName=a)}i&&(e.dataTypes=i);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]}}Dr.extendSubschemaData=YP;function QP(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:o,createErrors:r,allErrors:i}){o!==void 0&&(e.compositeRule=o),r!==void 0&&(e.createErrors=r),i!==void 0&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=n}Dr.extendSubschemaMode=QP});var zh=E((CM,F$)=>{"use strict";F$.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 o,r,i;if(Array.isArray(t)){if(o=t.length,o!=n.length)return!1;for(r=o;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(i=Object.keys(t),o=i.length,o!==Object.keys(n).length)return!1;for(r=o;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[r]))return!1;for(r=o;r--!==0;){var a=i[r];if(!e(t[a],n[a]))return!1}return!0}return t!==t&&n!==n}});var H$=E((AM,V$)=>{"use strict";var Cr=V$.exports=function(e,t,n){typeof t=="function"&&(n=t,t={}),n=t.cb||n;var o=typeof n=="function"?n:n.pre||function(){},r=n.post||function(){};jl(t,o,r,e,"",e)};Cr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Cr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Cr.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Cr.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 jl(e,t,n,o,r,i,a,s,c,u){if(o&&typeof o=="object"&&!Array.isArray(o)){t(o,r,i,a,s,c,u);for(var l in o){var d=o[l];if(Array.isArray(d)){if(l in Cr.arrayKeywords)for(var p=0;p<d.length;p++)jl(e,t,n,d[p],r+"/"+l+"/"+p,i,r,l,o,p)}else if(l in Cr.propsKeywords){if(d&&typeof d=="object")for(var f in d)jl(e,t,n,d[f],r+"/"+l+"/"+eE(f),i,r,l,o,f)}else(l in Cr.keywords||e.allKeys&&!(l in Cr.skipKeywords))&&jl(e,t,n,d,r+"/"+l,i,r,l,o)}n(o,r,i,a,s,c,u)}}function eE(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var ga=E(ut=>{"use strict";Object.defineProperty(ut,"__esModule",{value:!0});ut.getSchemaRefs=ut.resolveUrl=ut.normalizeId=ut._getFullPath=ut.getFullPath=ut.inlineRef=void 0;var tE=se(),rE=zh(),nE=H$(),oE=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function iE(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Ih(e):t?W$(e)<=t:!1}ut.inlineRef=iE;var aE=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Ih(e){for(let t in e){if(aE.has(t))return!0;let n=e[t];if(Array.isArray(n)&&n.some(Ih)||typeof n=="object"&&Ih(n))return!0}return!1}function W$(e){let t=0;for(let n in e){if(n==="$ref")return 1/0;if(t++,!oE.has(n)&&(typeof e[n]=="object"&&(0,tE.eachItem)(e[n],o=>t+=W$(o)),t===1/0))return 1/0}return t}function J$(e,t="",n){n!==!1&&(t=bo(t));let o=e.parse(t);return G$(e,o)}ut.getFullPath=J$;function G$(e,t){return e.serialize(t).split("#")[0]+"#"}ut._getFullPath=G$;var sE=/#\/?$/;function bo(e){return e?e.replace(sE,""):""}ut.normalizeId=bo;function cE(e,t,n){return n=bo(n),e.resolve(t,n)}ut.resolveUrl=cE;var uE=/^[a-z_][-a-z0-9._]*$/i;function lE(e,t){if(typeof e=="boolean")return{};let{schemaId:n,uriResolver:o}=this.opts,r=bo(e[n]||t),i={"":r},a=J$(o,r,!1),s={},c=new Set;return nE(e,{allKeys:!0},(d,p,f,g)=>{if(g===void 0)return;let y=a+p,S=i[g];typeof d[n]=="string"&&(S=P.call(this,d[n])),Z.call(this,d.$anchor),Z.call(this,d.$dynamicAnchor),i[p]=S;function P(D){let V=this.opts.uriResolver.resolve;if(D=bo(S?V(S,D):D),c.has(D))throw l(D);c.add(D);let A=this.refs[D];return typeof A=="string"&&(A=this.refs[A]),typeof A=="object"?u(d,A.schema,D):D!==bo(y)&&(D[0]==="#"?(u(d,s[D],D),s[D]=d):this.refs[D]=y),D}function Z(D){if(typeof D=="string"){if(!uE.test(D))throw new Error(`invalid anchor "${D}"`);P.call(this,`#${D}`)}}}),s;function u(d,p,f){if(p!==void 0&&!rE(d,p))throw l(f)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}ut.getSchemaRefs=lE});var _a=E(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});Ar.getData=Ar.KeywordCxt=Ar.validateFunctionCode=void 0;var Q$=T$(),B$=ha(),Ph=_h(),Rl=ha(),dE=D$(),ya=M$(),Th=q$(),C=Y(),H=ar(),pE=ga(),sr=se(),va=ma();function fE(e){if(rx(e)&&(nx(e),tx(e))){gE(e);return}ex(e,()=>(0,Q$.topBoolOrEmptySchema)(e))}Ar.validateFunctionCode=fE;function ex({gen:e,validateName:t,schema:n,schemaEnv:o,opts:r},i){r.code.es5?e.func(t,(0,C._)`${H.default.data}, ${H.default.valCxt}`,o.$async,()=>{e.code((0,C._)`"use strict"; ${K$(n,r)}`),hE(e,r),e.code(i)}):e.func(t,(0,C._)`${H.default.data}, ${mE(r)}`,o.$async,()=>e.code(K$(n,r)).code(i))}function mE(e){return(0,C._)`{${H.default.instancePath}="", ${H.default.parentData}, ${H.default.parentDataProperty}, ${H.default.rootData}=${H.default.data}${e.dynamicRef?(0,C._)`, ${H.default.dynamicAnchors}={}`:C.nil}}={}`}function hE(e,t){e.if(H.default.valCxt,()=>{e.var(H.default.instancePath,(0,C._)`${H.default.valCxt}.${H.default.instancePath}`),e.var(H.default.parentData,(0,C._)`${H.default.valCxt}.${H.default.parentData}`),e.var(H.default.parentDataProperty,(0,C._)`${H.default.valCxt}.${H.default.parentDataProperty}`),e.var(H.default.rootData,(0,C._)`${H.default.valCxt}.${H.default.rootData}`),t.dynamicRef&&e.var(H.default.dynamicAnchors,(0,C._)`${H.default.valCxt}.${H.default.dynamicAnchors}`)},()=>{e.var(H.default.instancePath,(0,C._)`""`),e.var(H.default.parentData,(0,C._)`undefined`),e.var(H.default.parentDataProperty,(0,C._)`undefined`),e.var(H.default.rootData,H.default.data),t.dynamicRef&&e.var(H.default.dynamicAnchors,(0,C._)`{}`)})}function gE(e){let{schema:t,opts:n,gen:o}=e;ex(e,()=>{n.$comment&&t.$comment&&ix(e),$E(e),o.let(H.default.vErrors,null),o.let(H.default.errors,0),n.unevaluated&&vE(e),ox(e),wE(e)})}function vE(e){let{gen:t,validateName:n}=e;e.evaluated=t.const("evaluated",(0,C._)`${n}.evaluated`),t.if((0,C._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,C._)`${e.evaluated}.props`,(0,C._)`undefined`)),t.if((0,C._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,C._)`${e.evaluated}.items`,(0,C._)`undefined`))}function K$(e,t){let n=typeof e=="object"&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,C._)`/*# sourceURL=${n} */`:C.nil}function yE(e,t){if(rx(e)&&(nx(e),tx(e))){_E(e,t);return}(0,Q$.boolOrEmptySchema)(e,t)}function tx({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 rx(e){return typeof e.schema!="boolean"}function _E(e,t){let{schema:n,gen:o,opts:r}=e;r.$comment&&n.$comment&&ix(e),xE(e),kE(e);let i=o.const("_errs",H.default.errors);ox(e,i),o.var(t,(0,C._)`${i} === ${H.default.errors}`)}function nx(e){(0,sr.checkUnknownRules)(e),bE(e)}function ox(e,t){if(e.opts.jtd)return X$(e,[],!1,t);let n=(0,B$.getSchemaTypes)(e.schema),o=(0,B$.coerceAndCheckDataType)(e,n);X$(e,n,!o,t)}function bE(e){let{schema:t,errSchemaPath:n,opts:o,self:r}=e;t.$ref&&o.ignoreKeywordsWithRef&&(0,sr.schemaHasRulesButRef)(t,r.RULES)&&r.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function $E(e){let{schema:t,opts:n}=e;t.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,sr.checkStrictMode)(e,"default is ignored in the schema root")}function xE(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,pE.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function kE(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function ix({gen:e,schemaEnv:t,schema:n,errSchemaPath:o,opts:r}){let i=n.$comment;if(r.$comment===!0)e.code((0,C._)`${H.default.self}.logger.log(${i})`);else if(typeof r.$comment=="function"){let a=(0,C.str)`${o}/$comment`,s=e.scopeValue("root",{ref:t.root});e.code((0,C._)`${H.default.self}.opts.$comment(${i}, ${a}, ${s}.schema)`)}}function wE(e){let{gen:t,schemaEnv:n,validateName:o,ValidationError:r,opts:i}=e;n.$async?t.if((0,C._)`${H.default.errors} === 0`,()=>t.return(H.default.data),()=>t.throw((0,C._)`new ${r}(${H.default.vErrors})`)):(t.assign((0,C._)`${o}.errors`,H.default.vErrors),i.unevaluated&&SE(e),t.return((0,C._)`${H.default.errors} === 0`))}function SE({gen:e,evaluated:t,props:n,items:o}){n instanceof C.Name&&e.assign((0,C._)`${t}.props`,n),o instanceof C.Name&&e.assign((0,C._)`${t}.items`,o)}function X$(e,t,n,o){let{gen:r,schema:i,data:a,allErrors:s,opts:c,self:u}=e,{RULES:l}=u;if(i.$ref&&(c.ignoreKeywordsWithRef||!(0,sr.schemaHasRulesButRef)(i,l))){r.block(()=>sx(e,"$ref",l.all.$ref.definition));return}c.jtd||zE(e,t),r.block(()=>{for(let p of l.rules)d(p);d(l.post)});function d(p){(0,Ph.shouldUseGroup)(i,p)&&(p.type?(r.if((0,Rl.checkDataType)(p.type,a,c.strictNumbers)),Y$(e,p),t.length===1&&t[0]===p.type&&n&&(r.else(),(0,Rl.reportTypeError)(e)),r.endIf()):Y$(e,p),s||r.if((0,C._)`${H.default.errors} === ${o||0}`))}}function Y$(e,t){let{gen:n,schema:o,opts:{useDefaults:r}}=e;r&&(0,dE.assignDefaults)(e,t.type),n.block(()=>{for(let i of t.rules)(0,Ph.shouldUseRule)(o,i)&&sx(e,i.keyword,i.definition,t.type)})}function zE(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(IE(e,t),e.opts.allowUnionTypes||TE(e,t),PE(e,e.dataTypes))}function IE(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(n=>{ax(e.dataTypes,n)||Eh(e,`type "${n}" not allowed by context "${e.dataTypes.join(",")}"`)}),OE(e,t)}}function TE(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Eh(e,"use allowUnionTypes to allow union type keyword")}function PE(e,t){let n=e.self.RULES.all;for(let o in n){let r=n[o];if(typeof r=="object"&&(0,Ph.shouldUseRule)(e.schema,r)){let{type:i}=r.definition;i.length&&!i.some(a=>EE(t,a))&&Eh(e,`missing type "${i.join(",")}" for keyword "${o}"`)}}}function EE(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function ax(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function OE(e,t){let n=[];for(let o of e.dataTypes)ax(t,o)?n.push(o):t.includes("integer")&&o==="number"&&n.push("integer");e.dataTypes=n}function Eh(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,sr.checkStrictMode)(e,t,e.opts.strictTypes)}var Nl=class{constructor(t,n,o){if((0,ya.validateKeywordUsage)(t,n,o),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=o,this.data=t.data,this.schema=t.schema[o],this.$data=n.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,sr.schemaRefOrVal)(t,this.schema,o,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",cx(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,ya.validSchemaType)(this.schema,n.schemaType,n.allowUndefined))throw new Error(`${o} value must be ${JSON.stringify(n.schemaType)}`);("code"in n?n.trackErrors:n.errors!==!1)&&(this.errsCount=t.gen.const("_errs",H.default.errors))}result(t,n,o){this.failResult((0,C.not)(t),n,o)}failResult(t,n,o){this.gen.if(t),o?o():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,C.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,C._)`${n} !== undefined && (${(0,C.or)(this.invalid$data(),t)})`)}error(t,n,o){if(n){this.setParams(n),this._error(t,o),this.setParams({});return}this._error(t,o)}_error(t,n){(t?va.reportExtraError:va.reportError)(this,this.def.error,n)}$dataError(){(0,va.reportError)(this,this.def.$dataError||va.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,va.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,o=C.nil){this.gen.block(()=>{this.check$data(t,o),n()})}check$data(t=C.nil,n=C.nil){if(!this.$data)return;let{gen:o,schemaCode:r,schemaType:i,def:a}=this;o.if((0,C.or)((0,C._)`${r} === undefined`,n)),t!==C.nil&&o.assign(t,!0),(i.length||a.validateSchema)&&(o.elseIf(this.invalid$data()),this.$dataError(),t!==C.nil&&o.assign(t,!1)),o.else()}invalid$data(){let{gen:t,schemaCode:n,schemaType:o,def:r,it:i}=this;return(0,C.or)(a(),s());function a(){if(o.length){if(!(n instanceof C.Name))throw new Error("ajv implementation error");let c=Array.isArray(o)?o:[o];return(0,C._)`${(0,Rl.checkDataTypes)(c,n,i.opts.strictNumbers,Rl.DataType.Wrong)}`}return C.nil}function s(){if(r.validateSchema){let c=t.scopeValue("validate$data",{ref:r.validateSchema});return(0,C._)`!${c}(${n})`}return C.nil}}subschema(t,n){let o=(0,Th.getSubschema)(this.it,t);(0,Th.extendSubschemaData)(o,this.it,t),(0,Th.extendSubschemaMode)(o,t);let r={...this.it,...o,items:void 0,props:void 0};return yE(r,n),r}mergeEvaluated(t,n){let{it:o,gen:r}=this;o.opts.unevaluated&&(o.props!==!0&&t.props!==void 0&&(o.props=sr.mergeEvaluated.props(r,t.props,o.props,n)),o.items!==!0&&t.items!==void 0&&(o.items=sr.mergeEvaluated.items(r,t.items,o.items,n)))}mergeValidEvaluated(t,n){let{it:o,gen:r}=this;if(o.opts.unevaluated&&(o.props!==!0||o.items!==!0))return r.if(n,()=>this.mergeEvaluated(t,C.Name)),!0}};Ar.KeywordCxt=Nl;function sx(e,t,n,o){let r=new Nl(e,n,t);"code"in n?n.code(r,o):r.$data&&n.validate?(0,ya.funcKeywordCode)(r,n):"macro"in n?(0,ya.macroKeywordCode)(r,n):(n.compile||n.validate)&&(0,ya.funcKeywordCode)(r,n)}var jE=/^\/(?:[^~]|~0|~1)*$/,RE=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function cx(e,{dataLevel:t,dataNames:n,dataPathArr:o}){let r,i;if(e==="")return H.default.rootData;if(e[0]==="/"){if(!jE.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);r=e,i=H.default.rootData}else{let u=RE.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 o[t-l]}if(l>t)throw new Error(c("data",l));if(i=n[t-l],!r)return i}let a=i,s=r.split("/");for(let u of s)u&&(i=(0,C._)`${i}${(0,C.getProperty)((0,sr.unescapeJsonPointer)(u))}`,a=(0,C._)`${a} && ${i}`);return a;function c(u,l){return`Cannot access ${u} ${l} levels up, current level is ${t}`}}Ar.getData=cx});var Dl=E(jh=>{"use strict";Object.defineProperty(jh,"__esModule",{value:!0});var Oh=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};jh.default=Oh});var ba=E(Dh=>{"use strict";Object.defineProperty(Dh,"__esModule",{value:!0});var Rh=ga(),Nh=class extends Error{constructor(t,n,o,r){super(r||`can't resolve reference ${o} from id ${n}`),this.missingRef=(0,Rh.resolveUrl)(t,n,o),this.missingSchema=(0,Rh.normalizeId)((0,Rh.getFullPath)(t,this.missingRef))}};Dh.default=Nh});var Al=E(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.resolveSchema=wt.getCompilingSchema=wt.resolveRef=wt.compileSchema=wt.SchemaEnv=void 0;var At=Y(),NE=Dl(),gn=ar(),Ut=ga(),ux=se(),DE=_a(),$o=class{constructor(t){var n;this.refs={},this.dynamicAnchors={};let o;typeof t.schema=="object"&&(o=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,Ut.normalizeId)(o?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=o?.$async,this.refs={}}};wt.SchemaEnv=$o;function Ah(e){let t=lx.call(this,e);if(t)return t;let n=(0,Ut.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:o,lines:r}=this.opts.code,{ownProperties:i}=this.opts,a=new At.CodeGen(this.scope,{es5:o,lines:r,ownProperties:i}),s;e.$async&&(s=a.scopeValue("Error",{ref:NE.default,code:(0,At._)`require("ajv/dist/runtime/validation_error").default`}));let c=a.scopeName("validate");e.validateName=c;let u={gen:a,allErrors:this.opts.allErrors,data:gn.default.data,parentData:gn.default.parentData,parentDataProperty:gn.default.parentDataProperty,dataNames:[gn.default.data],dataPathArr:[At.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,At.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:s,schema:e.schema,schemaEnv:e,rootId:n,baseId:e.baseId||n,schemaPath:At.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,At._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(e),(0,DE.validateFunctionCode)(u),a.optimize(this.opts.code.optimize);let d=a.toString();l=`${a.scopeRefs(gn.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,e));let f=new Function(`${gn.default.self}`,`${gn.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:g,items:y}=u;f.evaluated={props:g instanceof At.Name?void 0:g,items:y instanceof At.Name?void 0:y,dynamicProps:g instanceof At.Name,dynamicItems:y instanceof At.Name},f.source&&(f.source.evaluated=(0,At.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)}}wt.compileSchema=Ah;function CE(e,t,n){var o;n=(0,Ut.resolveUrl)(this.opts.uriResolver,t,n);let r=e.refs[n];if(r)return r;let i=ZE.call(this,e,n);if(i===void 0){let a=(o=e.localRefs)===null||o===void 0?void 0:o[n],{schemaId:s}=this.opts;a&&(i=new $o({schema:a,schemaId:s,root:e,baseId:t}))}if(i!==void 0)return e.refs[n]=AE.call(this,i)}wt.resolveRef=CE;function AE(e){return(0,Ut.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Ah.call(this,e)}function lx(e){for(let t of this._compilations)if(UE(t,e))return t}wt.getCompilingSchema=lx;function UE(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function ZE(e,t){let n;for(;typeof(n=this.refs[t])=="string";)t=n;return n||this.schemas[t]||Cl.call(this,e,t)}function Cl(e,t){let n=this.opts.uriResolver.parse(t),o=(0,Ut._getFullPath)(this.opts.uriResolver,n),r=(0,Ut.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&o===r)return Ch.call(this,n,e);let i=(0,Ut.normalizeId)(o),a=this.refs[i]||this.schemas[i];if(typeof a=="string"){let s=Cl.call(this,e,a);return typeof s?.schema!="object"?void 0:Ch.call(this,n,s)}if(typeof a?.schema=="object"){if(a.validate||Ah.call(this,a),i===(0,Ut.normalizeId)(t)){let{schema:s}=a,{schemaId:c}=this.opts,u=s[c];return u&&(r=(0,Ut.resolveUrl)(this.opts.uriResolver,r,u)),new $o({schema:s,schemaId:c,root:e,baseId:r})}return Ch.call(this,n,a)}}wt.resolveSchema=Cl;var ME=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Ch(e,{baseId:t,schema:n,root:o}){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,ux.unescapeFragment)(s)];if(c===void 0)return;n=c;let u=typeof n=="object"&&n[this.opts.schemaId];!ME.has(s)&&u&&(t=(0,Ut.resolveUrl)(this.opts.uriResolver,t,u))}let i;if(typeof n!="boolean"&&n.$ref&&!(0,ux.schemaHasRulesButRef)(n,this.RULES)){let s=(0,Ut.resolveUrl)(this.opts.uriResolver,t,n.$ref);i=Cl.call(this,o,s)}let{schemaId:a}=this.opts;if(i=i||new $o({schema:n,schemaId:a,root:o,baseId:t}),i.schema!==i.root.schema)return i}});var dx=E((FM,LE)=>{LE.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 Zh=E((VM,hx)=>{"use strict";var qE=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),fx=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);function Uh(e){let t="",n=0,o=0;for(o=0;o<e.length;o++)if(n=e[o].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";t+=e[o];break}for(o+=1;o<e.length;o++){if(n=e[o].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";t+=e[o]}return t}var FE=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function px(e){return e.length=0,!0}function VE(e,t,n){if(e.length){let o=Uh(e);if(o!=="")t.push(o);else return n.error=!0,!1;e.length=0}return!0}function HE(e){let t=0,n={error:!1,address:"",zone:""},o=[],r=[],i=!1,a=!1,s=VE;for(let c=0;c<e.length;c++){let u=e[c];if(!(u==="["||u==="]"))if(u===":"){if(i===!0&&(a=!0),!s(r,o,n))break;if(++t>7){n.error=!0;break}c>0&&e[c-1]===":"&&(i=!0),o.push(":");continue}else if(u==="%"){if(!s(r,o,n))break;s=px}else{r.push(u);continue}}return r.length&&(s===px?n.zone=r.join(""):a?o.push(r.join("")):o.push(Uh(r))),n.address=o.join(""),n}function mx(e){if(WE(e,":")<2)return{host:e,isIPV6:!1};let t=HE(e);if(t.error)return{host:e,isIPV6:!1};{let n=t.address,o=t.address;return t.zone&&(n+="%"+t.zone,o+="%25"+t.zone),{host:n,isIPV6:!0,escapedHost:o}}}function WE(e,t){let n=0;for(let o=0;o<e.length;o++)e[o]===t&&n++;return n}function JE(e){let t=e,n=[],o=-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((o=t.indexOf("/",1))===-1){n.push(t);break}else n.push(t.slice(0,o)),t=t.slice(o)}return n.join("")}function GE(e,t){let n=t!==!0?escape:unescape;return e.scheme!==void 0&&(e.scheme=n(e.scheme)),e.userinfo!==void 0&&(e.userinfo=n(e.userinfo)),e.host!==void 0&&(e.host=n(e.host)),e.path!==void 0&&(e.path=n(e.path)),e.query!==void 0&&(e.query=n(e.query)),e.fragment!==void 0&&(e.fragment=n(e.fragment)),e}function BE(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let n=unescape(e.host);if(!fx(n)){let o=mx(n);o.isIPV6===!0?n=`[${o.escapedHost}]`:n=e.host}t.push(n)}return(typeof e.port=="number"||typeof e.port=="string")&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}hx.exports={nonSimpleDomain:FE,recomposeAuthority:BE,normalizeComponentEncoding:GE,removeDotSegments:JE,isIPv4:fx,isUUID:qE,normalizeIPv6:mx,stringArrayToHexStripped:Uh}});var bx=E((HM,_x)=>{"use strict";var{isUUID:KE}=Zh(),XE=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,YE=["http","https","ws","wss","urn","urn:uuid"];function QE(e){return YE.indexOf(e)!==-1}function Mh(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 gx(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function vx(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 eO(e){return e.secure=Mh(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function tO(e){if((e.port===(Mh(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,n]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}function rO(e,t){if(!e.path)return e.error="URN can not be parsed",e;let n=e.path.match(XE);if(n){let o=t.scheme||e.scheme||"urn";e.nid=n[1].toLowerCase(),e.nss=n[2];let r=`${o}:${t.nid||e.nid}`,i=Lh(r);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function nO(e,t){if(e.nid===void 0)throw new Error("URN without nid cannot be serialized");let n=t.scheme||e.scheme||"urn",o=e.nid.toLowerCase(),r=`${n}:${t.nid||o}`,i=Lh(r);i&&(e=i.serialize(e,t));let a=e,s=e.nss;return a.path=`${o||t.nid}:${s}`,t.skipEscape=!0,a}function oO(e,t){let n=e;return n.uuid=n.nss,n.nss=void 0,!t.tolerant&&(!n.uuid||!KE(n.uuid))&&(n.error=n.error||"UUID is not valid."),n}function iO(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var yx={scheme:"http",domainHost:!0,parse:gx,serialize:vx},aO={scheme:"https",domainHost:yx.domainHost,parse:gx,serialize:vx},Ul={scheme:"ws",domainHost:!0,parse:eO,serialize:tO},sO={scheme:"wss",domainHost:Ul.domainHost,parse:Ul.parse,serialize:Ul.serialize},cO={scheme:"urn",parse:rO,serialize:nO,skipNormalize:!0},uO={scheme:"urn:uuid",parse:oO,serialize:iO,skipNormalize:!0},Zl={http:yx,https:aO,ws:Ul,wss:sO,urn:cO,"urn:uuid":uO};Object.setPrototypeOf(Zl,null);function Lh(e){return e&&(Zl[e]||Zl[e.toLowerCase()])||void 0}_x.exports={wsIsSecure:Mh,SCHEMES:Zl,isValidSchemeName:QE,getSchemeHandler:Lh}});var kx=E((WM,Ll)=>{"use strict";var{normalizeIPv6:lO,removeDotSegments:$a,recomposeAuthority:dO,normalizeComponentEncoding:Ml,isIPv4:pO,nonSimpleDomain:fO}=Zh(),{SCHEMES:mO,getSchemeHandler:$x}=bx();function hO(e,t){return typeof e=="string"?e=Wt(cr(e,t),t):typeof e=="object"&&(e=cr(Wt(e,t),t)),e}function gO(e,t,n){let o=n?Object.assign({scheme:"null"},n):{scheme:"null"},r=xx(cr(e,o),cr(t,o),o,!0);return o.skipEscape=!0,Wt(r,o)}function xx(e,t,n,o){let r={};return o||(e=cr(Wt(e,n),n),t=cr(Wt(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=$a(t.path||""),r.query=t.query):(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=$a(t.path||""),r.query=t.query):(t.path?(t.path[0]==="/"?r.path=$a(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!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=$a(r.path)),r.query=t.query):(r.path=e.path,t.query!==void 0?r.query=t.query:r.query=e.query),r.userinfo=e.userinfo,r.host=e.host,r.port=e.port),r.scheme=e.scheme),r.fragment=t.fragment,r}function vO(e,t,n){return typeof e=="string"?(e=unescape(e),e=Wt(Ml(cr(e,n),!0),{...n,skipEscape:!0})):typeof e=="object"&&(e=Wt(Ml(e,!0),{...n,skipEscape:!0})),typeof t=="string"?(t=unescape(t),t=Wt(Ml(cr(t,n),!0),{...n,skipEscape:!0})):typeof t=="object"&&(t=Wt(Ml(t,!0),{...n,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function Wt(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:""},o=Object.assign({},t),r=[],i=$x(o.scheme||n.scheme);i&&i.serialize&&i.serialize(n,o),n.path!==void 0&&(o.skipEscape?n.path=unescape(n.path):(n.path=escape(n.path),n.scheme!==void 0&&(n.path=n.path.split("%3A").join(":")))),o.reference!=="suffix"&&n.scheme&&r.push(n.scheme,":");let a=dO(n);if(a!==void 0&&(o.reference!=="suffix"&&r.push("//"),r.push(a),n.path&&n.path[0]!=="/"&&r.push("/")),n.path!==void 0){let s=n.path;!o.absolutePath&&(!i||!i.absolutePath)&&(s=$a(s)),a===void 0&&s[0]==="/"&&s[1]==="/"&&(s="/%2F"+s.slice(2)),r.push(s)}return n.query!==void 0&&r.push("?",n.query),n.fragment!==void 0&&r.push("#",n.fragment),r.join("")}var yO=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function cr(e,t){let n=Object.assign({},t),o={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},r=!1;n.reference==="suffix"&&(n.scheme?e=n.scheme+":"+e:e="//"+e);let i=e.match(yO);if(i){if(o.scheme=i[1],o.userinfo=i[3],o.host=i[4],o.port=parseInt(i[5],10),o.path=i[6]||"",o.query=i[7],o.fragment=i[8],isNaN(o.port)&&(o.port=i[5]),o.host)if(pO(o.host)===!1){let c=lO(o.host);o.host=c.host.toLowerCase(),r=c.isIPV6}else r=!0;o.scheme===void 0&&o.userinfo===void 0&&o.host===void 0&&o.port===void 0&&o.query===void 0&&!o.path?o.reference="same-document":o.scheme===void 0?o.reference="relative":o.fragment===void 0?o.reference="absolute":o.reference="uri",n.reference&&n.reference!=="suffix"&&n.reference!==o.reference&&(o.error=o.error||"URI is not a "+n.reference+" reference.");let a=$x(n.scheme||o.scheme);if(!n.unicodeSupport&&(!a||!a.unicodeSupport)&&o.host&&(n.domainHost||a&&a.domainHost)&&r===!1&&fO(o.host))try{o.host=URL.domainToASCII(o.host.toLowerCase())}catch(s){o.error=o.error||"Host's domain name can not be converted to ASCII: "+s}(!a||a&&!a.skipNormalize)&&(e.indexOf("%")!==-1&&(o.scheme!==void 0&&(o.scheme=unescape(o.scheme)),o.host!==void 0&&(o.host=unescape(o.host))),o.path&&(o.path=escape(unescape(o.path))),o.fragment&&(o.fragment=encodeURI(decodeURIComponent(o.fragment)))),a&&a.parse&&a.parse(o,n)}else o.error=o.error||"URI can not be parsed.";return o}var qh={SCHEMES:mO,normalize:hO,resolve:gO,resolveComponent:xx,equal:vO,serialize:Wt,parse:cr};Ll.exports=qh;Ll.exports.default=qh;Ll.exports.fastUri=qh});var Sx=E(Fh=>{"use strict";Object.defineProperty(Fh,"__esModule",{value:!0});var wx=kx();wx.code='require("ajv/dist/runtime/uri").default';Fh.default=wx});var Rx=E(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.CodeGen=qe.Name=qe.nil=qe.stringify=qe.str=qe._=qe.KeywordCxt=void 0;var _O=_a();Object.defineProperty(qe,"KeywordCxt",{enumerable:!0,get:function(){return _O.KeywordCxt}});var xo=Y();Object.defineProperty(qe,"_",{enumerable:!0,get:function(){return xo._}});Object.defineProperty(qe,"str",{enumerable:!0,get:function(){return xo.str}});Object.defineProperty(qe,"stringify",{enumerable:!0,get:function(){return xo.stringify}});Object.defineProperty(qe,"nil",{enumerable:!0,get:function(){return xo.nil}});Object.defineProperty(qe,"Name",{enumerable:!0,get:function(){return xo.Name}});Object.defineProperty(qe,"CodeGen",{enumerable:!0,get:function(){return xo.CodeGen}});var bO=Dl(),Ex=ba(),$O=yh(),xa=Al(),xO=Y(),ka=ga(),ql=ha(),Hh=se(),zx=dx(),kO=Sx(),Ox=(e,t)=>new RegExp(e,t);Ox.code="new RegExp";var wO=["removeAdditional","useDefaults","coerceTypes"],SO=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),zO={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."},IO={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Ix=200;function TO(e){var t,n,o,r,i,a,s,c,u,l,d,p,f,g,y,S,P,Z,D,V,A,zt,It,vd,yd;let No=e.strict,_d=(t=e.code)===null||t===void 0?void 0:t.optimize,tv=_d===!0||_d===void 0?1:_d||0,rv=(o=(n=e.code)===null||n===void 0?void 0:n.regExp)!==null&&o!==void 0?o:Ox,Dw=(r=e.uriResolver)!==null&&r!==void 0?r:kO.default;return{strictSchema:(a=(i=e.strictSchema)!==null&&i!==void 0?i:No)!==null&&a!==void 0?a:!0,strictNumbers:(c=(s=e.strictNumbers)!==null&&s!==void 0?s:No)!==null&&c!==void 0?c:!0,strictTypes:(l=(u=e.strictTypes)!==null&&u!==void 0?u:No)!==null&&l!==void 0?l:"log",strictTuples:(p=(d=e.strictTuples)!==null&&d!==void 0?d:No)!==null&&p!==void 0?p:"log",strictRequired:(g=(f=e.strictRequired)!==null&&f!==void 0?f:No)!==null&&g!==void 0?g:!1,code:e.code?{...e.code,optimize:tv,regExp:rv}:{optimize:tv,regExp:rv},loopRequired:(y=e.loopRequired)!==null&&y!==void 0?y:Ix,loopEnum:(S=e.loopEnum)!==null&&S!==void 0?S:Ix,meta:(P=e.meta)!==null&&P!==void 0?P:!0,messages:(Z=e.messages)!==null&&Z!==void 0?Z:!0,inlineRefs:(D=e.inlineRefs)!==null&&D!==void 0?D:!0,schemaId:(V=e.schemaId)!==null&&V!==void 0?V:"$id",addUsedSchema:(A=e.addUsedSchema)!==null&&A!==void 0?A:!0,validateSchema:(zt=e.validateSchema)!==null&&zt!==void 0?zt:!0,validateFormats:(It=e.validateFormats)!==null&&It!==void 0?It:!0,unicodeRegExp:(vd=e.unicodeRegExp)!==null&&vd!==void 0?vd:!0,int32range:(yd=e.int32range)!==null&&yd!==void 0?yd:!0,uriResolver:Dw}}var wa=class{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...TO(t)};let{es5:n,lines:o}=this.opts.code;this.scope=new xO.ValueScope({scope:{},prefixes:SO,es5:n,lines:o}),this.logger=NO(t.logger);let r=t.validateFormats;t.validateFormats=!1,this.RULES=(0,$O.getRules)(),Tx.call(this,zO,t,"NOT SUPPORTED"),Tx.call(this,IO,t,"DEPRECATED","warn"),this._metaOpts=jO.call(this),t.formats&&EO.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&OO.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),PO.call(this),t.validateFormats=r}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:n,schemaId:o}=this.opts,r=zx;o==="id"&&(r={...zx},r.id=r.$id,delete r.$id),n&&t&&this.addMetaSchema(r,r[o],!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 o;if(typeof t=="string"){if(o=this.getSchema(t),!o)throw new Error(`no schema with key or ref "${t}"`)}else o=this.compile(t);let r=o(n);return"$async"in o||(this.errors=o.errors),r}compile(t,n){let o=this._addSchema(t,n);return o.validate||this._compileSchemaEnv(o)}compileAsync(t,n){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:o}=this.opts;return r.call(this,t,n);async function r(l,d){await i.call(this,l.$schema);let p=this._addSchema(l,d);return p.validate||a.call(this,p)}async function i(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 Ex.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 i.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]=o(l))}finally{delete this._loading[l]}}}addSchema(t,n,o,r=this.opts.validateSchema){if(Array.isArray(t)){for(let a of t)this.addSchema(a,void 0,o,r);return this}let i;if(typeof t=="object"){let{schemaId:a}=this.opts;if(i=t[a],i!==void 0&&typeof i!="string")throw new Error(`schema ${a} must be string`)}return n=(0,ka.normalizeId)(n||i),this._checkUnique(n),this.schemas[n]=this._addSchema(t,o,n,r,!0),this}addMetaSchema(t,n,o=this.opts.validateSchema){return this.addSchema(t,n,!0,o),this}validateSchema(t,n){if(typeof t=="boolean")return!0;let o;if(o=t.$schema,o!==void 0&&typeof o!="string")throw new Error("$schema must be a string");if(o=o||this.opts.defaultMeta||this.defaultMeta(),!o)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let r=this.validate(o,t);if(!r&&n){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw new Error(i)}return r}getSchema(t){let n;for(;typeof(n=Px.call(this,t))=="string";)t=n;if(n===void 0){let{schemaId:o}=this.opts,r=new xa.SchemaEnv({schema:{},schemaId:o});if(n=xa.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=Px.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 o=t[this.opts.schemaId];return o&&(o=(0,ka.normalizeId)(o),delete this.schemas[o],delete this.refs[o]),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 o;if(typeof t=="string")o=t,typeof n=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),n.keyword=o);else if(typeof t=="object"&&n===void 0){if(n=t,o=n.keyword,Array.isArray(o)&&!o.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(CO.call(this,o,n),!n)return(0,Hh.eachItem)(o,i=>Vh.call(this,i)),this;UO.call(this,n);let r={...n,type:(0,ql.getJSONTypes)(n.type),schemaType:(0,ql.getJSONTypes)(n.schemaType)};return(0,Hh.eachItem)(o,r.type.length===0?i=>Vh.call(this,i,r):i=>r.type.forEach(a=>Vh.call(this,i,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 o of n.rules){let r=o.rules.findIndex(i=>i.keyword===t);r>=0&&o.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:o="data"}={}){return!t||t.length===0?"No errors":t.map(r=>`${o}${r.instancePath} ${r.message}`).reduce((r,i)=>r+n+i)}$dataMetaSchema(t,n){let o=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let r of n){let i=r.split("/").slice(1),a=t;for(let s of i)a=a[s];for(let s in o){let c=o[s];if(typeof c!="object")continue;let{$data:u}=c.definition,l=a[s];u&&l&&(a[s]=jx(l))}}return t}_removeAllSchemas(t,n){for(let o in t){let r=t[o];(!n||n.test(o))&&(typeof r=="string"?delete t[o]:r&&!r.meta&&(this._cache.delete(r.schema),delete t[o]))}}_addSchema(t,n,o,r=this.opts.validateSchema,i=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;o=(0,ka.normalizeId)(a||o);let u=ka.getSchemaRefs.call(this,t,o);return c=new xa.SchemaEnv({schema:t,schemaId:s,meta:n,baseId:o,localRefs:u}),this._cache.set(c.schema,c),i&&!o.startsWith("#")&&(o&&this._checkUnique(o),this.refs[o]=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):xa.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{xa.compileSchema.call(this,t)}finally{this.opts=n}}};wa.ValidationError=bO.default;wa.MissingRefError=Ex.default;qe.default=wa;function Tx(e,t,n,o="error"){for(let r in e){let i=r;i in t&&this.logger[o](`${n}: option ${r}. ${e[i]}`)}}function Px(e){return e=(0,ka.normalizeId)(e),this.schemas[e]||this.refs[e]}function PO(){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 EO(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function OO(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 jO(){let e={...this.opts};for(let t of wO)delete e[t];return e}var RO={log(){},warn(){},error(){}};function NO(e){if(e===!1)return RO;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 DO=/^[a-z_$][a-z0-9_$:-]*$/i;function CO(e,t){let{RULES:n}=this;if((0,Hh.eachItem)(e,o=>{if(n.keywords[o])throw new Error(`Keyword ${o} is already defined`);if(!DO.test(o))throw new Error(`Keyword ${o} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function Vh(e,t,n){var o;let r=t?.post;if(n&&r)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,a=r?i.post:i.rules.find(({type:c})=>c===n);if(a||(a={type:n,rules:[]},i.rules.push(a)),i.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,ql.getJSONTypes)(t.type),schemaType:(0,ql.getJSONTypes)(t.schemaType)}};t.before?AO.call(this,a,s,t.before):a.rules.push(s),i.all[e]=s,(o=t.implements)===null||o===void 0||o.forEach(c=>this.addKeyword(c))}function AO(e,t,n){let o=e.rules.findIndex(r=>r.keyword===n);o>=0?e.rules.splice(o,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function UO(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=jx(t)),e.validateSchema=this.compile(t,!0))}var ZO={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function jx(e){return{anyOf:[e,ZO]}}});var Nx=E(Wh=>{"use strict";Object.defineProperty(Wh,"__esModule",{value:!0});var MO={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Wh.default=MO});var Ux=E(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.callRef=vn.getValidate=void 0;var LO=ba(),Dx=kt(),lt=Y(),ko=ar(),Cx=Al(),Fl=se(),qO={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:n,it:o}=e,{baseId:r,schemaEnv:i,validateName:a,opts:s,self:c}=o,{root:u}=i;if((n==="#"||n==="#/")&&r===u.baseId)return d();let l=Cx.resolveRef.call(c,u,r,n);if(l===void 0)throw new LO.default(o.opts.uriResolver,r,n);if(l instanceof Cx.SchemaEnv)return p(l);return f(l);function d(){if(i===u)return Vl(e,a,i,i.$async);let g=t.scopeValue("root",{ref:u});return Vl(e,(0,lt._)`${g}.validate`,u,u.$async)}function p(g){let y=Ax(e,g);Vl(e,y,g,g.$async)}function f(g){let y=t.scopeValue("schema",s.code.source===!0?{ref:g,code:(0,lt.stringify)(g)}:{ref:g}),S=t.name("valid"),P=e.subschema({schema:g,dataTypes:[],schemaPath:lt.nil,topSchemaRef:y,errSchemaPath:n},S);e.mergeEvaluated(P),e.ok(S)}}};function Ax(e,t){let{gen:n}=e;return t.validate?n.scopeValue("validate",{ref:t.validate}):(0,lt._)`${n.scopeValue("wrapper",{ref:t})}.validate`}vn.getValidate=Ax;function Vl(e,t,n,o){let{gen:r,it:i}=e,{allErrors:a,schemaEnv:s,opts:c}=i,u=c.passContext?ko.default.this:lt.nil;o?l():d();function l(){if(!s.$async)throw new Error("async schema referenced by sync schema");let g=r.let("valid");r.try(()=>{r.code((0,lt._)`await ${(0,Dx.callValidateCode)(e,t,u)}`),f(t),a||r.assign(g,!0)},y=>{r.if((0,lt._)`!(${y} instanceof ${i.ValidationError})`,()=>r.throw(y)),p(y),a||r.assign(g,!1)}),e.ok(g)}function d(){e.result((0,Dx.callValidateCode)(e,t,u),()=>f(t),()=>p(t))}function p(g){let y=(0,lt._)`${g}.errors`;r.assign(ko.default.vErrors,(0,lt._)`${ko.default.vErrors} === null ? ${y} : ${ko.default.vErrors}.concat(${y})`),r.assign(ko.default.errors,(0,lt._)`${ko.default.vErrors}.length`)}function f(g){var y;if(!i.opts.unevaluated)return;let S=(y=n?.validate)===null||y===void 0?void 0:y.evaluated;if(i.props!==!0)if(S&&!S.dynamicProps)S.props!==void 0&&(i.props=Fl.mergeEvaluated.props(r,S.props,i.props));else{let P=r.var("props",(0,lt._)`${g}.evaluated.props`);i.props=Fl.mergeEvaluated.props(r,P,i.props,lt.Name)}if(i.items!==!0)if(S&&!S.dynamicItems)S.items!==void 0&&(i.items=Fl.mergeEvaluated.items(r,S.items,i.items));else{let P=r.var("items",(0,lt._)`${g}.evaluated.items`);i.items=Fl.mergeEvaluated.items(r,P,i.items,lt.Name)}}}vn.callRef=Vl;vn.default=qO});var Zx=E(Jh=>{"use strict";Object.defineProperty(Jh,"__esModule",{value:!0});var FO=Nx(),VO=Ux(),HO=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",FO.default,VO.default];Jh.default=HO});var Mx=E(Gh=>{"use strict";Object.defineProperty(Gh,"__esModule",{value:!0});var Hl=Y(),Ur=Hl.operators,Wl={maximum:{okStr:"<=",ok:Ur.LTE,fail:Ur.GT},minimum:{okStr:">=",ok:Ur.GTE,fail:Ur.LT},exclusiveMaximum:{okStr:"<",ok:Ur.LT,fail:Ur.GTE},exclusiveMinimum:{okStr:">",ok:Ur.GT,fail:Ur.LTE}},WO={message:({keyword:e,schemaCode:t})=>(0,Hl.str)`must be ${Wl[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Hl._)`{comparison: ${Wl[e].okStr}, limit: ${t}}`},JO={keyword:Object.keys(Wl),type:"number",schemaType:"number",$data:!0,error:WO,code(e){let{keyword:t,data:n,schemaCode:o}=e;e.fail$data((0,Hl._)`${n} ${Wl[t].fail} ${o} || isNaN(${n})`)}};Gh.default=JO});var Lx=E(Bh=>{"use strict";Object.defineProperty(Bh,"__esModule",{value:!0});var Sa=Y(),GO={message:({schemaCode:e})=>(0,Sa.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Sa._)`{multipleOf: ${e}}`},BO={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:GO,code(e){let{gen:t,data:n,schemaCode:o,it:r}=e,i=r.opts.multipleOfPrecision,a=t.let("res"),s=i?(0,Sa._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${i}`:(0,Sa._)`${a} !== parseInt(${a})`;e.fail$data((0,Sa._)`(${o} === 0 || (${a} = ${n}/${o}, ${s}))`)}};Bh.default=BO});var Fx=E(Kh=>{"use strict";Object.defineProperty(Kh,"__esModule",{value:!0});function qx(e){let t=e.length,n=0,o=0,r;for(;o<t;)n++,r=e.charCodeAt(o++),r>=55296&&r<=56319&&o<t&&(r=e.charCodeAt(o),(r&64512)===56320&&o++);return n}Kh.default=qx;qx.code='require("ajv/dist/runtime/ucs2length").default'});var Vx=E(Xh=>{"use strict";Object.defineProperty(Xh,"__esModule",{value:!0});var yn=Y(),KO=se(),XO=Fx(),YO={message({keyword:e,schemaCode:t}){let n=e==="maxLength"?"more":"fewer";return(0,yn.str)`must NOT have ${n} than ${t} characters`},params:({schemaCode:e})=>(0,yn._)`{limit: ${e}}`},QO={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:YO,code(e){let{keyword:t,data:n,schemaCode:o,it:r}=e,i=t==="maxLength"?yn.operators.GT:yn.operators.LT,a=r.opts.unicode===!1?(0,yn._)`${n}.length`:(0,yn._)`${(0,KO.useFunc)(e.gen,XO.default)}(${n})`;e.fail$data((0,yn._)`${a} ${i} ${o}`)}};Xh.default=QO});var Hx=E(Yh=>{"use strict";Object.defineProperty(Yh,"__esModule",{value:!0});var ej=kt(),tj=se(),wo=Y(),rj={message:({schemaCode:e})=>(0,wo.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,wo._)`{pattern: ${e}}`},nj={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:rj,code(e){let{gen:t,data:n,$data:o,schema:r,schemaCode:i,it:a}=e,s=a.opts.unicodeRegExp?"u":"";if(o){let{regExp:c}=a.opts.code,u=c.code==="new RegExp"?(0,wo._)`new RegExp`:(0,tj.useFunc)(t,c),l=t.let("valid");t.try(()=>t.assign(l,(0,wo._)`${u}(${i}, ${s}).test(${n})`),()=>t.assign(l,!1)),e.fail$data((0,wo._)`!${l}`)}else{let c=(0,ej.usePattern)(e,r);e.fail$data((0,wo._)`!${c}.test(${n})`)}}};Yh.default=nj});var Wx=E(Qh=>{"use strict";Object.defineProperty(Qh,"__esModule",{value:!0});var za=Y(),oj={message({keyword:e,schemaCode:t}){let n=e==="maxProperties"?"more":"fewer";return(0,za.str)`must NOT have ${n} than ${t} properties`},params:({schemaCode:e})=>(0,za._)`{limit: ${e}}`},ij={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:oj,code(e){let{keyword:t,data:n,schemaCode:o}=e,r=t==="maxProperties"?za.operators.GT:za.operators.LT;e.fail$data((0,za._)`Object.keys(${n}).length ${r} ${o}`)}};Qh.default=ij});var Jx=E(eg=>{"use strict";Object.defineProperty(eg,"__esModule",{value:!0});var Ia=kt(),Ta=Y(),aj=se(),sj={message:({params:{missingProperty:e}})=>(0,Ta.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Ta._)`{missingProperty: ${e}}`},cj={keyword:"required",type:"object",schemaType:"array",$data:!0,error:sj,code(e){let{gen:t,schema:n,schemaCode:o,data:r,$data:i,it:a}=e,{opts:s}=a;if(!i&&n.length===0)return;let c=n.length>=s.loopRequired;if(a.allErrors?u():l(),s.strictRequired){let f=e.parentSchema.properties,{definedProperties:g}=e.it;for(let y of n)if(f?.[y]===void 0&&!g.has(y)){let S=a.schemaEnv.baseId+a.errSchemaPath,P=`required property "${y}" is not defined at "${S}" (strictRequired)`;(0,aj.checkStrictMode)(a,P,a.opts.strictRequired)}}function u(){if(c||i)e.block$data(Ta.nil,d);else for(let f of n)(0,Ia.checkReportMissingProp)(e,f)}function l(){let f=t.let("missing");if(c||i){let g=t.let("valid",!0);e.block$data(g,()=>p(f,g)),e.ok(g)}else t.if((0,Ia.checkMissingProp)(e,n,f)),(0,Ia.reportMissingProp)(e,f),t.else()}function d(){t.forOf("prop",o,f=>{e.setParams({missingProperty:f}),t.if((0,Ia.noPropertyInData)(t,r,f,s.ownProperties),()=>e.error())})}function p(f,g){e.setParams({missingProperty:f}),t.forOf(f,o,()=>{t.assign(g,(0,Ia.propertyInData)(t,r,f,s.ownProperties)),t.if((0,Ta.not)(g),()=>{e.error(),t.break()})},Ta.nil)}}};eg.default=cj});var Gx=E(tg=>{"use strict";Object.defineProperty(tg,"__esModule",{value:!0});var Pa=Y(),uj={message({keyword:e,schemaCode:t}){let n=e==="maxItems"?"more":"fewer";return(0,Pa.str)`must NOT have ${n} than ${t} items`},params:({schemaCode:e})=>(0,Pa._)`{limit: ${e}}`},lj={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:uj,code(e){let{keyword:t,data:n,schemaCode:o}=e,r=t==="maxItems"?Pa.operators.GT:Pa.operators.LT;e.fail$data((0,Pa._)`${n}.length ${r} ${o}`)}};tg.default=lj});var Jl=E(rg=>{"use strict";Object.defineProperty(rg,"__esModule",{value:!0});var Bx=zh();Bx.code='require("ajv/dist/runtime/equal").default';rg.default=Bx});var Kx=E(og=>{"use strict";Object.defineProperty(og,"__esModule",{value:!0});var ng=ha(),Fe=Y(),dj=se(),pj=Jl(),fj={message:({params:{i:e,j:t}})=>(0,Fe.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Fe._)`{i: ${e}, j: ${t}}`},mj={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:fj,code(e){let{gen:t,data:n,$data:o,schema:r,parentSchema:i,schemaCode:a,it:s}=e;if(!o&&!r)return;let c=t.let("valid"),u=i.items?(0,ng.getSchemaTypes)(i.items):[];e.block$data(c,l,(0,Fe._)`${a} === false`),e.ok(c);function l(){let g=t.let("i",(0,Fe._)`${n}.length`),y=t.let("j");e.setParams({i:g,j:y}),t.assign(c,!0),t.if((0,Fe._)`${g} > 1`,()=>(d()?p:f)(g,y))}function d(){return u.length>0&&!u.some(g=>g==="object"||g==="array")}function p(g,y){let S=t.name("item"),P=(0,ng.checkDataTypes)(u,S,s.opts.strictNumbers,ng.DataType.Wrong),Z=t.const("indices",(0,Fe._)`{}`);t.for((0,Fe._)`;${g}--;`,()=>{t.let(S,(0,Fe._)`${n}[${g}]`),t.if(P,(0,Fe._)`continue`),u.length>1&&t.if((0,Fe._)`typeof ${S} == "string"`,(0,Fe._)`${S} += "_"`),t.if((0,Fe._)`typeof ${Z}[${S}] == "number"`,()=>{t.assign(y,(0,Fe._)`${Z}[${S}]`),e.error(),t.assign(c,!1).break()}).code((0,Fe._)`${Z}[${S}] = ${g}`)})}function f(g,y){let S=(0,dj.useFunc)(t,pj.default),P=t.name("outer");t.label(P).for((0,Fe._)`;${g}--;`,()=>t.for((0,Fe._)`${y} = ${g}; ${y}--;`,()=>t.if((0,Fe._)`${S}(${n}[${g}], ${n}[${y}])`,()=>{e.error(),t.assign(c,!1).break(P)})))}}};og.default=mj});var Xx=E(ag=>{"use strict";Object.defineProperty(ag,"__esModule",{value:!0});var ig=Y(),hj=se(),gj=Jl(),vj={message:"must be equal to constant",params:({schemaCode:e})=>(0,ig._)`{allowedValue: ${e}}`},yj={keyword:"const",$data:!0,error:vj,code(e){let{gen:t,data:n,$data:o,schemaCode:r,schema:i}=e;o||i&&typeof i=="object"?e.fail$data((0,ig._)`!${(0,hj.useFunc)(t,gj.default)}(${n}, ${r})`):e.fail((0,ig._)`${i} !== ${n}`)}};ag.default=yj});var Yx=E(sg=>{"use strict";Object.defineProperty(sg,"__esModule",{value:!0});var Ea=Y(),_j=se(),bj=Jl(),$j={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Ea._)`{allowedValues: ${e}}`},xj={keyword:"enum",schemaType:"array",$data:!0,error:$j,code(e){let{gen:t,data:n,$data:o,schema:r,schemaCode:i,it:a}=e;if(!o&&r.length===0)throw new Error("enum must have non-empty array");let s=r.length>=a.opts.loopEnum,c,u=()=>c??(c=(0,_j.useFunc)(t,bj.default)),l;if(s||o)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",i);l=(0,Ea.or)(...r.map((g,y)=>p(f,y)))}e.pass(l);function d(){t.assign(l,!1),t.forOf("v",i,f=>t.if((0,Ea._)`${u()}(${n}, ${f})`,()=>t.assign(l,!0).break()))}function p(f,g){let y=r[g];return typeof y=="object"&&y!==null?(0,Ea._)`${u()}(${n}, ${f}[${g}])`:(0,Ea._)`${n} === ${y}`}}};sg.default=xj});var Qx=E(cg=>{"use strict";Object.defineProperty(cg,"__esModule",{value:!0});var kj=Mx(),wj=Lx(),Sj=Vx(),zj=Hx(),Ij=Wx(),Tj=Jx(),Pj=Gx(),Ej=Kx(),Oj=Xx(),jj=Yx(),Rj=[kj.default,wj.default,Sj.default,zj.default,Ij.default,Tj.default,Pj.default,Ej.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Oj.default,jj.default];cg.default=Rj});var lg=E(Oa=>{"use strict";Object.defineProperty(Oa,"__esModule",{value:!0});Oa.validateAdditionalItems=void 0;var _n=Y(),ug=se(),Nj={message:({params:{len:e}})=>(0,_n.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,_n._)`{limit: ${e}}`},Dj={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Nj,code(e){let{parentSchema:t,it:n}=e,{items:o}=t;if(!Array.isArray(o)){(0,ug.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}ek(e,o)}};function ek(e,t){let{gen:n,schema:o,data:r,keyword:i,it:a}=e;a.items=!0;let s=n.const("len",(0,_n._)`${r}.length`);if(o===!1)e.setParams({len:t.length}),e.pass((0,_n._)`${s} <= ${t.length}`);else if(typeof o=="object"&&!(0,ug.alwaysValidSchema)(a,o)){let u=n.var("valid",(0,_n._)`${s} <= ${t.length}`);n.if((0,_n.not)(u),()=>c(u)),e.ok(u)}function c(u){n.forRange("i",t.length,s,l=>{e.subschema({keyword:i,dataProp:l,dataPropType:ug.Type.Num},u),a.allErrors||n.if((0,_n.not)(u),()=>n.break())})}}Oa.validateAdditionalItems=ek;Oa.default=Dj});var dg=E(ja=>{"use strict";Object.defineProperty(ja,"__esModule",{value:!0});ja.validateTuple=void 0;var tk=Y(),Gl=se(),Cj=kt(),Aj={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:n}=e;if(Array.isArray(t))return rk(e,"additionalItems",t);n.items=!0,!(0,Gl.alwaysValidSchema)(n,t)&&e.ok((0,Cj.validateArray)(e))}};function rk(e,t,n=e.schema){let{gen:o,parentSchema:r,data:i,keyword:a,it:s}=e;l(r),s.opts.unevaluated&&n.length&&s.items!==!0&&(s.items=Gl.mergeEvaluated.items(o,n.length,s.items));let c=o.name("valid"),u=o.const("len",(0,tk._)`${i}.length`);n.forEach((d,p)=>{(0,Gl.alwaysValidSchema)(s,d)||(o.if((0,tk._)`${u} > ${p}`,()=>e.subschema({keyword:a,schemaProp:p,dataProp:p},c)),e.ok(c))});function l(d){let{opts:p,errSchemaPath:f}=s,g=n.length,y=g===d.minItems&&(g===d.maxItems||d[t]===!1);if(p.strictTuples&&!y){let S=`"${a}" is ${g}-tuple, but minItems or maxItems/${t} are not specified or different at path "${f}"`;(0,Gl.checkStrictMode)(s,S,p.strictTuples)}}}ja.validateTuple=rk;ja.default=Aj});var nk=E(pg=>{"use strict";Object.defineProperty(pg,"__esModule",{value:!0});var Uj=dg(),Zj={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,Uj.validateTuple)(e,"items")};pg.default=Zj});var ik=E(fg=>{"use strict";Object.defineProperty(fg,"__esModule",{value:!0});var ok=Y(),Mj=se(),Lj=kt(),qj=lg(),Fj={message:({params:{len:e}})=>(0,ok.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,ok._)`{limit: ${e}}`},Vj={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Fj,code(e){let{schema:t,parentSchema:n,it:o}=e,{prefixItems:r}=n;o.items=!0,!(0,Mj.alwaysValidSchema)(o,t)&&(r?(0,qj.validateAdditionalItems)(e,r):e.ok((0,Lj.validateArray)(e)))}};fg.default=Vj});var ak=E(mg=>{"use strict";Object.defineProperty(mg,"__esModule",{value:!0});var St=Y(),Bl=se(),Hj={message:({params:{min:e,max:t}})=>t===void 0?(0,St.str)`must contain at least ${e} valid item(s)`:(0,St.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,St._)`{minContains: ${e}}`:(0,St._)`{minContains: ${e}, maxContains: ${t}}`},Wj={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Hj,code(e){let{gen:t,schema:n,parentSchema:o,data:r,it:i}=e,a,s,{minContains:c,maxContains:u}=o;i.opts.next?(a=c===void 0?1:c,s=u):a=1;let l=t.const("len",(0,St._)`${r}.length`);if(e.setParams({min:a,max:s}),s===void 0&&a===0){(0,Bl.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&a>s){(0,Bl.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Bl.alwaysValidSchema)(i,n)){let y=(0,St._)`${l} >= ${a}`;s!==void 0&&(y=(0,St._)`${y} && ${l} <= ${s}`),e.pass(y);return}i.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,St._)`${r}.length > 0`,p)):(t.let(d,!1),p()),e.result(d,()=>e.reset());function p(){let y=t.name("_valid"),S=t.let("count",0);f(y,()=>t.if(y,()=>g(S)))}function f(y,S){t.forRange("i",0,l,P=>{e.subschema({keyword:"contains",dataProp:P,dataPropType:Bl.Type.Num,compositeRule:!0},y),S()})}function g(y){t.code((0,St._)`${y}++`),s===void 0?t.if((0,St._)`${y} >= ${a}`,()=>t.assign(d,!0).break()):(t.if((0,St._)`${y} > ${s}`,()=>t.assign(d,!1).break()),a===1?t.assign(d,!0):t.if((0,St._)`${y} >= ${a}`,()=>t.assign(d,!0)))}}};mg.default=Wj});var uk=E(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.validateSchemaDeps=Jt.validatePropertyDeps=Jt.error=void 0;var hg=Y(),Jj=se(),Ra=kt();Jt.error={message:({params:{property:e,depsCount:t,deps:n}})=>{let o=t===1?"property":"properties";return(0,hg.str)`must have ${o} ${n} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:n,missingProperty:o}})=>(0,hg._)`{property: ${e},
|
|
13
|
+
missingProperty: ${o},
|
|
14
|
+
depsCount: ${t},
|
|
15
|
+
deps: ${n}}`};var Gj={keyword:"dependencies",type:"object",schemaType:"object",error:Jt.error,code(e){let[t,n]=Bj(e);sk(e,t),ck(e,n)}};function Bj({schema:e}){let t={},n={};for(let o in e){if(o==="__proto__")continue;let r=Array.isArray(e[o])?t:n;r[o]=e[o]}return[t,n]}function sk(e,t=e.schema){let{gen:n,data:o,it:r}=e;if(Object.keys(t).length===0)return;let i=n.let("missing");for(let a in t){let s=t[a];if(s.length===0)continue;let c=(0,Ra.propertyInData)(n,o,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,Ra.checkReportMissingProp)(e,u)}):(n.if((0,hg._)`${c} && (${(0,Ra.checkMissingProp)(e,s,i)})`),(0,Ra.reportMissingProp)(e,i),n.else())}}Jt.validatePropertyDeps=sk;function ck(e,t=e.schema){let{gen:n,data:o,keyword:r,it:i}=e,a=n.name("valid");for(let s in t)(0,Jj.alwaysValidSchema)(i,t[s])||(n.if((0,Ra.propertyInData)(n,o,s,i.opts.ownProperties),()=>{let c=e.subschema({keyword:r,schemaProp:s},a);e.mergeValidEvaluated(c,a)},()=>n.var(a,!0)),e.ok(a))}Jt.validateSchemaDeps=ck;Jt.default=Gj});var dk=E(gg=>{"use strict";Object.defineProperty(gg,"__esModule",{value:!0});var lk=Y(),Kj=se(),Xj={message:"property name must be valid",params:({params:e})=>(0,lk._)`{propertyName: ${e.propertyName}}`},Yj={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Xj,code(e){let{gen:t,schema:n,data:o,it:r}=e;if((0,Kj.alwaysValidSchema)(r,n))return;let i=t.name("valid");t.forIn("key",o,a=>{e.setParams({propertyName:a}),e.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},i),t.if((0,lk.not)(i),()=>{e.error(!0),r.allErrors||t.break()})}),e.ok(i)}};gg.default=Yj});var yg=E(vg=>{"use strict";Object.defineProperty(vg,"__esModule",{value:!0});var Kl=kt(),Zt=Y(),Qj=ar(),Xl=se(),eR={message:"must NOT have additional properties",params:({params:e})=>(0,Zt._)`{additionalProperty: ${e.additionalProperty}}`},tR={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:eR,code(e){let{gen:t,schema:n,parentSchema:o,data:r,errsCount:i,it:a}=e;if(!i)throw new Error("ajv implementation error");let{allErrors:s,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,Xl.alwaysValidSchema)(a,n))return;let u=(0,Kl.allSchemaProperties)(o.properties),l=(0,Kl.allSchemaProperties)(o.patternProperties);d(),e.ok((0,Zt._)`${i} === ${Qj.default.errors}`);function d(){t.forIn("key",r,S=>{!u.length&&!l.length?g(S):t.if(p(S),()=>g(S))})}function p(S){let P;if(u.length>8){let Z=(0,Xl.schemaRefOrVal)(a,o.properties,"properties");P=(0,Kl.isOwnProperty)(t,Z,S)}else u.length?P=(0,Zt.or)(...u.map(Z=>(0,Zt._)`${S} === ${Z}`)):P=Zt.nil;return l.length&&(P=(0,Zt.or)(P,...l.map(Z=>(0,Zt._)`${(0,Kl.usePattern)(e,Z)}.test(${S})`))),(0,Zt.not)(P)}function f(S){t.code((0,Zt._)`delete ${r}[${S}]`)}function g(S){if(c.removeAdditional==="all"||c.removeAdditional&&n===!1){f(S);return}if(n===!1){e.setParams({additionalProperty:S}),e.error(),s||t.break();return}if(typeof n=="object"&&!(0,Xl.alwaysValidSchema)(a,n)){let P=t.name("valid");c.removeAdditional==="failing"?(y(S,P,!1),t.if((0,Zt.not)(P),()=>{e.reset(),f(S)})):(y(S,P),s||t.if((0,Zt.not)(P),()=>t.break()))}}function y(S,P,Z){let D={keyword:"additionalProperties",dataProp:S,dataPropType:Xl.Type.Str};Z===!1&&Object.assign(D,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(D,P)}}};vg.default=tR});var mk=E(bg=>{"use strict";Object.defineProperty(bg,"__esModule",{value:!0});var rR=_a(),pk=kt(),_g=se(),fk=yg(),nR={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:n,parentSchema:o,data:r,it:i}=e;i.opts.removeAdditional==="all"&&o.additionalProperties===void 0&&fk.default.code(new rR.KeywordCxt(i,fk.default,"additionalProperties"));let a=(0,pk.allSchemaProperties)(n);for(let d of a)i.definedProperties.add(d);i.opts.unevaluated&&a.length&&i.props!==!0&&(i.props=_g.mergeEvaluated.props(t,(0,_g.toHash)(a),i.props));let s=a.filter(d=>!(0,_g.alwaysValidSchema)(i,n[d]));if(s.length===0)return;let c=t.name("valid");for(let d of s)u(d)?l(d):(t.if((0,pk.propertyInData)(t,r,d,i.opts.ownProperties)),l(d),i.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(c);function u(d){return i.opts.useDefaults&&!i.compositeRule&&n[d].default!==void 0}function l(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};bg.default=nR});var yk=E($g=>{"use strict";Object.defineProperty($g,"__esModule",{value:!0});var hk=kt(),Yl=Y(),gk=se(),vk=se(),oR={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:n,data:o,parentSchema:r,it:i}=e,{opts:a}=i,s=(0,hk.allSchemaProperties)(n),c=s.filter(y=>(0,gk.alwaysValidSchema)(i,n[y]));if(s.length===0||c.length===s.length&&(!i.opts.unevaluated||i.props===!0))return;let u=a.strictSchema&&!a.allowMatchingProperties&&r.properties,l=t.name("valid");i.props!==!0&&!(i.props instanceof Yl.Name)&&(i.props=(0,vk.evaluatedPropsToName)(t,i.props));let{props:d}=i;p();function p(){for(let y of s)u&&f(y),i.allErrors?g(y):(t.var(l,!0),g(y),t.if(l))}function f(y){for(let S in u)new RegExp(y).test(S)&&(0,gk.checkStrictMode)(i,`property ${S} matches pattern ${y} (use allowMatchingProperties)`)}function g(y){t.forIn("key",o,S=>{t.if((0,Yl._)`${(0,hk.usePattern)(e,y)}.test(${S})`,()=>{let P=c.includes(y);P||e.subschema({keyword:"patternProperties",schemaProp:y,dataProp:S,dataPropType:vk.Type.Str},l),i.opts.unevaluated&&d!==!0?t.assign((0,Yl._)`${d}[${S}]`,!0):!P&&!i.allErrors&&t.if((0,Yl.not)(l),()=>t.break())})})}}};$g.default=oR});var _k=E(xg=>{"use strict";Object.defineProperty(xg,"__esModule",{value:!0});var iR=se(),aR={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:n,it:o}=e;if((0,iR.alwaysValidSchema)(o,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"}};xg.default=aR});var bk=E(kg=>{"use strict";Object.defineProperty(kg,"__esModule",{value:!0});var sR=kt(),cR={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:sR.validateUnion,error:{message:"must match a schema in anyOf"}};kg.default=cR});var $k=E(wg=>{"use strict";Object.defineProperty(wg,"__esModule",{value:!0});var Ql=Y(),uR=se(),lR={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Ql._)`{passingSchemas: ${e.passing}}`},dR={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:lR,code(e){let{gen:t,schema:n,parentSchema:o,it:r}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(r.opts.discriminator&&o.discriminator)return;let i=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(){i.forEach((l,d)=>{let p;(0,uR.alwaysValidSchema)(r,l)?t.var(c,!0):p=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,Ql._)`${c} && ${a}`).assign(a,!1).assign(s,(0,Ql._)`[${s}, ${d}]`).else(),t.if(c,()=>{t.assign(a,!0),t.assign(s,d),p&&e.mergeEvaluated(p,Ql.Name)})})}}};wg.default=dR});var xk=E(Sg=>{"use strict";Object.defineProperty(Sg,"__esModule",{value:!0});var pR=se(),fR={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:n,it:o}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");let r=t.name("valid");n.forEach((i,a)=>{if((0,pR.alwaysValidSchema)(o,i))return;let s=e.subschema({keyword:"allOf",schemaProp:a},r);e.ok(r),e.mergeEvaluated(s)})}};Sg.default=fR});var Sk=E(zg=>{"use strict";Object.defineProperty(zg,"__esModule",{value:!0});var ed=Y(),wk=se(),mR={message:({params:e})=>(0,ed.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,ed._)`{failingKeyword: ${e.ifClause}}`},hR={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:mR,code(e){let{gen:t,parentSchema:n,it:o}=e;n.then===void 0&&n.else===void 0&&(0,wk.checkStrictMode)(o,'"if" without "then" and "else" is ignored');let r=kk(o,"then"),i=kk(o,"else");if(!r&&!i)return;let a=t.let("valid",!0),s=t.name("_valid");if(c(),e.reset(),r&&i){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,ed.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,ed._)`${l}`):e.setParams({ifClause:l})}}}};function kk(e,t){let n=e.schema[t];return n!==void 0&&!(0,wk.alwaysValidSchema)(e,n)}zg.default=hR});var zk=E(Ig=>{"use strict";Object.defineProperty(Ig,"__esModule",{value:!0});var gR=se(),vR={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:n}){t.if===void 0&&(0,gR.checkStrictMode)(n,`"${e}" without "if" is ignored`)}};Ig.default=vR});var Ik=E(Tg=>{"use strict";Object.defineProperty(Tg,"__esModule",{value:!0});var yR=lg(),_R=nk(),bR=dg(),$R=ik(),xR=ak(),kR=uk(),wR=dk(),SR=yg(),zR=mk(),IR=yk(),TR=_k(),PR=bk(),ER=$k(),OR=xk(),jR=Sk(),RR=zk();function NR(e=!1){let t=[TR.default,PR.default,ER.default,OR.default,jR.default,RR.default,wR.default,SR.default,kR.default,zR.default,IR.default];return e?t.push(_R.default,$R.default):t.push(yR.default,bR.default),t.push(xR.default),t}Tg.default=NR});var Tk=E(Pg=>{"use strict";Object.defineProperty(Pg,"__esModule",{value:!0});var Te=Y(),DR={message:({schemaCode:e})=>(0,Te.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Te._)`{format: ${e}}`},CR={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:DR,code(e,t){let{gen:n,data:o,$data:r,schema:i,schemaCode:a,it:s}=e,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=s;if(!c.validateFormats)return;r?p():f();function p(){let g=n.scopeValue("formats",{ref:d.formats,code:c.code.formats}),y=n.const("fDef",(0,Te._)`${g}[${a}]`),S=n.let("fType"),P=n.let("format");n.if((0,Te._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>n.assign(S,(0,Te._)`${y}.type || "string"`).assign(P,(0,Te._)`${y}.validate`),()=>n.assign(S,(0,Te._)`"string"`).assign(P,y)),e.fail$data((0,Te.or)(Z(),D()));function Z(){return c.strictSchema===!1?Te.nil:(0,Te._)`${a} && !${P}`}function D(){let V=l.$async?(0,Te._)`(${y}.async ? await ${P}(${o}) : ${P}(${o}))`:(0,Te._)`${P}(${o})`,A=(0,Te._)`(typeof ${P} == "function" ? ${V} : ${P}.test(${o}))`;return(0,Te._)`${P} && ${P} !== true && ${S} === ${t} && !${A}`}}function f(){let g=d.formats[i];if(!g){Z();return}if(g===!0)return;let[y,S,P]=D(g);y===t&&e.pass(V());function Z(){if(c.strictSchema===!1){d.logger.warn(A());return}throw new Error(A());function A(){return`unknown format "${i}" ignored in schema at path "${u}"`}}function D(A){let zt=A instanceof RegExp?(0,Te.regexpCode)(A):c.code.formats?(0,Te._)`${c.code.formats}${(0,Te.getProperty)(i)}`:void 0,It=n.scopeValue("formats",{key:i,ref:A,code:zt});return typeof A=="object"&&!(A instanceof RegExp)?[A.type||"string",A.validate,(0,Te._)`${It}.validate`]:["string",A,It]}function V(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!l.$async)throw new Error("async format in sync schema");return(0,Te._)`await ${P}(${o})`}return typeof S=="function"?(0,Te._)`${P}(${o})`:(0,Te._)`${P}.test(${o})`}}}};Pg.default=CR});var Pk=E(Eg=>{"use strict";Object.defineProperty(Eg,"__esModule",{value:!0});var AR=Tk(),UR=[AR.default];Eg.default=UR});var Ek=E(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.contentVocabulary=So.metadataVocabulary=void 0;So.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];So.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var jk=E(Og=>{"use strict";Object.defineProperty(Og,"__esModule",{value:!0});var ZR=Zx(),MR=Qx(),LR=Ik(),qR=Pk(),Ok=Ek(),FR=[ZR.default,MR.default,(0,LR.default)(),qR.default,Ok.metadataVocabulary,Ok.contentVocabulary];Og.default=FR});var Nk=E(td=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});td.DiscrError=void 0;var Rk;(function(e){e.Tag="tag",e.Mapping="mapping"})(Rk||(td.DiscrError=Rk={}))});var Ck=E(Rg=>{"use strict";Object.defineProperty(Rg,"__esModule",{value:!0});var zo=Y(),jg=Nk(),Dk=Al(),VR=ba(),HR=se(),WR={message:({params:{discrError:e,tagName:t}})=>e===jg.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:n}})=>(0,zo._)`{error: ${e}, tag: ${n}, tagValue: ${t}}`},JR={keyword:"discriminator",type:"object",schemaType:"object",error:WR,code(e){let{gen:t,data:n,schema:o,parentSchema:r,it:i}=e,{oneOf:a}=r;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let s=o.propertyName;if(typeof s!="string")throw new Error("discriminator: requires propertyName");if(o.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,zo._)`${n}${(0,zo.getProperty)(s)}`);t.if((0,zo._)`typeof ${u} == "string"`,()=>l(),()=>e.error(!1,{discrError:jg.DiscrError.Tag,tag:u,tagName:s})),e.ok(c);function l(){let f=p();t.if(!1);for(let g in f)t.elseIf((0,zo._)`${u} === ${g}`),t.assign(c,d(f[g]));t.else(),e.error(!1,{discrError:jg.DiscrError.Mapping,tag:u,tagName:s}),t.endIf()}function d(f){let g=t.name("valid"),y=e.subschema({keyword:"oneOf",schemaProp:f},g);return e.mergeEvaluated(y,zo.Name),g}function p(){var f;let g={},y=P(r),S=!0;for(let V=0;V<a.length;V++){let A=a[V];if(A?.$ref&&!(0,HR.schemaHasRulesButRef)(A,i.self.RULES)){let It=A.$ref;if(A=Dk.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,It),A instanceof Dk.SchemaEnv&&(A=A.schema),A===void 0)throw new VR.default(i.opts.uriResolver,i.baseId,It)}let zt=(f=A?.properties)===null||f===void 0?void 0:f[s];if(typeof zt!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);S=S&&(y||P(A)),Z(zt,V)}if(!S)throw new Error(`discriminator: "${s}" must be required`);return g;function P({required:V}){return Array.isArray(V)&&V.includes(s)}function Z(V,A){if(V.const)D(V.const,A);else if(V.enum)for(let zt of V.enum)D(zt,A);else throw new Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function D(V,A){if(typeof V!="string"||V in g)throw new Error(`discriminator: "${s}" values must be unique strings`);g[V]=A}}}};Rg.default=JR});var Ak=E((N6,GR)=>{GR.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 Dg=E((xe,Ng)=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.MissingRefError=xe.ValidationError=xe.CodeGen=xe.Name=xe.nil=xe.stringify=xe.str=xe._=xe.KeywordCxt=xe.Ajv=void 0;var BR=Rx(),KR=jk(),XR=Ck(),Uk=Ak(),YR=["/properties"],rd="http://json-schema.org/draft-07/schema",Io=class extends BR.default{_addVocabularies(){super._addVocabularies(),KR.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(XR.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(Uk,YR):Uk;this.addMetaSchema(t,rd,!1),this.refs["http://json-schema.org/schema"]=rd}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(rd)?rd:void 0)}};xe.Ajv=Io;Ng.exports=xe=Io;Ng.exports.Ajv=Io;Object.defineProperty(xe,"__esModule",{value:!0});xe.default=Io;var QR=_a();Object.defineProperty(xe,"KeywordCxt",{enumerable:!0,get:function(){return QR.KeywordCxt}});var To=Y();Object.defineProperty(xe,"_",{enumerable:!0,get:function(){return To._}});Object.defineProperty(xe,"str",{enumerable:!0,get:function(){return To.str}});Object.defineProperty(xe,"stringify",{enumerable:!0,get:function(){return To.stringify}});Object.defineProperty(xe,"nil",{enumerable:!0,get:function(){return To.nil}});Object.defineProperty(xe,"Name",{enumerable:!0,get:function(){return To.Name}});Object.defineProperty(xe,"CodeGen",{enumerable:!0,get:function(){return To.CodeGen}});var eN=Dl();Object.defineProperty(xe,"ValidationError",{enumerable:!0,get:function(){return eN.default}});var tN=ba();Object.defineProperty(xe,"MissingRefError",{enumerable:!0,get:function(){return tN.default}})});var Wk=E(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.formatNames=Bt.fastFormats=Bt.fullFormats=void 0;function Gt(e,t){return{validate:e,compare:t}}Bt.fullFormats={date:Gt(qk,Zg),time:Gt(Ag(!0),Mg),"date-time":Gt(Zk(!0),Vk),"iso-time":Gt(Ag(),Fk),"iso-date-time":Gt(Zk(),Hk),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:sN,"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:mN,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:cN,int32:{type:"number",validate:dN},int64:{type:"number",validate:pN},float:{type:"number",validate:Lk},double:{type:"number",validate:Lk},password:!0,binary:!0};Bt.fastFormats={...Bt.fullFormats,date:Gt(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Zg),time:Gt(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Mg),"date-time":Gt(/^\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,Vk),"iso-time":Gt(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Fk),"iso-date-time":Gt(/^\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,Hk),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};Bt.formatNames=Object.keys(Bt.fullFormats);function rN(e){return e%4===0&&(e%100!==0||e%400===0)}var nN=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,oN=[0,31,28,31,30,31,30,31,31,30,31,30,31];function qk(e){let t=nN.exec(e);if(!t)return!1;let n=+t[1],o=+t[2],r=+t[3];return o>=1&&o<=12&&r>=1&&r<=(o===2&&rN(n)?29:oN[o])}function Zg(e,t){if(e&&t)return e>t?1:e<t?-1:0}var Cg=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Ag(e){return function(n){let o=Cg.exec(n);if(!o)return!1;let r=+o[1],i=+o[2],a=+o[3],s=o[4],c=o[5]==="-"?-1:1,u=+(o[6]||0),l=+(o[7]||0);if(u>23||l>59||e&&!s)return!1;if(r<=23&&i<=59&&a<60)return!0;let d=i-l*c,p=r-u*c-(d<0?1:0);return(p===23||p===-1)&&(d===59||d===-1)&&a<61}}function Mg(e,t){if(!(e&&t))return;let n=new Date("2020-01-01T"+e).valueOf(),o=new Date("2020-01-01T"+t).valueOf();if(n&&o)return n-o}function Fk(e,t){if(!(e&&t))return;let n=Cg.exec(e),o=Cg.exec(t);if(n&&o)return e=n[1]+n[2]+n[3],t=o[1]+o[2]+o[3],e>t?1:e<t?-1:0}var Ug=/t|\s/i;function Zk(e){let t=Ag(e);return function(o){let r=o.split(Ug);return r.length===2&&qk(r[0])&&t(r[1])}}function Vk(e,t){if(!(e&&t))return;let n=new Date(e).valueOf(),o=new Date(t).valueOf();if(n&&o)return n-o}function Hk(e,t){if(!(e&&t))return;let[n,o]=e.split(Ug),[r,i]=t.split(Ug),a=Zg(n,r);if(a!==void 0)return a||Mg(o,i)}var iN=/\/|:/,aN=/^(?:[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 sN(e){return iN.test(e)&&aN.test(e)}var Mk=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function cN(e){return Mk.lastIndex=0,Mk.test(e)}var uN=-(2**31),lN=2**31-1;function dN(e){return Number.isInteger(e)&&e<=lN&&e>=uN}function pN(e){return Number.isInteger(e)}function Lk(){return!0}var fN=/[^\\]\\Z/;function mN(e){if(fN.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var Jk=E(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.formatLimitDefinition=void 0;var hN=Dg(),Mt=Y(),Zr=Mt.operators,nd={formatMaximum:{okStr:"<=",ok:Zr.LTE,fail:Zr.GT},formatMinimum:{okStr:">=",ok:Zr.GTE,fail:Zr.LT},formatExclusiveMaximum:{okStr:"<",ok:Zr.LT,fail:Zr.GTE},formatExclusiveMinimum:{okStr:">",ok:Zr.GT,fail:Zr.LTE}},gN={message:({keyword:e,schemaCode:t})=>(0,Mt.str)`should be ${nd[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Mt._)`{comparison: ${nd[e].okStr}, limit: ${t}}`};Po.formatLimitDefinition={keyword:Object.keys(nd),type:"string",schemaType:"string",$data:!0,error:gN,code(e){let{gen:t,data:n,schemaCode:o,keyword:r,it:i}=e,{opts:a,self:s}=i;if(!a.validateFormats)return;let c=new hN.KeywordCxt(i,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,Mt._)`${p}[${c.schemaCode}]`);e.fail$data((0,Mt.or)((0,Mt._)`typeof ${f} != "object"`,(0,Mt._)`${f} instanceof RegExp`,(0,Mt._)`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 g=t.scopeValue("formats",{key:p,ref:f,code:a.code.formats?(0,Mt._)`${a.code.formats}${(0,Mt.getProperty)(p)}`:void 0});e.fail$data(d(g))}function d(p){return(0,Mt._)`${p}.compare(${n}, ${o}) ${nd[r].fail} 0`}},dependencies:["format"]};var vN=e=>(e.addKeyword(Po.formatLimitDefinition),e);Po.default=vN});var Xk=E((Na,Kk)=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});var Eo=Wk(),yN=Jk(),Lg=Y(),Gk=new Lg.Name("fullFormats"),_N=new Lg.Name("fastFormats"),qg=(e,t={keywords:!0})=>{if(Array.isArray(t))return Bk(e,t,Eo.fullFormats,Gk),e;let[n,o]=t.mode==="fast"?[Eo.fastFormats,_N]:[Eo.fullFormats,Gk],r=t.formats||Eo.formatNames;return Bk(e,r,n,o),t.keywords&&(0,yN.default)(e),e};qg.get=(e,t="full")=>{let o=(t==="fast"?Eo.fastFormats:Eo.fullFormats)[e];if(!o)throw new Error(`Unknown format "${e}"`);return o};function Bk(e,t,n,o){var r,i;(r=(i=e.opts.code).formats)!==null&&r!==void 0||(i.formats=(0,Lg._)`require("ajv-formats/dist/formats").${o}`);for(let a of t)e.addFormat(a,n[a])}Kk.exports=Na=qg;Object.defineProperty(Na,"__esModule",{value:!0});Na.default=qg});var Ua={debug:0,info:1,warn:2,error:3,none:4};function ov(e){let t=globalThis.process,n=e==="stdout"?t?.stdout:t?.stderr;return n?.write?n:null}function iv(e,t){e&&e.write(t.endsWith(`
|
|
16
|
+
`)?t:`${t}
|
|
17
|
+
`)}function qw(e){let t=typeof e.name=="string"?e.name:void 0,n=typeof e.message=="string"?e.message:void 0,o=typeof e.stack=="string"?e.stack:void 0;if(!t&&!n)return null;let r=`${t??"Error"}: ${n??""}`;return o?`${r}
|
|
18
|
+
${o}`:r}function Fw(e){if(typeof e=="string")return e;if(e instanceof Error)return`${e.name}: ${e.message}`;if(e&&typeof e=="object"){let t=qw(e);if(t)return t}try{return JSON.stringify(e)}catch{return String(e)}}function av(e){return e.length===0?"":" "+e.map(Fw).join(" ")}var Za=class{_level;prefix;constructor(t="",n="info"){this.prefix=t?`[${t}]`:"",this._level=n}get level(){return this._level}setLevel(t){this._level=t}shouldLog(t){return Ua[t]>=Ua[this._level]}formatMessage(t,n){return`${new Date().toISOString()} ${this.prefix} [${t.toUpperCase()}] ${n}`}logTo(t,n,o,r){this.shouldLog(n)&&iv(ov(t),this.formatMessage(n,o+av(r)))}debug(t,...n){this.logTo("stdout","debug",t,n)}info(t,...n){this.logTo("stdout","info",t,n)}warn(t,...n){this.logTo("stderr","warn",t,n)}error(t,...n){this.logTo("stderr","error",t,n)}},Ma=class{_level;prefix;constructor(t="",n="info"){this.prefix=t?`[${t}]`:"",this._level=n}get level(){return this._level}setLevel(t){this._level=t}shouldLog(t){return Ua[t]>=Ua[this._level]}formatMessage(t,n){return`${new Date().toISOString()} ${this.prefix} [${t.toUpperCase()}] ${n}`}log(t,n,o){this.shouldLog(t)&&iv(ov("stderr"),this.formatMessage(t,n+av(o)))}debug(t,...n){this.log("debug",t,n)}info(t,...n){this.log("info",t,n)}warn(t,...n){this.log("warn",t,n)}error(t,...n){this.log("error",t,n)}},$d=class{level="none";setLevel(){}debug(){}info(){}warn(){}error(){}},La=class{delegate;constructor(t){this.delegate=t}get level(){return this.delegate.level}setLevel(t){this.delegate.setLevel(t)}setDelegate(t){this.delegate=t}debug(t,...n){this.delegate.debug(t,...n)}info(t,...n){this.delegate.info(t,...n)}warn(t,...n){this.delegate.warn(t,...n)}error(t,...n){this.delegate.error(t,...n)}},xd=class{defaultLevel="info";loggers=new Map;backend;setDefaultLevel(t){this.defaultLevel=t;for(let n of this.loggers.values())n.setLevel(t)}getDefaultLevel(){return this.defaultLevel}getLogger(t){let n=this.loggers.get(t);if(!n){let o=this.backend?this.backend.createLogger(t,this.defaultLevel):new Za(t,this.defaultLevel);n=new La(o),this.loggers.set(t,n)}return n}getNullLogger(){let t=new $d;return new La(t)}clear(){this.loggers.clear()}setBackend(t){this.backend=t;for(let[n,o]of this.loggers.entries()){let r=o.level??this.defaultLevel,i=t?t.createLogger(n,r):new Za(n,r);o.setDelegate(i)}}getBackend(){return this.backend}},sv=new xd;function qa(e){return sv.getLogger(e)}function cv(e){sv.setBackend(e)}import*as rt from"node:fs";import*as Nw from"node:os";var oe;(function(e){e.assertEqual=r=>{};function t(r){}e.assertIs=t;function n(r){throw new Error}e.assertNever=n,e.arrayToEnum=r=>{let i={};for(let a of r)i[a]=a;return i},e.getValidEnumValues=r=>{let i=e.objectKeys(r).filter(s=>typeof r[r[s]]!="number"),a={};for(let s of i)a[s]=r[s];return e.objectValues(a)},e.objectValues=r=>e.objectKeys(r).map(function(i){return r[i]}),e.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{let i=[];for(let a in r)Object.prototype.hasOwnProperty.call(r,a)&&i.push(a);return i},e.find=(r,i)=>{for(let a of r)if(i(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 o(r,i=" | "){return r.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=o,e.jsonStringifyReplacer=(r,i)=>typeof i=="bigint"?i.toString():i})(oe||(oe={}));var uv;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(uv||(uv={}));var O=oe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Xt=e=>{switch(typeof e){case"undefined":return O.undefined;case"string":return O.string;case"number":return Number.isNaN(e)?O.nan:O.number;case"boolean":return O.boolean;case"function":return O.function;case"bigint":return O.bigint;case"symbol":return O.symbol;case"object":return Array.isArray(e)?O.array:e===null?O.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?O.promise:typeof Map<"u"&&e instanceof Map?O.map:typeof Set<"u"&&e instanceof Set?O.set:typeof Date<"u"&&e instanceof Date?O.date:O.object;default:return O.unknown}};var b=oe.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 dt=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};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(i){return i.message},o={_errors:[]},r=i=>{for(let a of i.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)o._errors.push(n(a));else{let s=o,c=0;for(;c<a.path.length;){let u=a.path[c];c===a.path.length-1?(s[u]=s[u]||{_errors:[]},s[u]._errors.push(n(a))):s[u]=s[u]||{_errors:[]},s=s[u],c++}}};return r(this),o}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,oe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){let n=Object.create(null),o=[];for(let r of this.issues)if(r.path.length>0){let i=r.path[0];n[i]=n[i]||[],n[i].push(t(r))}else o.push(t(r));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}};dt.create=e=>new dt(e);var Vw=(e,t)=>{let n;switch(e.code){case b.invalid_type:e.received===O.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case b.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,oe.jsonStringifyReplacer)}`;break;case b.unrecognized_keys:n=`Unrecognized key(s) in object: ${oe.joinValues(e.keys,", ")}`;break;case b.invalid_union:n="Invalid input";break;case b.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${oe.joinValues(e.options)}`;break;case b.invalid_enum_value:n=`Invalid enum value. Expected ${oe.joinValues(e.options)}, received '${e.received}'`;break;case b.invalid_arguments:n="Invalid function arguments";break;case b.invalid_return_type:n="Invalid function return type";break;case b.invalid_date:n="Invalid date";break;case b.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}"`:oe.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case b.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 b.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 b.custom:n="Invalid input";break;case b.invalid_intersection_types:n="Intersection results could not be merged";break;case b.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case b.not_finite:n="Number must be finite";break;default:n=t.defaultError,oe.assertNever(e)}return{message:n}},lr=Vw;var Hw=lr;function Do(){return Hw}var Fa=e=>{let{data:t,path:n,errorMaps:o,issueData:r}=e,i=[...n,...r.path||[]],a={...r,path:i};if(r.message!==void 0)return{...r,path:i,message:r.message};let s="",c=o.filter(u=>!!u).slice().reverse();for(let u of c)s=u(a,{data:t,defaultError:s}).message;return{...r,path:i,message:s}};function I(e,t){let n=Do(),o=Fa({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===lr?void 0:lr].filter(r=>!!r)});e.common.issues.push(o)}var Ve=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 o=[];for(let r of n){if(r.status==="aborted")return M;r.status==="dirty"&&t.dirty(),o.push(r.value)}return{status:t.value,value:o}}static async mergeObjectAsync(t,n){let o=[];for(let r of n){let i=await r.key,a=await r.value;o.push({key:i,value:a})}return e.mergeObjectSync(t,o)}static mergeObjectSync(t,n){let o={};for(let r of n){let{key:i,value:a}=r;if(i.status==="aborted"||a.status==="aborted")return M;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||r.alwaysSet)&&(o[i.value]=a.value)}return{status:t.value,value:o}}},M=Object.freeze({status:"aborted"}),bn=e=>({status:"dirty",value:e}),Be=e=>({status:"valid",value:e}),kd=e=>e.status==="aborted",wd=e=>e.status==="dirty",qr=e=>e.status==="valid",Co=e=>typeof Promise<"u"&&e instanceof Promise;var j;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(j||(j={}));var gt=class{constructor(t,n,o,r){this._cachedPath=[],this.parent=t,this.data=n,this._path=o,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}},lv=(e,t)=>{if(qr(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 dt(e.common.issues);return this._error=n,this._error}}};function G(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:o,description:r}=e;if(t&&(n||o))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??o??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:c??n??s.defaultError}},description:r}}var Q=class{get description(){return this._def.description}_getType(t){return Xt(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Xt(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ve,ctx:{common:t.parent.common,data:t.data,parsedType:Xt(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(Co(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 o=this.safeParse(t,n);if(o.success)return o.data;throw o.error}safeParse(t,n){let o={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Xt(t)},r=this._parseSync({data:t,path:o.path,parent:o});return lv(o,r)}"~validate"(t){let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Xt(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:n});return qr(o)?{value:o.value}:{issues:n.common.issues}}catch(o){o?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(o=>qr(o)?{value:o.value}:{issues:n.common.issues})}async parseAsync(t,n){let o=await this.safeParseAsync(t,n);if(o.success)return o.data;throw o.error}async safeParseAsync(t,n){let o={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Xt(t)},r=this._parse({data:t,path:o.path,parent:o}),i=await(Co(r)?r:Promise.resolve(r));return lv(o,i)}refine(t,n){let o=r=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(r):n;return this._refinement((r,i)=>{let a=t(r),s=()=>i.addIssue({code:b.custom,...o(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((o,r)=>t(o)?!0:(r.addIssue(typeof n=="function"?n(o,r):n),!1))}_refinement(t){return new Pt({schema:this,typeName:k.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 Tt.create(this,this._def)}nullable(){return er.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return pr.create(this)}promise(){return Fr.create(this,this._def)}or(t){return Sn.create([this,t],this._def)}and(t){return zn.create(this,t,this._def)}transform(t){return new Pt({...G(this._def),schema:this,typeName:k.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t=="function"?t:()=>t;return new On({...G(this._def),innerType:this,defaultValue:n,typeName:k.ZodDefault})}brand(){return new Va({typeName:k.ZodBranded,type:this,...G(this._def)})}catch(t){let n=typeof t=="function"?t:()=>t;return new jn({...G(this._def),innerType:this,catchValue:n,typeName:k.ZodCatch})}describe(t){let n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Ha.create(this,t)}readonly(){return Rn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Ww=/^c[^\s-]{8,}$/i,Jw=/^[0-9a-z]+$/,Gw=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Bw=/^[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,Kw=/^[a-z0-9_-]{21}$/i,Xw=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Yw=/^[-+]?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)?)??$/,Qw=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,eS="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Sd,tS=/^(?:(?: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])$/,rS=/^(?:(?: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])$/,nS=/^(([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]))$/,oS=/^(([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])$/,iS=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,aS=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,dv="((\\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])))",sS=new RegExp(`^${dv}$`);function pv(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 cS(e){return new RegExp(`^${pv(e)}$`)}function uS(e){let t=`${dv}T${pv(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 lS(e,t){return!!((t==="v4"||!t)&&tS.test(e)||(t==="v6"||!t)&&nS.test(e))}function dS(e,t){if(!Xw.test(e))return!1;try{let[n]=e.split(".");if(!n)return!1;let o=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),r=JSON.parse(atob(o));return!(typeof r!="object"||r===null||"typ"in r&&r?.typ!=="JWT"||!r.alg||t&&r.alg!==t)}catch{return!1}}function pS(e,t){return!!((t==="v4"||!t)&&rS.test(e)||(t==="v6"||!t)&&oS.test(e))}var xn=class e extends Q{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==O.string){let i=this._getOrReturnCtx(t);return I(i,{code:b.invalid_type,expected:O.string,received:i.parsedType}),M}let o=new Ve,r;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(r=this._getOrReturnCtx(t,r),I(r,{code:b.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),o.dirty());else if(i.kind==="max")t.data.length>i.value&&(r=this._getOrReturnCtx(t,r),I(r,{code:b.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),o.dirty());else if(i.kind==="length"){let a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(r=this._getOrReturnCtx(t,r),a?I(r,{code:b.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&I(r,{code:b.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),o.dirty())}else if(i.kind==="email")Qw.test(t.data)||(r=this._getOrReturnCtx(t,r),I(r,{validation:"email",code:b.invalid_string,message:i.message}),o.dirty());else if(i.kind==="emoji")Sd||(Sd=new RegExp(eS,"u")),Sd.test(t.data)||(r=this._getOrReturnCtx(t,r),I(r,{validation:"emoji",code:b.invalid_string,message:i.message}),o.dirty());else if(i.kind==="uuid")Bw.test(t.data)||(r=this._getOrReturnCtx(t,r),I(r,{validation:"uuid",code:b.invalid_string,message:i.message}),o.dirty());else if(i.kind==="nanoid")Kw.test(t.data)||(r=this._getOrReturnCtx(t,r),I(r,{validation:"nanoid",code:b.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid")Ww.test(t.data)||(r=this._getOrReturnCtx(t,r),I(r,{validation:"cuid",code:b.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid2")Jw.test(t.data)||(r=this._getOrReturnCtx(t,r),I(r,{validation:"cuid2",code:b.invalid_string,message:i.message}),o.dirty());else if(i.kind==="ulid")Gw.test(t.data)||(r=this._getOrReturnCtx(t,r),I(r,{validation:"ulid",code:b.invalid_string,message:i.message}),o.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{r=this._getOrReturnCtx(t,r),I(r,{validation:"url",code:b.invalid_string,message:i.message}),o.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(r=this._getOrReturnCtx(t,r),I(r,{validation:"regex",code:b.invalid_string,message:i.message}),o.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(r=this._getOrReturnCtx(t,r),I(r,{code:b.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),o.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(r=this._getOrReturnCtx(t,r),I(r,{code:b.invalid_string,validation:{startsWith:i.value},message:i.message}),o.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(r=this._getOrReturnCtx(t,r),I(r,{code:b.invalid_string,validation:{endsWith:i.value},message:i.message}),o.dirty()):i.kind==="datetime"?uS(i).test(t.data)||(r=this._getOrReturnCtx(t,r),I(r,{code:b.invalid_string,validation:"datetime",message:i.message}),o.dirty()):i.kind==="date"?sS.test(t.data)||(r=this._getOrReturnCtx(t,r),I(r,{code:b.invalid_string,validation:"date",message:i.message}),o.dirty()):i.kind==="time"?cS(i).test(t.data)||(r=this._getOrReturnCtx(t,r),I(r,{code:b.invalid_string,validation:"time",message:i.message}),o.dirty()):i.kind==="duration"?Yw.test(t.data)||(r=this._getOrReturnCtx(t,r),I(r,{validation:"duration",code:b.invalid_string,message:i.message}),o.dirty()):i.kind==="ip"?lS(t.data,i.version)||(r=this._getOrReturnCtx(t,r),I(r,{validation:"ip",code:b.invalid_string,message:i.message}),o.dirty()):i.kind==="jwt"?dS(t.data,i.alg)||(r=this._getOrReturnCtx(t,r),I(r,{validation:"jwt",code:b.invalid_string,message:i.message}),o.dirty()):i.kind==="cidr"?pS(t.data,i.version)||(r=this._getOrReturnCtx(t,r),I(r,{validation:"cidr",code:b.invalid_string,message:i.message}),o.dirty()):i.kind==="base64"?iS.test(t.data)||(r=this._getOrReturnCtx(t,r),I(r,{validation:"base64",code:b.invalid_string,message:i.message}),o.dirty()):i.kind==="base64url"?aS.test(t.data)||(r=this._getOrReturnCtx(t,r),I(r,{validation:"base64url",code:b.invalid_string,message:i.message}),o.dirty()):oe.assertNever(i);return{status:o.value,value:t.data}}_regex(t,n,o){return this.refinement(r=>t.test(r),{validation:n,code:b.invalid_string,...j.errToObj(o)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...j.errToObj(t)})}url(t){return this._addCheck({kind:"url",...j.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...j.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...j.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...j.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...j.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...j.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...j.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...j.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...j.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...j.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...j.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...j.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,...j.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,...j.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...j.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...j.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...j.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...j.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...j.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...j.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...j.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...j.errToObj(n)})}nonempty(t){return this.min(1,j.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}};xn.create=e=>new xn({checks:[],typeName:k.ZodString,coerce:e?.coerce??!1,...G(e)});function fS(e,t){let n=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,r=n>o?n:o,i=Number.parseInt(e.toFixed(r).replace(".","")),a=Number.parseInt(t.toFixed(r).replace(".",""));return i%a/10**r}var Ao=class e extends Q{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)!==O.number){let i=this._getOrReturnCtx(t);return I(i,{code:b.invalid_type,expected:O.number,received:i.parsedType}),M}let o,r=new Ve;for(let i of this._def.checks)i.kind==="int"?oe.isInteger(t.data)||(o=this._getOrReturnCtx(t,o),I(o,{code:b.invalid_type,expected:"integer",received:"float",message:i.message}),r.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),I(o,{code:b.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),I(o,{code:b.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):i.kind==="multipleOf"?fS(t.data,i.value)!==0&&(o=this._getOrReturnCtx(t,o),I(o,{code:b.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(o=this._getOrReturnCtx(t,o),I(o,{code:b.not_finite,message:i.message}),r.dirty()):oe.assertNever(i);return{status:r.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,j.toString(n))}gt(t,n){return this.setLimit("min",t,!1,j.toString(n))}lte(t,n){return this.setLimit("max",t,!0,j.toString(n))}lt(t,n){return this.setLimit("max",t,!1,j.toString(n))}setLimit(t,n,o,r){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:o,message:j.toString(r)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:j.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:j.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:j.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:j.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:j.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:j.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:j.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:j.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:j.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"&&oe.isInteger(t.value))}get isFinite(){let t=null,n=null;for(let o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(n===null||o.value>n)&&(n=o.value):o.kind==="max"&&(t===null||o.value<t)&&(t=o.value)}return Number.isFinite(n)&&Number.isFinite(t)}};Ao.create=e=>new Ao({checks:[],typeName:k.ZodNumber,coerce:e?.coerce||!1,...G(e)});var Uo=class e extends Q{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)!==O.bigint)return this._getInvalidInput(t);let o,r=new Ve;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),I(o,{code:b.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),I(o,{code:b.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(o=this._getOrReturnCtx(t,o),I(o,{code:b.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):oe.assertNever(i);return{status:r.value,value:t.data}}_getInvalidInput(t){let n=this._getOrReturnCtx(t);return I(n,{code:b.invalid_type,expected:O.bigint,received:n.parsedType}),M}gte(t,n){return this.setLimit("min",t,!0,j.toString(n))}gt(t,n){return this.setLimit("min",t,!1,j.toString(n))}lte(t,n){return this.setLimit("max",t,!0,j.toString(n))}lt(t,n){return this.setLimit("max",t,!1,j.toString(n))}setLimit(t,n,o,r){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:o,message:j.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:j.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:j.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:j.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:j.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:j.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}};Uo.create=e=>new Uo({checks:[],typeName:k.ZodBigInt,coerce:e?.coerce??!1,...G(e)});var Zo=class extends Q{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==O.boolean){let o=this._getOrReturnCtx(t);return I(o,{code:b.invalid_type,expected:O.boolean,received:o.parsedType}),M}return Be(t.data)}};Zo.create=e=>new Zo({typeName:k.ZodBoolean,coerce:e?.coerce||!1,...G(e)});var Mo=class e extends Q{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==O.date){let i=this._getOrReturnCtx(t);return I(i,{code:b.invalid_type,expected:O.date,received:i.parsedType}),M}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return I(i,{code:b.invalid_date}),M}let o=new Ve,r;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(r=this._getOrReturnCtx(t,r),I(r,{code:b.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),o.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(r=this._getOrReturnCtx(t,r),I(r,{code:b.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),o.dirty()):oe.assertNever(i);return{status:o.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:j.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:j.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}};Mo.create=e=>new Mo({checks:[],coerce:e?.coerce||!1,typeName:k.ZodDate,...G(e)});var Lo=class extends Q{_parse(t){if(this._getType(t)!==O.symbol){let o=this._getOrReturnCtx(t);return I(o,{code:b.invalid_type,expected:O.symbol,received:o.parsedType}),M}return Be(t.data)}};Lo.create=e=>new Lo({typeName:k.ZodSymbol,...G(e)});var kn=class extends Q{_parse(t){if(this._getType(t)!==O.undefined){let o=this._getOrReturnCtx(t);return I(o,{code:b.invalid_type,expected:O.undefined,received:o.parsedType}),M}return Be(t.data)}};kn.create=e=>new kn({typeName:k.ZodUndefined,...G(e)});var wn=class extends Q{_parse(t){if(this._getType(t)!==O.null){let o=this._getOrReturnCtx(t);return I(o,{code:b.invalid_type,expected:O.null,received:o.parsedType}),M}return Be(t.data)}};wn.create=e=>new wn({typeName:k.ZodNull,...G(e)});var qo=class extends Q{constructor(){super(...arguments),this._any=!0}_parse(t){return Be(t.data)}};qo.create=e=>new qo({typeName:k.ZodAny,...G(e)});var dr=class extends Q{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Be(t.data)}};dr.create=e=>new dr({typeName:k.ZodUnknown,...G(e)});var Lt=class extends Q{_parse(t){let n=this._getOrReturnCtx(t);return I(n,{code:b.invalid_type,expected:O.never,received:n.parsedType}),M}};Lt.create=e=>new Lt({typeName:k.ZodNever,...G(e)});var Fo=class extends Q{_parse(t){if(this._getType(t)!==O.undefined){let o=this._getOrReturnCtx(t);return I(o,{code:b.invalid_type,expected:O.void,received:o.parsedType}),M}return Be(t.data)}};Fo.create=e=>new Fo({typeName:k.ZodVoid,...G(e)});var pr=class e extends Q{_parse(t){let{ctx:n,status:o}=this._processInputParams(t),r=this._def;if(n.parsedType!==O.array)return I(n,{code:b.invalid_type,expected:O.array,received:n.parsedType}),M;if(r.exactLength!==null){let a=n.data.length>r.exactLength.value,s=n.data.length<r.exactLength.value;(a||s)&&(I(n,{code:a?b.too_big:b.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}),o.dirty())}if(r.minLength!==null&&n.data.length<r.minLength.value&&(I(n,{code:b.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),o.dirty()),r.maxLength!==null&&n.data.length>r.maxLength.value&&(I(n,{code:b.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),o.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>r.type._parseAsync(new gt(n,a,n.path,s)))).then(a=>Ve.mergeArray(o,a));let i=[...n.data].map((a,s)=>r.type._parseSync(new gt(n,a,n.path,s)));return Ve.mergeArray(o,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:j.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:j.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:j.toString(n)}})}nonempty(t){return this.min(1,t)}};pr.create=(e,t)=>new pr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:k.ZodArray,...G(t)});function $n(e){if(e instanceof pt){let t={};for(let n in e.shape){let o=e.shape[n];t[n]=Tt.create($n(o))}return new pt({...e._def,shape:()=>t})}else return e instanceof pr?new pr({...e._def,type:$n(e.element)}):e instanceof Tt?Tt.create($n(e.unwrap())):e instanceof er?er.create($n(e.unwrap())):e instanceof Qt?Qt.create(e.items.map(t=>$n(t))):e}var pt=class e extends Q{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=oe.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==O.object){let u=this._getOrReturnCtx(t);return I(u,{code:b.invalid_type,expected:O.object,received:u.parsedType}),M}let{status:o,ctx:r}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Lt&&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=i[u],d=r.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new gt(r,d,r.path,u)),alwaysSet:u in r.data})}if(this._def.catchall instanceof Lt){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&&(I(r,{code:b.unrecognized_keys,keys:s}),o.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 gt(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=>Ve.mergeObjectSync(o,u)):Ve.mergeObjectSync(o,c)}get shape(){return this._def.shape()}strict(t){return j.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,o)=>{let r=this._def.errorMap?.(n,o).message??o.defaultError;return n.code==="unrecognized_keys"?{message:j.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:k.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let o of oe.objectKeys(t))t[o]&&this.shape[o]&&(n[o]=this.shape[o]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let o of oe.objectKeys(this.shape))t[o]||(n[o]=this.shape[o]);return new e({...this._def,shape:()=>n})}deepPartial(){return $n(this)}partial(t){let n={};for(let o of oe.objectKeys(this.shape)){let r=this.shape[o];t&&!t[o]?n[o]=r:n[o]=r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let o of oe.objectKeys(this.shape))if(t&&!t[o])n[o]=this.shape[o];else{let i=this.shape[o];for(;i instanceof Tt;)i=i._def.innerType;n[o]=i}return new e({...this._def,shape:()=>n})}keyof(){return fv(oe.objectKeys(this.shape))}};pt.create=(e,t)=>new pt({shape:()=>e,unknownKeys:"strip",catchall:Lt.create(),typeName:k.ZodObject,...G(t)});pt.strictCreate=(e,t)=>new pt({shape:()=>e,unknownKeys:"strict",catchall:Lt.create(),typeName:k.ZodObject,...G(t)});pt.lazycreate=(e,t)=>new pt({shape:e,unknownKeys:"strip",catchall:Lt.create(),typeName:k.ZodObject,...G(t)});var Sn=class extends Q{_parse(t){let{ctx:n}=this._processInputParams(t),o=this._def.options;function r(i){for(let s of i)if(s.result.status==="valid")return s.result;for(let s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;let a=i.map(s=>new dt(s.ctx.common.issues));return I(n,{code:b.invalid_union,unionErrors:a}),M}if(n.common.async)return Promise.all(o.map(async i=>{let a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(r);{let i,a=[];for(let c of o){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"&&!i&&(i={result:l,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;let s=a.map(c=>new dt(c));return I(n,{code:b.invalid_union,unionErrors:s}),M}}get options(){return this._def.options}};Sn.create=(e,t)=>new Sn({options:e,typeName:k.ZodUnion,...G(t)});var Yt=e=>e instanceof In?Yt(e.schema):e instanceof Pt?Yt(e.innerType()):e instanceof Tn?[e.value]:e instanceof Pn?e.options:e instanceof En?oe.objectValues(e.enum):e instanceof On?Yt(e._def.innerType):e instanceof kn?[void 0]:e instanceof wn?[null]:e instanceof Tt?[void 0,...Yt(e.unwrap())]:e instanceof er?[null,...Yt(e.unwrap())]:e instanceof Va||e instanceof Rn?Yt(e.unwrap()):e instanceof jn?Yt(e._def.innerType):[],zd=class e extends Q{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==O.object)return I(n,{code:b.invalid_type,expected:O.object,received:n.parsedType}),M;let o=this.discriminator,r=n.data[o],i=this.optionsMap.get(r);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(I(n,{code:b.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),M)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,o){let r=new Map;for(let i of n){let a=Yt(i.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,i)}}return new e({typeName:k.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:r,...G(o)})}};function Id(e,t){let n=Xt(e),o=Xt(t);if(e===t)return{valid:!0,data:e};if(n===O.object&&o===O.object){let r=oe.objectKeys(t),i=oe.objectKeys(e).filter(s=>r.indexOf(s)!==-1),a={...e,...t};for(let s of i){let c=Id(e[s],t[s]);if(!c.valid)return{valid:!1};a[s]=c.data}return{valid:!0,data:a}}else if(n===O.array&&o===O.array){if(e.length!==t.length)return{valid:!1};let r=[];for(let i=0;i<e.length;i++){let a=e[i],s=t[i],c=Id(a,s);if(!c.valid)return{valid:!1};r.push(c.data)}return{valid:!0,data:r}}else return n===O.date&&o===O.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var zn=class extends Q{_parse(t){let{status:n,ctx:o}=this._processInputParams(t),r=(i,a)=>{if(kd(i)||kd(a))return M;let s=Id(i.value,a.value);return s.valid?((wd(i)||wd(a))&&n.dirty(),{status:n.value,value:s.data}):(I(o,{code:b.invalid_intersection_types}),M)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([i,a])=>r(i,a)):r(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}};zn.create=(e,t,n)=>new zn({left:e,right:t,typeName:k.ZodIntersection,...G(n)});var Qt=class e extends Q{_parse(t){let{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==O.array)return I(o,{code:b.invalid_type,expected:O.array,received:o.parsedType}),M;if(o.data.length<this._def.items.length)return I(o,{code:b.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),M;!this._def.rest&&o.data.length>this._def.items.length&&(I(o,{code:b.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let i=[...o.data].map((a,s)=>{let c=this._def.items[s]||this._def.rest;return c?c._parse(new gt(o,a,o.path,s)):null}).filter(a=>!!a);return o.common.async?Promise.all(i).then(a=>Ve.mergeArray(n,a)):Ve.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Qt.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Qt({items:e,typeName:k.ZodTuple,rest:null,...G(t)})};var Td=class e extends Q{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==O.object)return I(o,{code:b.invalid_type,expected:O.object,received:o.parsedType}),M;let r=[],i=this._def.keyType,a=this._def.valueType;for(let s in o.data)r.push({key:i._parse(new gt(o,s,o.path,s)),value:a._parse(new gt(o,o.data[s],o.path,s)),alwaysSet:s in o.data});return o.common.async?Ve.mergeObjectAsync(n,r):Ve.mergeObjectSync(n,r)}get element(){return this._def.valueType}static create(t,n,o){return n instanceof Q?new e({keyType:t,valueType:n,typeName:k.ZodRecord,...G(o)}):new e({keyType:xn.create(),valueType:t,typeName:k.ZodRecord,...G(n)})}},Vo=class extends Q{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==O.map)return I(o,{code:b.invalid_type,expected:O.map,received:o.parsedType}),M;let r=this._def.keyType,i=this._def.valueType,a=[...o.data.entries()].map(([s,c],u)=>({key:r._parse(new gt(o,s,o.path,[u,"key"])),value:i._parse(new gt(o,c,o.path,[u,"value"]))}));if(o.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 M;(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 M;(u.status==="dirty"||l.status==="dirty")&&n.dirty(),s.set(u.value,l.value)}return{status:n.value,value:s}}}};Vo.create=(e,t,n)=>new Vo({valueType:t,keyType:e,typeName:k.ZodMap,...G(n)});var Ho=class e extends Q{_parse(t){let{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==O.set)return I(o,{code:b.invalid_type,expected:O.set,received:o.parsedType}),M;let r=this._def;r.minSize!==null&&o.data.size<r.minSize.value&&(I(o,{code:b.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),n.dirty()),r.maxSize!==null&&o.data.size>r.maxSize.value&&(I(o,{code:b.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),n.dirty());let i=this._def.valueType;function a(c){let u=new Set;for(let l of c){if(l.status==="aborted")return M;l.status==="dirty"&&n.dirty(),u.add(l.value)}return{status:n.value,value:u}}let s=[...o.data.values()].map((c,u)=>i._parse(new gt(o,c,o.path,u)));return o.common.async?Promise.all(s).then(c=>a(c)):a(s)}min(t,n){return new e({...this._def,minSize:{value:t,message:j.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:j.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};Ho.create=(e,t)=>new Ho({valueType:e,minSize:null,maxSize:null,typeName:k.ZodSet,...G(t)});var Pd=class e extends Q{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==O.function)return I(n,{code:b.invalid_type,expected:O.function,received:n.parsedType}),M;function o(s,c){return Fa({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Do(),lr].filter(u=>!!u),issueData:{code:b.invalid_arguments,argumentsError:c}})}function r(s,c){return Fa({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Do(),lr].filter(u=>!!u),issueData:{code:b.invalid_return_type,returnTypeError:c}})}let i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Fr){let s=this;return Be(async function(...c){let u=new dt([]),l=await s._def.args.parseAsync(c,i).catch(f=>{throw u.addIssue(o(c,f)),u}),d=await Reflect.apply(a,this,l);return await s._def.returns._def.type.parseAsync(d,i).catch(f=>{throw u.addIssue(r(d,f)),u})})}else{let s=this;return Be(function(...c){let u=s._def.args.safeParse(c,i);if(!u.success)throw new dt([o(c,u.error)]);let l=Reflect.apply(a,this,u.data),d=s._def.returns.safeParse(l,i);if(!d.success)throw new dt([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:Qt.create(t).rest(dr.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,o){return new e({args:t||Qt.create([]).rest(dr.create()),returns:n||dr.create(),typeName:k.ZodFunction,...G(o)})}},In=class extends Q{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})}};In.create=(e,t)=>new In({getter:e,typeName:k.ZodLazy,...G(t)});var Tn=class extends Q{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return I(n,{received:n.data,code:b.invalid_literal,expected:this._def.value}),M}return{status:"valid",value:t.data}}get value(){return this._def.value}};Tn.create=(e,t)=>new Tn({value:e,typeName:k.ZodLiteral,...G(t)});function fv(e,t){return new Pn({values:e,typeName:k.ZodEnum,...G(t)})}var Pn=class e extends Q{_parse(t){if(typeof t.data!="string"){let n=this._getOrReturnCtx(t),o=this._def.values;return I(n,{expected:oe.joinValues(o),received:n.parsedType,code:b.invalid_type}),M}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let n=this._getOrReturnCtx(t),o=this._def.values;return I(n,{received:n.data,code:b.invalid_enum_value,options:o}),M}return Be(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(o=>!t.includes(o)),{...this._def,...n})}};Pn.create=fv;var En=class extends Q{_parse(t){let n=oe.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(t);if(o.parsedType!==O.string&&o.parsedType!==O.number){let r=oe.objectValues(n);return I(o,{expected:oe.joinValues(r),received:o.parsedType,code:b.invalid_type}),M}if(this._cache||(this._cache=new Set(oe.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let r=oe.objectValues(n);return I(o,{received:o.data,code:b.invalid_enum_value,options:r}),M}return Be(t.data)}get enum(){return this._def.values}};En.create=(e,t)=>new En({values:e,typeName:k.ZodNativeEnum,...G(t)});var Fr=class extends Q{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==O.promise&&n.common.async===!1)return I(n,{code:b.invalid_type,expected:O.promise,received:n.parsedType}),M;let o=n.parsedType===O.promise?n.data:Promise.resolve(n.data);return Be(o.then(r=>this._def.type.parseAsync(r,{path:n.path,errorMap:n.common.contextualErrorMap})))}};Fr.create=(e,t)=>new Fr({type:e,typeName:k.ZodPromise,...G(t)});var Pt=class extends Q{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===k.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:n,ctx:o}=this._processInputParams(t),r=this._def.effect||null,i={addIssue:a=>{I(o,a),a.fatal?n.abort():n.dirty()},get path(){return o.path}};if(i.addIssue=i.addIssue.bind(i),r.type==="preprocess"){let a=r.transform(o.data,i);if(o.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return M;let c=await this._def.schema._parseAsync({data:s,path:o.path,parent:o});return c.status==="aborted"?M:c.status==="dirty"?bn(c.value):n.value==="dirty"?bn(c.value):c});{if(n.value==="aborted")return M;let s=this._def.schema._parseSync({data:a,path:o.path,parent:o});return s.status==="aborted"?M:s.status==="dirty"?bn(s.value):n.value==="dirty"?bn(s.value):s}}if(r.type==="refinement"){let a=s=>{let c=r.refinement(s,i);if(o.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(o.common.async===!1){let s=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return s.status==="aborted"?M:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(s=>s.status==="aborted"?M:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(r.type==="transform")if(o.common.async===!1){let a=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!qr(a))return M;let s=r.transform(a.value,i);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:o.data,path:o.path,parent:o}).then(a=>qr(a)?Promise.resolve(r.transform(a.value,i)).then(s=>({status:n.value,value:s})):M);oe.assertNever(r)}};Pt.create=(e,t,n)=>new Pt({schema:e,typeName:k.ZodEffects,effect:t,...G(n)});Pt.createWithPreprocess=(e,t,n)=>new Pt({schema:t,effect:{type:"preprocess",transform:e},typeName:k.ZodEffects,...G(n)});var Tt=class extends Q{_parse(t){return this._getType(t)===O.undefined?Be(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Tt.create=(e,t)=>new Tt({innerType:e,typeName:k.ZodOptional,...G(t)});var er=class extends Q{_parse(t){return this._getType(t)===O.null?Be(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};er.create=(e,t)=>new er({innerType:e,typeName:k.ZodNullable,...G(t)});var On=class extends Q{_parse(t){let{ctx:n}=this._processInputParams(t),o=n.data;return n.parsedType===O.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};On.create=(e,t)=>new On({innerType:e,typeName:k.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...G(t)});var jn=class extends Q{_parse(t){let{ctx:n}=this._processInputParams(t),o={...n,common:{...n.common,issues:[]}},r=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return Co(r)?r.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new dt(o.common.issues)},input:o.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new dt(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}};jn.create=(e,t)=>new jn({innerType:e,typeName:k.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...G(t)});var Wo=class extends Q{_parse(t){if(this._getType(t)!==O.nan){let o=this._getOrReturnCtx(t);return I(o,{code:b.invalid_type,expected:O.nan,received:o.parsedType}),M}return{status:"valid",value:t.data}}};Wo.create=e=>new Wo({typeName:k.ZodNaN,...G(e)});var Va=class extends Q{_parse(t){let{ctx:n}=this._processInputParams(t),o=n.data;return this._def.type._parse({data:o,path:n.path,parent:n})}unwrap(){return this._def.type}},Ha=class e extends Q{_parse(t){let{status:n,ctx:o}=this._processInputParams(t);if(o.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?M:i.status==="dirty"?(n.dirty(),bn(i.value)):this._def.out._parseAsync({data:i.value,path:o.path,parent:o})})();{let r=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return r.status==="aborted"?M:r.status==="dirty"?(n.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:o.path,parent:o})}}static create(t,n){return new e({in:t,out:n,typeName:k.ZodPipeline})}},Rn=class extends Q{_parse(t){let n=this._def.innerType._parse(t),o=r=>(qr(r)&&(r.value=Object.freeze(r.value)),r);return Co(n)?n.then(r=>o(r)):o(n)}unwrap(){return this._def.innerType}};Rn.create=(e,t)=>new Rn({innerType:e,typeName:k.ZodReadonly,...G(t)});var uD={object:pt.lazycreate},k;(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"})(k||(k={}));var lD=xn.create,dD=Ao.create,pD=Wo.create,fD=Uo.create,mD=Zo.create,hD=Mo.create,gD=Lo.create,vD=kn.create,yD=wn.create,_D=qo.create,bD=dr.create,$D=Lt.create,xD=Fo.create,kD=pr.create,mv=pt.create,wD=pt.strictCreate,SD=Sn.create,zD=zd.create,ID=zn.create,TD=Qt.create,PD=Td.create,ED=Vo.create,OD=Ho.create,jD=Pd.create,RD=In.create,ND=Tn.create,DD=Pn.create,CD=En.create,AD=Fr.create,UD=Pt.create,ZD=Tt.create,MD=er.create,LD=Pt.createWithPreprocess,qD=Ha.create;var mt={};Kt(mt,{$ZodAny:()=>Hs,$ZodArray:()=>Ks,$ZodAsyncError:()=>Et,$ZodBase64:()=>Ds,$ZodBase64URL:()=>Cs,$ZodBigInt:()=>ai,$ZodBigIntFormat:()=>Ls,$ZodBoolean:()=>Vn,$ZodCIDRv4:()=>Rs,$ZodCIDRv6:()=>Ns,$ZodCUID:()=>$s,$ZodCUID2:()=>xs,$ZodCatch:()=>mc,$ZodCheck:()=>fe,$ZodCheckBigIntFormat:()=>hp,$ZodCheckEndsWith:()=>Ip,$ZodCheckGreaterThan:()=>us,$ZodCheckIncludes:()=>Sp,$ZodCheckLengthEquals:()=>$p,$ZodCheckLessThan:()=>cs,$ZodCheckLowerCase:()=>kp,$ZodCheckMaxLength:()=>_p,$ZodCheckMaxSize:()=>gp,$ZodCheckMimeType:()=>Pp,$ZodCheckMinLength:()=>bp,$ZodCheckMinSize:()=>vp,$ZodCheckMultipleOf:()=>fp,$ZodCheckNumberFormat:()=>mp,$ZodCheckOverwrite:()=>Ep,$ZodCheckProperty:()=>Tp,$ZodCheckRegex:()=>xp,$ZodCheckSizeEquals:()=>yp,$ZodCheckStartsWith:()=>zp,$ZodCheckStringFormat:()=>Fn,$ZodCheckUpperCase:()=>wp,$ZodCodec:()=>Wn,$ZodCustom:()=>xc,$ZodCustomStringFormat:()=>Zs,$ZodDate:()=>Bs,$ZodDefault:()=>lc,$ZodDiscriminatedUnion:()=>Qs,$ZodE164:()=>As,$ZodEmail:()=>vs,$ZodEmoji:()=>_s,$ZodEncodeError:()=>fr,$ZodEnum:()=>oc,$ZodError:()=>ti,$ZodExactOptional:()=>cc,$ZodFile:()=>ac,$ZodFunction:()=>_c,$ZodGUID:()=>hs,$ZodIPv4:()=>Es,$ZodIPv6:()=>Os,$ZodISODate:()=>Is,$ZodISODateTime:()=>zs,$ZodISODuration:()=>Ps,$ZodISOTime:()=>Ts,$ZodIntersection:()=>ec,$ZodJWT:()=>Us,$ZodKSUID:()=>Ss,$ZodLazy:()=>$c,$ZodLiteral:()=>ic,$ZodMAC:()=>js,$ZodMap:()=>rc,$ZodNaN:()=>hc,$ZodNanoID:()=>bs,$ZodNever:()=>Js,$ZodNonOptional:()=>pc,$ZodNull:()=>Vs,$ZodNullable:()=>uc,$ZodNumber:()=>ii,$ZodNumberFormat:()=>Ms,$ZodObject:()=>Xs,$ZodObjectJIT:()=>Np,$ZodOptional:()=>ci,$ZodPipe:()=>gc,$ZodPrefault:()=>dc,$ZodPromise:()=>bc,$ZodReadonly:()=>vc,$ZodRealError:()=>ot,$ZodRecord:()=>tc,$ZodRegistry:()=>zc,$ZodSet:()=>nc,$ZodString:()=>br,$ZodStringFormat:()=>de,$ZodSuccess:()=>fc,$ZodSymbol:()=>qs,$ZodTemplateLiteral:()=>yc,$ZodTransform:()=>sc,$ZodTuple:()=>si,$ZodType:()=>q,$ZodULID:()=>ks,$ZodURL:()=>ys,$ZodUUID:()=>gs,$ZodUndefined:()=>Fs,$ZodUnion:()=>Hn,$ZodUnknown:()=>Ws,$ZodVoid:()=>Gs,$ZodXID:()=>ws,$ZodXor:()=>Ys,$brand:()=>Go,$constructor:()=>m,$input:()=>Tc,$output:()=>Ic,Doc:()=>oi,JSONSchema:()=>Qy,JSONSchemaGenerator:()=>gu,NEVER:()=>Wa,TimePrecision:()=>jc,_any:()=>Qc,_array:()=>Dp,_base64:()=>Ii,_base64url:()=>Ti,_bigint:()=>Wc,_boolean:()=>Vc,_catch:()=>$z,_check:()=>Yy,_cidrv4:()=>Si,_cidrv6:()=>zi,_coercedBigint:()=>Jc,_coercedBoolean:()=>Hc,_coercedDate:()=>ou,_coercedNumber:()=>Uc,_coercedString:()=>Ec,_cuid:()=>yi,_cuid2:()=>_i,_custom:()=>su,_date:()=>nu,_decode:()=>Qa,_decodeAsync:()=>ts,_default:()=>yz,_discriminatedUnion:()=>az,_e164:()=>Pi,_email:()=>di,_emoji:()=>gi,_encode:()=>Ya,_encodeAsync:()=>es,_endsWith:()=>Qr,_enum:()=>pz,_file:()=>au,_float32:()=>Mc,_float64:()=>Lc,_gt:()=>jt,_gte:()=>Ue,_guid:()=>Bn,_includes:()=>Xr,_int:()=>Zc,_int32:()=>qc,_int64:()=>Gc,_intersection:()=>sz,_ipv4:()=>ki,_ipv6:()=>wi,_isoDate:()=>Nc,_isoDateTime:()=>Rc,_isoDuration:()=>Cc,_isoTime:()=>Dc,_jwt:()=>Ei,_ksuid:()=>xi,_lazy:()=>Sz,_length:()=>kr,_literal:()=>mz,_lowercase:()=>Br,_lt:()=>Ot,_lte:()=>Ke,_mac:()=>Oc,_map:()=>lz,_max:()=>Ke,_maxLength:()=>xr,_maxSize:()=>nr,_mime:()=>en,_min:()=>Ue,_minLength:()=>qt,_minSize:()=>Rt,_multipleOf:()=>rr,_nan:()=>iu,_nanoid:()=>vi,_nativeEnum:()=>fz,_negative:()=>ji,_never:()=>tu,_nonnegative:()=>Ni,_nonoptional:()=>_z,_nonpositive:()=>Ri,_normalize:()=>tn,_null:()=>Yc,_nullable:()=>vz,_number:()=>Ac,_optional:()=>gz,_overwrite:()=>yt,_parse:()=>Zn,_parseAsync:()=>Mn,_pipe:()=>xz,_positive:()=>Oi,_promise:()=>zz,_property:()=>Di,_readonly:()=>kz,_record:()=>uz,_refine:()=>cu,_regex:()=>Gr,_safeDecode:()=>ns,_safeDecodeAsync:()=>is,_safeEncode:()=>rs,_safeEncodeAsync:()=>os,_safeParse:()=>Ln,_safeParseAsync:()=>qn,_set:()=>dz,_size:()=>$r,_slugify:()=>Xn,_startsWith:()=>Yr,_string:()=>Pc,_stringFormat:()=>an,_stringbool:()=>pu,_success:()=>bz,_superRefine:()=>uu,_symbol:()=>Kc,_templateLiteral:()=>wz,_toLowerCase:()=>nn,_toUpperCase:()=>on,_transform:()=>hz,_trim:()=>rn,_tuple:()=>cz,_uint32:()=>Fc,_uint64:()=>Bc,_ulid:()=>bi,_undefined:()=>Xc,_union:()=>oz,_unknown:()=>eu,_uppercase:()=>Kr,_url:()=>Kn,_uuid:()=>pi,_uuidv4:()=>fi,_uuidv6:()=>mi,_uuidv7:()=>hi,_void:()=>ru,_xid:()=>$i,_xor:()=>iz,clone:()=>De,config:()=>Se,createStandardJSONSchemaMethod:()=>Yn,createToJSONSchemaMethod:()=>Cp,decode:()=>Iv,decodeAsync:()=>Pv,describe:()=>lu,encode:()=>zv,encodeAsync:()=>Tv,extractDefs:()=>Sr,finalize:()=>zr,flattenError:()=>An,formatError:()=>Un,globalConfig:()=>Jo,globalRegistry:()=>Ce,initializeContext:()=>wr,isValidBase64:()=>Rp,isValidBase64URL:()=>Xv,isValidJWT:()=>Yv,locales:()=>Gn,meta:()=>du,parse:()=>Hr,parseAsync:()=>Wr,prettifyError:()=>Xa,process:()=>le,regexes:()=>it,registry:()=>li,safeDecode:()=>Ov,safeDecodeAsync:()=>Rv,safeEncode:()=>Ev,safeEncodeAsync:()=>jv,safeParse:()=>yr,safeParseAsync:()=>_r,toDotPath:()=>Sv,toJSONSchema:()=>sn,treeifyError:()=>Ka,util:()=>$,version:()=>Op});var Wa=Object.freeze({status:"aborted"});function m(e,t,n){function o(s,c){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:c,constr:a,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,c);let u=a.prototype,l=Object.keys(u);for(let d=0;d<l.length;d++){let p=l[d];p in s||(s[p]=u[p].bind(s))}}let r=n?.Parent??Object;class i extends r{}Object.defineProperty(i,"name",{value:e});function a(s){var c;let u=n?.Parent?new i:this;o(u,s),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>n?.Parent&&s instanceof n.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var Go=Symbol("zod_brand"),Et=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},fr=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},Jo={};function Se(e){return e&&Object.assign(Jo,e),Jo}var $={};Kt($,{BIGINT_FORMAT_RANGES:()=>Ud,Class:()=>Od,NUMBER_FORMAT_RANGES:()=>Ad,aborted:()=>vr,allowsEval:()=>Nd,assert:()=>bS,assertEqual:()=>gS,assertIs:()=>yS,assertNever:()=>_S,assertNotEqual:()=>vS,assignProp:()=>hr,base64ToUint8Array:()=>xv,base64urlToUint8Array:()=>OS,cached:()=>Dn,captureStackTrace:()=>Ga,cleanEnum:()=>ES,cleanRegex:()=>Xo,clone:()=>De,cloneDef:()=>xS,createTransparentProxy:()=>TS,defineLazy:()=>B,esc:()=>Ja,escapeRegex:()=>vt,extend:()=>yv,finalizeIssue:()=>nt,floatSafeRemainder:()=>jd,getElementAtPath:()=>kS,getEnumValues:()=>Ko,getLengthableOrigin:()=>ei,getParsedType:()=>IS,getSizableOrigin:()=>Qo,hexToUint8Array:()=>RS,isObject:()=>Vr,isPlainObject:()=>gr,issue:()=>Cn,joinValues:()=>v,jsonStringifyReplacer:()=>Nn,merge:()=>PS,mergeDefs:()=>tr,normalizeParams:()=>w,nullish:()=>mr,numKeys:()=>zS,objectClone:()=>$S,omit:()=>vv,optionalKeys:()=>Cd,parsedType:()=>x,partial:()=>bv,pick:()=>gv,prefixIssues:()=>ft,primitiveTypes:()=>Dd,promiseAllObject:()=>wS,propertyKeyTypes:()=>Yo,randomString:()=>SS,required:()=>$v,safeExtend:()=>_v,shallowClone:()=>Ba,slugify:()=>Rd,stringifyPrimitive:()=>_,uint8ArrayToBase64:()=>kv,uint8ArrayToBase64url:()=>jS,uint8ArrayToHex:()=>NS,unwrapMessage:()=>Bo});function gS(e){return e}function vS(e){return e}function yS(e){}function _S(e){throw new Error("Unexpected value in exhaustive check")}function bS(e){}function Ko(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,r])=>t.indexOf(+o)===-1).map(([o,r])=>r)}function v(e,t="|"){return e.map(n=>_(n)).join(t)}function Nn(e,t){return typeof t=="bigint"?t.toString():t}function Dn(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function mr(e){return e==null}function Xo(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function jd(e,t){let n=(e.toString().split(".")[1]||"").length,o=t.toString(),r=(o.split(".")[1]||"").length;if(r===0&&/\d?e-\d?/.test(o)){let c=o.match(/\d?e-(\d?)/);c?.[1]&&(r=Number.parseInt(c[1]))}let i=n>r?n:r,a=Number.parseInt(e.toFixed(i).replace(".","")),s=Number.parseInt(t.toFixed(i).replace(".",""));return a%s/10**i}var hv=Symbol("evaluating");function B(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==hv)return o===void 0&&(o=hv,o=n()),o},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function $S(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function hr(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function tr(...e){let t={};for(let n of e){let o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}function xS(e){return tr(e._zod.def)}function kS(e,t){return t?t.reduce((n,o)=>n?.[o],e):e}function wS(e){let t=Object.keys(e),n=t.map(o=>e[o]);return Promise.all(n).then(o=>{let r={};for(let i=0;i<t.length;i++)r[t[i]]=o[i];return r})}function SS(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let o=0;o<e;o++)n+=t[Math.floor(Math.random()*t.length)];return n}function Ja(e){return JSON.stringify(e)}function Rd(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Ga="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Vr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Nd=Dn(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function gr(e){if(Vr(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(Vr(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Ba(e){return gr(e)?{...e}:Array.isArray(e)?[...e]:e}function zS(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var IS=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}`)}},Yo=new Set(["string","number","symbol"]),Dd=new Set(["string","number","bigint","boolean","symbol","undefined"]);function vt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function De(e,t,n){let o=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(o._zod.parent=e),o}function w(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 TS(e){let t;return new Proxy({},{get(n,o,r){return t??(t=e()),Reflect.get(t,o,r)},set(n,o,r,i){return t??(t=e()),Reflect.set(t,o,r,i)},has(n,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(n,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(n,o,r){return t??(t=e()),Reflect.defineProperty(t,o,r)}})}function _(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Cd(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var Ad={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]},Ud={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function gv(e,t){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=tr(e._zod.def,{get shape(){let a={};for(let s in t){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(a[s]=n.shape[s])}return hr(this,"shape",a),a},checks:[]});return De(e,i)}function vv(e,t){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=tr(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let s in t){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete a[s]}return hr(this,"shape",a),a},checks:[]});return De(e,i)}function yv(e,t){if(!gr(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let i=e._zod.def.shape;for(let a in t)if(Object.getOwnPropertyDescriptor(i,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=tr(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return hr(this,"shape",i),i}});return De(e,r)}function _v(e,t){if(!gr(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=tr(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return hr(this,"shape",o),o}});return De(e,n)}function PS(e,t){let n=tr(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return hr(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return De(e,n)}function bv(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=tr(t._zod.def,{get shape(){let s=t._zod.def.shape,c={...s};if(n)for(let u in n){if(!(u in s))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(c[u]=e?new e({type:"optional",innerType:s[u]}):s[u])}else for(let u in s)c[u]=e?new e({type:"optional",innerType:s[u]}):s[u];return hr(this,"shape",c),c},checks:[]});return De(t,a)}function $v(e,t,n){let o=tr(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let a in n){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(i[a]=new e({type:"nonoptional",innerType:r[a]}))}else for(let a in r)i[a]=new e({type:"nonoptional",innerType:r[a]});return hr(this,"shape",i),i}});return De(t,o)}function vr(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 ft(e,t){return t.map(n=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function Bo(e){return typeof e=="string"?e:e?.message}function nt(e,t,n){let o={...e,path:e.path??[]};if(!e.message){let r=Bo(e.inst?._zod.def?.error?.(e))??Bo(t?.error?.(e))??Bo(n.customError?.(e))??Bo(n.localeError?.(e))??"Invalid input";o.message=r}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function Qo(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function ei(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function x(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 Cn(...e){let[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}function ES(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function xv(e){let t=atob(e),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}function kv(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function OS(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return xv(t+n)}function jS(e){return kv(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function RS(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 o=0;o<t.length;o+=2)n[o/2]=Number.parseInt(t.slice(o,o+2),16);return n}function NS(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Od=class{constructor(...t){}};var wv=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Nn,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ti=m("$ZodError",wv),ot=m("$ZodError",wv,{Parent:Error});function An(e,t=n=>n.message){let n={},o=[];for(let r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):o.push(t(r));return{formErrors:o,fieldErrors:n}}function Un(e,t=n=>n.message){let n={_errors:[]},o=r=>{for(let i of r.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>o({issues:a}));else if(i.code==="invalid_key")o({issues:i.issues});else if(i.code==="invalid_element")o({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let a=n,s=0;for(;s<i.path.length;){let c=i.path[s];s===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(t(i))):a[c]=a[c]||{_errors:[]},a=a[c],s++}}};return o(e),n}function Ka(e,t=n=>n.message){let n={errors:[]},o=(r,i=[])=>{var a,s;for(let c of r.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>o({issues:u},c.path));else if(c.code==="invalid_key")o({issues:c.issues},c.path);else if(c.code==="invalid_element")o({issues:c.issues},c.path);else{let u=[...i,...c.path];if(u.length===0){n.errors.push(t(c));continue}let l=n,d=0;for(;d<u.length;){let p=u[d],f=d===u.length-1;typeof p=="string"?(l.properties??(l.properties={}),(a=l.properties)[p]??(a[p]={errors:[]}),l=l.properties[p]):(l.items??(l.items=[]),(s=l.items)[p]??(s[p]={errors:[]}),l=l.items[p]),f&&l.errors.push(t(c)),d++}}};return o(e),n}function Sv(e){let t=[],n=e.map(o=>typeof o=="object"?o.key:o);for(let o of n)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}function Xa(e){let t=[],n=[...e.issues].sort((o,r)=>(o.path??[]).length-(r.path??[]).length);for(let o of n)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${Sv(o.path)}`);return t.join(`
|
|
19
|
+
`)}var Zn=e=>(t,n,o,r)=>{let i=o?Object.assign(o,{async:!1}):{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Et;if(a.issues.length){let s=new(r?.Err??e)(a.issues.map(c=>nt(c,i,Se())));throw Ga(s,r?.callee),s}return a.value},Hr=Zn(ot),Mn=e=>async(t,n,o,r)=>{let i=o?Object.assign(o,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(r?.Err??e)(a.issues.map(c=>nt(c,i,Se())));throw Ga(s,r?.callee),s}return a.value},Wr=Mn(ot),Ln=e=>(t,n,o)=>{let r=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},r);if(i instanceof Promise)throw new Et;return i.issues.length?{success:!1,error:new(e??ti)(i.issues.map(a=>nt(a,r,Se())))}:{success:!0,data:i.value}},yr=Ln(ot),qn=e=>async(t,n,o)=>{let r=o?Object.assign(o,{async:!0}):{async:!0},i=t._zod.run({value:n,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(a=>nt(a,r,Se())))}:{success:!0,data:i.value}},_r=qn(ot),Ya=e=>(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Zn(e)(t,n,r)},zv=Ya(ot),Qa=e=>(t,n,o)=>Zn(e)(t,n,o),Iv=Qa(ot),es=e=>async(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Mn(e)(t,n,r)},Tv=es(ot),ts=e=>async(t,n,o)=>Mn(e)(t,n,o),Pv=ts(ot),rs=e=>(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Ln(e)(t,n,r)},Ev=rs(ot),ns=e=>(t,n,o)=>Ln(e)(t,n,o),Ov=ns(ot),os=e=>async(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return qn(e)(t,n,r)},jv=os(ot),is=e=>async(t,n,o)=>qn(e)(t,n,o),Rv=is(ot);var it={};Kt(it,{base64:()=>ep,base64url:()=>as,bigint:()=>ap,boolean:()=>cp,browserEmail:()=>FS,cidrv4:()=>Yd,cidrv6:()=>Qd,cuid:()=>Zd,cuid2:()=>Md,date:()=>rp,datetime:()=>op,domain:()=>WS,duration:()=>Hd,e164:()=>tp,email:()=>Jd,emoji:()=>Gd,extendedDuration:()=>CS,guid:()=>Wd,hex:()=>JS,hostname:()=>HS,html5Email:()=>MS,idnEmail:()=>qS,integer:()=>sp,ipv4:()=>Bd,ipv6:()=>Kd,ksuid:()=>Fd,lowercase:()=>dp,mac:()=>Xd,md5_base64:()=>BS,md5_base64url:()=>KS,md5_hex:()=>GS,nanoid:()=>Vd,null:()=>up,number:()=>ss,rfc5322Email:()=>LS,sha1_base64:()=>YS,sha1_base64url:()=>QS,sha1_hex:()=>XS,sha256_base64:()=>t0,sha256_base64url:()=>r0,sha256_hex:()=>e0,sha384_base64:()=>o0,sha384_base64url:()=>i0,sha384_hex:()=>n0,sha512_base64:()=>s0,sha512_base64url:()=>c0,sha512_hex:()=>a0,string:()=>ip,time:()=>np,ulid:()=>Ld,undefined:()=>lp,unicodeEmail:()=>Nv,uppercase:()=>pp,uuid:()=>Jr,uuid4:()=>AS,uuid6:()=>US,uuid7:()=>ZS,xid:()=>qd});var Zd=/^[cC][^\s-]{8,}$/,Md=/^[0-9a-z]+$/,Ld=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,qd=/^[0-9a-vA-V]{20}$/,Fd=/^[A-Za-z0-9]{27}$/,Vd=/^[a-zA-Z0-9_-]{21}$/,Hd=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,CS=/^[-+]?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)?)??$/,Wd=/^([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})$/,Jr=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)$/,AS=Jr(4),US=Jr(6),ZS=Jr(7),Jd=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,MS=/^[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])?)*$/,LS=/^(([^<>()\[\]\\.,;:\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,}))$/,Nv=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,qS=Nv,FS=/^[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])?)*$/,VS="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Gd(){return new RegExp(VS,"u")}var Bd=/^(?:(?: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])$/,Kd=/^(([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}|:))$/,Xd=e=>{let t=vt(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Yd=/^((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])$/,Qd=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ep=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,as=/^[A-Za-z0-9_-]*$/,HS=/^(?=.{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])?)*\.?$/,WS=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,tp=/^\+[1-9]\d{6,14}$/,Dv="(?:(?:\\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])))",rp=new RegExp(`^${Dv}$`);function Cv(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function np(e){return new RegExp(`^${Cv(e)}$`)}function op(e){let t=Cv({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${n.join("|")})`;return new RegExp(`^${Dv}T(?:${o})$`)}var ip=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},ap=/^-?\d+n?$/,sp=/^-?\d+$/,ss=/^-?\d+(?:\.\d+)?$/,cp=/^(?:true|false)$/i,up=/^null$/i;var lp=/^undefined$/i;var dp=/^[^A-Z]*$/,pp=/^[^a-z]*$/,JS=/^[0-9a-fA-F]*$/;function ri(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function ni(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var GS=/^[0-9a-fA-F]{32}$/,BS=ri(22,"=="),KS=ni(22),XS=/^[0-9a-fA-F]{40}$/,YS=ri(27,"="),QS=ni(27),e0=/^[0-9a-fA-F]{64}$/,t0=ri(43,"="),r0=ni(43),n0=/^[0-9a-fA-F]{96}$/,o0=ri(64,""),i0=ni(64),a0=/^[0-9a-fA-F]{128}$/,s0=ri(86,"=="),c0=ni(86);var fe=m("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Uv={number:"number",bigint:"bigint",object:"date"},cs=m("$ZodCheckLessThan",(e,t)=>{fe.init(e,t);let n=Uv[typeof t.value];e._zod.onattach.push(o=>{let r=o._zod.bag,i=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),us=m("$ZodCheckGreaterThan",(e,t)=>{fe.init(e,t);let n=Uv[typeof t.value];e._zod.onattach.push(o=>{let r=o._zod.bag,i=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),fp=m("$ZodCheckMultipleOf",(e,t)=>{fe.init(e,t),e._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value)}),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"?n.value%t.value===BigInt(0):jd(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})}}),mp=m("$ZodCheckNumberFormat",(e,t)=>{fe.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),o=n?"int":"number",[r,i]=Ad[t.format];e._zod.onattach.push(a=>{let s=a._zod.bag;s.format=t.format,s.minimum=r,s.maximum=i,n&&(s.pattern=sp)}),e._zod.check=a=>{let s=a.value;if(n){if(!Number.isInteger(s)){a.issues.push({expected:o,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:o,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:o,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>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),hp=m("$ZodCheckBigIntFormat",(e,t)=>{fe.init(e,t);let[n,o]=Ud[t.format];e._zod.onattach.push(r=>{let i=r._zod.bag;i.format=t.format,i.minimum=n,i.maximum=o}),e._zod.check=r=>{let i=r.value;i<n&&r.issues.push({origin:"bigint",input:i,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),i>o&&r.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),gp=m("$ZodCheckMaxSize",(e,t)=>{var n;fe.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!mr(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let r=o.value;r.size<=t.maximum||o.issues.push({origin:Qo(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),vp=m("$ZodCheckMinSize",(e,t)=>{var n;fe.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!mr(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let r=o.value;r.size>=t.minimum||o.issues.push({origin:Qo(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),yp=m("$ZodCheckSizeEquals",(e,t)=>{var n;fe.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!mr(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size}),e._zod.check=o=>{let r=o.value,i=r.size;if(i===t.size)return;let a=i>t.size;o.issues.push({origin:Qo(r),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),_p=m("$ZodCheckMaxLength",(e,t)=>{var n;fe.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!mr(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let r=o.value;if(r.length<=t.maximum)return;let a=ei(r);o.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),bp=m("$ZodCheckMinLength",(e,t)=>{var n;fe.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!mr(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let r=o.value;if(r.length>=t.minimum)return;let a=ei(r);o.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),$p=m("$ZodCheckLengthEquals",(e,t)=>{var n;fe.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!mr(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=o=>{let r=o.value,i=r.length;if(i===t.length)return;let a=ei(r),s=i>t.length;o.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Fn=m("$ZodCheckStringFormat",(e,t)=>{var n,o;fe.init(e,t),e._zod.onattach.push(r=>{let i=r._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),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})}):(o=e._zod).check??(o.check=()=>{})}),xp=m("$ZodCheckRegex",(e,t)=>{Fn.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})}}),kp=m("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=dp),Fn.init(e,t)}),wp=m("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=pp),Fn.init(e,t)}),Sp=m("$ZodCheckIncludes",(e,t)=>{fe.init(e,t);let n=vt(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(r=>{let i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),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})}}),zp=m("$ZodCheckStartsWith",(e,t)=>{fe.init(e,t);let n=new RegExp(`^${vt(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),Ip=m("$ZodCheckEndsWith",(e,t)=>{fe.init(e,t);let n=new RegExp(`.*${vt(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});function Av(e,t,n){e.issues.length&&t.issues.push(...ft(n,e.issues))}var Tp=m("$ZodCheckProperty",(e,t)=>{fe.init(e,t),e._zod.check=n=>{let o=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(r=>Av(r,n,t.property));Av(o,n,t.property)}}),Pp=m("$ZodCheckMimeType",(e,t)=>{fe.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime}),e._zod.check=o=>{n.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),Ep=m("$ZodCheckOverwrite",(e,t)=>{fe.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});var oi=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let o=t.split(`
|
|
20
|
+
`).filter(a=>a),r=Math.min(...o.map(a=>a.length-a.trimStart().length)),i=o.map(a=>a.slice(r)).map(a=>" ".repeat(this.indent*2)+a);for(let a of i)this.content.push(a)}compile(){let t=Function,n=this?.args,r=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,r.join(`
|
|
21
|
+
`))}};var Op={major:4,minor:3,patch:6};var q=m("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Op;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let r of o)for(let i of r._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=(a,s,c)=>{let u=vr(a),l;for(let d of s){if(d._zod.def.when){if(!d._zod.def.when(a))continue}else if(u)continue;let p=a.issues.length,f=d._zod.check(a);if(f instanceof Promise&&c?.async===!1)throw new Et;if(l||f instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await f,a.issues.length!==p&&(u||(u=vr(a,p)))});else{if(a.issues.length===p)continue;u||(u=vr(a,p))}}return l?l.then(()=>a):a},i=(a,s,c)=>{if(vr(a))return a.aborted=!0,a;let u=r(s,o,c);if(u instanceof Promise){if(c.async===!1)throw new Et;return u.then(l=>e._zod.parse(l,c))}return e._zod.parse(u,c)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){let u=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return u instanceof Promise?u.then(l=>i(l,a,s)):i(u,a,s)}let c=e._zod.parse(a,s);if(c instanceof Promise){if(s.async===!1)throw new Et;return c.then(u=>r(u,o,s))}return r(c,o,s)}}B(e,"~standard",()=>({validate:r=>{try{let i=yr(e,r);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return _r(e,r).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),br=m("$ZodString",(e,t)=>{q.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ip(e._zod.bag),e._zod.parse=(n,o)=>{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}}),de=m("$ZodStringFormat",(e,t)=>{Fn.init(e,t),br.init(e,t)}),hs=m("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Wd),de.init(e,t)}),gs=m("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Jr(o))}else t.pattern??(t.pattern=Jr());de.init(e,t)}),vs=m("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Jd),de.init(e,t)}),ys=m("$ZodURL",(e,t)=>{de.init(e,t),e._zod.check=n=>{try{let o=n.value.trim(),r=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.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&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=r.href:n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),_s=m("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Gd()),de.init(e,t)}),bs=m("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Vd),de.init(e,t)}),$s=m("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Zd),de.init(e,t)}),xs=m("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Md),de.init(e,t)}),ks=m("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Ld),de.init(e,t)}),ws=m("$ZodXID",(e,t)=>{t.pattern??(t.pattern=qd),de.init(e,t)}),Ss=m("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Fd),de.init(e,t)}),zs=m("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=op(t)),de.init(e,t)}),Is=m("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=rp),de.init(e,t)}),Ts=m("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=np(t)),de.init(e,t)}),Ps=m("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Hd),de.init(e,t)}),Es=m("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Bd),de.init(e,t),e._zod.bag.format="ipv4"}),Os=m("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Kd),de.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),js=m("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Xd(t.delimiter)),de.init(e,t),e._zod.bag.format="mac"}),Rs=m("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Yd),de.init(e,t)}),Ns=m("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Qd),de.init(e,t),e._zod.check=n=>{let o=n.value.split("/");try{if(o.length!==2)throw new Error;let[r,i]=o;if(!i)throw new Error;let a=Number(i);if(`${a}`!==i)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Rp(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Ds=m("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=ep),de.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Rp(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Xv(e){if(!as.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Rp(n)}var Cs=m("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=as),de.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Xv(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),As=m("$ZodE164",(e,t)=>{t.pattern??(t.pattern=tp),de.init(e,t)});function Yv(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[o]=n;if(!o)return!1;let r=JSON.parse(atob(o));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}var Us=m("$ZodJWT",(e,t)=>{de.init(e,t),e._zod.check=n=>{Yv(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Zs=m("$ZodCustomStringFormat",(e,t)=>{de.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})}}),ii=m("$ZodNumber",(e,t)=>{q.init(e,t),e._zod.pattern=e._zod.bag.pattern??ss,e._zod.parse=(n,o)=>{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 i=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...i?{received:i}:{}}),n}}),Ms=m("$ZodNumberFormat",(e,t)=>{mp.init(e,t),ii.init(e,t)}),Vn=m("$ZodBoolean",(e,t)=>{q.init(e,t),e._zod.pattern=cp,e._zod.parse=(n,o)=>{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}}),ai=m("$ZodBigInt",(e,t)=>{q.init(e,t),e._zod.pattern=ap,e._zod.parse=(n,o)=>{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}}),Ls=m("$ZodBigIntFormat",(e,t)=>{hp.init(e,t),ai.init(e,t)}),qs=m("$ZodSymbol",(e,t)=>{q.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n}}),Fs=m("$ZodUndefined",(e,t)=>{q.init(e,t),e._zod.pattern=lp,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(n,o)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}}),Vs=m("$ZodNull",(e,t)=>{q.init(e,t),e._zod.pattern=up,e._zod.values=new Set([null]),e._zod.parse=(n,o)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}}),Hs=m("$ZodAny",(e,t)=>{q.init(e,t),e._zod.parse=n=>n}),Ws=m("$ZodUnknown",(e,t)=>{q.init(e,t),e._zod.parse=n=>n}),Js=m("$ZodNever",(e,t)=>{q.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),Gs=m("$ZodVoid",(e,t)=>{q.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n}}),Bs=m("$ZodDate",(e,t)=>{q.init(e,t),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let r=n.value,i=r instanceof Date;return i&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...i?{received:"Invalid Date"}:{},inst:e}),n}});function Mv(e,t,n){e.issues.length&&t.issues.push(...ft(n,e.issues)),t.value[n]=e.value}var Ks=m("$ZodArray",(e,t)=>{q.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);let i=[];for(let a=0;a<r.length;a++){let s=r[a],c=t.element._zod.run({value:s,issues:[]},o);c instanceof Promise?i.push(c.then(u=>Mv(u,n,a))):Mv(c,n,a)}return i.length?Promise.all(i).then(()=>n):n}});function ms(e,t,n,o,r){if(e.issues.length){if(r&&!(n in o))return;t.issues.push(...ft(n,e.issues))}e.value===void 0?n in o&&(t.value[n]=void 0):t.value[n]=e.value}function Qv(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let n=Cd(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function ey(e,t,n,o,r,i){let a=[],s=r.keySet,c=r.catchall._zod,u=c.def.type,l=c.optout==="optional";for(let d in t){if(s.has(d))continue;if(u==="never"){a.push(d);continue}let p=c.run({value:t[d],issues:[]},o);p instanceof Promise?e.push(p.then(f=>ms(f,n,d,t,l))):ms(p,n,d,t,l)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}var Xs=m("$ZodObject",(e,t)=>{if(q.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let s=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...s};return Object.defineProperty(t,"shape",{value:c}),c}})}let o=Dn(()=>Qv(t));B(e._zod,"propValues",()=>{let s=t.shape,c={};for(let u in s){let l=s[u]._zod;if(l.values){c[u]??(c[u]=new Set);for(let d of l.values)c[u].add(d)}}return c});let r=Vr,i=t.catchall,a;e._zod.parse=(s,c)=>{a??(a=o.value);let u=s.value;if(!r(u))return s.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),s;s.value={};let l=[],d=a.shape;for(let p of a.keys){let f=d[p],g=f._zod.optout==="optional",y=f._zod.run({value:u[p],issues:[]},c);y instanceof Promise?l.push(y.then(S=>ms(S,s,p,u,g))):ms(y,s,p,u,g)}return i?ey(l,u,s,c,o.value,e):l.length?Promise.all(l).then(()=>s):s}}),Np=m("$ZodObjectJIT",(e,t)=>{Xs.init(e,t);let n=e._zod.parse,o=Dn(()=>Qv(t)),r=p=>{let f=new oi(["shape","payload","ctx"]),g=o.value,y=D=>{let V=Ja(D);return`shape[${V}]._zod.run({ value: input[${V}], issues: [] }, ctx)`};f.write("const input = payload.value;");let S=Object.create(null),P=0;for(let D of g.keys)S[D]=`key_${P++}`;f.write("const newResult = {};");for(let D of g.keys){let V=S[D],A=Ja(D),It=p[D]?._zod?.optout==="optional";f.write(`const ${V} = ${y(D)};`),It?f.write(`
|
|
22
|
+
if (${V}.issues.length) {
|
|
23
|
+
if (${A} in input) {
|
|
24
|
+
payload.issues = payload.issues.concat(${V}.issues.map(iss => ({
|
|
25
|
+
...iss,
|
|
26
|
+
path: iss.path ? [${A}, ...iss.path] : [${A}]
|
|
27
|
+
})));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (${V}.value === undefined) {
|
|
32
|
+
if (${A} in input) {
|
|
33
|
+
newResult[${A}] = undefined;
|
|
34
|
+
}
|
|
35
|
+
} else {
|
|
36
|
+
newResult[${A}] = ${V}.value;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
`):f.write(`
|
|
40
|
+
if (${V}.issues.length) {
|
|
41
|
+
payload.issues = payload.issues.concat(${V}.issues.map(iss => ({
|
|
42
|
+
...iss,
|
|
43
|
+
path: iss.path ? [${A}, ...iss.path] : [${A}]
|
|
44
|
+
})));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (${V}.value === undefined) {
|
|
48
|
+
if (${A} in input) {
|
|
49
|
+
newResult[${A}] = undefined;
|
|
50
|
+
}
|
|
51
|
+
} else {
|
|
52
|
+
newResult[${A}] = ${V}.value;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
`)}f.write("payload.value = newResult;"),f.write("return payload;");let Z=f.compile();return(D,V)=>Z(p,D,V)},i,a=Vr,s=!Jo.jitless,u=s&&Nd.value,l=t.catchall,d;e._zod.parse=(p,f)=>{d??(d=o.value);let g=p.value;return a(g)?s&&u&&f?.async===!1&&f.jitless!==!0?(i||(i=r(t.shape)),p=i(p,f),l?ey([],g,p,f,d,e):p):n(p,f):(p.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),p)}});function Lv(e,t,n,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let r=e.filter(i=>!vr(i));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(i=>i.issues.map(a=>nt(a,o,Se())))}),t)}var Hn=m("$ZodUnion",(e,t)=>{q.init(e,t),B(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),B(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),B(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),B(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){let r=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${r.map(i=>Xo(i.source)).join("|")})$`)}});let n=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(r,i)=>{if(n)return o(r,i);let a=!1,s=[];for(let c of t.options){let u=c._zod.run({value:r.value,issues:[]},i);if(u instanceof Promise)s.push(u),a=!0;else{if(u.issues.length===0)return u;s.push(u)}}return a?Promise.all(s).then(c=>Lv(c,r,e,i)):Lv(s,r,e,i)}});function qv(e,t,n,o){let r=e.filter(i=>i.issues.length===0);return r.length===1?(t.value=r[0].value,t):(r.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(a=>nt(a,o,Se())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}var Ys=m("$ZodXor",(e,t)=>{Hn.init(e,t),t.inclusive=!1;let n=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(r,i)=>{if(n)return o(r,i);let a=!1,s=[];for(let c of t.options){let u=c._zod.run({value:r.value,issues:[]},i);u instanceof Promise?(s.push(u),a=!0):s.push(u)}return a?Promise.all(s).then(c=>qv(c,r,e,i)):qv(s,r,e,i)}}),Qs=m("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Hn.init(e,t);let n=e._zod.parse;B(e._zod,"propValues",()=>{let r={};for(let i of t.options){let a=i._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[s,c]of Object.entries(a)){r[s]||(r[s]=new Set);for(let u of c)r[s].add(u)}}return r});let o=Dn(()=>{let r=t.options,i=new Map;for(let a of r){let s=a._zod.propValues?.[t.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let c of s){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,a)}}return i});e._zod.parse=(r,i)=>{let a=r.value;if(!Vr(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;let s=o.value.get(a?.[t.discriminator]);return s?s._zod.run(r,i):t.unionFallback?n(r,i):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:a,path:[t.discriminator],inst:e}),r)}}),ec=m("$ZodIntersection",(e,t)=>{q.init(e,t),e._zod.parse=(n,o)=>{let r=n.value,i=t.left._zod.run({value:r,issues:[]},o),a=t.right._zod.run({value:r,issues:[]},o);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([c,u])=>Fv(n,c,u)):Fv(n,i,a)}});function jp(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(gr(e)&&gr(t)){let n=Object.keys(t),o=Object.keys(e).filter(i=>n.indexOf(i)!==-1),r={...e,...t};for(let i of o){let a=jp(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};r[i]=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 o=0;o<e.length;o++){let r=e[o],i=t[o],a=jp(r,i);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Fv(e,t,n){let o=new Map,r;for(let s of t.issues)if(s.code==="unrecognized_keys"){r??(r=s);for(let c of s.keys)o.has(c)||o.set(c,{}),o.get(c).l=!0}else e.issues.push(s);for(let s of n.issues)if(s.code==="unrecognized_keys")for(let c of s.keys)o.has(c)||o.set(c,{}),o.get(c).r=!0;else e.issues.push(s);let i=[...o].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(i.length&&r&&e.issues.push({...r,keys:i}),vr(e))return e;let a=jp(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}var si=m("$ZodTuple",(e,t)=>{q.init(e,t);let n=t.items;e._zod.parse=(o,r)=>{let i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];let a=[],s=[...n].reverse().findIndex(l=>l._zod.optin!=="optional"),c=s===-1?0:n.length-s;if(!t.rest){let l=i.length>n.length,d=i.length<c-1;if(l||d)return o.issues.push({...l?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:i,inst:e,origin:"array"}),o}let u=-1;for(let l of n){if(u++,u>=i.length&&u>=c)continue;let d=l._zod.run({value:i[u],issues:[]},r);d instanceof Promise?a.push(d.then(p=>ls(p,o,u))):ls(d,o,u)}if(t.rest){let l=i.slice(n.length);for(let d of l){u++;let p=t.rest._zod.run({value:d,issues:[]},r);p instanceof Promise?a.push(p.then(f=>ls(f,o,u))):ls(p,o,u)}}return a.length?Promise.all(a).then(()=>o):o}});function ls(e,t,n){e.issues.length&&t.issues.push(...ft(n,e.issues)),t.value[n]=e.value}var tc=m("$ZodRecord",(e,t)=>{q.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!gr(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let i=[],a=t.keyType._zod.values;if(a){n.value={};let s=new Set;for(let u of a)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){s.add(typeof u=="number"?u.toString():u);let l=t.valueType._zod.run({value:r[u],issues:[]},o);l instanceof Promise?i.push(l.then(d=>{d.issues.length&&n.issues.push(...ft(u,d.issues)),n.value[u]=d.value})):(l.issues.length&&n.issues.push(...ft(u,l.issues)),n.value[u]=l.value)}let c;for(let u in r)s.has(u)||(c=c??[],c.push(u));c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:c})}else{n.value={};for(let s of Reflect.ownKeys(r)){if(s==="__proto__")continue;let c=t.keyType._zod.run({value:s,issues:[]},o);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&ss.test(s)&&c.issues.length){let d=t.keyType._zod.run({value:Number(s),issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(c=d)}if(c.issues.length){t.mode==="loose"?n.value[s]=r[s]:n.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(d=>nt(d,o,Se())),input:s,path:[s],inst:e});continue}let l=t.valueType._zod.run({value:r[s],issues:[]},o);l instanceof Promise?i.push(l.then(d=>{d.issues.length&&n.issues.push(...ft(s,d.issues)),n.value[c.value]=d.value})):(l.issues.length&&n.issues.push(...ft(s,l.issues)),n.value[c.value]=l.value)}}return i.length?Promise.all(i).then(()=>n):n}}),rc=m("$ZodMap",(e,t)=>{q.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;let i=[];n.value=new Map;for(let[a,s]of r){let c=t.keyType._zod.run({value:a,issues:[]},o),u=t.valueType._zod.run({value:s,issues:[]},o);c instanceof Promise||u instanceof Promise?i.push(Promise.all([c,u]).then(([l,d])=>{Vv(l,d,n,a,r,e,o)})):Vv(c,u,n,a,r,e,o)}return i.length?Promise.all(i).then(()=>n):n}});function Vv(e,t,n,o,r,i,a){e.issues.length&&(Yo.has(typeof o)?n.issues.push(...ft(o,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:i,issues:e.issues.map(s=>nt(s,a,Se()))})),t.issues.length&&(Yo.has(typeof o)?n.issues.push(...ft(o,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:i,key:o,issues:t.issues.map(s=>nt(s,a,Se()))})),n.value.set(e.value,t.value)}var nc=m("$ZodSet",(e,t)=>{q.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;let i=[];n.value=new Set;for(let a of r){let s=t.valueType._zod.run({value:a,issues:[]},o);s instanceof Promise?i.push(s.then(c=>Hv(c,n))):Hv(s,n)}return i.length?Promise.all(i).then(()=>n):n}});function Hv(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var oc=m("$ZodEnum",(e,t)=>{q.init(e,t);let n=Ko(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(r=>Yo.has(typeof r)).map(r=>typeof r=="string"?vt(r):r.toString()).join("|")})$`),e._zod.parse=(r,i)=>{let a=r.value;return o.has(a)||r.issues.push({code:"invalid_value",values:n,input:a,inst:e}),r}}),ic=m("$ZodLiteral",(e,t)=>{if(q.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?vt(o):o?vt(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,r)=>{let i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),ac=m("$ZodFile",(e,t)=>{q.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n}}),sc=m("$ZodTransform",(e,t)=>{q.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new fr(e.constructor.name);let r=t.transform(n.value,n);if(o.async)return(r instanceof Promise?r:Promise.resolve(r)).then(a=>(n.value=a,n));if(r instanceof Promise)throw new Et;return n.value=r,n}});function Wv(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var ci=m("$ZodOptional",(e,t)=>{q.init(e,t),e._zod.optin="optional",e._zod.optout="optional",B(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),B(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Xo(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>Wv(i,n.value)):Wv(r,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,o)}}),cc=m("$ZodExactOptional",(e,t)=>{ci.init(e,t),B(e._zod,"values",()=>t.innerType._zod.values),B(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),uc=m("$ZodNullable",(e,t)=>{q.init(e,t),B(e._zod,"optin",()=>t.innerType._zod.optin),B(e._zod,"optout",()=>t.innerType._zod.optout),B(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Xo(n.source)}|null)$`):void 0}),B(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>n.value===null?n:t.innerType._zod.run(n,o)}),lc=m("$ZodDefault",(e,t)=>{q.init(e,t),e._zod.optin="optional",B(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>Jv(i,t)):Jv(r,t)}});function Jv(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var dc=m("$ZodPrefault",(e,t)=>{q.init(e,t),e._zod.optin="optional",B(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>(o.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,o))}),pc=m("$ZodNonOptional",(e,t)=>{q.init(e,t),B(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>Gv(i,e)):Gv(r,e)}});function Gv(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 fc=m("$ZodSuccess",(e,t)=>{q.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new fr("ZodSuccess");let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>(n.value=i.issues.length===0,n)):(n.value=r.issues.length===0,n)}}),mc=m("$ZodCatch",(e,t)=>{q.init(e,t),B(e._zod,"optin",()=>t.innerType._zod.optin),B(e._zod,"optout",()=>t.innerType._zod.optout),B(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(a=>nt(a,o,Se()))},input:n.value}),n.issues=[]),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(i=>nt(i,o,Se()))},input:n.value}),n.issues=[]),n)}}),hc=m("$ZodNaN",(e,t)=>{q.init(e,t),e._zod.parse=(n,o)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),gc=m("$ZodPipe",(e,t)=>{q.init(e,t),B(e._zod,"values",()=>t.in._zod.values),B(e._zod,"optin",()=>t.in._zod.optin),B(e._zod,"optout",()=>t.out._zod.optout),B(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(n,o);return i instanceof Promise?i.then(a=>ds(a,t.in,o)):ds(i,t.in,o)}let r=t.in._zod.run(n,o);return r instanceof Promise?r.then(i=>ds(i,t.out,o)):ds(r,t.out,o)}});function ds(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Wn=m("$ZodCodec",(e,t)=>{q.init(e,t),B(e._zod,"values",()=>t.in._zod.values),B(e._zod,"optin",()=>t.in._zod.optin),B(e._zod,"optout",()=>t.out._zod.optout),B(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(n,o);return i instanceof Promise?i.then(a=>ps(a,t,o)):ps(i,t,o)}else{let i=t.out._zod.run(n,o);return i instanceof Promise?i.then(a=>ps(a,t,o)):ps(i,t,o)}}});function ps(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(i=>fs(e,i,t.out,n)):fs(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(i=>fs(e,i,t.in,n)):fs(e,r,t.in,n)}}function fs(e,t,n,o){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},o)}var vc=m("$ZodReadonly",(e,t)=>{q.init(e,t),B(e._zod,"propValues",()=>t.innerType._zod.propValues),B(e._zod,"values",()=>t.innerType._zod.values),B(e._zod,"optin",()=>t.innerType?._zod?.optin),B(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(Bv):Bv(r)}});function Bv(e){return e.value=Object.freeze(e.value),e}var yc=m("$ZodTemplateLiteral",(e,t)=>{q.init(e,t);let n=[];for(let o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let r=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!r)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=r.startsWith("^")?1:0,a=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(i,a))}else if(o===null||Dd.has(typeof o))n.push(vt(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(o,r)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"string",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o)}),_c=m("$ZodFunction",(e,t)=>(q.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...o){let r=e._def.input?Hr(e._def.input,o):o,i=Reflect.apply(n,this,r);return e._def.output?Hr(e._def.output,i):i}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let r=e._def.input?await Wr(e._def.input,o):o,i=await Reflect.apply(n,this,r);return e._def.output?await Wr(e._def.output,i):i}},e._zod.parse=(n,o)=>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 o=e.constructor;return Array.isArray(n[0])?new o({type:"function",input:new si({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new o({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:n})},e)),bc=m("$ZodPromise",(e,t)=>{q.init(e,t),e._zod.parse=(n,o)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},o))}),$c=m("$ZodLazy",(e,t)=>{q.init(e,t),B(e._zod,"innerType",()=>t.getter()),B(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),B(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),B(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),B(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,o)=>e._zod.innerType._zod.run(n,o)}),xc=m("$ZodCustom",(e,t)=>{fe.init(e,t),q.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=n=>{let o=n.value,r=t.fn(o);if(r instanceof Promise)return r.then(i=>Kv(i,n,o,e));Kv(r,n,o,e)}});function Kv(e,t,n,o){if(!e){let r={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(r.params=o._zod.def.params),t.issues.push(Cn(r))}}var Gn={};Kt(Gn,{ar:()=>ty,az:()=>ry,be:()=>oy,bg:()=>iy,ca:()=>ay,cs:()=>sy,da:()=>cy,de:()=>uy,en:()=>kc,eo:()=>ly,es:()=>dy,fa:()=>py,fi:()=>fy,fr:()=>my,frCA:()=>hy,he:()=>gy,hu:()=>vy,hy:()=>_y,id:()=>by,is:()=>$y,it:()=>xy,ja:()=>ky,ka:()=>wy,kh:()=>Sy,km:()=>wc,ko:()=>zy,lt:()=>Ty,mk:()=>Py,ms:()=>Ey,nl:()=>Oy,no:()=>jy,ota:()=>Ry,pl:()=>Dy,ps:()=>Ny,pt:()=>Cy,ru:()=>Uy,sl:()=>Zy,sv:()=>My,ta:()=>Ly,th:()=>qy,tr:()=>Fy,ua:()=>Vy,uk:()=>Sc,ur:()=>Hy,uz:()=>Wy,vi:()=>Jy,yo:()=>Ky,zhCN:()=>Gy,zhTW:()=>By});var l0=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(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",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[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 ${i}\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 ${_(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: ${v(r.values,"|")}`;case"too_big":{let i=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"} ${i} ${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"} ${i} ${r.maximum.toString()}`}case"too_small":{let i=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 ${i} ${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 ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${r.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${n[i.format]??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":""}: ${v(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 ty(){return{localeError:l0()}}var d0=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(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",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[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 ${i}, daxil olan ${s}`}case"invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${_(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${v(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${i}${r.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${i}${r.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[i.format]??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":""}: ${v(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 ry(){return{localeError:d0()}}function ny(e,t,n,o){let r=Math.abs(e),i=r%10,a=r%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?n:o}var p0=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(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",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},o={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[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 ${i}, \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 ${_(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 ${v(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),c=ny(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} ${i}${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 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),c=ny(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} ${i}${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 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[i.format]??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"}: ${v(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 oy(){return{localeError:p0()}}var f0=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(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",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[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 ${i}, \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 ${_(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 ${v(r.values,"|")}`;case"too_big":{let i=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 ${i}${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 ${i}${r.maximum.toString()}`}case"too_small":{let i=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 ${i}${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 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${i.prefix}"`;if(i.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${i.suffix}"`;if(i.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${i.includes}"`;if(i.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${i.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${n[i.format]??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":""}: ${v(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 iy(){return{localeError:f0()}}var m0=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(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",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[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 ${i}, s'ha rebut ${s}`}case"invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${_(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${v(r.values," o ")}`;case"too_big":{let i=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 ${i} ${r.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(r.origin);return a?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${i} ${r.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${n[i.format]??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":""}: ${v(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 ay(){return{localeError:m0()}}var h0=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(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",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},o={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[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 ${i}, obdr\u017Eeno ${s}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${_(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${v(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${i}${r.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${i}${r.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${n[i.format]??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: ${v(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 sy(){return{localeError:h0()}}var g0=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{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-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldigt input: forventede instanceof ${r.expected}, fik ${s}`:`Ugyldigt input: forventede ${i}, fik ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig v\xE6rdi: forventede ${_(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${v(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin),s=o[r.origin]??r.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${i} ${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin),s=o[r.origin]??r.origin;return a?`For lille: forventede ${s} ${a.verb} ${i} ${r.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${n[i.format]??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"}: ${v(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 cy(){return{localeError:g0()}}var v0=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(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",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},o={nan:"NaN",number:"Zahl",array:"Array"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${s}`}case"invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${_(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${v(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${i}${r.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${i}${r.maximum.toString()} ist`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ist`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${n[i.format]??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"}: ${v(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 uy(){return{localeError:v0()}}var y0=()=>{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(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",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[a]??a;return`Invalid input: expected ${i}, received ${s}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${_(r.values[0])}`:`Invalid option: expected one of ${v(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Too big: expected ${r.origin??"value"} to have ${i}${r.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Too small: expected ${r.origin} to have ${i}${r.minimum.toString()} ${a.unit}`:`Too small: expected ${r.origin} to be ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${n[i.format]??r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${v(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}};function kc(){return{localeError:y0()}}var _0=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{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",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${r.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${s}`}case"invalid_value":return r.values.length===1?`Nevalida enigo: atendi\u011Dis ${_(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${v(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${i}${r.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Tro malgranda: atendi\u011Dis ke ${r.origin} havu ${i}${r.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${r.origin} estu ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${n[i.format]??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":""}: ${v(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 ly(){return{localeError:_0()}}var b0=()=>{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",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${r.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${s}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: se esperaba ${_(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${v(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin),s=o[r.origin]??r.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${i}${r.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin),s=o[r.origin]??r.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${i}${r.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${n[i.format]??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":""}: ${v(r.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${o[r.origin]??r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${o[r.origin]??r.origin}`;default:return"Entrada inv\xE1lida"}}};function dy(){return{localeError:b0()}}var $0=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(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",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[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 ${i} \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 ${_(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 ${v(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=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 ${i}${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 ${i}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[i.format]??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: ${v(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 py(){return{localeError:$0()}}var x0=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(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",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${s}`}case"invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${_(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${v(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${i}${r.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${i}${r.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${n[i.format]??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"}: ${v(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 fy(){return{localeError:x0()}}var k0=()=>{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:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={nan:"NaN",number:"nombre",array:"tableau"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : instanceof ${r.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${s} re\xE7u`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${_(r.values[0])} attendu`:`Option invalide : une valeur parmi ${v(r.values,"|")} attendue`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Trop grand : ${r.origin??"valeur"} doit ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${r.origin??"valeur"} doit \xEAtre ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Trop petit : ${r.origin} doit ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`:`Trop petit : ${r.origin} doit \xEAtre ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${n[i.format]??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":""} : ${v(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 my(){return{localeError:k0()}}var w0=()=>{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:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : attendu instanceof ${r.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${s}`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${_(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${v(r.values,"|")}`;case"too_big":{let i=r.inclusive?"\u2264":"<",a=t(r.origin);return a?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${i}${r.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"\u2265":">",a=t(r.origin);return a?`Trop petit : attendu que ${r.origin} ait ${i}${r.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${r.origin} soit ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${n[i.format]??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":""} : ${v(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 hy(){return{localeError:w0()}}var S0=()=>{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,o=u=>{let l=n(u);return l?l.label:u??e.unknown.label},r=u=>`\u05D4${o(u)}`,i=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"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},c={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let l=u.expected,d=c[l??""]??o(l),p=x(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 ${_(u.values[0])}`;let l=u.values.map(f=>_(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 g=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 ${g}`}if(u.origin==="array"||u.origin==="set"){let g=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",y=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} ${g} \u05DC\u05D4\u05DB\u05D9\u05DC ${y}`.trim()}let p=u.inclusive?"<=":"<",f=i(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 g=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 ${g}`}if(u.origin==="array"||u.origin==="set"){let g=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(u.minimum===1&&u.inclusive){let S=(u.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${g} \u05DC\u05D4\u05DB\u05D9\u05DC ${S}`}let y=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} ${g} \u05DC\u05D4\u05DB\u05D9\u05DC ${y}`.trim()}let p=u.inclusive?">=":">",f=i(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,g=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${p} \u05DC\u05D0 ${g}`}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"}: ${v(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 gy(){return{localeError:S0()}}var z0=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{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",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},o={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[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 ${i}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${_(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${v(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${r.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${i}${r.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[i.format]??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":""}: ${v(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 vy(){return{localeError:z0()}}function yy(e,t,n){return Math.abs(e)===1?t:n}function Jn(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 I0=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(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",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},o={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[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 ${i}, \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 ${_(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 ${v(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),c=yy(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 ${Jn(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${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 ${Jn(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),c=yy(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 ${Jn(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${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 ${Jn(r.origin)} \u056C\u056B\u0576\u056B ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[i.format]??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":""}. ${v(r.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Jn(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 ${Jn(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function _y(){return{localeError:I0()}}var T0=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{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",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${i}, diterima ${s}`}case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${_(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${v(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${i}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: diharapkan ${r.origin} memiliki ${i}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${n[i.format]??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":""}: ${v(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 by(){return{localeError:T0()}}var P0=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(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",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},o={nan:"NaN",number:"n\xFAmer",array:"fylki"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[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 ${i}`}case"invalid_value":return r.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${_(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${v(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} hafi ${i}${r.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} s\xE9 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} hafi ${i}${r.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} s\xE9 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${n[i.format]??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"}: ${v(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 $y(){return{localeError:P0()}}var E0=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{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",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"numero",array:"vettore"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Input non valido: atteso instanceof ${r.expected}, ricevuto ${s}`:`Input non valido: atteso ${i}, ricevuto ${s}`}case"invalid_value":return r.values.length===1?`Input non valido: atteso ${_(r.values[0])}`:`Opzione non valida: atteso uno tra ${v(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Troppo grande: ${r.origin??"valore"} deve avere ${i}${r.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Troppo piccolo: ${r.origin} deve avere ${i}${r.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${r.origin} deve essere ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Invalid ${n[i.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"}: ${v(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 xy(){return{localeError:E0()}}var O0=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(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",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},o={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[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: ${i}\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: ${_(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${v(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=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"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=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}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[i.format]??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":""}: ${v(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 ky(){return{localeError:O0()}}var j0=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(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",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 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},o={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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 i=o[r.expected]??r.expected,a=x(r.input),s=o[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 ${i}, \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 ${_(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 ${v(r.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=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} ${i}${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 ${i}${r.maximum.toString()}`}case"too_small":{let i=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} ${i}${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 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.prefix}"-\u10D8\u10D7`:i.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.suffix}"-\u10D8\u10D7`:i.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${i.includes}"-\u10E1`:i.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[i.format]??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"}: ${v(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 wy(){return{localeError:j0()}}var R0=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(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",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},o={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[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 ${i} \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 ${_(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 ${v(r.values,"|")}`;case"too_big":{let i=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"} ${i} ${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"} ${i} ${r.maximum.toString()}`}case"too_small":{let i=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} ${i} ${r.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[i.format]??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 ${v(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 wc(){return{localeError:R0()}}function Sy(){return wc()}var N0=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(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",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[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 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${_(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${v(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=i==="\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} ${i}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${i}${a}`}case"too_small":{let i=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=i==="\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} ${i}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${i}${a}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[i.format]??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: ${v(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 zy(){return{localeError:N0()}}var ui=e=>e.charAt(0).toUpperCase()+e.slice(1);function Iy(e){let t=Math.abs(e),n=t%10,o=t%100;return o>=11&&o<=19||n===0?"many":n===1?"one":"few"}var D0=()=>{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,i,a,s){let c=e[r]??null;return c===null?c:{unit:c.unit[i],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",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},o={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${r.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${i}`}case"invalid_value":return r.values.length===1?`Privalo b\u016Bti ${_(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${v(r.values,"|")} pasirinkim\u0173`;case"too_big":{let i=o[r.origin]??r.origin,a=t(r.origin,Iy(Number(r.maximum)),r.inclusive??!1,"smaller");if(a?.verb)return`${ui(i??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`${ui(i??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${r.maximum.toString()} ${a?.unit}`}case"too_small":{let i=o[r.origin]??r.origin,a=t(r.origin,Iy(Number(r.minimum)),r.inclusive??!1,"bigger");if(a?.verb)return`${ui(i??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`${ui(i??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${r.minimum.toString()} ${a?.unit}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${n[i.format]??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"}: ${v(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=o[r.origin]??r.origin;return`${ui(i??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function Ty(){return{localeError:D0()}}var C0=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(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",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},o={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[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 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${_(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 ${v(r.values,"|")}`;case"too_big":{let i=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 ${i}${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 ${i}${r.maximum.toString()}`}case"too_small":{let i=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 ${i}${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 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${n[i.format]??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"}: ${v(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 Py(){return{localeError:C0()}}var A0=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{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",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"nombor"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${s}`:`Input tidak sah: dijangka ${i}, diterima ${s}`}case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${_(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${v(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: dijangka ${r.origin??"nilai"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: dijangka ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${n[i.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${v(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 Ey(){return{localeError:A0()}}var U0=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{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",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},o={nan:"NaN",number:"getal"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${i}, ontving ${s}`}case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${_(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${v(r.values,"|")}`;case"too_big":{let i=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"} ${i}${r.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${r.origin??"waarde"} ${i}${r.maximum.toString()} is`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin),s=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${r.origin} ${i}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${r.origin} ${i}${r.minimum.toString()} is`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${n[i.format]??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":""}: ${v(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 Oy(){return{localeError:U0()}}var Z0=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(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-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"tall",array:"liste"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventet instanceof ${r.expected}, fikk ${s}`:`Ugyldig input: forventet ${i}, fikk ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${_(r.values[0])}`:`Ugyldig valg: forventet en av ${v(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${i}${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`For lite(n): forventet ${r.origin} til \xE5 ha ${i}${r.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${n[i.format]??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"}: ${v(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 jy(){return{localeError:Z0()}}var M0=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(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",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`F\xE2sit giren: umulan instanceof ${r.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${s}`}case"invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${_(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${v(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${i}${r.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${i}${r.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${i}${r.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${i}${r.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=r;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[i.format]??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":""}: ${v(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 Ry(){return{localeError:M0()}}var L0=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(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",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[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 ${i} \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 ${_(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${v(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=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 ${i}${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 ${i}${r.maximum.toString()} \u0648\u064A`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[i.format]??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"}: ${v(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 Ny(){return{localeError:L0()}}var q0=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(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",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},o={nan:"NaN",number:"liczba",array:"tablica"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[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 ${i}, otrzymano ${s}`}case"invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${_(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${v(r.values,"|")}`;case"too_big":{let i=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 ${i}${r.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${r.maximum.toString()}`}case"too_small":{let i=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 ${i}${r.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[i.format]??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":""}: ${v(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 Dy(){return{localeError:q0()}}var F0=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(r){return e[r]??null}let n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",number:"n\xFAmero",null:"nulo"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Tipo inv\xE1lido: esperado instanceof ${r.expected}, recebido ${s}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${s}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: esperado ${_(r.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${v(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Muito grande: esperado que ${r.origin??"valor"} tivesse ${i}${r.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${r.origin??"valor"} fosse ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Muito pequeno: esperado que ${r.origin} tivesse ${i}${r.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${r.origin} fosse ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${n[i.format]??r.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${v(r.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${r.origin}`;default:return"Campo inv\xE1lido"}}};function Cy(){return{localeError:F0()}}function Ay(e,t,n,o){let r=Math.abs(e),i=r%10,a=r%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?n:o}var V0=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(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",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[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 ${i}, \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 ${_(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 ${v(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),c=Ay(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 ${i}${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 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),c=Ay(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 ${i}${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 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[i.format]??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":""}: ${v(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 Uy(){return{localeError:V0()}}var H0=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{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",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},o={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${r.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${s}`}case"invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${_(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${v(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${i}${r.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${i}${r.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${n[i.format]??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"}: ${v(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 Zy(){return{localeError:H0()}}var W0=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(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-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},o={nan:"NaN",number:"antal",array:"lista"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${r.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${s}`}case"invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${_(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${v(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${n[i.format]??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"}: ${v(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 My(){return{localeError:W0()}}var J0=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(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",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[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 ${i}, \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 ${_(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 ${v(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=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"} ${i}${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"} ${i}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=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} ${i}${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} ${i}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[i.format]??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":""}: ${v(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 Ly(){return{localeError:J0()}}var G0=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(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",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},o={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[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 ${i} \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 ${_(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 ${v(r.values,"|")}`;case"too_big":{let i=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${i} ${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${i} ${r.maximum.toString()}`}case"too_small":{let i=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${i} ${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${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[i.format]??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: ${v(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 qy(){return{localeError:G0()}}var B0=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(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",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${r.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${s}`}case"invalid_value":return r.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${_(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${v(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${i}${r.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${i}${r.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[i.format]??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":""}: ${v(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 Fy(){return{localeError:B0()}}var K0=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(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",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[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 ${i}, \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 ${_(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 ${v(r.values,"|")}`;case"too_big":{let i=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} ${i}${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 ${i}${r.maximum.toString()}`}case"too_small":{let i=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} ${i}${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 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[i.format]??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":""}: ${v(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 Sc(){return{localeError:K0()}}function Vy(){return Sc()}var X0=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(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",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},o={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[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: ${i} \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: ${_(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${v(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${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 ${i}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${i}${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 ${i}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[i.format]??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":""}: ${v(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 Hy(){return{localeError:X0()}}var Y0=()=>{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"}};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",jwt:"JWT",template_literal:"kirish"},o={nan:"NaN",number:"raqam",array:"massiv"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${s}`}case"invalid_value":return r.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${_(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${v(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Juda katta: kutilgan ${r.origin??"qiymat"} ${i}${r.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${r.origin??"qiymat"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Juda kichik: kutilgan ${r.origin} ${i}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[i.format]??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":""}: ${v(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 Wy(){return{localeError:Y0()}}var Q0=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(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",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},o={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[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 ${i}, 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 ${_(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 ${v(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${n[i.format]??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: ${v(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 Jy(){return{localeError:Q0()}}var ez=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(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",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},o={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[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 ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${_(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${v(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${i}${r.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${i}${r.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${n[i.format]??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): ${v(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 Gy(){return{localeError:ez()}}var tz=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(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",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[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 ${i}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${_(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${v(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${i}${r.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${i}${r.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${n[i.format]??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${v(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 By(){return{localeError:tz()}}var rz=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(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",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},o={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=x(r.input),s=o[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 ${i}, \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 ${_(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${v(r.values,"|")}`;case"too_big":{let i=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} ${i}${r.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${r.maximum}`}case"too_small":{let i=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} ${i}${r.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${r.minimum}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${n[i.format]??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: ${v(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 Ky(){return{localeError:rz()}}var Xy,Ic=Symbol("ZodOutput"),Tc=Symbol("ZodInput"),zc=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let o=n[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let 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 o={...this.get(n)??{}};delete o.id;let r={...o,...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 li(){return new zc}(Xy=globalThis).__zod_globalRegistry??(Xy.__zod_globalRegistry=li());var Ce=globalThis.__zod_globalRegistry;function Pc(e,t){return new e({type:"string",...w(t)})}function Ec(e,t){return new e({type:"string",coerce:!0,...w(t)})}function di(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...w(t)})}function Bn(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...w(t)})}function pi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...w(t)})}function fi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...w(t)})}function mi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...w(t)})}function hi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...w(t)})}function Kn(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...w(t)})}function gi(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...w(t)})}function vi(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...w(t)})}function yi(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...w(t)})}function _i(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...w(t)})}function bi(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...w(t)})}function $i(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...w(t)})}function xi(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...w(t)})}function ki(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...w(t)})}function wi(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...w(t)})}function Oc(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...w(t)})}function Si(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...w(t)})}function zi(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...w(t)})}function Ii(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...w(t)})}function Ti(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...w(t)})}function Pi(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...w(t)})}function Ei(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...w(t)})}var jc={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Rc(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...w(t)})}function Nc(e,t){return new e({type:"string",format:"date",check:"string_format",...w(t)})}function Dc(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...w(t)})}function Cc(e,t){return new e({type:"string",format:"duration",check:"string_format",...w(t)})}function Ac(e,t){return new e({type:"number",checks:[],...w(t)})}function Uc(e,t){return new e({type:"number",coerce:!0,checks:[],...w(t)})}function Zc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...w(t)})}function Mc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...w(t)})}function Lc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...w(t)})}function qc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...w(t)})}function Fc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...w(t)})}function Vc(e,t){return new e({type:"boolean",...w(t)})}function Hc(e,t){return new e({type:"boolean",coerce:!0,...w(t)})}function Wc(e,t){return new e({type:"bigint",...w(t)})}function Jc(e,t){return new e({type:"bigint",coerce:!0,...w(t)})}function Gc(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...w(t)})}function Bc(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...w(t)})}function Kc(e,t){return new e({type:"symbol",...w(t)})}function Xc(e,t){return new e({type:"undefined",...w(t)})}function Yc(e,t){return new e({type:"null",...w(t)})}function Qc(e){return new e({type:"any"})}function eu(e){return new e({type:"unknown"})}function tu(e,t){return new e({type:"never",...w(t)})}function ru(e,t){return new e({type:"void",...w(t)})}function nu(e,t){return new e({type:"date",...w(t)})}function ou(e,t){return new e({type:"date",coerce:!0,...w(t)})}function iu(e,t){return new e({type:"nan",...w(t)})}function Ot(e,t){return new cs({check:"less_than",...w(t),value:e,inclusive:!1})}function Ke(e,t){return new cs({check:"less_than",...w(t),value:e,inclusive:!0})}function jt(e,t){return new us({check:"greater_than",...w(t),value:e,inclusive:!1})}function Ue(e,t){return new us({check:"greater_than",...w(t),value:e,inclusive:!0})}function Oi(e){return jt(0,e)}function ji(e){return Ot(0,e)}function Ri(e){return Ke(0,e)}function Ni(e){return Ue(0,e)}function rr(e,t){return new fp({check:"multiple_of",...w(t),value:e})}function nr(e,t){return new gp({check:"max_size",...w(t),maximum:e})}function Rt(e,t){return new vp({check:"min_size",...w(t),minimum:e})}function $r(e,t){return new yp({check:"size_equals",...w(t),size:e})}function xr(e,t){return new _p({check:"max_length",...w(t),maximum:e})}function qt(e,t){return new bp({check:"min_length",...w(t),minimum:e})}function kr(e,t){return new $p({check:"length_equals",...w(t),length:e})}function Gr(e,t){return new xp({check:"string_format",format:"regex",...w(t),pattern:e})}function Br(e){return new kp({check:"string_format",format:"lowercase",...w(e)})}function Kr(e){return new wp({check:"string_format",format:"uppercase",...w(e)})}function Xr(e,t){return new Sp({check:"string_format",format:"includes",...w(t),includes:e})}function Yr(e,t){return new zp({check:"string_format",format:"starts_with",...w(t),prefix:e})}function Qr(e,t){return new Ip({check:"string_format",format:"ends_with",...w(t),suffix:e})}function Di(e,t,n){return new Tp({check:"property",property:e,schema:t,...w(n)})}function en(e,t){return new Pp({check:"mime_type",mime:e,...w(t)})}function yt(e){return new Ep({check:"overwrite",tx:e})}function tn(e){return yt(t=>t.normalize(e))}function rn(){return yt(e=>e.trim())}function nn(){return yt(e=>e.toLowerCase())}function on(){return yt(e=>e.toUpperCase())}function Xn(){return yt(e=>Rd(e))}function Dp(e,t,n){return new e({type:"array",element:t,...w(n)})}function oz(e,t,n){return new e({type:"union",options:t,...w(n)})}function iz(e,t,n){return new e({type:"union",options:t,inclusive:!1,...w(n)})}function az(e,t,n,o){return new e({type:"union",options:n,discriminator:t,...w(o)})}function sz(e,t,n){return new e({type:"intersection",left:t,right:n})}function cz(e,t,n,o){let r=n instanceof q,i=r?o:n,a=r?n:null;return new e({type:"tuple",items:t,rest:a,...w(i)})}function uz(e,t,n,o){return new e({type:"record",keyType:t,valueType:n,...w(o)})}function lz(e,t,n,o){return new e({type:"map",keyType:t,valueType:n,...w(o)})}function dz(e,t,n){return new e({type:"set",valueType:t,...w(n)})}function pz(e,t,n){let o=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e({type:"enum",entries:o,...w(n)})}function fz(e,t,n){return new e({type:"enum",entries:t,...w(n)})}function mz(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...w(n)})}function au(e,t){return new e({type:"file",...w(t)})}function hz(e,t){return new e({type:"transform",transform:t})}function gz(e,t){return new e({type:"optional",innerType:t})}function vz(e,t){return new e({type:"nullable",innerType:t})}function yz(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():Ba(n)}})}function _z(e,t,n){return new e({type:"nonoptional",innerType:t,...w(n)})}function bz(e,t){return new e({type:"success",innerType:t})}function $z(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function xz(e,t,n){return new e({type:"pipe",in:t,out:n})}function kz(e,t){return new e({type:"readonly",innerType:t})}function wz(e,t,n){return new e({type:"template_literal",parts:t,...w(n)})}function Sz(e,t){return new e({type:"lazy",getter:t})}function zz(e,t){return new e({type:"promise",innerType:t})}function su(e,t,n){let o=w(n);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function cu(e,t,n){return new e({type:"custom",check:"custom",fn:t,...w(n)})}function uu(e){let t=Yy(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(Cn(o,n.value,t._zod.def));else{let r=o;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),n.issues.push(Cn(r))}},e(n.value,n)));return t}function Yy(e,t){let n=new fe({check:"custom",...w(t)});return n._zod.check=e,n}function lu(e){let t=new fe({check:"describe"});return t._zod.onattach=[n=>{let o=Ce.get(n)??{};Ce.add(n,{...o,description:e})}],t._zod.check=()=>{},t}function du(e){let t=new fe({check:"meta"});return t._zod.onattach=[n=>{let o=Ce.get(n)??{};Ce.add(n,{...o,...e})}],t._zod.check=()=>{},t}function pu(e,t){let n=w(t),o=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(o=o.map(f=>typeof f=="string"?f.toLowerCase():f),r=r.map(f=>typeof f=="string"?f.toLowerCase():f));let i=new Set(o),a=new Set(r),s=e.Codec??Wn,c=e.Boolean??Vn,u=e.String??br,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,g)=>{let y=f;return n.case!=="sensitive"&&(y=y.toLowerCase()),i.has(y)?!0:a.has(y)?!1:(g.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:g.value,inst:p,continue:!1}),{})}),reverseTransform:((f,g)=>f===!0?o[0]||"true":r[0]||"false"),error:n.error});return p}function an(e,t,n,o={}){let r=w(o),i={...w(o),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:s=>n.test(s),...r};return n instanceof RegExp&&(i.pattern=n),new e(i)}function wr(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??Ce,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function le(e,t,n={path:[],schemaPath:[]}){var o;let r=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);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),le(d,t,l),t.seen.get(d).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(a.schema,c),t.io==="input"&&Xe(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&a.schema._prefault&&((o=a.schema).default??(o.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function Sr(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let c=o.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.`);o.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??(g=>g);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}/${f}`}}if(a[1]===n)return{ref:"#"};let u=`#/${s}/`,l=a[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:u+l}},i=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>
|
|
56
|
+
|
|
57
|
+
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]){i(a);continue}if(e.external){let u=e.external.registry.get(a[0])?.id;if(t!==a[0]&&u){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(s.cycle){i(a);continue}if(s.count>1&&e.reused==="ref"){i(a);continue}}}function zr(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=a=>{let s=e.seen.get(a);if(s.ref===null)return;let c=s.def??s.schema,u={...c},l=s.ref;if(s.ref=null,l){o(l);let p=e.seen.get(l),f=p.schema;if(f.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(f)):Object.assign(c,f),Object.assign(c,u),a._zod.parent===l)for(let y in c)y==="$ref"||y==="allOf"||y in u||delete c[y];if(f.$ref&&p.def)for(let y in c)y==="$ref"||y==="allOf"||y in p.def&&JSON.stringify(c[y])===JSON.stringify(p.def[y])&&delete c[y]}let d=a._zod.parent;if(d&&d!==l){o(d);let p=e.seen.get(d);if(p?.schema.$ref&&(c.$ref=p.schema.$ref,p.def))for(let f in c)f==="$ref"||f==="allOf"||f in p.def&&JSON.stringify(c[f])===JSON.stringify(p.def[f])&&delete c[f]}e.override({zodSchema:a,jsonSchema:c,path:s.path??[]})};for(let a of[...e.seen.entries()].reverse())o(a[0]);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 a=e.external.registry.get(t)?.id;if(!a)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(a)}Object.assign(r,n.def??n.schema);let i=e.external?.defs??{};for(let a of e.seen.entries()){let s=a[1];s.def&&s.defId&&(i[s.defId]=s.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?r.$defs=i:r.definitions=i);try{let a=JSON.parse(JSON.stringify(r));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:Yn(t,"input",e.processors),output:Yn(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function Xe(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return Xe(o.element,n);if(o.type==="set")return Xe(o.valueType,n);if(o.type==="lazy")return Xe(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return Xe(o.innerType,n);if(o.type==="intersection")return Xe(o.left,n)||Xe(o.right,n);if(o.type==="record"||o.type==="map")return Xe(o.keyType,n)||Xe(o.valueType,n);if(o.type==="pipe")return Xe(o.in,n)||Xe(o.out,n);if(o.type==="object"){for(let r in o.shape)if(Xe(o.shape[r],n))return!0;return!1}if(o.type==="union"){for(let r of o.options)if(Xe(r,n))return!0;return!1}if(o.type==="tuple"){for(let r of o.items)if(Xe(r,n))return!0;return!!(o.rest&&Xe(o.rest,n))}return!1}var Cp=(e,t={})=>n=>{let o=wr({...n,processors:t});return le(e,o),Sr(o,e),zr(o,e)},Yn=(e,t,n={})=>o=>{let{libraryOptions:r,target:i}=o??{},a=wr({...r??{},target:i,io:t,processors:n});return le(e,a),Sr(a,e),zr(a,e)};var Iz={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Ap=(e,t,n,o)=>{let r=n;r.type="string";let{minimum:i,maximum:a,format:s,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof i=="number"&&(r.minLength=i),typeof a=="number"&&(r.maxLength=a),s&&(r.format=Iz[s]??s,r.format===""&&delete r.format,s==="time"&&delete r.format),u&&(r.contentEncoding=u),c&&c.size>0){let l=[...c];l.length===1?r.pattern=l[0].source:l.length>1&&(r.allOf=[...l.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},Up=(e,t,n,o)=>{let r=n,{minimum:i,maximum:a,format:s,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:l}=e._zod.bag;typeof s=="string"&&s.includes("int")?r.type="integer":r.type="number",typeof l=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(r.minimum=l,r.exclusiveMinimum=!0):r.exclusiveMinimum=l),typeof i=="number"&&(r.minimum=i,typeof l=="number"&&t.target!=="draft-04"&&(l>=i?delete r.minimum:delete r.exclusiveMinimum)),typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(r.maximum=u,r.exclusiveMaximum=!0):r.exclusiveMaximum=u),typeof a=="number"&&(r.maximum=a,typeof u=="number"&&t.target!=="draft-04"&&(u<=a?delete r.maximum:delete r.exclusiveMaximum)),typeof c=="number"&&(r.multipleOf=c)},Zp=(e,t,n,o)=>{n.type="boolean"},Mp=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Lp=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},qp=(e,t,n,o)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},Fp=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Vp=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Hp=(e,t,n,o)=>{n.not={}},Wp=(e,t,n,o)=>{},Jp=(e,t,n,o)=>{},Gp=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Bp=(e,t,n,o)=>{let r=e._zod.def,i=Ko(r.entries);i.every(a=>typeof a=="number")&&(n.type="number"),i.every(a=>typeof a=="string")&&(n.type="string"),n.enum=i},Kp=(e,t,n,o)=>{let r=e._zod.def,i=[];for(let a of r.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){let a=i[0];n.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[a]:n.const=a}else i.every(a=>typeof a=="number")&&(n.type="number"),i.every(a=>typeof a=="string")&&(n.type="string"),i.every(a=>typeof a=="boolean")&&(n.type="boolean"),i.every(a=>a===null)&&(n.type="null"),n.enum=i},Xp=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Yp=(e,t,n,o)=>{let r=n,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=i.source},Qp=(e,t,n,o)=>{let r=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:c}=e._zod.bag;a!==void 0&&(i.minLength=a),s!==void 0&&(i.maxLength=s),c?c.length===1?(i.contentMediaType=c[0],Object.assign(r,i)):(Object.assign(r,i),r.anyOf=c.map(u=>({contentMediaType:u}))):Object.assign(r,i)},ef=(e,t,n,o)=>{n.type="boolean"},tf=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},rf=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},nf=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},of=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},af=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},sf=(e,t,n,o)=>{let r=n,i=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;typeof a=="number"&&(r.minItems=a),typeof s=="number"&&(r.maxItems=s),r.type="array",r.items=le(i.element,t,{...o,path:[...o.path,"items"]})},cf=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object",r.properties={};let a=i.shape;for(let u in a)r.properties[u]=le(a[u],t,{...o,path:[...o.path,"properties",u]});let s=new Set(Object.keys(a)),c=new Set([...s].filter(u=>{let l=i.shape[u]._zod;return t.io==="input"?l.optin===void 0:l.optout===void 0}));c.size>0&&(r.required=Array.from(c)),i.catchall?._zod.def.type==="never"?r.additionalProperties=!1:i.catchall?i.catchall&&(r.additionalProperties=le(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},mu=(e,t,n,o)=>{let r=e._zod.def,i=r.inclusive===!1,a=r.options.map((s,c)=>le(s,t,{...o,path:[...o.path,i?"oneOf":"anyOf",c]}));i?n.oneOf=a:n.anyOf=a},uf=(e,t,n,o)=>{let r=e._zod.def,i=le(r.left,t,{...o,path:[...o.path,"allOf",0]}),a=le(r.right,t,{...o,path:[...o.path,"allOf",1]}),s=u=>"allOf"in u&&Object.keys(u).length===1,c=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];n.allOf=c},lf=(e,t,n,o)=>{let r=n,i=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=i.items.map((p,f)=>le(p,t,{...o,path:[...o.path,a,f]})),u=i.rest?le(i.rest,t,{...o,path:[...o.path,s,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(r.prefixItems=c,u&&(r.items=u)):t.target==="openapi-3.0"?(r.items={anyOf:c},u&&r.items.anyOf.push(u),r.minItems=c.length,u||(r.maxItems=c.length)):(r.items=c,u&&(r.additionalItems=u));let{minimum:l,maximum:d}=e._zod.bag;typeof l=="number"&&(r.minItems=l),typeof d=="number"&&(r.maxItems=d)},df=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object";let a=i.keyType,c=a._zod.bag?.patterns;if(i.mode==="loose"&&c&&c.size>0){let l=le(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});r.patternProperties={};for(let d of c)r.patternProperties[d.source]=l}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(r.propertyNames=le(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),r.additionalProperties=le(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let u=a._zod.values;if(u){let l=[...u].filter(d=>typeof d=="string"||typeof d=="number");l.length>0&&(r.required=l)}},pf=(e,t,n,o)=>{let r=e._zod.def,i=le(r.innerType,t,o),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=r.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},ff=(e,t,n,o)=>{let r=e._zod.def;le(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},mf=(e,t,n,o)=>{let r=e._zod.def;le(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},hf=(e,t,n,o)=>{let r=e._zod.def;le(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},gf=(e,t,n,o)=>{let r=e._zod.def;le(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType;let a;try{a=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},vf=(e,t,n,o)=>{let r=e._zod.def,i=t.io==="input"?r.in._zod.def.type==="transform"?r.out:r.in:r.out;le(i,t,o);let a=t.seen.get(e);a.ref=i},yf=(e,t,n,o)=>{let r=e._zod.def;le(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.readOnly=!0},_f=(e,t,n,o)=>{let r=e._zod.def;le(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},hu=(e,t,n,o)=>{let r=e._zod.def;le(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},bf=(e,t,n,o)=>{let r=e._zod.innerType;le(r,t,o);let i=t.seen.get(e);i.ref=r},fu={string:Ap,number:Up,boolean:Zp,bigint:Mp,symbol:Lp,null:qp,undefined:Fp,void:Vp,never:Hp,any:Wp,unknown:Jp,date:Gp,enum:Bp,literal:Kp,nan:Xp,template_literal:Yp,file:Qp,success:ef,custom:tf,function:rf,transform:nf,map:of,set:af,array:sf,object:cf,union:mu,intersection:uf,tuple:lf,record:df,nullable:pf,nonoptional:ff,default:mf,prefault:hf,catch:gf,pipe:vf,readonly:yf,promise:_f,optional:hu,lazy:bf};function sn(e,t){if("_idmap"in e){let o=e,r=wr({...t,processors:fu}),i={};for(let c of o._idmap.entries()){let[u,l]=c;le(l,r)}let a={},s={registry:o,uri:t?.uri,defs:i};r.external=s;for(let c of o._idmap.entries()){let[u,l]=c;Sr(r,l),a[u]=zr(r,l)}if(Object.keys(i).length>0){let c=r.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[c]:i}}return{schemas:a}}let n=wr({...t,processors:fu});return le(e,n),Sr(n,e),zr(n,e)}var gu=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=wr({processors:fu,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 le(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)),Sr(this.ctx,t);let o=zr(this.ctx,t),{"~standard":r,...i}=o;return i}};var Qy={};var Ez=m("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");q.init(e,t),e.def=t,e.type=t.type,e.parse=(n,o)=>Hr(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>yr(e,n,o),e.parseAsync=async(n,o)=>Wr(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>_r(e,n,o),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]},{parent:!0}),e.with=e.check,e.clone=(n,o)=>De(e,n,o),e.brand=()=>e,e.register=((n,o)=>(n.add(e,o),e)),e.apply=n=>n(e)});var Oz=m("ZodMiniObject",(e,t)=>{Xs.init(e,t),Ez.init(e,t),B(e,"shape",()=>t.shape)});function $f(e,t){let n={type:"object",shape:e??{},...w(t)};return new Oz(n)}function _t(e){return!!e._zod}function cn(e){let t=Object.values(e);if(t.length===0)return $f({});let n=t.every(_t),o=t.every(r=>!_t(r));if(n)return $f(e);if(o)return mv(e);throw new Error("Mixed Zod versions detected in object shape.")}function Ir(e,t){return _t(e)?yr(e,t):e.safeParse(t)}async function vu(e,t){return _t(e)?await _r(e,t):await e.safeParseAsync(t)}function Tr(e){if(!e)return;let t;if(_t(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function Qn(e){if(e){if(typeof e=="object"){let t=e,n=e;if(!t._def&&!n._zod){let o=Object.values(e);if(o.length>0&&o.every(r=>typeof r=="object"&&r!==null&&(r._def!==void 0||r._zod!==void 0||typeof r.parse=="function")))return cn(e)}}if(_t(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 yu(e){if(e&&typeof e=="object"){if("message"in e&&typeof e.message=="string")return e.message;if("issues"in e&&Array.isArray(e.issues)&&e.issues.length>0){let t=e.issues[0];if(t&&typeof t=="object"&&"message"in t)return String(t.message)}try{return JSON.stringify(e)}catch{return String(e)}}return String(e)}function r_(e){return e.description}function n_(e){if(_t(e))return e._zod?.def?.type==="optional";let t=e;return typeof e.isOptional=="function"?e.isOptional():t._def?.typeName==="ZodOptional"}function _u(e){if(_t(e)){let i=e._zod?.def;if(i){if(i.value!==void 0)return i.value;if(Array.isArray(i.values)&&i.values.length>0)return i.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 o=e.value;if(o!==void 0)return o}var F={};Kt(F,{$brand:()=>Go,$input:()=>Tc,$output:()=>Ic,NEVER:()=>Wa,TimePrecision:()=>jc,ZodAny:()=>qf,ZodArray:()=>Wf,ZodBase64:()=>Zu,ZodBase64URL:()=>Mu,ZodBigInt:()=>io,ZodBigIntFormat:()=>Fu,ZodBoolean:()=>oo,ZodCIDRv4:()=>Au,ZodCIDRv6:()=>Uu,ZodCUID:()=>Eu,ZodCUID2:()=>Ou,ZodCatch:()=>pm,ZodCodec:()=>Bu,ZodCustom:()=>Ji,ZodCustomStringFormat:()=>ro,ZodDate:()=>qi,ZodDefault:()=>am,ZodDiscriminatedUnion:()=>Gf,ZodE164:()=>Lu,ZodEmail:()=>Iu,ZodEmoji:()=>Tu,ZodEnum:()=>eo,ZodError:()=>Dz,ZodExactOptional:()=>nm,ZodFile:()=>tm,ZodFirstPartyTypeKind:()=>wm,ZodFunction:()=>$m,ZodGUID:()=>Ai,ZodIPv4:()=>Du,ZodIPv6:()=>Cu,ZodISODate:()=>xu,ZodISODateTime:()=>$u,ZodISODuration:()=>wu,ZodISOTime:()=>ku,ZodIntersection:()=>Bf,ZodIssueCode:()=>Az,ZodJWT:()=>qu,ZodKSUID:()=>Nu,ZodLazy:()=>ym,ZodLiteral:()=>em,ZodMAC:()=>Uf,ZodMap:()=>Yf,ZodNaN:()=>mm,ZodNanoID:()=>Pu,ZodNever:()=>Vf,ZodNonOptional:()=>Ju,ZodNull:()=>Lf,ZodNullable:()=>im,ZodNumber:()=>no,ZodNumberFormat:()=>un,ZodObject:()=>Fi,ZodOptional:()=>so,ZodPipe:()=>Gu,ZodPrefault:()=>cm,ZodPromise:()=>bm,ZodReadonly:()=>hm,ZodRealError:()=>at,ZodRecord:()=>Wi,ZodSet:()=>Qf,ZodString:()=>to,ZodStringFormat:()=>me,ZodSuccess:()=>dm,ZodSymbol:()=>Zf,ZodTemplateLiteral:()=>vm,ZodTransform:()=>rm,ZodTuple:()=>Kf,ZodType:()=>K,ZodULID:()=>ju,ZodURL:()=>Mi,ZodUUID:()=>Ft,ZodUndefined:()=>Mf,ZodUnion:()=>Vi,ZodUnknown:()=>Ff,ZodVoid:()=>Hf,ZodXID:()=>Ru,ZodXor:()=>Jf,_ZodString:()=>zu,_default:()=>sm,_function:()=>ib,any:()=>Vu,array:()=>ee,base64:()=>S_,base64url:()=>z_,bigint:()=>A_,boolean:()=>be,catch:()=>fm,check:()=>ab,cidrv4:()=>k_,cidrv6:()=>w_,clone:()=>De,codec:()=>rb,coerce:()=>Sm,config:()=>Se,core:()=>mt,cuid:()=>h_,cuid2:()=>g_,custom:()=>Ku,date:()=>F_,decode:()=>Of,decodeAsync:()=>Rf,describe:()=>sb,discriminatedUnion:()=>Hi,e164:()=>I_,email:()=>i_,emoji:()=>f_,encode:()=>Ef,encodeAsync:()=>jf,endsWith:()=>Qr,enum:()=>je,exactOptional:()=>om,file:()=>Y_,flattenError:()=>An,float32:()=>R_,float64:()=>N_,formatError:()=>Un,fromJSONSchema:()=>fb,function:()=>ib,getErrorMap:()=>Zz,globalRegistry:()=>Ce,gt:()=>jt,gte:()=>Ue,guid:()=>a_,hash:()=>j_,hex:()=>O_,hostname:()=>E_,httpUrl:()=>p_,includes:()=>Xr,instanceof:()=>ub,int:()=>Su,int32:()=>D_,int64:()=>U_,intersection:()=>ao,ipv4:()=>b_,ipv6:()=>x_,iso:()=>Pr,json:()=>db,jwt:()=>T_,keyof:()=>V_,ksuid:()=>__,lazy:()=>_m,length:()=>kr,literal:()=>R,locales:()=>Gn,looseObject:()=>Ze,looseRecord:()=>G_,lowercase:()=>Br,lt:()=>Ot,lte:()=>Ke,mac:()=>$_,map:()=>B_,maxLength:()=>xr,maxSize:()=>nr,meta:()=>cb,mime:()=>en,minLength:()=>qt,minSize:()=>Rt,multipleOf:()=>rr,nan:()=>tb,nanoid:()=>m_,nativeEnum:()=>X_,negative:()=>ji,never:()=>Hu,nonnegative:()=>Ni,nonoptional:()=>lm,nonpositive:()=>Ri,normalize:()=>tn,null:()=>Li,nullable:()=>Ui,nullish:()=>Q_,number:()=>re,object:()=>z,optional:()=>ye,overwrite:()=>yt,parse:()=>zf,parseAsync:()=>If,partialRecord:()=>J_,pipe:()=>Zi,positive:()=>Oi,prefault:()=>um,preprocess:()=>Gi,prettifyError:()=>Xa,promise:()=>ob,property:()=>Di,readonly:()=>gm,record:()=>pe,refine:()=>xm,regex:()=>Gr,regexes:()=>it,registry:()=>li,safeDecode:()=>Df,safeDecodeAsync:()=>Af,safeEncode:()=>Nf,safeEncodeAsync:()=>Cf,safeParse:()=>Tf,safeParseAsync:()=>Pf,set:()=>K_,setErrorMap:()=>Uz,size:()=>$r,slugify:()=>Xn,startsWith:()=>Yr,strictObject:()=>H_,string:()=>h,stringFormat:()=>P_,stringbool:()=>lb,success:()=>eb,superRefine:()=>km,symbol:()=>M_,templateLiteral:()=>nb,toJSONSchema:()=>sn,toLowerCase:()=>nn,toUpperCase:()=>on,transform:()=>Wu,treeifyError:()=>Ka,trim:()=>rn,tuple:()=>Xf,uint32:()=>C_,uint64:()=>Z_,ulid:()=>v_,undefined:()=>L_,union:()=>ge,unknown:()=>he,uppercase:()=>Kr,url:()=>d_,util:()=>$,uuid:()=>s_,uuidv4:()=>c_,uuidv6:()=>u_,uuidv7:()=>l_,void:()=>q_,xid:()=>y_,xor:()=>W_});var Ci={};Kt(Ci,{ZodAny:()=>qf,ZodArray:()=>Wf,ZodBase64:()=>Zu,ZodBase64URL:()=>Mu,ZodBigInt:()=>io,ZodBigIntFormat:()=>Fu,ZodBoolean:()=>oo,ZodCIDRv4:()=>Au,ZodCIDRv6:()=>Uu,ZodCUID:()=>Eu,ZodCUID2:()=>Ou,ZodCatch:()=>pm,ZodCodec:()=>Bu,ZodCustom:()=>Ji,ZodCustomStringFormat:()=>ro,ZodDate:()=>qi,ZodDefault:()=>am,ZodDiscriminatedUnion:()=>Gf,ZodE164:()=>Lu,ZodEmail:()=>Iu,ZodEmoji:()=>Tu,ZodEnum:()=>eo,ZodExactOptional:()=>nm,ZodFile:()=>tm,ZodFunction:()=>$m,ZodGUID:()=>Ai,ZodIPv4:()=>Du,ZodIPv6:()=>Cu,ZodIntersection:()=>Bf,ZodJWT:()=>qu,ZodKSUID:()=>Nu,ZodLazy:()=>ym,ZodLiteral:()=>em,ZodMAC:()=>Uf,ZodMap:()=>Yf,ZodNaN:()=>mm,ZodNanoID:()=>Pu,ZodNever:()=>Vf,ZodNonOptional:()=>Ju,ZodNull:()=>Lf,ZodNullable:()=>im,ZodNumber:()=>no,ZodNumberFormat:()=>un,ZodObject:()=>Fi,ZodOptional:()=>so,ZodPipe:()=>Gu,ZodPrefault:()=>cm,ZodPromise:()=>bm,ZodReadonly:()=>hm,ZodRecord:()=>Wi,ZodSet:()=>Qf,ZodString:()=>to,ZodStringFormat:()=>me,ZodSuccess:()=>dm,ZodSymbol:()=>Zf,ZodTemplateLiteral:()=>vm,ZodTransform:()=>rm,ZodTuple:()=>Kf,ZodType:()=>K,ZodULID:()=>ju,ZodURL:()=>Mi,ZodUUID:()=>Ft,ZodUndefined:()=>Mf,ZodUnion:()=>Vi,ZodUnknown:()=>Ff,ZodVoid:()=>Hf,ZodXID:()=>Ru,ZodXor:()=>Jf,_ZodString:()=>zu,_default:()=>sm,_function:()=>ib,any:()=>Vu,array:()=>ee,base64:()=>S_,base64url:()=>z_,bigint:()=>A_,boolean:()=>be,catch:()=>fm,check:()=>ab,cidrv4:()=>k_,cidrv6:()=>w_,codec:()=>rb,cuid:()=>h_,cuid2:()=>g_,custom:()=>Ku,date:()=>F_,describe:()=>sb,discriminatedUnion:()=>Hi,e164:()=>I_,email:()=>i_,emoji:()=>f_,enum:()=>je,exactOptional:()=>om,file:()=>Y_,float32:()=>R_,float64:()=>N_,function:()=>ib,guid:()=>a_,hash:()=>j_,hex:()=>O_,hostname:()=>E_,httpUrl:()=>p_,instanceof:()=>ub,int:()=>Su,int32:()=>D_,int64:()=>U_,intersection:()=>ao,ipv4:()=>b_,ipv6:()=>x_,json:()=>db,jwt:()=>T_,keyof:()=>V_,ksuid:()=>__,lazy:()=>_m,literal:()=>R,looseObject:()=>Ze,looseRecord:()=>G_,mac:()=>$_,map:()=>B_,meta:()=>cb,nan:()=>tb,nanoid:()=>m_,nativeEnum:()=>X_,never:()=>Hu,nonoptional:()=>lm,null:()=>Li,nullable:()=>Ui,nullish:()=>Q_,number:()=>re,object:()=>z,optional:()=>ye,partialRecord:()=>J_,pipe:()=>Zi,prefault:()=>um,preprocess:()=>Gi,promise:()=>ob,readonly:()=>gm,record:()=>pe,refine:()=>xm,set:()=>K_,strictObject:()=>H_,string:()=>h,stringFormat:()=>P_,stringbool:()=>lb,success:()=>eb,superRefine:()=>km,symbol:()=>M_,templateLiteral:()=>nb,transform:()=>Wu,tuple:()=>Xf,uint32:()=>C_,uint64:()=>Z_,ulid:()=>v_,undefined:()=>L_,union:()=>ge,unknown:()=>he,url:()=>d_,uuid:()=>s_,uuidv4:()=>c_,uuidv6:()=>u_,uuidv7:()=>l_,void:()=>q_,xid:()=>y_,xor:()=>W_});var bu={};Kt(bu,{endsWith:()=>Qr,gt:()=>jt,gte:()=>Ue,includes:()=>Xr,length:()=>kr,lowercase:()=>Br,lt:()=>Ot,lte:()=>Ke,maxLength:()=>xr,maxSize:()=>nr,mime:()=>en,minLength:()=>qt,minSize:()=>Rt,multipleOf:()=>rr,negative:()=>ji,nonnegative:()=>Ni,nonpositive:()=>Ri,normalize:()=>tn,overwrite:()=>yt,positive:()=>Oi,property:()=>Di,regex:()=>Gr,size:()=>$r,slugify:()=>Xn,startsWith:()=>Yr,toLowerCase:()=>nn,toUpperCase:()=>on,trim:()=>rn,uppercase:()=>Kr});var Pr={};Kt(Pr,{ZodISODate:()=>xu,ZodISODateTime:()=>$u,ZodISODuration:()=>wu,ZodISOTime:()=>ku,date:()=>kf,datetime:()=>xf,duration:()=>Sf,time:()=>wf});var $u=m("ZodISODateTime",(e,t)=>{zs.init(e,t),me.init(e,t)});function xf(e){return Rc($u,e)}var xu=m("ZodISODate",(e,t)=>{Is.init(e,t),me.init(e,t)});function kf(e){return Nc(xu,e)}var ku=m("ZodISOTime",(e,t)=>{Ts.init(e,t),me.init(e,t)});function wf(e){return Dc(ku,e)}var wu=m("ZodISODuration",(e,t)=>{Ps.init(e,t),me.init(e,t)});function Sf(e){return Cc(wu,e)}var o_=(e,t)=>{ti.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Un(e,n)},flatten:{value:n=>An(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Nn,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Nn,2)}},isEmpty:{get(){return e.issues.length===0}}})},Dz=m("ZodError",o_),at=m("ZodError",o_,{Parent:Error});var zf=Zn(at),If=Mn(at),Tf=Ln(at),Pf=qn(at),Ef=Ya(at),Of=Qa(at),jf=es(at),Rf=ts(at),Nf=rs(at),Df=ns(at),Cf=os(at),Af=is(at);var K=m("ZodType",(e,t)=>(q.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Yn(e,"input"),output:Yn(e,"output")}}),e.toJSONSchema=Cp(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone($.mergeDefs(t,{checks:[...t.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0}),e.with=e.check,e.clone=(n,o)=>De(e,n,o),e.brand=()=>e,e.register=((n,o)=>(n.add(e,o),e)),e.parse=(n,o)=>zf(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>Tf(e,n,o),e.parseAsync=async(n,o)=>If(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>Pf(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>Ef(e,n,o),e.decode=(n,o)=>Of(e,n,o),e.encodeAsync=async(n,o)=>jf(e,n,o),e.decodeAsync=async(n,o)=>Rf(e,n,o),e.safeEncode=(n,o)=>Nf(e,n,o),e.safeDecode=(n,o)=>Df(e,n,o),e.safeEncodeAsync=async(n,o)=>Cf(e,n,o),e.safeDecodeAsync=async(n,o)=>Af(e,n,o),e.refine=(n,o)=>e.check(xm(n,o)),e.superRefine=n=>e.check(km(n)),e.overwrite=n=>e.check(yt(n)),e.optional=()=>ye(e),e.exactOptional=()=>om(e),e.nullable=()=>Ui(e),e.nullish=()=>ye(Ui(e)),e.nonoptional=n=>lm(e,n),e.array=()=>ee(e),e.or=n=>ge([e,n]),e.and=n=>ao(e,n),e.transform=n=>Zi(e,Wu(n)),e.default=n=>sm(e,n),e.prefault=n=>um(e,n),e.catch=n=>fm(e,n),e.pipe=n=>Zi(e,n),e.readonly=()=>gm(e),e.describe=n=>{let o=e.clone();return Ce.add(o,{description:n}),o},Object.defineProperty(e,"description",{get(){return Ce.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Ce.get(e);let o=e.clone();return Ce.add(o,n[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),zu=m("_ZodString",(e,t)=>{br.init(e,t),K.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Ap(e,o,r,i);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...o)=>e.check(Gr(...o)),e.includes=(...o)=>e.check(Xr(...o)),e.startsWith=(...o)=>e.check(Yr(...o)),e.endsWith=(...o)=>e.check(Qr(...o)),e.min=(...o)=>e.check(qt(...o)),e.max=(...o)=>e.check(xr(...o)),e.length=(...o)=>e.check(kr(...o)),e.nonempty=(...o)=>e.check(qt(1,...o)),e.lowercase=o=>e.check(Br(o)),e.uppercase=o=>e.check(Kr(o)),e.trim=()=>e.check(rn()),e.normalize=(...o)=>e.check(tn(...o)),e.toLowerCase=()=>e.check(nn()),e.toUpperCase=()=>e.check(on()),e.slugify=()=>e.check(Xn())}),to=m("ZodString",(e,t)=>{br.init(e,t),zu.init(e,t),e.email=n=>e.check(di(Iu,n)),e.url=n=>e.check(Kn(Mi,n)),e.jwt=n=>e.check(Ei(qu,n)),e.emoji=n=>e.check(gi(Tu,n)),e.guid=n=>e.check(Bn(Ai,n)),e.uuid=n=>e.check(pi(Ft,n)),e.uuidv4=n=>e.check(fi(Ft,n)),e.uuidv6=n=>e.check(mi(Ft,n)),e.uuidv7=n=>e.check(hi(Ft,n)),e.nanoid=n=>e.check(vi(Pu,n)),e.guid=n=>e.check(Bn(Ai,n)),e.cuid=n=>e.check(yi(Eu,n)),e.cuid2=n=>e.check(_i(Ou,n)),e.ulid=n=>e.check(bi(ju,n)),e.base64=n=>e.check(Ii(Zu,n)),e.base64url=n=>e.check(Ti(Mu,n)),e.xid=n=>e.check($i(Ru,n)),e.ksuid=n=>e.check(xi(Nu,n)),e.ipv4=n=>e.check(ki(Du,n)),e.ipv6=n=>e.check(wi(Cu,n)),e.cidrv4=n=>e.check(Si(Au,n)),e.cidrv6=n=>e.check(zi(Uu,n)),e.e164=n=>e.check(Pi(Lu,n)),e.datetime=n=>e.check(xf(n)),e.date=n=>e.check(kf(n)),e.time=n=>e.check(wf(n)),e.duration=n=>e.check(Sf(n))});function h(e){return Pc(to,e)}var me=m("ZodStringFormat",(e,t)=>{de.init(e,t),zu.init(e,t)}),Iu=m("ZodEmail",(e,t)=>{vs.init(e,t),me.init(e,t)});function i_(e){return di(Iu,e)}var Ai=m("ZodGUID",(e,t)=>{hs.init(e,t),me.init(e,t)});function a_(e){return Bn(Ai,e)}var Ft=m("ZodUUID",(e,t)=>{gs.init(e,t),me.init(e,t)});function s_(e){return pi(Ft,e)}function c_(e){return fi(Ft,e)}function u_(e){return mi(Ft,e)}function l_(e){return hi(Ft,e)}var Mi=m("ZodURL",(e,t)=>{ys.init(e,t),me.init(e,t)});function d_(e){return Kn(Mi,e)}function p_(e){return Kn(Mi,{protocol:/^https?$/,hostname:it.domain,...$.normalizeParams(e)})}var Tu=m("ZodEmoji",(e,t)=>{_s.init(e,t),me.init(e,t)});function f_(e){return gi(Tu,e)}var Pu=m("ZodNanoID",(e,t)=>{bs.init(e,t),me.init(e,t)});function m_(e){return vi(Pu,e)}var Eu=m("ZodCUID",(e,t)=>{$s.init(e,t),me.init(e,t)});function h_(e){return yi(Eu,e)}var Ou=m("ZodCUID2",(e,t)=>{xs.init(e,t),me.init(e,t)});function g_(e){return _i(Ou,e)}var ju=m("ZodULID",(e,t)=>{ks.init(e,t),me.init(e,t)});function v_(e){return bi(ju,e)}var Ru=m("ZodXID",(e,t)=>{ws.init(e,t),me.init(e,t)});function y_(e){return $i(Ru,e)}var Nu=m("ZodKSUID",(e,t)=>{Ss.init(e,t),me.init(e,t)});function __(e){return xi(Nu,e)}var Du=m("ZodIPv4",(e,t)=>{Es.init(e,t),me.init(e,t)});function b_(e){return ki(Du,e)}var Uf=m("ZodMAC",(e,t)=>{js.init(e,t),me.init(e,t)});function $_(e){return Oc(Uf,e)}var Cu=m("ZodIPv6",(e,t)=>{Os.init(e,t),me.init(e,t)});function x_(e){return wi(Cu,e)}var Au=m("ZodCIDRv4",(e,t)=>{Rs.init(e,t),me.init(e,t)});function k_(e){return Si(Au,e)}var Uu=m("ZodCIDRv6",(e,t)=>{Ns.init(e,t),me.init(e,t)});function w_(e){return zi(Uu,e)}var Zu=m("ZodBase64",(e,t)=>{Ds.init(e,t),me.init(e,t)});function S_(e){return Ii(Zu,e)}var Mu=m("ZodBase64URL",(e,t)=>{Cs.init(e,t),me.init(e,t)});function z_(e){return Ti(Mu,e)}var Lu=m("ZodE164",(e,t)=>{As.init(e,t),me.init(e,t)});function I_(e){return Pi(Lu,e)}var qu=m("ZodJWT",(e,t)=>{Us.init(e,t),me.init(e,t)});function T_(e){return Ei(qu,e)}var ro=m("ZodCustomStringFormat",(e,t)=>{Zs.init(e,t),me.init(e,t)});function P_(e,t,n={}){return an(ro,e,t,n)}function E_(e){return an(ro,"hostname",it.hostname,e)}function O_(e){return an(ro,"hex",it.hex,e)}function j_(e,t){let n=t?.enc??"hex",o=`${e}_${n}`,r=it[o];if(!r)throw new Error(`Unrecognized hash format: ${o}`);return an(ro,o,r,t)}var no=m("ZodNumber",(e,t)=>{ii.init(e,t),K.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Up(e,o,r,i),e.gt=(o,r)=>e.check(jt(o,r)),e.gte=(o,r)=>e.check(Ue(o,r)),e.min=(o,r)=>e.check(Ue(o,r)),e.lt=(o,r)=>e.check(Ot(o,r)),e.lte=(o,r)=>e.check(Ke(o,r)),e.max=(o,r)=>e.check(Ke(o,r)),e.int=o=>e.check(Su(o)),e.safe=o=>e.check(Su(o)),e.positive=o=>e.check(jt(0,o)),e.nonnegative=o=>e.check(Ue(0,o)),e.negative=o=>e.check(Ot(0,o)),e.nonpositive=o=>e.check(Ke(0,o)),e.multipleOf=(o,r)=>e.check(rr(o,r)),e.step=(o,r)=>e.check(rr(o,r)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function re(e){return Ac(no,e)}var un=m("ZodNumberFormat",(e,t)=>{Ms.init(e,t),no.init(e,t)});function Su(e){return Zc(un,e)}function R_(e){return Mc(un,e)}function N_(e){return Lc(un,e)}function D_(e){return qc(un,e)}function C_(e){return Fc(un,e)}var oo=m("ZodBoolean",(e,t)=>{Vn.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Zp(e,n,o,r)});function be(e){return Vc(oo,e)}var io=m("ZodBigInt",(e,t)=>{ai.init(e,t),K.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Mp(e,o,r,i),e.gte=(o,r)=>e.check(Ue(o,r)),e.min=(o,r)=>e.check(Ue(o,r)),e.gt=(o,r)=>e.check(jt(o,r)),e.gte=(o,r)=>e.check(Ue(o,r)),e.min=(o,r)=>e.check(Ue(o,r)),e.lt=(o,r)=>e.check(Ot(o,r)),e.lte=(o,r)=>e.check(Ke(o,r)),e.max=(o,r)=>e.check(Ke(o,r)),e.positive=o=>e.check(jt(BigInt(0),o)),e.negative=o=>e.check(Ot(BigInt(0),o)),e.nonpositive=o=>e.check(Ke(BigInt(0),o)),e.nonnegative=o=>e.check(Ue(BigInt(0),o)),e.multipleOf=(o,r)=>e.check(rr(o,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function A_(e){return Wc(io,e)}var Fu=m("ZodBigIntFormat",(e,t)=>{Ls.init(e,t),io.init(e,t)});function U_(e){return Gc(Fu,e)}function Z_(e){return Bc(Fu,e)}var Zf=m("ZodSymbol",(e,t)=>{qs.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Lp(e,n,o,r)});function M_(e){return Kc(Zf,e)}var Mf=m("ZodUndefined",(e,t)=>{Fs.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Fp(e,n,o,r)});function L_(e){return Xc(Mf,e)}var Lf=m("ZodNull",(e,t)=>{Vs.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>qp(e,n,o,r)});function Li(e){return Yc(Lf,e)}var qf=m("ZodAny",(e,t)=>{Hs.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Wp(e,n,o,r)});function Vu(){return Qc(qf)}var Ff=m("ZodUnknown",(e,t)=>{Ws.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Jp(e,n,o,r)});function he(){return eu(Ff)}var Vf=m("ZodNever",(e,t)=>{Js.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Hp(e,n,o,r)});function Hu(e){return tu(Vf,e)}var Hf=m("ZodVoid",(e,t)=>{Gs.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Vp(e,n,o,r)});function q_(e){return ru(Hf,e)}var qi=m("ZodDate",(e,t)=>{Bs.init(e,t),K.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Gp(e,o,r,i),e.min=(o,r)=>e.check(Ue(o,r)),e.max=(o,r)=>e.check(Ke(o,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function F_(e){return nu(qi,e)}var Wf=m("ZodArray",(e,t)=>{Ks.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>sf(e,n,o,r),e.element=t.element,e.min=(n,o)=>e.check(qt(n,o)),e.nonempty=n=>e.check(qt(1,n)),e.max=(n,o)=>e.check(xr(n,o)),e.length=(n,o)=>e.check(kr(n,o)),e.unwrap=()=>e.element});function ee(e,t){return Dp(Wf,e,t)}function V_(e){let t=e._zod.def.shape;return je(Object.keys(t))}var Fi=m("ZodObject",(e,t)=>{Np.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>cf(e,n,o,r),$.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>je(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:he()}),e.loose=()=>e.clone({...e._zod.def,catchall:he()}),e.strict=()=>e.clone({...e._zod.def,catchall:Hu()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>$.extend(e,n),e.safeExtend=n=>$.safeExtend(e,n),e.merge=n=>$.merge(e,n),e.pick=n=>$.pick(e,n),e.omit=n=>$.omit(e,n),e.partial=(...n)=>$.partial(so,e,n[0]),e.required=(...n)=>$.required(Ju,e,n[0])});function z(e,t){let n={type:"object",shape:e??{},...$.normalizeParams(t)};return new Fi(n)}function H_(e,t){return new Fi({type:"object",shape:e,catchall:Hu(),...$.normalizeParams(t)})}function Ze(e,t){return new Fi({type:"object",shape:e,catchall:he(),...$.normalizeParams(t)})}var Vi=m("ZodUnion",(e,t)=>{Hn.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>mu(e,n,o,r),e.options=t.options});function ge(e,t){return new Vi({type:"union",options:e,...$.normalizeParams(t)})}var Jf=m("ZodXor",(e,t)=>{Vi.init(e,t),Ys.init(e,t),e._zod.processJSONSchema=(n,o,r)=>mu(e,n,o,r),e.options=t.options});function W_(e,t){return new Jf({type:"union",options:e,inclusive:!1,...$.normalizeParams(t)})}var Gf=m("ZodDiscriminatedUnion",(e,t)=>{Vi.init(e,t),Qs.init(e,t)});function Hi(e,t,n){return new Gf({type:"union",options:t,discriminator:e,...$.normalizeParams(n)})}var Bf=m("ZodIntersection",(e,t)=>{ec.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>uf(e,n,o,r)});function ao(e,t){return new Bf({type:"intersection",left:e,right:t})}var Kf=m("ZodTuple",(e,t)=>{si.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>lf(e,n,o,r),e.rest=n=>e.clone({...e._zod.def,rest:n})});function Xf(e,t,n){let o=t instanceof q,r=o?n:t,i=o?t:null;return new Kf({type:"tuple",items:e,rest:i,...$.normalizeParams(r)})}var Wi=m("ZodRecord",(e,t)=>{tc.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>df(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType});function pe(e,t,n){return new Wi({type:"record",keyType:e,valueType:t,...$.normalizeParams(n)})}function J_(e,t,n){let o=De(e);return o._zod.values=void 0,new Wi({type:"record",keyType:o,valueType:t,...$.normalizeParams(n)})}function G_(e,t,n){return new Wi({type:"record",keyType:e,valueType:t,mode:"loose",...$.normalizeParams(n)})}var Yf=m("ZodMap",(e,t)=>{rc.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>of(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(Rt(...n)),e.nonempty=n=>e.check(Rt(1,n)),e.max=(...n)=>e.check(nr(...n)),e.size=(...n)=>e.check($r(...n))});function B_(e,t,n){return new Yf({type:"map",keyType:e,valueType:t,...$.normalizeParams(n)})}var Qf=m("ZodSet",(e,t)=>{nc.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>af(e,n,o,r),e.min=(...n)=>e.check(Rt(...n)),e.nonempty=n=>e.check(Rt(1,n)),e.max=(...n)=>e.check(nr(...n)),e.size=(...n)=>e.check($r(...n))});function K_(e,t){return new Qf({type:"set",valueType:e,...$.normalizeParams(t)})}var eo=m("ZodEnum",(e,t)=>{oc.init(e,t),K.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Bp(e,o,r,i),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(o,r)=>{let i={};for(let a of o)if(n.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new eo({...t,checks:[],...$.normalizeParams(r),entries:i})},e.exclude=(o,r)=>{let i={...t.entries};for(let a of o)if(n.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new eo({...t,checks:[],...$.normalizeParams(r),entries:i})}});function je(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new eo({type:"enum",entries:n,...$.normalizeParams(t)})}function X_(e,t){return new eo({type:"enum",entries:e,...$.normalizeParams(t)})}var em=m("ZodLiteral",(e,t)=>{ic.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Kp(e,n,o,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 R(e,t){return new em({type:"literal",values:Array.isArray(e)?e:[e],...$.normalizeParams(t)})}var tm=m("ZodFile",(e,t)=>{ac.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Qp(e,n,o,r),e.min=(n,o)=>e.check(Rt(n,o)),e.max=(n,o)=>e.check(nr(n,o)),e.mime=(n,o)=>e.check(en(Array.isArray(n)?n:[n],o))});function Y_(e){return au(tm,e)}var rm=m("ZodTransform",(e,t)=>{sc.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>nf(e,n,o,r),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new fr(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push($.issue(i,n.value,t));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push($.issue(a))}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(i=>(n.value=i,n)):(n.value=r,n)}});function Wu(e){return new rm({type:"transform",transform:e})}var so=m("ZodOptional",(e,t)=>{ci.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>hu(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function ye(e){return new so({type:"optional",innerType:e})}var nm=m("ZodExactOptional",(e,t)=>{cc.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>hu(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function om(e){return new nm({type:"optional",innerType:e})}var im=m("ZodNullable",(e,t)=>{uc.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>pf(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function Ui(e){return new im({type:"nullable",innerType:e})}function Q_(e){return ye(Ui(e))}var am=m("ZodDefault",(e,t)=>{lc.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>mf(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function sm(e,t){return new am({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():$.shallowClone(t)}})}var cm=m("ZodPrefault",(e,t)=>{dc.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>hf(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function um(e,t){return new cm({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():$.shallowClone(t)}})}var Ju=m("ZodNonOptional",(e,t)=>{pc.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ff(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function lm(e,t){return new Ju({type:"nonoptional",innerType:e,...$.normalizeParams(t)})}var dm=m("ZodSuccess",(e,t)=>{fc.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ef(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function eb(e){return new dm({type:"success",innerType:e})}var pm=m("ZodCatch",(e,t)=>{mc.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>gf(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function fm(e,t){return new pm({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var mm=m("ZodNaN",(e,t)=>{hc.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Xp(e,n,o,r)});function tb(e){return iu(mm,e)}var Gu=m("ZodPipe",(e,t)=>{gc.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>vf(e,n,o,r),e.in=t.in,e.out=t.out});function Zi(e,t){return new Gu({type:"pipe",in:e,out:t})}var Bu=m("ZodCodec",(e,t)=>{Gu.init(e,t),Wn.init(e,t)});function rb(e,t,n){return new Bu({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}var hm=m("ZodReadonly",(e,t)=>{vc.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>yf(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function gm(e){return new hm({type:"readonly",innerType:e})}var vm=m("ZodTemplateLiteral",(e,t)=>{yc.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Yp(e,n,o,r)});function nb(e,t){return new vm({type:"template_literal",parts:e,...$.normalizeParams(t)})}var ym=m("ZodLazy",(e,t)=>{$c.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>bf(e,n,o,r),e.unwrap=()=>e._zod.def.getter()});function _m(e){return new ym({type:"lazy",getter:e})}var bm=m("ZodPromise",(e,t)=>{bc.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>_f(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function ob(e){return new bm({type:"promise",innerType:e})}var $m=m("ZodFunction",(e,t)=>{_c.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>rf(e,n,o,r)});function ib(e){return new $m({type:"function",input:Array.isArray(e?.input)?Xf(e?.input):e?.input??ee(he()),output:e?.output??he()})}var Ji=m("ZodCustom",(e,t)=>{xc.init(e,t),K.init(e,t),e._zod.processJSONSchema=(n,o,r)=>tf(e,n,o,r)});function ab(e){let t=new fe({check:"custom"});return t._zod.check=e,t}function Ku(e,t){return su(Ji,e??(()=>!0),t)}function xm(e,t={}){return cu(Ji,e,t)}function km(e){return uu(e)}var sb=lu,cb=du;function ub(e,t={}){let n=new Ji({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...$.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:n,path:[...n._zod.def.path??[]]})},n}var lb=(...e)=>pu({Codec:Bu,Boolean:oo,String:to},...e);function db(e){let t=_m(()=>ge([h(e),re(),be(),Li(),ee(t),pe(h(),t)]));return t}function Gi(e,t){return Zi(Wu(e),t)}var Az={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 Uz(e){Se({customError:e})}function Zz(){return Se().customError}var wm;wm||(wm={});var T={...Ci,...bu,iso:Pr},Mz=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 Lz(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 qz(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 o=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===o){let r=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 pb(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return T.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 T.lazy(()=>{if(!t.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let i=qz(r,t),a=He(i,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 T.null();if(r.length===0)return T.never();if(r.length===1)return T.literal(r[0]);if(r.every(a=>typeof a=="string"))return T.enum(r);let i=r.map(a=>T.literal(a));return i.length<2?i[0]:T.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return T.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(i=>{let a={...e,type:i};return pb(a,t)});return r.length===0?T.never():r.length===1?r[0]:T.union(r)}if(!n)return T.any();let o;switch(n){case"string":{let r=T.string();if(e.format){let i=e.format;i==="email"?r=r.check(T.email()):i==="uri"||i==="uri-reference"?r=r.check(T.url()):i==="uuid"||i==="guid"?r=r.check(T.uuid()):i==="date-time"?r=r.check(T.iso.datetime()):i==="date"?r=r.check(T.iso.date()):i==="time"?r=r.check(T.iso.time()):i==="duration"?r=r.check(T.iso.duration()):i==="ipv4"?r=r.check(T.ipv4()):i==="ipv6"?r=r.check(T.ipv6()):i==="mac"?r=r.check(T.mac()):i==="cidr"?r=r.check(T.cidrv4()):i==="cidr-v6"?r=r.check(T.cidrv6()):i==="base64"?r=r.check(T.base64()):i==="base64url"?r=r.check(T.base64url()):i==="e164"?r=r.check(T.e164()):i==="jwt"?r=r.check(T.jwt()):i==="emoji"?r=r.check(T.emoji()):i==="nanoid"?r=r.check(T.nanoid()):i==="cuid"?r=r.check(T.cuid()):i==="cuid2"?r=r.check(T.cuid2()):i==="ulid"?r=r.check(T.ulid()):i==="xid"?r=r.check(T.xid()):i==="ksuid"&&(r=r.check(T.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))),o=r;break}case"number":case"integer":{let r=n==="integer"?T.number().int():T.number();typeof e.minimum=="number"&&(r=r.min(e.minimum)),typeof e.maximum=="number"&&(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)),o=r;break}case"boolean":{o=T.boolean();break}case"null":{o=T.null();break}case"object":{let r={},i=e.properties||{},a=new Set(e.required||[]);for(let[c,u]of Object.entries(i)){let l=He(u,t);r[c]=a.has(c)?l:l.optional()}if(e.propertyNames){let c=He(e.propertyNames,t),u=e.additionalProperties&&typeof e.additionalProperties=="object"?He(e.additionalProperties,t):T.any();if(Object.keys(r).length===0){o=T.record(c,u);break}let l=T.object(r).passthrough(),d=T.looseRecord(c,u);o=T.intersection(l,d);break}if(e.patternProperties){let c=e.patternProperties,u=Object.keys(c),l=[];for(let p of u){let f=He(c[p],t),g=T.string().regex(new RegExp(p));l.push(T.looseRecord(g,f))}let d=[];if(Object.keys(r).length>0&&d.push(T.object(r).passthrough()),d.push(...l),d.length===0)o=T.object({}).passthrough();else if(d.length===1)o=d[0];else{let p=T.intersection(d[0],d[1]);for(let f=2;f<d.length;f++)p=T.intersection(p,d[f]);o=p}break}let s=T.object(r);e.additionalProperties===!1?o=s.strict():typeof e.additionalProperties=="object"?o=s.catchall(He(e.additionalProperties,t)):o=s.passthrough();break}case"array":{let r=e.prefixItems,i=e.items;if(r&&Array.isArray(r)){let a=r.map(c=>He(c,t)),s=i&&typeof i=="object"&&!Array.isArray(i)?He(i,t):void 0;s?o=T.tuple(a).rest(s):o=T.tuple(a),typeof e.minItems=="number"&&(o=o.check(T.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(T.maxLength(e.maxItems)))}else if(Array.isArray(i)){let a=i.map(c=>He(c,t)),s=e.additionalItems&&typeof e.additionalItems=="object"?He(e.additionalItems,t):void 0;s?o=T.tuple(a).rest(s):o=T.tuple(a),typeof e.minItems=="number"&&(o=o.check(T.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(T.maxLength(e.maxItems)))}else if(i!==void 0){let a=He(i,t),s=T.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),o=s}else o=T.array(T.any());break}default:throw new Error(`Unsupported type: ${n}`)}return e.description&&(o=o.describe(e.description)),e.default!==void 0&&(o=o.default(e.default)),o}function He(e,t){if(typeof e=="boolean")return e?T.any():T.never();let n=pb(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(u=>He(u,t)),c=T.union(s);n=o?T.intersection(n,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(u=>He(u,t)),c=T.xor(s);n=o?T.intersection(n,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=o?n:T.any();else{let s=o?n:He(e.allOf[0],t),c=o?0:1;for(let u=c;u<e.allOf.length;u++)s=T.intersection(s,He(e.allOf[u],t));n=s}e.nullable===!0&&t.version==="openapi-3.0"&&(n=T.nullable(n)),e.readOnly===!0&&(n=T.readonly(n));let r={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of i)s in e&&(r[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(r[s]=e[s]);for(let s of Object.keys(e))Mz.has(s)||(r[s]=e[s]);return Object.keys(r).length>0&&t.registry.add(n,r),n}function fb(e,t){if(typeof e=="boolean")return e?T.any():T.never();let n=Lz(e,t?.defaultTarget),o=e.$defs||e.definitions||{},r={version:n,defs:o,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??Ce};return He(e,r)}var Sm={};Kt(Sm,{bigint:()=>Wz,boolean:()=>Hz,date:()=>Jz,number:()=>Vz,string:()=>Fz});function Fz(e){return Ec(to,e)}function Vz(e){return Uc(no,e)}function Hz(e){return Hc(oo,e)}function Wz(e){return Jc(io,e)}function Jz(e){return ou(qi,e)}Se(kc());var Im="2025-11-25";var hb=[Im,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Er="io.modelcontextprotocol/related-task",Yu="2.0",Re=Ku(e=>e!==null&&(typeof e=="object"||typeof e=="function")),gb=ge([h(),re().int()]),vb=h(),lA=Ze({ttl:re().optional(),pollInterval:re().optional()}),Gz=z({ttl:re().optional()}),Bz=z({taskId:h()}),Tm=Ze({progressToken:gb.optional(),[Er]:Bz.optional()}),ht=z({_meta:Tm.optional()}),Bi=ht.extend({task:Gz.optional()}),yb=e=>Bi.safeParse(e).success,Me=z({method:h(),params:ht.loose().optional()}),bt=z({_meta:Tm.optional()}),$t=z({method:h(),params:bt.loose().optional()}),Le=Ze({_meta:Tm.optional()}),Qu=ge([h(),re().int()]),_b=z({jsonrpc:R(Yu),id:Qu,...Me.shape}).strict(),Pm=e=>_b.safeParse(e).success,bb=z({jsonrpc:R(Yu),...$t.shape}).strict(),$b=e=>bb.safeParse(e).success,Em=z({jsonrpc:R(Yu),id:Qu,result:Le}).strict(),Ki=e=>Em.safeParse(e).success;var U;(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"})(U||(U={}));var Om=z({jsonrpc:R(Yu),id:Qu.optional(),error:z({code:re().int(),message:h(),data:he().optional()})}).strict();var xb=e=>Om.safeParse(e).success;var kb=ge([_b,bb,Em,Om]),dA=ge([Em,Om]),el=Le.strict(),Kz=bt.extend({requestId:Qu.optional(),reason:h().optional()}),tl=$t.extend({method:R("notifications/cancelled"),params:Kz}),Xz=z({src:h(),mimeType:h().optional(),sizes:ee(h()).optional(),theme:je(["light","dark"]).optional()}),Xi=z({icons:ee(Xz).optional()}),co=z({name:h(),title:h().optional()}),wb=co.extend({...co.shape,...Xi.shape,version:h(),websiteUrl:h().optional(),description:h().optional()}),Yz=ao(z({applyDefaults:be().optional()}),pe(h(),he())),Qz=Gi(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,ao(z({form:Yz.optional(),url:Re.optional()}),pe(h(),he()).optional())),eI=Ze({list:Re.optional(),cancel:Re.optional(),requests:Ze({sampling:Ze({createMessage:Re.optional()}).optional(),elicitation:Ze({create:Re.optional()}).optional()}).optional()}),tI=Ze({list:Re.optional(),cancel:Re.optional(),requests:Ze({tools:Ze({call:Re.optional()}).optional()}).optional()}),rI=z({experimental:pe(h(),Re).optional(),sampling:z({context:Re.optional(),tools:Re.optional()}).optional(),elicitation:Qz.optional(),roots:z({listChanged:be().optional()}).optional(),tasks:eI.optional(),extensions:pe(h(),Re).optional()}),nI=ht.extend({protocolVersion:h(),capabilities:rI,clientInfo:wb}),jm=Me.extend({method:R("initialize"),params:nI});var oI=z({experimental:pe(h(),Re).optional(),logging:Re.optional(),completions:Re.optional(),prompts:z({listChanged:be().optional()}).optional(),resources:z({subscribe:be().optional(),listChanged:be().optional()}).optional(),tools:z({listChanged:be().optional()}).optional(),tasks:tI.optional(),extensions:pe(h(),Re).optional()}),iI=Le.extend({protocolVersion:h(),capabilities:oI,serverInfo:wb,instructions:h().optional()}),Rm=$t.extend({method:R("notifications/initialized"),params:bt.optional()});var rl=Me.extend({method:R("ping"),params:ht.optional()}),aI=z({progress:re(),total:ye(re()),message:ye(h())}),sI=z({...bt.shape,...aI.shape,progressToken:gb}),nl=$t.extend({method:R("notifications/progress"),params:sI}),cI=ht.extend({cursor:vb.optional()}),Yi=Me.extend({params:cI.optional()}),Qi=Le.extend({nextCursor:vb.optional()}),uI=je(["working","input_required","completed","failed","cancelled"]),ea=z({taskId:h(),status:uI,ttl:ge([re(),Li()]),createdAt:h(),lastUpdatedAt:h(),pollInterval:ye(re()),statusMessage:ye(h())}),uo=Le.extend({task:ea}),lI=bt.merge(ea),ta=$t.extend({method:R("notifications/tasks/status"),params:lI}),ol=Me.extend({method:R("tasks/get"),params:ht.extend({taskId:h()})}),il=Le.merge(ea),al=Me.extend({method:R("tasks/result"),params:ht.extend({taskId:h()})}),pA=Le.loose(),sl=Yi.extend({method:R("tasks/list")}),cl=Qi.extend({tasks:ee(ea)}),ul=Me.extend({method:R("tasks/cancel"),params:ht.extend({taskId:h()})}),Sb=Le.merge(ea),zb=z({uri:h(),mimeType:ye(h()),_meta:pe(h(),he()).optional()}),Ib=zb.extend({text:h()}),Nm=h().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),Tb=zb.extend({blob:Nm}),ra=je(["user","assistant"]),lo=z({audience:ee(ra).optional(),priority:re().min(0).max(1).optional(),lastModified:Pr.datetime({offset:!0}).optional()}),Pb=z({...co.shape,...Xi.shape,uri:h(),description:ye(h()),mimeType:ye(h()),size:ye(re()),annotations:lo.optional(),_meta:ye(Ze({}))}),dI=z({...co.shape,...Xi.shape,uriTemplate:h(),description:ye(h()),mimeType:ye(h()),annotations:lo.optional(),_meta:ye(Ze({}))}),ll=Yi.extend({method:R("resources/list")}),pI=Qi.extend({resources:ee(Pb)}),dl=Yi.extend({method:R("resources/templates/list")}),fI=Qi.extend({resourceTemplates:ee(dI)}),Dm=ht.extend({uri:h()}),mI=Dm,pl=Me.extend({method:R("resources/read"),params:mI}),hI=Le.extend({contents:ee(ge([Ib,Tb]))}),gI=$t.extend({method:R("notifications/resources/list_changed"),params:bt.optional()}),vI=Dm,yI=Me.extend({method:R("resources/subscribe"),params:vI}),_I=Dm,bI=Me.extend({method:R("resources/unsubscribe"),params:_I}),$I=bt.extend({uri:h()}),xI=$t.extend({method:R("notifications/resources/updated"),params:$I}),kI=z({name:h(),description:ye(h()),required:ye(be())}),wI=z({...co.shape,...Xi.shape,description:ye(h()),arguments:ye(ee(kI)),_meta:ye(Ze({}))}),fl=Yi.extend({method:R("prompts/list")}),SI=Qi.extend({prompts:ee(wI)}),zI=ht.extend({name:h(),arguments:pe(h(),h()).optional()}),ml=Me.extend({method:R("prompts/get"),params:zI}),Cm=z({type:R("text"),text:h(),annotations:lo.optional(),_meta:pe(h(),he()).optional()}),Am=z({type:R("image"),data:Nm,mimeType:h(),annotations:lo.optional(),_meta:pe(h(),he()).optional()}),Um=z({type:R("audio"),data:Nm,mimeType:h(),annotations:lo.optional(),_meta:pe(h(),he()).optional()}),II=z({type:R("tool_use"),name:h(),id:h(),input:pe(h(),he()),_meta:pe(h(),he()).optional()}),TI=z({type:R("resource"),resource:ge([Ib,Tb]),annotations:lo.optional(),_meta:pe(h(),he()).optional()}),PI=Pb.extend({type:R("resource_link")}),Zm=ge([Cm,Am,Um,PI,TI]),EI=z({role:ra,content:Zm}),OI=Le.extend({description:h().optional(),messages:ee(EI)}),jI=$t.extend({method:R("notifications/prompts/list_changed"),params:bt.optional()}),RI=z({title:h().optional(),readOnlyHint:be().optional(),destructiveHint:be().optional(),idempotentHint:be().optional(),openWorldHint:be().optional()}),NI=z({taskSupport:je(["required","optional","forbidden"]).optional()}),Eb=z({...co.shape,...Xi.shape,description:h().optional(),inputSchema:z({type:R("object"),properties:pe(h(),Re).optional(),required:ee(h()).optional()}).catchall(he()),outputSchema:z({type:R("object"),properties:pe(h(),Re).optional(),required:ee(h()).optional()}).catchall(he()).optional(),annotations:RI.optional(),execution:NI.optional(),_meta:pe(h(),he()).optional()}),hl=Yi.extend({method:R("tools/list")}),DI=Qi.extend({tools:ee(Eb)}),gl=Le.extend({content:ee(Zm).default([]),structuredContent:pe(h(),he()).optional(),isError:be().optional()}),fA=gl.or(Le.extend({toolResult:he()})),CI=Bi.extend({name:h(),arguments:pe(h(),he()).optional()}),po=Me.extend({method:R("tools/call"),params:CI}),AI=$t.extend({method:R("notifications/tools/list_changed"),params:bt.optional()}),mA=z({autoRefresh:be().default(!0),debounceMs:re().int().nonnegative().default(300)}),na=je(["debug","info","notice","warning","error","critical","alert","emergency"]),UI=ht.extend({level:na}),Mm=Me.extend({method:R("logging/setLevel"),params:UI}),ZI=bt.extend({level:na,logger:h().optional(),data:he()}),MI=$t.extend({method:R("notifications/message"),params:ZI}),LI=z({name:h().optional()}),qI=z({hints:ee(LI).optional(),costPriority:re().min(0).max(1).optional(),speedPriority:re().min(0).max(1).optional(),intelligencePriority:re().min(0).max(1).optional()}),FI=z({mode:je(["auto","required","none"]).optional()}),VI=z({type:R("tool_result"),toolUseId:h().describe("The unique identifier for the corresponding tool call."),content:ee(Zm).default([]),structuredContent:z({}).loose().optional(),isError:be().optional(),_meta:pe(h(),he()).optional()}),HI=Hi("type",[Cm,Am,Um]),Xu=Hi("type",[Cm,Am,Um,II,VI]),WI=z({role:ra,content:ge([Xu,ee(Xu)]),_meta:pe(h(),he()).optional()}),JI=Bi.extend({messages:ee(WI),modelPreferences:qI.optional(),systemPrompt:h().optional(),includeContext:je(["none","thisServer","allServers"]).optional(),temperature:re().optional(),maxTokens:re().int(),stopSequences:ee(h()).optional(),metadata:Re.optional(),tools:ee(Eb).optional(),toolChoice:FI.optional()}),GI=Me.extend({method:R("sampling/createMessage"),params:JI}),oa=Le.extend({model:h(),stopReason:ye(je(["endTurn","stopSequence","maxTokens"]).or(h())),role:ra,content:HI}),Lm=Le.extend({model:h(),stopReason:ye(je(["endTurn","stopSequence","maxTokens","toolUse"]).or(h())),role:ra,content:ge([Xu,ee(Xu)])}),BI=z({type:R("boolean"),title:h().optional(),description:h().optional(),default:be().optional()}),KI=z({type:R("string"),title:h().optional(),description:h().optional(),minLength:re().optional(),maxLength:re().optional(),format:je(["email","uri","date","date-time"]).optional(),default:h().optional()}),XI=z({type:je(["number","integer"]),title:h().optional(),description:h().optional(),minimum:re().optional(),maximum:re().optional(),default:re().optional()}),YI=z({type:R("string"),title:h().optional(),description:h().optional(),enum:ee(h()),default:h().optional()}),QI=z({type:R("string"),title:h().optional(),description:h().optional(),oneOf:ee(z({const:h(),title:h()})),default:h().optional()}),eT=z({type:R("string"),title:h().optional(),description:h().optional(),enum:ee(h()),enumNames:ee(h()).optional(),default:h().optional()}),tT=ge([YI,QI]),rT=z({type:R("array"),title:h().optional(),description:h().optional(),minItems:re().optional(),maxItems:re().optional(),items:z({type:R("string"),enum:ee(h())}),default:ee(h()).optional()}),nT=z({type:R("array"),title:h().optional(),description:h().optional(),minItems:re().optional(),maxItems:re().optional(),items:z({anyOf:ee(z({const:h(),title:h()}))}),default:ee(h()).optional()}),oT=ge([rT,nT]),iT=ge([eT,tT,oT]),aT=ge([iT,BI,KI,XI]),sT=Bi.extend({mode:R("form").optional(),message:h(),requestedSchema:z({type:R("object"),properties:pe(h(),aT),required:ee(h()).optional()})}),cT=Bi.extend({mode:R("url"),message:h(),elicitationId:h(),url:h().url()}),uT=ge([sT,cT]),lT=Me.extend({method:R("elicitation/create"),params:uT}),dT=bt.extend({elicitationId:h()}),pT=$t.extend({method:R("notifications/elicitation/complete"),params:dT}),fo=Le.extend({action:je(["accept","decline","cancel"]),content:Gi(e=>e===null?void 0:e,pe(h(),ge([h(),re(),be(),ee(h())])).optional())}),fT=z({type:R("ref/resource"),uri:h()});var mT=z({type:R("ref/prompt"),name:h()}),hT=ht.extend({ref:ge([mT,fT]),argument:z({name:h(),value:h()}),context:z({arguments:pe(h(),h()).optional()}).optional()}),vl=Me.extend({method:R("completion/complete"),params:hT});function Ob(e){if(e.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function jb(e){if(e.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}var gT=Le.extend({completion:Ze({values:ee(h()).max(100),total:ye(re().int()),hasMore:ye(be())})}),vT=z({uri:h().startsWith("file://"),name:h().optional(),_meta:pe(h(),he()).optional()}),yT=Me.extend({method:R("roots/list"),params:ht.optional()}),qm=Le.extend({roots:ee(vT)}),_T=$t.extend({method:R("notifications/roots/list_changed"),params:bt.optional()}),hA=ge([rl,jm,vl,Mm,ml,fl,ll,dl,pl,yI,bI,po,hl,ol,al,sl,ul]),gA=ge([tl,nl,Rm,_T,ta]),vA=ge([el,oa,Lm,fo,qm,il,cl,uo]),yA=ge([rl,GI,lT,yT,ol,al,sl,ul]),_A=ge([tl,nl,MI,xI,gI,AI,jI,ta,pT]),bA=ge([el,iI,gT,OI,SI,pI,fI,hI,gl,DI,il,cl,uo]),N=class e extends Error{constructor(t,n,o){super(`MCP error ${t}: ${n}`),this.code=t,this.data=o,this.name="McpError"}static fromError(t,n,o){if(t===U.UrlElicitationRequired&&o){let r=o;if(r.elicitations)return new zm(r.elicitations,n)}return new e(t,n,o)}},zm=class extends N{constructor(t,n=`URL elicitation${t.length>1?"s":""} required`){super(U.UrlElicitationRequired,n,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}};function Or(e){return e==="completed"||e==="failed"||e==="cancelled"}var Nb=Symbol("Let zodToJsonSchema decide on which parser to use");var Rb={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"},Db=e=>typeof e=="string"?{...Rb,name:e}:{...Rb,...e};var Cb=e=>{let t=Db(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(([o,r])=>[r._def,{def:r._def,path:[...t.basePath,t.definitionPath,o],jsonSchema:void 0}]))}};function Fm(e,t,n,o){o?.errorMessages&&n&&(e.errorMessage={...e.errorMessage,[t]:n})}function ie(e,t,n,o,r){e[t]=n,Fm(e,t,o,r)}var yl=(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 ke(e){if(e.target!=="openAi")return{};let t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:e.$refStrategy==="relative"?yl(t,e.currentPath):t.join("/")}}function Ab(e,t){let n={type:"array"};return e.type?._def&&e.type?._def?.typeName!==k.ZodAny&&(n.items=L(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&ie(n,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&ie(n,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(ie(n,"minItems",e.exactLength.value,e.exactLength.message,t),ie(n,"maxItems",e.exactLength.value,e.exactLength.message,t)),n}function Ub(e,t){let n={type:"integer",format:"int64"};if(!e.checks)return n;for(let o of e.checks)switch(o.kind){case"min":t.target==="jsonSchema7"?o.inclusive?ie(n,"minimum",o.value,o.message,t):ie(n,"exclusiveMinimum",o.value,o.message,t):(o.inclusive||(n.exclusiveMinimum=!0),ie(n,"minimum",o.value,o.message,t));break;case"max":t.target==="jsonSchema7"?o.inclusive?ie(n,"maximum",o.value,o.message,t):ie(n,"exclusiveMaximum",o.value,o.message,t):(o.inclusive||(n.exclusiveMaximum=!0),ie(n,"maximum",o.value,o.message,t));break;case"multipleOf":ie(n,"multipleOf",o.value,o.message,t);break}return n}function Zb(){return{type:"boolean"}}function _l(e,t){return L(e.type._def,t)}var Mb=(e,t)=>L(e.innerType._def,t);function Vm(e,t,n){let o=n??t.dateStrategy;if(Array.isArray(o))return{anyOf:o.map((r,i)=>Vm(e,t,r))};switch(o){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return bT(e,t)}}var bT=(e,t)=>{let n={type:"integer",format:"unix-time"};if(t.target==="openApi3")return n;for(let o of e.checks)switch(o.kind){case"min":ie(n,"minimum",o.value,o.message,t);break;case"max":ie(n,"maximum",o.value,o.message,t);break}return n};function Lb(e,t){return{...L(e.innerType._def,t),default:e.defaultValue()}}function qb(e,t){return t.effectStrategy==="input"?L(e.schema._def,t):ke(t)}function Fb(e){return{type:"string",enum:Array.from(e.values)}}var $T=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function Vb(e,t){let n=[L(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),L(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(i=>!!i),o=t.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,r=[];return n.forEach(i=>{if($T(i))r.push(...i.allOf),i.unevaluatedProperties===void 0&&(o=void 0);else{let a=i;if("additionalProperties"in i&&i.additionalProperties===!1){let{additionalProperties:s,...c}=i;a=c}else o=void 0;r.push(a)}}),r.length?{allOf:r,...o}:void 0}function Hb(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 Hm,Nt={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:()=>(Hm===void 0&&(Hm=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Hm),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 bl(e,t){let n={type:"string"};if(e.checks)for(let o of e.checks)switch(o.kind){case"min":ie(n,"minLength",typeof n.minLength=="number"?Math.max(n.minLength,o.value):o.value,o.message,t);break;case"max":ie(n,"maxLength",typeof n.maxLength=="number"?Math.min(n.maxLength,o.value):o.value,o.message,t);break;case"email":switch(t.emailStrategy){case"format:email":Dt(n,"email",o.message,t);break;case"format:idn-email":Dt(n,"idn-email",o.message,t);break;case"pattern:zod":Ye(n,Nt.email,o.message,t);break}break;case"url":Dt(n,"uri",o.message,t);break;case"uuid":Dt(n,"uuid",o.message,t);break;case"regex":Ye(n,o.regex,o.message,t);break;case"cuid":Ye(n,Nt.cuid,o.message,t);break;case"cuid2":Ye(n,Nt.cuid2,o.message,t);break;case"startsWith":Ye(n,RegExp(`^${Wm(o.value,t)}`),o.message,t);break;case"endsWith":Ye(n,RegExp(`${Wm(o.value,t)}$`),o.message,t);break;case"datetime":Dt(n,"date-time",o.message,t);break;case"date":Dt(n,"date",o.message,t);break;case"time":Dt(n,"time",o.message,t);break;case"duration":Dt(n,"duration",o.message,t);break;case"length":ie(n,"minLength",typeof n.minLength=="number"?Math.max(n.minLength,o.value):o.value,o.message,t),ie(n,"maxLength",typeof n.maxLength=="number"?Math.min(n.maxLength,o.value):o.value,o.message,t);break;case"includes":{Ye(n,RegExp(Wm(o.value,t)),o.message,t);break}case"ip":{o.version!=="v6"&&Dt(n,"ipv4",o.message,t),o.version!=="v4"&&Dt(n,"ipv6",o.message,t);break}case"base64url":Ye(n,Nt.base64url,o.message,t);break;case"jwt":Ye(n,Nt.jwt,o.message,t);break;case"cidr":{o.version!=="v6"&&Ye(n,Nt.ipv4Cidr,o.message,t),o.version!=="v4"&&Ye(n,Nt.ipv6Cidr,o.message,t);break}case"emoji":Ye(n,Nt.emoji(),o.message,t);break;case"ulid":{Ye(n,Nt.ulid,o.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{Dt(n,"binary",o.message,t);break}case"contentEncoding:base64":{ie(n,"contentEncoding","base64",o.message,t);break}case"pattern:zod":{Ye(n,Nt.base64,o.message,t);break}}break}case"nanoid":Ye(n,Nt.nanoid,o.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return n}function Wm(e,t){return t.patternStrategy==="escape"?kT(e):e}var xT=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function kT(e){let t="";for(let n=0;n<e.length;n++)xT.has(e[n])||(t+="\\"),t+=e[n];return t}function Dt(e,t,n,o){e.format||e.anyOf?.some(r=>r.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&o.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&&o.errorMessages&&{errorMessage:{format:n}}})):ie(e,"format",t,n,o)}function Ye(e,t,n,o){e.pattern||e.allOf?.some(r=>r.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&o.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:Wb(t,o),...n&&o.errorMessages&&{errorMessage:{pattern:n}}})):ie(e,"pattern",Wb(t,o),n,o)}function Wb(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")},o=n.i?e.source.toLowerCase():e.source,r="",i=!1,a=!1,s=!1;for(let c=0;c<o.length;c++){if(i){r+=o[c],i=!1;continue}if(n.i){if(a){if(o[c].match(/[a-z]/)){s?(r+=o[c],r+=`${o[c-2]}-${o[c]}`.toUpperCase(),s=!1):o[c+1]==="-"&&o[c+2]?.match(/[a-z]/)?(r+=o[c],s=!0):r+=`${o[c]}${o[c].toUpperCase()}`;continue}}else if(o[c].match(/[a-z]/)){r+=`[${o[c]}${o[c].toUpperCase()}]`;continue}}if(n.m){if(o[c]==="^"){r+=`(^|(?<=[\r
|
|
58
|
+
]))`;continue}else if(o[c]==="$"){r+=`($|(?=[\r
|
|
59
|
+
]))`;continue}}if(n.s&&o[c]==="."){r+=a?`${o[c]}\r
|
|
60
|
+
`:`[${o[c]}\r
|
|
61
|
+
]`;continue}r+=o[c],o[c]==="\\"?i=!0:a&&o[c]==="]"?a=!1:!a&&o[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 $l(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===k.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((o,r)=>({...o,[r]:L(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",r]})??ke(t)}),{}),additionalProperties:t.rejectedAdditionalProperties};let n={type:"object",additionalProperties:L(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if(t.target==="openApi3")return n;if(e.keyType?._def.typeName===k.ZodString&&e.keyType._def.checks?.length){let{type:o,...r}=bl(e.keyType._def,t);return{...n,propertyNames:r}}else{if(e.keyType?._def.typeName===k.ZodEnum)return{...n,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===k.ZodBranded&&e.keyType._def.type._def.typeName===k.ZodString&&e.keyType._def.type._def.checks?.length){let{type:o,...r}=_l(e.keyType._def,t);return{...n,propertyNames:r}}}return n}function Jb(e,t){if(t.mapStrategy==="record")return $l(e,t);let n=L(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||ke(t),o=L(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||ke(t);return{type:"array",maxItems:125,items:{type:"array",items:[n,o],minItems:2,maxItems:2}}}function Gb(e){let t=e.values,o=Object.keys(e.values).filter(i=>typeof t[t[i]]!="number").map(i=>t[i]),r=Array.from(new Set(o.map(i=>typeof i)));return{type:r.length===1?r[0]==="string"?"string":"number":["string","number"],enum:o}}function Bb(e){return e.target==="openAi"?void 0:{not:ke({...e,currentPath:[...e.currentPath,"not"]})}}function Kb(e){return e.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var ia={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function Yb(e,t){if(t.target==="openApi3")return Xb(e,t);let n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every(o=>o._def.typeName in ia&&(!o._def.checks||!o._def.checks.length))){let o=n.reduce((r,i)=>{let a=ia[i._def.typeName];return a&&!r.includes(a)?[...r,a]:r},[]);return{type:o.length>1?o:o[0]}}else if(n.every(o=>o._def.typeName==="ZodLiteral"&&!o.description)){let o=n.reduce((r,i)=>{let a=typeof i._def.value;switch(a){case"string":case"number":case"boolean":return[...r,a];case"bigint":return[...r,"integer"];case"object":if(i._def.value===null)return[...r,"null"];default:return r}},[]);if(o.length===n.length){let r=o.filter((i,a,s)=>s.indexOf(i)===a);return{type:r.length>1?r:r[0],enum:n.reduce((i,a)=>i.includes(a._def.value)?i:[...i,a._def.value],[])}}}else if(n.every(o=>o._def.typeName==="ZodEnum"))return{type:"string",enum:n.reduce((o,r)=>[...o,...r._def.values.filter(i=>!o.includes(i))],[])};return Xb(e,t)}var Xb=(e,t)=>{let n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((o,r)=>L(o._def,{...t,currentPath:[...t.currentPath,"anyOf",`${r}`]})).filter(o=>!!o&&(!t.strictUnions||typeof o=="object"&&Object.keys(o).length>0));return n.length?{anyOf:n}:void 0};function Qb(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:ia[e.innerType._def.typeName],nullable:!0}:{type:[ia[e.innerType._def.typeName],"null"]};if(t.target==="openApi3"){let o=L(e.innerType._def,{...t,currentPath:[...t.currentPath]});return o&&"$ref"in o?{allOf:[o],nullable:!0}:o&&{...o,nullable:!0}}let n=L(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return n&&{anyOf:[n,{type:"null"}]}}function e$(e,t){let n={type:"number"};if(!e.checks)return n;for(let o of e.checks)switch(o.kind){case"int":n.type="integer",Fm(n,"type",o.message,t);break;case"min":t.target==="jsonSchema7"?o.inclusive?ie(n,"minimum",o.value,o.message,t):ie(n,"exclusiveMinimum",o.value,o.message,t):(o.inclusive||(n.exclusiveMinimum=!0),ie(n,"minimum",o.value,o.message,t));break;case"max":t.target==="jsonSchema7"?o.inclusive?ie(n,"maximum",o.value,o.message,t):ie(n,"exclusiveMaximum",o.value,o.message,t):(o.inclusive||(n.exclusiveMaximum=!0),ie(n,"maximum",o.value,o.message,t));break;case"multipleOf":ie(n,"multipleOf",o.value,o.message,t);break}return n}function t$(e,t){let n=t.target==="openAi",o={type:"object",properties:{}},r=[],i=e.shape();for(let s in i){let c=i[s];if(c===void 0||c._def===void 0)continue;let u=ST(c);u&&n&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),u=!1);let l=L(c._def,{...t,currentPath:[...t.currentPath,"properties",s],propertyPath:[...t.currentPath,"properties",s]});l!==void 0&&(o.properties[s]=l,u||r.push(s))}r.length&&(o.required=r);let a=wT(e,t);return a!==void 0&&(o.additionalProperties=a),o}function wT(e,t){if(e.catchall._def.typeName!=="ZodNever")return L(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 ST(e){try{return e.isOptional()}catch{return!0}}var r$=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return L(e.innerType._def,t);let n=L(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return n?{anyOf:[{not:ke(t)},n]}:ke(t)};var n$=(e,t)=>{if(t.pipeStrategy==="input")return L(e.in._def,t);if(t.pipeStrategy==="output")return L(e.out._def,t);let n=L(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),o=L(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",n?"1":"0"]});return{allOf:[n,o].filter(r=>r!==void 0)}};function o$(e,t){return L(e.type._def,t)}function i$(e,t){let o={type:"array",uniqueItems:!0,items:L(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&ie(o,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&ie(o,"maxItems",e.maxSize.value,e.maxSize.message,t),o}function a$(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((n,o)=>L(n._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]})).reduce((n,o)=>o===void 0?n:[...n,o],[]),additionalItems:L(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((n,o)=>L(n._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]})).reduce((n,o)=>o===void 0?n:[...n,o],[])}}function s$(e){return{not:ke(e)}}function c$(e){return ke(e)}var u$=(e,t)=>L(e.innerType._def,t);var l$=(e,t,n)=>{switch(t){case k.ZodString:return bl(e,n);case k.ZodNumber:return e$(e,n);case k.ZodObject:return t$(e,n);case k.ZodBigInt:return Ub(e,n);case k.ZodBoolean:return Zb();case k.ZodDate:return Vm(e,n);case k.ZodUndefined:return s$(n);case k.ZodNull:return Kb(n);case k.ZodArray:return Ab(e,n);case k.ZodUnion:case k.ZodDiscriminatedUnion:return Yb(e,n);case k.ZodIntersection:return Vb(e,n);case k.ZodTuple:return a$(e,n);case k.ZodRecord:return $l(e,n);case k.ZodLiteral:return Hb(e,n);case k.ZodEnum:return Fb(e);case k.ZodNativeEnum:return Gb(e);case k.ZodNullable:return Qb(e,n);case k.ZodOptional:return r$(e,n);case k.ZodMap:return Jb(e,n);case k.ZodSet:return i$(e,n);case k.ZodLazy:return()=>e.getter()._def;case k.ZodPromise:return o$(e,n);case k.ZodNaN:case k.ZodNever:return Bb(n);case k.ZodEffects:return qb(e,n);case k.ZodAny:return ke(n);case k.ZodUnknown:return c$(n);case k.ZodDefault:return Lb(e,n);case k.ZodBranded:return _l(e,n);case k.ZodReadonly:return u$(e,n);case k.ZodCatch:return Mb(e,n);case k.ZodPipeline:return n$(e,n);case k.ZodFunction:case k.ZodVoid:case k.ZodSymbol:return;default:return(o=>{})(t)}};function L(e,t,n=!1){let o=t.seen.get(e);if(t.override){let s=t.override?.(e,t,o,n);if(s!==Nb)return s}if(o&&!n){let s=zT(o,t);if(s!==void 0)return s}let r={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,r);let i=l$(e,e.typeName,t),a=typeof i=="function"?L(i(),t):i;if(a&&IT(e,t,a),t.postProcess){let s=t.postProcess(a,e,t);return r.jsonSchema=a,s}return r.jsonSchema=a,a}var zT=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:yl(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((n,o)=>t.currentPath[o]===n)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),ke(t)):t.$refStrategy==="seen"?ke(t):void 0}},IT=(e,t,n)=>(e.description&&(n.description=e.description,t.markdownDescription&&(n.markdownDescription=e.description)),n);var Jm=(e,t)=>{let n=Cb(t),o=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[u,l])=>({...c,[u]:L(l._def,{...n,currentPath:[...n.basePath,n.definitionPath,u]},!0)??ke(n)}),{}):void 0,r=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,i=L(e._def,r===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,r]},!1)??ke(n),a=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;a!==void 0&&(i.title=a),n.flags.hasReferencedOpenAiAnyType&&(o||(o={}),o[n.openAiAnyTypeName]||(o[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?o?{...i,[n.definitionPath]:o}:i:{$ref:[...n.$refStrategy==="relative"?[]:n.basePath,n.definitionPath,r].join("/"),[n.definitionPath]:{...o,[r]:i}};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 TT(e){return!e||e==="jsonSchema7"||e==="draft-7"?"draft-7":e==="jsonSchema2019-09"||e==="draft-2020-12"?"draft-2020-12":"draft-7"}function Gm(e,t){return _t(e)?sn(e,{target:TT(t?.target),io:t?.pipeStrategy??"input"}):Jm(e,{strictUnions:t?.strictUnions??!0,pipeStrategy:t?.pipeStrategy??"input"})}function Bm(e){let n=Tr(e)?.method;if(!n)throw new Error("Schema is missing a method literal");let o=_u(n);if(typeof o!="string")throw new Error("Schema method literal must be a string");return o}function Km(e,t){let n=Ir(e,t);if(!n.success)throw n.error;return n.data}var PT=6e4,xl=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(tl,n=>{this._oncancel(n)}),this.setNotificationHandler(nl,n=>{this._onprogress(n)}),this.setRequestHandler(rl,n=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(ol,async(n,o)=>{let r=await this._taskStore.getTask(n.params.taskId,o.sessionId);if(!r)throw new N(U.InvalidParams,"Failed to retrieve task: Task not found");return{...r}}),this.setRequestHandler(al,async(n,o)=>{let r=async()=>{let i=n.params.taskId;if(this._taskMessageQueue){let s;for(;s=await this._taskMessageQueue.dequeue(i,o.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 N(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:o.requestId})}}let a=await this._taskStore.getTask(i,o.sessionId);if(!a)throw new N(U.InvalidParams,`Task not found: ${i}`);if(!Or(a.status))return await this._waitForTaskUpdate(i,o.signal),await r();if(Or(a.status)){let s=await this._taskStore.getTaskResult(i,o.sessionId);return this._clearTaskQueue(i),{...s,_meta:{...s._meta,[Er]:{taskId:i}}}}return await r()};return await r()}),this.setRequestHandler(sl,async(n,o)=>{try{let{tasks:r,nextCursor:i}=await this._taskStore.listTasks(n.params?.cursor,o.sessionId);return{tasks:r,nextCursor:i,_meta:{}}}catch(r){throw new N(U.InvalidParams,`Failed to list tasks: ${r instanceof Error?r.message:String(r)}`)}}),this.setRequestHandler(ul,async(n,o)=>{try{let r=await this._taskStore.getTask(n.params.taskId,o.sessionId);if(!r)throw new N(U.InvalidParams,`Task not found: ${n.params.taskId}`);if(Or(r.status))throw new N(U.InvalidParams,`Cannot cancel task in terminal status: ${r.status}`);await this._taskStore.updateTaskStatus(n.params.taskId,"cancelled","Client cancelled task execution.",o.sessionId),this._clearTaskQueue(n.params.taskId);let i=await this._taskStore.getTask(n.params.taskId,o.sessionId);if(!i)throw new N(U.InvalidParams,`Task not found after cancellation: ${n.params.taskId}`);return{_meta:{},...i}}catch(r){throw r instanceof N?r:new N(U.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,o,r,i=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(r,n),startTime:Date.now(),timeout:n,maxTotalTimeout:o,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(t){let n=this._timeoutInfo.get(t);if(!n)return!1;let o=Date.now()-n.startTime;if(n.maxTotalTimeout&&o>=n.maxTotalTimeout)throw this._timeoutInfo.delete(t),N.fromError(U.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:n.maxTotalTimeout,totalElapsed:o});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 o=this.transport?.onerror;this._transport.onerror=i=>{o?.(i),this._onerror(i)};let r=this._transport?.onmessage;this._transport.onmessage=(i,a)=>{r?.(i,a),Ki(i)||xb(i)?this._onresponse(i):Pm(i)?this._onrequest(i,a):$b(i)?this._onnotification(i):this._onerror(new Error(`Unknown message type: ${JSON.stringify(i)}`))},await this._transport.start()}_onclose(){let t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let o of this._timeoutInfo.values())clearTimeout(o.timeoutId);this._timeoutInfo.clear();for(let o of this._requestHandlerAbortControllers.values())o.abort();this._requestHandlerAbortControllers.clear();let n=N.fromError(U.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let o of t.values())o(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(o=>this._onerror(new Error(`Uncaught error in notification handler: ${o}`)))}_onrequest(t,n){let o=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,r=this._transport,i=t.params?._meta?.[Er]?.taskId;if(o===void 0){let l={jsonrpc:"2.0",id:t.id,error:{code:U.MethodNotFound,message:"Method not found"}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:"error",message:l,timestamp:Date.now()},r?.sessionId).catch(d=>this._onerror(new Error(`Failed to enqueue error response: ${d}`))):r?.send(l).catch(d=>this._onerror(new Error(`Failed to send an error response: ${d}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(t.id,a);let s=yb(t.params)?t.params.task:void 0,c=this._taskStore?this.requestTaskStore(t,r?.sessionId):void 0,u={signal:a.signal,sessionId:r?.sessionId,_meta:t.params?._meta,sendNotification:async l=>{if(a.signal.aborted)return;let d={relatedRequestId:t.id};i&&(d.relatedTask={taskId:i}),await this.notification(l,d)},sendRequest:async(l,d,p)=>{if(a.signal.aborted)throw new N(U.ConnectionClosed,"Request was cancelled");let f={...p,relatedRequestId:t.id};i&&!f.relatedTask&&(f.relatedTask={taskId:i});let g=f.relatedTask?.taskId??i;return g&&c&&await c.updateTaskStatus(g,"input_required"),await this.request(l,d,f)},authInfo:n?.authInfo,requestId:t.id,requestInfo:n?.requestInfo,taskId:i,taskStore:c,taskRequestedTtl:s?.ttl,closeSSEStream:n?.closeSSEStream,closeStandaloneSSEStream:n?.closeStandaloneSSEStream};Promise.resolve().then(()=>{s&&this.assertTaskHandlerCapability(t.method)}).then(()=>o(t,u)).then(async l=>{if(a.signal.aborted)return;let d={result:l,jsonrpc:"2.0",id:t.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"response",message:d,timestamp:Date.now()},r?.sessionId):await r?.send(d)},async l=>{if(a.signal.aborted)return;let d={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(l.code)?l.code:U.InternalError,message:l.message??"Internal error",...l.data!==void 0&&{data:l.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"error",message:d,timestamp:Date.now()},r?.sessionId):await r?.send(d)}).catch(l=>this._onerror(new Error(`Failed to send response: ${l}`))).finally(()=>{this._requestHandlerAbortControllers.get(t.id)===a&&this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){let{progressToken:n,...o}=t.params,r=Number(n),i=this._progressHandlers.get(r);if(!i){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}i(o)}_onresponse(t){let n=Number(t.id),o=this._requestResolvers.get(n);if(o){if(this._requestResolvers.delete(n),Ki(t))o(t);else{let a=new N(t.error.code,t.error.message,t.error.data);o(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 i=!1;if(Ki(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"&&(i=!0,this._taskProgressTokens.set(s.taskId,n))}}if(i||this._progressHandlers.delete(n),Ki(t))r(t);else{let a=N.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,o){let{task:r}=o??{};if(!r){try{yield{type:"result",result:await this.request(t,n,o)}}catch(a){yield{type:"error",error:a instanceof N?a:new N(U.InternalError,String(a))}}return}let i;try{let a=await this.request(t,uo,o);if(a.task)i=a.task.taskId,yield{type:"taskCreated",task:a.task};else throw new N(U.InternalError,"Task creation did not return a task");for(;;){let s=await this.getTask({taskId:i},o);if(yield{type:"taskStatus",task:s},Or(s.status)){s.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:i},n,o)}:s.status==="failed"?yield{type:"error",error:new N(U.InternalError,`Task ${i} failed`)}:s.status==="cancelled"&&(yield{type:"error",error:new N(U.InternalError,`Task ${i} was cancelled`)});return}if(s.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:i},n,o)};return}let c=s.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(u=>setTimeout(u,c)),o?.signal?.throwIfAborted()}}catch(a){yield{type:"error",error:a instanceof N?a:new N(U.InternalError,String(a))}}}request(t,n,o){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,task:s,relatedTask:c}=o??{};return new Promise((u,l)=>{let d=Z=>{l(Z)};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(Z){d(Z);return}o?.signal?.throwIfAborted();let p=this._requestMessageId++,f={...t,jsonrpc:"2.0",id:p};o?.onprogress&&(this._progressHandlers.set(p,o.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||{},[Er]:c}});let g=Z=>{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(Z)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(V=>this._onerror(new Error(`Failed to send cancellation: ${V}`)));let D=Z instanceof N?Z:new N(U.RequestTimeout,String(Z));l(D)};this._responseHandlers.set(p,Z=>{if(!o?.signal?.aborted){if(Z instanceof Error)return l(Z);try{let D=Ir(n,Z.result);D.success?u(D.data):l(D.error)}catch(D){l(D)}}}),o?.signal?.addEventListener("abort",()=>{g(o?.signal?.reason)});let y=o?.timeout??PT,S=()=>g(N.fromError(U.RequestTimeout,"Request timed out",{timeout:y}));this._setupTimeout(p,y,o?.maxTotalTimeout,S,o?.resetTimeoutOnProgress??!1);let P=c?.taskId;if(P){let Z=D=>{let V=this._responseHandlers.get(p);V?V(D):this._onerror(new Error(`Response handler missing for side-channeled request ${p}`))};this._requestResolvers.set(p,Z),this._enqueueTaskMessage(P,{type:"request",message:f,timestamp:Date.now()}).catch(D=>{this._cleanupTimeout(p),l(D)})}else this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(Z=>{this._cleanupTimeout(p),l(Z)})})}async getTask(t,n){return this.request({method:"tasks/get",params:t},il,n)}async getTaskResult(t,n,o){return this.request({method:"tasks/result",params:t},n,o)}async listTasks(t,n){return this.request({method:"tasks/list",params:t},cl,n)}async cancelTask(t,n){return this.request({method:"tasks/cancel",params:t},Sb,n)}async notification(t,n){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);let o=n?.relatedTask?.taskId;if(o){let s={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[Er]:n.relatedTask}}};await this._enqueueTaskMessage(o,{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||{},[Er]: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||{},[Er]:n.relatedTask}}}),await this._transport.send(a,n)}setRequestHandler(t,n){let o=Bm(t);this.assertRequestHandlerCapability(o),this._requestHandlers.set(o,(r,i)=>{let a=Km(t,r);return Promise.resolve(n(a,i))})}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 o=Bm(t);this._notificationHandlers.set(o,r=>{let i=Km(t,r);return Promise.resolve(n(i))})}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,o){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,o,r)}async _clearTaskQueue(t,n){if(this._taskMessageQueue){let o=await this._taskMessageQueue.dequeueAll(t,n);for(let r of o)if(r.type==="request"&&Pm(r.message)){let i=r.message.id,a=this._requestResolvers.get(i);a?(a(new N(U.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(i)):this._onerror(new Error(`Resolver missing for request ${i} during task ${t} cleanup`))}}}async _waitForTaskUpdate(t,n){let o=this._options?.defaultTaskPollInterval??1e3;try{let r=await this._taskStore?.getTask(t);r?.pollInterval&&(o=r.pollInterval)}catch{}return new Promise((r,i)=>{if(n.aborted){i(new N(U.InvalidRequest,"Request cancelled"));return}let a=setTimeout(r,o);n.addEventListener("abort",()=>{clearTimeout(a),i(new N(U.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,n){let o=this._taskStore;if(!o)throw new Error("No task store configured");return{createTask:async r=>{if(!t)throw new Error("No request provided");return await o.createTask(r,t.id,{method:t.method,params:t.params},n)},getTask:async r=>{let i=await o.getTask(r,n);if(!i)throw new N(U.InvalidParams,"Failed to retrieve task: Task not found");return i},storeTaskResult:async(r,i,a)=>{await o.storeTaskResult(r,i,a,n);let s=await o.getTask(r,n);if(s){let c=ta.parse({method:"notifications/tasks/status",params:s});await this.notification(c),Or(s.status)&&this._cleanupTaskProgressHandler(r)}},getTaskResult:r=>o.getTaskResult(r,n),updateTaskStatus:async(r,i,a)=>{let s=await o.getTask(r,n);if(!s)throw new N(U.InvalidParams,`Task "${r}" not found - it may have been cleaned up`);if(Or(s.status))throw new N(U.InvalidParams,`Cannot update task "${r}" from terminal status "${s.status}" to "${i}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await o.updateTaskStatus(r,i,a,n);let c=await o.getTask(r,n);if(c){let u=ta.parse({method:"notifications/tasks/status",params:c});await this.notification(u),Or(c.status)&&this._cleanupTaskProgressHandler(r)}},listTasks:r=>o.listTasks(r,n)}}};function d$(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function p$(e,t){let n={...e};for(let o in t){let r=o,i=t[r];if(i===void 0)continue;let a=n[r];d$(a)&&d$(i)?n[r]={...a,...i}:n[r]=i}return n}var Yk=nv(Dg(),1),Qk=nv(Xk(),1);function bN(){let e=new Yk.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,Qk.default)(e),e}var od=class{constructor(t){this._ajv=t??bN()}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 o=>n(o)?{valid:!0,data:o,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(n.errors)}}};var id=class{constructor(t){this._server=t}requestStream(t,n,o){return this._server.requestStream(t,n,o)}createMessageStream(t,n){let o=this._server.getClientCapabilities();if((t.tools||t.toolChoice)&&!o?.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],i=Array.isArray(r.content)?r.content:[r.content],a=i.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(i.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(i.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},oa,n)}elicitInputStream(t,n){let o=this._server.getClientCapabilities(),r=t.mode??"form";switch(r){case"url":{if(!o?.elicitation?.url)throw new Error("Client does not support url elicitation.");break}case"form":{if(!o?.elicitation?.form)throw new Error("Client does not support form elicitation.");break}}let i=r==="form"&&t.mode===void 0?{...t,mode:"form"}:t;return this.requestStream({method:"elicitation/create",params:i},fo,n)}async getTask(t,n){return this._server.getTask({taskId:t},n)}async getTaskResult(t,n,o){return this._server.getTaskResult({taskId:t},n,o)}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 ew(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 tw(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 ad=class extends xl{constructor(t,n){super(n),this._serverInfo=t,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(na.options.map((o,r)=>[o,r])),this.isMessageIgnored=(o,r)=>{let i=this._loggingLevels.get(r);return i?this.LOG_LEVEL_SEVERITY.get(o)<this.LOG_LEVEL_SEVERITY.get(i):!1},this._capabilities=n?.capabilities??{},this._instructions=n?.instructions,this._jsonSchemaValidator=n?.jsonSchemaValidator??new od,this.setRequestHandler(jm,o=>this._oninitialize(o)),this.setNotificationHandler(Rm,()=>this.oninitialized?.()),this._capabilities.logging&&this.setRequestHandler(Mm,async(o,r)=>{let i=r.sessionId||r.requestInfo?.headers["mcp-session-id"]||void 0,{level:a}=o.params,s=na.safeParse(a);return s.success&&this._loggingLevels.set(i,s.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new id(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=p$(this._capabilities,t)}setRequestHandler(t,n){let r=Tr(t)?.method;if(!r)throw new Error("Schema is missing a method literal");let i;if(_t(r)){let s=r;i=s._zod?.def?.value??s.value}else{let s=r;i=s._def?.value??s.value}if(typeof i!="string")throw new Error("Schema method literal must be a string");if(i==="tools/call"){let s=async(c,u)=>{let l=Ir(po,c);if(!l.success){let g=l.error instanceof Error?l.error.message:String(l.error);throw new N(U.InvalidParams,`Invalid tools/call request: ${g}`)}let{params:d}=l.data,p=await Promise.resolve(n(c,u));if(d.task){let g=Ir(uo,p);if(!g.success){let y=g.error instanceof Error?g.error.message:String(g.error);throw new N(U.InvalidParams,`Invalid task creation result: ${y}`)}return g.data}let f=Ir(gl,p);if(!f.success){let g=f.error instanceof Error?f.error.message:String(f.error);throw new N(U.InvalidParams,`Invalid tools/call result: ${g}`)}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){tw(this._clientCapabilities?.tasks?.requests,t,"Client")}assertTaskHandlerCapability(t){this._capabilities&&ew(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:hb.includes(n)?n:Im,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"},el)}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 o=t.messages[t.messages.length-1],r=Array.isArray(o.content)?o.content:[o.content],i=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(i){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},Lm,n):this.request({method:"sampling/createMessage",params:t},oa,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},fo,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"},i=await this.request({method:"elicitation/create",params:r},fo,n);if(i.action==="accept"&&i.content&&r.requestedSchema)try{let s=this._jsonSchemaValidator.getValidator(r.requestedSchema)(i.content);if(!s.valid)throw new N(U.InvalidParams,`Elicitation response content does not match requested schema: ${s.errorMessage}`)}catch(a){throw a instanceof N?a:new N(U.InternalError,`Error validating elicitation response: ${a instanceof Error?a.message:String(a)}`)}return i}}}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},qm,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 nw=Symbol.for("mcp.completable");function Fg(e){return!!e&&typeof e=="object"&&nw in e}function ow(e){return e[nw]?.complete}var rw;(function(e){e.Completable="McpCompletable"})(rw||(rw={}));var $N=/^[A-Za-z0-9._-]{1,128}$/;function xN(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"),!$N.test(e)){let n=e.split("").filter(o=>!/[A-Za-z0-9._-]/.test(o)).filter((o,r,i)=>i.indexOf(o)===r);return t.push(`Tool name contains invalid characters: ${n.map(o=>`"${o}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:t}}return{isValid:!0,warnings:t}}function kN(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 Vg(e){let t=xN(e);return kN(e,t.warnings),t.isValid}var sd=class{constructor(t){this._mcpServer=t}registerToolTask(t,n,o){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,o)}};var cd=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 ad(t,n)}get experimental(){return this._experimental||(this._experimental={tasks:new sd(this)}),this._experimental}async connect(t){return await this.server.connect(t)}async close(){await this.server.close()}setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler(Mr(hl)),this.server.assertCanSetRequestHandler(Mr(po)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(hl,()=>({tools:Object.entries(this._registeredTools).filter(([,t])=>t.enabled).map(([t,n])=>{let o={name:t,title:n.title,description:n.description,inputSchema:(()=>{let r=Qn(n.inputSchema);return r?Gm(r,{strictUnions:!0,pipeStrategy:"input"}):wN})(),annotations:n.annotations,execution:n.execution,_meta:n._meta};if(n.outputSchema){let r=Qn(n.outputSchema);r&&(o.outputSchema=Gm(r,{strictUnions:!0,pipeStrategy:"output"}))}return o})})),this.server.setRequestHandler(po,async(t,n)=>{try{let o=this._registeredTools[t.params.name];if(!o)throw new N(U.InvalidParams,`Tool ${t.params.name} not found`);if(!o.enabled)throw new N(U.InvalidParams,`Tool ${t.params.name} disabled`);let r=!!t.params.task,i=o.execution?.taskSupport,a="createTask"in o.handler;if((i==="required"||i==="optional")&&!a)throw new N(U.InternalError,`Tool ${t.params.name} has taskSupport '${i}' but was not registered with registerToolTask`);if(i==="required"&&!r)throw new N(U.MethodNotFound,`Tool ${t.params.name} requires task augmentation (taskSupport: 'required')`);if(i==="optional"&&!r&&a)return await this.handleAutomaticTaskPolling(o,t,n);let s=await this.validateToolInput(o,t.params.arguments,t.params.name),c=await this.executeToolHandler(o,s,n);return r||await this.validateToolOutput(o,c,t.params.name),c}catch(o){if(o instanceof N&&o.code===U.UrlElicitationRequired)throw o;return this.createToolError(o instanceof Error?o.message:String(o))}}),this._toolHandlersInitialized=!0)}createToolError(t){return{content:[{type:"text",text:t}],isError:!0}}async validateToolInput(t,n,o){if(!t.inputSchema)return;let i=Qn(t.inputSchema)??t.inputSchema,a=await vu(i,n);if(!a.success){let s="error"in a?a.error:"Unknown error",c=yu(s);throw new N(U.InvalidParams,`Input validation error: Invalid arguments for tool ${o}: ${c}`)}return a.data}async validateToolOutput(t,n,o){if(!t.outputSchema||!("content"in n)||n.isError)return;if(!n.structuredContent)throw new N(U.InvalidParams,`Output validation error: Tool ${o} has an output schema but no structured content was provided`);let r=Qn(t.outputSchema),i=await vu(r,n.structuredContent);if(!i.success){let a="error"in i?i.error:"Unknown error",s=yu(a);throw new N(U.InvalidParams,`Output validation error: Invalid structured content for tool ${o}: ${s}`)}}async executeToolHandler(t,n,o){let r=t.handler;if("createTask"in r){if(!o.taskStore)throw new Error("No task store provided.");let a={...o,taskStore:o.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,o))}else{let a=r;return await Promise.resolve(a(o))}}async handleAutomaticTaskPolling(t,n,o){if(!o.taskStore)throw new Error("No task store provided for task-capable tool.");let r=await this.validateToolInput(t,n.params.arguments,n.params.name),i=t.handler,a={...o,taskStore:o.taskStore},s=r?await Promise.resolve(i.createTask(r,a)):await Promise.resolve(i.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 o.taskStore.getTask(c);if(!d)throw new N(U.InternalError,`Task ${c} not found during polling`);u=d}return await o.taskStore.getTaskResult(c)}setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler(Mr(vl)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(vl,async t=>{switch(t.params.ref.type){case"ref/prompt":return Ob(t),this.handlePromptCompletion(t,t.params.ref);case"ref/resource":return jb(t),this.handleResourceCompletion(t,t.params.ref);default:throw new N(U.InvalidParams,`Invalid completion reference: ${t.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(t,n){let o=this._registeredPrompts[n.name];if(!o)throw new N(U.InvalidParams,`Prompt ${n.name} not found`);if(!o.enabled)throw new N(U.InvalidParams,`Prompt ${n.name} disabled`);if(!o.argsSchema)return Da;let i=Tr(o.argsSchema)?.[t.params.argument.name];if(!Fg(i))return Da;let a=ow(i);if(!a)return Da;let s=await a(t.params.argument.value,t.params.context);return aw(s)}async handleResourceCompletion(t,n){let o=Object.values(this._registeredResourceTemplates).find(a=>a.resourceTemplate.uriTemplate.toString()===n.uri);if(!o){if(this._registeredResources[n.uri])return Da;throw new N(U.InvalidParams,`Resource template ${t.params.ref.uri} not found`)}let r=o.resourceTemplate.completeCallback(t.params.argument.name);if(!r)return Da;let i=await r(t.params.argument.value,t.params.context);return aw(i)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(Mr(ll)),this.server.assertCanSetRequestHandler(Mr(dl)),this.server.assertCanSetRequestHandler(Mr(pl)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(ll,async(t,n)=>{let o=Object.entries(this._registeredResources).filter(([i,a])=>a.enabled).map(([i,a])=>({uri:i,name:a.name,...a.metadata})),r=[];for(let i of Object.values(this._registeredResourceTemplates)){if(!i.resourceTemplate.listCallback)continue;let a=await i.resourceTemplate.listCallback(n);for(let s of a.resources)r.push({...i.metadata,...s})}return{resources:[...o,...r]}}),this.server.setRequestHandler(dl,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([n,o])=>({name:n,uriTemplate:o.resourceTemplate.uriTemplate.toString(),...o.metadata}))})),this.server.setRequestHandler(pl,async(t,n)=>{let o=new URL(t.params.uri),r=this._registeredResources[o.toString()];if(r){if(!r.enabled)throw new N(U.InvalidParams,`Resource ${o} disabled`);return r.readCallback(o,n)}for(let i of Object.values(this._registeredResourceTemplates)){let a=i.resourceTemplate.uriTemplate.match(o.toString());if(a)return i.readCallback(o,a,n)}throw new N(U.InvalidParams,`Resource ${o} not found`)}),this._resourceHandlersInitialized=!0)}setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler(Mr(fl)),this.server.assertCanSetRequestHandler(Mr(ml)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(fl,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,t])=>t.enabled).map(([t,n])=>({name:t,title:n.title,description:n.description,arguments:n.argsSchema?SN(n.argsSchema):void 0}))})),this.server.setRequestHandler(ml,async(t,n)=>{let o=this._registeredPrompts[t.params.name];if(!o)throw new N(U.InvalidParams,`Prompt ${t.params.name} not found`);if(!o.enabled)throw new N(U.InvalidParams,`Prompt ${t.params.name} disabled`);if(o.argsSchema){let r=Qn(o.argsSchema),i=await vu(r,t.params.arguments);if(!i.success){let c="error"in i?i.error:"Unknown error",u=yu(c);throw new N(U.InvalidParams,`Invalid arguments for prompt ${t.params.name}: ${u}`)}let a=i.data,s=o.callback;return await Promise.resolve(s(a,n))}else{let r=o.callback;return await Promise.resolve(r(n))}}),this._promptHandlersInitialized=!0)}resource(t,n,...o){let r;typeof o[0]=="object"&&(r=o.shift());let i=o[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,i);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,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),a}}registerResource(t,n,o,r){if(typeof n=="string"){if(this._registeredResources[n])throw new Error(`Resource ${n} is already registered`);let i=this._createRegisteredResource(t,o.title,n,o,r);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),i}else{if(this._registeredResourceTemplates[t])throw new Error(`Resource template ${t} is already registered`);let i=this._createRegisteredResourceTemplate(t,o.title,n,o,r);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),i}}_createRegisteredResource(t,n,o,r,i){let a={name:t,title:n,metadata:r,readCallback:i,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!==o&&(delete this._registeredResources[o],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[o]=a,a}_createRegisteredResourceTemplate(t,n,o,r,i){let a={resourceTemplate:o,title:n,metadata:r,readCallback:i,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=o.uriTemplate.variableNames;return Array.isArray(s)&&s.some(u=>!!o.completeCallback(u))&&this.setCompletionRequestHandler(),a}_createRegisteredPrompt(t,n,o,r,i){let a={title:n,description:o,argsSchema:r===void 0?void 0:cn(r),callback:i,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=cn(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 so?c._def?.innerType:c;return Fg(u)})&&this.setCompletionRequestHandler(),a}_createRegisteredTool(t,n,o,r,i,a,s,c,u){Vg(t);let l={title:n,description:o,inputSchema:iw(r),outputSchema:iw(i),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"&&Vg(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=cn(d.paramsSchema)),typeof d.outputSchema<"u"&&(l.outputSchema=cn(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 o,r,i,a;if(typeof n[0]=="string"&&(o=n.shift()),n.length>1){let c=n[0];if(Hg(c))r=n.shift(),n.length>1&&typeof n[0]=="object"&&n[0]!==null&&!Hg(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,o,r,i,a,{taskSupport:"forbidden"},void 0,s)}registerTool(t,n,o){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let{title:r,description:i,inputSchema:a,outputSchema:s,annotations:c,_meta:u}=n;return this._createRegisteredTool(t,r,i,a,s,c,{taskSupport:"forbidden"},u,o)}prompt(t,...n){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let o;typeof n[0]=="string"&&(o=n.shift());let r;n.length>1&&(r=n.shift());let i=n[0],a=this._createRegisteredPrompt(t,void 0,o,r,i);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),a}registerPrompt(t,n,o){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let{title:r,description:i,argsSchema:a}=n,s=this._createRegisteredPrompt(t,r,i,a,o);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 wN={type:"object",properties:{}};function sw(e){return e!==null&&typeof e=="object"&&"parse"in e&&typeof e.parse=="function"&&"safeParse"in e&&typeof e.safeParse=="function"}function cw(e){return"_def"in e||"_zod"in e||sw(e)}function Hg(e){return typeof e!="object"||e===null||cw(e)?!1:Object.keys(e).length===0?!0:Object.values(e).some(sw)}function iw(e){if(e){if(Hg(e))return cn(e);if(!cw(e))throw new Error("inputSchema must be a Zod schema or raw shape, received an unrecognized object");return e}}function SN(e){let t=Tr(e);return t?Object.entries(t).map(([n,o])=>{let r=r_(o),i=n_(o);return{name:n,description:r,required:!i}}):[]}function Mr(e){let n=Tr(e)?.method;if(!n)throw new Error("Schema is missing a method literal");let o=_u(n);if(typeof o=="string")return o;throw new Error("Schema method literal must be a string")}function aw(e){return{completion:{values:e.slice(0,100),total:e.length,hasMore:e.length>100}}}var Da={completion:{values:[],hasMore:!1}};import lw from"node:process";var ud=class{append(t){this._buffer=this._buffer?Buffer.concat([this._buffer,t]):t}readMessage(){if(!this._buffer)return null;let t=this._buffer.indexOf(`
|
|
62
|
+
`);if(t===-1)return null;let n=this._buffer.toString("utf8",0,t).replace(/\r$/,"");return this._buffer=this._buffer.subarray(t+1),zN(n)}clear(){this._buffer=void 0}};function zN(e){return kb.parse(JSON.parse(e))}function uw(e){return JSON.stringify(e)+`
|
|
63
|
+
`}var ld=class{constructor(t=lw.stdin,n=lw.stdout){this._stdin=t,this._stdout=n,this._readBuffer=new ud,this._started=!1,this._ondata=o=>{this._readBuffer.append(o),this.processReadBuffer()},this._onerror=o=>{this.onerror?.(o)}}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 o=uw(t);this._stdout.write(o)?n():this._stdout.once("drain",n)})}};import*as Aa from"node:path";import{Worker as IN}from"node:worker_threads";var TN=qa("McpWorkerHost"),dd=class{worker=null;workerPath;warmupTimeout;invokeTimeout;isReady=!1;isStarting=!1;pendingRequests=new Map;requestCounter=0;warmupProgressCallback=null;constructor(t){this.workerPath=t.workerPath,this.warmupTimeout=t.warmupTimeout??6e4,this.invokeTimeout=t.invokeTimeout??3e4}async start(t,n){if(this.worker)throw new Error("Worker already started");if(this.isStarting)throw new Error("Worker is already starting");return this.isStarting=!0,this.warmupProgressCallback=n??null,new Promise((o,r)=>{let i=setTimeout(()=>{this.dispose(),r(new Error(`Worker warmup timeout after ${this.warmupTimeout}ms`))},this.warmupTimeout);try{this.worker=new IN(this.workerPath),this.worker.on("message",a=>{this.handleMessage(a,o,i)}),this.worker.on("error",a=>{clearTimeout(i),this.isStarting=!1,this.dispose(),r(a)}),this.worker.on("exit",a=>{a!==0&&!this.isReady&&(clearTimeout(i),this.isStarting=!1,r(new Error(`Worker exited with code ${a}`))),this.cleanup()}),this.postMessage({type:"init",config:t})}catch(a){clearTimeout(i),this.isStarting=!1,this.dispose(),r(a)}})}handleMessage(t,n,o){switch(t.type){case"ready":o&&clearTimeout(o),this.isReady=!0,this.isStarting=!1,this.warmupProgressCallback=null,n?.({durationMs:t.warmupDuration,filesIndexed:t.indexedFiles});break;case"warmup-progress":this.warmupProgressCallback?.(t.processed,t.total,t.currentFile);break;case"result":this.resolveRequest(t.requestId,t.data);break;case"error":this.rejectRequest(t.requestId,new Error(t.error));break;case"file-invalidated":TN.debug("Cache invalidated:",t.event,t.filePath);break}}async invoke(t,n){if(!this.isReady||!this.worker)throw new Error("Worker not ready. Call start() first.");let o=this.generateRequestId();return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.delete(o),i(new Error(`Tool invocation timeout after ${this.invokeTimeout}ms`))},this.invokeTimeout);this.pendingRequests.set(o,{resolve:r,reject:i,timeoutId:a}),this.postMessage({type:"invoke",requestId:o,tool:t,params:n})})}ready(){return this.isReady}dispose(){if(this.worker){try{this.postMessage({type:"shutdown"})}catch{}this.worker.terminate().catch(()=>{})}this.cleanup()}cleanup(){for(let[t,n]of this.pendingRequests)clearTimeout(n.timeoutId),n.reject(new Error("Worker terminated")),this.pendingRequests.delete(t);this.worker=null,this.isReady=!1,this.isStarting=!1,this.warmupProgressCallback=null}postMessage(t){if(!this.worker)throw new Error("Worker not initialized");this.worker.postMessage(t)}generateRequestId(){return`req_${++this.requestCounter}_${Date.now()}`}resolveRequest(t,n){let o=this.pendingRequests.get(t);o&&(clearTimeout(o.timeoutId),this.pendingRequests.delete(t),o.resolve(n))}rejectRequest(t,n){let o=this.pendingRequests.get(t);o&&(clearTimeout(o.timeoutId),this.pendingRequests.delete(t),o.reject(n))}};function Wg(e){return e.replaceAll("\\",String.raw`\\`).replaceAll(",",String.raw`\,`).replaceAll("[",String.raw`\[`).replaceAll("]",String.raw`\]`).replaceAll("|",String.raw`\|`)}function dw(e,t){if(e==null)return"";if(Array.isArray(e))return e.map(o=>dw(o,t)).join("|");if(typeof e=="object"){let o=JSON.stringify(e);return t.escapeValues?Wg(o):o}if(typeof e=="string")return t.escapeValues?Wg(e):e;let n=String(e);return t.escapeValues?Wg(n):n}function pw(e,t={}){let n={objectName:t.objectName??"data",escapeValues:t.escapeValues??!0};if(e.length===0)return`${n.objectName}()
|
|
64
|
+
`;let o=e[0];if(typeof o!="object"||o===null||Array.isArray(o))throw new Error("TOON format requires an array of objects");let r=Object.keys(o),i=`${n.objectName}(${r.join(",")})`,a=e.map(s=>{if(typeof s!="object"||s===null||Array.isArray(s))throw new Error("All items must be objects");return`[${r.map(u=>{let l=s[u];return dw(l,n)}).join(",")}]`});return[i,...a].join(`
|
|
65
|
+
`)}function fw(e,t){let n=Math.ceil(e.length/4),o=Math.ceil(t.length/4),r=n-o,i=r/n*100;return{jsonTokens:n,toonTokens:o,savings:r,savingsPercent:i}}var PN=qa("responseFormatter");function W(e,t){let n;if(t==="toon"){let o=ON(e.data,RN(e));n=o.content,o.tokenSavings&&(n+=`
|
|
66
|
+
|
|
67
|
+
# Token Savings
|
|
68
|
+
`,n+=`JSON: ${o.tokenSavings.jsonTokens} tokens
|
|
69
|
+
`,n+=`TOON: ${o.tokenSavings.toonTokens} tokens
|
|
70
|
+
`,n+=`Savings: ${o.tokenSavings.savings} tokens (${o.tokenSavings.savingsPercent.toFixed(1)}%)
|
|
71
|
+
`)}else t==="markdown"?n=`\`\`\`json
|
|
72
|
+
${JSON.stringify(e,null,2)}
|
|
73
|
+
\`\`\``:n=JSON.stringify(e,null,2);return{content:[{type:"text",text:n}],structuredContent:e}}function EN(e){if(Array.isArray(e))return e;if(typeof e=="object"&&e!==null){let t=e,n=["items","results","data","nodes","edges","dependencies","symbols","callers"];for(let o of n)if(Array.isArray(t[o]))return t[o];return[e]}return[{value:e}]}function ON(e,t="data"){if(e==null)return{content:`${t}()
|
|
74
|
+
`,format:"toon"};let n=EN(e);try{let o=pw(n,{objectName:t}),r=JSON.stringify(e,null,2),i=fw(r,o);return{content:o,format:"toon",tokenSavings:i}}catch(o){return PN.error("[formatDataAsToon] TOON conversion failed:",o),{content:JSON.stringify(e,null,2),format:"json"}}}function jN(e){if(!Array.isArray(e)||e.length===0)return"data";let t=e[0];if(typeof t!="object"||t===null)return"data";let n=Object.keys(t);return n.includes("file")||n.includes("filePath")?"files":n.includes("symbolName")||n.includes("symbol")?"symbols":n.includes("source")&&n.includes("target")?"edges":n.includes("node")||n.includes("id")?"nodes":n.includes("dependency")||n.includes("dependencies")?"dependencies":n.includes("caller")||n.includes("callers")?"callers":"data"}function RN(e){return jN(e.data)}import*as fd from"node:path";function NN(e){if(!e)return e;let t=e.replaceAll("\\","/");return t=t.replaceAll(/\/+/g,"/"),/^[A-Za-z]:\//.test(t)&&(t=t[0].toLowerCase()+t.slice(1)),t.length>1&&t.endsWith("/")&&!/^[a-zA-Z]:\/$/.test(t)&&(t=t.slice(0,-1)),t}function mw(e){if(!e)return e;let t=NN(e);return/^[A-Za-z]:\//.test(t)&&(t=t[0].toLowerCase()+t.slice(1)),t.length>1&&t.endsWith("/")&&!/^[a-zA-Z]:\/$/.test(t)&&(t=t.slice(0,-1)),t}var Oo="1.0.0",Ae=F.enum(["json","toon"]).default("json").describe("Output format: 'json' (default) or 'toon' (Token-Oriented Object Notation for reduced token usage)"),Lr={FILE_PATH:1024,SYMBOL_NAME:500,FILE_CONTENT:1024*1024,GENERIC_STRING:10*1024},ze=F.string().max(Lr.FILE_PATH,`File path exceeds maximum length of ${Lr.FILE_PATH} bytes`).refine(e=>!e.includes("\0"),"File path contains null bytes"),jo=F.string().max(Lr.SYMBOL_NAME,`Symbol name exceeds maximum length of ${Lr.SYMBOL_NAME} bytes`).refine(e=>!e.includes("\0"),"Symbol name contains null bytes"),hw=F.string().max(Lr.FILE_CONTENT,`File content exceeds maximum size of ${Lr.FILE_CONTENT} bytes (~1 MB)`).refine(e=>!e.includes("\0"),"File content contains null bytes"),DN=F.string().max(Lr.GENERIC_STRING,`String exceeds maximum length of ${Lr.GENERIC_STRING} bytes`).refine(e=>!e.includes("\0"),"String contains null bytes"),pd={MAX_LIMIT:1e4,MAX_OFFSET:1e5,DEFAULT_LIMIT:1e3},gw=F.object({workspacePath:ze.describe("Absolute path to the project/workspace directory to analyze"),tsConfigPath:ze.optional().describe("Optional path to tsconfig.json for path alias resolution"),excludeNodeModules:F.boolean().optional().describe("Whether to exclude node_modules (default: true)"),maxDepth:F.number().min(1).max(100).optional().describe("Maximum crawl depth (default: 50, min: 1, max: 100)"),format:Ae.optional()}),vw=F.object({filePath:ze.describe("Absolute path to the file to analyze"),format:Ae.optional()}),yw=F.object({entryFile:ze.describe("Absolute path to the entry file"),maxDepth:F.number().min(1).max(100).optional().describe("Maximum depth to crawl (default: from config, min: 1, max: 100)"),limit:F.number().min(1).max(pd.MAX_LIMIT).optional().describe(`Maximum number of nodes to return (for pagination, max: ${pd.MAX_LIMIT})`),offset:F.number().min(0).max(pd.MAX_OFFSET).optional().describe(`Number of nodes to skip (for pagination, max: ${pd.MAX_OFFSET})`),onlyUsed:F.boolean().optional().describe("If true, only returns edges where symbols are actually used (requires AST analysis, slower)"),format:Ae.optional()}),_w=F.object({targetPath:ze.describe("Absolute path to the file to find references for"),format:Ae.optional()}),bw=F.object({filePath:ze.describe("Absolute path to the node to expand"),knownPaths:F.array(ze).max(5e4).describe("Array of already known file paths to exclude (max: 50000)"),extraDepth:F.number().min(1).max(100).optional().describe("Additional depth to scan from this node (default: 10, min: 1, max: 100)"),format:Ae.optional()}),$w=F.object({filePath:ze.describe("Absolute path to the file to parse"),format:Ae.optional()}),xw=F.object({sourceFile:ze.describe("Absolute path to the source file (the one importing using symbols)"),targetFile:ze.describe("Absolute path to the target file (the one providing symbols)"),format:Ae.optional()}),kw=F.object({fromFile:ze.describe("Absolute path of the file containing the import"),moduleSpecifier:DN.describe('The module specifier to resolve (e.g., "./utils", "@/components/Button")'),format:Ae.optional()}),SL=F.object({}),ww=F.object({filePaths:F.array(ze).max(1e4).describe("Array of absolute file paths to invalidate from the cache (max: 10000). Use this after modifying files to ensure fresh analysis.")}),zL=F.object({}),Sw=F.object({filePath:ze.describe("Absolute path to the file to analyze for symbols"),format:Ae.optional()}),zw=F.object({filePath:ze.describe("Absolute path to the file to check for unused exported symbols"),format:Ae.optional()}),Iw=F.object({filePath:ze.describe("Absolute path to the file containing the symbol"),symbolName:jo.describe("Name of the symbol to find dependents for"),format:Ae.optional()}),Tw=F.object({filePath:ze.describe("Absolute path to the file containing the root symbol"),symbolName:jo.describe("Name of the root symbol to trace from"),maxDepth:F.number().min(1).max(100).optional().describe("Maximum depth to trace the call chain (default: 10, min: 1, max: 100)"),format:Ae.optional()}),Pw=F.object({filePath:ze.describe("The absolute path to the file containing the target symbol."),symbolName:jo.describe("The name of the symbol (function, class, method, variable) to find callers for."),includeTypeOnly:F.boolean().optional().describe("Include type-only usages (interfaces, type aliases). Default is true."),format:Ae.optional()}),Ew=F.object({filePath:ze.describe("Absolute path to the file to analyze"),symbolName:jo.optional().describe("Optional: Only analyze changes to this specific symbol"),oldContent:hw.describe("The old version of the file content"),newContent:hw.optional().describe("The new version of the file content (if not provided, reads current file)"),format:Ae.optional()}),Ow=F.object({filePath:ze.describe("Absolute path to the file being modified"),symbolName:jo.describe("Name of the symbol being modified"),includeTransitive:F.boolean().optional().describe("Include transitive dependents (default: false)"),maxDepth:F.number().min(1).max(20).optional().describe("Maximum depth for transitive analysis (default: 3, min: 1, max: 20)"),format:Ae.optional()}),IL=F.object({filePath:ze.describe("Absolute path to the file to analyze"),includeExternal:F.boolean().optional().describe("Include calls to external modules (default: false)"),format:Ae.optional()}),TL=F.object({filePath:ze.describe("Absolute path to the file to generate a codemap for"),format:Ae.optional()}),jw=F.object({filePath:ze.describe("Absolute path to the file containing the target symbol."),symbolName:jo.describe("Name of the symbol to query (function, class, method)."),direction:F.enum(["callers","callees","both"]).optional().describe("Direction of traversal: 'callers', 'callees', or 'both' (default: 'both')"),depth:F.number().min(1).max(10).optional().describe("Maximum BFS traversal depth (default: 2, min: 1, max: 10)"),relationTypes:F.array(F.enum(["CALLS","INHERITS","IMPLEMENTS","USES"])).optional().describe("Filter by relation types (default: all)"),format:Ae.optional()});var Gg=mw;function Jg(e,t){let n=Gg(fd.resolve(t,e)),o=Gg(fd.resolve(t));return n===o||n.startsWith(o+"/")}function Rw(e,t){let n=Gg(e);if(n.includes("..")&&!Jg(e,t))throw new Error(`Path traversal detected: ${e} resolves outside workspace`);let o=n.startsWith("/"),r=/^[a-z]:/i.test(n);if(o||r){if(!Jg(e,t))throw new Error(`File path is outside workspace: ${e}`)}else{let i=fd.resolve(t,e);if(!Jg(i,t))throw new Error(`File path is outside workspace: ${e}`)}return!0}function Bg(e,t,n,o){return{success:!0,data:e,metadata:{executionTimeMs:t,toolVersion:Oo,timestamp:new Date().toISOString(),workspaceRoot:n},...o&&{pagination:o}}}function Ca(e,t,n){return{success:!1,data:null,error:e,metadata:{executionTimeMs:t,toolVersion:Oo,timestamp:new Date().toISOString(),workspaceRoot:n}}}cv({createLogger(e,t){return new Ma(e,t)}});var Qg=process.env.DEBUG_MCP==="true",hd=`${Nw.homedir()}/mcp-debug.log`,CN=5*1024*1024,Kg=`${hd}.1`;function AN(){if(Qg)try{rt.statSync(hd).size>=CN&&(rt.existsSync(Kg)&&rt.unlinkSync(Kg),rt.renameSync(hd,Kg))}catch{}}function J(...e){let t=e.map(n=>typeof n=="string"?n:JSON.stringify(n)).join(" ");if(process.stderr.write(t.endsWith(`
|
|
75
|
+
`)?t:`${t}
|
|
76
|
+
`),!!Qg)try{AN();let o=`[${new Date().toISOString()}] ${t}
|
|
77
|
+
`;rt.appendFileSync(hd,o)}catch{}}Qg?(J("[McpServer] ===== PROCESS STARTING (DEBUG MODE) ====="),J("[McpServer] Node version:",process.version),J("[McpServer] PID:",process.pid),J("[McpServer] cwd:",process.cwd()),J("[McpServer] argv:",JSON.stringify(process.argv)),J("[McpServer] Environment vars:"),J(" WORKSPACE_ROOT:",process.env.WORKSPACE_ROOT??"(not set)"),J(" TSCONFIG_PATH:",process.env.TSCONFIG_PATH??"(not set)"),J(" EXCLUDE_NODE_MODULES:",process.env.EXCLUDE_NODE_MODULES??"(not set)"),J(" MAX_DEPTH:",process.env.MAX_DEPTH??"(not set)")):process.stderr.write(`[McpServer] Starting (debug logging disabled - set DEBUG_MCP=true to enable)
|
|
78
|
+
`);var we={workspaceRoot:process.env.WORKSPACE_ROOT??"",extensionPath:process.env.EXTENSION_PATH,tsConfigPath:process.env.TSCONFIG_PATH,excludeNodeModules:process.env.EXCLUDE_NODE_MODULES!=="false",maxDepth:Number.parseInt(process.env.MAX_DEPTH??"50",10)};we.workspaceRoot&&(we.workspaceRoot.includes("${")||we.workspaceRoot.includes("$("))&&(J("[McpServer] WARNING: WORKSPACE_ROOT contains unresolved variable:",we.workspaceRoot),J("[McpServer] Workspace not set - use graphitlive_set_workspace tool to configure"),we.workspaceRoot="");if(!we.workspaceRoot){let e=process.cwd();e==="/"||e===""?J("[McpServer] No workspace configured - use graphitlive_set_workspace tool to set workspace"):(we.workspaceRoot=e,J("[McpServer] WORKSPACE_ROOT not set, using current working directory:",we.workspaceRoot))}we.workspaceRoot&&!rt.existsSync(we.workspaceRoot)&&(J("[McpServer] WARNING: WORKSPACE_ROOT path does not exist:",we.workspaceRoot),J("[McpServer] Use graphitlive_set_workspace tool to configure a valid workspace"),we.workspaceRoot="");function ur(){return we.workspaceRoot}var Pe=je(["json","markdown","toon"]).default("toon"),UN=z({total:re(),limit:re(),offset:re(),hasMore:be()}),ZN=z({executionTimeMs:re(),toolVersion:h(),timestamp:h(),workspaceRoot:h()}),Ee=z({success:be(),data:Vu(),metadata:ZN,pagination:UN.optional(),error:h().optional()}),Ie=new cd({name:"graph-it-live",version:Oo}),tt=null,gd=!1,Ro=null,md=null;function Yg(){gd=!1,Ro=null,md=null}async function ev(){if(gd&&!tt?.ready()&&(J("[McpServer] Worker was initialized but is no longer ready \u2014 auto-recovering"),tt&&(tt.dispose(),tt=null),Yg()),!gd){if(md&&(J("[McpServer] Previous init failed, allowing retry"),Yg()),Ro!==null)return J("[McpServer] Waiting for existing initialization..."),Ro;Ro=MN();try{await Ro}catch(e){throw md=e instanceof Error?e:new Error(String(e)),Ro=null,md}}}async function MN(){let e=Aa.join(__dirname,"mcpWorker.js");J(`[McpServer] __dirname: ${__dirname}`),J(`[McpServer] Worker path: ${e}`);try{await(await import("node:fs/promises")).access(e),J("[McpServer] Worker file exists: true")}catch{throw J("[McpServer] Worker file exists: false - THIS IS THE PROBLEM!"),new Error(`Worker file not found at ${e}`)}tt=new dd({workerPath:e,warmupTimeout:12e4,invokeTimeout:6e4}),J("[McpServer] Starting worker with warmup...");try{let t=await tt.start({rootDir:ur(),tsConfigPath:we.tsConfigPath,extensionPath:we.extensionPath,excludeNodeModules:we.excludeNodeModules,maxDepth:we.maxDepth},(n,o,r)=>{J(`[McpServer] Warmup progress: ${n}/${o} - ${r??""}`)});J(`[McpServer] Worker ready: ${t.filesIndexed} files indexed in ${t.durationMs}ms`),gd=!0}catch(t){throw J(`[McpServer] Worker initialization failed: ${t}`),t}}async function Ne(e,t){if(!tt?.ready())return Ca("Worker not ready",0,ur());let n=Date.now();try{let o=await tt.invoke(e,t),r=Date.now()-n;return Bg(o,r,ur())}catch(o){let r=Date.now()-n,i=o instanceof Error?o.message:"Unknown error";return Ca(i,r,ur())}}async function Oe(){try{return await ev(),{error:!1}}catch(e){let t=e instanceof Error?e.message:"Worker initialization failed";return J(`[McpServer] Tool call failed - worker init error: ${t}`),{error:!0,response:Ca(t,0,ur())}}}function Xg(e,t,n,o){return{success:!1,data:{success:!1,workspacePath:e,filesIndexed:0,indexingTimeMs:Date.now()-o,previousWorkspace:t||void 0,message:n},error:n,metadata:{executionTimeMs:Date.now()-o,toolVersion:Oo,timestamp:new Date().toISOString(),workspaceRoot:e}}}function LN(e){return rt.existsSync(e)?rt.statSync(e).isDirectory()?null:`Path is not a directory: ${e}`:`Path does not exist: ${e}`}function qN(e,t){if(!e)return{resolvedPath:void 0,error:null};let n=Aa.isAbsolute(e)?e:Aa.join(t,e);if(!rt.existsSync(n))return{resolvedPath:void 0,error:`tsConfigPath does not exist: ${n}`};if(!rt.statSync(n).isFile())return{resolvedPath:void 0,error:`tsConfigPath is not a file: ${n}`};try{Rw(n,t)}catch(r){return{resolvedPath:void 0,error:r instanceof Error?r.message:"Invalid tsConfigPath"}}return{resolvedPath:n,error:null}}Ie.registerTool("graphitlive_set_workspace",{title:"Set Workspace Directory",description:`USE THIS TOOL FIRST when working with a new project or when the workspace hasn't been configured yet. This tool MUST be called before any other graphitlive tools if no workspace is set.
|
|
79
|
+
|
|
80
|
+
WHY: Graph-It-Live needs to know which project directory to analyze. Without a workspace configured, all other tools will fail. This tool sets the project root and initializes the dependency index for fast queries.
|
|
81
|
+
|
|
82
|
+
RETURNS: Confirmation of the new workspace path and the number of files indexed. After calling this, all other graphItLive tools will work on the specified project.
|
|
83
|
+
|
|
84
|
+
EXAMPLE: If analyzing a project at "/Users/me/my-app", call this tool with workspacePath="/Users/me/my-app"`,inputSchema:gw.extend({response_format:Pe.describe("Output format: 'json', 'markdown', or 'toon' (Token-Oriented Object Notation for reduced token usage) (default: toon - RECOMMENDED for 30-60% token savings)")}),outputSchema:Ee,annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},async({workspacePath:e,tsConfigPath:t,excludeNodeModules:n,maxDepth:o,response_format:r})=>{let i=Date.now(),a=ur(),s=r??"json";J(`[McpServer] setWorkspace called with: ${e}`);let c=LN(e);if(c)return W(Xg(e,a,c,i),s);let{resolvedPath:u,error:l}=qN(t,e);if(l)return W(Xg(e,a,l,i),s);we.workspaceRoot=e,u!==void 0&&(we.tsConfigPath=u),n!==void 0&&(we.excludeNodeModules=n),o!==void 0&&(we.maxDepth=o),J(`[McpServer] Workspace updated to: ${e}`),tt&&(J("[McpServer] Disposing previous worker..."),tt.dispose(),tt=null),Yg();try{await ev();let d=Date.now()-i,p=0,f=tt;f?.ready()&&(p=(await f.invoke("get_index_status",{})).cacheSize);let g={success:!0,data:{success:!0,workspacePath:e,filesIndexed:p,indexingTimeMs:d,previousWorkspace:a||void 0,message:`Workspace set to ${e}. Indexed ${p} files in ${d}ms.`},metadata:{executionTimeMs:d,toolVersion:Oo,timestamp:new Date().toISOString(),workspaceRoot:e}};return J(`[McpServer] Workspace configured successfully: ${p} files indexed`),W(g,s)}catch(d){let p=d instanceof Error?d.message:"Unknown error during initialization";return J(`[McpServer] setWorkspace failed: ${p}`),W(Xg(e,a,`Failed to initialize workspace: ${p}`,i),s)}});Ie.registerTool("graphitlive_analyze_dependencies",{title:"Analyze File Dependencies",description:`USE THIS TOOL WHEN the user asks about a file's imports, dependencies, or what modules a specific file uses. Examples: "What does this file import?", "Show me the dependencies of src/utils.ts", "What modules does this component rely on?"
|
|
85
|
+
|
|
86
|
+
WHY: As an AI, you cannot see import statements or module relationships without parsing the actual source code. This tool provides the ground truth by analyzing real import/export statements on disk. Without it, you would have to guess dependencies and risk hallucinating non-existent relationships.
|
|
87
|
+
|
|
88
|
+
RETURNS: A structured JSON with all import/export statements including: resolved absolute paths, relative paths from workspace root, import types (static import, dynamic import, require, re-export), line numbers, and file extensions. Supports TypeScript, JavaScript, Vue, Svelte, and GraphQL files.`,inputSchema:vw.extend({response_format:Pe.describe("Output format: 'json', 'markdown', or 'toon' (Token-Oriented Object Notation for reduced token usage) (default: toon - RECOMMENDED for 30-60% token savings)")}),outputSchema:Ee,annotations:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},async({filePath:e,response_format:t})=>{let n=await Oe();if(n.error)return W(n.response,t??"json");let o=await Ne("analyze_dependencies",{filePath:e});return W(o,t??"json")});Ie.registerTool("graphitlive_crawl_dependency_graph",{title:"Crawl Full Dependency Graph",description:`CRITICAL: USE THIS TOOL WHENEVER the user asks about project architecture, module relationships, the full dependency tree, or needs to understand how files are connected. Examples: "Show me the architecture of this module", "What's the dependency tree from main.ts?", "Map out all the files connected to this entry point", "How is this project structured?"
|
|
89
|
+
|
|
90
|
+
WHY: You cannot "see" or infer the complete project structure or transitive dependencies. This tool crawls the actual codebase starting from an entry point and builds the real dependency graph. It detects circular dependencies and counts how many files depend on each node. Without this tool, any attempt to describe project architecture would be pure speculation.
|
|
91
|
+
|
|
92
|
+
RETURNS: A complete graph with nodes (files with metadata: path, extension, dependency count, dependent count, circular dependency flag) and edges (import relationships between files). Supports pagination for large codebases. Works with TypeScript, JavaScript, Vue, Svelte, and GraphQL.`,inputSchema:yw.extend({response_format:Pe.describe("Output format: 'json', 'markdown', or 'toon' (Token-Oriented Object Notation for reduced token usage) (default: toon - RECOMMENDED for 30-60% token savings)")}),outputSchema:Ee,annotations:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},async({entryFile:e,maxDepth:t,limit:n,offset:o,onlyUsed:r,response_format:i})=>{let a=await Oe(),s=i??"json";if(a.error)return W(a.response,s);let c={entryFile:e,maxDepth:t,limit:n,offset:o,onlyUsed:r},u=await tt?.invoke("crawl_dependency_graph",c);if(!u)return W(Ca("Worker not available",0,ur()),s);let l;if(n!==void 0||o!==void 0){let p=o??0,f=n??u.nodeCount;l={total:u.nodeCount,limit:f,offset:p,hasMore:p+u.nodes.length<u.nodeCount}}let d=Bg(u,0,ur(),l);return W(d,s)});Ie.registerTool("graphitlive_find_referencing_files",{title:"Find Files That Import This File",description:`CRITICAL: USE THIS TOOL WHENEVER the user asks about impact analysis, refactoring safety, "who uses this file?", "what will break if I change this?", or reverse dependencies. Examples: "What files import utils.ts?", "What's the impact of modifying this component?", "Who depends on this service?", "Is it safe to refactor this file?", "Show me all usages of this module"
|
|
93
|
+
|
|
94
|
+
WHY: This is the MOST IMPORTANT tool for impact analysis. You cannot know which files import a given file without this reverse lookup. If a user asks about the consequences of changing a file and you don't use this tool, you will miss critical dependencies and give dangerous advice. The tool uses a pre-built index for instant O(1) lookups across the entire codebase.
|
|
95
|
+
|
|
96
|
+
RETURNS: A list of all files that directly import/require/reference the target file, with their absolute paths and relative paths from workspace root. This tells you exactly what will be affected by changes to the target file.`,inputSchema:_w.extend({response_format:Pe.describe("Output format: 'json', 'markdown', or 'toon' (Token-Oriented Object Notation for reduced token usage) (default: toon - RECOMMENDED for 30-60% token savings)")}),outputSchema:Ee,annotations:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},async({targetPath:e,response_format:t})=>{let n=await Oe(),o=t??"json";if(n.error)return W(n.response,o);let r=await Ne("find_referencing_files",{targetPath:e});return W(r,o)});Ie.registerTool("graphitlive_expand_node",{title:"Expand Node Dependencies",description:`USE THIS TOOL WHEN you need to incrementally explore the dependency graph from a specific node, discovering new files not already in your known set. Examples: "Show me more dependencies from this file", "Expand the graph from this node", "What other files does this connect to that I haven't seen yet?"
|
|
97
|
+
|
|
98
|
+
WHY: When building a dependency graph incrementally or exploring a large codebase, you may already know about some files and want to discover NEW dependencies without re-analyzing everything. This tool efficiently finds only the files you don't already know about, making it perfect for lazy loading or step-by-step exploration.
|
|
99
|
+
|
|
100
|
+
RETURNS: A list of newly discovered nodes (files) and edges (import relationships) that were not in the known set. Includes the same metadata as the crawl tool: paths, extensions, dependency counts.`,inputSchema:bw.extend({response_format:Pe.describe("Output format: 'json', 'markdown', or 'toon' (Token-Oriented Object Notation for reduced token usage) (default: toon - RECOMMENDED for 30-60% token savings)")}),outputSchema:Ee,annotations:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},async({filePath:e,knownPaths:t,extraDepth:n,response_format:o})=>{let r=await Oe(),i=o??"json";if(r.error)return W(r.response,i);let a=await Ne("expand_node",{filePath:e,knownPaths:t,extraDepth:n});return W(a,i)});Ie.registerTool("graphitlive_parse_imports",{title:"Parse Raw Import Statements",description:`USE THIS TOOL WHEN you need to see the exact import statements as written in the source code, without path resolution. Examples: "What import syntax does this file use?", "Show me the raw import statements", "What module specifiers are in this file?"
|
|
101
|
+
|
|
102
|
+
WHY: Sometimes you need to see exactly how imports are written (relative paths, aliases, bare specifiers) before resolution. This is useful for understanding coding patterns, checking import styles, or debugging path resolution issues. The tool uses fast regex-based parsing and handles Vue/Svelte script extraction automatically.
|
|
103
|
+
|
|
104
|
+
RETURNS: An array of raw import/require/export statements as they appear in the source code, with the module specifier (e.g., "./utils", "@/components/Button", "lodash"), import type, and line number. Does NOT resolve paths - use graphitlive_analyze_dependencies for resolved paths.`,inputSchema:$w.extend({response_format:Pe.describe("Output format: 'json', 'markdown', or 'toon' (Token-Oriented Object Notation for reduced token usage) (default: toon - RECOMMENDED for 30-60% token savings)")}),outputSchema:Ee,annotations:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},async({filePath:e,response_format:t})=>{let n=await Oe(),o=t??"json";if(n.error)return W(n.response,o);let r=await Ne("parse_imports",{filePath:e});return W(r,o)});Ie.registerTool("graphitlive_verify_dependency_usage",{title:"Verify Dependency Usage",description:`USE THIS TOOL WHEN you want to check if a dependency between two files is real/used, or if it's dead code (unused import). Examples: "Is main.ts actually using utils.ts?", "Check if this import is unused", "Verify dependency usage between these files"
|
|
105
|
+
|
|
106
|
+
WHY: Raw imports don't tell the whole story. A file might import something but never use it. This tool performs deep AST analysis to verify if symbols from the target file are actually referenced in the source file. This is crucial for identifying dead code or unnecessary dependencies.
|
|
107
|
+
|
|
108
|
+
RETURNS: Boolean indicating if the dependency is used.`,inputSchema:xw.extend({response_format:Pe.describe("Output format: 'json', 'markdown', or 'toon' (Token-Oriented Object Notation for reduced token usage) (default: toon - RECOMMENDED for 30-60% token savings)")}),outputSchema:Ee,annotations:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},async({sourceFile:e,targetFile:t,response_format:n})=>{let o=await Oe(),r=n??"json";if(o.error)return W(o.response,r);let i=await Ne("verify_dependency_usage",{sourceFile:e,targetFile:t});return W(i,r)});Ie.registerTool("graphitlive_resolve_module_path",{title:"Resolve Module Specifier to File Path",description:`USE THIS TOOL WHEN you need to convert a module specifier (import path) to an actual file path on disk. Examples: "Where does '@/components/Button' point to?", "Resolve this import path", "What file does './utils' refer to from main.ts?"
|
|
109
|
+
|
|
110
|
+
WHY: Module specifiers in code (like "./utils", "@/components/Button", "../shared/types") don't directly tell you the actual file path. This tool handles all the complexity: tsconfig.json path aliases, implicit file extensions (.ts, .tsx, .js, .jsx, .vue, .svelte, .gql), index file resolution, and relative path calculation. Without it, you would guess incorrectly about where imports actually point.
|
|
111
|
+
|
|
112
|
+
RETURNS: The resolved absolute file path if the module exists, or null if it cannot be resolved (e.g., external npm package or non-existent file). Also indicates whether the path is inside or outside the workspace.`,inputSchema:kw.extend({response_format:Pe.describe("Output format: 'json', 'markdown', or 'toon' (Token-Oriented Object Notation for reduced token usage) (default: toon - RECOMMENDED for 30-60% token savings)")}),outputSchema:Ee,annotations:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},async({fromFile:e,moduleSpecifier:t,response_format:n})=>{let o=await Oe(),r=n??"json";if(o.error)return W(o.response,r);let i=await Ne("resolve_module_path",{fromFile:e,moduleSpecifier:t});return W(i,r)});Ie.registerTool("graphitlive_get_index_status",{title:"Get Dependency Index Status",description:`USE THIS TOOL WHEN you need to verify the dependency analyzer is ready, check how many files are indexed, or diagnose performance issues. Examples: "Is the dependency index ready?", "How many files are indexed?", "What's the cache hit rate?", "Is the analyzer warmed up?"
|
|
113
|
+
|
|
114
|
+
WHY: Before running expensive dependency analysis, you may want to verify the system is ready and understand its current state. This tool gives you insight into the indexing status, cache efficiency, and overall health of the dependency analyzer.
|
|
115
|
+
|
|
116
|
+
RETURNS: Index state (ready/initializing), number of files indexed, reverse index statistics (for finding references), cache size and hit rates, warmup completion status and duration. Useful for debugging and understanding analyzer performance.`,inputSchema:z({response_format:Pe.describe("Output format: 'json', 'markdown', or 'toon' (Token-Oriented Object Notation for reduced token usage) (default: toon - RECOMMENDED for 30-60% token savings)")}),outputSchema:Ee,annotations:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},async({response_format:e})=>{let t=await Oe(),n=e??"json";if(t.error)return W(t.response,n);let o=await Ne("get_index_status",{});return W(o,n)});Ie.registerTool("graphitlive_invalidate_files",{title:"Invalidate File Cache",description:`USE THIS TOOL WHEN you have modified files and need to refresh the dependency analysis. Examples: "I just changed utils.ts, refresh the cache", "Invalidate these files I modified", "Clear cache for files I edited", "Refresh dependency data after my changes"
|
|
117
|
+
|
|
118
|
+
WHY: The dependency analyzer caches file analysis for performance. When you modify a file's imports or exports, the cache becomes stale. This tool clears the cache for specific files, forcing re-analysis on the next query. Use this after file modifications to ensure accurate dependency data.
|
|
119
|
+
|
|
120
|
+
RETURNS: The number of files invalidated, which files were cleared from cache, and which files were not found in cache (already invalidated or never analyzed). The reverse index is also updated to remove stale references.`,inputSchema:ww.extend({response_format:Pe.describe("Output format: 'json', 'markdown', or 'toon' (Token-Oriented Object Notation for reduced token usage) (default: toon - RECOMMENDED for 30-60% token savings)")}),outputSchema:Ee,annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!1}},async({filePaths:e,response_format:t})=>{let n=await Oe(),o=t??"json";if(n.error)return W(n.response,o);let r=await Ne("invalidate_files",{filePaths:e});return W(r,o)});Ie.registerTool("graphitlive_rebuild_index",{title:"Rebuild Full Dependency Index",description:`USE THIS TOOL WHEN you need to completely rebuild the dependency index from scratch. Examples: "Rebuild the entire index", "Start fresh with dependency analysis", "Clear all cached data and re-index", "The index seems corrupted, rebuild it"
|
|
121
|
+
|
|
122
|
+
WHY: In rare cases, the dependency index may become out of sync with the actual codebase (e.g., after major refactoring, branch switches, or git operations that changed many files). This tool clears ALL cached data and re-indexes the entire workspace, ensuring the dependency graph is accurate.
|
|
123
|
+
|
|
124
|
+
RETURNS: The number of files re-indexed, time taken to rebuild, new cache size, and updated reverse index statistics. Note: This operation can take several seconds for large workspaces.`,inputSchema:z({response_format:Pe.describe("Output format: 'json', 'markdown', or 'toon' (Token-Oriented Object Notation for reduced token usage) (default: toon - RECOMMENDED for 30-60% token savings)")}),outputSchema:Ee,annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!1}},async({response_format:e})=>{let t=await Oe(),n=e??"json";if(t.error)return W(t.response,n);let o=await Ne("rebuild_index",{});return W(o,n)});Ie.registerTool("graphitlive_get_symbol_graph",{title:"Get Symbol-Level Dependency Graph",description:`CRITICAL: USE THIS TOOL WHEN the user wants to drill down from file-level dependencies to symbol-level (functions, classes, methods) dependencies. This enables **surgical refactoring** by showing exactly which symbols within a file depend on which external symbols.
|
|
125
|
+
|
|
126
|
+
WHEN TO USE:
|
|
127
|
+
- User asks "Which functions in this file use X?"
|
|
128
|
+
- User wants to understand the internal structure of a file's dependencies
|
|
129
|
+
- User needs to refactor a specific class/function without breaking others in the same file
|
|
130
|
+
- User asks about symbol-level architecture or method-level coupling
|
|
131
|
+
|
|
132
|
+
EXAMPLES:
|
|
133
|
+
- "Show me which functions in UserService.ts call the database"
|
|
134
|
+
- "I want to refactor the calculatePrice function - what does it depend on?"
|
|
135
|
+
- "Give me the symbol-level graph for src/components/Button.vue"
|
|
136
|
+
|
|
137
|
+
WHY YOU NEED THIS:
|
|
138
|
+
Without this tool, you only see file-to-file relationships. This tool uses AST parsing (ts-morph) to extract:
|
|
139
|
+
1. All exported symbols (functions, classes, variables) with their types and line numbers
|
|
140
|
+
2. Precise symbol-to-symbol dependencies (e.g., "function A calls function B from module X")
|
|
141
|
+
3. Import alias resolution (tracks original names even when aliased)
|
|
142
|
+
4. Filters out type-only imports (interfaces/types vs runtime code)
|
|
143
|
+
|
|
144
|
+
RETURNS:
|
|
145
|
+
- List of exported symbols with: name, kind (FunctionDeclaration, ClassDeclaration, etc.), line number, category (function/class/variable/interface/type)
|
|
146
|
+
- Symbol dependency edges with source/target symbol IDs and file paths
|
|
147
|
+
- Categorized by runtime vs type-only for filtering
|
|
148
|
+
|
|
149
|
+
This enables the **"Drill Down" UX pattern** where users double-click a file node to see its internal symbol graph.`,inputSchema:Sw.extend({response_format:Pe.describe("Output format: 'json', 'markdown', or 'toon' (Token-Oriented Object Notation for reduced token usage) (default: toon - RECOMMENDED for 30-60% token savings)")}),outputSchema:Ee,annotations:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},async({filePath:e,response_format:t})=>{let n=await Oe(),o=t??"json";if(n.error)return W(n.response,o);let r=await Ne("get_symbol_graph",{filePath:e});return W(r,o)});Ie.registerTool("graphitlive_find_unused_symbols",{title:"Find Dead Code (Unused Exports)",description:`CRITICAL: USE THIS TOOL WHEN the user wants to identify potential dead code or refactor opportunities by finding exported symbols that are never imported/used anywhere in the project.
|
|
150
|
+
|
|
151
|
+
WHEN TO USE:
|
|
152
|
+
- User asks "What exports are unused in this file?"
|
|
153
|
+
- User wants to clean up dead code or remove unnecessary exports
|
|
154
|
+
- User needs to understand which parts of an API are actually consumed
|
|
155
|
+
- Code review to identify bloat or over-exported symbols
|
|
156
|
+
|
|
157
|
+
EXAMPLES:
|
|
158
|
+
- "Find dead code in src/utils/helpers.ts"
|
|
159
|
+
- "Which exports in my API file are never imported?"
|
|
160
|
+
- "Show me unused functions I can safely delete from UserService.ts"
|
|
161
|
+
|
|
162
|
+
WHY YOU NEED THIS:
|
|
163
|
+
You cannot determine if an export is used without scanning the entire codebase. This tool:
|
|
164
|
+
1. Extracts all exported symbols from the target file
|
|
165
|
+
2. Cross-references them with the reverse dependency index
|
|
166
|
+
3. Identifies symbols that are exported but never imported elsewhere
|
|
167
|
+
4. Calculates the "unused percentage" to prioritize cleanup
|
|
168
|
+
|
|
169
|
+
RETURNS:
|
|
170
|
+
- List of unused exported symbols with their metadata (name, kind, line number, category)
|
|
171
|
+
- Total count of unused vs total exported symbols
|
|
172
|
+
- Percentage of exports that are dead code
|
|
173
|
+
- Each unused symbol includes its line number for quick navigation
|
|
174
|
+
|
|
175
|
+
NOTE: Currently returns all exports as potentially unused until full cross-file symbol resolution is implemented. This will be enhanced to accurately track symbol-level imports across the project.`,inputSchema:zw.extend({response_format:Pe.describe("Output format: 'json', 'markdown', or 'toon' (Token-Oriented Object Notation for reduced token usage) (default: toon - RECOMMENDED for 30-60% token savings)")}),outputSchema:Ee,annotations:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},async({filePath:e,response_format:t})=>{let n=await Oe(),o=t??"json";if(n.error)return W(n.response,o);let r=await Ne("find_unused_symbols",{filePath:e});return W(r,o)});Ie.registerTool("graphitlive_get_symbol_dependents",{title:"Find All Callers of a Symbol (Impact Analysis)",description:`CRITICAL: USE THIS TOOL WHEN the user wants to know every file and specific method/function that calls or uses a given symbol. This is essential for surgical refactoring and precise impact analysis.
|
|
176
|
+
|
|
177
|
+
WHEN TO USE:
|
|
178
|
+
- User asks "What uses this function?" or "Who calls this method?"
|
|
179
|
+
- User wants to refactor a function and needs to know all callers
|
|
180
|
+
- User needs to change a function signature and must update all call sites
|
|
181
|
+
- Impact analysis before modifying an API, class method, or utility function
|
|
182
|
+
- User asks about the "blast radius" of a change to a specific symbol
|
|
183
|
+
|
|
184
|
+
EXAMPLES:
|
|
185
|
+
- "What calls the formatDate function in utils.ts?"
|
|
186
|
+
- "I'm changing UserService.login() signature - who depends on it?"
|
|
187
|
+
- "Find all code that uses the calculateTotal method"
|
|
188
|
+
|
|
189
|
+
WHY YOU NEED THIS:
|
|
190
|
+
Unlike file-level dependencies, this tool provides SYMBOL-LEVEL precision:
|
|
191
|
+
- Knows exactly which FUNCTIONS/METHODS call the target symbol
|
|
192
|
+
- Works across the entire codebase, not just one file
|
|
193
|
+
- Essential for safe refactoring without breaking dependent code
|
|
194
|
+
- Answers the question: "If I change this signature, what breaks?"
|
|
195
|
+
|
|
196
|
+
RETURNS:
|
|
197
|
+
- List of all symbol dependencies that use the target symbol
|
|
198
|
+
- Each entry includes: caller symbol ID, file path, and relative path
|
|
199
|
+
- Total count of dependents for quick impact assessment
|
|
200
|
+
|
|
201
|
+
EXAMPLE USE CASE:
|
|
202
|
+
User: "I want to add a parameter to formatDate(). What will break?"
|
|
203
|
+
\u2192 Use this tool with symbolName="formatDate" to get all callers, then the user knows exactly which functions need updating.`,inputSchema:Iw.extend({response_format:Pe.describe("Output format: 'json', 'markdown', or 'toon' (Token-Oriented Object Notation for reduced token usage) (default: toon - RECOMMENDED for 30-60% token savings)")}),outputSchema:Ee,annotations:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},async({filePath:e,symbolName:t,response_format:n})=>{let o=await Oe(),r=n??"json";if(o.error)return W(o.response,r);let i=await Ne("get_symbol_dependents",{filePath:e,symbolName:t});return W(i,r)});Ie.registerTool("graphitlive_trace_function_execution",{title:"Trace Function Execution Chain",description:`CRITICAL: USE THIS TOOL WHEN the user wants to trace the full, deep call chain from a root symbol (function, method, or class). This is essential for understanding the execution flow through services, repositories, and utilities.
|
|
204
|
+
|
|
205
|
+
WHEN TO USE:
|
|
206
|
+
- User asks "What does this function call?"
|
|
207
|
+
- User wants to trace an API call through the entire stack
|
|
208
|
+
- User needs to understand the full execution path of a feature
|
|
209
|
+
- User asks about the call hierarchy or call graph
|
|
210
|
+
- Impact analysis for deep refactoring
|
|
211
|
+
|
|
212
|
+
EXAMPLES:
|
|
213
|
+
- "Trace the execution of handleUserLogin from the controller"
|
|
214
|
+
- "What's the full call chain from processOrder in OrderService?"
|
|
215
|
+
- "Map out everything that happens when fetchData() is called"
|
|
216
|
+
|
|
217
|
+
WHY YOU NEED THIS:
|
|
218
|
+
This tool provides a complete picture of what a function calls, recursively following the call chain until:
|
|
219
|
+
1. It reaches external modules (node_modules)
|
|
220
|
+
2. It hits the max depth limit
|
|
221
|
+
3. It encounters a cycle (already visited symbol)
|
|
222
|
+
|
|
223
|
+
Unlike graphitlive_get_symbol_graph which shows only direct dependencies, this tool follows the entire execution chain through multiple files.
|
|
224
|
+
|
|
225
|
+
RETURNS:
|
|
226
|
+
- Root symbol information (ID, file path, symbol name)
|
|
227
|
+
- Complete call chain with depth, caller, and called symbols
|
|
228
|
+
- Resolved file paths for each called symbol
|
|
229
|
+
- List of all visited symbols (for detecting coverage)
|
|
230
|
+
- Whether the max depth was reached (may need deeper trace)
|
|
231
|
+
|
|
232
|
+
Use cases:
|
|
233
|
+
- Trace \`handleRequest\` from controller \u2192 service \u2192 repository \u2192 database
|
|
234
|
+
- Understand which utilities a feature depends on
|
|
235
|
+
- Map out the blast radius of a function change`,inputSchema:Tw.extend({response_format:Pe.describe("Output format: 'json', 'markdown', or 'toon' (Token-Oriented Object Notation for reduced token usage) (default: toon - RECOMMENDED for 30-60% token savings)")}),outputSchema:Ee,annotations:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},async({filePath:e,symbolName:t,maxDepth:n,response_format:o})=>{let r=await Oe(),i=o??"json";if(r.error)return W(r.response,i);let a=await Ne("trace_function_execution",{filePath:e,symbolName:t,maxDepth:n});return W(a,i)});Ie.registerTool("graphitlive_get_symbol_callers",{title:"Get Symbol Callers (Reverse Dependencies)",description:`CRITICAL: USE THIS TOOL WHEN the user wants to find all callers of a specific symbol (function, method, class, or variable).
|
|
236
|
+
|
|
237
|
+
WHEN TO USE:
|
|
238
|
+
- User asks "Who calls this function?"
|
|
239
|
+
- User asks "Where is this method used?"
|
|
240
|
+
- User wants to understand symbol usage across the codebase
|
|
241
|
+
- User needs reverse symbol-level dependencies
|
|
242
|
+
- Pre-refactoring analysis to understand blast radius
|
|
243
|
+
|
|
244
|
+
EXAMPLES:
|
|
245
|
+
- "Who calls the validateEmail function?"
|
|
246
|
+
- "Show me all usages of UserRepository.findById"
|
|
247
|
+
- "Find callers of the deprecated parseData method"
|
|
248
|
+
|
|
249
|
+
WHY YOU NEED THIS:
|
|
250
|
+
Unlike file-level reverse dependencies (graphitlive_find_referencing_files), this tool provides **symbol-level granularity**.
|
|
251
|
+
It answers "Which specific functions call my function?" rather than "Which files import my file?".
|
|
252
|
+
|
|
253
|
+
RETURNS:
|
|
254
|
+
- List of callers with their file path, symbol name, line number
|
|
255
|
+
- Usage type: 'runtime' (actual code execution) vs 'type-only' (interface/type usage)
|
|
256
|
+
- Sorted by depth (direct callers first)
|
|
257
|
+
|
|
258
|
+
Use cases:
|
|
259
|
+
- Find all call sites before renaming a function
|
|
260
|
+
- Identify dead code (symbols with no callers)
|
|
261
|
+
- Understand symbol coupling across modules`,inputSchema:Pw.extend({response_format:Pe.describe("Output format: 'json', 'markdown', or 'toon' (Token-Oriented Object Notation for reduced token usage) (default: toon - RECOMMENDED for 30-60% token savings)")}),outputSchema:Ee,annotations:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},async({filePath:e,symbolName:t,includeTypeOnly:n,response_format:o})=>{let r=await Oe(),i=o??"json";if(r.error)return W(r.response,i);let a=await Ne("get_symbol_callers",{filePath:e,symbolName:t,includeTypeOnly:n});return W(a,i)});Ie.registerTool("graphitlive_analyze_breaking_changes",{title:"Analyze Breaking Changes in Signature",description:`CRITICAL: USE THIS TOOL WHEN the user wants to detect breaking changes after modifying a function, method, or class signature.
|
|
262
|
+
|
|
263
|
+
WHEN TO USE:
|
|
264
|
+
- User asks "Will this change break anything?"
|
|
265
|
+
- User is about to modify function parameters
|
|
266
|
+
- User changed return type and wants to validate
|
|
267
|
+
- User renamed or removed parameters
|
|
268
|
+
- Pre-PR validation for API changes
|
|
269
|
+
|
|
270
|
+
EXAMPLES:
|
|
271
|
+
- "I added a required parameter to login() - what breaks?"
|
|
272
|
+
- "Compare old vs new signature of calculatePrice and show breaking changes"
|
|
273
|
+
- "Validate my API changes before committing"
|
|
274
|
+
|
|
275
|
+
WHY YOU NEED THIS:
|
|
276
|
+
This tool compares the BEFORE and AFTER versions of a function/method signature and detects:
|
|
277
|
+
- Added required parameters (BREAKING)
|
|
278
|
+
- Removed parameters (BREAKING)
|
|
279
|
+
- Changed parameter types (BREAKING)
|
|
280
|
+
- Changed return type (BREAKING)
|
|
281
|
+
- Added optional parameters (usually safe)
|
|
282
|
+
- Parameter order changes
|
|
283
|
+
|
|
284
|
+
RETURNS:
|
|
285
|
+
- List of breaking changes with type and description
|
|
286
|
+
- Severity level (high/medium/low)
|
|
287
|
+
- Suggested migration steps
|
|
288
|
+
- List of affected callers that need to be updated
|
|
289
|
+
|
|
290
|
+
Use cases:
|
|
291
|
+
- Validate refactoring before committing
|
|
292
|
+
- Generate migration notes for API changes
|
|
293
|
+
- Identify which call sites need updates`,inputSchema:Ew.extend({response_format:Pe.describe("Output format: 'json', 'markdown', or 'toon' (Token-Oriented Object Notation for reduced token usage) (default: toon - RECOMMENDED for 30-60% token savings)")}),outputSchema:Ee,annotations:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},async({filePath:e,symbolName:t,oldContent:n,newContent:o,response_format:r})=>{let i=await Oe(),a=r??"json";if(i.error)return W(i.response,a);let s=await Ne("analyze_breaking_changes",{filePath:e,symbolName:t,oldContent:n,newContent:o});return W(s,a)});Ie.registerTool("graphitlive_get_impact_analysis",{title:"Get Comprehensive Impact Analysis",description:`CRITICAL: USE THIS TOOL WHEN the user needs a full impact assessment before modifying a symbol.
|
|
294
|
+
|
|
295
|
+
WHEN TO USE:
|
|
296
|
+
- User asks "What's the blast radius of this change?"
|
|
297
|
+
- User wants to understand full impact of modifying a function/class
|
|
298
|
+
- User needs to identify all affected code paths
|
|
299
|
+
- Pre-refactoring risk assessment
|
|
300
|
+
- Understanding module coupling
|
|
301
|
+
|
|
302
|
+
EXAMPLES:
|
|
303
|
+
- "Full impact analysis for modifying UserService.authenticate"
|
|
304
|
+
- "What's the blast radius if I change the formatCurrency function?"
|
|
305
|
+
- "Show me all code affected by refactoring the Database class"
|
|
306
|
+
|
|
307
|
+
WHY YOU NEED THIS:
|
|
308
|
+
This is the MOST COMPREHENSIVE impact analysis tool. It combines:
|
|
309
|
+
1. Symbol-level reverse dependencies (who calls this symbol?)
|
|
310
|
+
2. Transitive impact (who calls the callers? And so on...)
|
|
311
|
+
3. Type vs runtime usage distinction
|
|
312
|
+
4. File-level aggregation
|
|
313
|
+
5. Human-readable risk assessment
|
|
314
|
+
|
|
315
|
+
RETURNS:
|
|
316
|
+
- Impact level: 'high', 'medium', or 'low'
|
|
317
|
+
- Total impact count (direct + transitive)
|
|
318
|
+
- Breakdown: runtime vs type-only impacts
|
|
319
|
+
- List of impacted symbols with:
|
|
320
|
+
- Symbol ID and file path
|
|
321
|
+
- Depth (1 = direct, 2+ = transitive)
|
|
322
|
+
- Usage type (runtime/type-only)
|
|
323
|
+
- Affected files list
|
|
324
|
+
- Human-readable summary with recommendations
|
|
325
|
+
|
|
326
|
+
Use cases:
|
|
327
|
+
- Full risk assessment before major refactoring
|
|
328
|
+
- Identify critical vs low-impact changes
|
|
329
|
+
- Generate change impact reports
|
|
330
|
+
- Prioritize which call sites to update first`,inputSchema:Ow.extend({response_format:Pe.describe("Output format: 'json', 'markdown', or 'toon' (Token-Oriented Object Notation for reduced token usage) (default: toon - RECOMMENDED for 30-60% token savings)")}),outputSchema:Ee,annotations:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},async({filePath:e,symbolName:t,includeTransitive:n,maxDepth:o,response_format:r})=>{let i=await Oe(),a=r??"json";if(i.error)return W(i.response,a);let s=await Ne("get_impact_analysis",{filePath:e,symbolName:t,includeTransitive:n,maxDepth:o});return W(s,a)});Ie.registerTool("graphitlive_analyze_file_logic",{title:"Analyze File Logic & Call Hierarchy",description:`CRITICAL: USE THIS TOOL WHEN analyzing symbol-level call hierarchies and code flow within a single file.
|
|
331
|
+
|
|
332
|
+
WHEN TO USE:
|
|
333
|
+
- User asks "How does this file work?" or "Explain the logic in this file"
|
|
334
|
+
- User wants to understand function call relationships within a file
|
|
335
|
+
- User needs to see which functions call which (intra-file analysis)
|
|
336
|
+
- Identifying code flow and control structures
|
|
337
|
+
- Understanding symbol-level dependencies before refactoring
|
|
338
|
+
|
|
339
|
+
EXAMPLES:
|
|
340
|
+
- "Show me the call hierarchy in src/utils/parser.ts"
|
|
341
|
+
- "What functions does processData call?"
|
|
342
|
+
- "Explain the code flow in this file"
|
|
343
|
+
- "Which symbols are called by the main function?"
|
|
344
|
+
|
|
345
|
+
WHY YOU NEED THIS:
|
|
346
|
+
Without this tool, you cannot see the actual call relationships between functions/methods within a file. This tool uses LSP (Language Server Protocol) to get precise call hierarchy data from the TypeScript compiler (or Pylance/rust-analyzer for Python/Rust), giving you ground truth about:
|
|
347
|
+
- Which functions/methods call which
|
|
348
|
+
- Symbol types (function, class, variable)
|
|
349
|
+
- Export status of each symbol
|
|
350
|
+
- Circular/recursive call detection
|
|
351
|
+
- Line numbers for navigation
|
|
352
|
+
|
|
353
|
+
RETURNS:
|
|
354
|
+
IntraFileGraph with:
|
|
355
|
+
- nodes: All symbols (functions, classes, variables) with:
|
|
356
|
+
- Symbol ID format: "filePath:symbolName"
|
|
357
|
+
- Type: 'function' | 'class' | 'variable'
|
|
358
|
+
- isExported: Whether symbol is exported
|
|
359
|
+
- Line number range
|
|
360
|
+
- edges: Call relationships with:
|
|
361
|
+
- source/target symbol IDs
|
|
362
|
+
- relation type: 'calls' (for function calls)
|
|
363
|
+
- Line number of the call
|
|
364
|
+
- hasCycle: Boolean indicating recursive/circular calls
|
|
365
|
+
- cycleNodes: Array of symbol IDs in cycles (if detected)
|
|
366
|
+
|
|
367
|
+
Format options:
|
|
368
|
+
- 'toon': Token-efficient format (30-60% savings) - RECOMMENDED
|
|
369
|
+
- 'json': Full structured data
|
|
370
|
+
- 'markdown': Human-readable narrative
|
|
371
|
+
|
|
372
|
+
Supported languages: TypeScript, JavaScript, Python, Rust (requires LSP extension)
|
|
373
|
+
|
|
374
|
+
Use cases:
|
|
375
|
+
- Code comprehension for new codebases
|
|
376
|
+
- Pre-refactoring impact analysis (intra-file scope)
|
|
377
|
+
- Detecting recursive functions
|
|
378
|
+
- Understanding call chains
|
|
379
|
+
- AI-powered code explanation`,inputSchema:z({filePath:h().describe("Absolute path to the file to analyze"),includeExternal:be().optional().describe("Include external calls (default: false - intra-file only)"),response_format:Pe.describe("Output format: 'json', 'markdown', or 'toon' (default: toon - RECOMMENDED for 30-60% token savings)")}),outputSchema:Ee,annotations:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},async({filePath:e,includeExternal:t,response_format:n})=>{let o=await Oe(),r=n??"toon";if(o.error)return W(o.response,r);let i=await Ne("analyze_file_logic",{filePath:e,includeExternal:t??!1});return W(i,r)});Ie.registerTool("graphitlive_generate_codemap",{title:"Generate File Codemap",description:`CRITICAL: USE THIS TOOL WHEN you need a comprehensive overview of a single source file \u2014 its exports, internals, dependencies, dependents, and intra-file call flow.
|
|
380
|
+
|
|
381
|
+
WHEN TO USE:
|
|
382
|
+
- User asks "Give me an overview of this file" or "What does this file do?"
|
|
383
|
+
- Before refactoring: understand the full context of a file (what it exports, who depends on it, internal call flow)
|
|
384
|
+
- Onboarding to a new codebase: get a structured summary of any file
|
|
385
|
+
- Documentation generation: extract a per-file codemap for architecture docs
|
|
386
|
+
- Understanding coupling: see both who this file imports and who imports it
|
|
387
|
+
|
|
388
|
+
EXAMPLES:
|
|
389
|
+
- "Generate a codemap for src/analyzer/Spider.ts"
|
|
390
|
+
- "What are the exports and dependencies of this file?"
|
|
391
|
+
- "Give me a full structural overview of this module"
|
|
392
|
+
- "Who depends on this file and what does it export?"
|
|
393
|
+
|
|
394
|
+
WHY YOU NEED THIS:
|
|
395
|
+
This is the SINGLE tool that gathers ALL available information about a file in one call. Without it you would need to call 4-5 separate tools (analyze_dependencies + get_symbol_graph + find_referencing_files + analyze_file_logic). This tool orchestrates them for you and returns a unified, compact result.
|
|
396
|
+
|
|
397
|
+
RETURNS:
|
|
398
|
+
- filePath, relativePath, language, lineCount
|
|
399
|
+
- exports: all exported symbols (name, kind, line)
|
|
400
|
+
- internals: all non-exported symbols
|
|
401
|
+
- dependencies: files this file imports (module, resolvedPath, importType, line)
|
|
402
|
+
- dependents: files that import this file (reverse dependencies)
|
|
403
|
+
- callFlow: intra-file caller\u2192callee edges
|
|
404
|
+
- hasCycle, cycleSymbols: circular call detection
|
|
405
|
+
- analysisTimeMs
|
|
406
|
+
|
|
407
|
+
Supported languages: TypeScript, JavaScript, Python, Rust, Vue, Svelte`,inputSchema:z({filePath:h().describe("Absolute path to the file to generate a codemap for"),response_format:Pe.describe("Output format: 'json', 'markdown', or 'toon' (default: toon - RECOMMENDED for 30-60% token savings)")}),outputSchema:Ee,annotations:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},async({filePath:e,response_format:t})=>{let n=await Oe(),o=t??"toon";if(n.error)return W(n.response,o);let r=await Ne("generate_codemap",{filePath:e});return W(r,o)});Ie.registerTool("graphitlive_query_call_graph",{title:"Query Cross-File Call Graph",description:`CRITICAL: USE THIS TOOL WHEN the user wants to trace function calls across multiple files \u2014 "who calls X?" or "what does X call?" at the call-graph level.
|
|
408
|
+
|
|
409
|
+
WHEN TO USE:
|
|
410
|
+
- User asks "Who calls this function from other files?"
|
|
411
|
+
- User asks "What functions does this method call?"
|
|
412
|
+
- User needs cross-file call chain analysis (not just imports)
|
|
413
|
+
- User wants to trace execution flow across the entire codebase
|
|
414
|
+
- Pre-refactoring impact analysis at function-call level
|
|
415
|
+
- Detecting circular call chains across modules
|
|
416
|
+
|
|
417
|
+
EXAMPLES:
|
|
418
|
+
- "Trace all callers of handleRequest across the codebase"
|
|
419
|
+
- "What functions does processOrder call, recursively?"
|
|
420
|
+
- "Show me the full call chain for authenticate \u2014 3 levels deep"
|
|
421
|
+
- "Find circular call dependencies involving parseConfig"
|
|
422
|
+
|
|
423
|
+
WHY YOU NEED THIS:
|
|
424
|
+
Unlike graphitlive_get_symbol_callers (which uses import-level reverse dependencies), this tool uses a **SQLite-backed call graph** built from tree-sitter AST analysis.
|
|
425
|
+
It provides actual function-call relationships (CALLS, INHERITS, IMPLEMENTS, USES), not just import statements.
|
|
426
|
+
This answers "which specific function calls my function at runtime?" with cross-file resolution.
|
|
427
|
+
|
|
428
|
+
First invocation indexes the entire workspace (3-8s). Subsequent queries are instant.
|
|
429
|
+
|
|
430
|
+
RETURNS:
|
|
431
|
+
- symbol: The matched symbol (name, type, file, line)
|
|
432
|
+
- callers: Functions that call this symbol (with file, line, relation type)
|
|
433
|
+
- callees: Functions called by this symbol (with file, line, relation type)
|
|
434
|
+
- Cycle detection (isCyclic flag on edges)
|
|
435
|
+
- indexedFiles: Number of files in the call graph index`,inputSchema:jw.extend({response_format:Pe.describe("Output format: 'json', 'markdown', or 'toon' (default: toon - RECOMMENDED for 30-60% token savings)")}),outputSchema:Ee,annotations:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},async({filePath:e,symbolName:t,direction:n,depth:o,relationTypes:r,response_format:i})=>{let a=await Oe(),s=i??"toon";if(a.error)return W(a.response,s);let c=await Ne("query_call_graph",{filePath:e,symbolName:t,direction:n,depth:o,relationTypes:r});return W(c,s)});async function FN(){J("[McpServer] Graph-It-Live MCP Server starting..."),J(`[McpServer] Workspace: ${ur()||"(not configured - use graphitlive_set_workspace)"}`),J(`[McpServer] TSConfig: ${we.tsConfigPath??"auto-detect"}`),J(`[McpServer] Exclude node_modules: ${we.excludeNodeModules}`),J(`[McpServer] Max depth: ${we.maxDepth}`);let e=new ld;await Ie.connect(e),J("[McpServer] MCP Server connected via stdio"),ev().catch(t=>{J(`[McpServer] Background warmup failed: ${t}`)}),process.on("SIGINT",()=>{J("[McpServer] Received SIGINT, shutting down..."),tt?.dispose(),process.exit(0)}),process.on("SIGTERM",()=>{J("[McpServer] Received SIGTERM, shutting down..."),tt?.dispose(),process.exit(0)})}FN().catch(e=>{J(`[McpServer] Fatal error: ${e instanceof Error?e.message:String(e)}`),process.exit(1)});
|