vantage-mcp-server 2.6.4 → 2.6.6

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.
Files changed (3) hide show
  1. package/index.js +80 -73
  2. package/index.js.map +4 -4
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -1,53 +1,53 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var V0=Object.create;var Vd=Object.defineProperty;var F0=Object.getOwnPropertyDescriptor;var W0=Object.getOwnPropertyNames;var G0=Object.getPrototypeOf,K0=Object.prototype.hasOwnProperty;var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),mn=(e,t)=>{for(var r in t)Vd(e,r,{get:t[r],enumerable:!0})},H0=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of W0(t))!K0.call(e,n)&&n!==r&&Vd(e,n,{get:()=>t[n],enumerable:!(o=F0(t,n))||o.enumerable});return e};var We=(e,t,r)=>(r=e!=null?V0(G0(e)):{},H0(t||!e||!e.__esModule?Vd(r,"default",{value:e,enumerable:!0}):r,e));var Us=w(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.regexpCode=me.getEsmExportName=me.getProperty=me.safeStringify=me.stringify=me.strConcat=me.addCodeArg=me.str=me._=me.nil=me._Code=me.Name=me.IDENTIFIER=me._CodeOrName=void 0;var qs=class{};me._CodeOrName=qs;me.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Pn=class extends qs{constructor(t){if(super(),!me.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}}};me.Name=Pn;var Dt=class extends qs{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((r,o)=>`${r}${o}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,o)=>(o instanceof Pn&&(r[o.str]=(r[o.str]||0)+1),r),{})}};me._Code=Dt;me.nil=new Dt("");function pw(e,...t){let r=[e[0]],o=0;for(;o<t.length;)Am(r,t[o]),r.push(e[++o]);return new Dt(r)}me._=pw;var jm=new Dt("+");function fw(e,...t){let r=[Ms(e[0])],o=0;for(;o<t.length;)r.push(jm),Am(r,t[o]),r.push(jm,Ms(e[++o]));return QE(r),new Dt(r)}me.str=fw;function Am(e,t){t instanceof Dt?e.push(...t._items):t instanceof Pn?e.push(t):e.push(eN(t))}me.addCodeArg=Am;function QE(e){let t=1;for(;t<e.length-1;){if(e[t]===jm){let r=YE(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function YE(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof Pn||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 Pn))return`"${e}${t.slice(1)}`}function XE(e,t){return t.emptyStr()?e:e.emptyStr()?t:fw`${e}${t}`}me.strConcat=XE;function eN(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Ms(Array.isArray(e)?e.join(","):e)}function tN(e){return new Dt(Ms(e))}me.stringify=tN;function Ms(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}me.safeStringify=Ms;function rN(e){return typeof e=="string"&&me.IDENTIFIER.test(e)?new Dt(`.${e}`):pw`[${e}]`}me.getProperty=rN;function nN(e){if(typeof e=="string"&&me.IDENTIFIER.test(e))return new Dt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}me.getEsmExportName=nN;function oN(e){return new Dt(e.toString())}me.regexpCode=oN});var qm=w(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.ValueScope=yt.ValueScopeName=yt.Scope=yt.varKinds=yt.UsedValueState=void 0;var vt=Us(),Dm=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},wl;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(wl||(yt.UsedValueState=wl={}));yt.varKinds={const:new vt.Name("const"),let:new vt.Name("let"),var:new vt.Name("var")};var $l=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof vt.Name?t:this.name(t)}name(t){return new vt.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,o;if(!((o=(r=this._parent)===null||r===void 0?void 0:r._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}}};yt.Scope=$l;var kl=class extends vt.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:o}){this.value=t,this.scopePath=(0,vt._)`.${new vt.Name(r)}[${o}]`}};yt.ValueScopeName=kl;var iN=(0,vt._)`\n`,Cm=class extends $l{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?iN:vt.nil}}get(){return this._scope}name(t){return new kl(t,this._newName(t))}value(t,r){var o;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(t),{prefix:i}=n,s=(o=r.key)!==null&&o!==void 0?o:r.ref,a=this._values[i];if(a){let l=a.get(s);if(l)return l}else a=this._values[i]=new Map;a.set(s,n);let c=this._scope[i]||(this._scope[i]=[]),u=c.length;return c[u]=r.ref,n.setValue(r,{property:i,itemIndex:u}),n}getValue(t,r){let o=this._values[t];if(o)return o.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,o=>{if(o.scopePath===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return(0,vt._)`${t}${o.scopePath}`})}scopeCode(t=this._values,r,o){return this._reduceValues(t,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},r,o)}_reduceValues(t,r,o={},n){let i=vt.nil;for(let s in t){let a=t[s];if(!a)continue;let c=o[s]=o[s]||new Map;a.forEach(u=>{if(c.has(u))return;c.set(u,wl.Started);let l=r(u);if(l){let d=this.opts.es5?yt.varKinds.var:yt.varKinds.const;i=(0,vt._)`${i}${d} ${u} = ${l};${this.opts._n}`}else if(l=n?.(u))i=(0,vt._)`${i}${l}${this.opts._n}`;else throw new Dm(u);c.set(u,wl.Completed)})}return i}};yt.ValueScope=Cm});var oe=w(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.or=re.and=re.not=re.CodeGen=re.operators=re.varKinds=re.ValueScopeName=re.ValueScope=re.Scope=re.Name=re.regexpCode=re.stringify=re.getProperty=re.nil=re.strConcat=re.str=re._=void 0;var le=Us(),Jt=qm(),Br=Us();Object.defineProperty(re,"_",{enumerable:!0,get:function(){return Br._}});Object.defineProperty(re,"str",{enumerable:!0,get:function(){return Br.str}});Object.defineProperty(re,"strConcat",{enumerable:!0,get:function(){return Br.strConcat}});Object.defineProperty(re,"nil",{enumerable:!0,get:function(){return Br.nil}});Object.defineProperty(re,"getProperty",{enumerable:!0,get:function(){return Br.getProperty}});Object.defineProperty(re,"stringify",{enumerable:!0,get:function(){return Br.stringify}});Object.defineProperty(re,"regexpCode",{enumerable:!0,get:function(){return Br.regexpCode}});Object.defineProperty(re,"Name",{enumerable:!0,get:function(){return Br.Name}});var Pl=qm();Object.defineProperty(re,"Scope",{enumerable:!0,get:function(){return Pl.Scope}});Object.defineProperty(re,"ValueScope",{enumerable:!0,get:function(){return Pl.ValueScope}});Object.defineProperty(re,"ValueScopeName",{enumerable:!0,get:function(){return Pl.ValueScopeName}});Object.defineProperty(re,"varKinds",{enumerable:!0,get:function(){return Pl.varKinds}});re.operators={GT:new le._Code(">"),GTE:new le._Code(">="),LT:new le._Code("<"),LTE:new le._Code("<="),EQ:new le._Code("==="),NEQ:new le._Code("!=="),NOT:new le._Code("!"),OR:new le._Code("||"),AND:new le._Code("&&"),ADD:new le._Code("+")};var Tr=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},Mm=class extends Tr{constructor(t,r,o){super(),this.varKind=t,this.name=r,this.rhs=o}render({es5:t,_n:r}){let o=t?Jt.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${o} ${this.name}${n};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=Ao(this.rhs,t,r)),this}get names(){return this.rhs instanceof le._CodeOrName?this.rhs.names:{}}},xl=class extends Tr{constructor(t,r,o){super(),this.lhs=t,this.rhs=r,this.sideEffects=o}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof le.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=Ao(this.rhs,t,r),this}get names(){let t=this.lhs instanceof le.Name?{}:{...this.lhs.names};return Tl(t,this.rhs)}},Um=class extends xl{constructor(t,r,o,n){super(t,o,n),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},Lm=class extends Tr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},Zm=class extends Tr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},Vm=class extends Tr{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},Fm=class extends Tr{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=Ao(this.code,t,r),this}get names(){return this.code instanceof le._CodeOrName?this.code.names:{}}},Ls=class extends Tr{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,o)=>r+o.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let o=t[r].optimizeNodes();Array.isArray(o)?t.splice(r,1,...o):o?t[r]=o:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:o}=this,n=o.length;for(;n--;){let i=o[n];i.optimizeNames(t,r)||(sN(t,i.names),o.splice(n,1))}return o.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>En(t,r.names),{})}},Pr=class extends Ls{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},Wm=class extends Ls{},jo=class extends Pr{};jo.kind="else";var zn=class e extends Pr{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let o=r.optimizeNodes();r=this.else=Array.isArray(o)?new jo(o):o}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(mw(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=Ao(this.condition,t,r),this}get names(){let t=super.names;return Tl(t,this.condition),this.else&&En(t,this.else.names),t}};zn.kind="if";var In=class extends Pr{};In.kind="for";var Gm=class extends In{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=Ao(this.iteration,t,r),this}get names(){return En(super.names,this.iteration.names)}},Km=class extends In{constructor(t,r,o,n){super(),this.varKind=t,this.name=r,this.from=o,this.to=n}render(t){let r=t.es5?Jt.varKinds.var:this.varKind,{name:o,from:n,to:i}=this;return`for(${r} ${o}=${n}; ${o}<${i}; ${o}++)`+super.render(t)}get names(){let t=Tl(super.names,this.from);return Tl(t,this.to)}},Sl=class extends In{constructor(t,r,o,n){super(),this.loop=t,this.varKind=r,this.name=o,this.iterable=n}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=Ao(this.iterable,t,r),this}get names(){return En(super.names,this.iterable.names)}},Zs=class extends Pr{constructor(t,r,o){super(),this.name=t,this.args=r,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};Zs.kind="func";var Vs=class extends Ls{render(t){return"return "+super.render(t)}};Vs.kind="return";var Hm=class extends Pr{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var o,n;return super.optimizeNames(t,r),(o=this.catch)===null||o===void 0||o.optimizeNames(t,r),(n=this.finally)===null||n===void 0||n.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&En(t,this.catch.names),this.finally&&En(t,this.finally.names),t}},Fs=class extends Pr{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};Fs.kind="catch";var Ws=class extends Pr{render(t){return"finally"+super.render(t)}};Ws.kind="finally";var Bm=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
3
- `:""},this._extScope=t,this._scope=new Jt.Scope({parent:t}),this._nodes=[new Wm]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let o=this._extScope.value(t,r);return(this._values[o.prefix]||(this._values[o.prefix]=new Set)).add(o),o}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,o,n){let i=this._scope.toName(r);return o!==void 0&&n&&(this._constants[i.str]=o),this._leafNode(new Mm(t,i,o)),i}const(t,r,o){return this._def(Jt.varKinds.const,t,r,o)}let(t,r,o){return this._def(Jt.varKinds.let,t,r,o)}var(t,r,o){return this._def(Jt.varKinds.var,t,r,o)}assign(t,r,o){return this._leafNode(new xl(t,r,o))}add(t,r){return this._leafNode(new Um(t,re.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==le.nil&&this._leafNode(new Fm(t)),this}object(...t){let r=["{"];for(let[o,n]of t)r.length>1&&r.push(","),r.push(o),(o!==n||this.opts.es5)&&(r.push(":"),(0,le.addCodeArg)(r,n));return r.push("}"),new le._Code(r)}if(t,r,o){if(this._blockNode(new zn(t)),r&&o)this.code(r).else().code(o).endIf();else if(r)this.code(r).endIf();else if(o)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new zn(t))}else(){return this._elseNode(new jo)}endIf(){return this._endBlockNode(zn,jo)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new Gm(t),r)}forRange(t,r,o,n,i=this.opts.es5?Jt.varKinds.var:Jt.varKinds.let){let s=this._scope.toName(t);return this._for(new Km(i,s,r,o),()=>n(s))}forOf(t,r,o,n=Jt.varKinds.const){let i=this._scope.toName(t);if(this.opts.es5){let s=r instanceof le.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,le._)`${s}.length`,a=>{this.var(i,(0,le._)`${s}[${a}]`),o(i)})}return this._for(new Sl("of",n,i,r),()=>o(i))}forIn(t,r,o,n=this.opts.es5?Jt.varKinds.var:Jt.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,le._)`Object.keys(${r})`,o);let i=this._scope.toName(t);return this._for(new Sl("in",n,i,r),()=>o(i))}endFor(){return this._endBlockNode(In)}label(t){return this._leafNode(new Lm(t))}break(t){return this._leafNode(new Zm(t))}return(t){let r=new Vs;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Vs)}try(t,r,o){if(!r&&!o)throw new Error('CodeGen: "try" without "catch" and "finally"');let n=new Hm;if(this._blockNode(n),this.code(t),r){let i=this.name("e");this._currNode=n.catch=new Fs(i),r(i)}return o&&(this._currNode=n.finally=new Ws,this.code(o)),this._endBlockNode(Fs,Ws)}throw(t){return this._leafNode(new Vm(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let o=this._nodes.length-r;if(o<0||t!==void 0&&o!==t)throw new Error(`CodeGen: wrong number of nodes: ${o} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=le.nil,o,n){return this._blockNode(new Zs(t,r,o)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(Zs)}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,r){let o=this._currNode;if(o instanceof t||r&&o instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof zn))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};re.CodeGen=Bm;function En(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function Tl(e,t){return t instanceof le._CodeOrName?En(e,t.names):e}function Ao(e,t,r){if(e instanceof le.Name)return o(e);if(!n(e))return e;return new le._Code(e._items.reduce((i,s)=>(s instanceof le.Name&&(s=o(s)),s instanceof le._Code?i.push(...s._items):i.push(s),i),[]));function o(i){let s=r[i.str];return s===void 0||t[i.str]!==1?i:(delete t[i.str],s)}function n(i){return i instanceof le._Code&&i._items.some(s=>s instanceof le.Name&&t[s.str]===1&&r[s.str]!==void 0)}}function sN(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function mw(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,le._)`!${Jm(e)}`}re.not=mw;var aN=hw(re.operators.AND);function cN(...e){return e.reduce(aN)}re.and=cN;var uN=hw(re.operators.OR);function lN(...e){return e.reduce(uN)}re.or=lN;function hw(e){return(t,r)=>t===le.nil?r:r===le.nil?t:(0,le._)`${Jm(t)} ${e} ${Jm(r)}`}function Jm(e){return e instanceof le.Name?e:(0,le._)`(${e})`}});var he=w(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.checkStrictMode=ie.getErrorPath=ie.Type=ie.useFunc=ie.setEvaluated=ie.evaluatedPropsToName=ie.mergeEvaluated=ie.eachItem=ie.unescapeJsonPointer=ie.escapeJsonPointer=ie.escapeFragment=ie.unescapeFragment=ie.schemaRefOrVal=ie.schemaHasRulesButRef=ie.schemaHasRules=ie.checkUnknownRules=ie.alwaysValidSchema=ie.toHash=void 0;var Te=oe(),dN=Us();function pN(e){let t={};for(let r of e)t[r]=!0;return t}ie.toHash=pN;function fN(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(vw(e,t),!yw(t,e.self.RULES.all))}ie.alwaysValidSchema=fN;function vw(e,t=e.schema){let{opts:r,self:o}=e;if(!r.strictSchema||typeof t=="boolean")return;let n=o.RULES.keywords;for(let i in t)n[i]||$w(e,`unknown keyword: "${i}"`)}ie.checkUnknownRules=vw;function yw(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}ie.schemaHasRules=yw;function mN(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}ie.schemaHasRulesButRef=mN;function hN({topSchemaRef:e,schemaPath:t},r,o,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Te._)`${r}`}return(0,Te._)`${e}${t}${(0,Te.getProperty)(o)}`}ie.schemaRefOrVal=hN;function gN(e){return bw(decodeURIComponent(e))}ie.unescapeFragment=gN;function _N(e){return encodeURIComponent(Ym(e))}ie.escapeFragment=_N;function Ym(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ie.escapeJsonPointer=Ym;function bw(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ie.unescapeJsonPointer=bw;function vN(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}ie.eachItem=vN;function gw({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:o}){return(n,i,s,a)=>{let c=s===void 0?i:s instanceof Te.Name?(i instanceof Te.Name?e(n,i,s):t(n,i,s),s):i instanceof Te.Name?(t(n,s,i),i):r(i,s);return a===Te.Name&&!(c instanceof Te.Name)?o(n,c):c}}ie.mergeEvaluated={props:gw({mergeNames:(e,t,r)=>e.if((0,Te._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,Te._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,Te._)`${r} || {}`).code((0,Te._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,Te._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,Te._)`${r} || {}`),Xm(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:ww}),items:gw({mergeNames:(e,t,r)=>e.if((0,Te._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,Te._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,Te._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,Te._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function ww(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,Te._)`{}`);return t!==void 0&&Xm(e,r,t),r}ie.evaluatedPropsToName=ww;function Xm(e,t,r){Object.keys(r).forEach(o=>e.assign((0,Te._)`${t}${(0,Te.getProperty)(o)}`,!0))}ie.setEvaluated=Xm;var _w={};function yN(e,t){return e.scopeValue("func",{ref:t,code:_w[t.code]||(_w[t.code]=new dN._Code(t.code))})}ie.useFunc=yN;var Qm;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Qm||(ie.Type=Qm={}));function bN(e,t,r){if(e instanceof Te.Name){let o=t===Qm.Num;return r?o?(0,Te._)`"[" + ${e} + "]"`:(0,Te._)`"['" + ${e} + "']"`:o?(0,Te._)`"/" + ${e}`:(0,Te._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Te.getProperty)(e).toString():"/"+Ym(e)}ie.getErrorPath=bN;function $w(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}ie.checkStrictMode=$w});var zr=w(eh=>{"use strict";Object.defineProperty(eh,"__esModule",{value:!0});var rt=oe(),wN={data:new rt.Name("data"),valCxt:new rt.Name("valCxt"),instancePath:new rt.Name("instancePath"),parentData:new rt.Name("parentData"),parentDataProperty:new rt.Name("parentDataProperty"),rootData:new rt.Name("rootData"),dynamicAnchors:new rt.Name("dynamicAnchors"),vErrors:new rt.Name("vErrors"),errors:new rt.Name("errors"),this:new rt.Name("this"),self:new rt.Name("self"),scope:new rt.Name("scope"),json:new rt.Name("json"),jsonPos:new rt.Name("jsonPos"),jsonLen:new rt.Name("jsonLen"),jsonPart:new rt.Name("jsonPart")};eh.default=wN});var Gs=w(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.extendErrors=nt.resetErrorsCount=nt.reportExtraError=nt.reportError=nt.keyword$DataError=nt.keywordError=void 0;var pe=oe(),zl=he(),pt=zr();nt.keywordError={message:({keyword:e})=>(0,pe.str)`must pass "${e}" keyword validation`};nt.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,pe.str)`"${e}" keyword must be ${t} ($data)`:(0,pe.str)`"${e}" keyword is invalid ($data)`};function $N(e,t=nt.keywordError,r,o){let{it:n}=e,{gen:i,compositeRule:s,allErrors:a}=n,c=Sw(e,t,r);o??(s||a)?kw(i,c):xw(n,(0,pe._)`[${c}]`)}nt.reportError=$N;function kN(e,t=nt.keywordError,r){let{it:o}=e,{gen:n,compositeRule:i,allErrors:s}=o,a=Sw(e,t,r);kw(n,a),i||s||xw(o,pt.default.vErrors)}nt.reportExtraError=kN;function xN(e,t){e.assign(pt.default.errors,t),e.if((0,pe._)`${pt.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,pe._)`${pt.default.vErrors}.length`,t),()=>e.assign(pt.default.vErrors,null)))}nt.resetErrorsCount=xN;function SN({gen:e,keyword:t,schemaValue:r,data:o,errsCount:n,it:i}){if(n===void 0)throw new Error("ajv implementation error");let s=e.name("err");e.forRange("i",n,pt.default.errors,a=>{e.const(s,(0,pe._)`${pt.default.vErrors}[${a}]`),e.if((0,pe._)`${s}.instancePath === undefined`,()=>e.assign((0,pe._)`${s}.instancePath`,(0,pe.strConcat)(pt.default.instancePath,i.errorPath))),e.assign((0,pe._)`${s}.schemaPath`,(0,pe.str)`${i.errSchemaPath}/${t}`),i.opts.verbose&&(e.assign((0,pe._)`${s}.schema`,r),e.assign((0,pe._)`${s}.data`,o))})}nt.extendErrors=SN;function kw(e,t){let r=e.const("err",t);e.if((0,pe._)`${pt.default.vErrors} === null`,()=>e.assign(pt.default.vErrors,(0,pe._)`[${r}]`),(0,pe._)`${pt.default.vErrors}.push(${r})`),e.code((0,pe._)`${pt.default.errors}++`)}function xw(e,t){let{gen:r,validateName:o,schemaEnv:n}=e;n.$async?r.throw((0,pe._)`new ${e.ValidationError}(${t})`):(r.assign((0,pe._)`${o}.errors`,t),r.return(!1))}var Nn={keyword:new pe.Name("keyword"),schemaPath:new pe.Name("schemaPath"),params:new pe.Name("params"),propertyName:new pe.Name("propertyName"),message:new pe.Name("message"),schema:new pe.Name("schema"),parentSchema:new pe.Name("parentSchema")};function Sw(e,t,r){let{createErrors:o}=e.it;return o===!1?(0,pe._)`{}`:TN(e,t,r)}function TN(e,t,r={}){let{gen:o,it:n}=e,i=[PN(n,r),zN(e,r)];return IN(e,t,i),o.object(...i)}function PN({errorPath:e},{instancePath:t}){let r=t?(0,pe.str)`${e}${(0,zl.getErrorPath)(t,zl.Type.Str)}`:e;return[pt.default.instancePath,(0,pe.strConcat)(pt.default.instancePath,r)]}function zN({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:o}){let n=o?t:(0,pe.str)`${t}/${e}`;return r&&(n=(0,pe.str)`${n}${(0,zl.getErrorPath)(r,zl.Type.Str)}`),[Nn.schemaPath,n]}function IN(e,{params:t,message:r},o){let{keyword:n,data:i,schemaValue:s,it:a}=e,{opts:c,propertyName:u,topSchemaRef:l,schemaPath:d}=a;o.push([Nn.keyword,n],[Nn.params,typeof t=="function"?t(e):t||(0,pe._)`{}`]),c.messages&&o.push([Nn.message,typeof r=="function"?r(e):r]),c.verbose&&o.push([Nn.schema,s],[Nn.parentSchema,(0,pe._)`${l}${d}`],[pt.default.data,i]),u&&o.push([Nn.propertyName,u])}});var Pw=w(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});Do.boolOrEmptySchema=Do.topBoolOrEmptySchema=void 0;var EN=Gs(),NN=oe(),ON=zr(),RN={message:"boolean schema is false"};function jN(e){let{gen:t,schema:r,validateName:o}=e;r===!1?Tw(e,!1):typeof r=="object"&&r.$async===!0?t.return(ON.default.data):(t.assign((0,NN._)`${o}.errors`,null),t.return(!0))}Do.topBoolOrEmptySchema=jN;function AN(e,t){let{gen:r,schema:o}=e;o===!1?(r.var(t,!1),Tw(e)):r.var(t,!0)}Do.boolOrEmptySchema=AN;function Tw(e,t){let{gen:r,data:o}=e,n={gen:r,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,EN.reportError)(n,RN,void 0,t)}});var th=w(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.getRules=Co.isJSONType=void 0;var DN=["string","number","integer","boolean","null","object","array"],CN=new Set(DN);function qN(e){return typeof e=="string"&&CN.has(e)}Co.isJSONType=qN;function MN(){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:{}}}Co.getRules=MN});var rh=w(Jr=>{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});Jr.shouldUseRule=Jr.shouldUseGroup=Jr.schemaHasRulesForType=void 0;function UN({schema:e,self:t},r){let o=t.RULES.types[r];return o&&o!==!0&&zw(e,o)}Jr.schemaHasRulesForType=UN;function zw(e,t){return t.rules.some(r=>Iw(e,r))}Jr.shouldUseGroup=zw;function Iw(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(o=>e[o]!==void 0))}Jr.shouldUseRule=Iw});var Ks=w(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.reportTypeError=ot.checkDataTypes=ot.checkDataType=ot.coerceAndCheckDataType=ot.getJSONTypes=ot.getSchemaTypes=ot.DataType=void 0;var LN=th(),ZN=rh(),VN=Gs(),J=oe(),Ew=he(),qo;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(qo||(ot.DataType=qo={}));function FN(e){let t=Nw(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}ot.getSchemaTypes=FN;function Nw(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(LN.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}ot.getJSONTypes=Nw;function WN(e,t){let{gen:r,data:o,opts:n}=e,i=GN(t,n.coerceTypes),s=t.length>0&&!(i.length===0&&t.length===1&&(0,ZN.schemaHasRulesForType)(e,t[0]));if(s){let a=oh(t,o,n.strictNumbers,qo.Wrong);r.if(a,()=>{i.length?KN(e,t,i):ih(e)})}return s}ot.coerceAndCheckDataType=WN;var Ow=new Set(["string","number","integer","boolean","null"]);function GN(e,t){return t?e.filter(r=>Ow.has(r)||t==="array"&&r==="array"):[]}function KN(e,t,r){let{gen:o,data:n,opts:i}=e,s=o.let("dataType",(0,J._)`typeof ${n}`),a=o.let("coerced",(0,J._)`undefined`);i.coerceTypes==="array"&&o.if((0,J._)`${s} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>o.assign(n,(0,J._)`${n}[0]`).assign(s,(0,J._)`typeof ${n}`).if(oh(t,n,i.strictNumbers),()=>o.assign(a,n))),o.if((0,J._)`${a} !== undefined`);for(let u of r)(Ow.has(u)||u==="array"&&i.coerceTypes==="array")&&c(u);o.else(),ih(e),o.endIf(),o.if((0,J._)`${a} !== undefined`,()=>{o.assign(n,a),HN(e,a)});function c(u){switch(u){case"string":o.elseIf((0,J._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,J._)`"" + ${n}`).elseIf((0,J._)`${n} === null`).assign(a,(0,J._)`""`);return;case"number":o.elseIf((0,J._)`${s} == "boolean" || ${n} === null
2
+ "use strict";var K0=Object.create;var Fd=Object.defineProperty;var B0=Object.getOwnPropertyDescriptor;var H0=Object.getOwnPropertyNames;var J0=Object.getPrototypeOf,Q0=Object.prototype.hasOwnProperty;var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),mn=(e,t)=>{for(var r in t)Fd(e,r,{get:t[r],enumerable:!0})},Y0=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of H0(t))!Q0.call(e,n)&&n!==r&&Fd(e,n,{get:()=>t[n],enumerable:!(o=B0(t,n))||o.enumerable});return e};var Ue=(e,t,r)=>(r=e!=null?K0(J0(e)):{},Y0(t||!e||!e.__esModule?Fd(r,"default",{value:e,enumerable:!0}):r,e));var Zs=w(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.regexpCode=ge.getEsmExportName=ge.getProperty=ge.safeStringify=ge.stringify=ge.strConcat=ge.addCodeArg=ge.str=ge._=ge.nil=ge._Code=ge.Name=ge.IDENTIFIER=ge._CodeOrName=void 0;var Us=class{};ge._CodeOrName=Us;ge.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Pn=class extends Us{constructor(t){if(super(),!ge.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}}};ge.Name=Pn;var Ct=class extends Us{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((r,o)=>`${r}${o}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,o)=>(o instanceof Pn&&(r[o.str]=(r[o.str]||0)+1),r),{})}};ge._Code=Ct;ge.nil=new Ct("");function fw(e,...t){let r=[e[0]],o=0;for(;o<t.length;)Cm(r,t[o]),r.push(e[++o]);return new Ct(r)}ge._=fw;var Am=new Ct("+");function mw(e,...t){let r=[Ls(e[0])],o=0;for(;o<t.length;)r.push(Am),Cm(r,t[o]),r.push(Am,Ls(e[++o]));return tN(r),new Ct(r)}ge.str=mw;function Cm(e,t){t instanceof Ct?e.push(...t._items):t instanceof Pn?e.push(t):e.push(oN(t))}ge.addCodeArg=Cm;function tN(e){let t=1;for(;t<e.length-1;){if(e[t]===Am){let r=rN(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function rN(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof Pn||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 Pn))return`"${e}${t.slice(1)}`}function nN(e,t){return t.emptyStr()?e:e.emptyStr()?t:mw`${e}${t}`}ge.strConcat=nN;function oN(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Ls(Array.isArray(e)?e.join(","):e)}function iN(e){return new Ct(Ls(e))}ge.stringify=iN;function Ls(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ge.safeStringify=Ls;function sN(e){return typeof e=="string"&&ge.IDENTIFIER.test(e)?new Ct(`.${e}`):fw`[${e}]`}ge.getProperty=sN;function aN(e){if(typeof e=="string"&&ge.IDENTIFIER.test(e))return new Ct(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}ge.getEsmExportName=aN;function cN(e){return new Ct(e.toString())}ge.regexpCode=cN});var Mm=w(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.ValueScope=yt.ValueScopeName=yt.Scope=yt.varKinds=yt.UsedValueState=void 0;var vt=Zs(),Dm=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||(yt.UsedValueState=kl={}));yt.varKinds={const:new vt.Name("const"),let:new vt.Name("let"),var:new vt.Name("var")};var xl=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof vt.Name?t:this.name(t)}name(t){return new vt.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,o;if(!((o=(r=this._parent)===null||r===void 0?void 0:r._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}}};yt.Scope=xl;var Sl=class extends vt.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:o}){this.value=t,this.scopePath=(0,vt._)`.${new vt.Name(r)}[${o}]`}};yt.ValueScopeName=Sl;var uN=(0,vt._)`\n`,qm=class extends xl{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?uN:vt.nil}}get(){return this._scope}name(t){return new Sl(t,this._newName(t))}value(t,r){var o;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(t),{prefix:i}=n,s=(o=r.key)!==null&&o!==void 0?o:r.ref,a=this._values[i];if(a){let l=a.get(s);if(l)return l}else a=this._values[i]=new Map;a.set(s,n);let c=this._scope[i]||(this._scope[i]=[]),u=c.length;return c[u]=r.ref,n.setValue(r,{property:i,itemIndex:u}),n}getValue(t,r){let o=this._values[t];if(o)return o.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,o=>{if(o.scopePath===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return(0,vt._)`${t}${o.scopePath}`})}scopeCode(t=this._values,r,o){return this._reduceValues(t,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},r,o)}_reduceValues(t,r,o={},n){let i=vt.nil;for(let s in t){let a=t[s];if(!a)continue;let c=o[s]=o[s]||new Map;a.forEach(u=>{if(c.has(u))return;c.set(u,kl.Started);let l=r(u);if(l){let d=this.opts.es5?yt.varKinds.var:yt.varKinds.const;i=(0,vt._)`${i}${d} ${u} = ${l};${this.opts._n}`}else if(l=n?.(u))i=(0,vt._)`${i}${l}${this.opts._n}`;else throw new Dm(u);c.set(u,kl.Completed)})}return i}};yt.ValueScope=qm});var oe=w(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.or=re.and=re.not=re.CodeGen=re.operators=re.varKinds=re.ValueScopeName=re.ValueScope=re.Scope=re.Name=re.regexpCode=re.stringify=re.getProperty=re.nil=re.strConcat=re.str=re._=void 0;var le=Zs(),Jt=Mm(),Hr=Zs();Object.defineProperty(re,"_",{enumerable:!0,get:function(){return Hr._}});Object.defineProperty(re,"str",{enumerable:!0,get:function(){return Hr.str}});Object.defineProperty(re,"strConcat",{enumerable:!0,get:function(){return Hr.strConcat}});Object.defineProperty(re,"nil",{enumerable:!0,get:function(){return Hr.nil}});Object.defineProperty(re,"getProperty",{enumerable:!0,get:function(){return Hr.getProperty}});Object.defineProperty(re,"stringify",{enumerable:!0,get:function(){return Hr.stringify}});Object.defineProperty(re,"regexpCode",{enumerable:!0,get:function(){return Hr.regexpCode}});Object.defineProperty(re,"Name",{enumerable:!0,get:function(){return Hr.Name}});var El=Mm();Object.defineProperty(re,"Scope",{enumerable:!0,get:function(){return El.Scope}});Object.defineProperty(re,"ValueScope",{enumerable:!0,get:function(){return El.ValueScope}});Object.defineProperty(re,"ValueScopeName",{enumerable:!0,get:function(){return El.ValueScopeName}});Object.defineProperty(re,"varKinds",{enumerable:!0,get:function(){return El.varKinds}});re.operators={GT:new le._Code(">"),GTE:new le._Code(">="),LT:new le._Code("<"),LTE:new le._Code("<="),EQ:new le._Code("==="),NEQ:new le._Code("!=="),NOT:new le._Code("!"),OR:new le._Code("||"),AND:new le._Code("&&"),ADD:new le._Code("+")};var Tr=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},Um=class extends Tr{constructor(t,r,o){super(),this.varKind=t,this.name=r,this.rhs=o}render({es5:t,_n:r}){let o=t?Jt.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${o} ${this.name}${n};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=Ao(this.rhs,t,r)),this}get names(){return this.rhs instanceof le._CodeOrName?this.rhs.names:{}}},Tl=class extends Tr{constructor(t,r,o){super(),this.lhs=t,this.rhs=r,this.sideEffects=o}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof le.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=Ao(this.rhs,t,r),this}get names(){let t=this.lhs instanceof le.Name?{}:{...this.lhs.names};return zl(t,this.rhs)}},Lm=class extends Tl{constructor(t,r,o,n){super(t,o,n),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},Zm=class extends Tr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},Vm=class extends Tr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},Fm=class extends Tr{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},Wm=class extends Tr{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=Ao(this.code,t,r),this}get names(){return this.code instanceof le._CodeOrName?this.code.names:{}}},Vs=class extends Tr{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,o)=>r+o.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let o=t[r].optimizeNodes();Array.isArray(o)?t.splice(r,1,...o):o?t[r]=o:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:o}=this,n=o.length;for(;n--;){let i=o[n];i.optimizeNames(t,r)||(lN(t,i.names),o.splice(n,1))}return o.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>In(t,r.names),{})}},Pr=class extends Vs{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},Gm=class extends Vs{},jo=class extends Pr{};jo.kind="else";var zn=class e extends Pr{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let o=r.optimizeNodes();r=this.else=Array.isArray(o)?new jo(o):o}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(hw(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=Ao(this.condition,t,r),this}get names(){let t=super.names;return zl(t,this.condition),this.else&&In(t,this.else.names),t}};zn.kind="if";var En=class extends Pr{};En.kind="for";var Km=class extends En{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=Ao(this.iteration,t,r),this}get names(){return In(super.names,this.iteration.names)}},Bm=class extends En{constructor(t,r,o,n){super(),this.varKind=t,this.name=r,this.from=o,this.to=n}render(t){let r=t.es5?Jt.varKinds.var:this.varKind,{name:o,from:n,to:i}=this;return`for(${r} ${o}=${n}; ${o}<${i}; ${o}++)`+super.render(t)}get names(){let t=zl(super.names,this.from);return zl(t,this.to)}},Pl=class extends En{constructor(t,r,o,n){super(),this.loop=t,this.varKind=r,this.name=o,this.iterable=n}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=Ao(this.iterable,t,r),this}get names(){return In(super.names,this.iterable.names)}},Fs=class extends Pr{constructor(t,r,o){super(),this.name=t,this.args=r,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};Fs.kind="func";var Ws=class extends Vs{render(t){return"return "+super.render(t)}};Ws.kind="return";var Hm=class extends Pr{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var o,n;return super.optimizeNames(t,r),(o=this.catch)===null||o===void 0||o.optimizeNames(t,r),(n=this.finally)===null||n===void 0||n.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&In(t,this.catch.names),this.finally&&In(t,this.finally.names),t}},Gs=class extends Pr{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};Gs.kind="catch";var Ks=class extends Pr{render(t){return"finally"+super.render(t)}};Ks.kind="finally";var Jm=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
3
+ `:""},this._extScope=t,this._scope=new Jt.Scope({parent:t}),this._nodes=[new Gm]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let o=this._extScope.value(t,r);return(this._values[o.prefix]||(this._values[o.prefix]=new Set)).add(o),o}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,o,n){let i=this._scope.toName(r);return o!==void 0&&n&&(this._constants[i.str]=o),this._leafNode(new Um(t,i,o)),i}const(t,r,o){return this._def(Jt.varKinds.const,t,r,o)}let(t,r,o){return this._def(Jt.varKinds.let,t,r,o)}var(t,r,o){return this._def(Jt.varKinds.var,t,r,o)}assign(t,r,o){return this._leafNode(new Tl(t,r,o))}add(t,r){return this._leafNode(new Lm(t,re.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==le.nil&&this._leafNode(new Wm(t)),this}object(...t){let r=["{"];for(let[o,n]of t)r.length>1&&r.push(","),r.push(o),(o!==n||this.opts.es5)&&(r.push(":"),(0,le.addCodeArg)(r,n));return r.push("}"),new le._Code(r)}if(t,r,o){if(this._blockNode(new zn(t)),r&&o)this.code(r).else().code(o).endIf();else if(r)this.code(r).endIf();else if(o)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new zn(t))}else(){return this._elseNode(new jo)}endIf(){return this._endBlockNode(zn,jo)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new Km(t),r)}forRange(t,r,o,n,i=this.opts.es5?Jt.varKinds.var:Jt.varKinds.let){let s=this._scope.toName(t);return this._for(new Bm(i,s,r,o),()=>n(s))}forOf(t,r,o,n=Jt.varKinds.const){let i=this._scope.toName(t);if(this.opts.es5){let s=r instanceof le.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,le._)`${s}.length`,a=>{this.var(i,(0,le._)`${s}[${a}]`),o(i)})}return this._for(new Pl("of",n,i,r),()=>o(i))}forIn(t,r,o,n=this.opts.es5?Jt.varKinds.var:Jt.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,le._)`Object.keys(${r})`,o);let i=this._scope.toName(t);return this._for(new Pl("in",n,i,r),()=>o(i))}endFor(){return this._endBlockNode(En)}label(t){return this._leafNode(new Zm(t))}break(t){return this._leafNode(new Vm(t))}return(t){let r=new Ws;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Ws)}try(t,r,o){if(!r&&!o)throw new Error('CodeGen: "try" without "catch" and "finally"');let n=new Hm;if(this._blockNode(n),this.code(t),r){let i=this.name("e");this._currNode=n.catch=new Gs(i),r(i)}return o&&(this._currNode=n.finally=new Ks,this.code(o)),this._endBlockNode(Gs,Ks)}throw(t){return this._leafNode(new Fm(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let o=this._nodes.length-r;if(o<0||t!==void 0&&o!==t)throw new Error(`CodeGen: wrong number of nodes: ${o} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=le.nil,o,n){return this._blockNode(new Fs(t,r,o)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(Fs)}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,r){let o=this._currNode;if(o instanceof t||r&&o instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof zn))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};re.CodeGen=Jm;function In(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function zl(e,t){return t instanceof le._CodeOrName?In(e,t.names):e}function Ao(e,t,r){if(e instanceof le.Name)return o(e);if(!n(e))return e;return new le._Code(e._items.reduce((i,s)=>(s instanceof le.Name&&(s=o(s)),s instanceof le._Code?i.push(...s._items):i.push(s),i),[]));function o(i){let s=r[i.str];return s===void 0||t[i.str]!==1?i:(delete t[i.str],s)}function n(i){return i instanceof le._Code&&i._items.some(s=>s instanceof le.Name&&t[s.str]===1&&r[s.str]!==void 0)}}function lN(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function hw(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,le._)`!${Qm(e)}`}re.not=hw;var dN=gw(re.operators.AND);function pN(...e){return e.reduce(dN)}re.and=pN;var fN=gw(re.operators.OR);function mN(...e){return e.reduce(fN)}re.or=mN;function gw(e){return(t,r)=>t===le.nil?r:r===le.nil?t:(0,le._)`${Qm(t)} ${e} ${Qm(r)}`}function Qm(e){return e instanceof le.Name?e:(0,le._)`(${e})`}});var pe=w(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.checkStrictMode=ie.getErrorPath=ie.Type=ie.useFunc=ie.setEvaluated=ie.evaluatedPropsToName=ie.mergeEvaluated=ie.eachItem=ie.unescapeJsonPointer=ie.escapeJsonPointer=ie.escapeFragment=ie.unescapeFragment=ie.schemaRefOrVal=ie.schemaHasRulesButRef=ie.schemaHasRules=ie.checkUnknownRules=ie.alwaysValidSchema=ie.toHash=void 0;var Te=oe(),hN=Zs();function gN(e){let t={};for(let r of e)t[r]=!0;return t}ie.toHash=gN;function _N(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(yw(e,t),!bw(t,e.self.RULES.all))}ie.alwaysValidSchema=_N;function yw(e,t=e.schema){let{opts:r,self:o}=e;if(!r.strictSchema||typeof t=="boolean")return;let n=o.RULES.keywords;for(let i in t)n[i]||kw(e,`unknown keyword: "${i}"`)}ie.checkUnknownRules=yw;function bw(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}ie.schemaHasRules=bw;function vN(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}ie.schemaHasRulesButRef=vN;function yN({topSchemaRef:e,schemaPath:t},r,o,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Te._)`${r}`}return(0,Te._)`${e}${t}${(0,Te.getProperty)(o)}`}ie.schemaRefOrVal=yN;function bN(e){return ww(decodeURIComponent(e))}ie.unescapeFragment=bN;function wN(e){return encodeURIComponent(Xm(e))}ie.escapeFragment=wN;function Xm(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ie.escapeJsonPointer=Xm;function ww(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ie.unescapeJsonPointer=ww;function $N(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}ie.eachItem=$N;function _w({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:o}){return(n,i,s,a)=>{let c=s===void 0?i:s instanceof Te.Name?(i instanceof Te.Name?e(n,i,s):t(n,i,s),s):i instanceof Te.Name?(t(n,s,i),i):r(i,s);return a===Te.Name&&!(c instanceof Te.Name)?o(n,c):c}}ie.mergeEvaluated={props:_w({mergeNames:(e,t,r)=>e.if((0,Te._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,Te._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,Te._)`${r} || {}`).code((0,Te._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,Te._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,Te._)`${r} || {}`),eh(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:$w}),items:_w({mergeNames:(e,t,r)=>e.if((0,Te._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,Te._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,Te._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,Te._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function $w(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,Te._)`{}`);return t!==void 0&&eh(e,r,t),r}ie.evaluatedPropsToName=$w;function eh(e,t,r){Object.keys(r).forEach(o=>e.assign((0,Te._)`${t}${(0,Te.getProperty)(o)}`,!0))}ie.setEvaluated=eh;var vw={};function kN(e,t){return e.scopeValue("func",{ref:t,code:vw[t.code]||(vw[t.code]=new hN._Code(t.code))})}ie.useFunc=kN;var Ym;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Ym||(ie.Type=Ym={}));function xN(e,t,r){if(e instanceof Te.Name){let o=t===Ym.Num;return r?o?(0,Te._)`"[" + ${e} + "]"`:(0,Te._)`"['" + ${e} + "']"`:o?(0,Te._)`"/" + ${e}`:(0,Te._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Te.getProperty)(e).toString():"/"+Xm(e)}ie.getErrorPath=xN;function kw(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}ie.checkStrictMode=kw});var zr=w(th=>{"use strict";Object.defineProperty(th,"__esModule",{value:!0});var nt=oe(),SN={data:new nt.Name("data"),valCxt:new nt.Name("valCxt"),instancePath:new nt.Name("instancePath"),parentData:new nt.Name("parentData"),parentDataProperty:new nt.Name("parentDataProperty"),rootData:new nt.Name("rootData"),dynamicAnchors:new nt.Name("dynamicAnchors"),vErrors:new nt.Name("vErrors"),errors:new nt.Name("errors"),this:new nt.Name("this"),self:new nt.Name("self"),scope:new nt.Name("scope"),json:new nt.Name("json"),jsonPos:new nt.Name("jsonPos"),jsonLen:new nt.Name("jsonLen"),jsonPart:new nt.Name("jsonPart")};th.default=SN});var Bs=w(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.extendErrors=ot.resetErrorsCount=ot.reportExtraError=ot.reportError=ot.keyword$DataError=ot.keywordError=void 0;var fe=oe(),Il=pe(),pt=zr();ot.keywordError={message:({keyword:e})=>(0,fe.str)`must pass "${e}" keyword validation`};ot.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,fe.str)`"${e}" keyword must be ${t} ($data)`:(0,fe.str)`"${e}" keyword is invalid ($data)`};function TN(e,t=ot.keywordError,r,o){let{it:n}=e,{gen:i,compositeRule:s,allErrors:a}=n,c=Tw(e,t,r);o??(s||a)?xw(i,c):Sw(n,(0,fe._)`[${c}]`)}ot.reportError=TN;function PN(e,t=ot.keywordError,r){let{it:o}=e,{gen:n,compositeRule:i,allErrors:s}=o,a=Tw(e,t,r);xw(n,a),i||s||Sw(o,pt.default.vErrors)}ot.reportExtraError=PN;function zN(e,t){e.assign(pt.default.errors,t),e.if((0,fe._)`${pt.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,fe._)`${pt.default.vErrors}.length`,t),()=>e.assign(pt.default.vErrors,null)))}ot.resetErrorsCount=zN;function EN({gen:e,keyword:t,schemaValue:r,data:o,errsCount:n,it:i}){if(n===void 0)throw new Error("ajv implementation error");let s=e.name("err");e.forRange("i",n,pt.default.errors,a=>{e.const(s,(0,fe._)`${pt.default.vErrors}[${a}]`),e.if((0,fe._)`${s}.instancePath === undefined`,()=>e.assign((0,fe._)`${s}.instancePath`,(0,fe.strConcat)(pt.default.instancePath,i.errorPath))),e.assign((0,fe._)`${s}.schemaPath`,(0,fe.str)`${i.errSchemaPath}/${t}`),i.opts.verbose&&(e.assign((0,fe._)`${s}.schema`,r),e.assign((0,fe._)`${s}.data`,o))})}ot.extendErrors=EN;function xw(e,t){let r=e.const("err",t);e.if((0,fe._)`${pt.default.vErrors} === null`,()=>e.assign(pt.default.vErrors,(0,fe._)`[${r}]`),(0,fe._)`${pt.default.vErrors}.push(${r})`),e.code((0,fe._)`${pt.default.errors}++`)}function Sw(e,t){let{gen:r,validateName:o,schemaEnv:n}=e;n.$async?r.throw((0,fe._)`new ${e.ValidationError}(${t})`):(r.assign((0,fe._)`${o}.errors`,t),r.return(!1))}var Nn={keyword:new fe.Name("keyword"),schemaPath:new fe.Name("schemaPath"),params:new fe.Name("params"),propertyName:new fe.Name("propertyName"),message:new fe.Name("message"),schema:new fe.Name("schema"),parentSchema:new fe.Name("parentSchema")};function Tw(e,t,r){let{createErrors:o}=e.it;return o===!1?(0,fe._)`{}`:IN(e,t,r)}function IN(e,t,r={}){let{gen:o,it:n}=e,i=[NN(n,r),ON(e,r)];return RN(e,t,i),o.object(...i)}function NN({errorPath:e},{instancePath:t}){let r=t?(0,fe.str)`${e}${(0,Il.getErrorPath)(t,Il.Type.Str)}`:e;return[pt.default.instancePath,(0,fe.strConcat)(pt.default.instancePath,r)]}function ON({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:o}){let n=o?t:(0,fe.str)`${t}/${e}`;return r&&(n=(0,fe.str)`${n}${(0,Il.getErrorPath)(r,Il.Type.Str)}`),[Nn.schemaPath,n]}function RN(e,{params:t,message:r},o){let{keyword:n,data:i,schemaValue:s,it:a}=e,{opts:c,propertyName:u,topSchemaRef:l,schemaPath:d}=a;o.push([Nn.keyword,n],[Nn.params,typeof t=="function"?t(e):t||(0,fe._)`{}`]),c.messages&&o.push([Nn.message,typeof r=="function"?r(e):r]),c.verbose&&o.push([Nn.schema,s],[Nn.parentSchema,(0,fe._)`${l}${d}`],[pt.default.data,i]),u&&o.push([Nn.propertyName,u])}});var zw=w(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.boolOrEmptySchema=Co.topBoolOrEmptySchema=void 0;var jN=Bs(),AN=oe(),CN=zr(),DN={message:"boolean schema is false"};function qN(e){let{gen:t,schema:r,validateName:o}=e;r===!1?Pw(e,!1):typeof r=="object"&&r.$async===!0?t.return(CN.default.data):(t.assign((0,AN._)`${o}.errors`,null),t.return(!0))}Co.topBoolOrEmptySchema=qN;function MN(e,t){let{gen:r,schema:o}=e;o===!1?(r.var(t,!1),Pw(e)):r.var(t,!0)}Co.boolOrEmptySchema=MN;function Pw(e,t){let{gen:r,data:o}=e,n={gen:r,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,jN.reportError)(n,DN,void 0,t)}});var rh=w(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});Do.getRules=Do.isJSONType=void 0;var UN=["string","number","integer","boolean","null","object","array"],LN=new Set(UN);function ZN(e){return typeof e=="string"&&LN.has(e)}Do.isJSONType=ZN;function VN(){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:{}}}Do.getRules=VN});var nh=w(Jr=>{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});Jr.shouldUseRule=Jr.shouldUseGroup=Jr.schemaHasRulesForType=void 0;function FN({schema:e,self:t},r){let o=t.RULES.types[r];return o&&o!==!0&&Ew(e,o)}Jr.schemaHasRulesForType=FN;function Ew(e,t){return t.rules.some(r=>Iw(e,r))}Jr.shouldUseGroup=Ew;function Iw(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(o=>e[o]!==void 0))}Jr.shouldUseRule=Iw});var Hs=w(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.reportTypeError=it.checkDataTypes=it.checkDataType=it.coerceAndCheckDataType=it.getJSONTypes=it.getSchemaTypes=it.DataType=void 0;var WN=rh(),GN=nh(),KN=Bs(),J=oe(),Nw=pe(),qo;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(qo||(it.DataType=qo={}));function BN(e){let t=Ow(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}it.getSchemaTypes=BN;function Ow(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(WN.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}it.getJSONTypes=Ow;function HN(e,t){let{gen:r,data:o,opts:n}=e,i=JN(t,n.coerceTypes),s=t.length>0&&!(i.length===0&&t.length===1&&(0,GN.schemaHasRulesForType)(e,t[0]));if(s){let a=ih(t,o,n.strictNumbers,qo.Wrong);r.if(a,()=>{i.length?QN(e,t,i):sh(e)})}return s}it.coerceAndCheckDataType=HN;var Rw=new Set(["string","number","integer","boolean","null"]);function JN(e,t){return t?e.filter(r=>Rw.has(r)||t==="array"&&r==="array"):[]}function QN(e,t,r){let{gen:o,data:n,opts:i}=e,s=o.let("dataType",(0,J._)`typeof ${n}`),a=o.let("coerced",(0,J._)`undefined`);i.coerceTypes==="array"&&o.if((0,J._)`${s} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>o.assign(n,(0,J._)`${n}[0]`).assign(s,(0,J._)`typeof ${n}`).if(ih(t,n,i.strictNumbers),()=>o.assign(a,n))),o.if((0,J._)`${a} !== undefined`);for(let u of r)(Rw.has(u)||u==="array"&&i.coerceTypes==="array")&&c(u);o.else(),sh(e),o.endIf(),o.if((0,J._)`${a} !== undefined`,()=>{o.assign(n,a),YN(e,a)});function c(u){switch(u){case"string":o.elseIf((0,J._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,J._)`"" + ${n}`).elseIf((0,J._)`${n} === null`).assign(a,(0,J._)`""`);return;case"number":o.elseIf((0,J._)`${s} == "boolean" || ${n} === null
4
4
  || (${s} == "string" && ${n} && ${n} == +${n})`).assign(a,(0,J._)`+${n}`);return;case"integer":o.elseIf((0,J._)`${s} === "boolean" || ${n} === null
5
5
  || (${s} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(a,(0,J._)`+${n}`);return;case"boolean":o.elseIf((0,J._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(a,!1).elseIf((0,J._)`${n} === "true" || ${n} === 1`).assign(a,!0);return;case"null":o.elseIf((0,J._)`${n} === "" || ${n} === 0 || ${n} === false`),o.assign(a,null);return;case"array":o.elseIf((0,J._)`${s} === "string" || ${s} === "number"
6
- || ${s} === "boolean" || ${n} === null`).assign(a,(0,J._)`[${n}]`)}}}function HN({gen:e,parentData:t,parentDataProperty:r},o){e.if((0,J._)`${t} !== undefined`,()=>e.assign((0,J._)`${t}[${r}]`,o))}function nh(e,t,r,o=qo.Correct){let n=o===qo.Correct?J.operators.EQ:J.operators.NEQ,i;switch(e){case"null":return(0,J._)`${t} ${n} null`;case"array":i=(0,J._)`Array.isArray(${t})`;break;case"object":i=(0,J._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=s((0,J._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=s();break;default:return(0,J._)`typeof ${t} ${n} ${e}`}return o===qo.Correct?i:(0,J.not)(i);function s(a=J.nil){return(0,J.and)((0,J._)`typeof ${t} == "number"`,a,r?(0,J._)`isFinite(${t})`:J.nil)}}ot.checkDataType=nh;function oh(e,t,r,o){if(e.length===1)return nh(e[0],t,r,o);let n,i=(0,Ew.toHash)(e);if(i.array&&i.object){let s=(0,J._)`typeof ${t} != "object"`;n=i.null?s:(0,J._)`!${t} || ${s}`,delete i.null,delete i.array,delete i.object}else n=J.nil;i.number&&delete i.integer;for(let s in i)n=(0,J.and)(n,nh(s,t,r,o));return n}ot.checkDataTypes=oh;var BN={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,J._)`{type: ${e}}`:(0,J._)`{type: ${t}}`};function ih(e){let t=JN(e);(0,VN.reportError)(t,BN)}ot.reportTypeError=ih;function JN(e){let{gen:t,data:r,schema:o}=e,n=(0,Ew.schemaRefOrVal)(e,o,"type");return{gen:t,keyword:"type",data:r,schema:o.type,schemaCode:n,schemaValue:n,parentSchema:o,params:{},it:e}}});var jw=w(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});Il.assignDefaults=void 0;var Mo=oe(),QN=he();function YN(e,t){let{properties:r,items:o}=e.schema;if(t==="object"&&r)for(let n in r)Rw(e,n,r[n].default);else t==="array"&&Array.isArray(o)&&o.forEach((n,i)=>Rw(e,i,n.default))}Il.assignDefaults=YN;function Rw(e,t,r){let{gen:o,compositeRule:n,data:i,opts:s}=e;if(r===void 0)return;let a=(0,Mo._)`${i}${(0,Mo.getProperty)(t)}`;if(n){(0,QN.checkStrictMode)(e,`default is ignored for: ${a}`);return}let c=(0,Mo._)`${a} === undefined`;s.useDefaults==="empty"&&(c=(0,Mo._)`${c} || ${a} === null || ${a} === ""`),o.if(c,(0,Mo._)`${a} = ${(0,Mo.stringify)(r)}`)}});var Ct=w(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.validateUnion=xe.validateArray=xe.usePattern=xe.callValidateCode=xe.schemaProperties=xe.allSchemaProperties=xe.noPropertyInData=xe.propertyInData=xe.isOwnProperty=xe.hasPropFunc=xe.reportMissingProp=xe.checkMissingProp=xe.checkReportMissingProp=void 0;var Re=oe(),sh=he(),Qr=zr(),XN=he();function eO(e,t){let{gen:r,data:o,it:n}=e;r.if(ch(r,o,t,n.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Re._)`${t}`},!0),e.error()})}xe.checkReportMissingProp=eO;function tO({gen:e,data:t,it:{opts:r}},o,n){return(0,Re.or)(...o.map(i=>(0,Re.and)(ch(e,t,i,r.ownProperties),(0,Re._)`${n} = ${i}`)))}xe.checkMissingProp=tO;function rO(e,t){e.setParams({missingProperty:t},!0),e.error()}xe.reportMissingProp=rO;function Aw(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Re._)`Object.prototype.hasOwnProperty`})}xe.hasPropFunc=Aw;function ah(e,t,r){return(0,Re._)`${Aw(e)}.call(${t}, ${r})`}xe.isOwnProperty=ah;function nO(e,t,r,o){let n=(0,Re._)`${t}${(0,Re.getProperty)(r)} !== undefined`;return o?(0,Re._)`${n} && ${ah(e,t,r)}`:n}xe.propertyInData=nO;function ch(e,t,r,o){let n=(0,Re._)`${t}${(0,Re.getProperty)(r)} === undefined`;return o?(0,Re.or)(n,(0,Re.not)(ah(e,t,r))):n}xe.noPropertyInData=ch;function Dw(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}xe.allSchemaProperties=Dw;function oO(e,t){return Dw(t).filter(r=>!(0,sh.alwaysValidSchema)(e,t[r]))}xe.schemaProperties=oO;function iO({schemaCode:e,data:t,it:{gen:r,topSchemaRef:o,schemaPath:n,errorPath:i},it:s},a,c,u){let l=u?(0,Re._)`${e}, ${t}, ${o}${n}`:t,d=[[Qr.default.instancePath,(0,Re.strConcat)(Qr.default.instancePath,i)],[Qr.default.parentData,s.parentData],[Qr.default.parentDataProperty,s.parentDataProperty],[Qr.default.rootData,Qr.default.rootData]];s.opts.dynamicRef&&d.push([Qr.default.dynamicAnchors,Qr.default.dynamicAnchors]);let h=(0,Re._)`${l}, ${r.object(...d)}`;return c!==Re.nil?(0,Re._)`${a}.call(${c}, ${h})`:(0,Re._)`${a}(${h})`}xe.callValidateCode=iO;var sO=(0,Re._)`new RegExp`;function aO({gen:e,it:{opts:t}},r){let o=t.unicodeRegExp?"u":"",{regExp:n}=t.code,i=n(r,o);return e.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,Re._)`${n.code==="new RegExp"?sO:(0,XN.useFunc)(e,n)}(${r}, ${o})`})}xe.usePattern=aO;function cO(e){let{gen:t,data:r,keyword:o,it:n}=e,i=t.name("valid");if(n.allErrors){let a=t.let("valid",!0);return s(()=>t.assign(a,!1)),a}return t.var(i,!0),s(()=>t.break()),i;function s(a){let c=t.const("len",(0,Re._)`${r}.length`);t.forRange("i",0,c,u=>{e.subschema({keyword:o,dataProp:u,dataPropType:sh.Type.Num},i),t.if((0,Re.not)(i),a)})}}xe.validateArray=cO;function uO(e){let{gen:t,schema:r,keyword:o,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,sh.alwaysValidSchema)(n,c))&&!n.opts.unevaluated)return;let s=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((c,u)=>{let l=e.subschema({keyword:o,schemaProp:u,compositeRule:!0},a);t.assign(s,(0,Re._)`${s} || ${a}`),e.mergeValidEvaluated(l,a)||t.if((0,Re.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}xe.validateUnion=uO});var Mw=w(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.validateKeywordUsage=cr.validSchemaType=cr.funcKeywordCode=cr.macroKeywordCode=void 0;var ft=oe(),On=zr(),lO=Ct(),dO=Gs();function pO(e,t){let{gen:r,keyword:o,schema:n,parentSchema:i,it:s}=e,a=t.macro.call(s.self,n,i,s),c=qw(r,o,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let u=r.name("valid");e.subschema({schema:a,schemaPath:ft.nil,errSchemaPath:`${s.errSchemaPath}/${o}`,topSchemaRef:c,compositeRule:!0},u),e.pass(u,()=>e.error(!0))}cr.macroKeywordCode=pO;function fO(e,t){var r;let{gen:o,keyword:n,schema:i,parentSchema:s,$data:a,it:c}=e;hO(c,t);let u=!a&&t.compile?t.compile.call(c.self,i,s,c):t.validate,l=qw(o,n,u),d=o.let("valid");e.block$data(d,h),e.ok((r=t.valid)!==null&&r!==void 0?r:d);function h(){if(t.errors===!1)f(),t.modifying&&Cw(e),_(()=>e.error());else{let y=t.async?m():p();t.modifying&&Cw(e),_(()=>mO(e,y))}}function m(){let y=o.let("ruleErrs",null);return o.try(()=>f((0,ft._)`await `),$=>o.assign(d,!1).if((0,ft._)`${$} instanceof ${c.ValidationError}`,()=>o.assign(y,(0,ft._)`${$}.errors`),()=>o.throw($))),y}function p(){let y=(0,ft._)`${l}.errors`;return o.assign(y,null),f(ft.nil),y}function f(y=t.async?(0,ft._)`await `:ft.nil){let $=c.opts.passContext?On.default.this:On.default.self,k=!("compile"in t&&!a||t.schema===!1);o.assign(d,(0,ft._)`${y}${(0,lO.callValidateCode)(e,l,$,k)}`,t.modifying)}function _(y){var $;o.if((0,ft.not)(($=t.valid)!==null&&$!==void 0?$:d),y)}}cr.funcKeywordCode=fO;function Cw(e){let{gen:t,data:r,it:o}=e;t.if(o.parentData,()=>t.assign(r,(0,ft._)`${o.parentData}[${o.parentDataProperty}]`))}function mO(e,t){let{gen:r}=e;r.if((0,ft._)`Array.isArray(${t})`,()=>{r.assign(On.default.vErrors,(0,ft._)`${On.default.vErrors} === null ? ${t} : ${On.default.vErrors}.concat(${t})`).assign(On.default.errors,(0,ft._)`${On.default.vErrors}.length`),(0,dO.extendErrors)(e)},()=>e.error())}function hO({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function qw(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,ft.stringify)(r)})}function gO(e,t,r=!1){return!t.length||t.some(o=>o==="array"?Array.isArray(e):o==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==o||r&&typeof e>"u")}cr.validSchemaType=gO;function _O({schema:e,opts:t,self:r,errSchemaPath:o},n,i){if(Array.isArray(n.keyword)?!n.keyword.includes(i):n.keyword!==i)throw new Error("ajv implementation error");let s=n.dependencies;if(s?.some(a=>!Object.prototype.hasOwnProperty.call(e,a)))throw new Error(`parent schema must have dependencies of ${i}: ${s.join(",")}`);if(n.validateSchema&&!n.validateSchema(e[i])){let c=`keyword "${i}" value is invalid at path "${o}": `+r.errorsText(n.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}cr.validateKeywordUsage=_O});var Lw=w(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.extendSubschemaMode=Yr.extendSubschemaData=Yr.getSubschema=void 0;var ur=oe(),Uw=he();function vO(e,{keyword:t,schemaProp:r,schema:o,schemaPath:n,errSchemaPath:i,topSchemaRef:s}){if(t!==void 0&&o!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:(0,ur._)`${e.schemaPath}${(0,ur.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:(0,ur._)`${e.schemaPath}${(0,ur.getProperty)(t)}${(0,ur.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,Uw.escapeFragment)(r)}`}}if(o!==void 0){if(n===void 0||i===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:n,topSchemaRef:s,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}Yr.getSubschema=vO;function yO(e,t,{dataProp:r,dataPropType:o,data:n,dataTypes:i,propertyName:s}){if(n!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=t;if(r!==void 0){let{errorPath:u,dataPathArr:l,opts:d}=t,h=a.let("data",(0,ur._)`${t.data}${(0,ur.getProperty)(r)}`,!0);c(h),e.errorPath=(0,ur.str)`${u}${(0,Uw.getErrorPath)(r,o,d.jsPropertySyntax)}`,e.parentDataProperty=(0,ur._)`${r}`,e.dataPathArr=[...l,e.parentDataProperty]}if(n!==void 0){let u=n instanceof ur.Name?n:a.let("data",n,!0);c(u),s!==void 0&&(e.propertyName=s)}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]}}Yr.extendSubschemaData=yO;function bO(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:o,createErrors:n,allErrors:i}){o!==void 0&&(e.compositeRule=o),n!==void 0&&(e.createErrors=n),i!==void 0&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r}Yr.extendSubschemaMode=bO});var Hs=w((TG,Zw)=>{"use strict";Zw.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=r.length)return!1;for(n=o;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),o=i.length,o!==Object.keys(r).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[n]))return!1;for(n=o;n--!==0;){var s=i[n];if(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r}});var Fw=w((PG,Vw)=>{"use strict";var Xr=Vw.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var o=typeof r=="function"?r:r.pre||function(){},n=r.post||function(){};El(t,o,n,e,"",e)};Xr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Xr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Xr.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Xr.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 El(e,t,r,o,n,i,s,a,c,u){if(o&&typeof o=="object"&&!Array.isArray(o)){t(o,n,i,s,a,c,u);for(var l in o){var d=o[l];if(Array.isArray(d)){if(l in Xr.arrayKeywords)for(var h=0;h<d.length;h++)El(e,t,r,d[h],n+"/"+l+"/"+h,i,n,l,o,h)}else if(l in Xr.propsKeywords){if(d&&typeof d=="object")for(var m in d)El(e,t,r,d[m],n+"/"+l+"/"+wO(m),i,n,l,o,m)}else(l in Xr.keywords||e.allKeys&&!(l in Xr.skipKeywords))&&El(e,t,r,d,n+"/"+l,i,n,l,o)}r(o,n,i,s,a,c,u)}}function wO(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var Bs=w(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.getSchemaRefs=bt.resolveUrl=bt.normalizeId=bt._getFullPath=bt.getFullPath=bt.inlineRef=void 0;var $O=he(),kO=Hs(),xO=Fw(),SO=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function TO(e,t=!0){return typeof e=="boolean"?!0:t===!0?!uh(e):t?Ww(e)<=t:!1}bt.inlineRef=TO;var PO=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function uh(e){for(let t in e){if(PO.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(uh)||typeof r=="object"&&uh(r))return!0}return!1}function Ww(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!SO.has(r)&&(typeof e[r]=="object"&&(0,$O.eachItem)(e[r],o=>t+=Ww(o)),t===1/0))return 1/0}return t}function Gw(e,t="",r){r!==!1&&(t=Uo(t));let o=e.parse(t);return Kw(e,o)}bt.getFullPath=Gw;function Kw(e,t){return e.serialize(t).split("#")[0]+"#"}bt._getFullPath=Kw;var zO=/#\/?$/;function Uo(e){return e?e.replace(zO,""):""}bt.normalizeId=Uo;function IO(e,t,r){return r=Uo(r),e.resolve(t,r)}bt.resolveUrl=IO;var EO=/^[a-z_][-a-z0-9._]*$/i;function NO(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:o}=this.opts,n=Uo(e[r]||t),i={"":n},s=Gw(o,n,!1),a={},c=new Set;return xO(e,{allKeys:!0},(d,h,m,p)=>{if(p===void 0)return;let f=s+h,_=i[p];typeof d[r]=="string"&&(_=y.call(this,d[r])),$.call(this,d.$anchor),$.call(this,d.$dynamicAnchor),i[h]=_;function y(k){let I=this.opts.uriResolver.resolve;if(k=Uo(_?I(_,k):k),c.has(k))throw l(k);c.add(k);let P=this.refs[k];return typeof P=="string"&&(P=this.refs[P]),typeof P=="object"?u(d,P.schema,k):k!==Uo(f)&&(k[0]==="#"?(u(d,a[k],k),a[k]=d):this.refs[k]=f),k}function $(k){if(typeof k=="string"){if(!EO.test(k))throw new Error(`invalid anchor "${k}"`);y.call(this,`#${k}`)}}}),a;function u(d,h,m){if(h!==void 0&&!kO(d,h))throw l(m)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}bt.getSchemaRefs=NO});var Ys=w(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.getData=en.KeywordCxt=en.validateFunctionCode=void 0;var Yw=Pw(),Hw=Ks(),dh=rh(),Nl=Ks(),OO=jw(),Qs=Mw(),lh=Lw(),L=oe(),K=zr(),RO=Bs(),Ir=he(),Js=Gs();function jO(e){if(t$(e)&&(r$(e),e$(e))){CO(e);return}Xw(e,()=>(0,Yw.topBoolOrEmptySchema)(e))}en.validateFunctionCode=jO;function Xw({gen:e,validateName:t,schema:r,schemaEnv:o,opts:n},i){n.code.es5?e.func(t,(0,L._)`${K.default.data}, ${K.default.valCxt}`,o.$async,()=>{e.code((0,L._)`"use strict"; ${Bw(r,n)}`),DO(e,n),e.code(i)}):e.func(t,(0,L._)`${K.default.data}, ${AO(n)}`,o.$async,()=>e.code(Bw(r,n)).code(i))}function AO(e){return(0,L._)`{${K.default.instancePath}="", ${K.default.parentData}, ${K.default.parentDataProperty}, ${K.default.rootData}=${K.default.data}${e.dynamicRef?(0,L._)`, ${K.default.dynamicAnchors}={}`:L.nil}}={}`}function DO(e,t){e.if(K.default.valCxt,()=>{e.var(K.default.instancePath,(0,L._)`${K.default.valCxt}.${K.default.instancePath}`),e.var(K.default.parentData,(0,L._)`${K.default.valCxt}.${K.default.parentData}`),e.var(K.default.parentDataProperty,(0,L._)`${K.default.valCxt}.${K.default.parentDataProperty}`),e.var(K.default.rootData,(0,L._)`${K.default.valCxt}.${K.default.rootData}`),t.dynamicRef&&e.var(K.default.dynamicAnchors,(0,L._)`${K.default.valCxt}.${K.default.dynamicAnchors}`)},()=>{e.var(K.default.instancePath,(0,L._)`""`),e.var(K.default.parentData,(0,L._)`undefined`),e.var(K.default.parentDataProperty,(0,L._)`undefined`),e.var(K.default.rootData,K.default.data),t.dynamicRef&&e.var(K.default.dynamicAnchors,(0,L._)`{}`)})}function CO(e){let{schema:t,opts:r,gen:o}=e;Xw(e,()=>{r.$comment&&t.$comment&&o$(e),ZO(e),o.let(K.default.vErrors,null),o.let(K.default.errors,0),r.unevaluated&&qO(e),n$(e),WO(e)})}function qO(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,L._)`${r}.evaluated`),t.if((0,L._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,L._)`${e.evaluated}.props`,(0,L._)`undefined`)),t.if((0,L._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,L._)`${e.evaluated}.items`,(0,L._)`undefined`))}function Bw(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,L._)`/*# sourceURL=${r} */`:L.nil}function MO(e,t){if(t$(e)&&(r$(e),e$(e))){UO(e,t);return}(0,Yw.boolOrEmptySchema)(e,t)}function e$({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function t$(e){return typeof e.schema!="boolean"}function UO(e,t){let{schema:r,gen:o,opts:n}=e;n.$comment&&r.$comment&&o$(e),VO(e),FO(e);let i=o.const("_errs",K.default.errors);n$(e,i),o.var(t,(0,L._)`${i} === ${K.default.errors}`)}function r$(e){(0,Ir.checkUnknownRules)(e),LO(e)}function n$(e,t){if(e.opts.jtd)return Jw(e,[],!1,t);let r=(0,Hw.getSchemaTypes)(e.schema),o=(0,Hw.coerceAndCheckDataType)(e,r);Jw(e,r,!o,t)}function LO(e){let{schema:t,errSchemaPath:r,opts:o,self:n}=e;t.$ref&&o.ignoreKeywordsWithRef&&(0,Ir.schemaHasRulesButRef)(t,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function ZO(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Ir.checkStrictMode)(e,"default is ignored in the schema root")}function VO(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,RO.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function FO(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function o$({gen:e,schemaEnv:t,schema:r,errSchemaPath:o,opts:n}){let i=r.$comment;if(n.$comment===!0)e.code((0,L._)`${K.default.self}.logger.log(${i})`);else if(typeof n.$comment=="function"){let s=(0,L.str)`${o}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,L._)`${K.default.self}.opts.$comment(${i}, ${s}, ${a}.schema)`)}}function WO(e){let{gen:t,schemaEnv:r,validateName:o,ValidationError:n,opts:i}=e;r.$async?t.if((0,L._)`${K.default.errors} === 0`,()=>t.return(K.default.data),()=>t.throw((0,L._)`new ${n}(${K.default.vErrors})`)):(t.assign((0,L._)`${o}.errors`,K.default.vErrors),i.unevaluated&&GO(e),t.return((0,L._)`${K.default.errors} === 0`))}function GO({gen:e,evaluated:t,props:r,items:o}){r instanceof L.Name&&e.assign((0,L._)`${t}.props`,r),o instanceof L.Name&&e.assign((0,L._)`${t}.items`,o)}function Jw(e,t,r,o){let{gen:n,schema:i,data:s,allErrors:a,opts:c,self:u}=e,{RULES:l}=u;if(i.$ref&&(c.ignoreKeywordsWithRef||!(0,Ir.schemaHasRulesButRef)(i,l))){n.block(()=>s$(e,"$ref",l.all.$ref.definition));return}c.jtd||KO(e,t),n.block(()=>{for(let h of l.rules)d(h);d(l.post)});function d(h){(0,dh.shouldUseGroup)(i,h)&&(h.type?(n.if((0,Nl.checkDataType)(h.type,s,c.strictNumbers)),Qw(e,h),t.length===1&&t[0]===h.type&&r&&(n.else(),(0,Nl.reportTypeError)(e)),n.endIf()):Qw(e,h),a||n.if((0,L._)`${K.default.errors} === ${o||0}`))}}function Qw(e,t){let{gen:r,schema:o,opts:{useDefaults:n}}=e;n&&(0,OO.assignDefaults)(e,t.type),r.block(()=>{for(let i of t.rules)(0,dh.shouldUseRule)(o,i)&&s$(e,i.keyword,i.definition,t.type)})}function KO(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(HO(e,t),e.opts.allowUnionTypes||BO(e,t),JO(e,e.dataTypes))}function HO(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{i$(e.dataTypes,r)||ph(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),YO(e,t)}}function BO(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&ph(e,"use allowUnionTypes to allow union type keyword")}function JO(e,t){let r=e.self.RULES.all;for(let o in r){let n=r[o];if(typeof n=="object"&&(0,dh.shouldUseRule)(e.schema,n)){let{type:i}=n.definition;i.length&&!i.some(s=>QO(t,s))&&ph(e,`missing type "${i.join(",")}" for keyword "${o}"`)}}}function QO(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function i$(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function YO(e,t){let r=[];for(let o of e.dataTypes)i$(t,o)?r.push(o):t.includes("integer")&&o==="number"&&r.push("integer");e.dataTypes=r}function ph(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,Ir.checkStrictMode)(e,t,e.opts.strictTypes)}var Ol=class{constructor(t,r,o){if((0,Qs.validateKeywordUsage)(t,r,o),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=o,this.data=t.data,this.schema=t.schema[o],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Ir.schemaRefOrVal)(t,this.schema,o,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",a$(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Qs.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${o} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",K.default.errors))}result(t,r,o){this.failResult((0,L.not)(t),r,o)}failResult(t,r,o){this.gen.if(t),o?o():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,L.not)(t),void 0,r)}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:r}=this;this.fail((0,L._)`${r} !== undefined && (${(0,L.or)(this.invalid$data(),t)})`)}error(t,r,o){if(r){this.setParams(r),this._error(t,o),this.setParams({});return}this._error(t,o)}_error(t,r){(t?Js.reportExtraError:Js.reportError)(this,this.def.error,r)}$dataError(){(0,Js.reportError)(this,this.def.$dataError||Js.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Js.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,o=L.nil){this.gen.block(()=>{this.check$data(t,o),r()})}check$data(t=L.nil,r=L.nil){if(!this.$data)return;let{gen:o,schemaCode:n,schemaType:i,def:s}=this;o.if((0,L.or)((0,L._)`${n} === undefined`,r)),t!==L.nil&&o.assign(t,!0),(i.length||s.validateSchema)&&(o.elseIf(this.invalid$data()),this.$dataError(),t!==L.nil&&o.assign(t,!1)),o.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:o,def:n,it:i}=this;return(0,L.or)(s(),a());function s(){if(o.length){if(!(r instanceof L.Name))throw new Error("ajv implementation error");let c=Array.isArray(o)?o:[o];return(0,L._)`${(0,Nl.checkDataTypes)(c,r,i.opts.strictNumbers,Nl.DataType.Wrong)}`}return L.nil}function a(){if(n.validateSchema){let c=t.scopeValue("validate$data",{ref:n.validateSchema});return(0,L._)`!${c}(${r})`}return L.nil}}subschema(t,r){let o=(0,lh.getSubschema)(this.it,t);(0,lh.extendSubschemaData)(o,this.it,t),(0,lh.extendSubschemaMode)(o,t);let n={...this.it,...o,items:void 0,props:void 0};return MO(n,r),n}mergeEvaluated(t,r){let{it:o,gen:n}=this;o.opts.unevaluated&&(o.props!==!0&&t.props!==void 0&&(o.props=Ir.mergeEvaluated.props(n,t.props,o.props,r)),o.items!==!0&&t.items!==void 0&&(o.items=Ir.mergeEvaluated.items(n,t.items,o.items,r)))}mergeValidEvaluated(t,r){let{it:o,gen:n}=this;if(o.opts.unevaluated&&(o.props!==!0||o.items!==!0))return n.if(r,()=>this.mergeEvaluated(t,L.Name)),!0}};en.KeywordCxt=Ol;function s$(e,t,r,o){let n=new Ol(e,r,t);"code"in r?r.code(n,o):n.$data&&r.validate?(0,Qs.funcKeywordCode)(n,r):"macro"in r?(0,Qs.macroKeywordCode)(n,r):(r.compile||r.validate)&&(0,Qs.funcKeywordCode)(n,r)}var XO=/^\/(?:[^~]|~0|~1)*$/,eR=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function a$(e,{dataLevel:t,dataNames:r,dataPathArr:o}){let n,i;if(e==="")return K.default.rootData;if(e[0]==="/"){if(!XO.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);n=e,i=K.default.rootData}else{let u=eR.exec(e);if(!u)throw new Error(`Invalid JSON-pointer: ${e}`);let l=+u[1];if(n=u[2],n==="#"){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=r[t-l],!n)return i}let s=i,a=n.split("/");for(let u of a)u&&(i=(0,L._)`${i}${(0,L.getProperty)((0,Ir.unescapeJsonPointer)(u))}`,s=(0,L._)`${s} && ${i}`);return s;function c(u,l){return`Cannot access ${u} ${l} levels up, current level is ${t}`}}en.getData=a$});var Rl=w(mh=>{"use strict";Object.defineProperty(mh,"__esModule",{value:!0});var fh=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};mh.default=fh});var Xs=w(_h=>{"use strict";Object.defineProperty(_h,"__esModule",{value:!0});var hh=Bs(),gh=class extends Error{constructor(t,r,o,n){super(n||`can't resolve reference ${o} from id ${r}`),this.missingRef=(0,hh.resolveUrl)(t,r,o),this.missingSchema=(0,hh.normalizeId)((0,hh.getFullPath)(t,this.missingRef))}};_h.default=gh});var Al=w(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.resolveSchema=qt.getCompilingSchema=qt.resolveRef=qt.compileSchema=qt.SchemaEnv=void 0;var Qt=oe(),tR=Rl(),Rn=zr(),Yt=Bs(),c$=he(),rR=Ys(),Lo=class{constructor(t){var r;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=(r=t.baseId)!==null&&r!==void 0?r:(0,Yt.normalizeId)(o?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=o?.$async,this.refs={}}};qt.SchemaEnv=Lo;function yh(e){let t=u$.call(this,e);if(t)return t;let r=(0,Yt.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:o,lines:n}=this.opts.code,{ownProperties:i}=this.opts,s=new Qt.CodeGen(this.scope,{es5:o,lines:n,ownProperties:i}),a;e.$async&&(a=s.scopeValue("Error",{ref:tR.default,code:(0,Qt._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");e.validateName=c;let u={gen:s,allErrors:this.opts.allErrors,data:Rn.default.data,parentData:Rn.default.parentData,parentDataProperty:Rn.default.parentDataProperty,dataNames:[Rn.default.data],dataPathArr:[Qt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Qt.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:Qt.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Qt._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(e),(0,rR.validateFunctionCode)(u),s.optimize(this.opts.code.optimize);let d=s.toString();l=`${s.scopeRefs(Rn.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,e));let m=new Function(`${Rn.default.self}`,`${Rn.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=e.schema,m.schemaEnv=e,e.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:c,validateCode:d,scopeValues:s._values}),this.opts.unevaluated){let{props:p,items:f}=u;m.evaluated={props:p instanceof Qt.Name?void 0:p,items:f instanceof Qt.Name?void 0:f,dynamicProps:p instanceof Qt.Name,dynamicItems:f instanceof Qt.Name},m.source&&(m.source.evaluated=(0,Qt.stringify)(m.evaluated))}return e.validate=m,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)}}qt.compileSchema=yh;function nR(e,t,r){var o;r=(0,Yt.resolveUrl)(this.opts.uriResolver,t,r);let n=e.refs[r];if(n)return n;let i=sR.call(this,e,r);if(i===void 0){let s=(o=e.localRefs)===null||o===void 0?void 0:o[r],{schemaId:a}=this.opts;s&&(i=new Lo({schema:s,schemaId:a,root:e,baseId:t}))}if(i!==void 0)return e.refs[r]=oR.call(this,i)}qt.resolveRef=nR;function oR(e){return(0,Yt.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:yh.call(this,e)}function u$(e){for(let t of this._compilations)if(iR(t,e))return t}qt.getCompilingSchema=u$;function iR(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function sR(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||jl.call(this,e,t)}function jl(e,t){let r=this.opts.uriResolver.parse(t),o=(0,Yt._getFullPath)(this.opts.uriResolver,r),n=(0,Yt.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&o===n)return vh.call(this,r,e);let i=(0,Yt.normalizeId)(o),s=this.refs[i]||this.schemas[i];if(typeof s=="string"){let a=jl.call(this,e,s);return typeof a?.schema!="object"?void 0:vh.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||yh.call(this,s),i===(0,Yt.normalizeId)(t)){let{schema:a}=s,{schemaId:c}=this.opts,u=a[c];return u&&(n=(0,Yt.resolveUrl)(this.opts.uriResolver,n,u)),new Lo({schema:a,schemaId:c,root:e,baseId:n})}return vh.call(this,r,s)}}qt.resolveSchema=jl;var aR=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function vh(e,{baseId:t,schema:r,root:o}){var n;if(((n=e.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,c$.unescapeFragment)(a)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!aR.has(a)&&u&&(t=(0,Yt.resolveUrl)(this.opts.uriResolver,t,u))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,c$.schemaHasRulesButRef)(r,this.RULES)){let a=(0,Yt.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=jl.call(this,o,a)}let{schemaId:s}=this.opts;if(i=i||new Lo({schema:r,schemaId:s,root:o,baseId:t}),i.schema!==i.root.schema)return i}});var l$=w((RG,cR)=>{cR.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 wh=w((jG,m$)=>{"use strict";var uR=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),p$=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 bh(e){let t="",r=0,o=0;for(o=0;o<e.length;o++)if(r=e[o].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[o];break}for(o+=1;o<e.length;o++){if(r=e[o].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[o]}return t}var lR=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function d$(e){return e.length=0,!0}function dR(e,t,r){if(e.length){let o=bh(e);if(o!=="")t.push(o);else return r.error=!0,!1;e.length=0}return!0}function pR(e){let t=0,r={error:!1,address:"",zone:""},o=[],n=[],i=!1,s=!1,a=dR;for(let c=0;c<e.length;c++){let u=e[c];if(!(u==="["||u==="]"))if(u===":"){if(i===!0&&(s=!0),!a(n,o,r))break;if(++t>7){r.error=!0;break}c>0&&e[c-1]===":"&&(i=!0),o.push(":");continue}else if(u==="%"){if(!a(n,o,r))break;a=d$}else{n.push(u);continue}}return n.length&&(a===d$?r.zone=n.join(""):s?o.push(n.join("")):o.push(bh(n))),r.address=o.join(""),r}function f$(e){if(fR(e,":")<2)return{host:e,isIPV6:!1};let t=pR(e);if(t.error)return{host:e,isIPV6:!1};{let r=t.address,o=t.address;return t.zone&&(r+="%"+t.zone,o+="%25"+t.zone),{host:r,isIPV6:!0,escapedHost:o}}}function fR(e,t){let r=0;for(let o=0;o<e.length;o++)e[o]===t&&r++;return r}function mR(e){let t=e,r=[],o=-1,n=0;for(;n=t.length;){if(n===1){if(t===".")break;if(t==="/"){r.push("/");break}else{r.push(t);break}}else if(n===2){if(t[0]==="."){if(t[1]===".")break;if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&(t[1]==="."||t[1]==="/")){r.push("/");break}}else if(n===3&&t==="/.."){r.length!==0&&r.pop(),r.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),r.length!==0&&r.pop();continue}}if((o=t.indexOf("/",1))===-1){r.push(t);break}else r.push(t.slice(0,o)),t=t.slice(o)}return r.join("")}function hR(e,t){let r=t!==!0?escape:unescape;return e.scheme!==void 0&&(e.scheme=r(e.scheme)),e.userinfo!==void 0&&(e.userinfo=r(e.userinfo)),e.host!==void 0&&(e.host=r(e.host)),e.path!==void 0&&(e.path=r(e.path)),e.query!==void 0&&(e.query=r(e.query)),e.fragment!==void 0&&(e.fragment=r(e.fragment)),e}function gR(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let r=unescape(e.host);if(!p$(r)){let o=f$(r);o.isIPV6===!0?r=`[${o.escapedHost}]`:r=e.host}t.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}m$.exports={nonSimpleDomain:lR,recomposeAuthority:gR,normalizeComponentEncoding:hR,removeDotSegments:mR,isIPv4:p$,isUUID:uR,normalizeIPv6:f$,stringArrayToHexStripped:bh}});var y$=w((AG,v$)=>{"use strict";var{isUUID:_R}=wh(),vR=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,yR=["http","https","ws","wss","urn","urn:uuid"];function bR(e){return yR.indexOf(e)!==-1}function $h(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 h$(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function g$(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 wR(e){return e.secure=$h(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function $R(e){if((e.port===($h(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,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}function kR(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(vR);if(r){let o=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let n=`${o}:${t.nid||e.nid}`,i=kh(n);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function xR(e,t){if(e.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",o=e.nid.toLowerCase(),n=`${r}:${t.nid||o}`,i=kh(n);i&&(e=i.serialize(e,t));let s=e,a=e.nss;return s.path=`${o||t.nid}:${a}`,t.skipEscape=!0,s}function SR(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!_R(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function TR(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var _$={scheme:"http",domainHost:!0,parse:h$,serialize:g$},PR={scheme:"https",domainHost:_$.domainHost,parse:h$,serialize:g$},Dl={scheme:"ws",domainHost:!0,parse:wR,serialize:$R},zR={scheme:"wss",domainHost:Dl.domainHost,parse:Dl.parse,serialize:Dl.serialize},IR={scheme:"urn",parse:kR,serialize:xR,skipNormalize:!0},ER={scheme:"urn:uuid",parse:SR,serialize:TR,skipNormalize:!0},Cl={http:_$,https:PR,ws:Dl,wss:zR,urn:IR,"urn:uuid":ER};Object.setPrototypeOf(Cl,null);function kh(e){return e&&(Cl[e]||Cl[e.toLowerCase()])||void 0}v$.exports={wsIsSecure:$h,SCHEMES:Cl,isValidSchemeName:bR,getSchemeHandler:kh}});var Sh=w((DG,Ml)=>{"use strict";var{normalizeIPv6:NR,removeDotSegments:ea,recomposeAuthority:OR,normalizeComponentEncoding:ql,isIPv4:RR,nonSimpleDomain:jR}=wh(),{SCHEMES:AR,getSchemeHandler:b$}=y$();function DR(e,t){return typeof e=="string"?e=lr(Er(e,t),t):typeof e=="object"&&(e=Er(lr(e,t),t)),e}function CR(e,t,r){let o=r?Object.assign({scheme:"null"},r):{scheme:"null"},n=w$(Er(e,o),Er(t,o),o,!0);return o.skipEscape=!0,lr(n,o)}function w$(e,t,r,o){let n={};return o||(e=Er(lr(e,r),r),t=Er(lr(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=ea(t.path||""),n.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=ea(t.path||""),n.query=t.query):(t.path?(t.path[0]==="/"?n.path=ea(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?n.path="/"+t.path:e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path,n.path=ea(n.path)),n.query=t.query):(n.path=e.path,t.query!==void 0?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function qR(e,t,r){return typeof e=="string"?(e=unescape(e),e=lr(ql(Er(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=lr(ql(e,!0),{...r,skipEscape:!0})),typeof t=="string"?(t=unescape(t),t=lr(ql(Er(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=lr(ql(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function lr(e,t){let r={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),n=[],i=b$(o.scheme||r.scheme);i&&i.serialize&&i.serialize(r,o),r.path!==void 0&&(o.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),o.reference!=="suffix"&&r.scheme&&n.push(r.scheme,":");let s=OR(r);if(s!==void 0&&(o.reference!=="suffix"&&n.push("//"),n.push(s),r.path&&r.path[0]!=="/"&&n.push("/")),r.path!==void 0){let a=r.path;!o.absolutePath&&(!i||!i.absolutePath)&&(a=ea(a)),s===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),n.push(a)}return r.query!==void 0&&n.push("?",r.query),r.fragment!==void 0&&n.push("#",r.fragment),n.join("")}var MR=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Er(e,t){let r=Object.assign({},t),o={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},n=!1;r.reference==="suffix"&&(r.scheme?e=r.scheme+":"+e:e="//"+e);let i=e.match(MR);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(RR(o.host)===!1){let c=NR(o.host);o.host=c.host.toLowerCase(),n=c.isIPV6}else n=!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",r.reference&&r.reference!=="suffix"&&r.reference!==o.reference&&(o.error=o.error||"URI is not a "+r.reference+" reference.");let s=b$(r.scheme||o.scheme);if(!r.unicodeSupport&&(!s||!s.unicodeSupport)&&o.host&&(r.domainHost||s&&s.domainHost)&&n===!1&&jR(o.host))try{o.host=URL.domainToASCII(o.host.toLowerCase())}catch(a){o.error=o.error||"Host's domain name can not be converted to ASCII: "+a}(!s||s&&!s.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)))),s&&s.parse&&s.parse(o,r)}else o.error=o.error||"URI can not be parsed.";return o}var xh={SCHEMES:AR,normalize:DR,resolve:CR,resolveComponent:w$,equal:qR,serialize:lr,parse:Er};Ml.exports=xh;Ml.exports.default=xh;Ml.exports.fastUri=xh});var k$=w(Th=>{"use strict";Object.defineProperty(Th,"__esModule",{value:!0});var $$=Sh();$$.code='require("ajv/dist/runtime/uri").default';Th.default=$$});var N$=w(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.CodeGen=Be.Name=Be.nil=Be.stringify=Be.str=Be._=Be.KeywordCxt=void 0;var UR=Ys();Object.defineProperty(Be,"KeywordCxt",{enumerable:!0,get:function(){return UR.KeywordCxt}});var Zo=oe();Object.defineProperty(Be,"_",{enumerable:!0,get:function(){return Zo._}});Object.defineProperty(Be,"str",{enumerable:!0,get:function(){return Zo.str}});Object.defineProperty(Be,"stringify",{enumerable:!0,get:function(){return Zo.stringify}});Object.defineProperty(Be,"nil",{enumerable:!0,get:function(){return Zo.nil}});Object.defineProperty(Be,"Name",{enumerable:!0,get:function(){return Zo.Name}});Object.defineProperty(Be,"CodeGen",{enumerable:!0,get:function(){return Zo.CodeGen}});var LR=Rl(),z$=Xs(),ZR=th(),ta=Al(),VR=oe(),ra=Bs(),Ul=Ks(),zh=he(),x$=l$(),FR=k$(),I$=(e,t)=>new RegExp(e,t);I$.code="new RegExp";var WR=["removeAdditional","useDefaults","coerceTypes"],GR=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),KR={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},HR={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},S$=200;function BR(e){var t,r,o,n,i,s,a,c,u,l,d,h,m,p,f,_,y,$,k,I,P,ze,Me,ir,pn;let Ft=e.strict,fn=(t=e.code)===null||t===void 0?void 0:t.optimize,li=fn===!0||fn===void 0?1:fn||0,di=(o=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&o!==void 0?o:I$,Zd=(n=e.uriResolver)!==null&&n!==void 0?n:FR.default;return{strictSchema:(s=(i=e.strictSchema)!==null&&i!==void 0?i:Ft)!==null&&s!==void 0?s:!0,strictNumbers:(c=(a=e.strictNumbers)!==null&&a!==void 0?a:Ft)!==null&&c!==void 0?c:!0,strictTypes:(l=(u=e.strictTypes)!==null&&u!==void 0?u:Ft)!==null&&l!==void 0?l:"log",strictTuples:(h=(d=e.strictTuples)!==null&&d!==void 0?d:Ft)!==null&&h!==void 0?h:"log",strictRequired:(p=(m=e.strictRequired)!==null&&m!==void 0?m:Ft)!==null&&p!==void 0?p:!1,code:e.code?{...e.code,optimize:li,regExp:di}:{optimize:li,regExp:di},loopRequired:(f=e.loopRequired)!==null&&f!==void 0?f:S$,loopEnum:(_=e.loopEnum)!==null&&_!==void 0?_:S$,meta:(y=e.meta)!==null&&y!==void 0?y:!0,messages:($=e.messages)!==null&&$!==void 0?$:!0,inlineRefs:(k=e.inlineRefs)!==null&&k!==void 0?k:!0,schemaId:(I=e.schemaId)!==null&&I!==void 0?I:"$id",addUsedSchema:(P=e.addUsedSchema)!==null&&P!==void 0?P:!0,validateSchema:(ze=e.validateSchema)!==null&&ze!==void 0?ze:!0,validateFormats:(Me=e.validateFormats)!==null&&Me!==void 0?Me:!0,unicodeRegExp:(ir=e.unicodeRegExp)!==null&&ir!==void 0?ir:!0,int32range:(pn=e.int32range)!==null&&pn!==void 0?pn:!0,uriResolver:Zd}}var na=class{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...BR(t)};let{es5:r,lines:o}=this.opts.code;this.scope=new VR.ValueScope({scope:{},prefixes:GR,es5:r,lines:o}),this.logger=tj(t.logger);let n=t.validateFormats;t.validateFormats=!1,this.RULES=(0,ZR.getRules)(),T$.call(this,KR,t,"NOT SUPPORTED"),T$.call(this,HR,t,"DEPRECATED","warn"),this._metaOpts=XR.call(this),t.formats&&QR.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&YR.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),JR.call(this),t.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:o}=this.opts,n=x$;o==="id"&&(n={...x$},n.id=n.$id,delete n.$id),r&&t&&this.addMetaSchema(n,n[o],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){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 n=o(r);return"$async"in o||(this.errors=o.errors),n}compile(t,r){let o=this._addSchema(t,r);return o.validate||this._compileSchemaEnv(o)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:o}=this.opts;return n.call(this,t,r);async function n(l,d){await i.call(this,l.$schema);let h=this._addSchema(l,d);return h.validate||s.call(this,h)}async function i(l){l&&!this.getSchema(l)&&await n.call(this,{$ref:l},!0)}async function s(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof z$.default))throw d;return a.call(this,d),await c.call(this,d.missingSchema),s.call(this,l)}}function a({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,r)}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,r,o,n=this.opts.validateSchema){if(Array.isArray(t)){for(let s of t)this.addSchema(s,void 0,o,n);return this}let i;if(typeof t=="object"){let{schemaId:s}=this.opts;if(i=t[s],i!==void 0&&typeof i!="string")throw new Error(`schema ${s} must be string`)}return r=(0,ra.normalizeId)(r||i),this._checkUnique(r),this.schemas[r]=this._addSchema(t,o,r,n,!0),this}addMetaSchema(t,r,o=this.opts.validateSchema){return this.addSchema(t,r,!0,o),this}validateSchema(t,r){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 n=this.validate(o,t);if(!n&&r){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw new Error(i)}return n}getSchema(t){let r;for(;typeof(r=P$.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:o}=this.opts,n=new ta.SchemaEnv({schema:{},schemaId:o});if(r=ta.resolveSchema.call(this,n,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}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 r=P$.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let o=t[this.opts.schemaId];return o&&(o=(0,ra.normalizeId)(o),delete this.schemas[o],delete this.refs[o]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let o;if(typeof t=="string")o=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=o);else if(typeof t=="object"&&r===void 0){if(r=t,o=r.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(nj.call(this,o,r),!r)return(0,zh.eachItem)(o,i=>Ph.call(this,i)),this;ij.call(this,r);let n={...r,type:(0,Ul.getJSONTypes)(r.type),schemaType:(0,Ul.getJSONTypes)(r.schemaType)};return(0,zh.eachItem)(o,n.type.length===0?i=>Ph.call(this,i,n):i=>n.type.forEach(s=>Ph.call(this,i,n,s))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let o of r.rules){let n=o.rules.findIndex(i=>i.keyword===t);n>=0&&o.rules.splice(n,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:o="data"}={}){return!t||t.length===0?"No errors":t.map(n=>`${o}${n.instancePath} ${n.message}`).reduce((n,i)=>n+r+i)}$dataMetaSchema(t,r){let o=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let n of r){let i=n.split("/").slice(1),s=t;for(let a of i)s=s[a];for(let a in o){let c=o[a];if(typeof c!="object")continue;let{$data:u}=c.definition,l=s[a];u&&l&&(s[a]=E$(l))}}return t}_removeAllSchemas(t,r){for(let o in t){let n=t[o];(!r||r.test(o))&&(typeof n=="string"?delete t[o]:n&&!n.meta&&(this._cache.delete(n.schema),delete t[o]))}}_addSchema(t,r,o,n=this.opts.validateSchema,i=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof t=="object")s=t[a];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,ra.normalizeId)(s||o);let u=ra.getSchemaRefs.call(this,t,o);return c=new ta.SchemaEnv({schema:t,schemaId:a,meta:r,baseId:o,localRefs:u}),this._cache.set(c.schema,c),i&&!o.startsWith("#")&&(o&&this._checkUnique(o),this.refs[o]=c),n&&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):ta.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{ta.compileSchema.call(this,t)}finally{this.opts=r}}};na.ValidationError=LR.default;na.MissingRefError=z$.default;Be.default=na;function T$(e,t,r,o="error"){for(let n in e){let i=n;i in t&&this.logger[o](`${r}: option ${n}. ${e[i]}`)}}function P$(e){return e=(0,ra.normalizeId)(e),this.schemas[e]||this.refs[e]}function JR(){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 QR(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function YR(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 r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function XR(){let e={...this.opts};for(let t of WR)delete e[t];return e}var ej={log(){},warn(){},error(){}};function tj(e){if(e===!1)return ej;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 rj=/^[a-z_$][a-z0-9_$:-]*$/i;function nj(e,t){let{RULES:r}=this;if((0,zh.eachItem)(e,o=>{if(r.keywords[o])throw new Error(`Keyword ${o} is already defined`);if(!rj.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 Ph(e,t,r){var o;let n=t?.post;if(r&&n)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,s=n?i.post:i.rules.find(({type:c})=>c===r);if(s||(s={type:r,rules:[]},i.rules.push(s)),i.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,Ul.getJSONTypes)(t.type),schemaType:(0,Ul.getJSONTypes)(t.schemaType)}};t.before?oj.call(this,s,a,t.before):s.rules.push(a),i.all[e]=a,(o=t.implements)===null||o===void 0||o.forEach(c=>this.addKeyword(c))}function oj(e,t,r){let o=e.rules.findIndex(n=>n.keyword===r);o>=0?e.rules.splice(o,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function ij(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=E$(t)),e.validateSchema=this.compile(t,!0))}var sj={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function E$(e){return{anyOf:[e,sj]}}});var O$=w(Ih=>{"use strict";Object.defineProperty(Ih,"__esModule",{value:!0});var aj={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Ih.default=aj});var D$=w(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.callRef=jn.getValidate=void 0;var cj=Xs(),R$=Ct(),wt=oe(),Vo=zr(),j$=Al(),Ll=he(),uj={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:o}=e,{baseId:n,schemaEnv:i,validateName:s,opts:a,self:c}=o,{root:u}=i;if((r==="#"||r==="#/")&&n===u.baseId)return d();let l=j$.resolveRef.call(c,u,n,r);if(l===void 0)throw new cj.default(o.opts.uriResolver,n,r);if(l instanceof j$.SchemaEnv)return h(l);return m(l);function d(){if(i===u)return Zl(e,s,i,i.$async);let p=t.scopeValue("root",{ref:u});return Zl(e,(0,wt._)`${p}.validate`,u,u.$async)}function h(p){let f=A$(e,p);Zl(e,f,p,p.$async)}function m(p){let f=t.scopeValue("schema",a.code.source===!0?{ref:p,code:(0,wt.stringify)(p)}:{ref:p}),_=t.name("valid"),y=e.subschema({schema:p,dataTypes:[],schemaPath:wt.nil,topSchemaRef:f,errSchemaPath:r},_);e.mergeEvaluated(y),e.ok(_)}}};function A$(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,wt._)`${r.scopeValue("wrapper",{ref:t})}.validate`}jn.getValidate=A$;function Zl(e,t,r,o){let{gen:n,it:i}=e,{allErrors:s,schemaEnv:a,opts:c}=i,u=c.passContext?Vo.default.this:wt.nil;o?l():d();function l(){if(!a.$async)throw new Error("async schema referenced by sync schema");let p=n.let("valid");n.try(()=>{n.code((0,wt._)`await ${(0,R$.callValidateCode)(e,t,u)}`),m(t),s||n.assign(p,!0)},f=>{n.if((0,wt._)`!(${f} instanceof ${i.ValidationError})`,()=>n.throw(f)),h(f),s||n.assign(p,!1)}),e.ok(p)}function d(){e.result((0,R$.callValidateCode)(e,t,u),()=>m(t),()=>h(t))}function h(p){let f=(0,wt._)`${p}.errors`;n.assign(Vo.default.vErrors,(0,wt._)`${Vo.default.vErrors} === null ? ${f} : ${Vo.default.vErrors}.concat(${f})`),n.assign(Vo.default.errors,(0,wt._)`${Vo.default.vErrors}.length`)}function m(p){var f;if(!i.opts.unevaluated)return;let _=(f=r?.validate)===null||f===void 0?void 0:f.evaluated;if(i.props!==!0)if(_&&!_.dynamicProps)_.props!==void 0&&(i.props=Ll.mergeEvaluated.props(n,_.props,i.props));else{let y=n.var("props",(0,wt._)`${p}.evaluated.props`);i.props=Ll.mergeEvaluated.props(n,y,i.props,wt.Name)}if(i.items!==!0)if(_&&!_.dynamicItems)_.items!==void 0&&(i.items=Ll.mergeEvaluated.items(n,_.items,i.items));else{let y=n.var("items",(0,wt._)`${p}.evaluated.items`);i.items=Ll.mergeEvaluated.items(n,y,i.items,wt.Name)}}}jn.callRef=Zl;jn.default=uj});var C$=w(Eh=>{"use strict";Object.defineProperty(Eh,"__esModule",{value:!0});var lj=O$(),dj=D$(),pj=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",lj.default,dj.default];Eh.default=pj});var q$=w(Nh=>{"use strict";Object.defineProperty(Nh,"__esModule",{value:!0});var Vl=oe(),tn=Vl.operators,Fl={maximum:{okStr:"<=",ok:tn.LTE,fail:tn.GT},minimum:{okStr:">=",ok:tn.GTE,fail:tn.LT},exclusiveMaximum:{okStr:"<",ok:tn.LT,fail:tn.GTE},exclusiveMinimum:{okStr:">",ok:tn.GT,fail:tn.LTE}},fj={message:({keyword:e,schemaCode:t})=>(0,Vl.str)`must be ${Fl[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Vl._)`{comparison: ${Fl[e].okStr}, limit: ${t}}`},mj={keyword:Object.keys(Fl),type:"number",schemaType:"number",$data:!0,error:fj,code(e){let{keyword:t,data:r,schemaCode:o}=e;e.fail$data((0,Vl._)`${r} ${Fl[t].fail} ${o} || isNaN(${r})`)}};Nh.default=mj});var M$=w(Oh=>{"use strict";Object.defineProperty(Oh,"__esModule",{value:!0});var oa=oe(),hj={message:({schemaCode:e})=>(0,oa.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,oa._)`{multipleOf: ${e}}`},gj={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:hj,code(e){let{gen:t,data:r,schemaCode:o,it:n}=e,i=n.opts.multipleOfPrecision,s=t.let("res"),a=i?(0,oa._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${i}`:(0,oa._)`${s} !== parseInt(${s})`;e.fail$data((0,oa._)`(${o} === 0 || (${s} = ${r}/${o}, ${a}))`)}};Oh.default=gj});var L$=w(Rh=>{"use strict";Object.defineProperty(Rh,"__esModule",{value:!0});function U$(e){let t=e.length,r=0,o=0,n;for(;o<t;)r++,n=e.charCodeAt(o++),n>=55296&&n<=56319&&o<t&&(n=e.charCodeAt(o),(n&64512)===56320&&o++);return r}Rh.default=U$;U$.code='require("ajv/dist/runtime/ucs2length").default'});var Z$=w(jh=>{"use strict";Object.defineProperty(jh,"__esModule",{value:!0});var An=oe(),_j=he(),vj=L$(),yj={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,An.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,An._)`{limit: ${e}}`},bj={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:yj,code(e){let{keyword:t,data:r,schemaCode:o,it:n}=e,i=t==="maxLength"?An.operators.GT:An.operators.LT,s=n.opts.unicode===!1?(0,An._)`${r}.length`:(0,An._)`${(0,_j.useFunc)(e.gen,vj.default)}(${r})`;e.fail$data((0,An._)`${s} ${i} ${o}`)}};jh.default=bj});var V$=w(Ah=>{"use strict";Object.defineProperty(Ah,"__esModule",{value:!0});var wj=Ct(),Wl=oe(),$j={message:({schemaCode:e})=>(0,Wl.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Wl._)`{pattern: ${e}}`},kj={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:$j,code(e){let{data:t,$data:r,schema:o,schemaCode:n,it:i}=e,s=i.opts.unicodeRegExp?"u":"",a=r?(0,Wl._)`(new RegExp(${n}, ${s}))`:(0,wj.usePattern)(e,o);e.fail$data((0,Wl._)`!${a}.test(${t})`)}};Ah.default=kj});var F$=w(Dh=>{"use strict";Object.defineProperty(Dh,"__esModule",{value:!0});var ia=oe(),xj={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,ia.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,ia._)`{limit: ${e}}`},Sj={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:xj,code(e){let{keyword:t,data:r,schemaCode:o}=e,n=t==="maxProperties"?ia.operators.GT:ia.operators.LT;e.fail$data((0,ia._)`Object.keys(${r}).length ${n} ${o}`)}};Dh.default=Sj});var W$=w(Ch=>{"use strict";Object.defineProperty(Ch,"__esModule",{value:!0});var sa=Ct(),aa=oe(),Tj=he(),Pj={message:({params:{missingProperty:e}})=>(0,aa.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,aa._)`{missingProperty: ${e}}`},zj={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Pj,code(e){let{gen:t,schema:r,schemaCode:o,data:n,$data:i,it:s}=e,{opts:a}=s;if(!i&&r.length===0)return;let c=r.length>=a.loopRequired;if(s.allErrors?u():l(),a.strictRequired){let m=e.parentSchema.properties,{definedProperties:p}=e.it;for(let f of r)if(m?.[f]===void 0&&!p.has(f)){let _=s.schemaEnv.baseId+s.errSchemaPath,y=`required property "${f}" is not defined at "${_}" (strictRequired)`;(0,Tj.checkStrictMode)(s,y,s.opts.strictRequired)}}function u(){if(c||i)e.block$data(aa.nil,d);else for(let m of r)(0,sa.checkReportMissingProp)(e,m)}function l(){let m=t.let("missing");if(c||i){let p=t.let("valid",!0);e.block$data(p,()=>h(m,p)),e.ok(p)}else t.if((0,sa.checkMissingProp)(e,r,m)),(0,sa.reportMissingProp)(e,m),t.else()}function d(){t.forOf("prop",o,m=>{e.setParams({missingProperty:m}),t.if((0,sa.noPropertyInData)(t,n,m,a.ownProperties),()=>e.error())})}function h(m,p){e.setParams({missingProperty:m}),t.forOf(m,o,()=>{t.assign(p,(0,sa.propertyInData)(t,n,m,a.ownProperties)),t.if((0,aa.not)(p),()=>{e.error(),t.break()})},aa.nil)}}};Ch.default=zj});var G$=w(qh=>{"use strict";Object.defineProperty(qh,"__esModule",{value:!0});var ca=oe(),Ij={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,ca.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,ca._)`{limit: ${e}}`},Ej={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Ij,code(e){let{keyword:t,data:r,schemaCode:o}=e,n=t==="maxItems"?ca.operators.GT:ca.operators.LT;e.fail$data((0,ca._)`${r}.length ${n} ${o}`)}};qh.default=Ej});var Gl=w(Mh=>{"use strict";Object.defineProperty(Mh,"__esModule",{value:!0});var K$=Hs();K$.code='require("ajv/dist/runtime/equal").default';Mh.default=K$});var H$=w(Lh=>{"use strict";Object.defineProperty(Lh,"__esModule",{value:!0});var Uh=Ks(),Je=oe(),Nj=he(),Oj=Gl(),Rj={message:({params:{i:e,j:t}})=>(0,Je.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Je._)`{i: ${e}, j: ${t}}`},jj={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Rj,code(e){let{gen:t,data:r,$data:o,schema:n,parentSchema:i,schemaCode:s,it:a}=e;if(!o&&!n)return;let c=t.let("valid"),u=i.items?(0,Uh.getSchemaTypes)(i.items):[];e.block$data(c,l,(0,Je._)`${s} === false`),e.ok(c);function l(){let p=t.let("i",(0,Je._)`${r}.length`),f=t.let("j");e.setParams({i:p,j:f}),t.assign(c,!0),t.if((0,Je._)`${p} > 1`,()=>(d()?h:m)(p,f))}function d(){return u.length>0&&!u.some(p=>p==="object"||p==="array")}function h(p,f){let _=t.name("item"),y=(0,Uh.checkDataTypes)(u,_,a.opts.strictNumbers,Uh.DataType.Wrong),$=t.const("indices",(0,Je._)`{}`);t.for((0,Je._)`;${p}--;`,()=>{t.let(_,(0,Je._)`${r}[${p}]`),t.if(y,(0,Je._)`continue`),u.length>1&&t.if((0,Je._)`typeof ${_} == "string"`,(0,Je._)`${_} += "_"`),t.if((0,Je._)`typeof ${$}[${_}] == "number"`,()=>{t.assign(f,(0,Je._)`${$}[${_}]`),e.error(),t.assign(c,!1).break()}).code((0,Je._)`${$}[${_}] = ${p}`)})}function m(p,f){let _=(0,Nj.useFunc)(t,Oj.default),y=t.name("outer");t.label(y).for((0,Je._)`;${p}--;`,()=>t.for((0,Je._)`${f} = ${p}; ${f}--;`,()=>t.if((0,Je._)`${_}(${r}[${p}], ${r}[${f}])`,()=>{e.error(),t.assign(c,!1).break(y)})))}}};Lh.default=jj});var B$=w(Vh=>{"use strict";Object.defineProperty(Vh,"__esModule",{value:!0});var Zh=oe(),Aj=he(),Dj=Gl(),Cj={message:"must be equal to constant",params:({schemaCode:e})=>(0,Zh._)`{allowedValue: ${e}}`},qj={keyword:"const",$data:!0,error:Cj,code(e){let{gen:t,data:r,$data:o,schemaCode:n,schema:i}=e;o||i&&typeof i=="object"?e.fail$data((0,Zh._)`!${(0,Aj.useFunc)(t,Dj.default)}(${r}, ${n})`):e.fail((0,Zh._)`${i} !== ${r}`)}};Vh.default=qj});var J$=w(Fh=>{"use strict";Object.defineProperty(Fh,"__esModule",{value:!0});var ua=oe(),Mj=he(),Uj=Gl(),Lj={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,ua._)`{allowedValues: ${e}}`},Zj={keyword:"enum",schemaType:"array",$data:!0,error:Lj,code(e){let{gen:t,data:r,$data:o,schema:n,schemaCode:i,it:s}=e;if(!o&&n.length===0)throw new Error("enum must have non-empty array");let a=n.length>=s.opts.loopEnum,c,u=()=>c??(c=(0,Mj.useFunc)(t,Uj.default)),l;if(a||o)l=t.let("valid"),e.block$data(l,d);else{if(!Array.isArray(n))throw new Error("ajv implementation error");let m=t.const("vSchema",i);l=(0,ua.or)(...n.map((p,f)=>h(m,f)))}e.pass(l);function d(){t.assign(l,!1),t.forOf("v",i,m=>t.if((0,ua._)`${u()}(${r}, ${m})`,()=>t.assign(l,!0).break()))}function h(m,p){let f=n[p];return typeof f=="object"&&f!==null?(0,ua._)`${u()}(${r}, ${m}[${p}])`:(0,ua._)`${r} === ${f}`}}};Fh.default=Zj});var Q$=w(Wh=>{"use strict";Object.defineProperty(Wh,"__esModule",{value:!0});var Vj=q$(),Fj=M$(),Wj=Z$(),Gj=V$(),Kj=F$(),Hj=W$(),Bj=G$(),Jj=H$(),Qj=B$(),Yj=J$(),Xj=[Vj.default,Fj.default,Wj.default,Gj.default,Kj.default,Hj.default,Bj.default,Jj.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Qj.default,Yj.default];Wh.default=Xj});var Kh=w(la=>{"use strict";Object.defineProperty(la,"__esModule",{value:!0});la.validateAdditionalItems=void 0;var Dn=oe(),Gh=he(),eA={message:({params:{len:e}})=>(0,Dn.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Dn._)`{limit: ${e}}`},tA={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:eA,code(e){let{parentSchema:t,it:r}=e,{items:o}=t;if(!Array.isArray(o)){(0,Gh.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Y$(e,o)}};function Y$(e,t){let{gen:r,schema:o,data:n,keyword:i,it:s}=e;s.items=!0;let a=r.const("len",(0,Dn._)`${n}.length`);if(o===!1)e.setParams({len:t.length}),e.pass((0,Dn._)`${a} <= ${t.length}`);else if(typeof o=="object"&&!(0,Gh.alwaysValidSchema)(s,o)){let u=r.var("valid",(0,Dn._)`${a} <= ${t.length}`);r.if((0,Dn.not)(u),()=>c(u)),e.ok(u)}function c(u){r.forRange("i",t.length,a,l=>{e.subschema({keyword:i,dataProp:l,dataPropType:Gh.Type.Num},u),s.allErrors||r.if((0,Dn.not)(u),()=>r.break())})}}la.validateAdditionalItems=Y$;la.default=tA});var Hh=w(da=>{"use strict";Object.defineProperty(da,"__esModule",{value:!0});da.validateTuple=void 0;var X$=oe(),Kl=he(),rA=Ct(),nA={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return ek(e,"additionalItems",t);r.items=!0,!(0,Kl.alwaysValidSchema)(r,t)&&e.ok((0,rA.validateArray)(e))}};function ek(e,t,r=e.schema){let{gen:o,parentSchema:n,data:i,keyword:s,it:a}=e;l(n),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=Kl.mergeEvaluated.items(o,r.length,a.items));let c=o.name("valid"),u=o.const("len",(0,X$._)`${i}.length`);r.forEach((d,h)=>{(0,Kl.alwaysValidSchema)(a,d)||(o.if((0,X$._)`${u} > ${h}`,()=>e.subschema({keyword:s,schemaProp:h,dataProp:h},c)),e.ok(c))});function l(d){let{opts:h,errSchemaPath:m}=a,p=r.length,f=p===d.minItems&&(p===d.maxItems||d[t]===!1);if(h.strictTuples&&!f){let _=`"${s}" is ${p}-tuple, but minItems or maxItems/${t} are not specified or different at path "${m}"`;(0,Kl.checkStrictMode)(a,_,h.strictTuples)}}}da.validateTuple=ek;da.default=nA});var tk=w(Bh=>{"use strict";Object.defineProperty(Bh,"__esModule",{value:!0});var oA=Hh(),iA={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,oA.validateTuple)(e,"items")};Bh.default=iA});var nk=w(Jh=>{"use strict";Object.defineProperty(Jh,"__esModule",{value:!0});var rk=oe(),sA=he(),aA=Ct(),cA=Kh(),uA={message:({params:{len:e}})=>(0,rk.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,rk._)`{limit: ${e}}`},lA={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:uA,code(e){let{schema:t,parentSchema:r,it:o}=e,{prefixItems:n}=r;o.items=!0,!(0,sA.alwaysValidSchema)(o,t)&&(n?(0,cA.validateAdditionalItems)(e,n):e.ok((0,aA.validateArray)(e)))}};Jh.default=lA});var ok=w(Qh=>{"use strict";Object.defineProperty(Qh,"__esModule",{value:!0});var Mt=oe(),Hl=he(),dA={message:({params:{min:e,max:t}})=>t===void 0?(0,Mt.str)`must contain at least ${e} valid item(s)`:(0,Mt.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,Mt._)`{minContains: ${e}}`:(0,Mt._)`{minContains: ${e}, maxContains: ${t}}`},pA={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:dA,code(e){let{gen:t,schema:r,parentSchema:o,data:n,it:i}=e,s,a,{minContains:c,maxContains:u}=o;i.opts.next?(s=c===void 0?1:c,a=u):s=1;let l=t.const("len",(0,Mt._)`${n}.length`);if(e.setParams({min:s,max:a}),a===void 0&&s===0){(0,Hl.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,Hl.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Hl.alwaysValidSchema)(i,r)){let f=(0,Mt._)`${l} >= ${s}`;a!==void 0&&(f=(0,Mt._)`${f} && ${l} <= ${a}`),e.pass(f);return}i.items=!0;let d=t.name("valid");a===void 0&&s===1?m(d,()=>t.if(d,()=>t.break())):s===0?(t.let(d,!0),a!==void 0&&t.if((0,Mt._)`${n}.length > 0`,h)):(t.let(d,!1),h()),e.result(d,()=>e.reset());function h(){let f=t.name("_valid"),_=t.let("count",0);m(f,()=>t.if(f,()=>p(_)))}function m(f,_){t.forRange("i",0,l,y=>{e.subschema({keyword:"contains",dataProp:y,dataPropType:Hl.Type.Num,compositeRule:!0},f),_()})}function p(f){t.code((0,Mt._)`${f}++`),a===void 0?t.if((0,Mt._)`${f} >= ${s}`,()=>t.assign(d,!0).break()):(t.if((0,Mt._)`${f} > ${a}`,()=>t.assign(d,!1).break()),s===1?t.assign(d,!0):t.if((0,Mt._)`${f} >= ${s}`,()=>t.assign(d,!0)))}}};Qh.default=pA});var ak=w(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.validateSchemaDeps=dr.validatePropertyDeps=dr.error=void 0;var Yh=oe(),fA=he(),pa=Ct();dr.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let o=t===1?"property":"properties";return(0,Yh.str)`must have ${o} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:o}})=>(0,Yh._)`{property: ${e},
6
+ || ${s} === "boolean" || ${n} === null`).assign(a,(0,J._)`[${n}]`)}}}function YN({gen:e,parentData:t,parentDataProperty:r},o){e.if((0,J._)`${t} !== undefined`,()=>e.assign((0,J._)`${t}[${r}]`,o))}function oh(e,t,r,o=qo.Correct){let n=o===qo.Correct?J.operators.EQ:J.operators.NEQ,i;switch(e){case"null":return(0,J._)`${t} ${n} null`;case"array":i=(0,J._)`Array.isArray(${t})`;break;case"object":i=(0,J._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=s((0,J._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=s();break;default:return(0,J._)`typeof ${t} ${n} ${e}`}return o===qo.Correct?i:(0,J.not)(i);function s(a=J.nil){return(0,J.and)((0,J._)`typeof ${t} == "number"`,a,r?(0,J._)`isFinite(${t})`:J.nil)}}it.checkDataType=oh;function ih(e,t,r,o){if(e.length===1)return oh(e[0],t,r,o);let n,i=(0,Nw.toHash)(e);if(i.array&&i.object){let s=(0,J._)`typeof ${t} != "object"`;n=i.null?s:(0,J._)`!${t} || ${s}`,delete i.null,delete i.array,delete i.object}else n=J.nil;i.number&&delete i.integer;for(let s in i)n=(0,J.and)(n,oh(s,t,r,o));return n}it.checkDataTypes=ih;var XN={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,J._)`{type: ${e}}`:(0,J._)`{type: ${t}}`};function sh(e){let t=eO(e);(0,KN.reportError)(t,XN)}it.reportTypeError=sh;function eO(e){let{gen:t,data:r,schema:o}=e,n=(0,Nw.schemaRefOrVal)(e,o,"type");return{gen:t,keyword:"type",data:r,schema:o.type,schemaCode:n,schemaValue:n,parentSchema:o,params:{},it:e}}});var Aw=w(Nl=>{"use strict";Object.defineProperty(Nl,"__esModule",{value:!0});Nl.assignDefaults=void 0;var Mo=oe(),tO=pe();function rO(e,t){let{properties:r,items:o}=e.schema;if(t==="object"&&r)for(let n in r)jw(e,n,r[n].default);else t==="array"&&Array.isArray(o)&&o.forEach((n,i)=>jw(e,i,n.default))}Nl.assignDefaults=rO;function jw(e,t,r){let{gen:o,compositeRule:n,data:i,opts:s}=e;if(r===void 0)return;let a=(0,Mo._)`${i}${(0,Mo.getProperty)(t)}`;if(n){(0,tO.checkStrictMode)(e,`default is ignored for: ${a}`);return}let c=(0,Mo._)`${a} === undefined`;s.useDefaults==="empty"&&(c=(0,Mo._)`${c} || ${a} === null || ${a} === ""`),o.if(c,(0,Mo._)`${a} = ${(0,Mo.stringify)(r)}`)}});var Dt=w(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.validateUnion=xe.validateArray=xe.usePattern=xe.callValidateCode=xe.schemaProperties=xe.allSchemaProperties=xe.noPropertyInData=xe.propertyInData=xe.isOwnProperty=xe.hasPropFunc=xe.reportMissingProp=xe.checkMissingProp=xe.checkReportMissingProp=void 0;var Re=oe(),ah=pe(),Qr=zr(),nO=pe();function oO(e,t){let{gen:r,data:o,it:n}=e;r.if(uh(r,o,t,n.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Re._)`${t}`},!0),e.error()})}xe.checkReportMissingProp=oO;function iO({gen:e,data:t,it:{opts:r}},o,n){return(0,Re.or)(...o.map(i=>(0,Re.and)(uh(e,t,i,r.ownProperties),(0,Re._)`${n} = ${i}`)))}xe.checkMissingProp=iO;function sO(e,t){e.setParams({missingProperty:t},!0),e.error()}xe.reportMissingProp=sO;function Cw(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Re._)`Object.prototype.hasOwnProperty`})}xe.hasPropFunc=Cw;function ch(e,t,r){return(0,Re._)`${Cw(e)}.call(${t}, ${r})`}xe.isOwnProperty=ch;function aO(e,t,r,o){let n=(0,Re._)`${t}${(0,Re.getProperty)(r)} !== undefined`;return o?(0,Re._)`${n} && ${ch(e,t,r)}`:n}xe.propertyInData=aO;function uh(e,t,r,o){let n=(0,Re._)`${t}${(0,Re.getProperty)(r)} === undefined`;return o?(0,Re.or)(n,(0,Re.not)(ch(e,t,r))):n}xe.noPropertyInData=uh;function Dw(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}xe.allSchemaProperties=Dw;function cO(e,t){return Dw(t).filter(r=>!(0,ah.alwaysValidSchema)(e,t[r]))}xe.schemaProperties=cO;function uO({schemaCode:e,data:t,it:{gen:r,topSchemaRef:o,schemaPath:n,errorPath:i},it:s},a,c,u){let l=u?(0,Re._)`${e}, ${t}, ${o}${n}`:t,d=[[Qr.default.instancePath,(0,Re.strConcat)(Qr.default.instancePath,i)],[Qr.default.parentData,s.parentData],[Qr.default.parentDataProperty,s.parentDataProperty],[Qr.default.rootData,Qr.default.rootData]];s.opts.dynamicRef&&d.push([Qr.default.dynamicAnchors,Qr.default.dynamicAnchors]);let h=(0,Re._)`${l}, ${r.object(...d)}`;return c!==Re.nil?(0,Re._)`${a}.call(${c}, ${h})`:(0,Re._)`${a}(${h})`}xe.callValidateCode=uO;var lO=(0,Re._)`new RegExp`;function dO({gen:e,it:{opts:t}},r){let o=t.unicodeRegExp?"u":"",{regExp:n}=t.code,i=n(r,o);return e.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,Re._)`${n.code==="new RegExp"?lO:(0,nO.useFunc)(e,n)}(${r}, ${o})`})}xe.usePattern=dO;function pO(e){let{gen:t,data:r,keyword:o,it:n}=e,i=t.name("valid");if(n.allErrors){let a=t.let("valid",!0);return s(()=>t.assign(a,!1)),a}return t.var(i,!0),s(()=>t.break()),i;function s(a){let c=t.const("len",(0,Re._)`${r}.length`);t.forRange("i",0,c,u=>{e.subschema({keyword:o,dataProp:u,dataPropType:ah.Type.Num},i),t.if((0,Re.not)(i),a)})}}xe.validateArray=pO;function fO(e){let{gen:t,schema:r,keyword:o,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,ah.alwaysValidSchema)(n,c))&&!n.opts.unevaluated)return;let s=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((c,u)=>{let l=e.subschema({keyword:o,schemaProp:u,compositeRule:!0},a);t.assign(s,(0,Re._)`${s} || ${a}`),e.mergeValidEvaluated(l,a)||t.if((0,Re.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}xe.validateUnion=fO});var Uw=w(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.validateKeywordUsage=cr.validSchemaType=cr.funcKeywordCode=cr.macroKeywordCode=void 0;var ft=oe(),On=zr(),mO=Dt(),hO=Bs();function gO(e,t){let{gen:r,keyword:o,schema:n,parentSchema:i,it:s}=e,a=t.macro.call(s.self,n,i,s),c=Mw(r,o,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let u=r.name("valid");e.subschema({schema:a,schemaPath:ft.nil,errSchemaPath:`${s.errSchemaPath}/${o}`,topSchemaRef:c,compositeRule:!0},u),e.pass(u,()=>e.error(!0))}cr.macroKeywordCode=gO;function _O(e,t){var r;let{gen:o,keyword:n,schema:i,parentSchema:s,$data:a,it:c}=e;yO(c,t);let u=!a&&t.compile?t.compile.call(c.self,i,s,c):t.validate,l=Mw(o,n,u),d=o.let("valid");e.block$data(d,h),e.ok((r=t.valid)!==null&&r!==void 0?r:d);function h(){if(t.errors===!1)f(),t.modifying&&qw(e),_(()=>e.error());else{let y=t.async?m():p();t.modifying&&qw(e),_(()=>vO(e,y))}}function m(){let y=o.let("ruleErrs",null);return o.try(()=>f((0,ft._)`await `),$=>o.assign(d,!1).if((0,ft._)`${$} instanceof ${c.ValidationError}`,()=>o.assign(y,(0,ft._)`${$}.errors`),()=>o.throw($))),y}function p(){let y=(0,ft._)`${l}.errors`;return o.assign(y,null),f(ft.nil),y}function f(y=t.async?(0,ft._)`await `:ft.nil){let $=c.opts.passContext?On.default.this:On.default.self,k=!("compile"in t&&!a||t.schema===!1);o.assign(d,(0,ft._)`${y}${(0,mO.callValidateCode)(e,l,$,k)}`,t.modifying)}function _(y){var $;o.if((0,ft.not)(($=t.valid)!==null&&$!==void 0?$:d),y)}}cr.funcKeywordCode=_O;function qw(e){let{gen:t,data:r,it:o}=e;t.if(o.parentData,()=>t.assign(r,(0,ft._)`${o.parentData}[${o.parentDataProperty}]`))}function vO(e,t){let{gen:r}=e;r.if((0,ft._)`Array.isArray(${t})`,()=>{r.assign(On.default.vErrors,(0,ft._)`${On.default.vErrors} === null ? ${t} : ${On.default.vErrors}.concat(${t})`).assign(On.default.errors,(0,ft._)`${On.default.vErrors}.length`),(0,hO.extendErrors)(e)},()=>e.error())}function yO({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function Mw(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,ft.stringify)(r)})}function bO(e,t,r=!1){return!t.length||t.some(o=>o==="array"?Array.isArray(e):o==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==o||r&&typeof e>"u")}cr.validSchemaType=bO;function wO({schema:e,opts:t,self:r,errSchemaPath:o},n,i){if(Array.isArray(n.keyword)?!n.keyword.includes(i):n.keyword!==i)throw new Error("ajv implementation error");let s=n.dependencies;if(s?.some(a=>!Object.prototype.hasOwnProperty.call(e,a)))throw new Error(`parent schema must have dependencies of ${i}: ${s.join(",")}`);if(n.validateSchema&&!n.validateSchema(e[i])){let c=`keyword "${i}" value is invalid at path "${o}": `+r.errorsText(n.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}cr.validateKeywordUsage=wO});var Zw=w(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.extendSubschemaMode=Yr.extendSubschemaData=Yr.getSubschema=void 0;var ur=oe(),Lw=pe();function $O(e,{keyword:t,schemaProp:r,schema:o,schemaPath:n,errSchemaPath:i,topSchemaRef:s}){if(t!==void 0&&o!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:(0,ur._)`${e.schemaPath}${(0,ur.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:(0,ur._)`${e.schemaPath}${(0,ur.getProperty)(t)}${(0,ur.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,Lw.escapeFragment)(r)}`}}if(o!==void 0){if(n===void 0||i===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:n,topSchemaRef:s,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}Yr.getSubschema=$O;function kO(e,t,{dataProp:r,dataPropType:o,data:n,dataTypes:i,propertyName:s}){if(n!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=t;if(r!==void 0){let{errorPath:u,dataPathArr:l,opts:d}=t,h=a.let("data",(0,ur._)`${t.data}${(0,ur.getProperty)(r)}`,!0);c(h),e.errorPath=(0,ur.str)`${u}${(0,Lw.getErrorPath)(r,o,d.jsPropertySyntax)}`,e.parentDataProperty=(0,ur._)`${r}`,e.dataPathArr=[...l,e.parentDataProperty]}if(n!==void 0){let u=n instanceof ur.Name?n:a.let("data",n,!0);c(u),s!==void 0&&(e.propertyName=s)}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]}}Yr.extendSubschemaData=kO;function xO(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:o,createErrors:n,allErrors:i}){o!==void 0&&(e.compositeRule=o),n!==void 0&&(e.createErrors=n),i!==void 0&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r}Yr.extendSubschemaMode=xO});var Js=w((CG,Vw)=>{"use strict";Vw.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=r.length)return!1;for(n=o;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),o=i.length,o!==Object.keys(r).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[n]))return!1;for(n=o;n--!==0;){var s=i[n];if(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r}});var Ww=w((DG,Fw)=>{"use strict";var Xr=Fw.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var o=typeof r=="function"?r:r.pre||function(){},n=r.post||function(){};Ol(t,o,n,e,"",e)};Xr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Xr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Xr.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Xr.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 Ol(e,t,r,o,n,i,s,a,c,u){if(o&&typeof o=="object"&&!Array.isArray(o)){t(o,n,i,s,a,c,u);for(var l in o){var d=o[l];if(Array.isArray(d)){if(l in Xr.arrayKeywords)for(var h=0;h<d.length;h++)Ol(e,t,r,d[h],n+"/"+l+"/"+h,i,n,l,o,h)}else if(l in Xr.propsKeywords){if(d&&typeof d=="object")for(var m in d)Ol(e,t,r,d[m],n+"/"+l+"/"+SO(m),i,n,l,o,m)}else(l in Xr.keywords||e.allKeys&&!(l in Xr.skipKeywords))&&Ol(e,t,r,d,n+"/"+l,i,n,l,o)}r(o,n,i,s,a,c,u)}}function SO(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var Qs=w(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.getSchemaRefs=bt.resolveUrl=bt.normalizeId=bt._getFullPath=bt.getFullPath=bt.inlineRef=void 0;var TO=pe(),PO=Js(),zO=Ww(),EO=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function IO(e,t=!0){return typeof e=="boolean"?!0:t===!0?!lh(e):t?Gw(e)<=t:!1}bt.inlineRef=IO;var NO=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function lh(e){for(let t in e){if(NO.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(lh)||typeof r=="object"&&lh(r))return!0}return!1}function Gw(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!EO.has(r)&&(typeof e[r]=="object"&&(0,TO.eachItem)(e[r],o=>t+=Gw(o)),t===1/0))return 1/0}return t}function Kw(e,t="",r){r!==!1&&(t=Uo(t));let o=e.parse(t);return Bw(e,o)}bt.getFullPath=Kw;function Bw(e,t){return e.serialize(t).split("#")[0]+"#"}bt._getFullPath=Bw;var OO=/#\/?$/;function Uo(e){return e?e.replace(OO,""):""}bt.normalizeId=Uo;function RO(e,t,r){return r=Uo(r),e.resolve(t,r)}bt.resolveUrl=RO;var jO=/^[a-z_][-a-z0-9._]*$/i;function AO(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:o}=this.opts,n=Uo(e[r]||t),i={"":n},s=Kw(o,n,!1),a={},c=new Set;return zO(e,{allKeys:!0},(d,h,m,p)=>{if(p===void 0)return;let f=s+h,_=i[p];typeof d[r]=="string"&&(_=y.call(this,d[r])),$.call(this,d.$anchor),$.call(this,d.$dynamicAnchor),i[h]=_;function y(k){let N=this.opts.uriResolver.resolve;if(k=Uo(_?N(_,k):k),c.has(k))throw l(k);c.add(k);let P=this.refs[k];return typeof P=="string"&&(P=this.refs[P]),typeof P=="object"?u(d,P.schema,k):k!==Uo(f)&&(k[0]==="#"?(u(d,a[k],k),a[k]=d):this.refs[k]=f),k}function $(k){if(typeof k=="string"){if(!jO.test(k))throw new Error(`invalid anchor "${k}"`);y.call(this,`#${k}`)}}}),a;function u(d,h,m){if(h!==void 0&&!PO(d,h))throw l(m)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}bt.getSchemaRefs=AO});var ea=w(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.getData=en.KeywordCxt=en.validateFunctionCode=void 0;var Xw=zw(),Hw=Hs(),ph=nh(),Rl=Hs(),CO=Aw(),Xs=Uw(),dh=Zw(),L=oe(),K=zr(),DO=Qs(),Er=pe(),Ys=Bs();function qO(e){if(r$(e)&&(n$(e),t$(e))){LO(e);return}e$(e,()=>(0,Xw.topBoolOrEmptySchema)(e))}en.validateFunctionCode=qO;function e$({gen:e,validateName:t,schema:r,schemaEnv:o,opts:n},i){n.code.es5?e.func(t,(0,L._)`${K.default.data}, ${K.default.valCxt}`,o.$async,()=>{e.code((0,L._)`"use strict"; ${Jw(r,n)}`),UO(e,n),e.code(i)}):e.func(t,(0,L._)`${K.default.data}, ${MO(n)}`,o.$async,()=>e.code(Jw(r,n)).code(i))}function MO(e){return(0,L._)`{${K.default.instancePath}="", ${K.default.parentData}, ${K.default.parentDataProperty}, ${K.default.rootData}=${K.default.data}${e.dynamicRef?(0,L._)`, ${K.default.dynamicAnchors}={}`:L.nil}}={}`}function UO(e,t){e.if(K.default.valCxt,()=>{e.var(K.default.instancePath,(0,L._)`${K.default.valCxt}.${K.default.instancePath}`),e.var(K.default.parentData,(0,L._)`${K.default.valCxt}.${K.default.parentData}`),e.var(K.default.parentDataProperty,(0,L._)`${K.default.valCxt}.${K.default.parentDataProperty}`),e.var(K.default.rootData,(0,L._)`${K.default.valCxt}.${K.default.rootData}`),t.dynamicRef&&e.var(K.default.dynamicAnchors,(0,L._)`${K.default.valCxt}.${K.default.dynamicAnchors}`)},()=>{e.var(K.default.instancePath,(0,L._)`""`),e.var(K.default.parentData,(0,L._)`undefined`),e.var(K.default.parentDataProperty,(0,L._)`undefined`),e.var(K.default.rootData,K.default.data),t.dynamicRef&&e.var(K.default.dynamicAnchors,(0,L._)`{}`)})}function LO(e){let{schema:t,opts:r,gen:o}=e;e$(e,()=>{r.$comment&&t.$comment&&i$(e),GO(e),o.let(K.default.vErrors,null),o.let(K.default.errors,0),r.unevaluated&&ZO(e),o$(e),HO(e)})}function ZO(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,L._)`${r}.evaluated`),t.if((0,L._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,L._)`${e.evaluated}.props`,(0,L._)`undefined`)),t.if((0,L._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,L._)`${e.evaluated}.items`,(0,L._)`undefined`))}function Jw(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,L._)`/*# sourceURL=${r} */`:L.nil}function VO(e,t){if(r$(e)&&(n$(e),t$(e))){FO(e,t);return}(0,Xw.boolOrEmptySchema)(e,t)}function t$({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function r$(e){return typeof e.schema!="boolean"}function FO(e,t){let{schema:r,gen:o,opts:n}=e;n.$comment&&r.$comment&&i$(e),KO(e),BO(e);let i=o.const("_errs",K.default.errors);o$(e,i),o.var(t,(0,L._)`${i} === ${K.default.errors}`)}function n$(e){(0,Er.checkUnknownRules)(e),WO(e)}function o$(e,t){if(e.opts.jtd)return Qw(e,[],!1,t);let r=(0,Hw.getSchemaTypes)(e.schema),o=(0,Hw.coerceAndCheckDataType)(e,r);Qw(e,r,!o,t)}function WO(e){let{schema:t,errSchemaPath:r,opts:o,self:n}=e;t.$ref&&o.ignoreKeywordsWithRef&&(0,Er.schemaHasRulesButRef)(t,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function GO(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Er.checkStrictMode)(e,"default is ignored in the schema root")}function KO(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,DO.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function BO(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function i$({gen:e,schemaEnv:t,schema:r,errSchemaPath:o,opts:n}){let i=r.$comment;if(n.$comment===!0)e.code((0,L._)`${K.default.self}.logger.log(${i})`);else if(typeof n.$comment=="function"){let s=(0,L.str)`${o}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,L._)`${K.default.self}.opts.$comment(${i}, ${s}, ${a}.schema)`)}}function HO(e){let{gen:t,schemaEnv:r,validateName:o,ValidationError:n,opts:i}=e;r.$async?t.if((0,L._)`${K.default.errors} === 0`,()=>t.return(K.default.data),()=>t.throw((0,L._)`new ${n}(${K.default.vErrors})`)):(t.assign((0,L._)`${o}.errors`,K.default.vErrors),i.unevaluated&&JO(e),t.return((0,L._)`${K.default.errors} === 0`))}function JO({gen:e,evaluated:t,props:r,items:o}){r instanceof L.Name&&e.assign((0,L._)`${t}.props`,r),o instanceof L.Name&&e.assign((0,L._)`${t}.items`,o)}function Qw(e,t,r,o){let{gen:n,schema:i,data:s,allErrors:a,opts:c,self:u}=e,{RULES:l}=u;if(i.$ref&&(c.ignoreKeywordsWithRef||!(0,Er.schemaHasRulesButRef)(i,l))){n.block(()=>a$(e,"$ref",l.all.$ref.definition));return}c.jtd||QO(e,t),n.block(()=>{for(let h of l.rules)d(h);d(l.post)});function d(h){(0,ph.shouldUseGroup)(i,h)&&(h.type?(n.if((0,Rl.checkDataType)(h.type,s,c.strictNumbers)),Yw(e,h),t.length===1&&t[0]===h.type&&r&&(n.else(),(0,Rl.reportTypeError)(e)),n.endIf()):Yw(e,h),a||n.if((0,L._)`${K.default.errors} === ${o||0}`))}}function Yw(e,t){let{gen:r,schema:o,opts:{useDefaults:n}}=e;n&&(0,CO.assignDefaults)(e,t.type),r.block(()=>{for(let i of t.rules)(0,ph.shouldUseRule)(o,i)&&a$(e,i.keyword,i.definition,t.type)})}function QO(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(YO(e,t),e.opts.allowUnionTypes||XO(e,t),eR(e,e.dataTypes))}function YO(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{s$(e.dataTypes,r)||fh(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),rR(e,t)}}function XO(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&fh(e,"use allowUnionTypes to allow union type keyword")}function eR(e,t){let r=e.self.RULES.all;for(let o in r){let n=r[o];if(typeof n=="object"&&(0,ph.shouldUseRule)(e.schema,n)){let{type:i}=n.definition;i.length&&!i.some(s=>tR(t,s))&&fh(e,`missing type "${i.join(",")}" for keyword "${o}"`)}}}function tR(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function s$(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function rR(e,t){let r=[];for(let o of e.dataTypes)s$(t,o)?r.push(o):t.includes("integer")&&o==="number"&&r.push("integer");e.dataTypes=r}function fh(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,Er.checkStrictMode)(e,t,e.opts.strictTypes)}var jl=class{constructor(t,r,o){if((0,Xs.validateKeywordUsage)(t,r,o),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=o,this.data=t.data,this.schema=t.schema[o],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Er.schemaRefOrVal)(t,this.schema,o,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",c$(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Xs.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${o} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",K.default.errors))}result(t,r,o){this.failResult((0,L.not)(t),r,o)}failResult(t,r,o){this.gen.if(t),o?o():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,L.not)(t),void 0,r)}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:r}=this;this.fail((0,L._)`${r} !== undefined && (${(0,L.or)(this.invalid$data(),t)})`)}error(t,r,o){if(r){this.setParams(r),this._error(t,o),this.setParams({});return}this._error(t,o)}_error(t,r){(t?Ys.reportExtraError:Ys.reportError)(this,this.def.error,r)}$dataError(){(0,Ys.reportError)(this,this.def.$dataError||Ys.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Ys.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,o=L.nil){this.gen.block(()=>{this.check$data(t,o),r()})}check$data(t=L.nil,r=L.nil){if(!this.$data)return;let{gen:o,schemaCode:n,schemaType:i,def:s}=this;o.if((0,L.or)((0,L._)`${n} === undefined`,r)),t!==L.nil&&o.assign(t,!0),(i.length||s.validateSchema)&&(o.elseIf(this.invalid$data()),this.$dataError(),t!==L.nil&&o.assign(t,!1)),o.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:o,def:n,it:i}=this;return(0,L.or)(s(),a());function s(){if(o.length){if(!(r instanceof L.Name))throw new Error("ajv implementation error");let c=Array.isArray(o)?o:[o];return(0,L._)`${(0,Rl.checkDataTypes)(c,r,i.opts.strictNumbers,Rl.DataType.Wrong)}`}return L.nil}function a(){if(n.validateSchema){let c=t.scopeValue("validate$data",{ref:n.validateSchema});return(0,L._)`!${c}(${r})`}return L.nil}}subschema(t,r){let o=(0,dh.getSubschema)(this.it,t);(0,dh.extendSubschemaData)(o,this.it,t),(0,dh.extendSubschemaMode)(o,t);let n={...this.it,...o,items:void 0,props:void 0};return VO(n,r),n}mergeEvaluated(t,r){let{it:o,gen:n}=this;o.opts.unevaluated&&(o.props!==!0&&t.props!==void 0&&(o.props=Er.mergeEvaluated.props(n,t.props,o.props,r)),o.items!==!0&&t.items!==void 0&&(o.items=Er.mergeEvaluated.items(n,t.items,o.items,r)))}mergeValidEvaluated(t,r){let{it:o,gen:n}=this;if(o.opts.unevaluated&&(o.props!==!0||o.items!==!0))return n.if(r,()=>this.mergeEvaluated(t,L.Name)),!0}};en.KeywordCxt=jl;function a$(e,t,r,o){let n=new jl(e,r,t);"code"in r?r.code(n,o):n.$data&&r.validate?(0,Xs.funcKeywordCode)(n,r):"macro"in r?(0,Xs.macroKeywordCode)(n,r):(r.compile||r.validate)&&(0,Xs.funcKeywordCode)(n,r)}var nR=/^\/(?:[^~]|~0|~1)*$/,oR=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function c$(e,{dataLevel:t,dataNames:r,dataPathArr:o}){let n,i;if(e==="")return K.default.rootData;if(e[0]==="/"){if(!nR.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);n=e,i=K.default.rootData}else{let u=oR.exec(e);if(!u)throw new Error(`Invalid JSON-pointer: ${e}`);let l=+u[1];if(n=u[2],n==="#"){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=r[t-l],!n)return i}let s=i,a=n.split("/");for(let u of a)u&&(i=(0,L._)`${i}${(0,L.getProperty)((0,Er.unescapeJsonPointer)(u))}`,s=(0,L._)`${s} && ${i}`);return s;function c(u,l){return`Cannot access ${u} ${l} levels up, current level is ${t}`}}en.getData=c$});var Al=w(hh=>{"use strict";Object.defineProperty(hh,"__esModule",{value:!0});var mh=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};hh.default=mh});var ta=w(vh=>{"use strict";Object.defineProperty(vh,"__esModule",{value:!0});var gh=Qs(),_h=class extends Error{constructor(t,r,o,n){super(n||`can't resolve reference ${o} from id ${r}`),this.missingRef=(0,gh.resolveUrl)(t,r,o),this.missingSchema=(0,gh.normalizeId)((0,gh.getFullPath)(t,this.missingRef))}};vh.default=_h});var Dl=w(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.resolveSchema=qt.getCompilingSchema=qt.resolveRef=qt.compileSchema=qt.SchemaEnv=void 0;var Qt=oe(),iR=Al(),Rn=zr(),Yt=Qs(),u$=pe(),sR=ea(),Lo=class{constructor(t){var r;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=(r=t.baseId)!==null&&r!==void 0?r:(0,Yt.normalizeId)(o?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=o?.$async,this.refs={}}};qt.SchemaEnv=Lo;function bh(e){let t=l$.call(this,e);if(t)return t;let r=(0,Yt.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:o,lines:n}=this.opts.code,{ownProperties:i}=this.opts,s=new Qt.CodeGen(this.scope,{es5:o,lines:n,ownProperties:i}),a;e.$async&&(a=s.scopeValue("Error",{ref:iR.default,code:(0,Qt._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");e.validateName=c;let u={gen:s,allErrors:this.opts.allErrors,data:Rn.default.data,parentData:Rn.default.parentData,parentDataProperty:Rn.default.parentDataProperty,dataNames:[Rn.default.data],dataPathArr:[Qt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Qt.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:Qt.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Qt._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(e),(0,sR.validateFunctionCode)(u),s.optimize(this.opts.code.optimize);let d=s.toString();l=`${s.scopeRefs(Rn.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,e));let m=new Function(`${Rn.default.self}`,`${Rn.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=e.schema,m.schemaEnv=e,e.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:c,validateCode:d,scopeValues:s._values}),this.opts.unevaluated){let{props:p,items:f}=u;m.evaluated={props:p instanceof Qt.Name?void 0:p,items:f instanceof Qt.Name?void 0:f,dynamicProps:p instanceof Qt.Name,dynamicItems:f instanceof Qt.Name},m.source&&(m.source.evaluated=(0,Qt.stringify)(m.evaluated))}return e.validate=m,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)}}qt.compileSchema=bh;function aR(e,t,r){var o;r=(0,Yt.resolveUrl)(this.opts.uriResolver,t,r);let n=e.refs[r];if(n)return n;let i=lR.call(this,e,r);if(i===void 0){let s=(o=e.localRefs)===null||o===void 0?void 0:o[r],{schemaId:a}=this.opts;s&&(i=new Lo({schema:s,schemaId:a,root:e,baseId:t}))}if(i!==void 0)return e.refs[r]=cR.call(this,i)}qt.resolveRef=aR;function cR(e){return(0,Yt.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:bh.call(this,e)}function l$(e){for(let t of this._compilations)if(uR(t,e))return t}qt.getCompilingSchema=l$;function uR(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function lR(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||Cl.call(this,e,t)}function Cl(e,t){let r=this.opts.uriResolver.parse(t),o=(0,Yt._getFullPath)(this.opts.uriResolver,r),n=(0,Yt.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&o===n)return yh.call(this,r,e);let i=(0,Yt.normalizeId)(o),s=this.refs[i]||this.schemas[i];if(typeof s=="string"){let a=Cl.call(this,e,s);return typeof a?.schema!="object"?void 0:yh.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||bh.call(this,s),i===(0,Yt.normalizeId)(t)){let{schema:a}=s,{schemaId:c}=this.opts,u=a[c];return u&&(n=(0,Yt.resolveUrl)(this.opts.uriResolver,n,u)),new Lo({schema:a,schemaId:c,root:e,baseId:n})}return yh.call(this,r,s)}}qt.resolveSchema=Cl;var dR=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function yh(e,{baseId:t,schema:r,root:o}){var n;if(((n=e.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,u$.unescapeFragment)(a)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!dR.has(a)&&u&&(t=(0,Yt.resolveUrl)(this.opts.uriResolver,t,u))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,u$.schemaHasRulesButRef)(r,this.RULES)){let a=(0,Yt.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=Cl.call(this,o,a)}let{schemaId:s}=this.opts;if(i=i||new Lo({schema:r,schemaId:s,root:o,baseId:t}),i.schema!==i.root.schema)return i}});var d$=w((VG,pR)=>{pR.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 $h=w((FG,h$)=>{"use strict";var fR=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),f$=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 wh(e){let t="",r=0,o=0;for(o=0;o<e.length;o++)if(r=e[o].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[o];break}for(o+=1;o<e.length;o++){if(r=e[o].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[o]}return t}var mR=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function p$(e){return e.length=0,!0}function hR(e,t,r){if(e.length){let o=wh(e);if(o!=="")t.push(o);else return r.error=!0,!1;e.length=0}return!0}function gR(e){let t=0,r={error:!1,address:"",zone:""},o=[],n=[],i=!1,s=!1,a=hR;for(let c=0;c<e.length;c++){let u=e[c];if(!(u==="["||u==="]"))if(u===":"){if(i===!0&&(s=!0),!a(n,o,r))break;if(++t>7){r.error=!0;break}c>0&&e[c-1]===":"&&(i=!0),o.push(":");continue}else if(u==="%"){if(!a(n,o,r))break;a=p$}else{n.push(u);continue}}return n.length&&(a===p$?r.zone=n.join(""):s?o.push(n.join("")):o.push(wh(n))),r.address=o.join(""),r}function m$(e){if(_R(e,":")<2)return{host:e,isIPV6:!1};let t=gR(e);if(t.error)return{host:e,isIPV6:!1};{let r=t.address,o=t.address;return t.zone&&(r+="%"+t.zone,o+="%25"+t.zone),{host:r,isIPV6:!0,escapedHost:o}}}function _R(e,t){let r=0;for(let o=0;o<e.length;o++)e[o]===t&&r++;return r}function vR(e){let t=e,r=[],o=-1,n=0;for(;n=t.length;){if(n===1){if(t===".")break;if(t==="/"){r.push("/");break}else{r.push(t);break}}else if(n===2){if(t[0]==="."){if(t[1]===".")break;if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&(t[1]==="."||t[1]==="/")){r.push("/");break}}else if(n===3&&t==="/.."){r.length!==0&&r.pop(),r.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),r.length!==0&&r.pop();continue}}if((o=t.indexOf("/",1))===-1){r.push(t);break}else r.push(t.slice(0,o)),t=t.slice(o)}return r.join("")}function yR(e,t){let r=t!==!0?escape:unescape;return e.scheme!==void 0&&(e.scheme=r(e.scheme)),e.userinfo!==void 0&&(e.userinfo=r(e.userinfo)),e.host!==void 0&&(e.host=r(e.host)),e.path!==void 0&&(e.path=r(e.path)),e.query!==void 0&&(e.query=r(e.query)),e.fragment!==void 0&&(e.fragment=r(e.fragment)),e}function bR(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let r=unescape(e.host);if(!f$(r)){let o=m$(r);o.isIPV6===!0?r=`[${o.escapedHost}]`:r=e.host}t.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}h$.exports={nonSimpleDomain:mR,recomposeAuthority:bR,normalizeComponentEncoding:yR,removeDotSegments:vR,isIPv4:f$,isUUID:fR,normalizeIPv6:m$,stringArrayToHexStripped:wh}});var b$=w((WG,y$)=>{"use strict";var{isUUID:wR}=$h(),$R=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,kR=["http","https","ws","wss","urn","urn:uuid"];function xR(e){return kR.indexOf(e)!==-1}function kh(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 g$(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function _$(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 SR(e){return e.secure=kh(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function TR(e){if((e.port===(kh(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,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}function PR(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match($R);if(r){let o=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let n=`${o}:${t.nid||e.nid}`,i=xh(n);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function zR(e,t){if(e.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",o=e.nid.toLowerCase(),n=`${r}:${t.nid||o}`,i=xh(n);i&&(e=i.serialize(e,t));let s=e,a=e.nss;return s.path=`${o||t.nid}:${a}`,t.skipEscape=!0,s}function ER(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!wR(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function IR(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var v$={scheme:"http",domainHost:!0,parse:g$,serialize:_$},NR={scheme:"https",domainHost:v$.domainHost,parse:g$,serialize:_$},ql={scheme:"ws",domainHost:!0,parse:SR,serialize:TR},OR={scheme:"wss",domainHost:ql.domainHost,parse:ql.parse,serialize:ql.serialize},RR={scheme:"urn",parse:PR,serialize:zR,skipNormalize:!0},jR={scheme:"urn:uuid",parse:ER,serialize:IR,skipNormalize:!0},Ml={http:v$,https:NR,ws:ql,wss:OR,urn:RR,"urn:uuid":jR};Object.setPrototypeOf(Ml,null);function xh(e){return e&&(Ml[e]||Ml[e.toLowerCase()])||void 0}y$.exports={wsIsSecure:kh,SCHEMES:Ml,isValidSchemeName:xR,getSchemeHandler:xh}});var Th=w((GG,Ll)=>{"use strict";var{normalizeIPv6:AR,removeDotSegments:ra,recomposeAuthority:CR,normalizeComponentEncoding:Ul,isIPv4:DR,nonSimpleDomain:qR}=$h(),{SCHEMES:MR,getSchemeHandler:w$}=b$();function UR(e,t){return typeof e=="string"?e=lr(Ir(e,t),t):typeof e=="object"&&(e=Ir(lr(e,t),t)),e}function LR(e,t,r){let o=r?Object.assign({scheme:"null"},r):{scheme:"null"},n=$$(Ir(e,o),Ir(t,o),o,!0);return o.skipEscape=!0,lr(n,o)}function $$(e,t,r,o){let n={};return o||(e=Ir(lr(e,r),r),t=Ir(lr(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=ra(t.path||""),n.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=ra(t.path||""),n.query=t.query):(t.path?(t.path[0]==="/"?n.path=ra(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?n.path="/"+t.path:e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path,n.path=ra(n.path)),n.query=t.query):(n.path=e.path,t.query!==void 0?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function ZR(e,t,r){return typeof e=="string"?(e=unescape(e),e=lr(Ul(Ir(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=lr(Ul(e,!0),{...r,skipEscape:!0})),typeof t=="string"?(t=unescape(t),t=lr(Ul(Ir(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=lr(Ul(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function lr(e,t){let r={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),n=[],i=w$(o.scheme||r.scheme);i&&i.serialize&&i.serialize(r,o),r.path!==void 0&&(o.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),o.reference!=="suffix"&&r.scheme&&n.push(r.scheme,":");let s=CR(r);if(s!==void 0&&(o.reference!=="suffix"&&n.push("//"),n.push(s),r.path&&r.path[0]!=="/"&&n.push("/")),r.path!==void 0){let a=r.path;!o.absolutePath&&(!i||!i.absolutePath)&&(a=ra(a)),s===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),n.push(a)}return r.query!==void 0&&n.push("?",r.query),r.fragment!==void 0&&n.push("#",r.fragment),n.join("")}var VR=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Ir(e,t){let r=Object.assign({},t),o={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},n=!1;r.reference==="suffix"&&(r.scheme?e=r.scheme+":"+e:e="//"+e);let i=e.match(VR);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(DR(o.host)===!1){let c=AR(o.host);o.host=c.host.toLowerCase(),n=c.isIPV6}else n=!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",r.reference&&r.reference!=="suffix"&&r.reference!==o.reference&&(o.error=o.error||"URI is not a "+r.reference+" reference.");let s=w$(r.scheme||o.scheme);if(!r.unicodeSupport&&(!s||!s.unicodeSupport)&&o.host&&(r.domainHost||s&&s.domainHost)&&n===!1&&qR(o.host))try{o.host=URL.domainToASCII(o.host.toLowerCase())}catch(a){o.error=o.error||"Host's domain name can not be converted to ASCII: "+a}(!s||s&&!s.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)))),s&&s.parse&&s.parse(o,r)}else o.error=o.error||"URI can not be parsed.";return o}var Sh={SCHEMES:MR,normalize:UR,resolve:LR,resolveComponent:$$,equal:ZR,serialize:lr,parse:Ir};Ll.exports=Sh;Ll.exports.default=Sh;Ll.exports.fastUri=Sh});var x$=w(Ph=>{"use strict";Object.defineProperty(Ph,"__esModule",{value:!0});var k$=Th();k$.code='require("ajv/dist/runtime/uri").default';Ph.default=k$});var O$=w(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.CodeGen=Je.Name=Je.nil=Je.stringify=Je.str=Je._=Je.KeywordCxt=void 0;var FR=ea();Object.defineProperty(Je,"KeywordCxt",{enumerable:!0,get:function(){return FR.KeywordCxt}});var Zo=oe();Object.defineProperty(Je,"_",{enumerable:!0,get:function(){return Zo._}});Object.defineProperty(Je,"str",{enumerable:!0,get:function(){return Zo.str}});Object.defineProperty(Je,"stringify",{enumerable:!0,get:function(){return Zo.stringify}});Object.defineProperty(Je,"nil",{enumerable:!0,get:function(){return Zo.nil}});Object.defineProperty(Je,"Name",{enumerable:!0,get:function(){return Zo.Name}});Object.defineProperty(Je,"CodeGen",{enumerable:!0,get:function(){return Zo.CodeGen}});var WR=Al(),E$=ta(),GR=rh(),na=Dl(),KR=oe(),oa=Qs(),Zl=Hs(),Eh=pe(),S$=d$(),BR=x$(),I$=(e,t)=>new RegExp(e,t);I$.code="new RegExp";var HR=["removeAdditional","useDefaults","coerceTypes"],JR=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),QR={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."},YR={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},T$=200;function XR(e){var t,r,o,n,i,s,a,c,u,l,d,h,m,p,f,_,y,$,k,N,P,ze,Me,ir,pn;let Ft=e.strict,fn=(t=e.code)===null||t===void 0?void 0:t.optimize,pi=fn===!0||fn===void 0?1:fn||0,fi=(o=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&o!==void 0?o:I$,Vd=(n=e.uriResolver)!==null&&n!==void 0?n:BR.default;return{strictSchema:(s=(i=e.strictSchema)!==null&&i!==void 0?i:Ft)!==null&&s!==void 0?s:!0,strictNumbers:(c=(a=e.strictNumbers)!==null&&a!==void 0?a:Ft)!==null&&c!==void 0?c:!0,strictTypes:(l=(u=e.strictTypes)!==null&&u!==void 0?u:Ft)!==null&&l!==void 0?l:"log",strictTuples:(h=(d=e.strictTuples)!==null&&d!==void 0?d:Ft)!==null&&h!==void 0?h:"log",strictRequired:(p=(m=e.strictRequired)!==null&&m!==void 0?m:Ft)!==null&&p!==void 0?p:!1,code:e.code?{...e.code,optimize:pi,regExp:fi}:{optimize:pi,regExp:fi},loopRequired:(f=e.loopRequired)!==null&&f!==void 0?f:T$,loopEnum:(_=e.loopEnum)!==null&&_!==void 0?_:T$,meta:(y=e.meta)!==null&&y!==void 0?y:!0,messages:($=e.messages)!==null&&$!==void 0?$:!0,inlineRefs:(k=e.inlineRefs)!==null&&k!==void 0?k:!0,schemaId:(N=e.schemaId)!==null&&N!==void 0?N:"$id",addUsedSchema:(P=e.addUsedSchema)!==null&&P!==void 0?P:!0,validateSchema:(ze=e.validateSchema)!==null&&ze!==void 0?ze:!0,validateFormats:(Me=e.validateFormats)!==null&&Me!==void 0?Me:!0,unicodeRegExp:(ir=e.unicodeRegExp)!==null&&ir!==void 0?ir:!0,int32range:(pn=e.int32range)!==null&&pn!==void 0?pn:!0,uriResolver:Vd}}var ia=class{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...XR(t)};let{es5:r,lines:o}=this.opts.code;this.scope=new KR.ValueScope({scope:{},prefixes:JR,es5:r,lines:o}),this.logger=ij(t.logger);let n=t.validateFormats;t.validateFormats=!1,this.RULES=(0,GR.getRules)(),P$.call(this,QR,t,"NOT SUPPORTED"),P$.call(this,YR,t,"DEPRECATED","warn"),this._metaOpts=nj.call(this),t.formats&&tj.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&rj.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),ej.call(this),t.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:o}=this.opts,n=S$;o==="id"&&(n={...S$},n.id=n.$id,delete n.$id),r&&t&&this.addMetaSchema(n,n[o],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){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 n=o(r);return"$async"in o||(this.errors=o.errors),n}compile(t,r){let o=this._addSchema(t,r);return o.validate||this._compileSchemaEnv(o)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:o}=this.opts;return n.call(this,t,r);async function n(l,d){await i.call(this,l.$schema);let h=this._addSchema(l,d);return h.validate||s.call(this,h)}async function i(l){l&&!this.getSchema(l)&&await n.call(this,{$ref:l},!0)}async function s(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof E$.default))throw d;return a.call(this,d),await c.call(this,d.missingSchema),s.call(this,l)}}function a({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,r)}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,r,o,n=this.opts.validateSchema){if(Array.isArray(t)){for(let s of t)this.addSchema(s,void 0,o,n);return this}let i;if(typeof t=="object"){let{schemaId:s}=this.opts;if(i=t[s],i!==void 0&&typeof i!="string")throw new Error(`schema ${s} must be string`)}return r=(0,oa.normalizeId)(r||i),this._checkUnique(r),this.schemas[r]=this._addSchema(t,o,r,n,!0),this}addMetaSchema(t,r,o=this.opts.validateSchema){return this.addSchema(t,r,!0,o),this}validateSchema(t,r){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 n=this.validate(o,t);if(!n&&r){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw new Error(i)}return n}getSchema(t){let r;for(;typeof(r=z$.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:o}=this.opts,n=new na.SchemaEnv({schema:{},schemaId:o});if(r=na.resolveSchema.call(this,n,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}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 r=z$.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let o=t[this.opts.schemaId];return o&&(o=(0,oa.normalizeId)(o),delete this.schemas[o],delete this.refs[o]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let o;if(typeof t=="string")o=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=o);else if(typeof t=="object"&&r===void 0){if(r=t,o=r.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(aj.call(this,o,r),!r)return(0,Eh.eachItem)(o,i=>zh.call(this,i)),this;uj.call(this,r);let n={...r,type:(0,Zl.getJSONTypes)(r.type),schemaType:(0,Zl.getJSONTypes)(r.schemaType)};return(0,Eh.eachItem)(o,n.type.length===0?i=>zh.call(this,i,n):i=>n.type.forEach(s=>zh.call(this,i,n,s))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let o of r.rules){let n=o.rules.findIndex(i=>i.keyword===t);n>=0&&o.rules.splice(n,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:o="data"}={}){return!t||t.length===0?"No errors":t.map(n=>`${o}${n.instancePath} ${n.message}`).reduce((n,i)=>n+r+i)}$dataMetaSchema(t,r){let o=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let n of r){let i=n.split("/").slice(1),s=t;for(let a of i)s=s[a];for(let a in o){let c=o[a];if(typeof c!="object")continue;let{$data:u}=c.definition,l=s[a];u&&l&&(s[a]=N$(l))}}return t}_removeAllSchemas(t,r){for(let o in t){let n=t[o];(!r||r.test(o))&&(typeof n=="string"?delete t[o]:n&&!n.meta&&(this._cache.delete(n.schema),delete t[o]))}}_addSchema(t,r,o,n=this.opts.validateSchema,i=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof t=="object")s=t[a];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,oa.normalizeId)(s||o);let u=oa.getSchemaRefs.call(this,t,o);return c=new na.SchemaEnv({schema:t,schemaId:a,meta:r,baseId:o,localRefs:u}),this._cache.set(c.schema,c),i&&!o.startsWith("#")&&(o&&this._checkUnique(o),this.refs[o]=c),n&&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):na.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{na.compileSchema.call(this,t)}finally{this.opts=r}}};ia.ValidationError=WR.default;ia.MissingRefError=E$.default;Je.default=ia;function P$(e,t,r,o="error"){for(let n in e){let i=n;i in t&&this.logger[o](`${r}: option ${n}. ${e[i]}`)}}function z$(e){return e=(0,oa.normalizeId)(e),this.schemas[e]||this.refs[e]}function ej(){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 tj(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function rj(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 r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function nj(){let e={...this.opts};for(let t of HR)delete e[t];return e}var oj={log(){},warn(){},error(){}};function ij(e){if(e===!1)return oj;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 sj=/^[a-z_$][a-z0-9_$:-]*$/i;function aj(e,t){let{RULES:r}=this;if((0,Eh.eachItem)(e,o=>{if(r.keywords[o])throw new Error(`Keyword ${o} is already defined`);if(!sj.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 zh(e,t,r){var o;let n=t?.post;if(r&&n)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,s=n?i.post:i.rules.find(({type:c})=>c===r);if(s||(s={type:r,rules:[]},i.rules.push(s)),i.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,Zl.getJSONTypes)(t.type),schemaType:(0,Zl.getJSONTypes)(t.schemaType)}};t.before?cj.call(this,s,a,t.before):s.rules.push(a),i.all[e]=a,(o=t.implements)===null||o===void 0||o.forEach(c=>this.addKeyword(c))}function cj(e,t,r){let o=e.rules.findIndex(n=>n.keyword===r);o>=0?e.rules.splice(o,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function uj(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=N$(t)),e.validateSchema=this.compile(t,!0))}var lj={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function N$(e){return{anyOf:[e,lj]}}});var R$=w(Ih=>{"use strict";Object.defineProperty(Ih,"__esModule",{value:!0});var dj={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Ih.default=dj});var D$=w(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.callRef=jn.getValidate=void 0;var pj=ta(),j$=Dt(),wt=oe(),Vo=zr(),A$=Dl(),Vl=pe(),fj={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:o}=e,{baseId:n,schemaEnv:i,validateName:s,opts:a,self:c}=o,{root:u}=i;if((r==="#"||r==="#/")&&n===u.baseId)return d();let l=A$.resolveRef.call(c,u,n,r);if(l===void 0)throw new pj.default(o.opts.uriResolver,n,r);if(l instanceof A$.SchemaEnv)return h(l);return m(l);function d(){if(i===u)return Fl(e,s,i,i.$async);let p=t.scopeValue("root",{ref:u});return Fl(e,(0,wt._)`${p}.validate`,u,u.$async)}function h(p){let f=C$(e,p);Fl(e,f,p,p.$async)}function m(p){let f=t.scopeValue("schema",a.code.source===!0?{ref:p,code:(0,wt.stringify)(p)}:{ref:p}),_=t.name("valid"),y=e.subschema({schema:p,dataTypes:[],schemaPath:wt.nil,topSchemaRef:f,errSchemaPath:r},_);e.mergeEvaluated(y),e.ok(_)}}};function C$(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,wt._)`${r.scopeValue("wrapper",{ref:t})}.validate`}jn.getValidate=C$;function Fl(e,t,r,o){let{gen:n,it:i}=e,{allErrors:s,schemaEnv:a,opts:c}=i,u=c.passContext?Vo.default.this:wt.nil;o?l():d();function l(){if(!a.$async)throw new Error("async schema referenced by sync schema");let p=n.let("valid");n.try(()=>{n.code((0,wt._)`await ${(0,j$.callValidateCode)(e,t,u)}`),m(t),s||n.assign(p,!0)},f=>{n.if((0,wt._)`!(${f} instanceof ${i.ValidationError})`,()=>n.throw(f)),h(f),s||n.assign(p,!1)}),e.ok(p)}function d(){e.result((0,j$.callValidateCode)(e,t,u),()=>m(t),()=>h(t))}function h(p){let f=(0,wt._)`${p}.errors`;n.assign(Vo.default.vErrors,(0,wt._)`${Vo.default.vErrors} === null ? ${f} : ${Vo.default.vErrors}.concat(${f})`),n.assign(Vo.default.errors,(0,wt._)`${Vo.default.vErrors}.length`)}function m(p){var f;if(!i.opts.unevaluated)return;let _=(f=r?.validate)===null||f===void 0?void 0:f.evaluated;if(i.props!==!0)if(_&&!_.dynamicProps)_.props!==void 0&&(i.props=Vl.mergeEvaluated.props(n,_.props,i.props));else{let y=n.var("props",(0,wt._)`${p}.evaluated.props`);i.props=Vl.mergeEvaluated.props(n,y,i.props,wt.Name)}if(i.items!==!0)if(_&&!_.dynamicItems)_.items!==void 0&&(i.items=Vl.mergeEvaluated.items(n,_.items,i.items));else{let y=n.var("items",(0,wt._)`${p}.evaluated.items`);i.items=Vl.mergeEvaluated.items(n,y,i.items,wt.Name)}}}jn.callRef=Fl;jn.default=fj});var q$=w(Nh=>{"use strict";Object.defineProperty(Nh,"__esModule",{value:!0});var mj=R$(),hj=D$(),gj=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",mj.default,hj.default];Nh.default=gj});var M$=w(Oh=>{"use strict";Object.defineProperty(Oh,"__esModule",{value:!0});var Wl=oe(),tn=Wl.operators,Gl={maximum:{okStr:"<=",ok:tn.LTE,fail:tn.GT},minimum:{okStr:">=",ok:tn.GTE,fail:tn.LT},exclusiveMaximum:{okStr:"<",ok:tn.LT,fail:tn.GTE},exclusiveMinimum:{okStr:">",ok:tn.GT,fail:tn.LTE}},_j={message:({keyword:e,schemaCode:t})=>(0,Wl.str)`must be ${Gl[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Wl._)`{comparison: ${Gl[e].okStr}, limit: ${t}}`},vj={keyword:Object.keys(Gl),type:"number",schemaType:"number",$data:!0,error:_j,code(e){let{keyword:t,data:r,schemaCode:o}=e;e.fail$data((0,Wl._)`${r} ${Gl[t].fail} ${o} || isNaN(${r})`)}};Oh.default=vj});var U$=w(Rh=>{"use strict";Object.defineProperty(Rh,"__esModule",{value:!0});var sa=oe(),yj={message:({schemaCode:e})=>(0,sa.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,sa._)`{multipleOf: ${e}}`},bj={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:yj,code(e){let{gen:t,data:r,schemaCode:o,it:n}=e,i=n.opts.multipleOfPrecision,s=t.let("res"),a=i?(0,sa._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${i}`:(0,sa._)`${s} !== parseInt(${s})`;e.fail$data((0,sa._)`(${o} === 0 || (${s} = ${r}/${o}, ${a}))`)}};Rh.default=bj});var Z$=w(jh=>{"use strict";Object.defineProperty(jh,"__esModule",{value:!0});function L$(e){let t=e.length,r=0,o=0,n;for(;o<t;)r++,n=e.charCodeAt(o++),n>=55296&&n<=56319&&o<t&&(n=e.charCodeAt(o),(n&64512)===56320&&o++);return r}jh.default=L$;L$.code='require("ajv/dist/runtime/ucs2length").default'});var V$=w(Ah=>{"use strict";Object.defineProperty(Ah,"__esModule",{value:!0});var An=oe(),wj=pe(),$j=Z$(),kj={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,An.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,An._)`{limit: ${e}}`},xj={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:kj,code(e){let{keyword:t,data:r,schemaCode:o,it:n}=e,i=t==="maxLength"?An.operators.GT:An.operators.LT,s=n.opts.unicode===!1?(0,An._)`${r}.length`:(0,An._)`${(0,wj.useFunc)(e.gen,$j.default)}(${r})`;e.fail$data((0,An._)`${s} ${i} ${o}`)}};Ah.default=xj});var F$=w(Ch=>{"use strict";Object.defineProperty(Ch,"__esModule",{value:!0});var Sj=Dt(),Tj=pe(),Fo=oe(),Pj={message:({schemaCode:e})=>(0,Fo.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Fo._)`{pattern: ${e}}`},zj={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Pj,code(e){let{gen:t,data:r,$data:o,schema:n,schemaCode:i,it:s}=e,a=s.opts.unicodeRegExp?"u":"";if(o){let{regExp:c}=s.opts.code,u=c.code==="new RegExp"?(0,Fo._)`new RegExp`:(0,Tj.useFunc)(t,c),l=t.let("valid");t.try(()=>t.assign(l,(0,Fo._)`${u}(${i}, ${a}).test(${r})`),()=>t.assign(l,!1)),e.fail$data((0,Fo._)`!${l}`)}else{let c=(0,Sj.usePattern)(e,n);e.fail$data((0,Fo._)`!${c}.test(${r})`)}}};Ch.default=zj});var W$=w(Dh=>{"use strict";Object.defineProperty(Dh,"__esModule",{value:!0});var aa=oe(),Ej={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,aa.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,aa._)`{limit: ${e}}`},Ij={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:Ej,code(e){let{keyword:t,data:r,schemaCode:o}=e,n=t==="maxProperties"?aa.operators.GT:aa.operators.LT;e.fail$data((0,aa._)`Object.keys(${r}).length ${n} ${o}`)}};Dh.default=Ij});var G$=w(qh=>{"use strict";Object.defineProperty(qh,"__esModule",{value:!0});var ca=Dt(),ua=oe(),Nj=pe(),Oj={message:({params:{missingProperty:e}})=>(0,ua.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,ua._)`{missingProperty: ${e}}`},Rj={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Oj,code(e){let{gen:t,schema:r,schemaCode:o,data:n,$data:i,it:s}=e,{opts:a}=s;if(!i&&r.length===0)return;let c=r.length>=a.loopRequired;if(s.allErrors?u():l(),a.strictRequired){let m=e.parentSchema.properties,{definedProperties:p}=e.it;for(let f of r)if(m?.[f]===void 0&&!p.has(f)){let _=s.schemaEnv.baseId+s.errSchemaPath,y=`required property "${f}" is not defined at "${_}" (strictRequired)`;(0,Nj.checkStrictMode)(s,y,s.opts.strictRequired)}}function u(){if(c||i)e.block$data(ua.nil,d);else for(let m of r)(0,ca.checkReportMissingProp)(e,m)}function l(){let m=t.let("missing");if(c||i){let p=t.let("valid",!0);e.block$data(p,()=>h(m,p)),e.ok(p)}else t.if((0,ca.checkMissingProp)(e,r,m)),(0,ca.reportMissingProp)(e,m),t.else()}function d(){t.forOf("prop",o,m=>{e.setParams({missingProperty:m}),t.if((0,ca.noPropertyInData)(t,n,m,a.ownProperties),()=>e.error())})}function h(m,p){e.setParams({missingProperty:m}),t.forOf(m,o,()=>{t.assign(p,(0,ca.propertyInData)(t,n,m,a.ownProperties)),t.if((0,ua.not)(p),()=>{e.error(),t.break()})},ua.nil)}}};qh.default=Rj});var K$=w(Mh=>{"use strict";Object.defineProperty(Mh,"__esModule",{value:!0});var la=oe(),jj={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,la.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,la._)`{limit: ${e}}`},Aj={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:jj,code(e){let{keyword:t,data:r,schemaCode:o}=e,n=t==="maxItems"?la.operators.GT:la.operators.LT;e.fail$data((0,la._)`${r}.length ${n} ${o}`)}};Mh.default=Aj});var Kl=w(Uh=>{"use strict";Object.defineProperty(Uh,"__esModule",{value:!0});var B$=Js();B$.code='require("ajv/dist/runtime/equal").default';Uh.default=B$});var H$=w(Zh=>{"use strict";Object.defineProperty(Zh,"__esModule",{value:!0});var Lh=Hs(),Qe=oe(),Cj=pe(),Dj=Kl(),qj={message:({params:{i:e,j:t}})=>(0,Qe.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Qe._)`{i: ${e}, j: ${t}}`},Mj={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:qj,code(e){let{gen:t,data:r,$data:o,schema:n,parentSchema:i,schemaCode:s,it:a}=e;if(!o&&!n)return;let c=t.let("valid"),u=i.items?(0,Lh.getSchemaTypes)(i.items):[];e.block$data(c,l,(0,Qe._)`${s} === false`),e.ok(c);function l(){let p=t.let("i",(0,Qe._)`${r}.length`),f=t.let("j");e.setParams({i:p,j:f}),t.assign(c,!0),t.if((0,Qe._)`${p} > 1`,()=>(d()?h:m)(p,f))}function d(){return u.length>0&&!u.some(p=>p==="object"||p==="array")}function h(p,f){let _=t.name("item"),y=(0,Lh.checkDataTypes)(u,_,a.opts.strictNumbers,Lh.DataType.Wrong),$=t.const("indices",(0,Qe._)`{}`);t.for((0,Qe._)`;${p}--;`,()=>{t.let(_,(0,Qe._)`${r}[${p}]`),t.if(y,(0,Qe._)`continue`),u.length>1&&t.if((0,Qe._)`typeof ${_} == "string"`,(0,Qe._)`${_} += "_"`),t.if((0,Qe._)`typeof ${$}[${_}] == "number"`,()=>{t.assign(f,(0,Qe._)`${$}[${_}]`),e.error(),t.assign(c,!1).break()}).code((0,Qe._)`${$}[${_}] = ${p}`)})}function m(p,f){let _=(0,Cj.useFunc)(t,Dj.default),y=t.name("outer");t.label(y).for((0,Qe._)`;${p}--;`,()=>t.for((0,Qe._)`${f} = ${p}; ${f}--;`,()=>t.if((0,Qe._)`${_}(${r}[${p}], ${r}[${f}])`,()=>{e.error(),t.assign(c,!1).break(y)})))}}};Zh.default=Mj});var J$=w(Fh=>{"use strict";Object.defineProperty(Fh,"__esModule",{value:!0});var Vh=oe(),Uj=pe(),Lj=Kl(),Zj={message:"must be equal to constant",params:({schemaCode:e})=>(0,Vh._)`{allowedValue: ${e}}`},Vj={keyword:"const",$data:!0,error:Zj,code(e){let{gen:t,data:r,$data:o,schemaCode:n,schema:i}=e;o||i&&typeof i=="object"?e.fail$data((0,Vh._)`!${(0,Uj.useFunc)(t,Lj.default)}(${r}, ${n})`):e.fail((0,Vh._)`${i} !== ${r}`)}};Fh.default=Vj});var Q$=w(Wh=>{"use strict";Object.defineProperty(Wh,"__esModule",{value:!0});var da=oe(),Fj=pe(),Wj=Kl(),Gj={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,da._)`{allowedValues: ${e}}`},Kj={keyword:"enum",schemaType:"array",$data:!0,error:Gj,code(e){let{gen:t,data:r,$data:o,schema:n,schemaCode:i,it:s}=e;if(!o&&n.length===0)throw new Error("enum must have non-empty array");let a=n.length>=s.opts.loopEnum,c,u=()=>c??(c=(0,Fj.useFunc)(t,Wj.default)),l;if(a||o)l=t.let("valid"),e.block$data(l,d);else{if(!Array.isArray(n))throw new Error("ajv implementation error");let m=t.const("vSchema",i);l=(0,da.or)(...n.map((p,f)=>h(m,f)))}e.pass(l);function d(){t.assign(l,!1),t.forOf("v",i,m=>t.if((0,da._)`${u()}(${r}, ${m})`,()=>t.assign(l,!0).break()))}function h(m,p){let f=n[p];return typeof f=="object"&&f!==null?(0,da._)`${u()}(${r}, ${m}[${p}])`:(0,da._)`${r} === ${f}`}}};Wh.default=Kj});var Y$=w(Gh=>{"use strict";Object.defineProperty(Gh,"__esModule",{value:!0});var Bj=M$(),Hj=U$(),Jj=V$(),Qj=F$(),Yj=W$(),Xj=G$(),eA=K$(),tA=H$(),rA=J$(),nA=Q$(),oA=[Bj.default,Hj.default,Jj.default,Qj.default,Yj.default,Xj.default,eA.default,tA.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},rA.default,nA.default];Gh.default=oA});var Bh=w(pa=>{"use strict";Object.defineProperty(pa,"__esModule",{value:!0});pa.validateAdditionalItems=void 0;var Cn=oe(),Kh=pe(),iA={message:({params:{len:e}})=>(0,Cn.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Cn._)`{limit: ${e}}`},sA={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:iA,code(e){let{parentSchema:t,it:r}=e,{items:o}=t;if(!Array.isArray(o)){(0,Kh.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}X$(e,o)}};function X$(e,t){let{gen:r,schema:o,data:n,keyword:i,it:s}=e;s.items=!0;let a=r.const("len",(0,Cn._)`${n}.length`);if(o===!1)e.setParams({len:t.length}),e.pass((0,Cn._)`${a} <= ${t.length}`);else if(typeof o=="object"&&!(0,Kh.alwaysValidSchema)(s,o)){let u=r.var("valid",(0,Cn._)`${a} <= ${t.length}`);r.if((0,Cn.not)(u),()=>c(u)),e.ok(u)}function c(u){r.forRange("i",t.length,a,l=>{e.subschema({keyword:i,dataProp:l,dataPropType:Kh.Type.Num},u),s.allErrors||r.if((0,Cn.not)(u),()=>r.break())})}}pa.validateAdditionalItems=X$;pa.default=sA});var Hh=w(fa=>{"use strict";Object.defineProperty(fa,"__esModule",{value:!0});fa.validateTuple=void 0;var ek=oe(),Bl=pe(),aA=Dt(),cA={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return tk(e,"additionalItems",t);r.items=!0,!(0,Bl.alwaysValidSchema)(r,t)&&e.ok((0,aA.validateArray)(e))}};function tk(e,t,r=e.schema){let{gen:o,parentSchema:n,data:i,keyword:s,it:a}=e;l(n),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=Bl.mergeEvaluated.items(o,r.length,a.items));let c=o.name("valid"),u=o.const("len",(0,ek._)`${i}.length`);r.forEach((d,h)=>{(0,Bl.alwaysValidSchema)(a,d)||(o.if((0,ek._)`${u} > ${h}`,()=>e.subschema({keyword:s,schemaProp:h,dataProp:h},c)),e.ok(c))});function l(d){let{opts:h,errSchemaPath:m}=a,p=r.length,f=p===d.minItems&&(p===d.maxItems||d[t]===!1);if(h.strictTuples&&!f){let _=`"${s}" is ${p}-tuple, but minItems or maxItems/${t} are not specified or different at path "${m}"`;(0,Bl.checkStrictMode)(a,_,h.strictTuples)}}}fa.validateTuple=tk;fa.default=cA});var rk=w(Jh=>{"use strict";Object.defineProperty(Jh,"__esModule",{value:!0});var uA=Hh(),lA={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,uA.validateTuple)(e,"items")};Jh.default=lA});var ok=w(Qh=>{"use strict";Object.defineProperty(Qh,"__esModule",{value:!0});var nk=oe(),dA=pe(),pA=Dt(),fA=Bh(),mA={message:({params:{len:e}})=>(0,nk.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,nk._)`{limit: ${e}}`},hA={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:mA,code(e){let{schema:t,parentSchema:r,it:o}=e,{prefixItems:n}=r;o.items=!0,!(0,dA.alwaysValidSchema)(o,t)&&(n?(0,fA.validateAdditionalItems)(e,n):e.ok((0,pA.validateArray)(e)))}};Qh.default=hA});var ik=w(Yh=>{"use strict";Object.defineProperty(Yh,"__esModule",{value:!0});var Mt=oe(),Hl=pe(),gA={message:({params:{min:e,max:t}})=>t===void 0?(0,Mt.str)`must contain at least ${e} valid item(s)`:(0,Mt.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,Mt._)`{minContains: ${e}}`:(0,Mt._)`{minContains: ${e}, maxContains: ${t}}`},_A={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:gA,code(e){let{gen:t,schema:r,parentSchema:o,data:n,it:i}=e,s,a,{minContains:c,maxContains:u}=o;i.opts.next?(s=c===void 0?1:c,a=u):s=1;let l=t.const("len",(0,Mt._)`${n}.length`);if(e.setParams({min:s,max:a}),a===void 0&&s===0){(0,Hl.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,Hl.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Hl.alwaysValidSchema)(i,r)){let f=(0,Mt._)`${l} >= ${s}`;a!==void 0&&(f=(0,Mt._)`${f} && ${l} <= ${a}`),e.pass(f);return}i.items=!0;let d=t.name("valid");a===void 0&&s===1?m(d,()=>t.if(d,()=>t.break())):s===0?(t.let(d,!0),a!==void 0&&t.if((0,Mt._)`${n}.length > 0`,h)):(t.let(d,!1),h()),e.result(d,()=>e.reset());function h(){let f=t.name("_valid"),_=t.let("count",0);m(f,()=>t.if(f,()=>p(_)))}function m(f,_){t.forRange("i",0,l,y=>{e.subschema({keyword:"contains",dataProp:y,dataPropType:Hl.Type.Num,compositeRule:!0},f),_()})}function p(f){t.code((0,Mt._)`${f}++`),a===void 0?t.if((0,Mt._)`${f} >= ${s}`,()=>t.assign(d,!0).break()):(t.if((0,Mt._)`${f} > ${a}`,()=>t.assign(d,!1).break()),s===1?t.assign(d,!0):t.if((0,Mt._)`${f} >= ${s}`,()=>t.assign(d,!0)))}}};Yh.default=_A});var ck=w(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.validateSchemaDeps=dr.validatePropertyDeps=dr.error=void 0;var Xh=oe(),vA=pe(),ma=Dt();dr.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let o=t===1?"property":"properties";return(0,Xh.str)`must have ${o} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:o}})=>(0,Xh._)`{property: ${e},
7
7
  missingProperty: ${o},
8
8
  depsCount: ${t},
9
- deps: ${r}}`};var mA={keyword:"dependencies",type:"object",schemaType:"object",error:dr.error,code(e){let[t,r]=hA(e);ik(e,t),sk(e,r)}};function hA({schema:e}){let t={},r={};for(let o in e){if(o==="__proto__")continue;let n=Array.isArray(e[o])?t:r;n[o]=e[o]}return[t,r]}function ik(e,t=e.schema){let{gen:r,data:o,it:n}=e;if(Object.keys(t).length===0)return;let i=r.let("missing");for(let s in t){let a=t[s];if(a.length===0)continue;let c=(0,pa.propertyInData)(r,o,s,n.opts.ownProperties);e.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),n.allErrors?r.if(c,()=>{for(let u of a)(0,pa.checkReportMissingProp)(e,u)}):(r.if((0,Yh._)`${c} && (${(0,pa.checkMissingProp)(e,a,i)})`),(0,pa.reportMissingProp)(e,i),r.else())}}dr.validatePropertyDeps=ik;function sk(e,t=e.schema){let{gen:r,data:o,keyword:n,it:i}=e,s=r.name("valid");for(let a in t)(0,fA.alwaysValidSchema)(i,t[a])||(r.if((0,pa.propertyInData)(r,o,a,i.opts.ownProperties),()=>{let c=e.subschema({keyword:n,schemaProp:a},s);e.mergeValidEvaluated(c,s)},()=>r.var(s,!0)),e.ok(s))}dr.validateSchemaDeps=sk;dr.default=mA});var uk=w(Xh=>{"use strict";Object.defineProperty(Xh,"__esModule",{value:!0});var ck=oe(),gA=he(),_A={message:"property name must be valid",params:({params:e})=>(0,ck._)`{propertyName: ${e.propertyName}}`},vA={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:_A,code(e){let{gen:t,schema:r,data:o,it:n}=e;if((0,gA.alwaysValidSchema)(n,r))return;let i=t.name("valid");t.forIn("key",o,s=>{e.setParams({propertyName:s}),e.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},i),t.if((0,ck.not)(i),()=>{e.error(!0),n.allErrors||t.break()})}),e.ok(i)}};Xh.default=vA});var tg=w(eg=>{"use strict";Object.defineProperty(eg,"__esModule",{value:!0});var Bl=Ct(),Xt=oe(),yA=zr(),Jl=he(),bA={message:"must NOT have additional properties",params:({params:e})=>(0,Xt._)`{additionalProperty: ${e.additionalProperty}}`},wA={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:bA,code(e){let{gen:t,schema:r,parentSchema:o,data:n,errsCount:i,it:s}=e;if(!i)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=s;if(s.props=!0,c.removeAdditional!=="all"&&(0,Jl.alwaysValidSchema)(s,r))return;let u=(0,Bl.allSchemaProperties)(o.properties),l=(0,Bl.allSchemaProperties)(o.patternProperties);d(),e.ok((0,Xt._)`${i} === ${yA.default.errors}`);function d(){t.forIn("key",n,_=>{!u.length&&!l.length?p(_):t.if(h(_),()=>p(_))})}function h(_){let y;if(u.length>8){let $=(0,Jl.schemaRefOrVal)(s,o.properties,"properties");y=(0,Bl.isOwnProperty)(t,$,_)}else u.length?y=(0,Xt.or)(...u.map($=>(0,Xt._)`${_} === ${$}`)):y=Xt.nil;return l.length&&(y=(0,Xt.or)(y,...l.map($=>(0,Xt._)`${(0,Bl.usePattern)(e,$)}.test(${_})`))),(0,Xt.not)(y)}function m(_){t.code((0,Xt._)`delete ${n}[${_}]`)}function p(_){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(_);return}if(r===!1){e.setParams({additionalProperty:_}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,Jl.alwaysValidSchema)(s,r)){let y=t.name("valid");c.removeAdditional==="failing"?(f(_,y,!1),t.if((0,Xt.not)(y),()=>{e.reset(),m(_)})):(f(_,y),a||t.if((0,Xt.not)(y),()=>t.break()))}}function f(_,y,$){let k={keyword:"additionalProperties",dataProp:_,dataPropType:Jl.Type.Str};$===!1&&Object.assign(k,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(k,y)}}};eg.default=wA});var pk=w(ng=>{"use strict";Object.defineProperty(ng,"__esModule",{value:!0});var $A=Ys(),lk=Ct(),rg=he(),dk=tg(),kA={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:o,data:n,it:i}=e;i.opts.removeAdditional==="all"&&o.additionalProperties===void 0&&dk.default.code(new $A.KeywordCxt(i,dk.default,"additionalProperties"));let s=(0,lk.allSchemaProperties)(r);for(let d of s)i.definedProperties.add(d);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=rg.mergeEvaluated.props(t,(0,rg.toHash)(s),i.props));let a=s.filter(d=>!(0,rg.alwaysValidSchema)(i,r[d]));if(a.length===0)return;let c=t.name("valid");for(let d of a)u(d)?l(d):(t.if((0,lk.propertyInData)(t,n,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&&r[d].default!==void 0}function l(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};ng.default=kA});var gk=w(og=>{"use strict";Object.defineProperty(og,"__esModule",{value:!0});var fk=Ct(),Ql=oe(),mk=he(),hk=he(),xA={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:o,parentSchema:n,it:i}=e,{opts:s}=i,a=(0,fk.allSchemaProperties)(r),c=a.filter(f=>(0,mk.alwaysValidSchema)(i,r[f]));if(a.length===0||c.length===a.length&&(!i.opts.unevaluated||i.props===!0))return;let u=s.strictSchema&&!s.allowMatchingProperties&&n.properties,l=t.name("valid");i.props!==!0&&!(i.props instanceof Ql.Name)&&(i.props=(0,hk.evaluatedPropsToName)(t,i.props));let{props:d}=i;h();function h(){for(let f of a)u&&m(f),i.allErrors?p(f):(t.var(l,!0),p(f),t.if(l))}function m(f){for(let _ in u)new RegExp(f).test(_)&&(0,mk.checkStrictMode)(i,`property ${_} matches pattern ${f} (use allowMatchingProperties)`)}function p(f){t.forIn("key",o,_=>{t.if((0,Ql._)`${(0,fk.usePattern)(e,f)}.test(${_})`,()=>{let y=c.includes(f);y||e.subschema({keyword:"patternProperties",schemaProp:f,dataProp:_,dataPropType:hk.Type.Str},l),i.opts.unevaluated&&d!==!0?t.assign((0,Ql._)`${d}[${_}]`,!0):!y&&!i.allErrors&&t.if((0,Ql.not)(l),()=>t.break())})})}}};og.default=xA});var _k=w(ig=>{"use strict";Object.defineProperty(ig,"__esModule",{value:!0});var SA=he(),TA={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:o}=e;if((0,SA.alwaysValidSchema)(o,r)){e.fail();return}let n=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),e.failResult(n,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};ig.default=TA});var vk=w(sg=>{"use strict";Object.defineProperty(sg,"__esModule",{value:!0});var PA=Ct(),zA={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:PA.validateUnion,error:{message:"must match a schema in anyOf"}};sg.default=zA});var yk=w(ag=>{"use strict";Object.defineProperty(ag,"__esModule",{value:!0});var Yl=oe(),IA=he(),EA={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Yl._)`{passingSchemas: ${e.passing}}`},NA={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:EA,code(e){let{gen:t,schema:r,parentSchema:o,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&o.discriminator)return;let i=r,s=t.let("valid",!1),a=t.let("passing",null),c=t.name("_valid");e.setParams({passing:a}),t.block(u),e.result(s,()=>e.reset(),()=>e.error(!0));function u(){i.forEach((l,d)=>{let h;(0,IA.alwaysValidSchema)(n,l)?t.var(c,!0):h=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,Yl._)`${c} && ${s}`).assign(s,!1).assign(a,(0,Yl._)`[${a}, ${d}]`).else(),t.if(c,()=>{t.assign(s,!0),t.assign(a,d),h&&e.mergeEvaluated(h,Yl.Name)})})}}};ag.default=NA});var bk=w(cg=>{"use strict";Object.defineProperty(cg,"__esModule",{value:!0});var OA=he(),RA={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let n=t.name("valid");r.forEach((i,s)=>{if((0,OA.alwaysValidSchema)(o,i))return;let a=e.subschema({keyword:"allOf",schemaProp:s},n);e.ok(n),e.mergeEvaluated(a)})}};cg.default=RA});var kk=w(ug=>{"use strict";Object.defineProperty(ug,"__esModule",{value:!0});var Xl=oe(),$k=he(),jA={message:({params:e})=>(0,Xl.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Xl._)`{failingKeyword: ${e.ifClause}}`},AA={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:jA,code(e){let{gen:t,parentSchema:r,it:o}=e;r.then===void 0&&r.else===void 0&&(0,$k.checkStrictMode)(o,'"if" without "then" and "else" is ignored');let n=wk(o,"then"),i=wk(o,"else");if(!n&&!i)return;let s=t.let("valid",!0),a=t.name("_valid");if(c(),e.reset(),n&&i){let l=t.let("ifClause");e.setParams({ifClause:l}),t.if(a,u("then",l),u("else",l))}else n?t.if(a,u("then")):t.if((0,Xl.not)(a),u("else"));e.pass(s,()=>e.error(!0));function c(){let l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(l)}function u(l,d){return()=>{let h=e.subschema({keyword:l},a);t.assign(s,a),e.mergeValidEvaluated(h,s),d?t.assign(d,(0,Xl._)`${l}`):e.setParams({ifClause:l})}}}};function wk(e,t){let r=e.schema[t];return r!==void 0&&!(0,$k.alwaysValidSchema)(e,r)}ug.default=AA});var xk=w(lg=>{"use strict";Object.defineProperty(lg,"__esModule",{value:!0});var DA=he(),CA={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,DA.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};lg.default=CA});var Sk=w(dg=>{"use strict";Object.defineProperty(dg,"__esModule",{value:!0});var qA=Kh(),MA=tk(),UA=Hh(),LA=nk(),ZA=ok(),VA=ak(),FA=uk(),WA=tg(),GA=pk(),KA=gk(),HA=_k(),BA=vk(),JA=yk(),QA=bk(),YA=kk(),XA=xk();function e1(e=!1){let t=[HA.default,BA.default,JA.default,QA.default,YA.default,XA.default,FA.default,WA.default,VA.default,GA.default,KA.default];return e?t.push(MA.default,LA.default):t.push(qA.default,UA.default),t.push(ZA.default),t}dg.default=e1});var Tk=w(pg=>{"use strict";Object.defineProperty(pg,"__esModule",{value:!0});var Le=oe(),t1={message:({schemaCode:e})=>(0,Le.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Le._)`{format: ${e}}`},r1={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:t1,code(e,t){let{gen:r,data:o,$data:n,schema:i,schemaCode:s,it:a}=e,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=a;if(!c.validateFormats)return;n?h():m();function h(){let p=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),f=r.const("fDef",(0,Le._)`${p}[${s}]`),_=r.let("fType"),y=r.let("format");r.if((0,Le._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>r.assign(_,(0,Le._)`${f}.type || "string"`).assign(y,(0,Le._)`${f}.validate`),()=>r.assign(_,(0,Le._)`"string"`).assign(y,f)),e.fail$data((0,Le.or)($(),k()));function $(){return c.strictSchema===!1?Le.nil:(0,Le._)`${s} && !${y}`}function k(){let I=l.$async?(0,Le._)`(${f}.async ? await ${y}(${o}) : ${y}(${o}))`:(0,Le._)`${y}(${o})`,P=(0,Le._)`(typeof ${y} == "function" ? ${I} : ${y}.test(${o}))`;return(0,Le._)`${y} && ${y} !== true && ${_} === ${t} && !${P}`}}function m(){let p=d.formats[i];if(!p){$();return}if(p===!0)return;let[f,_,y]=k(p);f===t&&e.pass(I());function $(){if(c.strictSchema===!1){d.logger.warn(P());return}throw new Error(P());function P(){return`unknown format "${i}" ignored in schema at path "${u}"`}}function k(P){let ze=P instanceof RegExp?(0,Le.regexpCode)(P):c.code.formats?(0,Le._)`${c.code.formats}${(0,Le.getProperty)(i)}`:void 0,Me=r.scopeValue("formats",{key:i,ref:P,code:ze});return typeof P=="object"&&!(P instanceof RegExp)?[P.type||"string",P.validate,(0,Le._)`${Me}.validate`]:["string",P,Me]}function I(){if(typeof p=="object"&&!(p instanceof RegExp)&&p.async){if(!l.$async)throw new Error("async format in sync schema");return(0,Le._)`await ${y}(${o})`}return typeof _=="function"?(0,Le._)`${y}(${o})`:(0,Le._)`${y}.test(${o})`}}}};pg.default=r1});var Pk=w(fg=>{"use strict";Object.defineProperty(fg,"__esModule",{value:!0});var n1=Tk(),o1=[n1.default];fg.default=o1});var zk=w(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});Fo.contentVocabulary=Fo.metadataVocabulary=void 0;Fo.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Fo.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Ek=w(mg=>{"use strict";Object.defineProperty(mg,"__esModule",{value:!0});var i1=C$(),s1=Q$(),a1=Sk(),c1=Pk(),Ik=zk(),u1=[i1.default,s1.default,(0,a1.default)(),c1.default,Ik.metadataVocabulary,Ik.contentVocabulary];mg.default=u1});var Ok=w(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});ed.DiscrError=void 0;var Nk;(function(e){e.Tag="tag",e.Mapping="mapping"})(Nk||(ed.DiscrError=Nk={}))});var jk=w(gg=>{"use strict";Object.defineProperty(gg,"__esModule",{value:!0});var Wo=oe(),hg=Ok(),Rk=Al(),l1=Xs(),d1=he(),p1={message:({params:{discrError:e,tagName:t}})=>e===hg.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Wo._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},f1={keyword:"discriminator",type:"object",schemaType:"object",error:p1,code(e){let{gen:t,data:r,schema:o,parentSchema:n,it:i}=e,{oneOf:s}=n;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=o.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(o.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),u=t.const("tag",(0,Wo._)`${r}${(0,Wo.getProperty)(a)}`);t.if((0,Wo._)`typeof ${u} == "string"`,()=>l(),()=>e.error(!1,{discrError:hg.DiscrError.Tag,tag:u,tagName:a})),e.ok(c);function l(){let m=h();t.if(!1);for(let p in m)t.elseIf((0,Wo._)`${u} === ${p}`),t.assign(c,d(m[p]));t.else(),e.error(!1,{discrError:hg.DiscrError.Mapping,tag:u,tagName:a}),t.endIf()}function d(m){let p=t.name("valid"),f=e.subschema({keyword:"oneOf",schemaProp:m},p);return e.mergeEvaluated(f,Wo.Name),p}function h(){var m;let p={},f=y(n),_=!0;for(let I=0;I<s.length;I++){let P=s[I];if(P?.$ref&&!(0,d1.schemaHasRulesButRef)(P,i.self.RULES)){let Me=P.$ref;if(P=Rk.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,Me),P instanceof Rk.SchemaEnv&&(P=P.schema),P===void 0)throw new l1.default(i.opts.uriResolver,i.baseId,Me)}let ze=(m=P?.properties)===null||m===void 0?void 0:m[a];if(typeof ze!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);_=_&&(f||y(P)),$(ze,I)}if(!_)throw new Error(`discriminator: "${a}" must be required`);return p;function y({required:I}){return Array.isArray(I)&&I.includes(a)}function $(I,P){if(I.const)k(I.const,P);else if(I.enum)for(let ze of I.enum)k(ze,P);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function k(I,P){if(typeof I!="string"||I in p)throw new Error(`discriminator: "${a}" values must be unique strings`);p[I]=P}}}};gg.default=f1});var Ak=w((xK,m1)=>{m1.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 Ck=w((je,_g)=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.MissingRefError=je.ValidationError=je.CodeGen=je.Name=je.nil=je.stringify=je.str=je._=je.KeywordCxt=je.Ajv=void 0;var h1=N$(),g1=Ek(),_1=jk(),Dk=Ak(),v1=["/properties"],td="http://json-schema.org/draft-07/schema",Go=class extends h1.default{_addVocabularies(){super._addVocabularies(),g1.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(_1.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(Dk,v1):Dk;this.addMetaSchema(t,td,!1),this.refs["http://json-schema.org/schema"]=td}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(td)?td:void 0)}};je.Ajv=Go;_g.exports=je=Go;_g.exports.Ajv=Go;Object.defineProperty(je,"__esModule",{value:!0});je.default=Go;var y1=Ys();Object.defineProperty(je,"KeywordCxt",{enumerable:!0,get:function(){return y1.KeywordCxt}});var Ko=oe();Object.defineProperty(je,"_",{enumerable:!0,get:function(){return Ko._}});Object.defineProperty(je,"str",{enumerable:!0,get:function(){return Ko.str}});Object.defineProperty(je,"stringify",{enumerable:!0,get:function(){return Ko.stringify}});Object.defineProperty(je,"nil",{enumerable:!0,get:function(){return Ko.nil}});Object.defineProperty(je,"Name",{enumerable:!0,get:function(){return Ko.Name}});Object.defineProperty(je,"CodeGen",{enumerable:!0,get:function(){return Ko.CodeGen}});var b1=Rl();Object.defineProperty(je,"ValidationError",{enumerable:!0,get:function(){return b1.default}});var w1=Xs();Object.defineProperty(je,"MissingRefError",{enumerable:!0,get:function(){return w1.default}})});var Wk=w(fr=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});fr.formatNames=fr.fastFormats=fr.fullFormats=void 0;function pr(e,t){return{validate:e,compare:t}}fr.fullFormats={date:pr(Lk,wg),time:pr(yg(!0),$g),"date-time":pr(qk(!0),Vk),"iso-time":pr(yg(),Zk),"iso-date-time":pr(qk(),Fk),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:P1,"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:j1,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:z1,int32:{type:"number",validate:N1},int64:{type:"number",validate:O1},float:{type:"number",validate:Uk},double:{type:"number",validate:Uk},password:!0,binary:!0};fr.fastFormats={...fr.fullFormats,date:pr(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,wg),time:pr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,$g),"date-time":pr(/^\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":pr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Zk),"iso-date-time":pr(/^\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,Fk),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};fr.formatNames=Object.keys(fr.fullFormats);function $1(e){return e%4===0&&(e%100!==0||e%400===0)}var k1=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,x1=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Lk(e){let t=k1.exec(e);if(!t)return!1;let r=+t[1],o=+t[2],n=+t[3];return o>=1&&o<=12&&n>=1&&n<=(o===2&&$1(r)?29:x1[o])}function wg(e,t){if(e&&t)return e>t?1:e<t?-1:0}var vg=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function yg(e){return function(r){let o=vg.exec(r);if(!o)return!1;let n=+o[1],i=+o[2],s=+o[3],a=o[4],c=o[5]==="-"?-1:1,u=+(o[6]||0),l=+(o[7]||0);if(u>23||l>59||e&&!a)return!1;if(n<=23&&i<=59&&s<60)return!0;let d=i-l*c,h=n-u*c-(d<0?1:0);return(h===23||h===-1)&&(d===59||d===-1)&&s<61}}function $g(e,t){if(!(e&&t))return;let r=new Date("2020-01-01T"+e).valueOf(),o=new Date("2020-01-01T"+t).valueOf();if(r&&o)return r-o}function Zk(e,t){if(!(e&&t))return;let r=vg.exec(e),o=vg.exec(t);if(r&&o)return e=r[1]+r[2]+r[3],t=o[1]+o[2]+o[3],e>t?1:e<t?-1:0}var bg=/t|\s/i;function qk(e){let t=yg(e);return function(o){let n=o.split(bg);return n.length===2&&Lk(n[0])&&t(n[1])}}function Vk(e,t){if(!(e&&t))return;let r=new Date(e).valueOf(),o=new Date(t).valueOf();if(r&&o)return r-o}function Fk(e,t){if(!(e&&t))return;let[r,o]=e.split(bg),[n,i]=t.split(bg),s=wg(r,n);if(s!==void 0)return s||$g(o,i)}var S1=/\/|:/,T1=/^(?:[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 P1(e){return S1.test(e)&&T1.test(e)}var Mk=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function z1(e){return Mk.lastIndex=0,Mk.test(e)}var I1=-(2**31),E1=2**31-1;function N1(e){return Number.isInteger(e)&&e<=E1&&e>=I1}function O1(e){return Number.isInteger(e)}function Uk(){return!0}var R1=/[^\\]\\Z/;function j1(e){if(R1.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var ha=w(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.regexpCode=ge.getEsmExportName=ge.getProperty=ge.safeStringify=ge.stringify=ge.strConcat=ge.addCodeArg=ge.str=ge._=ge.nil=ge._Code=ge.Name=ge.IDENTIFIER=ge._CodeOrName=void 0;var fa=class{};ge._CodeOrName=fa;ge.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Cn=class extends fa{constructor(t){if(super(),!ge.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}}};ge.Name=Cn;var Ut=class extends fa{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((r,o)=>`${r}${o}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,o)=>(o instanceof Cn&&(r[o.str]=(r[o.str]||0)+1),r),{})}};ge._Code=Ut;ge.nil=new Ut("");function Gk(e,...t){let r=[e[0]],o=0;for(;o<t.length;)xg(r,t[o]),r.push(e[++o]);return new Ut(r)}ge._=Gk;var kg=new Ut("+");function Kk(e,...t){let r=[ma(e[0])],o=0;for(;o<t.length;)r.push(kg),xg(r,t[o]),r.push(kg,ma(e[++o]));return A1(r),new Ut(r)}ge.str=Kk;function xg(e,t){t instanceof Ut?e.push(...t._items):t instanceof Cn?e.push(t):e.push(q1(t))}ge.addCodeArg=xg;function A1(e){let t=1;for(;t<e.length-1;){if(e[t]===kg){let r=D1(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function D1(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof Cn||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 Cn))return`"${e}${t.slice(1)}`}function C1(e,t){return t.emptyStr()?e:e.emptyStr()?t:Kk`${e}${t}`}ge.strConcat=C1;function q1(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:ma(Array.isArray(e)?e.join(","):e)}function M1(e){return new Ut(ma(e))}ge.stringify=M1;function ma(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ge.safeStringify=ma;function U1(e){return typeof e=="string"&&ge.IDENTIFIER.test(e)?new Ut(`.${e}`):Gk`[${e}]`}ge.getProperty=U1;function L1(e){if(typeof e=="string"&&ge.IDENTIFIER.test(e))return new Ut(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}ge.getEsmExportName=L1;function Z1(e){return new Ut(e.toString())}ge.regexpCode=Z1});var Pg=w(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.ValueScope=kt.ValueScopeName=kt.Scope=kt.varKinds=kt.UsedValueState=void 0;var $t=ha(),Sg=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},rd;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(rd||(kt.UsedValueState=rd={}));kt.varKinds={const:new $t.Name("const"),let:new $t.Name("let"),var:new $t.Name("var")};var nd=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof $t.Name?t:this.name(t)}name(t){return new $t.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,o;if(!((o=(r=this._parent)===null||r===void 0?void 0:r._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}}};kt.Scope=nd;var od=class extends $t.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:o}){this.value=t,this.scopePath=(0,$t._)`.${new $t.Name(r)}[${o}]`}};kt.ValueScopeName=od;var V1=(0,$t._)`\n`,Tg=class extends nd{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?V1:$t.nil}}get(){return this._scope}name(t){return new od(t,this._newName(t))}value(t,r){var o;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(t),{prefix:i}=n,s=(o=r.key)!==null&&o!==void 0?o:r.ref,a=this._values[i];if(a){let l=a.get(s);if(l)return l}else a=this._values[i]=new Map;a.set(s,n);let c=this._scope[i]||(this._scope[i]=[]),u=c.length;return c[u]=r.ref,n.setValue(r,{property:i,itemIndex:u}),n}getValue(t,r){let o=this._values[t];if(o)return o.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,o=>{if(o.scopePath===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return(0,$t._)`${t}${o.scopePath}`})}scopeCode(t=this._values,r,o){return this._reduceValues(t,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},r,o)}_reduceValues(t,r,o={},n){let i=$t.nil;for(let s in t){let a=t[s];if(!a)continue;let c=o[s]=o[s]||new Map;a.forEach(u=>{if(c.has(u))return;c.set(u,rd.Started);let l=r(u);if(l){let d=this.opts.es5?kt.varKinds.var:kt.varKinds.const;i=(0,$t._)`${i}${d} ${u} = ${l};${this.opts._n}`}else if(l=n?.(u))i=(0,$t._)`${i}${l}${this.opts._n}`;else throw new Sg(u);c.set(u,rd.Completed)})}return i}};kt.ValueScope=Tg});var X=w(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.or=ne.and=ne.not=ne.CodeGen=ne.operators=ne.varKinds=ne.ValueScopeName=ne.ValueScope=ne.Scope=ne.Name=ne.regexpCode=ne.stringify=ne.getProperty=ne.nil=ne.strConcat=ne.str=ne._=void 0;var de=ha(),er=Pg(),rn=ha();Object.defineProperty(ne,"_",{enumerable:!0,get:function(){return rn._}});Object.defineProperty(ne,"str",{enumerable:!0,get:function(){return rn.str}});Object.defineProperty(ne,"strConcat",{enumerable:!0,get:function(){return rn.strConcat}});Object.defineProperty(ne,"nil",{enumerable:!0,get:function(){return rn.nil}});Object.defineProperty(ne,"getProperty",{enumerable:!0,get:function(){return rn.getProperty}});Object.defineProperty(ne,"stringify",{enumerable:!0,get:function(){return rn.stringify}});Object.defineProperty(ne,"regexpCode",{enumerable:!0,get:function(){return rn.regexpCode}});Object.defineProperty(ne,"Name",{enumerable:!0,get:function(){return rn.Name}});var cd=Pg();Object.defineProperty(ne,"Scope",{enumerable:!0,get:function(){return cd.Scope}});Object.defineProperty(ne,"ValueScope",{enumerable:!0,get:function(){return cd.ValueScope}});Object.defineProperty(ne,"ValueScopeName",{enumerable:!0,get:function(){return cd.ValueScopeName}});Object.defineProperty(ne,"varKinds",{enumerable:!0,get:function(){return cd.varKinds}});ne.operators={GT:new de._Code(">"),GTE:new de._Code(">="),LT:new de._Code("<"),LTE:new de._Code("<="),EQ:new de._Code("==="),NEQ:new de._Code("!=="),NOT:new de._Code("!"),OR:new de._Code("||"),AND:new de._Code("&&"),ADD:new de._Code("+")};var Nr=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},zg=class extends Nr{constructor(t,r,o){super(),this.varKind=t,this.name=r,this.rhs=o}render({es5:t,_n:r}){let o=t?er.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${o} ${this.name}${n};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=Bo(this.rhs,t,r)),this}get names(){return this.rhs instanceof de._CodeOrName?this.rhs.names:{}}},id=class extends Nr{constructor(t,r,o){super(),this.lhs=t,this.rhs=r,this.sideEffects=o}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof de.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=Bo(this.rhs,t,r),this}get names(){let t=this.lhs instanceof de.Name?{}:{...this.lhs.names};return ad(t,this.rhs)}},Ig=class extends id{constructor(t,r,o,n){super(t,o,n),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},Eg=class extends Nr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},Ng=class extends Nr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},Og=class extends Nr{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},Rg=class extends Nr{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=Bo(this.code,t,r),this}get names(){return this.code instanceof de._CodeOrName?this.code.names:{}}},ga=class extends Nr{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,o)=>r+o.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let o=t[r].optimizeNodes();Array.isArray(o)?t.splice(r,1,...o):o?t[r]=o:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:o}=this,n=o.length;for(;n--;){let i=o[n];i.optimizeNames(t,r)||(F1(t,i.names),o.splice(n,1))}return o.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>Un(t,r.names),{})}},Or=class extends ga{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},jg=class extends ga{},Ho=class extends Or{};Ho.kind="else";var qn=class e extends Or{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let o=r.optimizeNodes();r=this.else=Array.isArray(o)?new Ho(o):o}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(Hk(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=Bo(this.condition,t,r),this}get names(){let t=super.names;return ad(t,this.condition),this.else&&Un(t,this.else.names),t}};qn.kind="if";var Mn=class extends Or{};Mn.kind="for";var Ag=class extends Mn{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=Bo(this.iteration,t,r),this}get names(){return Un(super.names,this.iteration.names)}},Dg=class extends Mn{constructor(t,r,o,n){super(),this.varKind=t,this.name=r,this.from=o,this.to=n}render(t){let r=t.es5?er.varKinds.var:this.varKind,{name:o,from:n,to:i}=this;return`for(${r} ${o}=${n}; ${o}<${i}; ${o}++)`+super.render(t)}get names(){let t=ad(super.names,this.from);return ad(t,this.to)}},sd=class extends Mn{constructor(t,r,o,n){super(),this.loop=t,this.varKind=r,this.name=o,this.iterable=n}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=Bo(this.iterable,t,r),this}get names(){return Un(super.names,this.iterable.names)}},_a=class extends Or{constructor(t,r,o){super(),this.name=t,this.args=r,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};_a.kind="func";var va=class extends ga{render(t){return"return "+super.render(t)}};va.kind="return";var Cg=class extends Or{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var o,n;return super.optimizeNames(t,r),(o=this.catch)===null||o===void 0||o.optimizeNames(t,r),(n=this.finally)===null||n===void 0||n.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&Un(t,this.catch.names),this.finally&&Un(t,this.finally.names),t}},ya=class extends Or{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};ya.kind="catch";var ba=class extends Or{render(t){return"finally"+super.render(t)}};ba.kind="finally";var qg=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
10
- `:""},this._extScope=t,this._scope=new er.Scope({parent:t}),this._nodes=[new jg]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let o=this._extScope.value(t,r);return(this._values[o.prefix]||(this._values[o.prefix]=new Set)).add(o),o}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,o,n){let i=this._scope.toName(r);return o!==void 0&&n&&(this._constants[i.str]=o),this._leafNode(new zg(t,i,o)),i}const(t,r,o){return this._def(er.varKinds.const,t,r,o)}let(t,r,o){return this._def(er.varKinds.let,t,r,o)}var(t,r,o){return this._def(er.varKinds.var,t,r,o)}assign(t,r,o){return this._leafNode(new id(t,r,o))}add(t,r){return this._leafNode(new Ig(t,ne.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==de.nil&&this._leafNode(new Rg(t)),this}object(...t){let r=["{"];for(let[o,n]of t)r.length>1&&r.push(","),r.push(o),(o!==n||this.opts.es5)&&(r.push(":"),(0,de.addCodeArg)(r,n));return r.push("}"),new de._Code(r)}if(t,r,o){if(this._blockNode(new qn(t)),r&&o)this.code(r).else().code(o).endIf();else if(r)this.code(r).endIf();else if(o)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new qn(t))}else(){return this._elseNode(new Ho)}endIf(){return this._endBlockNode(qn,Ho)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new Ag(t),r)}forRange(t,r,o,n,i=this.opts.es5?er.varKinds.var:er.varKinds.let){let s=this._scope.toName(t);return this._for(new Dg(i,s,r,o),()=>n(s))}forOf(t,r,o,n=er.varKinds.const){let i=this._scope.toName(t);if(this.opts.es5){let s=r instanceof de.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,de._)`${s}.length`,a=>{this.var(i,(0,de._)`${s}[${a}]`),o(i)})}return this._for(new sd("of",n,i,r),()=>o(i))}forIn(t,r,o,n=this.opts.es5?er.varKinds.var:er.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,de._)`Object.keys(${r})`,o);let i=this._scope.toName(t);return this._for(new sd("in",n,i,r),()=>o(i))}endFor(){return this._endBlockNode(Mn)}label(t){return this._leafNode(new Eg(t))}break(t){return this._leafNode(new Ng(t))}return(t){let r=new va;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(va)}try(t,r,o){if(!r&&!o)throw new Error('CodeGen: "try" without "catch" and "finally"');let n=new Cg;if(this._blockNode(n),this.code(t),r){let i=this.name("e");this._currNode=n.catch=new ya(i),r(i)}return o&&(this._currNode=n.finally=new ba,this.code(o)),this._endBlockNode(ya,ba)}throw(t){return this._leafNode(new Og(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let o=this._nodes.length-r;if(o<0||t!==void 0&&o!==t)throw new Error(`CodeGen: wrong number of nodes: ${o} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=de.nil,o,n){return this._blockNode(new _a(t,r,o)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(_a)}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,r){let o=this._currNode;if(o instanceof t||r&&o instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof qn))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};ne.CodeGen=qg;function Un(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function ad(e,t){return t instanceof de._CodeOrName?Un(e,t.names):e}function Bo(e,t,r){if(e instanceof de.Name)return o(e);if(!n(e))return e;return new de._Code(e._items.reduce((i,s)=>(s instanceof de.Name&&(s=o(s)),s instanceof de._Code?i.push(...s._items):i.push(s),i),[]));function o(i){let s=r[i.str];return s===void 0||t[i.str]!==1?i:(delete t[i.str],s)}function n(i){return i instanceof de._Code&&i._items.some(s=>s instanceof de.Name&&t[s.str]===1&&r[s.str]!==void 0)}}function F1(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function Hk(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,de._)`!${Mg(e)}`}ne.not=Hk;var W1=Bk(ne.operators.AND);function G1(...e){return e.reduce(W1)}ne.and=G1;var K1=Bk(ne.operators.OR);function H1(...e){return e.reduce(K1)}ne.or=H1;function Bk(e){return(t,r)=>t===de.nil?r:r===de.nil?t:(0,de._)`${Mg(t)} ${e} ${Mg(r)}`}function Mg(e){return e instanceof de.Name?e:(0,de._)`(${e})`}});var _e=w(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.checkStrictMode=se.getErrorPath=se.Type=se.useFunc=se.setEvaluated=se.evaluatedPropsToName=se.mergeEvaluated=se.eachItem=se.unescapeJsonPointer=se.escapeJsonPointer=se.escapeFragment=se.unescapeFragment=se.schemaRefOrVal=se.schemaHasRulesButRef=se.schemaHasRules=se.checkUnknownRules=se.alwaysValidSchema=se.toHash=void 0;var Pe=X(),B1=ha();function J1(e){let t={};for(let r of e)t[r]=!0;return t}se.toHash=J1;function Q1(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(Yk(e,t),!Xk(t,e.self.RULES.all))}se.alwaysValidSchema=Q1;function Yk(e,t=e.schema){let{opts:r,self:o}=e;if(!r.strictSchema||typeof t=="boolean")return;let n=o.RULES.keywords;for(let i in t)n[i]||rx(e,`unknown keyword: "${i}"`)}se.checkUnknownRules=Yk;function Xk(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}se.schemaHasRules=Xk;function Y1(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}se.schemaHasRulesButRef=Y1;function X1({topSchemaRef:e,schemaPath:t},r,o,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Pe._)`${r}`}return(0,Pe._)`${e}${t}${(0,Pe.getProperty)(o)}`}se.schemaRefOrVal=X1;function eD(e){return ex(decodeURIComponent(e))}se.unescapeFragment=eD;function tD(e){return encodeURIComponent(Lg(e))}se.escapeFragment=tD;function Lg(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}se.escapeJsonPointer=Lg;function ex(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}se.unescapeJsonPointer=ex;function rD(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}se.eachItem=rD;function Jk({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:o}){return(n,i,s,a)=>{let c=s===void 0?i:s instanceof Pe.Name?(i instanceof Pe.Name?e(n,i,s):t(n,i,s),s):i instanceof Pe.Name?(t(n,s,i),i):r(i,s);return a===Pe.Name&&!(c instanceof Pe.Name)?o(n,c):c}}se.mergeEvaluated={props:Jk({mergeNames:(e,t,r)=>e.if((0,Pe._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,Pe._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,Pe._)`${r} || {}`).code((0,Pe._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,Pe._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,Pe._)`${r} || {}`),Zg(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:tx}),items:Jk({mergeNames:(e,t,r)=>e.if((0,Pe._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,Pe._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,Pe._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,Pe._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function tx(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,Pe._)`{}`);return t!==void 0&&Zg(e,r,t),r}se.evaluatedPropsToName=tx;function Zg(e,t,r){Object.keys(r).forEach(o=>e.assign((0,Pe._)`${t}${(0,Pe.getProperty)(o)}`,!0))}se.setEvaluated=Zg;var Qk={};function nD(e,t){return e.scopeValue("func",{ref:t,code:Qk[t.code]||(Qk[t.code]=new B1._Code(t.code))})}se.useFunc=nD;var Ug;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Ug||(se.Type=Ug={}));function oD(e,t,r){if(e instanceof Pe.Name){let o=t===Ug.Num;return r?o?(0,Pe._)`"[" + ${e} + "]"`:(0,Pe._)`"['" + ${e} + "']"`:o?(0,Pe._)`"/" + ${e}`:(0,Pe._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Pe.getProperty)(e).toString():"/"+Lg(e)}se.getErrorPath=oD;function rx(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}se.checkStrictMode=rx});var Rr=w(Vg=>{"use strict";Object.defineProperty(Vg,"__esModule",{value:!0});var it=X(),iD={data:new it.Name("data"),valCxt:new it.Name("valCxt"),instancePath:new it.Name("instancePath"),parentData:new it.Name("parentData"),parentDataProperty:new it.Name("parentDataProperty"),rootData:new it.Name("rootData"),dynamicAnchors:new it.Name("dynamicAnchors"),vErrors:new it.Name("vErrors"),errors:new it.Name("errors"),this:new it.Name("this"),self:new it.Name("self"),scope:new it.Name("scope"),json:new it.Name("json"),jsonPos:new it.Name("jsonPos"),jsonLen:new it.Name("jsonLen"),jsonPart:new it.Name("jsonPart")};Vg.default=iD});var wa=w(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});st.extendErrors=st.resetErrorsCount=st.reportExtraError=st.reportError=st.keyword$DataError=st.keywordError=void 0;var fe=X(),ud=_e(),mt=Rr();st.keywordError={message:({keyword:e})=>(0,fe.str)`must pass "${e}" keyword validation`};st.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,fe.str)`"${e}" keyword must be ${t} ($data)`:(0,fe.str)`"${e}" keyword is invalid ($data)`};function sD(e,t=st.keywordError,r,o){let{it:n}=e,{gen:i,compositeRule:s,allErrors:a}=n,c=ix(e,t,r);o??(s||a)?nx(i,c):ox(n,(0,fe._)`[${c}]`)}st.reportError=sD;function aD(e,t=st.keywordError,r){let{it:o}=e,{gen:n,compositeRule:i,allErrors:s}=o,a=ix(e,t,r);nx(n,a),i||s||ox(o,mt.default.vErrors)}st.reportExtraError=aD;function cD(e,t){e.assign(mt.default.errors,t),e.if((0,fe._)`${mt.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,fe._)`${mt.default.vErrors}.length`,t),()=>e.assign(mt.default.vErrors,null)))}st.resetErrorsCount=cD;function uD({gen:e,keyword:t,schemaValue:r,data:o,errsCount:n,it:i}){if(n===void 0)throw new Error("ajv implementation error");let s=e.name("err");e.forRange("i",n,mt.default.errors,a=>{e.const(s,(0,fe._)`${mt.default.vErrors}[${a}]`),e.if((0,fe._)`${s}.instancePath === undefined`,()=>e.assign((0,fe._)`${s}.instancePath`,(0,fe.strConcat)(mt.default.instancePath,i.errorPath))),e.assign((0,fe._)`${s}.schemaPath`,(0,fe.str)`${i.errSchemaPath}/${t}`),i.opts.verbose&&(e.assign((0,fe._)`${s}.schema`,r),e.assign((0,fe._)`${s}.data`,o))})}st.extendErrors=uD;function nx(e,t){let r=e.const("err",t);e.if((0,fe._)`${mt.default.vErrors} === null`,()=>e.assign(mt.default.vErrors,(0,fe._)`[${r}]`),(0,fe._)`${mt.default.vErrors}.push(${r})`),e.code((0,fe._)`${mt.default.errors}++`)}function ox(e,t){let{gen:r,validateName:o,schemaEnv:n}=e;n.$async?r.throw((0,fe._)`new ${e.ValidationError}(${t})`):(r.assign((0,fe._)`${o}.errors`,t),r.return(!1))}var Ln={keyword:new fe.Name("keyword"),schemaPath:new fe.Name("schemaPath"),params:new fe.Name("params"),propertyName:new fe.Name("propertyName"),message:new fe.Name("message"),schema:new fe.Name("schema"),parentSchema:new fe.Name("parentSchema")};function ix(e,t,r){let{createErrors:o}=e.it;return o===!1?(0,fe._)`{}`:lD(e,t,r)}function lD(e,t,r={}){let{gen:o,it:n}=e,i=[dD(n,r),pD(e,r)];return fD(e,t,i),o.object(...i)}function dD({errorPath:e},{instancePath:t}){let r=t?(0,fe.str)`${e}${(0,ud.getErrorPath)(t,ud.Type.Str)}`:e;return[mt.default.instancePath,(0,fe.strConcat)(mt.default.instancePath,r)]}function pD({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:o}){let n=o?t:(0,fe.str)`${t}/${e}`;return r&&(n=(0,fe.str)`${n}${(0,ud.getErrorPath)(r,ud.Type.Str)}`),[Ln.schemaPath,n]}function fD(e,{params:t,message:r},o){let{keyword:n,data:i,schemaValue:s,it:a}=e,{opts:c,propertyName:u,topSchemaRef:l,schemaPath:d}=a;o.push([Ln.keyword,n],[Ln.params,typeof t=="function"?t(e):t||(0,fe._)`{}`]),c.messages&&o.push([Ln.message,typeof r=="function"?r(e):r]),c.verbose&&o.push([Ln.schema,s],[Ln.parentSchema,(0,fe._)`${l}${d}`],[mt.default.data,i]),u&&o.push([Ln.propertyName,u])}});var ax=w(Jo=>{"use strict";Object.defineProperty(Jo,"__esModule",{value:!0});Jo.boolOrEmptySchema=Jo.topBoolOrEmptySchema=void 0;var mD=wa(),hD=X(),gD=Rr(),_D={message:"boolean schema is false"};function vD(e){let{gen:t,schema:r,validateName:o}=e;r===!1?sx(e,!1):typeof r=="object"&&r.$async===!0?t.return(gD.default.data):(t.assign((0,hD._)`${o}.errors`,null),t.return(!0))}Jo.topBoolOrEmptySchema=vD;function yD(e,t){let{gen:r,schema:o}=e;o===!1?(r.var(t,!1),sx(e)):r.var(t,!0)}Jo.boolOrEmptySchema=yD;function sx(e,t){let{gen:r,data:o}=e,n={gen:r,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,mD.reportError)(n,_D,void 0,t)}});var Fg=w(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});Qo.getRules=Qo.isJSONType=void 0;var bD=["string","number","integer","boolean","null","object","array"],wD=new Set(bD);function $D(e){return typeof e=="string"&&wD.has(e)}Qo.isJSONType=$D;function kD(){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:{}}}Qo.getRules=kD});var Wg=w(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.shouldUseRule=nn.shouldUseGroup=nn.schemaHasRulesForType=void 0;function xD({schema:e,self:t},r){let o=t.RULES.types[r];return o&&o!==!0&&cx(e,o)}nn.schemaHasRulesForType=xD;function cx(e,t){return t.rules.some(r=>ux(e,r))}nn.shouldUseGroup=cx;function ux(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(o=>e[o]!==void 0))}nn.shouldUseRule=ux});var $a=w(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.reportTypeError=at.checkDataTypes=at.checkDataType=at.coerceAndCheckDataType=at.getJSONTypes=at.getSchemaTypes=at.DataType=void 0;var SD=Fg(),TD=Wg(),PD=wa(),Q=X(),lx=_e(),Yo;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Yo||(at.DataType=Yo={}));function zD(e){let t=dx(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}at.getSchemaTypes=zD;function dx(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(SD.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}at.getJSONTypes=dx;function ID(e,t){let{gen:r,data:o,opts:n}=e,i=ED(t,n.coerceTypes),s=t.length>0&&!(i.length===0&&t.length===1&&(0,TD.schemaHasRulesForType)(e,t[0]));if(s){let a=Kg(t,o,n.strictNumbers,Yo.Wrong);r.if(a,()=>{i.length?ND(e,t,i):Hg(e)})}return s}at.coerceAndCheckDataType=ID;var px=new Set(["string","number","integer","boolean","null"]);function ED(e,t){return t?e.filter(r=>px.has(r)||t==="array"&&r==="array"):[]}function ND(e,t,r){let{gen:o,data:n,opts:i}=e,s=o.let("dataType",(0,Q._)`typeof ${n}`),a=o.let("coerced",(0,Q._)`undefined`);i.coerceTypes==="array"&&o.if((0,Q._)`${s} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>o.assign(n,(0,Q._)`${n}[0]`).assign(s,(0,Q._)`typeof ${n}`).if(Kg(t,n,i.strictNumbers),()=>o.assign(a,n))),o.if((0,Q._)`${a} !== undefined`);for(let u of r)(px.has(u)||u==="array"&&i.coerceTypes==="array")&&c(u);o.else(),Hg(e),o.endIf(),o.if((0,Q._)`${a} !== undefined`,()=>{o.assign(n,a),OD(e,a)});function c(u){switch(u){case"string":o.elseIf((0,Q._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,Q._)`"" + ${n}`).elseIf((0,Q._)`${n} === null`).assign(a,(0,Q._)`""`);return;case"number":o.elseIf((0,Q._)`${s} == "boolean" || ${n} === null
9
+ deps: ${r}}`};var yA={keyword:"dependencies",type:"object",schemaType:"object",error:dr.error,code(e){let[t,r]=bA(e);sk(e,t),ak(e,r)}};function bA({schema:e}){let t={},r={};for(let o in e){if(o==="__proto__")continue;let n=Array.isArray(e[o])?t:r;n[o]=e[o]}return[t,r]}function sk(e,t=e.schema){let{gen:r,data:o,it:n}=e;if(Object.keys(t).length===0)return;let i=r.let("missing");for(let s in t){let a=t[s];if(a.length===0)continue;let c=(0,ma.propertyInData)(r,o,s,n.opts.ownProperties);e.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),n.allErrors?r.if(c,()=>{for(let u of a)(0,ma.checkReportMissingProp)(e,u)}):(r.if((0,Xh._)`${c} && (${(0,ma.checkMissingProp)(e,a,i)})`),(0,ma.reportMissingProp)(e,i),r.else())}}dr.validatePropertyDeps=sk;function ak(e,t=e.schema){let{gen:r,data:o,keyword:n,it:i}=e,s=r.name("valid");for(let a in t)(0,vA.alwaysValidSchema)(i,t[a])||(r.if((0,ma.propertyInData)(r,o,a,i.opts.ownProperties),()=>{let c=e.subschema({keyword:n,schemaProp:a},s);e.mergeValidEvaluated(c,s)},()=>r.var(s,!0)),e.ok(s))}dr.validateSchemaDeps=ak;dr.default=yA});var lk=w(eg=>{"use strict";Object.defineProperty(eg,"__esModule",{value:!0});var uk=oe(),wA=pe(),$A={message:"property name must be valid",params:({params:e})=>(0,uk._)`{propertyName: ${e.propertyName}}`},kA={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:$A,code(e){let{gen:t,schema:r,data:o,it:n}=e;if((0,wA.alwaysValidSchema)(n,r))return;let i=t.name("valid");t.forIn("key",o,s=>{e.setParams({propertyName:s}),e.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},i),t.if((0,uk.not)(i),()=>{e.error(!0),n.allErrors||t.break()})}),e.ok(i)}};eg.default=kA});var rg=w(tg=>{"use strict";Object.defineProperty(tg,"__esModule",{value:!0});var Jl=Dt(),Xt=oe(),xA=zr(),Ql=pe(),SA={message:"must NOT have additional properties",params:({params:e})=>(0,Xt._)`{additionalProperty: ${e.additionalProperty}}`},TA={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:SA,code(e){let{gen:t,schema:r,parentSchema:o,data:n,errsCount:i,it:s}=e;if(!i)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=s;if(s.props=!0,c.removeAdditional!=="all"&&(0,Ql.alwaysValidSchema)(s,r))return;let u=(0,Jl.allSchemaProperties)(o.properties),l=(0,Jl.allSchemaProperties)(o.patternProperties);d(),e.ok((0,Xt._)`${i} === ${xA.default.errors}`);function d(){t.forIn("key",n,_=>{!u.length&&!l.length?p(_):t.if(h(_),()=>p(_))})}function h(_){let y;if(u.length>8){let $=(0,Ql.schemaRefOrVal)(s,o.properties,"properties");y=(0,Jl.isOwnProperty)(t,$,_)}else u.length?y=(0,Xt.or)(...u.map($=>(0,Xt._)`${_} === ${$}`)):y=Xt.nil;return l.length&&(y=(0,Xt.or)(y,...l.map($=>(0,Xt._)`${(0,Jl.usePattern)(e,$)}.test(${_})`))),(0,Xt.not)(y)}function m(_){t.code((0,Xt._)`delete ${n}[${_}]`)}function p(_){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(_);return}if(r===!1){e.setParams({additionalProperty:_}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,Ql.alwaysValidSchema)(s,r)){let y=t.name("valid");c.removeAdditional==="failing"?(f(_,y,!1),t.if((0,Xt.not)(y),()=>{e.reset(),m(_)})):(f(_,y),a||t.if((0,Xt.not)(y),()=>t.break()))}}function f(_,y,$){let k={keyword:"additionalProperties",dataProp:_,dataPropType:Ql.Type.Str};$===!1&&Object.assign(k,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(k,y)}}};tg.default=TA});var fk=w(og=>{"use strict";Object.defineProperty(og,"__esModule",{value:!0});var PA=ea(),dk=Dt(),ng=pe(),pk=rg(),zA={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:o,data:n,it:i}=e;i.opts.removeAdditional==="all"&&o.additionalProperties===void 0&&pk.default.code(new PA.KeywordCxt(i,pk.default,"additionalProperties"));let s=(0,dk.allSchemaProperties)(r);for(let d of s)i.definedProperties.add(d);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=ng.mergeEvaluated.props(t,(0,ng.toHash)(s),i.props));let a=s.filter(d=>!(0,ng.alwaysValidSchema)(i,r[d]));if(a.length===0)return;let c=t.name("valid");for(let d of a)u(d)?l(d):(t.if((0,dk.propertyInData)(t,n,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&&r[d].default!==void 0}function l(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};og.default=zA});var _k=w(ig=>{"use strict";Object.defineProperty(ig,"__esModule",{value:!0});var mk=Dt(),Yl=oe(),hk=pe(),gk=pe(),EA={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:o,parentSchema:n,it:i}=e,{opts:s}=i,a=(0,mk.allSchemaProperties)(r),c=a.filter(f=>(0,hk.alwaysValidSchema)(i,r[f]));if(a.length===0||c.length===a.length&&(!i.opts.unevaluated||i.props===!0))return;let u=s.strictSchema&&!s.allowMatchingProperties&&n.properties,l=t.name("valid");i.props!==!0&&!(i.props instanceof Yl.Name)&&(i.props=(0,gk.evaluatedPropsToName)(t,i.props));let{props:d}=i;h();function h(){for(let f of a)u&&m(f),i.allErrors?p(f):(t.var(l,!0),p(f),t.if(l))}function m(f){for(let _ in u)new RegExp(f).test(_)&&(0,hk.checkStrictMode)(i,`property ${_} matches pattern ${f} (use allowMatchingProperties)`)}function p(f){t.forIn("key",o,_=>{t.if((0,Yl._)`${(0,mk.usePattern)(e,f)}.test(${_})`,()=>{let y=c.includes(f);y||e.subschema({keyword:"patternProperties",schemaProp:f,dataProp:_,dataPropType:gk.Type.Str},l),i.opts.unevaluated&&d!==!0?t.assign((0,Yl._)`${d}[${_}]`,!0):!y&&!i.allErrors&&t.if((0,Yl.not)(l),()=>t.break())})})}}};ig.default=EA});var vk=w(sg=>{"use strict";Object.defineProperty(sg,"__esModule",{value:!0});var IA=pe(),NA={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:o}=e;if((0,IA.alwaysValidSchema)(o,r)){e.fail();return}let n=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),e.failResult(n,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};sg.default=NA});var yk=w(ag=>{"use strict";Object.defineProperty(ag,"__esModule",{value:!0});var OA=Dt(),RA={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:OA.validateUnion,error:{message:"must match a schema in anyOf"}};ag.default=RA});var bk=w(cg=>{"use strict";Object.defineProperty(cg,"__esModule",{value:!0});var Xl=oe(),jA=pe(),AA={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Xl._)`{passingSchemas: ${e.passing}}`},CA={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:AA,code(e){let{gen:t,schema:r,parentSchema:o,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&o.discriminator)return;let i=r,s=t.let("valid",!1),a=t.let("passing",null),c=t.name("_valid");e.setParams({passing:a}),t.block(u),e.result(s,()=>e.reset(),()=>e.error(!0));function u(){i.forEach((l,d)=>{let h;(0,jA.alwaysValidSchema)(n,l)?t.var(c,!0):h=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,Xl._)`${c} && ${s}`).assign(s,!1).assign(a,(0,Xl._)`[${a}, ${d}]`).else(),t.if(c,()=>{t.assign(s,!0),t.assign(a,d),h&&e.mergeEvaluated(h,Xl.Name)})})}}};cg.default=CA});var wk=w(ug=>{"use strict";Object.defineProperty(ug,"__esModule",{value:!0});var DA=pe(),qA={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let n=t.name("valid");r.forEach((i,s)=>{if((0,DA.alwaysValidSchema)(o,i))return;let a=e.subschema({keyword:"allOf",schemaProp:s},n);e.ok(n),e.mergeEvaluated(a)})}};ug.default=qA});var xk=w(lg=>{"use strict";Object.defineProperty(lg,"__esModule",{value:!0});var ed=oe(),kk=pe(),MA={message:({params:e})=>(0,ed.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,ed._)`{failingKeyword: ${e.ifClause}}`},UA={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:MA,code(e){let{gen:t,parentSchema:r,it:o}=e;r.then===void 0&&r.else===void 0&&(0,kk.checkStrictMode)(o,'"if" without "then" and "else" is ignored');let n=$k(o,"then"),i=$k(o,"else");if(!n&&!i)return;let s=t.let("valid",!0),a=t.name("_valid");if(c(),e.reset(),n&&i){let l=t.let("ifClause");e.setParams({ifClause:l}),t.if(a,u("then",l),u("else",l))}else n?t.if(a,u("then")):t.if((0,ed.not)(a),u("else"));e.pass(s,()=>e.error(!0));function c(){let l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(l)}function u(l,d){return()=>{let h=e.subschema({keyword:l},a);t.assign(s,a),e.mergeValidEvaluated(h,s),d?t.assign(d,(0,ed._)`${l}`):e.setParams({ifClause:l})}}}};function $k(e,t){let r=e.schema[t];return r!==void 0&&!(0,kk.alwaysValidSchema)(e,r)}lg.default=UA});var Sk=w(dg=>{"use strict";Object.defineProperty(dg,"__esModule",{value:!0});var LA=pe(),ZA={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,LA.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};dg.default=ZA});var Tk=w(pg=>{"use strict";Object.defineProperty(pg,"__esModule",{value:!0});var VA=Bh(),FA=rk(),WA=Hh(),GA=ok(),KA=ik(),BA=ck(),HA=lk(),JA=rg(),QA=fk(),YA=_k(),XA=vk(),e1=yk(),t1=bk(),r1=wk(),n1=xk(),o1=Sk();function i1(e=!1){let t=[XA.default,e1.default,t1.default,r1.default,n1.default,o1.default,HA.default,JA.default,BA.default,QA.default,YA.default];return e?t.push(FA.default,GA.default):t.push(VA.default,WA.default),t.push(KA.default),t}pg.default=i1});var Pk=w(fg=>{"use strict";Object.defineProperty(fg,"__esModule",{value:!0});var Ze=oe(),s1={message:({schemaCode:e})=>(0,Ze.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Ze._)`{format: ${e}}`},a1={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:s1,code(e,t){let{gen:r,data:o,$data:n,schema:i,schemaCode:s,it:a}=e,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=a;if(!c.validateFormats)return;n?h():m();function h(){let p=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),f=r.const("fDef",(0,Ze._)`${p}[${s}]`),_=r.let("fType"),y=r.let("format");r.if((0,Ze._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>r.assign(_,(0,Ze._)`${f}.type || "string"`).assign(y,(0,Ze._)`${f}.validate`),()=>r.assign(_,(0,Ze._)`"string"`).assign(y,f)),e.fail$data((0,Ze.or)($(),k()));function $(){return c.strictSchema===!1?Ze.nil:(0,Ze._)`${s} && !${y}`}function k(){let N=l.$async?(0,Ze._)`(${f}.async ? await ${y}(${o}) : ${y}(${o}))`:(0,Ze._)`${y}(${o})`,P=(0,Ze._)`(typeof ${y} == "function" ? ${N} : ${y}.test(${o}))`;return(0,Ze._)`${y} && ${y} !== true && ${_} === ${t} && !${P}`}}function m(){let p=d.formats[i];if(!p){$();return}if(p===!0)return;let[f,_,y]=k(p);f===t&&e.pass(N());function $(){if(c.strictSchema===!1){d.logger.warn(P());return}throw new Error(P());function P(){return`unknown format "${i}" ignored in schema at path "${u}"`}}function k(P){let ze=P instanceof RegExp?(0,Ze.regexpCode)(P):c.code.formats?(0,Ze._)`${c.code.formats}${(0,Ze.getProperty)(i)}`:void 0,Me=r.scopeValue("formats",{key:i,ref:P,code:ze});return typeof P=="object"&&!(P instanceof RegExp)?[P.type||"string",P.validate,(0,Ze._)`${Me}.validate`]:["string",P,Me]}function N(){if(typeof p=="object"&&!(p instanceof RegExp)&&p.async){if(!l.$async)throw new Error("async format in sync schema");return(0,Ze._)`await ${y}(${o})`}return typeof _=="function"?(0,Ze._)`${y}(${o})`:(0,Ze._)`${y}.test(${o})`}}}};fg.default=a1});var zk=w(mg=>{"use strict";Object.defineProperty(mg,"__esModule",{value:!0});var c1=Pk(),u1=[c1.default];mg.default=u1});var Ek=w(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.contentVocabulary=Wo.metadataVocabulary=void 0;Wo.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Wo.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Nk=w(hg=>{"use strict";Object.defineProperty(hg,"__esModule",{value:!0});var l1=q$(),d1=Y$(),p1=Tk(),f1=zk(),Ik=Ek(),m1=[l1.default,d1.default,(0,p1.default)(),f1.default,Ik.metadataVocabulary,Ik.contentVocabulary];hg.default=m1});var Rk=w(td=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});td.DiscrError=void 0;var Ok;(function(e){e.Tag="tag",e.Mapping="mapping"})(Ok||(td.DiscrError=Ok={}))});var Ak=w(_g=>{"use strict";Object.defineProperty(_g,"__esModule",{value:!0});var Go=oe(),gg=Rk(),jk=Dl(),h1=ta(),g1=pe(),_1={message:({params:{discrError:e,tagName:t}})=>e===gg.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Go._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},v1={keyword:"discriminator",type:"object",schemaType:"object",error:_1,code(e){let{gen:t,data:r,schema:o,parentSchema:n,it:i}=e,{oneOf:s}=n;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=o.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(o.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),u=t.const("tag",(0,Go._)`${r}${(0,Go.getProperty)(a)}`);t.if((0,Go._)`typeof ${u} == "string"`,()=>l(),()=>e.error(!1,{discrError:gg.DiscrError.Tag,tag:u,tagName:a})),e.ok(c);function l(){let m=h();t.if(!1);for(let p in m)t.elseIf((0,Go._)`${u} === ${p}`),t.assign(c,d(m[p]));t.else(),e.error(!1,{discrError:gg.DiscrError.Mapping,tag:u,tagName:a}),t.endIf()}function d(m){let p=t.name("valid"),f=e.subschema({keyword:"oneOf",schemaProp:m},p);return e.mergeEvaluated(f,Go.Name),p}function h(){var m;let p={},f=y(n),_=!0;for(let N=0;N<s.length;N++){let P=s[N];if(P?.$ref&&!(0,g1.schemaHasRulesButRef)(P,i.self.RULES)){let Me=P.$ref;if(P=jk.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,Me),P instanceof jk.SchemaEnv&&(P=P.schema),P===void 0)throw new h1.default(i.opts.uriResolver,i.baseId,Me)}let ze=(m=P?.properties)===null||m===void 0?void 0:m[a];if(typeof ze!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);_=_&&(f||y(P)),$(ze,N)}if(!_)throw new Error(`discriminator: "${a}" must be required`);return p;function y({required:N}){return Array.isArray(N)&&N.includes(a)}function $(N,P){if(N.const)k(N.const,P);else if(N.enum)for(let ze of N.enum)k(ze,P);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function k(N,P){if(typeof N!="string"||N in p)throw new Error(`discriminator: "${a}" values must be unique strings`);p[N]=P}}}};_g.default=v1});var Ck=w((jK,y1)=>{y1.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 qk=w((je,vg)=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.MissingRefError=je.ValidationError=je.CodeGen=je.Name=je.nil=je.stringify=je.str=je._=je.KeywordCxt=je.Ajv=void 0;var b1=O$(),w1=Nk(),$1=Ak(),Dk=Ck(),k1=["/properties"],rd="http://json-schema.org/draft-07/schema",Ko=class extends b1.default{_addVocabularies(){super._addVocabularies(),w1.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword($1.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(Dk,k1):Dk;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)}};je.Ajv=Ko;vg.exports=je=Ko;vg.exports.Ajv=Ko;Object.defineProperty(je,"__esModule",{value:!0});je.default=Ko;var x1=ea();Object.defineProperty(je,"KeywordCxt",{enumerable:!0,get:function(){return x1.KeywordCxt}});var Bo=oe();Object.defineProperty(je,"_",{enumerable:!0,get:function(){return Bo._}});Object.defineProperty(je,"str",{enumerable:!0,get:function(){return Bo.str}});Object.defineProperty(je,"stringify",{enumerable:!0,get:function(){return Bo.stringify}});Object.defineProperty(je,"nil",{enumerable:!0,get:function(){return Bo.nil}});Object.defineProperty(je,"Name",{enumerable:!0,get:function(){return Bo.Name}});Object.defineProperty(je,"CodeGen",{enumerable:!0,get:function(){return Bo.CodeGen}});var S1=Al();Object.defineProperty(je,"ValidationError",{enumerable:!0,get:function(){return S1.default}});var T1=ta();Object.defineProperty(je,"MissingRefError",{enumerable:!0,get:function(){return T1.default}})});var Gk=w(fr=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});fr.formatNames=fr.fastFormats=fr.fullFormats=void 0;function pr(e,t){return{validate:e,compare:t}}fr.fullFormats={date:pr(Zk,$g),time:pr(bg(!0),kg),"date-time":pr(Mk(!0),Fk),"iso-time":pr(bg(),Vk),"iso-date-time":pr(Mk(),Wk),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:O1,"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:M1,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:R1,int32:{type:"number",validate:C1},int64:{type:"number",validate:D1},float:{type:"number",validate:Lk},double:{type:"number",validate:Lk},password:!0,binary:!0};fr.fastFormats={...fr.fullFormats,date:pr(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,$g),time:pr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,kg),"date-time":pr(/^\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,Fk),"iso-time":pr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Vk),"iso-date-time":pr(/^\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,Wk),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};fr.formatNames=Object.keys(fr.fullFormats);function P1(e){return e%4===0&&(e%100!==0||e%400===0)}var z1=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,E1=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Zk(e){let t=z1.exec(e);if(!t)return!1;let r=+t[1],o=+t[2],n=+t[3];return o>=1&&o<=12&&n>=1&&n<=(o===2&&P1(r)?29:E1[o])}function $g(e,t){if(e&&t)return e>t?1:e<t?-1:0}var yg=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function bg(e){return function(r){let o=yg.exec(r);if(!o)return!1;let n=+o[1],i=+o[2],s=+o[3],a=o[4],c=o[5]==="-"?-1:1,u=+(o[6]||0),l=+(o[7]||0);if(u>23||l>59||e&&!a)return!1;if(n<=23&&i<=59&&s<60)return!0;let d=i-l*c,h=n-u*c-(d<0?1:0);return(h===23||h===-1)&&(d===59||d===-1)&&s<61}}function kg(e,t){if(!(e&&t))return;let r=new Date("2020-01-01T"+e).valueOf(),o=new Date("2020-01-01T"+t).valueOf();if(r&&o)return r-o}function Vk(e,t){if(!(e&&t))return;let r=yg.exec(e),o=yg.exec(t);if(r&&o)return e=r[1]+r[2]+r[3],t=o[1]+o[2]+o[3],e>t?1:e<t?-1:0}var wg=/t|\s/i;function Mk(e){let t=bg(e);return function(o){let n=o.split(wg);return n.length===2&&Zk(n[0])&&t(n[1])}}function Fk(e,t){if(!(e&&t))return;let r=new Date(e).valueOf(),o=new Date(t).valueOf();if(r&&o)return r-o}function Wk(e,t){if(!(e&&t))return;let[r,o]=e.split(wg),[n,i]=t.split(wg),s=$g(r,n);if(s!==void 0)return s||kg(o,i)}var I1=/\/|:/,N1=/^(?:[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 O1(e){return I1.test(e)&&N1.test(e)}var Uk=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function R1(e){return Uk.lastIndex=0,Uk.test(e)}var j1=-(2**31),A1=2**31-1;function C1(e){return Number.isInteger(e)&&e<=A1&&e>=j1}function D1(e){return Number.isInteger(e)}function Lk(){return!0}var q1=/[^\\]\\Z/;function M1(e){if(q1.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var _a=w(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.regexpCode=_e.getEsmExportName=_e.getProperty=_e.safeStringify=_e.stringify=_e.strConcat=_e.addCodeArg=_e.str=_e._=_e.nil=_e._Code=_e.Name=_e.IDENTIFIER=_e._CodeOrName=void 0;var ha=class{};_e._CodeOrName=ha;_e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Dn=class extends ha{constructor(t){if(super(),!_e.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}}};_e.Name=Dn;var Ut=class extends ha{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((r,o)=>`${r}${o}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,o)=>(o instanceof Dn&&(r[o.str]=(r[o.str]||0)+1),r),{})}};_e._Code=Ut;_e.nil=new Ut("");function Kk(e,...t){let r=[e[0]],o=0;for(;o<t.length;)Sg(r,t[o]),r.push(e[++o]);return new Ut(r)}_e._=Kk;var xg=new Ut("+");function Bk(e,...t){let r=[ga(e[0])],o=0;for(;o<t.length;)r.push(xg),Sg(r,t[o]),r.push(xg,ga(e[++o]));return U1(r),new Ut(r)}_e.str=Bk;function Sg(e,t){t instanceof Ut?e.push(...t._items):t instanceof Dn?e.push(t):e.push(V1(t))}_e.addCodeArg=Sg;function U1(e){let t=1;for(;t<e.length-1;){if(e[t]===xg){let r=L1(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function L1(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof Dn||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 Dn))return`"${e}${t.slice(1)}`}function Z1(e,t){return t.emptyStr()?e:e.emptyStr()?t:Bk`${e}${t}`}_e.strConcat=Z1;function V1(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:ga(Array.isArray(e)?e.join(","):e)}function F1(e){return new Ut(ga(e))}_e.stringify=F1;function ga(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}_e.safeStringify=ga;function W1(e){return typeof e=="string"&&_e.IDENTIFIER.test(e)?new Ut(`.${e}`):Kk`[${e}]`}_e.getProperty=W1;function G1(e){if(typeof e=="string"&&_e.IDENTIFIER.test(e))return new Ut(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}_e.getEsmExportName=G1;function K1(e){return new Ut(e.toString())}_e.regexpCode=K1});var zg=w(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.ValueScope=kt.ValueScopeName=kt.Scope=kt.varKinds=kt.UsedValueState=void 0;var $t=_a(),Tg=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},nd;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(nd||(kt.UsedValueState=nd={}));kt.varKinds={const:new $t.Name("const"),let:new $t.Name("let"),var:new $t.Name("var")};var od=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof $t.Name?t:this.name(t)}name(t){return new $t.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,o;if(!((o=(r=this._parent)===null||r===void 0?void 0:r._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}}};kt.Scope=od;var id=class extends $t.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:o}){this.value=t,this.scopePath=(0,$t._)`.${new $t.Name(r)}[${o}]`}};kt.ValueScopeName=id;var B1=(0,$t._)`\n`,Pg=class extends od{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?B1:$t.nil}}get(){return this._scope}name(t){return new id(t,this._newName(t))}value(t,r){var o;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(t),{prefix:i}=n,s=(o=r.key)!==null&&o!==void 0?o:r.ref,a=this._values[i];if(a){let l=a.get(s);if(l)return l}else a=this._values[i]=new Map;a.set(s,n);let c=this._scope[i]||(this._scope[i]=[]),u=c.length;return c[u]=r.ref,n.setValue(r,{property:i,itemIndex:u}),n}getValue(t,r){let o=this._values[t];if(o)return o.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,o=>{if(o.scopePath===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return(0,$t._)`${t}${o.scopePath}`})}scopeCode(t=this._values,r,o){return this._reduceValues(t,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},r,o)}_reduceValues(t,r,o={},n){let i=$t.nil;for(let s in t){let a=t[s];if(!a)continue;let c=o[s]=o[s]||new Map;a.forEach(u=>{if(c.has(u))return;c.set(u,nd.Started);let l=r(u);if(l){let d=this.opts.es5?kt.varKinds.var:kt.varKinds.const;i=(0,$t._)`${i}${d} ${u} = ${l};${this.opts._n}`}else if(l=n?.(u))i=(0,$t._)`${i}${l}${this.opts._n}`;else throw new Tg(u);c.set(u,nd.Completed)})}return i}};kt.ValueScope=Pg});var X=w(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.or=ne.and=ne.not=ne.CodeGen=ne.operators=ne.varKinds=ne.ValueScopeName=ne.ValueScope=ne.Scope=ne.Name=ne.regexpCode=ne.stringify=ne.getProperty=ne.nil=ne.strConcat=ne.str=ne._=void 0;var de=_a(),er=zg(),rn=_a();Object.defineProperty(ne,"_",{enumerable:!0,get:function(){return rn._}});Object.defineProperty(ne,"str",{enumerable:!0,get:function(){return rn.str}});Object.defineProperty(ne,"strConcat",{enumerable:!0,get:function(){return rn.strConcat}});Object.defineProperty(ne,"nil",{enumerable:!0,get:function(){return rn.nil}});Object.defineProperty(ne,"getProperty",{enumerable:!0,get:function(){return rn.getProperty}});Object.defineProperty(ne,"stringify",{enumerable:!0,get:function(){return rn.stringify}});Object.defineProperty(ne,"regexpCode",{enumerable:!0,get:function(){return rn.regexpCode}});Object.defineProperty(ne,"Name",{enumerable:!0,get:function(){return rn.Name}});var ud=zg();Object.defineProperty(ne,"Scope",{enumerable:!0,get:function(){return ud.Scope}});Object.defineProperty(ne,"ValueScope",{enumerable:!0,get:function(){return ud.ValueScope}});Object.defineProperty(ne,"ValueScopeName",{enumerable:!0,get:function(){return ud.ValueScopeName}});Object.defineProperty(ne,"varKinds",{enumerable:!0,get:function(){return ud.varKinds}});ne.operators={GT:new de._Code(">"),GTE:new de._Code(">="),LT:new de._Code("<"),LTE:new de._Code("<="),EQ:new de._Code("==="),NEQ:new de._Code("!=="),NOT:new de._Code("!"),OR:new de._Code("||"),AND:new de._Code("&&"),ADD:new de._Code("+")};var Nr=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},Eg=class extends Nr{constructor(t,r,o){super(),this.varKind=t,this.name=r,this.rhs=o}render({es5:t,_n:r}){let o=t?er.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${o} ${this.name}${n};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=Jo(this.rhs,t,r)),this}get names(){return this.rhs instanceof de._CodeOrName?this.rhs.names:{}}},sd=class extends Nr{constructor(t,r,o){super(),this.lhs=t,this.rhs=r,this.sideEffects=o}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof de.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=Jo(this.rhs,t,r),this}get names(){let t=this.lhs instanceof de.Name?{}:{...this.lhs.names};return cd(t,this.rhs)}},Ig=class extends sd{constructor(t,r,o,n){super(t,o,n),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},Ng=class extends Nr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},Og=class extends Nr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},Rg=class extends Nr{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},jg=class extends Nr{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=Jo(this.code,t,r),this}get names(){return this.code instanceof de._CodeOrName?this.code.names:{}}},va=class extends Nr{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,o)=>r+o.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let o=t[r].optimizeNodes();Array.isArray(o)?t.splice(r,1,...o):o?t[r]=o:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:o}=this,n=o.length;for(;n--;){let i=o[n];i.optimizeNames(t,r)||(H1(t,i.names),o.splice(n,1))}return o.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>Un(t,r.names),{})}},Or=class extends va{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},Ag=class extends va{},Ho=class extends Or{};Ho.kind="else";var qn=class e extends Or{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let o=r.optimizeNodes();r=this.else=Array.isArray(o)?new Ho(o):o}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(Hk(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=Jo(this.condition,t,r),this}get names(){let t=super.names;return cd(t,this.condition),this.else&&Un(t,this.else.names),t}};qn.kind="if";var Mn=class extends Or{};Mn.kind="for";var Cg=class extends Mn{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=Jo(this.iteration,t,r),this}get names(){return Un(super.names,this.iteration.names)}},Dg=class extends Mn{constructor(t,r,o,n){super(),this.varKind=t,this.name=r,this.from=o,this.to=n}render(t){let r=t.es5?er.varKinds.var:this.varKind,{name:o,from:n,to:i}=this;return`for(${r} ${o}=${n}; ${o}<${i}; ${o}++)`+super.render(t)}get names(){let t=cd(super.names,this.from);return cd(t,this.to)}},ad=class extends Mn{constructor(t,r,o,n){super(),this.loop=t,this.varKind=r,this.name=o,this.iterable=n}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=Jo(this.iterable,t,r),this}get names(){return Un(super.names,this.iterable.names)}},ya=class extends Or{constructor(t,r,o){super(),this.name=t,this.args=r,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};ya.kind="func";var ba=class extends va{render(t){return"return "+super.render(t)}};ba.kind="return";var qg=class extends Or{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var o,n;return super.optimizeNames(t,r),(o=this.catch)===null||o===void 0||o.optimizeNames(t,r),(n=this.finally)===null||n===void 0||n.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&Un(t,this.catch.names),this.finally&&Un(t,this.finally.names),t}},wa=class extends Or{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};wa.kind="catch";var $a=class extends Or{render(t){return"finally"+super.render(t)}};$a.kind="finally";var Mg=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
10
+ `:""},this._extScope=t,this._scope=new er.Scope({parent:t}),this._nodes=[new Ag]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let o=this._extScope.value(t,r);return(this._values[o.prefix]||(this._values[o.prefix]=new Set)).add(o),o}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,o,n){let i=this._scope.toName(r);return o!==void 0&&n&&(this._constants[i.str]=o),this._leafNode(new Eg(t,i,o)),i}const(t,r,o){return this._def(er.varKinds.const,t,r,o)}let(t,r,o){return this._def(er.varKinds.let,t,r,o)}var(t,r,o){return this._def(er.varKinds.var,t,r,o)}assign(t,r,o){return this._leafNode(new sd(t,r,o))}add(t,r){return this._leafNode(new Ig(t,ne.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==de.nil&&this._leafNode(new jg(t)),this}object(...t){let r=["{"];for(let[o,n]of t)r.length>1&&r.push(","),r.push(o),(o!==n||this.opts.es5)&&(r.push(":"),(0,de.addCodeArg)(r,n));return r.push("}"),new de._Code(r)}if(t,r,o){if(this._blockNode(new qn(t)),r&&o)this.code(r).else().code(o).endIf();else if(r)this.code(r).endIf();else if(o)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new qn(t))}else(){return this._elseNode(new Ho)}endIf(){return this._endBlockNode(qn,Ho)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new Cg(t),r)}forRange(t,r,o,n,i=this.opts.es5?er.varKinds.var:er.varKinds.let){let s=this._scope.toName(t);return this._for(new Dg(i,s,r,o),()=>n(s))}forOf(t,r,o,n=er.varKinds.const){let i=this._scope.toName(t);if(this.opts.es5){let s=r instanceof de.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,de._)`${s}.length`,a=>{this.var(i,(0,de._)`${s}[${a}]`),o(i)})}return this._for(new ad("of",n,i,r),()=>o(i))}forIn(t,r,o,n=this.opts.es5?er.varKinds.var:er.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,de._)`Object.keys(${r})`,o);let i=this._scope.toName(t);return this._for(new ad("in",n,i,r),()=>o(i))}endFor(){return this._endBlockNode(Mn)}label(t){return this._leafNode(new Ng(t))}break(t){return this._leafNode(new Og(t))}return(t){let r=new ba;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(ba)}try(t,r,o){if(!r&&!o)throw new Error('CodeGen: "try" without "catch" and "finally"');let n=new qg;if(this._blockNode(n),this.code(t),r){let i=this.name("e");this._currNode=n.catch=new wa(i),r(i)}return o&&(this._currNode=n.finally=new $a,this.code(o)),this._endBlockNode(wa,$a)}throw(t){return this._leafNode(new Rg(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let o=this._nodes.length-r;if(o<0||t!==void 0&&o!==t)throw new Error(`CodeGen: wrong number of nodes: ${o} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=de.nil,o,n){return this._blockNode(new ya(t,r,o)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(ya)}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,r){let o=this._currNode;if(o instanceof t||r&&o instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof qn))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};ne.CodeGen=Mg;function Un(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function cd(e,t){return t instanceof de._CodeOrName?Un(e,t.names):e}function Jo(e,t,r){if(e instanceof de.Name)return o(e);if(!n(e))return e;return new de._Code(e._items.reduce((i,s)=>(s instanceof de.Name&&(s=o(s)),s instanceof de._Code?i.push(...s._items):i.push(s),i),[]));function o(i){let s=r[i.str];return s===void 0||t[i.str]!==1?i:(delete t[i.str],s)}function n(i){return i instanceof de._Code&&i._items.some(s=>s instanceof de.Name&&t[s.str]===1&&r[s.str]!==void 0)}}function H1(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function Hk(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,de._)`!${Ug(e)}`}ne.not=Hk;var J1=Jk(ne.operators.AND);function Q1(...e){return e.reduce(J1)}ne.and=Q1;var Y1=Jk(ne.operators.OR);function X1(...e){return e.reduce(Y1)}ne.or=X1;function Jk(e){return(t,r)=>t===de.nil?r:r===de.nil?t:(0,de._)`${Ug(t)} ${e} ${Ug(r)}`}function Ug(e){return e instanceof de.Name?e:(0,de._)`(${e})`}});var me=w(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.checkStrictMode=se.getErrorPath=se.Type=se.useFunc=se.setEvaluated=se.evaluatedPropsToName=se.mergeEvaluated=se.eachItem=se.unescapeJsonPointer=se.escapeJsonPointer=se.escapeFragment=se.unescapeFragment=se.schemaRefOrVal=se.schemaHasRulesButRef=se.schemaHasRules=se.checkUnknownRules=se.alwaysValidSchema=se.toHash=void 0;var Pe=X(),eC=_a();function tC(e){let t={};for(let r of e)t[r]=!0;return t}se.toHash=tC;function rC(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(Xk(e,t),!ex(t,e.self.RULES.all))}se.alwaysValidSchema=rC;function Xk(e,t=e.schema){let{opts:r,self:o}=e;if(!r.strictSchema||typeof t=="boolean")return;let n=o.RULES.keywords;for(let i in t)n[i]||nx(e,`unknown keyword: "${i}"`)}se.checkUnknownRules=Xk;function ex(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}se.schemaHasRules=ex;function nC(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}se.schemaHasRulesButRef=nC;function oC({topSchemaRef:e,schemaPath:t},r,o,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Pe._)`${r}`}return(0,Pe._)`${e}${t}${(0,Pe.getProperty)(o)}`}se.schemaRefOrVal=oC;function iC(e){return tx(decodeURIComponent(e))}se.unescapeFragment=iC;function sC(e){return encodeURIComponent(Zg(e))}se.escapeFragment=sC;function Zg(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}se.escapeJsonPointer=Zg;function tx(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}se.unescapeJsonPointer=tx;function aC(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}se.eachItem=aC;function Qk({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:o}){return(n,i,s,a)=>{let c=s===void 0?i:s instanceof Pe.Name?(i instanceof Pe.Name?e(n,i,s):t(n,i,s),s):i instanceof Pe.Name?(t(n,s,i),i):r(i,s);return a===Pe.Name&&!(c instanceof Pe.Name)?o(n,c):c}}se.mergeEvaluated={props:Qk({mergeNames:(e,t,r)=>e.if((0,Pe._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,Pe._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,Pe._)`${r} || {}`).code((0,Pe._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,Pe._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,Pe._)`${r} || {}`),Vg(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:rx}),items:Qk({mergeNames:(e,t,r)=>e.if((0,Pe._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,Pe._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,Pe._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,Pe._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function rx(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,Pe._)`{}`);return t!==void 0&&Vg(e,r,t),r}se.evaluatedPropsToName=rx;function Vg(e,t,r){Object.keys(r).forEach(o=>e.assign((0,Pe._)`${t}${(0,Pe.getProperty)(o)}`,!0))}se.setEvaluated=Vg;var Yk={};function cC(e,t){return e.scopeValue("func",{ref:t,code:Yk[t.code]||(Yk[t.code]=new eC._Code(t.code))})}se.useFunc=cC;var Lg;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Lg||(se.Type=Lg={}));function uC(e,t,r){if(e instanceof Pe.Name){let o=t===Lg.Num;return r?o?(0,Pe._)`"[" + ${e} + "]"`:(0,Pe._)`"['" + ${e} + "']"`:o?(0,Pe._)`"/" + ${e}`:(0,Pe._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Pe.getProperty)(e).toString():"/"+Zg(e)}se.getErrorPath=uC;function nx(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}se.checkStrictMode=nx});var Rr=w(Fg=>{"use strict";Object.defineProperty(Fg,"__esModule",{value:!0});var st=X(),lC={data:new st.Name("data"),valCxt:new st.Name("valCxt"),instancePath:new st.Name("instancePath"),parentData:new st.Name("parentData"),parentDataProperty:new st.Name("parentDataProperty"),rootData:new st.Name("rootData"),dynamicAnchors:new st.Name("dynamicAnchors"),vErrors:new st.Name("vErrors"),errors:new st.Name("errors"),this:new st.Name("this"),self:new st.Name("self"),scope:new st.Name("scope"),json:new st.Name("json"),jsonPos:new st.Name("jsonPos"),jsonLen:new st.Name("jsonLen"),jsonPart:new st.Name("jsonPart")};Fg.default=lC});var ka=w(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.extendErrors=at.resetErrorsCount=at.reportExtraError=at.reportError=at.keyword$DataError=at.keywordError=void 0;var he=X(),ld=me(),mt=Rr();at.keywordError={message:({keyword:e})=>(0,he.str)`must pass "${e}" keyword validation`};at.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,he.str)`"${e}" keyword must be ${t} ($data)`:(0,he.str)`"${e}" keyword is invalid ($data)`};function dC(e,t=at.keywordError,r,o){let{it:n}=e,{gen:i,compositeRule:s,allErrors:a}=n,c=sx(e,t,r);o??(s||a)?ox(i,c):ix(n,(0,he._)`[${c}]`)}at.reportError=dC;function pC(e,t=at.keywordError,r){let{it:o}=e,{gen:n,compositeRule:i,allErrors:s}=o,a=sx(e,t,r);ox(n,a),i||s||ix(o,mt.default.vErrors)}at.reportExtraError=pC;function fC(e,t){e.assign(mt.default.errors,t),e.if((0,he._)`${mt.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,he._)`${mt.default.vErrors}.length`,t),()=>e.assign(mt.default.vErrors,null)))}at.resetErrorsCount=fC;function mC({gen:e,keyword:t,schemaValue:r,data:o,errsCount:n,it:i}){if(n===void 0)throw new Error("ajv implementation error");let s=e.name("err");e.forRange("i",n,mt.default.errors,a=>{e.const(s,(0,he._)`${mt.default.vErrors}[${a}]`),e.if((0,he._)`${s}.instancePath === undefined`,()=>e.assign((0,he._)`${s}.instancePath`,(0,he.strConcat)(mt.default.instancePath,i.errorPath))),e.assign((0,he._)`${s}.schemaPath`,(0,he.str)`${i.errSchemaPath}/${t}`),i.opts.verbose&&(e.assign((0,he._)`${s}.schema`,r),e.assign((0,he._)`${s}.data`,o))})}at.extendErrors=mC;function ox(e,t){let r=e.const("err",t);e.if((0,he._)`${mt.default.vErrors} === null`,()=>e.assign(mt.default.vErrors,(0,he._)`[${r}]`),(0,he._)`${mt.default.vErrors}.push(${r})`),e.code((0,he._)`${mt.default.errors}++`)}function ix(e,t){let{gen:r,validateName:o,schemaEnv:n}=e;n.$async?r.throw((0,he._)`new ${e.ValidationError}(${t})`):(r.assign((0,he._)`${o}.errors`,t),r.return(!1))}var Ln={keyword:new he.Name("keyword"),schemaPath:new he.Name("schemaPath"),params:new he.Name("params"),propertyName:new he.Name("propertyName"),message:new he.Name("message"),schema:new he.Name("schema"),parentSchema:new he.Name("parentSchema")};function sx(e,t,r){let{createErrors:o}=e.it;return o===!1?(0,he._)`{}`:hC(e,t,r)}function hC(e,t,r={}){let{gen:o,it:n}=e,i=[gC(n,r),_C(e,r)];return vC(e,t,i),o.object(...i)}function gC({errorPath:e},{instancePath:t}){let r=t?(0,he.str)`${e}${(0,ld.getErrorPath)(t,ld.Type.Str)}`:e;return[mt.default.instancePath,(0,he.strConcat)(mt.default.instancePath,r)]}function _C({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:o}){let n=o?t:(0,he.str)`${t}/${e}`;return r&&(n=(0,he.str)`${n}${(0,ld.getErrorPath)(r,ld.Type.Str)}`),[Ln.schemaPath,n]}function vC(e,{params:t,message:r},o){let{keyword:n,data:i,schemaValue:s,it:a}=e,{opts:c,propertyName:u,topSchemaRef:l,schemaPath:d}=a;o.push([Ln.keyword,n],[Ln.params,typeof t=="function"?t(e):t||(0,he._)`{}`]),c.messages&&o.push([Ln.message,typeof r=="function"?r(e):r]),c.verbose&&o.push([Ln.schema,s],[Ln.parentSchema,(0,he._)`${l}${d}`],[mt.default.data,i]),u&&o.push([Ln.propertyName,u])}});var cx=w(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});Qo.boolOrEmptySchema=Qo.topBoolOrEmptySchema=void 0;var yC=ka(),bC=X(),wC=Rr(),$C={message:"boolean schema is false"};function kC(e){let{gen:t,schema:r,validateName:o}=e;r===!1?ax(e,!1):typeof r=="object"&&r.$async===!0?t.return(wC.default.data):(t.assign((0,bC._)`${o}.errors`,null),t.return(!0))}Qo.topBoolOrEmptySchema=kC;function xC(e,t){let{gen:r,schema:o}=e;o===!1?(r.var(t,!1),ax(e)):r.var(t,!0)}Qo.boolOrEmptySchema=xC;function ax(e,t){let{gen:r,data:o}=e,n={gen:r,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,yC.reportError)(n,$C,void 0,t)}});var Wg=w(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.getRules=Yo.isJSONType=void 0;var SC=["string","number","integer","boolean","null","object","array"],TC=new Set(SC);function PC(e){return typeof e=="string"&&TC.has(e)}Yo.isJSONType=PC;function zC(){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:{}}}Yo.getRules=zC});var Gg=w(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.shouldUseRule=nn.shouldUseGroup=nn.schemaHasRulesForType=void 0;function EC({schema:e,self:t},r){let o=t.RULES.types[r];return o&&o!==!0&&ux(e,o)}nn.schemaHasRulesForType=EC;function ux(e,t){return t.rules.some(r=>lx(e,r))}nn.shouldUseGroup=ux;function lx(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(o=>e[o]!==void 0))}nn.shouldUseRule=lx});var xa=w(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.reportTypeError=ct.checkDataTypes=ct.checkDataType=ct.coerceAndCheckDataType=ct.getJSONTypes=ct.getSchemaTypes=ct.DataType=void 0;var IC=Wg(),NC=Gg(),OC=ka(),Q=X(),dx=me(),Xo;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Xo||(ct.DataType=Xo={}));function RC(e){let t=px(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}ct.getSchemaTypes=RC;function px(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(IC.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}ct.getJSONTypes=px;function jC(e,t){let{gen:r,data:o,opts:n}=e,i=AC(t,n.coerceTypes),s=t.length>0&&!(i.length===0&&t.length===1&&(0,NC.schemaHasRulesForType)(e,t[0]));if(s){let a=Bg(t,o,n.strictNumbers,Xo.Wrong);r.if(a,()=>{i.length?CC(e,t,i):Hg(e)})}return s}ct.coerceAndCheckDataType=jC;var fx=new Set(["string","number","integer","boolean","null"]);function AC(e,t){return t?e.filter(r=>fx.has(r)||t==="array"&&r==="array"):[]}function CC(e,t,r){let{gen:o,data:n,opts:i}=e,s=o.let("dataType",(0,Q._)`typeof ${n}`),a=o.let("coerced",(0,Q._)`undefined`);i.coerceTypes==="array"&&o.if((0,Q._)`${s} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>o.assign(n,(0,Q._)`${n}[0]`).assign(s,(0,Q._)`typeof ${n}`).if(Bg(t,n,i.strictNumbers),()=>o.assign(a,n))),o.if((0,Q._)`${a} !== undefined`);for(let u of r)(fx.has(u)||u==="array"&&i.coerceTypes==="array")&&c(u);o.else(),Hg(e),o.endIf(),o.if((0,Q._)`${a} !== undefined`,()=>{o.assign(n,a),DC(e,a)});function c(u){switch(u){case"string":o.elseIf((0,Q._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,Q._)`"" + ${n}`).elseIf((0,Q._)`${n} === null`).assign(a,(0,Q._)`""`);return;case"number":o.elseIf((0,Q._)`${s} == "boolean" || ${n} === null
11
11
  || (${s} == "string" && ${n} && ${n} == +${n})`).assign(a,(0,Q._)`+${n}`);return;case"integer":o.elseIf((0,Q._)`${s} === "boolean" || ${n} === null
12
12
  || (${s} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(a,(0,Q._)`+${n}`);return;case"boolean":o.elseIf((0,Q._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(a,!1).elseIf((0,Q._)`${n} === "true" || ${n} === 1`).assign(a,!0);return;case"null":o.elseIf((0,Q._)`${n} === "" || ${n} === 0 || ${n} === false`),o.assign(a,null);return;case"array":o.elseIf((0,Q._)`${s} === "string" || ${s} === "number"
13
- || ${s} === "boolean" || ${n} === null`).assign(a,(0,Q._)`[${n}]`)}}}function OD({gen:e,parentData:t,parentDataProperty:r},o){e.if((0,Q._)`${t} !== undefined`,()=>e.assign((0,Q._)`${t}[${r}]`,o))}function Gg(e,t,r,o=Yo.Correct){let n=o===Yo.Correct?Q.operators.EQ:Q.operators.NEQ,i;switch(e){case"null":return(0,Q._)`${t} ${n} null`;case"array":i=(0,Q._)`Array.isArray(${t})`;break;case"object":i=(0,Q._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=s((0,Q._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=s();break;default:return(0,Q._)`typeof ${t} ${n} ${e}`}return o===Yo.Correct?i:(0,Q.not)(i);function s(a=Q.nil){return(0,Q.and)((0,Q._)`typeof ${t} == "number"`,a,r?(0,Q._)`isFinite(${t})`:Q.nil)}}at.checkDataType=Gg;function Kg(e,t,r,o){if(e.length===1)return Gg(e[0],t,r,o);let n,i=(0,lx.toHash)(e);if(i.array&&i.object){let s=(0,Q._)`typeof ${t} != "object"`;n=i.null?s:(0,Q._)`!${t} || ${s}`,delete i.null,delete i.array,delete i.object}else n=Q.nil;i.number&&delete i.integer;for(let s in i)n=(0,Q.and)(n,Gg(s,t,r,o));return n}at.checkDataTypes=Kg;var RD={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,Q._)`{type: ${e}}`:(0,Q._)`{type: ${t}}`};function Hg(e){let t=jD(e);(0,PD.reportError)(t,RD)}at.reportTypeError=Hg;function jD(e){let{gen:t,data:r,schema:o}=e,n=(0,lx.schemaRefOrVal)(e,o,"type");return{gen:t,keyword:"type",data:r,schema:o.type,schemaCode:n,schemaValue:n,parentSchema:o,params:{},it:e}}});var mx=w(ld=>{"use strict";Object.defineProperty(ld,"__esModule",{value:!0});ld.assignDefaults=void 0;var Xo=X(),AD=_e();function DD(e,t){let{properties:r,items:o}=e.schema;if(t==="object"&&r)for(let n in r)fx(e,n,r[n].default);else t==="array"&&Array.isArray(o)&&o.forEach((n,i)=>fx(e,i,n.default))}ld.assignDefaults=DD;function fx(e,t,r){let{gen:o,compositeRule:n,data:i,opts:s}=e;if(r===void 0)return;let a=(0,Xo._)`${i}${(0,Xo.getProperty)(t)}`;if(n){(0,AD.checkStrictMode)(e,`default is ignored for: ${a}`);return}let c=(0,Xo._)`${a} === undefined`;s.useDefaults==="empty"&&(c=(0,Xo._)`${c} || ${a} === null || ${a} === ""`),o.if(c,(0,Xo._)`${a} = ${(0,Xo.stringify)(r)}`)}});var Lt=w(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.validateUnion=Se.validateArray=Se.usePattern=Se.callValidateCode=Se.schemaProperties=Se.allSchemaProperties=Se.noPropertyInData=Se.propertyInData=Se.isOwnProperty=Se.hasPropFunc=Se.reportMissingProp=Se.checkMissingProp=Se.checkReportMissingProp=void 0;var Ae=X(),Bg=_e(),on=Rr(),CD=_e();function qD(e,t){let{gen:r,data:o,it:n}=e;r.if(Qg(r,o,t,n.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Ae._)`${t}`},!0),e.error()})}Se.checkReportMissingProp=qD;function MD({gen:e,data:t,it:{opts:r}},o,n){return(0,Ae.or)(...o.map(i=>(0,Ae.and)(Qg(e,t,i,r.ownProperties),(0,Ae._)`${n} = ${i}`)))}Se.checkMissingProp=MD;function UD(e,t){e.setParams({missingProperty:t},!0),e.error()}Se.reportMissingProp=UD;function hx(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Ae._)`Object.prototype.hasOwnProperty`})}Se.hasPropFunc=hx;function Jg(e,t,r){return(0,Ae._)`${hx(e)}.call(${t}, ${r})`}Se.isOwnProperty=Jg;function LD(e,t,r,o){let n=(0,Ae._)`${t}${(0,Ae.getProperty)(r)} !== undefined`;return o?(0,Ae._)`${n} && ${Jg(e,t,r)}`:n}Se.propertyInData=LD;function Qg(e,t,r,o){let n=(0,Ae._)`${t}${(0,Ae.getProperty)(r)} === undefined`;return o?(0,Ae.or)(n,(0,Ae.not)(Jg(e,t,r))):n}Se.noPropertyInData=Qg;function gx(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}Se.allSchemaProperties=gx;function ZD(e,t){return gx(t).filter(r=>!(0,Bg.alwaysValidSchema)(e,t[r]))}Se.schemaProperties=ZD;function VD({schemaCode:e,data:t,it:{gen:r,topSchemaRef:o,schemaPath:n,errorPath:i},it:s},a,c,u){let l=u?(0,Ae._)`${e}, ${t}, ${o}${n}`:t,d=[[on.default.instancePath,(0,Ae.strConcat)(on.default.instancePath,i)],[on.default.parentData,s.parentData],[on.default.parentDataProperty,s.parentDataProperty],[on.default.rootData,on.default.rootData]];s.opts.dynamicRef&&d.push([on.default.dynamicAnchors,on.default.dynamicAnchors]);let h=(0,Ae._)`${l}, ${r.object(...d)}`;return c!==Ae.nil?(0,Ae._)`${a}.call(${c}, ${h})`:(0,Ae._)`${a}(${h})`}Se.callValidateCode=VD;var FD=(0,Ae._)`new RegExp`;function WD({gen:e,it:{opts:t}},r){let o=t.unicodeRegExp?"u":"",{regExp:n}=t.code,i=n(r,o);return e.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,Ae._)`${n.code==="new RegExp"?FD:(0,CD.useFunc)(e,n)}(${r}, ${o})`})}Se.usePattern=WD;function GD(e){let{gen:t,data:r,keyword:o,it:n}=e,i=t.name("valid");if(n.allErrors){let a=t.let("valid",!0);return s(()=>t.assign(a,!1)),a}return t.var(i,!0),s(()=>t.break()),i;function s(a){let c=t.const("len",(0,Ae._)`${r}.length`);t.forRange("i",0,c,u=>{e.subschema({keyword:o,dataProp:u,dataPropType:Bg.Type.Num},i),t.if((0,Ae.not)(i),a)})}}Se.validateArray=GD;function KD(e){let{gen:t,schema:r,keyword:o,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,Bg.alwaysValidSchema)(n,c))&&!n.opts.unevaluated)return;let s=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((c,u)=>{let l=e.subschema({keyword:o,schemaProp:u,compositeRule:!0},a);t.assign(s,(0,Ae._)`${s} || ${a}`),e.mergeValidEvaluated(l,a)||t.if((0,Ae.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}Se.validateUnion=KD});var yx=w(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.validateKeywordUsage=mr.validSchemaType=mr.funcKeywordCode=mr.macroKeywordCode=void 0;var ht=X(),Zn=Rr(),HD=Lt(),BD=wa();function JD(e,t){let{gen:r,keyword:o,schema:n,parentSchema:i,it:s}=e,a=t.macro.call(s.self,n,i,s),c=vx(r,o,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let u=r.name("valid");e.subschema({schema:a,schemaPath:ht.nil,errSchemaPath:`${s.errSchemaPath}/${o}`,topSchemaRef:c,compositeRule:!0},u),e.pass(u,()=>e.error(!0))}mr.macroKeywordCode=JD;function QD(e,t){var r;let{gen:o,keyword:n,schema:i,parentSchema:s,$data:a,it:c}=e;XD(c,t);let u=!a&&t.compile?t.compile.call(c.self,i,s,c):t.validate,l=vx(o,n,u),d=o.let("valid");e.block$data(d,h),e.ok((r=t.valid)!==null&&r!==void 0?r:d);function h(){if(t.errors===!1)f(),t.modifying&&_x(e),_(()=>e.error());else{let y=t.async?m():p();t.modifying&&_x(e),_(()=>YD(e,y))}}function m(){let y=o.let("ruleErrs",null);return o.try(()=>f((0,ht._)`await `),$=>o.assign(d,!1).if((0,ht._)`${$} instanceof ${c.ValidationError}`,()=>o.assign(y,(0,ht._)`${$}.errors`),()=>o.throw($))),y}function p(){let y=(0,ht._)`${l}.errors`;return o.assign(y,null),f(ht.nil),y}function f(y=t.async?(0,ht._)`await `:ht.nil){let $=c.opts.passContext?Zn.default.this:Zn.default.self,k=!("compile"in t&&!a||t.schema===!1);o.assign(d,(0,ht._)`${y}${(0,HD.callValidateCode)(e,l,$,k)}`,t.modifying)}function _(y){var $;o.if((0,ht.not)(($=t.valid)!==null&&$!==void 0?$:d),y)}}mr.funcKeywordCode=QD;function _x(e){let{gen:t,data:r,it:o}=e;t.if(o.parentData,()=>t.assign(r,(0,ht._)`${o.parentData}[${o.parentDataProperty}]`))}function YD(e,t){let{gen:r}=e;r.if((0,ht._)`Array.isArray(${t})`,()=>{r.assign(Zn.default.vErrors,(0,ht._)`${Zn.default.vErrors} === null ? ${t} : ${Zn.default.vErrors}.concat(${t})`).assign(Zn.default.errors,(0,ht._)`${Zn.default.vErrors}.length`),(0,BD.extendErrors)(e)},()=>e.error())}function XD({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function vx(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,ht.stringify)(r)})}function eC(e,t,r=!1){return!t.length||t.some(o=>o==="array"?Array.isArray(e):o==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==o||r&&typeof e>"u")}mr.validSchemaType=eC;function tC({schema:e,opts:t,self:r,errSchemaPath:o},n,i){if(Array.isArray(n.keyword)?!n.keyword.includes(i):n.keyword!==i)throw new Error("ajv implementation error");let s=n.dependencies;if(s?.some(a=>!Object.prototype.hasOwnProperty.call(e,a)))throw new Error(`parent schema must have dependencies of ${i}: ${s.join(",")}`);if(n.validateSchema&&!n.validateSchema(e[i])){let c=`keyword "${i}" value is invalid at path "${o}": `+r.errorsText(n.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}mr.validateKeywordUsage=tC});var wx=w(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.extendSubschemaMode=sn.extendSubschemaData=sn.getSubschema=void 0;var hr=X(),bx=_e();function rC(e,{keyword:t,schemaProp:r,schema:o,schemaPath:n,errSchemaPath:i,topSchemaRef:s}){if(t!==void 0&&o!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:(0,hr._)`${e.schemaPath}${(0,hr.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:(0,hr._)`${e.schemaPath}${(0,hr.getProperty)(t)}${(0,hr.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,bx.escapeFragment)(r)}`}}if(o!==void 0){if(n===void 0||i===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:n,topSchemaRef:s,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}sn.getSubschema=rC;function nC(e,t,{dataProp:r,dataPropType:o,data:n,dataTypes:i,propertyName:s}){if(n!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=t;if(r!==void 0){let{errorPath:u,dataPathArr:l,opts:d}=t,h=a.let("data",(0,hr._)`${t.data}${(0,hr.getProperty)(r)}`,!0);c(h),e.errorPath=(0,hr.str)`${u}${(0,bx.getErrorPath)(r,o,d.jsPropertySyntax)}`,e.parentDataProperty=(0,hr._)`${r}`,e.dataPathArr=[...l,e.parentDataProperty]}if(n!==void 0){let u=n instanceof hr.Name?n:a.let("data",n,!0);c(u),s!==void 0&&(e.propertyName=s)}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]}}sn.extendSubschemaData=nC;function oC(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:o,createErrors:n,allErrors:i}){o!==void 0&&(e.compositeRule=o),n!==void 0&&(e.createErrors=n),i!==void 0&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r}sn.extendSubschemaMode=oC});var kx=w((UK,$x)=>{"use strict";var an=$x.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var o=typeof r=="function"?r:r.pre||function(){},n=r.post||function(){};dd(t,o,n,e,"",e)};an.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};an.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};an.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};an.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 dd(e,t,r,o,n,i,s,a,c,u){if(o&&typeof o=="object"&&!Array.isArray(o)){t(o,n,i,s,a,c,u);for(var l in o){var d=o[l];if(Array.isArray(d)){if(l in an.arrayKeywords)for(var h=0;h<d.length;h++)dd(e,t,r,d[h],n+"/"+l+"/"+h,i,n,l,o,h)}else if(l in an.propsKeywords){if(d&&typeof d=="object")for(var m in d)dd(e,t,r,d[m],n+"/"+l+"/"+iC(m),i,n,l,o,m)}else(l in an.keywords||e.allKeys&&!(l in an.skipKeywords))&&dd(e,t,r,d,n+"/"+l,i,n,l,o)}r(o,n,i,s,a,c,u)}}function iC(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var ka=w(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.getSchemaRefs=xt.resolveUrl=xt.normalizeId=xt._getFullPath=xt.getFullPath=xt.inlineRef=void 0;var sC=_e(),aC=Hs(),cC=kx(),uC=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function lC(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Yg(e):t?xx(e)<=t:!1}xt.inlineRef=lC;var dC=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Yg(e){for(let t in e){if(dC.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(Yg)||typeof r=="object"&&Yg(r))return!0}return!1}function xx(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!uC.has(r)&&(typeof e[r]=="object"&&(0,sC.eachItem)(e[r],o=>t+=xx(o)),t===1/0))return 1/0}return t}function Sx(e,t="",r){r!==!1&&(t=ei(t));let o=e.parse(t);return Tx(e,o)}xt.getFullPath=Sx;function Tx(e,t){return e.serialize(t).split("#")[0]+"#"}xt._getFullPath=Tx;var pC=/#\/?$/;function ei(e){return e?e.replace(pC,""):""}xt.normalizeId=ei;function fC(e,t,r){return r=ei(r),e.resolve(t,r)}xt.resolveUrl=fC;var mC=/^[a-z_][-a-z0-9._]*$/i;function hC(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:o}=this.opts,n=ei(e[r]||t),i={"":n},s=Sx(o,n,!1),a={},c=new Set;return cC(e,{allKeys:!0},(d,h,m,p)=>{if(p===void 0)return;let f=s+h,_=i[p];typeof d[r]=="string"&&(_=y.call(this,d[r])),$.call(this,d.$anchor),$.call(this,d.$dynamicAnchor),i[h]=_;function y(k){let I=this.opts.uriResolver.resolve;if(k=ei(_?I(_,k):k),c.has(k))throw l(k);c.add(k);let P=this.refs[k];return typeof P=="string"&&(P=this.refs[P]),typeof P=="object"?u(d,P.schema,k):k!==ei(f)&&(k[0]==="#"?(u(d,a[k],k),a[k]=d):this.refs[k]=f),k}function $(k){if(typeof k=="string"){if(!mC.test(k))throw new Error(`invalid anchor "${k}"`);y.call(this,`#${k}`)}}}),a;function u(d,h,m){if(h!==void 0&&!aC(d,h))throw l(m)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}xt.getSchemaRefs=hC});var Ta=w(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.getData=cn.KeywordCxt=cn.validateFunctionCode=void 0;var Nx=ax(),Px=$a(),e_=Wg(),pd=$a(),gC=mx(),Sa=yx(),Xg=wx(),Z=X(),H=Rr(),_C=ka(),jr=_e(),xa=wa();function vC(e){if(jx(e)&&(Ax(e),Rx(e))){wC(e);return}Ox(e,()=>(0,Nx.topBoolOrEmptySchema)(e))}cn.validateFunctionCode=vC;function Ox({gen:e,validateName:t,schema:r,schemaEnv:o,opts:n},i){n.code.es5?e.func(t,(0,Z._)`${H.default.data}, ${H.default.valCxt}`,o.$async,()=>{e.code((0,Z._)`"use strict"; ${zx(r,n)}`),bC(e,n),e.code(i)}):e.func(t,(0,Z._)`${H.default.data}, ${yC(n)}`,o.$async,()=>e.code(zx(r,n)).code(i))}function yC(e){return(0,Z._)`{${H.default.instancePath}="", ${H.default.parentData}, ${H.default.parentDataProperty}, ${H.default.rootData}=${H.default.data}${e.dynamicRef?(0,Z._)`, ${H.default.dynamicAnchors}={}`:Z.nil}}={}`}function bC(e,t){e.if(H.default.valCxt,()=>{e.var(H.default.instancePath,(0,Z._)`${H.default.valCxt}.${H.default.instancePath}`),e.var(H.default.parentData,(0,Z._)`${H.default.valCxt}.${H.default.parentData}`),e.var(H.default.parentDataProperty,(0,Z._)`${H.default.valCxt}.${H.default.parentDataProperty}`),e.var(H.default.rootData,(0,Z._)`${H.default.valCxt}.${H.default.rootData}`),t.dynamicRef&&e.var(H.default.dynamicAnchors,(0,Z._)`${H.default.valCxt}.${H.default.dynamicAnchors}`)},()=>{e.var(H.default.instancePath,(0,Z._)`""`),e.var(H.default.parentData,(0,Z._)`undefined`),e.var(H.default.parentDataProperty,(0,Z._)`undefined`),e.var(H.default.rootData,H.default.data),t.dynamicRef&&e.var(H.default.dynamicAnchors,(0,Z._)`{}`)})}function wC(e){let{schema:t,opts:r,gen:o}=e;Ox(e,()=>{r.$comment&&t.$comment&&Cx(e),TC(e),o.let(H.default.vErrors,null),o.let(H.default.errors,0),r.unevaluated&&$C(e),Dx(e),IC(e)})}function $C(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,Z._)`${r}.evaluated`),t.if((0,Z._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,Z._)`${e.evaluated}.props`,(0,Z._)`undefined`)),t.if((0,Z._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,Z._)`${e.evaluated}.items`,(0,Z._)`undefined`))}function zx(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,Z._)`/*# sourceURL=${r} */`:Z.nil}function kC(e,t){if(jx(e)&&(Ax(e),Rx(e))){xC(e,t);return}(0,Nx.boolOrEmptySchema)(e,t)}function Rx({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function jx(e){return typeof e.schema!="boolean"}function xC(e,t){let{schema:r,gen:o,opts:n}=e;n.$comment&&r.$comment&&Cx(e),PC(e),zC(e);let i=o.const("_errs",H.default.errors);Dx(e,i),o.var(t,(0,Z._)`${i} === ${H.default.errors}`)}function Ax(e){(0,jr.checkUnknownRules)(e),SC(e)}function Dx(e,t){if(e.opts.jtd)return Ix(e,[],!1,t);let r=(0,Px.getSchemaTypes)(e.schema),o=(0,Px.coerceAndCheckDataType)(e,r);Ix(e,r,!o,t)}function SC(e){let{schema:t,errSchemaPath:r,opts:o,self:n}=e;t.$ref&&o.ignoreKeywordsWithRef&&(0,jr.schemaHasRulesButRef)(t,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function TC(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,jr.checkStrictMode)(e,"default is ignored in the schema root")}function PC(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,_C.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function zC(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function Cx({gen:e,schemaEnv:t,schema:r,errSchemaPath:o,opts:n}){let i=r.$comment;if(n.$comment===!0)e.code((0,Z._)`${H.default.self}.logger.log(${i})`);else if(typeof n.$comment=="function"){let s=(0,Z.str)`${o}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,Z._)`${H.default.self}.opts.$comment(${i}, ${s}, ${a}.schema)`)}}function IC(e){let{gen:t,schemaEnv:r,validateName:o,ValidationError:n,opts:i}=e;r.$async?t.if((0,Z._)`${H.default.errors} === 0`,()=>t.return(H.default.data),()=>t.throw((0,Z._)`new ${n}(${H.default.vErrors})`)):(t.assign((0,Z._)`${o}.errors`,H.default.vErrors),i.unevaluated&&EC(e),t.return((0,Z._)`${H.default.errors} === 0`))}function EC({gen:e,evaluated:t,props:r,items:o}){r instanceof Z.Name&&e.assign((0,Z._)`${t}.props`,r),o instanceof Z.Name&&e.assign((0,Z._)`${t}.items`,o)}function Ix(e,t,r,o){let{gen:n,schema:i,data:s,allErrors:a,opts:c,self:u}=e,{RULES:l}=u;if(i.$ref&&(c.ignoreKeywordsWithRef||!(0,jr.schemaHasRulesButRef)(i,l))){n.block(()=>Mx(e,"$ref",l.all.$ref.definition));return}c.jtd||NC(e,t),n.block(()=>{for(let h of l.rules)d(h);d(l.post)});function d(h){(0,e_.shouldUseGroup)(i,h)&&(h.type?(n.if((0,pd.checkDataType)(h.type,s,c.strictNumbers)),Ex(e,h),t.length===1&&t[0]===h.type&&r&&(n.else(),(0,pd.reportTypeError)(e)),n.endIf()):Ex(e,h),a||n.if((0,Z._)`${H.default.errors} === ${o||0}`))}}function Ex(e,t){let{gen:r,schema:o,opts:{useDefaults:n}}=e;n&&(0,gC.assignDefaults)(e,t.type),r.block(()=>{for(let i of t.rules)(0,e_.shouldUseRule)(o,i)&&Mx(e,i.keyword,i.definition,t.type)})}function NC(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(OC(e,t),e.opts.allowUnionTypes||RC(e,t),jC(e,e.dataTypes))}function OC(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{qx(e.dataTypes,r)||t_(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),DC(e,t)}}function RC(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&t_(e,"use allowUnionTypes to allow union type keyword")}function jC(e,t){let r=e.self.RULES.all;for(let o in r){let n=r[o];if(typeof n=="object"&&(0,e_.shouldUseRule)(e.schema,n)){let{type:i}=n.definition;i.length&&!i.some(s=>AC(t,s))&&t_(e,`missing type "${i.join(",")}" for keyword "${o}"`)}}}function AC(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function qx(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function DC(e,t){let r=[];for(let o of e.dataTypes)qx(t,o)?r.push(o):t.includes("integer")&&o==="number"&&r.push("integer");e.dataTypes=r}function t_(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,jr.checkStrictMode)(e,t,e.opts.strictTypes)}var fd=class{constructor(t,r,o){if((0,Sa.validateKeywordUsage)(t,r,o),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=o,this.data=t.data,this.schema=t.schema[o],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,jr.schemaRefOrVal)(t,this.schema,o,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",Ux(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Sa.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${o} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",H.default.errors))}result(t,r,o){this.failResult((0,Z.not)(t),r,o)}failResult(t,r,o){this.gen.if(t),o?o():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,Z.not)(t),void 0,r)}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:r}=this;this.fail((0,Z._)`${r} !== undefined && (${(0,Z.or)(this.invalid$data(),t)})`)}error(t,r,o){if(r){this.setParams(r),this._error(t,o),this.setParams({});return}this._error(t,o)}_error(t,r){(t?xa.reportExtraError:xa.reportError)(this,this.def.error,r)}$dataError(){(0,xa.reportError)(this,this.def.$dataError||xa.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,xa.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,o=Z.nil){this.gen.block(()=>{this.check$data(t,o),r()})}check$data(t=Z.nil,r=Z.nil){if(!this.$data)return;let{gen:o,schemaCode:n,schemaType:i,def:s}=this;o.if((0,Z.or)((0,Z._)`${n} === undefined`,r)),t!==Z.nil&&o.assign(t,!0),(i.length||s.validateSchema)&&(o.elseIf(this.invalid$data()),this.$dataError(),t!==Z.nil&&o.assign(t,!1)),o.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:o,def:n,it:i}=this;return(0,Z.or)(s(),a());function s(){if(o.length){if(!(r instanceof Z.Name))throw new Error("ajv implementation error");let c=Array.isArray(o)?o:[o];return(0,Z._)`${(0,pd.checkDataTypes)(c,r,i.opts.strictNumbers,pd.DataType.Wrong)}`}return Z.nil}function a(){if(n.validateSchema){let c=t.scopeValue("validate$data",{ref:n.validateSchema});return(0,Z._)`!${c}(${r})`}return Z.nil}}subschema(t,r){let o=(0,Xg.getSubschema)(this.it,t);(0,Xg.extendSubschemaData)(o,this.it,t),(0,Xg.extendSubschemaMode)(o,t);let n={...this.it,...o,items:void 0,props:void 0};return kC(n,r),n}mergeEvaluated(t,r){let{it:o,gen:n}=this;o.opts.unevaluated&&(o.props!==!0&&t.props!==void 0&&(o.props=jr.mergeEvaluated.props(n,t.props,o.props,r)),o.items!==!0&&t.items!==void 0&&(o.items=jr.mergeEvaluated.items(n,t.items,o.items,r)))}mergeValidEvaluated(t,r){let{it:o,gen:n}=this;if(o.opts.unevaluated&&(o.props!==!0||o.items!==!0))return n.if(r,()=>this.mergeEvaluated(t,Z.Name)),!0}};cn.KeywordCxt=fd;function Mx(e,t,r,o){let n=new fd(e,r,t);"code"in r?r.code(n,o):n.$data&&r.validate?(0,Sa.funcKeywordCode)(n,r):"macro"in r?(0,Sa.macroKeywordCode)(n,r):(r.compile||r.validate)&&(0,Sa.funcKeywordCode)(n,r)}var CC=/^\/(?:[^~]|~0|~1)*$/,qC=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Ux(e,{dataLevel:t,dataNames:r,dataPathArr:o}){let n,i;if(e==="")return H.default.rootData;if(e[0]==="/"){if(!CC.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);n=e,i=H.default.rootData}else{let u=qC.exec(e);if(!u)throw new Error(`Invalid JSON-pointer: ${e}`);let l=+u[1];if(n=u[2],n==="#"){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=r[t-l],!n)return i}let s=i,a=n.split("/");for(let u of a)u&&(i=(0,Z._)`${i}${(0,Z.getProperty)((0,jr.unescapeJsonPointer)(u))}`,s=(0,Z._)`${s} && ${i}`);return s;function c(u,l){return`Cannot access ${u} ${l} levels up, current level is ${t}`}}cn.getData=Ux});var md=w(n_=>{"use strict";Object.defineProperty(n_,"__esModule",{value:!0});var r_=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};n_.default=r_});var Pa=w(s_=>{"use strict";Object.defineProperty(s_,"__esModule",{value:!0});var o_=ka(),i_=class extends Error{constructor(t,r,o,n){super(n||`can't resolve reference ${o} from id ${r}`),this.missingRef=(0,o_.resolveUrl)(t,r,o),this.missingSchema=(0,o_.normalizeId)((0,o_.getFullPath)(t,this.missingRef))}};s_.default=i_});var gd=w(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.resolveSchema=Zt.getCompilingSchema=Zt.resolveRef=Zt.compileSchema=Zt.SchemaEnv=void 0;var tr=X(),MC=md(),Vn=Rr(),rr=ka(),Lx=_e(),UC=Ta(),ti=class{constructor(t){var r;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=(r=t.baseId)!==null&&r!==void 0?r:(0,rr.normalizeId)(o?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=o?.$async,this.refs={}}};Zt.SchemaEnv=ti;function c_(e){let t=Zx.call(this,e);if(t)return t;let r=(0,rr.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:o,lines:n}=this.opts.code,{ownProperties:i}=this.opts,s=new tr.CodeGen(this.scope,{es5:o,lines:n,ownProperties:i}),a;e.$async&&(a=s.scopeValue("Error",{ref:MC.default,code:(0,tr._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");e.validateName=c;let u={gen:s,allErrors:this.opts.allErrors,data:Vn.default.data,parentData:Vn.default.parentData,parentDataProperty:Vn.default.parentDataProperty,dataNames:[Vn.default.data],dataPathArr:[tr.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,tr.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:tr.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,tr._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(e),(0,UC.validateFunctionCode)(u),s.optimize(this.opts.code.optimize);let d=s.toString();l=`${s.scopeRefs(Vn.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,e));let m=new Function(`${Vn.default.self}`,`${Vn.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=e.schema,m.schemaEnv=e,e.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:c,validateCode:d,scopeValues:s._values}),this.opts.unevaluated){let{props:p,items:f}=u;m.evaluated={props:p instanceof tr.Name?void 0:p,items:f instanceof tr.Name?void 0:f,dynamicProps:p instanceof tr.Name,dynamicItems:f instanceof tr.Name},m.source&&(m.source.evaluated=(0,tr.stringify)(m.evaluated))}return e.validate=m,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)}}Zt.compileSchema=c_;function LC(e,t,r){var o;r=(0,rr.resolveUrl)(this.opts.uriResolver,t,r);let n=e.refs[r];if(n)return n;let i=FC.call(this,e,r);if(i===void 0){let s=(o=e.localRefs)===null||o===void 0?void 0:o[r],{schemaId:a}=this.opts;s&&(i=new ti({schema:s,schemaId:a,root:e,baseId:t}))}if(i!==void 0)return e.refs[r]=ZC.call(this,i)}Zt.resolveRef=LC;function ZC(e){return(0,rr.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:c_.call(this,e)}function Zx(e){for(let t of this._compilations)if(VC(t,e))return t}Zt.getCompilingSchema=Zx;function VC(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function FC(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||hd.call(this,e,t)}function hd(e,t){let r=this.opts.uriResolver.parse(t),o=(0,rr._getFullPath)(this.opts.uriResolver,r),n=(0,rr.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&o===n)return a_.call(this,r,e);let i=(0,rr.normalizeId)(o),s=this.refs[i]||this.schemas[i];if(typeof s=="string"){let a=hd.call(this,e,s);return typeof a?.schema!="object"?void 0:a_.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||c_.call(this,s),i===(0,rr.normalizeId)(t)){let{schema:a}=s,{schemaId:c}=this.opts,u=a[c];return u&&(n=(0,rr.resolveUrl)(this.opts.uriResolver,n,u)),new ti({schema:a,schemaId:c,root:e,baseId:n})}return a_.call(this,r,s)}}Zt.resolveSchema=hd;var WC=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function a_(e,{baseId:t,schema:r,root:o}){var n;if(((n=e.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,Lx.unescapeFragment)(a)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!WC.has(a)&&u&&(t=(0,rr.resolveUrl)(this.opts.uriResolver,t,u))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,Lx.schemaHasRulesButRef)(r,this.RULES)){let a=(0,rr.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=hd.call(this,o,a)}let{schemaId:s}=this.opts;if(i=i||new ti({schema:r,schemaId:s,root:o,baseId:t}),i.schema!==i.root.schema)return i}});var Vx=w((GK,GC)=>{GC.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 Wx=w(u_=>{"use strict";Object.defineProperty(u_,"__esModule",{value:!0});var Fx=Sh();Fx.code='require("ajv/dist/runtime/uri").default';u_.default=Fx});var Xx=w(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 KC=Ta();Object.defineProperty(Qe,"KeywordCxt",{enumerable:!0,get:function(){return KC.KeywordCxt}});var ri=X();Object.defineProperty(Qe,"_",{enumerable:!0,get:function(){return ri._}});Object.defineProperty(Qe,"str",{enumerable:!0,get:function(){return ri.str}});Object.defineProperty(Qe,"stringify",{enumerable:!0,get:function(){return ri.stringify}});Object.defineProperty(Qe,"nil",{enumerable:!0,get:function(){return ri.nil}});Object.defineProperty(Qe,"Name",{enumerable:!0,get:function(){return ri.Name}});Object.defineProperty(Qe,"CodeGen",{enumerable:!0,get:function(){return ri.CodeGen}});var HC=md(),Jx=Pa(),BC=Fg(),za=gd(),JC=X(),Ia=ka(),_d=$a(),d_=_e(),Gx=Vx(),QC=Wx(),Qx=(e,t)=>new RegExp(e,t);Qx.code="new RegExp";var YC=["removeAdditional","useDefaults","coerceTypes"],XC=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),eq={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."},tq={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Kx=200;function rq(e){var t,r,o,n,i,s,a,c,u,l,d,h,m,p,f,_,y,$,k,I,P,ze,Me,ir,pn;let Ft=e.strict,fn=(t=e.code)===null||t===void 0?void 0:t.optimize,li=fn===!0||fn===void 0?1:fn||0,di=(o=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&o!==void 0?o:Qx,Zd=(n=e.uriResolver)!==null&&n!==void 0?n:QC.default;return{strictSchema:(s=(i=e.strictSchema)!==null&&i!==void 0?i:Ft)!==null&&s!==void 0?s:!0,strictNumbers:(c=(a=e.strictNumbers)!==null&&a!==void 0?a:Ft)!==null&&c!==void 0?c:!0,strictTypes:(l=(u=e.strictTypes)!==null&&u!==void 0?u:Ft)!==null&&l!==void 0?l:"log",strictTuples:(h=(d=e.strictTuples)!==null&&d!==void 0?d:Ft)!==null&&h!==void 0?h:"log",strictRequired:(p=(m=e.strictRequired)!==null&&m!==void 0?m:Ft)!==null&&p!==void 0?p:!1,code:e.code?{...e.code,optimize:li,regExp:di}:{optimize:li,regExp:di},loopRequired:(f=e.loopRequired)!==null&&f!==void 0?f:Kx,loopEnum:(_=e.loopEnum)!==null&&_!==void 0?_:Kx,meta:(y=e.meta)!==null&&y!==void 0?y:!0,messages:($=e.messages)!==null&&$!==void 0?$:!0,inlineRefs:(k=e.inlineRefs)!==null&&k!==void 0?k:!0,schemaId:(I=e.schemaId)!==null&&I!==void 0?I:"$id",addUsedSchema:(P=e.addUsedSchema)!==null&&P!==void 0?P:!0,validateSchema:(ze=e.validateSchema)!==null&&ze!==void 0?ze:!0,validateFormats:(Me=e.validateFormats)!==null&&Me!==void 0?Me:!0,unicodeRegExp:(ir=e.unicodeRegExp)!==null&&ir!==void 0?ir:!0,int32range:(pn=e.int32range)!==null&&pn!==void 0?pn:!0,uriResolver:Zd}}var Ea=class{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...rq(t)};let{es5:r,lines:o}=this.opts.code;this.scope=new JC.ValueScope({scope:{},prefixes:XC,es5:r,lines:o}),this.logger=cq(t.logger);let n=t.validateFormats;t.validateFormats=!1,this.RULES=(0,BC.getRules)(),Hx.call(this,eq,t,"NOT SUPPORTED"),Hx.call(this,tq,t,"DEPRECATED","warn"),this._metaOpts=sq.call(this),t.formats&&oq.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&iq.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),nq.call(this),t.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:o}=this.opts,n=Gx;o==="id"&&(n={...Gx},n.id=n.$id,delete n.$id),r&&t&&this.addMetaSchema(n,n[o],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){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 n=o(r);return"$async"in o||(this.errors=o.errors),n}compile(t,r){let o=this._addSchema(t,r);return o.validate||this._compileSchemaEnv(o)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:o}=this.opts;return n.call(this,t,r);async function n(l,d){await i.call(this,l.$schema);let h=this._addSchema(l,d);return h.validate||s.call(this,h)}async function i(l){l&&!this.getSchema(l)&&await n.call(this,{$ref:l},!0)}async function s(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof Jx.default))throw d;return a.call(this,d),await c.call(this,d.missingSchema),s.call(this,l)}}function a({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,r)}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,r,o,n=this.opts.validateSchema){if(Array.isArray(t)){for(let s of t)this.addSchema(s,void 0,o,n);return this}let i;if(typeof t=="object"){let{schemaId:s}=this.opts;if(i=t[s],i!==void 0&&typeof i!="string")throw new Error(`schema ${s} must be string`)}return r=(0,Ia.normalizeId)(r||i),this._checkUnique(r),this.schemas[r]=this._addSchema(t,o,r,n,!0),this}addMetaSchema(t,r,o=this.opts.validateSchema){return this.addSchema(t,r,!0,o),this}validateSchema(t,r){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 n=this.validate(o,t);if(!n&&r){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw new Error(i)}return n}getSchema(t){let r;for(;typeof(r=Bx.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:o}=this.opts,n=new za.SchemaEnv({schema:{},schemaId:o});if(r=za.resolveSchema.call(this,n,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}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 r=Bx.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let o=t[this.opts.schemaId];return o&&(o=(0,Ia.normalizeId)(o),delete this.schemas[o],delete this.refs[o]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let o;if(typeof t=="string")o=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=o);else if(typeof t=="object"&&r===void 0){if(r=t,o=r.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(lq.call(this,o,r),!r)return(0,d_.eachItem)(o,i=>l_.call(this,i)),this;pq.call(this,r);let n={...r,type:(0,_d.getJSONTypes)(r.type),schemaType:(0,_d.getJSONTypes)(r.schemaType)};return(0,d_.eachItem)(o,n.type.length===0?i=>l_.call(this,i,n):i=>n.type.forEach(s=>l_.call(this,i,n,s))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let o of r.rules){let n=o.rules.findIndex(i=>i.keyword===t);n>=0&&o.rules.splice(n,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:o="data"}={}){return!t||t.length===0?"No errors":t.map(n=>`${o}${n.instancePath} ${n.message}`).reduce((n,i)=>n+r+i)}$dataMetaSchema(t,r){let o=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let n of r){let i=n.split("/").slice(1),s=t;for(let a of i)s=s[a];for(let a in o){let c=o[a];if(typeof c!="object")continue;let{$data:u}=c.definition,l=s[a];u&&l&&(s[a]=Yx(l))}}return t}_removeAllSchemas(t,r){for(let o in t){let n=t[o];(!r||r.test(o))&&(typeof n=="string"?delete t[o]:n&&!n.meta&&(this._cache.delete(n.schema),delete t[o]))}}_addSchema(t,r,o,n=this.opts.validateSchema,i=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof t=="object")s=t[a];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,Ia.normalizeId)(s||o);let u=Ia.getSchemaRefs.call(this,t,o);return c=new za.SchemaEnv({schema:t,schemaId:a,meta:r,baseId:o,localRefs:u}),this._cache.set(c.schema,c),i&&!o.startsWith("#")&&(o&&this._checkUnique(o),this.refs[o]=c),n&&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):za.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{za.compileSchema.call(this,t)}finally{this.opts=r}}};Ea.ValidationError=HC.default;Ea.MissingRefError=Jx.default;Qe.default=Ea;function Hx(e,t,r,o="error"){for(let n in e){let i=n;i in t&&this.logger[o](`${r}: option ${n}. ${e[i]}`)}}function Bx(e){return e=(0,Ia.normalizeId)(e),this.schemas[e]||this.refs[e]}function nq(){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 oq(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function iq(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 r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function sq(){let e={...this.opts};for(let t of YC)delete e[t];return e}var aq={log(){},warn(){},error(){}};function cq(e){if(e===!1)return aq;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 uq=/^[a-z_$][a-z0-9_$:-]*$/i;function lq(e,t){let{RULES:r}=this;if((0,d_.eachItem)(e,o=>{if(r.keywords[o])throw new Error(`Keyword ${o} is already defined`);if(!uq.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 l_(e,t,r){var o;let n=t?.post;if(r&&n)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,s=n?i.post:i.rules.find(({type:c})=>c===r);if(s||(s={type:r,rules:[]},i.rules.push(s)),i.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,_d.getJSONTypes)(t.type),schemaType:(0,_d.getJSONTypes)(t.schemaType)}};t.before?dq.call(this,s,a,t.before):s.rules.push(a),i.all[e]=a,(o=t.implements)===null||o===void 0||o.forEach(c=>this.addKeyword(c))}function dq(e,t,r){let o=e.rules.findIndex(n=>n.keyword===r);o>=0?e.rules.splice(o,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function pq(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=Yx(t)),e.validateSchema=this.compile(t,!0))}var fq={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Yx(e){return{anyOf:[e,fq]}}});var eS=w(p_=>{"use strict";Object.defineProperty(p_,"__esModule",{value:!0});var mq={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};p_.default=mq});var oS=w(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.callRef=Fn.getValidate=void 0;var hq=Pa(),tS=Lt(),St=X(),ni=Rr(),rS=gd(),vd=_e(),gq={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:o}=e,{baseId:n,schemaEnv:i,validateName:s,opts:a,self:c}=o,{root:u}=i;if((r==="#"||r==="#/")&&n===u.baseId)return d();let l=rS.resolveRef.call(c,u,n,r);if(l===void 0)throw new hq.default(o.opts.uriResolver,n,r);if(l instanceof rS.SchemaEnv)return h(l);return m(l);function d(){if(i===u)return yd(e,s,i,i.$async);let p=t.scopeValue("root",{ref:u});return yd(e,(0,St._)`${p}.validate`,u,u.$async)}function h(p){let f=nS(e,p);yd(e,f,p,p.$async)}function m(p){let f=t.scopeValue("schema",a.code.source===!0?{ref:p,code:(0,St.stringify)(p)}:{ref:p}),_=t.name("valid"),y=e.subschema({schema:p,dataTypes:[],schemaPath:St.nil,topSchemaRef:f,errSchemaPath:r},_);e.mergeEvaluated(y),e.ok(_)}}};function nS(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,St._)`${r.scopeValue("wrapper",{ref:t})}.validate`}Fn.getValidate=nS;function yd(e,t,r,o){let{gen:n,it:i}=e,{allErrors:s,schemaEnv:a,opts:c}=i,u=c.passContext?ni.default.this:St.nil;o?l():d();function l(){if(!a.$async)throw new Error("async schema referenced by sync schema");let p=n.let("valid");n.try(()=>{n.code((0,St._)`await ${(0,tS.callValidateCode)(e,t,u)}`),m(t),s||n.assign(p,!0)},f=>{n.if((0,St._)`!(${f} instanceof ${i.ValidationError})`,()=>n.throw(f)),h(f),s||n.assign(p,!1)}),e.ok(p)}function d(){e.result((0,tS.callValidateCode)(e,t,u),()=>m(t),()=>h(t))}function h(p){let f=(0,St._)`${p}.errors`;n.assign(ni.default.vErrors,(0,St._)`${ni.default.vErrors} === null ? ${f} : ${ni.default.vErrors}.concat(${f})`),n.assign(ni.default.errors,(0,St._)`${ni.default.vErrors}.length`)}function m(p){var f;if(!i.opts.unevaluated)return;let _=(f=r?.validate)===null||f===void 0?void 0:f.evaluated;if(i.props!==!0)if(_&&!_.dynamicProps)_.props!==void 0&&(i.props=vd.mergeEvaluated.props(n,_.props,i.props));else{let y=n.var("props",(0,St._)`${p}.evaluated.props`);i.props=vd.mergeEvaluated.props(n,y,i.props,St.Name)}if(i.items!==!0)if(_&&!_.dynamicItems)_.items!==void 0&&(i.items=vd.mergeEvaluated.items(n,_.items,i.items));else{let y=n.var("items",(0,St._)`${p}.evaluated.items`);i.items=vd.mergeEvaluated.items(n,y,i.items,St.Name)}}}Fn.callRef=yd;Fn.default=gq});var iS=w(f_=>{"use strict";Object.defineProperty(f_,"__esModule",{value:!0});var _q=eS(),vq=oS(),yq=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",_q.default,vq.default];f_.default=yq});var sS=w(m_=>{"use strict";Object.defineProperty(m_,"__esModule",{value:!0});var bd=X(),un=bd.operators,wd={maximum:{okStr:"<=",ok:un.LTE,fail:un.GT},minimum:{okStr:">=",ok:un.GTE,fail:un.LT},exclusiveMaximum:{okStr:"<",ok:un.LT,fail:un.GTE},exclusiveMinimum:{okStr:">",ok:un.GT,fail:un.LTE}},bq={message:({keyword:e,schemaCode:t})=>(0,bd.str)`must be ${wd[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,bd._)`{comparison: ${wd[e].okStr}, limit: ${t}}`},wq={keyword:Object.keys(wd),type:"number",schemaType:"number",$data:!0,error:bq,code(e){let{keyword:t,data:r,schemaCode:o}=e;e.fail$data((0,bd._)`${r} ${wd[t].fail} ${o} || isNaN(${r})`)}};m_.default=wq});var aS=w(h_=>{"use strict";Object.defineProperty(h_,"__esModule",{value:!0});var Na=X(),$q={message:({schemaCode:e})=>(0,Na.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Na._)`{multipleOf: ${e}}`},kq={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:$q,code(e){let{gen:t,data:r,schemaCode:o,it:n}=e,i=n.opts.multipleOfPrecision,s=t.let("res"),a=i?(0,Na._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${i}`:(0,Na._)`${s} !== parseInt(${s})`;e.fail$data((0,Na._)`(${o} === 0 || (${s} = ${r}/${o}, ${a}))`)}};h_.default=kq});var uS=w(g_=>{"use strict";Object.defineProperty(g_,"__esModule",{value:!0});function cS(e){let t=e.length,r=0,o=0,n;for(;o<t;)r++,n=e.charCodeAt(o++),n>=55296&&n<=56319&&o<t&&(n=e.charCodeAt(o),(n&64512)===56320&&o++);return r}g_.default=cS;cS.code='require("ajv/dist/runtime/ucs2length").default'});var lS=w(__=>{"use strict";Object.defineProperty(__,"__esModule",{value:!0});var Wn=X(),xq=_e(),Sq=uS(),Tq={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Wn.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Wn._)`{limit: ${e}}`},Pq={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Tq,code(e){let{keyword:t,data:r,schemaCode:o,it:n}=e,i=t==="maxLength"?Wn.operators.GT:Wn.operators.LT,s=n.opts.unicode===!1?(0,Wn._)`${r}.length`:(0,Wn._)`${(0,xq.useFunc)(e.gen,Sq.default)}(${r})`;e.fail$data((0,Wn._)`${s} ${i} ${o}`)}};__.default=Pq});var dS=w(v_=>{"use strict";Object.defineProperty(v_,"__esModule",{value:!0});var zq=Lt(),$d=X(),Iq={message:({schemaCode:e})=>(0,$d.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,$d._)`{pattern: ${e}}`},Eq={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Iq,code(e){let{data:t,$data:r,schema:o,schemaCode:n,it:i}=e,s=i.opts.unicodeRegExp?"u":"",a=r?(0,$d._)`(new RegExp(${n}, ${s}))`:(0,zq.usePattern)(e,o);e.fail$data((0,$d._)`!${a}.test(${t})`)}};v_.default=Eq});var pS=w(y_=>{"use strict";Object.defineProperty(y_,"__esModule",{value:!0});var Oa=X(),Nq={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,Oa.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,Oa._)`{limit: ${e}}`},Oq={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:Nq,code(e){let{keyword:t,data:r,schemaCode:o}=e,n=t==="maxProperties"?Oa.operators.GT:Oa.operators.LT;e.fail$data((0,Oa._)`Object.keys(${r}).length ${n} ${o}`)}};y_.default=Oq});var fS=w(b_=>{"use strict";Object.defineProperty(b_,"__esModule",{value:!0});var Ra=Lt(),ja=X(),Rq=_e(),jq={message:({params:{missingProperty:e}})=>(0,ja.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,ja._)`{missingProperty: ${e}}`},Aq={keyword:"required",type:"object",schemaType:"array",$data:!0,error:jq,code(e){let{gen:t,schema:r,schemaCode:o,data:n,$data:i,it:s}=e,{opts:a}=s;if(!i&&r.length===0)return;let c=r.length>=a.loopRequired;if(s.allErrors?u():l(),a.strictRequired){let m=e.parentSchema.properties,{definedProperties:p}=e.it;for(let f of r)if(m?.[f]===void 0&&!p.has(f)){let _=s.schemaEnv.baseId+s.errSchemaPath,y=`required property "${f}" is not defined at "${_}" (strictRequired)`;(0,Rq.checkStrictMode)(s,y,s.opts.strictRequired)}}function u(){if(c||i)e.block$data(ja.nil,d);else for(let m of r)(0,Ra.checkReportMissingProp)(e,m)}function l(){let m=t.let("missing");if(c||i){let p=t.let("valid",!0);e.block$data(p,()=>h(m,p)),e.ok(p)}else t.if((0,Ra.checkMissingProp)(e,r,m)),(0,Ra.reportMissingProp)(e,m),t.else()}function d(){t.forOf("prop",o,m=>{e.setParams({missingProperty:m}),t.if((0,Ra.noPropertyInData)(t,n,m,a.ownProperties),()=>e.error())})}function h(m,p){e.setParams({missingProperty:m}),t.forOf(m,o,()=>{t.assign(p,(0,Ra.propertyInData)(t,n,m,a.ownProperties)),t.if((0,ja.not)(p),()=>{e.error(),t.break()})},ja.nil)}}};b_.default=Aq});var mS=w(w_=>{"use strict";Object.defineProperty(w_,"__esModule",{value:!0});var Aa=X(),Dq={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,Aa.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,Aa._)`{limit: ${e}}`},Cq={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Dq,code(e){let{keyword:t,data:r,schemaCode:o}=e,n=t==="maxItems"?Aa.operators.GT:Aa.operators.LT;e.fail$data((0,Aa._)`${r}.length ${n} ${o}`)}};w_.default=Cq});var kd=w($_=>{"use strict";Object.defineProperty($_,"__esModule",{value:!0});var hS=Hs();hS.code='require("ajv/dist/runtime/equal").default';$_.default=hS});var gS=w(x_=>{"use strict";Object.defineProperty(x_,"__esModule",{value:!0});var k_=$a(),Ye=X(),qq=_e(),Mq=kd(),Uq={message:({params:{i:e,j:t}})=>(0,Ye.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Ye._)`{i: ${e}, j: ${t}}`},Lq={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Uq,code(e){let{gen:t,data:r,$data:o,schema:n,parentSchema:i,schemaCode:s,it:a}=e;if(!o&&!n)return;let c=t.let("valid"),u=i.items?(0,k_.getSchemaTypes)(i.items):[];e.block$data(c,l,(0,Ye._)`${s} === false`),e.ok(c);function l(){let p=t.let("i",(0,Ye._)`${r}.length`),f=t.let("j");e.setParams({i:p,j:f}),t.assign(c,!0),t.if((0,Ye._)`${p} > 1`,()=>(d()?h:m)(p,f))}function d(){return u.length>0&&!u.some(p=>p==="object"||p==="array")}function h(p,f){let _=t.name("item"),y=(0,k_.checkDataTypes)(u,_,a.opts.strictNumbers,k_.DataType.Wrong),$=t.const("indices",(0,Ye._)`{}`);t.for((0,Ye._)`;${p}--;`,()=>{t.let(_,(0,Ye._)`${r}[${p}]`),t.if(y,(0,Ye._)`continue`),u.length>1&&t.if((0,Ye._)`typeof ${_} == "string"`,(0,Ye._)`${_} += "_"`),t.if((0,Ye._)`typeof ${$}[${_}] == "number"`,()=>{t.assign(f,(0,Ye._)`${$}[${_}]`),e.error(),t.assign(c,!1).break()}).code((0,Ye._)`${$}[${_}] = ${p}`)})}function m(p,f){let _=(0,qq.useFunc)(t,Mq.default),y=t.name("outer");t.label(y).for((0,Ye._)`;${p}--;`,()=>t.for((0,Ye._)`${f} = ${p}; ${f}--;`,()=>t.if((0,Ye._)`${_}(${r}[${p}], ${r}[${f}])`,()=>{e.error(),t.assign(c,!1).break(y)})))}}};x_.default=Lq});var _S=w(T_=>{"use strict";Object.defineProperty(T_,"__esModule",{value:!0});var S_=X(),Zq=_e(),Vq=kd(),Fq={message:"must be equal to constant",params:({schemaCode:e})=>(0,S_._)`{allowedValue: ${e}}`},Wq={keyword:"const",$data:!0,error:Fq,code(e){let{gen:t,data:r,$data:o,schemaCode:n,schema:i}=e;o||i&&typeof i=="object"?e.fail$data((0,S_._)`!${(0,Zq.useFunc)(t,Vq.default)}(${r}, ${n})`):e.fail((0,S_._)`${i} !== ${r}`)}};T_.default=Wq});var vS=w(P_=>{"use strict";Object.defineProperty(P_,"__esModule",{value:!0});var Da=X(),Gq=_e(),Kq=kd(),Hq={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Da._)`{allowedValues: ${e}}`},Bq={keyword:"enum",schemaType:"array",$data:!0,error:Hq,code(e){let{gen:t,data:r,$data:o,schema:n,schemaCode:i,it:s}=e;if(!o&&n.length===0)throw new Error("enum must have non-empty array");let a=n.length>=s.opts.loopEnum,c,u=()=>c??(c=(0,Gq.useFunc)(t,Kq.default)),l;if(a||o)l=t.let("valid"),e.block$data(l,d);else{if(!Array.isArray(n))throw new Error("ajv implementation error");let m=t.const("vSchema",i);l=(0,Da.or)(...n.map((p,f)=>h(m,f)))}e.pass(l);function d(){t.assign(l,!1),t.forOf("v",i,m=>t.if((0,Da._)`${u()}(${r}, ${m})`,()=>t.assign(l,!0).break()))}function h(m,p){let f=n[p];return typeof f=="object"&&f!==null?(0,Da._)`${u()}(${r}, ${m}[${p}])`:(0,Da._)`${r} === ${f}`}}};P_.default=Bq});var yS=w(z_=>{"use strict";Object.defineProperty(z_,"__esModule",{value:!0});var Jq=sS(),Qq=aS(),Yq=lS(),Xq=dS(),eM=pS(),tM=fS(),rM=mS(),nM=gS(),oM=_S(),iM=vS(),sM=[Jq.default,Qq.default,Yq.default,Xq.default,eM.default,tM.default,rM.default,nM.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},oM.default,iM.default];z_.default=sM});var E_=w(Ca=>{"use strict";Object.defineProperty(Ca,"__esModule",{value:!0});Ca.validateAdditionalItems=void 0;var Gn=X(),I_=_e(),aM={message:({params:{len:e}})=>(0,Gn.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Gn._)`{limit: ${e}}`},cM={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:aM,code(e){let{parentSchema:t,it:r}=e,{items:o}=t;if(!Array.isArray(o)){(0,I_.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}bS(e,o)}};function bS(e,t){let{gen:r,schema:o,data:n,keyword:i,it:s}=e;s.items=!0;let a=r.const("len",(0,Gn._)`${n}.length`);if(o===!1)e.setParams({len:t.length}),e.pass((0,Gn._)`${a} <= ${t.length}`);else if(typeof o=="object"&&!(0,I_.alwaysValidSchema)(s,o)){let u=r.var("valid",(0,Gn._)`${a} <= ${t.length}`);r.if((0,Gn.not)(u),()=>c(u)),e.ok(u)}function c(u){r.forRange("i",t.length,a,l=>{e.subschema({keyword:i,dataProp:l,dataPropType:I_.Type.Num},u),s.allErrors||r.if((0,Gn.not)(u),()=>r.break())})}}Ca.validateAdditionalItems=bS;Ca.default=cM});var N_=w(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});qa.validateTuple=void 0;var wS=X(),xd=_e(),uM=Lt(),lM={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return $S(e,"additionalItems",t);r.items=!0,!(0,xd.alwaysValidSchema)(r,t)&&e.ok((0,uM.validateArray)(e))}};function $S(e,t,r=e.schema){let{gen:o,parentSchema:n,data:i,keyword:s,it:a}=e;l(n),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=xd.mergeEvaluated.items(o,r.length,a.items));let c=o.name("valid"),u=o.const("len",(0,wS._)`${i}.length`);r.forEach((d,h)=>{(0,xd.alwaysValidSchema)(a,d)||(o.if((0,wS._)`${u} > ${h}`,()=>e.subschema({keyword:s,schemaProp:h,dataProp:h},c)),e.ok(c))});function l(d){let{opts:h,errSchemaPath:m}=a,p=r.length,f=p===d.minItems&&(p===d.maxItems||d[t]===!1);if(h.strictTuples&&!f){let _=`"${s}" is ${p}-tuple, but minItems or maxItems/${t} are not specified or different at path "${m}"`;(0,xd.checkStrictMode)(a,_,h.strictTuples)}}}qa.validateTuple=$S;qa.default=lM});var kS=w(O_=>{"use strict";Object.defineProperty(O_,"__esModule",{value:!0});var dM=N_(),pM={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,dM.validateTuple)(e,"items")};O_.default=pM});var SS=w(R_=>{"use strict";Object.defineProperty(R_,"__esModule",{value:!0});var xS=X(),fM=_e(),mM=Lt(),hM=E_(),gM={message:({params:{len:e}})=>(0,xS.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,xS._)`{limit: ${e}}`},_M={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:gM,code(e){let{schema:t,parentSchema:r,it:o}=e,{prefixItems:n}=r;o.items=!0,!(0,fM.alwaysValidSchema)(o,t)&&(n?(0,hM.validateAdditionalItems)(e,n):e.ok((0,mM.validateArray)(e)))}};R_.default=_M});var TS=w(j_=>{"use strict";Object.defineProperty(j_,"__esModule",{value:!0});var Vt=X(),Sd=_e(),vM={message:({params:{min:e,max:t}})=>t===void 0?(0,Vt.str)`must contain at least ${e} valid item(s)`:(0,Vt.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,Vt._)`{minContains: ${e}}`:(0,Vt._)`{minContains: ${e}, maxContains: ${t}}`},yM={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:vM,code(e){let{gen:t,schema:r,parentSchema:o,data:n,it:i}=e,s,a,{minContains:c,maxContains:u}=o;i.opts.next?(s=c===void 0?1:c,a=u):s=1;let l=t.const("len",(0,Vt._)`${n}.length`);if(e.setParams({min:s,max:a}),a===void 0&&s===0){(0,Sd.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,Sd.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Sd.alwaysValidSchema)(i,r)){let f=(0,Vt._)`${l} >= ${s}`;a!==void 0&&(f=(0,Vt._)`${f} && ${l} <= ${a}`),e.pass(f);return}i.items=!0;let d=t.name("valid");a===void 0&&s===1?m(d,()=>t.if(d,()=>t.break())):s===0?(t.let(d,!0),a!==void 0&&t.if((0,Vt._)`${n}.length > 0`,h)):(t.let(d,!1),h()),e.result(d,()=>e.reset());function h(){let f=t.name("_valid"),_=t.let("count",0);m(f,()=>t.if(f,()=>p(_)))}function m(f,_){t.forRange("i",0,l,y=>{e.subschema({keyword:"contains",dataProp:y,dataPropType:Sd.Type.Num,compositeRule:!0},f),_()})}function p(f){t.code((0,Vt._)`${f}++`),a===void 0?t.if((0,Vt._)`${f} >= ${s}`,()=>t.assign(d,!0).break()):(t.if((0,Vt._)`${f} > ${a}`,()=>t.assign(d,!1).break()),s===1?t.assign(d,!0):t.if((0,Vt._)`${f} >= ${s}`,()=>t.assign(d,!0)))}}};j_.default=yM});var IS=w(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.validateSchemaDeps=gr.validatePropertyDeps=gr.error=void 0;var A_=X(),bM=_e(),Ma=Lt();gr.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let o=t===1?"property":"properties";return(0,A_.str)`must have ${o} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:o}})=>(0,A_._)`{property: ${e},
13
+ || ${s} === "boolean" || ${n} === null`).assign(a,(0,Q._)`[${n}]`)}}}function DC({gen:e,parentData:t,parentDataProperty:r},o){e.if((0,Q._)`${t} !== undefined`,()=>e.assign((0,Q._)`${t}[${r}]`,o))}function Kg(e,t,r,o=Xo.Correct){let n=o===Xo.Correct?Q.operators.EQ:Q.operators.NEQ,i;switch(e){case"null":return(0,Q._)`${t} ${n} null`;case"array":i=(0,Q._)`Array.isArray(${t})`;break;case"object":i=(0,Q._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=s((0,Q._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=s();break;default:return(0,Q._)`typeof ${t} ${n} ${e}`}return o===Xo.Correct?i:(0,Q.not)(i);function s(a=Q.nil){return(0,Q.and)((0,Q._)`typeof ${t} == "number"`,a,r?(0,Q._)`isFinite(${t})`:Q.nil)}}ct.checkDataType=Kg;function Bg(e,t,r,o){if(e.length===1)return Kg(e[0],t,r,o);let n,i=(0,dx.toHash)(e);if(i.array&&i.object){let s=(0,Q._)`typeof ${t} != "object"`;n=i.null?s:(0,Q._)`!${t} || ${s}`,delete i.null,delete i.array,delete i.object}else n=Q.nil;i.number&&delete i.integer;for(let s in i)n=(0,Q.and)(n,Kg(s,t,r,o));return n}ct.checkDataTypes=Bg;var qC={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,Q._)`{type: ${e}}`:(0,Q._)`{type: ${t}}`};function Hg(e){let t=MC(e);(0,OC.reportError)(t,qC)}ct.reportTypeError=Hg;function MC(e){let{gen:t,data:r,schema:o}=e,n=(0,dx.schemaRefOrVal)(e,o,"type");return{gen:t,keyword:"type",data:r,schema:o.type,schemaCode:n,schemaValue:n,parentSchema:o,params:{},it:e}}});var hx=w(dd=>{"use strict";Object.defineProperty(dd,"__esModule",{value:!0});dd.assignDefaults=void 0;var ei=X(),UC=me();function LC(e,t){let{properties:r,items:o}=e.schema;if(t==="object"&&r)for(let n in r)mx(e,n,r[n].default);else t==="array"&&Array.isArray(o)&&o.forEach((n,i)=>mx(e,i,n.default))}dd.assignDefaults=LC;function mx(e,t,r){let{gen:o,compositeRule:n,data:i,opts:s}=e;if(r===void 0)return;let a=(0,ei._)`${i}${(0,ei.getProperty)(t)}`;if(n){(0,UC.checkStrictMode)(e,`default is ignored for: ${a}`);return}let c=(0,ei._)`${a} === undefined`;s.useDefaults==="empty"&&(c=(0,ei._)`${c} || ${a} === null || ${a} === ""`),o.if(c,(0,ei._)`${a} = ${(0,ei.stringify)(r)}`)}});var Lt=w(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.validateUnion=Se.validateArray=Se.usePattern=Se.callValidateCode=Se.schemaProperties=Se.allSchemaProperties=Se.noPropertyInData=Se.propertyInData=Se.isOwnProperty=Se.hasPropFunc=Se.reportMissingProp=Se.checkMissingProp=Se.checkReportMissingProp=void 0;var Ae=X(),Jg=me(),on=Rr(),ZC=me();function VC(e,t){let{gen:r,data:o,it:n}=e;r.if(Yg(r,o,t,n.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Ae._)`${t}`},!0),e.error()})}Se.checkReportMissingProp=VC;function FC({gen:e,data:t,it:{opts:r}},o,n){return(0,Ae.or)(...o.map(i=>(0,Ae.and)(Yg(e,t,i,r.ownProperties),(0,Ae._)`${n} = ${i}`)))}Se.checkMissingProp=FC;function WC(e,t){e.setParams({missingProperty:t},!0),e.error()}Se.reportMissingProp=WC;function gx(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Ae._)`Object.prototype.hasOwnProperty`})}Se.hasPropFunc=gx;function Qg(e,t,r){return(0,Ae._)`${gx(e)}.call(${t}, ${r})`}Se.isOwnProperty=Qg;function GC(e,t,r,o){let n=(0,Ae._)`${t}${(0,Ae.getProperty)(r)} !== undefined`;return o?(0,Ae._)`${n} && ${Qg(e,t,r)}`:n}Se.propertyInData=GC;function Yg(e,t,r,o){let n=(0,Ae._)`${t}${(0,Ae.getProperty)(r)} === undefined`;return o?(0,Ae.or)(n,(0,Ae.not)(Qg(e,t,r))):n}Se.noPropertyInData=Yg;function _x(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}Se.allSchemaProperties=_x;function KC(e,t){return _x(t).filter(r=>!(0,Jg.alwaysValidSchema)(e,t[r]))}Se.schemaProperties=KC;function BC({schemaCode:e,data:t,it:{gen:r,topSchemaRef:o,schemaPath:n,errorPath:i},it:s},a,c,u){let l=u?(0,Ae._)`${e}, ${t}, ${o}${n}`:t,d=[[on.default.instancePath,(0,Ae.strConcat)(on.default.instancePath,i)],[on.default.parentData,s.parentData],[on.default.parentDataProperty,s.parentDataProperty],[on.default.rootData,on.default.rootData]];s.opts.dynamicRef&&d.push([on.default.dynamicAnchors,on.default.dynamicAnchors]);let h=(0,Ae._)`${l}, ${r.object(...d)}`;return c!==Ae.nil?(0,Ae._)`${a}.call(${c}, ${h})`:(0,Ae._)`${a}(${h})`}Se.callValidateCode=BC;var HC=(0,Ae._)`new RegExp`;function JC({gen:e,it:{opts:t}},r){let o=t.unicodeRegExp?"u":"",{regExp:n}=t.code,i=n(r,o);return e.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,Ae._)`${n.code==="new RegExp"?HC:(0,ZC.useFunc)(e,n)}(${r}, ${o})`})}Se.usePattern=JC;function QC(e){let{gen:t,data:r,keyword:o,it:n}=e,i=t.name("valid");if(n.allErrors){let a=t.let("valid",!0);return s(()=>t.assign(a,!1)),a}return t.var(i,!0),s(()=>t.break()),i;function s(a){let c=t.const("len",(0,Ae._)`${r}.length`);t.forRange("i",0,c,u=>{e.subschema({keyword:o,dataProp:u,dataPropType:Jg.Type.Num},i),t.if((0,Ae.not)(i),a)})}}Se.validateArray=QC;function YC(e){let{gen:t,schema:r,keyword:o,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,Jg.alwaysValidSchema)(n,c))&&!n.opts.unevaluated)return;let s=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((c,u)=>{let l=e.subschema({keyword:o,schemaProp:u,compositeRule:!0},a);t.assign(s,(0,Ae._)`${s} || ${a}`),e.mergeValidEvaluated(l,a)||t.if((0,Ae.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}Se.validateUnion=YC});var bx=w(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.validateKeywordUsage=mr.validSchemaType=mr.funcKeywordCode=mr.macroKeywordCode=void 0;var ht=X(),Zn=Rr(),XC=Lt(),eD=ka();function tD(e,t){let{gen:r,keyword:o,schema:n,parentSchema:i,it:s}=e,a=t.macro.call(s.self,n,i,s),c=yx(r,o,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let u=r.name("valid");e.subschema({schema:a,schemaPath:ht.nil,errSchemaPath:`${s.errSchemaPath}/${o}`,topSchemaRef:c,compositeRule:!0},u),e.pass(u,()=>e.error(!0))}mr.macroKeywordCode=tD;function rD(e,t){var r;let{gen:o,keyword:n,schema:i,parentSchema:s,$data:a,it:c}=e;oD(c,t);let u=!a&&t.compile?t.compile.call(c.self,i,s,c):t.validate,l=yx(o,n,u),d=o.let("valid");e.block$data(d,h),e.ok((r=t.valid)!==null&&r!==void 0?r:d);function h(){if(t.errors===!1)f(),t.modifying&&vx(e),_(()=>e.error());else{let y=t.async?m():p();t.modifying&&vx(e),_(()=>nD(e,y))}}function m(){let y=o.let("ruleErrs",null);return o.try(()=>f((0,ht._)`await `),$=>o.assign(d,!1).if((0,ht._)`${$} instanceof ${c.ValidationError}`,()=>o.assign(y,(0,ht._)`${$}.errors`),()=>o.throw($))),y}function p(){let y=(0,ht._)`${l}.errors`;return o.assign(y,null),f(ht.nil),y}function f(y=t.async?(0,ht._)`await `:ht.nil){let $=c.opts.passContext?Zn.default.this:Zn.default.self,k=!("compile"in t&&!a||t.schema===!1);o.assign(d,(0,ht._)`${y}${(0,XC.callValidateCode)(e,l,$,k)}`,t.modifying)}function _(y){var $;o.if((0,ht.not)(($=t.valid)!==null&&$!==void 0?$:d),y)}}mr.funcKeywordCode=rD;function vx(e){let{gen:t,data:r,it:o}=e;t.if(o.parentData,()=>t.assign(r,(0,ht._)`${o.parentData}[${o.parentDataProperty}]`))}function nD(e,t){let{gen:r}=e;r.if((0,ht._)`Array.isArray(${t})`,()=>{r.assign(Zn.default.vErrors,(0,ht._)`${Zn.default.vErrors} === null ? ${t} : ${Zn.default.vErrors}.concat(${t})`).assign(Zn.default.errors,(0,ht._)`${Zn.default.vErrors}.length`),(0,eD.extendErrors)(e)},()=>e.error())}function oD({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function yx(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,ht.stringify)(r)})}function iD(e,t,r=!1){return!t.length||t.some(o=>o==="array"?Array.isArray(e):o==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==o||r&&typeof e>"u")}mr.validSchemaType=iD;function sD({schema:e,opts:t,self:r,errSchemaPath:o},n,i){if(Array.isArray(n.keyword)?!n.keyword.includes(i):n.keyword!==i)throw new Error("ajv implementation error");let s=n.dependencies;if(s?.some(a=>!Object.prototype.hasOwnProperty.call(e,a)))throw new Error(`parent schema must have dependencies of ${i}: ${s.join(",")}`);if(n.validateSchema&&!n.validateSchema(e[i])){let c=`keyword "${i}" value is invalid at path "${o}": `+r.errorsText(n.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}mr.validateKeywordUsage=sD});var $x=w(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.extendSubschemaMode=sn.extendSubschemaData=sn.getSubschema=void 0;var hr=X(),wx=me();function aD(e,{keyword:t,schemaProp:r,schema:o,schemaPath:n,errSchemaPath:i,topSchemaRef:s}){if(t!==void 0&&o!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:(0,hr._)`${e.schemaPath}${(0,hr.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:(0,hr._)`${e.schemaPath}${(0,hr.getProperty)(t)}${(0,hr.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,wx.escapeFragment)(r)}`}}if(o!==void 0){if(n===void 0||i===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:n,topSchemaRef:s,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}sn.getSubschema=aD;function cD(e,t,{dataProp:r,dataPropType:o,data:n,dataTypes:i,propertyName:s}){if(n!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=t;if(r!==void 0){let{errorPath:u,dataPathArr:l,opts:d}=t,h=a.let("data",(0,hr._)`${t.data}${(0,hr.getProperty)(r)}`,!0);c(h),e.errorPath=(0,hr.str)`${u}${(0,wx.getErrorPath)(r,o,d.jsPropertySyntax)}`,e.parentDataProperty=(0,hr._)`${r}`,e.dataPathArr=[...l,e.parentDataProperty]}if(n!==void 0){let u=n instanceof hr.Name?n:a.let("data",n,!0);c(u),s!==void 0&&(e.propertyName=s)}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]}}sn.extendSubschemaData=cD;function uD(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:o,createErrors:n,allErrors:i}){o!==void 0&&(e.compositeRule=o),n!==void 0&&(e.createErrors=n),i!==void 0&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r}sn.extendSubschemaMode=uD});var xx=w((JK,kx)=>{"use strict";var an=kx.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var o=typeof r=="function"?r:r.pre||function(){},n=r.post||function(){};pd(t,o,n,e,"",e)};an.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};an.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};an.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};an.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 pd(e,t,r,o,n,i,s,a,c,u){if(o&&typeof o=="object"&&!Array.isArray(o)){t(o,n,i,s,a,c,u);for(var l in o){var d=o[l];if(Array.isArray(d)){if(l in an.arrayKeywords)for(var h=0;h<d.length;h++)pd(e,t,r,d[h],n+"/"+l+"/"+h,i,n,l,o,h)}else if(l in an.propsKeywords){if(d&&typeof d=="object")for(var m in d)pd(e,t,r,d[m],n+"/"+l+"/"+lD(m),i,n,l,o,m)}else(l in an.keywords||e.allKeys&&!(l in an.skipKeywords))&&pd(e,t,r,d,n+"/"+l,i,n,l,o)}r(o,n,i,s,a,c,u)}}function lD(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var Sa=w(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.getSchemaRefs=xt.resolveUrl=xt.normalizeId=xt._getFullPath=xt.getFullPath=xt.inlineRef=void 0;var dD=me(),pD=Js(),fD=xx(),mD=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function hD(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Xg(e):t?Sx(e)<=t:!1}xt.inlineRef=hD;var gD=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Xg(e){for(let t in e){if(gD.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(Xg)||typeof r=="object"&&Xg(r))return!0}return!1}function Sx(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!mD.has(r)&&(typeof e[r]=="object"&&(0,dD.eachItem)(e[r],o=>t+=Sx(o)),t===1/0))return 1/0}return t}function Tx(e,t="",r){r!==!1&&(t=ti(t));let o=e.parse(t);return Px(e,o)}xt.getFullPath=Tx;function Px(e,t){return e.serialize(t).split("#")[0]+"#"}xt._getFullPath=Px;var _D=/#\/?$/;function ti(e){return e?e.replace(_D,""):""}xt.normalizeId=ti;function vD(e,t,r){return r=ti(r),e.resolve(t,r)}xt.resolveUrl=vD;var yD=/^[a-z_][-a-z0-9._]*$/i;function bD(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:o}=this.opts,n=ti(e[r]||t),i={"":n},s=Tx(o,n,!1),a={},c=new Set;return fD(e,{allKeys:!0},(d,h,m,p)=>{if(p===void 0)return;let f=s+h,_=i[p];typeof d[r]=="string"&&(_=y.call(this,d[r])),$.call(this,d.$anchor),$.call(this,d.$dynamicAnchor),i[h]=_;function y(k){let N=this.opts.uriResolver.resolve;if(k=ti(_?N(_,k):k),c.has(k))throw l(k);c.add(k);let P=this.refs[k];return typeof P=="string"&&(P=this.refs[P]),typeof P=="object"?u(d,P.schema,k):k!==ti(f)&&(k[0]==="#"?(u(d,a[k],k),a[k]=d):this.refs[k]=f),k}function $(k){if(typeof k=="string"){if(!yD.test(k))throw new Error(`invalid anchor "${k}"`);y.call(this,`#${k}`)}}}),a;function u(d,h,m){if(h!==void 0&&!pD(d,h))throw l(m)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}xt.getSchemaRefs=bD});var za=w(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.getData=cn.KeywordCxt=cn.validateFunctionCode=void 0;var Ox=cx(),zx=xa(),t_=Gg(),fd=xa(),wD=hx(),Pa=bx(),e_=$x(),Z=X(),B=Rr(),$D=Sa(),jr=me(),Ta=ka();function kD(e){if(Ax(e)&&(Cx(e),jx(e))){TD(e);return}Rx(e,()=>(0,Ox.topBoolOrEmptySchema)(e))}cn.validateFunctionCode=kD;function Rx({gen:e,validateName:t,schema:r,schemaEnv:o,opts:n},i){n.code.es5?e.func(t,(0,Z._)`${B.default.data}, ${B.default.valCxt}`,o.$async,()=>{e.code((0,Z._)`"use strict"; ${Ex(r,n)}`),SD(e,n),e.code(i)}):e.func(t,(0,Z._)`${B.default.data}, ${xD(n)}`,o.$async,()=>e.code(Ex(r,n)).code(i))}function xD(e){return(0,Z._)`{${B.default.instancePath}="", ${B.default.parentData}, ${B.default.parentDataProperty}, ${B.default.rootData}=${B.default.data}${e.dynamicRef?(0,Z._)`, ${B.default.dynamicAnchors}={}`:Z.nil}}={}`}function SD(e,t){e.if(B.default.valCxt,()=>{e.var(B.default.instancePath,(0,Z._)`${B.default.valCxt}.${B.default.instancePath}`),e.var(B.default.parentData,(0,Z._)`${B.default.valCxt}.${B.default.parentData}`),e.var(B.default.parentDataProperty,(0,Z._)`${B.default.valCxt}.${B.default.parentDataProperty}`),e.var(B.default.rootData,(0,Z._)`${B.default.valCxt}.${B.default.rootData}`),t.dynamicRef&&e.var(B.default.dynamicAnchors,(0,Z._)`${B.default.valCxt}.${B.default.dynamicAnchors}`)},()=>{e.var(B.default.instancePath,(0,Z._)`""`),e.var(B.default.parentData,(0,Z._)`undefined`),e.var(B.default.parentDataProperty,(0,Z._)`undefined`),e.var(B.default.rootData,B.default.data),t.dynamicRef&&e.var(B.default.dynamicAnchors,(0,Z._)`{}`)})}function TD(e){let{schema:t,opts:r,gen:o}=e;Rx(e,()=>{r.$comment&&t.$comment&&qx(e),ND(e),o.let(B.default.vErrors,null),o.let(B.default.errors,0),r.unevaluated&&PD(e),Dx(e),jD(e)})}function PD(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,Z._)`${r}.evaluated`),t.if((0,Z._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,Z._)`${e.evaluated}.props`,(0,Z._)`undefined`)),t.if((0,Z._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,Z._)`${e.evaluated}.items`,(0,Z._)`undefined`))}function Ex(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,Z._)`/*# sourceURL=${r} */`:Z.nil}function zD(e,t){if(Ax(e)&&(Cx(e),jx(e))){ED(e,t);return}(0,Ox.boolOrEmptySchema)(e,t)}function jx({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function Ax(e){return typeof e.schema!="boolean"}function ED(e,t){let{schema:r,gen:o,opts:n}=e;n.$comment&&r.$comment&&qx(e),OD(e),RD(e);let i=o.const("_errs",B.default.errors);Dx(e,i),o.var(t,(0,Z._)`${i} === ${B.default.errors}`)}function Cx(e){(0,jr.checkUnknownRules)(e),ID(e)}function Dx(e,t){if(e.opts.jtd)return Ix(e,[],!1,t);let r=(0,zx.getSchemaTypes)(e.schema),o=(0,zx.coerceAndCheckDataType)(e,r);Ix(e,r,!o,t)}function ID(e){let{schema:t,errSchemaPath:r,opts:o,self:n}=e;t.$ref&&o.ignoreKeywordsWithRef&&(0,jr.schemaHasRulesButRef)(t,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function ND(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,jr.checkStrictMode)(e,"default is ignored in the schema root")}function OD(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,$D.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function RD(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function qx({gen:e,schemaEnv:t,schema:r,errSchemaPath:o,opts:n}){let i=r.$comment;if(n.$comment===!0)e.code((0,Z._)`${B.default.self}.logger.log(${i})`);else if(typeof n.$comment=="function"){let s=(0,Z.str)`${o}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,Z._)`${B.default.self}.opts.$comment(${i}, ${s}, ${a}.schema)`)}}function jD(e){let{gen:t,schemaEnv:r,validateName:o,ValidationError:n,opts:i}=e;r.$async?t.if((0,Z._)`${B.default.errors} === 0`,()=>t.return(B.default.data),()=>t.throw((0,Z._)`new ${n}(${B.default.vErrors})`)):(t.assign((0,Z._)`${o}.errors`,B.default.vErrors),i.unevaluated&&AD(e),t.return((0,Z._)`${B.default.errors} === 0`))}function AD({gen:e,evaluated:t,props:r,items:o}){r instanceof Z.Name&&e.assign((0,Z._)`${t}.props`,r),o instanceof Z.Name&&e.assign((0,Z._)`${t}.items`,o)}function Ix(e,t,r,o){let{gen:n,schema:i,data:s,allErrors:a,opts:c,self:u}=e,{RULES:l}=u;if(i.$ref&&(c.ignoreKeywordsWithRef||!(0,jr.schemaHasRulesButRef)(i,l))){n.block(()=>Ux(e,"$ref",l.all.$ref.definition));return}c.jtd||CD(e,t),n.block(()=>{for(let h of l.rules)d(h);d(l.post)});function d(h){(0,t_.shouldUseGroup)(i,h)&&(h.type?(n.if((0,fd.checkDataType)(h.type,s,c.strictNumbers)),Nx(e,h),t.length===1&&t[0]===h.type&&r&&(n.else(),(0,fd.reportTypeError)(e)),n.endIf()):Nx(e,h),a||n.if((0,Z._)`${B.default.errors} === ${o||0}`))}}function Nx(e,t){let{gen:r,schema:o,opts:{useDefaults:n}}=e;n&&(0,wD.assignDefaults)(e,t.type),r.block(()=>{for(let i of t.rules)(0,t_.shouldUseRule)(o,i)&&Ux(e,i.keyword,i.definition,t.type)})}function CD(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(DD(e,t),e.opts.allowUnionTypes||qD(e,t),MD(e,e.dataTypes))}function DD(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{Mx(e.dataTypes,r)||r_(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),LD(e,t)}}function qD(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&r_(e,"use allowUnionTypes to allow union type keyword")}function MD(e,t){let r=e.self.RULES.all;for(let o in r){let n=r[o];if(typeof n=="object"&&(0,t_.shouldUseRule)(e.schema,n)){let{type:i}=n.definition;i.length&&!i.some(s=>UD(t,s))&&r_(e,`missing type "${i.join(",")}" for keyword "${o}"`)}}}function UD(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function Mx(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function LD(e,t){let r=[];for(let o of e.dataTypes)Mx(t,o)?r.push(o):t.includes("integer")&&o==="number"&&r.push("integer");e.dataTypes=r}function r_(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,jr.checkStrictMode)(e,t,e.opts.strictTypes)}var md=class{constructor(t,r,o){if((0,Pa.validateKeywordUsage)(t,r,o),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=o,this.data=t.data,this.schema=t.schema[o],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,jr.schemaRefOrVal)(t,this.schema,o,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",Lx(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Pa.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${o} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",B.default.errors))}result(t,r,o){this.failResult((0,Z.not)(t),r,o)}failResult(t,r,o){this.gen.if(t),o?o():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,Z.not)(t),void 0,r)}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:r}=this;this.fail((0,Z._)`${r} !== undefined && (${(0,Z.or)(this.invalid$data(),t)})`)}error(t,r,o){if(r){this.setParams(r),this._error(t,o),this.setParams({});return}this._error(t,o)}_error(t,r){(t?Ta.reportExtraError:Ta.reportError)(this,this.def.error,r)}$dataError(){(0,Ta.reportError)(this,this.def.$dataError||Ta.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Ta.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,o=Z.nil){this.gen.block(()=>{this.check$data(t,o),r()})}check$data(t=Z.nil,r=Z.nil){if(!this.$data)return;let{gen:o,schemaCode:n,schemaType:i,def:s}=this;o.if((0,Z.or)((0,Z._)`${n} === undefined`,r)),t!==Z.nil&&o.assign(t,!0),(i.length||s.validateSchema)&&(o.elseIf(this.invalid$data()),this.$dataError(),t!==Z.nil&&o.assign(t,!1)),o.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:o,def:n,it:i}=this;return(0,Z.or)(s(),a());function s(){if(o.length){if(!(r instanceof Z.Name))throw new Error("ajv implementation error");let c=Array.isArray(o)?o:[o];return(0,Z._)`${(0,fd.checkDataTypes)(c,r,i.opts.strictNumbers,fd.DataType.Wrong)}`}return Z.nil}function a(){if(n.validateSchema){let c=t.scopeValue("validate$data",{ref:n.validateSchema});return(0,Z._)`!${c}(${r})`}return Z.nil}}subschema(t,r){let o=(0,e_.getSubschema)(this.it,t);(0,e_.extendSubschemaData)(o,this.it,t),(0,e_.extendSubschemaMode)(o,t);let n={...this.it,...o,items:void 0,props:void 0};return zD(n,r),n}mergeEvaluated(t,r){let{it:o,gen:n}=this;o.opts.unevaluated&&(o.props!==!0&&t.props!==void 0&&(o.props=jr.mergeEvaluated.props(n,t.props,o.props,r)),o.items!==!0&&t.items!==void 0&&(o.items=jr.mergeEvaluated.items(n,t.items,o.items,r)))}mergeValidEvaluated(t,r){let{it:o,gen:n}=this;if(o.opts.unevaluated&&(o.props!==!0||o.items!==!0))return n.if(r,()=>this.mergeEvaluated(t,Z.Name)),!0}};cn.KeywordCxt=md;function Ux(e,t,r,o){let n=new md(e,r,t);"code"in r?r.code(n,o):n.$data&&r.validate?(0,Pa.funcKeywordCode)(n,r):"macro"in r?(0,Pa.macroKeywordCode)(n,r):(r.compile||r.validate)&&(0,Pa.funcKeywordCode)(n,r)}var ZD=/^\/(?:[^~]|~0|~1)*$/,VD=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Lx(e,{dataLevel:t,dataNames:r,dataPathArr:o}){let n,i;if(e==="")return B.default.rootData;if(e[0]==="/"){if(!ZD.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);n=e,i=B.default.rootData}else{let u=VD.exec(e);if(!u)throw new Error(`Invalid JSON-pointer: ${e}`);let l=+u[1];if(n=u[2],n==="#"){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=r[t-l],!n)return i}let s=i,a=n.split("/");for(let u of a)u&&(i=(0,Z._)`${i}${(0,Z.getProperty)((0,jr.unescapeJsonPointer)(u))}`,s=(0,Z._)`${s} && ${i}`);return s;function c(u,l){return`Cannot access ${u} ${l} levels up, current level is ${t}`}}cn.getData=Lx});var hd=w(o_=>{"use strict";Object.defineProperty(o_,"__esModule",{value:!0});var n_=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};o_.default=n_});var Ea=w(a_=>{"use strict";Object.defineProperty(a_,"__esModule",{value:!0});var i_=Sa(),s_=class extends Error{constructor(t,r,o,n){super(n||`can't resolve reference ${o} from id ${r}`),this.missingRef=(0,i_.resolveUrl)(t,r,o),this.missingSchema=(0,i_.normalizeId)((0,i_.getFullPath)(t,this.missingRef))}};a_.default=s_});var _d=w(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.resolveSchema=Zt.getCompilingSchema=Zt.resolveRef=Zt.compileSchema=Zt.SchemaEnv=void 0;var tr=X(),FD=hd(),Vn=Rr(),rr=Sa(),Zx=me(),WD=za(),ri=class{constructor(t){var r;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=(r=t.baseId)!==null&&r!==void 0?r:(0,rr.normalizeId)(o?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=o?.$async,this.refs={}}};Zt.SchemaEnv=ri;function u_(e){let t=Vx.call(this,e);if(t)return t;let r=(0,rr.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:o,lines:n}=this.opts.code,{ownProperties:i}=this.opts,s=new tr.CodeGen(this.scope,{es5:o,lines:n,ownProperties:i}),a;e.$async&&(a=s.scopeValue("Error",{ref:FD.default,code:(0,tr._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");e.validateName=c;let u={gen:s,allErrors:this.opts.allErrors,data:Vn.default.data,parentData:Vn.default.parentData,parentDataProperty:Vn.default.parentDataProperty,dataNames:[Vn.default.data],dataPathArr:[tr.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,tr.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:tr.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,tr._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(e),(0,WD.validateFunctionCode)(u),s.optimize(this.opts.code.optimize);let d=s.toString();l=`${s.scopeRefs(Vn.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,e));let m=new Function(`${Vn.default.self}`,`${Vn.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=e.schema,m.schemaEnv=e,e.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:c,validateCode:d,scopeValues:s._values}),this.opts.unevaluated){let{props:p,items:f}=u;m.evaluated={props:p instanceof tr.Name?void 0:p,items:f instanceof tr.Name?void 0:f,dynamicProps:p instanceof tr.Name,dynamicItems:f instanceof tr.Name},m.source&&(m.source.evaluated=(0,tr.stringify)(m.evaluated))}return e.validate=m,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)}}Zt.compileSchema=u_;function GD(e,t,r){var o;r=(0,rr.resolveUrl)(this.opts.uriResolver,t,r);let n=e.refs[r];if(n)return n;let i=HD.call(this,e,r);if(i===void 0){let s=(o=e.localRefs)===null||o===void 0?void 0:o[r],{schemaId:a}=this.opts;s&&(i=new ri({schema:s,schemaId:a,root:e,baseId:t}))}if(i!==void 0)return e.refs[r]=KD.call(this,i)}Zt.resolveRef=GD;function KD(e){return(0,rr.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:u_.call(this,e)}function Vx(e){for(let t of this._compilations)if(BD(t,e))return t}Zt.getCompilingSchema=Vx;function BD(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function HD(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||gd.call(this,e,t)}function gd(e,t){let r=this.opts.uriResolver.parse(t),o=(0,rr._getFullPath)(this.opts.uriResolver,r),n=(0,rr.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&o===n)return c_.call(this,r,e);let i=(0,rr.normalizeId)(o),s=this.refs[i]||this.schemas[i];if(typeof s=="string"){let a=gd.call(this,e,s);return typeof a?.schema!="object"?void 0:c_.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||u_.call(this,s),i===(0,rr.normalizeId)(t)){let{schema:a}=s,{schemaId:c}=this.opts,u=a[c];return u&&(n=(0,rr.resolveUrl)(this.opts.uriResolver,n,u)),new ri({schema:a,schemaId:c,root:e,baseId:n})}return c_.call(this,r,s)}}Zt.resolveSchema=gd;var JD=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function c_(e,{baseId:t,schema:r,root:o}){var n;if(((n=e.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,Zx.unescapeFragment)(a)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!JD.has(a)&&u&&(t=(0,rr.resolveUrl)(this.opts.uriResolver,t,u))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,Zx.schemaHasRulesButRef)(r,this.RULES)){let a=(0,rr.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=gd.call(this,o,a)}let{schemaId:s}=this.opts;if(i=i||new ri({schema:r,schemaId:s,root:o,baseId:t}),i.schema!==i.root.schema)return i}});var Fx=w((r3,QD)=>{QD.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 Gx=w(l_=>{"use strict";Object.defineProperty(l_,"__esModule",{value:!0});var Wx=Th();Wx.code='require("ajv/dist/runtime/uri").default';l_.default=Wx});var eS=w(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.CodeGen=Ye.Name=Ye.nil=Ye.stringify=Ye.str=Ye._=Ye.KeywordCxt=void 0;var YD=za();Object.defineProperty(Ye,"KeywordCxt",{enumerable:!0,get:function(){return YD.KeywordCxt}});var ni=X();Object.defineProperty(Ye,"_",{enumerable:!0,get:function(){return ni._}});Object.defineProperty(Ye,"str",{enumerable:!0,get:function(){return ni.str}});Object.defineProperty(Ye,"stringify",{enumerable:!0,get:function(){return ni.stringify}});Object.defineProperty(Ye,"nil",{enumerable:!0,get:function(){return ni.nil}});Object.defineProperty(Ye,"Name",{enumerable:!0,get:function(){return ni.Name}});Object.defineProperty(Ye,"CodeGen",{enumerable:!0,get:function(){return ni.CodeGen}});var XD=hd(),Qx=Ea(),eq=Wg(),Ia=_d(),tq=X(),Na=Sa(),vd=xa(),p_=me(),Kx=Fx(),rq=Gx(),Yx=(e,t)=>new RegExp(e,t);Yx.code="new RegExp";var nq=["removeAdditional","useDefaults","coerceTypes"],oq=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),iq={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."},sq={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Bx=200;function aq(e){var t,r,o,n,i,s,a,c,u,l,d,h,m,p,f,_,y,$,k,N,P,ze,Me,ir,pn;let Ft=e.strict,fn=(t=e.code)===null||t===void 0?void 0:t.optimize,pi=fn===!0||fn===void 0?1:fn||0,fi=(o=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&o!==void 0?o:Yx,Vd=(n=e.uriResolver)!==null&&n!==void 0?n:rq.default;return{strictSchema:(s=(i=e.strictSchema)!==null&&i!==void 0?i:Ft)!==null&&s!==void 0?s:!0,strictNumbers:(c=(a=e.strictNumbers)!==null&&a!==void 0?a:Ft)!==null&&c!==void 0?c:!0,strictTypes:(l=(u=e.strictTypes)!==null&&u!==void 0?u:Ft)!==null&&l!==void 0?l:"log",strictTuples:(h=(d=e.strictTuples)!==null&&d!==void 0?d:Ft)!==null&&h!==void 0?h:"log",strictRequired:(p=(m=e.strictRequired)!==null&&m!==void 0?m:Ft)!==null&&p!==void 0?p:!1,code:e.code?{...e.code,optimize:pi,regExp:fi}:{optimize:pi,regExp:fi},loopRequired:(f=e.loopRequired)!==null&&f!==void 0?f:Bx,loopEnum:(_=e.loopEnum)!==null&&_!==void 0?_:Bx,meta:(y=e.meta)!==null&&y!==void 0?y:!0,messages:($=e.messages)!==null&&$!==void 0?$:!0,inlineRefs:(k=e.inlineRefs)!==null&&k!==void 0?k:!0,schemaId:(N=e.schemaId)!==null&&N!==void 0?N:"$id",addUsedSchema:(P=e.addUsedSchema)!==null&&P!==void 0?P:!0,validateSchema:(ze=e.validateSchema)!==null&&ze!==void 0?ze:!0,validateFormats:(Me=e.validateFormats)!==null&&Me!==void 0?Me:!0,unicodeRegExp:(ir=e.unicodeRegExp)!==null&&ir!==void 0?ir:!0,int32range:(pn=e.int32range)!==null&&pn!==void 0?pn:!0,uriResolver:Vd}}var Oa=class{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...aq(t)};let{es5:r,lines:o}=this.opts.code;this.scope=new tq.ValueScope({scope:{},prefixes:oq,es5:r,lines:o}),this.logger=fq(t.logger);let n=t.validateFormats;t.validateFormats=!1,this.RULES=(0,eq.getRules)(),Hx.call(this,iq,t,"NOT SUPPORTED"),Hx.call(this,sq,t,"DEPRECATED","warn"),this._metaOpts=dq.call(this),t.formats&&uq.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&lq.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),cq.call(this),t.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:o}=this.opts,n=Kx;o==="id"&&(n={...Kx},n.id=n.$id,delete n.$id),r&&t&&this.addMetaSchema(n,n[o],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){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 n=o(r);return"$async"in o||(this.errors=o.errors),n}compile(t,r){let o=this._addSchema(t,r);return o.validate||this._compileSchemaEnv(o)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:o}=this.opts;return n.call(this,t,r);async function n(l,d){await i.call(this,l.$schema);let h=this._addSchema(l,d);return h.validate||s.call(this,h)}async function i(l){l&&!this.getSchema(l)&&await n.call(this,{$ref:l},!0)}async function s(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof Qx.default))throw d;return a.call(this,d),await c.call(this,d.missingSchema),s.call(this,l)}}function a({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,r)}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,r,o,n=this.opts.validateSchema){if(Array.isArray(t)){for(let s of t)this.addSchema(s,void 0,o,n);return this}let i;if(typeof t=="object"){let{schemaId:s}=this.opts;if(i=t[s],i!==void 0&&typeof i!="string")throw new Error(`schema ${s} must be string`)}return r=(0,Na.normalizeId)(r||i),this._checkUnique(r),this.schemas[r]=this._addSchema(t,o,r,n,!0),this}addMetaSchema(t,r,o=this.opts.validateSchema){return this.addSchema(t,r,!0,o),this}validateSchema(t,r){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 n=this.validate(o,t);if(!n&&r){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw new Error(i)}return n}getSchema(t){let r;for(;typeof(r=Jx.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:o}=this.opts,n=new Ia.SchemaEnv({schema:{},schemaId:o});if(r=Ia.resolveSchema.call(this,n,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}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 r=Jx.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let o=t[this.opts.schemaId];return o&&(o=(0,Na.normalizeId)(o),delete this.schemas[o],delete this.refs[o]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let o;if(typeof t=="string")o=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=o);else if(typeof t=="object"&&r===void 0){if(r=t,o=r.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(hq.call(this,o,r),!r)return(0,p_.eachItem)(o,i=>d_.call(this,i)),this;_q.call(this,r);let n={...r,type:(0,vd.getJSONTypes)(r.type),schemaType:(0,vd.getJSONTypes)(r.schemaType)};return(0,p_.eachItem)(o,n.type.length===0?i=>d_.call(this,i,n):i=>n.type.forEach(s=>d_.call(this,i,n,s))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let o of r.rules){let n=o.rules.findIndex(i=>i.keyword===t);n>=0&&o.rules.splice(n,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:o="data"}={}){return!t||t.length===0?"No errors":t.map(n=>`${o}${n.instancePath} ${n.message}`).reduce((n,i)=>n+r+i)}$dataMetaSchema(t,r){let o=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let n of r){let i=n.split("/").slice(1),s=t;for(let a of i)s=s[a];for(let a in o){let c=o[a];if(typeof c!="object")continue;let{$data:u}=c.definition,l=s[a];u&&l&&(s[a]=Xx(l))}}return t}_removeAllSchemas(t,r){for(let o in t){let n=t[o];(!r||r.test(o))&&(typeof n=="string"?delete t[o]:n&&!n.meta&&(this._cache.delete(n.schema),delete t[o]))}}_addSchema(t,r,o,n=this.opts.validateSchema,i=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof t=="object")s=t[a];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,Na.normalizeId)(s||o);let u=Na.getSchemaRefs.call(this,t,o);return c=new Ia.SchemaEnv({schema:t,schemaId:a,meta:r,baseId:o,localRefs:u}),this._cache.set(c.schema,c),i&&!o.startsWith("#")&&(o&&this._checkUnique(o),this.refs[o]=c),n&&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):Ia.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{Ia.compileSchema.call(this,t)}finally{this.opts=r}}};Oa.ValidationError=XD.default;Oa.MissingRefError=Qx.default;Ye.default=Oa;function Hx(e,t,r,o="error"){for(let n in e){let i=n;i in t&&this.logger[o](`${r}: option ${n}. ${e[i]}`)}}function Jx(e){return e=(0,Na.normalizeId)(e),this.schemas[e]||this.refs[e]}function cq(){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 uq(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function lq(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 r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function dq(){let e={...this.opts};for(let t of nq)delete e[t];return e}var pq={log(){},warn(){},error(){}};function fq(e){if(e===!1)return pq;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 mq=/^[a-z_$][a-z0-9_$:-]*$/i;function hq(e,t){let{RULES:r}=this;if((0,p_.eachItem)(e,o=>{if(r.keywords[o])throw new Error(`Keyword ${o} is already defined`);if(!mq.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 d_(e,t,r){var o;let n=t?.post;if(r&&n)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,s=n?i.post:i.rules.find(({type:c})=>c===r);if(s||(s={type:r,rules:[]},i.rules.push(s)),i.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,vd.getJSONTypes)(t.type),schemaType:(0,vd.getJSONTypes)(t.schemaType)}};t.before?gq.call(this,s,a,t.before):s.rules.push(a),i.all[e]=a,(o=t.implements)===null||o===void 0||o.forEach(c=>this.addKeyword(c))}function gq(e,t,r){let o=e.rules.findIndex(n=>n.keyword===r);o>=0?e.rules.splice(o,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function _q(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=Xx(t)),e.validateSchema=this.compile(t,!0))}var vq={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Xx(e){return{anyOf:[e,vq]}}});var tS=w(f_=>{"use strict";Object.defineProperty(f_,"__esModule",{value:!0});var yq={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};f_.default=yq});var iS=w(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.callRef=Fn.getValidate=void 0;var bq=Ea(),rS=Lt(),St=X(),oi=Rr(),nS=_d(),yd=me(),wq={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:o}=e,{baseId:n,schemaEnv:i,validateName:s,opts:a,self:c}=o,{root:u}=i;if((r==="#"||r==="#/")&&n===u.baseId)return d();let l=nS.resolveRef.call(c,u,n,r);if(l===void 0)throw new bq.default(o.opts.uriResolver,n,r);if(l instanceof nS.SchemaEnv)return h(l);return m(l);function d(){if(i===u)return bd(e,s,i,i.$async);let p=t.scopeValue("root",{ref:u});return bd(e,(0,St._)`${p}.validate`,u,u.$async)}function h(p){let f=oS(e,p);bd(e,f,p,p.$async)}function m(p){let f=t.scopeValue("schema",a.code.source===!0?{ref:p,code:(0,St.stringify)(p)}:{ref:p}),_=t.name("valid"),y=e.subschema({schema:p,dataTypes:[],schemaPath:St.nil,topSchemaRef:f,errSchemaPath:r},_);e.mergeEvaluated(y),e.ok(_)}}};function oS(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,St._)`${r.scopeValue("wrapper",{ref:t})}.validate`}Fn.getValidate=oS;function bd(e,t,r,o){let{gen:n,it:i}=e,{allErrors:s,schemaEnv:a,opts:c}=i,u=c.passContext?oi.default.this:St.nil;o?l():d();function l(){if(!a.$async)throw new Error("async schema referenced by sync schema");let p=n.let("valid");n.try(()=>{n.code((0,St._)`await ${(0,rS.callValidateCode)(e,t,u)}`),m(t),s||n.assign(p,!0)},f=>{n.if((0,St._)`!(${f} instanceof ${i.ValidationError})`,()=>n.throw(f)),h(f),s||n.assign(p,!1)}),e.ok(p)}function d(){e.result((0,rS.callValidateCode)(e,t,u),()=>m(t),()=>h(t))}function h(p){let f=(0,St._)`${p}.errors`;n.assign(oi.default.vErrors,(0,St._)`${oi.default.vErrors} === null ? ${f} : ${oi.default.vErrors}.concat(${f})`),n.assign(oi.default.errors,(0,St._)`${oi.default.vErrors}.length`)}function m(p){var f;if(!i.opts.unevaluated)return;let _=(f=r?.validate)===null||f===void 0?void 0:f.evaluated;if(i.props!==!0)if(_&&!_.dynamicProps)_.props!==void 0&&(i.props=yd.mergeEvaluated.props(n,_.props,i.props));else{let y=n.var("props",(0,St._)`${p}.evaluated.props`);i.props=yd.mergeEvaluated.props(n,y,i.props,St.Name)}if(i.items!==!0)if(_&&!_.dynamicItems)_.items!==void 0&&(i.items=yd.mergeEvaluated.items(n,_.items,i.items));else{let y=n.var("items",(0,St._)`${p}.evaluated.items`);i.items=yd.mergeEvaluated.items(n,y,i.items,St.Name)}}}Fn.callRef=bd;Fn.default=wq});var sS=w(m_=>{"use strict";Object.defineProperty(m_,"__esModule",{value:!0});var $q=tS(),kq=iS(),xq=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",$q.default,kq.default];m_.default=xq});var aS=w(h_=>{"use strict";Object.defineProperty(h_,"__esModule",{value:!0});var wd=X(),un=wd.operators,$d={maximum:{okStr:"<=",ok:un.LTE,fail:un.GT},minimum:{okStr:">=",ok:un.GTE,fail:un.LT},exclusiveMaximum:{okStr:"<",ok:un.LT,fail:un.GTE},exclusiveMinimum:{okStr:">",ok:un.GT,fail:un.LTE}},Sq={message:({keyword:e,schemaCode:t})=>(0,wd.str)`must be ${$d[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,wd._)`{comparison: ${$d[e].okStr}, limit: ${t}}`},Tq={keyword:Object.keys($d),type:"number",schemaType:"number",$data:!0,error:Sq,code(e){let{keyword:t,data:r,schemaCode:o}=e;e.fail$data((0,wd._)`${r} ${$d[t].fail} ${o} || isNaN(${r})`)}};h_.default=Tq});var cS=w(g_=>{"use strict";Object.defineProperty(g_,"__esModule",{value:!0});var Ra=X(),Pq={message:({schemaCode:e})=>(0,Ra.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Ra._)`{multipleOf: ${e}}`},zq={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Pq,code(e){let{gen:t,data:r,schemaCode:o,it:n}=e,i=n.opts.multipleOfPrecision,s=t.let("res"),a=i?(0,Ra._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${i}`:(0,Ra._)`${s} !== parseInt(${s})`;e.fail$data((0,Ra._)`(${o} === 0 || (${s} = ${r}/${o}, ${a}))`)}};g_.default=zq});var lS=w(__=>{"use strict";Object.defineProperty(__,"__esModule",{value:!0});function uS(e){let t=e.length,r=0,o=0,n;for(;o<t;)r++,n=e.charCodeAt(o++),n>=55296&&n<=56319&&o<t&&(n=e.charCodeAt(o),(n&64512)===56320&&o++);return r}__.default=uS;uS.code='require("ajv/dist/runtime/ucs2length").default'});var dS=w(v_=>{"use strict";Object.defineProperty(v_,"__esModule",{value:!0});var Wn=X(),Eq=me(),Iq=lS(),Nq={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Wn.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Wn._)`{limit: ${e}}`},Oq={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Nq,code(e){let{keyword:t,data:r,schemaCode:o,it:n}=e,i=t==="maxLength"?Wn.operators.GT:Wn.operators.LT,s=n.opts.unicode===!1?(0,Wn._)`${r}.length`:(0,Wn._)`${(0,Eq.useFunc)(e.gen,Iq.default)}(${r})`;e.fail$data((0,Wn._)`${s} ${i} ${o}`)}};v_.default=Oq});var pS=w(y_=>{"use strict";Object.defineProperty(y_,"__esModule",{value:!0});var Rq=Lt(),jq=me(),ii=X(),Aq={message:({schemaCode:e})=>(0,ii.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,ii._)`{pattern: ${e}}`},Cq={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Aq,code(e){let{gen:t,data:r,$data:o,schema:n,schemaCode:i,it:s}=e,a=s.opts.unicodeRegExp?"u":"";if(o){let{regExp:c}=s.opts.code,u=c.code==="new RegExp"?(0,ii._)`new RegExp`:(0,jq.useFunc)(t,c),l=t.let("valid");t.try(()=>t.assign(l,(0,ii._)`${u}(${i}, ${a}).test(${r})`),()=>t.assign(l,!1)),e.fail$data((0,ii._)`!${l}`)}else{let c=(0,Rq.usePattern)(e,n);e.fail$data((0,ii._)`!${c}.test(${r})`)}}};y_.default=Cq});var fS=w(b_=>{"use strict";Object.defineProperty(b_,"__esModule",{value:!0});var ja=X(),Dq={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,ja.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,ja._)`{limit: ${e}}`},qq={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:Dq,code(e){let{keyword:t,data:r,schemaCode:o}=e,n=t==="maxProperties"?ja.operators.GT:ja.operators.LT;e.fail$data((0,ja._)`Object.keys(${r}).length ${n} ${o}`)}};b_.default=qq});var mS=w(w_=>{"use strict";Object.defineProperty(w_,"__esModule",{value:!0});var Aa=Lt(),Ca=X(),Mq=me(),Uq={message:({params:{missingProperty:e}})=>(0,Ca.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Ca._)`{missingProperty: ${e}}`},Lq={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Uq,code(e){let{gen:t,schema:r,schemaCode:o,data:n,$data:i,it:s}=e,{opts:a}=s;if(!i&&r.length===0)return;let c=r.length>=a.loopRequired;if(s.allErrors?u():l(),a.strictRequired){let m=e.parentSchema.properties,{definedProperties:p}=e.it;for(let f of r)if(m?.[f]===void 0&&!p.has(f)){let _=s.schemaEnv.baseId+s.errSchemaPath,y=`required property "${f}" is not defined at "${_}" (strictRequired)`;(0,Mq.checkStrictMode)(s,y,s.opts.strictRequired)}}function u(){if(c||i)e.block$data(Ca.nil,d);else for(let m of r)(0,Aa.checkReportMissingProp)(e,m)}function l(){let m=t.let("missing");if(c||i){let p=t.let("valid",!0);e.block$data(p,()=>h(m,p)),e.ok(p)}else t.if((0,Aa.checkMissingProp)(e,r,m)),(0,Aa.reportMissingProp)(e,m),t.else()}function d(){t.forOf("prop",o,m=>{e.setParams({missingProperty:m}),t.if((0,Aa.noPropertyInData)(t,n,m,a.ownProperties),()=>e.error())})}function h(m,p){e.setParams({missingProperty:m}),t.forOf(m,o,()=>{t.assign(p,(0,Aa.propertyInData)(t,n,m,a.ownProperties)),t.if((0,Ca.not)(p),()=>{e.error(),t.break()})},Ca.nil)}}};w_.default=Lq});var hS=w($_=>{"use strict";Object.defineProperty($_,"__esModule",{value:!0});var Da=X(),Zq={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,Da.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,Da._)`{limit: ${e}}`},Vq={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Zq,code(e){let{keyword:t,data:r,schemaCode:o}=e,n=t==="maxItems"?Da.operators.GT:Da.operators.LT;e.fail$data((0,Da._)`${r}.length ${n} ${o}`)}};$_.default=Vq});var kd=w(k_=>{"use strict";Object.defineProperty(k_,"__esModule",{value:!0});var gS=Js();gS.code='require("ajv/dist/runtime/equal").default';k_.default=gS});var _S=w(S_=>{"use strict";Object.defineProperty(S_,"__esModule",{value:!0});var x_=xa(),Xe=X(),Fq=me(),Wq=kd(),Gq={message:({params:{i:e,j:t}})=>(0,Xe.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Xe._)`{i: ${e}, j: ${t}}`},Kq={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Gq,code(e){let{gen:t,data:r,$data:o,schema:n,parentSchema:i,schemaCode:s,it:a}=e;if(!o&&!n)return;let c=t.let("valid"),u=i.items?(0,x_.getSchemaTypes)(i.items):[];e.block$data(c,l,(0,Xe._)`${s} === false`),e.ok(c);function l(){let p=t.let("i",(0,Xe._)`${r}.length`),f=t.let("j");e.setParams({i:p,j:f}),t.assign(c,!0),t.if((0,Xe._)`${p} > 1`,()=>(d()?h:m)(p,f))}function d(){return u.length>0&&!u.some(p=>p==="object"||p==="array")}function h(p,f){let _=t.name("item"),y=(0,x_.checkDataTypes)(u,_,a.opts.strictNumbers,x_.DataType.Wrong),$=t.const("indices",(0,Xe._)`{}`);t.for((0,Xe._)`;${p}--;`,()=>{t.let(_,(0,Xe._)`${r}[${p}]`),t.if(y,(0,Xe._)`continue`),u.length>1&&t.if((0,Xe._)`typeof ${_} == "string"`,(0,Xe._)`${_} += "_"`),t.if((0,Xe._)`typeof ${$}[${_}] == "number"`,()=>{t.assign(f,(0,Xe._)`${$}[${_}]`),e.error(),t.assign(c,!1).break()}).code((0,Xe._)`${$}[${_}] = ${p}`)})}function m(p,f){let _=(0,Fq.useFunc)(t,Wq.default),y=t.name("outer");t.label(y).for((0,Xe._)`;${p}--;`,()=>t.for((0,Xe._)`${f} = ${p}; ${f}--;`,()=>t.if((0,Xe._)`${_}(${r}[${p}], ${r}[${f}])`,()=>{e.error(),t.assign(c,!1).break(y)})))}}};S_.default=Kq});var vS=w(P_=>{"use strict";Object.defineProperty(P_,"__esModule",{value:!0});var T_=X(),Bq=me(),Hq=kd(),Jq={message:"must be equal to constant",params:({schemaCode:e})=>(0,T_._)`{allowedValue: ${e}}`},Qq={keyword:"const",$data:!0,error:Jq,code(e){let{gen:t,data:r,$data:o,schemaCode:n,schema:i}=e;o||i&&typeof i=="object"?e.fail$data((0,T_._)`!${(0,Bq.useFunc)(t,Hq.default)}(${r}, ${n})`):e.fail((0,T_._)`${i} !== ${r}`)}};P_.default=Qq});var yS=w(z_=>{"use strict";Object.defineProperty(z_,"__esModule",{value:!0});var qa=X(),Yq=me(),Xq=kd(),eM={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,qa._)`{allowedValues: ${e}}`},tM={keyword:"enum",schemaType:"array",$data:!0,error:eM,code(e){let{gen:t,data:r,$data:o,schema:n,schemaCode:i,it:s}=e;if(!o&&n.length===0)throw new Error("enum must have non-empty array");let a=n.length>=s.opts.loopEnum,c,u=()=>c??(c=(0,Yq.useFunc)(t,Xq.default)),l;if(a||o)l=t.let("valid"),e.block$data(l,d);else{if(!Array.isArray(n))throw new Error("ajv implementation error");let m=t.const("vSchema",i);l=(0,qa.or)(...n.map((p,f)=>h(m,f)))}e.pass(l);function d(){t.assign(l,!1),t.forOf("v",i,m=>t.if((0,qa._)`${u()}(${r}, ${m})`,()=>t.assign(l,!0).break()))}function h(m,p){let f=n[p];return typeof f=="object"&&f!==null?(0,qa._)`${u()}(${r}, ${m}[${p}])`:(0,qa._)`${r} === ${f}`}}};z_.default=tM});var bS=w(E_=>{"use strict";Object.defineProperty(E_,"__esModule",{value:!0});var rM=aS(),nM=cS(),oM=dS(),iM=pS(),sM=fS(),aM=mS(),cM=hS(),uM=_S(),lM=vS(),dM=yS(),pM=[rM.default,nM.default,oM.default,iM.default,sM.default,aM.default,cM.default,uM.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},lM.default,dM.default];E_.default=pM});var N_=w(Ma=>{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});Ma.validateAdditionalItems=void 0;var Gn=X(),I_=me(),fM={message:({params:{len:e}})=>(0,Gn.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Gn._)`{limit: ${e}}`},mM={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:fM,code(e){let{parentSchema:t,it:r}=e,{items:o}=t;if(!Array.isArray(o)){(0,I_.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}wS(e,o)}};function wS(e,t){let{gen:r,schema:o,data:n,keyword:i,it:s}=e;s.items=!0;let a=r.const("len",(0,Gn._)`${n}.length`);if(o===!1)e.setParams({len:t.length}),e.pass((0,Gn._)`${a} <= ${t.length}`);else if(typeof o=="object"&&!(0,I_.alwaysValidSchema)(s,o)){let u=r.var("valid",(0,Gn._)`${a} <= ${t.length}`);r.if((0,Gn.not)(u),()=>c(u)),e.ok(u)}function c(u){r.forRange("i",t.length,a,l=>{e.subschema({keyword:i,dataProp:l,dataPropType:I_.Type.Num},u),s.allErrors||r.if((0,Gn.not)(u),()=>r.break())})}}Ma.validateAdditionalItems=wS;Ma.default=mM});var O_=w(Ua=>{"use strict";Object.defineProperty(Ua,"__esModule",{value:!0});Ua.validateTuple=void 0;var $S=X(),xd=me(),hM=Lt(),gM={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return kS(e,"additionalItems",t);r.items=!0,!(0,xd.alwaysValidSchema)(r,t)&&e.ok((0,hM.validateArray)(e))}};function kS(e,t,r=e.schema){let{gen:o,parentSchema:n,data:i,keyword:s,it:a}=e;l(n),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=xd.mergeEvaluated.items(o,r.length,a.items));let c=o.name("valid"),u=o.const("len",(0,$S._)`${i}.length`);r.forEach((d,h)=>{(0,xd.alwaysValidSchema)(a,d)||(o.if((0,$S._)`${u} > ${h}`,()=>e.subschema({keyword:s,schemaProp:h,dataProp:h},c)),e.ok(c))});function l(d){let{opts:h,errSchemaPath:m}=a,p=r.length,f=p===d.minItems&&(p===d.maxItems||d[t]===!1);if(h.strictTuples&&!f){let _=`"${s}" is ${p}-tuple, but minItems or maxItems/${t} are not specified or different at path "${m}"`;(0,xd.checkStrictMode)(a,_,h.strictTuples)}}}Ua.validateTuple=kS;Ua.default=gM});var xS=w(R_=>{"use strict";Object.defineProperty(R_,"__esModule",{value:!0});var _M=O_(),vM={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,_M.validateTuple)(e,"items")};R_.default=vM});var TS=w(j_=>{"use strict";Object.defineProperty(j_,"__esModule",{value:!0});var SS=X(),yM=me(),bM=Lt(),wM=N_(),$M={message:({params:{len:e}})=>(0,SS.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,SS._)`{limit: ${e}}`},kM={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:$M,code(e){let{schema:t,parentSchema:r,it:o}=e,{prefixItems:n}=r;o.items=!0,!(0,yM.alwaysValidSchema)(o,t)&&(n?(0,wM.validateAdditionalItems)(e,n):e.ok((0,bM.validateArray)(e)))}};j_.default=kM});var PS=w(A_=>{"use strict";Object.defineProperty(A_,"__esModule",{value:!0});var Vt=X(),Sd=me(),xM={message:({params:{min:e,max:t}})=>t===void 0?(0,Vt.str)`must contain at least ${e} valid item(s)`:(0,Vt.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,Vt._)`{minContains: ${e}}`:(0,Vt._)`{minContains: ${e}, maxContains: ${t}}`},SM={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:xM,code(e){let{gen:t,schema:r,parentSchema:o,data:n,it:i}=e,s,a,{minContains:c,maxContains:u}=o;i.opts.next?(s=c===void 0?1:c,a=u):s=1;let l=t.const("len",(0,Vt._)`${n}.length`);if(e.setParams({min:s,max:a}),a===void 0&&s===0){(0,Sd.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,Sd.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Sd.alwaysValidSchema)(i,r)){let f=(0,Vt._)`${l} >= ${s}`;a!==void 0&&(f=(0,Vt._)`${f} && ${l} <= ${a}`),e.pass(f);return}i.items=!0;let d=t.name("valid");a===void 0&&s===1?m(d,()=>t.if(d,()=>t.break())):s===0?(t.let(d,!0),a!==void 0&&t.if((0,Vt._)`${n}.length > 0`,h)):(t.let(d,!1),h()),e.result(d,()=>e.reset());function h(){let f=t.name("_valid"),_=t.let("count",0);m(f,()=>t.if(f,()=>p(_)))}function m(f,_){t.forRange("i",0,l,y=>{e.subschema({keyword:"contains",dataProp:y,dataPropType:Sd.Type.Num,compositeRule:!0},f),_()})}function p(f){t.code((0,Vt._)`${f}++`),a===void 0?t.if((0,Vt._)`${f} >= ${s}`,()=>t.assign(d,!0).break()):(t.if((0,Vt._)`${f} > ${a}`,()=>t.assign(d,!1).break()),s===1?t.assign(d,!0):t.if((0,Vt._)`${f} >= ${s}`,()=>t.assign(d,!0)))}}};A_.default=SM});var IS=w(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.validateSchemaDeps=gr.validatePropertyDeps=gr.error=void 0;var C_=X(),TM=me(),La=Lt();gr.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let o=t===1?"property":"properties";return(0,C_.str)`must have ${o} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:o}})=>(0,C_._)`{property: ${e},
14
14
  missingProperty: ${o},
15
15
  depsCount: ${t},
16
- deps: ${r}}`};var wM={keyword:"dependencies",type:"object",schemaType:"object",error:gr.error,code(e){let[t,r]=$M(e);PS(e,t),zS(e,r)}};function $M({schema:e}){let t={},r={};for(let o in e){if(o==="__proto__")continue;let n=Array.isArray(e[o])?t:r;n[o]=e[o]}return[t,r]}function PS(e,t=e.schema){let{gen:r,data:o,it:n}=e;if(Object.keys(t).length===0)return;let i=r.let("missing");for(let s in t){let a=t[s];if(a.length===0)continue;let c=(0,Ma.propertyInData)(r,o,s,n.opts.ownProperties);e.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),n.allErrors?r.if(c,()=>{for(let u of a)(0,Ma.checkReportMissingProp)(e,u)}):(r.if((0,A_._)`${c} && (${(0,Ma.checkMissingProp)(e,a,i)})`),(0,Ma.reportMissingProp)(e,i),r.else())}}gr.validatePropertyDeps=PS;function zS(e,t=e.schema){let{gen:r,data:o,keyword:n,it:i}=e,s=r.name("valid");for(let a in t)(0,bM.alwaysValidSchema)(i,t[a])||(r.if((0,Ma.propertyInData)(r,o,a,i.opts.ownProperties),()=>{let c=e.subschema({keyword:n,schemaProp:a},s);e.mergeValidEvaluated(c,s)},()=>r.var(s,!0)),e.ok(s))}gr.validateSchemaDeps=zS;gr.default=wM});var NS=w(D_=>{"use strict";Object.defineProperty(D_,"__esModule",{value:!0});var ES=X(),kM=_e(),xM={message:"property name must be valid",params:({params:e})=>(0,ES._)`{propertyName: ${e.propertyName}}`},SM={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:xM,code(e){let{gen:t,schema:r,data:o,it:n}=e;if((0,kM.alwaysValidSchema)(n,r))return;let i=t.name("valid");t.forIn("key",o,s=>{e.setParams({propertyName:s}),e.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},i),t.if((0,ES.not)(i),()=>{e.error(!0),n.allErrors||t.break()})}),e.ok(i)}};D_.default=SM});var q_=w(C_=>{"use strict";Object.defineProperty(C_,"__esModule",{value:!0});var Td=Lt(),nr=X(),TM=Rr(),Pd=_e(),PM={message:"must NOT have additional properties",params:({params:e})=>(0,nr._)`{additionalProperty: ${e.additionalProperty}}`},zM={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:PM,code(e){let{gen:t,schema:r,parentSchema:o,data:n,errsCount:i,it:s}=e;if(!i)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=s;if(s.props=!0,c.removeAdditional!=="all"&&(0,Pd.alwaysValidSchema)(s,r))return;let u=(0,Td.allSchemaProperties)(o.properties),l=(0,Td.allSchemaProperties)(o.patternProperties);d(),e.ok((0,nr._)`${i} === ${TM.default.errors}`);function d(){t.forIn("key",n,_=>{!u.length&&!l.length?p(_):t.if(h(_),()=>p(_))})}function h(_){let y;if(u.length>8){let $=(0,Pd.schemaRefOrVal)(s,o.properties,"properties");y=(0,Td.isOwnProperty)(t,$,_)}else u.length?y=(0,nr.or)(...u.map($=>(0,nr._)`${_} === ${$}`)):y=nr.nil;return l.length&&(y=(0,nr.or)(y,...l.map($=>(0,nr._)`${(0,Td.usePattern)(e,$)}.test(${_})`))),(0,nr.not)(y)}function m(_){t.code((0,nr._)`delete ${n}[${_}]`)}function p(_){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(_);return}if(r===!1){e.setParams({additionalProperty:_}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,Pd.alwaysValidSchema)(s,r)){let y=t.name("valid");c.removeAdditional==="failing"?(f(_,y,!1),t.if((0,nr.not)(y),()=>{e.reset(),m(_)})):(f(_,y),a||t.if((0,nr.not)(y),()=>t.break()))}}function f(_,y,$){let k={keyword:"additionalProperties",dataProp:_,dataPropType:Pd.Type.Str};$===!1&&Object.assign(k,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(k,y)}}};C_.default=zM});var jS=w(U_=>{"use strict";Object.defineProperty(U_,"__esModule",{value:!0});var IM=Ta(),OS=Lt(),M_=_e(),RS=q_(),EM={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:o,data:n,it:i}=e;i.opts.removeAdditional==="all"&&o.additionalProperties===void 0&&RS.default.code(new IM.KeywordCxt(i,RS.default,"additionalProperties"));let s=(0,OS.allSchemaProperties)(r);for(let d of s)i.definedProperties.add(d);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=M_.mergeEvaluated.props(t,(0,M_.toHash)(s),i.props));let a=s.filter(d=>!(0,M_.alwaysValidSchema)(i,r[d]));if(a.length===0)return;let c=t.name("valid");for(let d of a)u(d)?l(d):(t.if((0,OS.propertyInData)(t,n,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&&r[d].default!==void 0}function l(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};U_.default=EM});var qS=w(L_=>{"use strict";Object.defineProperty(L_,"__esModule",{value:!0});var AS=Lt(),zd=X(),DS=_e(),CS=_e(),NM={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:o,parentSchema:n,it:i}=e,{opts:s}=i,a=(0,AS.allSchemaProperties)(r),c=a.filter(f=>(0,DS.alwaysValidSchema)(i,r[f]));if(a.length===0||c.length===a.length&&(!i.opts.unevaluated||i.props===!0))return;let u=s.strictSchema&&!s.allowMatchingProperties&&n.properties,l=t.name("valid");i.props!==!0&&!(i.props instanceof zd.Name)&&(i.props=(0,CS.evaluatedPropsToName)(t,i.props));let{props:d}=i;h();function h(){for(let f of a)u&&m(f),i.allErrors?p(f):(t.var(l,!0),p(f),t.if(l))}function m(f){for(let _ in u)new RegExp(f).test(_)&&(0,DS.checkStrictMode)(i,`property ${_} matches pattern ${f} (use allowMatchingProperties)`)}function p(f){t.forIn("key",o,_=>{t.if((0,zd._)`${(0,AS.usePattern)(e,f)}.test(${_})`,()=>{let y=c.includes(f);y||e.subschema({keyword:"patternProperties",schemaProp:f,dataProp:_,dataPropType:CS.Type.Str},l),i.opts.unevaluated&&d!==!0?t.assign((0,zd._)`${d}[${_}]`,!0):!y&&!i.allErrors&&t.if((0,zd.not)(l),()=>t.break())})})}}};L_.default=NM});var MS=w(Z_=>{"use strict";Object.defineProperty(Z_,"__esModule",{value:!0});var OM=_e(),RM={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:o}=e;if((0,OM.alwaysValidSchema)(o,r)){e.fail();return}let n=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),e.failResult(n,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Z_.default=RM});var US=w(V_=>{"use strict";Object.defineProperty(V_,"__esModule",{value:!0});var jM=Lt(),AM={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:jM.validateUnion,error:{message:"must match a schema in anyOf"}};V_.default=AM});var LS=w(F_=>{"use strict";Object.defineProperty(F_,"__esModule",{value:!0});var Id=X(),DM=_e(),CM={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Id._)`{passingSchemas: ${e.passing}}`},qM={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:CM,code(e){let{gen:t,schema:r,parentSchema:o,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&o.discriminator)return;let i=r,s=t.let("valid",!1),a=t.let("passing",null),c=t.name("_valid");e.setParams({passing:a}),t.block(u),e.result(s,()=>e.reset(),()=>e.error(!0));function u(){i.forEach((l,d)=>{let h;(0,DM.alwaysValidSchema)(n,l)?t.var(c,!0):h=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,Id._)`${c} && ${s}`).assign(s,!1).assign(a,(0,Id._)`[${a}, ${d}]`).else(),t.if(c,()=>{t.assign(s,!0),t.assign(a,d),h&&e.mergeEvaluated(h,Id.Name)})})}}};F_.default=qM});var ZS=w(W_=>{"use strict";Object.defineProperty(W_,"__esModule",{value:!0});var MM=_e(),UM={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let n=t.name("valid");r.forEach((i,s)=>{if((0,MM.alwaysValidSchema)(o,i))return;let a=e.subschema({keyword:"allOf",schemaProp:s},n);e.ok(n),e.mergeEvaluated(a)})}};W_.default=UM});var WS=w(G_=>{"use strict";Object.defineProperty(G_,"__esModule",{value:!0});var Ed=X(),FS=_e(),LM={message:({params:e})=>(0,Ed.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Ed._)`{failingKeyword: ${e.ifClause}}`},ZM={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:LM,code(e){let{gen:t,parentSchema:r,it:o}=e;r.then===void 0&&r.else===void 0&&(0,FS.checkStrictMode)(o,'"if" without "then" and "else" is ignored');let n=VS(o,"then"),i=VS(o,"else");if(!n&&!i)return;let s=t.let("valid",!0),a=t.name("_valid");if(c(),e.reset(),n&&i){let l=t.let("ifClause");e.setParams({ifClause:l}),t.if(a,u("then",l),u("else",l))}else n?t.if(a,u("then")):t.if((0,Ed.not)(a),u("else"));e.pass(s,()=>e.error(!0));function c(){let l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(l)}function u(l,d){return()=>{let h=e.subschema({keyword:l},a);t.assign(s,a),e.mergeValidEvaluated(h,s),d?t.assign(d,(0,Ed._)`${l}`):e.setParams({ifClause:l})}}}};function VS(e,t){let r=e.schema[t];return r!==void 0&&!(0,FS.alwaysValidSchema)(e,r)}G_.default=ZM});var GS=w(K_=>{"use strict";Object.defineProperty(K_,"__esModule",{value:!0});var VM=_e(),FM={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,VM.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};K_.default=FM});var KS=w(H_=>{"use strict";Object.defineProperty(H_,"__esModule",{value:!0});var WM=E_(),GM=kS(),KM=N_(),HM=SS(),BM=TS(),JM=IS(),QM=NS(),YM=q_(),XM=jS(),e4=qS(),t4=MS(),r4=US(),n4=LS(),o4=ZS(),i4=WS(),s4=GS();function a4(e=!1){let t=[t4.default,r4.default,n4.default,o4.default,i4.default,s4.default,QM.default,YM.default,JM.default,XM.default,e4.default];return e?t.push(GM.default,HM.default):t.push(WM.default,KM.default),t.push(BM.default),t}H_.default=a4});var HS=w(B_=>{"use strict";Object.defineProperty(B_,"__esModule",{value:!0});var Ze=X(),c4={message:({schemaCode:e})=>(0,Ze.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Ze._)`{format: ${e}}`},u4={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:c4,code(e,t){let{gen:r,data:o,$data:n,schema:i,schemaCode:s,it:a}=e,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=a;if(!c.validateFormats)return;n?h():m();function h(){let p=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),f=r.const("fDef",(0,Ze._)`${p}[${s}]`),_=r.let("fType"),y=r.let("format");r.if((0,Ze._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>r.assign(_,(0,Ze._)`${f}.type || "string"`).assign(y,(0,Ze._)`${f}.validate`),()=>r.assign(_,(0,Ze._)`"string"`).assign(y,f)),e.fail$data((0,Ze.or)($(),k()));function $(){return c.strictSchema===!1?Ze.nil:(0,Ze._)`${s} && !${y}`}function k(){let I=l.$async?(0,Ze._)`(${f}.async ? await ${y}(${o}) : ${y}(${o}))`:(0,Ze._)`${y}(${o})`,P=(0,Ze._)`(typeof ${y} == "function" ? ${I} : ${y}.test(${o}))`;return(0,Ze._)`${y} && ${y} !== true && ${_} === ${t} && !${P}`}}function m(){let p=d.formats[i];if(!p){$();return}if(p===!0)return;let[f,_,y]=k(p);f===t&&e.pass(I());function $(){if(c.strictSchema===!1){d.logger.warn(P());return}throw new Error(P());function P(){return`unknown format "${i}" ignored in schema at path "${u}"`}}function k(P){let ze=P instanceof RegExp?(0,Ze.regexpCode)(P):c.code.formats?(0,Ze._)`${c.code.formats}${(0,Ze.getProperty)(i)}`:void 0,Me=r.scopeValue("formats",{key:i,ref:P,code:ze});return typeof P=="object"&&!(P instanceof RegExp)?[P.type||"string",P.validate,(0,Ze._)`${Me}.validate`]:["string",P,Me]}function I(){if(typeof p=="object"&&!(p instanceof RegExp)&&p.async){if(!l.$async)throw new Error("async format in sync schema");return(0,Ze._)`await ${y}(${o})`}return typeof _=="function"?(0,Ze._)`${y}(${o})`:(0,Ze._)`${y}.test(${o})`}}}};B_.default=u4});var BS=w(J_=>{"use strict";Object.defineProperty(J_,"__esModule",{value:!0});var l4=HS(),d4=[l4.default];J_.default=d4});var JS=w(oi=>{"use strict";Object.defineProperty(oi,"__esModule",{value:!0});oi.contentVocabulary=oi.metadataVocabulary=void 0;oi.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];oi.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var YS=w(Q_=>{"use strict";Object.defineProperty(Q_,"__esModule",{value:!0});var p4=iS(),f4=yS(),m4=KS(),h4=BS(),QS=JS(),g4=[p4.default,f4.default,(0,m4.default)(),h4.default,QS.metadataVocabulary,QS.contentVocabulary];Q_.default=g4});var e0=w(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});Nd.DiscrError=void 0;var XS;(function(e){e.Tag="tag",e.Mapping="mapping"})(XS||(Nd.DiscrError=XS={}))});var r0=w(X_=>{"use strict";Object.defineProperty(X_,"__esModule",{value:!0});var ii=X(),Y_=e0(),t0=gd(),_4=Pa(),v4=_e(),y4={message:({params:{discrError:e,tagName:t}})=>e===Y_.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,ii._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},b4={keyword:"discriminator",type:"object",schemaType:"object",error:y4,code(e){let{gen:t,data:r,schema:o,parentSchema:n,it:i}=e,{oneOf:s}=n;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=o.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(o.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),u=t.const("tag",(0,ii._)`${r}${(0,ii.getProperty)(a)}`);t.if((0,ii._)`typeof ${u} == "string"`,()=>l(),()=>e.error(!1,{discrError:Y_.DiscrError.Tag,tag:u,tagName:a})),e.ok(c);function l(){let m=h();t.if(!1);for(let p in m)t.elseIf((0,ii._)`${u} === ${p}`),t.assign(c,d(m[p]));t.else(),e.error(!1,{discrError:Y_.DiscrError.Mapping,tag:u,tagName:a}),t.endIf()}function d(m){let p=t.name("valid"),f=e.subschema({keyword:"oneOf",schemaProp:m},p);return e.mergeEvaluated(f,ii.Name),p}function h(){var m;let p={},f=y(n),_=!0;for(let I=0;I<s.length;I++){let P=s[I];if(P?.$ref&&!(0,v4.schemaHasRulesButRef)(P,i.self.RULES)){let Me=P.$ref;if(P=t0.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,Me),P instanceof t0.SchemaEnv&&(P=P.schema),P===void 0)throw new _4.default(i.opts.uriResolver,i.baseId,Me)}let ze=(m=P?.properties)===null||m===void 0?void 0:m[a];if(typeof ze!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);_=_&&(f||y(P)),$(ze,I)}if(!_)throw new Error(`discriminator: "${a}" must be required`);return p;function y({required:I}){return Array.isArray(I)&&I.includes(a)}function $(I,P){if(I.const)k(I.const,P);else if(I.enum)for(let ze of I.enum)k(ze,P);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function k(I,P){if(typeof I!="string"||I in p)throw new Error(`discriminator: "${a}" values must be unique strings`);p[I]=P}}}};X_.default=b4});var n0=w((j3,w4)=>{w4.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 i0=w((De,ev)=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.MissingRefError=De.ValidationError=De.CodeGen=De.Name=De.nil=De.stringify=De.str=De._=De.KeywordCxt=De.Ajv=void 0;var $4=Xx(),k4=YS(),x4=r0(),o0=n0(),S4=["/properties"],Od="http://json-schema.org/draft-07/schema",si=class extends $4.default{_addVocabularies(){super._addVocabularies(),k4.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(x4.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(o0,S4):o0;this.addMetaSchema(t,Od,!1),this.refs["http://json-schema.org/schema"]=Od}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Od)?Od:void 0)}};De.Ajv=si;ev.exports=De=si;ev.exports.Ajv=si;Object.defineProperty(De,"__esModule",{value:!0});De.default=si;var T4=Ta();Object.defineProperty(De,"KeywordCxt",{enumerable:!0,get:function(){return T4.KeywordCxt}});var ai=X();Object.defineProperty(De,"_",{enumerable:!0,get:function(){return ai._}});Object.defineProperty(De,"str",{enumerable:!0,get:function(){return ai.str}});Object.defineProperty(De,"stringify",{enumerable:!0,get:function(){return ai.stringify}});Object.defineProperty(De,"nil",{enumerable:!0,get:function(){return ai.nil}});Object.defineProperty(De,"Name",{enumerable:!0,get:function(){return ai.Name}});Object.defineProperty(De,"CodeGen",{enumerable:!0,get:function(){return ai.CodeGen}});var P4=md();Object.defineProperty(De,"ValidationError",{enumerable:!0,get:function(){return P4.default}});var z4=Pa();Object.defineProperty(De,"MissingRefError",{enumerable:!0,get:function(){return z4.default}})});var s0=w(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.formatLimitDefinition=void 0;var I4=i0(),or=X(),ln=or.operators,Rd={formatMaximum:{okStr:"<=",ok:ln.LTE,fail:ln.GT},formatMinimum:{okStr:">=",ok:ln.GTE,fail:ln.LT},formatExclusiveMaximum:{okStr:"<",ok:ln.LT,fail:ln.GTE},formatExclusiveMinimum:{okStr:">",ok:ln.GT,fail:ln.LTE}},E4={message:({keyword:e,schemaCode:t})=>(0,or.str)`should be ${Rd[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,or._)`{comparison: ${Rd[e].okStr}, limit: ${t}}`};ci.formatLimitDefinition={keyword:Object.keys(Rd),type:"string",schemaType:"string",$data:!0,error:E4,code(e){let{gen:t,data:r,schemaCode:o,keyword:n,it:i}=e,{opts:s,self:a}=i;if(!s.validateFormats)return;let c=new I4.KeywordCxt(i,a.RULES.all.format.definition,"format");c.$data?u():l();function u(){let h=t.scopeValue("formats",{ref:a.formats,code:s.code.formats}),m=t.const("fmt",(0,or._)`${h}[${c.schemaCode}]`);e.fail$data((0,or.or)((0,or._)`typeof ${m} != "object"`,(0,or._)`${m} instanceof RegExp`,(0,or._)`typeof ${m}.compare != "function"`,d(m)))}function l(){let h=c.schema,m=a.formats[h];if(!m||m===!0)return;if(typeof m!="object"||m instanceof RegExp||typeof m.compare!="function")throw new Error(`"${n}": format "${h}" does not define "compare" function`);let p=t.scopeValue("formats",{key:h,ref:m,code:s.code.formats?(0,or._)`${s.code.formats}${(0,or.getProperty)(h)}`:void 0});e.fail$data(d(p))}function d(h){return(0,or._)`${h}.compare(${r}, ${o}) ${Rd[n].fail} 0`}},dependencies:["format"]};var N4=e=>(e.addKeyword(ci.formatLimitDefinition),e);ci.default=N4});var l0=w((Ua,u0)=>{"use strict";Object.defineProperty(Ua,"__esModule",{value:!0});var ui=Wk(),O4=s0(),tv=X(),a0=new tv.Name("fullFormats"),R4=new tv.Name("fastFormats"),rv=(e,t={keywords:!0})=>{if(Array.isArray(t))return c0(e,t,ui.fullFormats,a0),e;let[r,o]=t.mode==="fast"?[ui.fastFormats,R4]:[ui.fullFormats,a0],n=t.formats||ui.formatNames;return c0(e,n,r,o),t.keywords&&(0,O4.default)(e),e};rv.get=(e,t="full")=>{let o=(t==="fast"?ui.fastFormats:ui.fullFormats)[e];if(!o)throw new Error(`Unknown format "${e}"`);return o};function c0(e,t,r,o){var n,i;(n=(i=e.opts.code).formats)!==null&&n!==void 0||(i.formats=(0,tv._)`require("ajv-formats/dist/formats").${o}`);for(let s of t)e.addFormat(s,r[s])}u0.exports=Ua=rv;Object.defineProperty(Ua,"__esModule",{value:!0});Ua.default=rv});var ct=w((nH,P0)=>{var dv=Object.defineProperty,sU=Object.getOwnPropertyDescriptor,aU=Object.getOwnPropertyNames,cU=Object.prototype.hasOwnProperty,uU=(e,t)=>{for(var r in t)dv(e,r,{get:t[r],enumerable:!0})},lU=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of aU(t))!cU.call(e,n)&&n!==r&&dv(e,n,{get:()=>t[n],enumerable:!(o=sU(t,n))||o.enumerable});return e},dU=e=>lU(dv({},"__esModule",{value:!0}),e),T0={};uU(T0,{APIV2Client:()=>_U,VantageAPIError:()=>Ld,pathEncode:()=>S});P0.exports=dU(T0);function S(e){return encodeURIComponent(e)}var pU={"/v2/exchange_rates/csv":{POST:!0},"/v2/business_metrics/{}/values.csv":{PUT:!0},"/v2/integrations/{}/costs.csv":{POST:!0}},Za={};function fU(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}for(let[e,t]of Object.entries(pU)){let r=e.split("{}").map(fU).join("(.+?)");for(let[o,n]of Object.entries(t))n&&(Za[o]||(Za[o]=[]),Za[o].push(new RegExp(`^${r}$`)))}function mU(e,t){if(Object.prototype.hasOwnProperty.call(Za,e))for(let r of Za[e]){let o=r.test(t);if(r.lastIndex=0,o)return!0}return!1}function hU(e,t){if(t)for(let[r,o]of Object.entries(t))e.searchParams.append(r,Array.isArray(o)?o.map(String).join(","):String(o))}var Ld=class extends Error{constructor(e,t,r){let o=null;if(e!==null)try{let i=JSON.parse(r);Array.isArray(i.errors)&&(o=i.errors)}catch{}let n=e===null?`Vantage API Error: ${r}`:`Vantage API Error: ${e} ${t}`+(o?` - ${o.join(", ")}`:"");super(n),this.status=e,this.statusText=t,this.body=r,this.errors=o}errors};async function lv(e,t,r,o,n){let i;try{i=await fetch(e.toString(),{method:t,headers:r,body:o})}catch(s){let a=s instanceof Error?s.message:String(s),c=new Ld(null,null,a);if(n)return[null,c];throw c}if(!i.ok){let s=new Ld(i.status,i.statusText,await i.text());if(n)return[null,s];throw s}if(i.status===204)return n?[void 0,null]:void 0;try{let s=await i.text(),a;return s&&(a=JSON.parse(s)),n?[a,null]:a}catch(s){let a=s instanceof Error?s.message:String(s),c=new Ld(i.status,i.statusText,a);if(n)return[null,c];throw c}}var gU=class{constructor(e,t,r){this.bearerToken=e,this.neverThrow=t,this.baseUrl=r}async request(e,t,r){let o=new URL(e,this.baseUrl),n={Authorization:`Bearer ${this.bearerToken}`};if(t==="GET")return hU(o,r),lv(o,t,n,void 0,this.neverThrow);if(mU(t,e)){let i=new FormData;for(let[s,a]of Object.entries(r))i.append(s,a);return n["Content-Type"]="multipart/form-data",lv(o,t,n,i,this.neverThrow)}return n["Content-Type"]="application/json",lv(o,t,n,JSON.stringify(r),this.neverThrow)}},_U=class extends gU{constructor(e,t=!1,r="https://api.vantage.sh"){super(e,t,r)}_accessGrants;_anomalyAlerts;_anomalyNotifications;_auditLogs;_billingProfiles;_billingRules;_budgetAlerts;_budgets;_businessMetrics;_costAlerts;_costProviderAccounts;_costReports;_costs;_dashboards;_dataExports;_exchangeRates;_financialCommitmentReports;_financialCommitments;_folders;_integrations;_invoices;_kubernetesEfficiencyReports;_managedAccounts;_me;_costProviders;_costServices;_userFeedback;_networkFlowReports;_products;_recommendations;_recommendationViews;_reportNotifications;_resourceReports;_resources;_savedFilters;_segments;_tags;_teams;_unitCosts;_users;_virtualTagConfigs;_workspaces;_ping;get accessGrants(){return this._accessGrants||(this._accessGrants=new vU(this)),this._accessGrants}get anomalyAlerts(){return this._anomalyAlerts||(this._anomalyAlerts=new yU(this)),this._anomalyAlerts}get anomalyNotifications(){return this._anomalyNotifications||(this._anomalyNotifications=new bU(this)),this._anomalyNotifications}get auditLogs(){return this._auditLogs||(this._auditLogs=new wU(this)),this._auditLogs}get billingProfiles(){return this._billingProfiles||(this._billingProfiles=new $U(this)),this._billingProfiles}get billingRules(){return this._billingRules||(this._billingRules=new kU(this)),this._billingRules}get budgetAlerts(){return this._budgetAlerts||(this._budgetAlerts=new xU(this)),this._budgetAlerts}get budgets(){return this._budgets||(this._budgets=new SU(this)),this._budgets}get businessMetrics(){return this._businessMetrics||(this._businessMetrics=new TU(this)),this._businessMetrics}get costAlerts(){return this._costAlerts||(this._costAlerts=new PU(this)),this._costAlerts}get costProviderAccounts(){return this._costProviderAccounts||(this._costProviderAccounts=new zU(this)),this._costProviderAccounts}get costReports(){return this._costReports||(this._costReports=new IU(this)),this._costReports}get costs(){return this._costs||(this._costs=new EU(this)),this._costs}get dashboards(){return this._dashboards||(this._dashboards=new NU(this)),this._dashboards}get dataExports(){return this._dataExports||(this._dataExports=new OU(this)),this._dataExports}get exchangeRates(){return this._exchangeRates||(this._exchangeRates=new RU(this)),this._exchangeRates}get financialCommitmentReports(){return this._financialCommitmentReports||(this._financialCommitmentReports=new jU(this)),this._financialCommitmentReports}get financialCommitments(){return this._financialCommitments||(this._financialCommitments=new AU(this)),this._financialCommitments}get folders(){return this._folders||(this._folders=new DU(this)),this._folders}get integrations(){return this._integrations||(this._integrations=new CU(this)),this._integrations}get invoices(){return this._invoices||(this._invoices=new qU(this)),this._invoices}get kubernetesEfficiencyReports(){return this._kubernetesEfficiencyReports||(this._kubernetesEfficiencyReports=new MU(this)),this._kubernetesEfficiencyReports}get managedAccounts(){return this._managedAccounts||(this._managedAccounts=new UU(this)),this._managedAccounts}get me(){return this._me||(this._me=new LU(this)),this._me}get costProviders(){return this._costProviders||(this._costProviders=new ZU(this)),this._costProviders}get costServices(){return this._costServices||(this._costServices=new VU(this)),this._costServices}get userFeedback(){return this._userFeedback||(this._userFeedback=new FU(this)),this._userFeedback}get networkFlowReports(){return this._networkFlowReports||(this._networkFlowReports=new WU(this)),this._networkFlowReports}get products(){return this._products||(this._products=new GU(this)),this._products}get recommendations(){return this._recommendations||(this._recommendations=new KU(this)),this._recommendations}get recommendationViews(){return this._recommendationViews||(this._recommendationViews=new HU(this)),this._recommendationViews}get reportNotifications(){return this._reportNotifications||(this._reportNotifications=new BU(this)),this._reportNotifications}get resourceReports(){return this._resourceReports||(this._resourceReports=new JU(this)),this._resourceReports}get resources(){return this._resources||(this._resources=new QU(this)),this._resources}get savedFilters(){return this._savedFilters||(this._savedFilters=new YU(this)),this._savedFilters}get segments(){return this._segments||(this._segments=new XU(this)),this._segments}get tags(){return this._tags||(this._tags=new e2(this)),this._tags}get teams(){return this._teams||(this._teams=new t2(this)),this._teams}get unitCosts(){return this._unitCosts||(this._unitCosts=new r2(this)),this._unitCosts}get users(){return this._users||(this._users=new n2(this)),this._users}get virtualTagConfigs(){return this._virtualTagConfigs||(this._virtualTagConfigs=new o2(this)),this._virtualTagConfigs}get workspaces(){return this._workspaces||(this._workspaces=new i2(this)),this._workspaces}get ping(){return this._ping||(this._ping=new s2(this)),this._ping}},vU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/access_grants","GET",e)}create(e){return this.client.request("/v2/access_grants","POST",e)}get(e){return this.client.request(`/v2/access_grants/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/access_grants/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/access_grants/${S(e)}`,"DELETE",{})}},yU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/anomaly_alerts","GET",e)}get(e){return this.client.request(`/v2/anomaly_alerts/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/anomaly_alerts/${S(e)}`,"PUT",t)}},bU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/anomaly_notifications","GET",e)}create(e){return this.client.request("/v2/anomaly_notifications","POST",e)}get(e){return this.client.request(`/v2/anomaly_notifications/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/anomaly_notifications/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/anomaly_notifications/${S(e)}`,"DELETE",{})}},wU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/audit_logs","GET",e)}get(e){return this.client.request(`/v2/audit_logs/${S(e)}`,"GET",{})}},$U=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/billing_profiles","GET",e)}create(e){return this.client.request("/v2/billing_profiles","POST",e)}get(e){return this.client.request(`/v2/billing_profiles/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/billing_profiles/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/billing_profiles/${S(e)}`,"DELETE",{})}},kU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/billing_rules","GET",e)}create(e){return this.client.request("/v2/billing_rules","POST",e)}get(e){return this.client.request(`/v2/billing_rules/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/billing_rules/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/billing_rules/${S(e)}`,"DELETE",{})}},xU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/budget_alerts","GET",e)}create(e){return this.client.request("/v2/budget_alerts","POST",e)}get(e){return this.client.request(`/v2/budget_alerts/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/budget_alerts/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/budget_alerts/${S(e)}`,"DELETE",{})}},SU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/budgets","GET",e)}create(e){return this.client.request("/v2/budgets","POST",e)}update(e,t){return this.client.request(`/v2/budgets/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/budgets/${S(e)}`,"DELETE",{})}},TU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/business_metrics","GET",e)}create(e){return this.client.request("/v2/business_metrics","POST",e)}get(e){return this.client.request(`/v2/business_metrics/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/business_metrics/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/business_metrics/${S(e)}`,"DELETE",{})}getValues(e,t){return this.client.request(`/v2/business_metrics/${S(e)}/values`,"GET",t)}getForecastedValues(e,t){return this.client.request(`/v2/business_metrics/${S(e)}/forecasted_values`,"GET",t)}updateValuesCSV(e,t){return this.client.request(`/v2/business_metrics/${S(e)}/values.csv`,"PUT",t)}},PU=class{constructor(e){this.client=e}create(e){return this.client.request("/v2/cost_alerts","POST",e)}get(e,t){return this.client.request(`/v2/cost_alerts/${S(e)}/events/${S(t)}`,"GET",{})}update(e,t){return this.client.request(`/v2/cost_alerts/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/cost_alerts/${S(e)}`,"DELETE",{})}getEvents(e,t){return this.client.request(`/v2/cost_alerts/${S(e)}/events`,"GET",t)}getEvent(e,t){return this.client.request(`/v2/cost_alerts/${S(e)}/events/${S(t)}`,"GET",{})}},zU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/cost_provider_accounts","GET",e)}},IU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/cost_reports","GET",e)}create(e){return this.client.request("/v2/cost_reports","POST",e)}get(e){return this.client.request(`/v2/cost_reports/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/cost_reports/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/cost_reports/${S(e)}`,"DELETE",{})}getForecastedCosts(e,t){return this.client.request(`/v2/cost_reports/${S(e)}/forecasted_costs`,"GET",t)}},EU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/costs","GET",e)}createExport(e){return this.client.request("/v2/costs/data_exports","POST",e)}},NU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/dashboards","GET",e)}create(e){return this.client.request("/v2/dashboards","POST",e)}get(e){return this.client.request(`/v2/dashboards/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/dashboards/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/dashboards/${S(e)}`,"DELETE",{})}},OU=class{constructor(e){this.client=e}get(e){return this.client.request(`/v2/data_exports/${S(e)}`,"GET",{})}},RU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/exchange_rates","GET",e)}createViaCsv(e){return this.client.request("/v2/exchange_rates/csv","POST",e)}},jU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/financial_commitment_reports","GET",e)}create(e){return this.client.request("/v2/financial_commitment_reports","POST",e)}get(e){return this.client.request(`/v2/financial_commitment_reports/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/financial_commitment_reports/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/financial_commitment_reports/${S(e)}`,"DELETE",{})}},AU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/financial_commitments","GET",e)}},DU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/folders","GET",e)}create(e){return this.client.request("/v2/folders","POST",e)}get(e){return this.client.request(`/v2/folders/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/folders/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/folders/${S(e)}`,"DELETE",{})}},CU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/integrations","GET",e)}get(e){return this.client.request(`/v2/integrations/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/integrations/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/integrations/${S(e)}`,"DELETE",{})}createCustomProviderIntegration(e){return this.client.request("/v2/integrations/custom_provider","POST",e)}createUserCostsUploadViaCsv(e,t){return this.client.request(`/v2/integrations/${S(e)}/costs.csv`,"POST",t)}deleteUserCostsUpload(e,t){return this.client.request(`/v2/integrations/${S(e)}/costs/${S(t)}`,"DELETE",{})}getUserCostsUploads(e){return this.client.request(`/v2/integrations/${S(e)}/costs`,"GET",{})}createGCPIntegration(e){return this.client.request("/v2/integrations/gcp","POST",e)}createAzureIntegration(e){return this.client.request("/v2/integrations/azure","POST",e)}},qU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/invoices","GET",e)}create(e){return this.client.request("/v2/invoices","POST",e)}get(e){return this.client.request(`/v2/invoices/${S(e)}`,"GET",{})}downloadInvoice(e,t){return this.client.request(`/v2/invoices/${S(e)}/download`,"POST",t)}sendInvoice(e){return this.client.request(`/v2/invoices/${S(e)}/send`,"POST",{})}sendAndApproveInvoice(e){return this.client.request(`/v2/invoices/${S(e)}/send_and_approve`,"POST",{})}getCostReport(e){return this.client.request(`/v2/invoices/${S(e)}/cost_report`,"GET",{})}regenerateInvoice(e){return this.client.request(`/v2/invoices/${S(e)}/regenerate`,"POST",{})}},MU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/kubernetes_efficiency_reports","GET",e)}create(e){return this.client.request("/v2/kubernetes_efficiency_reports","POST",e)}get(e){return this.client.request(`/v2/kubernetes_efficiency_reports/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/kubernetes_efficiency_reports/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/kubernetes_efficiency_reports/${S(e)}`,"DELETE",{})}createExport(e){return this.client.request("/v2/kubernetes_efficiency_reports/data_exports","POST",e)}},UU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/managed_accounts","GET",e)}create(e){return this.client.request("/v2/managed_accounts","POST",e)}get(e){return this.client.request(`/v2/managed_accounts/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/managed_accounts/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/managed_accounts/${S(e)}`,"DELETE",{})}updateSsoConnectionForManagedAccount(e,t){return this.client.request(`/v2/managed_accounts/${S(e)}/sso_connection`,"PUT",t)}createSsoConnectionForManagedAccount(e,t){return this.client.request(`/v2/managed_accounts/${S(e)}/sso_connection`,"POST",t)}},LU=class{constructor(e){this.client=e}get(){return this.client.request("/v2/me","GET",{})}},ZU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/cost_providers","GET",e)}},VU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/cost_services","GET",e)}},FU=class{constructor(e){this.client=e}create(e){return this.client.request("/v2/user_feedback","POST",e)}},WU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/network_flow_reports","GET",e)}create(e){return this.client.request("/v2/network_flow_reports","POST",e)}get(e){return this.client.request(`/v2/network_flow_reports/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/network_flow_reports/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/network_flow_reports/${S(e)}`,"DELETE",{})}},GU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/products","GET",e)}get(e,t){return this.client.request(`/v2/products/${S(e)}/prices/${S(t)}`,"GET",{})}getPrices(e,t){return this.client.request(`/v2/products/${S(e)}/prices`,"GET",t)}getPrice(e,t){return this.client.request(`/v2/products/${S(e)}/prices/${S(t)}`,"GET",{})}},KU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/recommendations","GET",e)}get(e){return this.client.request(`/v2/recommendations/${S(e)}`,"GET",{})}getResources(e,t){return this.client.request(`/v2/recommendations/${S(e)}/resources`,"GET",t)}getResource(e,t){return this.client.request(`/v2/recommendations/${S(e)}/resources/${S(t)}`,"GET",{})}getTypeResources(e,t){return this.client.request(`/v2/recommendations/by_type/${S(e)}/resources`,"GET",t)}},HU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/recommendation_views","GET",e)}create(e){return this.client.request("/v2/recommendation_views","POST",e)}get(e){return this.client.request(`/v2/recommendation_views/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/recommendation_views/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/recommendation_views/${S(e)}`,"DELETE",{})}},BU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/report_notifications","GET",e)}create(e){return this.client.request("/v2/report_notifications","POST",e)}get(e){return this.client.request(`/v2/report_notifications/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/report_notifications/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/report_notifications/${S(e)}`,"DELETE",{})}},JU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/resource_reports","GET",e)}create(e){return this.client.request("/v2/resource_reports","POST",e)}get(e){return this.client.request(`/v2/resource_reports/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/resource_reports/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/resource_reports/${S(e)}`,"DELETE",{})}getColumns(e){return this.client.request("/v2/resource_reports/columns","GET",e)}},QU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/resources","GET",e)}},YU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/saved_filters","GET",e)}create(e){return this.client.request("/v2/saved_filters","POST",e)}get(e){return this.client.request(`/v2/saved_filters/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/saved_filters/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/saved_filters/${S(e)}`,"DELETE",{})}},XU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/segments","GET",e)}create(e){return this.client.request("/v2/segments","POST",e)}get(e){return this.client.request(`/v2/segments/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/segments/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/segments/${S(e)}`,"DELETE",{})}},e2=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/tags","GET",e)}getValues(e,t){return this.client.request(`/v2/tags/${S(e)}/values`,"GET",t)}},t2=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/teams","GET",e)}create(e){return this.client.request("/v2/teams","POST",e)}get(e){return this.client.request(`/v2/teams/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/teams/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/teams/${S(e)}`,"DELETE",{})}getMembers(e,t){return this.client.request(`/v2/teams/${S(e)}/members`,"GET",t)}addTeamMember(e,t){return this.client.request(`/v2/teams/${S(e)}/members`,"POST",t)}removeTeamMember(e,t){return this.client.request(`/v2/teams/${S(e)}/members/${S(t)}`,"DELETE",{})}},r2=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/unit_costs","GET",e)}createExport(e){return this.client.request("/v2/unit_costs/data_exports","POST",e)}},n2=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/users","GET",e)}get(e){return this.client.request(`/v2/users/${S(e)}`,"GET",{})}},o2=class{constructor(e){this.client=e}create(e){return this.client.request("/v2/virtual_tag_configs","POST",e)}get(){return this.client.request("/v2/virtual_tag_configs","GET",{})}update(e,t){return this.client.request(`/v2/virtual_tag_configs/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/virtual_tag_configs/${S(e)}`,"DELETE",{})}getStatus(e){return this.client.request(`/v2/virtual_tag_configs/${S(e)}/status`,"GET",{})}updateAsyncVirtualTagConfig(e,t){return this.client.request(`/v2/virtual_tag_configs/${S(e)}/async`,"PUT",t)}getAsyncVirtualTagConfigStatus(e){return this.client.request(`/v2/virtual_tag_configs/async/${S(e)}`,"GET",{})}},i2=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/workspaces","GET",e)}create(e){return this.client.request("/v2/workspaces","POST",e)}get(e){return this.client.request(`/v2/workspaces/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/workspaces/${S(e)}`,"PUT",t)}},s2=class{constructor(e){this.client=e}get(){return this.client.request("/v2/ping","GET",{})}}});var ce;(function(e){e.assertEqual=n=>{};function t(n){}e.assertIs=t;function r(n){throw new Error}e.assertNever=r,e.arrayToEnum=n=>{let i={};for(let s of n)i[s]=s;return i},e.getValidEnumValues=n=>{let i=e.objectKeys(n).filter(a=>typeof n[n[a]]!="number"),s={};for(let a of i)s[a]=n[a];return e.objectValues(s)},e.objectValues=n=>e.objectKeys(n).map(function(i){return n[i]}),e.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let i=[];for(let s in n)Object.prototype.hasOwnProperty.call(n,s)&&i.push(s);return i},e.find=(n,i)=>{for(let s of n)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function o(n,i=" | "){return n.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=o,e.jsonStringifyReplacer=(n,i)=>typeof i=="bigint"?i.toString():i})(ce||(ce={}));var fv;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(fv||(fv={}));var D=ce.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),_r=e=>{switch(typeof e){case"undefined":return D.undefined;case"string":return D.string;case"number":return Number.isNaN(e)?D.nan:D.number;case"boolean":return D.boolean;case"function":return D.function;case"bigint":return D.bigint;case"symbol":return D.symbol;case"object":return Array.isArray(e)?D.array:e===null?D.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?D.promise:typeof Map<"u"&&e instanceof Map?D.map:typeof Set<"u"&&e instanceof Set?D.set:typeof Date<"u"&&e instanceof Date?D.date:D.object;default:return D.unknown}};var T=ce.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 Tt=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 r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(i){return i.message},o={_errors:[]},n=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(n);else if(s.code==="invalid_return_type")n(s.returnTypeError);else if(s.code==="invalid_arguments")n(s.argumentsError);else if(s.path.length===0)o._errors.push(r(s));else{let a=o,c=0;for(;c<s.path.length;){let u=s.path[c];c===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(s))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return n(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,ce.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},o=[];for(let n of this.issues)if(n.path.length>0){let i=n.path[0];r[i]=r[i]||[],r[i].push(t(n))}else o.push(t(n));return{formErrors:o,fieldErrors:r}}get formErrors(){return this.flatten()}};Tt.create=e=>new Tt(e);var B0=(e,t)=>{let r;switch(e.code){case T.invalid_type:e.received===D.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case T.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,ce.jsonStringifyReplacer)}`;break;case T.unrecognized_keys:r=`Unrecognized key(s) in object: ${ce.joinValues(e.keys,", ")}`;break;case T.invalid_union:r="Invalid input";break;case T.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ce.joinValues(e.options)}`;break;case T.invalid_enum_value:r=`Invalid enum value. Expected ${ce.joinValues(e.options)}, received '${e.received}'`;break;case T.invalid_arguments:r="Invalid function arguments";break;case T.invalid_return_type:r="Invalid function return type";break;case T.invalid_date:r="Invalid date";break;case T.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:ce.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case T.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case T.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case T.custom:r="Invalid input";break;case T.invalid_intersection_types:r="Intersection results could not be merged";break;case T.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case T.not_finite:r="Number must be finite";break;default:r=t.defaultError,ce.assertNever(e)}return{message:r}},Ar=B0;var J0=Ar;function pi(){return J0}var Fa=e=>{let{data:t,path:r,errorMaps:o,issueData:n}=e,i=[...r,...n.path||[]],s={...n,path:i};if(n.message!==void 0)return{...n,path:i,message:n.message};let a="",c=o.filter(u=>!!u).slice().reverse();for(let u of c)a=u(s,{data:t,defaultError:a}).message;return{...n,path:i,message:a}};function A(e,t){let r=pi(),o=Fa({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Ar?void 0:Ar].filter(n=>!!n)});e.common.issues.push(o)}var Xe=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let o=[];for(let n of r){if(n.status==="aborted")return F;n.status==="dirty"&&t.dirty(),o.push(n.value)}return{status:t.value,value:o}}static async mergeObjectAsync(t,r){let o=[];for(let n of r){let i=await n.key,s=await n.value;o.push({key:i,value:s})}return e.mergeObjectSync(t,o)}static mergeObjectSync(t,r){let o={};for(let n of r){let{key:i,value:s}=n;if(i.status==="aborted"||s.status==="aborted")return F;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||n.alwaysSet)&&(o[i.value]=s.value)}return{status:t.value,value:o}}},F=Object.freeze({status:"aborted"}),Kn=e=>({status:"dirty",value:e}),ut=e=>({status:"valid",value:e}),Fd=e=>e.status==="aborted",Wd=e=>e.status==="dirty",hn=e=>e.status==="valid",fi=e=>typeof Promise<"u"&&e instanceof Promise;var q;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(q||(q={}));var Nt=class{constructor(t,r,o,n){this._cachedPath=[],this.parent=t,this.data=r,this._path=o,this._key=n}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}},mv=(e,t)=>{if(hn(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 r=new Tt(e.common.issues);return this._error=r,this._error}}};function B(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:o,description:n}=e;if(t&&(r||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:n}:{errorMap:(s,a)=>{let{message:c}=e;return s.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??o??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:n}}var ee=class{get description(){return this._def.description}_getType(t){return _r(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:_r(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Xe,ctx:{common:t.parent.common,data:t.data,parsedType:_r(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(fi(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let o=this.safeParse(t,r);if(o.success)return o.data;throw o.error}safeParse(t,r){let o={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:_r(t)},n=this._parseSync({data:t,path:o.path,parent:o});return mv(o,n)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:_r(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:r});return hn(o)?{value:o.value}:{issues:r.common.issues}}catch(o){o?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(o=>hn(o)?{value:o.value}:{issues:r.common.issues})}async parseAsync(t,r){let o=await this.safeParseAsync(t,r);if(o.success)return o.data;throw o.error}async safeParseAsync(t,r){let o={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:_r(t)},n=this._parse({data:t,path:o.path,parent:o}),i=await(fi(n)?n:Promise.resolve(n));return mv(o,i)}refine(t,r){let o=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,i)=>{let s=t(n),a=()=>i.addIssue({code:T.custom,...o(n)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,r){return this._refinement((o,n)=>t(o)?!0:(n.addIssue(typeof r=="function"?r(o,n):r),!1))}_refinement(t){return new Wt({schema:this,typeName:z.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:r=>this["~validate"](r)}}optional(){return Pt.create(this,this._def)}nullable(){return br.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Cr.create(this)}promise(){return gn.create(this,this._def)}or(t){return Yn.create([this,t],this._def)}and(t){return Xn.create(this,t,this._def)}transform(t){return new Wt({...B(this._def),schema:this,typeName:z.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new oo({...B(this._def),innerType:this,defaultValue:r,typeName:z.ZodDefault})}brand(){return new Wa({typeName:z.ZodBranded,type:this,...B(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new io({...B(this._def),innerType:this,catchValue:r,typeName:z.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Ga.create(this,t)}readonly(){return so.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Q0=/^c[^\s-]{8,}$/i,Y0=/^[0-9a-z]+$/,X0=/^[0-9A-HJKMNP-TV-Z]{26}$/i,eT=/^[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,tT=/^[a-z0-9_-]{21}$/i,rT=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,nT=/^[-+]?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)?)??$/,oT=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,iT="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Gd,sT=/^(?:(?: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])$/,aT=/^(?:(?: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])$/,cT=/^(([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]))$/,uT=/^(([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])$/,lT=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,dT=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,hv="((\\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])))",pT=new RegExp(`^${hv}$`);function gv(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function fT(e){return new RegExp(`^${gv(e)}$`)}function mT(e){let t=`${hv}T${gv(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function hT(e,t){return!!((t==="v4"||!t)&&sT.test(e)||(t==="v6"||!t)&&cT.test(e))}function gT(e,t){if(!rT.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let o=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(o));return!(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||t&&n.alg!==t)}catch{return!1}}function _T(e,t){return!!((t==="v4"||!t)&&aT.test(e)||(t==="v6"||!t)&&uT.test(e))}var Bn=class e extends ee{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==D.string){let i=this._getOrReturnCtx(t);return A(i,{code:T.invalid_type,expected:D.string,received:i.parsedType}),F}let o=new Xe,n;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(n=this._getOrReturnCtx(t,n),A(n,{code:T.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&&(n=this._getOrReturnCtx(t,n),A(n,{code:T.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),o.dirty());else if(i.kind==="length"){let s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(n=this._getOrReturnCtx(t,n),s?A(n,{code:T.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&A(n,{code:T.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),o.dirty())}else if(i.kind==="email")oT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"email",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="emoji")Gd||(Gd=new RegExp(iT,"u")),Gd.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"emoji",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="uuid")eT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"uuid",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="nanoid")tT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"nanoid",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid")Q0.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"cuid",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid2")Y0.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"cuid2",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="ulid")X0.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"ulid",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{n=this._getOrReturnCtx(t,n),A(n,{validation:"url",code:T.invalid_string,message:i.message}),o.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"regex",code:T.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)||(n=this._getOrReturnCtx(t,n),A(n,{code:T.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)||(n=this._getOrReturnCtx(t,n),A(n,{code:T.invalid_string,validation:{startsWith:i.value},message:i.message}),o.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(n=this._getOrReturnCtx(t,n),A(n,{code:T.invalid_string,validation:{endsWith:i.value},message:i.message}),o.dirty()):i.kind==="datetime"?mT(i).test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{code:T.invalid_string,validation:"datetime",message:i.message}),o.dirty()):i.kind==="date"?pT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{code:T.invalid_string,validation:"date",message:i.message}),o.dirty()):i.kind==="time"?fT(i).test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{code:T.invalid_string,validation:"time",message:i.message}),o.dirty()):i.kind==="duration"?nT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"duration",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="ip"?hT(t.data,i.version)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"ip",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="jwt"?gT(t.data,i.alg)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"jwt",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="cidr"?_T(t.data,i.version)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"cidr",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="base64"?lT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"base64",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="base64url"?dT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"base64url",code:T.invalid_string,message:i.message}),o.dirty()):ce.assertNever(i);return{status:o.value,value:t.data}}_regex(t,r,o){return this.refinement(n=>t.test(n),{validation:r,code:T.invalid_string,...q.errToObj(o)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...q.errToObj(t)})}url(t){return this._addCheck({kind:"url",...q.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...q.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...q.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...q.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...q.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...q.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...q.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...q.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...q.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...q.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...q.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...q.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,...q.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,...q.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...q.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...q.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...q.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...q.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...q.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...q.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...q.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...q.errToObj(r)})}nonempty(t){return this.min(1,q.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 r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Bn.create=e=>new Bn({checks:[],typeName:z.ZodString,coerce:e?.coerce??!1,...B(e)});function vT(e,t){let r=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,n=r>o?r:o,i=Number.parseInt(e.toFixed(n).replace(".","")),s=Number.parseInt(t.toFixed(n).replace(".",""));return i%s/10**n}var mi=class e extends ee{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==D.number){let i=this._getOrReturnCtx(t);return A(i,{code:T.invalid_type,expected:D.number,received:i.parsedType}),F}let o,n=new Xe;for(let i of this._def.checks)i.kind==="int"?ce.isInteger(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{code:T.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),A(o,{code:T.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),A(o,{code:T.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?vT(t.data,i.value)!==0&&(o=this._getOrReturnCtx(t,o),A(o,{code:T.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{code:T.not_finite,message:i.message}),n.dirty()):ce.assertNever(i);return{status:n.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,q.toString(r))}gt(t,r){return this.setLimit("min",t,!1,q.toString(r))}lte(t,r){return this.setLimit("max",t,!0,q.toString(r))}lt(t,r){return this.setLimit("max",t,!1,q.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:q.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:q.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:q.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:q.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:q.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:q.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:q.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:q.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:q.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:q.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ce.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(r===null||o.value>r)&&(r=o.value):o.kind==="max"&&(t===null||o.value<t)&&(t=o.value)}return Number.isFinite(r)&&Number.isFinite(t)}};mi.create=e=>new mi({checks:[],typeName:z.ZodNumber,coerce:e?.coerce||!1,...B(e)});var hi=class e extends ee{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==D.bigint)return this._getInvalidInput(t);let o,n=new Xe;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),A(o,{code:T.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),A(o,{code:T.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(o=this._getOrReturnCtx(t,o),A(o,{code:T.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):ce.assertNever(i);return{status:n.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return A(r,{code:T.invalid_type,expected:D.bigint,received:r.parsedType}),F}gte(t,r){return this.setLimit("min",t,!0,q.toString(r))}gt(t,r){return this.setLimit("min",t,!1,q.toString(r))}lte(t,r){return this.setLimit("max",t,!0,q.toString(r))}lt(t,r){return this.setLimit("max",t,!1,q.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:q.toString(n)}]})}_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:q.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:q.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:q.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:q.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:q.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};hi.create=e=>new hi({checks:[],typeName:z.ZodBigInt,coerce:e?.coerce??!1,...B(e)});var gi=class extends ee{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==D.boolean){let o=this._getOrReturnCtx(t);return A(o,{code:T.invalid_type,expected:D.boolean,received:o.parsedType}),F}return ut(t.data)}};gi.create=e=>new gi({typeName:z.ZodBoolean,coerce:e?.coerce||!1,...B(e)});var _i=class e extends ee{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==D.date){let i=this._getOrReturnCtx(t);return A(i,{code:T.invalid_type,expected:D.date,received:i.parsedType}),F}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return A(i,{code:T.invalid_date}),F}let o=new Xe,n;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(n=this._getOrReturnCtx(t,n),A(n,{code:T.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),o.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(n=this._getOrReturnCtx(t,n),A(n,{code:T.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),o.dirty()):ce.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,r){return this._addCheck({kind:"min",value:t.getTime(),message:q.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:q.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};_i.create=e=>new _i({checks:[],coerce:e?.coerce||!1,typeName:z.ZodDate,...B(e)});var vi=class extends ee{_parse(t){if(this._getType(t)!==D.symbol){let o=this._getOrReturnCtx(t);return A(o,{code:T.invalid_type,expected:D.symbol,received:o.parsedType}),F}return ut(t.data)}};vi.create=e=>new vi({typeName:z.ZodSymbol,...B(e)});var Jn=class extends ee{_parse(t){if(this._getType(t)!==D.undefined){let o=this._getOrReturnCtx(t);return A(o,{code:T.invalid_type,expected:D.undefined,received:o.parsedType}),F}return ut(t.data)}};Jn.create=e=>new Jn({typeName:z.ZodUndefined,...B(e)});var Qn=class extends ee{_parse(t){if(this._getType(t)!==D.null){let o=this._getOrReturnCtx(t);return A(o,{code:T.invalid_type,expected:D.null,received:o.parsedType}),F}return ut(t.data)}};Qn.create=e=>new Qn({typeName:z.ZodNull,...B(e)});var yi=class extends ee{constructor(){super(...arguments),this._any=!0}_parse(t){return ut(t.data)}};yi.create=e=>new yi({typeName:z.ZodAny,...B(e)});var Dr=class extends ee{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ut(t.data)}};Dr.create=e=>new Dr({typeName:z.ZodUnknown,...B(e)});var sr=class extends ee{_parse(t){let r=this._getOrReturnCtx(t);return A(r,{code:T.invalid_type,expected:D.never,received:r.parsedType}),F}};sr.create=e=>new sr({typeName:z.ZodNever,...B(e)});var bi=class extends ee{_parse(t){if(this._getType(t)!==D.undefined){let o=this._getOrReturnCtx(t);return A(o,{code:T.invalid_type,expected:D.void,received:o.parsedType}),F}return ut(t.data)}};bi.create=e=>new bi({typeName:z.ZodVoid,...B(e)});var Cr=class e extends ee{_parse(t){let{ctx:r,status:o}=this._processInputParams(t),n=this._def;if(r.parsedType!==D.array)return A(r,{code:T.invalid_type,expected:D.array,received:r.parsedType}),F;if(n.exactLength!==null){let s=r.data.length>n.exactLength.value,a=r.data.length<n.exactLength.value;(s||a)&&(A(r,{code:s?T.too_big:T.too_small,minimum:a?n.exactLength.value:void 0,maximum:s?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),o.dirty())}if(n.minLength!==null&&r.data.length<n.minLength.value&&(A(r,{code:T.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),o.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(A(r,{code:T.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),o.dirty()),r.common.async)return Promise.all([...r.data].map((s,a)=>n.type._parseAsync(new Nt(r,s,r.path,a)))).then(s=>Xe.mergeArray(o,s));let i=[...r.data].map((s,a)=>n.type._parseSync(new Nt(r,s,r.path,a)));return Xe.mergeArray(o,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:q.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:q.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:q.toString(r)}})}nonempty(t){return this.min(1,t)}};Cr.create=(e,t)=>new Cr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:z.ZodArray,...B(t)});function Hn(e){if(e instanceof zt){let t={};for(let r in e.shape){let o=e.shape[r];t[r]=Pt.create(Hn(o))}return new zt({...e._def,shape:()=>t})}else return e instanceof Cr?new Cr({...e._def,type:Hn(e.element)}):e instanceof Pt?Pt.create(Hn(e.unwrap())):e instanceof br?br.create(Hn(e.unwrap())):e instanceof yr?yr.create(e.items.map(t=>Hn(t))):e}var zt=class e extends ee{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(),r=ce.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==D.object){let u=this._getOrReturnCtx(t);return A(u,{code:T.invalid_type,expected:D.object,received:u.parsedType}),F}let{status:o,ctx:n}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof sr&&this._def.unknownKeys==="strip"))for(let u in n.data)s.includes(u)||a.push(u);let c=[];for(let u of s){let l=i[u],d=n.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new Nt(n,d,n.path,u)),alwaysSet:u in n.data})}if(this._def.catchall instanceof sr){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of a)c.push({key:{status:"valid",value:l},value:{status:"valid",value:n.data[l]}});else if(u==="strict")a.length>0&&(A(n,{code:T.unrecognized_keys,keys:a}),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 a){let d=n.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new Nt(n,d,n.path,l)),alwaysSet:l in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let d=await l.key,h=await l.value;u.push({key:d,value:h,alwaysSet:l.alwaysSet})}return u}).then(u=>Xe.mergeObjectSync(o,u)):Xe.mergeObjectSync(o,c)}get shape(){return this._def.shape()}strict(t){return q.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,o)=>{let n=this._def.errorMap?.(r,o).message??o.defaultError;return r.code==="unrecognized_keys"?{message:q.errToObj(t).message??n}:{message:n}}}:{}})}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:z.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let o of ce.objectKeys(t))t[o]&&this.shape[o]&&(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let o of ce.objectKeys(this.shape))t[o]||(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}deepPartial(){return Hn(this)}partial(t){let r={};for(let o of ce.objectKeys(this.shape)){let n=this.shape[o];t&&!t[o]?r[o]=n:r[o]=n.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let o of ce.objectKeys(this.shape))if(t&&!t[o])r[o]=this.shape[o];else{let i=this.shape[o];for(;i instanceof Pt;)i=i._def.innerType;r[o]=i}return new e({...this._def,shape:()=>r})}keyof(){return _v(ce.objectKeys(this.shape))}};zt.create=(e,t)=>new zt({shape:()=>e,unknownKeys:"strip",catchall:sr.create(),typeName:z.ZodObject,...B(t)});zt.strictCreate=(e,t)=>new zt({shape:()=>e,unknownKeys:"strict",catchall:sr.create(),typeName:z.ZodObject,...B(t)});zt.lazycreate=(e,t)=>new zt({shape:e,unknownKeys:"strip",catchall:sr.create(),typeName:z.ZodObject,...B(t)});var Yn=class extends ee{_parse(t){let{ctx:r}=this._processInputParams(t),o=this._def.options;function n(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let s=i.map(a=>new Tt(a.ctx.common.issues));return A(r,{code:T.invalid_union,unionErrors:s}),F}if(r.common.async)return Promise.all(o.map(async i=>{let s={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(n);{let i,s=[];for(let c of o){let u={...r,common:{...r.common,issues:[]},parent:null},l=c._parseSync({data:r.data,path:r.path,parent:u});if(l.status==="valid")return l;l.status==="dirty"&&!i&&(i={result:l,ctx:u}),u.common.issues.length&&s.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let a=s.map(c=>new Tt(c));return A(r,{code:T.invalid_union,unionErrors:a}),F}}get options(){return this._def.options}};Yn.create=(e,t)=>new Yn({options:e,typeName:z.ZodUnion,...B(t)});var vr=e=>e instanceof eo?vr(e.schema):e instanceof Wt?vr(e.innerType()):e instanceof to?[e.value]:e instanceof ro?e.options:e instanceof no?ce.objectValues(e.enum):e instanceof oo?vr(e._def.innerType):e instanceof Jn?[void 0]:e instanceof Qn?[null]:e instanceof Pt?[void 0,...vr(e.unwrap())]:e instanceof br?[null,...vr(e.unwrap())]:e instanceof Wa||e instanceof so?vr(e.unwrap()):e instanceof io?vr(e._def.innerType):[],Kd=class e extends ee{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==D.object)return A(r,{code:T.invalid_type,expected:D.object,received:r.parsedType}),F;let o=this.discriminator,n=r.data[o],i=this.optionsMap.get(n);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(A(r,{code:T.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),F)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,o){let n=new Map;for(let i of r){let s=vr(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of s){if(n.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);n.set(a,i)}}return new e({typeName:z.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:n,...B(o)})}};function Hd(e,t){let r=_r(e),o=_r(t);if(e===t)return{valid:!0,data:e};if(r===D.object&&o===D.object){let n=ce.objectKeys(t),i=ce.objectKeys(e).filter(a=>n.indexOf(a)!==-1),s={...e,...t};for(let a of i){let c=Hd(e[a],t[a]);if(!c.valid)return{valid:!1};s[a]=c.data}return{valid:!0,data:s}}else if(r===D.array&&o===D.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let i=0;i<e.length;i++){let s=e[i],a=t[i],c=Hd(s,a);if(!c.valid)return{valid:!1};n.push(c.data)}return{valid:!0,data:n}}else return r===D.date&&o===D.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Xn=class extends ee{_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=(i,s)=>{if(Fd(i)||Fd(s))return F;let a=Hd(i.value,s.value);return a.valid?((Wd(i)||Wd(s))&&r.dirty(),{status:r.value,value:a.data}):(A(o,{code:T.invalid_intersection_types}),F)};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,s])=>n(i,s)):n(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}};Xn.create=(e,t,r)=>new Xn({left:e,right:t,typeName:z.ZodIntersection,...B(r)});var yr=class e extends ee{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==D.array)return A(o,{code:T.invalid_type,expected:D.array,received:o.parsedType}),F;if(o.data.length<this._def.items.length)return A(o,{code:T.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),F;!this._def.rest&&o.data.length>this._def.items.length&&(A(o,{code:T.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...o.data].map((s,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new Nt(o,s,o.path,a)):null}).filter(s=>!!s);return o.common.async?Promise.all(i).then(s=>Xe.mergeArray(r,s)):Xe.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};yr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new yr({items:e,typeName:z.ZodTuple,rest:null,...B(t)})};var Bd=class e extends ee{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==D.object)return A(o,{code:T.invalid_type,expected:D.object,received:o.parsedType}),F;let n=[],i=this._def.keyType,s=this._def.valueType;for(let a in o.data)n.push({key:i._parse(new Nt(o,a,o.path,a)),value:s._parse(new Nt(o,o.data[a],o.path,a)),alwaysSet:a in o.data});return o.common.async?Xe.mergeObjectAsync(r,n):Xe.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(t,r,o){return r instanceof ee?new e({keyType:t,valueType:r,typeName:z.ZodRecord,...B(o)}):new e({keyType:Bn.create(),valueType:t,typeName:z.ZodRecord,...B(r)})}},wi=class extends ee{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==D.map)return A(o,{code:T.invalid_type,expected:D.map,received:o.parsedType}),F;let n=this._def.keyType,i=this._def.valueType,s=[...o.data.entries()].map(([a,c],u)=>({key:n._parse(new Nt(o,a,o.path,[u,"key"])),value:i._parse(new Nt(o,c,o.path,[u,"value"]))}));if(o.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of s){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return F;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let c of s){let u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return F;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}}}};wi.create=(e,t,r)=>new wi({valueType:t,keyType:e,typeName:z.ZodMap,...B(r)});var $i=class e extends ee{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==D.set)return A(o,{code:T.invalid_type,expected:D.set,received:o.parsedType}),F;let n=this._def;n.minSize!==null&&o.data.size<n.minSize.value&&(A(o,{code:T.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&o.data.size>n.maxSize.value&&(A(o,{code:T.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());let i=this._def.valueType;function s(c){let u=new Set;for(let l of c){if(l.status==="aborted")return F;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let a=[...o.data.values()].map((c,u)=>i._parse(new Nt(o,c,o.path,u)));return o.common.async?Promise.all(a).then(c=>s(c)):s(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:q.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:q.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};$i.create=(e,t)=>new $i({valueType:e,minSize:null,maxSize:null,typeName:z.ZodSet,...B(t)});var Jd=class e extends ee{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==D.function)return A(r,{code:T.invalid_type,expected:D.function,received:r.parsedType}),F;function o(a,c){return Fa({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,pi(),Ar].filter(u=>!!u),issueData:{code:T.invalid_arguments,argumentsError:c}})}function n(a,c){return Fa({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,pi(),Ar].filter(u=>!!u),issueData:{code:T.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof gn){let a=this;return ut(async function(...c){let u=new Tt([]),l=await a._def.args.parseAsync(c,i).catch(m=>{throw u.addIssue(o(c,m)),u}),d=await Reflect.apply(s,this,l);return await a._def.returns._def.type.parseAsync(d,i).catch(m=>{throw u.addIssue(n(d,m)),u})})}else{let a=this;return ut(function(...c){let u=a._def.args.safeParse(c,i);if(!u.success)throw new Tt([o(c,u.error)]);let l=Reflect.apply(s,this,u.data),d=a._def.returns.safeParse(l,i);if(!d.success)throw new Tt([n(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:yr.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,r,o){return new e({args:t||yr.create([]).rest(Dr.create()),returns:r||Dr.create(),typeName:z.ZodFunction,...B(o)})}},eo=class extends ee{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};eo.create=(e,t)=>new eo({getter:e,typeName:z.ZodLazy,...B(t)});var to=class extends ee{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return A(r,{received:r.data,code:T.invalid_literal,expected:this._def.value}),F}return{status:"valid",value:t.data}}get value(){return this._def.value}};to.create=(e,t)=>new to({value:e,typeName:z.ZodLiteral,...B(t)});function _v(e,t){return new ro({values:e,typeName:z.ZodEnum,...B(t)})}var ro=class e extends ee{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),o=this._def.values;return A(r,{expected:ce.joinValues(o),received:r.parsedType,code:T.invalid_type}),F}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),o=this._def.values;return A(r,{received:r.data,code:T.invalid_enum_value,options:o}),F}return ut(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(o=>!t.includes(o)),{...this._def,...r})}};ro.create=_v;var no=class extends ee{_parse(t){let r=ce.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(t);if(o.parsedType!==D.string&&o.parsedType!==D.number){let n=ce.objectValues(r);return A(o,{expected:ce.joinValues(n),received:o.parsedType,code:T.invalid_type}),F}if(this._cache||(this._cache=new Set(ce.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let n=ce.objectValues(r);return A(o,{received:o.data,code:T.invalid_enum_value,options:n}),F}return ut(t.data)}get enum(){return this._def.values}};no.create=(e,t)=>new no({values:e,typeName:z.ZodNativeEnum,...B(t)});var gn=class extends ee{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==D.promise&&r.common.async===!1)return A(r,{code:T.invalid_type,expected:D.promise,received:r.parsedType}),F;let o=r.parsedType===D.promise?r.data:Promise.resolve(r.data);return ut(o.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};gn.create=(e,t)=>new gn({type:e,typeName:z.ZodPromise,...B(t)});var Wt=class extends ee{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===z.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=this._def.effect||null,i={addIssue:s=>{A(o,s),s.fatal?r.abort():r.dirty()},get path(){return o.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){let s=n.transform(o.data,i);if(o.common.async)return Promise.resolve(s).then(async a=>{if(r.value==="aborted")return F;let c=await this._def.schema._parseAsync({data:a,path:o.path,parent:o});return c.status==="aborted"?F:c.status==="dirty"?Kn(c.value):r.value==="dirty"?Kn(c.value):c});{if(r.value==="aborted")return F;let a=this._def.schema._parseSync({data:s,path:o.path,parent:o});return a.status==="aborted"?F:a.status==="dirty"?Kn(a.value):r.value==="dirty"?Kn(a.value):a}}if(n.type==="refinement"){let s=a=>{let c=n.refinement(a,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 a};if(o.common.async===!1){let a=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return a.status==="aborted"?F:(a.status==="dirty"&&r.dirty(),s(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(a=>a.status==="aborted"?F:(a.status==="dirty"&&r.dirty(),s(a.value).then(()=>({status:r.value,value:a.value}))))}if(n.type==="transform")if(o.common.async===!1){let s=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!hn(s))return F;let a=n.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(s=>hn(s)?Promise.resolve(n.transform(s.value,i)).then(a=>({status:r.value,value:a})):F);ce.assertNever(n)}};Wt.create=(e,t,r)=>new Wt({schema:e,typeName:z.ZodEffects,effect:t,...B(r)});Wt.createWithPreprocess=(e,t,r)=>new Wt({schema:t,effect:{type:"preprocess",transform:e},typeName:z.ZodEffects,...B(r)});var Pt=class extends ee{_parse(t){return this._getType(t)===D.undefined?ut(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Pt.create=(e,t)=>new Pt({innerType:e,typeName:z.ZodOptional,...B(t)});var br=class extends ee{_parse(t){return this._getType(t)===D.null?ut(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};br.create=(e,t)=>new br({innerType:e,typeName:z.ZodNullable,...B(t)});var oo=class extends ee{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return r.parsedType===D.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};oo.create=(e,t)=>new oo({innerType:e,typeName:z.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...B(t)});var io=class extends ee{_parse(t){let{ctx:r}=this._processInputParams(t),o={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return fi(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Tt(o.common.issues)},input:o.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new Tt(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}};io.create=(e,t)=>new io({innerType:e,typeName:z.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...B(t)});var ki=class extends ee{_parse(t){if(this._getType(t)!==D.nan){let o=this._getOrReturnCtx(t);return A(o,{code:T.invalid_type,expected:D.nan,received:o.parsedType}),F}return{status:"valid",value:t.data}}};ki.create=e=>new ki({typeName:z.ZodNaN,...B(e)});var VL=Symbol("zod_brand"),Wa=class extends ee{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return this._def.type._parse({data:o,path:r.path,parent:r})}unwrap(){return this._def.type}},Ga=class e extends ee{_parse(t){let{status:r,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"?F:i.status==="dirty"?(r.dirty(),Kn(i.value)):this._def.out._parseAsync({data:i.value,path:o.path,parent:o})})();{let n=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return n.status==="aborted"?F:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:o.path,parent:o})}}static create(t,r){return new e({in:t,out:r,typeName:z.ZodPipeline})}},so=class extends ee{_parse(t){let r=this._def.innerType._parse(t),o=n=>(hn(n)&&(n.value=Object.freeze(n.value)),n);return fi(r)?r.then(n=>o(n)):o(r)}unwrap(){return this._def.innerType}};so.create=(e,t)=>new so({innerType:e,typeName:z.ZodReadonly,...B(t)});var FL={object:zt.lazycreate},z;(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"})(z||(z={}));var WL=Bn.create,GL=mi.create,KL=ki.create,HL=hi.create,BL=gi.create,JL=_i.create,QL=vi.create,YL=Jn.create,XL=Qn.create,eZ=yi.create,tZ=Dr.create,rZ=sr.create,nZ=bi.create,oZ=Cr.create,vv=zt.create,iZ=zt.strictCreate,sZ=Yn.create,aZ=Kd.create,cZ=Xn.create,uZ=yr.create,lZ=Bd.create,dZ=wi.create,pZ=$i.create,fZ=Jd.create,mZ=eo.create,hZ=to.create,gZ=ro.create,_Z=no.create,vZ=gn.create,yZ=Wt.create,bZ=Pt.create,wZ=br.create,$Z=Wt.createWithPreprocess,kZ=Ga.create;var Kt={};mn(Kt,{$ZodAny:()=>Oc,$ZodArray:()=>ho,$ZodAsyncError:()=>ar,$ZodBase64:()=>$c,$ZodBase64URL:()=>kc,$ZodBigInt:()=>Ai,$ZodBigIntFormat:()=>zc,$ZodBoolean:()=>mo,$ZodCIDRv4:()=>bc,$ZodCIDRv6:()=>wc,$ZodCUID:()=>fc,$ZodCUID2:()=>mc,$ZodCatch:()=>Jc,$ZodCheck:()=>Ce,$ZodCheckBigIntFormat:()=>Mp,$ZodCheckEndsWith:()=>Qp,$ZodCheckGreaterThan:()=>oc,$ZodCheckIncludes:()=>Bp,$ZodCheckLengthEquals:()=>Wp,$ZodCheckLessThan:()=>nc,$ZodCheckLowerCase:()=>Kp,$ZodCheckMaxLength:()=>Vp,$ZodCheckMaxSize:()=>Up,$ZodCheckMimeType:()=>Xp,$ZodCheckMinLength:()=>Fp,$ZodCheckMinSize:()=>Lp,$ZodCheckMultipleOf:()=>Cp,$ZodCheckNumberFormat:()=>qp,$ZodCheckOverwrite:()=>ef,$ZodCheckProperty:()=>Yp,$ZodCheckRegex:()=>Gp,$ZodCheckSizeEquals:()=>Zp,$ZodCheckStartsWith:()=>Jp,$ZodCheckStringFormat:()=>fo,$ZodCheckUpperCase:()=>Hp,$ZodCustom:()=>ru,$ZodCustomStringFormat:()=>Tc,$ZodDate:()=>Ac,$ZodDefault:()=>Gc,$ZodDiscriminatedUnion:()=>Dc,$ZodE164:()=>xc,$ZodEmail:()=>uc,$ZodEmoji:()=>dc,$ZodEnum:()=>Lc,$ZodError:()=>Oi,$ZodFile:()=>Vc,$ZodFunction:()=>Nu,$ZodGUID:()=>ac,$ZodIPv4:()=>vc,$ZodIPv6:()=>yc,$ZodISODate:()=>of,$ZodISODateTime:()=>nf,$ZodISODuration:()=>af,$ZodISOTime:()=>sf,$ZodIntersection:()=>Cc,$ZodJWT:()=>Sc,$ZodKSUID:()=>_c,$ZodLazy:()=>tu,$ZodLiteral:()=>Zc,$ZodMap:()=>Mc,$ZodNaN:()=>Qc,$ZodNanoID:()=>pc,$ZodNever:()=>Rc,$ZodNonOptional:()=>Hc,$ZodNull:()=>Nc,$ZodNullable:()=>Wc,$ZodNumber:()=>ji,$ZodNumberFormat:()=>Pc,$ZodObject:()=>Di,$ZodOptional:()=>Fc,$ZodPipe:()=>_o,$ZodPrefault:()=>Kc,$ZodPromise:()=>eu,$ZodReadonly:()=>Yc,$ZodRealError:()=>uo,$ZodRecord:()=>qc,$ZodRegistry:()=>yo,$ZodSet:()=>Uc,$ZodString:()=>Zr,$ZodStringFormat:()=>ke,$ZodSuccess:()=>Bc,$ZodSymbol:()=>Ic,$ZodTemplateLiteral:()=>Xc,$ZodTransform:()=>go,$ZodTuple:()=>Vr,$ZodType:()=>G,$ZodULID:()=>hc,$ZodURL:()=>lc,$ZodUUID:()=>cc,$ZodUndefined:()=>Ec,$ZodUnion:()=>Ci,$ZodUnknown:()=>$n,$ZodVoid:()=>jc,$ZodXID:()=>gc,$brand:()=>Ha,$constructor:()=>v,$input:()=>iu,$output:()=>ou,Doc:()=>Ri,JSONSchema:()=>Py,JSONSchemaGenerator:()=>ys,NEVER:()=>Ka,TimePrecision:()=>au,_any:()=>wu,_array:()=>vs,_base64:()=>rs,_base64url:()=>ns,_bigint:()=>hu,_boolean:()=>mu,_catch:()=>JP,_cidrv4:()=>es,_cidrv6:()=>ts,_coercedBigint:()=>gf,_coercedBoolean:()=>hf,_coercedDate:()=>_f,_coercedNumber:()=>mf,_coercedString:()=>uf,_cuid:()=>Ki,_cuid2:()=>Hi,_custom:()=>Pu,_date:()=>xu,_default:()=>KP,_discriminatedUnion:()=>DP,_e164:()=>os,_email:()=>Mi,_emoji:()=>Wi,_endsWith:()=>ps,_enum:()=>LP,_file:()=>Tu,_float32:()=>lu,_float64:()=>du,_gt:()=>kr,_gte:()=>_t,_guid:()=>bo,_includes:()=>ls,_int:()=>uu,_int32:()=>pu,_int64:()=>gu,_intersection:()=>CP,_ipv4:()=>Yi,_ipv6:()=>Xi,_isoDate:()=>df,_isoDateTime:()=>lf,_isoDuration:()=>ff,_isoTime:()=>pf,_jwt:()=>is,_ksuid:()=>Qi,_lazy:()=>ez,_length:()=>ko,_literal:()=>VP,_lowercase:()=>cs,_lt:()=>$r,_lte:()=>Ot,_map:()=>MP,_max:()=>Ot,_maxLength:()=>$o,_maxSize:()=>wo,_mime:()=>fs,_min:()=>_t,_minLength:()=>Fr,_minSize:()=>Sn,_multipleOf:()=>xn,_nan:()=>Su,_nanoid:()=>Gi,_nativeEnum:()=>ZP,_negative:()=>yf,_never:()=>$u,_nonnegative:()=>wf,_nonoptional:()=>HP,_nonpositive:()=>bf,_normalize:()=>ms,_null:()=>bu,_nullable:()=>GP,_number:()=>cu,_optional:()=>WP,_overwrite:()=>xr,_parse:()=>Ya,_parseAsync:()=>Xa,_pipe:()=>QP,_positive:()=>vf,_promise:()=>tz,_property:()=>$f,_readonly:()=>YP,_record:()=>qP,_refine:()=>zu,_regex:()=>as,_safeParse:()=>ec,_safeParseAsync:()=>tc,_set:()=>UP,_size:()=>ss,_startsWith:()=>ds,_string:()=>su,_stringFormat:()=>Eu,_stringbool:()=>Iu,_success:()=>BP,_symbol:()=>vu,_templateLiteral:()=>XP,_toLowerCase:()=>gs,_toUpperCase:()=>_s,_transform:()=>FP,_trim:()=>hs,_tuple:()=>kf,_uint32:()=>fu,_uint64:()=>_u,_ulid:()=>Bi,_undefined:()=>yu,_union:()=>AP,_unknown:()=>kn,_uppercase:()=>us,_url:()=>Fi,_uuid:()=>Ui,_uuidv4:()=>Li,_uuidv6:()=>Zi,_uuidv7:()=>Vi,_void:()=>ku,_xid:()=>Ji,clone:()=>et,config:()=>Ue,flattenError:()=>lo,formatError:()=>po,function:()=>Ou,globalConfig:()=>xi,globalRegistry:()=>Gt,isValidBase64:()=>cf,isValidBase64URL:()=>qv,isValidJWT:()=>Mv,locales:()=>vo,parse:()=>yn,parseAsync:()=>bn,prettifyError:()=>Qa,regexes:()=>Lr,registry:()=>qi,safeParse:()=>Mr,safeParseAsync:()=>Ur,toDotPath:()=>bv,toJSONSchema:()=>xo,treeifyError:()=>Ja,util:()=>R,version:()=>tf});var Ka=Object.freeze({status:"aborted"});function v(e,t,r){function o(a,c){var u;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(u=a._zod).traits??(u.traits=new Set),a._zod.traits.add(e),t(a,c);for(let l in s.prototype)l in a||Object.defineProperty(a,l,{value:s.prototype[l].bind(a)});a._zod.constr=s,a._zod.def=c}let n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:e});function s(a){var c;let u=r?.Parent?new i:this;o(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(s,"init",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var Ha=Symbol("zod_brand"),ar=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},xi={};function Ue(e){return e&&Object.assign(xi,e),xi}var R={};mn(R,{BIGINT_FORMAT_RANGES:()=>sp,Class:()=>Yd,NUMBER_FORMAT_RANGES:()=>ip,aborted:()=>vn,allowsEval:()=>rp,assert:()=>kT,assertEqual:()=>yT,assertIs:()=>wT,assertNever:()=>$T,assertNotEqual:()=>bT,assignProp:()=>tp,cached:()=>Pi,captureStackTrace:()=>Ba,cleanEnum:()=>DT,cleanRegex:()=>zi,clone:()=>et,createTransparentProxy:()=>IT,defineLazy:()=>ve,esc:()=>_n,escapeRegex:()=>wr,extend:()=>OT,finalizeIssue:()=>It,floatSafeRemainder:()=>ep,getElementAtPath:()=>xT,getEnumValues:()=>Ti,getLengthableOrigin:()=>Ni,getParsedType:()=>zT,getSizableOrigin:()=>Ei,isObject:()=>ao,isPlainObject:()=>co,issue:()=>ap,joinValues:()=>x,jsonStringifyReplacer:()=>Xd,merge:()=>RT,normalizeParams:()=>N,nullish:()=>qr,numKeys:()=>PT,omit:()=>NT,optionalKeys:()=>op,partial:()=>jT,pick:()=>ET,prefixIssues:()=>gt,primitiveTypes:()=>np,promiseAllObject:()=>ST,propertyKeyTypes:()=>Ii,randomString:()=>TT,required:()=>AT,stringifyPrimitive:()=>j,unwrapMessage:()=>Si});function yT(e){return e}function bT(e){return e}function wT(e){}function $T(e){throw new Error}function kT(e){}function Ti(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function x(e,t="|"){return e.map(r=>j(r)).join(t)}function Xd(e,t){return typeof t=="bigint"?t.toString():t}function Pi(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function qr(e){return e==null}function zi(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function ep(e,t){let r=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,n=r>o?r:o,i=Number.parseInt(e.toFixed(n).replace(".","")),s=Number.parseInt(t.toFixed(n).replace(".",""));return i%s/10**n}function ve(e,t,r){Object.defineProperty(e,t,{get(){{let n=r();return e[t]=n,n}throw new Error("cached value already set")},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function tp(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function xT(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function ST(e){let t=Object.keys(e),r=t.map(o=>e[o]);return Promise.all(r).then(o=>{let n={};for(let i=0;i<t.length;i++)n[t[i]]=o[i];return n})}function TT(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function _n(e){return JSON.stringify(e)}var Ba=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function ao(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var rp=Pi(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function co(e){if(ao(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let r=t.prototype;return!(ao(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function PT(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var zT=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}`)}},Ii=new Set(["string","number","symbol"]),np=new Set(["string","number","bigint","boolean","symbol","undefined"]);function wr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function et(e,t,r){let o=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(o._zod.parent=e),o}function N(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 IT(e){let t;return new Proxy({},{get(r,o,n){return t??(t=e()),Reflect.get(t,o,n)},set(r,o,n,i){return t??(t=e()),Reflect.set(t,o,n,i)},has(r,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(r,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(r,o,n){return t??(t=e()),Reflect.defineProperty(t,o,n)}})}function j(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function op(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var ip={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]},sp={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function ET(e,t){let r={},o=e._zod.def;for(let n in t){if(!(n in o.shape))throw new Error(`Unrecognized key: "${n}"`);t[n]&&(r[n]=o.shape[n])}return et(e,{...e._zod.def,shape:r,checks:[]})}function NT(e,t){let r={...e._zod.def.shape},o=e._zod.def;for(let n in t){if(!(n in o.shape))throw new Error(`Unrecognized key: "${n}"`);t[n]&&delete r[n]}return et(e,{...e._zod.def,shape:r,checks:[]})}function OT(e,t){if(!co(t))throw new Error("Invalid input to extend: expected a plain object");let r={...e._zod.def,get shape(){let o={...e._zod.def.shape,...t};return tp(this,"shape",o),o},checks:[]};return et(e,r)}function RT(e,t){return et(e,{...e._zod.def,get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return tp(this,"shape",r),r},catchall:t._zod.def.catchall,checks:[]})}function jT(e,t,r){let o=t._zod.def.shape,n={...o};if(r)for(let i in r){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(n[i]=e?new e({type:"optional",innerType:o[i]}):o[i])}else for(let i in o)n[i]=e?new e({type:"optional",innerType:o[i]}):o[i];return et(t,{...t._zod.def,shape:n,checks:[]})}function AT(e,t,r){let o=t._zod.def.shape,n={...o};if(r)for(let i in r){if(!(i in n))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(n[i]=new e({type:"nonoptional",innerType:o[i]}))}else for(let i in o)n[i]=new e({type:"nonoptional",innerType:o[i]});return et(t,{...t._zod.def,shape:n,checks:[]})}function vn(e,t=0){for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function gt(e,t){return t.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function Si(e){return typeof e=="string"?e:e?.message}function It(e,t,r){let o={...e,path:e.path??[]};if(!e.message){let n=Si(e.inst?._zod.def?.error?.(e))??Si(t?.error?.(e))??Si(r.customError?.(e))??Si(r.localeError?.(e))??"Invalid input";o.message=n}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function Ei(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Ni(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ap(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function DT(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}var Yd=class{constructor(...t){}};var yv=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,Xd,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Oi=v("$ZodError",yv),uo=v("$ZodError",yv,{Parent:Error});function lo(e,t=r=>r.message){let r={},o=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):o.push(t(n));return{formErrors:o,fieldErrors:r}}function po(e,t){let r=t||function(i){return i.message},o={_errors:[]},n=i=>{for(let s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>n({issues:a}));else if(s.code==="invalid_key")n({issues:s.issues});else if(s.code==="invalid_element")n({issues:s.issues});else if(s.path.length===0)o._errors.push(r(s));else{let a=o,c=0;for(;c<s.path.length;){let u=s.path[c];c===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(s))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return n(e),o}function Ja(e,t){let r=t||function(i){return i.message},o={errors:[]},n=(i,s=[])=>{var a,c;for(let u of i.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(l=>n({issues:l},u.path));else if(u.code==="invalid_key")n({issues:u.issues},u.path);else if(u.code==="invalid_element")n({issues:u.issues},u.path);else{let l=[...s,...u.path];if(l.length===0){o.errors.push(r(u));continue}let d=o,h=0;for(;h<l.length;){let m=l[h],p=h===l.length-1;typeof m=="string"?(d.properties??(d.properties={}),(a=d.properties)[m]??(a[m]={errors:[]}),d=d.properties[m]):(d.items??(d.items=[]),(c=d.items)[m]??(c[m]={errors:[]}),d=d.items[m]),p&&d.errors.push(r(u)),h++}}};return n(e),o}function bv(e){let t=[];for(let r of e)typeof r=="number"?t.push(`[${r}]`):typeof r=="symbol"?t.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?t.push(`[${JSON.stringify(r)}]`):(t.length&&t.push("."),t.push(r));return t.join("")}function Qa(e){let t=[],r=[...e.issues].sort((o,n)=>o.path.length-n.path.length);for(let o of r)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${bv(o.path)}`);return t.join(`
17
- `)}var Ya=e=>(t,r,o,n)=>{let i=o?Object.assign(o,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new ar;if(s.issues.length){let a=new(n?.Err??e)(s.issues.map(c=>It(c,i,Ue())));throw Ba(a,n?.callee),a}return s.value},yn=Ya(uo),Xa=e=>async(t,r,o,n)=>{let i=o?Object.assign(o,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(n?.Err??e)(s.issues.map(c=>It(c,i,Ue())));throw Ba(a,n?.callee),a}return s.value},bn=Xa(uo),ec=e=>(t,r,o)=>{let n=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new ar;return i.issues.length?{success:!1,error:new(e??Oi)(i.issues.map(s=>It(s,n,Ue())))}:{success:!0,data:i.value}},Mr=ec(uo),tc=e=>async(t,r,o)=>{let n=o?Object.assign(o,{async:!0}):{async:!0},i=t._zod.run({value:r,issues:[]},n);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>It(s,n,Ue())))}:{success:!0,data:i.value}},Ur=tc(uo);var Lr={};mn(Lr,{_emoji:()=>wv,base64:()=>$p,base64url:()=>rc,bigint:()=>Ip,boolean:()=>Op,browserEmail:()=>WT,cidrv4:()=>bp,cidrv6:()=>wp,cuid:()=>cp,cuid2:()=>up,date:()=>Sp,datetime:()=>Pp,domain:()=>GT,duration:()=>mp,e164:()=>xp,email:()=>gp,emoji:()=>_p,extendedDuration:()=>qT,guid:()=>hp,hostname:()=>kp,html5Email:()=>ZT,integer:()=>Ep,ipv4:()=>vp,ipv6:()=>yp,ksuid:()=>pp,lowercase:()=>Ap,nanoid:()=>fp,null:()=>Rp,number:()=>Np,rfc5322Email:()=>VT,string:()=>zp,time:()=>Tp,ulid:()=>lp,undefined:()=>jp,unicodeEmail:()=>FT,uppercase:()=>Dp,uuid:()=>wn,uuid4:()=>MT,uuid6:()=>UT,uuid7:()=>LT,xid:()=>dp});var cp=/^[cC][^\s-]{8,}$/,up=/^[0-9a-z]+$/,lp=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,dp=/^[0-9a-vA-V]{20}$/,pp=/^[A-Za-z0-9]{27}$/,fp=/^[a-zA-Z0-9_-]{21}$/,mp=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,qT=/^[-+]?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)?)??$/,hp=/^([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})$/,wn=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)$/,MT=wn(4),UT=wn(6),LT=wn(7),gp=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,ZT=/^[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])?)*$/,VT=/^(([^<>()\[\]\\.,;:\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,}))$/,FT=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,WT=/^[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])?)*$/,wv="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function _p(){return new RegExp(wv,"u")}var vp=/^(?:(?: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])$/,yp=/^(([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})$/,bp=/^((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])$/,wp=/^(([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])$/,$p=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,rc=/^[A-Za-z0-9_-]*$/,kp=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,GT=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,xp=/^\+(?:[0-9]){6,14}[0-9]$/,$v="(?:(?:\\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])))",Sp=new RegExp(`^${$v}$`);function kv(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 Tp(e){return new RegExp(`^${kv(e)}$`)}function Pp(e){let t=kv({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-]\\d{2}:\\d{2})");let o=`${t}(?:${r.join("|")})`;return new RegExp(`^${$v}T(?:${o})$`)}var zp=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Ip=/^\d+n?$/,Ep=/^\d+$/,Np=/^-?\d+(?:\.\d+)?/i,Op=/true|false/i,Rp=/null/i;var jp=/undefined/i;var Ap=/^[^A-Z]*$/,Dp=/^[^a-z]*$/;var Ce=v("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Sv={number:"number",bigint:"bigint",object:"date"},nc=v("$ZodCheckLessThan",(e,t)=>{Ce.init(e,t);let r=Sv[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:r,code:"too_big",maximum:t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),oc=v("$ZodCheckGreaterThan",(e,t)=>{Ce.init(e,t);let r=Sv[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:r,code:"too_small",minimum:t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Cp=v("$ZodCheckMultipleOf",(e,t)=>{Ce.init(e,t),e._zod.onattach.push(r=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):ep(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),qp=v("$ZodCheckNumberFormat",(e,t)=>{Ce.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),o=r?"int":"number",[n,i]=ip[t.format];e._zod.onattach.push(s=>{let a=s._zod.bag;a.format=t.format,a.minimum=n,a.maximum=i,r&&(a.pattern=Ep)}),e._zod.check=s=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:o,format:t.format,code:"invalid_type",input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!t.abort});return}}a<n&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inst:e})}}),Mp=v("$ZodCheckBigIntFormat",(e,t)=>{Ce.init(e,t);let[r,o]=sp[t.format];e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,i.minimum=r,i.maximum=o}),e._zod.check=n=>{let i=n.value;i<r&&n.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),i>o&&n.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inst:e})}}),Up=v("$ZodCheckMaxSize",(e,t)=>{var r;Ce.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!qr(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let n=o.value;n.size<=t.maximum||o.issues.push({origin:Ei(n),code:"too_big",maximum:t.maximum,input:n,inst:e,continue:!t.abort})}}),Lp=v("$ZodCheckMinSize",(e,t)=>{var r;Ce.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!qr(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let n=o.value;n.size>=t.minimum||o.issues.push({origin:Ei(n),code:"too_small",minimum:t.minimum,input:n,inst:e,continue:!t.abort})}}),Zp=v("$ZodCheckSizeEquals",(e,t)=>{var r;Ce.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!qr(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=o=>{let n=o.value,i=n.size;if(i===t.size)return;let s=i>t.size;o.issues.push({origin:Ei(n),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Vp=v("$ZodCheckMaxLength",(e,t)=>{var r;Ce.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!qr(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let n=o.value;if(n.length<=t.maximum)return;let s=Ni(n);o.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Fp=v("$ZodCheckMinLength",(e,t)=>{var r;Ce.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!qr(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let n=o.value;if(n.length>=t.minimum)return;let s=Ni(n);o.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Wp=v("$ZodCheckLengthEquals",(e,t)=>{var r;Ce.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!qr(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=o=>{let n=o.value,i=n.length;if(i===t.length)return;let s=Ni(n),a=i>t.length;o.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),fo=v("$ZodCheckStringFormat",(e,t)=>{var r,o;Ce.init(e,t),e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),Gp=v("$ZodCheckRegex",(e,t)=>{fo.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Kp=v("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Ap),fo.init(e,t)}),Hp=v("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Dp),fo.init(e,t)}),Bp=v("$ZodCheckIncludes",(e,t)=>{Ce.init(e,t);let r=wr(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Jp=v("$ZodCheckStartsWith",(e,t)=>{Ce.init(e,t);let r=new RegExp(`^${wr(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),Qp=v("$ZodCheckEndsWith",(e,t)=>{Ce.init(e,t);let r=new RegExp(`.*${wr(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});function xv(e,t,r){e.issues.length&&t.issues.push(...gt(r,e.issues))}var Yp=v("$ZodCheckProperty",(e,t)=>{Ce.init(e,t),e._zod.check=r=>{let o=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(n=>xv(n,r,t.property));xv(o,r,t.property)}}),Xp=v("$ZodCheckMimeType",(e,t)=>{Ce.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime}),e._zod.check=o=>{r.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e})}}),ef=v("$ZodCheckOverwrite",(e,t)=>{Ce.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var Ri=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(`
16
+ deps: ${r}}`};var PM={keyword:"dependencies",type:"object",schemaType:"object",error:gr.error,code(e){let[t,r]=zM(e);zS(e,t),ES(e,r)}};function zM({schema:e}){let t={},r={};for(let o in e){if(o==="__proto__")continue;let n=Array.isArray(e[o])?t:r;n[o]=e[o]}return[t,r]}function zS(e,t=e.schema){let{gen:r,data:o,it:n}=e;if(Object.keys(t).length===0)return;let i=r.let("missing");for(let s in t){let a=t[s];if(a.length===0)continue;let c=(0,La.propertyInData)(r,o,s,n.opts.ownProperties);e.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),n.allErrors?r.if(c,()=>{for(let u of a)(0,La.checkReportMissingProp)(e,u)}):(r.if((0,C_._)`${c} && (${(0,La.checkMissingProp)(e,a,i)})`),(0,La.reportMissingProp)(e,i),r.else())}}gr.validatePropertyDeps=zS;function ES(e,t=e.schema){let{gen:r,data:o,keyword:n,it:i}=e,s=r.name("valid");for(let a in t)(0,TM.alwaysValidSchema)(i,t[a])||(r.if((0,La.propertyInData)(r,o,a,i.opts.ownProperties),()=>{let c=e.subschema({keyword:n,schemaProp:a},s);e.mergeValidEvaluated(c,s)},()=>r.var(s,!0)),e.ok(s))}gr.validateSchemaDeps=ES;gr.default=PM});var OS=w(D_=>{"use strict";Object.defineProperty(D_,"__esModule",{value:!0});var NS=X(),EM=me(),IM={message:"property name must be valid",params:({params:e})=>(0,NS._)`{propertyName: ${e.propertyName}}`},NM={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:IM,code(e){let{gen:t,schema:r,data:o,it:n}=e;if((0,EM.alwaysValidSchema)(n,r))return;let i=t.name("valid");t.forIn("key",o,s=>{e.setParams({propertyName:s}),e.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},i),t.if((0,NS.not)(i),()=>{e.error(!0),n.allErrors||t.break()})}),e.ok(i)}};D_.default=NM});var M_=w(q_=>{"use strict";Object.defineProperty(q_,"__esModule",{value:!0});var Td=Lt(),nr=X(),OM=Rr(),Pd=me(),RM={message:"must NOT have additional properties",params:({params:e})=>(0,nr._)`{additionalProperty: ${e.additionalProperty}}`},jM={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:RM,code(e){let{gen:t,schema:r,parentSchema:o,data:n,errsCount:i,it:s}=e;if(!i)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=s;if(s.props=!0,c.removeAdditional!=="all"&&(0,Pd.alwaysValidSchema)(s,r))return;let u=(0,Td.allSchemaProperties)(o.properties),l=(0,Td.allSchemaProperties)(o.patternProperties);d(),e.ok((0,nr._)`${i} === ${OM.default.errors}`);function d(){t.forIn("key",n,_=>{!u.length&&!l.length?p(_):t.if(h(_),()=>p(_))})}function h(_){let y;if(u.length>8){let $=(0,Pd.schemaRefOrVal)(s,o.properties,"properties");y=(0,Td.isOwnProperty)(t,$,_)}else u.length?y=(0,nr.or)(...u.map($=>(0,nr._)`${_} === ${$}`)):y=nr.nil;return l.length&&(y=(0,nr.or)(y,...l.map($=>(0,nr._)`${(0,Td.usePattern)(e,$)}.test(${_})`))),(0,nr.not)(y)}function m(_){t.code((0,nr._)`delete ${n}[${_}]`)}function p(_){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(_);return}if(r===!1){e.setParams({additionalProperty:_}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,Pd.alwaysValidSchema)(s,r)){let y=t.name("valid");c.removeAdditional==="failing"?(f(_,y,!1),t.if((0,nr.not)(y),()=>{e.reset(),m(_)})):(f(_,y),a||t.if((0,nr.not)(y),()=>t.break()))}}function f(_,y,$){let k={keyword:"additionalProperties",dataProp:_,dataPropType:Pd.Type.Str};$===!1&&Object.assign(k,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(k,y)}}};q_.default=jM});var AS=w(L_=>{"use strict";Object.defineProperty(L_,"__esModule",{value:!0});var AM=za(),RS=Lt(),U_=me(),jS=M_(),CM={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:o,data:n,it:i}=e;i.opts.removeAdditional==="all"&&o.additionalProperties===void 0&&jS.default.code(new AM.KeywordCxt(i,jS.default,"additionalProperties"));let s=(0,RS.allSchemaProperties)(r);for(let d of s)i.definedProperties.add(d);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=U_.mergeEvaluated.props(t,(0,U_.toHash)(s),i.props));let a=s.filter(d=>!(0,U_.alwaysValidSchema)(i,r[d]));if(a.length===0)return;let c=t.name("valid");for(let d of a)u(d)?l(d):(t.if((0,RS.propertyInData)(t,n,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&&r[d].default!==void 0}function l(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};L_.default=CM});var MS=w(Z_=>{"use strict";Object.defineProperty(Z_,"__esModule",{value:!0});var CS=Lt(),zd=X(),DS=me(),qS=me(),DM={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:o,parentSchema:n,it:i}=e,{opts:s}=i,a=(0,CS.allSchemaProperties)(r),c=a.filter(f=>(0,DS.alwaysValidSchema)(i,r[f]));if(a.length===0||c.length===a.length&&(!i.opts.unevaluated||i.props===!0))return;let u=s.strictSchema&&!s.allowMatchingProperties&&n.properties,l=t.name("valid");i.props!==!0&&!(i.props instanceof zd.Name)&&(i.props=(0,qS.evaluatedPropsToName)(t,i.props));let{props:d}=i;h();function h(){for(let f of a)u&&m(f),i.allErrors?p(f):(t.var(l,!0),p(f),t.if(l))}function m(f){for(let _ in u)new RegExp(f).test(_)&&(0,DS.checkStrictMode)(i,`property ${_} matches pattern ${f} (use allowMatchingProperties)`)}function p(f){t.forIn("key",o,_=>{t.if((0,zd._)`${(0,CS.usePattern)(e,f)}.test(${_})`,()=>{let y=c.includes(f);y||e.subschema({keyword:"patternProperties",schemaProp:f,dataProp:_,dataPropType:qS.Type.Str},l),i.opts.unevaluated&&d!==!0?t.assign((0,zd._)`${d}[${_}]`,!0):!y&&!i.allErrors&&t.if((0,zd.not)(l),()=>t.break())})})}}};Z_.default=DM});var US=w(V_=>{"use strict";Object.defineProperty(V_,"__esModule",{value:!0});var qM=me(),MM={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:o}=e;if((0,qM.alwaysValidSchema)(o,r)){e.fail();return}let n=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),e.failResult(n,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};V_.default=MM});var LS=w(F_=>{"use strict";Object.defineProperty(F_,"__esModule",{value:!0});var UM=Lt(),LM={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:UM.validateUnion,error:{message:"must match a schema in anyOf"}};F_.default=LM});var ZS=w(W_=>{"use strict";Object.defineProperty(W_,"__esModule",{value:!0});var Ed=X(),ZM=me(),VM={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Ed._)`{passingSchemas: ${e.passing}}`},FM={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:VM,code(e){let{gen:t,schema:r,parentSchema:o,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&o.discriminator)return;let i=r,s=t.let("valid",!1),a=t.let("passing",null),c=t.name("_valid");e.setParams({passing:a}),t.block(u),e.result(s,()=>e.reset(),()=>e.error(!0));function u(){i.forEach((l,d)=>{let h;(0,ZM.alwaysValidSchema)(n,l)?t.var(c,!0):h=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,Ed._)`${c} && ${s}`).assign(s,!1).assign(a,(0,Ed._)`[${a}, ${d}]`).else(),t.if(c,()=>{t.assign(s,!0),t.assign(a,d),h&&e.mergeEvaluated(h,Ed.Name)})})}}};W_.default=FM});var VS=w(G_=>{"use strict";Object.defineProperty(G_,"__esModule",{value:!0});var WM=me(),GM={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let n=t.name("valid");r.forEach((i,s)=>{if((0,WM.alwaysValidSchema)(o,i))return;let a=e.subschema({keyword:"allOf",schemaProp:s},n);e.ok(n),e.mergeEvaluated(a)})}};G_.default=GM});var GS=w(K_=>{"use strict";Object.defineProperty(K_,"__esModule",{value:!0});var Id=X(),WS=me(),KM={message:({params:e})=>(0,Id.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Id._)`{failingKeyword: ${e.ifClause}}`},BM={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:KM,code(e){let{gen:t,parentSchema:r,it:o}=e;r.then===void 0&&r.else===void 0&&(0,WS.checkStrictMode)(o,'"if" without "then" and "else" is ignored');let n=FS(o,"then"),i=FS(o,"else");if(!n&&!i)return;let s=t.let("valid",!0),a=t.name("_valid");if(c(),e.reset(),n&&i){let l=t.let("ifClause");e.setParams({ifClause:l}),t.if(a,u("then",l),u("else",l))}else n?t.if(a,u("then")):t.if((0,Id.not)(a),u("else"));e.pass(s,()=>e.error(!0));function c(){let l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(l)}function u(l,d){return()=>{let h=e.subschema({keyword:l},a);t.assign(s,a),e.mergeValidEvaluated(h,s),d?t.assign(d,(0,Id._)`${l}`):e.setParams({ifClause:l})}}}};function FS(e,t){let r=e.schema[t];return r!==void 0&&!(0,WS.alwaysValidSchema)(e,r)}K_.default=BM});var KS=w(B_=>{"use strict";Object.defineProperty(B_,"__esModule",{value:!0});var HM=me(),JM={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,HM.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};B_.default=JM});var BS=w(H_=>{"use strict";Object.defineProperty(H_,"__esModule",{value:!0});var QM=N_(),YM=xS(),XM=O_(),e4=TS(),t4=PS(),r4=IS(),n4=OS(),o4=M_(),i4=AS(),s4=MS(),a4=US(),c4=LS(),u4=ZS(),l4=VS(),d4=GS(),p4=KS();function f4(e=!1){let t=[a4.default,c4.default,u4.default,l4.default,d4.default,p4.default,n4.default,o4.default,r4.default,i4.default,s4.default];return e?t.push(YM.default,e4.default):t.push(QM.default,XM.default),t.push(t4.default),t}H_.default=f4});var HS=w(J_=>{"use strict";Object.defineProperty(J_,"__esModule",{value:!0});var Ve=X(),m4={message:({schemaCode:e})=>(0,Ve.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Ve._)`{format: ${e}}`},h4={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:m4,code(e,t){let{gen:r,data:o,$data:n,schema:i,schemaCode:s,it:a}=e,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=a;if(!c.validateFormats)return;n?h():m();function h(){let p=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),f=r.const("fDef",(0,Ve._)`${p}[${s}]`),_=r.let("fType"),y=r.let("format");r.if((0,Ve._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>r.assign(_,(0,Ve._)`${f}.type || "string"`).assign(y,(0,Ve._)`${f}.validate`),()=>r.assign(_,(0,Ve._)`"string"`).assign(y,f)),e.fail$data((0,Ve.or)($(),k()));function $(){return c.strictSchema===!1?Ve.nil:(0,Ve._)`${s} && !${y}`}function k(){let N=l.$async?(0,Ve._)`(${f}.async ? await ${y}(${o}) : ${y}(${o}))`:(0,Ve._)`${y}(${o})`,P=(0,Ve._)`(typeof ${y} == "function" ? ${N} : ${y}.test(${o}))`;return(0,Ve._)`${y} && ${y} !== true && ${_} === ${t} && !${P}`}}function m(){let p=d.formats[i];if(!p){$();return}if(p===!0)return;let[f,_,y]=k(p);f===t&&e.pass(N());function $(){if(c.strictSchema===!1){d.logger.warn(P());return}throw new Error(P());function P(){return`unknown format "${i}" ignored in schema at path "${u}"`}}function k(P){let ze=P instanceof RegExp?(0,Ve.regexpCode)(P):c.code.formats?(0,Ve._)`${c.code.formats}${(0,Ve.getProperty)(i)}`:void 0,Me=r.scopeValue("formats",{key:i,ref:P,code:ze});return typeof P=="object"&&!(P instanceof RegExp)?[P.type||"string",P.validate,(0,Ve._)`${Me}.validate`]:["string",P,Me]}function N(){if(typeof p=="object"&&!(p instanceof RegExp)&&p.async){if(!l.$async)throw new Error("async format in sync schema");return(0,Ve._)`await ${y}(${o})`}return typeof _=="function"?(0,Ve._)`${y}(${o})`:(0,Ve._)`${y}.test(${o})`}}}};J_.default=h4});var JS=w(Q_=>{"use strict";Object.defineProperty(Q_,"__esModule",{value:!0});var g4=HS(),_4=[g4.default];Q_.default=_4});var QS=w(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.contentVocabulary=si.metadataVocabulary=void 0;si.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];si.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var XS=w(Y_=>{"use strict";Object.defineProperty(Y_,"__esModule",{value:!0});var v4=sS(),y4=bS(),b4=BS(),w4=JS(),YS=QS(),$4=[v4.default,y4.default,(0,b4.default)(),w4.default,YS.metadataVocabulary,YS.contentVocabulary];Y_.default=$4});var t0=w(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});Nd.DiscrError=void 0;var e0;(function(e){e.Tag="tag",e.Mapping="mapping"})(e0||(Nd.DiscrError=e0={}))});var n0=w(ev=>{"use strict";Object.defineProperty(ev,"__esModule",{value:!0});var ai=X(),X_=t0(),r0=_d(),k4=Ea(),x4=me(),S4={message:({params:{discrError:e,tagName:t}})=>e===X_.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,ai._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},T4={keyword:"discriminator",type:"object",schemaType:"object",error:S4,code(e){let{gen:t,data:r,schema:o,parentSchema:n,it:i}=e,{oneOf:s}=n;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=o.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(o.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),u=t.const("tag",(0,ai._)`${r}${(0,ai.getProperty)(a)}`);t.if((0,ai._)`typeof ${u} == "string"`,()=>l(),()=>e.error(!1,{discrError:X_.DiscrError.Tag,tag:u,tagName:a})),e.ok(c);function l(){let m=h();t.if(!1);for(let p in m)t.elseIf((0,ai._)`${u} === ${p}`),t.assign(c,d(m[p]));t.else(),e.error(!1,{discrError:X_.DiscrError.Mapping,tag:u,tagName:a}),t.endIf()}function d(m){let p=t.name("valid"),f=e.subschema({keyword:"oneOf",schemaProp:m},p);return e.mergeEvaluated(f,ai.Name),p}function h(){var m;let p={},f=y(n),_=!0;for(let N=0;N<s.length;N++){let P=s[N];if(P?.$ref&&!(0,x4.schemaHasRulesButRef)(P,i.self.RULES)){let Me=P.$ref;if(P=r0.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,Me),P instanceof r0.SchemaEnv&&(P=P.schema),P===void 0)throw new k4.default(i.opts.uriResolver,i.baseId,Me)}let ze=(m=P?.properties)===null||m===void 0?void 0:m[a];if(typeof ze!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);_=_&&(f||y(P)),$(ze,N)}if(!_)throw new Error(`discriminator: "${a}" must be required`);return p;function y({required:N}){return Array.isArray(N)&&N.includes(a)}function $(N,P){if(N.const)k(N.const,P);else if(N.enum)for(let ze of N.enum)k(ze,P);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function k(N,P){if(typeof N!="string"||N in p)throw new Error(`discriminator: "${a}" values must be unique strings`);p[N]=P}}}};ev.default=T4});var o0=w((F3,P4)=>{P4.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 s0=w((Ce,tv)=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.MissingRefError=Ce.ValidationError=Ce.CodeGen=Ce.Name=Ce.nil=Ce.stringify=Ce.str=Ce._=Ce.KeywordCxt=Ce.Ajv=void 0;var z4=eS(),E4=XS(),I4=n0(),i0=o0(),N4=["/properties"],Od="http://json-schema.org/draft-07/schema",ci=class extends z4.default{_addVocabularies(){super._addVocabularies(),E4.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(I4.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(i0,N4):i0;this.addMetaSchema(t,Od,!1),this.refs["http://json-schema.org/schema"]=Od}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Od)?Od:void 0)}};Ce.Ajv=ci;tv.exports=Ce=ci;tv.exports.Ajv=ci;Object.defineProperty(Ce,"__esModule",{value:!0});Ce.default=ci;var O4=za();Object.defineProperty(Ce,"KeywordCxt",{enumerable:!0,get:function(){return O4.KeywordCxt}});var ui=X();Object.defineProperty(Ce,"_",{enumerable:!0,get:function(){return ui._}});Object.defineProperty(Ce,"str",{enumerable:!0,get:function(){return ui.str}});Object.defineProperty(Ce,"stringify",{enumerable:!0,get:function(){return ui.stringify}});Object.defineProperty(Ce,"nil",{enumerable:!0,get:function(){return ui.nil}});Object.defineProperty(Ce,"Name",{enumerable:!0,get:function(){return ui.Name}});Object.defineProperty(Ce,"CodeGen",{enumerable:!0,get:function(){return ui.CodeGen}});var R4=hd();Object.defineProperty(Ce,"ValidationError",{enumerable:!0,get:function(){return R4.default}});var j4=Ea();Object.defineProperty(Ce,"MissingRefError",{enumerable:!0,get:function(){return j4.default}})});var a0=w(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});li.formatLimitDefinition=void 0;var A4=s0(),or=X(),ln=or.operators,Rd={formatMaximum:{okStr:"<=",ok:ln.LTE,fail:ln.GT},formatMinimum:{okStr:">=",ok:ln.GTE,fail:ln.LT},formatExclusiveMaximum:{okStr:"<",ok:ln.LT,fail:ln.GTE},formatExclusiveMinimum:{okStr:">",ok:ln.GT,fail:ln.LTE}},C4={message:({keyword:e,schemaCode:t})=>(0,or.str)`should be ${Rd[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,or._)`{comparison: ${Rd[e].okStr}, limit: ${t}}`};li.formatLimitDefinition={keyword:Object.keys(Rd),type:"string",schemaType:"string",$data:!0,error:C4,code(e){let{gen:t,data:r,schemaCode:o,keyword:n,it:i}=e,{opts:s,self:a}=i;if(!s.validateFormats)return;let c=new A4.KeywordCxt(i,a.RULES.all.format.definition,"format");c.$data?u():l();function u(){let h=t.scopeValue("formats",{ref:a.formats,code:s.code.formats}),m=t.const("fmt",(0,or._)`${h}[${c.schemaCode}]`);e.fail$data((0,or.or)((0,or._)`typeof ${m} != "object"`,(0,or._)`${m} instanceof RegExp`,(0,or._)`typeof ${m}.compare != "function"`,d(m)))}function l(){let h=c.schema,m=a.formats[h];if(!m||m===!0)return;if(typeof m!="object"||m instanceof RegExp||typeof m.compare!="function")throw new Error(`"${n}": format "${h}" does not define "compare" function`);let p=t.scopeValue("formats",{key:h,ref:m,code:s.code.formats?(0,or._)`${s.code.formats}${(0,or.getProperty)(h)}`:void 0});e.fail$data(d(p))}function d(h){return(0,or._)`${h}.compare(${r}, ${o}) ${Rd[n].fail} 0`}},dependencies:["format"]};var D4=e=>(e.addKeyword(li.formatLimitDefinition),e);li.default=D4});var d0=w((Za,l0)=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});var di=Gk(),q4=a0(),rv=X(),c0=new rv.Name("fullFormats"),M4=new rv.Name("fastFormats"),nv=(e,t={keywords:!0})=>{if(Array.isArray(t))return u0(e,t,di.fullFormats,c0),e;let[r,o]=t.mode==="fast"?[di.fastFormats,M4]:[di.fullFormats,c0],n=t.formats||di.formatNames;return u0(e,n,r,o),t.keywords&&(0,q4.default)(e),e};nv.get=(e,t="full")=>{let o=(t==="fast"?di.fastFormats:di.fullFormats)[e];if(!o)throw new Error(`Unknown format "${e}"`);return o};function u0(e,t,r,o){var n,i;(n=(i=e.opts.code).formats)!==null&&n!==void 0||(i.formats=(0,rv._)`require("ajv-formats/dist/formats").${o}`);for(let s of t)e.addFormat(s,r[s])}l0.exports=Za=nv;Object.defineProperty(Za,"__esModule",{value:!0});Za.default=nv});var Ge=w((ZB,z0)=>{var pv=Object.defineProperty,Q4=Object.getOwnPropertyDescriptor,Y4=Object.getOwnPropertyNames,X4=Object.prototype.hasOwnProperty,eU=(e,t)=>{for(var r in t)pv(e,r,{get:t[r],enumerable:!0})},tU=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Y4(t))!X4.call(e,n)&&n!==r&&pv(e,n,{get:()=>t[n],enumerable:!(o=Q4(t,n))||o.enumerable});return e},rU=e=>tU(pv({},"__esModule",{value:!0}),e),P0={};eU(P0,{APIV2Client:()=>cU,VantageAPIError:()=>Zd,pathEncode:()=>S});z0.exports=rU(P0);function S(e){return encodeURIComponent(e)}var nU={"/v2/exchange_rates/csv":{POST:!0},"/v2/business_metrics/{}/values.csv":{PUT:!0},"/v2/integrations/{}/costs.csv":{POST:!0}},Fa={};function oU(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}for(let[e,t]of Object.entries(nU)){let r=e.split("{}").map(oU).join("(.+?)");for(let[o,n]of Object.entries(t))n&&(Fa[o]||(Fa[o]=[]),Fa[o].push(new RegExp(`^${r}$`)))}function iU(e,t){if(Object.prototype.hasOwnProperty.call(Fa,e))for(let r of Fa[e]){let o=r.test(t);if(r.lastIndex=0,o)return!0}return!1}function sU(e,t){if(t)for(let[r,o]of Object.entries(t))e.searchParams.append(r,Array.isArray(o)?o.map(String).join(","):String(o))}var Zd=class extends Error{constructor(e,t,r){let o=null;if(e!==null)try{let i=JSON.parse(r);Array.isArray(i.errors)&&(o=i.errors)}catch{}let n=e===null?`Vantage API Error: ${r}`:`Vantage API Error: ${e} ${t}`+(o?` - ${o.join(", ")}`:"");super(n),this.status=e,this.statusText=t,this.body=r,this.errors=o}errors};async function dv(e,t,r,o,n){let i;try{i=await fetch(e.toString(),{method:t,headers:r,body:o})}catch(s){let a=s instanceof Error?s.message:String(s),c=new Zd(null,null,a);if(n)return[null,c];throw c}if(!i.ok){let s=new Zd(i.status,i.statusText,await i.text());if(n)return[null,s];throw s}if(i.status===204)return n?[void 0,null]:void 0;try{let s=await i.text(),a;return s&&(a=JSON.parse(s)),n?[a,null]:a}catch(s){let a=s instanceof Error?s.message:String(s),c=new Zd(i.status,i.statusText,a);if(n)return[null,c];throw c}}var aU=class{constructor(e,t,r){this.bearerToken=e,this.neverThrow=t,this.baseUrl=r}async request(e,t,r){let o=new URL(e,this.baseUrl),n={Authorization:`Bearer ${this.bearerToken}`};if(t==="GET")return sU(o,r),dv(o,t,n,void 0,this.neverThrow);if(iU(t,e)){let i=new FormData;for(let[s,a]of Object.entries(r))i.append(s,a);return n["Content-Type"]="multipart/form-data",dv(o,t,n,i,this.neverThrow)}return n["Content-Type"]="application/json",dv(o,t,n,JSON.stringify(r),this.neverThrow)}},cU=class extends aU{constructor(e,t=!1,r="https://api.vantage.sh"){super(e,t,r)}_accessGrants;_anomalyAlerts;_anomalyNotifications;_auditLogs;_billingProfiles;_billingRules;_budgetAlerts;_budgets;_businessMetrics;_costAlerts;_costProviderAccounts;_costReports;_costs;_dashboards;_dataExports;_exchangeRates;_financialCommitmentReports;_financialCommitments;_folders;_integrations;_invoices;_kubernetesEfficiencyReports;_managedAccounts;_me;_costProviders;_costServices;_userFeedback;_networkFlowReports;_products;_recommendations;_recommendationViews;_reportNotifications;_resourceReports;_resources;_savedFilters;_segments;_tags;_teams;_unitCosts;_users;_virtualTagConfigs;_workspaces;_ping;get accessGrants(){return this._accessGrants||(this._accessGrants=new uU(this)),this._accessGrants}get anomalyAlerts(){return this._anomalyAlerts||(this._anomalyAlerts=new lU(this)),this._anomalyAlerts}get anomalyNotifications(){return this._anomalyNotifications||(this._anomalyNotifications=new dU(this)),this._anomalyNotifications}get auditLogs(){return this._auditLogs||(this._auditLogs=new pU(this)),this._auditLogs}get billingProfiles(){return this._billingProfiles||(this._billingProfiles=new fU(this)),this._billingProfiles}get billingRules(){return this._billingRules||(this._billingRules=new mU(this)),this._billingRules}get budgetAlerts(){return this._budgetAlerts||(this._budgetAlerts=new hU(this)),this._budgetAlerts}get budgets(){return this._budgets||(this._budgets=new gU(this)),this._budgets}get businessMetrics(){return this._businessMetrics||(this._businessMetrics=new _U(this)),this._businessMetrics}get costAlerts(){return this._costAlerts||(this._costAlerts=new vU(this)),this._costAlerts}get costProviderAccounts(){return this._costProviderAccounts||(this._costProviderAccounts=new yU(this)),this._costProviderAccounts}get costReports(){return this._costReports||(this._costReports=new bU(this)),this._costReports}get costs(){return this._costs||(this._costs=new wU(this)),this._costs}get dashboards(){return this._dashboards||(this._dashboards=new $U(this)),this._dashboards}get dataExports(){return this._dataExports||(this._dataExports=new kU(this)),this._dataExports}get exchangeRates(){return this._exchangeRates||(this._exchangeRates=new xU(this)),this._exchangeRates}get financialCommitmentReports(){return this._financialCommitmentReports||(this._financialCommitmentReports=new SU(this)),this._financialCommitmentReports}get financialCommitments(){return this._financialCommitments||(this._financialCommitments=new TU(this)),this._financialCommitments}get folders(){return this._folders||(this._folders=new PU(this)),this._folders}get integrations(){return this._integrations||(this._integrations=new zU(this)),this._integrations}get invoices(){return this._invoices||(this._invoices=new EU(this)),this._invoices}get kubernetesEfficiencyReports(){return this._kubernetesEfficiencyReports||(this._kubernetesEfficiencyReports=new IU(this)),this._kubernetesEfficiencyReports}get managedAccounts(){return this._managedAccounts||(this._managedAccounts=new NU(this)),this._managedAccounts}get me(){return this._me||(this._me=new OU(this)),this._me}get costProviders(){return this._costProviders||(this._costProviders=new RU(this)),this._costProviders}get costServices(){return this._costServices||(this._costServices=new jU(this)),this._costServices}get userFeedback(){return this._userFeedback||(this._userFeedback=new AU(this)),this._userFeedback}get networkFlowReports(){return this._networkFlowReports||(this._networkFlowReports=new CU(this)),this._networkFlowReports}get products(){return this._products||(this._products=new DU(this)),this._products}get recommendations(){return this._recommendations||(this._recommendations=new qU(this)),this._recommendations}get recommendationViews(){return this._recommendationViews||(this._recommendationViews=new MU(this)),this._recommendationViews}get reportNotifications(){return this._reportNotifications||(this._reportNotifications=new UU(this)),this._reportNotifications}get resourceReports(){return this._resourceReports||(this._resourceReports=new LU(this)),this._resourceReports}get resources(){return this._resources||(this._resources=new ZU(this)),this._resources}get savedFilters(){return this._savedFilters||(this._savedFilters=new VU(this)),this._savedFilters}get segments(){return this._segments||(this._segments=new FU(this)),this._segments}get tags(){return this._tags||(this._tags=new WU(this)),this._tags}get teams(){return this._teams||(this._teams=new GU(this)),this._teams}get unitCosts(){return this._unitCosts||(this._unitCosts=new KU(this)),this._unitCosts}get users(){return this._users||(this._users=new BU(this)),this._users}get virtualTagConfigs(){return this._virtualTagConfigs||(this._virtualTagConfigs=new HU(this)),this._virtualTagConfigs}get workspaces(){return this._workspaces||(this._workspaces=new JU(this)),this._workspaces}get ping(){return this._ping||(this._ping=new QU(this)),this._ping}},uU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/access_grants","GET",e)}create(e){return this.client.request("/v2/access_grants","POST",e)}get(e){return this.client.request(`/v2/access_grants/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/access_grants/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/access_grants/${S(e)}`,"DELETE",{})}},lU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/anomaly_alerts","GET",e)}get(e){return this.client.request(`/v2/anomaly_alerts/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/anomaly_alerts/${S(e)}`,"PUT",t)}},dU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/anomaly_notifications","GET",e)}create(e){return this.client.request("/v2/anomaly_notifications","POST",e)}get(e){return this.client.request(`/v2/anomaly_notifications/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/anomaly_notifications/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/anomaly_notifications/${S(e)}`,"DELETE",{})}},pU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/audit_logs","GET",e)}get(e){return this.client.request(`/v2/audit_logs/${S(e)}`,"GET",{})}},fU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/billing_profiles","GET",e)}create(e){return this.client.request("/v2/billing_profiles","POST",e)}get(e){return this.client.request(`/v2/billing_profiles/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/billing_profiles/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/billing_profiles/${S(e)}`,"DELETE",{})}},mU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/billing_rules","GET",e)}create(e){return this.client.request("/v2/billing_rules","POST",e)}get(e){return this.client.request(`/v2/billing_rules/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/billing_rules/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/billing_rules/${S(e)}`,"DELETE",{})}},hU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/budget_alerts","GET",e)}create(e){return this.client.request("/v2/budget_alerts","POST",e)}get(e){return this.client.request(`/v2/budget_alerts/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/budget_alerts/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/budget_alerts/${S(e)}`,"DELETE",{})}},gU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/budgets","GET",e)}create(e){return this.client.request("/v2/budgets","POST",e)}update(e,t){return this.client.request(`/v2/budgets/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/budgets/${S(e)}`,"DELETE",{})}},_U=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/business_metrics","GET",e)}create(e){return this.client.request("/v2/business_metrics","POST",e)}get(e){return this.client.request(`/v2/business_metrics/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/business_metrics/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/business_metrics/${S(e)}`,"DELETE",{})}getValues(e,t){return this.client.request(`/v2/business_metrics/${S(e)}/values`,"GET",t)}getForecastedValues(e,t){return this.client.request(`/v2/business_metrics/${S(e)}/forecasted_values`,"GET",t)}updateValuesCSV(e,t){return this.client.request(`/v2/business_metrics/${S(e)}/values.csv`,"PUT",t)}},vU=class{constructor(e){this.client=e}create(e){return this.client.request("/v2/cost_alerts","POST",e)}get(e,t){return this.client.request(`/v2/cost_alerts/${S(e)}/events/${S(t)}`,"GET",{})}update(e,t){return this.client.request(`/v2/cost_alerts/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/cost_alerts/${S(e)}`,"DELETE",{})}getEvents(e,t){return this.client.request(`/v2/cost_alerts/${S(e)}/events`,"GET",t)}getEvent(e,t){return this.client.request(`/v2/cost_alerts/${S(e)}/events/${S(t)}`,"GET",{})}},yU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/cost_provider_accounts","GET",e)}},bU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/cost_reports","GET",e)}create(e){return this.client.request("/v2/cost_reports","POST",e)}get(e){return this.client.request(`/v2/cost_reports/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/cost_reports/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/cost_reports/${S(e)}`,"DELETE",{})}getForecastedCosts(e,t){return this.client.request(`/v2/cost_reports/${S(e)}/forecasted_costs`,"GET",t)}},wU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/costs","GET",e)}createExport(e){return this.client.request("/v2/costs/data_exports","POST",e)}},$U=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/dashboards","GET",e)}create(e){return this.client.request("/v2/dashboards","POST",e)}get(e){return this.client.request(`/v2/dashboards/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/dashboards/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/dashboards/${S(e)}`,"DELETE",{})}},kU=class{constructor(e){this.client=e}get(e){return this.client.request(`/v2/data_exports/${S(e)}`,"GET",{})}},xU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/exchange_rates","GET",e)}createViaCsv(e){return this.client.request("/v2/exchange_rates/csv","POST",e)}},SU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/financial_commitment_reports","GET",e)}create(e){return this.client.request("/v2/financial_commitment_reports","POST",e)}get(e){return this.client.request(`/v2/financial_commitment_reports/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/financial_commitment_reports/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/financial_commitment_reports/${S(e)}`,"DELETE",{})}},TU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/financial_commitments","GET",e)}},PU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/folders","GET",e)}create(e){return this.client.request("/v2/folders","POST",e)}get(e){return this.client.request(`/v2/folders/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/folders/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/folders/${S(e)}`,"DELETE",{})}},zU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/integrations","GET",e)}get(e){return this.client.request(`/v2/integrations/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/integrations/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/integrations/${S(e)}`,"DELETE",{})}createCustomProviderIntegration(e){return this.client.request("/v2/integrations/custom_provider","POST",e)}createUserCostsUploadViaCsv(e,t){return this.client.request(`/v2/integrations/${S(e)}/costs.csv`,"POST",t)}deleteUserCostsUpload(e,t){return this.client.request(`/v2/integrations/${S(e)}/costs/${S(t)}`,"DELETE",{})}getUserCostsUploads(e){return this.client.request(`/v2/integrations/${S(e)}/costs`,"GET",{})}createGCPIntegration(e){return this.client.request("/v2/integrations/gcp","POST",e)}createAzureIntegration(e){return this.client.request("/v2/integrations/azure","POST",e)}},EU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/invoices","GET",e)}create(e){return this.client.request("/v2/invoices","POST",e)}get(e){return this.client.request(`/v2/invoices/${S(e)}`,"GET",{})}downloadInvoice(e,t){return this.client.request(`/v2/invoices/${S(e)}/download`,"POST",t)}sendInvoice(e){return this.client.request(`/v2/invoices/${S(e)}/send`,"POST",{})}sendAndApproveInvoice(e){return this.client.request(`/v2/invoices/${S(e)}/send_and_approve`,"POST",{})}getCostReport(e){return this.client.request(`/v2/invoices/${S(e)}/cost_report`,"GET",{})}regenerateInvoice(e){return this.client.request(`/v2/invoices/${S(e)}/regenerate`,"POST",{})}},IU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/kubernetes_efficiency_reports","GET",e)}create(e){return this.client.request("/v2/kubernetes_efficiency_reports","POST",e)}get(e){return this.client.request(`/v2/kubernetes_efficiency_reports/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/kubernetes_efficiency_reports/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/kubernetes_efficiency_reports/${S(e)}`,"DELETE",{})}createExport(e){return this.client.request("/v2/kubernetes_efficiency_reports/data_exports","POST",e)}},NU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/managed_accounts","GET",e)}create(e){return this.client.request("/v2/managed_accounts","POST",e)}get(e){return this.client.request(`/v2/managed_accounts/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/managed_accounts/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/managed_accounts/${S(e)}`,"DELETE",{})}updateSsoConnectionForManagedAccount(e,t){return this.client.request(`/v2/managed_accounts/${S(e)}/sso_connection`,"PUT",t)}createSsoConnectionForManagedAccount(e,t){return this.client.request(`/v2/managed_accounts/${S(e)}/sso_connection`,"POST",t)}},OU=class{constructor(e){this.client=e}get(){return this.client.request("/v2/me","GET",{})}},RU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/cost_providers","GET",e)}},jU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/cost_services","GET",e)}},AU=class{constructor(e){this.client=e}create(e){return this.client.request("/v2/user_feedback","POST",e)}},CU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/network_flow_reports","GET",e)}create(e){return this.client.request("/v2/network_flow_reports","POST",e)}get(e){return this.client.request(`/v2/network_flow_reports/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/network_flow_reports/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/network_flow_reports/${S(e)}`,"DELETE",{})}},DU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/products","GET",e)}get(e,t){return this.client.request(`/v2/products/${S(e)}/prices/${S(t)}`,"GET",{})}getPrices(e,t){return this.client.request(`/v2/products/${S(e)}/prices`,"GET",t)}getPrice(e,t){return this.client.request(`/v2/products/${S(e)}/prices/${S(t)}`,"GET",{})}},qU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/recommendations","GET",e)}get(e){return this.client.request(`/v2/recommendations/${S(e)}`,"GET",{})}getResources(e,t){return this.client.request(`/v2/recommendations/${S(e)}/resources`,"GET",t)}getResource(e,t){return this.client.request(`/v2/recommendations/${S(e)}/resources/${S(t)}`,"GET",{})}getTypeResources(e,t){return this.client.request(`/v2/recommendations/by_type/${S(e)}/resources`,"GET",t)}},MU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/recommendation_views","GET",e)}create(e){return this.client.request("/v2/recommendation_views","POST",e)}get(e){return this.client.request(`/v2/recommendation_views/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/recommendation_views/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/recommendation_views/${S(e)}`,"DELETE",{})}},UU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/report_notifications","GET",e)}create(e){return this.client.request("/v2/report_notifications","POST",e)}get(e){return this.client.request(`/v2/report_notifications/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/report_notifications/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/report_notifications/${S(e)}`,"DELETE",{})}},LU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/resource_reports","GET",e)}create(e){return this.client.request("/v2/resource_reports","POST",e)}get(e){return this.client.request(`/v2/resource_reports/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/resource_reports/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/resource_reports/${S(e)}`,"DELETE",{})}getColumns(e){return this.client.request("/v2/resource_reports/columns","GET",e)}},ZU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/resources","GET",e)}},VU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/saved_filters","GET",e)}create(e){return this.client.request("/v2/saved_filters","POST",e)}get(e){return this.client.request(`/v2/saved_filters/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/saved_filters/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/saved_filters/${S(e)}`,"DELETE",{})}},FU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/segments","GET",e)}create(e){return this.client.request("/v2/segments","POST",e)}get(e){return this.client.request(`/v2/segments/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/segments/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/segments/${S(e)}`,"DELETE",{})}},WU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/tags","GET",e)}getValues(e,t){return this.client.request(`/v2/tags/${S(e)}/values`,"GET",t)}},GU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/teams","GET",e)}create(e){return this.client.request("/v2/teams","POST",e)}get(e){return this.client.request(`/v2/teams/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/teams/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/teams/${S(e)}`,"DELETE",{})}getMembers(e,t){return this.client.request(`/v2/teams/${S(e)}/members`,"GET",t)}addTeamMember(e,t){return this.client.request(`/v2/teams/${S(e)}/members`,"POST",t)}removeTeamMember(e,t){return this.client.request(`/v2/teams/${S(e)}/members/${S(t)}`,"DELETE",{})}},KU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/unit_costs","GET",e)}createExport(e){return this.client.request("/v2/unit_costs/data_exports","POST",e)}},BU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/users","GET",e)}get(e){return this.client.request(`/v2/users/${S(e)}`,"GET",{})}},HU=class{constructor(e){this.client=e}create(e){return this.client.request("/v2/virtual_tag_configs","POST",e)}get(){return this.client.request("/v2/virtual_tag_configs","GET",{})}update(e,t){return this.client.request(`/v2/virtual_tag_configs/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/virtual_tag_configs/${S(e)}`,"DELETE",{})}getStatus(e){return this.client.request(`/v2/virtual_tag_configs/${S(e)}/status`,"GET",{})}updateAsyncVirtualTagConfig(e,t){return this.client.request(`/v2/virtual_tag_configs/${S(e)}/async`,"PUT",t)}getAsyncVirtualTagConfigStatus(e){return this.client.request(`/v2/virtual_tag_configs/async/${S(e)}`,"GET",{})}},JU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/workspaces","GET",e)}create(e){return this.client.request("/v2/workspaces","POST",e)}get(e){return this.client.request(`/v2/workspaces/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/workspaces/${S(e)}`,"PUT",t)}},QU=class{constructor(e){this.client=e}get(){return this.client.request("/v2/ping","GET",{})}}});var ce;(function(e){e.assertEqual=n=>{};function t(n){}e.assertIs=t;function r(n){throw new Error}e.assertNever=r,e.arrayToEnum=n=>{let i={};for(let s of n)i[s]=s;return i},e.getValidEnumValues=n=>{let i=e.objectKeys(n).filter(a=>typeof n[n[a]]!="number"),s={};for(let a of i)s[a]=n[a];return e.objectValues(s)},e.objectValues=n=>e.objectKeys(n).map(function(i){return n[i]}),e.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let i=[];for(let s in n)Object.prototype.hasOwnProperty.call(n,s)&&i.push(s);return i},e.find=(n,i)=>{for(let s of n)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function o(n,i=" | "){return n.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=o,e.jsonStringifyReplacer=(n,i)=>typeof i=="bigint"?i.toString():i})(ce||(ce={}));var mv;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(mv||(mv={}));var C=ce.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),_r=e=>{switch(typeof e){case"undefined":return C.undefined;case"string":return C.string;case"number":return Number.isNaN(e)?C.nan:C.number;case"boolean":return C.boolean;case"function":return C.function;case"bigint":return C.bigint;case"symbol":return C.symbol;case"object":return Array.isArray(e)?C.array:e===null?C.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?C.promise:typeof Map<"u"&&e instanceof Map?C.map:typeof Set<"u"&&e instanceof Set?C.set:typeof Date<"u"&&e instanceof Date?C.date:C.object;default:return C.unknown}};var T=ce.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 Tt=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 r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(i){return i.message},o={_errors:[]},n=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(n);else if(s.code==="invalid_return_type")n(s.returnTypeError);else if(s.code==="invalid_arguments")n(s.argumentsError);else if(s.path.length===0)o._errors.push(r(s));else{let a=o,c=0;for(;c<s.path.length;){let u=s.path[c];c===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(s))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return n(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,ce.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},o=[];for(let n of this.issues)if(n.path.length>0){let i=n.path[0];r[i]=r[i]||[],r[i].push(t(n))}else o.push(t(n));return{formErrors:o,fieldErrors:r}}get formErrors(){return this.flatten()}};Tt.create=e=>new Tt(e);var X0=(e,t)=>{let r;switch(e.code){case T.invalid_type:e.received===C.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case T.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,ce.jsonStringifyReplacer)}`;break;case T.unrecognized_keys:r=`Unrecognized key(s) in object: ${ce.joinValues(e.keys,", ")}`;break;case T.invalid_union:r="Invalid input";break;case T.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ce.joinValues(e.options)}`;break;case T.invalid_enum_value:r=`Invalid enum value. Expected ${ce.joinValues(e.options)}, received '${e.received}'`;break;case T.invalid_arguments:r="Invalid function arguments";break;case T.invalid_return_type:r="Invalid function return type";break;case T.invalid_date:r="Invalid date";break;case T.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:ce.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case T.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case T.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case T.custom:r="Invalid input";break;case T.invalid_intersection_types:r="Intersection results could not be merged";break;case T.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case T.not_finite:r="Number must be finite";break;default:r=t.defaultError,ce.assertNever(e)}return{message:r}},Ar=X0;var eT=Ar;function mi(){return eT}var Ga=e=>{let{data:t,path:r,errorMaps:o,issueData:n}=e,i=[...r,...n.path||[]],s={...n,path:i};if(n.message!==void 0)return{...n,path:i,message:n.message};let a="",c=o.filter(u=>!!u).slice().reverse();for(let u of c)a=u(s,{data:t,defaultError:a}).message;return{...n,path:i,message:a}};function A(e,t){let r=mi(),o=Ga({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Ar?void 0:Ar].filter(n=>!!n)});e.common.issues.push(o)}var et=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let o=[];for(let n of r){if(n.status==="aborted")return F;n.status==="dirty"&&t.dirty(),o.push(n.value)}return{status:t.value,value:o}}static async mergeObjectAsync(t,r){let o=[];for(let n of r){let i=await n.key,s=await n.value;o.push({key:i,value:s})}return e.mergeObjectSync(t,o)}static mergeObjectSync(t,r){let o={};for(let n of r){let{key:i,value:s}=n;if(i.status==="aborted"||s.status==="aborted")return F;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||n.alwaysSet)&&(o[i.value]=s.value)}return{status:t.value,value:o}}},F=Object.freeze({status:"aborted"}),Kn=e=>({status:"dirty",value:e}),ut=e=>({status:"valid",value:e}),Wd=e=>e.status==="aborted",Gd=e=>e.status==="dirty",hn=e=>e.status==="valid",hi=e=>typeof Promise<"u"&&e instanceof Promise;var q;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(q||(q={}));var Nt=class{constructor(t,r,o,n){this._cachedPath=[],this.parent=t,this.data=r,this._path=o,this._key=n}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}},hv=(e,t)=>{if(hn(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 r=new Tt(e.common.issues);return this._error=r,this._error}}};function H(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:o,description:n}=e;if(t&&(r||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:n}:{errorMap:(s,a)=>{let{message:c}=e;return s.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??o??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:n}}var ee=class{get description(){return this._def.description}_getType(t){return _r(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:_r(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new et,ctx:{common:t.parent.common,data:t.data,parsedType:_r(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(hi(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let o=this.safeParse(t,r);if(o.success)return o.data;throw o.error}safeParse(t,r){let o={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:_r(t)},n=this._parseSync({data:t,path:o.path,parent:o});return hv(o,n)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:_r(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:r});return hn(o)?{value:o.value}:{issues:r.common.issues}}catch(o){o?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(o=>hn(o)?{value:o.value}:{issues:r.common.issues})}async parseAsync(t,r){let o=await this.safeParseAsync(t,r);if(o.success)return o.data;throw o.error}async safeParseAsync(t,r){let o={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:_r(t)},n=this._parse({data:t,path:o.path,parent:o}),i=await(hi(n)?n:Promise.resolve(n));return hv(o,i)}refine(t,r){let o=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,i)=>{let s=t(n),a=()=>i.addIssue({code:T.custom,...o(n)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,r){return this._refinement((o,n)=>t(o)?!0:(n.addIssue(typeof r=="function"?r(o,n):r),!1))}_refinement(t){return new Wt({schema:this,typeName:E.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:r=>this["~validate"](r)}}optional(){return Pt.create(this,this._def)}nullable(){return br.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Dr.create(this)}promise(){return gn.create(this,this._def)}or(t){return Yn.create([this,t],this._def)}and(t){return Xn.create(this,t,this._def)}transform(t){return new Wt({...H(this._def),schema:this,typeName:E.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new oo({...H(this._def),innerType:this,defaultValue:r,typeName:E.ZodDefault})}brand(){return new Ka({typeName:E.ZodBranded,type:this,...H(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new io({...H(this._def),innerType:this,catchValue:r,typeName:E.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Ba.create(this,t)}readonly(){return so.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},tT=/^c[^\s-]{8,}$/i,rT=/^[0-9a-z]+$/,nT=/^[0-9A-HJKMNP-TV-Z]{26}$/i,oT=/^[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,iT=/^[a-z0-9_-]{21}$/i,sT=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,aT=/^[-+]?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)?)??$/,cT=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,uT="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Kd,lT=/^(?:(?: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])$/,dT=/^(?:(?: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])$/,pT=/^(([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]))$/,fT=/^(([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])$/,mT=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,hT=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,gv="((\\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])))",gT=new RegExp(`^${gv}$`);function _v(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function _T(e){return new RegExp(`^${_v(e)}$`)}function vT(e){let t=`${gv}T${_v(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function yT(e,t){return!!((t==="v4"||!t)&&lT.test(e)||(t==="v6"||!t)&&pT.test(e))}function bT(e,t){if(!sT.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let o=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(o));return!(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||t&&n.alg!==t)}catch{return!1}}function wT(e,t){return!!((t==="v4"||!t)&&dT.test(e)||(t==="v6"||!t)&&fT.test(e))}var Hn=class e extends ee{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==C.string){let i=this._getOrReturnCtx(t);return A(i,{code:T.invalid_type,expected:C.string,received:i.parsedType}),F}let o=new et,n;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(n=this._getOrReturnCtx(t,n),A(n,{code:T.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&&(n=this._getOrReturnCtx(t,n),A(n,{code:T.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),o.dirty());else if(i.kind==="length"){let s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(n=this._getOrReturnCtx(t,n),s?A(n,{code:T.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&A(n,{code:T.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),o.dirty())}else if(i.kind==="email")cT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"email",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="emoji")Kd||(Kd=new RegExp(uT,"u")),Kd.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"emoji",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="uuid")oT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"uuid",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="nanoid")iT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"nanoid",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid")tT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"cuid",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid2")rT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"cuid2",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="ulid")nT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"ulid",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{n=this._getOrReturnCtx(t,n),A(n,{validation:"url",code:T.invalid_string,message:i.message}),o.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"regex",code:T.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)||(n=this._getOrReturnCtx(t,n),A(n,{code:T.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)||(n=this._getOrReturnCtx(t,n),A(n,{code:T.invalid_string,validation:{startsWith:i.value},message:i.message}),o.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(n=this._getOrReturnCtx(t,n),A(n,{code:T.invalid_string,validation:{endsWith:i.value},message:i.message}),o.dirty()):i.kind==="datetime"?vT(i).test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{code:T.invalid_string,validation:"datetime",message:i.message}),o.dirty()):i.kind==="date"?gT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{code:T.invalid_string,validation:"date",message:i.message}),o.dirty()):i.kind==="time"?_T(i).test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{code:T.invalid_string,validation:"time",message:i.message}),o.dirty()):i.kind==="duration"?aT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"duration",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="ip"?yT(t.data,i.version)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"ip",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="jwt"?bT(t.data,i.alg)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"jwt",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="cidr"?wT(t.data,i.version)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"cidr",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="base64"?mT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"base64",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="base64url"?hT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"base64url",code:T.invalid_string,message:i.message}),o.dirty()):ce.assertNever(i);return{status:o.value,value:t.data}}_regex(t,r,o){return this.refinement(n=>t.test(n),{validation:r,code:T.invalid_string,...q.errToObj(o)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...q.errToObj(t)})}url(t){return this._addCheck({kind:"url",...q.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...q.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...q.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...q.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...q.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...q.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...q.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...q.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...q.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...q.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...q.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...q.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,...q.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,...q.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...q.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...q.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...q.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...q.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...q.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...q.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...q.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...q.errToObj(r)})}nonempty(t){return this.min(1,q.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 r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Hn.create=e=>new Hn({checks:[],typeName:E.ZodString,coerce:e?.coerce??!1,...H(e)});function $T(e,t){let r=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,n=r>o?r:o,i=Number.parseInt(e.toFixed(n).replace(".","")),s=Number.parseInt(t.toFixed(n).replace(".",""));return i%s/10**n}var gi=class e extends ee{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)!==C.number){let i=this._getOrReturnCtx(t);return A(i,{code:T.invalid_type,expected:C.number,received:i.parsedType}),F}let o,n=new et;for(let i of this._def.checks)i.kind==="int"?ce.isInteger(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{code:T.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),A(o,{code:T.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),A(o,{code:T.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?$T(t.data,i.value)!==0&&(o=this._getOrReturnCtx(t,o),A(o,{code:T.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{code:T.not_finite,message:i.message}),n.dirty()):ce.assertNever(i);return{status:n.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,q.toString(r))}gt(t,r){return this.setLimit("min",t,!1,q.toString(r))}lte(t,r){return this.setLimit("max",t,!0,q.toString(r))}lt(t,r){return this.setLimit("max",t,!1,q.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:q.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:q.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:q.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:q.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:q.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:q.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:q.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:q.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:q.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:q.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ce.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(r===null||o.value>r)&&(r=o.value):o.kind==="max"&&(t===null||o.value<t)&&(t=o.value)}return Number.isFinite(r)&&Number.isFinite(t)}};gi.create=e=>new gi({checks:[],typeName:E.ZodNumber,coerce:e?.coerce||!1,...H(e)});var _i=class e extends ee{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)!==C.bigint)return this._getInvalidInput(t);let o,n=new et;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),A(o,{code:T.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),A(o,{code:T.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(o=this._getOrReturnCtx(t,o),A(o,{code:T.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):ce.assertNever(i);return{status:n.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return A(r,{code:T.invalid_type,expected:C.bigint,received:r.parsedType}),F}gte(t,r){return this.setLimit("min",t,!0,q.toString(r))}gt(t,r){return this.setLimit("min",t,!1,q.toString(r))}lte(t,r){return this.setLimit("max",t,!0,q.toString(r))}lt(t,r){return this.setLimit("max",t,!1,q.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:q.toString(n)}]})}_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:q.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:q.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:q.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:q.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:q.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};_i.create=e=>new _i({checks:[],typeName:E.ZodBigInt,coerce:e?.coerce??!1,...H(e)});var vi=class extends ee{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==C.boolean){let o=this._getOrReturnCtx(t);return A(o,{code:T.invalid_type,expected:C.boolean,received:o.parsedType}),F}return ut(t.data)}};vi.create=e=>new vi({typeName:E.ZodBoolean,coerce:e?.coerce||!1,...H(e)});var yi=class e extends ee{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==C.date){let i=this._getOrReturnCtx(t);return A(i,{code:T.invalid_type,expected:C.date,received:i.parsedType}),F}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return A(i,{code:T.invalid_date}),F}let o=new et,n;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(n=this._getOrReturnCtx(t,n),A(n,{code:T.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),o.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(n=this._getOrReturnCtx(t,n),A(n,{code:T.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),o.dirty()):ce.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,r){return this._addCheck({kind:"min",value:t.getTime(),message:q.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:q.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};yi.create=e=>new yi({checks:[],coerce:e?.coerce||!1,typeName:E.ZodDate,...H(e)});var bi=class extends ee{_parse(t){if(this._getType(t)!==C.symbol){let o=this._getOrReturnCtx(t);return A(o,{code:T.invalid_type,expected:C.symbol,received:o.parsedType}),F}return ut(t.data)}};bi.create=e=>new bi({typeName:E.ZodSymbol,...H(e)});var Jn=class extends ee{_parse(t){if(this._getType(t)!==C.undefined){let o=this._getOrReturnCtx(t);return A(o,{code:T.invalid_type,expected:C.undefined,received:o.parsedType}),F}return ut(t.data)}};Jn.create=e=>new Jn({typeName:E.ZodUndefined,...H(e)});var Qn=class extends ee{_parse(t){if(this._getType(t)!==C.null){let o=this._getOrReturnCtx(t);return A(o,{code:T.invalid_type,expected:C.null,received:o.parsedType}),F}return ut(t.data)}};Qn.create=e=>new Qn({typeName:E.ZodNull,...H(e)});var wi=class extends ee{constructor(){super(...arguments),this._any=!0}_parse(t){return ut(t.data)}};wi.create=e=>new wi({typeName:E.ZodAny,...H(e)});var Cr=class extends ee{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ut(t.data)}};Cr.create=e=>new Cr({typeName:E.ZodUnknown,...H(e)});var sr=class extends ee{_parse(t){let r=this._getOrReturnCtx(t);return A(r,{code:T.invalid_type,expected:C.never,received:r.parsedType}),F}};sr.create=e=>new sr({typeName:E.ZodNever,...H(e)});var $i=class extends ee{_parse(t){if(this._getType(t)!==C.undefined){let o=this._getOrReturnCtx(t);return A(o,{code:T.invalid_type,expected:C.void,received:o.parsedType}),F}return ut(t.data)}};$i.create=e=>new $i({typeName:E.ZodVoid,...H(e)});var Dr=class e extends ee{_parse(t){let{ctx:r,status:o}=this._processInputParams(t),n=this._def;if(r.parsedType!==C.array)return A(r,{code:T.invalid_type,expected:C.array,received:r.parsedType}),F;if(n.exactLength!==null){let s=r.data.length>n.exactLength.value,a=r.data.length<n.exactLength.value;(s||a)&&(A(r,{code:s?T.too_big:T.too_small,minimum:a?n.exactLength.value:void 0,maximum:s?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),o.dirty())}if(n.minLength!==null&&r.data.length<n.minLength.value&&(A(r,{code:T.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),o.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(A(r,{code:T.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),o.dirty()),r.common.async)return Promise.all([...r.data].map((s,a)=>n.type._parseAsync(new Nt(r,s,r.path,a)))).then(s=>et.mergeArray(o,s));let i=[...r.data].map((s,a)=>n.type._parseSync(new Nt(r,s,r.path,a)));return et.mergeArray(o,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:q.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:q.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:q.toString(r)}})}nonempty(t){return this.min(1,t)}};Dr.create=(e,t)=>new Dr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:E.ZodArray,...H(t)});function Bn(e){if(e instanceof zt){let t={};for(let r in e.shape){let o=e.shape[r];t[r]=Pt.create(Bn(o))}return new zt({...e._def,shape:()=>t})}else return e instanceof Dr?new Dr({...e._def,type:Bn(e.element)}):e instanceof Pt?Pt.create(Bn(e.unwrap())):e instanceof br?br.create(Bn(e.unwrap())):e instanceof yr?yr.create(e.items.map(t=>Bn(t))):e}var zt=class e extends ee{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(),r=ce.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==C.object){let u=this._getOrReturnCtx(t);return A(u,{code:T.invalid_type,expected:C.object,received:u.parsedType}),F}let{status:o,ctx:n}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof sr&&this._def.unknownKeys==="strip"))for(let u in n.data)s.includes(u)||a.push(u);let c=[];for(let u of s){let l=i[u],d=n.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new Nt(n,d,n.path,u)),alwaysSet:u in n.data})}if(this._def.catchall instanceof sr){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of a)c.push({key:{status:"valid",value:l},value:{status:"valid",value:n.data[l]}});else if(u==="strict")a.length>0&&(A(n,{code:T.unrecognized_keys,keys:a}),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 a){let d=n.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new Nt(n,d,n.path,l)),alwaysSet:l in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let d=await l.key,h=await l.value;u.push({key:d,value:h,alwaysSet:l.alwaysSet})}return u}).then(u=>et.mergeObjectSync(o,u)):et.mergeObjectSync(o,c)}get shape(){return this._def.shape()}strict(t){return q.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,o)=>{let n=this._def.errorMap?.(r,o).message??o.defaultError;return r.code==="unrecognized_keys"?{message:q.errToObj(t).message??n}:{message:n}}}:{}})}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:E.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let o of ce.objectKeys(t))t[o]&&this.shape[o]&&(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let o of ce.objectKeys(this.shape))t[o]||(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}deepPartial(){return Bn(this)}partial(t){let r={};for(let o of ce.objectKeys(this.shape)){let n=this.shape[o];t&&!t[o]?r[o]=n:r[o]=n.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let o of ce.objectKeys(this.shape))if(t&&!t[o])r[o]=this.shape[o];else{let i=this.shape[o];for(;i instanceof Pt;)i=i._def.innerType;r[o]=i}return new e({...this._def,shape:()=>r})}keyof(){return vv(ce.objectKeys(this.shape))}};zt.create=(e,t)=>new zt({shape:()=>e,unknownKeys:"strip",catchall:sr.create(),typeName:E.ZodObject,...H(t)});zt.strictCreate=(e,t)=>new zt({shape:()=>e,unknownKeys:"strict",catchall:sr.create(),typeName:E.ZodObject,...H(t)});zt.lazycreate=(e,t)=>new zt({shape:e,unknownKeys:"strip",catchall:sr.create(),typeName:E.ZodObject,...H(t)});var Yn=class extends ee{_parse(t){let{ctx:r}=this._processInputParams(t),o=this._def.options;function n(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let s=i.map(a=>new Tt(a.ctx.common.issues));return A(r,{code:T.invalid_union,unionErrors:s}),F}if(r.common.async)return Promise.all(o.map(async i=>{let s={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(n);{let i,s=[];for(let c of o){let u={...r,common:{...r.common,issues:[]},parent:null},l=c._parseSync({data:r.data,path:r.path,parent:u});if(l.status==="valid")return l;l.status==="dirty"&&!i&&(i={result:l,ctx:u}),u.common.issues.length&&s.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let a=s.map(c=>new Tt(c));return A(r,{code:T.invalid_union,unionErrors:a}),F}}get options(){return this._def.options}};Yn.create=(e,t)=>new Yn({options:e,typeName:E.ZodUnion,...H(t)});var vr=e=>e instanceof eo?vr(e.schema):e instanceof Wt?vr(e.innerType()):e instanceof to?[e.value]:e instanceof ro?e.options:e instanceof no?ce.objectValues(e.enum):e instanceof oo?vr(e._def.innerType):e instanceof Jn?[void 0]:e instanceof Qn?[null]:e instanceof Pt?[void 0,...vr(e.unwrap())]:e instanceof br?[null,...vr(e.unwrap())]:e instanceof Ka||e instanceof so?vr(e.unwrap()):e instanceof io?vr(e._def.innerType):[],Bd=class e extends ee{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==C.object)return A(r,{code:T.invalid_type,expected:C.object,received:r.parsedType}),F;let o=this.discriminator,n=r.data[o],i=this.optionsMap.get(n);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(A(r,{code:T.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),F)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,o){let n=new Map;for(let i of r){let s=vr(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of s){if(n.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);n.set(a,i)}}return new e({typeName:E.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:n,...H(o)})}};function Hd(e,t){let r=_r(e),o=_r(t);if(e===t)return{valid:!0,data:e};if(r===C.object&&o===C.object){let n=ce.objectKeys(t),i=ce.objectKeys(e).filter(a=>n.indexOf(a)!==-1),s={...e,...t};for(let a of i){let c=Hd(e[a],t[a]);if(!c.valid)return{valid:!1};s[a]=c.data}return{valid:!0,data:s}}else if(r===C.array&&o===C.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let i=0;i<e.length;i++){let s=e[i],a=t[i],c=Hd(s,a);if(!c.valid)return{valid:!1};n.push(c.data)}return{valid:!0,data:n}}else return r===C.date&&o===C.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Xn=class extends ee{_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=(i,s)=>{if(Wd(i)||Wd(s))return F;let a=Hd(i.value,s.value);return a.valid?((Gd(i)||Gd(s))&&r.dirty(),{status:r.value,value:a.data}):(A(o,{code:T.invalid_intersection_types}),F)};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,s])=>n(i,s)):n(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}};Xn.create=(e,t,r)=>new Xn({left:e,right:t,typeName:E.ZodIntersection,...H(r)});var yr=class e extends ee{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==C.array)return A(o,{code:T.invalid_type,expected:C.array,received:o.parsedType}),F;if(o.data.length<this._def.items.length)return A(o,{code:T.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),F;!this._def.rest&&o.data.length>this._def.items.length&&(A(o,{code:T.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...o.data].map((s,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new Nt(o,s,o.path,a)):null}).filter(s=>!!s);return o.common.async?Promise.all(i).then(s=>et.mergeArray(r,s)):et.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};yr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new yr({items:e,typeName:E.ZodTuple,rest:null,...H(t)})};var Jd=class e extends ee{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==C.object)return A(o,{code:T.invalid_type,expected:C.object,received:o.parsedType}),F;let n=[],i=this._def.keyType,s=this._def.valueType;for(let a in o.data)n.push({key:i._parse(new Nt(o,a,o.path,a)),value:s._parse(new Nt(o,o.data[a],o.path,a)),alwaysSet:a in o.data});return o.common.async?et.mergeObjectAsync(r,n):et.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(t,r,o){return r instanceof ee?new e({keyType:t,valueType:r,typeName:E.ZodRecord,...H(o)}):new e({keyType:Hn.create(),valueType:t,typeName:E.ZodRecord,...H(r)})}},ki=class extends ee{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==C.map)return A(o,{code:T.invalid_type,expected:C.map,received:o.parsedType}),F;let n=this._def.keyType,i=this._def.valueType,s=[...o.data.entries()].map(([a,c],u)=>({key:n._parse(new Nt(o,a,o.path,[u,"key"])),value:i._parse(new Nt(o,c,o.path,[u,"value"]))}));if(o.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of s){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return F;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let c of s){let u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return F;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}}}};ki.create=(e,t,r)=>new ki({valueType:t,keyType:e,typeName:E.ZodMap,...H(r)});var xi=class e extends ee{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==C.set)return A(o,{code:T.invalid_type,expected:C.set,received:o.parsedType}),F;let n=this._def;n.minSize!==null&&o.data.size<n.minSize.value&&(A(o,{code:T.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&o.data.size>n.maxSize.value&&(A(o,{code:T.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());let i=this._def.valueType;function s(c){let u=new Set;for(let l of c){if(l.status==="aborted")return F;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let a=[...o.data.values()].map((c,u)=>i._parse(new Nt(o,c,o.path,u)));return o.common.async?Promise.all(a).then(c=>s(c)):s(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:q.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:q.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};xi.create=(e,t)=>new xi({valueType:e,minSize:null,maxSize:null,typeName:E.ZodSet,...H(t)});var Qd=class e extends ee{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==C.function)return A(r,{code:T.invalid_type,expected:C.function,received:r.parsedType}),F;function o(a,c){return Ga({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,mi(),Ar].filter(u=>!!u),issueData:{code:T.invalid_arguments,argumentsError:c}})}function n(a,c){return Ga({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,mi(),Ar].filter(u=>!!u),issueData:{code:T.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof gn){let a=this;return ut(async function(...c){let u=new Tt([]),l=await a._def.args.parseAsync(c,i).catch(m=>{throw u.addIssue(o(c,m)),u}),d=await Reflect.apply(s,this,l);return await a._def.returns._def.type.parseAsync(d,i).catch(m=>{throw u.addIssue(n(d,m)),u})})}else{let a=this;return ut(function(...c){let u=a._def.args.safeParse(c,i);if(!u.success)throw new Tt([o(c,u.error)]);let l=Reflect.apply(s,this,u.data),d=a._def.returns.safeParse(l,i);if(!d.success)throw new Tt([n(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:yr.create(t).rest(Cr.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,r,o){return new e({args:t||yr.create([]).rest(Cr.create()),returns:r||Cr.create(),typeName:E.ZodFunction,...H(o)})}},eo=class extends ee{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};eo.create=(e,t)=>new eo({getter:e,typeName:E.ZodLazy,...H(t)});var to=class extends ee{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return A(r,{received:r.data,code:T.invalid_literal,expected:this._def.value}),F}return{status:"valid",value:t.data}}get value(){return this._def.value}};to.create=(e,t)=>new to({value:e,typeName:E.ZodLiteral,...H(t)});function vv(e,t){return new ro({values:e,typeName:E.ZodEnum,...H(t)})}var ro=class e extends ee{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),o=this._def.values;return A(r,{expected:ce.joinValues(o),received:r.parsedType,code:T.invalid_type}),F}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),o=this._def.values;return A(r,{received:r.data,code:T.invalid_enum_value,options:o}),F}return ut(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(o=>!t.includes(o)),{...this._def,...r})}};ro.create=vv;var no=class extends ee{_parse(t){let r=ce.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(t);if(o.parsedType!==C.string&&o.parsedType!==C.number){let n=ce.objectValues(r);return A(o,{expected:ce.joinValues(n),received:o.parsedType,code:T.invalid_type}),F}if(this._cache||(this._cache=new Set(ce.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let n=ce.objectValues(r);return A(o,{received:o.data,code:T.invalid_enum_value,options:n}),F}return ut(t.data)}get enum(){return this._def.values}};no.create=(e,t)=>new no({values:e,typeName:E.ZodNativeEnum,...H(t)});var gn=class extends ee{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==C.promise&&r.common.async===!1)return A(r,{code:T.invalid_type,expected:C.promise,received:r.parsedType}),F;let o=r.parsedType===C.promise?r.data:Promise.resolve(r.data);return ut(o.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};gn.create=(e,t)=>new gn({type:e,typeName:E.ZodPromise,...H(t)});var Wt=class extends ee{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===E.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=this._def.effect||null,i={addIssue:s=>{A(o,s),s.fatal?r.abort():r.dirty()},get path(){return o.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){let s=n.transform(o.data,i);if(o.common.async)return Promise.resolve(s).then(async a=>{if(r.value==="aborted")return F;let c=await this._def.schema._parseAsync({data:a,path:o.path,parent:o});return c.status==="aborted"?F:c.status==="dirty"?Kn(c.value):r.value==="dirty"?Kn(c.value):c});{if(r.value==="aborted")return F;let a=this._def.schema._parseSync({data:s,path:o.path,parent:o});return a.status==="aborted"?F:a.status==="dirty"?Kn(a.value):r.value==="dirty"?Kn(a.value):a}}if(n.type==="refinement"){let s=a=>{let c=n.refinement(a,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 a};if(o.common.async===!1){let a=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return a.status==="aborted"?F:(a.status==="dirty"&&r.dirty(),s(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(a=>a.status==="aborted"?F:(a.status==="dirty"&&r.dirty(),s(a.value).then(()=>({status:r.value,value:a.value}))))}if(n.type==="transform")if(o.common.async===!1){let s=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!hn(s))return F;let a=n.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(s=>hn(s)?Promise.resolve(n.transform(s.value,i)).then(a=>({status:r.value,value:a})):F);ce.assertNever(n)}};Wt.create=(e,t,r)=>new Wt({schema:e,typeName:E.ZodEffects,effect:t,...H(r)});Wt.createWithPreprocess=(e,t,r)=>new Wt({schema:t,effect:{type:"preprocess",transform:e},typeName:E.ZodEffects,...H(r)});var Pt=class extends ee{_parse(t){return this._getType(t)===C.undefined?ut(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Pt.create=(e,t)=>new Pt({innerType:e,typeName:E.ZodOptional,...H(t)});var br=class extends ee{_parse(t){return this._getType(t)===C.null?ut(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};br.create=(e,t)=>new br({innerType:e,typeName:E.ZodNullable,...H(t)});var oo=class extends ee{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return r.parsedType===C.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};oo.create=(e,t)=>new oo({innerType:e,typeName:E.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...H(t)});var io=class extends ee{_parse(t){let{ctx:r}=this._processInputParams(t),o={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return hi(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Tt(o.common.issues)},input:o.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new Tt(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}};io.create=(e,t)=>new io({innerType:e,typeName:E.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...H(t)});var Si=class extends ee{_parse(t){if(this._getType(t)!==C.nan){let o=this._getOrReturnCtx(t);return A(o,{code:T.invalid_type,expected:C.nan,received:o.parsedType}),F}return{status:"valid",value:t.data}}};Si.create=e=>new Si({typeName:E.ZodNaN,...H(e)});var XL=Symbol("zod_brand"),Ka=class extends ee{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return this._def.type._parse({data:o,path:r.path,parent:r})}unwrap(){return this._def.type}},Ba=class e extends ee{_parse(t){let{status:r,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"?F:i.status==="dirty"?(r.dirty(),Kn(i.value)):this._def.out._parseAsync({data:i.value,path:o.path,parent:o})})();{let n=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return n.status==="aborted"?F:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:o.path,parent:o})}}static create(t,r){return new e({in:t,out:r,typeName:E.ZodPipeline})}},so=class extends ee{_parse(t){let r=this._def.innerType._parse(t),o=n=>(hn(n)&&(n.value=Object.freeze(n.value)),n);return hi(r)?r.then(n=>o(n)):o(r)}unwrap(){return this._def.innerType}};so.create=(e,t)=>new so({innerType:e,typeName:E.ZodReadonly,...H(t)});var eZ={object:zt.lazycreate},E;(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"})(E||(E={}));var tZ=Hn.create,rZ=gi.create,nZ=Si.create,oZ=_i.create,iZ=vi.create,sZ=yi.create,aZ=bi.create,cZ=Jn.create,uZ=Qn.create,lZ=wi.create,dZ=Cr.create,pZ=sr.create,fZ=$i.create,mZ=Dr.create,yv=zt.create,hZ=zt.strictCreate,gZ=Yn.create,_Z=Bd.create,vZ=Xn.create,yZ=yr.create,bZ=Jd.create,wZ=ki.create,$Z=xi.create,kZ=Qd.create,xZ=eo.create,SZ=to.create,TZ=ro.create,PZ=no.create,zZ=gn.create,EZ=Wt.create,IZ=Pt.create,NZ=br.create,OZ=Wt.createWithPreprocess,RZ=Ba.create;var Kt={};mn(Kt,{$ZodAny:()=>jc,$ZodArray:()=>ho,$ZodAsyncError:()=>ar,$ZodBase64:()=>xc,$ZodBase64URL:()=>Sc,$ZodBigInt:()=>Di,$ZodBigIntFormat:()=>Ic,$ZodBoolean:()=>mo,$ZodCIDRv4:()=>$c,$ZodCIDRv6:()=>kc,$ZodCUID:()=>hc,$ZodCUID2:()=>gc,$ZodCatch:()=>Yc,$ZodCheck:()=>De,$ZodCheckBigIntFormat:()=>Up,$ZodCheckEndsWith:()=>Yp,$ZodCheckGreaterThan:()=>sc,$ZodCheckIncludes:()=>Jp,$ZodCheckLengthEquals:()=>Gp,$ZodCheckLessThan:()=>ic,$ZodCheckLowerCase:()=>Bp,$ZodCheckMaxLength:()=>Fp,$ZodCheckMaxSize:()=>Lp,$ZodCheckMimeType:()=>ef,$ZodCheckMinLength:()=>Wp,$ZodCheckMinSize:()=>Zp,$ZodCheckMultipleOf:()=>qp,$ZodCheckNumberFormat:()=>Mp,$ZodCheckOverwrite:()=>tf,$ZodCheckProperty:()=>Xp,$ZodCheckRegex:()=>Kp,$ZodCheckSizeEquals:()=>Vp,$ZodCheckStartsWith:()=>Qp,$ZodCheckStringFormat:()=>fo,$ZodCheckUpperCase:()=>Hp,$ZodCustom:()=>ou,$ZodCustomStringFormat:()=>zc,$ZodDate:()=>Dc,$ZodDefault:()=>Bc,$ZodDiscriminatedUnion:()=>qc,$ZodE164:()=>Tc,$ZodEmail:()=>dc,$ZodEmoji:()=>fc,$ZodEnum:()=>Vc,$ZodError:()=>ji,$ZodFile:()=>Wc,$ZodFunction:()=>Ru,$ZodGUID:()=>uc,$ZodIPv4:()=>bc,$ZodIPv6:()=>wc,$ZodISODate:()=>sf,$ZodISODateTime:()=>of,$ZodISODuration:()=>cf,$ZodISOTime:()=>af,$ZodIntersection:()=>Mc,$ZodJWT:()=>Pc,$ZodKSUID:()=>yc,$ZodLazy:()=>nu,$ZodLiteral:()=>Fc,$ZodMap:()=>Lc,$ZodNaN:()=>Xc,$ZodNanoID:()=>mc,$ZodNever:()=>Ac,$ZodNonOptional:()=>Jc,$ZodNull:()=>Rc,$ZodNullable:()=>Kc,$ZodNumber:()=>Ci,$ZodNumberFormat:()=>Ec,$ZodObject:()=>qi,$ZodOptional:()=>Gc,$ZodPipe:()=>_o,$ZodPrefault:()=>Hc,$ZodPromise:()=>ru,$ZodReadonly:()=>eu,$ZodRealError:()=>uo,$ZodRecord:()=>Uc,$ZodRegistry:()=>yo,$ZodSet:()=>Zc,$ZodString:()=>Zr,$ZodStringFormat:()=>ke,$ZodSuccess:()=>Qc,$ZodSymbol:()=>Nc,$ZodTemplateLiteral:()=>tu,$ZodTransform:()=>go,$ZodTuple:()=>Vr,$ZodType:()=>G,$ZodULID:()=>_c,$ZodURL:()=>pc,$ZodUUID:()=>lc,$ZodUndefined:()=>Oc,$ZodUnion:()=>Mi,$ZodUnknown:()=>$n,$ZodVoid:()=>Cc,$ZodXID:()=>vc,$brand:()=>Ja,$constructor:()=>v,$input:()=>au,$output:()=>su,Doc:()=>Ai,JSONSchema:()=>zy,JSONSchemaGenerator:()=>ws,NEVER:()=>Ha,TimePrecision:()=>uu,_any:()=>ku,_array:()=>bs,_base64:()=>os,_base64url:()=>is,_bigint:()=>_u,_boolean:()=>gu,_catch:()=>ez,_cidrv4:()=>rs,_cidrv6:()=>ns,_coercedBigint:()=>_f,_coercedBoolean:()=>gf,_coercedDate:()=>vf,_coercedNumber:()=>hf,_coercedString:()=>lf,_cuid:()=>Hi,_cuid2:()=>Ji,_custom:()=>Eu,_date:()=>Tu,_default:()=>QP,_discriminatedUnion:()=>UP,_e164:()=>ss,_email:()=>Li,_emoji:()=>Ki,_endsWith:()=>ms,_enum:()=>WP,_file:()=>zu,_float32:()=>pu,_float64:()=>fu,_gt:()=>kr,_gte:()=>_t,_guid:()=>bo,_includes:()=>ps,_int:()=>du,_int32:()=>mu,_int64:()=>vu,_intersection:()=>LP,_ipv4:()=>es,_ipv6:()=>ts,_isoDate:()=>pf,_isoDateTime:()=>df,_isoDuration:()=>mf,_isoTime:()=>ff,_jwt:()=>as,_ksuid:()=>Xi,_lazy:()=>oz,_length:()=>ko,_literal:()=>KP,_lowercase:()=>ls,_lt:()=>$r,_lte:()=>Ot,_map:()=>VP,_max:()=>Ot,_maxLength:()=>$o,_maxSize:()=>wo,_mime:()=>hs,_min:()=>_t,_minLength:()=>Fr,_minSize:()=>Sn,_multipleOf:()=>xn,_nan:()=>Pu,_nanoid:()=>Bi,_nativeEnum:()=>GP,_negative:()=>bf,_never:()=>xu,_nonnegative:()=>$f,_nonoptional:()=>YP,_nonpositive:()=>wf,_normalize:()=>gs,_null:()=>$u,_nullable:()=>JP,_number:()=>lu,_optional:()=>HP,_overwrite:()=>xr,_parse:()=>ec,_parseAsync:()=>tc,_pipe:()=>tz,_positive:()=>yf,_promise:()=>iz,_property:()=>kf,_readonly:()=>rz,_record:()=>ZP,_refine:()=>Iu,_regex:()=>us,_safeParse:()=>rc,_safeParseAsync:()=>nc,_set:()=>FP,_size:()=>cs,_startsWith:()=>fs,_string:()=>cu,_stringFormat:()=>Ou,_stringbool:()=>Nu,_success:()=>XP,_symbol:()=>bu,_templateLiteral:()=>nz,_toLowerCase:()=>vs,_toUpperCase:()=>ys,_transform:()=>BP,_trim:()=>_s,_tuple:()=>xf,_uint32:()=>hu,_uint64:()=>yu,_ulid:()=>Qi,_undefined:()=>wu,_union:()=>MP,_unknown:()=>kn,_uppercase:()=>ds,_url:()=>Gi,_uuid:()=>Zi,_uuidv4:()=>Vi,_uuidv6:()=>Fi,_uuidv7:()=>Wi,_void:()=>Su,_xid:()=>Yi,clone:()=>tt,config:()=>Le,flattenError:()=>lo,formatError:()=>po,function:()=>ju,globalConfig:()=>Ti,globalRegistry:()=>Gt,isValidBase64:()=>uf,isValidBase64URL:()=>Mv,isValidJWT:()=>Uv,locales:()=>vo,parse:()=>yn,parseAsync:()=>bn,prettifyError:()=>Xa,regexes:()=>Lr,registry:()=>Ui,safeParse:()=>Mr,safeParseAsync:()=>Ur,toDotPath:()=>wv,toJSONSchema:()=>xo,treeifyError:()=>Ya,util:()=>R,version:()=>rf});var Ha=Object.freeze({status:"aborted"});function v(e,t,r){function o(a,c){var u;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(u=a._zod).traits??(u.traits=new Set),a._zod.traits.add(e),t(a,c);for(let l in s.prototype)l in a||Object.defineProperty(a,l,{value:s.prototype[l].bind(a)});a._zod.constr=s,a._zod.def=c}let n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:e});function s(a){var c;let u=r?.Parent?new i:this;o(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(s,"init",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var Ja=Symbol("zod_brand"),ar=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ti={};function Le(e){return e&&Object.assign(Ti,e),Ti}var R={};mn(R,{BIGINT_FORMAT_RANGES:()=>ap,Class:()=>Xd,NUMBER_FORMAT_RANGES:()=>sp,aborted:()=>vn,allowsEval:()=>np,assert:()=>PT,assertEqual:()=>kT,assertIs:()=>ST,assertNever:()=>TT,assertNotEqual:()=>xT,assignProp:()=>rp,cached:()=>Ei,captureStackTrace:()=>Qa,cleanEnum:()=>UT,cleanRegex:()=>Ii,clone:()=>tt,createTransparentProxy:()=>RT,defineLazy:()=>ve,esc:()=>_n,escapeRegex:()=>wr,extend:()=>CT,finalizeIssue:()=>Et,floatSafeRemainder:()=>tp,getElementAtPath:()=>zT,getEnumValues:()=>zi,getLengthableOrigin:()=>Ri,getParsedType:()=>OT,getSizableOrigin:()=>Oi,isObject:()=>ao,isPlainObject:()=>co,issue:()=>cp,joinValues:()=>x,jsonStringifyReplacer:()=>ep,merge:()=>DT,normalizeParams:()=>O,nullish:()=>qr,numKeys:()=>NT,omit:()=>AT,optionalKeys:()=>ip,partial:()=>qT,pick:()=>jT,prefixIssues:()=>gt,primitiveTypes:()=>op,promiseAllObject:()=>ET,propertyKeyTypes:()=>Ni,randomString:()=>IT,required:()=>MT,stringifyPrimitive:()=>j,unwrapMessage:()=>Pi});function kT(e){return e}function xT(e){return e}function ST(e){}function TT(e){throw new Error}function PT(e){}function zi(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function x(e,t="|"){return e.map(r=>j(r)).join(t)}function ep(e,t){return typeof t=="bigint"?t.toString():t}function Ei(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function qr(e){return e==null}function Ii(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function tp(e,t){let r=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,n=r>o?r:o,i=Number.parseInt(e.toFixed(n).replace(".","")),s=Number.parseInt(t.toFixed(n).replace(".",""));return i%s/10**n}function ve(e,t,r){Object.defineProperty(e,t,{get(){{let n=r();return e[t]=n,n}throw new Error("cached value already set")},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function rp(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function zT(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function ET(e){let t=Object.keys(e),r=t.map(o=>e[o]);return Promise.all(r).then(o=>{let n={};for(let i=0;i<t.length;i++)n[t[i]]=o[i];return n})}function IT(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function _n(e){return JSON.stringify(e)}var Qa=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function ao(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var np=Ei(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function co(e){if(ao(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let r=t.prototype;return!(ao(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function NT(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var OT=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}`)}},Ni=new Set(["string","number","symbol"]),op=new Set(["string","number","bigint","boolean","symbol","undefined"]);function wr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function tt(e,t,r){let o=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(o._zod.parent=e),o}function O(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 RT(e){let t;return new Proxy({},{get(r,o,n){return t??(t=e()),Reflect.get(t,o,n)},set(r,o,n,i){return t??(t=e()),Reflect.set(t,o,n,i)},has(r,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(r,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(r,o,n){return t??(t=e()),Reflect.defineProperty(t,o,n)}})}function j(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function ip(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var sp={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]},ap={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function jT(e,t){let r={},o=e._zod.def;for(let n in t){if(!(n in o.shape))throw new Error(`Unrecognized key: "${n}"`);t[n]&&(r[n]=o.shape[n])}return tt(e,{...e._zod.def,shape:r,checks:[]})}function AT(e,t){let r={...e._zod.def.shape},o=e._zod.def;for(let n in t){if(!(n in o.shape))throw new Error(`Unrecognized key: "${n}"`);t[n]&&delete r[n]}return tt(e,{...e._zod.def,shape:r,checks:[]})}function CT(e,t){if(!co(t))throw new Error("Invalid input to extend: expected a plain object");let r={...e._zod.def,get shape(){let o={...e._zod.def.shape,...t};return rp(this,"shape",o),o},checks:[]};return tt(e,r)}function DT(e,t){return tt(e,{...e._zod.def,get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return rp(this,"shape",r),r},catchall:t._zod.def.catchall,checks:[]})}function qT(e,t,r){let o=t._zod.def.shape,n={...o};if(r)for(let i in r){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(n[i]=e?new e({type:"optional",innerType:o[i]}):o[i])}else for(let i in o)n[i]=e?new e({type:"optional",innerType:o[i]}):o[i];return tt(t,{...t._zod.def,shape:n,checks:[]})}function MT(e,t,r){let o=t._zod.def.shape,n={...o};if(r)for(let i in r){if(!(i in n))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(n[i]=new e({type:"nonoptional",innerType:o[i]}))}else for(let i in o)n[i]=new e({type:"nonoptional",innerType:o[i]});return tt(t,{...t._zod.def,shape:n,checks:[]})}function vn(e,t=0){for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function gt(e,t){return t.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function Pi(e){return typeof e=="string"?e:e?.message}function Et(e,t,r){let o={...e,path:e.path??[]};if(!e.message){let n=Pi(e.inst?._zod.def?.error?.(e))??Pi(t?.error?.(e))??Pi(r.customError?.(e))??Pi(r.localeError?.(e))??"Invalid input";o.message=n}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function Oi(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Ri(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function cp(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function UT(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}var Xd=class{constructor(...t){}};var bv=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,ep,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ji=v("$ZodError",bv),uo=v("$ZodError",bv,{Parent:Error});function lo(e,t=r=>r.message){let r={},o=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):o.push(t(n));return{formErrors:o,fieldErrors:r}}function po(e,t){let r=t||function(i){return i.message},o={_errors:[]},n=i=>{for(let s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>n({issues:a}));else if(s.code==="invalid_key")n({issues:s.issues});else if(s.code==="invalid_element")n({issues:s.issues});else if(s.path.length===0)o._errors.push(r(s));else{let a=o,c=0;for(;c<s.path.length;){let u=s.path[c];c===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(s))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return n(e),o}function Ya(e,t){let r=t||function(i){return i.message},o={errors:[]},n=(i,s=[])=>{var a,c;for(let u of i.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(l=>n({issues:l},u.path));else if(u.code==="invalid_key")n({issues:u.issues},u.path);else if(u.code==="invalid_element")n({issues:u.issues},u.path);else{let l=[...s,...u.path];if(l.length===0){o.errors.push(r(u));continue}let d=o,h=0;for(;h<l.length;){let m=l[h],p=h===l.length-1;typeof m=="string"?(d.properties??(d.properties={}),(a=d.properties)[m]??(a[m]={errors:[]}),d=d.properties[m]):(d.items??(d.items=[]),(c=d.items)[m]??(c[m]={errors:[]}),d=d.items[m]),p&&d.errors.push(r(u)),h++}}};return n(e),o}function wv(e){let t=[];for(let r of e)typeof r=="number"?t.push(`[${r}]`):typeof r=="symbol"?t.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?t.push(`[${JSON.stringify(r)}]`):(t.length&&t.push("."),t.push(r));return t.join("")}function Xa(e){let t=[],r=[...e.issues].sort((o,n)=>o.path.length-n.path.length);for(let o of r)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${wv(o.path)}`);return t.join(`
17
+ `)}var ec=e=>(t,r,o,n)=>{let i=o?Object.assign(o,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new ar;if(s.issues.length){let a=new(n?.Err??e)(s.issues.map(c=>Et(c,i,Le())));throw Qa(a,n?.callee),a}return s.value},yn=ec(uo),tc=e=>async(t,r,o,n)=>{let i=o?Object.assign(o,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(n?.Err??e)(s.issues.map(c=>Et(c,i,Le())));throw Qa(a,n?.callee),a}return s.value},bn=tc(uo),rc=e=>(t,r,o)=>{let n=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new ar;return i.issues.length?{success:!1,error:new(e??ji)(i.issues.map(s=>Et(s,n,Le())))}:{success:!0,data:i.value}},Mr=rc(uo),nc=e=>async(t,r,o)=>{let n=o?Object.assign(o,{async:!0}):{async:!0},i=t._zod.run({value:r,issues:[]},n);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>Et(s,n,Le())))}:{success:!0,data:i.value}},Ur=nc(uo);var Lr={};mn(Lr,{_emoji:()=>$v,base64:()=>kp,base64url:()=>oc,bigint:()=>Ip,boolean:()=>Rp,browserEmail:()=>HT,cidrv4:()=>wp,cidrv6:()=>$p,cuid:()=>up,cuid2:()=>lp,date:()=>Tp,datetime:()=>zp,domain:()=>JT,duration:()=>hp,e164:()=>Sp,email:()=>_p,emoji:()=>vp,extendedDuration:()=>ZT,guid:()=>gp,hostname:()=>xp,html5Email:()=>GT,integer:()=>Np,ipv4:()=>yp,ipv6:()=>bp,ksuid:()=>fp,lowercase:()=>Cp,nanoid:()=>mp,null:()=>jp,number:()=>Op,rfc5322Email:()=>KT,string:()=>Ep,time:()=>Pp,ulid:()=>dp,undefined:()=>Ap,unicodeEmail:()=>BT,uppercase:()=>Dp,uuid:()=>wn,uuid4:()=>VT,uuid6:()=>FT,uuid7:()=>WT,xid:()=>pp});var up=/^[cC][^\s-]{8,}$/,lp=/^[0-9a-z]+$/,dp=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,pp=/^[0-9a-vA-V]{20}$/,fp=/^[A-Za-z0-9]{27}$/,mp=/^[a-zA-Z0-9_-]{21}$/,hp=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ZT=/^[-+]?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)?)??$/,gp=/^([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})$/,wn=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)$/,VT=wn(4),FT=wn(6),WT=wn(7),_p=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,GT=/^[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])?)*$/,KT=/^(([^<>()\[\]\\.,;:\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,}))$/,BT=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,HT=/^[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])?)*$/,$v="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function vp(){return new RegExp($v,"u")}var yp=/^(?:(?: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])$/,bp=/^(([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})$/,wp=/^((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])$/,$p=/^(([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])$/,kp=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,oc=/^[A-Za-z0-9_-]*$/,xp=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,JT=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Sp=/^\+(?:[0-9]){6,14}[0-9]$/,kv="(?:(?:\\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])))",Tp=new RegExp(`^${kv}$`);function xv(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 Pp(e){return new RegExp(`^${xv(e)}$`)}function zp(e){let t=xv({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-]\\d{2}:\\d{2})");let o=`${t}(?:${r.join("|")})`;return new RegExp(`^${kv}T(?:${o})$`)}var Ep=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Ip=/^\d+n?$/,Np=/^\d+$/,Op=/^-?\d+(?:\.\d+)?/i,Rp=/true|false/i,jp=/null/i;var Ap=/undefined/i;var Cp=/^[^A-Z]*$/,Dp=/^[^a-z]*$/;var De=v("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Tv={number:"number",bigint:"bigint",object:"date"},ic=v("$ZodCheckLessThan",(e,t)=>{De.init(e,t);let r=Tv[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:r,code:"too_big",maximum:t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),sc=v("$ZodCheckGreaterThan",(e,t)=>{De.init(e,t);let r=Tv[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:r,code:"too_small",minimum:t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),qp=v("$ZodCheckMultipleOf",(e,t)=>{De.init(e,t),e._zod.onattach.push(r=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):tp(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Mp=v("$ZodCheckNumberFormat",(e,t)=>{De.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),o=r?"int":"number",[n,i]=sp[t.format];e._zod.onattach.push(s=>{let a=s._zod.bag;a.format=t.format,a.minimum=n,a.maximum=i,r&&(a.pattern=Np)}),e._zod.check=s=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:o,format:t.format,code:"invalid_type",input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!t.abort});return}}a<n&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inst:e})}}),Up=v("$ZodCheckBigIntFormat",(e,t)=>{De.init(e,t);let[r,o]=ap[t.format];e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,i.minimum=r,i.maximum=o}),e._zod.check=n=>{let i=n.value;i<r&&n.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),i>o&&n.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inst:e})}}),Lp=v("$ZodCheckMaxSize",(e,t)=>{var r;De.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!qr(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let n=o.value;n.size<=t.maximum||o.issues.push({origin:Oi(n),code:"too_big",maximum:t.maximum,input:n,inst:e,continue:!t.abort})}}),Zp=v("$ZodCheckMinSize",(e,t)=>{var r;De.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!qr(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let n=o.value;n.size>=t.minimum||o.issues.push({origin:Oi(n),code:"too_small",minimum:t.minimum,input:n,inst:e,continue:!t.abort})}}),Vp=v("$ZodCheckSizeEquals",(e,t)=>{var r;De.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!qr(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=o=>{let n=o.value,i=n.size;if(i===t.size)return;let s=i>t.size;o.issues.push({origin:Oi(n),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Fp=v("$ZodCheckMaxLength",(e,t)=>{var r;De.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!qr(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let n=o.value;if(n.length<=t.maximum)return;let s=Ri(n);o.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Wp=v("$ZodCheckMinLength",(e,t)=>{var r;De.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!qr(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let n=o.value;if(n.length>=t.minimum)return;let s=Ri(n);o.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Gp=v("$ZodCheckLengthEquals",(e,t)=>{var r;De.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!qr(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=o=>{let n=o.value,i=n.length;if(i===t.length)return;let s=Ri(n),a=i>t.length;o.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),fo=v("$ZodCheckStringFormat",(e,t)=>{var r,o;De.init(e,t),e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),Kp=v("$ZodCheckRegex",(e,t)=>{fo.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Bp=v("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Cp),fo.init(e,t)}),Hp=v("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Dp),fo.init(e,t)}),Jp=v("$ZodCheckIncludes",(e,t)=>{De.init(e,t);let r=wr(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Qp=v("$ZodCheckStartsWith",(e,t)=>{De.init(e,t);let r=new RegExp(`^${wr(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),Yp=v("$ZodCheckEndsWith",(e,t)=>{De.init(e,t);let r=new RegExp(`.*${wr(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});function Sv(e,t,r){e.issues.length&&t.issues.push(...gt(r,e.issues))}var Xp=v("$ZodCheckProperty",(e,t)=>{De.init(e,t),e._zod.check=r=>{let o=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(n=>Sv(n,r,t.property));Sv(o,r,t.property)}}),ef=v("$ZodCheckMimeType",(e,t)=>{De.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime}),e._zod.check=o=>{r.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e})}}),tf=v("$ZodCheckOverwrite",(e,t)=>{De.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var Ai=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(`
18
18
  `).filter(s=>s),n=Math.min(...o.map(s=>s.length-s.trimStart().length)),i=o.map(s=>s.slice(n)).map(s=>" ".repeat(this.indent*2)+s);for(let s of i)this.content.push(s)}compile(){let t=Function,r=this?.args,n=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...r,n.join(`
19
- `))}};var tf={major:4,minor:0,patch:0};var G=v("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=tf;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let n of o)for(let i of n._zod.onattach)i(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let n=(i,s,a)=>{let c=vn(i),u;for(let l of s){if(l._zod.def.when){if(!l._zod.def.when(i))continue}else if(c)continue;let d=i.issues.length,h=l._zod.check(i);if(h instanceof Promise&&a?.async===!1)throw new ar;if(u||h instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await h,i.issues.length!==d&&(c||(c=vn(i,d)))});else{if(i.issues.length===d)continue;c||(c=vn(i,d))}}return u?u.then(()=>i):i};e._zod.run=(i,s)=>{let a=e._zod.parse(i,s);if(a instanceof Promise){if(s.async===!1)throw new ar;return a.then(c=>n(c,o,s))}return n(a,o,s)}}e["~standard"]={validate:n=>{try{let i=Mr(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Ur(e,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}}),Zr=v("$ZodString",(e,t)=>{G.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??zp(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),ke=v("$ZodStringFormat",(e,t)=>{fo.init(e,t),Zr.init(e,t)}),ac=v("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=hp),ke.init(e,t)}),cc=v("$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=wn(o))}else t.pattern??(t.pattern=wn());ke.init(e,t)}),uc=v("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=gp),ke.init(e,t)}),lc=v("$ZodURL",(e,t)=>{ke.init(e,t),e._zod.check=r=>{try{let o=r.value,n=new URL(o),i=n.href;t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:kp.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),!o.endsWith("/")&&i.endsWith("/")?r.value=i.slice(0,-1):r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),dc=v("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=_p()),ke.init(e,t)}),pc=v("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=fp),ke.init(e,t)}),fc=v("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=cp),ke.init(e,t)}),mc=v("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=up),ke.init(e,t)}),hc=v("$ZodULID",(e,t)=>{t.pattern??(t.pattern=lp),ke.init(e,t)}),gc=v("$ZodXID",(e,t)=>{t.pattern??(t.pattern=dp),ke.init(e,t)}),_c=v("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=pp),ke.init(e,t)}),nf=v("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Pp(t)),ke.init(e,t)}),of=v("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Sp),ke.init(e,t)}),sf=v("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Tp(t)),ke.init(e,t)}),af=v("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=mp),ke.init(e,t)}),vc=v("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=vp),ke.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format="ipv4"})}),yc=v("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=yp),ke.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format="ipv6"}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),bc=v("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=bp),ke.init(e,t)}),wc=v("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=wp),ke.init(e,t),e._zod.check=r=>{let[o,n]=r.value.split("/");try{if(!n)throw new Error;let i=Number(n);if(`${i}`!==n)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${o}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function cf(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var $c=v("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=$p),ke.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{cf(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function qv(e){if(!rc.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return cf(r)}var kc=v("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=rc),ke.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{qv(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),xc=v("$ZodE164",(e,t)=>{t.pattern??(t.pattern=xp),ke.init(e,t)});function Mv(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[o]=r;if(!o)return!1;let n=JSON.parse(atob(o));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}var Sc=v("$ZodJWT",(e,t)=>{ke.init(e,t),e._zod.check=r=>{Mv(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Tc=v("$ZodCustomStringFormat",(e,t)=>{ke.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),ji=v("$ZodNumber",(e,t)=>{G.init(e,t),e._zod.pattern=e._zod.bag.pattern??Np,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let i=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...i?{received:i}:{}}),r}}),Pc=v("$ZodNumber",(e,t)=>{qp.init(e,t),ji.init(e,t)}),mo=v("$ZodBoolean",(e,t)=>{G.init(e,t),e._zod.pattern=Op,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=!!r.value}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),Ai=v("$ZodBigInt",(e,t)=>{G.init(e,t),e._zod.pattern=Ip,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),zc=v("$ZodBigInt",(e,t)=>{Mp.init(e,t),Ai.init(e,t)}),Ic=v("$ZodSymbol",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),Ec=v("$ZodUndefined",(e,t)=>{G.init(e,t),e._zod.pattern=jp,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),Nc=v("$ZodNull",(e,t)=>{G.init(e,t),e._zod.pattern=Rp,e._zod.values=new Set([null]),e._zod.parse=(r,o)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),Oc=v("$ZodAny",(e,t)=>{G.init(e,t),e._zod.parse=r=>r}),$n=v("$ZodUnknown",(e,t)=>{G.init(e,t),e._zod.parse=r=>r}),Rc=v("$ZodNever",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),jc=v("$ZodVoid",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),Ac=v("$ZodDate",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let n=r.value,i=n instanceof Date;return i&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...i?{received:"Invalid Date"}:{},inst:e}),r}});function Pv(e,t,r){e.issues.length&&t.issues.push(...gt(r,e.issues)),t.value[r]=e.value}var ho=v("$ZodArray",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);let i=[];for(let s=0;s<n.length;s++){let a=n[s],c=t.element._zod.run({value:a,issues:[]},o);c instanceof Promise?i.push(c.then(u=>Pv(u,r,s))):Pv(c,r,s)}return i.length?Promise.all(i).then(()=>r):r}});function ic(e,t,r){e.issues.length&&t.issues.push(...gt(r,e.issues)),t.value[r]=e.value}function zv(e,t,r,o){e.issues.length?o[r]===void 0?r in o?t.value[r]=void 0:t.value[r]=e.value:t.issues.push(...gt(r,e.issues)):e.value===void 0?r in o&&(t.value[r]=void 0):t.value[r]=e.value}var Di=v("$ZodObject",(e,t)=>{G.init(e,t);let r=Pi(()=>{let d=Object.keys(t.shape);for(let m of d)if(!(t.shape[m]instanceof G))throw new Error(`Invalid element at key "${m}": expected a Zod schema`);let h=op(t.shape);return{shape:t.shape,keys:d,keySet:new Set(d),numKeys:d.length,optionalKeys:new Set(h)}});ve(e._zod,"propValues",()=>{let d=t.shape,h={};for(let m in d){let p=d[m]._zod;if(p.values){h[m]??(h[m]=new Set);for(let f of p.values)h[m].add(f)}}return h});let o=d=>{let h=new Ri(["shape","payload","ctx"]),m=r.value,p=$=>{let k=_n($);return`shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`};h.write("const input = payload.value;");let f=Object.create(null),_=0;for(let $ of m.keys)f[$]=`key_${_++}`;h.write("const newResult = {}");for(let $ of m.keys)if(m.optionalKeys.has($)){let k=f[$];h.write(`const ${k} = ${p($)};`);let I=_n($);h.write(`
19
+ `))}};var rf={major:4,minor:0,patch:0};var G=v("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=rf;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let n of o)for(let i of n._zod.onattach)i(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let n=(i,s,a)=>{let c=vn(i),u;for(let l of s){if(l._zod.def.when){if(!l._zod.def.when(i))continue}else if(c)continue;let d=i.issues.length,h=l._zod.check(i);if(h instanceof Promise&&a?.async===!1)throw new ar;if(u||h instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await h,i.issues.length!==d&&(c||(c=vn(i,d)))});else{if(i.issues.length===d)continue;c||(c=vn(i,d))}}return u?u.then(()=>i):i};e._zod.run=(i,s)=>{let a=e._zod.parse(i,s);if(a instanceof Promise){if(s.async===!1)throw new ar;return a.then(c=>n(c,o,s))}return n(a,o,s)}}e["~standard"]={validate:n=>{try{let i=Mr(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Ur(e,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}}),Zr=v("$ZodString",(e,t)=>{G.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Ep(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),ke=v("$ZodStringFormat",(e,t)=>{fo.init(e,t),Zr.init(e,t)}),uc=v("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=gp),ke.init(e,t)}),lc=v("$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=wn(o))}else t.pattern??(t.pattern=wn());ke.init(e,t)}),dc=v("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=_p),ke.init(e,t)}),pc=v("$ZodURL",(e,t)=>{ke.init(e,t),e._zod.check=r=>{try{let o=r.value,n=new URL(o),i=n.href;t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:xp.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),!o.endsWith("/")&&i.endsWith("/")?r.value=i.slice(0,-1):r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),fc=v("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=vp()),ke.init(e,t)}),mc=v("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=mp),ke.init(e,t)}),hc=v("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=up),ke.init(e,t)}),gc=v("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=lp),ke.init(e,t)}),_c=v("$ZodULID",(e,t)=>{t.pattern??(t.pattern=dp),ke.init(e,t)}),vc=v("$ZodXID",(e,t)=>{t.pattern??(t.pattern=pp),ke.init(e,t)}),yc=v("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=fp),ke.init(e,t)}),of=v("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=zp(t)),ke.init(e,t)}),sf=v("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Tp),ke.init(e,t)}),af=v("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Pp(t)),ke.init(e,t)}),cf=v("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=hp),ke.init(e,t)}),bc=v("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=yp),ke.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format="ipv4"})}),wc=v("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=bp),ke.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format="ipv6"}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),$c=v("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=wp),ke.init(e,t)}),kc=v("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=$p),ke.init(e,t),e._zod.check=r=>{let[o,n]=r.value.split("/");try{if(!n)throw new Error;let i=Number(n);if(`${i}`!==n)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${o}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function uf(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var xc=v("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=kp),ke.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{uf(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function Mv(e){if(!oc.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return uf(r)}var Sc=v("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=oc),ke.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{Mv(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Tc=v("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Sp),ke.init(e,t)});function Uv(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[o]=r;if(!o)return!1;let n=JSON.parse(atob(o));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}var Pc=v("$ZodJWT",(e,t)=>{ke.init(e,t),e._zod.check=r=>{Uv(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),zc=v("$ZodCustomStringFormat",(e,t)=>{ke.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),Ci=v("$ZodNumber",(e,t)=>{G.init(e,t),e._zod.pattern=e._zod.bag.pattern??Op,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let i=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...i?{received:i}:{}}),r}}),Ec=v("$ZodNumber",(e,t)=>{Mp.init(e,t),Ci.init(e,t)}),mo=v("$ZodBoolean",(e,t)=>{G.init(e,t),e._zod.pattern=Rp,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=!!r.value}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),Di=v("$ZodBigInt",(e,t)=>{G.init(e,t),e._zod.pattern=Ip,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),Ic=v("$ZodBigInt",(e,t)=>{Up.init(e,t),Di.init(e,t)}),Nc=v("$ZodSymbol",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),Oc=v("$ZodUndefined",(e,t)=>{G.init(e,t),e._zod.pattern=Ap,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),Rc=v("$ZodNull",(e,t)=>{G.init(e,t),e._zod.pattern=jp,e._zod.values=new Set([null]),e._zod.parse=(r,o)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),jc=v("$ZodAny",(e,t)=>{G.init(e,t),e._zod.parse=r=>r}),$n=v("$ZodUnknown",(e,t)=>{G.init(e,t),e._zod.parse=r=>r}),Ac=v("$ZodNever",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),Cc=v("$ZodVoid",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),Dc=v("$ZodDate",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let n=r.value,i=n instanceof Date;return i&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...i?{received:"Invalid Date"}:{},inst:e}),r}});function zv(e,t,r){e.issues.length&&t.issues.push(...gt(r,e.issues)),t.value[r]=e.value}var ho=v("$ZodArray",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);let i=[];for(let s=0;s<n.length;s++){let a=n[s],c=t.element._zod.run({value:a,issues:[]},o);c instanceof Promise?i.push(c.then(u=>zv(u,r,s))):zv(c,r,s)}return i.length?Promise.all(i).then(()=>r):r}});function ac(e,t,r){e.issues.length&&t.issues.push(...gt(r,e.issues)),t.value[r]=e.value}function Ev(e,t,r,o){e.issues.length?o[r]===void 0?r in o?t.value[r]=void 0:t.value[r]=e.value:t.issues.push(...gt(r,e.issues)):e.value===void 0?r in o&&(t.value[r]=void 0):t.value[r]=e.value}var qi=v("$ZodObject",(e,t)=>{G.init(e,t);let r=Ei(()=>{let d=Object.keys(t.shape);for(let m of d)if(!(t.shape[m]instanceof G))throw new Error(`Invalid element at key "${m}": expected a Zod schema`);let h=ip(t.shape);return{shape:t.shape,keys:d,keySet:new Set(d),numKeys:d.length,optionalKeys:new Set(h)}});ve(e._zod,"propValues",()=>{let d=t.shape,h={};for(let m in d){let p=d[m]._zod;if(p.values){h[m]??(h[m]=new Set);for(let f of p.values)h[m].add(f)}}return h});let o=d=>{let h=new Ai(["shape","payload","ctx"]),m=r.value,p=$=>{let k=_n($);return`shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`};h.write("const input = payload.value;");let f=Object.create(null),_=0;for(let $ of m.keys)f[$]=`key_${_++}`;h.write("const newResult = {}");for(let $ of m.keys)if(m.optionalKeys.has($)){let k=f[$];h.write(`const ${k} = ${p($)};`);let N=_n($);h.write(`
20
20
  if (${k}.issues.length) {
21
- if (input[${I}] === undefined) {
22
- if (${I} in input) {
23
- newResult[${I}] = undefined;
21
+ if (input[${N}] === undefined) {
22
+ if (${N} in input) {
23
+ newResult[${N}] = undefined;
24
24
  }
25
25
  } else {
26
26
  payload.issues = payload.issues.concat(
27
27
  ${k}.issues.map((iss) => ({
28
28
  ...iss,
29
- path: iss.path ? [${I}, ...iss.path] : [${I}],
29
+ path: iss.path ? [${N}, ...iss.path] : [${N}],
30
30
  }))
31
31
  );
32
32
  }
33
33
  } else if (${k}.value === undefined) {
34
- if (${I} in input) newResult[${I}] = undefined;
34
+ if (${N} in input) newResult[${N}] = undefined;
35
35
  } else {
36
- newResult[${I}] = ${k}.value;
36
+ newResult[${N}] = ${k}.value;
37
37
  }
38
38
  `)}else{let k=f[$];h.write(`const ${k} = ${p($)};`),h.write(`
39
39
  if (${k}.issues.length) payload.issues = payload.issues.concat(${k}.issues.map(iss => ({
40
40
  ...iss,
41
41
  path: iss.path ? [${_n($)}, ...iss.path] : [${_n($)}]
42
- })));`),h.write(`newResult[${_n($)}] = ${k}.value`)}h.write("payload.value = newResult;"),h.write("return payload;");let y=h.compile();return($,k)=>y(d,$,k)},n,i=ao,s=!xi.jitless,c=s&&rp.value,u=t.catchall,l;e._zod.parse=(d,h)=>{l??(l=r.value);let m=d.value;if(!i(m))return d.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),d;let p=[];if(s&&c&&h?.async===!1&&h.jitless!==!0)n||(n=o(t.shape)),d=n(d,h);else{d.value={};let k=l.shape;for(let I of l.keys){let P=k[I],ze=P._zod.run({value:m[I],issues:[]},h),Me=P._zod.optin==="optional"&&P._zod.optout==="optional";ze instanceof Promise?p.push(ze.then(ir=>Me?zv(ir,d,I,m):ic(ir,d,I))):Me?zv(ze,d,I,m):ic(ze,d,I)}}if(!u)return p.length?Promise.all(p).then(()=>d):d;let f=[],_=l.keySet,y=u._zod,$=y.def.type;for(let k of Object.keys(m)){if(_.has(k))continue;if($==="never"){f.push(k);continue}let I=y.run({value:m[k],issues:[]},h);I instanceof Promise?p.push(I.then(P=>ic(P,d,k))):ic(I,d,k)}return f.length&&d.issues.push({code:"unrecognized_keys",keys:f,input:m,inst:e}),p.length?Promise.all(p).then(()=>d):d}});function Iv(e,t,r,o){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;return t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(n=>n.issues.map(i=>It(i,o,Ue())))}),t}var Ci=v("$ZodUnion",(e,t)=>{G.init(e,t),ve(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),ve(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),ve(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),ve(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){let r=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${r.map(o=>zi(o.source)).join("|")})$`)}}),e._zod.parse=(r,o)=>{let n=!1,i=[];for(let s of t.options){let a=s._zod.run({value:r.value,issues:[]},o);if(a instanceof Promise)i.push(a),n=!0;else{if(a.issues.length===0)return a;i.push(a)}}return n?Promise.all(i).then(s=>Iv(s,r,e,o)):Iv(i,r,e,o)}}),Dc=v("$ZodDiscriminatedUnion",(e,t)=>{Ci.init(e,t);let r=e._zod.parse;ve(e._zod,"propValues",()=>{let n={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[a,c]of Object.entries(s)){n[a]||(n[a]=new Set);for(let u of c)n[a].add(u)}}return n});let o=Pi(()=>{let n=t.options,i=new Map;for(let s of n){let a=s._zod.propValues[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let c of a){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,s)}}return i});e._zod.parse=(n,i)=>{let s=n.value;if(!ao(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),n;let a=o.value.get(s?.[t.discriminator]);return a?a._zod.run(n,i):t.unionFallback?r(n,i):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:s,path:[t.discriminator],inst:e}),n)}}),Cc=v("$ZodIntersection",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=r.value,i=t.left._zod.run({value:n,issues:[]},o),s=t.right._zod.run({value:n,issues:[]},o);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,u])=>Ev(r,c,u)):Ev(r,i,s)}});function rf(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(co(e)&&co(t)){let r=Object.keys(t),o=Object.keys(e).filter(i=>r.indexOf(i)!==-1),n={...e,...t};for(let i of o){let s=rf(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};n[i]=s.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let o=0;o<e.length;o++){let n=e[o],i=t[o],s=rf(n,i);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Ev(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),vn(e))return e;let o=rf(t.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var Vr=v("$ZodTuple",(e,t)=>{G.init(e,t);let r=t.items,o=r.length-[...r].reverse().findIndex(n=>n._zod.optin!=="optional");e._zod.parse=(n,i)=>{let s=n.value;if(!Array.isArray(s))return n.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=[];let a=[];if(!t.rest){let u=s.length>r.length,l=s.length<o-1;if(u||l)return n.issues.push({input:s,inst:e,origin:"array",...u?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length}}),n}let c=-1;for(let u of r){if(c++,c>=s.length&&c>=o)continue;let l=u._zod.run({value:s[c],issues:[]},i);l instanceof Promise?a.push(l.then(d=>sc(d,n,c))):sc(l,n,c)}if(t.rest){let u=s.slice(r.length);for(let l of u){c++;let d=t.rest._zod.run({value:l,issues:[]},i);d instanceof Promise?a.push(d.then(h=>sc(h,n,c))):sc(d,n,c)}}return a.length?Promise.all(a).then(()=>n):n}});function sc(e,t,r){e.issues.length&&t.issues.push(...gt(r,e.issues)),t.value[r]=e.value}var qc=v("$ZodRecord",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!co(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;let i=[];if(t.keyType._zod.values){let s=t.keyType._zod.values;r.value={};for(let c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let u=t.valueType._zod.run({value:n[c],issues:[]},o);u instanceof Promise?i.push(u.then(l=>{l.issues.length&&r.issues.push(...gt(c,l.issues)),r.value[c]=l.value})):(u.issues.length&&r.issues.push(...gt(c,u.issues)),r.value[c]=u.value)}let a;for(let c in n)s.has(c)||(a=a??[],a.push(c));a&&a.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:a})}else{r.value={};for(let s of Reflect.ownKeys(n)){if(s==="__proto__")continue;let a=t.keyType._zod.run({value:s,issues:[]},o);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){r.issues.push({origin:"record",code:"invalid_key",issues:a.issues.map(u=>It(u,o,Ue())),input:s,path:[s],inst:e}),r.value[a.value]=a.value;continue}let c=t.valueType._zod.run({value:n[s],issues:[]},o);c instanceof Promise?i.push(c.then(u=>{u.issues.length&&r.issues.push(...gt(s,u.issues)),r.value[a.value]=u.value})):(c.issues.length&&r.issues.push(...gt(s,c.issues)),r.value[a.value]=c.value)}}return i.length?Promise.all(i).then(()=>r):r}}),Mc=v("$ZodMap",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;let i=[];r.value=new Map;for(let[s,a]of n){let c=t.keyType._zod.run({value:s,issues:[]},o),u=t.valueType._zod.run({value:a,issues:[]},o);c instanceof Promise||u instanceof Promise?i.push(Promise.all([c,u]).then(([l,d])=>{Nv(l,d,r,s,n,e,o)})):Nv(c,u,r,s,n,e,o)}return i.length?Promise.all(i).then(()=>r):r}});function Nv(e,t,r,o,n,i,s){e.issues.length&&(Ii.has(typeof o)?r.issues.push(...gt(o,e.issues)):r.issues.push({origin:"map",code:"invalid_key",input:n,inst:i,issues:e.issues.map(a=>It(a,s,Ue()))})),t.issues.length&&(Ii.has(typeof o)?r.issues.push(...gt(o,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:i,key:o,issues:t.issues.map(a=>It(a,s,Ue()))})),r.value.set(e.value,t.value)}var Uc=v("$ZodSet",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;let i=[];r.value=new Set;for(let s of n){let a=t.valueType._zod.run({value:s,issues:[]},o);a instanceof Promise?i.push(a.then(c=>Ov(c,r))):Ov(a,r)}return i.length?Promise.all(i).then(()=>r):r}});function Ov(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var Lc=v("$ZodEnum",(e,t)=>{G.init(e,t);let r=Ti(t.entries);e._zod.values=new Set(r),e._zod.pattern=new RegExp(`^(${r.filter(o=>Ii.has(typeof o)).map(o=>typeof o=="string"?wr(o):o.toString()).join("|")})$`),e._zod.parse=(o,n)=>{let i=o.value;return e._zod.values.has(i)||o.issues.push({code:"invalid_value",values:r,input:i,inst:e}),o}}),Zc=v("$ZodLiteral",(e,t)=>{G.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?wr(r):r?r.toString():String(r)).join("|")})$`),e._zod.parse=(r,o)=>{let n=r.value;return e._zod.values.has(n)||r.issues.push({code:"invalid_value",values:t.values,input:n,inst:e}),r}}),Vc=v("$ZodFile",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),go=v("$ZodTransform",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=t.transform(r.value,r);if(o.async)return(n instanceof Promise?n:Promise.resolve(n)).then(s=>(r.value=s,r));if(n instanceof Promise)throw new ar;return r.value=n,r}}),Fc=v("$ZodOptional",(e,t)=>{G.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ve(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ve(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${zi(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>t.innerType._zod.optin==="optional"?t.innerType._zod.run(r,o):r.value===void 0?r:t.innerType._zod.run(r,o)}),Wc=v("$ZodNullable",(e,t)=>{G.init(e,t),ve(e._zod,"optin",()=>t.innerType._zod.optin),ve(e._zod,"optout",()=>t.innerType._zod.optout),ve(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${zi(r.source)}|null)$`):void 0}),ve(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:t.innerType._zod.run(r,o)}),Gc=v("$ZodDefault",(e,t)=>{G.init(e,t),e._zod.optin="optional",ve(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>Rv(i,t)):Rv(n,t)}});function Rv(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Kc=v("$ZodPrefault",(e,t)=>{G.init(e,t),e._zod.optin="optional",ve(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>(r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,o))}),Hc=v("$ZodNonOptional",(e,t)=>{G.init(e,t),ve(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>jv(i,e)):jv(n,e)}});function jv(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 Bc=v("$ZodSuccess",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),Jc=v("$ZodCatch",(e,t)=>{G.init(e,t),e._zod.optin="optional",ve(e._zod,"optout",()=>t.innerType._zod.optout),ve(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>It(s,o,Ue()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(i=>It(i,o,Ue()))},input:r.value}),r.issues=[]),r)}}),Qc=v("$ZodNaN",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),_o=v("$ZodPipe",(e,t)=>{G.init(e,t),ve(e._zod,"values",()=>t.in._zod.values),ve(e._zod,"optin",()=>t.in._zod.optin),ve(e._zod,"optout",()=>t.out._zod.optout),e._zod.parse=(r,o)=>{let n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>Av(i,t,o)):Av(n,t,o)}});function Av(e,t,r){return vn(e)?e:t.out._zod.run({value:e.value,issues:e.issues},r)}var Yc=v("$ZodReadonly",(e,t)=>{G.init(e,t),ve(e._zod,"propValues",()=>t.innerType._zod.propValues),ve(e._zod,"values",()=>t.innerType._zod.values),ve(e._zod,"optin",()=>t.innerType._zod.optin),ve(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(Dv):Dv(n)}});function Dv(e){return e.value=Object.freeze(e.value),e}var Xc=v("$ZodTemplateLiteral",(e,t)=>{G.init(e,t);let r=[];for(let o of t.parts)if(o instanceof G){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let n=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=n.startsWith("^")?1:0,s=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(i,s))}else if(o===null||np.has(typeof o))r.push(wr(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(o,n)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"template_literal",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:"template_literal",pattern:e._zod.pattern.source}),o)}),eu=v("$ZodPromise",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},o))}),tu=v("$ZodLazy",(e,t)=>{G.init(e,t),ve(e._zod,"innerType",()=>t.getter()),ve(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),ve(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),ve(e._zod,"optin",()=>e._zod.innerType._zod.optin),ve(e._zod,"optout",()=>e._zod.innerType._zod.optout),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o)}),ru=v("$ZodCustom",(e,t)=>{Ce.init(e,t),G.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=r=>{let o=r.value,n=t.fn(o);if(n instanceof Promise)return n.then(i=>Cv(i,r,o,e));Cv(n,r,o,e)}});function Cv(e,t,r,o){if(!e){let n={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(n.params=o._zod.def.params),t.issues.push(ap(n))}}var vo={};mn(vo,{ar:()=>Lv,az:()=>Zv,be:()=>Fv,ca:()=>Wv,cs:()=>Gv,de:()=>Kv,en:()=>nu,eo:()=>Hv,es:()=>Bv,fa:()=>Jv,fi:()=>Qv,fr:()=>Yv,frCA:()=>Xv,he:()=>ey,hu:()=>ty,id:()=>ry,it:()=>ny,ja:()=>oy,kh:()=>iy,ko:()=>sy,mk:()=>ay,ms:()=>cy,nl:()=>uy,no:()=>ly,ota:()=>dy,pl:()=>fy,ps:()=>py,pt:()=>my,ru:()=>gy,sl:()=>_y,sv:()=>vy,ta:()=>yy,th:()=>by,tr:()=>wy,ua:()=>$y,ur:()=>ky,vi:()=>xy,zhCN:()=>Sy,zhTW:()=>Ty});var KT=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${n.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${j(n.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${o[i.format]??n.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${n.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${x(n.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function Lv(){return{localeError:KT()}}var HT=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${n.expected}, daxil olan ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${j(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${o[i.format]??n.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${x(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function Zv(){return{localeError:HT()}}function Vv(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var BT=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u043B\u0456\u043A";case"object":{if(Array.isArray(n))return"\u043C\u0430\u0441\u0456\u045E";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${n.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${j(n.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let a=Number(n.maximum),c=Vv(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${n.maximum.toString()} ${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 ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let a=Number(n.minimum),c=Vv(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${n.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${o[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${x(n.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${n.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function Fv(){return{localeError:BT()}}var JT=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Tipus inv\xE0lid: s'esperava ${n.expected}, s'ha rebut ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${j(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${x(n.values," o ")}`;case"too_big":{let i=n.inclusive?"com a m\xE0xim":"menys de",s=t(n.origin);return s?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${i} ${n.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(n.origin);return s?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${i} ${n.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${o[i.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${x(n.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${n.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${n.origin}`;default:return"Entrada inv\xE0lida"}}};function Wv(){return{localeError:JT()}}var QT=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u010D\xEDslo";case"string":return"\u0159et\u011Bzec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(n))return"pole";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${n.expected}, obdr\u017Eeno ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${j(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${o[i.format]??n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${x(n.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${n.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${n.origin}`;default:return"Neplatn\xFD vstup"}}};function Gv(){return{localeError:QT()}}var YT=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"Zahl";case"object":{if(Array.isArray(n))return"Array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Ung\xFCltige Eingabe: erwartet ${n.expected}, erhalten ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${j(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ist`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ist`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${o[i.format]??n.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${x(n.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${n.origin}`;default:return"Ung\xFCltige Eingabe"}}};function Kv(){return{localeError:YT()}}var XT=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},eP=()=>{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"}};function t(o){return e[o]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return o=>{switch(o.code){case"invalid_type":return`Invalid input: expected ${o.expected}, received ${XT(o.input)}`;case"invalid_value":return o.values.length===1?`Invalid input: expected ${j(o.values[0])}`:`Invalid option: expected one of ${x(o.values,"|")}`;case"too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`Too big: expected ${o.origin??"value"} to have ${n}${o.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${n}${o.maximum.toString()}`}case"too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`Too small: expected ${o.origin} to have ${n}${o.minimum.toString()} ${i.unit}`:`Too small: expected ${o.origin} to be ${n}${o.minimum.toString()}`}case"invalid_format":{let n=o;return n.format==="starts_with"?`Invalid string: must start with "${n.prefix}"`:n.format==="ends_with"?`Invalid string: must end with "${n.suffix}"`:n.format==="includes"?`Invalid string: must include "${n.includes}"`:n.format==="regex"?`Invalid string: must match pattern ${n.pattern}`:`Invalid ${r[n.format]??o.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${o.divisor}`;case"unrecognized_keys":return`Unrecognized key${o.keys.length>1?"s":""}: ${x(o.keys,", ")}`;case"invalid_key":return`Invalid key in ${o.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${o.origin}`;default:return"Invalid input"}}};function nu(){return{localeError:eP()}}var tP=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombro";case"object":{if(Array.isArray(e))return"tabelo";if(e===null)return"senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},rP=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(o){return e[o]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return o=>{switch(o.code){case"invalid_type":return`Nevalida enigo: atendi\u011Dis ${o.expected}, ricevi\u011Dis ${tP(o.input)}`;case"invalid_value":return o.values.length===1?`Nevalida enigo: atendi\u011Dis ${j(o.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${x(o.values,"|")}`;case"too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${n}${o.maximum.toString()} ${i.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${n}${o.maximum.toString()}`}case"too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`Tro malgranda: atendi\u011Dis ke ${o.origin} havu ${n}${o.minimum.toString()} ${i.unit}`:`Tro malgranda: atendi\u011Dis ke ${o.origin} estu ${n}${o.minimum.toString()}`}case"invalid_format":{let n=o;return n.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${n.prefix}"`:n.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${n.suffix}"`:n.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${n.includes}"`:n.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${n.pattern}`:`Nevalida ${r[n.format]??o.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${o.divisor}`;case"unrecognized_keys":return`Nekonata${o.keys.length>1?"j":""} \u015Dlosilo${o.keys.length>1?"j":""}: ${x(o.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${o.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${o.origin}`;default:return"Nevalida enigo"}}};function Hv(){return{localeError:rP()}}var nP=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"n\xFAmero";case"object":{if(Array.isArray(n))return"arreglo";if(n===null)return"nulo";if(Object.getPrototypeOf(n)!==Object.prototype)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Entrada inv\xE1lida: se esperaba ${n.expected}, recibido ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${j(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Demasiado grande: se esperaba que ${n.origin??"valor"} tuviera ${i}${n.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${n.origin??"valor"} fuera ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Demasiado peque\xF1o: se esperaba que ${n.origin} tuviera ${i}${n.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${n.origin} fuera ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${o[i.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${x(n.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${n.origin}`;default:return"Entrada inv\xE1lida"}}};function Bv(){return{localeError:nP()}}var oP=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(n))return"\u0622\u0631\u0627\u06CC\u0647";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${n.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${r(n.input)} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;case"invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${j(n.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${x(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${o[i.format]??n.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${n.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${x(n.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${n.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function Jv(){return{localeError:oP()}}var iP=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${n.expected}, oli ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${j(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${i}${n.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${i}${n.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${o[i.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${x(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function Qv(){return{localeError:iP()}}var sP=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"nombre";case"object":{if(Array.isArray(n))return"tableau";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Entr\xE9e invalide : ${n.expected} attendu, ${r(n.input)} re\xE7u`;case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${j(n.values[0])} attendu`:`Option invalide : une valeur parmi ${x(n.values,"|")} attendue`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Trop grand : ${n.origin??"valeur"} doit ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n.origin??"valeur"} doit \xEAtre ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Trop petit : ${n.origin} doit ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Trop petit : ${n.origin} doit \xEAtre ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${o[i.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${x(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function Yv(){return{localeError:sP()}}var aP=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Entr\xE9e invalide : attendu ${n.expected}, re\xE7u ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${j(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u2264":"<",s=t(n.origin);return s?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${i}${n.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"\u2265":">",s=t(n.origin);return s?`Trop petit : attendu que ${n.origin} ait ${i}${n.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${n.origin} soit ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${o[i.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${x(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function Xv(){return{localeError:aP()}}var cP=()=>{let e={string:{unit:"\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u05E7\u05DC\u05D8",email:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",url:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",emoji:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",date:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",time:"\u05D6\u05DE\u05DF ISO",duration:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",ipv4:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",ipv6:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",cidrv4:"\u05D8\u05D5\u05D5\u05D7 IPv4",cidrv6:"\u05D8\u05D5\u05D5\u05D7 IPv6",base64:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",base64url:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",json_string:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",e164:"\u05DE\u05E1\u05E4\u05E8 E.164",jwt:"JWT",template_literal:"\u05E7\u05DC\u05D8"};return n=>{switch(n.code){case"invalid_type":return`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${n.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${j(n.values[0])}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05D0\u05D7\u05EA \u05DE\u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${n.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.maximum.toString()} ${s.unit??"elements"}`:`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${n.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${n.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.minimum.toString()} ${s.unit}`:`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${n.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1"${i.prefix}"`:i.format==="ends_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${i.suffix}"`:i.format==="includes"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${i.includes}"`:i.format==="regex"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${i.pattern}`:`${o[i.format]??n.format} \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`}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 ${n.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${n.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${n.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${x(n.keys,", ")}`;case"invalid_key":return`\u05DE\u05E4\u05EA\u05D7 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n.origin}`;case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n.origin}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function ey(){return{localeError:cP()}}var uP=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"sz\xE1m";case"object":{if(Array.isArray(n))return"t\xF6mb";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${n.expected}, a kapott \xE9rt\xE9k ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${j(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${n.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${i}${n.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${o[i.format]??n.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${x(n.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${n.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function ty(){return{localeError:uP()}}var lP=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Input tidak valid: diharapkan ${n.expected}, diterima ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${j(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${i}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: diharapkan ${n.origin} memiliki ${i}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${o[i.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${x(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};function ry(){return{localeError:lP()}}var dP=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"numero";case"object":{if(Array.isArray(n))return"vettore";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Input non valido: atteso ${n.expected}, ricevuto ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input non valido: atteso ${j(n.values[0])}`:`Opzione non valida: atteso uno tra ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Troppo grande: ${n.origin??"valore"} deve avere ${i}${n.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Troppo piccolo: ${n.origin} deve avere ${i}${n.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${n.origin} deve essere ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Invalid ${o[i.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${x(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};function ny(){return{localeError:dP()}}var pP=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u6570\u5024";case"object":{if(Array.isArray(n))return"\u914D\u5217";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\u7121\u52B9\u306A\u5165\u529B: ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${r(n.input)}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;case"invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${j(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${x(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=t(n.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${s.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=t(n.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${s.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${o[i.format]??n.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${n.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${n.keys.length>1?"\u7FA4":""}: ${x(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function oy(){return{localeError:pP()}}var fP=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"\u1798\u17B7\u1793\u1798\u17C2\u1793\u1787\u17B6\u179B\u17C1\u1781 (NaN)":"\u179B\u17C1\u1781";case"object":{if(Array.isArray(n))return"\u17A2\u17B6\u179A\u17C1 (Array)";if(n===null)return"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${j(n.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${o[i.format]??n.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${n.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${x(n.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function iy(){return{localeError:fP()}}var mP=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${r(n.input)}\uC785\uB2C8\uB2E4`;case"invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${j(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${x(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(n.origin),c=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${c} ${i}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${i}${s}`}case"too_small":{let i=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(n.origin),c=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${c} ${i}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${i}${s}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${o[i.format]??n.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${x(n.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function sy(){return{localeError:mP()}}var hP=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u0431\u0440\u043E\u0458";case"object":{if(Array.isArray(n))return"\u043D\u0438\u0437\u0430";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${j(n.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${o[i.format]??n.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${x(n.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${n.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function ay(){return{localeError:hP()}}var gP=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"nombor";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Input tidak sah: dijangka ${n.expected}, diterima ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${j(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: dijangka ${n.origin??"nilai"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: dijangka ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${o[i.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${x(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};function cy(){return{localeError:gP()}}var _P=()=>{let e={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"getal";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Ongeldige invoer: verwacht ${n.expected}, ontving ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${j(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Te lang: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} ${s.unit??"elementen"} bevat`:`Te lang: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} is`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Te kort: verwacht dat ${n.origin} ${i}${n.minimum.toString()} ${s.unit} bevat`:`Te kort: verwacht dat ${n.origin} ${i}${n.minimum.toString()} is`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${o[i.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${x(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};function uy(){return{localeError:_P()}}var vP=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"tall";case"object":{if(Array.isArray(n))return"liste";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Ugyldig input: forventet ${n.expected}, fikk ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${j(n.values[0])}`:`Ugyldig valg: forventet en av ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${o[i.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${x(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};function ly(){return{localeError:vP()}}var yP=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"numara";case"object":{if(Array.isArray(n))return"saf";if(n===null)return"gayb";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`F\xE2sit giren: umulan ${n.expected}, al\u0131nan ${r(n.input)}`;case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${j(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=n;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${o[i.format]??n.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${x(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function dy(){return{localeError:yP()}}var bP=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(n))return"\u0627\u0631\u06D0";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${n.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${r(n.input)} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;case"invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${j(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${x(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0648\u064A`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${o[i.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${x(n.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${n.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function py(){return{localeError:bP()}}var wP=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"liczba";case"object":{if(Array.isArray(n))return"tablica";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${n.expected}, otrzymano ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${j(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${o[i.format]??n.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${x(n.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${n.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function fy(){return{localeError:wP()}}var $P=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"n\xFAmero";case"object":{if(Array.isArray(n))return"array";if(n===null)return"nulo";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Tipo inv\xE1lido: esperado ${n.expected}, recebido ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${j(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${i}${n.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Muito pequeno: esperado que ${n.origin} tivesse ${i}${n.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${o[i.format]??n.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${x(n.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${n.origin}`;default:return"Campo inv\xE1lido"}}};function my(){return{localeError:$P()}}function hy(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var kP=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(n))return"\u043C\u0430\u0441\u0441\u0438\u0432";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${j(n.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let a=Number(n.maximum),c=hy(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.maximum.toString()} ${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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let a=Number(n.minimum),c=hy(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.minimum.toString()} ${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 ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${o[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${x(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function gy(){return{localeError:kP()}}var xP=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u0161tevilo";case"object":{if(Array.isArray(n))return"tabela";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Neveljaven vnos: pri\u010Dakovano ${n.expected}, prejeto ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${j(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${i}${n.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${i}${n.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${o[i.format]??n.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${x(n.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};function _y(){return{localeError:xP()}}var SP=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"antal";case"object":{if(Array.isArray(n))return"lista";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Ogiltig inmatning: f\xF6rv\xE4ntat ${n.expected}, fick ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${j(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${o[i.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${x(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function vy(){return{localeError:SP()}}var TP=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"\u0B8E\u0BA3\u0BCD \u0B85\u0BB2\u0BCD\u0BB2\u0BBE\u0BA4\u0BA4\u0BC1":"\u0B8E\u0BA3\u0BCD";case"object":{if(Array.isArray(n))return"\u0B85\u0BA3\u0BBF";if(n===null)return"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${j(n.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${x(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${o[i.format]??n.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${x(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function yy(){return{localeError:TP()}}var PP=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 (NaN)":"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02";case"object":{if(Array.isArray(n))return"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)";if(n===null)return"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\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 ${n.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${j(n.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${o[i.format]??n.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${n.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${x(n.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function by(){return{localeError:PP()}}var zP=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},IP=()=>{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(o){return e[o]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"};return o=>{switch(o.code){case"invalid_type":return`Ge\xE7ersiz de\u011Fer: beklenen ${o.expected}, al\u0131nan ${zP(o.input)}`;case"invalid_value":return o.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${j(o.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${x(o.values,"|")}`;case"too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${n}${o.maximum.toString()} ${i.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${n}${o.maximum.toString()}`}case"too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${n}${o.minimum.toString()} ${i.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${n}${o.minimum.toString()}`}case"invalid_format":{let n=o;return n.format==="starts_with"?`Ge\xE7ersiz metin: "${n.prefix}" ile ba\u015Flamal\u0131`:n.format==="ends_with"?`Ge\xE7ersiz metin: "${n.suffix}" ile bitmeli`:n.format==="includes"?`Ge\xE7ersiz metin: "${n.includes}" i\xE7ermeli`:n.format==="regex"?`Ge\xE7ersiz metin: ${n.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[n.format]??o.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${o.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${o.keys.length>1?"lar":""}: ${x(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${o.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function wy(){return{localeError:IP()}}var EP=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(n))return"\u043C\u0430\u0441\u0438\u0432";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${n.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${j(n.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} \u0431\u0443\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${o[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${x(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${n.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function $y(){return{localeError:EP()}}var NP=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u0646\u0645\u0628\u0631";case"object":{if(Array.isArray(n))return"\u0622\u0631\u06D2";if(n===null)return"\u0646\u0644";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${n.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${r(n.input)} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;case"invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${j(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${x(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${i}${n.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${i}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${o[i.format]??n.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${n.keys.length>1?"\u0632":""}: ${x(n.keys,"\u060C ")}`;case"invalid_key":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function ky(){return{localeError:NP()}}var OP=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"s\u1ED1";case"object":{if(Array.isArray(n))return"m\u1EA3ng";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${n.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${j(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${o[i.format]??n.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${n.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${x(n.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function xy(){return{localeError:OP()}}var RP=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"\u975E\u6570\u5B57(NaN)":"\u6570\u5B57";case"object":{if(Array.isArray(n))return"\u6570\u7EC4";if(n===null)return"\u7A7A\u503C(null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${j(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${o[i.format]??n.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${x(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function Sy(){return{localeError:RP()}}var jP=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${n.expected}\uFF0C\u4F46\u6536\u5230 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${j(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${o[i.format]??n.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${x(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function Ty(){return{localeError:jP()}}var ou=Symbol("ZodOutput"),iu=Symbol("ZodInput"),yo=class{constructor(){this._map=new Map,this._idmap=new Map}add(t,...r){let o=r[0];if(this._map.set(t,o),o&&typeof o=="object"&&"id"in o){if(this._idmap.has(o.id))throw new Error(`ID ${o.id} already exists in the registry`);this._idmap.set(o.id,t)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let o={...this.get(r)??{}};return delete o.id,{...o,...this._map.get(t)}}return this._map.get(t)}has(t){return this._map.has(t)}};function qi(){return new yo}var Gt=qi();function su(e,t){return new e({type:"string",...N(t)})}function uf(e,t){return new e({type:"string",coerce:!0,...N(t)})}function Mi(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...N(t)})}function bo(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...N(t)})}function Ui(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...N(t)})}function Li(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...N(t)})}function Zi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...N(t)})}function Vi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...N(t)})}function Fi(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...N(t)})}function Wi(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...N(t)})}function Gi(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...N(t)})}function Ki(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...N(t)})}function Hi(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...N(t)})}function Bi(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...N(t)})}function Ji(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...N(t)})}function Qi(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...N(t)})}function Yi(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...N(t)})}function Xi(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...N(t)})}function es(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...N(t)})}function ts(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...N(t)})}function rs(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...N(t)})}function ns(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...N(t)})}function os(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...N(t)})}function is(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...N(t)})}var au={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function lf(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...N(t)})}function df(e,t){return new e({type:"string",format:"date",check:"string_format",...N(t)})}function pf(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...N(t)})}function ff(e,t){return new e({type:"string",format:"duration",check:"string_format",...N(t)})}function cu(e,t){return new e({type:"number",checks:[],...N(t)})}function mf(e,t){return new e({type:"number",coerce:!0,checks:[],...N(t)})}function uu(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...N(t)})}function lu(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...N(t)})}function du(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...N(t)})}function pu(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...N(t)})}function fu(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...N(t)})}function mu(e,t){return new e({type:"boolean",...N(t)})}function hf(e,t){return new e({type:"boolean",coerce:!0,...N(t)})}function hu(e,t){return new e({type:"bigint",...N(t)})}function gf(e,t){return new e({type:"bigint",coerce:!0,...N(t)})}function gu(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...N(t)})}function _u(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...N(t)})}function vu(e,t){return new e({type:"symbol",...N(t)})}function yu(e,t){return new e({type:"undefined",...N(t)})}function bu(e,t){return new e({type:"null",...N(t)})}function wu(e){return new e({type:"any"})}function kn(e){return new e({type:"unknown"})}function $u(e,t){return new e({type:"never",...N(t)})}function ku(e,t){return new e({type:"void",...N(t)})}function xu(e,t){return new e({type:"date",...N(t)})}function _f(e,t){return new e({type:"date",coerce:!0,...N(t)})}function Su(e,t){return new e({type:"nan",...N(t)})}function $r(e,t){return new nc({check:"less_than",...N(t),value:e,inclusive:!1})}function Ot(e,t){return new nc({check:"less_than",...N(t),value:e,inclusive:!0})}function kr(e,t){return new oc({check:"greater_than",...N(t),value:e,inclusive:!1})}function _t(e,t){return new oc({check:"greater_than",...N(t),value:e,inclusive:!0})}function vf(e){return kr(0,e)}function yf(e){return $r(0,e)}function bf(e){return Ot(0,e)}function wf(e){return _t(0,e)}function xn(e,t){return new Cp({check:"multiple_of",...N(t),value:e})}function wo(e,t){return new Up({check:"max_size",...N(t),maximum:e})}function Sn(e,t){return new Lp({check:"min_size",...N(t),minimum:e})}function ss(e,t){return new Zp({check:"size_equals",...N(t),size:e})}function $o(e,t){return new Vp({check:"max_length",...N(t),maximum:e})}function Fr(e,t){return new Fp({check:"min_length",...N(t),minimum:e})}function ko(e,t){return new Wp({check:"length_equals",...N(t),length:e})}function as(e,t){return new Gp({check:"string_format",format:"regex",...N(t),pattern:e})}function cs(e){return new Kp({check:"string_format",format:"lowercase",...N(e)})}function us(e){return new Hp({check:"string_format",format:"uppercase",...N(e)})}function ls(e,t){return new Bp({check:"string_format",format:"includes",...N(t),includes:e})}function ds(e,t){return new Jp({check:"string_format",format:"starts_with",...N(t),prefix:e})}function ps(e,t){return new Qp({check:"string_format",format:"ends_with",...N(t),suffix:e})}function $f(e,t,r){return new Yp({check:"property",property:e,schema:t,...N(r)})}function fs(e,t){return new Xp({check:"mime_type",mime:e,...N(t)})}function xr(e){return new ef({check:"overwrite",tx:e})}function ms(e){return xr(t=>t.normalize(e))}function hs(){return xr(e=>e.trim())}function gs(){return xr(e=>e.toLowerCase())}function _s(){return xr(e=>e.toUpperCase())}function vs(e,t,r){return new e({type:"array",element:t,...N(r)})}function AP(e,t,r){return new e({type:"union",options:t,...N(r)})}function DP(e,t,r,o){return new e({type:"union",options:r,discriminator:t,...N(o)})}function CP(e,t,r){return new e({type:"intersection",left:t,right:r})}function kf(e,t,r,o){let n=r instanceof G,i=n?o:r,s=n?r:null;return new e({type:"tuple",items:t,rest:s,...N(i)})}function qP(e,t,r,o){return new e({type:"record",keyType:t,valueType:r,...N(o)})}function MP(e,t,r,o){return new e({type:"map",keyType:t,valueType:r,...N(o)})}function UP(e,t,r){return new e({type:"set",valueType:t,...N(r)})}function LP(e,t,r){let o=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:o,...N(r)})}function ZP(e,t,r){return new e({type:"enum",entries:t,...N(r)})}function VP(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...N(r)})}function Tu(e,t){return new e({type:"file",...N(t)})}function FP(e,t){return new e({type:"transform",transform:t})}function WP(e,t){return new e({type:"optional",innerType:t})}function GP(e,t){return new e({type:"nullable",innerType:t})}function KP(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():r}})}function HP(e,t,r){return new e({type:"nonoptional",innerType:t,...N(r)})}function BP(e,t){return new e({type:"success",innerType:t})}function JP(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function QP(e,t,r){return new e({type:"pipe",in:t,out:r})}function YP(e,t){return new e({type:"readonly",innerType:t})}function XP(e,t,r){return new e({type:"template_literal",parts:t,...N(r)})}function ez(e,t){return new e({type:"lazy",getter:t})}function tz(e,t){return new e({type:"promise",innerType:t})}function Pu(e,t,r){let o=N(r);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function zu(e,t,r){return new e({type:"custom",check:"custom",fn:t,...N(r)})}function Iu(e,t){let r=N(t),o=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(o=o.map(p=>typeof p=="string"?p.toLowerCase():p),n=n.map(p=>typeof p=="string"?p.toLowerCase():p));let i=new Set(o),s=new Set(n),a=e.Pipe??_o,c=e.Boolean??mo,u=e.String??Zr,l=e.Transform??go,d=new l({type:"transform",transform:(p,f)=>{let _=p;return r.case!=="sensitive"&&(_=_.toLowerCase()),i.has(_)?!0:s.has(_)?!1:(f.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:f.value,inst:d}),{})},error:r.error}),h=new a({type:"pipe",in:new u({type:"string",error:r.error}),out:d,error:r.error});return new a({type:"pipe",in:h,out:new c({type:"boolean",error:r.error}),error:r.error})}function Eu(e,t,r,o={}){let n=N(o),i={...N(o),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:a=>r.test(a),...n};return r instanceof RegExp&&(i.pattern=r),new e(i)}var Nu=class{constructor(t){this._def=t,this.def=t}implement(t){if(typeof t!="function")throw new Error("implement() must be called with a function");let r=((...o)=>{let n=this._def.input?yn(this._def.input,o,void 0,{callee:r}):o;if(!Array.isArray(n))throw new Error("Invalid arguments schema: not an array or tuple schema.");let i=t(...n);return this._def.output?yn(this._def.output,i,void 0,{callee:r}):i});return r}implementAsync(t){if(typeof t!="function")throw new Error("implement() must be called with a function");let r=(async(...o)=>{let n=this._def.input?await bn(this._def.input,o,void 0,{callee:r}):o;if(!Array.isArray(n))throw new Error("Invalid arguments schema: not an array or tuple schema.");let i=await t(...n);return this._def.output?bn(this._def.output,i,void 0,{callee:r}):i});return r}input(...t){let r=this.constructor;return Array.isArray(t[0])?new r({type:"function",input:new Vr({type:"tuple",items:t[0],rest:t[1]}),output:this._def.output}):new r({type:"function",input:t[0],output:this._def.output})}output(t){let r=this.constructor;return new r({type:"function",input:this._def.input,output:t})}};function Ou(e){return new Nu({type:"function",input:Array.isArray(e?.input)?kf(Vr,e?.input):e?.input??vs(ho,kn($n)),output:e?.output??kn($n)})}var ys=class{constructor(t){this.counter=0,this.metadataRegistry=t?.metadata??Gt,this.target=t?.target??"draft-2020-12",this.unrepresentable=t?.unrepresentable??"throw",this.override=t?.override??(()=>{}),this.io=t?.io??"output",this.seen=new Map}process(t,r={path:[],schemaPath:[]}){var o;let n=t._zod.def,i={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},s=this.seen.get(t);if(s)return s.count++,r.schemaPath.includes(t)&&(s.cycle=r.path),s.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(t,a);let c=t._zod.toJSONSchema?.();if(c)a.schema=c;else{let d={...r,schemaPath:[...r.schemaPath,t],path:r.path},h=t._zod.parent;if(h)a.ref=h,this.process(h,d),this.seen.get(h).isParent=!0;else{let m=a.schema;switch(n.type){case"string":{let p=m;p.type="string";let{minimum:f,maximum:_,format:y,patterns:$,contentEncoding:k}=t._zod.bag;if(typeof f=="number"&&(p.minLength=f),typeof _=="number"&&(p.maxLength=_),y&&(p.format=i[y]??y,p.format===""&&delete p.format),k&&(p.contentEncoding=k),$&&$.size>0){let I=[...$];I.length===1?p.pattern=I[0].source:I.length>1&&(a.schema.allOf=[...I.map(P=>({...this.target==="draft-7"?{type:"string"}:{},pattern:P.source}))])}break}case"number":{let p=m,{minimum:f,maximum:_,format:y,multipleOf:$,exclusiveMaximum:k,exclusiveMinimum:I}=t._zod.bag;typeof y=="string"&&y.includes("int")?p.type="integer":p.type="number",typeof I=="number"&&(p.exclusiveMinimum=I),typeof f=="number"&&(p.minimum=f,typeof I=="number"&&(I>=f?delete p.minimum:delete p.exclusiveMinimum)),typeof k=="number"&&(p.exclusiveMaximum=k),typeof _=="number"&&(p.maximum=_,typeof k=="number"&&(k<=_?delete p.maximum:delete p.exclusiveMaximum)),typeof $=="number"&&(p.multipleOf=$);break}case"boolean":{let p=m;p.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{m.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{m.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{let p=m,{minimum:f,maximum:_}=t._zod.bag;typeof f=="number"&&(p.minItems=f),typeof _=="number"&&(p.maxItems=_),p.type="array",p.items=this.process(n.element,{...d,path:[...d.path,"items"]});break}case"object":{let p=m;p.type="object",p.properties={};let f=n.shape;for(let $ in f)p.properties[$]=this.process(f[$],{...d,path:[...d.path,"properties",$]});let _=new Set(Object.keys(f)),y=new Set([..._].filter($=>{let k=n.shape[$]._zod;return this.io==="input"?k.optin===void 0:k.optout===void 0}));y.size>0&&(p.required=Array.from(y)),n.catchall?._zod.def.type==="never"?p.additionalProperties=!1:n.catchall?n.catchall&&(p.additionalProperties=this.process(n.catchall,{...d,path:[...d.path,"additionalProperties"]})):this.io==="output"&&(p.additionalProperties=!1);break}case"union":{let p=m;p.anyOf=n.options.map((f,_)=>this.process(f,{...d,path:[...d.path,"anyOf",_]}));break}case"intersection":{let p=m,f=this.process(n.left,{...d,path:[...d.path,"allOf",0]}),_=this.process(n.right,{...d,path:[...d.path,"allOf",1]}),y=k=>"allOf"in k&&Object.keys(k).length===1,$=[...y(f)?f.allOf:[f],...y(_)?_.allOf:[_]];p.allOf=$;break}case"tuple":{let p=m;p.type="array";let f=n.items.map(($,k)=>this.process($,{...d,path:[...d.path,"prefixItems",k]}));if(this.target==="draft-2020-12"?p.prefixItems=f:p.items=f,n.rest){let $=this.process(n.rest,{...d,path:[...d.path,"items"]});this.target==="draft-2020-12"?p.items=$:p.additionalItems=$}n.rest&&(p.items=this.process(n.rest,{...d,path:[...d.path,"items"]}));let{minimum:_,maximum:y}=t._zod.bag;typeof _=="number"&&(p.minItems=_),typeof y=="number"&&(p.maxItems=y);break}case"record":{let p=m;p.type="object",p.propertyNames=this.process(n.keyType,{...d,path:[...d.path,"propertyNames"]}),p.additionalProperties=this.process(n.valueType,{...d,path:[...d.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{let p=m,f=Ti(n.entries);f.every(_=>typeof _=="number")&&(p.type="number"),f.every(_=>typeof _=="string")&&(p.type="string"),p.enum=f;break}case"literal":{let p=m,f=[];for(let _ of n.values)if(_===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof _=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");f.push(Number(_))}else f.push(_);if(f.length!==0)if(f.length===1){let _=f[0];p.type=_===null?"null":typeof _,p.const=_}else f.every(_=>typeof _=="number")&&(p.type="number"),f.every(_=>typeof _=="string")&&(p.type="string"),f.every(_=>typeof _=="boolean")&&(p.type="string"),f.every(_=>_===null)&&(p.type="null"),p.enum=f;break}case"file":{let p=m,f={type:"string",format:"binary",contentEncoding:"binary"},{minimum:_,maximum:y,mime:$}=t._zod.bag;_!==void 0&&(f.minLength=_),y!==void 0&&(f.maxLength=y),$?$.length===1?(f.contentMediaType=$[0],Object.assign(p,f)):p.anyOf=$.map(k=>({...f,contentMediaType:k})):Object.assign(p,f);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let p=this.process(n.innerType,d);m.anyOf=[p,{type:"null"}];break}case"nonoptional":{this.process(n.innerType,d),a.ref=n.innerType;break}case"success":{let p=m;p.type="boolean";break}case"default":{this.process(n.innerType,d),a.ref=n.innerType,m.default=JSON.parse(JSON.stringify(n.defaultValue));break}case"prefault":{this.process(n.innerType,d),a.ref=n.innerType,this.io==="input"&&(m._prefault=JSON.parse(JSON.stringify(n.defaultValue)));break}case"catch":{this.process(n.innerType,d),a.ref=n.innerType;let p;try{p=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}m.default=p;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let p=m,f=t._zod.pattern;if(!f)throw new Error("Pattern not found in template literal");p.type="string",p.pattern=f.source;break}case"pipe":{let p=this.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;this.process(p,d),a.ref=p;break}case"readonly":{this.process(n.innerType,d),a.ref=n.innerType,m.readOnly=!0;break}case"promise":{this.process(n.innerType,d),a.ref=n.innerType;break}case"optional":{this.process(n.innerType,d),a.ref=n.innerType;break}case"lazy":{let p=t._zod.innerType;this.process(p,d),a.ref=p;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}default:}}}let u=this.metadataRegistry.get(t);return u&&Object.assign(a.schema,u),this.io==="input"&&Fe(t)&&(delete a.schema.examples,delete a.schema.default),this.io==="input"&&a.schema._prefault&&((o=a.schema).default??(o.default=a.schema._prefault)),delete a.schema._prefault,this.seen.get(t).schema}emit(t,r){let o={cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0},n=this.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=l=>{let d=this.target==="draft-2020-12"?"$defs":"definitions";if(o.external){let f=o.external.registry.get(l[0])?.id,_=o.external.uri??($=>$);if(f)return{ref:_(f)};let y=l[1].defId??l[1].schema.id??`schema${this.counter++}`;return l[1].defId=y,{defId:y,ref:`${_("__shared")}#/${d}/${y}`}}if(l[1]===n)return{ref:"#"};let m=`#/${d}/`,p=l[1].schema.id??`__schema${this.counter++}`;return{defId:p,ref:m+p}},s=l=>{if(l[1].schema.$ref)return;let d=l[1],{ref:h,defId:m}=i(l);d.def={...d.schema},m&&(d.defId=m);let p=d.schema;for(let f in p)delete p[f];p.$ref=h};if(o.cycles==="throw")for(let l of this.seen.entries()){let d=l[1];if(d.cycle)throw new Error(`Cycle detected: #/${d.cycle?.join("/")}/<root>
42
+ })));`),h.write(`newResult[${_n($)}] = ${k}.value`)}h.write("payload.value = newResult;"),h.write("return payload;");let y=h.compile();return($,k)=>y(d,$,k)},n,i=ao,s=!Ti.jitless,c=s&&np.value,u=t.catchall,l;e._zod.parse=(d,h)=>{l??(l=r.value);let m=d.value;if(!i(m))return d.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),d;let p=[];if(s&&c&&h?.async===!1&&h.jitless!==!0)n||(n=o(t.shape)),d=n(d,h);else{d.value={};let k=l.shape;for(let N of l.keys){let P=k[N],ze=P._zod.run({value:m[N],issues:[]},h),Me=P._zod.optin==="optional"&&P._zod.optout==="optional";ze instanceof Promise?p.push(ze.then(ir=>Me?Ev(ir,d,N,m):ac(ir,d,N))):Me?Ev(ze,d,N,m):ac(ze,d,N)}}if(!u)return p.length?Promise.all(p).then(()=>d):d;let f=[],_=l.keySet,y=u._zod,$=y.def.type;for(let k of Object.keys(m)){if(_.has(k))continue;if($==="never"){f.push(k);continue}let N=y.run({value:m[k],issues:[]},h);N instanceof Promise?p.push(N.then(P=>ac(P,d,k))):ac(N,d,k)}return f.length&&d.issues.push({code:"unrecognized_keys",keys:f,input:m,inst:e}),p.length?Promise.all(p).then(()=>d):d}});function Iv(e,t,r,o){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;return t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(n=>n.issues.map(i=>Et(i,o,Le())))}),t}var Mi=v("$ZodUnion",(e,t)=>{G.init(e,t),ve(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),ve(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),ve(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),ve(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){let r=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${r.map(o=>Ii(o.source)).join("|")})$`)}}),e._zod.parse=(r,o)=>{let n=!1,i=[];for(let s of t.options){let a=s._zod.run({value:r.value,issues:[]},o);if(a instanceof Promise)i.push(a),n=!0;else{if(a.issues.length===0)return a;i.push(a)}}return n?Promise.all(i).then(s=>Iv(s,r,e,o)):Iv(i,r,e,o)}}),qc=v("$ZodDiscriminatedUnion",(e,t)=>{Mi.init(e,t);let r=e._zod.parse;ve(e._zod,"propValues",()=>{let n={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[a,c]of Object.entries(s)){n[a]||(n[a]=new Set);for(let u of c)n[a].add(u)}}return n});let o=Ei(()=>{let n=t.options,i=new Map;for(let s of n){let a=s._zod.propValues[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let c of a){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,s)}}return i});e._zod.parse=(n,i)=>{let s=n.value;if(!ao(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),n;let a=o.value.get(s?.[t.discriminator]);return a?a._zod.run(n,i):t.unionFallback?r(n,i):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:s,path:[t.discriminator],inst:e}),n)}}),Mc=v("$ZodIntersection",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=r.value,i=t.left._zod.run({value:n,issues:[]},o),s=t.right._zod.run({value:n,issues:[]},o);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,u])=>Nv(r,c,u)):Nv(r,i,s)}});function nf(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(co(e)&&co(t)){let r=Object.keys(t),o=Object.keys(e).filter(i=>r.indexOf(i)!==-1),n={...e,...t};for(let i of o){let s=nf(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};n[i]=s.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let o=0;o<e.length;o++){let n=e[o],i=t[o],s=nf(n,i);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Nv(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),vn(e))return e;let o=nf(t.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var Vr=v("$ZodTuple",(e,t)=>{G.init(e,t);let r=t.items,o=r.length-[...r].reverse().findIndex(n=>n._zod.optin!=="optional");e._zod.parse=(n,i)=>{let s=n.value;if(!Array.isArray(s))return n.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=[];let a=[];if(!t.rest){let u=s.length>r.length,l=s.length<o-1;if(u||l)return n.issues.push({input:s,inst:e,origin:"array",...u?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length}}),n}let c=-1;for(let u of r){if(c++,c>=s.length&&c>=o)continue;let l=u._zod.run({value:s[c],issues:[]},i);l instanceof Promise?a.push(l.then(d=>cc(d,n,c))):cc(l,n,c)}if(t.rest){let u=s.slice(r.length);for(let l of u){c++;let d=t.rest._zod.run({value:l,issues:[]},i);d instanceof Promise?a.push(d.then(h=>cc(h,n,c))):cc(d,n,c)}}return a.length?Promise.all(a).then(()=>n):n}});function cc(e,t,r){e.issues.length&&t.issues.push(...gt(r,e.issues)),t.value[r]=e.value}var Uc=v("$ZodRecord",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!co(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;let i=[];if(t.keyType._zod.values){let s=t.keyType._zod.values;r.value={};for(let c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let u=t.valueType._zod.run({value:n[c],issues:[]},o);u instanceof Promise?i.push(u.then(l=>{l.issues.length&&r.issues.push(...gt(c,l.issues)),r.value[c]=l.value})):(u.issues.length&&r.issues.push(...gt(c,u.issues)),r.value[c]=u.value)}let a;for(let c in n)s.has(c)||(a=a??[],a.push(c));a&&a.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:a})}else{r.value={};for(let s of Reflect.ownKeys(n)){if(s==="__proto__")continue;let a=t.keyType._zod.run({value:s,issues:[]},o);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){r.issues.push({origin:"record",code:"invalid_key",issues:a.issues.map(u=>Et(u,o,Le())),input:s,path:[s],inst:e}),r.value[a.value]=a.value;continue}let c=t.valueType._zod.run({value:n[s],issues:[]},o);c instanceof Promise?i.push(c.then(u=>{u.issues.length&&r.issues.push(...gt(s,u.issues)),r.value[a.value]=u.value})):(c.issues.length&&r.issues.push(...gt(s,c.issues)),r.value[a.value]=c.value)}}return i.length?Promise.all(i).then(()=>r):r}}),Lc=v("$ZodMap",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;let i=[];r.value=new Map;for(let[s,a]of n){let c=t.keyType._zod.run({value:s,issues:[]},o),u=t.valueType._zod.run({value:a,issues:[]},o);c instanceof Promise||u instanceof Promise?i.push(Promise.all([c,u]).then(([l,d])=>{Ov(l,d,r,s,n,e,o)})):Ov(c,u,r,s,n,e,o)}return i.length?Promise.all(i).then(()=>r):r}});function Ov(e,t,r,o,n,i,s){e.issues.length&&(Ni.has(typeof o)?r.issues.push(...gt(o,e.issues)):r.issues.push({origin:"map",code:"invalid_key",input:n,inst:i,issues:e.issues.map(a=>Et(a,s,Le()))})),t.issues.length&&(Ni.has(typeof o)?r.issues.push(...gt(o,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:i,key:o,issues:t.issues.map(a=>Et(a,s,Le()))})),r.value.set(e.value,t.value)}var Zc=v("$ZodSet",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;let i=[];r.value=new Set;for(let s of n){let a=t.valueType._zod.run({value:s,issues:[]},o);a instanceof Promise?i.push(a.then(c=>Rv(c,r))):Rv(a,r)}return i.length?Promise.all(i).then(()=>r):r}});function Rv(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var Vc=v("$ZodEnum",(e,t)=>{G.init(e,t);let r=zi(t.entries);e._zod.values=new Set(r),e._zod.pattern=new RegExp(`^(${r.filter(o=>Ni.has(typeof o)).map(o=>typeof o=="string"?wr(o):o.toString()).join("|")})$`),e._zod.parse=(o,n)=>{let i=o.value;return e._zod.values.has(i)||o.issues.push({code:"invalid_value",values:r,input:i,inst:e}),o}}),Fc=v("$ZodLiteral",(e,t)=>{G.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?wr(r):r?r.toString():String(r)).join("|")})$`),e._zod.parse=(r,o)=>{let n=r.value;return e._zod.values.has(n)||r.issues.push({code:"invalid_value",values:t.values,input:n,inst:e}),r}}),Wc=v("$ZodFile",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),go=v("$ZodTransform",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=t.transform(r.value,r);if(o.async)return(n instanceof Promise?n:Promise.resolve(n)).then(s=>(r.value=s,r));if(n instanceof Promise)throw new ar;return r.value=n,r}}),Gc=v("$ZodOptional",(e,t)=>{G.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ve(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ve(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ii(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>t.innerType._zod.optin==="optional"?t.innerType._zod.run(r,o):r.value===void 0?r:t.innerType._zod.run(r,o)}),Kc=v("$ZodNullable",(e,t)=>{G.init(e,t),ve(e._zod,"optin",()=>t.innerType._zod.optin),ve(e._zod,"optout",()=>t.innerType._zod.optout),ve(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ii(r.source)}|null)$`):void 0}),ve(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:t.innerType._zod.run(r,o)}),Bc=v("$ZodDefault",(e,t)=>{G.init(e,t),e._zod.optin="optional",ve(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>jv(i,t)):jv(n,t)}});function jv(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Hc=v("$ZodPrefault",(e,t)=>{G.init(e,t),e._zod.optin="optional",ve(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>(r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,o))}),Jc=v("$ZodNonOptional",(e,t)=>{G.init(e,t),ve(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>Av(i,e)):Av(n,e)}});function Av(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 Qc=v("$ZodSuccess",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),Yc=v("$ZodCatch",(e,t)=>{G.init(e,t),e._zod.optin="optional",ve(e._zod,"optout",()=>t.innerType._zod.optout),ve(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>Et(s,o,Le()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(i=>Et(i,o,Le()))},input:r.value}),r.issues=[]),r)}}),Xc=v("$ZodNaN",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),_o=v("$ZodPipe",(e,t)=>{G.init(e,t),ve(e._zod,"values",()=>t.in._zod.values),ve(e._zod,"optin",()=>t.in._zod.optin),ve(e._zod,"optout",()=>t.out._zod.optout),e._zod.parse=(r,o)=>{let n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>Cv(i,t,o)):Cv(n,t,o)}});function Cv(e,t,r){return vn(e)?e:t.out._zod.run({value:e.value,issues:e.issues},r)}var eu=v("$ZodReadonly",(e,t)=>{G.init(e,t),ve(e._zod,"propValues",()=>t.innerType._zod.propValues),ve(e._zod,"values",()=>t.innerType._zod.values),ve(e._zod,"optin",()=>t.innerType._zod.optin),ve(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(Dv):Dv(n)}});function Dv(e){return e.value=Object.freeze(e.value),e}var tu=v("$ZodTemplateLiteral",(e,t)=>{G.init(e,t);let r=[];for(let o of t.parts)if(o instanceof G){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let n=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=n.startsWith("^")?1:0,s=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(i,s))}else if(o===null||op.has(typeof o))r.push(wr(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(o,n)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"template_literal",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:"template_literal",pattern:e._zod.pattern.source}),o)}),ru=v("$ZodPromise",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},o))}),nu=v("$ZodLazy",(e,t)=>{G.init(e,t),ve(e._zod,"innerType",()=>t.getter()),ve(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),ve(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),ve(e._zod,"optin",()=>e._zod.innerType._zod.optin),ve(e._zod,"optout",()=>e._zod.innerType._zod.optout),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o)}),ou=v("$ZodCustom",(e,t)=>{De.init(e,t),G.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=r=>{let o=r.value,n=t.fn(o);if(n instanceof Promise)return n.then(i=>qv(i,r,o,e));qv(n,r,o,e)}});function qv(e,t,r,o){if(!e){let n={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(n.params=o._zod.def.params),t.issues.push(cp(n))}}var vo={};mn(vo,{ar:()=>Zv,az:()=>Vv,be:()=>Wv,ca:()=>Gv,cs:()=>Kv,de:()=>Bv,en:()=>iu,eo:()=>Hv,es:()=>Jv,fa:()=>Qv,fi:()=>Yv,fr:()=>Xv,frCA:()=>ey,he:()=>ty,hu:()=>ry,id:()=>ny,it:()=>oy,ja:()=>iy,kh:()=>sy,ko:()=>ay,mk:()=>cy,ms:()=>uy,nl:()=>ly,no:()=>dy,ota:()=>py,pl:()=>my,ps:()=>fy,pt:()=>hy,ru:()=>_y,sl:()=>vy,sv:()=>yy,ta:()=>by,th:()=>wy,tr:()=>$y,ua:()=>ky,ur:()=>xy,vi:()=>Sy,zhCN:()=>Ty,zhTW:()=>Py});var QT=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${n.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${j(n.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${o[i.format]??n.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${n.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${x(n.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function Zv(){return{localeError:QT()}}var YT=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${n.expected}, daxil olan ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${j(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${o[i.format]??n.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${x(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function Vv(){return{localeError:YT()}}function Fv(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var XT=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u043B\u0456\u043A";case"object":{if(Array.isArray(n))return"\u043C\u0430\u0441\u0456\u045E";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${n.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${j(n.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let a=Number(n.maximum),c=Fv(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${n.maximum.toString()} ${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 ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let a=Number(n.minimum),c=Fv(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${n.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${o[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${x(n.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${n.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function Wv(){return{localeError:XT()}}var eP=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Tipus inv\xE0lid: s'esperava ${n.expected}, s'ha rebut ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${j(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${x(n.values," o ")}`;case"too_big":{let i=n.inclusive?"com a m\xE0xim":"menys de",s=t(n.origin);return s?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${i} ${n.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(n.origin);return s?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${i} ${n.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${o[i.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${x(n.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${n.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${n.origin}`;default:return"Entrada inv\xE0lida"}}};function Gv(){return{localeError:eP()}}var tP=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u010D\xEDslo";case"string":return"\u0159et\u011Bzec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(n))return"pole";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${n.expected}, obdr\u017Eeno ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${j(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${o[i.format]??n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${x(n.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${n.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${n.origin}`;default:return"Neplatn\xFD vstup"}}};function Kv(){return{localeError:tP()}}var rP=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"Zahl";case"object":{if(Array.isArray(n))return"Array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Ung\xFCltige Eingabe: erwartet ${n.expected}, erhalten ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${j(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ist`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ist`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${o[i.format]??n.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${x(n.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${n.origin}`;default:return"Ung\xFCltige Eingabe"}}};function Bv(){return{localeError:rP()}}var nP=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},oP=()=>{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"}};function t(o){return e[o]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return o=>{switch(o.code){case"invalid_type":return`Invalid input: expected ${o.expected}, received ${nP(o.input)}`;case"invalid_value":return o.values.length===1?`Invalid input: expected ${j(o.values[0])}`:`Invalid option: expected one of ${x(o.values,"|")}`;case"too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`Too big: expected ${o.origin??"value"} to have ${n}${o.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${n}${o.maximum.toString()}`}case"too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`Too small: expected ${o.origin} to have ${n}${o.minimum.toString()} ${i.unit}`:`Too small: expected ${o.origin} to be ${n}${o.minimum.toString()}`}case"invalid_format":{let n=o;return n.format==="starts_with"?`Invalid string: must start with "${n.prefix}"`:n.format==="ends_with"?`Invalid string: must end with "${n.suffix}"`:n.format==="includes"?`Invalid string: must include "${n.includes}"`:n.format==="regex"?`Invalid string: must match pattern ${n.pattern}`:`Invalid ${r[n.format]??o.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${o.divisor}`;case"unrecognized_keys":return`Unrecognized key${o.keys.length>1?"s":""}: ${x(o.keys,", ")}`;case"invalid_key":return`Invalid key in ${o.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${o.origin}`;default:return"Invalid input"}}};function iu(){return{localeError:oP()}}var iP=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombro";case"object":{if(Array.isArray(e))return"tabelo";if(e===null)return"senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},sP=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(o){return e[o]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return o=>{switch(o.code){case"invalid_type":return`Nevalida enigo: atendi\u011Dis ${o.expected}, ricevi\u011Dis ${iP(o.input)}`;case"invalid_value":return o.values.length===1?`Nevalida enigo: atendi\u011Dis ${j(o.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${x(o.values,"|")}`;case"too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${n}${o.maximum.toString()} ${i.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${n}${o.maximum.toString()}`}case"too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`Tro malgranda: atendi\u011Dis ke ${o.origin} havu ${n}${o.minimum.toString()} ${i.unit}`:`Tro malgranda: atendi\u011Dis ke ${o.origin} estu ${n}${o.minimum.toString()}`}case"invalid_format":{let n=o;return n.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${n.prefix}"`:n.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${n.suffix}"`:n.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${n.includes}"`:n.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${n.pattern}`:`Nevalida ${r[n.format]??o.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${o.divisor}`;case"unrecognized_keys":return`Nekonata${o.keys.length>1?"j":""} \u015Dlosilo${o.keys.length>1?"j":""}: ${x(o.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${o.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${o.origin}`;default:return"Nevalida enigo"}}};function Hv(){return{localeError:sP()}}var aP=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"n\xFAmero";case"object":{if(Array.isArray(n))return"arreglo";if(n===null)return"nulo";if(Object.getPrototypeOf(n)!==Object.prototype)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Entrada inv\xE1lida: se esperaba ${n.expected}, recibido ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${j(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Demasiado grande: se esperaba que ${n.origin??"valor"} tuviera ${i}${n.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${n.origin??"valor"} fuera ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Demasiado peque\xF1o: se esperaba que ${n.origin} tuviera ${i}${n.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${n.origin} fuera ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${o[i.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${x(n.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${n.origin}`;default:return"Entrada inv\xE1lida"}}};function Jv(){return{localeError:aP()}}var cP=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(n))return"\u0622\u0631\u0627\u06CC\u0647";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${n.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${r(n.input)} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;case"invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${j(n.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${x(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${o[i.format]??n.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${n.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${x(n.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${n.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function Qv(){return{localeError:cP()}}var uP=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${n.expected}, oli ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${j(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${i}${n.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${i}${n.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${o[i.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${x(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function Yv(){return{localeError:uP()}}var lP=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"nombre";case"object":{if(Array.isArray(n))return"tableau";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Entr\xE9e invalide : ${n.expected} attendu, ${r(n.input)} re\xE7u`;case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${j(n.values[0])} attendu`:`Option invalide : une valeur parmi ${x(n.values,"|")} attendue`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Trop grand : ${n.origin??"valeur"} doit ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n.origin??"valeur"} doit \xEAtre ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Trop petit : ${n.origin} doit ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Trop petit : ${n.origin} doit \xEAtre ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${o[i.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${x(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function Xv(){return{localeError:lP()}}var dP=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Entr\xE9e invalide : attendu ${n.expected}, re\xE7u ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${j(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u2264":"<",s=t(n.origin);return s?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${i}${n.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"\u2265":">",s=t(n.origin);return s?`Trop petit : attendu que ${n.origin} ait ${i}${n.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${n.origin} soit ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${o[i.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${x(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function ey(){return{localeError:dP()}}var pP=()=>{let e={string:{unit:"\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u05E7\u05DC\u05D8",email:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",url:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",emoji:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",date:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",time:"\u05D6\u05DE\u05DF ISO",duration:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",ipv4:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",ipv6:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",cidrv4:"\u05D8\u05D5\u05D5\u05D7 IPv4",cidrv6:"\u05D8\u05D5\u05D5\u05D7 IPv6",base64:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",base64url:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",json_string:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",e164:"\u05DE\u05E1\u05E4\u05E8 E.164",jwt:"JWT",template_literal:"\u05E7\u05DC\u05D8"};return n=>{switch(n.code){case"invalid_type":return`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${n.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${j(n.values[0])}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05D0\u05D7\u05EA \u05DE\u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${n.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.maximum.toString()} ${s.unit??"elements"}`:`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${n.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${n.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.minimum.toString()} ${s.unit}`:`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${n.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1"${i.prefix}"`:i.format==="ends_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${i.suffix}"`:i.format==="includes"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${i.includes}"`:i.format==="regex"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${i.pattern}`:`${o[i.format]??n.format} \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`}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 ${n.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${n.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${n.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${x(n.keys,", ")}`;case"invalid_key":return`\u05DE\u05E4\u05EA\u05D7 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n.origin}`;case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n.origin}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function ty(){return{localeError:pP()}}var fP=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"sz\xE1m";case"object":{if(Array.isArray(n))return"t\xF6mb";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${n.expected}, a kapott \xE9rt\xE9k ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${j(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${n.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${i}${n.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${o[i.format]??n.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${x(n.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${n.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function ry(){return{localeError:fP()}}var mP=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Input tidak valid: diharapkan ${n.expected}, diterima ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${j(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${i}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: diharapkan ${n.origin} memiliki ${i}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${o[i.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${x(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};function ny(){return{localeError:mP()}}var hP=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"numero";case"object":{if(Array.isArray(n))return"vettore";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Input non valido: atteso ${n.expected}, ricevuto ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input non valido: atteso ${j(n.values[0])}`:`Opzione non valida: atteso uno tra ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Troppo grande: ${n.origin??"valore"} deve avere ${i}${n.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Troppo piccolo: ${n.origin} deve avere ${i}${n.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${n.origin} deve essere ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Invalid ${o[i.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${x(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};function oy(){return{localeError:hP()}}var gP=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u6570\u5024";case"object":{if(Array.isArray(n))return"\u914D\u5217";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\u7121\u52B9\u306A\u5165\u529B: ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${r(n.input)}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;case"invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${j(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${x(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=t(n.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${s.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=t(n.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${s.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${o[i.format]??n.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${n.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${n.keys.length>1?"\u7FA4":""}: ${x(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function iy(){return{localeError:gP()}}var _P=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"\u1798\u17B7\u1793\u1798\u17C2\u1793\u1787\u17B6\u179B\u17C1\u1781 (NaN)":"\u179B\u17C1\u1781";case"object":{if(Array.isArray(n))return"\u17A2\u17B6\u179A\u17C1 (Array)";if(n===null)return"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${j(n.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${o[i.format]??n.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${n.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${x(n.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function sy(){return{localeError:_P()}}var vP=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${r(n.input)}\uC785\uB2C8\uB2E4`;case"invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${j(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${x(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(n.origin),c=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${c} ${i}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${i}${s}`}case"too_small":{let i=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(n.origin),c=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${c} ${i}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${i}${s}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${o[i.format]??n.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${x(n.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function ay(){return{localeError:vP()}}var yP=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u0431\u0440\u043E\u0458";case"object":{if(Array.isArray(n))return"\u043D\u0438\u0437\u0430";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${j(n.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${o[i.format]??n.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${x(n.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${n.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function cy(){return{localeError:yP()}}var bP=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"nombor";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Input tidak sah: dijangka ${n.expected}, diterima ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${j(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: dijangka ${n.origin??"nilai"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: dijangka ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${o[i.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${x(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};function uy(){return{localeError:bP()}}var wP=()=>{let e={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"getal";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Ongeldige invoer: verwacht ${n.expected}, ontving ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${j(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Te lang: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} ${s.unit??"elementen"} bevat`:`Te lang: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} is`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Te kort: verwacht dat ${n.origin} ${i}${n.minimum.toString()} ${s.unit} bevat`:`Te kort: verwacht dat ${n.origin} ${i}${n.minimum.toString()} is`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${o[i.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${x(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};function ly(){return{localeError:wP()}}var $P=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"tall";case"object":{if(Array.isArray(n))return"liste";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Ugyldig input: forventet ${n.expected}, fikk ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${j(n.values[0])}`:`Ugyldig valg: forventet en av ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${o[i.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${x(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};function dy(){return{localeError:$P()}}var kP=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"numara";case"object":{if(Array.isArray(n))return"saf";if(n===null)return"gayb";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`F\xE2sit giren: umulan ${n.expected}, al\u0131nan ${r(n.input)}`;case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${j(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=n;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${o[i.format]??n.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${x(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function py(){return{localeError:kP()}}var xP=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(n))return"\u0627\u0631\u06D0";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${n.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${r(n.input)} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;case"invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${j(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${x(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0648\u064A`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${o[i.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${x(n.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${n.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function fy(){return{localeError:xP()}}var SP=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"liczba";case"object":{if(Array.isArray(n))return"tablica";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${n.expected}, otrzymano ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${j(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${o[i.format]??n.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${x(n.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${n.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function my(){return{localeError:SP()}}var TP=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"n\xFAmero";case"object":{if(Array.isArray(n))return"array";if(n===null)return"nulo";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Tipo inv\xE1lido: esperado ${n.expected}, recebido ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${j(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${i}${n.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Muito pequeno: esperado que ${n.origin} tivesse ${i}${n.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${o[i.format]??n.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${x(n.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${n.origin}`;default:return"Campo inv\xE1lido"}}};function hy(){return{localeError:TP()}}function gy(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var PP=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(n))return"\u043C\u0430\u0441\u0441\u0438\u0432";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${j(n.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let a=Number(n.maximum),c=gy(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.maximum.toString()} ${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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let a=Number(n.minimum),c=gy(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.minimum.toString()} ${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 ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${o[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${x(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function _y(){return{localeError:PP()}}var zP=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u0161tevilo";case"object":{if(Array.isArray(n))return"tabela";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Neveljaven vnos: pri\u010Dakovano ${n.expected}, prejeto ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${j(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${i}${n.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${i}${n.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${o[i.format]??n.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${x(n.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};function vy(){return{localeError:zP()}}var EP=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"antal";case"object":{if(Array.isArray(n))return"lista";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`Ogiltig inmatning: f\xF6rv\xE4ntat ${n.expected}, fick ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${j(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${o[i.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${x(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function yy(){return{localeError:EP()}}var IP=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"\u0B8E\u0BA3\u0BCD \u0B85\u0BB2\u0BCD\u0BB2\u0BBE\u0BA4\u0BA4\u0BC1":"\u0B8E\u0BA3\u0BCD";case"object":{if(Array.isArray(n))return"\u0B85\u0BA3\u0BBF";if(n===null)return"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${j(n.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${x(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${o[i.format]??n.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${x(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function by(){return{localeError:IP()}}var NP=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 (NaN)":"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02";case"object":{if(Array.isArray(n))return"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)";if(n===null)return"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\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 ${n.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${j(n.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${o[i.format]??n.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${n.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${x(n.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function wy(){return{localeError:NP()}}var OP=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},RP=()=>{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(o){return e[o]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"};return o=>{switch(o.code){case"invalid_type":return`Ge\xE7ersiz de\u011Fer: beklenen ${o.expected}, al\u0131nan ${OP(o.input)}`;case"invalid_value":return o.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${j(o.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${x(o.values,"|")}`;case"too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${n}${o.maximum.toString()} ${i.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${n}${o.maximum.toString()}`}case"too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${n}${o.minimum.toString()} ${i.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${n}${o.minimum.toString()}`}case"invalid_format":{let n=o;return n.format==="starts_with"?`Ge\xE7ersiz metin: "${n.prefix}" ile ba\u015Flamal\u0131`:n.format==="ends_with"?`Ge\xE7ersiz metin: "${n.suffix}" ile bitmeli`:n.format==="includes"?`Ge\xE7ersiz metin: "${n.includes}" i\xE7ermeli`:n.format==="regex"?`Ge\xE7ersiz metin: ${n.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[n.format]??o.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${o.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${o.keys.length>1?"lar":""}: ${x(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${o.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function $y(){return{localeError:RP()}}var jP=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(n))return"\u043C\u0430\u0441\u0438\u0432";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${n.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${j(n.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} \u0431\u0443\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${o[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${x(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${n.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function ky(){return{localeError:jP()}}var AP=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u0646\u0645\u0628\u0631";case"object":{if(Array.isArray(n))return"\u0622\u0631\u06D2";if(n===null)return"\u0646\u0644";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${n.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${r(n.input)} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;case"invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${j(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${x(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${i}${n.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${i}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${o[i.format]??n.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${n.keys.length>1?"\u0632":""}: ${x(n.keys,"\u060C ")}`;case"invalid_key":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function xy(){return{localeError:AP()}}var CP=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"s\u1ED1";case"object":{if(Array.isArray(n))return"m\u1EA3ng";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${n.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${j(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${o[i.format]??n.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${n.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${x(n.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function Sy(){return{localeError:CP()}}var DP=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"\u975E\u6570\u5B57(NaN)":"\u6570\u5B57";case"object":{if(Array.isArray(n))return"\u6570\u7EC4";if(n===null)return"\u7A7A\u503C(null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${j(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${o[i.format]??n.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${x(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function Ty(){return{localeError:DP()}}var qP=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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"};return n=>{switch(n.code){case"invalid_type":return`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${n.expected}\uFF0C\u4F46\u6536\u5230 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${j(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${o[i.format]??n.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${x(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function Py(){return{localeError:qP()}}var su=Symbol("ZodOutput"),au=Symbol("ZodInput"),yo=class{constructor(){this._map=new Map,this._idmap=new Map}add(t,...r){let o=r[0];if(this._map.set(t,o),o&&typeof o=="object"&&"id"in o){if(this._idmap.has(o.id))throw new Error(`ID ${o.id} already exists in the registry`);this._idmap.set(o.id,t)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let o={...this.get(r)??{}};return delete o.id,{...o,...this._map.get(t)}}return this._map.get(t)}has(t){return this._map.has(t)}};function Ui(){return new yo}var Gt=Ui();function cu(e,t){return new e({type:"string",...O(t)})}function lf(e,t){return new e({type:"string",coerce:!0,...O(t)})}function Li(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...O(t)})}function bo(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...O(t)})}function Zi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...O(t)})}function Vi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...O(t)})}function Fi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...O(t)})}function Wi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...O(t)})}function Gi(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...O(t)})}function Ki(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...O(t)})}function Bi(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...O(t)})}function Hi(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...O(t)})}function Ji(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...O(t)})}function Qi(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...O(t)})}function Yi(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...O(t)})}function Xi(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...O(t)})}function es(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...O(t)})}function ts(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...O(t)})}function rs(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...O(t)})}function ns(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...O(t)})}function os(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...O(t)})}function is(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...O(t)})}function ss(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...O(t)})}function as(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...O(t)})}var uu={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function df(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...O(t)})}function pf(e,t){return new e({type:"string",format:"date",check:"string_format",...O(t)})}function ff(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...O(t)})}function mf(e,t){return new e({type:"string",format:"duration",check:"string_format",...O(t)})}function lu(e,t){return new e({type:"number",checks:[],...O(t)})}function hf(e,t){return new e({type:"number",coerce:!0,checks:[],...O(t)})}function du(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...O(t)})}function pu(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...O(t)})}function fu(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...O(t)})}function mu(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...O(t)})}function hu(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...O(t)})}function gu(e,t){return new e({type:"boolean",...O(t)})}function gf(e,t){return new e({type:"boolean",coerce:!0,...O(t)})}function _u(e,t){return new e({type:"bigint",...O(t)})}function _f(e,t){return new e({type:"bigint",coerce:!0,...O(t)})}function vu(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...O(t)})}function yu(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...O(t)})}function bu(e,t){return new e({type:"symbol",...O(t)})}function wu(e,t){return new e({type:"undefined",...O(t)})}function $u(e,t){return new e({type:"null",...O(t)})}function ku(e){return new e({type:"any"})}function kn(e){return new e({type:"unknown"})}function xu(e,t){return new e({type:"never",...O(t)})}function Su(e,t){return new e({type:"void",...O(t)})}function Tu(e,t){return new e({type:"date",...O(t)})}function vf(e,t){return new e({type:"date",coerce:!0,...O(t)})}function Pu(e,t){return new e({type:"nan",...O(t)})}function $r(e,t){return new ic({check:"less_than",...O(t),value:e,inclusive:!1})}function Ot(e,t){return new ic({check:"less_than",...O(t),value:e,inclusive:!0})}function kr(e,t){return new sc({check:"greater_than",...O(t),value:e,inclusive:!1})}function _t(e,t){return new sc({check:"greater_than",...O(t),value:e,inclusive:!0})}function yf(e){return kr(0,e)}function bf(e){return $r(0,e)}function wf(e){return Ot(0,e)}function $f(e){return _t(0,e)}function xn(e,t){return new qp({check:"multiple_of",...O(t),value:e})}function wo(e,t){return new Lp({check:"max_size",...O(t),maximum:e})}function Sn(e,t){return new Zp({check:"min_size",...O(t),minimum:e})}function cs(e,t){return new Vp({check:"size_equals",...O(t),size:e})}function $o(e,t){return new Fp({check:"max_length",...O(t),maximum:e})}function Fr(e,t){return new Wp({check:"min_length",...O(t),minimum:e})}function ko(e,t){return new Gp({check:"length_equals",...O(t),length:e})}function us(e,t){return new Kp({check:"string_format",format:"regex",...O(t),pattern:e})}function ls(e){return new Bp({check:"string_format",format:"lowercase",...O(e)})}function ds(e){return new Hp({check:"string_format",format:"uppercase",...O(e)})}function ps(e,t){return new Jp({check:"string_format",format:"includes",...O(t),includes:e})}function fs(e,t){return new Qp({check:"string_format",format:"starts_with",...O(t),prefix:e})}function ms(e,t){return new Yp({check:"string_format",format:"ends_with",...O(t),suffix:e})}function kf(e,t,r){return new Xp({check:"property",property:e,schema:t,...O(r)})}function hs(e,t){return new ef({check:"mime_type",mime:e,...O(t)})}function xr(e){return new tf({check:"overwrite",tx:e})}function gs(e){return xr(t=>t.normalize(e))}function _s(){return xr(e=>e.trim())}function vs(){return xr(e=>e.toLowerCase())}function ys(){return xr(e=>e.toUpperCase())}function bs(e,t,r){return new e({type:"array",element:t,...O(r)})}function MP(e,t,r){return new e({type:"union",options:t,...O(r)})}function UP(e,t,r,o){return new e({type:"union",options:r,discriminator:t,...O(o)})}function LP(e,t,r){return new e({type:"intersection",left:t,right:r})}function xf(e,t,r,o){let n=r instanceof G,i=n?o:r,s=n?r:null;return new e({type:"tuple",items:t,rest:s,...O(i)})}function ZP(e,t,r,o){return new e({type:"record",keyType:t,valueType:r,...O(o)})}function VP(e,t,r,o){return new e({type:"map",keyType:t,valueType:r,...O(o)})}function FP(e,t,r){return new e({type:"set",valueType:t,...O(r)})}function WP(e,t,r){let o=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:o,...O(r)})}function GP(e,t,r){return new e({type:"enum",entries:t,...O(r)})}function KP(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...O(r)})}function zu(e,t){return new e({type:"file",...O(t)})}function BP(e,t){return new e({type:"transform",transform:t})}function HP(e,t){return new e({type:"optional",innerType:t})}function JP(e,t){return new e({type:"nullable",innerType:t})}function QP(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():r}})}function YP(e,t,r){return new e({type:"nonoptional",innerType:t,...O(r)})}function XP(e,t){return new e({type:"success",innerType:t})}function ez(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function tz(e,t,r){return new e({type:"pipe",in:t,out:r})}function rz(e,t){return new e({type:"readonly",innerType:t})}function nz(e,t,r){return new e({type:"template_literal",parts:t,...O(r)})}function oz(e,t){return new e({type:"lazy",getter:t})}function iz(e,t){return new e({type:"promise",innerType:t})}function Eu(e,t,r){let o=O(r);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function Iu(e,t,r){return new e({type:"custom",check:"custom",fn:t,...O(r)})}function Nu(e,t){let r=O(t),o=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(o=o.map(p=>typeof p=="string"?p.toLowerCase():p),n=n.map(p=>typeof p=="string"?p.toLowerCase():p));let i=new Set(o),s=new Set(n),a=e.Pipe??_o,c=e.Boolean??mo,u=e.String??Zr,l=e.Transform??go,d=new l({type:"transform",transform:(p,f)=>{let _=p;return r.case!=="sensitive"&&(_=_.toLowerCase()),i.has(_)?!0:s.has(_)?!1:(f.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:f.value,inst:d}),{})},error:r.error}),h=new a({type:"pipe",in:new u({type:"string",error:r.error}),out:d,error:r.error});return new a({type:"pipe",in:h,out:new c({type:"boolean",error:r.error}),error:r.error})}function Ou(e,t,r,o={}){let n=O(o),i={...O(o),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:a=>r.test(a),...n};return r instanceof RegExp&&(i.pattern=r),new e(i)}var Ru=class{constructor(t){this._def=t,this.def=t}implement(t){if(typeof t!="function")throw new Error("implement() must be called with a function");let r=((...o)=>{let n=this._def.input?yn(this._def.input,o,void 0,{callee:r}):o;if(!Array.isArray(n))throw new Error("Invalid arguments schema: not an array or tuple schema.");let i=t(...n);return this._def.output?yn(this._def.output,i,void 0,{callee:r}):i});return r}implementAsync(t){if(typeof t!="function")throw new Error("implement() must be called with a function");let r=(async(...o)=>{let n=this._def.input?await bn(this._def.input,o,void 0,{callee:r}):o;if(!Array.isArray(n))throw new Error("Invalid arguments schema: not an array or tuple schema.");let i=await t(...n);return this._def.output?bn(this._def.output,i,void 0,{callee:r}):i});return r}input(...t){let r=this.constructor;return Array.isArray(t[0])?new r({type:"function",input:new Vr({type:"tuple",items:t[0],rest:t[1]}),output:this._def.output}):new r({type:"function",input:t[0],output:this._def.output})}output(t){let r=this.constructor;return new r({type:"function",input:this._def.input,output:t})}};function ju(e){return new Ru({type:"function",input:Array.isArray(e?.input)?xf(Vr,e?.input):e?.input??bs(ho,kn($n)),output:e?.output??kn($n)})}var ws=class{constructor(t){this.counter=0,this.metadataRegistry=t?.metadata??Gt,this.target=t?.target??"draft-2020-12",this.unrepresentable=t?.unrepresentable??"throw",this.override=t?.override??(()=>{}),this.io=t?.io??"output",this.seen=new Map}process(t,r={path:[],schemaPath:[]}){var o;let n=t._zod.def,i={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},s=this.seen.get(t);if(s)return s.count++,r.schemaPath.includes(t)&&(s.cycle=r.path),s.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(t,a);let c=t._zod.toJSONSchema?.();if(c)a.schema=c;else{let d={...r,schemaPath:[...r.schemaPath,t],path:r.path},h=t._zod.parent;if(h)a.ref=h,this.process(h,d),this.seen.get(h).isParent=!0;else{let m=a.schema;switch(n.type){case"string":{let p=m;p.type="string";let{minimum:f,maximum:_,format:y,patterns:$,contentEncoding:k}=t._zod.bag;if(typeof f=="number"&&(p.minLength=f),typeof _=="number"&&(p.maxLength=_),y&&(p.format=i[y]??y,p.format===""&&delete p.format),k&&(p.contentEncoding=k),$&&$.size>0){let N=[...$];N.length===1?p.pattern=N[0].source:N.length>1&&(a.schema.allOf=[...N.map(P=>({...this.target==="draft-7"?{type:"string"}:{},pattern:P.source}))])}break}case"number":{let p=m,{minimum:f,maximum:_,format:y,multipleOf:$,exclusiveMaximum:k,exclusiveMinimum:N}=t._zod.bag;typeof y=="string"&&y.includes("int")?p.type="integer":p.type="number",typeof N=="number"&&(p.exclusiveMinimum=N),typeof f=="number"&&(p.minimum=f,typeof N=="number"&&(N>=f?delete p.minimum:delete p.exclusiveMinimum)),typeof k=="number"&&(p.exclusiveMaximum=k),typeof _=="number"&&(p.maximum=_,typeof k=="number"&&(k<=_?delete p.maximum:delete p.exclusiveMaximum)),typeof $=="number"&&(p.multipleOf=$);break}case"boolean":{let p=m;p.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{m.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{m.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{let p=m,{minimum:f,maximum:_}=t._zod.bag;typeof f=="number"&&(p.minItems=f),typeof _=="number"&&(p.maxItems=_),p.type="array",p.items=this.process(n.element,{...d,path:[...d.path,"items"]});break}case"object":{let p=m;p.type="object",p.properties={};let f=n.shape;for(let $ in f)p.properties[$]=this.process(f[$],{...d,path:[...d.path,"properties",$]});let _=new Set(Object.keys(f)),y=new Set([..._].filter($=>{let k=n.shape[$]._zod;return this.io==="input"?k.optin===void 0:k.optout===void 0}));y.size>0&&(p.required=Array.from(y)),n.catchall?._zod.def.type==="never"?p.additionalProperties=!1:n.catchall?n.catchall&&(p.additionalProperties=this.process(n.catchall,{...d,path:[...d.path,"additionalProperties"]})):this.io==="output"&&(p.additionalProperties=!1);break}case"union":{let p=m;p.anyOf=n.options.map((f,_)=>this.process(f,{...d,path:[...d.path,"anyOf",_]}));break}case"intersection":{let p=m,f=this.process(n.left,{...d,path:[...d.path,"allOf",0]}),_=this.process(n.right,{...d,path:[...d.path,"allOf",1]}),y=k=>"allOf"in k&&Object.keys(k).length===1,$=[...y(f)?f.allOf:[f],...y(_)?_.allOf:[_]];p.allOf=$;break}case"tuple":{let p=m;p.type="array";let f=n.items.map(($,k)=>this.process($,{...d,path:[...d.path,"prefixItems",k]}));if(this.target==="draft-2020-12"?p.prefixItems=f:p.items=f,n.rest){let $=this.process(n.rest,{...d,path:[...d.path,"items"]});this.target==="draft-2020-12"?p.items=$:p.additionalItems=$}n.rest&&(p.items=this.process(n.rest,{...d,path:[...d.path,"items"]}));let{minimum:_,maximum:y}=t._zod.bag;typeof _=="number"&&(p.minItems=_),typeof y=="number"&&(p.maxItems=y);break}case"record":{let p=m;p.type="object",p.propertyNames=this.process(n.keyType,{...d,path:[...d.path,"propertyNames"]}),p.additionalProperties=this.process(n.valueType,{...d,path:[...d.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{let p=m,f=zi(n.entries);f.every(_=>typeof _=="number")&&(p.type="number"),f.every(_=>typeof _=="string")&&(p.type="string"),p.enum=f;break}case"literal":{let p=m,f=[];for(let _ of n.values)if(_===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof _=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");f.push(Number(_))}else f.push(_);if(f.length!==0)if(f.length===1){let _=f[0];p.type=_===null?"null":typeof _,p.const=_}else f.every(_=>typeof _=="number")&&(p.type="number"),f.every(_=>typeof _=="string")&&(p.type="string"),f.every(_=>typeof _=="boolean")&&(p.type="string"),f.every(_=>_===null)&&(p.type="null"),p.enum=f;break}case"file":{let p=m,f={type:"string",format:"binary",contentEncoding:"binary"},{minimum:_,maximum:y,mime:$}=t._zod.bag;_!==void 0&&(f.minLength=_),y!==void 0&&(f.maxLength=y),$?$.length===1?(f.contentMediaType=$[0],Object.assign(p,f)):p.anyOf=$.map(k=>({...f,contentMediaType:k})):Object.assign(p,f);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let p=this.process(n.innerType,d);m.anyOf=[p,{type:"null"}];break}case"nonoptional":{this.process(n.innerType,d),a.ref=n.innerType;break}case"success":{let p=m;p.type="boolean";break}case"default":{this.process(n.innerType,d),a.ref=n.innerType,m.default=JSON.parse(JSON.stringify(n.defaultValue));break}case"prefault":{this.process(n.innerType,d),a.ref=n.innerType,this.io==="input"&&(m._prefault=JSON.parse(JSON.stringify(n.defaultValue)));break}case"catch":{this.process(n.innerType,d),a.ref=n.innerType;let p;try{p=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}m.default=p;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let p=m,f=t._zod.pattern;if(!f)throw new Error("Pattern not found in template literal");p.type="string",p.pattern=f.source;break}case"pipe":{let p=this.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;this.process(p,d),a.ref=p;break}case"readonly":{this.process(n.innerType,d),a.ref=n.innerType,m.readOnly=!0;break}case"promise":{this.process(n.innerType,d),a.ref=n.innerType;break}case"optional":{this.process(n.innerType,d),a.ref=n.innerType;break}case"lazy":{let p=t._zod.innerType;this.process(p,d),a.ref=p;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}default:}}}let u=this.metadataRegistry.get(t);return u&&Object.assign(a.schema,u),this.io==="input"&&We(t)&&(delete a.schema.examples,delete a.schema.default),this.io==="input"&&a.schema._prefault&&((o=a.schema).default??(o.default=a.schema._prefault)),delete a.schema._prefault,this.seen.get(t).schema}emit(t,r){let o={cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0},n=this.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=l=>{let d=this.target==="draft-2020-12"?"$defs":"definitions";if(o.external){let f=o.external.registry.get(l[0])?.id,_=o.external.uri??($=>$);if(f)return{ref:_(f)};let y=l[1].defId??l[1].schema.id??`schema${this.counter++}`;return l[1].defId=y,{defId:y,ref:`${_("__shared")}#/${d}/${y}`}}if(l[1]===n)return{ref:"#"};let m=`#/${d}/`,p=l[1].schema.id??`__schema${this.counter++}`;return{defId:p,ref:m+p}},s=l=>{if(l[1].schema.$ref)return;let d=l[1],{ref:h,defId:m}=i(l);d.def={...d.schema},m&&(d.defId=m);let p=d.schema;for(let f in p)delete p[f];p.$ref=h};if(o.cycles==="throw")for(let l of this.seen.entries()){let d=l[1];if(d.cycle)throw new Error(`Cycle detected: #/${d.cycle?.join("/")}/<root>
43
43
 
44
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let l of this.seen.entries()){let d=l[1];if(t===l[0]){s(l);continue}if(o.external){let m=o.external.registry.get(l[0])?.id;if(t!==l[0]&&m){s(l);continue}}if(this.metadataRegistry.get(l[0])?.id){s(l);continue}if(d.cycle){s(l);continue}if(d.count>1&&o.reused==="ref"){s(l);continue}}let a=(l,d)=>{let h=this.seen.get(l),m=h.def??h.schema,p={...m};if(h.ref===null)return;let f=h.ref;if(h.ref=null,f){a(f,d);let _=this.seen.get(f).schema;_.$ref&&d.target==="draft-7"?(m.allOf=m.allOf??[],m.allOf.push(_)):(Object.assign(m,_),Object.assign(m,p))}h.isParent||this.override({zodSchema:l,jsonSchema:m,path:h.path??[]})};for(let l of[...this.seen.entries()].reverse())a(l[0],{target:this.target});let c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),o.external?.uri){let l=o.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");c.$id=o.external.uri(l)}Object.assign(c,n.def);let u=o.external?.defs??{};for(let l of this.seen.entries()){let d=l[1];d.def&&d.defId&&(u[d.defId]=d.def)}o.external||Object.keys(u).length>0&&(this.target==="draft-2020-12"?c.$defs=u:c.definitions=u);try{return JSON.parse(JSON.stringify(c))}catch{throw new Error("Error converting schema to JSON.")}}};function xo(e,t){if(e instanceof yo){let o=new ys(t),n={};for(let a of e._idmap.entries()){let[c,u]=a;o.process(u)}let i={},s={registry:e,uri:t?.uri,defs:n};for(let a of e._idmap.entries()){let[c,u]=a;i[c]=o.emit(u,{...t,external:s})}if(Object.keys(n).length>0){let a=o.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[a]:n}}return{schemas:i}}let r=new ys(t);return r.process(e),r.emit(e,t)}function Fe(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let n=e._zod.def;switch(n.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return Fe(n.element,r);case"object":{for(let i in n.shape)if(Fe(n.shape[i],r))return!0;return!1}case"union":{for(let i of n.options)if(Fe(i,r))return!0;return!1}case"intersection":return Fe(n.left,r)||Fe(n.right,r);case"tuple":{for(let i of n.items)if(Fe(i,r))return!0;return!!(n.rest&&Fe(n.rest,r))}case"record":return Fe(n.keyType,r)||Fe(n.valueType,r);case"map":return Fe(n.keyType,r)||Fe(n.valueType,r);case"set":return Fe(n.valueType,r);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return Fe(n.innerType,r);case"lazy":return Fe(n.getter(),r);case"default":return Fe(n.innerType,r);case"prefault":return Fe(n.innerType,r);case"custom":return!1;case"transform":return!0;case"pipe":return Fe(n.in,r)||Fe(n.out,r);case"success":return!1;case"catch":return!1;default:}throw new Error(`Unknown schema type: ${n.type}`)}var Py={};var nz=v("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");G.init(e,t),e.def=t,e.parse=(r,o)=>yn(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>Mr(e,r,o),e.parseAsync=async(r,o)=>bn(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>Ur(e,r,o),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),e.clone=(r,o)=>et(e,r,o),e.brand=()=>e,e.register=((r,o)=>(r.add(e,o),e))});var oz=v("ZodMiniObject",(e,t)=>{Di.init(e,t),nz.init(e,t),R.defineLazy(e,"shape",()=>t.shape)});function xf(e,t){let r={type:"object",get shape(){return R.assignProp(this,"shape",{...e}),this.shape},...R.normalizeParams(t)};return new oz(r)}function Rt(e){return!!e._zod}function Tn(e){let t=Object.values(e);if(t.length===0)return xf({});let r=t.every(Rt),o=t.every(n=>!Rt(n));if(r)return xf(e);if(o)return vv(e);throw new Error("Mixed Zod versions detected in object shape.")}function Wr(e,t){return Rt(e)?Mr(e,t):e.safeParse(t)}async function Ru(e,t){return Rt(e)?await Ur(e,t):await e.safeParseAsync(t)}function Gr(e){if(!e)return;let t;if(Rt(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function So(e){if(e){if(typeof e=="object"){let t=e,r=e;if(!t._def&&!r._zod){let o=Object.values(e);if(o.length>0&&o.every(n=>typeof n=="object"&&n!==null&&(n._def!==void 0||n._zod!==void 0||typeof n.parse=="function")))return Tn(e)}}if(Rt(e)){let r=e._zod?.def;if(r&&(r.type==="object"||r.shape!==void 0))return e}else if(e.shape!==void 0)return e}}function ju(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 zy(e){return e.description}function Iy(e){if(Rt(e))return e._zod?.def?.type==="optional";let t=e;return typeof e.isOptional=="function"?e.isOptional():t._def?.typeName==="ZodOptional"}function Au(e){if(Rt(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 r=e._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}let o=e.value;if(o!==void 0)return o}var cm={};mn(cm,{$brand:()=>Ha,$input:()=>iu,$output:()=>ou,NEVER:()=>Ka,TimePrecision:()=>au,ZodAny:()=>Dy,ZodArray:()=>Uy,ZodBase64:()=>Hf,ZodBase64URL:()=>Bf,ZodBigInt:()=>xs,ZodBigIntFormat:()=>Yf,ZodBoolean:()=>ks,ZodCIDRv4:()=>Gf,ZodCIDRv6:()=>Kf,ZodCUID:()=>Mf,ZodCUID2:()=>Uf,ZodCatch:()=>tb,ZodCustom:()=>Ku,ZodCustomStringFormat:()=>Oy,ZodDate:()=>Fu,ZodDefault:()=>By,ZodDiscriminatedUnion:()=>Ly,ZodE164:()=>Jf,ZodEmail:()=>Af,ZodEmoji:()=>Cf,ZodEnum:()=>bs,ZodError:()=>az,ZodFile:()=>Ky,ZodGUID:()=>Uu,ZodIPv4:()=>Ff,ZodIPv6:()=>Wf,ZodISODate:()=>Cu,ZodISODateTime:()=>Du,ZodISODuration:()=>Mu,ZodISOTime:()=>qu,ZodIntersection:()=>Zy,ZodIssueCode:()=>sI,ZodJWT:()=>Qf,ZodKSUID:()=>Vf,ZodLazy:()=>ab,ZodLiteral:()=>Gy,ZodMap:()=>Fy,ZodNaN:()=>nb,ZodNanoID:()=>qf,ZodNever:()=>qy,ZodNonOptional:()=>om,ZodNull:()=>Ay,ZodNullable:()=>Hy,ZodNumber:()=>$s,ZodNumberFormat:()=>zo,ZodObject:()=>Wu,ZodOptional:()=>nm,ZodPipe:()=>im,ZodPrefault:()=>Qy,ZodPromise:()=>ub,ZodReadonly:()=>ob,ZodRealError:()=>Po,ZodRecord:()=>em,ZodSet:()=>Wy,ZodString:()=>ws,ZodStringFormat:()=>Ie,ZodSuccess:()=>eb,ZodSymbol:()=>Ry,ZodTemplateLiteral:()=>sb,ZodTransform:()=>tm,ZodTuple:()=>Vy,ZodType:()=>te,ZodULID:()=>Lf,ZodURL:()=>Df,ZodUUID:()=>Sr,ZodUndefined:()=>jy,ZodUnion:()=>Xf,ZodUnknown:()=>Cy,ZodVoid:()=>My,ZodXID:()=>Zf,_ZodString:()=>jf,_default:()=>Jy,any:()=>Lz,array:()=>ae,base64:()=>Pz,base64url:()=>zz,bigint:()=>Dz,boolean:()=>Ve,catch:()=>rb,check:()=>lb,cidrv4:()=>Sz,cidrv6:()=>Tz,clone:()=>et,coerce:()=>am,config:()=>Ue,core:()=>Kt,cuid:()=>vz,cuid2:()=>yz,custom:()=>sm,date:()=>Vz,discriminatedUnion:()=>Gu,e164:()=>Iz,email:()=>uz,emoji:()=>gz,endsWith:()=>ps,enum:()=>lt,file:()=>Qz,flattenError:()=>lo,float32:()=>Oz,float64:()=>Rz,formatError:()=>po,function:()=>Ou,getErrorMap:()=>cI,globalRegistry:()=>Gt,gt:()=>kr,gte:()=>_t,guid:()=>lz,includes:()=>ls,instanceof:()=>nI,int:()=>Rf,int32:()=>jz,int64:()=>Cz,intersection:()=>Ts,ipv4:()=>kz,ipv6:()=>xz,iso:()=>To,json:()=>iI,jwt:()=>Ez,keyof:()=>Fz,ksuid:()=>$z,lazy:()=>cb,length:()=>ko,literal:()=>M,locales:()=>vo,looseObject:()=>tt,lowercase:()=>cs,lt:()=>$r,lte:()=>Ot,map:()=>Hz,maxLength:()=>$o,maxSize:()=>wo,mime:()=>fs,minLength:()=>Fr,minSize:()=>Sn,multipleOf:()=>xn,nan:()=>eI,nanoid:()=>_z,nativeEnum:()=>Jz,negative:()=>yf,never:()=>Vu,nonnegative:()=>wf,nonoptional:()=>Xy,nonpositive:()=>bf,normalize:()=>ms,null:()=>Ss,nullable:()=>Lu,nullish:()=>Yz,number:()=>ye,object:()=>C,optional:()=>Oe,overwrite:()=>xr,parse:()=>If,parseAsync:()=>Ef,partialRecord:()=>Kz,pipe:()=>Zu,positive:()=>vf,prefault:()=>Yy,preprocess:()=>Hu,prettifyError:()=>Qa,promise:()=>rI,property:()=>$f,readonly:()=>ib,record:()=>Ee,refine:()=>db,regex:()=>as,regexes:()=>Lr,registry:()=>qi,safeParse:()=>Nf,safeParseAsync:()=>Of,set:()=>Bz,setErrorMap:()=>aI,size:()=>ss,startsWith:()=>ds,strictObject:()=>Wz,string:()=>b,stringFormat:()=>Nz,stringbool:()=>oI,success:()=>Xz,superRefine:()=>pb,symbol:()=>Mz,templateLiteral:()=>tI,toJSONSchema:()=>xo,toLowerCase:()=>gs,toUpperCase:()=>_s,transform:()=>rm,treeifyError:()=>Ja,trim:()=>hs,tuple:()=>Gz,uint32:()=>Az,uint64:()=>qz,ulid:()=>bz,undefined:()=>Uz,union:()=>be,unknown:()=>Ne,uppercase:()=>us,url:()=>hz,uuid:()=>dz,uuidv4:()=>pz,uuidv6:()=>fz,uuidv7:()=>mz,void:()=>Zz,xid:()=>wz});var To={};mn(To,{ZodISODate:()=>Cu,ZodISODateTime:()=>Du,ZodISODuration:()=>Mu,ZodISOTime:()=>qu,date:()=>Tf,datetime:()=>Sf,duration:()=>zf,time:()=>Pf});var Du=v("ZodISODateTime",(e,t)=>{nf.init(e,t),Ie.init(e,t)});function Sf(e){return lf(Du,e)}var Cu=v("ZodISODate",(e,t)=>{of.init(e,t),Ie.init(e,t)});function Tf(e){return df(Cu,e)}var qu=v("ZodISOTime",(e,t)=>{sf.init(e,t),Ie.init(e,t)});function Pf(e){return pf(qu,e)}var Mu=v("ZodISODuration",(e,t)=>{af.init(e,t),Ie.init(e,t)});function zf(e){return ff(Mu,e)}var Ny=(e,t)=>{Oi.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>po(e,r)},flatten:{value:r=>lo(e,r)},addIssue:{value:r=>e.issues.push(r)},addIssues:{value:r=>e.issues.push(...r)},isEmpty:{get(){return e.issues.length===0}}})},az=v("ZodError",Ny),Po=v("ZodError",Ny,{Parent:Error});var If=Ya(Po),Ef=Xa(Po),Nf=ec(Po),Of=tc(Po);var te=v("ZodType",(e,t)=>(G.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),e.clone=(r,o)=>et(e,r,o),e.brand=()=>e,e.register=((r,o)=>(r.add(e,o),e)),e.parse=(r,o)=>If(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>Nf(e,r,o),e.parseAsync=async(r,o)=>Ef(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>Of(e,r,o),e.spa=e.safeParseAsync,e.refine=(r,o)=>e.check(db(r,o)),e.superRefine=r=>e.check(pb(r)),e.overwrite=r=>e.check(xr(r)),e.optional=()=>Oe(e),e.nullable=()=>Lu(e),e.nullish=()=>Oe(Lu(e)),e.nonoptional=r=>Xy(e,r),e.array=()=>ae(e),e.or=r=>be([e,r]),e.and=r=>Ts(e,r),e.transform=r=>Zu(e,rm(r)),e.default=r=>Jy(e,r),e.prefault=r=>Yy(e,r),e.catch=r=>rb(e,r),e.pipe=r=>Zu(e,r),e.readonly=()=>ib(e),e.describe=r=>{let o=e.clone();return Gt.add(o,{description:r}),o},Object.defineProperty(e,"description",{get(){return Gt.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Gt.get(e);let o=e.clone();return Gt.add(o,r[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),jf=v("_ZodString",(e,t)=>{Zr.init(e,t),te.init(e,t);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...o)=>e.check(as(...o)),e.includes=(...o)=>e.check(ls(...o)),e.startsWith=(...o)=>e.check(ds(...o)),e.endsWith=(...o)=>e.check(ps(...o)),e.min=(...o)=>e.check(Fr(...o)),e.max=(...o)=>e.check($o(...o)),e.length=(...o)=>e.check(ko(...o)),e.nonempty=(...o)=>e.check(Fr(1,...o)),e.lowercase=o=>e.check(cs(o)),e.uppercase=o=>e.check(us(o)),e.trim=()=>e.check(hs()),e.normalize=(...o)=>e.check(ms(...o)),e.toLowerCase=()=>e.check(gs()),e.toUpperCase=()=>e.check(_s())}),ws=v("ZodString",(e,t)=>{Zr.init(e,t),jf.init(e,t),e.email=r=>e.check(Mi(Af,r)),e.url=r=>e.check(Fi(Df,r)),e.jwt=r=>e.check(is(Qf,r)),e.emoji=r=>e.check(Wi(Cf,r)),e.guid=r=>e.check(bo(Uu,r)),e.uuid=r=>e.check(Ui(Sr,r)),e.uuidv4=r=>e.check(Li(Sr,r)),e.uuidv6=r=>e.check(Zi(Sr,r)),e.uuidv7=r=>e.check(Vi(Sr,r)),e.nanoid=r=>e.check(Gi(qf,r)),e.guid=r=>e.check(bo(Uu,r)),e.cuid=r=>e.check(Ki(Mf,r)),e.cuid2=r=>e.check(Hi(Uf,r)),e.ulid=r=>e.check(Bi(Lf,r)),e.base64=r=>e.check(rs(Hf,r)),e.base64url=r=>e.check(ns(Bf,r)),e.xid=r=>e.check(Ji(Zf,r)),e.ksuid=r=>e.check(Qi(Vf,r)),e.ipv4=r=>e.check(Yi(Ff,r)),e.ipv6=r=>e.check(Xi(Wf,r)),e.cidrv4=r=>e.check(es(Gf,r)),e.cidrv6=r=>e.check(ts(Kf,r)),e.e164=r=>e.check(os(Jf,r)),e.datetime=r=>e.check(Sf(r)),e.date=r=>e.check(Tf(r)),e.time=r=>e.check(Pf(r)),e.duration=r=>e.check(zf(r))});function b(e){return su(ws,e)}var Ie=v("ZodStringFormat",(e,t)=>{ke.init(e,t),jf.init(e,t)}),Af=v("ZodEmail",(e,t)=>{uc.init(e,t),Ie.init(e,t)});function uz(e){return Mi(Af,e)}var Uu=v("ZodGUID",(e,t)=>{ac.init(e,t),Ie.init(e,t)});function lz(e){return bo(Uu,e)}var Sr=v("ZodUUID",(e,t)=>{cc.init(e,t),Ie.init(e,t)});function dz(e){return Ui(Sr,e)}function pz(e){return Li(Sr,e)}function fz(e){return Zi(Sr,e)}function mz(e){return Vi(Sr,e)}var Df=v("ZodURL",(e,t)=>{lc.init(e,t),Ie.init(e,t)});function hz(e){return Fi(Df,e)}var Cf=v("ZodEmoji",(e,t)=>{dc.init(e,t),Ie.init(e,t)});function gz(e){return Wi(Cf,e)}var qf=v("ZodNanoID",(e,t)=>{pc.init(e,t),Ie.init(e,t)});function _z(e){return Gi(qf,e)}var Mf=v("ZodCUID",(e,t)=>{fc.init(e,t),Ie.init(e,t)});function vz(e){return Ki(Mf,e)}var Uf=v("ZodCUID2",(e,t)=>{mc.init(e,t),Ie.init(e,t)});function yz(e){return Hi(Uf,e)}var Lf=v("ZodULID",(e,t)=>{hc.init(e,t),Ie.init(e,t)});function bz(e){return Bi(Lf,e)}var Zf=v("ZodXID",(e,t)=>{gc.init(e,t),Ie.init(e,t)});function wz(e){return Ji(Zf,e)}var Vf=v("ZodKSUID",(e,t)=>{_c.init(e,t),Ie.init(e,t)});function $z(e){return Qi(Vf,e)}var Ff=v("ZodIPv4",(e,t)=>{vc.init(e,t),Ie.init(e,t)});function kz(e){return Yi(Ff,e)}var Wf=v("ZodIPv6",(e,t)=>{yc.init(e,t),Ie.init(e,t)});function xz(e){return Xi(Wf,e)}var Gf=v("ZodCIDRv4",(e,t)=>{bc.init(e,t),Ie.init(e,t)});function Sz(e){return es(Gf,e)}var Kf=v("ZodCIDRv6",(e,t)=>{wc.init(e,t),Ie.init(e,t)});function Tz(e){return ts(Kf,e)}var Hf=v("ZodBase64",(e,t)=>{$c.init(e,t),Ie.init(e,t)});function Pz(e){return rs(Hf,e)}var Bf=v("ZodBase64URL",(e,t)=>{kc.init(e,t),Ie.init(e,t)});function zz(e){return ns(Bf,e)}var Jf=v("ZodE164",(e,t)=>{xc.init(e,t),Ie.init(e,t)});function Iz(e){return os(Jf,e)}var Qf=v("ZodJWT",(e,t)=>{Sc.init(e,t),Ie.init(e,t)});function Ez(e){return is(Qf,e)}var Oy=v("ZodCustomStringFormat",(e,t)=>{Tc.init(e,t),Ie.init(e,t)});function Nz(e,t,r={}){return Eu(Oy,e,t,r)}var $s=v("ZodNumber",(e,t)=>{ji.init(e,t),te.init(e,t),e.gt=(o,n)=>e.check(kr(o,n)),e.gte=(o,n)=>e.check(_t(o,n)),e.min=(o,n)=>e.check(_t(o,n)),e.lt=(o,n)=>e.check($r(o,n)),e.lte=(o,n)=>e.check(Ot(o,n)),e.max=(o,n)=>e.check(Ot(o,n)),e.int=o=>e.check(Rf(o)),e.safe=o=>e.check(Rf(o)),e.positive=o=>e.check(kr(0,o)),e.nonnegative=o=>e.check(_t(0,o)),e.negative=o=>e.check($r(0,o)),e.nonpositive=o=>e.check(Ot(0,o)),e.multipleOf=(o,n)=>e.check(xn(o,n)),e.step=(o,n)=>e.check(xn(o,n)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function ye(e){return cu($s,e)}var zo=v("ZodNumberFormat",(e,t)=>{Pc.init(e,t),$s.init(e,t)});function Rf(e){return uu(zo,e)}function Oz(e){return lu(zo,e)}function Rz(e){return du(zo,e)}function jz(e){return pu(zo,e)}function Az(e){return fu(zo,e)}var ks=v("ZodBoolean",(e,t)=>{mo.init(e,t),te.init(e,t)});function Ve(e){return mu(ks,e)}var xs=v("ZodBigInt",(e,t)=>{Ai.init(e,t),te.init(e,t),e.gte=(o,n)=>e.check(_t(o,n)),e.min=(o,n)=>e.check(_t(o,n)),e.gt=(o,n)=>e.check(kr(o,n)),e.gte=(o,n)=>e.check(_t(o,n)),e.min=(o,n)=>e.check(_t(o,n)),e.lt=(o,n)=>e.check($r(o,n)),e.lte=(o,n)=>e.check(Ot(o,n)),e.max=(o,n)=>e.check(Ot(o,n)),e.positive=o=>e.check(kr(BigInt(0),o)),e.negative=o=>e.check($r(BigInt(0),o)),e.nonpositive=o=>e.check(Ot(BigInt(0),o)),e.nonnegative=o=>e.check(_t(BigInt(0),o)),e.multipleOf=(o,n)=>e.check(xn(o,n));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function Dz(e){return hu(xs,e)}var Yf=v("ZodBigIntFormat",(e,t)=>{zc.init(e,t),xs.init(e,t)});function Cz(e){return gu(Yf,e)}function qz(e){return _u(Yf,e)}var Ry=v("ZodSymbol",(e,t)=>{Ic.init(e,t),te.init(e,t)});function Mz(e){return vu(Ry,e)}var jy=v("ZodUndefined",(e,t)=>{Ec.init(e,t),te.init(e,t)});function Uz(e){return yu(jy,e)}var Ay=v("ZodNull",(e,t)=>{Nc.init(e,t),te.init(e,t)});function Ss(e){return bu(Ay,e)}var Dy=v("ZodAny",(e,t)=>{Oc.init(e,t),te.init(e,t)});function Lz(){return wu(Dy)}var Cy=v("ZodUnknown",(e,t)=>{$n.init(e,t),te.init(e,t)});function Ne(){return kn(Cy)}var qy=v("ZodNever",(e,t)=>{Rc.init(e,t),te.init(e,t)});function Vu(e){return $u(qy,e)}var My=v("ZodVoid",(e,t)=>{jc.init(e,t),te.init(e,t)});function Zz(e){return ku(My,e)}var Fu=v("ZodDate",(e,t)=>{Ac.init(e,t),te.init(e,t),e.min=(o,n)=>e.check(_t(o,n)),e.max=(o,n)=>e.check(Ot(o,n));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function Vz(e){return xu(Fu,e)}var Uy=v("ZodArray",(e,t)=>{ho.init(e,t),te.init(e,t),e.element=t.element,e.min=(r,o)=>e.check(Fr(r,o)),e.nonempty=r=>e.check(Fr(1,r)),e.max=(r,o)=>e.check($o(r,o)),e.length=(r,o)=>e.check(ko(r,o)),e.unwrap=()=>e.element});function ae(e,t){return vs(Uy,e,t)}function Fz(e){let t=e._zod.def.shape;return M(Object.keys(t))}var Wu=v("ZodObject",(e,t)=>{Di.init(e,t),te.init(e,t),R.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>lt(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ne()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ne()}),e.strict=()=>e.clone({...e._zod.def,catchall:Vu()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>R.extend(e,r),e.merge=r=>R.merge(e,r),e.pick=r=>R.pick(e,r),e.omit=r=>R.omit(e,r),e.partial=(...r)=>R.partial(nm,e,r[0]),e.required=(...r)=>R.required(om,e,r[0])});function C(e,t){let r={type:"object",get shape(){return R.assignProp(this,"shape",{...e}),this.shape},...R.normalizeParams(t)};return new Wu(r)}function Wz(e,t){return new Wu({type:"object",get shape(){return R.assignProp(this,"shape",{...e}),this.shape},catchall:Vu(),...R.normalizeParams(t)})}function tt(e,t){return new Wu({type:"object",get shape(){return R.assignProp(this,"shape",{...e}),this.shape},catchall:Ne(),...R.normalizeParams(t)})}var Xf=v("ZodUnion",(e,t)=>{Ci.init(e,t),te.init(e,t),e.options=t.options});function be(e,t){return new Xf({type:"union",options:e,...R.normalizeParams(t)})}var Ly=v("ZodDiscriminatedUnion",(e,t)=>{Xf.init(e,t),Dc.init(e,t)});function Gu(e,t,r){return new Ly({type:"union",options:t,discriminator:e,...R.normalizeParams(r)})}var Zy=v("ZodIntersection",(e,t)=>{Cc.init(e,t),te.init(e,t)});function Ts(e,t){return new Zy({type:"intersection",left:e,right:t})}var Vy=v("ZodTuple",(e,t)=>{Vr.init(e,t),te.init(e,t),e.rest=r=>e.clone({...e._zod.def,rest:r})});function Gz(e,t,r){let o=t instanceof G,n=o?r:t,i=o?t:null;return new Vy({type:"tuple",items:e,rest:i,...R.normalizeParams(n)})}var em=v("ZodRecord",(e,t)=>{qc.init(e,t),te.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Ee(e,t,r){return new em({type:"record",keyType:e,valueType:t,...R.normalizeParams(r)})}function Kz(e,t,r){return new em({type:"record",keyType:be([e,Vu()]),valueType:t,...R.normalizeParams(r)})}var Fy=v("ZodMap",(e,t)=>{Mc.init(e,t),te.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Hz(e,t,r){return new Fy({type:"map",keyType:e,valueType:t,...R.normalizeParams(r)})}var Wy=v("ZodSet",(e,t)=>{Uc.init(e,t),te.init(e,t),e.min=(...r)=>e.check(Sn(...r)),e.nonempty=r=>e.check(Sn(1,r)),e.max=(...r)=>e.check(wo(...r)),e.size=(...r)=>e.check(ss(...r))});function Bz(e,t){return new Wy({type:"set",valueType:e,...R.normalizeParams(t)})}var bs=v("ZodEnum",(e,t)=>{Lc.init(e,t),te.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(o,n)=>{let i={};for(let s of o)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new bs({...t,checks:[],...R.normalizeParams(n),entries:i})},e.exclude=(o,n)=>{let i={...t.entries};for(let s of o)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new bs({...t,checks:[],...R.normalizeParams(n),entries:i})}});function lt(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new bs({type:"enum",entries:r,...R.normalizeParams(t)})}function Jz(e,t){return new bs({type:"enum",entries:e,...R.normalizeParams(t)})}var Gy=v("ZodLiteral",(e,t)=>{Zc.init(e,t),te.init(e,t),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 M(e,t){return new Gy({type:"literal",values:Array.isArray(e)?e:[e],...R.normalizeParams(t)})}var Ky=v("ZodFile",(e,t)=>{Vc.init(e,t),te.init(e,t),e.min=(r,o)=>e.check(Sn(r,o)),e.max=(r,o)=>e.check(wo(r,o)),e.mime=(r,o)=>e.check(fs(Array.isArray(r)?r:[r],o))});function Qz(e){return Tu(Ky,e)}var tm=v("ZodTransform",(e,t)=>{go.init(e,t),te.init(e,t),e._zod.parse=(r,o)=>{r.addIssue=i=>{if(typeof i=="string")r.issues.push(R.issue(i,r.value,t));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),s.continue??(s.continue=!0),r.issues.push(R.issue(s))}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(i=>(r.value=i,r)):(r.value=n,r)}});function rm(e){return new tm({type:"transform",transform:e})}var nm=v("ZodOptional",(e,t)=>{Fc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Oe(e){return new nm({type:"optional",innerType:e})}var Hy=v("ZodNullable",(e,t)=>{Wc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Lu(e){return new Hy({type:"nullable",innerType:e})}function Yz(e){return Oe(Lu(e))}var By=v("ZodDefault",(e,t)=>{Gc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Jy(e,t){return new By({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}var Qy=v("ZodPrefault",(e,t)=>{Kc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Yy(e,t){return new Qy({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}var om=v("ZodNonOptional",(e,t)=>{Hc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Xy(e,t){return new om({type:"nonoptional",innerType:e,...R.normalizeParams(t)})}var eb=v("ZodSuccess",(e,t)=>{Bc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Xz(e){return new eb({type:"success",innerType:e})}var tb=v("ZodCatch",(e,t)=>{Jc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function rb(e,t){return new tb({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var nb=v("ZodNaN",(e,t)=>{Qc.init(e,t),te.init(e,t)});function eI(e){return Su(nb,e)}var im=v("ZodPipe",(e,t)=>{_o.init(e,t),te.init(e,t),e.in=t.in,e.out=t.out});function Zu(e,t){return new im({type:"pipe",in:e,out:t})}var ob=v("ZodReadonly",(e,t)=>{Yc.init(e,t),te.init(e,t)});function ib(e){return new ob({type:"readonly",innerType:e})}var sb=v("ZodTemplateLiteral",(e,t)=>{Xc.init(e,t),te.init(e,t)});function tI(e,t){return new sb({type:"template_literal",parts:e,...R.normalizeParams(t)})}var ab=v("ZodLazy",(e,t)=>{tu.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.getter()});function cb(e){return new ab({type:"lazy",getter:e})}var ub=v("ZodPromise",(e,t)=>{eu.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function rI(e){return new ub({type:"promise",innerType:e})}var Ku=v("ZodCustom",(e,t)=>{ru.init(e,t),te.init(e,t)});function lb(e){let t=new Ce({check:"custom"});return t._zod.check=e,t}function sm(e,t){return Pu(Ku,e??(()=>!0),t)}function db(e,t={}){return zu(Ku,e,t)}function pb(e){let t=lb(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(R.issue(o,r.value,t._zod.def));else{let n=o;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=t),n.continue??(n.continue=!t._zod.def.abort),r.issues.push(R.issue(n))}},e(r.value,r)));return t}function nI(e,t={error:`Input not instance of ${e.name}`}){let r=new Ku({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...R.normalizeParams(t)});return r._zod.bag.Class=e,r}var oI=(...e)=>Iu({Pipe:im,Boolean:ks,String:ws,Transform:tm},...e);function iI(e){let t=cb(()=>be([b(e),ye(),Ve(),Ss(),ae(t),Ee(b(),t)]));return t}function Hu(e,t){return Zu(rm(e),t)}var sI={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 aI(e){Ue({customError:e})}function cI(){return Ue().customError}var am={};mn(am,{bigint:()=>pI,boolean:()=>dI,date:()=>fI,number:()=>lI,string:()=>uI});function uI(e){return uf(ws,e)}function lI(e){return mf($s,e)}function dI(e){return hf(ks,e)}function pI(e){return gf(xs,e)}function fI(e){return _f(Fu,e)}Ue(nu());var fb=cm;var g=fb;var lm="2025-11-25";var mb=[lm,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Kr="io.modelcontextprotocol/related-task",Ju="2.0",Ge=sm(e=>e!==null&&(typeof e=="object"||typeof e=="function")),hb=be([b(),ye().int()]),gb=b(),eF=tt({ttl:be([ye(),Ss()]).optional(),pollInterval:ye().optional()}),hI=C({ttl:ye().optional()}),gI=C({taskId:b()}),dm=tt({progressToken:hb.optional(),[Kr]:gI.optional()}),Et=C({_meta:dm.optional()}),Ps=Et.extend({task:hI.optional()}),_b=e=>Ps.safeParse(e).success,Ke=C({method:b(),params:Et.loose().optional()}),jt=C({_meta:dm.optional()}),At=C({method:b(),params:jt.loose().optional()}),He=tt({_meta:dm.optional()}),Qu=be([b(),ye().int()]),vb=C({jsonrpc:M(Ju),id:Qu,...Ke.shape}).strict(),pm=e=>vb.safeParse(e).success,yb=C({jsonrpc:M(Ju),...At.shape}).strict(),bb=e=>yb.safeParse(e).success,fm=C({jsonrpc:M(Ju),id:Qu,result:He}).strict(),zs=e=>fm.safeParse(e).success;var V;(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"})(V||(V={}));var mm=C({jsonrpc:M(Ju),id:Qu.optional(),error:C({code:ye().int(),message:b(),data:Ne().optional()})}).strict();var wb=e=>mm.safeParse(e).success;var $b=be([vb,yb,fm,mm]),tF=be([fm,mm]),Yu=He.strict(),_I=jt.extend({requestId:Qu.optional(),reason:b().optional()}),Xu=At.extend({method:M("notifications/cancelled"),params:_I}),vI=C({src:b(),mimeType:b().optional(),sizes:ae(b()).optional(),theme:lt(["light","dark"]).optional()}),Is=C({icons:ae(vI).optional()}),Io=C({name:b(),title:b().optional()}),kb=Io.extend({...Io.shape,...Is.shape,version:b(),websiteUrl:b().optional(),description:b().optional()}),yI=Ts(C({applyDefaults:Ve().optional()}),Ee(b(),Ne())),bI=Hu(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Ts(C({form:yI.optional(),url:Ge.optional()}),Ee(b(),Ne()).optional())),wI=tt({list:Ge.optional(),cancel:Ge.optional(),requests:tt({sampling:tt({createMessage:Ge.optional()}).optional(),elicitation:tt({create:Ge.optional()}).optional()}).optional()}),$I=tt({list:Ge.optional(),cancel:Ge.optional(),requests:tt({tools:tt({call:Ge.optional()}).optional()}).optional()}),kI=C({experimental:Ee(b(),Ge).optional(),sampling:C({context:Ge.optional(),tools:Ge.optional()}).optional(),elicitation:bI.optional(),roots:C({listChanged:Ve().optional()}).optional(),tasks:wI.optional()}),xI=Et.extend({protocolVersion:b(),capabilities:kI,clientInfo:kb}),hm=Ke.extend({method:M("initialize"),params:xI});var SI=C({experimental:Ee(b(),Ge).optional(),logging:Ge.optional(),completions:Ge.optional(),prompts:C({listChanged:Ve().optional()}).optional(),resources:C({subscribe:Ve().optional(),listChanged:Ve().optional()}).optional(),tools:C({listChanged:Ve().optional()}).optional(),tasks:$I.optional()}),TI=He.extend({protocolVersion:b(),capabilities:SI,serverInfo:kb,instructions:b().optional()}),gm=At.extend({method:M("notifications/initialized"),params:jt.optional()});var el=Ke.extend({method:M("ping"),params:Et.optional()}),PI=C({progress:ye(),total:Oe(ye()),message:Oe(b())}),zI=C({...jt.shape,...PI.shape,progressToken:hb}),tl=At.extend({method:M("notifications/progress"),params:zI}),II=Et.extend({cursor:gb.optional()}),Es=Ke.extend({params:II.optional()}),Ns=He.extend({nextCursor:gb.optional()}),EI=lt(["working","input_required","completed","failed","cancelled"]),Os=C({taskId:b(),status:EI,ttl:be([ye(),Ss()]),createdAt:b(),lastUpdatedAt:b(),pollInterval:Oe(ye()),statusMessage:Oe(b())}),Eo=He.extend({task:Os}),NI=jt.merge(Os),Rs=At.extend({method:M("notifications/tasks/status"),params:NI}),rl=Ke.extend({method:M("tasks/get"),params:Et.extend({taskId:b()})}),nl=He.merge(Os),ol=Ke.extend({method:M("tasks/result"),params:Et.extend({taskId:b()})}),rF=He.loose(),il=Es.extend({method:M("tasks/list")}),sl=Ns.extend({tasks:ae(Os)}),al=Ke.extend({method:M("tasks/cancel"),params:Et.extend({taskId:b()})}),xb=He.merge(Os),Sb=C({uri:b(),mimeType:Oe(b()),_meta:Ee(b(),Ne()).optional()}),Tb=Sb.extend({text:b()}),_m=b().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),Pb=Sb.extend({blob:_m}),js=lt(["user","assistant"]),No=C({audience:ae(js).optional(),priority:ye().min(0).max(1).optional(),lastModified:To.datetime({offset:!0}).optional()}),zb=C({...Io.shape,...Is.shape,uri:b(),description:Oe(b()),mimeType:Oe(b()),annotations:No.optional(),_meta:Oe(tt({}))}),OI=C({...Io.shape,...Is.shape,uriTemplate:b(),description:Oe(b()),mimeType:Oe(b()),annotations:No.optional(),_meta:Oe(tt({}))}),cl=Es.extend({method:M("resources/list")}),RI=Ns.extend({resources:ae(zb)}),ul=Es.extend({method:M("resources/templates/list")}),jI=Ns.extend({resourceTemplates:ae(OI)}),vm=Et.extend({uri:b()}),AI=vm,ll=Ke.extend({method:M("resources/read"),params:AI}),DI=He.extend({contents:ae(be([Tb,Pb]))}),CI=At.extend({method:M("notifications/resources/list_changed"),params:jt.optional()}),qI=vm,MI=Ke.extend({method:M("resources/subscribe"),params:qI}),UI=vm,LI=Ke.extend({method:M("resources/unsubscribe"),params:UI}),ZI=jt.extend({uri:b()}),VI=At.extend({method:M("notifications/resources/updated"),params:ZI}),FI=C({name:b(),description:Oe(b()),required:Oe(Ve())}),WI=C({...Io.shape,...Is.shape,description:Oe(b()),arguments:Oe(ae(FI)),_meta:Oe(tt({}))}),dl=Es.extend({method:M("prompts/list")}),GI=Ns.extend({prompts:ae(WI)}),KI=Et.extend({name:b(),arguments:Ee(b(),b()).optional()}),pl=Ke.extend({method:M("prompts/get"),params:KI}),ym=C({type:M("text"),text:b(),annotations:No.optional(),_meta:Ee(b(),Ne()).optional()}),bm=C({type:M("image"),data:_m,mimeType:b(),annotations:No.optional(),_meta:Ee(b(),Ne()).optional()}),wm=C({type:M("audio"),data:_m,mimeType:b(),annotations:No.optional(),_meta:Ee(b(),Ne()).optional()}),HI=C({type:M("tool_use"),name:b(),id:b(),input:Ee(b(),Ne()),_meta:Ee(b(),Ne()).optional()}),BI=C({type:M("resource"),resource:be([Tb,Pb]),annotations:No.optional(),_meta:Ee(b(),Ne()).optional()}),JI=zb.extend({type:M("resource_link")}),$m=be([ym,bm,wm,JI,BI]),QI=C({role:js,content:$m}),YI=He.extend({description:b().optional(),messages:ae(QI)}),XI=At.extend({method:M("notifications/prompts/list_changed"),params:jt.optional()}),eE=C({title:b().optional(),readOnlyHint:Ve().optional(),destructiveHint:Ve().optional(),idempotentHint:Ve().optional(),openWorldHint:Ve().optional()}),tE=C({taskSupport:lt(["required","optional","forbidden"]).optional()}),Ib=C({...Io.shape,...Is.shape,description:b().optional(),inputSchema:C({type:M("object"),properties:Ee(b(),Ge).optional(),required:ae(b()).optional()}).catchall(Ne()),outputSchema:C({type:M("object"),properties:Ee(b(),Ge).optional(),required:ae(b()).optional()}).catchall(Ne()).optional(),annotations:eE.optional(),execution:tE.optional(),_meta:Ee(b(),Ne()).optional()}),fl=Es.extend({method:M("tools/list")}),rE=Ns.extend({tools:ae(Ib)}),ml=He.extend({content:ae($m).default([]),structuredContent:Ee(b(),Ne()).optional(),isError:Ve().optional()}),nF=ml.or(He.extend({toolResult:Ne()})),nE=Ps.extend({name:b(),arguments:Ee(b(),Ne()).optional()}),Oo=Ke.extend({method:M("tools/call"),params:nE}),oE=At.extend({method:M("notifications/tools/list_changed"),params:jt.optional()}),oF=C({autoRefresh:Ve().default(!0),debounceMs:ye().int().nonnegative().default(300)}),As=lt(["debug","info","notice","warning","error","critical","alert","emergency"]),iE=Et.extend({level:As}),km=Ke.extend({method:M("logging/setLevel"),params:iE}),sE=jt.extend({level:As,logger:b().optional(),data:Ne()}),aE=At.extend({method:M("notifications/message"),params:sE}),cE=C({name:b().optional()}),uE=C({hints:ae(cE).optional(),costPriority:ye().min(0).max(1).optional(),speedPriority:ye().min(0).max(1).optional(),intelligencePriority:ye().min(0).max(1).optional()}),lE=C({mode:lt(["auto","required","none"]).optional()}),dE=C({type:M("tool_result"),toolUseId:b().describe("The unique identifier for the corresponding tool call."),content:ae($m).default([]),structuredContent:C({}).loose().optional(),isError:Ve().optional(),_meta:Ee(b(),Ne()).optional()}),pE=Gu("type",[ym,bm,wm]),Bu=Gu("type",[ym,bm,wm,HI,dE]),fE=C({role:js,content:be([Bu,ae(Bu)]),_meta:Ee(b(),Ne()).optional()}),mE=Ps.extend({messages:ae(fE),modelPreferences:uE.optional(),systemPrompt:b().optional(),includeContext:lt(["none","thisServer","allServers"]).optional(),temperature:ye().optional(),maxTokens:ye().int(),stopSequences:ae(b()).optional(),metadata:Ge.optional(),tools:ae(Ib).optional(),toolChoice:lE.optional()}),hE=Ke.extend({method:M("sampling/createMessage"),params:mE}),Ds=He.extend({model:b(),stopReason:Oe(lt(["endTurn","stopSequence","maxTokens"]).or(b())),role:js,content:pE}),xm=He.extend({model:b(),stopReason:Oe(lt(["endTurn","stopSequence","maxTokens","toolUse"]).or(b())),role:js,content:be([Bu,ae(Bu)])}),gE=C({type:M("boolean"),title:b().optional(),description:b().optional(),default:Ve().optional()}),_E=C({type:M("string"),title:b().optional(),description:b().optional(),minLength:ye().optional(),maxLength:ye().optional(),format:lt(["email","uri","date","date-time"]).optional(),default:b().optional()}),vE=C({type:lt(["number","integer"]),title:b().optional(),description:b().optional(),minimum:ye().optional(),maximum:ye().optional(),default:ye().optional()}),yE=C({type:M("string"),title:b().optional(),description:b().optional(),enum:ae(b()),default:b().optional()}),bE=C({type:M("string"),title:b().optional(),description:b().optional(),oneOf:ae(C({const:b(),title:b()})),default:b().optional()}),wE=C({type:M("string"),title:b().optional(),description:b().optional(),enum:ae(b()),enumNames:ae(b()).optional(),default:b().optional()}),$E=be([yE,bE]),kE=C({type:M("array"),title:b().optional(),description:b().optional(),minItems:ye().optional(),maxItems:ye().optional(),items:C({type:M("string"),enum:ae(b())}),default:ae(b()).optional()}),xE=C({type:M("array"),title:b().optional(),description:b().optional(),minItems:ye().optional(),maxItems:ye().optional(),items:C({anyOf:ae(C({const:b(),title:b()}))}),default:ae(b()).optional()}),SE=be([kE,xE]),TE=be([wE,$E,SE]),PE=be([TE,gE,_E,vE]),zE=Ps.extend({mode:M("form").optional(),message:b(),requestedSchema:C({type:M("object"),properties:Ee(b(),PE),required:ae(b()).optional()})}),IE=Ps.extend({mode:M("url"),message:b(),elicitationId:b(),url:b().url()}),EE=be([zE,IE]),NE=Ke.extend({method:M("elicitation/create"),params:EE}),OE=jt.extend({elicitationId:b()}),RE=At.extend({method:M("notifications/elicitation/complete"),params:OE}),Ro=He.extend({action:lt(["accept","decline","cancel"]),content:Hu(e=>e===null?void 0:e,Ee(b(),be([b(),ye(),Ve(),ae(b())])).optional())}),jE=C({type:M("ref/resource"),uri:b()});var AE=C({type:M("ref/prompt"),name:b()}),DE=Et.extend({ref:be([AE,jE]),argument:C({name:b(),value:b()}),context:C({arguments:Ee(b(),b()).optional()}).optional()}),hl=Ke.extend({method:M("completion/complete"),params:DE});function Eb(e){if(e.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function Nb(e){if(e.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}var CE=He.extend({completion:tt({values:ae(b()).max(100),total:Oe(ye().int()),hasMore:Oe(Ve())})}),qE=C({uri:b().startsWith("file://"),name:b().optional(),_meta:Ee(b(),Ne()).optional()}),ME=Ke.extend({method:M("roots/list"),params:Et.optional()}),Sm=He.extend({roots:ae(qE)}),UE=At.extend({method:M("notifications/roots/list_changed"),params:jt.optional()}),iF=be([el,hm,hl,km,pl,dl,cl,ul,ll,MI,LI,Oo,fl,rl,ol,il,al]),sF=be([Xu,tl,gm,UE,Rs]),aF=be([Yu,Ds,xm,Ro,Sm,nl,sl,Eo]),cF=be([el,hE,NE,ME,rl,ol,il,al]),uF=be([Xu,tl,aE,VI,CI,oE,XI,Rs,RE]),lF=be([Yu,TI,CE,YI,GI,RI,jI,DI,ml,rE,nl,sl,Eo]),U=class e extends Error{constructor(t,r,o){super(`MCP error ${t}: ${r}`),this.code=t,this.data=o,this.name="McpError"}static fromError(t,r,o){if(t===V.UrlElicitationRequired&&o){let n=o;if(n.elicitations)return new um(n.elicitations,r)}return new e(t,r,o)}},um=class extends U{constructor(t,r=`URL elicitation${t.length>1?"s":""} required`){super(V.UrlElicitationRequired,r,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}};function Hr(e){return e==="completed"||e==="failed"||e==="cancelled"}var Rb=Symbol("Let zodToJsonSchema decide on which parser to use");var Ob={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"},jb=e=>typeof e=="string"?{...Ob,name:e}:{...Ob,...e};var Ab=e=>{let t=jb(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,flags:{hasReferencedOpenAiAnyType:!1},currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([o,n])=>[n._def,{def:n._def,path:[...t.basePath,t.definitionPath,o],jsonSchema:void 0}]))}};function Tm(e,t,r,o){o?.errorMessages&&r&&(e.errorMessage={...e.errorMessage,[t]:r})}function ue(e,t,r,o,n){e[t]=r,Tm(e,t,o,n)}var gl=(e,t)=>{let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];r++);return[(e.length-r).toString(),...t.slice(r)].join("/")};function qe(e){if(e.target!=="openAi")return{};let t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:e.$refStrategy==="relative"?gl(t,e.currentPath):t.join("/")}}function Db(e,t){let r={type:"array"};return e.type?._def&&e.type?._def?.typeName!==z.ZodAny&&(r.items=W(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&ue(r,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&ue(r,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(ue(r,"minItems",e.exactLength.value,e.exactLength.message,t),ue(r,"maxItems",e.exactLength.value,e.exactLength.message,t)),r}function Cb(e,t){let r={type:"integer",format:"int64"};if(!e.checks)return r;for(let o of e.checks)switch(o.kind){case"min":t.target==="jsonSchema7"?o.inclusive?ue(r,"minimum",o.value,o.message,t):ue(r,"exclusiveMinimum",o.value,o.message,t):(o.inclusive||(r.exclusiveMinimum=!0),ue(r,"minimum",o.value,o.message,t));break;case"max":t.target==="jsonSchema7"?o.inclusive?ue(r,"maximum",o.value,o.message,t):ue(r,"exclusiveMaximum",o.value,o.message,t):(o.inclusive||(r.exclusiveMaximum=!0),ue(r,"maximum",o.value,o.message,t));break;case"multipleOf":ue(r,"multipleOf",o.value,o.message,t);break}return r}function qb(){return{type:"boolean"}}function _l(e,t){return W(e.type._def,t)}var Mb=(e,t)=>W(e.innerType._def,t);function Pm(e,t,r){let o=r??t.dateStrategy;if(Array.isArray(o))return{anyOf:o.map((n,i)=>Pm(e,t,n))};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 LE(e,t)}}var LE=(e,t)=>{let r={type:"integer",format:"unix-time"};if(t.target==="openApi3")return r;for(let o of e.checks)switch(o.kind){case"min":ue(r,"minimum",o.value,o.message,t);break;case"max":ue(r,"maximum",o.value,o.message,t);break}return r};function Ub(e,t){return{...W(e.innerType._def,t),default:e.defaultValue()}}function Lb(e,t){return t.effectStrategy==="input"?W(e.schema._def,t):qe(t)}function Zb(e){return{type:"string",enum:Array.from(e.values)}}var ZE=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function Vb(e,t){let r=[W(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),W(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(i=>!!i),o=t.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,n=[];return r.forEach(i=>{if(ZE(i))n.push(...i.allOf),i.unevaluatedProperties===void 0&&(o=void 0);else{let s=i;if("additionalProperties"in i&&i.additionalProperties===!1){let{additionalProperties:a,...c}=i;s=c}else o=void 0;n.push(s)}}),n.length?{allOf:n,...o}:void 0}function Fb(e,t){let r=typeof e.value;return r!=="bigint"&&r!=="number"&&r!=="boolean"&&r!=="string"?{type:Array.isArray(e.value)?"array":"object"}:t.target==="openApi3"?{type:r==="bigint"?"integer":r,enum:[e.value]}:{type:r==="bigint"?"integer":r,const:e.value}}var zm,Ht={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:()=>(zm===void 0&&(zm=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),zm),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 vl(e,t){let r={type:"string"};if(e.checks)for(let o of e.checks)switch(o.kind){case"min":ue(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,o.value):o.value,o.message,t);break;case"max":ue(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,o.value):o.value,o.message,t);break;case"email":switch(t.emailStrategy){case"format:email":Bt(r,"email",o.message,t);break;case"format:idn-email":Bt(r,"idn-email",o.message,t);break;case"pattern:zod":dt(r,Ht.email,o.message,t);break}break;case"url":Bt(r,"uri",o.message,t);break;case"uuid":Bt(r,"uuid",o.message,t);break;case"regex":dt(r,o.regex,o.message,t);break;case"cuid":dt(r,Ht.cuid,o.message,t);break;case"cuid2":dt(r,Ht.cuid2,o.message,t);break;case"startsWith":dt(r,RegExp(`^${Im(o.value,t)}`),o.message,t);break;case"endsWith":dt(r,RegExp(`${Im(o.value,t)}$`),o.message,t);break;case"datetime":Bt(r,"date-time",o.message,t);break;case"date":Bt(r,"date",o.message,t);break;case"time":Bt(r,"time",o.message,t);break;case"duration":Bt(r,"duration",o.message,t);break;case"length":ue(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,o.value):o.value,o.message,t),ue(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,o.value):o.value,o.message,t);break;case"includes":{dt(r,RegExp(Im(o.value,t)),o.message,t);break}case"ip":{o.version!=="v6"&&Bt(r,"ipv4",o.message,t),o.version!=="v4"&&Bt(r,"ipv6",o.message,t);break}case"base64url":dt(r,Ht.base64url,o.message,t);break;case"jwt":dt(r,Ht.jwt,o.message,t);break;case"cidr":{o.version!=="v6"&&dt(r,Ht.ipv4Cidr,o.message,t),o.version!=="v4"&&dt(r,Ht.ipv6Cidr,o.message,t);break}case"emoji":dt(r,Ht.emoji(),o.message,t);break;case"ulid":{dt(r,Ht.ulid,o.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{Bt(r,"binary",o.message,t);break}case"contentEncoding:base64":{ue(r,"contentEncoding","base64",o.message,t);break}case"pattern:zod":{dt(r,Ht.base64,o.message,t);break}}break}case"nanoid":dt(r,Ht.nanoid,o.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return r}function Im(e,t){return t.patternStrategy==="escape"?FE(e):e}var VE=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function FE(e){let t="";for(let r=0;r<e.length;r++)VE.has(e[r])||(t+="\\"),t+=e[r];return t}function Bt(e,t,r,o){e.format||e.anyOf?.some(n=>n.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,...r&&o.errorMessages&&{errorMessage:{format:r}}})):ue(e,"format",t,r,o)}function dt(e,t,r,o){e.pattern||e.allOf?.some(n=>n.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),...r&&o.errorMessages&&{errorMessage:{pattern:r}}})):ue(e,"pattern",Wb(t,o),r,o)}function Wb(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;let r={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},o=r.i?e.source.toLowerCase():e.source,n="",i=!1,s=!1,a=!1;for(let c=0;c<o.length;c++){if(i){n+=o[c],i=!1;continue}if(r.i){if(s){if(o[c].match(/[a-z]/)){a?(n+=o[c],n+=`${o[c-2]}-${o[c]}`.toUpperCase(),a=!1):o[c+1]==="-"&&o[c+2]?.match(/[a-z]/)?(n+=o[c],a=!0):n+=`${o[c]}${o[c].toUpperCase()}`;continue}}else if(o[c].match(/[a-z]/)){n+=`[${o[c]}${o[c].toUpperCase()}]`;continue}}if(r.m){if(o[c]==="^"){n+=`(^|(?<=[\r
44
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let l of this.seen.entries()){let d=l[1];if(t===l[0]){s(l);continue}if(o.external){let m=o.external.registry.get(l[0])?.id;if(t!==l[0]&&m){s(l);continue}}if(this.metadataRegistry.get(l[0])?.id){s(l);continue}if(d.cycle){s(l);continue}if(d.count>1&&o.reused==="ref"){s(l);continue}}let a=(l,d)=>{let h=this.seen.get(l),m=h.def??h.schema,p={...m};if(h.ref===null)return;let f=h.ref;if(h.ref=null,f){a(f,d);let _=this.seen.get(f).schema;_.$ref&&d.target==="draft-7"?(m.allOf=m.allOf??[],m.allOf.push(_)):(Object.assign(m,_),Object.assign(m,p))}h.isParent||this.override({zodSchema:l,jsonSchema:m,path:h.path??[]})};for(let l of[...this.seen.entries()].reverse())a(l[0],{target:this.target});let c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),o.external?.uri){let l=o.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");c.$id=o.external.uri(l)}Object.assign(c,n.def);let u=o.external?.defs??{};for(let l of this.seen.entries()){let d=l[1];d.def&&d.defId&&(u[d.defId]=d.def)}o.external||Object.keys(u).length>0&&(this.target==="draft-2020-12"?c.$defs=u:c.definitions=u);try{return JSON.parse(JSON.stringify(c))}catch{throw new Error("Error converting schema to JSON.")}}};function xo(e,t){if(e instanceof yo){let o=new ws(t),n={};for(let a of e._idmap.entries()){let[c,u]=a;o.process(u)}let i={},s={registry:e,uri:t?.uri,defs:n};for(let a of e._idmap.entries()){let[c,u]=a;i[c]=o.emit(u,{...t,external:s})}if(Object.keys(n).length>0){let a=o.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[a]:n}}return{schemas:i}}let r=new ws(t);return r.process(e),r.emit(e,t)}function We(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let n=e._zod.def;switch(n.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return We(n.element,r);case"object":{for(let i in n.shape)if(We(n.shape[i],r))return!0;return!1}case"union":{for(let i of n.options)if(We(i,r))return!0;return!1}case"intersection":return We(n.left,r)||We(n.right,r);case"tuple":{for(let i of n.items)if(We(i,r))return!0;return!!(n.rest&&We(n.rest,r))}case"record":return We(n.keyType,r)||We(n.valueType,r);case"map":return We(n.keyType,r)||We(n.valueType,r);case"set":return We(n.valueType,r);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return We(n.innerType,r);case"lazy":return We(n.getter(),r);case"default":return We(n.innerType,r);case"prefault":return We(n.innerType,r);case"custom":return!1;case"transform":return!0;case"pipe":return We(n.in,r)||We(n.out,r);case"success":return!1;case"catch":return!1;default:}throw new Error(`Unknown schema type: ${n.type}`)}var zy={};var az=v("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");G.init(e,t),e.def=t,e.parse=(r,o)=>yn(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>Mr(e,r,o),e.parseAsync=async(r,o)=>bn(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>Ur(e,r,o),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),e.clone=(r,o)=>tt(e,r,o),e.brand=()=>e,e.register=((r,o)=>(r.add(e,o),e))});var cz=v("ZodMiniObject",(e,t)=>{qi.init(e,t),az.init(e,t),R.defineLazy(e,"shape",()=>t.shape)});function Sf(e,t){let r={type:"object",get shape(){return R.assignProp(this,"shape",{...e}),this.shape},...R.normalizeParams(t)};return new cz(r)}function Rt(e){return!!e._zod}function Tn(e){let t=Object.values(e);if(t.length===0)return Sf({});let r=t.every(Rt),o=t.every(n=>!Rt(n));if(r)return Sf(e);if(o)return yv(e);throw new Error("Mixed Zod versions detected in object shape.")}function Wr(e,t){return Rt(e)?Mr(e,t):e.safeParse(t)}async function Au(e,t){return Rt(e)?await Ur(e,t):await e.safeParseAsync(t)}function Gr(e){if(!e)return;let t;if(Rt(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function So(e){if(e){if(typeof e=="object"){let t=e,r=e;if(!t._def&&!r._zod){let o=Object.values(e);if(o.length>0&&o.every(n=>typeof n=="object"&&n!==null&&(n._def!==void 0||n._zod!==void 0||typeof n.parse=="function")))return Tn(e)}}if(Rt(e)){let r=e._zod?.def;if(r&&(r.type==="object"||r.shape!==void 0))return e}else if(e.shape!==void 0)return e}}function Cu(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 Ey(e){return e.description}function Iy(e){if(Rt(e))return e._zod?.def?.type==="optional";let t=e;return typeof e.isOptional=="function"?e.isOptional():t._def?.typeName==="ZodOptional"}function Du(e){if(Rt(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 r=e._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}let o=e.value;if(o!==void 0)return o}var um={};mn(um,{$brand:()=>Ja,$input:()=>au,$output:()=>su,NEVER:()=>Ha,TimePrecision:()=>uu,ZodAny:()=>Dy,ZodArray:()=>Ly,ZodBase64:()=>Hf,ZodBase64URL:()=>Jf,ZodBigInt:()=>Ts,ZodBigIntFormat:()=>Xf,ZodBoolean:()=>Ss,ZodCIDRv4:()=>Kf,ZodCIDRv6:()=>Bf,ZodCUID:()=>Uf,ZodCUID2:()=>Lf,ZodCatch:()=>rb,ZodCustom:()=>Hu,ZodCustomStringFormat:()=>Ry,ZodDate:()=>Gu,ZodDefault:()=>Jy,ZodDiscriminatedUnion:()=>Zy,ZodE164:()=>Qf,ZodEmail:()=>Cf,ZodEmoji:()=>qf,ZodEnum:()=>$s,ZodError:()=>dz,ZodFile:()=>By,ZodGUID:()=>Zu,ZodIPv4:()=>Wf,ZodIPv6:()=>Gf,ZodISODate:()=>Mu,ZodISODateTime:()=>qu,ZodISODuration:()=>Lu,ZodISOTime:()=>Uu,ZodIntersection:()=>Vy,ZodIssueCode:()=>lE,ZodJWT:()=>Yf,ZodKSUID:()=>Ff,ZodLazy:()=>cb,ZodLiteral:()=>Ky,ZodMap:()=>Wy,ZodNaN:()=>ob,ZodNanoID:()=>Mf,ZodNever:()=>My,ZodNonOptional:()=>im,ZodNull:()=>Cy,ZodNullable:()=>Hy,ZodNumber:()=>xs,ZodNumberFormat:()=>zo,ZodObject:()=>Ku,ZodOptional:()=>om,ZodPipe:()=>sm,ZodPrefault:()=>Yy,ZodPromise:()=>lb,ZodReadonly:()=>ib,ZodRealError:()=>Po,ZodRecord:()=>tm,ZodSet:()=>Gy,ZodString:()=>ks,ZodStringFormat:()=>Ee,ZodSuccess:()=>tb,ZodSymbol:()=>jy,ZodTemplateLiteral:()=>ab,ZodTransform:()=>rm,ZodTuple:()=>Fy,ZodType:()=>te,ZodULID:()=>Zf,ZodURL:()=>Df,ZodUUID:()=>Sr,ZodUndefined:()=>Ay,ZodUnion:()=>em,ZodUnknown:()=>qy,ZodVoid:()=>Uy,ZodXID:()=>Vf,_ZodString:()=>Af,_default:()=>Qy,any:()=>Wz,array:()=>ae,base64:()=>Nz,base64url:()=>Oz,bigint:()=>Uz,boolean:()=>Fe,catch:()=>nb,check:()=>db,cidrv4:()=>Ez,cidrv6:()=>Iz,clone:()=>tt,coerce:()=>cm,config:()=>Le,core:()=>Kt,cuid:()=>$z,cuid2:()=>kz,custom:()=>am,date:()=>Kz,discriminatedUnion:()=>Bu,e164:()=>Rz,email:()=>fz,emoji:()=>bz,endsWith:()=>ms,enum:()=>lt,file:()=>tE,flattenError:()=>lo,float32:()=>Cz,float64:()=>Dz,formatError:()=>po,function:()=>ju,getErrorMap:()=>pE,globalRegistry:()=>Gt,gt:()=>kr,gte:()=>_t,guid:()=>mz,includes:()=>ps,instanceof:()=>aE,int:()=>jf,int32:()=>qz,int64:()=>Lz,intersection:()=>zs,ipv4:()=>Pz,ipv6:()=>zz,iso:()=>To,json:()=>uE,jwt:()=>jz,keyof:()=>Bz,ksuid:()=>Tz,lazy:()=>ub,length:()=>ko,literal:()=>M,locales:()=>vo,looseObject:()=>rt,lowercase:()=>ls,lt:()=>$r,lte:()=>Ot,map:()=>Yz,maxLength:()=>$o,maxSize:()=>wo,mime:()=>hs,minLength:()=>Fr,minSize:()=>Sn,multipleOf:()=>xn,nan:()=>oE,nanoid:()=>wz,nativeEnum:()=>eE,negative:()=>bf,never:()=>Wu,nonnegative:()=>$f,nonoptional:()=>eb,nonpositive:()=>wf,normalize:()=>gs,null:()=>Ps,nullable:()=>Vu,nullish:()=>rE,number:()=>ye,object:()=>D,optional:()=>Oe,overwrite:()=>xr,parse:()=>If,parseAsync:()=>Nf,partialRecord:()=>Qz,pipe:()=>Fu,positive:()=>yf,prefault:()=>Xy,preprocess:()=>Ju,prettifyError:()=>Xa,promise:()=>sE,property:()=>kf,readonly:()=>sb,record:()=>Ie,refine:()=>pb,regex:()=>us,regexes:()=>Lr,registry:()=>Ui,safeParse:()=>Of,safeParseAsync:()=>Rf,set:()=>Xz,setErrorMap:()=>dE,size:()=>cs,startsWith:()=>fs,strictObject:()=>Hz,string:()=>b,stringFormat:()=>Az,stringbool:()=>cE,success:()=>nE,superRefine:()=>fb,symbol:()=>Vz,templateLiteral:()=>iE,toJSONSchema:()=>xo,toLowerCase:()=>vs,toUpperCase:()=>ys,transform:()=>nm,treeifyError:()=>Ya,trim:()=>_s,tuple:()=>Jz,uint32:()=>Mz,uint64:()=>Zz,ulid:()=>xz,undefined:()=>Fz,union:()=>be,unknown:()=>Ne,uppercase:()=>ds,url:()=>yz,uuid:()=>hz,uuidv4:()=>gz,uuidv6:()=>_z,uuidv7:()=>vz,void:()=>Gz,xid:()=>Sz});var To={};mn(To,{ZodISODate:()=>Mu,ZodISODateTime:()=>qu,ZodISODuration:()=>Lu,ZodISOTime:()=>Uu,date:()=>Pf,datetime:()=>Tf,duration:()=>Ef,time:()=>zf});var qu=v("ZodISODateTime",(e,t)=>{of.init(e,t),Ee.init(e,t)});function Tf(e){return df(qu,e)}var Mu=v("ZodISODate",(e,t)=>{sf.init(e,t),Ee.init(e,t)});function Pf(e){return pf(Mu,e)}var Uu=v("ZodISOTime",(e,t)=>{af.init(e,t),Ee.init(e,t)});function zf(e){return ff(Uu,e)}var Lu=v("ZodISODuration",(e,t)=>{cf.init(e,t),Ee.init(e,t)});function Ef(e){return mf(Lu,e)}var Oy=(e,t)=>{ji.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>po(e,r)},flatten:{value:r=>lo(e,r)},addIssue:{value:r=>e.issues.push(r)},addIssues:{value:r=>e.issues.push(...r)},isEmpty:{get(){return e.issues.length===0}}})},dz=v("ZodError",Oy),Po=v("ZodError",Oy,{Parent:Error});var If=ec(Po),Nf=tc(Po),Of=rc(Po),Rf=nc(Po);var te=v("ZodType",(e,t)=>(G.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),e.clone=(r,o)=>tt(e,r,o),e.brand=()=>e,e.register=((r,o)=>(r.add(e,o),e)),e.parse=(r,o)=>If(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>Of(e,r,o),e.parseAsync=async(r,o)=>Nf(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>Rf(e,r,o),e.spa=e.safeParseAsync,e.refine=(r,o)=>e.check(pb(r,o)),e.superRefine=r=>e.check(fb(r)),e.overwrite=r=>e.check(xr(r)),e.optional=()=>Oe(e),e.nullable=()=>Vu(e),e.nullish=()=>Oe(Vu(e)),e.nonoptional=r=>eb(e,r),e.array=()=>ae(e),e.or=r=>be([e,r]),e.and=r=>zs(e,r),e.transform=r=>Fu(e,nm(r)),e.default=r=>Qy(e,r),e.prefault=r=>Xy(e,r),e.catch=r=>nb(e,r),e.pipe=r=>Fu(e,r),e.readonly=()=>sb(e),e.describe=r=>{let o=e.clone();return Gt.add(o,{description:r}),o},Object.defineProperty(e,"description",{get(){return Gt.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Gt.get(e);let o=e.clone();return Gt.add(o,r[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Af=v("_ZodString",(e,t)=>{Zr.init(e,t),te.init(e,t);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...o)=>e.check(us(...o)),e.includes=(...o)=>e.check(ps(...o)),e.startsWith=(...o)=>e.check(fs(...o)),e.endsWith=(...o)=>e.check(ms(...o)),e.min=(...o)=>e.check(Fr(...o)),e.max=(...o)=>e.check($o(...o)),e.length=(...o)=>e.check(ko(...o)),e.nonempty=(...o)=>e.check(Fr(1,...o)),e.lowercase=o=>e.check(ls(o)),e.uppercase=o=>e.check(ds(o)),e.trim=()=>e.check(_s()),e.normalize=(...o)=>e.check(gs(...o)),e.toLowerCase=()=>e.check(vs()),e.toUpperCase=()=>e.check(ys())}),ks=v("ZodString",(e,t)=>{Zr.init(e,t),Af.init(e,t),e.email=r=>e.check(Li(Cf,r)),e.url=r=>e.check(Gi(Df,r)),e.jwt=r=>e.check(as(Yf,r)),e.emoji=r=>e.check(Ki(qf,r)),e.guid=r=>e.check(bo(Zu,r)),e.uuid=r=>e.check(Zi(Sr,r)),e.uuidv4=r=>e.check(Vi(Sr,r)),e.uuidv6=r=>e.check(Fi(Sr,r)),e.uuidv7=r=>e.check(Wi(Sr,r)),e.nanoid=r=>e.check(Bi(Mf,r)),e.guid=r=>e.check(bo(Zu,r)),e.cuid=r=>e.check(Hi(Uf,r)),e.cuid2=r=>e.check(Ji(Lf,r)),e.ulid=r=>e.check(Qi(Zf,r)),e.base64=r=>e.check(os(Hf,r)),e.base64url=r=>e.check(is(Jf,r)),e.xid=r=>e.check(Yi(Vf,r)),e.ksuid=r=>e.check(Xi(Ff,r)),e.ipv4=r=>e.check(es(Wf,r)),e.ipv6=r=>e.check(ts(Gf,r)),e.cidrv4=r=>e.check(rs(Kf,r)),e.cidrv6=r=>e.check(ns(Bf,r)),e.e164=r=>e.check(ss(Qf,r)),e.datetime=r=>e.check(Tf(r)),e.date=r=>e.check(Pf(r)),e.time=r=>e.check(zf(r)),e.duration=r=>e.check(Ef(r))});function b(e){return cu(ks,e)}var Ee=v("ZodStringFormat",(e,t)=>{ke.init(e,t),Af.init(e,t)}),Cf=v("ZodEmail",(e,t)=>{dc.init(e,t),Ee.init(e,t)});function fz(e){return Li(Cf,e)}var Zu=v("ZodGUID",(e,t)=>{uc.init(e,t),Ee.init(e,t)});function mz(e){return bo(Zu,e)}var Sr=v("ZodUUID",(e,t)=>{lc.init(e,t),Ee.init(e,t)});function hz(e){return Zi(Sr,e)}function gz(e){return Vi(Sr,e)}function _z(e){return Fi(Sr,e)}function vz(e){return Wi(Sr,e)}var Df=v("ZodURL",(e,t)=>{pc.init(e,t),Ee.init(e,t)});function yz(e){return Gi(Df,e)}var qf=v("ZodEmoji",(e,t)=>{fc.init(e,t),Ee.init(e,t)});function bz(e){return Ki(qf,e)}var Mf=v("ZodNanoID",(e,t)=>{mc.init(e,t),Ee.init(e,t)});function wz(e){return Bi(Mf,e)}var Uf=v("ZodCUID",(e,t)=>{hc.init(e,t),Ee.init(e,t)});function $z(e){return Hi(Uf,e)}var Lf=v("ZodCUID2",(e,t)=>{gc.init(e,t),Ee.init(e,t)});function kz(e){return Ji(Lf,e)}var Zf=v("ZodULID",(e,t)=>{_c.init(e,t),Ee.init(e,t)});function xz(e){return Qi(Zf,e)}var Vf=v("ZodXID",(e,t)=>{vc.init(e,t),Ee.init(e,t)});function Sz(e){return Yi(Vf,e)}var Ff=v("ZodKSUID",(e,t)=>{yc.init(e,t),Ee.init(e,t)});function Tz(e){return Xi(Ff,e)}var Wf=v("ZodIPv4",(e,t)=>{bc.init(e,t),Ee.init(e,t)});function Pz(e){return es(Wf,e)}var Gf=v("ZodIPv6",(e,t)=>{wc.init(e,t),Ee.init(e,t)});function zz(e){return ts(Gf,e)}var Kf=v("ZodCIDRv4",(e,t)=>{$c.init(e,t),Ee.init(e,t)});function Ez(e){return rs(Kf,e)}var Bf=v("ZodCIDRv6",(e,t)=>{kc.init(e,t),Ee.init(e,t)});function Iz(e){return ns(Bf,e)}var Hf=v("ZodBase64",(e,t)=>{xc.init(e,t),Ee.init(e,t)});function Nz(e){return os(Hf,e)}var Jf=v("ZodBase64URL",(e,t)=>{Sc.init(e,t),Ee.init(e,t)});function Oz(e){return is(Jf,e)}var Qf=v("ZodE164",(e,t)=>{Tc.init(e,t),Ee.init(e,t)});function Rz(e){return ss(Qf,e)}var Yf=v("ZodJWT",(e,t)=>{Pc.init(e,t),Ee.init(e,t)});function jz(e){return as(Yf,e)}var Ry=v("ZodCustomStringFormat",(e,t)=>{zc.init(e,t),Ee.init(e,t)});function Az(e,t,r={}){return Ou(Ry,e,t,r)}var xs=v("ZodNumber",(e,t)=>{Ci.init(e,t),te.init(e,t),e.gt=(o,n)=>e.check(kr(o,n)),e.gte=(o,n)=>e.check(_t(o,n)),e.min=(o,n)=>e.check(_t(o,n)),e.lt=(o,n)=>e.check($r(o,n)),e.lte=(o,n)=>e.check(Ot(o,n)),e.max=(o,n)=>e.check(Ot(o,n)),e.int=o=>e.check(jf(o)),e.safe=o=>e.check(jf(o)),e.positive=o=>e.check(kr(0,o)),e.nonnegative=o=>e.check(_t(0,o)),e.negative=o=>e.check($r(0,o)),e.nonpositive=o=>e.check(Ot(0,o)),e.multipleOf=(o,n)=>e.check(xn(o,n)),e.step=(o,n)=>e.check(xn(o,n)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function ye(e){return lu(xs,e)}var zo=v("ZodNumberFormat",(e,t)=>{Ec.init(e,t),xs.init(e,t)});function jf(e){return du(zo,e)}function Cz(e){return pu(zo,e)}function Dz(e){return fu(zo,e)}function qz(e){return mu(zo,e)}function Mz(e){return hu(zo,e)}var Ss=v("ZodBoolean",(e,t)=>{mo.init(e,t),te.init(e,t)});function Fe(e){return gu(Ss,e)}var Ts=v("ZodBigInt",(e,t)=>{Di.init(e,t),te.init(e,t),e.gte=(o,n)=>e.check(_t(o,n)),e.min=(o,n)=>e.check(_t(o,n)),e.gt=(o,n)=>e.check(kr(o,n)),e.gte=(o,n)=>e.check(_t(o,n)),e.min=(o,n)=>e.check(_t(o,n)),e.lt=(o,n)=>e.check($r(o,n)),e.lte=(o,n)=>e.check(Ot(o,n)),e.max=(o,n)=>e.check(Ot(o,n)),e.positive=o=>e.check(kr(BigInt(0),o)),e.negative=o=>e.check($r(BigInt(0),o)),e.nonpositive=o=>e.check(Ot(BigInt(0),o)),e.nonnegative=o=>e.check(_t(BigInt(0),o)),e.multipleOf=(o,n)=>e.check(xn(o,n));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function Uz(e){return _u(Ts,e)}var Xf=v("ZodBigIntFormat",(e,t)=>{Ic.init(e,t),Ts.init(e,t)});function Lz(e){return vu(Xf,e)}function Zz(e){return yu(Xf,e)}var jy=v("ZodSymbol",(e,t)=>{Nc.init(e,t),te.init(e,t)});function Vz(e){return bu(jy,e)}var Ay=v("ZodUndefined",(e,t)=>{Oc.init(e,t),te.init(e,t)});function Fz(e){return wu(Ay,e)}var Cy=v("ZodNull",(e,t)=>{Rc.init(e,t),te.init(e,t)});function Ps(e){return $u(Cy,e)}var Dy=v("ZodAny",(e,t)=>{jc.init(e,t),te.init(e,t)});function Wz(){return ku(Dy)}var qy=v("ZodUnknown",(e,t)=>{$n.init(e,t),te.init(e,t)});function Ne(){return kn(qy)}var My=v("ZodNever",(e,t)=>{Ac.init(e,t),te.init(e,t)});function Wu(e){return xu(My,e)}var Uy=v("ZodVoid",(e,t)=>{Cc.init(e,t),te.init(e,t)});function Gz(e){return Su(Uy,e)}var Gu=v("ZodDate",(e,t)=>{Dc.init(e,t),te.init(e,t),e.min=(o,n)=>e.check(_t(o,n)),e.max=(o,n)=>e.check(Ot(o,n));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function Kz(e){return Tu(Gu,e)}var Ly=v("ZodArray",(e,t)=>{ho.init(e,t),te.init(e,t),e.element=t.element,e.min=(r,o)=>e.check(Fr(r,o)),e.nonempty=r=>e.check(Fr(1,r)),e.max=(r,o)=>e.check($o(r,o)),e.length=(r,o)=>e.check(ko(r,o)),e.unwrap=()=>e.element});function ae(e,t){return bs(Ly,e,t)}function Bz(e){let t=e._zod.def.shape;return M(Object.keys(t))}var Ku=v("ZodObject",(e,t)=>{qi.init(e,t),te.init(e,t),R.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>lt(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ne()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ne()}),e.strict=()=>e.clone({...e._zod.def,catchall:Wu()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>R.extend(e,r),e.merge=r=>R.merge(e,r),e.pick=r=>R.pick(e,r),e.omit=r=>R.omit(e,r),e.partial=(...r)=>R.partial(om,e,r[0]),e.required=(...r)=>R.required(im,e,r[0])});function D(e,t){let r={type:"object",get shape(){return R.assignProp(this,"shape",{...e}),this.shape},...R.normalizeParams(t)};return new Ku(r)}function Hz(e,t){return new Ku({type:"object",get shape(){return R.assignProp(this,"shape",{...e}),this.shape},catchall:Wu(),...R.normalizeParams(t)})}function rt(e,t){return new Ku({type:"object",get shape(){return R.assignProp(this,"shape",{...e}),this.shape},catchall:Ne(),...R.normalizeParams(t)})}var em=v("ZodUnion",(e,t)=>{Mi.init(e,t),te.init(e,t),e.options=t.options});function be(e,t){return new em({type:"union",options:e,...R.normalizeParams(t)})}var Zy=v("ZodDiscriminatedUnion",(e,t)=>{em.init(e,t),qc.init(e,t)});function Bu(e,t,r){return new Zy({type:"union",options:t,discriminator:e,...R.normalizeParams(r)})}var Vy=v("ZodIntersection",(e,t)=>{Mc.init(e,t),te.init(e,t)});function zs(e,t){return new Vy({type:"intersection",left:e,right:t})}var Fy=v("ZodTuple",(e,t)=>{Vr.init(e,t),te.init(e,t),e.rest=r=>e.clone({...e._zod.def,rest:r})});function Jz(e,t,r){let o=t instanceof G,n=o?r:t,i=o?t:null;return new Fy({type:"tuple",items:e,rest:i,...R.normalizeParams(n)})}var tm=v("ZodRecord",(e,t)=>{Uc.init(e,t),te.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Ie(e,t,r){return new tm({type:"record",keyType:e,valueType:t,...R.normalizeParams(r)})}function Qz(e,t,r){return new tm({type:"record",keyType:be([e,Wu()]),valueType:t,...R.normalizeParams(r)})}var Wy=v("ZodMap",(e,t)=>{Lc.init(e,t),te.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Yz(e,t,r){return new Wy({type:"map",keyType:e,valueType:t,...R.normalizeParams(r)})}var Gy=v("ZodSet",(e,t)=>{Zc.init(e,t),te.init(e,t),e.min=(...r)=>e.check(Sn(...r)),e.nonempty=r=>e.check(Sn(1,r)),e.max=(...r)=>e.check(wo(...r)),e.size=(...r)=>e.check(cs(...r))});function Xz(e,t){return new Gy({type:"set",valueType:e,...R.normalizeParams(t)})}var $s=v("ZodEnum",(e,t)=>{Vc.init(e,t),te.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(o,n)=>{let i={};for(let s of o)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new $s({...t,checks:[],...R.normalizeParams(n),entries:i})},e.exclude=(o,n)=>{let i={...t.entries};for(let s of o)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new $s({...t,checks:[],...R.normalizeParams(n),entries:i})}});function lt(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new $s({type:"enum",entries:r,...R.normalizeParams(t)})}function eE(e,t){return new $s({type:"enum",entries:e,...R.normalizeParams(t)})}var Ky=v("ZodLiteral",(e,t)=>{Fc.init(e,t),te.init(e,t),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 M(e,t){return new Ky({type:"literal",values:Array.isArray(e)?e:[e],...R.normalizeParams(t)})}var By=v("ZodFile",(e,t)=>{Wc.init(e,t),te.init(e,t),e.min=(r,o)=>e.check(Sn(r,o)),e.max=(r,o)=>e.check(wo(r,o)),e.mime=(r,o)=>e.check(hs(Array.isArray(r)?r:[r],o))});function tE(e){return zu(By,e)}var rm=v("ZodTransform",(e,t)=>{go.init(e,t),te.init(e,t),e._zod.parse=(r,o)=>{r.addIssue=i=>{if(typeof i=="string")r.issues.push(R.issue(i,r.value,t));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),s.continue??(s.continue=!0),r.issues.push(R.issue(s))}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(i=>(r.value=i,r)):(r.value=n,r)}});function nm(e){return new rm({type:"transform",transform:e})}var om=v("ZodOptional",(e,t)=>{Gc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Oe(e){return new om({type:"optional",innerType:e})}var Hy=v("ZodNullable",(e,t)=>{Kc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Vu(e){return new Hy({type:"nullable",innerType:e})}function rE(e){return Oe(Vu(e))}var Jy=v("ZodDefault",(e,t)=>{Bc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Qy(e,t){return new Jy({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}var Yy=v("ZodPrefault",(e,t)=>{Hc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Xy(e,t){return new Yy({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}var im=v("ZodNonOptional",(e,t)=>{Jc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function eb(e,t){return new im({type:"nonoptional",innerType:e,...R.normalizeParams(t)})}var tb=v("ZodSuccess",(e,t)=>{Qc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function nE(e){return new tb({type:"success",innerType:e})}var rb=v("ZodCatch",(e,t)=>{Yc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function nb(e,t){return new rb({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var ob=v("ZodNaN",(e,t)=>{Xc.init(e,t),te.init(e,t)});function oE(e){return Pu(ob,e)}var sm=v("ZodPipe",(e,t)=>{_o.init(e,t),te.init(e,t),e.in=t.in,e.out=t.out});function Fu(e,t){return new sm({type:"pipe",in:e,out:t})}var ib=v("ZodReadonly",(e,t)=>{eu.init(e,t),te.init(e,t)});function sb(e){return new ib({type:"readonly",innerType:e})}var ab=v("ZodTemplateLiteral",(e,t)=>{tu.init(e,t),te.init(e,t)});function iE(e,t){return new ab({type:"template_literal",parts:e,...R.normalizeParams(t)})}var cb=v("ZodLazy",(e,t)=>{nu.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.getter()});function ub(e){return new cb({type:"lazy",getter:e})}var lb=v("ZodPromise",(e,t)=>{ru.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function sE(e){return new lb({type:"promise",innerType:e})}var Hu=v("ZodCustom",(e,t)=>{ou.init(e,t),te.init(e,t)});function db(e){let t=new De({check:"custom"});return t._zod.check=e,t}function am(e,t){return Eu(Hu,e??(()=>!0),t)}function pb(e,t={}){return Iu(Hu,e,t)}function fb(e){let t=db(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(R.issue(o,r.value,t._zod.def));else{let n=o;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=t),n.continue??(n.continue=!t._zod.def.abort),r.issues.push(R.issue(n))}},e(r.value,r)));return t}function aE(e,t={error:`Input not instance of ${e.name}`}){let r=new Hu({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...R.normalizeParams(t)});return r._zod.bag.Class=e,r}var cE=(...e)=>Nu({Pipe:sm,Boolean:Ss,String:ks,Transform:rm},...e);function uE(e){let t=ub(()=>be([b(e),ye(),Fe(),Ps(),ae(t),Ie(b(),t)]));return t}function Ju(e,t){return Fu(nm(e),t)}var lE={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 dE(e){Le({customError:e})}function pE(){return Le().customError}var cm={};mn(cm,{bigint:()=>gE,boolean:()=>hE,date:()=>_E,number:()=>mE,string:()=>fE});function fE(e){return lf(ks,e)}function mE(e){return hf(xs,e)}function hE(e){return gf(Ss,e)}function gE(e){return _f(Ts,e)}function _E(e){return vf(Gu,e)}Le(iu());var mb=um;var g=mb;var dm="2025-11-25";var hb=[dm,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Kr="io.modelcontextprotocol/related-task",Yu="2.0",Ke=am(e=>e!==null&&(typeof e=="object"||typeof e=="function")),gb=be([b(),ye().int()]),_b=b(),lF=rt({ttl:be([ye(),Ps()]).optional(),pollInterval:ye().optional()}),yE=D({ttl:ye().optional()}),bE=D({taskId:b()}),pm=rt({progressToken:gb.optional(),[Kr]:bE.optional()}),It=D({_meta:pm.optional()}),Es=It.extend({task:yE.optional()}),vb=e=>Es.safeParse(e).success,Be=D({method:b(),params:It.loose().optional()}),jt=D({_meta:pm.optional()}),At=D({method:b(),params:jt.loose().optional()}),He=rt({_meta:pm.optional()}),Xu=be([b(),ye().int()]),yb=D({jsonrpc:M(Yu),id:Xu,...Be.shape}).strict(),fm=e=>yb.safeParse(e).success,bb=D({jsonrpc:M(Yu),...At.shape}).strict(),wb=e=>bb.safeParse(e).success,mm=D({jsonrpc:M(Yu),id:Xu,result:He}).strict(),Is=e=>mm.safeParse(e).success;var V;(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"})(V||(V={}));var hm=D({jsonrpc:M(Yu),id:Xu.optional(),error:D({code:ye().int(),message:b(),data:Ne().optional()})}).strict();var $b=e=>hm.safeParse(e).success;var kb=be([yb,bb,mm,hm]),dF=be([mm,hm]),el=He.strict(),wE=jt.extend({requestId:Xu.optional(),reason:b().optional()}),tl=At.extend({method:M("notifications/cancelled"),params:wE}),$E=D({src:b(),mimeType:b().optional(),sizes:ae(b()).optional(),theme:lt(["light","dark"]).optional()}),Ns=D({icons:ae($E).optional()}),Eo=D({name:b(),title:b().optional()}),xb=Eo.extend({...Eo.shape,...Ns.shape,version:b(),websiteUrl:b().optional(),description:b().optional()}),kE=zs(D({applyDefaults:Fe().optional()}),Ie(b(),Ne())),xE=Ju(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,zs(D({form:kE.optional(),url:Ke.optional()}),Ie(b(),Ne()).optional())),SE=rt({list:Ke.optional(),cancel:Ke.optional(),requests:rt({sampling:rt({createMessage:Ke.optional()}).optional(),elicitation:rt({create:Ke.optional()}).optional()}).optional()}),TE=rt({list:Ke.optional(),cancel:Ke.optional(),requests:rt({tools:rt({call:Ke.optional()}).optional()}).optional()}),PE=D({experimental:Ie(b(),Ke).optional(),sampling:D({context:Ke.optional(),tools:Ke.optional()}).optional(),elicitation:xE.optional(),roots:D({listChanged:Fe().optional()}).optional(),tasks:SE.optional()}),zE=It.extend({protocolVersion:b(),capabilities:PE,clientInfo:xb}),gm=Be.extend({method:M("initialize"),params:zE});var EE=D({experimental:Ie(b(),Ke).optional(),logging:Ke.optional(),completions:Ke.optional(),prompts:D({listChanged:Fe().optional()}).optional(),resources:D({subscribe:Fe().optional(),listChanged:Fe().optional()}).optional(),tools:D({listChanged:Fe().optional()}).optional(),tasks:TE.optional()}),IE=He.extend({protocolVersion:b(),capabilities:EE,serverInfo:xb,instructions:b().optional()}),_m=At.extend({method:M("notifications/initialized"),params:jt.optional()});var rl=Be.extend({method:M("ping"),params:It.optional()}),NE=D({progress:ye(),total:Oe(ye()),message:Oe(b())}),OE=D({...jt.shape,...NE.shape,progressToken:gb}),nl=At.extend({method:M("notifications/progress"),params:OE}),RE=It.extend({cursor:_b.optional()}),Os=Be.extend({params:RE.optional()}),Rs=He.extend({nextCursor:_b.optional()}),jE=lt(["working","input_required","completed","failed","cancelled"]),js=D({taskId:b(),status:jE,ttl:be([ye(),Ps()]),createdAt:b(),lastUpdatedAt:b(),pollInterval:Oe(ye()),statusMessage:Oe(b())}),Io=He.extend({task:js}),AE=jt.merge(js),As=At.extend({method:M("notifications/tasks/status"),params:AE}),ol=Be.extend({method:M("tasks/get"),params:It.extend({taskId:b()})}),il=He.merge(js),sl=Be.extend({method:M("tasks/result"),params:It.extend({taskId:b()})}),pF=He.loose(),al=Os.extend({method:M("tasks/list")}),cl=Rs.extend({tasks:ae(js)}),ul=Be.extend({method:M("tasks/cancel"),params:It.extend({taskId:b()})}),Sb=He.merge(js),Tb=D({uri:b(),mimeType:Oe(b()),_meta:Ie(b(),Ne()).optional()}),Pb=Tb.extend({text:b()}),vm=b().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),zb=Tb.extend({blob:vm}),Cs=lt(["user","assistant"]),No=D({audience:ae(Cs).optional(),priority:ye().min(0).max(1).optional(),lastModified:To.datetime({offset:!0}).optional()}),Eb=D({...Eo.shape,...Ns.shape,uri:b(),description:Oe(b()),mimeType:Oe(b()),annotations:No.optional(),_meta:Oe(rt({}))}),CE=D({...Eo.shape,...Ns.shape,uriTemplate:b(),description:Oe(b()),mimeType:Oe(b()),annotations:No.optional(),_meta:Oe(rt({}))}),ll=Os.extend({method:M("resources/list")}),DE=Rs.extend({resources:ae(Eb)}),dl=Os.extend({method:M("resources/templates/list")}),qE=Rs.extend({resourceTemplates:ae(CE)}),ym=It.extend({uri:b()}),ME=ym,pl=Be.extend({method:M("resources/read"),params:ME}),UE=He.extend({contents:ae(be([Pb,zb]))}),LE=At.extend({method:M("notifications/resources/list_changed"),params:jt.optional()}),ZE=ym,VE=Be.extend({method:M("resources/subscribe"),params:ZE}),FE=ym,WE=Be.extend({method:M("resources/unsubscribe"),params:FE}),GE=jt.extend({uri:b()}),KE=At.extend({method:M("notifications/resources/updated"),params:GE}),BE=D({name:b(),description:Oe(b()),required:Oe(Fe())}),HE=D({...Eo.shape,...Ns.shape,description:Oe(b()),arguments:Oe(ae(BE)),_meta:Oe(rt({}))}),fl=Os.extend({method:M("prompts/list")}),JE=Rs.extend({prompts:ae(HE)}),QE=It.extend({name:b(),arguments:Ie(b(),b()).optional()}),ml=Be.extend({method:M("prompts/get"),params:QE}),bm=D({type:M("text"),text:b(),annotations:No.optional(),_meta:Ie(b(),Ne()).optional()}),wm=D({type:M("image"),data:vm,mimeType:b(),annotations:No.optional(),_meta:Ie(b(),Ne()).optional()}),$m=D({type:M("audio"),data:vm,mimeType:b(),annotations:No.optional(),_meta:Ie(b(),Ne()).optional()}),YE=D({type:M("tool_use"),name:b(),id:b(),input:Ie(b(),Ne()),_meta:Ie(b(),Ne()).optional()}),XE=D({type:M("resource"),resource:be([Pb,zb]),annotations:No.optional(),_meta:Ie(b(),Ne()).optional()}),eI=Eb.extend({type:M("resource_link")}),km=be([bm,wm,$m,eI,XE]),tI=D({role:Cs,content:km}),rI=He.extend({description:b().optional(),messages:ae(tI)}),nI=At.extend({method:M("notifications/prompts/list_changed"),params:jt.optional()}),oI=D({title:b().optional(),readOnlyHint:Fe().optional(),destructiveHint:Fe().optional(),idempotentHint:Fe().optional(),openWorldHint:Fe().optional()}),iI=D({taskSupport:lt(["required","optional","forbidden"]).optional()}),Ib=D({...Eo.shape,...Ns.shape,description:b().optional(),inputSchema:D({type:M("object"),properties:Ie(b(),Ke).optional(),required:ae(b()).optional()}).catchall(Ne()),outputSchema:D({type:M("object"),properties:Ie(b(),Ke).optional(),required:ae(b()).optional()}).catchall(Ne()).optional(),annotations:oI.optional(),execution:iI.optional(),_meta:Ie(b(),Ne()).optional()}),hl=Os.extend({method:M("tools/list")}),sI=Rs.extend({tools:ae(Ib)}),gl=He.extend({content:ae(km).default([]),structuredContent:Ie(b(),Ne()).optional(),isError:Fe().optional()}),fF=gl.or(He.extend({toolResult:Ne()})),aI=Es.extend({name:b(),arguments:Ie(b(),Ne()).optional()}),Oo=Be.extend({method:M("tools/call"),params:aI}),cI=At.extend({method:M("notifications/tools/list_changed"),params:jt.optional()}),mF=D({autoRefresh:Fe().default(!0),debounceMs:ye().int().nonnegative().default(300)}),Ds=lt(["debug","info","notice","warning","error","critical","alert","emergency"]),uI=It.extend({level:Ds}),xm=Be.extend({method:M("logging/setLevel"),params:uI}),lI=jt.extend({level:Ds,logger:b().optional(),data:Ne()}),dI=At.extend({method:M("notifications/message"),params:lI}),pI=D({name:b().optional()}),fI=D({hints:ae(pI).optional(),costPriority:ye().min(0).max(1).optional(),speedPriority:ye().min(0).max(1).optional(),intelligencePriority:ye().min(0).max(1).optional()}),mI=D({mode:lt(["auto","required","none"]).optional()}),hI=D({type:M("tool_result"),toolUseId:b().describe("The unique identifier for the corresponding tool call."),content:ae(km).default([]),structuredContent:D({}).loose().optional(),isError:Fe().optional(),_meta:Ie(b(),Ne()).optional()}),gI=Bu("type",[bm,wm,$m]),Qu=Bu("type",[bm,wm,$m,YE,hI]),_I=D({role:Cs,content:be([Qu,ae(Qu)]),_meta:Ie(b(),Ne()).optional()}),vI=Es.extend({messages:ae(_I),modelPreferences:fI.optional(),systemPrompt:b().optional(),includeContext:lt(["none","thisServer","allServers"]).optional(),temperature:ye().optional(),maxTokens:ye().int(),stopSequences:ae(b()).optional(),metadata:Ke.optional(),tools:ae(Ib).optional(),toolChoice:mI.optional()}),yI=Be.extend({method:M("sampling/createMessage"),params:vI}),qs=He.extend({model:b(),stopReason:Oe(lt(["endTurn","stopSequence","maxTokens"]).or(b())),role:Cs,content:gI}),Sm=He.extend({model:b(),stopReason:Oe(lt(["endTurn","stopSequence","maxTokens","toolUse"]).or(b())),role:Cs,content:be([Qu,ae(Qu)])}),bI=D({type:M("boolean"),title:b().optional(),description:b().optional(),default:Fe().optional()}),wI=D({type:M("string"),title:b().optional(),description:b().optional(),minLength:ye().optional(),maxLength:ye().optional(),format:lt(["email","uri","date","date-time"]).optional(),default:b().optional()}),$I=D({type:lt(["number","integer"]),title:b().optional(),description:b().optional(),minimum:ye().optional(),maximum:ye().optional(),default:ye().optional()}),kI=D({type:M("string"),title:b().optional(),description:b().optional(),enum:ae(b()),default:b().optional()}),xI=D({type:M("string"),title:b().optional(),description:b().optional(),oneOf:ae(D({const:b(),title:b()})),default:b().optional()}),SI=D({type:M("string"),title:b().optional(),description:b().optional(),enum:ae(b()),enumNames:ae(b()).optional(),default:b().optional()}),TI=be([kI,xI]),PI=D({type:M("array"),title:b().optional(),description:b().optional(),minItems:ye().optional(),maxItems:ye().optional(),items:D({type:M("string"),enum:ae(b())}),default:ae(b()).optional()}),zI=D({type:M("array"),title:b().optional(),description:b().optional(),minItems:ye().optional(),maxItems:ye().optional(),items:D({anyOf:ae(D({const:b(),title:b()}))}),default:ae(b()).optional()}),EI=be([PI,zI]),II=be([SI,TI,EI]),NI=be([II,bI,wI,$I]),OI=Es.extend({mode:M("form").optional(),message:b(),requestedSchema:D({type:M("object"),properties:Ie(b(),NI),required:ae(b()).optional()})}),RI=Es.extend({mode:M("url"),message:b(),elicitationId:b(),url:b().url()}),jI=be([OI,RI]),AI=Be.extend({method:M("elicitation/create"),params:jI}),CI=jt.extend({elicitationId:b()}),DI=At.extend({method:M("notifications/elicitation/complete"),params:CI}),Ro=He.extend({action:lt(["accept","decline","cancel"]),content:Ju(e=>e===null?void 0:e,Ie(b(),be([b(),ye(),Fe(),ae(b())])).optional())}),qI=D({type:M("ref/resource"),uri:b()});var MI=D({type:M("ref/prompt"),name:b()}),UI=It.extend({ref:be([MI,qI]),argument:D({name:b(),value:b()}),context:D({arguments:Ie(b(),b()).optional()}).optional()}),_l=Be.extend({method:M("completion/complete"),params:UI});function Nb(e){if(e.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function Ob(e){if(e.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}var LI=He.extend({completion:rt({values:ae(b()).max(100),total:Oe(ye().int()),hasMore:Oe(Fe())})}),ZI=D({uri:b().startsWith("file://"),name:b().optional(),_meta:Ie(b(),Ne()).optional()}),VI=Be.extend({method:M("roots/list"),params:It.optional()}),Tm=He.extend({roots:ae(ZI)}),FI=At.extend({method:M("notifications/roots/list_changed"),params:jt.optional()}),hF=be([rl,gm,_l,xm,ml,fl,ll,dl,pl,VE,WE,Oo,hl,ol,sl,al,ul]),gF=be([tl,nl,_m,FI,As]),_F=be([el,qs,Sm,Ro,Tm,il,cl,Io]),vF=be([rl,yI,AI,VI,ol,sl,al,ul]),yF=be([tl,nl,dI,KE,LE,cI,nI,As,DI]),bF=be([el,IE,LI,rI,JE,DE,qE,UE,gl,sI,il,cl,Io]),U=class e extends Error{constructor(t,r,o){super(`MCP error ${t}: ${r}`),this.code=t,this.data=o,this.name="McpError"}static fromError(t,r,o){if(t===V.UrlElicitationRequired&&o){let n=o;if(n.elicitations)return new lm(n.elicitations,r)}return new e(t,r,o)}},lm=class extends U{constructor(t,r=`URL elicitation${t.length>1?"s":""} required`){super(V.UrlElicitationRequired,r,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}};function Br(e){return e==="completed"||e==="failed"||e==="cancelled"}var jb=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"},Ab=e=>typeof e=="string"?{...Rb,name:e}:{...Rb,...e};var Cb=e=>{let t=Ab(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,flags:{hasReferencedOpenAiAnyType:!1},currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([o,n])=>[n._def,{def:n._def,path:[...t.basePath,t.definitionPath,o],jsonSchema:void 0}]))}};function Pm(e,t,r,o){o?.errorMessages&&r&&(e.errorMessage={...e.errorMessage,[t]:r})}function ue(e,t,r,o,n){e[t]=r,Pm(e,t,o,n)}var vl=(e,t)=>{let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];r++);return[(e.length-r).toString(),...t.slice(r)].join("/")};function qe(e){if(e.target!=="openAi")return{};let t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:e.$refStrategy==="relative"?vl(t,e.currentPath):t.join("/")}}function Db(e,t){let r={type:"array"};return e.type?._def&&e.type?._def?.typeName!==E.ZodAny&&(r.items=W(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&ue(r,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&ue(r,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(ue(r,"minItems",e.exactLength.value,e.exactLength.message,t),ue(r,"maxItems",e.exactLength.value,e.exactLength.message,t)),r}function qb(e,t){let r={type:"integer",format:"int64"};if(!e.checks)return r;for(let o of e.checks)switch(o.kind){case"min":t.target==="jsonSchema7"?o.inclusive?ue(r,"minimum",o.value,o.message,t):ue(r,"exclusiveMinimum",o.value,o.message,t):(o.inclusive||(r.exclusiveMinimum=!0),ue(r,"minimum",o.value,o.message,t));break;case"max":t.target==="jsonSchema7"?o.inclusive?ue(r,"maximum",o.value,o.message,t):ue(r,"exclusiveMaximum",o.value,o.message,t):(o.inclusive||(r.exclusiveMaximum=!0),ue(r,"maximum",o.value,o.message,t));break;case"multipleOf":ue(r,"multipleOf",o.value,o.message,t);break}return r}function Mb(){return{type:"boolean"}}function yl(e,t){return W(e.type._def,t)}var Ub=(e,t)=>W(e.innerType._def,t);function zm(e,t,r){let o=r??t.dateStrategy;if(Array.isArray(o))return{anyOf:o.map((n,i)=>zm(e,t,n))};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 WI(e,t)}}var WI=(e,t)=>{let r={type:"integer",format:"unix-time"};if(t.target==="openApi3")return r;for(let o of e.checks)switch(o.kind){case"min":ue(r,"minimum",o.value,o.message,t);break;case"max":ue(r,"maximum",o.value,o.message,t);break}return r};function Lb(e,t){return{...W(e.innerType._def,t),default:e.defaultValue()}}function Zb(e,t){return t.effectStrategy==="input"?W(e.schema._def,t):qe(t)}function Vb(e){return{type:"string",enum:Array.from(e.values)}}var GI=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function Fb(e,t){let r=[W(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),W(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(i=>!!i),o=t.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,n=[];return r.forEach(i=>{if(GI(i))n.push(...i.allOf),i.unevaluatedProperties===void 0&&(o=void 0);else{let s=i;if("additionalProperties"in i&&i.additionalProperties===!1){let{additionalProperties:a,...c}=i;s=c}else o=void 0;n.push(s)}}),n.length?{allOf:n,...o}:void 0}function Wb(e,t){let r=typeof e.value;return r!=="bigint"&&r!=="number"&&r!=="boolean"&&r!=="string"?{type:Array.isArray(e.value)?"array":"object"}:t.target==="openApi3"?{type:r==="bigint"?"integer":r,enum:[e.value]}:{type:r==="bigint"?"integer":r,const:e.value}}var Em,Bt={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:()=>(Em===void 0&&(Em=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Em),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 r={type:"string"};if(e.checks)for(let o of e.checks)switch(o.kind){case"min":ue(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,o.value):o.value,o.message,t);break;case"max":ue(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,o.value):o.value,o.message,t);break;case"email":switch(t.emailStrategy){case"format:email":Ht(r,"email",o.message,t);break;case"format:idn-email":Ht(r,"idn-email",o.message,t);break;case"pattern:zod":dt(r,Bt.email,o.message,t);break}break;case"url":Ht(r,"uri",o.message,t);break;case"uuid":Ht(r,"uuid",o.message,t);break;case"regex":dt(r,o.regex,o.message,t);break;case"cuid":dt(r,Bt.cuid,o.message,t);break;case"cuid2":dt(r,Bt.cuid2,o.message,t);break;case"startsWith":dt(r,RegExp(`^${Im(o.value,t)}`),o.message,t);break;case"endsWith":dt(r,RegExp(`${Im(o.value,t)}$`),o.message,t);break;case"datetime":Ht(r,"date-time",o.message,t);break;case"date":Ht(r,"date",o.message,t);break;case"time":Ht(r,"time",o.message,t);break;case"duration":Ht(r,"duration",o.message,t);break;case"length":ue(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,o.value):o.value,o.message,t),ue(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,o.value):o.value,o.message,t);break;case"includes":{dt(r,RegExp(Im(o.value,t)),o.message,t);break}case"ip":{o.version!=="v6"&&Ht(r,"ipv4",o.message,t),o.version!=="v4"&&Ht(r,"ipv6",o.message,t);break}case"base64url":dt(r,Bt.base64url,o.message,t);break;case"jwt":dt(r,Bt.jwt,o.message,t);break;case"cidr":{o.version!=="v6"&&dt(r,Bt.ipv4Cidr,o.message,t),o.version!=="v4"&&dt(r,Bt.ipv6Cidr,o.message,t);break}case"emoji":dt(r,Bt.emoji(),o.message,t);break;case"ulid":{dt(r,Bt.ulid,o.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{Ht(r,"binary",o.message,t);break}case"contentEncoding:base64":{ue(r,"contentEncoding","base64",o.message,t);break}case"pattern:zod":{dt(r,Bt.base64,o.message,t);break}}break}case"nanoid":dt(r,Bt.nanoid,o.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return r}function Im(e,t){return t.patternStrategy==="escape"?BI(e):e}var KI=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function BI(e){let t="";for(let r=0;r<e.length;r++)KI.has(e[r])||(t+="\\"),t+=e[r];return t}function Ht(e,t,r,o){e.format||e.anyOf?.some(n=>n.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,...r&&o.errorMessages&&{errorMessage:{format:r}}})):ue(e,"format",t,r,o)}function dt(e,t,r,o){e.pattern||e.allOf?.some(n=>n.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:Gb(t,o),...r&&o.errorMessages&&{errorMessage:{pattern:r}}})):ue(e,"pattern",Gb(t,o),r,o)}function Gb(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;let r={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},o=r.i?e.source.toLowerCase():e.source,n="",i=!1,s=!1,a=!1;for(let c=0;c<o.length;c++){if(i){n+=o[c],i=!1;continue}if(r.i){if(s){if(o[c].match(/[a-z]/)){a?(n+=o[c],n+=`${o[c-2]}-${o[c]}`.toUpperCase(),a=!1):o[c+1]==="-"&&o[c+2]?.match(/[a-z]/)?(n+=o[c],a=!0):n+=`${o[c]}${o[c].toUpperCase()}`;continue}}else if(o[c].match(/[a-z]/)){n+=`[${o[c]}${o[c].toUpperCase()}]`;continue}}if(r.m){if(o[c]==="^"){n+=`(^|(?<=[\r
45
45
  ]))`;continue}else if(o[c]==="$"){n+=`($|(?=[\r
46
46
  ]))`;continue}}if(r.s&&o[c]==="."){n+=s?`${o[c]}\r
47
47
  `:`[${o[c]}\r
48
- ]`;continue}n+=o[c],o[c]==="\\"?i=!0:s&&o[c]==="]"?s=!1:!s&&o[c]==="["&&(s=!0)}try{new RegExp(n)}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 n}function yl(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===z.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((o,n)=>({...o,[n]:W(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",n]})??qe(t)}),{}),additionalProperties:t.rejectedAdditionalProperties};let r={type:"object",additionalProperties:W(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if(t.target==="openApi3")return r;if(e.keyType?._def.typeName===z.ZodString&&e.keyType._def.checks?.length){let{type:o,...n}=vl(e.keyType._def,t);return{...r,propertyNames:n}}else{if(e.keyType?._def.typeName===z.ZodEnum)return{...r,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===z.ZodBranded&&e.keyType._def.type._def.typeName===z.ZodString&&e.keyType._def.type._def.checks?.length){let{type:o,...n}=_l(e.keyType._def,t);return{...r,propertyNames:n}}}return r}function Gb(e,t){if(t.mapStrategy==="record")return yl(e,t);let r=W(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||qe(t),o=W(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||qe(t);return{type:"array",maxItems:125,items:{type:"array",items:[r,o],minItems:2,maxItems:2}}}function Kb(e){let t=e.values,o=Object.keys(e.values).filter(i=>typeof t[t[i]]!="number").map(i=>t[i]),n=Array.from(new Set(o.map(i=>typeof i)));return{type:n.length===1?n[0]==="string"?"string":"number":["string","number"],enum:o}}function Hb(e){return e.target==="openAi"?void 0:{not:qe({...e,currentPath:[...e.currentPath,"not"]})}}function Bb(e){return e.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var Cs={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function Qb(e,t){if(t.target==="openApi3")return Jb(e,t);let r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(o=>o._def.typeName in Cs&&(!o._def.checks||!o._def.checks.length))){let o=r.reduce((n,i)=>{let s=Cs[i._def.typeName];return s&&!n.includes(s)?[...n,s]:n},[]);return{type:o.length>1?o:o[0]}}else if(r.every(o=>o._def.typeName==="ZodLiteral"&&!o.description)){let o=r.reduce((n,i)=>{let s=typeof i._def.value;switch(s){case"string":case"number":case"boolean":return[...n,s];case"bigint":return[...n,"integer"];case"object":if(i._def.value===null)return[...n,"null"];case"symbol":case"undefined":case"function":default:return n}},[]);if(o.length===r.length){let n=o.filter((i,s,a)=>a.indexOf(i)===s);return{type:n.length>1?n:n[0],enum:r.reduce((i,s)=>i.includes(s._def.value)?i:[...i,s._def.value],[])}}}else if(r.every(o=>o._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((o,n)=>[...o,...n._def.values.filter(i=>!o.includes(i))],[])};return Jb(e,t)}var Jb=(e,t)=>{let r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((o,n)=>W(o._def,{...t,currentPath:[...t.currentPath,"anyOf",`${n}`]})).filter(o=>!!o&&(!t.strictUnions||typeof o=="object"&&Object.keys(o).length>0));return r.length?{anyOf:r}:void 0};function Yb(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:Cs[e.innerType._def.typeName],nullable:!0}:{type:[Cs[e.innerType._def.typeName],"null"]};if(t.target==="openApi3"){let o=W(e.innerType._def,{...t,currentPath:[...t.currentPath]});return o&&"$ref"in o?{allOf:[o],nullable:!0}:o&&{...o,nullable:!0}}let r=W(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function Xb(e,t){let r={type:"number"};if(!e.checks)return r;for(let o of e.checks)switch(o.kind){case"int":r.type="integer",Tm(r,"type",o.message,t);break;case"min":t.target==="jsonSchema7"?o.inclusive?ue(r,"minimum",o.value,o.message,t):ue(r,"exclusiveMinimum",o.value,o.message,t):(o.inclusive||(r.exclusiveMinimum=!0),ue(r,"minimum",o.value,o.message,t));break;case"max":t.target==="jsonSchema7"?o.inclusive?ue(r,"maximum",o.value,o.message,t):ue(r,"exclusiveMaximum",o.value,o.message,t):(o.inclusive||(r.exclusiveMaximum=!0),ue(r,"maximum",o.value,o.message,t));break;case"multipleOf":ue(r,"multipleOf",o.value,o.message,t);break}return r}function ew(e,t){let r=t.target==="openAi",o={type:"object",properties:{}},n=[],i=e.shape();for(let a in i){let c=i[a];if(c===void 0||c._def===void 0)continue;let u=GE(c);u&&r&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),u=!1);let l=W(c._def,{...t,currentPath:[...t.currentPath,"properties",a],propertyPath:[...t.currentPath,"properties",a]});l!==void 0&&(o.properties[a]=l,u||n.push(a))}n.length&&(o.required=n);let s=WE(e,t);return s!==void 0&&(o.additionalProperties=s),o}function WE(e,t){if(e.catchall._def.typeName!=="ZodNever")return W(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 GE(e){try{return e.isOptional()}catch{return!0}}var tw=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return W(e.innerType._def,t);let r=W(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:qe(t)},r]}:qe(t)};var rw=(e,t)=>{if(t.pipeStrategy==="input")return W(e.in._def,t);if(t.pipeStrategy==="output")return W(e.out._def,t);let r=W(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),o=W(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,o].filter(n=>n!==void 0)}};function nw(e,t){return W(e.type._def,t)}function ow(e,t){let o={type:"array",uniqueItems:!0,items:W(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&ue(o,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&ue(o,"maxItems",e.maxSize.value,e.maxSize.message,t),o}function iw(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,o)=>W(r._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]})).reduce((r,o)=>o===void 0?r:[...r,o],[]),additionalItems:W(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,o)=>W(r._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]})).reduce((r,o)=>o===void 0?r:[...r,o],[])}}function sw(e){return{not:qe(e)}}function aw(e){return qe(e)}var cw=(e,t)=>W(e.innerType._def,t);var uw=(e,t,r)=>{switch(t){case z.ZodString:return vl(e,r);case z.ZodNumber:return Xb(e,r);case z.ZodObject:return ew(e,r);case z.ZodBigInt:return Cb(e,r);case z.ZodBoolean:return qb();case z.ZodDate:return Pm(e,r);case z.ZodUndefined:return sw(r);case z.ZodNull:return Bb(r);case z.ZodArray:return Db(e,r);case z.ZodUnion:case z.ZodDiscriminatedUnion:return Qb(e,r);case z.ZodIntersection:return Vb(e,r);case z.ZodTuple:return iw(e,r);case z.ZodRecord:return yl(e,r);case z.ZodLiteral:return Fb(e,r);case z.ZodEnum:return Zb(e);case z.ZodNativeEnum:return Kb(e);case z.ZodNullable:return Yb(e,r);case z.ZodOptional:return tw(e,r);case z.ZodMap:return Gb(e,r);case z.ZodSet:return ow(e,r);case z.ZodLazy:return()=>e.getter()._def;case z.ZodPromise:return nw(e,r);case z.ZodNaN:case z.ZodNever:return Hb(r);case z.ZodEffects:return Lb(e,r);case z.ZodAny:return qe(r);case z.ZodUnknown:return aw(r);case z.ZodDefault:return Ub(e,r);case z.ZodBranded:return _l(e,r);case z.ZodReadonly:return cw(e,r);case z.ZodCatch:return Mb(e,r);case z.ZodPipeline:return rw(e,r);case z.ZodFunction:case z.ZodVoid:case z.ZodSymbol:return;default:return(o=>{})(t)}};function W(e,t,r=!1){let o=t.seen.get(e);if(t.override){let a=t.override?.(e,t,o,r);if(a!==Rb)return a}if(o&&!r){let a=KE(o,t);if(a!==void 0)return a}let n={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,n);let i=uw(e,e.typeName,t),s=typeof i=="function"?W(i(),t):i;if(s&&HE(e,t,s),t.postProcess){let a=t.postProcess(s,e,t);return n.jsonSchema=s,a}return n.jsonSchema=s,s}var KE=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:gl(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((r,o)=>t.currentPath[o]===r)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),qe(t)):t.$refStrategy==="seen"?qe(t):void 0}},HE=(e,t,r)=>(e.description&&(r.description=e.description,t.markdownDescription&&(r.markdownDescription=e.description)),r);var Em=(e,t)=>{let r=Ab(t),o=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[u,l])=>({...c,[u]:W(l._def,{...r,currentPath:[...r.basePath,r.definitionPath,u]},!0)??qe(r)}),{}):void 0,n=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,i=W(e._def,n===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,n]},!1)??qe(r),s=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;s!==void 0&&(i.title=s),r.flags.hasReferencedOpenAiAnyType&&(o||(o={}),o[r.openAiAnyTypeName]||(o[r.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:r.$refStrategy==="relative"?"1":[...r.basePath,r.definitionPath,r.openAiAnyTypeName].join("/")}}));let a=n===void 0?o?{...i,[r.definitionPath]:o}:i:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,n].join("/"),[r.definitionPath]:{...o,[n]:i}};return r.target==="jsonSchema7"?a.$schema="http://json-schema.org/draft-07/schema#":(r.target==="jsonSchema2019-09"||r.target==="openAi")&&(a.$schema="https://json-schema.org/draft/2019-09/schema#"),r.target==="openAi"&&("anyOf"in a||"oneOf"in a||"allOf"in a||"type"in a&&Array.isArray(a.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),a};function BE(e){return!e||e==="jsonSchema7"||e==="draft-7"?"draft-7":e==="jsonSchema2019-09"||e==="draft-2020-12"?"draft-2020-12":"draft-7"}function Nm(e,t){return Rt(e)?xo(e,{target:BE(t?.target),io:t?.pipeStrategy??"input"}):Em(e,{strictUnions:t?.strictUnions??!0,pipeStrategy:t?.pipeStrategy??"input"})}function Om(e){let r=Gr(e)?.method;if(!r)throw new Error("Schema is missing a method literal");let o=Au(r);if(typeof o!="string")throw new Error("Schema method literal must be a string");return o}function Rm(e,t){let r=Wr(e,t);if(!r.success)throw r.error;return r.data}var JE=6e4,bl=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(Xu,r=>{this._oncancel(r)}),this.setNotificationHandler(tl,r=>{this._onprogress(r)}),this.setRequestHandler(el,r=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(rl,async(r,o)=>{let n=await this._taskStore.getTask(r.params.taskId,o.sessionId);if(!n)throw new U(V.InvalidParams,"Failed to retrieve task: Task not found");return{...n}}),this.setRequestHandler(ol,async(r,o)=>{let n=async()=>{let i=r.params.taskId;if(this._taskMessageQueue){let a;for(;a=await this._taskMessageQueue.dequeue(i,o.sessionId);){if(a.type==="response"||a.type==="error"){let c=a.message,u=c.id,l=this._requestResolvers.get(u);if(l)if(this._requestResolvers.delete(u),a.type==="response")l(c);else{let d=c,h=new U(d.error.code,d.error.message,d.error.data);l(h)}else{let d=a.type==="response"?"Response":"Error";this._onerror(new Error(`${d} handler missing for request ${u}`))}continue}await this._transport?.send(a.message,{relatedRequestId:o.requestId})}}let s=await this._taskStore.getTask(i,o.sessionId);if(!s)throw new U(V.InvalidParams,`Task not found: ${i}`);if(!Hr(s.status))return await this._waitForTaskUpdate(i,o.signal),await n();if(Hr(s.status)){let a=await this._taskStore.getTaskResult(i,o.sessionId);return this._clearTaskQueue(i),{...a,_meta:{...a._meta,[Kr]:{taskId:i}}}}return await n()};return await n()}),this.setRequestHandler(il,async(r,o)=>{try{let{tasks:n,nextCursor:i}=await this._taskStore.listTasks(r.params?.cursor,o.sessionId);return{tasks:n,nextCursor:i,_meta:{}}}catch(n){throw new U(V.InvalidParams,`Failed to list tasks: ${n instanceof Error?n.message:String(n)}`)}}),this.setRequestHandler(al,async(r,o)=>{try{let n=await this._taskStore.getTask(r.params.taskId,o.sessionId);if(!n)throw new U(V.InvalidParams,`Task not found: ${r.params.taskId}`);if(Hr(n.status))throw new U(V.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(r.params.taskId,"cancelled","Client cancelled task execution.",o.sessionId),this._clearTaskQueue(r.params.taskId);let i=await this._taskStore.getTask(r.params.taskId,o.sessionId);if(!i)throw new U(V.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...i}}catch(n){throw n instanceof U?n:new U(V.InvalidRequest,`Failed to cancel task: ${n instanceof Error?n.message:String(n)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,r,o,n,i=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(n,r),startTime:Date.now(),timeout:r,maxTotalTimeout:o,resetTimeoutOnProgress:i,onTimeout:n})}_resetTimeout(t){let r=this._timeoutInfo.get(t);if(!r)return!1;let o=Date.now()-r.startTime;if(r.maxTotalTimeout&&o>=r.maxTotalTimeout)throw this._timeoutInfo.delete(t),U.fromError(V.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:o});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(t){let r=this._timeoutInfo.get(t);r&&(clearTimeout(r.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 r=this.transport?.onclose;this._transport.onclose=()=>{r?.(),this._onclose()};let o=this.transport?.onerror;this._transport.onerror=i=>{o?.(i),this._onerror(i)};let n=this._transport?.onmessage;this._transport.onmessage=(i,s)=>{n?.(i,s),zs(i)||wb(i)?this._onresponse(i):pm(i)?this._onrequest(i,s):bb(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._requestHandlerAbortControllers.values())o.abort();this._requestHandlerAbortControllers.clear();let r=U.fromError(V.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let o of t.values())o(r)}_onerror(t){this.onerror?.(t)}_onnotification(t){let r=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(t)).catch(o=>this._onerror(new Error(`Uncaught error in notification handler: ${o}`)))}_onrequest(t,r){let o=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,n=this._transport,i=t.params?._meta?.[Kr]?.taskId;if(o===void 0){let l={jsonrpc:"2.0",id:t.id,error:{code:V.MethodNotFound,message:"Method not found"}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:"error",message:l,timestamp:Date.now()},n?.sessionId).catch(d=>this._onerror(new Error(`Failed to enqueue error response: ${d}`))):n?.send(l).catch(d=>this._onerror(new Error(`Failed to send an error response: ${d}`)));return}let s=new AbortController;this._requestHandlerAbortControllers.set(t.id,s);let a=_b(t.params)?t.params.task:void 0,c=this._taskStore?this.requestTaskStore(t,n?.sessionId):void 0,u={signal:s.signal,sessionId:n?.sessionId,_meta:t.params?._meta,sendNotification:async l=>{if(s.signal.aborted)return;let d={relatedRequestId:t.id};i&&(d.relatedTask={taskId:i}),await this.notification(l,d)},sendRequest:async(l,d,h)=>{if(s.signal.aborted)throw new U(V.ConnectionClosed,"Request was cancelled");let m={...h,relatedRequestId:t.id};i&&!m.relatedTask&&(m.relatedTask={taskId:i});let p=m.relatedTask?.taskId??i;return p&&c&&await c.updateTaskStatus(p,"input_required"),await this.request(l,d,m)},authInfo:r?.authInfo,requestId:t.id,requestInfo:r?.requestInfo,taskId:i,taskStore:c,taskRequestedTtl:a?.ttl,closeSSEStream:r?.closeSSEStream,closeStandaloneSSEStream:r?.closeStandaloneSSEStream};Promise.resolve().then(()=>{a&&this.assertTaskHandlerCapability(t.method)}).then(()=>o(t,u)).then(async l=>{if(s.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()},n?.sessionId):await n?.send(d)},async l=>{if(s.signal.aborted)return;let d={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(l.code)?l.code:V.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()},n?.sessionId):await n?.send(d)}).catch(l=>this._onerror(new Error(`Failed to send response: ${l}`))).finally(()=>{this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){let{progressToken:r,...o}=t.params,n=Number(r),i=this._progressHandlers.get(n);if(!i){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}let s=this._responseHandlers.get(n),a=this._timeoutInfo.get(n);if(a&&s&&a.resetTimeoutOnProgress)try{this._resetTimeout(n)}catch(c){this._responseHandlers.delete(n),this._progressHandlers.delete(n),this._cleanupTimeout(n),s(c);return}i(o)}_onresponse(t){let r=Number(t.id),o=this._requestResolvers.get(r);if(o){if(this._requestResolvers.delete(r),zs(t))o(t);else{let s=new U(t.error.code,t.error.message,t.error.data);o(s)}return}let n=this._responseHandlers.get(r);if(n===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(r),this._cleanupTimeout(r);let i=!1;if(zs(t)&&t.result&&typeof t.result=="object"){let s=t.result;if(s.task&&typeof s.task=="object"){let a=s.task;typeof a.taskId=="string"&&(i=!0,this._taskProgressTokens.set(a.taskId,r))}}if(i||this._progressHandlers.delete(r),zs(t))n(t);else{let s=U.fromError(t.error.code,t.error.message,t.error.data);n(s)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,r,o){let{task:n}=o??{};if(!n){try{yield{type:"result",result:await this.request(t,r,o)}}catch(s){yield{type:"error",error:s instanceof U?s:new U(V.InternalError,String(s))}}return}let i;try{let s=await this.request(t,Eo,o);if(s.task)i=s.task.taskId,yield{type:"taskCreated",task:s.task};else throw new U(V.InternalError,"Task creation did not return a task");for(;;){let a=await this.getTask({taskId:i},o);if(yield{type:"taskStatus",task:a},Hr(a.status)){a.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:i},r,o)}:a.status==="failed"?yield{type:"error",error:new U(V.InternalError,`Task ${i} failed`)}:a.status==="cancelled"&&(yield{type:"error",error:new U(V.InternalError,`Task ${i} was cancelled`)});return}if(a.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:i},r,o)};return}let c=a.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(u=>setTimeout(u,c)),o?.signal?.throwIfAborted()}}catch(s){yield{type:"error",error:s instanceof U?s:new U(V.InternalError,String(s))}}}request(t,r,o){let{relatedRequestId:n,resumptionToken:i,onresumptiontoken:s,task:a,relatedTask:c}=o??{};return new Promise((u,l)=>{let d=$=>{l($)};if(!this._transport){d(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method),a&&this.assertTaskCapability(t.method)}catch($){d($);return}o?.signal?.throwIfAborted();let h=this._requestMessageId++,m={...t,jsonrpc:"2.0",id:h};o?.onprogress&&(this._progressHandlers.set(h,o.onprogress),m.params={...t.params,_meta:{...t.params?._meta||{},progressToken:h}}),a&&(m.params={...m.params,task:a}),c&&(m.params={...m.params,_meta:{...m.params?._meta||{},[Kr]:c}});let p=$=>{this._responseHandlers.delete(h),this._progressHandlers.delete(h),this._cleanupTimeout(h),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:h,reason:String($)}},{relatedRequestId:n,resumptionToken:i,onresumptiontoken:s}).catch(I=>this._onerror(new Error(`Failed to send cancellation: ${I}`)));let k=$ instanceof U?$:new U(V.RequestTimeout,String($));l(k)};this._responseHandlers.set(h,$=>{if(!o?.signal?.aborted){if($ instanceof Error)return l($);try{let k=Wr(r,$.result);k.success?u(k.data):l(k.error)}catch(k){l(k)}}}),o?.signal?.addEventListener("abort",()=>{p(o?.signal?.reason)});let f=o?.timeout??JE,_=()=>p(U.fromError(V.RequestTimeout,"Request timed out",{timeout:f}));this._setupTimeout(h,f,o?.maxTotalTimeout,_,o?.resetTimeoutOnProgress??!1);let y=c?.taskId;if(y){let $=k=>{let I=this._responseHandlers.get(h);I?I(k):this._onerror(new Error(`Response handler missing for side-channeled request ${h}`))};this._requestResolvers.set(h,$),this._enqueueTaskMessage(y,{type:"request",message:m,timestamp:Date.now()}).catch(k=>{this._cleanupTimeout(h),l(k)})}else this._transport.send(m,{relatedRequestId:n,resumptionToken:i,onresumptiontoken:s}).catch($=>{this._cleanupTimeout(h),l($)})})}async getTask(t,r){return this.request({method:"tasks/get",params:t},nl,r)}async getTaskResult(t,r,o){return this.request({method:"tasks/result",params:t},r,o)}async listTasks(t,r){return this.request({method:"tasks/list",params:t},sl,r)}async cancelTask(t,r){return this.request({method:"tasks/cancel",params:t},xb,r)}async notification(t,r){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);let o=r?.relatedTask?.taskId;if(o){let a={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[Kr]:r.relatedTask}}};await this._enqueueTaskMessage(o,{type:"notification",message:a,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!r?.relatedRequestId&&!r?.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 a={...t,jsonrpc:"2.0"};r?.relatedTask&&(a={...a,params:{...a.params,_meta:{...a.params?._meta||{},[Kr]:r.relatedTask}}}),this._transport?.send(a,r).catch(c=>this._onerror(c))});return}let s={...t,jsonrpc:"2.0"};r?.relatedTask&&(s={...s,params:{...s.params,_meta:{...s.params?._meta||{},[Kr]:r.relatedTask}}}),await this._transport.send(s,r)}setRequestHandler(t,r){let o=Om(t);this.assertRequestHandlerCapability(o),this._requestHandlers.set(o,(n,i)=>{let s=Rm(t,n);return Promise.resolve(r(s,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,r){let o=Om(t);this._notificationHandlers.set(o,n=>{let i=Rm(t,n);return Promise.resolve(r(i))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){let r=this._taskProgressTokens.get(t);r!==void 0&&(this._progressHandlers.delete(r),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,r,o){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let n=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,r,o,n)}async _clearTaskQueue(t,r){if(this._taskMessageQueue){let o=await this._taskMessageQueue.dequeueAll(t,r);for(let n of o)if(n.type==="request"&&pm(n.message)){let i=n.message.id,s=this._requestResolvers.get(i);s?(s(new U(V.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,r){let o=this._options?.defaultTaskPollInterval??1e3;try{let n=await this._taskStore?.getTask(t);n?.pollInterval&&(o=n.pollInterval)}catch{}return new Promise((n,i)=>{if(r.aborted){i(new U(V.InvalidRequest,"Request cancelled"));return}let s=setTimeout(n,o);r.addEventListener("abort",()=>{clearTimeout(s),i(new U(V.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,r){let o=this._taskStore;if(!o)throw new Error("No task store configured");return{createTask:async n=>{if(!t)throw new Error("No request provided");return await o.createTask(n,t.id,{method:t.method,params:t.params},r)},getTask:async n=>{let i=await o.getTask(n,r);if(!i)throw new U(V.InvalidParams,"Failed to retrieve task: Task not found");return i},storeTaskResult:async(n,i,s)=>{await o.storeTaskResult(n,i,s,r);let a=await o.getTask(n,r);if(a){let c=Rs.parse({method:"notifications/tasks/status",params:a});await this.notification(c),Hr(a.status)&&this._cleanupTaskProgressHandler(n)}},getTaskResult:n=>o.getTaskResult(n,r),updateTaskStatus:async(n,i,s)=>{let a=await o.getTask(n,r);if(!a)throw new U(V.InvalidParams,`Task "${n}" not found - it may have been cleaned up`);if(Hr(a.status))throw new U(V.InvalidParams,`Cannot update task "${n}" from terminal status "${a.status}" to "${i}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await o.updateTaskStatus(n,i,s,r);let c=await o.getTask(n,r);if(c){let u=Rs.parse({method:"notifications/tasks/status",params:c});await this.notification(u),Hr(c.status)&&this._cleanupTaskProgressHandler(n)}},listTasks:n=>o.listTasks(n,r)}}};function lw(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function dw(e,t){let r={...e};for(let o in t){let n=o,i=t[n];if(i===void 0)continue;let s=r[n];lw(s)&&lw(i)?r[n]={...s,...i}:r[n]=i}return r}var d0=We(Ck(),1),p0=We(l0(),1);function j4(){let e=new d0.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,p0.default)(e),e}var jd=class{constructor(t){this._ajv=t??j4()}getValidator(t){let r="$id"in t&&typeof t.$id=="string"?this._ajv.getSchema(t.$id)??this._ajv.compile(t):this._ajv.compile(t);return o=>r(o)?{valid:!0,data:o,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(r.errors)}}};var Ad=class{constructor(t){this._server=t}requestStream(t,r,o){return this._server.requestStream(t,r,o)}createMessageStream(t,r){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 n=t.messages[t.messages.length-1],i=Array.isArray(n.content)?n.content:[n.content],s=i.some(l=>l.type==="tool_result"),a=t.messages.length>1?t.messages[t.messages.length-2]:void 0,c=a?Array.isArray(a.content)?a.content:[a.content]:[],u=c.some(l=>l.type==="tool_use");if(s){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(h=>h.type==="tool_use").map(h=>h.id)),d=new Set(i.filter(h=>h.type==="tool_result").map(h=>h.toolUseId));if(l.size!==d.size||![...l].every(h=>d.has(h)))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},Ds,r)}elicitInputStream(t,r){let o=this._server.getClientCapabilities(),n=t.mode??"form";switch(n){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=n==="form"&&t.mode===void 0?{...t,mode:"form"}:t;return this.requestStream({method:"elicitation/create",params:i},Ro,r)}async getTask(t,r){return this._server.getTask({taskId:t},r)}async getTaskResult(t,r,o){return this._server.getTaskResult({taskId:t},r,o)}async listTasks(t,r){return this._server.listTasks(t?{cursor:t}:void 0,r)}async cancelTask(t,r){return this._server.cancelTask({taskId:t},r)}};function f0(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"tools/call":if(!e.tools?.call)throw new Error(`${r} does not support task creation for tools/call (required for ${t})`);break;default:break}}function m0(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"sampling/createMessage":if(!e.sampling?.createMessage)throw new Error(`${r} does not support task creation for sampling/createMessage (required for ${t})`);break;case"elicitation/create":if(!e.elicitation?.create)throw new Error(`${r} does not support task creation for elicitation/create (required for ${t})`);break;default:break}}var Dd=class extends bl{constructor(t,r){super(r),this._serverInfo=t,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(As.options.map((o,n)=>[o,n])),this.isMessageIgnored=(o,n)=>{let i=this._loggingLevels.get(n);return i?this.LOG_LEVEL_SEVERITY.get(o)<this.LOG_LEVEL_SEVERITY.get(i):!1},this._capabilities=r?.capabilities??{},this._instructions=r?.instructions,this._jsonSchemaValidator=r?.jsonSchemaValidator??new jd,this.setRequestHandler(hm,o=>this._oninitialize(o)),this.setNotificationHandler(gm,()=>this.oninitialized?.()),this._capabilities.logging&&this.setRequestHandler(km,async(o,n)=>{let i=n.sessionId||n.requestInfo?.headers["mcp-session-id"]||void 0,{level:s}=o.params,a=As.safeParse(s);return a.success&&this._loggingLevels.set(i,a.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new Ad(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=dw(this._capabilities,t)}setRequestHandler(t,r){let n=Gr(t)?.method;if(!n)throw new Error("Schema is missing a method literal");let i;if(Rt(n)){let a=n;i=a._zod?.def?.value??a.value}else{let a=n;i=a._def?.value??a.value}if(typeof i!="string")throw new Error("Schema method literal must be a string");if(i==="tools/call"){let a=async(c,u)=>{let l=Wr(Oo,c);if(!l.success){let p=l.error instanceof Error?l.error.message:String(l.error);throw new U(V.InvalidParams,`Invalid tools/call request: ${p}`)}let{params:d}=l.data,h=await Promise.resolve(r(c,u));if(d.task){let p=Wr(Eo,h);if(!p.success){let f=p.error instanceof Error?p.error.message:String(p.error);throw new U(V.InvalidParams,`Invalid task creation result: ${f}`)}return p.data}let m=Wr(ml,h);if(!m.success){let p=m.error instanceof Error?m.error.message:String(m.error);throw new U(V.InvalidParams,`Invalid tools/call result: ${p}`)}return m.data};return super.setRequestHandler(t,a)}return super.setRequestHandler(t,r)}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){m0(this._clientCapabilities?.tasks?.requests,t,"Client")}assertTaskHandlerCapability(t){this._capabilities&&f0(this._capabilities.tasks?.requests,t,"Server")}async _oninitialize(t){let r=t.params.protocolVersion;return this._clientCapabilities=t.params.capabilities,this._clientVersion=t.params.clientInfo,{protocolVersion:mb.includes(r)?r:lm,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"},Yu)}async createMessage(t,r){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],n=Array.isArray(o.content)?o.content:[o.content],i=n.some(u=>u.type==="tool_result"),s=t.messages.length>1?t.messages[t.messages.length-2]:void 0,a=s?Array.isArray(s.content)?s.content:[s.content]:[],c=a.some(u=>u.type==="tool_use");if(i){if(n.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(a.filter(d=>d.type==="tool_use").map(d=>d.id)),l=new Set(n.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},xm,r):this.request({method:"sampling/createMessage",params:t},Ds,r)}async elicitInput(t,r){switch(t.mode??"form"){case"url":{if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support url elicitation.");let n=t;return this.request({method:"elicitation/create",params:n},Ro,r)}case"form":{if(!this._clientCapabilities?.elicitation?.form)throw new Error("Client does not support form elicitation.");let n=t.mode==="form"?t:{...t,mode:"form"},i=await this.request({method:"elicitation/create",params:n},Ro,r);if(i.action==="accept"&&i.content&&n.requestedSchema)try{let a=this._jsonSchemaValidator.getValidator(n.requestedSchema)(i.content);if(!a.valid)throw new U(V.InvalidParams,`Elicitation response content does not match requested schema: ${a.errorMessage}`)}catch(s){throw s instanceof U?s:new U(V.InternalError,`Error validating elicitation response: ${s instanceof Error?s.message:String(s)}`)}return i}}}createElicitationCompletionNotifier(t,r){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}},r)}async listRoots(t,r){return this.request({method:"roots/list",params:t},Sm,r)}async sendLoggingMessage(t,r){if(this._capabilities.logging&&!this.isMessageIgnored(t.level,r))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 g0=Symbol.for("mcp.completable");function nv(e){return!!e&&typeof e=="object"&&g0 in e}function _0(e){return e[g0]?.complete}var h0;(function(e){e.Completable="McpCompletable"})(h0||(h0={}));var A4=/^[A-Za-z0-9._-]{1,128}$/;function D4(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"),!A4.test(e)){let r=e.split("").filter(o=>!/[A-Za-z0-9._-]/.test(o)).filter((o,n,i)=>i.indexOf(o)===n);return t.push(`Tool name contains invalid characters: ${r.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 C4(e,t){if(t.length>0){console.warn(`Tool name validation warning for "${e}":`);for(let r of t)console.warn(` - ${r}`);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 ov(e){let t=D4(e);return C4(e,t.warnings),t.isValid}var Cd=class{constructor(t){this._mcpServer=t}registerToolTask(t,r,o){let n={taskSupport:"required",...r.execution};if(n.taskSupport==="forbidden")throw new Error(`Cannot register task-based tool '${t}' with taskSupport 'forbidden'. Use registerTool() instead.`);return this._mcpServer._createRegisteredTool(t,r.title,r.description,r.inputSchema,r.outputSchema,r.annotations,n,r._meta,o)}};var qd=class{constructor(t,r){this._registeredResources={},this._registeredResourceTemplates={},this._registeredTools={},this._registeredPrompts={},this._toolHandlersInitialized=!1,this._completionHandlerInitialized=!1,this._resourceHandlersInitialized=!1,this._promptHandlersInitialized=!1,this.server=new Dd(t,r)}get experimental(){return this._experimental||(this._experimental={tasks:new Cd(this)}),this._experimental}async connect(t){return await this.server.connect(t)}async close(){await this.server.close()}setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler(dn(fl)),this.server.assertCanSetRequestHandler(dn(Oo)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(fl,()=>({tools:Object.entries(this._registeredTools).filter(([,t])=>t.enabled).map(([t,r])=>{let o={name:t,title:r.title,description:r.description,inputSchema:(()=>{let n=So(r.inputSchema);return n?Nm(n,{strictUnions:!0,pipeStrategy:"input"}):q4})(),annotations:r.annotations,execution:r.execution,_meta:r._meta};if(r.outputSchema){let n=So(r.outputSchema);n&&(o.outputSchema=Nm(n,{strictUnions:!0,pipeStrategy:"output"}))}return o})})),this.server.setRequestHandler(Oo,async(t,r)=>{try{let o=this._registeredTools[t.params.name];if(!o)throw new U(V.InvalidParams,`Tool ${t.params.name} not found`);if(!o.enabled)throw new U(V.InvalidParams,`Tool ${t.params.name} disabled`);let n=!!t.params.task,i=o.execution?.taskSupport,s="createTask"in o.handler;if((i==="required"||i==="optional")&&!s)throw new U(V.InternalError,`Tool ${t.params.name} has taskSupport '${i}' but was not registered with registerToolTask`);if(i==="required"&&!n)throw new U(V.MethodNotFound,`Tool ${t.params.name} requires task augmentation (taskSupport: 'required')`);if(i==="optional"&&!n&&s)return await this.handleAutomaticTaskPolling(o,t,r);let a=await this.validateToolInput(o,t.params.arguments,t.params.name),c=await this.executeToolHandler(o,a,r);return n||await this.validateToolOutput(o,c,t.params.name),c}catch(o){if(o instanceof U&&o.code===V.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,r,o){if(!t.inputSchema)return;let i=So(t.inputSchema)??t.inputSchema,s=await Ru(i,r);if(!s.success){let a="error"in s?s.error:"Unknown error",c=ju(a);throw new U(V.InvalidParams,`Input validation error: Invalid arguments for tool ${o}: ${c}`)}return s.data}async validateToolOutput(t,r,o){if(!t.outputSchema||!("content"in r)||r.isError)return;if(!r.structuredContent)throw new U(V.InvalidParams,`Output validation error: Tool ${o} has an output schema but no structured content was provided`);let n=So(t.outputSchema),i=await Ru(n,r.structuredContent);if(!i.success){let s="error"in i?i.error:"Unknown error",a=ju(s);throw new U(V.InvalidParams,`Output validation error: Invalid structured content for tool ${o}: ${a}`)}}async executeToolHandler(t,r,o){let n=t.handler;if("createTask"in n){if(!o.taskStore)throw new Error("No task store provided.");let s={...o,taskStore:o.taskStore};if(t.inputSchema){let a=n;return await Promise.resolve(a.createTask(r,s))}else{let a=n;return await Promise.resolve(a.createTask(s))}}if(t.inputSchema){let s=n;return await Promise.resolve(s(r,o))}else{let s=n;return await Promise.resolve(s(o))}}async handleAutomaticTaskPolling(t,r,o){if(!o.taskStore)throw new Error("No task store provided for task-capable tool.");let n=await this.validateToolInput(t,r.params.arguments,r.params.name),i=t.handler,s={...o,taskStore:o.taskStore},a=n?await Promise.resolve(i.createTask(n,s)):await Promise.resolve(i.createTask(s)),c=a.task.taskId,u=a.task,l=u.pollInterval??5e3;for(;u.status!=="completed"&&u.status!=="failed"&&u.status!=="cancelled";){await new Promise(h=>setTimeout(h,l));let d=await o.taskStore.getTask(c);if(!d)throw new U(V.InternalError,`Task ${c} not found during polling`);u=d}return await o.taskStore.getTaskResult(c)}setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler(dn(hl)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(hl,async t=>{switch(t.params.ref.type){case"ref/prompt":return Eb(t),this.handlePromptCompletion(t,t.params.ref);case"ref/resource":return Nb(t),this.handleResourceCompletion(t,t.params.ref);default:throw new U(V.InvalidParams,`Invalid completion reference: ${t.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(t,r){let o=this._registeredPrompts[r.name];if(!o)throw new U(V.InvalidParams,`Prompt ${r.name} not found`);if(!o.enabled)throw new U(V.InvalidParams,`Prompt ${r.name} disabled`);if(!o.argsSchema)return La;let i=Gr(o.argsSchema)?.[t.params.argument.name];if(!nv(i))return La;let s=_0(i);if(!s)return La;let a=await s(t.params.argument.value,t.params.context);return y0(a)}async handleResourceCompletion(t,r){let o=Object.values(this._registeredResourceTemplates).find(s=>s.resourceTemplate.uriTemplate.toString()===r.uri);if(!o){if(this._registeredResources[r.uri])return La;throw new U(V.InvalidParams,`Resource template ${t.params.ref.uri} not found`)}let n=o.resourceTemplate.completeCallback(t.params.argument.name);if(!n)return La;let i=await n(t.params.argument.value,t.params.context);return y0(i)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(dn(cl)),this.server.assertCanSetRequestHandler(dn(ul)),this.server.assertCanSetRequestHandler(dn(ll)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(cl,async(t,r)=>{let o=Object.entries(this._registeredResources).filter(([i,s])=>s.enabled).map(([i,s])=>({uri:i,name:s.name,...s.metadata})),n=[];for(let i of Object.values(this._registeredResourceTemplates)){if(!i.resourceTemplate.listCallback)continue;let s=await i.resourceTemplate.listCallback(r);for(let a of s.resources)n.push({...i.metadata,...a})}return{resources:[...o,...n]}}),this.server.setRequestHandler(ul,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([r,o])=>({name:r,uriTemplate:o.resourceTemplate.uriTemplate.toString(),...o.metadata}))})),this.server.setRequestHandler(ll,async(t,r)=>{let o=new URL(t.params.uri),n=this._registeredResources[o.toString()];if(n){if(!n.enabled)throw new U(V.InvalidParams,`Resource ${o} disabled`);return n.readCallback(o,r)}for(let i of Object.values(this._registeredResourceTemplates)){let s=i.resourceTemplate.uriTemplate.match(o.toString());if(s)return i.readCallback(o,s,r)}throw new U(V.InvalidParams,`Resource ${o} not found`)}),this._resourceHandlersInitialized=!0)}setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler(dn(dl)),this.server.assertCanSetRequestHandler(dn(pl)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(dl,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,t])=>t.enabled).map(([t,r])=>({name:t,title:r.title,description:r.description,arguments:r.argsSchema?U4(r.argsSchema):void 0}))})),this.server.setRequestHandler(pl,async(t,r)=>{let o=this._registeredPrompts[t.params.name];if(!o)throw new U(V.InvalidParams,`Prompt ${t.params.name} not found`);if(!o.enabled)throw new U(V.InvalidParams,`Prompt ${t.params.name} disabled`);if(o.argsSchema){let n=So(o.argsSchema),i=await Ru(n,t.params.arguments);if(!i.success){let c="error"in i?i.error:"Unknown error",u=ju(c);throw new U(V.InvalidParams,`Invalid arguments for prompt ${t.params.name}: ${u}`)}let s=i.data,a=o.callback;return await Promise.resolve(a(s,r))}else{let n=o.callback;return await Promise.resolve(n(r))}}),this._promptHandlersInitialized=!0)}resource(t,r,...o){let n;typeof o[0]=="object"&&(n=o.shift());let i=o[0];if(typeof r=="string"){if(this._registeredResources[r])throw new Error(`Resource ${r} is already registered`);let s=this._createRegisteredResource(t,void 0,r,n,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}else{if(this._registeredResourceTemplates[t])throw new Error(`Resource template ${t} is already registered`);let s=this._createRegisteredResourceTemplate(t,void 0,r,n,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}}registerResource(t,r,o,n){if(typeof r=="string"){if(this._registeredResources[r])throw new Error(`Resource ${r} is already registered`);let i=this._createRegisteredResource(t,o.title,r,o,n);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,r,o,n);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),i}}_createRegisteredResource(t,r,o,n,i){let s={name:t,title:r,metadata:n,readCallback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({uri:null}),update:a=>{typeof a.uri<"u"&&a.uri!==o&&(delete this._registeredResources[o],a.uri&&(this._registeredResources[a.uri]=s)),typeof a.name<"u"&&(s.name=a.name),typeof a.title<"u"&&(s.title=a.title),typeof a.metadata<"u"&&(s.metadata=a.metadata),typeof a.callback<"u"&&(s.readCallback=a.callback),typeof a.enabled<"u"&&(s.enabled=a.enabled),this.sendResourceListChanged()}};return this._registeredResources[o]=s,s}_createRegisteredResourceTemplate(t,r,o,n,i){let s={resourceTemplate:o,title:r,metadata:n,readCallback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({name:null}),update:u=>{typeof u.name<"u"&&u.name!==t&&(delete this._registeredResourceTemplates[t],u.name&&(this._registeredResourceTemplates[u.name]=s)),typeof u.title<"u"&&(s.title=u.title),typeof u.template<"u"&&(s.resourceTemplate=u.template),typeof u.metadata<"u"&&(s.metadata=u.metadata),typeof u.callback<"u"&&(s.readCallback=u.callback),typeof u.enabled<"u"&&(s.enabled=u.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[t]=s;let a=o.uriTemplate.variableNames;return Array.isArray(a)&&a.some(u=>!!o.completeCallback(u))&&this.setCompletionRequestHandler(),s}_createRegisteredPrompt(t,r,o,n,i){let s={title:r,description:o,argsSchema:n===void 0?void 0:Tn(n),callback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({name:null}),update:a=>{typeof a.name<"u"&&a.name!==t&&(delete this._registeredPrompts[t],a.name&&(this._registeredPrompts[a.name]=s)),typeof a.title<"u"&&(s.title=a.title),typeof a.description<"u"&&(s.description=a.description),typeof a.argsSchema<"u"&&(s.argsSchema=Tn(a.argsSchema)),typeof a.callback<"u"&&(s.callback=a.callback),typeof a.enabled<"u"&&(s.enabled=a.enabled),this.sendPromptListChanged()}};return this._registeredPrompts[t]=s,n&&Object.values(n).some(c=>{let u=c instanceof Pt?c._def?.innerType:c;return nv(u)})&&this.setCompletionRequestHandler(),s}_createRegisteredTool(t,r,o,n,i,s,a,c,u){ov(t);let l={title:r,description:o,inputSchema:v0(n),outputSchema:v0(i),annotations:s,execution:a,_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"&&ov(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=Tn(d.paramsSchema)),typeof d.outputSchema<"u"&&(l.outputSchema=Tn(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,...r){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let o,n,i,s;if(typeof r[0]=="string"&&(o=r.shift()),r.length>1){let c=r[0];iv(c)?(n=r.shift(),r.length>1&&typeof r[0]=="object"&&r[0]!==null&&!iv(r[0])&&(s=r.shift())):typeof c=="object"&&c!==null&&(s=r.shift())}let a=r[0];return this._createRegisteredTool(t,void 0,o,n,i,s,{taskSupport:"forbidden"},void 0,a)}registerTool(t,r,o){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let{title:n,description:i,inputSchema:s,outputSchema:a,annotations:c,_meta:u}=r;return this._createRegisteredTool(t,n,i,s,a,c,{taskSupport:"forbidden"},u,o)}prompt(t,...r){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let o;typeof r[0]=="string"&&(o=r.shift());let n;r.length>1&&(n=r.shift());let i=r[0],s=this._createRegisteredPrompt(t,void 0,o,n,i);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),s}registerPrompt(t,r,o){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let{title:n,description:i,argsSchema:s}=r,a=this._createRegisteredPrompt(t,n,i,s,o);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),a}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(t,r){return this.server.sendLoggingMessage(t,r)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}};var q4={type:"object",properties:{}};function b0(e){return e!==null&&typeof e=="object"&&"parse"in e&&typeof e.parse=="function"&&"safeParse"in e&&typeof e.safeParse=="function"}function M4(e){return"_def"in e||"_zod"in e||b0(e)}function iv(e){return typeof e!="object"||e===null||M4(e)?!1:Object.keys(e).length===0?!0:Object.values(e).some(b0)}function v0(e){if(e)return iv(e)?Tn(e):e}function U4(e){let t=Gr(e);return t?Object.entries(t).map(([r,o])=>{let n=zy(o),i=Iy(o);return{name:r,description:n,required:!i}}):[]}function dn(e){let r=Gr(e)?.method;if(!r)throw new Error("Schema is missing a method literal");let o=Au(r);if(typeof o=="string")return o;throw new Error("Schema method literal must be a string")}function y0(e){return{completion:{values:e.slice(0,100),total:e.length,hasMore:e.length>100}}}var La={completion:{values:[],hasMore:!1}};var sv=We(require("node:process"),1);var Md=class{append(t){this._buffer=this._buffer?Buffer.concat([this._buffer,t]):t}readMessage(){if(!this._buffer)return null;let t=this._buffer.indexOf(`
49
- `);if(t===-1)return null;let r=this._buffer.toString("utf8",0,t).replace(/\r$/,"");return this._buffer=this._buffer.subarray(t+1),L4(r)}clear(){this._buffer=void 0}};function L4(e){return $b.parse(JSON.parse(e))}function w0(e){return JSON.stringify(e)+`
50
- `}var Ud=class{constructor(t=sv.default.stdin,r=sv.default.stdout){this._stdin=t,this._stdout=r,this._readBuffer=new Md,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(r=>{let o=w0(t);this._stdout.write(o)?r():this._stdout.once("drain",r)})}};function av(e){return t=>{for(let[r,o]of e.entries()){let n=`file://vantage/${r}`;t.registerResource(r,n,{mimeType:"text/markdown",annotations:{audience:["assistant","user"]},title:o.title,description:o.description},()=>({contents:[{uri:n,text:o.content,mimeType:"text/markdown"}]}))}}}var $0=av(new Map([["vql/cost_report.md",{content:"\n## Cost Reports VQL Schema\n\nVQL comprises two namespaces: `costs` and `tags`, which represent the available filters on Cost Reports in the Vantage console. To reference a filter, use the following syntax: `namespace.field` (e.g., `costs.provider` or `tags.name`).\n\n| Namespace | Field | VQL Example |\n| --- | --- | --- |\n| `costs` | `provider` | [Providers example](#combining-providers) |\n| `costs` | `allocation` | [Cost allocation example](#cost-allocation) |\n| `costs` | `region` | [Region example](#costs-from-a-list-of-regions) |\n| `costs` | `marketplace` | [Marketplace example](#get-marketplace-transactions) |\n| `costs` | `account_id` | [Account ID example](#costs-by-account-id) |\n| `costs` | `provider_account_id` | [Provider account ID example](#costs-by-provider-account-id) |\n| `costs` | `service` | [Service example](#per-resource-costs-and-costs-by-service) |\n| `costs` | `category` | [Category example](#costs-by-specific-category) |\n| `costs` | `subcategory` | [Subcategory example](#costs-by-specific-subcategory) |\n| `costs` | `resource_id` | [Resource example](#per-resource-costs-and-costs-by-service) |\n| `costs` | `charge_type` | [Charge Type example](#cost-by-charge-type) |\n| `tags` | `name` | [Tags name/value example](#filter-by-tag) |\n| `tags` | `value` | [Untagged example](#filter-for-untagged-resources) |\n\n> **Note:** Availability of the fields listed above varies among different cloud providers.\n\n## Keywords\n\nVQL includes a set of keywords to create complex filter conditions. These keywords function similar to their SQL equivalents.\n\n| Keyword | Description | VQL Sample | Explanation |\n| --- | --- | --- | --- |\n| `AND` | Logical AND operator | `costs.provider = 'aws' AND costs.service = 'EC2'` | This example filters AWS costs for the EC2 service, where both conditions must be true. |\n| `OR` | Logical OR operator | `costs.provider = 'azure' OR costs.provider = 'aws'` | This example retrieves costs from either Azure or AWS. At least one condition must be true. |\n| `IN` | Used to compare against an array list | `costs.provider = 'azure' AND costs.account_id IN ('account-1', 'account-2')` | This example filters based on a list of account IDs, returning data for the specified accounts <br /><br /> You can also use `IN` along with a special syntax for filtering by multiple tags. See [Filter by Multiple Tags](#filter-by-multiple-tags) for details. The `IN` keyword is not compatible for combining `providers`. |\n| `LIKE` | Performs string comparisons | `costs.provider = 'gcp' AND tags.name = 'environment' AND tags.value LIKE '%prod%'` | This example selects data where the tag value contains `prod`, such as `production-1`. <br /><br /> Note that at this time, `LIKE` is not compatible with `costs.account_id`, `costs.provider_account_id`, `costs.region`, and `costs.service`. |\n| `NOT` | Represents negation | `costs.provider = 'aws' AND costs.region NOT IN ('us-east-1', 'us-east-2')` | This example filters out data from both specified regions, providing all AWS costs *not* in these regions. Use `NOT IN` to specify a list of single or multiple values. <br /><br /> You can also use the `!=` or `<>` operators for \"is not.\" <br /><br /> `costs.provider = 'aws' AND costs.region != 'us-east-1'` <br /><br /> You can use `NOT LIKE` to perform string comparisons: <br /><br /> `costs.provider = 'gcp' AND tags.name = 'environment' AND tags.value NOT LIKE '%prod%'` |\n| `~*` | Flexible match operator for tag values | `costs.provider = 'aws' AND (tags.name = 'teams' AND tags.value ~* 'Team A')` | Searches for all items where the tag value loosely matches `Team A`, ignoring case, whitespace, hyphens, and punctuation. |\n| `!~*` | Does not flexible match operator for tag values | `costs.provider = 'aws' AND (tags.name = 'teams' AND tags.value !~* 'Team A')` | Filters out all items where the tag value loosely matches `Team A`, ignoring case, whitespace, hyphens, and punctuation. |\n\nWith these keywords, you can construct complex filter conditions in VQL, providing flexibility and precision when querying and analyzing cloud cost data.\n\n## Syntax\n\nYou can think of VQL in its current iteration as the `WHERE` clause of a SQL query. By combining the schema and keywords above with parentheses, you can form complex filter operations, such as:\n\n```vql\n(costs.provider = 'mongo' AND costs.allocation = 1.0 AND (costs.service = 'REALM' AND costs.resource_id IN ('s3'))) OR (costs.provider = 'aws' AND costs.allocation = 1.0 AND costs.account_id IN ('123456798'))\n```\n\n## VQL Examples\n\nThe following examples cover common use cases for VQL.\n\n### Combining Providers\n\n> **Note:** To reference a Custom Provider in VQL queries, navigate to the **Integrations** page in the Vantage console. Use the displayed **Provider ID** (e.g., `custom_provider:accss_crdntl_123a45bfdaf38765`).\n\nFilter for provider costs associated with either MongoDB Atlas or AWS.\n\n```sql\ncosts.provider = 'mongo' OR costs.provider = 'aws'\n```\n\n### Cost Allocation\n\nSet cost allocation to `0.5`.\n\n```sql\ncosts.provider = 'gcp' AND costs.allocation = 0.5\n```\n\n### Costs from a List of Regions\n\nFilter for Snowflake costs in two regions. Note that you will need to use the region code, such as `us-east-1` in the case of AWS, or `AWS_US_EAST_1` in the case of Snowflake, below.\n\n```sql\ncosts.provider = 'snowflake' AND costs.region IN ('AWS_US_EAST_1', 'AWS_US_EAST_2')\n```\n\n### Get Marketplace Transactions\n\nRetrieve costs associated with the AWS Marketplace.\n\n```sql\ncosts.provider = 'aws' AND costs.marketplace = true\n```\n\n### Costs by Account ID\n\nCosts for a specific set of services and account ID.\n\n```sql\ncosts.provider = 'aws' AND costs.account_id = '123456758' AND costs.service IN ('Amazon Relational Database', 'Amazon Elastic Compute Cloud - Compute')\n```\n\n### Costs by Provider Account ID\n\nThe following example represents costs from a specific AWS billing account or costs from a specific Azure subscription.\n\n```sql\n(costs.provider = 'aws' AND costs.provider_account_id = 'abcd1234') OR (costs.provider = 'azure' AND costs.provider_account_id = 'abcd1234')\n```\n\n### Per-Resource Costs and Costs by Service\n\nResource costs require both `provider` and `service` in addition to the `resource_id`.\n\n```sql\ncosts.provider = 'aws' AND costs.service = 'Amazon Relational Database Service' AND costs.resource_id = 'arn:aws:rds:us-east-1:123456789:db:primary-01'\n```\n\n#### Multiple Resource IDs\n\n```sql\ncosts.provider = 'aws' AND costs.service = 'Amazon Relational Database Service' AND costs.resource_id IN ('arn:aws:rds:us-east-1:123456789:db:primary-01', 'arn:aws:rds:us-east-1:123456789:db:primary-02')\n```\n\n### Costs by Specific Category\n\nFilter costs to see a specific cost category. Category costs require both `provider` and `service` as well as `category`.\n\n```sql\ncosts.provider = 'fastly' AND costs.service = 'CDN' AND costs.category = 'Data Transfer'\n```\n\n### Costs by Specific Subcategory\n\nFilter costs by a specific service and subcategory. Subcategory costs require both `provider` and `service` as well as `subcategory`.\n\n```sql\ncosts.provider = 'aws' AND costs.service = 'AWS Certificate Manager' AND costs.subcategory = 'USE1-PaidPrivateCA'\n```\n\n### Cost by Charge Type\n\nFilter costs by a specific charge type.\n\n```sql\ncosts.provider = 'aws' AND costs.charge_type = 'Usage'\n```\n\n### Filter by Tag\n\n#### Filter by Single Tag\n\nFilter costs based on a specific tag, such as `environment`, with the value `production`, in AWS.\n\n```sql\ncosts.provider = 'aws' AND tags.name = 'environment' AND tags.value = 'production'\n```\n\n#### Filter for Multiple Values from a Single Tag Key\n\nIf you want to filter for multiple tag values that are tied to one tag key (e.g., costs tagged with the `team` tag of `mobile` and `data`), use the below syntax.\n\n```sql\ncosts.provider = 'aws' AND tags.name = 'team' AND tags.value IN ('mobile', 'data')\n```\n\n#### Filter by Multiple Tags\n\nIf you want to filter for resources that have more than one tag associated, you can use the syntax shown in the example below.\n\n```sql\ncosts.provider = 'aws' AND (tags.name, tags.value) IN (('environment', 'staging'), ('team', 'engineering'))\n```\n\nThis example filters for resources that are tagged with the `environment` tag with a value of `staging` as well as the `team` tag with a value of `engineering`. This filter is the same as creating the following manual filter in the console.\n\n![Filter by multiple tags in the console](https://assets.vantage.sh/docs/multiple-tags-example.png)\n\n#### Filter for Matching Tags Using `LIKE`\n\n```sql\ncosts.provider = 'azure' AND (tags.name = 'environment' AND tags.value LIKE '%prod%')\n```\n\n#### Filter for Tags Using Flexible Matching\n\n```sql\ncosts.provider = 'azure' AND (tags.name = 'Team' AND tags.value ~* 'Team A')\n```\n\nMatches on applied tag values, such as `TeamA`, `team-a`, and `team_a` to a single `Team A` tag value.\n\n### Filter for Untagged Resources\n\nOn providers that have a **Not Tagged**/**Not Labeled** filter option in the console, you can use the below VQL to see untagged resources. This example looks for untagged resources in a multi-cloud environment.\n\n```sql\n(costs.provider = 'aws' AND tags.name = NULL) OR (costs.provider = 'azure' AND tags.name = NULL) OR (costs.provider = 'gcp' AND tags.name = NULL)\n```\n\n## Troubleshooting\n\nIf you are receiving an error when trying to complete a query, check the following troubleshooting tips below.\n\n- Each provider exposes certain field names. Those names are normalized within the schema.\n- Query parameter values should be wrapped in single quotes.\n\n**Example:**\n\n\u2705 **THIS WORKS**\n\n```sql\ncosts.provider='aws'\n```\n\n\u274C **THIS DOES NOT WORK**\n\n```sql\ncosts.provider=\"aws\"\n```\n\n- Currently, there is a limitation where `AND` and `OR` are not supported together in a single \"query group.\"\n\n**Example:**\n\n\u2705 **THIS WORKS**\n\n```sql\n(costs.provider = 'aws' AND tags.name = 'environment' AND tags.value = 'dev') OR (costs.provider = 'aws' AND tags.name = 'environment' AND tags.value = 'prod')\n```\n\n\u274C **THIS DOES NOT WORK**\n\n```sql\ncosts.provider = 'aws' AND ((tags.name = 'environment' AND tags.value = 'dev') OR (tags.name = 'environment' AND tags.value = 'prod'))\n```\n\n- The `costs.provider` field is required on every call.\n\n**Example:**\n\n\u2705 **THIS WORKS**\n\n```sql\ncosts.provider = 'fastly' AND costs.service = 'CDN'\n```\n\n\u274C **THIS DOES NOT WORK**\n\n```sql\ncosts.service = 'CDN'\n```\n\n- The `costs.provider` field is not compatible with the `IN` keyword.\n\n**Example:**\n\n\u2705 **THIS WORKS**\n\n```sql\n(costs.provider = 'aws' AND costs.account_id IN ('123456789', '987654321')) OR (costs.provider = 'azure' AND costs.account_id IN ('account-1', 'account-2'))\n```\n\n\u274C **THIS DOES NOT WORK**\n\n```sql\ncosts.provider IN ('aws', 'azure')\n```\n\n- Resource costs require both provider and service in addition to the resource ID.\n\n**Example:**\n\n\u2705 **THIS WORKS**\n\n```sql\ncosts.provider = 'aws' AND costs.service = 'Amazon Relational Database Service' AND costs.resource_id = 'arn:aws:rds:us-east-1:123456789:db:primary-01'\n```\n\n\u274C **THIS DOES NOT WORK**\n\n```sql\ncosts.provider = 'aws' AND costs.resource_id = 'arn:aws:rds:us-east-1:123456789:db:primary-01'\n```\n\n- Category and subcategory costs also require provider and service.\n\n**Examples:**\n\n\u2705 **THESE WORK**\n\n```sql\ncosts.provider = 'fastly' AND costs.service = 'CDN' AND costs.category = 'Data Transfer'\n```\n\n```sql\ncosts.provider = 'aws' AND costs.service = 'AWS Certificate Manager' AND costs.subcategory = 'USE1-PaidPrivateCA'\n```\n\n\u274C **THESE DO NOT WORK**\n\n```sql\ncosts.provider = 'fastly' AND costs.category = 'Data Transfer'\n```\n\n```sql\ncosts.provider = 'aws' AND costs.subcategory = 'USE1-PaidPrivateCA'\n```\n",description:"Learn how to use VQL when querying Cost Reports in Vantage.",title:"VQL for Cost Reports"}],["vql/financial_commitment_report.md",{content:"\n> **Tip:** If you need help constructing a VQL query, navigate to the **Financial Commitment Reports** page in the Vantage console and click **New Report**. From the top left, open the **Filters** menu. Create a filter and click the **View as VQL** button at the top of the **Filters** menu to see a filter's VQL representation.\n\n## Financial Commitment Reports VQL Schema\n\nVQL for Financial Commitment Reports comprises one namespace, `financial_commitments`, which represents the available filters on Financial Commitment Reports in the Vantage console. To reference a filter, use the following syntax: `namespace.field` (e.g., `financial_commitments.service`). The following fields are available within the `financial_commitments` namespace.\n\n| Namespace | Field | VQL Example |\n| --- | --- | --- |\n| `financial_commitments` | `provider` | `provider = 'aws'` should be added as the first part of each statement |\n| `financial_commitments` | `service` | [Service example](#financial-commitments-by-service) |\n| `financial_commitments` | `resource_account_id` | [Account example](#financial-commitments-by-specific-account) |\n| `financial_commitments` | `provider_account_id` | [Billing Account example](#financial-commitments-by-specific-billing-account) |\n| `financial_commitments` | `commitment_type` | [Commitment Type example](#see-specific-commitment-types) |\n| `financial_commitments` | `commitment_id` | [Commitment ARN example](#financial-commitments-by-commitment-arn) |\n| `financial_commitments` | `cost_type` | [Charge Type example](#financial-commitments-by-charge-type) |\n| `financial_commitments` | `cost_category` | [Category example](#financial-commitments-by-category) |\n| `financial_commitments` | `cost_sub_category` | [Subcategory example](#financial-commitments-by-subcategory) |\n| `financial_commitments` | `instance_type` | [Instance Type example](#financial-commitments-by-instance-types) |\n| `financial_commitments` | `region` | [Region example](#financial-commitments-by-region) |\n| `financial_commitments` | `resource_tags` | [Tags example](#financial-commitments-by-tags) |\n\n\n### Keywords\n\nVQL includes a set of keywords to create complex filter conditions. These keywords function similar to their SQL equivalents. Note that each expression started with `provider = 'aws'`, followed by additional filters.\n\n| Keyword | Description | VQL Sample | Explanation |\n| --- | --- | --- | --- |\n| `AND` | Logical AND operator | `(financial_commitments.provider = 'aws' AND (financial_commitments.resource_tags->>'business-metric' = 'us-east-1a') AND (financial_commitments.cost_category = 'Alarm'))` | This example filters for a specific tag and category, where both conditions must be true. |\n| `OR` | Logical OR operator | `(financial_commitments.provider = 'aws' AND ((financial_commitments.resource_tags->>'business-metric' = 'us-east-1a') OR (financial_commitments.resource_tags->>'business-metric' = 'us-east-1b')))` | This example looks for results where the `business-metric` tag has a value of either `us-east-1a` or `us-east-1b`. At least one condition must be true. |\n| `!=` | Is not | `(financial_commitments.provider = 'aws' AND (financial_commitments.cost_type != 'Credit'))` | This example looks for results that are any charge type except for `Credit`. |\n| `IN` and `NOT IN` | Used to compare against an array/list | `(financial_commitments.provider = 'aws' AND (financial_commitments.resource_tags->>'business-metric' IN ('us-east-1a','us-east-1b','us-east-1c')))` | This example searches for results with the `business-metric` tag key and multiple values. This same query also works for `NOT IN` where the results are anything matching the tag key except for those particular values: `(financial_commitments.provider = 'aws' AND (financial_commitments.resource_tags->>'business-metric' NOT IN ('us-east-1a','us-east-1b','us-east-1c')))`. |\n| `LIKE` and `NOT LIKE` | Performs string comparisons | `(financial_commitments.provider = 'aws' AND (financial_commitments.commitment_id LIKE '%arn:aws:ec2%'))` | This example selects data where the commitment ARN value contains `arn:aws:ec2`, such as `arn:aws:ec2:us-west-2:1234`. This same query also works for `NOT LIKE` where data does not contain a particular string: `(financial_commitments.provider = 'aws' AND (financial_commitments.commitment_id NOT LIKE '%arn:aws:ec2%'))`. |\n| `->>` | This operator is used only when constructing queries related to tags | `(financial_commitments.provider = 'aws' AND (financial_commitments.resource_tags->>'environment' = 'staging'))` | This example looks for results with the tag name of `environment` and value of `staging`. |\n\nWith these operators and keywords, you can construct complex filter conditions in VQL.\n\n## VQL Examples\n\nThe following examples cover common use cases for VQL.\n\n### Financial Commitments by Service\n\nFilter for multiple services.\n\n```sql\n(financial_commitments.provider = 'aws' AND (financial_commitments.service IN ('AmazonAthena','AmazonCloudFront','AmazonECS')))\n```\n\n### Financial Commitments by Specific Account\n\nFilter down to an individual account.\n\n```sql\n(financial_commitments.provider = 'aws' AND (financial_commitments.resource_account_id = '123456789012'))\n```\n\n### Financial Commitments by Specific Billing Account\n\nFilter down to an individual billing account.\n\n```sql\n(financial_commitments.provider = 'aws' AND (financial_commitments.provider_account_id = '123456789012'))\n```\n\n### See Specific Commitment Types\n\nFilter out certain commitment types to see everything else.\n\n```sql\n(financial_commitments.provider = 'aws' AND (financial_commitments.commitment_type NOT IN ('credit','free')))\n```\n\n### Financial Commitments by Commitment ARN\n\nSee the impact of specific financial commitments related to EC2 by ARNs.\n\n```sql\n(financial_commitments.provider = 'aws' AND (financial_commitments.commitment_id LIKE '%arn:aws:ec2%'))\n```\n\n### Financial Commitments by Charge Type\n\nSee only usage-related commitments.\n\n```sql\n(financial_commitments.provider = 'aws' AND (financial_commitments.cost_type = 'Usage'))\n```\n\n### Financial Commitments by Category\n\nAll data transfer-related commitments.\n\n```sql\n(financial_commitments.provider = 'aws' AND (financial_commitments.cost_category = 'Data Transfer'))\n```\n\n### Financial Commitments by Subcategory\n\nFilter for Cloudfront and data transfer egress in APN2.\n\n```sql\n(financial_commitments.provider = 'aws' AND (financial_commitments.cost_sub_category IN ('APN2-DataTransfer-Out-Bytes','APN2-CloudFront-Out-Bytes')))\n```\n\n### Financial Commitments by Instance Types\n\nFilter from a list of different instance types.\n\n```sql\n(financial_commitments.provider = 'aws' AND (financial_commitments.instance_type IN ('c7a.12xlarge','c7gn.large','c7gn.medium')))\n```\n\n### Financial Commitments by Region\n\nSee all financial commitments in `us-east-1`.\n\n```sql\n(financial_commitments.provider = 'aws' AND (financial_commitments.region = 'us-east-1'))\n```\n\n### Financial Commitments by Tags\n\nFilter based on a specific tag called `business-metric` and a list of provided values.\n\n```sql\n(financial_commitments.provider = 'aws' AND (financial_commitments.resource_tags->>'business-metric' IN ('us-east-1a','us-east-1b','us-east-1c')))\n```\n\n### Multiple Filters\n\nComplex filter that shows combining two different statements using `OR` with multiple criteria.\n\n```sql\n((financial_commitments.provider = 'aws' AND (financial_commitments.resource_account_id = '123456789012') AND (financial_commitments.service = 'AmazonEC2')) OR (financial_commitments.provider = 'aws' AND (financial_commitments.resource_account_id = '098765432109') AND (financial_commitments.service = 'AmazonRDS')))\n```\n",description:"Learn how to use VQL when querying Financial Commitment Reports in Vantage.",title:"VQL for Financial Commitment Reports"}],["vql/index.md",{content:`
48
+ ]`;continue}n+=o[c],o[c]==="\\"?i=!0:s&&o[c]==="]"?s=!1:!s&&o[c]==="["&&(s=!0)}try{new RegExp(n)}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 n}function wl(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===E.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((o,n)=>({...o,[n]:W(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",n]})??qe(t)}),{}),additionalProperties:t.rejectedAdditionalProperties};let r={type:"object",additionalProperties:W(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if(t.target==="openApi3")return r;if(e.keyType?._def.typeName===E.ZodString&&e.keyType._def.checks?.length){let{type:o,...n}=bl(e.keyType._def,t);return{...r,propertyNames:n}}else{if(e.keyType?._def.typeName===E.ZodEnum)return{...r,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===E.ZodBranded&&e.keyType._def.type._def.typeName===E.ZodString&&e.keyType._def.type._def.checks?.length){let{type:o,...n}=yl(e.keyType._def,t);return{...r,propertyNames:n}}}return r}function Kb(e,t){if(t.mapStrategy==="record")return wl(e,t);let r=W(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||qe(t),o=W(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||qe(t);return{type:"array",maxItems:125,items:{type:"array",items:[r,o],minItems:2,maxItems:2}}}function Bb(e){let t=e.values,o=Object.keys(e.values).filter(i=>typeof t[t[i]]!="number").map(i=>t[i]),n=Array.from(new Set(o.map(i=>typeof i)));return{type:n.length===1?n[0]==="string"?"string":"number":["string","number"],enum:o}}function Hb(e){return e.target==="openAi"?void 0:{not:qe({...e,currentPath:[...e.currentPath,"not"]})}}function Jb(e){return e.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var Ms={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function Yb(e,t){if(t.target==="openApi3")return Qb(e,t);let r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(o=>o._def.typeName in Ms&&(!o._def.checks||!o._def.checks.length))){let o=r.reduce((n,i)=>{let s=Ms[i._def.typeName];return s&&!n.includes(s)?[...n,s]:n},[]);return{type:o.length>1?o:o[0]}}else if(r.every(o=>o._def.typeName==="ZodLiteral"&&!o.description)){let o=r.reduce((n,i)=>{let s=typeof i._def.value;switch(s){case"string":case"number":case"boolean":return[...n,s];case"bigint":return[...n,"integer"];case"object":if(i._def.value===null)return[...n,"null"];case"symbol":case"undefined":case"function":default:return n}},[]);if(o.length===r.length){let n=o.filter((i,s,a)=>a.indexOf(i)===s);return{type:n.length>1?n:n[0],enum:r.reduce((i,s)=>i.includes(s._def.value)?i:[...i,s._def.value],[])}}}else if(r.every(o=>o._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((o,n)=>[...o,...n._def.values.filter(i=>!o.includes(i))],[])};return Qb(e,t)}var Qb=(e,t)=>{let r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((o,n)=>W(o._def,{...t,currentPath:[...t.currentPath,"anyOf",`${n}`]})).filter(o=>!!o&&(!t.strictUnions||typeof o=="object"&&Object.keys(o).length>0));return r.length?{anyOf:r}:void 0};function Xb(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:Ms[e.innerType._def.typeName],nullable:!0}:{type:[Ms[e.innerType._def.typeName],"null"]};if(t.target==="openApi3"){let o=W(e.innerType._def,{...t,currentPath:[...t.currentPath]});return o&&"$ref"in o?{allOf:[o],nullable:!0}:o&&{...o,nullable:!0}}let r=W(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function ew(e,t){let r={type:"number"};if(!e.checks)return r;for(let o of e.checks)switch(o.kind){case"int":r.type="integer",Pm(r,"type",o.message,t);break;case"min":t.target==="jsonSchema7"?o.inclusive?ue(r,"minimum",o.value,o.message,t):ue(r,"exclusiveMinimum",o.value,o.message,t):(o.inclusive||(r.exclusiveMinimum=!0),ue(r,"minimum",o.value,o.message,t));break;case"max":t.target==="jsonSchema7"?o.inclusive?ue(r,"maximum",o.value,o.message,t):ue(r,"exclusiveMaximum",o.value,o.message,t):(o.inclusive||(r.exclusiveMaximum=!0),ue(r,"maximum",o.value,o.message,t));break;case"multipleOf":ue(r,"multipleOf",o.value,o.message,t);break}return r}function tw(e,t){let r=t.target==="openAi",o={type:"object",properties:{}},n=[],i=e.shape();for(let a in i){let c=i[a];if(c===void 0||c._def===void 0)continue;let u=JI(c);u&&r&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),u=!1);let l=W(c._def,{...t,currentPath:[...t.currentPath,"properties",a],propertyPath:[...t.currentPath,"properties",a]});l!==void 0&&(o.properties[a]=l,u||n.push(a))}n.length&&(o.required=n);let s=HI(e,t);return s!==void 0&&(o.additionalProperties=s),o}function HI(e,t){if(e.catchall._def.typeName!=="ZodNever")return W(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 JI(e){try{return e.isOptional()}catch{return!0}}var rw=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return W(e.innerType._def,t);let r=W(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:qe(t)},r]}:qe(t)};var nw=(e,t)=>{if(t.pipeStrategy==="input")return W(e.in._def,t);if(t.pipeStrategy==="output")return W(e.out._def,t);let r=W(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),o=W(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,o].filter(n=>n!==void 0)}};function ow(e,t){return W(e.type._def,t)}function iw(e,t){let o={type:"array",uniqueItems:!0,items:W(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&ue(o,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&ue(o,"maxItems",e.maxSize.value,e.maxSize.message,t),o}function sw(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,o)=>W(r._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]})).reduce((r,o)=>o===void 0?r:[...r,o],[]),additionalItems:W(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,o)=>W(r._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]})).reduce((r,o)=>o===void 0?r:[...r,o],[])}}function aw(e){return{not:qe(e)}}function cw(e){return qe(e)}var uw=(e,t)=>W(e.innerType._def,t);var lw=(e,t,r)=>{switch(t){case E.ZodString:return bl(e,r);case E.ZodNumber:return ew(e,r);case E.ZodObject:return tw(e,r);case E.ZodBigInt:return qb(e,r);case E.ZodBoolean:return Mb();case E.ZodDate:return zm(e,r);case E.ZodUndefined:return aw(r);case E.ZodNull:return Jb(r);case E.ZodArray:return Db(e,r);case E.ZodUnion:case E.ZodDiscriminatedUnion:return Yb(e,r);case E.ZodIntersection:return Fb(e,r);case E.ZodTuple:return sw(e,r);case E.ZodRecord:return wl(e,r);case E.ZodLiteral:return Wb(e,r);case E.ZodEnum:return Vb(e);case E.ZodNativeEnum:return Bb(e);case E.ZodNullable:return Xb(e,r);case E.ZodOptional:return rw(e,r);case E.ZodMap:return Kb(e,r);case E.ZodSet:return iw(e,r);case E.ZodLazy:return()=>e.getter()._def;case E.ZodPromise:return ow(e,r);case E.ZodNaN:case E.ZodNever:return Hb(r);case E.ZodEffects:return Zb(e,r);case E.ZodAny:return qe(r);case E.ZodUnknown:return cw(r);case E.ZodDefault:return Lb(e,r);case E.ZodBranded:return yl(e,r);case E.ZodReadonly:return uw(e,r);case E.ZodCatch:return Ub(e,r);case E.ZodPipeline:return nw(e,r);case E.ZodFunction:case E.ZodVoid:case E.ZodSymbol:return;default:return(o=>{})(t)}};function W(e,t,r=!1){let o=t.seen.get(e);if(t.override){let a=t.override?.(e,t,o,r);if(a!==jb)return a}if(o&&!r){let a=QI(o,t);if(a!==void 0)return a}let n={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,n);let i=lw(e,e.typeName,t),s=typeof i=="function"?W(i(),t):i;if(s&&YI(e,t,s),t.postProcess){let a=t.postProcess(s,e,t);return n.jsonSchema=s,a}return n.jsonSchema=s,s}var QI=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:vl(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((r,o)=>t.currentPath[o]===r)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),qe(t)):t.$refStrategy==="seen"?qe(t):void 0}},YI=(e,t,r)=>(e.description&&(r.description=e.description,t.markdownDescription&&(r.markdownDescription=e.description)),r);var Nm=(e,t)=>{let r=Cb(t),o=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[u,l])=>({...c,[u]:W(l._def,{...r,currentPath:[...r.basePath,r.definitionPath,u]},!0)??qe(r)}),{}):void 0,n=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,i=W(e._def,n===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,n]},!1)??qe(r),s=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;s!==void 0&&(i.title=s),r.flags.hasReferencedOpenAiAnyType&&(o||(o={}),o[r.openAiAnyTypeName]||(o[r.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:r.$refStrategy==="relative"?"1":[...r.basePath,r.definitionPath,r.openAiAnyTypeName].join("/")}}));let a=n===void 0?o?{...i,[r.definitionPath]:o}:i:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,n].join("/"),[r.definitionPath]:{...o,[n]:i}};return r.target==="jsonSchema7"?a.$schema="http://json-schema.org/draft-07/schema#":(r.target==="jsonSchema2019-09"||r.target==="openAi")&&(a.$schema="https://json-schema.org/draft/2019-09/schema#"),r.target==="openAi"&&("anyOf"in a||"oneOf"in a||"allOf"in a||"type"in a&&Array.isArray(a.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),a};function XI(e){return!e||e==="jsonSchema7"||e==="draft-7"?"draft-7":e==="jsonSchema2019-09"||e==="draft-2020-12"?"draft-2020-12":"draft-7"}function Om(e,t){return Rt(e)?xo(e,{target:XI(t?.target),io:t?.pipeStrategy??"input"}):Nm(e,{strictUnions:t?.strictUnions??!0,pipeStrategy:t?.pipeStrategy??"input"})}function Rm(e){let r=Gr(e)?.method;if(!r)throw new Error("Schema is missing a method literal");let o=Du(r);if(typeof o!="string")throw new Error("Schema method literal must be a string");return o}function jm(e,t){let r=Wr(e,t);if(!r.success)throw r.error;return r.data}var eN=6e4,$l=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,r=>{this._oncancel(r)}),this.setNotificationHandler(nl,r=>{this._onprogress(r)}),this.setRequestHandler(rl,r=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(ol,async(r,o)=>{let n=await this._taskStore.getTask(r.params.taskId,o.sessionId);if(!n)throw new U(V.InvalidParams,"Failed to retrieve task: Task not found");return{...n}}),this.setRequestHandler(sl,async(r,o)=>{let n=async()=>{let i=r.params.taskId;if(this._taskMessageQueue){let a;for(;a=await this._taskMessageQueue.dequeue(i,o.sessionId);){if(a.type==="response"||a.type==="error"){let c=a.message,u=c.id,l=this._requestResolvers.get(u);if(l)if(this._requestResolvers.delete(u),a.type==="response")l(c);else{let d=c,h=new U(d.error.code,d.error.message,d.error.data);l(h)}else{let d=a.type==="response"?"Response":"Error";this._onerror(new Error(`${d} handler missing for request ${u}`))}continue}await this._transport?.send(a.message,{relatedRequestId:o.requestId})}}let s=await this._taskStore.getTask(i,o.sessionId);if(!s)throw new U(V.InvalidParams,`Task not found: ${i}`);if(!Br(s.status))return await this._waitForTaskUpdate(i,o.signal),await n();if(Br(s.status)){let a=await this._taskStore.getTaskResult(i,o.sessionId);return this._clearTaskQueue(i),{...a,_meta:{...a._meta,[Kr]:{taskId:i}}}}return await n()};return await n()}),this.setRequestHandler(al,async(r,o)=>{try{let{tasks:n,nextCursor:i}=await this._taskStore.listTasks(r.params?.cursor,o.sessionId);return{tasks:n,nextCursor:i,_meta:{}}}catch(n){throw new U(V.InvalidParams,`Failed to list tasks: ${n instanceof Error?n.message:String(n)}`)}}),this.setRequestHandler(ul,async(r,o)=>{try{let n=await this._taskStore.getTask(r.params.taskId,o.sessionId);if(!n)throw new U(V.InvalidParams,`Task not found: ${r.params.taskId}`);if(Br(n.status))throw new U(V.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(r.params.taskId,"cancelled","Client cancelled task execution.",o.sessionId),this._clearTaskQueue(r.params.taskId);let i=await this._taskStore.getTask(r.params.taskId,o.sessionId);if(!i)throw new U(V.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...i}}catch(n){throw n instanceof U?n:new U(V.InvalidRequest,`Failed to cancel task: ${n instanceof Error?n.message:String(n)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,r,o,n,i=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(n,r),startTime:Date.now(),timeout:r,maxTotalTimeout:o,resetTimeoutOnProgress:i,onTimeout:n})}_resetTimeout(t){let r=this._timeoutInfo.get(t);if(!r)return!1;let o=Date.now()-r.startTime;if(r.maxTotalTimeout&&o>=r.maxTotalTimeout)throw this._timeoutInfo.delete(t),U.fromError(V.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:o});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(t){let r=this._timeoutInfo.get(t);r&&(clearTimeout(r.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 r=this.transport?.onclose;this._transport.onclose=()=>{r?.(),this._onclose()};let o=this.transport?.onerror;this._transport.onerror=i=>{o?.(i),this._onerror(i)};let n=this._transport?.onmessage;this._transport.onmessage=(i,s)=>{n?.(i,s),Is(i)||$b(i)?this._onresponse(i):fm(i)?this._onrequest(i,s):wb(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._requestHandlerAbortControllers.values())o.abort();this._requestHandlerAbortControllers.clear();let r=U.fromError(V.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let o of t.values())o(r)}_onerror(t){this.onerror?.(t)}_onnotification(t){let r=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(t)).catch(o=>this._onerror(new Error(`Uncaught error in notification handler: ${o}`)))}_onrequest(t,r){let o=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,n=this._transport,i=t.params?._meta?.[Kr]?.taskId;if(o===void 0){let l={jsonrpc:"2.0",id:t.id,error:{code:V.MethodNotFound,message:"Method not found"}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:"error",message:l,timestamp:Date.now()},n?.sessionId).catch(d=>this._onerror(new Error(`Failed to enqueue error response: ${d}`))):n?.send(l).catch(d=>this._onerror(new Error(`Failed to send an error response: ${d}`)));return}let s=new AbortController;this._requestHandlerAbortControllers.set(t.id,s);let a=vb(t.params)?t.params.task:void 0,c=this._taskStore?this.requestTaskStore(t,n?.sessionId):void 0,u={signal:s.signal,sessionId:n?.sessionId,_meta:t.params?._meta,sendNotification:async l=>{if(s.signal.aborted)return;let d={relatedRequestId:t.id};i&&(d.relatedTask={taskId:i}),await this.notification(l,d)},sendRequest:async(l,d,h)=>{if(s.signal.aborted)throw new U(V.ConnectionClosed,"Request was cancelled");let m={...h,relatedRequestId:t.id};i&&!m.relatedTask&&(m.relatedTask={taskId:i});let p=m.relatedTask?.taskId??i;return p&&c&&await c.updateTaskStatus(p,"input_required"),await this.request(l,d,m)},authInfo:r?.authInfo,requestId:t.id,requestInfo:r?.requestInfo,taskId:i,taskStore:c,taskRequestedTtl:a?.ttl,closeSSEStream:r?.closeSSEStream,closeStandaloneSSEStream:r?.closeStandaloneSSEStream};Promise.resolve().then(()=>{a&&this.assertTaskHandlerCapability(t.method)}).then(()=>o(t,u)).then(async l=>{if(s.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()},n?.sessionId):await n?.send(d)},async l=>{if(s.signal.aborted)return;let d={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(l.code)?l.code:V.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()},n?.sessionId):await n?.send(d)}).catch(l=>this._onerror(new Error(`Failed to send response: ${l}`))).finally(()=>{this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){let{progressToken:r,...o}=t.params,n=Number(r),i=this._progressHandlers.get(n);if(!i){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}let s=this._responseHandlers.get(n),a=this._timeoutInfo.get(n);if(a&&s&&a.resetTimeoutOnProgress)try{this._resetTimeout(n)}catch(c){this._responseHandlers.delete(n),this._progressHandlers.delete(n),this._cleanupTimeout(n),s(c);return}i(o)}_onresponse(t){let r=Number(t.id),o=this._requestResolvers.get(r);if(o){if(this._requestResolvers.delete(r),Is(t))o(t);else{let s=new U(t.error.code,t.error.message,t.error.data);o(s)}return}let n=this._responseHandlers.get(r);if(n===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(r),this._cleanupTimeout(r);let i=!1;if(Is(t)&&t.result&&typeof t.result=="object"){let s=t.result;if(s.task&&typeof s.task=="object"){let a=s.task;typeof a.taskId=="string"&&(i=!0,this._taskProgressTokens.set(a.taskId,r))}}if(i||this._progressHandlers.delete(r),Is(t))n(t);else{let s=U.fromError(t.error.code,t.error.message,t.error.data);n(s)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,r,o){let{task:n}=o??{};if(!n){try{yield{type:"result",result:await this.request(t,r,o)}}catch(s){yield{type:"error",error:s instanceof U?s:new U(V.InternalError,String(s))}}return}let i;try{let s=await this.request(t,Io,o);if(s.task)i=s.task.taskId,yield{type:"taskCreated",task:s.task};else throw new U(V.InternalError,"Task creation did not return a task");for(;;){let a=await this.getTask({taskId:i},o);if(yield{type:"taskStatus",task:a},Br(a.status)){a.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:i},r,o)}:a.status==="failed"?yield{type:"error",error:new U(V.InternalError,`Task ${i} failed`)}:a.status==="cancelled"&&(yield{type:"error",error:new U(V.InternalError,`Task ${i} was cancelled`)});return}if(a.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:i},r,o)};return}let c=a.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(u=>setTimeout(u,c)),o?.signal?.throwIfAborted()}}catch(s){yield{type:"error",error:s instanceof U?s:new U(V.InternalError,String(s))}}}request(t,r,o){let{relatedRequestId:n,resumptionToken:i,onresumptiontoken:s,task:a,relatedTask:c}=o??{};return new Promise((u,l)=>{let d=$=>{l($)};if(!this._transport){d(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method),a&&this.assertTaskCapability(t.method)}catch($){d($);return}o?.signal?.throwIfAborted();let h=this._requestMessageId++,m={...t,jsonrpc:"2.0",id:h};o?.onprogress&&(this._progressHandlers.set(h,o.onprogress),m.params={...t.params,_meta:{...t.params?._meta||{},progressToken:h}}),a&&(m.params={...m.params,task:a}),c&&(m.params={...m.params,_meta:{...m.params?._meta||{},[Kr]:c}});let p=$=>{this._responseHandlers.delete(h),this._progressHandlers.delete(h),this._cleanupTimeout(h),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:h,reason:String($)}},{relatedRequestId:n,resumptionToken:i,onresumptiontoken:s}).catch(N=>this._onerror(new Error(`Failed to send cancellation: ${N}`)));let k=$ instanceof U?$:new U(V.RequestTimeout,String($));l(k)};this._responseHandlers.set(h,$=>{if(!o?.signal?.aborted){if($ instanceof Error)return l($);try{let k=Wr(r,$.result);k.success?u(k.data):l(k.error)}catch(k){l(k)}}}),o?.signal?.addEventListener("abort",()=>{p(o?.signal?.reason)});let f=o?.timeout??eN,_=()=>p(U.fromError(V.RequestTimeout,"Request timed out",{timeout:f}));this._setupTimeout(h,f,o?.maxTotalTimeout,_,o?.resetTimeoutOnProgress??!1);let y=c?.taskId;if(y){let $=k=>{let N=this._responseHandlers.get(h);N?N(k):this._onerror(new Error(`Response handler missing for side-channeled request ${h}`))};this._requestResolvers.set(h,$),this._enqueueTaskMessage(y,{type:"request",message:m,timestamp:Date.now()}).catch(k=>{this._cleanupTimeout(h),l(k)})}else this._transport.send(m,{relatedRequestId:n,resumptionToken:i,onresumptiontoken:s}).catch($=>{this._cleanupTimeout(h),l($)})})}async getTask(t,r){return this.request({method:"tasks/get",params:t},il,r)}async getTaskResult(t,r,o){return this.request({method:"tasks/result",params:t},r,o)}async listTasks(t,r){return this.request({method:"tasks/list",params:t},cl,r)}async cancelTask(t,r){return this.request({method:"tasks/cancel",params:t},Sb,r)}async notification(t,r){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);let o=r?.relatedTask?.taskId;if(o){let a={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[Kr]:r.relatedTask}}};await this._enqueueTaskMessage(o,{type:"notification",message:a,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!r?.relatedRequestId&&!r?.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 a={...t,jsonrpc:"2.0"};r?.relatedTask&&(a={...a,params:{...a.params,_meta:{...a.params?._meta||{},[Kr]:r.relatedTask}}}),this._transport?.send(a,r).catch(c=>this._onerror(c))});return}let s={...t,jsonrpc:"2.0"};r?.relatedTask&&(s={...s,params:{...s.params,_meta:{...s.params?._meta||{},[Kr]:r.relatedTask}}}),await this._transport.send(s,r)}setRequestHandler(t,r){let o=Rm(t);this.assertRequestHandlerCapability(o),this._requestHandlers.set(o,(n,i)=>{let s=jm(t,n);return Promise.resolve(r(s,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,r){let o=Rm(t);this._notificationHandlers.set(o,n=>{let i=jm(t,n);return Promise.resolve(r(i))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){let r=this._taskProgressTokens.get(t);r!==void 0&&(this._progressHandlers.delete(r),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,r,o){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let n=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,r,o,n)}async _clearTaskQueue(t,r){if(this._taskMessageQueue){let o=await this._taskMessageQueue.dequeueAll(t,r);for(let n of o)if(n.type==="request"&&fm(n.message)){let i=n.message.id,s=this._requestResolvers.get(i);s?(s(new U(V.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,r){let o=this._options?.defaultTaskPollInterval??1e3;try{let n=await this._taskStore?.getTask(t);n?.pollInterval&&(o=n.pollInterval)}catch{}return new Promise((n,i)=>{if(r.aborted){i(new U(V.InvalidRequest,"Request cancelled"));return}let s=setTimeout(n,o);r.addEventListener("abort",()=>{clearTimeout(s),i(new U(V.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,r){let o=this._taskStore;if(!o)throw new Error("No task store configured");return{createTask:async n=>{if(!t)throw new Error("No request provided");return await o.createTask(n,t.id,{method:t.method,params:t.params},r)},getTask:async n=>{let i=await o.getTask(n,r);if(!i)throw new U(V.InvalidParams,"Failed to retrieve task: Task not found");return i},storeTaskResult:async(n,i,s)=>{await o.storeTaskResult(n,i,s,r);let a=await o.getTask(n,r);if(a){let c=As.parse({method:"notifications/tasks/status",params:a});await this.notification(c),Br(a.status)&&this._cleanupTaskProgressHandler(n)}},getTaskResult:n=>o.getTaskResult(n,r),updateTaskStatus:async(n,i,s)=>{let a=await o.getTask(n,r);if(!a)throw new U(V.InvalidParams,`Task "${n}" not found - it may have been cleaned up`);if(Br(a.status))throw new U(V.InvalidParams,`Cannot update task "${n}" from terminal status "${a.status}" to "${i}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await o.updateTaskStatus(n,i,s,r);let c=await o.getTask(n,r);if(c){let u=As.parse({method:"notifications/tasks/status",params:c});await this.notification(u),Br(c.status)&&this._cleanupTaskProgressHandler(n)}},listTasks:n=>o.listTasks(n,r)}}};function dw(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function pw(e,t){let r={...e};for(let o in t){let n=o,i=t[n];if(i===void 0)continue;let s=r[n];dw(s)&&dw(i)?r[n]={...s,...i}:r[n]=i}return r}var p0=Ue(qk(),1),f0=Ue(d0(),1);function U4(){let e=new p0.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,f0.default)(e),e}var jd=class{constructor(t){this._ajv=t??U4()}getValidator(t){let r="$id"in t&&typeof t.$id=="string"?this._ajv.getSchema(t.$id)??this._ajv.compile(t):this._ajv.compile(t);return o=>r(o)?{valid:!0,data:o,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(r.errors)}}};var Ad=class{constructor(t){this._server=t}requestStream(t,r,o){return this._server.requestStream(t,r,o)}createMessageStream(t,r){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 n=t.messages[t.messages.length-1],i=Array.isArray(n.content)?n.content:[n.content],s=i.some(l=>l.type==="tool_result"),a=t.messages.length>1?t.messages[t.messages.length-2]:void 0,c=a?Array.isArray(a.content)?a.content:[a.content]:[],u=c.some(l=>l.type==="tool_use");if(s){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(h=>h.type==="tool_use").map(h=>h.id)),d=new Set(i.filter(h=>h.type==="tool_result").map(h=>h.toolUseId));if(l.size!==d.size||![...l].every(h=>d.has(h)))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},qs,r)}elicitInputStream(t,r){let o=this._server.getClientCapabilities(),n=t.mode??"form";switch(n){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=n==="form"&&t.mode===void 0?{...t,mode:"form"}:t;return this.requestStream({method:"elicitation/create",params:i},Ro,r)}async getTask(t,r){return this._server.getTask({taskId:t},r)}async getTaskResult(t,r,o){return this._server.getTaskResult({taskId:t},r,o)}async listTasks(t,r){return this._server.listTasks(t?{cursor:t}:void 0,r)}async cancelTask(t,r){return this._server.cancelTask({taskId:t},r)}};function m0(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"tools/call":if(!e.tools?.call)throw new Error(`${r} does not support task creation for tools/call (required for ${t})`);break;default:break}}function h0(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"sampling/createMessage":if(!e.sampling?.createMessage)throw new Error(`${r} does not support task creation for sampling/createMessage (required for ${t})`);break;case"elicitation/create":if(!e.elicitation?.create)throw new Error(`${r} does not support task creation for elicitation/create (required for ${t})`);break;default:break}}var Cd=class extends $l{constructor(t,r){super(r),this._serverInfo=t,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(Ds.options.map((o,n)=>[o,n])),this.isMessageIgnored=(o,n)=>{let i=this._loggingLevels.get(n);return i?this.LOG_LEVEL_SEVERITY.get(o)<this.LOG_LEVEL_SEVERITY.get(i):!1},this._capabilities=r?.capabilities??{},this._instructions=r?.instructions,this._jsonSchemaValidator=r?.jsonSchemaValidator??new jd,this.setRequestHandler(gm,o=>this._oninitialize(o)),this.setNotificationHandler(_m,()=>this.oninitialized?.()),this._capabilities.logging&&this.setRequestHandler(xm,async(o,n)=>{let i=n.sessionId||n.requestInfo?.headers["mcp-session-id"]||void 0,{level:s}=o.params,a=Ds.safeParse(s);return a.success&&this._loggingLevels.set(i,a.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new Ad(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=pw(this._capabilities,t)}setRequestHandler(t,r){let n=Gr(t)?.method;if(!n)throw new Error("Schema is missing a method literal");let i;if(Rt(n)){let a=n;i=a._zod?.def?.value??a.value}else{let a=n;i=a._def?.value??a.value}if(typeof i!="string")throw new Error("Schema method literal must be a string");if(i==="tools/call"){let a=async(c,u)=>{let l=Wr(Oo,c);if(!l.success){let p=l.error instanceof Error?l.error.message:String(l.error);throw new U(V.InvalidParams,`Invalid tools/call request: ${p}`)}let{params:d}=l.data,h=await Promise.resolve(r(c,u));if(d.task){let p=Wr(Io,h);if(!p.success){let f=p.error instanceof Error?p.error.message:String(p.error);throw new U(V.InvalidParams,`Invalid task creation result: ${f}`)}return p.data}let m=Wr(gl,h);if(!m.success){let p=m.error instanceof Error?m.error.message:String(m.error);throw new U(V.InvalidParams,`Invalid tools/call result: ${p}`)}return m.data};return super.setRequestHandler(t,a)}return super.setRequestHandler(t,r)}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){h0(this._clientCapabilities?.tasks?.requests,t,"Client")}assertTaskHandlerCapability(t){this._capabilities&&m0(this._capabilities.tasks?.requests,t,"Server")}async _oninitialize(t){let r=t.params.protocolVersion;return this._clientCapabilities=t.params.capabilities,this._clientVersion=t.params.clientInfo,{protocolVersion:hb.includes(r)?r:dm,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,r){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],n=Array.isArray(o.content)?o.content:[o.content],i=n.some(u=>u.type==="tool_result"),s=t.messages.length>1?t.messages[t.messages.length-2]:void 0,a=s?Array.isArray(s.content)?s.content:[s.content]:[],c=a.some(u=>u.type==="tool_use");if(i){if(n.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(a.filter(d=>d.type==="tool_use").map(d=>d.id)),l=new Set(n.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},Sm,r):this.request({method:"sampling/createMessage",params:t},qs,r)}async elicitInput(t,r){switch(t.mode??"form"){case"url":{if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support url elicitation.");let n=t;return this.request({method:"elicitation/create",params:n},Ro,r)}case"form":{if(!this._clientCapabilities?.elicitation?.form)throw new Error("Client does not support form elicitation.");let n=t.mode==="form"?t:{...t,mode:"form"},i=await this.request({method:"elicitation/create",params:n},Ro,r);if(i.action==="accept"&&i.content&&n.requestedSchema)try{let a=this._jsonSchemaValidator.getValidator(n.requestedSchema)(i.content);if(!a.valid)throw new U(V.InvalidParams,`Elicitation response content does not match requested schema: ${a.errorMessage}`)}catch(s){throw s instanceof U?s:new U(V.InternalError,`Error validating elicitation response: ${s instanceof Error?s.message:String(s)}`)}return i}}}createElicitationCompletionNotifier(t,r){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}},r)}async listRoots(t,r){return this.request({method:"roots/list",params:t},Tm,r)}async sendLoggingMessage(t,r){if(this._capabilities.logging&&!this.isMessageIgnored(t.level,r))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 _0=Symbol.for("mcp.completable");function ov(e){return!!e&&typeof e=="object"&&_0 in e}function v0(e){return e[_0]?.complete}var g0;(function(e){e.Completable="McpCompletable"})(g0||(g0={}));var L4=/^[A-Za-z0-9._-]{1,128}$/;function Z4(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"),!L4.test(e)){let r=e.split("").filter(o=>!/[A-Za-z0-9._-]/.test(o)).filter((o,n,i)=>i.indexOf(o)===n);return t.push(`Tool name contains invalid characters: ${r.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 V4(e,t){if(t.length>0){console.warn(`Tool name validation warning for "${e}":`);for(let r of t)console.warn(` - ${r}`);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 iv(e){let t=Z4(e);return V4(e,t.warnings),t.isValid}var Dd=class{constructor(t){this._mcpServer=t}registerToolTask(t,r,o){let n={taskSupport:"required",...r.execution};if(n.taskSupport==="forbidden")throw new Error(`Cannot register task-based tool '${t}' with taskSupport 'forbidden'. Use registerTool() instead.`);return this._mcpServer._createRegisteredTool(t,r.title,r.description,r.inputSchema,r.outputSchema,r.annotations,n,r._meta,o)}};var qd=class{constructor(t,r){this._registeredResources={},this._registeredResourceTemplates={},this._registeredTools={},this._registeredPrompts={},this._toolHandlersInitialized=!1,this._completionHandlerInitialized=!1,this._resourceHandlersInitialized=!1,this._promptHandlersInitialized=!1,this.server=new Cd(t,r)}get experimental(){return this._experimental||(this._experimental={tasks:new Dd(this)}),this._experimental}async connect(t){return await this.server.connect(t)}async close(){await this.server.close()}setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler(dn(hl)),this.server.assertCanSetRequestHandler(dn(Oo)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(hl,()=>({tools:Object.entries(this._registeredTools).filter(([,t])=>t.enabled).map(([t,r])=>{let o={name:t,title:r.title,description:r.description,inputSchema:(()=>{let n=So(r.inputSchema);return n?Om(n,{strictUnions:!0,pipeStrategy:"input"}):F4})(),annotations:r.annotations,execution:r.execution,_meta:r._meta};if(r.outputSchema){let n=So(r.outputSchema);n&&(o.outputSchema=Om(n,{strictUnions:!0,pipeStrategy:"output"}))}return o})})),this.server.setRequestHandler(Oo,async(t,r)=>{try{let o=this._registeredTools[t.params.name];if(!o)throw new U(V.InvalidParams,`Tool ${t.params.name} not found`);if(!o.enabled)throw new U(V.InvalidParams,`Tool ${t.params.name} disabled`);let n=!!t.params.task,i=o.execution?.taskSupport,s="createTask"in o.handler;if((i==="required"||i==="optional")&&!s)throw new U(V.InternalError,`Tool ${t.params.name} has taskSupport '${i}' but was not registered with registerToolTask`);if(i==="required"&&!n)throw new U(V.MethodNotFound,`Tool ${t.params.name} requires task augmentation (taskSupport: 'required')`);if(i==="optional"&&!n&&s)return await this.handleAutomaticTaskPolling(o,t,r);let a=await this.validateToolInput(o,t.params.arguments,t.params.name),c=await this.executeToolHandler(o,a,r);return n||await this.validateToolOutput(o,c,t.params.name),c}catch(o){if(o instanceof U&&o.code===V.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,r,o){if(!t.inputSchema)return;let i=So(t.inputSchema)??t.inputSchema,s=await Au(i,r);if(!s.success){let a="error"in s?s.error:"Unknown error",c=Cu(a);throw new U(V.InvalidParams,`Input validation error: Invalid arguments for tool ${o}: ${c}`)}return s.data}async validateToolOutput(t,r,o){if(!t.outputSchema||!("content"in r)||r.isError)return;if(!r.structuredContent)throw new U(V.InvalidParams,`Output validation error: Tool ${o} has an output schema but no structured content was provided`);let n=So(t.outputSchema),i=await Au(n,r.structuredContent);if(!i.success){let s="error"in i?i.error:"Unknown error",a=Cu(s);throw new U(V.InvalidParams,`Output validation error: Invalid structured content for tool ${o}: ${a}`)}}async executeToolHandler(t,r,o){let n=t.handler;if("createTask"in n){if(!o.taskStore)throw new Error("No task store provided.");let s={...o,taskStore:o.taskStore};if(t.inputSchema){let a=n;return await Promise.resolve(a.createTask(r,s))}else{let a=n;return await Promise.resolve(a.createTask(s))}}if(t.inputSchema){let s=n;return await Promise.resolve(s(r,o))}else{let s=n;return await Promise.resolve(s(o))}}async handleAutomaticTaskPolling(t,r,o){if(!o.taskStore)throw new Error("No task store provided for task-capable tool.");let n=await this.validateToolInput(t,r.params.arguments,r.params.name),i=t.handler,s={...o,taskStore:o.taskStore},a=n?await Promise.resolve(i.createTask(n,s)):await Promise.resolve(i.createTask(s)),c=a.task.taskId,u=a.task,l=u.pollInterval??5e3;for(;u.status!=="completed"&&u.status!=="failed"&&u.status!=="cancelled";){await new Promise(h=>setTimeout(h,l));let d=await o.taskStore.getTask(c);if(!d)throw new U(V.InternalError,`Task ${c} not found during polling`);u=d}return await o.taskStore.getTaskResult(c)}setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler(dn(_l)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(_l,async t=>{switch(t.params.ref.type){case"ref/prompt":return Nb(t),this.handlePromptCompletion(t,t.params.ref);case"ref/resource":return Ob(t),this.handleResourceCompletion(t,t.params.ref);default:throw new U(V.InvalidParams,`Invalid completion reference: ${t.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(t,r){let o=this._registeredPrompts[r.name];if(!o)throw new U(V.InvalidParams,`Prompt ${r.name} not found`);if(!o.enabled)throw new U(V.InvalidParams,`Prompt ${r.name} disabled`);if(!o.argsSchema)return Va;let i=Gr(o.argsSchema)?.[t.params.argument.name];if(!ov(i))return Va;let s=v0(i);if(!s)return Va;let a=await s(t.params.argument.value,t.params.context);return b0(a)}async handleResourceCompletion(t,r){let o=Object.values(this._registeredResourceTemplates).find(s=>s.resourceTemplate.uriTemplate.toString()===r.uri);if(!o){if(this._registeredResources[r.uri])return Va;throw new U(V.InvalidParams,`Resource template ${t.params.ref.uri} not found`)}let n=o.resourceTemplate.completeCallback(t.params.argument.name);if(!n)return Va;let i=await n(t.params.argument.value,t.params.context);return b0(i)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(dn(ll)),this.server.assertCanSetRequestHandler(dn(dl)),this.server.assertCanSetRequestHandler(dn(pl)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(ll,async(t,r)=>{let o=Object.entries(this._registeredResources).filter(([i,s])=>s.enabled).map(([i,s])=>({uri:i,name:s.name,...s.metadata})),n=[];for(let i of Object.values(this._registeredResourceTemplates)){if(!i.resourceTemplate.listCallback)continue;let s=await i.resourceTemplate.listCallback(r);for(let a of s.resources)n.push({...i.metadata,...a})}return{resources:[...o,...n]}}),this.server.setRequestHandler(dl,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([r,o])=>({name:r,uriTemplate:o.resourceTemplate.uriTemplate.toString(),...o.metadata}))})),this.server.setRequestHandler(pl,async(t,r)=>{let o=new URL(t.params.uri),n=this._registeredResources[o.toString()];if(n){if(!n.enabled)throw new U(V.InvalidParams,`Resource ${o} disabled`);return n.readCallback(o,r)}for(let i of Object.values(this._registeredResourceTemplates)){let s=i.resourceTemplate.uriTemplate.match(o.toString());if(s)return i.readCallback(o,s,r)}throw new U(V.InvalidParams,`Resource ${o} not found`)}),this._resourceHandlersInitialized=!0)}setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler(dn(fl)),this.server.assertCanSetRequestHandler(dn(ml)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(fl,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,t])=>t.enabled).map(([t,r])=>({name:t,title:r.title,description:r.description,arguments:r.argsSchema?G4(r.argsSchema):void 0}))})),this.server.setRequestHandler(ml,async(t,r)=>{let o=this._registeredPrompts[t.params.name];if(!o)throw new U(V.InvalidParams,`Prompt ${t.params.name} not found`);if(!o.enabled)throw new U(V.InvalidParams,`Prompt ${t.params.name} disabled`);if(o.argsSchema){let n=So(o.argsSchema),i=await Au(n,t.params.arguments);if(!i.success){let c="error"in i?i.error:"Unknown error",u=Cu(c);throw new U(V.InvalidParams,`Invalid arguments for prompt ${t.params.name}: ${u}`)}let s=i.data,a=o.callback;return await Promise.resolve(a(s,r))}else{let n=o.callback;return await Promise.resolve(n(r))}}),this._promptHandlersInitialized=!0)}resource(t,r,...o){let n;typeof o[0]=="object"&&(n=o.shift());let i=o[0];if(typeof r=="string"){if(this._registeredResources[r])throw new Error(`Resource ${r} is already registered`);let s=this._createRegisteredResource(t,void 0,r,n,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}else{if(this._registeredResourceTemplates[t])throw new Error(`Resource template ${t} is already registered`);let s=this._createRegisteredResourceTemplate(t,void 0,r,n,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}}registerResource(t,r,o,n){if(typeof r=="string"){if(this._registeredResources[r])throw new Error(`Resource ${r} is already registered`);let i=this._createRegisteredResource(t,o.title,r,o,n);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,r,o,n);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),i}}_createRegisteredResource(t,r,o,n,i){let s={name:t,title:r,metadata:n,readCallback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({uri:null}),update:a=>{typeof a.uri<"u"&&a.uri!==o&&(delete this._registeredResources[o],a.uri&&(this._registeredResources[a.uri]=s)),typeof a.name<"u"&&(s.name=a.name),typeof a.title<"u"&&(s.title=a.title),typeof a.metadata<"u"&&(s.metadata=a.metadata),typeof a.callback<"u"&&(s.readCallback=a.callback),typeof a.enabled<"u"&&(s.enabled=a.enabled),this.sendResourceListChanged()}};return this._registeredResources[o]=s,s}_createRegisteredResourceTemplate(t,r,o,n,i){let s={resourceTemplate:o,title:r,metadata:n,readCallback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({name:null}),update:u=>{typeof u.name<"u"&&u.name!==t&&(delete this._registeredResourceTemplates[t],u.name&&(this._registeredResourceTemplates[u.name]=s)),typeof u.title<"u"&&(s.title=u.title),typeof u.template<"u"&&(s.resourceTemplate=u.template),typeof u.metadata<"u"&&(s.metadata=u.metadata),typeof u.callback<"u"&&(s.readCallback=u.callback),typeof u.enabled<"u"&&(s.enabled=u.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[t]=s;let a=o.uriTemplate.variableNames;return Array.isArray(a)&&a.some(u=>!!o.completeCallback(u))&&this.setCompletionRequestHandler(),s}_createRegisteredPrompt(t,r,o,n,i){let s={title:r,description:o,argsSchema:n===void 0?void 0:Tn(n),callback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({name:null}),update:a=>{typeof a.name<"u"&&a.name!==t&&(delete this._registeredPrompts[t],a.name&&(this._registeredPrompts[a.name]=s)),typeof a.title<"u"&&(s.title=a.title),typeof a.description<"u"&&(s.description=a.description),typeof a.argsSchema<"u"&&(s.argsSchema=Tn(a.argsSchema)),typeof a.callback<"u"&&(s.callback=a.callback),typeof a.enabled<"u"&&(s.enabled=a.enabled),this.sendPromptListChanged()}};return this._registeredPrompts[t]=s,n&&Object.values(n).some(c=>{let u=c instanceof Pt?c._def?.innerType:c;return ov(u)})&&this.setCompletionRequestHandler(),s}_createRegisteredTool(t,r,o,n,i,s,a,c,u){iv(t);let l={title:r,description:o,inputSchema:y0(n),outputSchema:y0(i),annotations:s,execution:a,_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"&&iv(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=Tn(d.paramsSchema)),typeof d.outputSchema<"u"&&(l.outputSchema=Tn(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,...r){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let o,n,i,s;if(typeof r[0]=="string"&&(o=r.shift()),r.length>1){let c=r[0];sv(c)?(n=r.shift(),r.length>1&&typeof r[0]=="object"&&r[0]!==null&&!sv(r[0])&&(s=r.shift())):typeof c=="object"&&c!==null&&(s=r.shift())}let a=r[0];return this._createRegisteredTool(t,void 0,o,n,i,s,{taskSupport:"forbidden"},void 0,a)}registerTool(t,r,o){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let{title:n,description:i,inputSchema:s,outputSchema:a,annotations:c,_meta:u}=r;return this._createRegisteredTool(t,n,i,s,a,c,{taskSupport:"forbidden"},u,o)}prompt(t,...r){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let o;typeof r[0]=="string"&&(o=r.shift());let n;r.length>1&&(n=r.shift());let i=r[0],s=this._createRegisteredPrompt(t,void 0,o,n,i);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),s}registerPrompt(t,r,o){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let{title:n,description:i,argsSchema:s}=r,a=this._createRegisteredPrompt(t,n,i,s,o);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),a}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(t,r){return this.server.sendLoggingMessage(t,r)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}};var F4={type:"object",properties:{}};function w0(e){return e!==null&&typeof e=="object"&&"parse"in e&&typeof e.parse=="function"&&"safeParse"in e&&typeof e.safeParse=="function"}function W4(e){return"_def"in e||"_zod"in e||w0(e)}function sv(e){return typeof e!="object"||e===null||W4(e)?!1:Object.keys(e).length===0?!0:Object.values(e).some(w0)}function y0(e){if(e)return sv(e)?Tn(e):e}function G4(e){let t=Gr(e);return t?Object.entries(t).map(([r,o])=>{let n=Ey(o),i=Iy(o);return{name:r,description:n,required:!i}}):[]}function dn(e){let r=Gr(e)?.method;if(!r)throw new Error("Schema is missing a method literal");let o=Du(r);if(typeof o=="string")return o;throw new Error("Schema method literal must be a string")}function b0(e){return{completion:{values:e.slice(0,100),total:e.length,hasMore:e.length>100}}}var Va={completion:{values:[],hasMore:!1}};var av=Ue(require("node:process"),1);var Md=class{append(t){this._buffer=this._buffer?Buffer.concat([this._buffer,t]):t}readMessage(){if(!this._buffer)return null;let t=this._buffer.indexOf(`
49
+ `);if(t===-1)return null;let r=this._buffer.toString("utf8",0,t).replace(/\r$/,"");return this._buffer=this._buffer.subarray(t+1),K4(r)}clear(){this._buffer=void 0}};function K4(e){return kb.parse(JSON.parse(e))}function $0(e){return JSON.stringify(e)+`
50
+ `}var Ud=class{constructor(t=av.default.stdin,r=av.default.stdout){this._stdin=t,this._stdout=r,this._readBuffer=new Md,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(r=>{let o=$0(t);this._stdout.write(o)?r():this._stdout.once("drain",r)})}};function cv(e){return t=>{for(let[r,o]of e.entries()){let n=`file://vantage/${r}`;t.registerResource(r,n,{mimeType:"text/markdown",annotations:{audience:["assistant","user"]},title:o.title,description:o.description},()=>({contents:[{uri:n,text:o.content,mimeType:"text/markdown"}]}))}}}var k0=cv(new Map([["vql/cost_report.md",{content:"\n## Cost Reports VQL Schema\n\nVQL comprises two namespaces: `costs` and `tags`, which represent the available filters on Cost Reports in the Vantage console. To reference a filter, use the following syntax: `namespace.field` (e.g., `costs.provider` or `tags.name`).\n\n| Namespace | Field | VQL Example |\n| --- | --- | --- |\n| `costs` | `provider` | [Providers example](#combining-providers) |\n| `costs` | `allocation` | [Cost allocation example](#cost-allocation) |\n| `costs` | `region` | [Region example](#costs-from-a-list-of-regions) |\n| `costs` | `marketplace` | [Marketplace example](#get-marketplace-transactions) |\n| `costs` | `account_id` | [Account ID example](#costs-by-account-id) |\n| `costs` | `provider_account_id` | [Provider account ID example](#costs-by-provider-account-id) |\n| `costs` | `service` | [Service example](#per-resource-costs-and-costs-by-service) |\n| `costs` | `category` | [Category example](#costs-by-specific-category) |\n| `costs` | `subcategory` | [Subcategory example](#costs-by-specific-subcategory) |\n| `costs` | `resource_id` | [Resource example](#per-resource-costs-and-costs-by-service) |\n| `costs` | `charge_type` | [Charge Type example](#cost-by-charge-type) |\n| `tags` | `name` | [Tags name/value example](#filter-by-tag) |\n| `tags` | `value` | [Untagged example](#filter-for-untagged-resources) |\n\n> **Note:** Availability of the fields listed above varies among different cloud providers.\n\n## Keywords\n\nVQL includes a set of keywords to create complex filter conditions. These keywords function similar to their SQL equivalents.\n\n| Keyword | Description | VQL Sample | Explanation |\n| --- | --- | --- | --- |\n| `AND` | Logical AND operator | `costs.provider = 'aws' AND costs.service = 'EC2'` | This example filters AWS costs for the EC2 service, where both conditions must be true. |\n| `OR` | Logical OR operator | `costs.provider = 'azure' OR costs.provider = 'aws'` | This example retrieves costs from either Azure or AWS. At least one condition must be true. |\n| `IN` | Used to compare against an array list | `costs.provider = 'azure' AND costs.account_id IN ('account-1', 'account-2')` | This example filters based on a list of account IDs, returning data for the specified accounts <br /><br /> You can also use `IN` along with a special syntax for filtering by multiple tags. See [Filter by Multiple Tags](#filter-by-multiple-tags) for details. The `IN` keyword is not compatible for combining `providers`. |\n| `LIKE` | Performs string comparisons | `costs.provider = 'gcp' AND tags.name = 'environment' AND tags.value LIKE '%prod%'` | This example selects data where the tag value contains `prod`, such as `production-1`. <br /><br /> Note that at this time, `LIKE` is not compatible with `costs.account_id`, `costs.provider_account_id`, `costs.region`, and `costs.service`. |\n| `NOT` | Represents negation | `costs.provider = 'aws' AND costs.region NOT IN ('us-east-1', 'us-east-2')` | This example filters out data from both specified regions, providing all AWS costs *not* in these regions. Use `NOT IN` to specify a list of single or multiple values. <br /><br /> You can also use the `!=` or `<>` operators for \"is not.\" <br /><br /> `costs.provider = 'aws' AND costs.region != 'us-east-1'` <br /><br /> You can use `NOT LIKE` to perform string comparisons: <br /><br /> `costs.provider = 'gcp' AND tags.name = 'environment' AND tags.value NOT LIKE '%prod%'` |\n| `~*` | Flexible match operator for tag values | `costs.provider = 'aws' AND (tags.name = 'teams' AND tags.value ~* 'Team A')` | Searches for all items where the tag value loosely matches `Team A`, ignoring case, whitespace, hyphens, and punctuation. |\n| `!~*` | Does not flexible match operator for tag values | `costs.provider = 'aws' AND (tags.name = 'teams' AND tags.value !~* 'Team A')` | Filters out all items where the tag value loosely matches `Team A`, ignoring case, whitespace, hyphens, and punctuation. |\n\nWith these keywords, you can construct complex filter conditions in VQL, providing flexibility and precision when querying and analyzing cloud cost data.\n\n## Syntax\n\nYou can think of VQL in its current iteration as the `WHERE` clause of a SQL query. By combining the schema and keywords above with parentheses, you can form complex filter operations, such as:\n\n```vql\n(costs.provider = 'mongo' AND costs.allocation = 1.0 AND (costs.service = 'REALM' AND costs.resource_id IN ('s3'))) OR (costs.provider = 'aws' AND costs.allocation = 1.0 AND costs.account_id IN ('123456798'))\n```\n\n## VQL Examples\n\nThe following examples cover common use cases for VQL.\n\n### Combining Providers\n\n> **Note:** To reference a Custom Provider in VQL queries, navigate to the **Integrations** page in the Vantage console. Use the displayed **Provider ID** (e.g., `custom_provider:accss_crdntl_123a45bfdaf38765`).\n\nFilter for provider costs associated with either MongoDB Atlas or AWS.\n\n```sql\ncosts.provider = 'mongo' OR costs.provider = 'aws'\n```\n\n### Cost Allocation\n\nSet cost allocation to `0.5`.\n\n```sql\ncosts.provider = 'gcp' AND costs.allocation = 0.5\n```\n\n### Costs from a List of Regions\n\nFilter for Snowflake costs in two regions. Note that you will need to use the region code, such as `us-east-1` in the case of AWS, or `AWS_US_EAST_1` in the case of Snowflake, below.\n\n```sql\ncosts.provider = 'snowflake' AND costs.region IN ('AWS_US_EAST_1', 'AWS_US_EAST_2')\n```\n\n### Get Marketplace Transactions\n\nRetrieve costs associated with the AWS Marketplace.\n\n```sql\ncosts.provider = 'aws' AND costs.marketplace = true\n```\n\n### Costs by Account ID\n\nCosts for a specific set of services and account ID.\n\n```sql\ncosts.provider = 'aws' AND costs.account_id = '123456758' AND costs.service IN ('Amazon Relational Database', 'Amazon Elastic Compute Cloud - Compute')\n```\n\n### Costs by Provider Account ID\n\nThe following example represents costs from a specific AWS billing account or costs from a specific Azure subscription.\n\n```sql\n(costs.provider = 'aws' AND costs.provider_account_id = 'abcd1234') OR (costs.provider = 'azure' AND costs.provider_account_id = 'abcd1234')\n```\n\n### Per-Resource Costs and Costs by Service\n\nResource costs require both `provider` and `service` in addition to the `resource_id`.\n\n```sql\ncosts.provider = 'aws' AND costs.service = 'Amazon Relational Database Service' AND costs.resource_id = 'arn:aws:rds:us-east-1:123456789:db:primary-01'\n```\n\n#### Multiple Resource IDs\n\n```sql\ncosts.provider = 'aws' AND costs.service = 'Amazon Relational Database Service' AND costs.resource_id IN ('arn:aws:rds:us-east-1:123456789:db:primary-01', 'arn:aws:rds:us-east-1:123456789:db:primary-02')\n```\n\n### Costs by Specific Category\n\nFilter costs to see a specific cost category. Category costs require both `provider` and `service` as well as `category`.\n\n```sql\ncosts.provider = 'fastly' AND costs.service = 'CDN' AND costs.category = 'Data Transfer'\n```\n\n### Costs by Specific Subcategory\n\nFilter costs by a specific service and subcategory. Subcategory costs require both `provider` and `service` as well as `subcategory`.\n\n```sql\ncosts.provider = 'aws' AND costs.service = 'AWS Certificate Manager' AND costs.subcategory = 'USE1-PaidPrivateCA'\n```\n\n### Cost by Charge Type\n\nFilter costs by a specific charge type.\n\n```sql\ncosts.provider = 'aws' AND costs.charge_type = 'Usage'\n```\n\n### Filter by Tag\n\n#### Filter by Single Tag\n\nFilter costs based on a specific tag, such as `environment`, with the value `production`, in AWS.\n\n```sql\ncosts.provider = 'aws' AND tags.name = 'environment' AND tags.value = 'production'\n```\n\n#### Filter for Multiple Values from a Single Tag Key\n\nIf you want to filter for multiple tag values that are tied to one tag key (e.g., costs tagged with the `team` tag of `mobile` and `data`), use the below syntax.\n\n```sql\ncosts.provider = 'aws' AND tags.name = 'team' AND tags.value IN ('mobile', 'data')\n```\n\n#### Filter by Multiple Tags\n\nIf you want to filter for resources that have more than one tag associated, you can use the syntax shown in the example below.\n\n```sql\ncosts.provider = 'aws' AND (tags.name, tags.value) IN (('environment', 'staging'), ('team', 'engineering'))\n```\n\nThis example filters for resources that are tagged with the `environment` tag with a value of `staging` as well as the `team` tag with a value of `engineering`. This filter is the same as creating the following manual filter in the console.\n\n![Filter by multiple tags in the console](https://assets.vantage.sh/docs/multiple-tags-example.png)\n\n#### Filter for Matching Tags Using `LIKE`\n\n```sql\ncosts.provider = 'azure' AND (tags.name = 'environment' AND tags.value LIKE '%prod%')\n```\n\n#### Filter for Tags Using Flexible Matching\n\n```sql\ncosts.provider = 'azure' AND (tags.name = 'Team' AND tags.value ~* 'Team A')\n```\n\nMatches on applied tag values, such as `TeamA`, `team-a`, and `team_a` to a single `Team A` tag value.\n\n### Filter for Untagged Resources\n\nOn providers that have a **Not Tagged**/**Not Labeled** filter option in the console, you can use the below VQL to see untagged resources. This example looks for untagged resources in a multi-cloud environment.\n\n```sql\n(costs.provider = 'aws' AND tags.name = NULL) OR (costs.provider = 'azure' AND tags.name = NULL) OR (costs.provider = 'gcp' AND tags.name = NULL)\n```\n\n## Troubleshooting\n\nIf you are receiving an error when trying to complete a query, check the following troubleshooting tips below.\n\n- Each provider exposes certain field names. Those names are normalized within the schema.\n- Query parameter values should be wrapped in single quotes.\n\n**Example:**\n\n\u2705 **THIS WORKS**\n\n```sql\ncosts.provider='aws'\n```\n\n\u274C **THIS DOES NOT WORK**\n\n```sql\ncosts.provider=\"aws\"\n```\n\n- Currently, there is a limitation where `AND` and `OR` are not supported together in a single \"query group.\"\n\n**Example:**\n\n\u2705 **THIS WORKS**\n\n```sql\n(costs.provider = 'aws' AND tags.name = 'environment' AND tags.value = 'dev') OR (costs.provider = 'aws' AND tags.name = 'environment' AND tags.value = 'prod')\n```\n\n\u274C **THIS DOES NOT WORK**\n\n```sql\ncosts.provider = 'aws' AND ((tags.name = 'environment' AND tags.value = 'dev') OR (tags.name = 'environment' AND tags.value = 'prod'))\n```\n\n- The `costs.provider` field is required on every call.\n\n**Example:**\n\n\u2705 **THIS WORKS**\n\n```sql\ncosts.provider = 'fastly' AND costs.service = 'CDN'\n```\n\n\u274C **THIS DOES NOT WORK**\n\n```sql\ncosts.service = 'CDN'\n```\n\n- The `costs.provider` field is not compatible with the `IN` keyword.\n\n**Example:**\n\n\u2705 **THIS WORKS**\n\n```sql\n(costs.provider = 'aws' AND costs.account_id IN ('123456789', '987654321')) OR (costs.provider = 'azure' AND costs.account_id IN ('account-1', 'account-2'))\n```\n\n\u274C **THIS DOES NOT WORK**\n\n```sql\ncosts.provider IN ('aws', 'azure')\n```\n\n- Resource costs require both provider and service in addition to the resource ID.\n\n**Example:**\n\n\u2705 **THIS WORKS**\n\n```sql\ncosts.provider = 'aws' AND costs.service = 'Amazon Relational Database Service' AND costs.resource_id = 'arn:aws:rds:us-east-1:123456789:db:primary-01'\n```\n\n\u274C **THIS DOES NOT WORK**\n\n```sql\ncosts.provider = 'aws' AND costs.resource_id = 'arn:aws:rds:us-east-1:123456789:db:primary-01'\n```\n\n- Category and subcategory costs also require provider and service.\n\n**Examples:**\n\n\u2705 **THESE WORK**\n\n```sql\ncosts.provider = 'fastly' AND costs.service = 'CDN' AND costs.category = 'Data Transfer'\n```\n\n```sql\ncosts.provider = 'aws' AND costs.service = 'AWS Certificate Manager' AND costs.subcategory = 'USE1-PaidPrivateCA'\n```\n\n\u274C **THESE DO NOT WORK**\n\n```sql\ncosts.provider = 'fastly' AND costs.category = 'Data Transfer'\n```\n\n```sql\ncosts.provider = 'aws' AND costs.subcategory = 'USE1-PaidPrivateCA'\n```\n",description:"Learn how to use VQL when querying Cost Reports in Vantage.",title:"VQL for Cost Reports"}],["vql/financial_commitment_report.md",{content:"\n> **Tip:** If you need help constructing a VQL query, navigate to the **Financial Commitment Reports** page in the Vantage console and click **New Report**. From the top left, open the **Filters** menu. Create a filter and click the **View as VQL** button at the top of the **Filters** menu to see a filter's VQL representation.\n\n## Financial Commitment Reports VQL Schema\n\nVQL for Financial Commitment Reports comprises one namespace, `financial_commitments`, which represents the available filters on Financial Commitment Reports in the Vantage console. To reference a filter, use the following syntax: `namespace.field` (e.g., `financial_commitments.service`). The following fields are available within the `financial_commitments` namespace.\n\n| Namespace | Field | VQL Example |\n| --- | --- | --- |\n| `financial_commitments` | `provider` | `provider = 'aws'` should be added as the first part of each statement |\n| `financial_commitments` | `service` | [Service example](#financial-commitments-by-service) |\n| `financial_commitments` | `resource_account_id` | [Account example](#financial-commitments-by-specific-account) |\n| `financial_commitments` | `provider_account_id` | [Billing Account example](#financial-commitments-by-specific-billing-account) |\n| `financial_commitments` | `commitment_type` | [Commitment Type example](#see-specific-commitment-types) |\n| `financial_commitments` | `commitment_id` | [Commitment ARN example](#financial-commitments-by-commitment-arn) |\n| `financial_commitments` | `cost_type` | [Charge Type example](#financial-commitments-by-charge-type) |\n| `financial_commitments` | `cost_category` | [Category example](#financial-commitments-by-category) |\n| `financial_commitments` | `cost_sub_category` | [Subcategory example](#financial-commitments-by-subcategory) |\n| `financial_commitments` | `instance_type` | [Instance Type example](#financial-commitments-by-instance-types) |\n| `financial_commitments` | `region` | [Region example](#financial-commitments-by-region) |\n| `financial_commitments` | `resource_tags` | [Tags example](#financial-commitments-by-tags) |\n\n\n### Keywords\n\nVQL includes a set of keywords to create complex filter conditions. These keywords function similar to their SQL equivalents. Note that each expression started with `provider = 'aws'`, followed by additional filters.\n\n| Keyword | Description | VQL Sample | Explanation |\n| --- | --- | --- | --- |\n| `AND` | Logical AND operator | `(financial_commitments.provider = 'aws' AND (financial_commitments.resource_tags->>'business-metric' = 'us-east-1a') AND (financial_commitments.cost_category = 'Alarm'))` | This example filters for a specific tag and category, where both conditions must be true. |\n| `OR` | Logical OR operator | `(financial_commitments.provider = 'aws' AND ((financial_commitments.resource_tags->>'business-metric' = 'us-east-1a') OR (financial_commitments.resource_tags->>'business-metric' = 'us-east-1b')))` | This example looks for results where the `business-metric` tag has a value of either `us-east-1a` or `us-east-1b`. At least one condition must be true. |\n| `!=` | Is not | `(financial_commitments.provider = 'aws' AND (financial_commitments.cost_type != 'Credit'))` | This example looks for results that are any charge type except for `Credit`. |\n| `IN` and `NOT IN` | Used to compare against an array/list | `(financial_commitments.provider = 'aws' AND (financial_commitments.resource_tags->>'business-metric' IN ('us-east-1a','us-east-1b','us-east-1c')))` | This example searches for results with the `business-metric` tag key and multiple values. This same query also works for `NOT IN` where the results are anything matching the tag key except for those particular values: `(financial_commitments.provider = 'aws' AND (financial_commitments.resource_tags->>'business-metric' NOT IN ('us-east-1a','us-east-1b','us-east-1c')))`. |\n| `LIKE` and `NOT LIKE` | Performs string comparisons | `(financial_commitments.provider = 'aws' AND (financial_commitments.commitment_id LIKE '%arn:aws:ec2%'))` | This example selects data where the commitment ARN value contains `arn:aws:ec2`, such as `arn:aws:ec2:us-west-2:1234`. This same query also works for `NOT LIKE` where data does not contain a particular string: `(financial_commitments.provider = 'aws' AND (financial_commitments.commitment_id NOT LIKE '%arn:aws:ec2%'))`. |\n| `->>` | This operator is used only when constructing queries related to tags | `(financial_commitments.provider = 'aws' AND (financial_commitments.resource_tags->>'environment' = 'staging'))` | This example looks for results with the tag name of `environment` and value of `staging`. |\n\nWith these operators and keywords, you can construct complex filter conditions in VQL.\n\n## VQL Examples\n\nThe following examples cover common use cases for VQL.\n\n### Financial Commitments by Service\n\nFilter for multiple services.\n\n```sql\n(financial_commitments.provider = 'aws' AND (financial_commitments.service IN ('AmazonAthena','AmazonCloudFront','AmazonECS')))\n```\n\n### Financial Commitments by Specific Account\n\nFilter down to an individual account.\n\n```sql\n(financial_commitments.provider = 'aws' AND (financial_commitments.resource_account_id = '123456789012'))\n```\n\n### Financial Commitments by Specific Billing Account\n\nFilter down to an individual billing account.\n\n```sql\n(financial_commitments.provider = 'aws' AND (financial_commitments.provider_account_id = '123456789012'))\n```\n\n### See Specific Commitment Types\n\nFilter out certain commitment types to see everything else.\n\n```sql\n(financial_commitments.provider = 'aws' AND (financial_commitments.commitment_type NOT IN ('credit','free')))\n```\n\n### Financial Commitments by Commitment ARN\n\nSee the impact of specific financial commitments related to EC2 by ARNs.\n\n```sql\n(financial_commitments.provider = 'aws' AND (financial_commitments.commitment_id LIKE '%arn:aws:ec2%'))\n```\n\n### Financial Commitments by Charge Type\n\nSee only usage-related commitments.\n\n```sql\n(financial_commitments.provider = 'aws' AND (financial_commitments.cost_type = 'Usage'))\n```\n\n### Financial Commitments by Category\n\nAll data transfer-related commitments.\n\n```sql\n(financial_commitments.provider = 'aws' AND (financial_commitments.cost_category = 'Data Transfer'))\n```\n\n### Financial Commitments by Subcategory\n\nFilter for Cloudfront and data transfer egress in APN2.\n\n```sql\n(financial_commitments.provider = 'aws' AND (financial_commitments.cost_sub_category IN ('APN2-DataTransfer-Out-Bytes','APN2-CloudFront-Out-Bytes')))\n```\n\n### Financial Commitments by Instance Types\n\nFilter from a list of different instance types.\n\n```sql\n(financial_commitments.provider = 'aws' AND (financial_commitments.instance_type IN ('c7a.12xlarge','c7gn.large','c7gn.medium')))\n```\n\n### Financial Commitments by Region\n\nSee all financial commitments in `us-east-1`.\n\n```sql\n(financial_commitments.provider = 'aws' AND (financial_commitments.region = 'us-east-1'))\n```\n\n### Financial Commitments by Tags\n\nFilter based on a specific tag called `business-metric` and a list of provided values.\n\n```sql\n(financial_commitments.provider = 'aws' AND (financial_commitments.resource_tags->>'business-metric' IN ('us-east-1a','us-east-1b','us-east-1c')))\n```\n\n### Multiple Filters\n\nComplex filter that shows combining two different statements using `OR` with multiple criteria.\n\n```sql\n((financial_commitments.provider = 'aws' AND (financial_commitments.resource_account_id = '123456789012') AND (financial_commitments.service = 'AmazonEC2')) OR (financial_commitments.provider = 'aws' AND (financial_commitments.resource_account_id = '098765432109') AND (financial_commitments.service = 'AmazonRDS')))\n```\n",description:"Learn how to use VQL when querying Financial Commitment Reports in Vantage.",title:"VQL for Financial Commitment Reports"}],["vql/index.md",{content:`
51
51
  # VQL (Vantage Query Language) Overview
52
52
 
53
53
  The Vantage Query Language (VQL) is a SQL-like language for filtering cloud cost data. It includes a normalized schema across cloud providers and basic filter syntax for creating complex filters.
@@ -360,12 +360,25 @@ On providers that have a **Not Tagged** filter option in the console, you can us
360
360
  \`\`\`sql
361
361
  (resources.provider = 'gcp' AND tags.name = NULL) OR (resources.provider = 'aws' AND tags.name = NULL)
362
362
  \`\`\`
363
- `,description:"Learn how to use VQL when querying Resource Reports in Vantage.",title:"VQL for Resource Reports"}]]));var k0="2.6.4";var cv={name:"Vantage Cloud Costs Helper",version:k0};async function x0(e,t,r,o,n){t["User-Agent"]=`vantage-mcp-server/${cv.version}`;let i=new URL(n,e);o==="GET"?Object.entries(r).forEach(([u,l])=>{l!=null&&i.searchParams.append(u,Array.isArray(l)?l.join(","):String(l))}):t["Content-Type"]="application/json";let s={method:o,headers:t,body:o!=="GET"?JSON.stringify(r):void 0},a=await fetch(i.toString(),s);if(!a.ok){let u=await a.text();try{let l=JSON.parse(u);if(Array.isArray(l.errors))return{errors:l.errors,ok:!1}}catch{}return{errors:[{message:"Vantage API request failed",status:a.status,endpoint:n,details:u}],ok:!1}}return a.status===204?{data:void 0,ok:!0}:{data:await a.json(),ok:!0}}var E=class{constructor(t){this.exception=t}};var uv=new Map;function O(e){let t=(r,o)=>{r.registerTool(e.name,{description:e.description,inputSchema:e.args,outputSchema:e.outputSchema,annotations:{readOnlyHint:e.annotations.readOnly,openWorldHint:e.annotations.openWorld,destructiveHint:e.annotations.destructive}},async n=>{try{let i=await e.execute(n,o());return e.outputSchema?{structuredContent:i}:{content:[{type:"text",text:JSON.stringify(i,null,2)}],isError:!1}}catch(i){if(i instanceof E)return{content:[{type:"text",text:JSON.stringify(i.exception,null,2)}],isError:!0};throw i}})};if(uv.has(e.name))throw new Error(`Tool ${e.name} is already registered`);return uv.set(e.name,t),e}function S0(e,t){for(let r of uv.values())r(e,t)}var Z4="Invalid date input, must be YYYY-MM-DD format and a reasonable date.";function V4(e){let t="2030-01-01",r="2010-01-01";if(!e||e===""||typeof e!="string"||e<r||e>t)return!1;let o=Date.parse(e);return!(Number.isNaN(o)||o<=Date.parse(r)||o>=Date.parse(t))}function we(e){return g.string().refine(V4,{error:Z4}).describe(e)}var F4=`
363
+ `,description:"Learn how to use VQL when querying Resource Reports in Vantage.",title:"VQL for Resource Reports"}]]));var x0="2.6.6";var uv={name:"Vantage Cloud Costs Helper",version:x0};async function S0(e,t,r,o,n){t["User-Agent"]=`vantage-mcp-server/${uv.version}`;let i=new URL(n,e);o==="GET"?Object.entries(r).forEach(([u,l])=>{l!=null&&i.searchParams.append(u,Array.isArray(l)?l.join(","):String(l))}):t["Content-Type"]="application/json";let s={method:o,headers:t,body:o!=="GET"?JSON.stringify(r):void 0},a=await fetch(i.toString(),s);if(!a.ok){let u=await a.text();try{let l=JSON.parse(u);if(Array.isArray(l.errors))return{errors:l.errors,ok:!1}}catch{}return{errors:[{message:"Vantage API request failed",status:a.status,endpoint:n,details:u}],ok:!1}}return a.status===204?{data:void 0,ok:!0}:{data:await a.json(),ok:!0}}var z=class{constructor(t){this.exception=t}};var lv=new Map;function I(e){let t=(r,o)=>{r.registerTool(e.name,{description:e.description,inputSchema:e.args,outputSchema:e.outputSchema,annotations:{readOnlyHint:e.annotations.readOnly,openWorldHint:e.annotations.openWorld,destructiveHint:e.annotations.destructive}},async n=>{try{let i=await e.execute(n,o());return e.outputSchema?{structuredContent:i}:{content:[{type:"text",text:JSON.stringify(i,null,2)}],isError:!1}}catch(i){if(i instanceof z)return{content:[{type:"text",text:JSON.stringify(i.exception,null,2)}],isError:!0};throw i}})};if(lv.has(e.name))throw new Error(`Tool ${e.name} is already registered`);return lv.set(e.name,t),e}function T0(e,t){for(let r of lv.values())r(e,t)}var B4="Invalid date input, must be YYYY-MM-DD format and a reasonable date.";function H4(e){let t="2030-01-01",r="2010-01-01";if(!e||e===""||typeof e!="string"||e<r||e>t)return!1;let o=Date.parse(e);return!(Number.isNaN(o)||o<=Date.parse(r)||o>=Date.parse(t))}function we(e){return g.string().refine(H4,{error:B4}).describe(e)}var Ld=g.object({start_at:we("The start date of the period."),end_at:we("The end date of the period.").optional(),amount:g.number().min(0).describe("The amount of the period.")});var J4=`
364
364
  Creates a budget based on the parameters specified. This is useful if you have been tasked with managing budgets
365
365
  or you are building a cost report with budgets in mind.
366
- `.trim(),W4=g.object({start_at:we("The start date of the period."),end_at:we("The end date of the period.").optional(),amount:g.number().min(0).describe("The amount of the period.")}),P5=O({name:"create-budget",description:F4,annotations:{destructive:!1,openWorld:!1,readOnly:!1},args:{name:g.string().min(1).describe("The name of the Budget."),workspace_token:g.string().optional().describe("The token of the Workspace to add the Budget to."),cost_report_token:g.string().optional().describe("The CostReport token. Ignored for hierarchical Budgets."),child_budget_tokens:g.array(g.string()).optional().describe("The tokens of any child Budgets when creating a hierarchical Budget."),periods:g.array(W4).optional().describe("The periods for the Budget. The start_at and end_at must be iso8601 formatted e.g. YYYY-MM-DD. Ignored for hierarchical Budgets.")},async execute(e,t){let r=await t.callVantageApi("/v2/budgets",e,"POST");if(!r.ok)throw new E({errors:r.errors});return r.data}});var G4=`
366
+ `.trim(),UB=I({name:"create-budget",description:J4,annotations:{destructive:!1,openWorld:!1,readOnly:!1},args:{name:g.string().min(1).describe("The name of the Budget."),workspace_token:g.string().optional().describe("The token of the Workspace to add the Budget to."),cost_report_token:g.string().optional().describe("The CostReport token. Ignored for hierarchical Budgets."),child_budget_tokens:g.array(g.string()).optional().describe("The tokens of any child Budgets when creating a hierarchical Budget."),periods:g.array(Ld).optional().describe("The periods for the Budget. The start_at and end_at must be iso8601 formatted e.g. YYYY-MM-DD. Ignored for hierarchical Budgets.")},async execute(e,t){let r=await t.callVantageApi("/v2/budgets",e,"POST");if(!r.ok)throw new z({errors:r.errors});return r.data}});var E0=Ue(Ge());var YU=`
367
+ Deletes a Budget by its token. This action is irreversible.
368
+ `.trim(),q5=I({name:"delete-budget",description:YU,annotations:{destructive:!0,openWorld:!1,readOnly:!1},args:{budget_token:g.string().describe("The token of the Budget to delete.")},async execute(e,t){let r=await t.callVantageApi(`/v2/budgets/${(0,E0.pathEncode)(e.budget_token)}`,{},"DELETE");if(!r.ok)throw new z({errors:r.errors});return{token:e.budget_token}}});var I0=Ue(Ge());var XU=`
369
+ Gets a specific Budget by its token. Optionally includes performance data showing actual spend vs. budget amounts by period.
370
+ The token of a budget can be used to link the user to the budget in the Vantage Web UI. Build the link like this: https://console.vantage.sh/go/<BudgetToken>
371
+ `.trim(),V5=I({name:"get-budget",description:XU,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:{budget_token:g.string().describe("The token of the Budget to retrieve."),include_performance:g.boolean().optional().describe("If true, includes performance data showing actual spend vs. budget amounts by period.")},async execute(e,t){let{budget_token:r,...o}=e,n=await t.callVantageApi(`/v2/budgets/${(0,I0.pathEncode)(r)}`,o,"GET");if(!n.ok)throw new z({errors:n.errors});return n.data}});function e2(e){let r=new URL(e).searchParams.get("page");return r?Number.parseInt(r,10):0}var N0={nextPage:0,hasNextPage:!1};function Y(e){let t=e?.links?.next;if(!t)return N0;let r=e2(t);return r===0?N0:{nextPage:r,hasNextPage:!0}}var t2=`
372
+ List all budgets available in the Vantage account. Budgets help track spending against predefined limits.
373
+ Use the page value of 1 to start.
374
+ A budget is built against a Cost Report. The Budget objects returned by this tool will have a "cost_report_token" field that contains the token of the Cost Report. The Cost Report has the "filter" field to know what is the range of providers & services that the budget is tracking.
375
+ When a user is looking at a Cost Report for a specific date range, they can decide if the providers and services spend is higher than desired by looking at the budgets for that report and the date range of the budget.
376
+ The token of a budget can be used to link the user to the budget in the Vantage Web UI. Build the link like this: https://console.vantage.sh/go/<BudgetToken>
377
+ `.trim(),r2={page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},Q5=I({name:"list-budgets",description:t2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:r2,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi("/v2/budgets",r,"GET");if(!o.ok)throw new z({errors:o.errors});return{budgets:o.data.budgets,pagination:Y(o.data)}}});var O0=Ue(Ge());var n2=`
378
+ Updates an existing Budget. You can update the name, linked Cost Report, child Budget tokens for hierarchical budgets, or budget periods.
379
+ `.trim(),nH=I({name:"update-budget",description:n2,annotations:{destructive:!1,openWorld:!1,readOnly:!1},args:{budget_token:g.string().describe("The token of the Budget to update."),name:g.string().min(1).optional().describe("The updated name of the Budget."),cost_report_token:g.string().optional().describe("The updated CostReport token. Ignored for hierarchical Budgets."),child_budget_tokens:g.array(g.string()).optional().describe("The updated tokens of child Budgets for a hierarchical Budget."),periods:g.array(Ld).optional().describe("The updated periods for the Budget. The start_at and end_at must be iso8601 formatted e.g. YYYY-MM-DD. Ignored for hierarchical Budgets.")},async execute(e,t){let{budget_token:r,...o}=e,n=await t.callVantageApi(`/v2/budgets/${(0,O0.pathEncode)(r)}`,o,"PUT");if(!n.ok)throw new z({errors:n.errors});return n.data}});var o2=`
367
380
  Creates a cost alert based on the parameters specified. Cost alerts notify you when spending on one or more cost reports exceeds a specified threshold over a given interval.
368
- `.trim(),O5=O({name:"create-cost-alert",description:G4,annotations:{destructive:!1,openWorld:!1,readOnly:!1},args:{title:g.string().min(1).max(255).describe("The title of the cost alert."),interval:g.enum(["day","week","month","quarter"]).describe("The interval for the cost alert."),threshold:g.number().gt(0).describe("The threshold amount that triggers the alert. Must be greater than 0."),unit_type:g.enum(["currency","percentage"]).describe("The unit type for the threshold."),workspace_token:g.string().describe("The token of the Workspace to add the cost alert to."),report_tokens:g.array(g.string()).min(1).max(10).describe("The tokens of the cost reports to monitor. Between 1 and 10 report tokens."),email_recipients:g.array(g.string()).optional().describe("Email addresses to notify when the alert triggers."),slack_channels:g.array(g.string()).optional().describe("Slack channels to notify when the alert triggers."),teams_channels:g.array(g.string()).optional().describe("Microsoft Teams channels to notify when the alert triggers."),minimum_threshold:g.number().min(0).optional().describe("Minimum threshold amount. Only applicable for percentage unit_type.")},async execute(e,t){let r=await t.callVantageApi("/v2/cost_alerts",e,"POST");if(!r.ok)throw new E({errors:r.errors});return r.data}});var K4=`
381
+ `.trim(),fH=I({name:"create-cost-alert",description:o2,annotations:{destructive:!1,openWorld:!1,readOnly:!1},args:{title:g.string().min(1).max(255).describe("The title of the cost alert."),interval:g.enum(["day","week","month","quarter"]).describe("The interval for the cost alert."),threshold:g.number().gt(0).describe("The threshold amount that triggers the alert. Must be greater than 0."),unit_type:g.enum(["currency","percentage"]).describe("The unit type for the threshold."),workspace_token:g.string().describe("The token of the Workspace to add the cost alert to."),report_tokens:g.array(g.string()).min(1).max(10).describe("The tokens of the cost reports to monitor. Between 1 and 10 report tokens."),email_recipients:g.array(g.string()).optional().describe("Email addresses to notify when the alert triggers."),slack_channels:g.array(g.string()).optional().describe("Slack channels to notify when the alert triggers."),teams_channels:g.array(g.string()).optional().describe("Microsoft Teams channels to notify when the alert triggers."),minimum_threshold:g.number().min(0).optional().describe("Minimum threshold amount. Only applicable for percentage unit_type.")},async execute(e,t){let r=await t.callVantageApi("/v2/cost_alerts",e,"POST");if(!r.ok)throw new z({errors:r.errors});return r.data}});var i2=`
369
382
  Create a new Cost Report in Vantage.
370
383
 
371
384
  Cost Reports are saved queries that can be used to track and analyze spending over time. They can be filtered using VQL (Vantage Query Language) and configured with various display options.
@@ -390,7 +403,7 @@ Tag Filtering:
390
403
  - Multiple tag values: (costs.provider = 'aws' AND tags.name = 'environment' AND (tags.value = 'dev' OR tags.value = 'staging'))
391
404
 
392
405
  Use get-myself to find available workspaces and list-cost-providers/list-cost-services to find valid provider and service names for your VQL queries.
393
- `.trim(),H4=g.object({business_metric_token:g.string().min(1).describe("The token of the BusinessMetric to attach to the CostReport."),unit_scale:g.enum(["per_unit","per_hundred","per_thousand","per_million","per_billion"]).default("per_unit").describe("Determines the scale of the BusinessMetric's values within the CostReport."),label_filter:g.array(g.string()).optional().describe("Include only values with these labels in the CostReport.")}),B4=g.object({include_credits:g.boolean().default(!1).describe("Report will include credits."),include_refunds:g.boolean().default(!1).describe("Report will include refunds."),include_discounts:g.boolean().default(!0).describe("Report will include discounts."),include_tax:g.boolean().default(!0).describe("Report will include tax."),amortize:g.boolean().default(!0).describe("Report will amortize."),unallocated:g.boolean().default(!1).describe("Report will show unallocated costs."),aggregate_by:g.enum(["cost","usage"]).default("cost").describe("Report will aggregate by cost or usage."),show_previous_period:g.boolean().default(!0).describe("Report will show previous period costs or usage comparison.")}),J4=["this_month","last_7_days","last_30_days","last_month","last_3_months","last_6_months","custom","last_12_months","last_24_months","last_36_months","next_month","next_3_months","next_6_months","next_12_months","year_to_date","last_3_days","last_14_days"],Q4=["area","line","bar","multi_bar","pie"],Y4=g.object({x_axis_dimension:g.array(g.string()).optional().describe("The dimension used to group or label data along the x-axis (e.g., by date, region, or service). NOTE: Only one value is allowed at this time. Defaults to ['date']."),y_axis_dimension:g.string().optional().describe("The metric or measure displayed on the chart\u2019s y-axis. Possible values: 'cost', 'usage'. Defaults to 'cost'.")}),q5=O({name:"create-cost-report",description:K4,annotations:{destructive:!1,openWorld:!1,readOnly:!1},args:{title:g.string().min(1).describe("Title for the new Cost Report"),workspace_token:g.string().optional().describe("The token of the Workspace to add the Cost Report to. Ignored if 'folder_token' is set. Required if the API token is associated with multiple Workspaces."),groupings:g.array(g.string()).optional().transform(e=>e?.join(",")).describe("Grouping values for aggregating costs on the report. Valid groupings: account_id, billing_account_id, charge_type, cost_category, cost_subcategory, provider, region, resource_id, service, tagged, tag:<tag_value>."),filter:g.string().optional().describe("VQL filter to apply to the Cost Report"),saved_filter_tokens:g.array(g.string()).optional().describe("The tokens of the SavedFilters to apply to the CostReport."),business_metric_tokens_with_metadata:g.array(H4).optional().describe("The tokens for any BusinessMetrics to attach to the CostReport, and the unit scale."),folder_token:g.string().optional().describe("The token of the Folder to add the CostReport to. Determines the Workspace the report is assigned to."),settings:B4.optional().describe("Report settings."),previous_period_start_date:we("The previous period start date of the CostReport. ISO 8601 Formatted.").optional(),previous_period_end_date:we("The previous period end date of the CostReport. ISO 8601 Formatted.").optional(),start_date:we("The start date of the CostReport. ISO 8601 Formatted. Incompatible with 'date_interval' parameter.").optional(),end_date:we("The end date of the CostReport. ISO 8601 Formatted. Incompatible with 'date_interval' parameter, required with 'start_date'.").optional(),date_interval:g.enum(J4).optional().describe("The date interval of the CostReport. Incompatible with 'start_date' and 'end_date' parameters. Defaults to 'this_month' if start_date and end_date are not provided."),chart_type:g.enum(Q4).optional().describe("The chart type to use in the CostReport. Defaults to 'line' if not provided."),chart_settings:Y4.optional().describe("Report chart settings.")},async execute(e,t){let r=await t.callVantageApi("/v2/cost_reports",{...e,previous_period_end_date:e.previous_period_end_date,end_date:e.end_date},"POST");if(!r.ok)throw new E({errors:r.errors});return r.data}});var X4=`
406
+ `.trim(),s2=g.object({business_metric_token:g.string().min(1).describe("The token of the BusinessMetric to attach to the CostReport."),unit_scale:g.enum(["per_unit","per_hundred","per_thousand","per_million","per_billion"]).default("per_unit").describe("Determines the scale of the BusinessMetric's values within the CostReport."),label_filter:g.array(g.string()).optional().describe("Include only values with these labels in the CostReport.")}),a2=g.object({include_credits:g.boolean().default(!1).describe("Report will include credits."),include_refunds:g.boolean().default(!1).describe("Report will include refunds."),include_discounts:g.boolean().default(!0).describe("Report will include discounts."),include_tax:g.boolean().default(!0).describe("Report will include tax."),amortize:g.boolean().default(!0).describe("Report will amortize."),unallocated:g.boolean().default(!1).describe("Report will show unallocated costs."),aggregate_by:g.enum(["cost","usage"]).default("cost").describe("Report will aggregate by cost or usage."),show_previous_period:g.boolean().default(!0).describe("Report will show previous period costs or usage comparison.")}),c2=["this_month","last_7_days","last_30_days","last_month","last_3_months","last_6_months","custom","last_12_months","last_24_months","last_36_months","next_month","next_3_months","next_6_months","next_12_months","year_to_date","last_3_days","last_14_days"],u2=["area","line","bar","multi_bar","pie"],l2=g.object({x_axis_dimension:g.array(g.string()).optional().describe("The dimension used to group or label data along the x-axis (e.g., by date, region, or service). NOTE: Only one value is allowed at this time. Defaults to ['date']."),y_axis_dimension:g.string().optional().describe("The metric or measure displayed on the chart\u2019s y-axis. Possible values: 'cost', 'usage'. Defaults to 'cost'.")}),yH=I({name:"create-cost-report",description:i2,annotations:{destructive:!1,openWorld:!1,readOnly:!1},args:{title:g.string().min(1).describe("Title for the new Cost Report"),workspace_token:g.string().optional().describe("The token of the Workspace to add the Cost Report to. Ignored if 'folder_token' is set. Required if the API token is associated with multiple Workspaces."),groupings:g.array(g.string()).optional().transform(e=>e?.join(",")).describe("Grouping values for aggregating costs on the report. Valid groupings: account_id, billing_account_id, charge_type, cost_category, cost_subcategory, provider, region, resource_id, service, tagged, tag:<tag_value>."),filter:g.string().optional().describe("VQL filter to apply to the Cost Report"),saved_filter_tokens:g.array(g.string()).optional().describe("The tokens of the SavedFilters to apply to the CostReport."),business_metric_tokens_with_metadata:g.array(s2).optional().describe("The tokens for any BusinessMetrics to attach to the CostReport, and the unit scale."),folder_token:g.string().optional().describe("The token of the Folder to add the CostReport to. Determines the Workspace the report is assigned to."),settings:a2.optional().describe("Report settings."),previous_period_start_date:we("The previous period start date of the CostReport. ISO 8601 Formatted.").optional(),previous_period_end_date:we("The previous period end date of the CostReport. ISO 8601 Formatted.").optional(),start_date:we("The start date of the CostReport. ISO 8601 Formatted. Incompatible with 'date_interval' parameter.").optional(),end_date:we("The end date of the CostReport. ISO 8601 Formatted. Incompatible with 'date_interval' parameter, required with 'start_date'.").optional(),date_interval:g.enum(c2).optional().describe("The date interval of the CostReport. Incompatible with 'start_date' and 'end_date' parameters. Defaults to 'this_month' if start_date and end_date are not provided."),chart_type:g.enum(u2).optional().describe("The chart type to use in the CostReport. Defaults to 'line' if not provided."),chart_settings:l2.optional().describe("Report chart settings.")},async execute(e,t){let r=await t.callVantageApi("/v2/cost_reports",{...e,previous_period_end_date:e.previous_period_end_date,end_date:e.end_date},"POST");if(!r.ok)throw new z({errors:r.errors});return r.data}});var d2=`
394
407
  Create a new Dashboard in Vantage.
395
408
 
396
409
  Dashboards are collections of widgets that visualize cost data. You can optionally attach widgets (by
@@ -410,10 +423,10 @@ The list of supported widgets is:
410
423
 
411
424
  The token returned in the response can be used to link to the Dashboard in the Vantage Web UI:
412
425
  https://console.vantage.sh/go/<token>
413
- `.trim(),eU=["this_month","last_7_days","last_30_days","last_month","last_3_months","last_6_months","custom","last_12_months","last_24_months","last_36_months","next_month","next_3_months","next_6_months","next_12_months","year_to_date","last_3_days","last_14_days"],tU=g.object({widgetable_token:g.string().describe("The token of the represented Resource."),title:g.string().describe("The title of the Widget (defaults to the title of the Resource).").optional(),settings:g.object({display_type:g.enum(["table","chart"]).describe("The display type of the Widget.")}).optional()}),F5=O({name:"create-dashboard",description:X4,args:{title:g.string().min(1).describe("The title of the dashboard"),workspace_token:g.string().min(1).describe("The token of the Workspace to add the Dashboard to."),widgets:g.array(tU).describe("The widgets to add to the dashboard").optional(),saved_filter_tokens:g.array(g.string()).describe("The tokens of the Saved Filters used in the Dashboard").optional(),date_bin:g.enum(["day","week","month"]).optional().describe("Date binning for returned costs, allowed values: day, week, month"),start_date:we("The start date of the dashboard. ISO 8601 Formatted. Incompatible with 'date_interval' parameter.").optional(),end_date:we("The end date of the dashboard. ISO 8601 Formatted. Incompatible with 'date_interval' parameter, required with 'start_date'.").optional(),date_interval:g.enum(eU).optional().describe("The date interval of the dashboard. Incompatible with 'start_date' and 'end_date' parameters.")},annotations:{destructive:!1,openWorld:!1,readOnly:!1},async execute(e,t){let r=await t.callVantageApi("/v2/dashboards",e,"POST");if(!r.ok)throw new E({errors:r.errors});return r.data}});var rU=`
426
+ `.trim(),p2=["this_month","last_7_days","last_30_days","last_month","last_3_months","last_6_months","custom","last_12_months","last_24_months","last_36_months","next_month","next_3_months","next_6_months","next_12_months","year_to_date","last_3_days","last_14_days"],f2=g.object({widgetable_token:g.string().describe("The token of the represented Resource."),title:g.string().describe("The title of the Widget (defaults to the title of the Resource).").optional(),settings:g.object({display_type:g.enum(["table","chart"]).describe("The display type of the Widget.")}).optional()}),SH=I({name:"create-dashboard",description:d2,args:{title:g.string().min(1).describe("The title of the dashboard"),workspace_token:g.string().min(1).describe("The token of the Workspace to add the Dashboard to."),widgets:g.array(f2).describe("The widgets to add to the dashboard").optional(),saved_filter_tokens:g.array(g.string()).describe("The tokens of the Saved Filters used in the Dashboard").optional(),date_bin:g.enum(["day","week","month"]).optional().describe("Date binning for returned costs, allowed values: day, week, month"),start_date:we("The start date of the dashboard. ISO 8601 Formatted. Incompatible with 'date_interval' parameter.").optional(),end_date:we("The end date of the dashboard. ISO 8601 Formatted. Incompatible with 'date_interval' parameter, required with 'start_date'.").optional(),date_interval:g.enum(p2).optional().describe("The date interval of the dashboard. Incompatible with 'start_date' and 'end_date' parameters.")},annotations:{destructive:!1,openWorld:!1,readOnly:!1},async execute(e,t){let r=await t.callVantageApi("/v2/dashboards",e,"POST");if(!r.ok)throw new z({errors:r.errors});return r.data}});var m2=`
414
427
  Create a Folder for organizing Cost Reports. Folders can be nested by specifying a parent_folder_token.
415
428
  SavedFilters can be applied to the Folder so that any Cost Report within it inherits those filters.
416
- `.trim(),B5=O({name:"create-folder",description:rU,annotations:{destructive:!1,openWorld:!1,readOnly:!1},args:{title:g.string().min(1).describe("The title of the Folder."),parent_folder_token:g.string().optional().describe("The token of the parent Folder to nest this Folder under."),saved_filter_tokens:g.array(g.string()).optional().describe("The tokens of SavedFilters to apply to any Cost Report contained within the Folder."),workspace_token:g.string().optional().describe("The token of the Workspace to add the Folder to. Ignored if 'parent_folder_token' is set. Required if the API token is associated with multiple Workspaces.")},async execute(e,t){let r=await t.callVantageApi("/v2/folders",e,"POST");if(!r.ok)throw new E({errors:r.errors});return r.data}});var nU=`
429
+ `.trim(),IH=I({name:"create-folder",description:m2,annotations:{destructive:!1,openWorld:!1,readOnly:!1},args:{title:g.string().min(1).describe("The title of the Folder."),parent_folder_token:g.string().optional().describe("The token of the parent Folder to nest this Folder under."),saved_filter_tokens:g.array(g.string()).optional().describe("The tokens of SavedFilters to apply to any Cost Report contained within the Folder."),workspace_token:g.string().optional().describe("The token of the Workspace to add the Folder to. Ignored if 'parent_folder_token' is set. Required if the API token is associated with multiple Workspaces.")},async execute(e,t){let r=await t.callVantageApi("/v2/folders",e,"POST");if(!r.ok)throw new z({errors:r.errors});return r.data}});var h2=`
417
430
  Create a Virtual Tag Config in Vantage.
418
431
 
419
432
  Virtual Tag Configs define a derived (virtual) tag key and a set of values determined by VQL filters.
@@ -424,33 +437,33 @@ You can optionally:
424
437
  - backfill_until: backfill the virtual tag values to an earliest month
425
438
  - collapsed_tag_keys: collapse values for specific underlying tag keys (optionally scoped by provider)
426
439
  - values: define named values via VQL filters, optionally linked to Business Metrics and/or cost metrics
427
- `.trim(),oU=g.object({key:g.string().describe("The tag key to collapse values for."),providers:g.array(g.string()).describe("The providers this collapsed tag key applies to.").optional()}),iU=g.object({filter:g.string().describe("The filter VQL for the Value."),name:g.string().describe("The name of the Value.").optional(),business_metric_token:g.string().describe("The token of the associated BusinessMetric.").optional(),cost_metric:g.object({filter:g.string().describe("The filter VQL for the cost metric."),aggregation:g.object({tag:g.string().describe("The tag to aggregate on.")})}).optional()}),tH=O({name:"create-virtual-tag-config",description:nU,args:{key:g.string().min(1).describe("The key of the VirtualTagConfig"),overridable:g.boolean().describe("Whether the VirtualTagConfig can override a provider-supplied tag on a matching Cost."),backfill_until:we("The earliest month the VirtualTagConfig should be backfilled to. ISO 8601 Formatted.").optional(),collapsed_tag_keys:g.array(oU).optional(),values:g.array(iU).optional()},annotations:{destructive:!1,openWorld:!1,readOnly:!1},async execute(e,t){let r=await t.callVantageApi("/v2/virtual_tag_configs",e,"POST");if(!r.ok)throw new E({errors:r.errors});return r.data}});var z0=We(ct());var a2=`
440
+ `.trim(),g2=g.object({key:g.string().describe("The tag key to collapse values for."),providers:g.array(g.string()).describe("The providers this collapsed tag key applies to.").optional()}),_2=g.object({filter:g.string().describe("The filter VQL for the Value."),name:g.string().describe("The name of the Value.").optional(),business_metric_token:g.string().describe("The token of the associated BusinessMetric.").optional(),cost_metric:g.object({filter:g.string().describe("The filter VQL for the cost metric."),aggregation:g.object({tag:g.string().describe("The tag to aggregate on.")})}).optional()}),CH=I({name:"create-virtual-tag-config",description:h2,args:{key:g.string().min(1).describe("The key of the VirtualTagConfig"),overridable:g.boolean().describe("Whether the VirtualTagConfig can override a provider-supplied tag on a matching Cost."),backfill_until:we("The earliest month the VirtualTagConfig should be backfilled to. ISO 8601 Formatted.").optional(),collapsed_tag_keys:g.array(g2).optional(),values:g.array(_2).optional()},annotations:{destructive:!1,openWorld:!1,readOnly:!1},async execute(e,t){let r=await t.callVantageApi("/v2/virtual_tag_configs",e,"POST");if(!r.ok)throw new z({errors:r.errors});return r.data}});var R0=Ue(Ge());var v2=`
428
441
  Deletes a cost report by its token. This action is irreversible.
429
- `.trim(),c2={cost_report_token:g.string().describe("Token of the cost report to delete")},XH=O({name:"delete-cost-report",description:a2,annotations:{destructive:!0,openWorld:!1,readOnly:!1},args:c2,async execute(e,t){let r=await t.callVantageApi(`/v2/cost_reports/${(0,z0.pathEncode)(e.cost_report_token)}`,{},"DELETE");if(!r.ok)throw new E({errors:r.errors});return{token:e.cost_report_token}}});var I0=We(ct());var u2=`
442
+ `.trim(),y2={cost_report_token:g.string().describe("Token of the cost report to delete")},LH=I({name:"delete-cost-report",description:v2,annotations:{destructive:!0,openWorld:!1,readOnly:!1},args:y2,async execute(e,t){let r=await t.callVantageApi(`/v2/cost_reports/${(0,R0.pathEncode)(e.cost_report_token)}`,{},"DELETE");if(!r.ok)throw new z({errors:r.errors});return{token:e.cost_report_token}}});var j0=Ue(Ge());var b2=`
430
443
  Deletes a Folder. Cost Reports within the Folder will not be deleted.
431
- `.trim(),oB=O({name:"delete-folder",description:u2,annotations:{destructive:!0,openWorld:!1,readOnly:!1},args:{folder_token:g.string().describe("The token of the folder to delete")},async execute(e,t){let r=await t.callVantageApi(`/v2/folders/${(0,I0.pathEncode)(e.folder_token)}`,{},"DELETE");if(!r.ok)throw new E({errors:r.errors});return{token:e.folder_token}}});var E0=We(ct());var l2=`
444
+ `.trim(),GH=I({name:"delete-folder",description:b2,annotations:{destructive:!0,openWorld:!1,readOnly:!1},args:{folder_token:g.string().describe("The token of the folder to delete")},async execute(e,t){let r=await t.callVantageApi(`/v2/folders/${(0,j0.pathEncode)(e.folder_token)}`,{},"DELETE");if(!r.ok)throw new z({errors:r.errors});return{token:e.folder_token}}});var A0=Ue(Ge());var w2=`
432
445
  Gets a specific anomaly alert by its token.
433
- `.trim(),d2={anomaly_alert_token:g.string().describe("The anomaly alert token to retrieve")},uB=O({name:"get-anomaly",description:l2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:d2,async execute(e,t){let r=await t.callVantageApi(`/v2/anomaly_alerts/${(0,E0.pathEncode)(e.anomaly_alert_token)}`,{},"GET");if(!r.ok)throw new E({errors:r.errors});return r.data}});var N0=We(ct());var p2=`
446
+ `.trim(),$2={anomaly_alert_token:g.string().describe("The anomaly alert token to retrieve")},QH=I({name:"get-anomaly",description:w2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:$2,async execute(e,t){let r=await t.callVantageApi(`/v2/anomaly_alerts/${(0,A0.pathEncode)(e.anomaly_alert_token)}`,{},"GET");if(!r.ok)throw new z({errors:r.errors});return r.data}});var C0=Ue(Ge());var k2=`
434
447
  Gets a specific cost alert by its token.
435
- `.trim(),f2={cost_alert_token:g.string().describe("The cost alert token to retrieve")},mB=O({name:"get-cost-alert",description:p2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:f2,async execute(e,t){let r=await t.callVantageApi(`/v2/cost_alerts/${(0,N0.pathEncode)(e.cost_alert_token)}`,{},"GET");if(!r.ok)throw new E({errors:r.errors});return r.data}});var m2=`
448
+ `.trim(),x2={cost_alert_token:g.string().describe("The cost alert token to retrieve")},rJ=I({name:"get-cost-alert",description:k2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:x2,async execute(e,t){let r=await t.callVantageApi(`/v2/cost_alerts/${(0,C0.pathEncode)(e.cost_alert_token)}`,{},"GET");if(!r.ok)throw new z({errors:r.errors});return r.data}});var S2=`
436
449
  Get the list of Cost Provider Accounts that the current user has access to in their workspace and their names.
437
450
  This is useful for mapping IDs you have gotten from other endpoints to human-readable names, or if you need to get the
438
451
  ID of a Cost Provider Account to use in places. The account_id in this result can be passed as the account_id in VQL queries.
439
- `.trim(),yB=O({name:"get-cost-provider-accounts",description:m2,args:{workspace_token:g.string().describe("Workspace token to list cost provider accounts for"),account_id:g.string().optional().describe("Filter by a specific account ID"),provider:g.string().optional().describe("Provider to filter provider accounts to")},annotations:{destructive:!1,openWorld:!1,readOnly:!0},async execute(e,t){let r=await t.callVantageApi("/v2/cost_provider_accounts",{...e,provider:e.provider},"GET");if(!r.ok)throw new E({errors:r.errors});return{cost_provider_accounts:r.data.cost_provider_accounts}}});var R0=We(ct());function h2(e){let r=new URL(e).searchParams.get("page");return r?Number.parseInt(r,10):0}var O0={nextPage:0,hasNextPage:!1};function Y(e){let t=e?.links?.next;if(!t)return O0;let r=h2(t);return r===0?O0:{nextPage:r,hasNextPage:!0}}var g2=`
452
+ `.trim(),aJ=I({name:"get-cost-provider-accounts",description:S2,args:{workspace_token:g.string().describe("Workspace token to list cost provider accounts for"),account_id:g.string().optional().describe("Filter by a specific account ID"),provider:g.string().optional().describe("Provider to filter provider accounts to")},annotations:{destructive:!1,openWorld:!1,readOnly:!0},async execute(e,t){let r=await t.callVantageApi("/v2/cost_provider_accounts",{...e,provider:e.provider},"GET");if(!r.ok)throw new z({errors:r.errors});return{cost_provider_accounts:r.data.cost_provider_accounts}}});var D0=Ue(Ge());var T2=`
440
453
  Given a Cost Report Token, Vantage can forecast the costs for a given time range. Vantage will return costs that are *predicted*, but have not yet been actually incurred.
441
454
  If the user does not set a date, best to pick the next month as the default.
442
455
  The report token can be used to link the user to the report in the Vantage Web UI. Build the link like this: https://console.vantage.sh/go/<CostReportToken>
443
- `.trim(),_2={cost_report_token:g.string().min(1).describe("Cost report to limit costs to"),page:g.number().optional().default(1).describe("The page number to return, defaults to 1"),start_date:we("Start date to filter costs by, format=YYYY-MM-DD").optional(),end_date:we("End date to filter costs by, format=YYYY-MM-DD").optional(),provider:g.string().optional().describe("Provider to filter costs by, refer to the list-cost-providers tool"),service:g.string().optional().describe("Service to filter costs by, refer to the list-cost-services tool, must pass a provider when you pass a service")},zB=O({name:"get-cost-report-forecast",description:g2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:_2,async execute(e,t){let r={...e,limit:128,provider:e.provider},o=await t.callVantageApi(`/v2/cost_reports/${(0,R0.pathEncode)(e.cost_report_token)}/forecasted_costs`,r,"GET");if(!o.ok)throw new E({errors:o.errors});return{forecasted_costs:o.data.forecasted_costs,pagination:Y(o.data)}}});var j0=We(ct());var v2=`
456
+ `.trim(),P2={cost_report_token:g.string().min(1).describe("Cost report to limit costs to"),page:g.number().optional().default(1).describe("The page number to return, defaults to 1"),start_date:we("Start date to filter costs by, format=YYYY-MM-DD").optional(),end_date:we("End date to filter costs by, format=YYYY-MM-DD").optional(),provider:g.string().optional().describe("Provider to filter costs by, refer to the list-cost-providers tool"),service:g.string().optional().describe("Service to filter costs by, refer to the list-cost-services tool, must pass a provider when you pass a service")},hJ=I({name:"get-cost-report-forecast",description:T2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:P2,async execute(e,t){let r={...e,limit:128,provider:e.provider},o=await t.callVantageApi(`/v2/cost_reports/${(0,D0.pathEncode)(e.cost_report_token)}/forecasted_costs`,r,"GET");if(!o.ok)throw new z({errors:o.errors});return{forecasted_costs:o.data.forecasted_costs,pagination:Y(o.data)}}});var q0=Ue(Ge());var z2=`
444
457
  Gets a specific cost report by its token. The token of a report can be used to generate a link to the report in the Vantage Web UI: https://console.vantage.sh/go/<token>
445
458
  The same token can be used with the get-cost-report-forecast tool to retrieve forecasted future costs for the report.
446
- `.trim(),y2={cost_report_token:g.string().describe("The cost report token to retrieve")},RB=O({name:"get-cost-report",description:v2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:y2,async execute(e,t){let r=await t.callVantageApi(`/v2/cost_reports/${(0,j0.pathEncode)(e.cost_report_token)}`,{},"GET");if(!r.ok)throw new E({errors:r.errors});return r.data}});var A0=We(ct());var b2=`
459
+ `.trim(),E2={cost_report_token:g.string().describe("The cost report token to retrieve")},bJ=I({name:"get-cost-report",description:z2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:E2,async execute(e,t){let r=await t.callVantageApi(`/v2/cost_reports/${(0,q0.pathEncode)(e.cost_report_token)}`,{},"GET");if(!r.ok)throw new z({errors:r.errors});return r.data}});var M0=Ue(Ge());var I2=`
447
460
  Gets a specific Folder by its token.
448
- `.trim(),qB=O({name:"get-folder",description:b2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:{folder_token:g.string().describe("The token of the folder to retrieve")},async execute(e,t){let r=await t.callVantageApi(`/v2/folders/${(0,A0.pathEncode)(e.folder_token)}`,{},"GET");if(!r.ok)throw new E({errors:r.errors});return r.data}});var w2=`
461
+ `.trim(),SJ=I({name:"get-folder",description:I2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:{folder_token:g.string().describe("The token of the folder to retrieve")},async execute(e,t){let r=await t.callVantageApi(`/v2/folders/${(0,M0.pathEncode)(e.folder_token)}`,{},"GET");if(!r.ok)throw new z({errors:r.errors});return r.data}});var N2=`
449
462
  Get data that is available to the current auth token.
450
463
  This includes the list of Workspaces they have access to.
451
464
 
452
465
  default_workspace_token: The token of the workspace that is set as the default workspace for the user and can be used for queries unless told otherwise.
453
- `.trim(),$2={},ZB=O({name:"get-myself",description:w2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:$2,async execute(e,t){let r=await t.callVantageApi("/v2/me",{},"GET");if(!r.ok)throw new E({errors:r.errors});return r.data}});var D0=We(ct());var k2=`
466
+ `.trim(),O2={},EJ=I({name:"get-myself",description:N2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:O2,async execute(e,t){let r=await t.callVantageApi("/v2/me",{},"GET");if(!r.ok)throw new z({errors:r.errors});return r.data}});var U0=Ue(Ge());var R2=`
454
467
  Get detailed information about a specific provider resource using its token or UUID.
455
468
 
456
469
  This returns comprehensive details about the resource including:
@@ -462,7 +475,7 @@ This returns comprehensive details about the resource including:
462
475
 
463
476
  The resource_token can be either a Vantage token (starting with prvdr_rsrc) or the resource's UUID/ARN from the cloud provider.
464
477
  Set include_cost to true to get cost information broken down by category.
465
- `.trim(),KB=O({name:"get-provider-resource",description:k2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:{resource_token:g.string().nonempty().describe("The resource token (prvdr_rsrc_*) or UUID/ARN of the resource"),include_cost:g.boolean().optional().default(!1).describe("Include cost information broken down by category")},async execute(e,t){let r=await t.callVantageApi(`/v2/resources/${(0,D0.pathEncode)(e.resource_token)}`,{include_cost:e.include_cost},"GET");if(!r.ok)throw new E({errors:r.errors});return r.data}});var C0=We(ct());var x2=`
478
+ `.trim(),jJ=I({name:"get-provider-resource",description:R2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:{resource_token:g.string().nonempty().describe("The resource token (prvdr_rsrc_*) or UUID/ARN of the resource"),include_cost:g.boolean().optional().default(!1).describe("Include cost information broken down by category")},async execute(e,t){let r=await t.callVantageApi(`/v2/resources/${(0,U0.pathEncode)(e.resource_token)}`,{include_cost:e.include_cost},"GET");if(!r.ok)throw new z({errors:r.errors});return r.data}});var L0=Ue(Ge());var j2=`
466
479
  Get comprehensive details about a specific cost optimization recommendation using its unique token.
467
480
 
468
481
  This tool provides in-depth information about a single recommendation including:
@@ -479,7 +492,7 @@ This tool provides in-depth information about a single recommendation including:
479
492
  Use this tool after getting a recommendation token from list-recommendations to understand exactly what optimization is being suggested and the potential impact.
480
493
 
481
494
  The recommendation token can also be used with get-recommendation-resources to see the specific infrastructure resources involved.
482
- `.trim(),S2={recommendation_token:g.string().min(1).describe("The token of the recommendation to get details for")},YB=O({name:"get-recommendation-details",description:x2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:S2,async execute(e,t){let r=await t.callVantageApi(`/v2/recommendations/${(0,C0.pathEncode)(e.recommendation_token)}`,{},"GET");if(!r.ok)throw new E({errors:r.errors});return r.data}});var pv=We(ct());var T2=`
495
+ `.trim(),A2={recommendation_token:g.string().min(1).describe("The token of the recommendation to get details for")},MJ=I({name:"get-recommendation-details",description:j2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:A2,async execute(e,t){let r=await t.callVantageApi(`/v2/recommendations/${(0,L0.pathEncode)(e.recommendation_token)}`,{},"GET");if(!r.ok)throw new z({errors:r.errors});return r.data}});var fv=Ue(Ge());var C2=`
483
496
  Get comprehensive details about a specific infrastructure resource within a cost optimization recommendation, including the exact actions recommended for that resource.
484
497
 
485
498
  This tool provides the deepest level of detail about a single resource that's part of a recommendation. The response includes:
@@ -501,7 +514,7 @@ Use this tool when you need to understand exactly what should be done with a spe
501
514
  This is the most granular level of recommendation data available and is essential for making informed decisions about implementing specific optimizations.
502
515
 
503
516
  You must have both the recommendation token (from list-recommendations) and the resource token (from get-recommendation-resources) to use this tool.
504
- `.trim(),P2={recommendation_token:g.string().min(1).describe("The token of the recommendation"),resource_token:g.string().min(1).describe("The token of the specific resource to get details for")},nJ=O({name:"get-recommendation-resource-details",description:T2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:P2,async execute(e,t){let r=await t.callVantageApi(`/v2/recommendations/${(0,pv.pathEncode)(e.recommendation_token)}/resources/${(0,pv.pathEncode)(e.resource_token)}`,{},"GET");if(!r.ok)throw new E({errors:r.errors});return r.data}});var q0=We(ct());var z2=`
517
+ `.trim(),D2={recommendation_token:g.string().min(1).describe("The token of the recommendation"),resource_token:g.string().min(1).describe("The token of the specific resource to get details for")},FJ=I({name:"get-recommendation-resource-details",description:C2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:D2,async execute(e,t){let r=await t.callVantageApi(`/v2/recommendations/${(0,fv.pathEncode)(e.recommendation_token)}/resources/${(0,fv.pathEncode)(e.resource_token)}`,{},"GET");if(!r.ok)throw new z({errors:r.errors});return r.data}});var Z0=Ue(Ge());var q2=`
505
518
  Get a paginated list of all infrastructure resources affected by a specific cost optimization recommendation.
506
519
 
507
520
  This tool returns the actual cloud resources (instances, volumes, load balancers, etc.) that are involved in a recommendation. Each resource entry includes:
@@ -520,16 +533,16 @@ Use this tool after getting recommendation details to see exactly which resource
520
533
  Each resource has its own token that can be used with get-recommendation-resource-details to get comprehensive information about that specific resource and what actions are recommended.
521
534
 
522
535
  Use pagination (page parameter) to navigate through large numbers of affected resources.
523
- `.trim(),I2={recommendation_token:g.string().min(1).describe("The token of the recommendation to get resources for"),page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},lJ=O({name:"get-recommendation-resources",description:z2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:I2,async execute(e,t){let r={page:e.page,limit:128},o=await t.callVantageApi(`/v2/recommendations/${(0,q0.pathEncode)(e.recommendation_token)}/resources`,r,"GET");if(!o.ok)throw new E({errors:o.errors});return{resources:o.data.resources,pagination:Y(o.data)}}});var M0=We(ct());var E2=`
536
+ `.trim(),M2={recommendation_token:g.string().min(1).describe("The token of the recommendation to get resources for"),page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},QJ=I({name:"get-recommendation-resources",description:q2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:M2,async execute(e,t){let r={page:e.page,limit:128},o=await t.callVantageApi(`/v2/recommendations/${(0,Z0.pathEncode)(e.recommendation_token)}/resources`,r,"GET");if(!o.ok)throw new z({errors:o.errors});return{resources:o.data.resources,pagination:Y(o.data)}}});var V0=Ue(Ge());var U2=`
524
537
  Gets a specific team with its token.
525
- `.trim(),N2={token:g.string().describe("The team token to retrieve")},hJ=O({name:"get-team",description:E2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:N2,async execute(e,t){let r=await t.callVantageApi(`/v2/teams/${(0,M0.pathEncode)(e.token)}`,{},"GET");if(!r.ok)throw new E({errors:r.errors});return r.data}});var O2=`
538
+ `.trim(),L2={token:g.string().describe("The team token to retrieve")},rQ=I({name:"get-team",description:U2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:L2,async execute(e,t){let r=await t.callVantageApi(`/v2/teams/${(0,V0.pathEncode)(e.token)}`,{},"GET");if(!r.ok)throw new z({errors:r.errors});return r.data}});var Z2=`
526
539
  Return all Teams that the user has access to.
527
- `.trim(),R2={page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},$J=O({name:"get-teams",description:O2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:R2,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi("/v2/teams",r,"GET");if(!o.ok)throw new E({errors:o.errors});return{teams:o.data.teams,pagination:Y(o.data)}}});var j2=`
540
+ `.trim(),V2={page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},uQ=I({name:"get-teams",description:Z2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:V2,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi("/v2/teams",r,"GET");if(!o.ok)throw new z({errors:o.errors});return{teams:o.data.teams,pagination:Y(o.data)}}});var F2=`
528
541
  Return all Users that the user can see in the workspace.
529
- `.trim(),A2={page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},IJ=O({name:"get-users",description:j2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:A2,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi("/v2/users",r,"GET");if(!o.ok)throw new E({errors:o.errors});return{users:o.data.users,pagination:Y(o.data)}}});var D2=`
542
+ `.trim(),W2={page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},gQ=I({name:"get-users",description:F2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:W2,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi("/v2/users",r,"GET");if(!o.ok)throw new z({errors:o.errors});return{users:o.data.users,pagination:Y(o.data)}}});var G2=`
530
543
  Given a token of a Cost Report, look for anomalies in the report. You may optionally pass a Provider, like AWS to filter on. If you do pass a Provider, you can futher filter on a Service, like EC2 or S3.
531
544
  The report token can be used to link the user to the report in the Vantage Web UI. Build the link like this: https://console.vantage.sh/go/<CostReportToken>
532
- `.trim(),C2={page:g.number().optional().default(1).describe("The page number to return, defaults to 1"),cost_report_token:g.string().optional().describe("Cost report to filter anomalies by"),service:g.string().optional().describe("Service to filter anomalies to"),provider:g.string().optional().describe("Provider to filter anomalies to"),cost_category:g.string().optional().describe("Cost category to filter anomalies to"),start_date:we("Start date to filter anomalies to").optional(),end_date:we("End date to filter anomalies to").optional()},CJ=O({name:"list-anomalies",description:D2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:C2,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi("/v2/anomaly_alerts",r,"GET");if(!o.ok)throw new E({errors:o.errors});return{anomaly_alerts:o.data.anomaly_alerts,pagination:Y(o.data)}}});var q2=`
545
+ `.trim(),K2={page:g.number().optional().default(1).describe("The page number to return, defaults to 1"),cost_report_token:g.string().optional().describe("Cost report to filter anomalies by"),service:g.string().optional().describe("Service to filter anomalies to"),provider:g.string().optional().describe("Provider to filter anomalies to"),cost_category:g.string().optional().describe("Cost category to filter anomalies to"),start_date:we("Start date to filter anomalies to").optional(),end_date:we("End date to filter anomalies to").optional()},xQ=I({name:"list-anomalies",description:G2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:K2,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi("/v2/anomaly_alerts",r,"GET");if(!o.ok)throw new z({errors:o.errors});return{anomaly_alerts:o.data.anomaly_alerts,pagination:Y(o.data)}}});var B2=`
533
546
  List audit logs for actions taken within the Vantage workspace. Audit logs are a chronological record of all changes and activities that occur in your workspace, providing a complete history of who did what, when, and what changed.
534
547
 
535
548
  Audit logs track various types of actions including:
@@ -566,34 +579,28 @@ Common use cases for audit logs include:
566
579
  - Change management (reviewing modifications to reports or configurations)
567
580
  - Activity monitoring (understanding workspace usage patterns)
568
581
  - Distinguishing between human actions and autonomous agent actions (via scoutAction field and finops_agent source filter)
569
- `.trim(),M2={page:g.number().optional().default(1).describe("The page of results to return, defaults to 1"),limit:g.number().int().min(1).max(1e3).optional().describe("The amount of results to return. The maximum is 1000. Defaults to 100."),user:g.number().int().optional().describe("Filter by personal or service API token that performed the action (user ID)"),workspace_token:g.string().optional().describe("Filter by workspace token"),action:g.string().optional().describe("Filter by action type (e.g., create, update, delete)"),object_name:g.string().optional().describe("Filter by object name"),source:g.string().optional().describe("Filter by source (e.g., console, api, developer, finops_agent). Use 'finops_agent' to filter for actions specifically taken by the Finops Agent."),object_type:g.string().optional().describe("Filter by object type (e.g., virtual_tag, cost_report, recommendation_commitment)."),token:g.string().optional().describe("Filter by audit log token"),object_token:g.string().optional().describe("Filter by object token (auditable_token)"),start_date:g.string().optional().describe("Filter by start date (ISO 8601 format) for the time period"),end_date:g.string().optional().describe("Filter by end date (ISO 8601 format) for the time period")},FJ=O({name:"list-audit-logs",description:q2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:M2,async execute(e,t){let r={...e,limit:e.limit??128},o=await t.callVantageApi("/v2/audit_logs",r,"GET");if(!o.ok)throw new E({errors:o.errors});return{audit_logs:o.data.audit_logs,pagination:Y(o.data)}}});var U2=`
570
- List all budgets available in the Vantage account. Budgets help track spending against predefined limits.
571
- Use the page value of 1 to start.
572
- A budget is built against a Cost Report. The Budget objects returned by this tool will have a "cost_report_token" field that contains the token of the Cost Report. The Cost Report has the "filter" field to know what is the range of providers & services that the budget is tracking.
573
- When a user is looking at a Cost Report for a specific date range, they can decide if the providers and services spend is higher than desired by looking at the budgets for that report and the date range of the budget.
574
- The token of a budget can be used to link the user to the budget in the Vantage Web UI. Build the link like this: https://console.vantage.sh/go/<BudgetToken>
575
- `.trim(),L2={page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},QJ=O({name:"list-budgets",description:U2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:L2,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi("/v2/budgets",r,"GET");if(!o.ok)throw new E({errors:o.errors});return{budgets:o.data.budgets,pagination:Y(o.data)}}});var Z2=`
582
+ `.trim(),H2={page:g.number().optional().default(1).describe("The page of results to return, defaults to 1"),limit:g.number().int().min(1).max(1e3).optional().describe("The amount of results to return. The maximum is 1000. Defaults to 100."),user:g.number().int().optional().describe("Filter by personal or service API token that performed the action (user ID)"),workspace_token:g.string().optional().describe("Filter by workspace token"),action:g.string().optional().describe("Filter by action type (e.g., create, update, delete)"),object_name:g.string().optional().describe("Filter by object name"),source:g.string().optional().describe("Filter by source (e.g., console, api, developer, finops_agent). Use 'finops_agent' to filter for actions specifically taken by the Finops Agent."),object_type:g.string().optional().describe("Filter by object type (e.g., virtual_tag, cost_report, recommendation_commitment)."),token:g.string().optional().describe("Filter by audit log token"),object_token:g.string().optional().describe("Filter by object token (auditable_token)"),start_date:g.string().optional().describe("Filter by start date (ISO 8601 format) for the time period"),end_date:g.string().optional().describe("Filter by end date (ISO 8601 format) for the time period")},NQ=I({name:"list-audit-logs",description:B2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:H2,async execute(e,t){let r={...e,limit:e.limit??128},o=await t.callVantageApi("/v2/audit_logs",r,"GET");if(!o.ok)throw new z({errors:o.errors});return{audit_logs:o.data.audit_logs,pagination:Y(o.data)}}});var J2=`
576
583
  List all cost alerts available in the Vantage account. Cost alerts notify you when spending exceeds a specified threshold for a given cost report.
577
584
  Use the page value of 1 to start.
578
- `.trim(),V2={page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},oQ=O({name:"list-cost-alerts",description:Z2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:V2,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi("/v2/cost_alerts",r,"GET");if(!o.ok)throw new E({errors:o.errors});return{cost_alerts:o.data.cost_alerts,pagination:Y(o.data)}}});var F2=`
585
+ `.trim(),Q2={page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},qQ=I({name:"list-cost-alerts",description:J2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:Q2,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi("/v2/cost_alerts",r,"GET");if(!o.ok)throw new z({errors:o.errors});return{cost_alerts:o.data.cost_alerts,pagination:Y(o.data)}}});var Y2=`
579
586
  List all cost provider integrations available to provide costs data from and their associated accounts.
580
587
  Integrations are the cost providers that Vantage is configured to connect to and pull cost data from.
581
588
  If a user wants to see their providers in the Vantage Web UI, they can visit https://console.vantage.sh/settings/integrations
582
589
 
583
590
  Note that when 'provider' is 'custom_provider', that has a special case. When doing a VQL query for custom provider, use the 'token' you get back. Here is an example, where the token of the custom provider is "accss_crdntl_07171984":
584
591
  (costs.provider = 'custom_provider:accss_crdntl_07171984')
585
- `.trim(),W2={page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},dQ=O({name:"list-cost-integrations",description:F2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:W2,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi("/v2/integrations",r,"GET");if(!o.ok)throw new E({errors:o.errors});return{integrations:o.data.integrations,pagination:Y(o.data)}}});var G2=`
592
+ `.trim(),X2={page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},WQ=I({name:"list-cost-integrations",description:Y2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:X2,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi("/v2/integrations",r,"GET");if(!o.ok)throw new z({errors:o.errors});return{integrations:o.data.integrations,pagination:Y(o.data)}}});var eL=`
586
593
  List of cost providers available to query for a given Workspace. Can be used to filter costs down to a specific provider in VQL queries.
587
- `.trim(),K2={workspace_token:g.string().describe("Workspace token to list cost providers for")},_Q=O({name:"list-cost-providers",description:G2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:K2,async execute(e,t){let r=await t.callVantageApi("/v2/cost_providers",e,"GET");if(!r.ok)throw new E({errors:r.errors});return{providers:r.data.cost_providers,pagination:Y(r.data)}}});var H2=`
594
+ `.trim(),tL={workspace_token:g.string().describe("Workspace token to list cost providers for")},QQ=I({name:"list-cost-providers",description:eL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:tL,async execute(e,t){let r=await t.callVantageApi("/v2/cost_providers",e,"GET");if(!r.ok)throw new z({errors:r.errors});return{providers:r.data.cost_providers,pagination:Y(r.data)}}});var rL=`
588
595
  List all cost reports available. Cost reports are already created reports authored by a user in Vantage. If the user isn't asking about a specific report, it's better to use the query-costs tool.
589
596
  When you first call this function, use the "Page" parameter of 1.
590
597
  The 'Title' of a report is a good way to know what the report is about.
591
598
  The 'filter' of a report also gives clues to the data it provides.
592
599
  The 'token' of a report is a unique identifier for the report. It can be used to generate a link to the report in the Vantage Web UI. If a user wants to see a report, you can link them like this: https://console.vantage.sh/go/<token>
593
600
  Vantage offers data related to a cost report: Forecasts. The same report token can be used on the get-cost-report-forecast tool and Vantage will forecast future costs.
594
- `.trim(),B2={page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},xQ=O({name:"list-cost-reports",description:H2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:B2,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi("/v2/cost_reports",r,"GET");if(!o.ok)throw new E({errors:o.errors});return{cost_reports:o.data.cost_reports,pagination:Y(o.data)}}});var J2=`
601
+ `.trim(),nL={page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},o7=I({name:"list-cost-reports",description:rL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:nL,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi("/v2/cost_reports",r,"GET");if(!o.ok)throw new z({errors:o.errors});return{cost_reports:o.data.cost_reports,pagination:Y(o.data)}}});var oL=`
595
602
  List of cost services available to query for a given Workspace. Can be used to filter costs down to a specific service in VQL queries.
596
- `.trim(),Q2={workspace_token:g.string().describe("Workspace token to list cost services for")},IQ=O({name:"list-cost-services",description:J2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:Q2,async execute(e,t){let r=await t.callVantageApi("/v2/cost_services",e,"GET");if(!r.ok)throw new E({errors:r.errors});return{cost_services:r.data.cost_services}}});var Y2=`
603
+ `.trim(),iL={workspace_token:g.string().describe("Workspace token to list cost services for")},u7=I({name:"list-cost-services",description:oL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:iL,async execute(e,t){let r=await t.callVantageApi("/v2/cost_services",e,"GET");if(!r.ok)throw new z({errors:r.errors});return{cost_services:r.data.cost_services}}});var sL=`
597
604
  List the cost items inside a report. The Token of a Report must be provided. Use the page value of 1 to start.
598
605
  The report token can be used to link the user to the report in the Vantage Web UI. Build the link like this: https://console.vantage.sh/go/<CostReportToken>
599
606
 
@@ -602,17 +609,17 @@ When DateBin=day you get a record for each service spend on that day. For DateBi
602
609
  with the accrued_at field set to the first day of the week, but the spend item represents spend for a full week.
603
610
  Same with DateBin=month, each record returned covers a month of data. This lets you get answers with processing fewer
604
611
  records. Only use day/week if needed, otherwise DateBin=month is preferred, and month is the value set if you pass no value for DateBin.
605
- `.trim(),X2={page:g.number().optional().default(1).describe("The page number to return, defaults to 1"),cost_report_token:g.string().describe("The workspace token to scope the query to"),start_date:we("Start date to filter costs by, format=YYYY-MM-DD").optional(),end_date:we("End date to filter costs by, format=YYYY-MM-DD").optional(),date_bin:g.enum(["day","week","month"]).optional().describe("Date binning for returned costs, default to month unless user says otherwise, allowed values: day, week, month"),settings_include_credits:g.boolean().optional().default(!1).describe("Results will include credits, defaults to false"),settings_include_refunds:g.boolean().optional().default(!1).describe("Results will include refunds, defaults to false"),settings_include_discounts:g.boolean().optional().default(!0).describe("Results will include discounts, defaults to true"),settings_include_tax:g.boolean().optional().default(!0).describe("Results will include tax, defaults to true"),settings_amortize:g.boolean().optional().default(!0).describe("Results will amortize, defaults to true"),settings_unallocated:g.boolean().optional().default(!1).describe("Results will show unallocated costs, defaults to false"),settings_aggregate_by:g.enum(["cost","usage"]).optional().default("cost").describe("Results will aggregate by cost or usage, defaults to cost"),settings_show_previous_period:g.boolean().optional().default(!0).describe("Results will show previous period costs or usage comparison, defaults to true"),groupings:g.array(g.string()).default(["provider","service","account_id"]).describe("Group the results by specific field(s). Defaults to provider, service, account_id. Valid groupings: account_id, billing_account_id, charge_type, cost_category, cost_subcategory, provider, region, resource_id, service, tagged, tag:<tag_value>. Let Groupings default unless explicitly asked for.")},CQ=O({name:"list-costs",description:Y2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:X2,async execute(e,t){let r={limit:128};Object.keys(e).forEach(i=>{let s=i;if(i.startsWith("settings_")){let a=i.slice(9);r[`settings[${a}]`]=e[s]}else r[i]=e[s]});let o=await t.callVantageApi("/v2/costs",r,"GET");if(!o.ok)throw new E({errors:o.errors});let n;switch(e.date_bin){case"day":n="Costs records represent one day.";break;case"week":n="Costs records represent one week, the accrued_at field is the first day of the week. If your date range is less than one week, this record includes only data for that date range, not the full week.";break;case"month":n="Costs records represent one month, the accrued_at field is the first day of the month. If your date range is less than one month, this record includes only data for that date range, not the full month.";break;default:n="Costs records represent one day.";break}return{costs:o.data.costs,total_cost:o.data.total_cost,notes:n,pagination:Y(o.data)}}});var eL=`
612
+ `.trim(),aL={page:g.number().optional().default(1).describe("The page number to return, defaults to 1"),cost_report_token:g.string().describe("The workspace token to scope the query to"),start_date:we("Start date to filter costs by, format=YYYY-MM-DD").optional(),end_date:we("End date to filter costs by, format=YYYY-MM-DD").optional(),date_bin:g.enum(["day","week","month"]).optional().describe("Date binning for returned costs, default to month unless user says otherwise, allowed values: day, week, month"),settings_include_credits:g.boolean().optional().default(!1).describe("Results will include credits, defaults to false"),settings_include_refunds:g.boolean().optional().default(!1).describe("Results will include refunds, defaults to false"),settings_include_discounts:g.boolean().optional().default(!0).describe("Results will include discounts, defaults to true"),settings_include_tax:g.boolean().optional().default(!0).describe("Results will include tax, defaults to true"),settings_amortize:g.boolean().optional().default(!0).describe("Results will amortize, defaults to true"),settings_unallocated:g.boolean().optional().default(!1).describe("Results will show unallocated costs, defaults to false"),settings_aggregate_by:g.enum(["cost","usage"]).optional().default("cost").describe("Results will aggregate by cost or usage, defaults to cost"),settings_show_previous_period:g.boolean().optional().default(!0).describe("Results will show previous period costs or usage comparison, defaults to true"),groupings:g.array(g.string()).default(["provider","service","account_id"]).describe("Group the results by specific field(s). Defaults to provider, service, account_id. Valid groupings: account_id, billing_account_id, charge_type, cost_category, cost_subcategory, provider, region, resource_id, service, tagged, tag:<tag_value>. Let Groupings default unless explicitly asked for.")},_7=I({name:"list-costs",description:sL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:aL,async execute(e,t){let r={limit:128};Object.keys(e).forEach(i=>{let s=i;if(i.startsWith("settings_")){let a=i.slice(9);r[`settings[${a}]`]=e[s]}else r[i]=e[s]});let o=await t.callVantageApi("/v2/costs",r,"GET");if(!o.ok)throw new z({errors:o.errors});let n;switch(e.date_bin){case"day":n="Costs records represent one day.";break;case"week":n="Costs records represent one week, the accrued_at field is the first day of the week. If your date range is less than one week, this record includes only data for that date range, not the full week.";break;case"month":n="Costs records represent one month, the accrued_at field is the first day of the month. If your date range is less than one month, this record includes only data for that date range, not the full month.";break;default:n="Costs records represent one day.";break}return{costs:o.data.costs,total_cost:o.data.total_cost,notes:n,pagination:Y(o.data)}}});var cL=`
606
613
  List all dashboards available in the Vantage account. Dashboards provide visualizations of cost data.
607
614
  Use the page value of 1 to start.
608
615
  The token of a dashboard can be used to link the user to the dashboard in the Vantage Web UI. Build the link like this: https://console.vantage.sh/go/<token>
609
- `.trim(),tL={page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},VQ=O({name:"list-dashboards",description:eL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:tL,async execute(e,t){let r={...e,limit:64},o=await t.callVantageApi("/v2/dashboards",r,"GET");if(!o.ok)throw new E({errors:o.errors});return{dashboards:o.data.dashboards,pagination:Y(o.data)}}});var rL=`
616
+ `.trim(),uL={page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},k7=I({name:"list-dashboards",description:cL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:uL,async execute(e,t){let r={...e,limit:64},o=await t.callVantageApi("/v2/dashboards",r,"GET");if(!o.ok)throw new z({errors:o.errors});return{dashboards:o.data.dashboards,pagination:Y(o.data)}}});var lL=`
610
617
  List all Folders for organizing Cost Reports. Folders can be nested within other Folders via the parent_folder_token field.
611
618
  When you first call this function, use the "page" parameter of 1.
612
619
  The 'title' of a Folder describes its purpose.
613
620
  The 'saved_filter_tokens' field contains tokens of SavedFilters applied to Cost Reports within the Folder.
614
621
  The 'token' of a Folder can be used to generate a link in the Vantage Web UI: https://console.vantage.sh/go/<token>
615
- `.trim(),nL={page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},JQ=O({name:"list-folders",description:rL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:nL,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi("/v2/folders",r,"GET");if(!o.ok)throw new E({errors:o.errors});return{folders:o.data.folders,pagination:Y(o.data)}}});var oL=`
622
+ `.trim(),dL={page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},I7=I({name:"list-folders",description:lL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:dL,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi("/v2/folders",r,"GET");if(!o.ok)throw new z({errors:o.errors});return{folders:o.data.folders,pagination:Y(o.data)}}});var pL=`
616
623
  List infrastructure provider resources (instances, volumes, load balancers, etc.) from your cloud accounts.
617
624
  Resources can be fetched either from a specific Resource Report or by using VQL filters.
618
625
 
@@ -645,12 +652,12 @@ VQL Representation of Resource Types:
645
652
  | AWS | aws_auto_scaling_group | Auto Scaling Group |
646
653
  | AWS | aws_cloudtrail | CloudTrail |
647
654
  | AWS | aws_cloudwatch_log_group | CloudWatch Log Group |
648
- | AWS | aws_db_instance | RDS Instance |
649
- | AWS | aws_db_snapshot | RDS Snapshot |
655
+ | AWS | aws_db_instance | RDS Instance (NOT aws_rds_instance) |
656
+ | AWS | aws_db_snapshot | RDS Snapshot (NOT aws_rds_snapshot) |
650
657
  | AWS | aws_docdb_cluster_instance | DocumentDB Cluster Instance |
651
658
  | AWS | aws_dynamodb_table | DynamoDB Table |
652
659
  | AWS | aws_ebs_volume | EBS Volume |
653
- | AWS | aws_ec2_instance | EC2 Instance |
660
+ | AWS | aws_instance | EC2 Instance (NOT aws_ec2_instance) |
654
661
  | AWS | aws_ec2_managed_prefix_list | EC2 Managed Prefix List |
655
662
  | AWS | aws_ec2_reserved_instance | EC2 Reserved Instance |
656
663
  | AWS | aws_ecs_service | ECS Service |
@@ -661,7 +668,7 @@ VQL Representation of Resource Types:
661
668
  | AWS | aws_elasticsearch_domain | Elasticsearch Domain |
662
669
  | AWS | aws_flow_log | Flow Log |
663
670
  | AWS | aws_glacier_vault | Glacier Vault |
664
- | AWS | aws_instance_snapshot | EC2 Instance Snapshot |
671
+ | AWS | aws_instance_snapshot | EC2 Instance Snapshot (NOT aws_ebs_snapshot) |
665
672
  | AWS | aws_internet_gateway | Internet Gateway |
666
673
  | AWS | aws_kms_key | KMS Key |
667
674
  | AWS | aws_lambda_function | Lambda Function |
@@ -679,7 +686,7 @@ VQL Representation of Resource Types:
679
686
  Example VQL queries:
680
687
  - Multi-provider: (resources.provider IN ('aws', 'gcp'))
681
688
  - Regional: (resources.provider = 'aws' AND resources.region = 'us-east-1')
682
- - Resource type: (resources.provider = 'aws' AND resources.type = 'aws_ec2_instance')
689
+ - Resource type: (resources.provider = 'aws' AND resources.type = 'aws_instance')
683
690
  - Metadata: (resources.provider = 'aws' AND resources.metadata->>'architecture' = 'x86_64')
684
691
  - Tags: (resources.provider = 'aws' AND tags.name = 'environment' AND tags.value = 'production')
685
692
  - Untagged resources: (resources.provider = 'aws' AND tags.name = NULL)
@@ -689,7 +696,7 @@ Use the page parameter starting with 1 for pagination.
689
696
 
690
697
  Resources include metadata specific to their type (EC2 instances show instance type, EBS volumes show size, etc.).
691
698
  Each resource has a unique token that can be used to get more details or link to the Vantage Web UI.
692
- `.trim(),r7=O({name:"list-provider-resources",description:oL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:{page:g.number().optional().default(1).describe("The page number to return, defaults to 1"),resource_report_token:g.string().optional().describe("The ResourceReport token to get resources from"),filter:g.string().optional().describe("VQL query to filter resources (requires workspace_token)"),workspace_token:g.string().optional().describe("The Workspace token to scope the query to (required when using filter)"),include_cost:g.boolean().optional().default(!1).describe("Include cost information broken down by category for each resource")},async execute(e,t){let r=await t.callVantageApi("/v2/resources",e,"GET");if(!r.ok)throw new E({errors:r.errors});return{resources:r.data.resources,pagination:Y(r.data)}}});var iL=["aws","gcp","azure","kubernetes","datadog"],Va={aws:"aws",amazon:"aws","amazon web services":"aws",gcp:"gcp",google:"gcp","google cloud":"gcp",azure:"azure","microsoft azure":"azure",kubernetes:"kubernetes",k8s:"kubernetes",datadog:"datadog"},sL=Object.keys(Va).sort((e,t)=>t.length-e.length),aL={az_compute_reserved_instances:"azure:compute:reserved-instances",az_compute_reserved_instances_app_service:"azure:app-service:reserved-instances",az_compute_reserved_instances_cosmos:"azure:cosmosdb:reserved-instances",az_compute_reserved_instances_sql:"azure:sqldb:reserved-instances",az_disks_unattached:"azure:disks:unattached",cloudfront_cloudflare:"aws:cloudfront:excessive-egress",cw_log_retention_policy:"aws:cloudwatch:log-retention",database_savings_plan:"aws:database:savings-plan",datadog_financial_commitments:"datadog:commitment:opportunity",ebs_compute_optimizer_recommender:"aws:ebs:rightsizing",ebs_gp2_to_gp3:"aws:ebs:gp2-to-gp3",ebs_unattached_volume:"aws:ebs:unattached-volume",ec2_compute_optimizer_recommender:"aws:ec2:co-rightsizing",ec2_generational_upgrades:"aws:ec2:generational-upgrade",ec2_rightsizing_recommender:"aws:ec2:rightsizing",ec2_snapshot_recommender:"aws:ec2:snapshot-cleanup",ecs_compute_optimizer_recommender:"aws:ecs:rightsizing",eks_approaching_extended_support_window:"aws:eks:nearing-extended-support",eks_in_extended_support_window:"aws:eks:in-extended-support",elastic_search_reserved_instances:"aws:opensearch:reserved-instances",elasticache_reserved_instances:"aws:elasticache:reserved-instances",es_generational_upgrades:"aws:opensearch:generational-upgrade",gcp_compute_commitment_recommender:"gcp:compute:commitment",gcp_compute_rightsizing_recommender:"gcp:compute:rightsizing",idle_compute_optimizer_recommender:"idle-resource",ip_unattached:"aws:elastic-ip:unattached",kubernetes_recommender:"kubernetes:workload:rightsizing",lambda_compute_optimizer_recommender:"aws:lambda:rightsizing",rds_approaching_extended_support_window:"aws:rds:nearing-extended-support",rds_compute_optimizer_recommender:"aws:rds:rightsizing",rds_generational_upgrades:"aws:rds:generational-upgrade",rds_in_extended_support_window:"aws:rds:in-extended-support",rds_reserved_instances:"aws:rds:reserved-instances",redshift_reserved_instances:"aws:redshift:reserved-instances",s3_bucket_glacier_instant_retrieval:"aws:s3:glacier-instant-retrieval",s3_bucket_intelligent_tiering:"aws:s3:intelligent-tiering",s3_cloudflare:"aws:s3:egress-cloudflare",savings_plan:"aws:compute:savings-plan",unused_financial_commitments:"aws:ec2:unused-reserved-instances",workspace_stranded:"aws:workspaces:stranded",workspace_unused:"aws:workspaces:unused",azure_blob_storage_reserved_instances_recommender:"azure:blob-storage:reserved-instances",azure_compute_savings_recommender:"azure:compute:savings-plan",azure_files_reserved_instances_recommender:"azure:files:reserved-instances",azure_rightsizing_recommender:"azure:vm:rightsizing",azure_sql_paas_db_reserved_instances_recommender:"azure:sql-paas-db:reserved-instances",datadog_metrics_unqueried:"datadog:metrics:unqueried",dynamodb_reserved_capacity_recommender:"aws:dynamodb:reserved-capacity"},cL=e=>{if(typeof e!="string")return e;let t=e.trim().toLowerCase();return Va[t]??t},uL=e=>{if(typeof e!="string")return e;let t=e.trim().toLowerCase();if(t=t.replace(/\brecommendations?\b/g,"").trim(),t=t.replace(/\s*:\s*/g,":"),t=t.replace(/\s+/g," ").trim(),!t)return;let r=aL[t];if(r)return r;let o=Va[t];if(o)return o;if(t.includes(":")){let[n,...i]=t.split(":"),s=Va[n];if(s){let a=i.join(":").trim();return a?`${s}:${a}`:s}return t}for(let n of sL)if(t.startsWith(`${n} `))return Va[n];return t||void 0},lL=`
699
+ `.trim(),fL={aws_ec2_instance:"aws_instance",aws_rds_instance:"aws_db_instance",aws_rds_snapshot:"aws_db_snapshot",aws_ebs_snapshot:"aws_instance_snapshot"};function mL(e){for(let[t,r]of Object.entries(fL))e=e.replaceAll(t,r);return e}var C7=I({name:"list-provider-resources",description:pL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:{page:g.number().optional().default(1).describe("The page number to return, defaults to 1"),resource_report_token:g.string().optional().describe("The ResourceReport token to get resources from"),filter:g.string().optional().describe("VQL query to filter resources (requires workspace_token)"),workspace_token:g.string().optional().describe("The Workspace token to scope the query to (required when using filter)"),include_cost:g.boolean().optional().default(!1).describe("Include cost information broken down by category for each resource")},async execute(e,t){e.filter&&(e.filter=mL(e.filter));let r=await t.callVantageApi("/v2/resources",e,"GET");if(!r.ok)throw new z({errors:r.errors});return{resources:r.data.resources,pagination:Y(r.data)}}});var hL=["aws","gcp","azure","kubernetes","datadog"],Wa={aws:"aws",amazon:"aws","amazon web services":"aws",gcp:"gcp",google:"gcp","google cloud":"gcp",azure:"azure","microsoft azure":"azure",kubernetes:"kubernetes",k8s:"kubernetes",datadog:"datadog"},gL=Object.keys(Wa).sort((e,t)=>t.length-e.length),_L={az_compute_reserved_instances:"azure:compute:reserved-instances",az_compute_reserved_instances_app_service:"azure:app-service:reserved-instances",az_compute_reserved_instances_cosmos:"azure:cosmosdb:reserved-instances",az_compute_reserved_instances_sql:"azure:sqldb:reserved-instances",az_disks_unattached:"azure:disks:unattached",cloudfront_cloudflare:"aws:cloudfront:excessive-egress",cw_log_retention_policy:"aws:cloudwatch:log-retention",database_savings_plan:"aws:database:savings-plan",datadog_financial_commitments:"datadog:commitment:opportunity",ebs_compute_optimizer_recommender:"aws:ebs:rightsizing",ebs_gp2_to_gp3:"aws:ebs:gp2-to-gp3",ebs_unattached_volume:"aws:ebs:unattached-volume",ec2_compute_optimizer_recommender:"aws:ec2:co-rightsizing",ec2_generational_upgrades:"aws:ec2:generational-upgrade",ec2_rightsizing_recommender:"aws:ec2:rightsizing",ec2_snapshot_recommender:"aws:ec2:snapshot-cleanup",ecs_compute_optimizer_recommender:"aws:ecs:rightsizing",eks_approaching_extended_support_window:"aws:eks:nearing-extended-support",eks_in_extended_support_window:"aws:eks:in-extended-support",elastic_search_reserved_instances:"aws:opensearch:reserved-instances",elasticache_reserved_instances:"aws:elasticache:reserved-instances",es_generational_upgrades:"aws:opensearch:generational-upgrade",gcp_compute_commitment_recommender:"gcp:compute:commitment",gcp_compute_rightsizing_recommender:"gcp:compute:rightsizing",idle_compute_optimizer_recommender:"idle-resource",ip_unattached:"aws:elastic-ip:unattached",kubernetes_recommender:"kubernetes:workload:rightsizing",lambda_compute_optimizer_recommender:"aws:lambda:rightsizing",rds_approaching_extended_support_window:"aws:rds:nearing-extended-support",rds_compute_optimizer_recommender:"aws:rds:rightsizing",rds_generational_upgrades:"aws:rds:generational-upgrade",rds_in_extended_support_window:"aws:rds:in-extended-support",rds_reserved_instances:"aws:rds:reserved-instances",redshift_reserved_instances:"aws:redshift:reserved-instances",s3_bucket_glacier_instant_retrieval:"aws:s3:glacier-instant-retrieval",s3_bucket_intelligent_tiering:"aws:s3:intelligent-tiering",s3_cloudflare:"aws:s3:egress-cloudflare",savings_plan:"aws:compute:savings-plan",unused_financial_commitments:"aws:ec2:unused-reserved-instances",workspace_stranded:"aws:workspaces:stranded",workspace_unused:"aws:workspaces:unused",azure_blob_storage_reserved_instances_recommender:"azure:blob-storage:reserved-instances",azure_compute_savings_recommender:"azure:compute:savings-plan",azure_files_reserved_instances_recommender:"azure:files:reserved-instances",azure_rightsizing_recommender:"azure:vm:rightsizing",azure_sql_paas_db_reserved_instances_recommender:"azure:sql-paas-db:reserved-instances",datadog_metrics_unqueried:"datadog:metrics:unqueried",dynamodb_reserved_capacity_recommender:"aws:dynamodb:reserved-capacity"},vL=e=>{if(typeof e!="string")return e;let t=e.trim().toLowerCase();return Wa[t]??t},yL=e=>{if(typeof e!="string")return e;let t=e.trim().toLowerCase();if(t=t.replace(/\brecommendations?\b/g,"").trim(),t=t.replace(/\s*:\s*/g,":"),t=t.replace(/\s+/g," ").trim(),!t)return;let r=_L[t];if(r)return r;let o=Wa[t];if(o)return o;if(t.includes(":")){let[n,...i]=t.split(":"),s=Wa[n];if(s){let a=i.join(":").trim();return a?`${s}:${a}`:s}return t}for(let n of gL)if(t.startsWith(`${n} `))return Wa[n];return t||void 0},bL=`
693
700
  List all cost optimization recommendations available in the Vantage account. Recommendations are AI-powered suggestions that help identify opportunities to reduce costs and optimize cloud spending across your infrastructure.
694
701
 
695
702
  Use the page value of 1 to start pagination.
@@ -713,15 +720,15 @@ Recommendations can be filtered by status (open shows active recommendations, re
713
720
  The token of each recommendation can be used with other recommendation tools to get detailed information and see specific resources affected.
714
721
 
715
722
  For users to view and manage recommendations in the Vantage Web UI, they can visit https://console.vantage.sh/recommendations
716
- `.trim(),dL={page:g.number().optional().default(1).describe("The page number to return, defaults to 1"),workspace_token:g.string().optional().describe("Filter recommendations to a specific workspace"),provider:g.preprocess(cL,g.enum(iL).optional()).optional().describe("Filter recommendations by cloud provider (aws, gcp, azure, kubernetes, datadog). Aliases like 'Amazon Web Services' and 'Google Cloud' are normalized."),provider_account_id:g.string().optional().describe("Filter recommendations by provider account ID"),type:g.preprocess(uL,g.string().max(255).optional()).optional().describe("Filter recommendations by type with case-insensitive fuzzy matching (e.g., aws, aws:ec2, aws:ec2:rightsizing). Natural language values like 'AWS recommendations' are normalized."),filter:g.enum(["open","resolved","dismissed"]).optional().describe("Filter recommendations by status: open (default), resolved, or dismissed")},u7=O({name:"list-recommendations",description:lL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:dL,async execute(e,t){let r={...e,limit:128,provider:e.provider},o=await t.callVantageApi("/v2/recommendations",r,"GET");if(!o.ok)throw new E({errors:o.errors});return{recommendations:o.data.recommendations,pagination:Y(o.data)}}});var U0=We(ct());var pL=`
723
+ `.trim(),wL={page:g.number().optional().default(1).describe("The page number to return, defaults to 1"),workspace_token:g.string().optional().describe("Filter recommendations to a specific workspace"),provider:g.preprocess(vL,g.enum(hL).optional()).optional().describe("Filter recommendations by cloud provider (aws, gcp, azure, kubernetes, datadog). Aliases like 'Amazon Web Services' and 'Google Cloud' are normalized."),provider_account_id:g.string().optional().describe("Filter recommendations by provider account ID"),type:g.preprocess(yL,g.string().max(255).optional()).optional().describe("Filter recommendations by type with case-insensitive fuzzy matching (e.g., aws, aws:ec2, aws:ec2:rightsizing). Natural language values like 'AWS recommendations' are normalized."),filter:g.enum(["open","resolved","dismissed"]).optional().describe("Filter recommendations by status: open (default), resolved, or dismissed")},V7=I({name:"list-recommendations",description:bL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:wL,async execute(e,t){let r={...e,limit:128,provider:e.provider},o=await t.callVantageApi("/v2/recommendations",r,"GET");if(!o.ok)throw new z({errors:o.errors});return{recommendations:o.data.recommendations,pagination:Y(o.data)}}});var F0=Ue(Ge());var $L=`
717
724
  Tags can have many values. Use this tool to find the values and service providers that are associated with a tag.
718
- `.trim(),fL={page:g.number().optional().default(1).describe("The page number to return, defaults to 1"),key:g.string().min(1).describe("Tag key to list values for")},g7=O({name:"list-tag-values",description:pL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:fL,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi(`/v2/tags/${(0,U0.pathEncode)(e.key)}/values`,r,"GET");if(!o.ok)throw new E({errors:o.errors});return{tag_values:o.data.tag_values,pagination:Y(o.data)}}});var mL=`
725
+ `.trim(),kL={page:g.number().optional().default(1).describe("The page number to return, defaults to 1"),key:g.string().min(1).describe("Tag key to list values for")},J7=I({name:"list-tag-values",description:$L,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:kL,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi(`/v2/tags/${(0,F0.pathEncode)(e.key)}/values`,r,"GET");if(!o.ok)throw new z({errors:o.errors});return{tag_values:o.data.tag_values,pagination:Y(o.data)}}});var xL=`
719
726
  List tags that can be used to filter costs and cost reports.
720
727
  Tags are associated with one or more Cost Providers.
721
728
  Tags can be edited in the Vantage Web UI, or have further details displayed there. Link a user to the tag page like this: https://console.vantage.sh/settings/tags?search_query=<tag>
722
- `.trim(),hL={page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},k7=O({name:"list-tags",description:mL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:hL,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi("/v2/tags",r,"GET");if(!o.ok)throw new E({errors:o.errors});return{tags:o.data.tags,pagination:Y(o.data)}}});var gL=`
729
+ `.trim(),SL={page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},n8=I({name:"list-tags",description:xL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:SL,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi("/v2/tags",r,"GET");if(!o.ok)throw new z({errors:o.errors});return{tags:o.data.tags,pagination:Y(o.data)}}});var TL=`
723
730
  Retrieve the unit costs for a given CostReport, with optional paging, date filters, and ordering.
724
- `.trim(),_L={cost_report_token:g.string().describe("CostReport token to list unit costs for"),page:g.number().optional().default(1).describe("The page number to return, defaults to 1"),start_date:we("First date to filter unit costs from, format=YYYY-MM-DD").optional(),end_date:we("Last date to filter unit costs to, format=YYYY-MM-DD").optional(),date_bin:g.enum(["day","week","month"]).optional().describe("Date binning for returned costs, default to month unless user says otherwise, allowed values: day, week, month"),order:g.enum(["asc","desc"]).optional().default("desc").describe("Order of the returned costs, defaults to desc")},E7=O({name:"list-unit-costs",description:gL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:_L,async execute(e,t){let r={...e,limit:64},o=await t.callVantageApi("/v2/unit_costs",r,"GET");if(!o.ok)throw new E({errors:o.errors});return{unit_costs:o.data.unit_costs,pagination:Y(o.data)}}});var vL=`
731
+ `.trim(),PL={cost_report_token:g.string().describe("CostReport token to list unit costs for"),page:g.number().optional().default(1).describe("The page number to return, defaults to 1"),start_date:we("First date to filter unit costs from, format=YYYY-MM-DD").optional(),end_date:we("Last date to filter unit costs to, format=YYYY-MM-DD").optional(),date_bin:g.enum(["day","week","month"]).optional().describe("Date binning for returned costs, default to month unless user says otherwise, allowed values: day, week, month"),order:g.enum(["asc","desc"]).optional().default("desc").describe("Order of the returned costs, defaults to desc")},l8=I({name:"list-unit-costs",description:TL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:PL,async execute(e,t){let r={...e,limit:64},o=await t.callVantageApi("/v2/unit_costs",r,"GET");if(!o.ok)throw new z({errors:o.errors});return{unit_costs:o.data.unit_costs,pagination:Y(o.data)}}});var zL=`
725
732
  Query for costs in a Vantage Account. These are independent of a cost reports.
726
733
  Use Vantage VQL to structure a query.
727
734
  Queries must be scoped to a Workspace. Use the get-myself tool to know about available workspaces, and the get-cost-integrations tool to know about available cost providers. If the user didn't tell you a workspace it is best to ask them than to guess it.
@@ -755,12 +762,12 @@ When DateBin=day you get a record for each service spend on that day. For DateBi
755
762
  with the accrued_at field set to the first day of the week, but the spend item represents spend for a full week.
756
763
  Same with DateBin=month, each record returned covers a month of data. This lets you get answers with processing fewer
757
764
  records. Only use day/week if needed, otherwise DateBin=month is preferred, and month is the value set if you pass no value for DateBin.
758
- `.trim(),yL={page:g.number().optional().default(1).describe("The page number to return, defaults to 1"),filter:g.string().describe("A VQL query to run against your vantage account"),start_date:we("Start date to filter costs by, format=YYYY-MM-DD").optional(),end_date:we("End date to filter costs by, format=YYYY-MM-DD").optional(),workspace_token:g.string().min(1).describe("The workspace token to scope the query to"),date_bin:g.enum(["day","week","month"]).optional().describe("Date binning for returned costs, default to month unless user says otherwise, allowed values: day, week, month"),settings_include_credits:g.boolean().optional().default(!1).describe("Results will include credits, defaults to false"),settings_include_refunds:g.boolean().optional().default(!1).describe("Results will include refunds, defaults to false"),settings_include_discounts:g.boolean().optional().default(!0).describe("Results will include discounts, defaults to true"),settings_include_tax:g.boolean().optional().default(!0).describe("Results will include tax, defaults to true"),settings_amortize:g.boolean().optional().default(!0).describe("Results will amortize, defaults to true"),settings_unallocated:g.boolean().optional().default(!1).describe("Results will show unallocated costs, defaults to false"),settings_aggregate_by:g.enum(["cost","usage"]).optional().default("cost").describe("Results will aggregate by cost or usage, defaults to cost"),settings_show_previous_period:g.boolean().optional().default(!0).describe("Results will show previous period costs or usage comparison, defaults to true"),groupings:g.array(g.string()).default(["provider","service","region"]).describe("Group the results by specific field(s). Defaults to provider, service, account_id. Valid groupings: account_id, billing_account_id, charge_type, cost_category, cost_subcategory, provider, region, resource_id, service, tagged, tag:<tag_value>. Let Groupings default unless explicitly asked for.")},C7=O({name:"query-costs",description:vL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:yL,async execute(e,t){let r={limit:1e3};e.date_bin||(e.date_bin="month"),Object.keys(e).forEach(i=>{let s=i;if(i.startsWith("settings_")){let a=i.slice(9);r[`settings[${a}]`]=e[s]}else r[i]=e[s]});let o=await t.callVantageApi("/v2/costs",r,"GET");if(!o.ok)throw new E({errors:o.errors});let n;switch(e.date_bin){case"day":n="Costs records represent one day.";break;case"week":n="Costs records represent one week, the accrued_at field is the first day of the week. If your date range is less than one week, this record includes only data for that date range, not the full week.";break;case"month":n="Costs records represent one month, the accrued_at field is the first day of the month. If your date range is less than one month, this record includes only data for that date range, not the full month.";break;default:throw new Error("Invalid date bin value")}return{costs:o.data.costs,total_cost:o.data.total_cost,notes:n,pagination:Y(o.data)}}});var bL=`
765
+ `.trim(),EL={page:g.number().optional().default(1).describe("The page number to return, defaults to 1"),filter:g.string().describe("A VQL query to run against your vantage account"),start_date:we("Start date to filter costs by, format=YYYY-MM-DD").optional(),end_date:we("End date to filter costs by, format=YYYY-MM-DD").optional(),workspace_token:g.string().min(1).describe("The workspace token to scope the query to"),date_bin:g.enum(["day","week","month"]).optional().describe("Date binning for returned costs, default to month unless user says otherwise, allowed values: day, week, month"),settings_include_credits:g.boolean().optional().default(!1).describe("Results will include credits, defaults to false"),settings_include_refunds:g.boolean().optional().default(!1).describe("Results will include refunds, defaults to false"),settings_include_discounts:g.boolean().optional().default(!0).describe("Results will include discounts, defaults to true"),settings_include_tax:g.boolean().optional().default(!0).describe("Results will include tax, defaults to true"),settings_amortize:g.boolean().optional().default(!0).describe("Results will amortize, defaults to true"),settings_unallocated:g.boolean().optional().default(!1).describe("Results will show unallocated costs, defaults to false"),settings_aggregate_by:g.enum(["cost","usage"]).optional().default("cost").describe("Results will aggregate by cost or usage, defaults to cost"),settings_show_previous_period:g.boolean().optional().default(!0).describe("Results will show previous period costs or usage comparison, defaults to true"),groupings:g.array(g.string()).default(["provider","service","region"]).describe("Group the results by specific field(s). Defaults to provider, service, account_id. Valid groupings: account_id, billing_account_id, charge_type, cost_category, cost_subcategory, provider, region, resource_id, service, tagged, tag:<tag_value>. Let Groupings default unless explicitly asked for.")},_8=I({name:"query-costs",description:zL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:EL,async execute(e,t){let r={limit:1e3};e.date_bin||(e.date_bin="month"),Object.keys(e).forEach(i=>{let s=i;if(i.startsWith("settings_")){let a=i.slice(9);r[`settings[${a}]`]=e[s]}else r[i]=e[s]});let o=await t.callVantageApi("/v2/costs",r,"GET");if(!o.ok)throw new z({errors:o.errors});let n;switch(e.date_bin){case"day":n="Costs records represent one day.";break;case"week":n="Costs records represent one week, the accrued_at field is the first day of the week. If your date range is less than one week, this record includes only data for that date range, not the full week.";break;case"month":n="Costs records represent one month, the accrued_at field is the first day of the month. If your date range is less than one month, this record includes only data for that date range, not the full month.";break;default:throw new Error("Invalid date bin value")}return{costs:o.data.costs,total_cost:o.data.total_cost,notes:n,pagination:Y(o.data)}}});var IL=`
759
766
  Submit feedback on using the Vantage MCP Server. Ask the user if they'd like to provide feedback any time you sense they might be frustrated.
760
767
  Stop suggesting if they say they're not interested in providing feedback.
761
- `.trim(),wL={message:g.string().describe("Feedback message regarding using the Vantage MCP Server")},Z7=O({name:"submit-user-feedback",description:bL,annotations:{destructive:!1,openWorld:!1,readOnly:!1},args:wL,async execute(e,t){let r=await t.callVantageApi("/v2/user_feedback",{message:e.message},"POST");if(!r.ok)throw new E({errors:r.errors});return r.data}});var L0=We(ct());var $L=`
768
+ `.trim(),NL={message:g.string().describe("Feedback message regarding using the Vantage MCP Server")},$8=I({name:"submit-user-feedback",description:IL,annotations:{destructive:!1,openWorld:!1,readOnly:!1},args:NL,async execute(e,t){let r=await t.callVantageApi("/v2/user_feedback",{message:e.message},"POST");if(!r.ok)throw new z({errors:r.errors});return r.data}});var W0=Ue(Ge());var OL=`
762
769
  Updates an existing anomaly alert by its token. Use this to change the status of an anomaly alert (e.g. to archive or ignore it) and optionally provide feedback.
763
- `.trim(),K7=O({name:"update-anomaly",description:$L,annotations:{destructive:!1,openWorld:!1,readOnly:!1},args:{anomaly_alert_token:g.string().describe("The token of the anomaly alert to update."),status:g.enum(["active","archived","ignored"]).describe("The new status of the anomaly alert."),feedback:g.string().optional().describe("Optional comments explaining why the alert is being ignored or archived.")},async execute(e,t){let{anomaly_alert_token:r,...o}=e,n=await t.callVantageApi(`/v2/anomaly_alerts/${(0,L0.pathEncode)(r)}`,o,"PUT");if(!n.ok)throw new E({errors:n.errors});return n.data}});var Z0=We(ct());var kL=`
770
+ `.trim(),P8=I({name:"update-anomaly",description:OL,annotations:{destructive:!1,openWorld:!1,readOnly:!1},args:{anomaly_alert_token:g.string().describe("The token of the anomaly alert to update."),status:g.enum(["active","archived","ignored"]).describe("The new status of the anomaly alert."),feedback:g.string().optional().describe("Optional comments explaining why the alert is being ignored or archived.")},async execute(e,t){let{anomaly_alert_token:r,...o}=e,n=await t.callVantageApi(`/v2/anomaly_alerts/${(0,W0.pathEncode)(r)}`,o,"PUT");if(!n.ok)throw new z({errors:n.errors});return n.data}});var G0=Ue(Ge());var RL=`
764
771
  Updates a Folder for organizing Cost Reports. You can update its title, move it to a different parent Folder, or change its SavedFilter tokens.
765
- `.trim(),Y7=O({name:"update-folder",description:kL,annotations:{destructive:!1,openWorld:!1,readOnly:!1},args:{folder_token:g.string().describe("The token of the folder to update"),title:g.string().optional().describe("Updated title for the Folder"),parent_folder_token:g.string().optional().describe("Updated parent folder token for nesting"),saved_filter_tokens:g.array(g.string()).optional().describe("Updated tokens of SavedFilters to apply to any Cost Report contained within the Folder")},async execute(e,t){let{folder_token:r,...o}=e,n=await t.callVantageApi(`/v2/folders/${(0,Z0.pathEncode)(r)}`,o,"PUT");if(!n.ok)throw new E({errors:n.errors});return n.data}});async function xL(){if(!process.env.VANTAGE_TOKEN)throw new Error("VANTAGE_TOKEN environment variable is required.");let e={callVantageApi:async(o,n,i)=>{let s={Authorization:`Bearer ${process.env.VANTAGE_TOKEN}`};return x0(process.env.VANTAGE_API_HOST||"https://api.vantage.sh",s,n,i,o)}},t=new Ud,r=new qd(cv);S0(r,()=>e),$0(r),await r.connect(t)}xL().catch(e=>{console.error(e),process.exit(1)});
772
+ `.trim(),O8=I({name:"update-folder",description:RL,annotations:{destructive:!1,openWorld:!1,readOnly:!1},args:{folder_token:g.string().describe("The token of the folder to update"),title:g.string().optional().describe("Updated title for the Folder"),parent_folder_token:g.string().optional().describe("Updated parent folder token for nesting"),saved_filter_tokens:g.array(g.string()).optional().describe("Updated tokens of SavedFilters to apply to any Cost Report contained within the Folder")},async execute(e,t){let{folder_token:r,...o}=e,n=await t.callVantageApi(`/v2/folders/${(0,G0.pathEncode)(r)}`,o,"PUT");if(!n.ok)throw new z({errors:n.errors});return n.data}});async function jL(){if(!process.env.VANTAGE_TOKEN)throw new Error("VANTAGE_TOKEN environment variable is required.");let e={callVantageApi:async(o,n,i)=>{let s={Authorization:`Bearer ${process.env.VANTAGE_TOKEN}`};return S0(process.env.VANTAGE_API_HOST||"https://api.vantage.sh",s,n,i,o)}},t=new Ud,r=new qd(uv);T0(r,()=>e),k0(r),await r.connect(t)}jL().catch(e=>{console.error(e),process.exit(1)});
766
773
  //# sourceMappingURL=index.js.map