vantage-mcp-server 2.6.1 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +375 -62
- package/index.js.map +4 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var ZS=Object.create;var Ld=Object.defineProperty;var VS=Object.getOwnPropertyDescriptor;var LS=Object.getOwnPropertyNames;var FS=Object.getPrototypeOf,GS=Object.prototype.hasOwnProperty;var $=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),mn=(e,t)=>{for(var r in t)Ld(e,r,{get:t[r],enumerable:!0})},WS=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of LS(t))!GS.call(e,n)&&n!==r&&Ld(e,n,{get:()=>t[n],enumerable:!(o=VS(t,n))||o.enumerable});return e};var Ge=(e,t,r)=>(r=e!=null?ZS(FS(e)):{},WS(t||!e||!e.__esModule?Ld(r,"default",{value:e,enumerable:!0}):r,e));var Us=$(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 At=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=At;me.nil=new At("");function d$(e,...t){let r=[e[0]],o=0;for(;o<t.length;)Cm(r,t[o]),r.push(e[++o]);return new At(r)}me._=d$;var Rm=new At("+");function p$(e,...t){let r=[Ms(e[0])],o=0;for(;o<t.length;)r.push(Rm),Cm(r,t[o]),r.push(Rm,Ms(e[++o]));return JI(r),new At(r)}me.str=p$;function Cm(e,t){t instanceof At?e.push(...t._items):t instanceof Pn?e.push(t):e.push(XI(t))}me.addCodeArg=Cm;function JI(e){let t=1;for(;t<e.length-1;){if(e[t]===Rm){let r=BI(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function BI(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 YI(e,t){return t.emptyStr()?e:e.emptyStr()?t:p$`${e}${t}`}me.strConcat=YI;function XI(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Ms(Array.isArray(e)?e.join(","):e)}function QI(e){return new At(Ms(e))}me.stringify=QI;function Ms(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}me.safeStringify=Ms;function eO(e){return typeof e=="string"&&me.IDENTIFIER.test(e)?new At(`.${e}`):d$`[${e}]`}me.getProperty=eO;function tO(e){if(typeof e=="string"&&me.IDENTIFIER.test(e))return new At(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}me.getEsmExportName=tO;function rO(e){return new At(e.toString())}me.regexpCode=rO});var qm=$(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.ValueScope=yt.ValueScopeName=yt.Scope=yt.varKinds=yt.UsedValueState=void 0;var _t=Us(),Am=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},$l;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})($l||(yt.UsedValueState=$l={}));yt.varKinds={const:new _t.Name("const"),let:new _t.Name("let"),var:new _t.Name("var")};var wl=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}}};yt.Scope=wl;var kl=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}]`}};yt.ValueScopeName=kl;var nO=(0,_t._)`\n`,Dm=class extends wl{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?nO:_t.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,_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,$l.Started);let l=r(u);if(l){let d=this.opts.es5?yt.varKinds.var:yt.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 Am(u);c.set(u,$l.Completed)})}return i}};yt.ValueScope=Dm});var oe=$(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(),Bt=qm(),Jr=Us();Object.defineProperty(re,"_",{enumerable:!0,get:function(){return Jr._}});Object.defineProperty(re,"str",{enumerable:!0,get:function(){return Jr.str}});Object.defineProperty(re,"strConcat",{enumerable:!0,get:function(){return Jr.strConcat}});Object.defineProperty(re,"nil",{enumerable:!0,get:function(){return Jr.nil}});Object.defineProperty(re,"getProperty",{enumerable:!0,get:function(){return Jr.getProperty}});Object.defineProperty(re,"stringify",{enumerable:!0,get:function(){return Jr.stringify}});Object.defineProperty(re,"regexpCode",{enumerable:!0,get:function(){return Jr.regexpCode}});Object.defineProperty(re,"Name",{enumerable:!0,get:function(){return Jr.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?Bt.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=Co(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=Co(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}},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}},Lm=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=Co(this.code,t,r),this}get names(){return this.code instanceof le._CodeOrName?this.code.names:{}}},Zs=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)||(oO(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 Zs{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},Gm=class extends Zs{},Ro=class extends Pr{};Ro.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 Ro(o):o}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(f$(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=Co(this.condition,t,r),this}get names(){let t=super.names;return Tl(t,this.condition),this.else&&In(t,this.else.names),t}};zn.kind="if";var En=class extends Pr{};En.kind="for";var Wm=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=Co(this.iteration,t,r),this}get names(){return In(super.names,this.iteration.names)}},Km=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?Bt.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 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=Co(this.iterable,t,r),this}get names(){return In(super.names,this.iterable.names)}},Vs=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)}};Vs.kind="func";var Ls=class extends Zs{render(t){return"return "+super.render(t)}};Ls.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}},Fs=class extends Pr{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};Fs.kind="catch";var Gs=class extends Pr{render(t){return"finally"+super.render(t)}};Gs.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 Bt.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 Mm(t,i,o)),i}const(t,r,o){return this._def(Bt.varKinds.const,t,r,o)}let(t,r,o){return this._def(Bt.varKinds.let,t,r,o)}var(t,r,o){return this._def(Bt.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 Ro)}endIf(){return this._endBlockNode(zn,Ro)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new Wm(t),r)}forRange(t,r,o,n,i=this.opts.es5?Bt.varKinds.var:Bt.varKinds.let){let s=this._scope.toName(t);return this._for(new Km(i,s,r,o),()=>n(s))}forOf(t,r,o,n=Bt.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?Bt.varKinds.var:Bt.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(En)}label(t){return this._leafNode(new Zm(t))}break(t){return this._leafNode(new Vm(t))}return(t){let r=new Ls;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Ls)}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 Gs,this.code(o)),this._endBlockNode(Fs,Gs)}throw(t){return this._leafNode(new Lm(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 Vs(t,r,o)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(Vs)}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 Tl(e,t){return t instanceof le._CodeOrName?In(e,t.names):e}function Co(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 oO(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function f$(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,le._)`!${Bm(e)}`}re.not=f$;var iO=m$(re.operators.AND);function sO(...e){return e.reduce(iO)}re.and=sO;var aO=m$(re.operators.OR);function cO(...e){return e.reduce(aO)}re.or=cO;function m$(e){return(t,r)=>t===le.nil?r:r===le.nil?t:(0,le._)`${Bm(t)} ${e} ${Bm(r)}`}function Bm(e){return e instanceof le.Name?e:(0,le._)`(${e})`}});var he=$(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(),uO=Us();function lO(e){let t={};for(let r of e)t[r]=!0;return t}ie.toHash=lO;function dO(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(v$(e,t),!_$(t,e.self.RULES.all))}ie.alwaysValidSchema=dO;function v$(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]||$$(e,`unknown keyword: "${i}"`)}ie.checkUnknownRules=v$;function _$(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}ie.schemaHasRules=_$;function pO(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=pO;function fO({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=fO;function mO(e){return y$(decodeURIComponent(e))}ie.unescapeFragment=mO;function hO(e){return encodeURIComponent(Xm(e))}ie.escapeFragment=hO;function Xm(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ie.escapeJsonPointer=Xm;function y$(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ie.unescapeJsonPointer=y$;function gO(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}ie.eachItem=gO;function h$({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:h$({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} || {}`),Qm(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:b$}),items:h$({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 b$(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,Te._)`{}`);return t!==void 0&&Qm(e,r,t),r}ie.evaluatedPropsToName=b$;function Qm(e,t,r){Object.keys(r).forEach(o=>e.assign((0,Te._)`${t}${(0,Te.getProperty)(o)}`,!0))}ie.setEvaluated=Qm;var g$={};function vO(e,t){return e.scopeValue("func",{ref:t,code:g$[t.code]||(g$[t.code]=new uO._Code(t.code))})}ie.useFunc=vO;var Ym;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Ym||(ie.Type=Ym={}));function _O(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=_O;function $$(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=$$});var zr=$(eh=>{"use strict";Object.defineProperty(eh,"__esModule",{value:!0});var rt=oe(),yO={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=yO});var Ws=$(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 bO(e,t=nt.keywordError,r,o){let{it:n}=e,{gen:i,compositeRule:s,allErrors:a}=n,c=x$(e,t,r);o??(s||a)?w$(i,c):k$(n,(0,pe._)`[${c}]`)}nt.reportError=bO;function $O(e,t=nt.keywordError,r){let{it:o}=e,{gen:n,compositeRule:i,allErrors:s}=o,a=x$(e,t,r);w$(n,a),i||s||k$(o,pt.default.vErrors)}nt.reportExtraError=$O;function wO(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=wO;function kO({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=kO;function w$(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 k$(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 On={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 x$(e,t,r){let{createErrors:o}=e.it;return o===!1?(0,pe._)`{}`:xO(e,t,r)}function xO(e,t,r={}){let{gen:o,it:n}=e,i=[SO(n,r),TO(e,r)];return PO(e,t,i),o.object(...i)}function SO({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 TO({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)}`),[On.schemaPath,n]}function PO(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([On.keyword,n],[On.params,typeof t=="function"?t(e):t||(0,pe._)`{}`]),c.messages&&o.push([On.message,typeof r=="function"?r(e):r]),c.verbose&&o.push([On.schema,s],[On.parentSchema,(0,pe._)`${l}${d}`],[pt.default.data,i]),u&&o.push([On.propertyName,u])}});var T$=$(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.boolOrEmptySchema=Ao.topBoolOrEmptySchema=void 0;var zO=Ws(),EO=oe(),IO=zr(),OO={message:"boolean schema is false"};function jO(e){let{gen:t,schema:r,validateName:o}=e;r===!1?S$(e,!1):typeof r=="object"&&r.$async===!0?t.return(IO.default.data):(t.assign((0,EO._)`${o}.errors`,null),t.return(!0))}Ao.topBoolOrEmptySchema=jO;function NO(e,t){let{gen:r,schema:o}=e;o===!1?(r.var(t,!1),S$(e)):r.var(t,!0)}Ao.boolOrEmptySchema=NO;function S$(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,zO.reportError)(n,OO,void 0,t)}});var th=$(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});Do.getRules=Do.isJSONType=void 0;var RO=["string","number","integer","boolean","null","object","array"],CO=new Set(RO);function AO(e){return typeof e=="string"&&CO.has(e)}Do.isJSONType=AO;function DO(){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=DO});var rh=$(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.shouldUseRule=Br.shouldUseGroup=Br.schemaHasRulesForType=void 0;function qO({schema:e,self:t},r){let o=t.RULES.types[r];return o&&o!==!0&&P$(e,o)}Br.schemaHasRulesForType=qO;function P$(e,t){return t.rules.some(r=>z$(e,r))}Br.shouldUseGroup=P$;function z$(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))}Br.shouldUseRule=z$});var Ks=$(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 MO=th(),UO=rh(),ZO=Ws(),B=oe(),E$=he(),qo;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(qo||(ot.DataType=qo={}));function VO(e){let t=I$(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=VO;function I$(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(MO.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}ot.getJSONTypes=I$;function LO(e,t){let{gen:r,data:o,opts:n}=e,i=FO(t,n.coerceTypes),s=t.length>0&&!(i.length===0&&t.length===1&&(0,UO.schemaHasRulesForType)(e,t[0]));if(s){let a=oh(t,o,n.strictNumbers,qo.Wrong);r.if(a,()=>{i.length?GO(e,t,i):ih(e)})}return s}ot.coerceAndCheckDataType=LO;var O$=new Set(["string","number","integer","boolean","null"]);function FO(e,t){return t?e.filter(r=>O$.has(r)||t==="array"&&r==="array"):[]}function GO(e,t,r){let{gen:o,data:n,opts:i}=e,s=o.let("dataType",(0,B._)`typeof ${n}`),a=o.let("coerced",(0,B._)`undefined`);i.coerceTypes==="array"&&o.if((0,B._)`${s} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>o.assign(n,(0,B._)`${n}[0]`).assign(s,(0,B._)`typeof ${n}`).if(oh(t,n,i.strictNumbers),()=>o.assign(a,n))),o.if((0,B._)`${a} !== undefined`);for(let u of r)(O$.has(u)||u==="array"&&i.coerceTypes==="array")&&c(u);o.else(),ih(e),o.endIf(),o.if((0,B._)`${a} !== undefined`,()=>{o.assign(n,a),WO(e,a)});function c(u){switch(u){case"string":o.elseIf((0,B._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,B._)`"" + ${n}`).elseIf((0,B._)`${n} === null`).assign(a,(0,B._)`""`);return;case"number":o.elseIf((0,B._)`${s} == "boolean" || ${n} === null
|
|
4
|
-
|| (${s} == "string" && ${n} && ${n} == +${n})`).assign(a,(0,
|
|
5
|
-
|| (${s} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(a,(0,
|
|
6
|
-
|| ${s} === "boolean" || ${n} === null`).assign(a,(0,B._)`[${n}]`)}}}function WO({gen:e,parentData:t,parentDataProperty:r},o){e.if((0,B._)`${t} !== undefined`,()=>e.assign((0,B._)`${t}[${r}]`,o))}function nh(e,t,r,o=qo.Correct){let n=o===qo.Correct?B.operators.EQ:B.operators.NEQ,i;switch(e){case"null":return(0,B._)`${t} ${n} null`;case"array":i=(0,B._)`Array.isArray(${t})`;break;case"object":i=(0,B._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=s((0,B._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=s();break;default:return(0,B._)`typeof ${t} ${n} ${e}`}return o===qo.Correct?i:(0,B.not)(i);function s(a=B.nil){return(0,B.and)((0,B._)`typeof ${t} == "number"`,a,r?(0,B._)`isFinite(${t})`:B.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,E$.toHash)(e);if(i.array&&i.object){let s=(0,B._)`typeof ${t} != "object"`;n=i.null?s:(0,B._)`!${t} || ${s}`,delete i.null,delete i.array,delete i.object}else n=B.nil;i.number&&delete i.integer;for(let s in i)n=(0,B.and)(n,nh(s,t,r,o));return n}ot.checkDataTypes=oh;var KO={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,B._)`{type: ${e}}`:(0,B._)`{type: ${t}}`};function ih(e){let t=HO(e);(0,ZO.reportError)(t,KO)}ot.reportTypeError=ih;function HO(e){let{gen:t,data:r,schema:o}=e,n=(0,E$.schemaRefOrVal)(e,o,"type");return{gen:t,keyword:"type",data:r,schema:o.type,schemaCode:n,schemaValue:n,parentSchema:o,params:{},it:e}}});var N$=$(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});El.assignDefaults=void 0;var Mo=oe(),JO=he();function BO(e,t){let{properties:r,items:o}=e.schema;if(t==="object"&&r)for(let n in r)j$(e,n,r[n].default);else t==="array"&&Array.isArray(o)&&o.forEach((n,i)=>j$(e,i,n.default))}El.assignDefaults=BO;function j$(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,JO.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=$(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 Ne=oe(),sh=he(),Yr=zr(),YO=he();function XO(e,t){let{gen:r,data:o,it:n}=e;r.if(ch(r,o,t,n.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Ne._)`${t}`},!0),e.error()})}xe.checkReportMissingProp=XO;function QO({gen:e,data:t,it:{opts:r}},o,n){return(0,Ne.or)(...o.map(i=>(0,Ne.and)(ch(e,t,i,r.ownProperties),(0,Ne._)`${n} = ${i}`)))}xe.checkMissingProp=QO;function ej(e,t){e.setParams({missingProperty:t},!0),e.error()}xe.reportMissingProp=ej;function R$(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Ne._)`Object.prototype.hasOwnProperty`})}xe.hasPropFunc=R$;function ah(e,t,r){return(0,Ne._)`${R$(e)}.call(${t}, ${r})`}xe.isOwnProperty=ah;function tj(e,t,r,o){let n=(0,Ne._)`${t}${(0,Ne.getProperty)(r)} !== undefined`;return o?(0,Ne._)`${n} && ${ah(e,t,r)}`:n}xe.propertyInData=tj;function ch(e,t,r,o){let n=(0,Ne._)`${t}${(0,Ne.getProperty)(r)} === undefined`;return o?(0,Ne.or)(n,(0,Ne.not)(ah(e,t,r))):n}xe.noPropertyInData=ch;function C$(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}xe.allSchemaProperties=C$;function rj(e,t){return C$(t).filter(r=>!(0,sh.alwaysValidSchema)(e,t[r]))}xe.schemaProperties=rj;function nj({schemaCode:e,data:t,it:{gen:r,topSchemaRef:o,schemaPath:n,errorPath:i},it:s},a,c,u){let l=u?(0,Ne._)`${e}, ${t}, ${o}${n}`:t,d=[[Yr.default.instancePath,(0,Ne.strConcat)(Yr.default.instancePath,i)],[Yr.default.parentData,s.parentData],[Yr.default.parentDataProperty,s.parentDataProperty],[Yr.default.rootData,Yr.default.rootData]];s.opts.dynamicRef&&d.push([Yr.default.dynamicAnchors,Yr.default.dynamicAnchors]);let h=(0,Ne._)`${l}, ${r.object(...d)}`;return c!==Ne.nil?(0,Ne._)`${a}.call(${c}, ${h})`:(0,Ne._)`${a}(${h})`}xe.callValidateCode=nj;var oj=(0,Ne._)`new RegExp`;function ij({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,Ne._)`${n.code==="new RegExp"?oj:(0,YO.useFunc)(e,n)}(${r}, ${o})`})}xe.usePattern=ij;function sj(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,Ne._)`${r}.length`);t.forRange("i",0,c,u=>{e.subschema({keyword:o,dataProp:u,dataPropType:sh.Type.Num},i),t.if((0,Ne.not)(i),a)})}}xe.validateArray=sj;function aj(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,Ne._)`${s} || ${a}`),e.mergeValidEvaluated(l,a)||t.if((0,Ne.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}xe.validateUnion=aj});var q$=$(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.validateKeywordUsage=cr.validSchemaType=cr.funcKeywordCode=cr.macroKeywordCode=void 0;var ft=oe(),jn=zr(),cj=Dt(),uj=Ws();function lj(e,t){let{gen:r,keyword:o,schema:n,parentSchema:i,it:s}=e,a=t.macro.call(s.self,n,i,s),c=D$(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=lj;function dj(e,t){var r;let{gen:o,keyword:n,schema:i,parentSchema:s,$data:a,it:c}=e;fj(c,t);let u=!a&&t.compile?t.compile.call(c.self,i,s,c):t.validate,l=D$(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&&A$(e),v(()=>e.error());else{let y=t.async?m():p();t.modifying&&A$(e),v(()=>pj(e,y))}}function m(){let y=o.let("ruleErrs",null);return o.try(()=>f((0,ft._)`await `),w=>o.assign(d,!1).if((0,ft._)`${w} instanceof ${c.ValidationError}`,()=>o.assign(y,(0,ft._)`${w}.errors`),()=>o.throw(w))),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 w=c.opts.passContext?jn.default.this:jn.default.self,k=!("compile"in t&&!a||t.schema===!1);o.assign(d,(0,ft._)`${y}${(0,cj.callValidateCode)(e,l,w,k)}`,t.modifying)}function v(y){var w;o.if((0,ft.not)((w=t.valid)!==null&&w!==void 0?w:d),y)}}cr.funcKeywordCode=dj;function A$(e){let{gen:t,data:r,it:o}=e;t.if(o.parentData,()=>t.assign(r,(0,ft._)`${o.parentData}[${o.parentDataProperty}]`))}function pj(e,t){let{gen:r}=e;r.if((0,ft._)`Array.isArray(${t})`,()=>{r.assign(jn.default.vErrors,(0,ft._)`${jn.default.vErrors} === null ? ${t} : ${jn.default.vErrors}.concat(${t})`).assign(jn.default.errors,(0,ft._)`${jn.default.vErrors}.length`),(0,uj.extendErrors)(e)},()=>e.error())}function fj({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function D$(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 mj(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=mj;function hj({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=hj});var U$=$(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.extendSubschemaMode=Xr.extendSubschemaData=Xr.getSubschema=void 0;var ur=oe(),M$=he();function gj(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,M$.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')}Xr.getSubschema=gj;function vj(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,M$.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]}}Xr.extendSubschemaData=vj;function _j(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}Xr.extendSubschemaMode=_j});var Hs=$((xW,Z$)=>{"use strict";Z$.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 L$=$((SW,V$)=>{"use strict";var Qr=V$.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(){};Il(t,o,n,e,"",e)};Qr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Qr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Qr.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Qr.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 Il(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 Qr.arrayKeywords)for(var h=0;h<d.length;h++)Il(e,t,r,d[h],n+"/"+l+"/"+h,i,n,l,o,h)}else if(l in Qr.propsKeywords){if(d&&typeof d=="object")for(var m in d)Il(e,t,r,d[m],n+"/"+l+"/"+yj(m),i,n,l,o,m)}else(l in Qr.keywords||e.allKeys&&!(l in Qr.skipKeywords))&&Il(e,t,r,d,n+"/"+l,i,n,l,o)}r(o,n,i,s,a,c,u)}}function yj(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var Js=$(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.getSchemaRefs=bt.resolveUrl=bt.normalizeId=bt._getFullPath=bt.getFullPath=bt.inlineRef=void 0;var bj=he(),$j=Hs(),wj=L$(),kj=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function xj(e,t=!0){return typeof e=="boolean"?!0:t===!0?!uh(e):t?F$(e)<=t:!1}bt.inlineRef=xj;var Sj=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function uh(e){for(let t in e){if(Sj.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 F$(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!kj.has(r)&&(typeof e[r]=="object"&&(0,bj.eachItem)(e[r],o=>t+=F$(o)),t===1/0))return 1/0}return t}function G$(e,t="",r){r!==!1&&(t=Uo(t));let o=e.parse(t);return W$(e,o)}bt.getFullPath=G$;function W$(e,t){return e.serialize(t).split("#")[0]+"#"}bt._getFullPath=W$;var Tj=/#\/?$/;function Uo(e){return e?e.replace(Tj,""):""}bt.normalizeId=Uo;function Pj(e,t,r){return r=Uo(r),e.resolve(t,r)}bt.resolveUrl=Pj;var zj=/^[a-z_][-a-z0-9._]*$/i;function Ej(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:o}=this.opts,n=Uo(e[r]||t),i={"":n},s=G$(o,n,!1),a={},c=new Set;return wj(e,{allKeys:!0},(d,h,m,p)=>{if(p===void 0)return;let f=s+h,v=i[p];typeof d[r]=="string"&&(v=y.call(this,d[r])),w.call(this,d.$anchor),w.call(this,d.$dynamicAnchor),i[h]=v;function y(k){let E=this.opts.uriResolver.resolve;if(k=Uo(v?E(v,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 w(k){if(typeof k=="string"){if(!zj.test(k))throw new Error(`invalid anchor "${k}"`);y.call(this,`#${k}`)}}}),a;function u(d,h,m){if(h!==void 0&&!$j(d,h))throw l(m)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}bt.getSchemaRefs=Ej});var Xs=$(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.getData=en.KeywordCxt=en.validateFunctionCode=void 0;var Y$=T$(),K$=Ks(),dh=rh(),Ol=Ks(),Ij=N$(),Ys=q$(),lh=U$(),Z=oe(),K=zr(),Oj=Js(),Er=he(),Bs=Ws();function jj(e){if(ew(e)&&(tw(e),Q$(e))){Cj(e);return}X$(e,()=>(0,Y$.topBoolOrEmptySchema)(e))}en.validateFunctionCode=jj;function X$({gen:e,validateName:t,schema:r,schemaEnv:o,opts:n},i){n.code.es5?e.func(t,(0,Z._)`${K.default.data}, ${K.default.valCxt}`,o.$async,()=>{e.code((0,Z._)`"use strict"; ${H$(r,n)}`),Rj(e,n),e.code(i)}):e.func(t,(0,Z._)`${K.default.data}, ${Nj(n)}`,o.$async,()=>e.code(H$(r,n)).code(i))}function Nj(e){return(0,Z._)`{${K.default.instancePath}="", ${K.default.parentData}, ${K.default.parentDataProperty}, ${K.default.rootData}=${K.default.data}${e.dynamicRef?(0,Z._)`, ${K.default.dynamicAnchors}={}`:Z.nil}}={}`}function Rj(e,t){e.if(K.default.valCxt,()=>{e.var(K.default.instancePath,(0,Z._)`${K.default.valCxt}.${K.default.instancePath}`),e.var(K.default.parentData,(0,Z._)`${K.default.valCxt}.${K.default.parentData}`),e.var(K.default.parentDataProperty,(0,Z._)`${K.default.valCxt}.${K.default.parentDataProperty}`),e.var(K.default.rootData,(0,Z._)`${K.default.valCxt}.${K.default.rootData}`),t.dynamicRef&&e.var(K.default.dynamicAnchors,(0,Z._)`${K.default.valCxt}.${K.default.dynamicAnchors}`)},()=>{e.var(K.default.instancePath,(0,Z._)`""`),e.var(K.default.parentData,(0,Z._)`undefined`),e.var(K.default.parentDataProperty,(0,Z._)`undefined`),e.var(K.default.rootData,K.default.data),t.dynamicRef&&e.var(K.default.dynamicAnchors,(0,Z._)`{}`)})}function Cj(e){let{schema:t,opts:r,gen:o}=e;X$(e,()=>{r.$comment&&t.$comment&&nw(e),Uj(e),o.let(K.default.vErrors,null),o.let(K.default.errors,0),r.unevaluated&&Aj(e),rw(e),Lj(e)})}function Aj(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 H$(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 Dj(e,t){if(ew(e)&&(tw(e),Q$(e))){qj(e,t);return}(0,Y$.boolOrEmptySchema)(e,t)}function Q$({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 ew(e){return typeof e.schema!="boolean"}function qj(e,t){let{schema:r,gen:o,opts:n}=e;n.$comment&&r.$comment&&nw(e),Zj(e),Vj(e);let i=o.const("_errs",K.default.errors);rw(e,i),o.var(t,(0,Z._)`${i} === ${K.default.errors}`)}function tw(e){(0,Er.checkUnknownRules)(e),Mj(e)}function rw(e,t){if(e.opts.jtd)return J$(e,[],!1,t);let r=(0,K$.getSchemaTypes)(e.schema),o=(0,K$.coerceAndCheckDataType)(e,r);J$(e,r,!o,t)}function Mj(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 Uj(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 Zj(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,Oj.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function Vj(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function nw({gen:e,schemaEnv:t,schema:r,errSchemaPath:o,opts:n}){let i=r.$comment;if(n.$comment===!0)e.code((0,Z._)`${K.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._)`${K.default.self}.opts.$comment(${i}, ${s}, ${a}.schema)`)}}function Lj(e){let{gen:t,schemaEnv:r,validateName:o,ValidationError:n,opts:i}=e;r.$async?t.if((0,Z._)`${K.default.errors} === 0`,()=>t.return(K.default.data),()=>t.throw((0,Z._)`new ${n}(${K.default.vErrors})`)):(t.assign((0,Z._)`${o}.errors`,K.default.vErrors),i.unevaluated&&Fj(e),t.return((0,Z._)`${K.default.errors} === 0`))}function Fj({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 J$(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(()=>iw(e,"$ref",l.all.$ref.definition));return}c.jtd||Gj(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,Ol.checkDataType)(h.type,s,c.strictNumbers)),B$(e,h),t.length===1&&t[0]===h.type&&r&&(n.else(),(0,Ol.reportTypeError)(e)),n.endIf()):B$(e,h),a||n.if((0,Z._)`${K.default.errors} === ${o||0}`))}}function B$(e,t){let{gen:r,schema:o,opts:{useDefaults:n}}=e;n&&(0,Ij.assignDefaults)(e,t.type),r.block(()=>{for(let i of t.rules)(0,dh.shouldUseRule)(o,i)&&iw(e,i.keyword,i.definition,t.type)})}function Gj(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(Wj(e,t),e.opts.allowUnionTypes||Kj(e,t),Hj(e,e.dataTypes))}function Wj(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{ow(e.dataTypes,r)||ph(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),Bj(e,t)}}function Kj(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&ph(e,"use allowUnionTypes to allow union type keyword")}function Hj(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=>Jj(t,s))&&ph(e,`missing type "${i.join(",")}" for keyword "${o}"`)}}}function Jj(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function ow(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function Bj(e,t){let r=[];for(let o of e.dataTypes)ow(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,Er.checkStrictMode)(e,t,e.opts.strictTypes)}var jl=class{constructor(t,r,o){if((0,Ys.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",sw(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Ys.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,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?Bs.reportExtraError:Bs.reportError)(this,this.def.error,r)}$dataError(){(0,Bs.reportError)(this,this.def.$dataError||Bs.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Bs.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,Ol.checkDataTypes)(c,r,i.opts.strictNumbers,Ol.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,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 Dj(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,Z.Name)),!0}};en.KeywordCxt=jl;function iw(e,t,r,o){let n=new jl(e,r,t);"code"in r?r.code(n,o):n.$data&&r.validate?(0,Ys.funcKeywordCode)(n,r):"macro"in r?(0,Ys.macroKeywordCode)(n,r):(r.compile||r.validate)&&(0,Ys.funcKeywordCode)(n,r)}var Yj=/^\/(?:[^~]|~0|~1)*$/,Xj=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function sw(e,{dataLevel:t,dataNames:r,dataPathArr:o}){let n,i;if(e==="")return K.default.rootData;if(e[0]==="/"){if(!Yj.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);n=e,i=K.default.rootData}else{let u=Xj.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,Er.unescapeJsonPointer)(u))}`,s=(0,Z._)`${s} && ${i}`);return s;function c(u,l){return`Cannot access ${u} ${l} levels up, current level is ${t}`}}en.getData=sw});var Nl=$(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 Qs=$(vh=>{"use strict";Object.defineProperty(vh,"__esModule",{value:!0});var hh=Js(),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))}};vh.default=gh});var Cl=$(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.resolveSchema=qt.getCompilingSchema=qt.resolveRef=qt.compileSchema=qt.SchemaEnv=void 0;var Yt=oe(),Qj=Nl(),Nn=zr(),Xt=Js(),aw=he(),eN=Xs(),Zo=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,Xt.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=Zo;function yh(e){let t=cw.call(this,e);if(t)return t;let r=(0,Xt.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:o,lines:n}=this.opts.code,{ownProperties:i}=this.opts,s=new Yt.CodeGen(this.scope,{es5:o,lines:n,ownProperties:i}),a;e.$async&&(a=s.scopeValue("Error",{ref:Qj.default,code:(0,Yt._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");e.validateName=c;let u={gen:s,allErrors:this.opts.allErrors,data:Nn.default.data,parentData:Nn.default.parentData,parentDataProperty:Nn.default.parentDataProperty,dataNames:[Nn.default.data],dataPathArr:[Yt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Yt.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:Yt.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Yt._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(e),(0,eN.validateFunctionCode)(u),s.optimize(this.opts.code.optimize);let d=s.toString();l=`${s.scopeRefs(Nn.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,e));let m=new Function(`${Nn.default.self}`,`${Nn.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 Yt.Name?void 0:p,items:f instanceof Yt.Name?void 0:f,dynamicProps:p instanceof Yt.Name,dynamicItems:f instanceof Yt.Name},m.source&&(m.source.evaluated=(0,Yt.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 tN(e,t,r){var o;r=(0,Xt.resolveUrl)(this.opts.uriResolver,t,r);let n=e.refs[r];if(n)return n;let i=oN.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 Zo({schema:s,schemaId:a,root:e,baseId:t}))}if(i!==void 0)return e.refs[r]=rN.call(this,i)}qt.resolveRef=tN;function rN(e){return(0,Xt.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:yh.call(this,e)}function cw(e){for(let t of this._compilations)if(nN(t,e))return t}qt.getCompilingSchema=cw;function nN(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function oN(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||Rl.call(this,e,t)}function Rl(e,t){let r=this.opts.uriResolver.parse(t),o=(0,Xt._getFullPath)(this.opts.uriResolver,r),n=(0,Xt.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&o===n)return _h.call(this,r,e);let i=(0,Xt.normalizeId)(o),s=this.refs[i]||this.schemas[i];if(typeof s=="string"){let a=Rl.call(this,e,s);return typeof a?.schema!="object"?void 0:_h.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||yh.call(this,s),i===(0,Xt.normalizeId)(t)){let{schema:a}=s,{schemaId:c}=this.opts,u=a[c];return u&&(n=(0,Xt.resolveUrl)(this.opts.uriResolver,n,u)),new Zo({schema:a,schemaId:c,root:e,baseId:n})}return _h.call(this,r,s)}}qt.resolveSchema=Rl;var iN=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function _h(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,aw.unescapeFragment)(a)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!iN.has(a)&&u&&(t=(0,Xt.resolveUrl)(this.opts.uriResolver,t,u))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,aw.schemaHasRulesButRef)(r,this.RULES)){let a=(0,Xt.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=Rl.call(this,o,a)}let{schemaId:s}=this.opts;if(i=i||new Zo({schema:r,schemaId:s,root:o,baseId:t}),i.schema!==i.root.schema)return i}});var uw=$((OW,sN)=>{sN.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=$((jW,fw)=>{"use strict";var aN=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),dw=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 cN=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function lw(e){return e.length=0,!0}function uN(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 lN(e){let t=0,r={error:!1,address:"",zone:""},o=[],n=[],i=!1,s=!1,a=uN;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=lw}else{n.push(u);continue}}return n.length&&(a===lw?r.zone=n.join(""):s?o.push(n.join("")):o.push(bh(n))),r.address=o.join(""),r}function pw(e){if(dN(e,":")<2)return{host:e,isIPV6:!1};let t=lN(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 dN(e,t){let r=0;for(let o=0;o<e.length;o++)e[o]===t&&r++;return r}function pN(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 fN(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 mN(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let r=unescape(e.host);if(!dw(r)){let o=pw(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}fw.exports={nonSimpleDomain:cN,recomposeAuthority:mN,normalizeComponentEncoding:fN,removeDotSegments:pN,isIPv4:dw,isUUID:aN,normalizeIPv6:pw,stringArrayToHexStripped:bh}});var _w=$((NW,vw)=>{"use strict";var{isUUID:hN}=$h(),gN=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,vN=["http","https","ws","wss","urn","urn:uuid"];function _N(e){return vN.indexOf(e)!==-1}function wh(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 mw(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function hw(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 yN(e){return e.secure=wh(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function bN(e){if((e.port===(wh(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 $N(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(gN);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 wN(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 kN(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!hN(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function xN(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var gw={scheme:"http",domainHost:!0,parse:mw,serialize:hw},SN={scheme:"https",domainHost:gw.domainHost,parse:mw,serialize:hw},Al={scheme:"ws",domainHost:!0,parse:yN,serialize:bN},TN={scheme:"wss",domainHost:Al.domainHost,parse:Al.parse,serialize:Al.serialize},PN={scheme:"urn",parse:$N,serialize:wN,skipNormalize:!0},zN={scheme:"urn:uuid",parse:kN,serialize:xN,skipNormalize:!0},Dl={http:gw,https:SN,ws:Al,wss:TN,urn:PN,"urn:uuid":zN};Object.setPrototypeOf(Dl,null);function kh(e){return e&&(Dl[e]||Dl[e.toLowerCase()])||void 0}vw.exports={wsIsSecure:wh,SCHEMES:Dl,isValidSchemeName:_N,getSchemeHandler:kh}});var Sh=$((RW,Ml)=>{"use strict";var{normalizeIPv6:EN,removeDotSegments:ea,recomposeAuthority:IN,normalizeComponentEncoding:ql,isIPv4:ON,nonSimpleDomain:jN}=$h(),{SCHEMES:NN,getSchemeHandler:yw}=_w();function RN(e,t){return typeof e=="string"?e=lr(Ir(e,t),t):typeof e=="object"&&(e=Ir(lr(e,t),t)),e}function CN(e,t,r){let o=r?Object.assign({scheme:"null"},r):{scheme:"null"},n=bw(Ir(e,o),Ir(t,o),o,!0);return o.skipEscape=!0,lr(n,o)}function bw(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=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 AN(e,t,r){return typeof e=="string"?(e=unescape(e),e=lr(ql(Ir(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(Ir(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=yw(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=IN(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 DN=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\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(DN);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(ON(o.host)===!1){let c=EN(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=yw(r.scheme||o.scheme);if(!r.unicodeSupport&&(!s||!s.unicodeSupport)&&o.host&&(r.domainHost||s&&s.domainHost)&&n===!1&&jN(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:NN,normalize:RN,resolve:CN,resolveComponent:bw,equal:AN,serialize:lr,parse:Ir};Ml.exports=xh;Ml.exports.default=xh;Ml.exports.fastUri=xh});var ww=$(Th=>{"use strict";Object.defineProperty(Th,"__esModule",{value:!0});var $w=Sh();$w.code='require("ajv/dist/runtime/uri").default';Th.default=$w});var Iw=$(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 qN=Xs();Object.defineProperty(Je,"KeywordCxt",{enumerable:!0,get:function(){return qN.KeywordCxt}});var Vo=oe();Object.defineProperty(Je,"_",{enumerable:!0,get:function(){return Vo._}});Object.defineProperty(Je,"str",{enumerable:!0,get:function(){return Vo.str}});Object.defineProperty(Je,"stringify",{enumerable:!0,get:function(){return Vo.stringify}});Object.defineProperty(Je,"nil",{enumerable:!0,get:function(){return Vo.nil}});Object.defineProperty(Je,"Name",{enumerable:!0,get:function(){return Vo.Name}});Object.defineProperty(Je,"CodeGen",{enumerable:!0,get:function(){return Vo.CodeGen}});var MN=Nl(),Pw=Qs(),UN=th(),ta=Cl(),ZN=oe(),ra=Js(),Ul=Ks(),zh=he(),kw=uw(),VN=ww(),zw=(e,t)=>new RegExp(e,t);zw.code="new RegExp";var LN=["removeAdditional","useDefaults","coerceTypes"],FN=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),GN={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."},WN={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},xw=200;function KN(e){var t,r,o,n,i,s,a,c,u,l,d,h,m,p,f,v,y,w,k,E,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:zw,Vd=(n=e.uriResolver)!==null&&n!==void 0?n:VN.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:xw,loopEnum:(v=e.loopEnum)!==null&&v!==void 0?v:xw,meta:(y=e.meta)!==null&&y!==void 0?y:!0,messages:(w=e.messages)!==null&&w!==void 0?w:!0,inlineRefs:(k=e.inlineRefs)!==null&&k!==void 0?k:!0,schemaId:(E=e.schemaId)!==null&&E!==void 0?E:"$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 na=class{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...KN(t)};let{es5:r,lines:o}=this.opts.code;this.scope=new ZN.ValueScope({scope:{},prefixes:FN,es5:r,lines:o}),this.logger=QN(t.logger);let n=t.validateFormats;t.validateFormats=!1,this.RULES=(0,UN.getRules)(),Sw.call(this,GN,t,"NOT SUPPORTED"),Sw.call(this,WN,t,"DEPRECATED","warn"),this._metaOpts=YN.call(this),t.formats&&JN.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&BN.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),HN.call(this),t.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:o}=this.opts,n=kw;o==="id"&&(n={...kw},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 Pw.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=Tw.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=Tw.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(tR.call(this,o,r),!r)return(0,zh.eachItem)(o,i=>Ph.call(this,i)),this;nR.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]=Ew(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=MN.default;na.MissingRefError=Pw.default;Je.default=na;function Sw(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 Tw(e){return e=(0,ra.normalizeId)(e),this.schemas[e]||this.refs[e]}function HN(){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 JN(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function BN(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 YN(){let e={...this.opts};for(let t of LN)delete e[t];return e}var XN={log(){},warn(){},error(){}};function QN(e){if(e===!1)return XN;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 eR=/^[a-z_$][a-z0-9_$:-]*$/i;function tR(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(!eR.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?rR.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 rR(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 nR(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=Ew(t)),e.validateSchema=this.compile(t,!0))}var oR={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Ew(e){return{anyOf:[e,oR]}}});var Ow=$(Eh=>{"use strict";Object.defineProperty(Eh,"__esModule",{value:!0});var iR={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Eh.default=iR});var Cw=$(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.callRef=Rn.getValidate=void 0;var sR=Qs(),jw=Dt(),$t=oe(),Lo=zr(),Nw=Cl(),Zl=he(),aR={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=Nw.resolveRef.call(c,u,n,r);if(l===void 0)throw new sR.default(o.opts.uriResolver,n,r);if(l instanceof Nw.SchemaEnv)return h(l);return m(l);function d(){if(i===u)return Vl(e,s,i,i.$async);let p=t.scopeValue("root",{ref:u});return Vl(e,(0,$t._)`${p}.validate`,u,u.$async)}function h(p){let f=Rw(e,p);Vl(e,f,p,p.$async)}function m(p){let f=t.scopeValue("schema",a.code.source===!0?{ref:p,code:(0,$t.stringify)(p)}:{ref:p}),v=t.name("valid"),y=e.subschema({schema:p,dataTypes:[],schemaPath:$t.nil,topSchemaRef:f,errSchemaPath:r},v);e.mergeEvaluated(y),e.ok(v)}}};function Rw(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,$t._)`${r.scopeValue("wrapper",{ref:t})}.validate`}Rn.getValidate=Rw;function Vl(e,t,r,o){let{gen:n,it:i}=e,{allErrors:s,schemaEnv:a,opts:c}=i,u=c.passContext?Lo.default.this:$t.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,$t._)`await ${(0,jw.callValidateCode)(e,t,u)}`),m(t),s||n.assign(p,!0)},f=>{n.if((0,$t._)`!(${f} instanceof ${i.ValidationError})`,()=>n.throw(f)),h(f),s||n.assign(p,!1)}),e.ok(p)}function d(){e.result((0,jw.callValidateCode)(e,t,u),()=>m(t),()=>h(t))}function h(p){let f=(0,$t._)`${p}.errors`;n.assign(Lo.default.vErrors,(0,$t._)`${Lo.default.vErrors} === null ? ${f} : ${Lo.default.vErrors}.concat(${f})`),n.assign(Lo.default.errors,(0,$t._)`${Lo.default.vErrors}.length`)}function m(p){var f;if(!i.opts.unevaluated)return;let v=(f=r?.validate)===null||f===void 0?void 0:f.evaluated;if(i.props!==!0)if(v&&!v.dynamicProps)v.props!==void 0&&(i.props=Zl.mergeEvaluated.props(n,v.props,i.props));else{let y=n.var("props",(0,$t._)`${p}.evaluated.props`);i.props=Zl.mergeEvaluated.props(n,y,i.props,$t.Name)}if(i.items!==!0)if(v&&!v.dynamicItems)v.items!==void 0&&(i.items=Zl.mergeEvaluated.items(n,v.items,i.items));else{let y=n.var("items",(0,$t._)`${p}.evaluated.items`);i.items=Zl.mergeEvaluated.items(n,y,i.items,$t.Name)}}}Rn.callRef=Vl;Rn.default=aR});var Aw=$(Ih=>{"use strict";Object.defineProperty(Ih,"__esModule",{value:!0});var cR=Ow(),uR=Cw(),lR=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",cR.default,uR.default];Ih.default=lR});var Dw=$(Oh=>{"use strict";Object.defineProperty(Oh,"__esModule",{value:!0});var Ll=oe(),tn=Ll.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}},dR={message:({keyword:e,schemaCode:t})=>(0,Ll.str)`must be ${Fl[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Ll._)`{comparison: ${Fl[e].okStr}, limit: ${t}}`},pR={keyword:Object.keys(Fl),type:"number",schemaType:"number",$data:!0,error:dR,code(e){let{keyword:t,data:r,schemaCode:o}=e;e.fail$data((0,Ll._)`${r} ${Fl[t].fail} ${o} || isNaN(${r})`)}};Oh.default=pR});var qw=$(jh=>{"use strict";Object.defineProperty(jh,"__esModule",{value:!0});var oa=oe(),fR={message:({schemaCode:e})=>(0,oa.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,oa._)`{multipleOf: ${e}}`},mR={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:fR,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}))`)}};jh.default=mR});var Uw=$(Nh=>{"use strict";Object.defineProperty(Nh,"__esModule",{value:!0});function Mw(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}Nh.default=Mw;Mw.code='require("ajv/dist/runtime/ucs2length").default'});var Zw=$(Rh=>{"use strict";Object.defineProperty(Rh,"__esModule",{value:!0});var Cn=oe(),hR=he(),gR=Uw(),vR={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Cn.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Cn._)`{limit: ${e}}`},_R={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:vR,code(e){let{keyword:t,data:r,schemaCode:o,it:n}=e,i=t==="maxLength"?Cn.operators.GT:Cn.operators.LT,s=n.opts.unicode===!1?(0,Cn._)`${r}.length`:(0,Cn._)`${(0,hR.useFunc)(e.gen,gR.default)}(${r})`;e.fail$data((0,Cn._)`${s} ${i} ${o}`)}};Rh.default=_R});var Vw=$(Ch=>{"use strict";Object.defineProperty(Ch,"__esModule",{value:!0});var yR=Dt(),Gl=oe(),bR={message:({schemaCode:e})=>(0,Gl.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Gl._)`{pattern: ${e}}`},$R={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:bR,code(e){let{data:t,$data:r,schema:o,schemaCode:n,it:i}=e,s=i.opts.unicodeRegExp?"u":"",a=r?(0,Gl._)`(new RegExp(${n}, ${s}))`:(0,yR.usePattern)(e,o);e.fail$data((0,Gl._)`!${a}.test(${t})`)}};Ch.default=$R});var Lw=$(Ah=>{"use strict";Object.defineProperty(Ah,"__esModule",{value:!0});var ia=oe(),wR={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}}`},kR={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:wR,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}`)}};Ah.default=kR});var Fw=$(Dh=>{"use strict";Object.defineProperty(Dh,"__esModule",{value:!0});var sa=Dt(),aa=oe(),xR=he(),SR={message:({params:{missingProperty:e}})=>(0,aa.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,aa._)`{missingProperty: ${e}}`},TR={keyword:"required",type:"object",schemaType:"array",$data:!0,error:SR,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 v=s.schemaEnv.baseId+s.errSchemaPath,y=`required property "${f}" is not defined at "${v}" (strictRequired)`;(0,xR.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)}}};Dh.default=TR});var Gw=$(qh=>{"use strict";Object.defineProperty(qh,"__esModule",{value:!0});var ca=oe(),PR={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}}`},zR={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:PR,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=zR});var Wl=$(Mh=>{"use strict";Object.defineProperty(Mh,"__esModule",{value:!0});var Ww=Hs();Ww.code='require("ajv/dist/runtime/equal").default';Mh.default=Ww});var Kw=$(Zh=>{"use strict";Object.defineProperty(Zh,"__esModule",{value:!0});var Uh=Ks(),Be=oe(),ER=he(),IR=Wl(),OR={message:({params:{i:e,j:t}})=>(0,Be.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Be._)`{i: ${e}, j: ${t}}`},jR={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:OR,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,Be._)`${s} === false`),e.ok(c);function l(){let p=t.let("i",(0,Be._)`${r}.length`),f=t.let("j");e.setParams({i:p,j:f}),t.assign(c,!0),t.if((0,Be._)`${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 v=t.name("item"),y=(0,Uh.checkDataTypes)(u,v,a.opts.strictNumbers,Uh.DataType.Wrong),w=t.const("indices",(0,Be._)`{}`);t.for((0,Be._)`;${p}--;`,()=>{t.let(v,(0,Be._)`${r}[${p}]`),t.if(y,(0,Be._)`continue`),u.length>1&&t.if((0,Be._)`typeof ${v} == "string"`,(0,Be._)`${v} += "_"`),t.if((0,Be._)`typeof ${w}[${v}] == "number"`,()=>{t.assign(f,(0,Be._)`${w}[${v}]`),e.error(),t.assign(c,!1).break()}).code((0,Be._)`${w}[${v}] = ${p}`)})}function m(p,f){let v=(0,ER.useFunc)(t,IR.default),y=t.name("outer");t.label(y).for((0,Be._)`;${p}--;`,()=>t.for((0,Be._)`${f} = ${p}; ${f}--;`,()=>t.if((0,Be._)`${v}(${r}[${p}], ${r}[${f}])`,()=>{e.error(),t.assign(c,!1).break(y)})))}}};Zh.default=jR});var Hw=$(Lh=>{"use strict";Object.defineProperty(Lh,"__esModule",{value:!0});var Vh=oe(),NR=he(),RR=Wl(),CR={message:"must be equal to constant",params:({schemaCode:e})=>(0,Vh._)`{allowedValue: ${e}}`},AR={keyword:"const",$data:!0,error:CR,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,NR.useFunc)(t,RR.default)}(${r}, ${n})`):e.fail((0,Vh._)`${i} !== ${r}`)}};Lh.default=AR});var Jw=$(Fh=>{"use strict";Object.defineProperty(Fh,"__esModule",{value:!0});var ua=oe(),DR=he(),qR=Wl(),MR={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,ua._)`{allowedValues: ${e}}`},UR={keyword:"enum",schemaType:"array",$data:!0,error:MR,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,DR.useFunc)(t,qR.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=UR});var Bw=$(Gh=>{"use strict";Object.defineProperty(Gh,"__esModule",{value:!0});var ZR=Dw(),VR=qw(),LR=Zw(),FR=Vw(),GR=Lw(),WR=Fw(),KR=Gw(),HR=Kw(),JR=Hw(),BR=Jw(),YR=[ZR.default,VR.default,LR.default,FR.default,GR.default,WR.default,KR.default,HR.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},JR.default,BR.default];Gh.default=YR});var Kh=$(la=>{"use strict";Object.defineProperty(la,"__esModule",{value:!0});la.validateAdditionalItems=void 0;var An=oe(),Wh=he(),XR={message:({params:{len:e}})=>(0,An.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,An._)`{limit: ${e}}`},QR={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:XR,code(e){let{parentSchema:t,it:r}=e,{items:o}=t;if(!Array.isArray(o)){(0,Wh.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Yw(e,o)}};function Yw(e,t){let{gen:r,schema:o,data:n,keyword:i,it:s}=e;s.items=!0;let a=r.const("len",(0,An._)`${n}.length`);if(o===!1)e.setParams({len:t.length}),e.pass((0,An._)`${a} <= ${t.length}`);else if(typeof o=="object"&&!(0,Wh.alwaysValidSchema)(s,o)){let u=r.var("valid",(0,An._)`${a} <= ${t.length}`);r.if((0,An.not)(u),()=>c(u)),e.ok(u)}function c(u){r.forRange("i",t.length,a,l=>{e.subschema({keyword:i,dataProp:l,dataPropType:Wh.Type.Num},u),s.allErrors||r.if((0,An.not)(u),()=>r.break())})}}la.validateAdditionalItems=Yw;la.default=QR});var Hh=$(da=>{"use strict";Object.defineProperty(da,"__esModule",{value:!0});da.validateTuple=void 0;var Xw=oe(),Kl=he(),e1=Dt(),t1={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return Qw(e,"additionalItems",t);r.items=!0,!(0,Kl.alwaysValidSchema)(r,t)&&e.ok((0,e1.validateArray)(e))}};function Qw(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,Xw._)`${i}.length`);r.forEach((d,h)=>{(0,Kl.alwaysValidSchema)(a,d)||(o.if((0,Xw._)`${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 v=`"${s}" is ${p}-tuple, but minItems or maxItems/${t} are not specified or different at path "${m}"`;(0,Kl.checkStrictMode)(a,v,h.strictTuples)}}}da.validateTuple=Qw;da.default=t1});var ek=$(Jh=>{"use strict";Object.defineProperty(Jh,"__esModule",{value:!0});var r1=Hh(),n1={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,r1.validateTuple)(e,"items")};Jh.default=n1});var rk=$(Bh=>{"use strict";Object.defineProperty(Bh,"__esModule",{value:!0});var tk=oe(),o1=he(),i1=Dt(),s1=Kh(),a1={message:({params:{len:e}})=>(0,tk.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,tk._)`{limit: ${e}}`},c1={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:a1,code(e){let{schema:t,parentSchema:r,it:o}=e,{prefixItems:n}=r;o.items=!0,!(0,o1.alwaysValidSchema)(o,t)&&(n?(0,s1.validateAdditionalItems)(e,n):e.ok((0,i1.validateArray)(e)))}};Bh.default=c1});var nk=$(Yh=>{"use strict";Object.defineProperty(Yh,"__esModule",{value:!0});var Mt=oe(),Hl=he(),u1={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}}`},l1={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:u1,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"),v=t.let("count",0);m(f,()=>t.if(f,()=>p(v)))}function m(f,v){t.forRange("i",0,l,y=>{e.subschema({keyword:"contains",dataProp:y,dataPropType:Hl.Type.Num,compositeRule:!0},f),v()})}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=l1});var sk=$(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.validateSchemaDeps=dr.validatePropertyDeps=dr.error=void 0;var Xh=oe(),d1=he(),pa=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},
|
|
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 QI(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 QI(e){let t=1;for(;t<e.length-1;){if(e[t]===jm){let r=YI(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function YI(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 XI(e,t){return t.emptyStr()?e:e.emptyStr()?t:fw`${e}${t}`}me.strConcat=XI;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)=>In(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&&In(t,this.else.names),t}};zn.kind="if";var En=class extends Pr{};En.kind="for";var Gm=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)}},Km=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=Tl(super.names,this.from);return Tl(t,this.to)}},Sl=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)}},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&&In(t,this.catch.names),this.finally&&In(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(En)}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 In(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?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 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 EN(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 EN(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 IN=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,IN.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=>Ew(e,r))}Jr.shouldUseGroup=zw;function Ew(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=Ew});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(),Iw=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
|
|
4
|
+
|| (${s} == "string" && ${n} && ${n} == +${n})`).assign(a,(0,J._)`+${n}`);return;case"integer":o.elseIf((0,J._)`${s} === "boolean" || ${n} === null
|
|
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,Iw.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,Iw.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(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});El.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))}El.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(){};Il(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 Il(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++)Il(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)Il(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))&&Il(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 EO(e,t,r){return r=Uo(r),e.resolve(t,r)}bt.resolveUrl=EO;var IO=/^[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 E=this.opts.uriResolver.resolve;if(k=Uo(_?E(_,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(!IO.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(),Er=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,Er.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,Er.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,Er.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,Er.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,Er.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,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",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=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=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,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=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},ER={scheme:"urn",parse:kR,serialize:xR,skipNormalize:!0},IR={scheme:"urn:uuid",parse:SR,serialize:TR,skipNormalize:!0},Cl={http:_$,https:PR,ws:Dl,wss:zR,urn:ER,"urn:uuid":IR};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(Ir(e,t),t):typeof e=="object"&&(e=Ir(lr(e,t),t)),e}function CR(e,t,r){let o=r?Object.assign({scheme:"null"},r):{scheme:"null"},n=w$(Ir(e,o),Ir(t,o),o,!0);return o.skipEscape=!0,lr(n,o)}function w$(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=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(Ir(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(Ir(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 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(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:Ir};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$(),E$=(e,t)=>new RegExp(e,t);E$.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,E,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:E$,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:(E=e.schemaId)!==null&&E!==void 0?E:"$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]=I$(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=I$(t)),e.validateSchema=this.compile(t,!0))}var sj={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function I$(e){return{anyOf:[e,sj]}}});var O$=w(Eh=>{"use strict";Object.defineProperty(Eh,"__esModule",{value:!0});var aj={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Eh.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(Ih=>{"use strict";Object.defineProperty(Ih,"__esModule",{value:!0});var lj=O$(),dj=D$(),pj=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",lj.default,dj.default];Ih.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(),Ej={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}}`},Ij={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Ej,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=Ij});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},
|
|
7
7
|
missingProperty: ${o},
|
|
8
8
|
depsCount: ${t},
|
|
9
|
-
deps: ${r}}`};var p1={keyword:"dependencies",type:"object",schemaType:"object",error:dr.error,code(e){let[t,r]=f1(e);ok(e,t),ik(e,r)}};function f1({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 ok(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,Xh._)`${c} && (${(0,pa.checkMissingProp)(e,a,i)})`),(0,pa.reportMissingProp)(e,i),r.else())}}dr.validatePropertyDeps=ok;function ik(e,t=e.schema){let{gen:r,data:o,keyword:n,it:i}=e,s=r.name("valid");for(let a in t)(0,d1.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=ik;dr.default=p1});var ck=$(Qh=>{"use strict";Object.defineProperty(Qh,"__esModule",{value:!0});var ak=oe(),m1=he(),h1={message:"property name must be valid",params:({params:e})=>(0,ak._)`{propertyName: ${e.propertyName}}`},g1={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:h1,code(e){let{gen:t,schema:r,data:o,it:n}=e;if((0,m1.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,ak.not)(i),()=>{e.error(!0),n.allErrors||t.break()})}),e.ok(i)}};Qh.default=g1});var tg=$(eg=>{"use strict";Object.defineProperty(eg,"__esModule",{value:!0});var Jl=Dt(),Qt=oe(),v1=zr(),Bl=he(),_1={message:"must NOT have additional properties",params:({params:e})=>(0,Qt._)`{additionalProperty: ${e.additionalProperty}}`},y1={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:_1,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,Bl.alwaysValidSchema)(s,r))return;let u=(0,Jl.allSchemaProperties)(o.properties),l=(0,Jl.allSchemaProperties)(o.patternProperties);d(),e.ok((0,Qt._)`${i} === ${v1.default.errors}`);function d(){t.forIn("key",n,v=>{!u.length&&!l.length?p(v):t.if(h(v),()=>p(v))})}function h(v){let y;if(u.length>8){let w=(0,Bl.schemaRefOrVal)(s,o.properties,"properties");y=(0,Jl.isOwnProperty)(t,w,v)}else u.length?y=(0,Qt.or)(...u.map(w=>(0,Qt._)`${v} === ${w}`)):y=Qt.nil;return l.length&&(y=(0,Qt.or)(y,...l.map(w=>(0,Qt._)`${(0,Jl.usePattern)(e,w)}.test(${v})`))),(0,Qt.not)(y)}function m(v){t.code((0,Qt._)`delete ${n}[${v}]`)}function p(v){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(v);return}if(r===!1){e.setParams({additionalProperty:v}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,Bl.alwaysValidSchema)(s,r)){let y=t.name("valid");c.removeAdditional==="failing"?(f(v,y,!1),t.if((0,Qt.not)(y),()=>{e.reset(),m(v)})):(f(v,y),a||t.if((0,Qt.not)(y),()=>t.break()))}}function f(v,y,w){let k={keyword:"additionalProperties",dataProp:v,dataPropType:Bl.Type.Str};w===!1&&Object.assign(k,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(k,y)}}};eg.default=y1});var dk=$(ng=>{"use strict";Object.defineProperty(ng,"__esModule",{value:!0});var b1=Xs(),uk=Dt(),rg=he(),lk=tg(),$1={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&&lk.default.code(new b1.KeywordCxt(i,lk.default,"additionalProperties"));let s=(0,uk.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,uk.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=$1});var hk=$(og=>{"use strict";Object.defineProperty(og,"__esModule",{value:!0});var pk=Dt(),Yl=oe(),fk=he(),mk=he(),w1={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,pk.allSchemaProperties)(r),c=a.filter(f=>(0,fk.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,mk.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 v in u)new RegExp(f).test(v)&&(0,fk.checkStrictMode)(i,`property ${v} matches pattern ${f} (use allowMatchingProperties)`)}function p(f){t.forIn("key",o,v=>{t.if((0,Yl._)`${(0,pk.usePattern)(e,f)}.test(${v})`,()=>{let y=c.includes(f);y||e.subschema({keyword:"patternProperties",schemaProp:f,dataProp:v,dataPropType:mk.Type.Str},l),i.opts.unevaluated&&d!==!0?t.assign((0,Yl._)`${d}[${v}]`,!0):!y&&!i.allErrors&&t.if((0,Yl.not)(l),()=>t.break())})})}}};og.default=w1});var gk=$(ig=>{"use strict";Object.defineProperty(ig,"__esModule",{value:!0});var k1=he(),x1={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:o}=e;if((0,k1.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=x1});var vk=$(sg=>{"use strict";Object.defineProperty(sg,"__esModule",{value:!0});var S1=Dt(),T1={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:S1.validateUnion,error:{message:"must match a schema in anyOf"}};sg.default=T1});var _k=$(ag=>{"use strict";Object.defineProperty(ag,"__esModule",{value:!0});var Xl=oe(),P1=he(),z1={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Xl._)`{passingSchemas: ${e.passing}}`},E1={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:z1,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,P1.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)})})}}};ag.default=E1});var yk=$(cg=>{"use strict";Object.defineProperty(cg,"__esModule",{value:!0});var I1=he(),O1={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,I1.alwaysValidSchema)(o,i))return;let a=e.subschema({keyword:"allOf",schemaProp:s},n);e.ok(n),e.mergeEvaluated(a)})}};cg.default=O1});var wk=$(ug=>{"use strict";Object.defineProperty(ug,"__esModule",{value:!0});var Ql=oe(),$k=he(),j1={message:({params:e})=>(0,Ql.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Ql._)`{failingKeyword: ${e.ifClause}}`},N1={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:j1,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=bk(o,"then"),i=bk(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,Ql.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,Ql._)`${l}`):e.setParams({ifClause:l})}}}};function bk(e,t){let r=e.schema[t];return r!==void 0&&!(0,$k.alwaysValidSchema)(e,r)}ug.default=N1});var kk=$(lg=>{"use strict";Object.defineProperty(lg,"__esModule",{value:!0});var R1=he(),C1={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,R1.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};lg.default=C1});var xk=$(dg=>{"use strict";Object.defineProperty(dg,"__esModule",{value:!0});var A1=Kh(),D1=ek(),q1=Hh(),M1=rk(),U1=nk(),Z1=sk(),V1=ck(),L1=tg(),F1=dk(),G1=hk(),W1=gk(),K1=vk(),H1=_k(),J1=yk(),B1=wk(),Y1=kk();function X1(e=!1){let t=[W1.default,K1.default,H1.default,J1.default,B1.default,Y1.default,V1.default,L1.default,Z1.default,F1.default,G1.default];return e?t.push(D1.default,M1.default):t.push(A1.default,q1.default),t.push(U1.default),t}dg.default=X1});var Sk=$(pg=>{"use strict";Object.defineProperty(pg,"__esModule",{value:!0});var Ze=oe(),Q1={message:({schemaCode:e})=>(0,Ze.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Ze._)`{format: ${e}}`},eC={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Q1,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}]`),v=r.let("fType"),y=r.let("format");r.if((0,Ze._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>r.assign(v,(0,Ze._)`${f}.type || "string"`).assign(y,(0,Ze._)`${f}.validate`),()=>r.assign(v,(0,Ze._)`"string"`).assign(y,f)),e.fail$data((0,Ze.or)(w(),k()));function w(){return c.strictSchema===!1?Ze.nil:(0,Ze._)`${s} && !${y}`}function k(){let E=l.$async?(0,Ze._)`(${f}.async ? await ${y}(${o}) : ${y}(${o}))`:(0,Ze._)`${y}(${o})`,P=(0,Ze._)`(typeof ${y} == "function" ? ${E} : ${y}.test(${o}))`;return(0,Ze._)`${y} && ${y} !== true && ${v} === ${t} && !${P}`}}function m(){let p=d.formats[i];if(!p){w();return}if(p===!0)return;let[f,v,y]=k(p);f===t&&e.pass(E());function w(){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 E(){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 v=="function"?(0,Ze._)`${y}(${o})`:(0,Ze._)`${y}.test(${o})`}}}};pg.default=eC});var Tk=$(fg=>{"use strict";Object.defineProperty(fg,"__esModule",{value:!0});var tC=Sk(),rC=[tC.default];fg.default=rC});var Pk=$(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=$(mg=>{"use strict";Object.defineProperty(mg,"__esModule",{value:!0});var nC=Aw(),oC=Bw(),iC=xk(),sC=Tk(),zk=Pk(),aC=[nC.default,oC.default,(0,iC.default)(),sC.default,zk.metadataVocabulary,zk.contentVocabulary];mg.default=aC});var Ok=$(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});ed.DiscrError=void 0;var Ik;(function(e){e.Tag="tag",e.Mapping="mapping"})(Ik||(ed.DiscrError=Ik={}))});var Nk=$(gg=>{"use strict";Object.defineProperty(gg,"__esModule",{value:!0});var Go=oe(),hg=Ok(),jk=Cl(),cC=Qs(),uC=he(),lC={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,Go._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},dC={keyword:"discriminator",type:"object",schemaType:"object",error:lC,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: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,Go._)`${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,Go.Name),p}function h(){var m;let p={},f=y(n),v=!0;for(let E=0;E<s.length;E++){let P=s[E];if(P?.$ref&&!(0,uC.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 cC.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}"`);v=v&&(f||y(P)),w(ze,E)}if(!v)throw new Error(`discriminator: "${a}" must be required`);return p;function y({required:E}){return Array.isArray(E)&&E.includes(a)}function w(E,P){if(E.const)k(E.const,P);else if(E.enum)for(let ze of E.enum)k(ze,P);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function k(E,P){if(typeof E!="string"||E in p)throw new Error(`discriminator: "${a}" values must be unique strings`);p[E]=P}}}};gg.default=dC});var Rk=$((wK,pC)=>{pC.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 Ak=$((Re,vg)=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.MissingRefError=Re.ValidationError=Re.CodeGen=Re.Name=Re.nil=Re.stringify=Re.str=Re._=Re.KeywordCxt=Re.Ajv=void 0;var fC=Iw(),mC=Ek(),hC=Nk(),Ck=Rk(),gC=["/properties"],td="http://json-schema.org/draft-07/schema",Wo=class extends fC.default{_addVocabularies(){super._addVocabularies(),mC.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(hC.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(Ck,gC):Ck;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)}};Re.Ajv=Wo;vg.exports=Re=Wo;vg.exports.Ajv=Wo;Object.defineProperty(Re,"__esModule",{value:!0});Re.default=Wo;var vC=Xs();Object.defineProperty(Re,"KeywordCxt",{enumerable:!0,get:function(){return vC.KeywordCxt}});var Ko=oe();Object.defineProperty(Re,"_",{enumerable:!0,get:function(){return Ko._}});Object.defineProperty(Re,"str",{enumerable:!0,get:function(){return Ko.str}});Object.defineProperty(Re,"stringify",{enumerable:!0,get:function(){return Ko.stringify}});Object.defineProperty(Re,"nil",{enumerable:!0,get:function(){return Ko.nil}});Object.defineProperty(Re,"Name",{enumerable:!0,get:function(){return Ko.Name}});Object.defineProperty(Re,"CodeGen",{enumerable:!0,get:function(){return Ko.CodeGen}});var _C=Nl();Object.defineProperty(Re,"ValidationError",{enumerable:!0,get:function(){return _C.default}});var yC=Qs();Object.defineProperty(Re,"MissingRefError",{enumerable:!0,get:function(){return yC.default}})});var Fk=$(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(Uk,$g),time:pr(yg(!0),wg),"date-time":pr(Dk(!0),Vk),"iso-time":pr(yg(),Zk),"iso-date-time":pr(Dk(),Lk),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:SC,"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:jC,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:TC,int32:{type:"number",validate:EC},int64:{type:"number",validate:IC},float:{type:"number",validate:Mk},double:{type:"number",validate:Mk},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,wg),"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,Lk),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 bC(e){return e%4===0&&(e%100!==0||e%400===0)}var $C=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,wC=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Uk(e){let t=$C.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&&bC(r)?29:wC[o])}function $g(e,t){if(e&&t)return e>t?1:e<t?-1:0}var _g=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function yg(e){return function(r){let o=_g.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 wg(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=_g.exec(e),o=_g.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 Dk(e){let t=yg(e);return function(o){let n=o.split(bg);return n.length===2&&Uk(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 Lk(e,t){if(!(e&&t))return;let[r,o]=e.split(bg),[n,i]=t.split(bg),s=$g(r,n);if(s!==void 0)return s||wg(o,i)}var kC=/\/|:/,xC=/^(?:[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 SC(e){return kC.test(e)&&xC.test(e)}var qk=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function TC(e){return qk.lastIndex=0,qk.test(e)}var PC=-(2**31),zC=2**31-1;function EC(e){return Number.isInteger(e)&&e<=zC&&e>=PC}function IC(e){return Number.isInteger(e)}function Mk(){return!0}var OC=/[^\\]\\Z/;function jC(e){if(OC.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var ha=$(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 Dn=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=Dn;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 Dn&&(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 Wk(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 NC(r),new Ut(r)}ge.str=Wk;function xg(e,t){t instanceof Ut?e.push(...t._items):t instanceof Dn?e.push(t):e.push(AC(t))}ge.addCodeArg=xg;function NC(e){let t=1;for(;t<e.length-1;){if(e[t]===kg){let r=RC(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function RC(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 CC(e,t){return t.emptyStr()?e:e.emptyStr()?t:Wk`${e}${t}`}ge.strConcat=CC;function AC(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:ma(Array.isArray(e)?e.join(","):e)}function DC(e){return new Ut(ma(e))}ge.stringify=DC;function ma(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ge.safeStringify=ma;function qC(e){return typeof e=="string"&&ge.IDENTIFIER.test(e)?new Ut(`.${e}`):Gk`[${e}]`}ge.getProperty=qC;function MC(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=MC;function UC(e){return new Ut(e.toString())}ge.regexpCode=UC});var Pg=$(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.ValueScope=kt.ValueScopeName=kt.Scope=kt.varKinds=kt.UsedValueState=void 0;var wt=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 wt.Name("const"),let:new wt.Name("let"),var:new wt.Name("var")};var nd=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof wt.Name?t:this.name(t)}name(t){return new wt.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 wt.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:o}){this.value=t,this.scopePath=(0,wt._)`.${new wt.Name(r)}[${o}]`}};kt.ValueScopeName=od;var ZC=(0,wt._)`\n`,Tg=class extends nd{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?ZC:wt.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,wt._)`${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=wt.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,wt._)`${i}${d} ${u} = ${l};${this.opts._n}`}else if(l=n?.(u))i=(0,wt._)`${i}${l}${this.opts._n}`;else throw new Sg(u);c.set(u,rd.Completed)})}return i}};kt.ValueScope=Tg});var Q=$(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 Or=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},zg=class extends Or{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:{}}},id=class extends Or{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 ad(t,this.rhs)}},Eg=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}},Ig=class extends Or{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},Og=class extends Or{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},jg=class extends Or{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},Ng=class extends Or{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=Jo(this.code,t,r),this}get names(){return this.code instanceof de._CodeOrName?this.code.names:{}}},ga=class extends Or{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)||(VC(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),{})}},jr=class extends ga{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},Rg=class extends ga{},Ho=class extends jr{};Ho.kind="else";var qn=class e extends jr{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(Kk(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 ad(t,this.condition),this.else&&Un(t,this.else.names),t}};qn.kind="if";var Mn=class extends jr{};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)}},Ag=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=Jo(this.iterable,t,r),this}get names(){return Un(super.names,this.iterable.names)}},va=class extends jr{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)}};va.kind="func";var _a=class extends ga{render(t){return"return "+super.render(t)}};_a.kind="return";var Dg=class extends jr{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 jr{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};ya.kind="catch";var ba=class extends jr{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 Rg]}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 Eg(t,ne.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==de.nil&&this._leafNode(new Ng(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 Ag(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 Ig(t))}break(t){return this._leafNode(new Og(t))}return(t){let r=new _a;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(_a)}try(t,r,o){if(!r&&!o)throw new Error('CodeGen: "try" without "catch" and "finally"');let n=new Dg;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 jg(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 va(t,r,o)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(va)}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 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 VC(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function Kk(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,de._)`!${Mg(e)}`}ne.not=Kk;var LC=Hk(ne.operators.AND);function FC(...e){return e.reduce(LC)}ne.and=FC;var GC=Hk(ne.operators.OR);function WC(...e){return e.reduce(GC)}ne.or=WC;function Hk(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 ve=$(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=Q(),KC=ha();function HC(e){let t={};for(let r of e)t[r]=!0;return t}se.toHash=HC;function JC(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(Yk(e,t),!Xk(t,e.self.RULES.all))}se.alwaysValidSchema=JC;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]||tx(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 BC(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=BC;function YC({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=YC;function XC(e){return Qk(decodeURIComponent(e))}se.unescapeFragment=XC;function QC(e){return encodeURIComponent(Zg(e))}se.escapeFragment=QC;function Zg(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}se.escapeJsonPointer=Zg;function Qk(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}se.unescapeJsonPointer=Qk;function eA(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}se.eachItem=eA;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} || {}`),Vg(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:ex}),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 ex(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=ex;function Vg(e,t,r){Object.keys(r).forEach(o=>e.assign((0,Pe._)`${t}${(0,Pe.getProperty)(o)}`,!0))}se.setEvaluated=Vg;var Bk={};function tA(e,t){return e.scopeValue("func",{ref:t,code:Bk[t.code]||(Bk[t.code]=new KC._Code(t.code))})}se.useFunc=tA;var Ug;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Ug||(se.Type=Ug={}));function rA(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():"/"+Zg(e)}se.getErrorPath=rA;function tx(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=tx});var Nr=$(Lg=>{"use strict";Object.defineProperty(Lg,"__esModule",{value:!0});var it=Q(),nA={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")};Lg.default=nA});var $a=$(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=Q(),ud=ve(),mt=Nr();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 oA(e,t=st.keywordError,r,o){let{it:n}=e,{gen:i,compositeRule:s,allErrors:a}=n,c=ox(e,t,r);o??(s||a)?rx(i,c):nx(n,(0,fe._)`[${c}]`)}st.reportError=oA;function iA(e,t=st.keywordError,r){let{it:o}=e,{gen:n,compositeRule:i,allErrors:s}=o,a=ox(e,t,r);rx(n,a),i||s||nx(o,mt.default.vErrors)}st.reportExtraError=iA;function sA(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=sA;function aA({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=aA;function rx(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 nx(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 Zn={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 ox(e,t,r){let{createErrors:o}=e.it;return o===!1?(0,fe._)`{}`:cA(e,t,r)}function cA(e,t,r={}){let{gen:o,it:n}=e,i=[uA(n,r),lA(e,r)];return dA(e,t,i),o.object(...i)}function uA({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 lA({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)}`),[Zn.schemaPath,n]}function dA(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([Zn.keyword,n],[Zn.params,typeof t=="function"?t(e):t||(0,fe._)`{}`]),c.messages&&o.push([Zn.message,typeof r=="function"?r(e):r]),c.verbose&&o.push([Zn.schema,s],[Zn.parentSchema,(0,fe._)`${l}${d}`],[mt.default.data,i]),u&&o.push([Zn.propertyName,u])}});var sx=$(Bo=>{"use strict";Object.defineProperty(Bo,"__esModule",{value:!0});Bo.boolOrEmptySchema=Bo.topBoolOrEmptySchema=void 0;var pA=$a(),fA=Q(),mA=Nr(),hA={message:"boolean schema is false"};function gA(e){let{gen:t,schema:r,validateName:o}=e;r===!1?ix(e,!1):typeof r=="object"&&r.$async===!0?t.return(mA.default.data):(t.assign((0,fA._)`${o}.errors`,null),t.return(!0))}Bo.topBoolOrEmptySchema=gA;function vA(e,t){let{gen:r,schema:o}=e;o===!1?(r.var(t,!1),ix(e)):r.var(t,!0)}Bo.boolOrEmptySchema=vA;function ix(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,pA.reportError)(n,hA,void 0,t)}});var Fg=$(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.getRules=Yo.isJSONType=void 0;var _A=["string","number","integer","boolean","null","object","array"],yA=new Set(_A);function bA(e){return typeof e=="string"&&yA.has(e)}Yo.isJSONType=bA;function $A(){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=$A});var Gg=$(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.shouldUseRule=nn.shouldUseGroup=nn.schemaHasRulesForType=void 0;function wA({schema:e,self:t},r){let o=t.RULES.types[r];return o&&o!==!0&&ax(e,o)}nn.schemaHasRulesForType=wA;function ax(e,t){return t.rules.some(r=>cx(e,r))}nn.shouldUseGroup=ax;function cx(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=cx});var wa=$(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 kA=Fg(),xA=Gg(),SA=$a(),Y=Q(),ux=ve(),Xo;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Xo||(at.DataType=Xo={}));function TA(e){let t=lx(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=TA;function lx(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(kA.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}at.getJSONTypes=lx;function PA(e,t){let{gen:r,data:o,opts:n}=e,i=zA(t,n.coerceTypes),s=t.length>0&&!(i.length===0&&t.length===1&&(0,xA.schemaHasRulesForType)(e,t[0]));if(s){let a=Kg(t,o,n.strictNumbers,Xo.Wrong);r.if(a,()=>{i.length?EA(e,t,i):Hg(e)})}return s}at.coerceAndCheckDataType=PA;var dx=new Set(["string","number","integer","boolean","null"]);function zA(e,t){return t?e.filter(r=>dx.has(r)||t==="array"&&r==="array"):[]}function EA(e,t,r){let{gen:o,data:n,opts:i}=e,s=o.let("dataType",(0,Y._)`typeof ${n}`),a=o.let("coerced",(0,Y._)`undefined`);i.coerceTypes==="array"&&o.if((0,Y._)`${s} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>o.assign(n,(0,Y._)`${n}[0]`).assign(s,(0,Y._)`typeof ${n}`).if(Kg(t,n,i.strictNumbers),()=>o.assign(a,n))),o.if((0,Y._)`${a} !== undefined`);for(let u of r)(dx.has(u)||u==="array"&&i.coerceTypes==="array")&&c(u);o.else(),Hg(e),o.endIf(),o.if((0,Y._)`${a} !== undefined`,()=>{o.assign(n,a),IA(e,a)});function c(u){switch(u){case"string":o.elseIf((0,Y._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,Y._)`"" + ${n}`).elseIf((0,Y._)`${n} === null`).assign(a,(0,Y._)`""`);return;case"number":o.elseIf((0,Y._)`${s} == "boolean" || ${n} === null
|
|
11
|
-
|| (${s} == "string" && ${n} && ${n} == +${n})`).assign(a,(0,
|
|
12
|
-
|| (${s} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(a,(0,
|
|
13
|
-
|| ${s} === "boolean" || ${n} === null`).assign(a,(0,Y._)`[${n}]`)}}}function IA({gen:e,parentData:t,parentDataProperty:r},o){e.if((0,Y._)`${t} !== undefined`,()=>e.assign((0,Y._)`${t}[${r}]`,o))}function Wg(e,t,r,o=Xo.Correct){let n=o===Xo.Correct?Y.operators.EQ:Y.operators.NEQ,i;switch(e){case"null":return(0,Y._)`${t} ${n} null`;case"array":i=(0,Y._)`Array.isArray(${t})`;break;case"object":i=(0,Y._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=s((0,Y._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=s();break;default:return(0,Y._)`typeof ${t} ${n} ${e}`}return o===Xo.Correct?i:(0,Y.not)(i);function s(a=Y.nil){return(0,Y.and)((0,Y._)`typeof ${t} == "number"`,a,r?(0,Y._)`isFinite(${t})`:Y.nil)}}at.checkDataType=Wg;function Kg(e,t,r,o){if(e.length===1)return Wg(e[0],t,r,o);let n,i=(0,ux.toHash)(e);if(i.array&&i.object){let s=(0,Y._)`typeof ${t} != "object"`;n=i.null?s:(0,Y._)`!${t} || ${s}`,delete i.null,delete i.array,delete i.object}else n=Y.nil;i.number&&delete i.integer;for(let s in i)n=(0,Y.and)(n,Wg(s,t,r,o));return n}at.checkDataTypes=Kg;var OA={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,Y._)`{type: ${e}}`:(0,Y._)`{type: ${t}}`};function Hg(e){let t=jA(e);(0,SA.reportError)(t,OA)}at.reportTypeError=Hg;function jA(e){let{gen:t,data:r,schema:o}=e,n=(0,ux.schemaRefOrVal)(e,o,"type");return{gen:t,keyword:"type",data:r,schema:o.type,schemaCode:n,schemaValue:n,parentSchema:o,params:{},it:e}}});var fx=$(ld=>{"use strict";Object.defineProperty(ld,"__esModule",{value:!0});ld.assignDefaults=void 0;var Qo=Q(),NA=ve();function RA(e,t){let{properties:r,items:o}=e.schema;if(t==="object"&&r)for(let n in r)px(e,n,r[n].default);else t==="array"&&Array.isArray(o)&&o.forEach((n,i)=>px(e,i,n.default))}ld.assignDefaults=RA;function px(e,t,r){let{gen:o,compositeRule:n,data:i,opts:s}=e;if(r===void 0)return;let a=(0,Qo._)`${i}${(0,Qo.getProperty)(t)}`;if(n){(0,NA.checkStrictMode)(e,`default is ignored for: ${a}`);return}let c=(0,Qo._)`${a} === undefined`;s.useDefaults==="empty"&&(c=(0,Qo._)`${c} || ${a} === null || ${a} === ""`),o.if(c,(0,Qo._)`${a} = ${(0,Qo.stringify)(r)}`)}});var Zt=$(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 Ce=Q(),Jg=ve(),on=Nr(),CA=ve();function AA(e,t){let{gen:r,data:o,it:n}=e;r.if(Yg(r,o,t,n.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Ce._)`${t}`},!0),e.error()})}Se.checkReportMissingProp=AA;function DA({gen:e,data:t,it:{opts:r}},o,n){return(0,Ce.or)(...o.map(i=>(0,Ce.and)(Yg(e,t,i,r.ownProperties),(0,Ce._)`${n} = ${i}`)))}Se.checkMissingProp=DA;function qA(e,t){e.setParams({missingProperty:t},!0),e.error()}Se.reportMissingProp=qA;function mx(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Ce._)`Object.prototype.hasOwnProperty`})}Se.hasPropFunc=mx;function Bg(e,t,r){return(0,Ce._)`${mx(e)}.call(${t}, ${r})`}Se.isOwnProperty=Bg;function MA(e,t,r,o){let n=(0,Ce._)`${t}${(0,Ce.getProperty)(r)} !== undefined`;return o?(0,Ce._)`${n} && ${Bg(e,t,r)}`:n}Se.propertyInData=MA;function Yg(e,t,r,o){let n=(0,Ce._)`${t}${(0,Ce.getProperty)(r)} === undefined`;return o?(0,Ce.or)(n,(0,Ce.not)(Bg(e,t,r))):n}Se.noPropertyInData=Yg;function hx(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}Se.allSchemaProperties=hx;function UA(e,t){return hx(t).filter(r=>!(0,Jg.alwaysValidSchema)(e,t[r]))}Se.schemaProperties=UA;function ZA({schemaCode:e,data:t,it:{gen:r,topSchemaRef:o,schemaPath:n,errorPath:i},it:s},a,c,u){let l=u?(0,Ce._)`${e}, ${t}, ${o}${n}`:t,d=[[on.default.instancePath,(0,Ce.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,Ce._)`${l}, ${r.object(...d)}`;return c!==Ce.nil?(0,Ce._)`${a}.call(${c}, ${h})`:(0,Ce._)`${a}(${h})`}Se.callValidateCode=ZA;var VA=(0,Ce._)`new RegExp`;function LA({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,Ce._)`${n.code==="new RegExp"?VA:(0,CA.useFunc)(e,n)}(${r}, ${o})`})}Se.usePattern=LA;function FA(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,Ce._)`${r}.length`);t.forRange("i",0,c,u=>{e.subschema({keyword:o,dataProp:u,dataPropType:Jg.Type.Num},i),t.if((0,Ce.not)(i),a)})}}Se.validateArray=FA;function GA(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,Ce._)`${s} || ${a}`),e.mergeValidEvaluated(l,a)||t.if((0,Ce.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}Se.validateUnion=GA});var _x=$(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.validateKeywordUsage=mr.validSchemaType=mr.funcKeywordCode=mr.macroKeywordCode=void 0;var ht=Q(),Vn=Nr(),WA=Zt(),KA=$a();function HA(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=HA;function JA(e,t){var r;let{gen:o,keyword:n,schema:i,parentSchema:s,$data:a,it:c}=e;YA(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&&gx(e),v(()=>e.error());else{let y=t.async?m():p();t.modifying&&gx(e),v(()=>BA(e,y))}}function m(){let y=o.let("ruleErrs",null);return o.try(()=>f((0,ht._)`await `),w=>o.assign(d,!1).if((0,ht._)`${w} instanceof ${c.ValidationError}`,()=>o.assign(y,(0,ht._)`${w}.errors`),()=>o.throw(w))),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 w=c.opts.passContext?Vn.default.this:Vn.default.self,k=!("compile"in t&&!a||t.schema===!1);o.assign(d,(0,ht._)`${y}${(0,WA.callValidateCode)(e,l,w,k)}`,t.modifying)}function v(y){var w;o.if((0,ht.not)((w=t.valid)!==null&&w!==void 0?w:d),y)}}mr.funcKeywordCode=JA;function gx(e){let{gen:t,data:r,it:o}=e;t.if(o.parentData,()=>t.assign(r,(0,ht._)`${o.parentData}[${o.parentDataProperty}]`))}function BA(e,t){let{gen:r}=e;r.if((0,ht._)`Array.isArray(${t})`,()=>{r.assign(Vn.default.vErrors,(0,ht._)`${Vn.default.vErrors} === null ? ${t} : ${Vn.default.vErrors}.concat(${t})`).assign(Vn.default.errors,(0,ht._)`${Vn.default.vErrors}.length`),(0,KA.extendErrors)(e)},()=>e.error())}function YA({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 XA(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=XA;function QA({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=QA});var bx=$(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.extendSubschemaMode=sn.extendSubschemaData=sn.getSubschema=void 0;var hr=Q(),yx=ve();function eD(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,yx.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=eD;function tD(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,yx.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=tD;function rD(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=rD});var wx=$((qK,$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+"/"+nD(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 nD(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var ka=$(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.getSchemaRefs=xt.resolveUrl=xt.normalizeId=xt._getFullPath=xt.getFullPath=xt.inlineRef=void 0;var oD=ve(),iD=Hs(),sD=wx(),aD=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function cD(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Xg(e):t?kx(e)<=t:!1}xt.inlineRef=cD;var uD=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Xg(e){for(let t in e){if(uD.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 kx(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!aD.has(r)&&(typeof e[r]=="object"&&(0,oD.eachItem)(e[r],o=>t+=kx(o)),t===1/0))return 1/0}return t}function xx(e,t="",r){r!==!1&&(t=ei(t));let o=e.parse(t);return Sx(e,o)}xt.getFullPath=xx;function Sx(e,t){return e.serialize(t).split("#")[0]+"#"}xt._getFullPath=Sx;var lD=/#\/?$/;function ei(e){return e?e.replace(lD,""):""}xt.normalizeId=ei;function dD(e,t,r){return r=ei(r),e.resolve(t,r)}xt.resolveUrl=dD;var pD=/^[a-z_][-a-z0-9._]*$/i;function fD(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:o}=this.opts,n=ei(e[r]||t),i={"":n},s=xx(o,n,!1),a={},c=new Set;return sD(e,{allKeys:!0},(d,h,m,p)=>{if(p===void 0)return;let f=s+h,v=i[p];typeof d[r]=="string"&&(v=y.call(this,d[r])),w.call(this,d.$anchor),w.call(this,d.$dynamicAnchor),i[h]=v;function y(k){let E=this.opts.uriResolver.resolve;if(k=ei(v?E(v,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 w(k){if(typeof k=="string"){if(!pD.test(k))throw new Error(`invalid anchor "${k}"`);y.call(this,`#${k}`)}}}),a;function u(d,h,m){if(h!==void 0&&!iD(d,h))throw l(m)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}xt.getSchemaRefs=fD});var Ta=$(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.getData=cn.KeywordCxt=cn.validateFunctionCode=void 0;var Ix=sx(),Tx=wa(),ev=Gg(),pd=wa(),mD=fx(),Sa=_x(),Qg=bx(),V=Q(),H=Nr(),hD=ka(),Rr=ve(),xa=$a();function gD(e){if(Nx(e)&&(Rx(e),jx(e))){yD(e);return}Ox(e,()=>(0,Ix.topBoolOrEmptySchema)(e))}cn.validateFunctionCode=gD;function Ox({gen:e,validateName:t,schema:r,schemaEnv:o,opts:n},i){n.code.es5?e.func(t,(0,V._)`${H.default.data}, ${H.default.valCxt}`,o.$async,()=>{e.code((0,V._)`"use strict"; ${Px(r,n)}`),_D(e,n),e.code(i)}):e.func(t,(0,V._)`${H.default.data}, ${vD(n)}`,o.$async,()=>e.code(Px(r,n)).code(i))}function vD(e){return(0,V._)`{${H.default.instancePath}="", ${H.default.parentData}, ${H.default.parentDataProperty}, ${H.default.rootData}=${H.default.data}${e.dynamicRef?(0,V._)`, ${H.default.dynamicAnchors}={}`:V.nil}}={}`}function _D(e,t){e.if(H.default.valCxt,()=>{e.var(H.default.instancePath,(0,V._)`${H.default.valCxt}.${H.default.instancePath}`),e.var(H.default.parentData,(0,V._)`${H.default.valCxt}.${H.default.parentData}`),e.var(H.default.parentDataProperty,(0,V._)`${H.default.valCxt}.${H.default.parentDataProperty}`),e.var(H.default.rootData,(0,V._)`${H.default.valCxt}.${H.default.rootData}`),t.dynamicRef&&e.var(H.default.dynamicAnchors,(0,V._)`${H.default.valCxt}.${H.default.dynamicAnchors}`)},()=>{e.var(H.default.instancePath,(0,V._)`""`),e.var(H.default.parentData,(0,V._)`undefined`),e.var(H.default.parentDataProperty,(0,V._)`undefined`),e.var(H.default.rootData,H.default.data),t.dynamicRef&&e.var(H.default.dynamicAnchors,(0,V._)`{}`)})}function yD(e){let{schema:t,opts:r,gen:o}=e;Ox(e,()=>{r.$comment&&t.$comment&&Ax(e),xD(e),o.let(H.default.vErrors,null),o.let(H.default.errors,0),r.unevaluated&&bD(e),Cx(e),PD(e)})}function bD(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,V._)`${r}.evaluated`),t.if((0,V._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,V._)`${e.evaluated}.props`,(0,V._)`undefined`)),t.if((0,V._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,V._)`${e.evaluated}.items`,(0,V._)`undefined`))}function Px(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,V._)`/*# sourceURL=${r} */`:V.nil}function $D(e,t){if(Nx(e)&&(Rx(e),jx(e))){wD(e,t);return}(0,Ix.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 Nx(e){return typeof e.schema!="boolean"}function wD(e,t){let{schema:r,gen:o,opts:n}=e;n.$comment&&r.$comment&&Ax(e),SD(e),TD(e);let i=o.const("_errs",H.default.errors);Cx(e,i),o.var(t,(0,V._)`${i} === ${H.default.errors}`)}function Rx(e){(0,Rr.checkUnknownRules)(e),kD(e)}function Cx(e,t){if(e.opts.jtd)return zx(e,[],!1,t);let r=(0,Tx.getSchemaTypes)(e.schema),o=(0,Tx.coerceAndCheckDataType)(e,r);zx(e,r,!o,t)}function kD(e){let{schema:t,errSchemaPath:r,opts:o,self:n}=e;t.$ref&&o.ignoreKeywordsWithRef&&(0,Rr.schemaHasRulesButRef)(t,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function xD(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Rr.checkStrictMode)(e,"default is ignored in the schema root")}function SD(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,hD.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function TD(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function Ax({gen:e,schemaEnv:t,schema:r,errSchemaPath:o,opts:n}){let i=r.$comment;if(n.$comment===!0)e.code((0,V._)`${H.default.self}.logger.log(${i})`);else if(typeof n.$comment=="function"){let s=(0,V.str)`${o}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,V._)`${H.default.self}.opts.$comment(${i}, ${s}, ${a}.schema)`)}}function PD(e){let{gen:t,schemaEnv:r,validateName:o,ValidationError:n,opts:i}=e;r.$async?t.if((0,V._)`${H.default.errors} === 0`,()=>t.return(H.default.data),()=>t.throw((0,V._)`new ${n}(${H.default.vErrors})`)):(t.assign((0,V._)`${o}.errors`,H.default.vErrors),i.unevaluated&&zD(e),t.return((0,V._)`${H.default.errors} === 0`))}function zD({gen:e,evaluated:t,props:r,items:o}){r instanceof V.Name&&e.assign((0,V._)`${t}.props`,r),o instanceof V.Name&&e.assign((0,V._)`${t}.items`,o)}function zx(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,Rr.schemaHasRulesButRef)(i,l))){n.block(()=>qx(e,"$ref",l.all.$ref.definition));return}c.jtd||ED(e,t),n.block(()=>{for(let h of l.rules)d(h);d(l.post)});function d(h){(0,ev.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,V._)`${H.default.errors} === ${o||0}`))}}function Ex(e,t){let{gen:r,schema:o,opts:{useDefaults:n}}=e;n&&(0,mD.assignDefaults)(e,t.type),r.block(()=>{for(let i of t.rules)(0,ev.shouldUseRule)(o,i)&&qx(e,i.keyword,i.definition,t.type)})}function ED(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(ID(e,t),e.opts.allowUnionTypes||OD(e,t),jD(e,e.dataTypes))}function ID(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{Dx(e.dataTypes,r)||tv(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),RD(e,t)}}function OD(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&tv(e,"use allowUnionTypes to allow union type keyword")}function jD(e,t){let r=e.self.RULES.all;for(let o in r){let n=r[o];if(typeof n=="object"&&(0,ev.shouldUseRule)(e.schema,n)){let{type:i}=n.definition;i.length&&!i.some(s=>ND(t,s))&&tv(e,`missing type "${i.join(",")}" for keyword "${o}"`)}}}function ND(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function Dx(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function RD(e,t){let r=[];for(let o of e.dataTypes)Dx(t,o)?r.push(o):t.includes("integer")&&o==="number"&&r.push("integer");e.dataTypes=r}function tv(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,Rr.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,Rr.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",Mx(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,V.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,V.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,V._)`${r} !== undefined && (${(0,V.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=V.nil){this.gen.block(()=>{this.check$data(t,o),r()})}check$data(t=V.nil,r=V.nil){if(!this.$data)return;let{gen:o,schemaCode:n,schemaType:i,def:s}=this;o.if((0,V.or)((0,V._)`${n} === undefined`,r)),t!==V.nil&&o.assign(t,!0),(i.length||s.validateSchema)&&(o.elseIf(this.invalid$data()),this.$dataError(),t!==V.nil&&o.assign(t,!1)),o.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:o,def:n,it:i}=this;return(0,V.or)(s(),a());function s(){if(o.length){if(!(r instanceof V.Name))throw new Error("ajv implementation error");let c=Array.isArray(o)?o:[o];return(0,V._)`${(0,pd.checkDataTypes)(c,r,i.opts.strictNumbers,pd.DataType.Wrong)}`}return V.nil}function a(){if(n.validateSchema){let c=t.scopeValue("validate$data",{ref:n.validateSchema});return(0,V._)`!${c}(${r})`}return V.nil}}subschema(t,r){let o=(0,Qg.getSubschema)(this.it,t);(0,Qg.extendSubschemaData)(o,this.it,t),(0,Qg.extendSubschemaMode)(o,t);let n={...this.it,...o,items:void 0,props:void 0};return $D(n,r),n}mergeEvaluated(t,r){let{it:o,gen:n}=this;o.opts.unevaluated&&(o.props!==!0&&t.props!==void 0&&(o.props=Rr.mergeEvaluated.props(n,t.props,o.props,r)),o.items!==!0&&t.items!==void 0&&(o.items=Rr.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,V.Name)),!0}};cn.KeywordCxt=fd;function qx(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 CD=/^\/(?:[^~]|~0|~1)*$/,AD=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Mx(e,{dataLevel:t,dataNames:r,dataPathArr:o}){let n,i;if(e==="")return H.default.rootData;if(e[0]==="/"){if(!CD.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);n=e,i=H.default.rootData}else{let u=AD.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,V._)`${i}${(0,V.getProperty)((0,Rr.unescapeJsonPointer)(u))}`,s=(0,V._)`${s} && ${i}`);return s;function c(u,l){return`Cannot access ${u} ${l} levels up, current level is ${t}`}}cn.getData=Mx});var md=$(nv=>{"use strict";Object.defineProperty(nv,"__esModule",{value:!0});var rv=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};nv.default=rv});var Pa=$(sv=>{"use strict";Object.defineProperty(sv,"__esModule",{value:!0});var ov=ka(),iv=class extends Error{constructor(t,r,o,n){super(n||`can't resolve reference ${o} from id ${r}`),this.missingRef=(0,ov.resolveUrl)(t,r,o),this.missingSchema=(0,ov.normalizeId)((0,ov.getFullPath)(t,this.missingRef))}};sv.default=iv});var gd=$(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.resolveSchema=Vt.getCompilingSchema=Vt.resolveRef=Vt.compileSchema=Vt.SchemaEnv=void 0;var tr=Q(),DD=md(),Ln=Nr(),rr=ka(),Ux=ve(),qD=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={}}};Vt.SchemaEnv=ti;function cv(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:DD.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:Ln.default.data,parentData:Ln.default.parentData,parentDataProperty:Ln.default.parentDataProperty,dataNames:[Ln.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,qD.validateFunctionCode)(u),s.optimize(this.opts.code.optimize);let d=s.toString();l=`${s.scopeRefs(Ln.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,e));let m=new Function(`${Ln.default.self}`,`${Ln.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)}}Vt.compileSchema=cv;function MD(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=VD.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]=UD.call(this,i)}Vt.resolveRef=MD;function UD(e){return(0,rr.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:cv.call(this,e)}function Zx(e){for(let t of this._compilations)if(ZD(t,e))return t}Vt.getCompilingSchema=Zx;function ZD(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function VD(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 av.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:av.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||cv.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 av.call(this,r,s)}}Vt.resolveSchema=hd;var LD=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function av(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,Ux.unescapeFragment)(a)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!LD.has(a)&&u&&(t=(0,rr.resolveUrl)(this.opts.uriResolver,t,u))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,Ux.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=$((FK,FD)=>{FD.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 Fx=$(uv=>{"use strict";Object.defineProperty(uv,"__esModule",{value:!0});var Lx=Sh();Lx.code='require("ajv/dist/runtime/uri").default';uv.default=Lx});var Xx=$(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 GD=Ta();Object.defineProperty(Ye,"KeywordCxt",{enumerable:!0,get:function(){return GD.KeywordCxt}});var ri=Q();Object.defineProperty(Ye,"_",{enumerable:!0,get:function(){return ri._}});Object.defineProperty(Ye,"str",{enumerable:!0,get:function(){return ri.str}});Object.defineProperty(Ye,"stringify",{enumerable:!0,get:function(){return ri.stringify}});Object.defineProperty(Ye,"nil",{enumerable:!0,get:function(){return ri.nil}});Object.defineProperty(Ye,"Name",{enumerable:!0,get:function(){return ri.Name}});Object.defineProperty(Ye,"CodeGen",{enumerable:!0,get:function(){return ri.CodeGen}});var WD=md(),Jx=Pa(),KD=Fg(),za=gd(),HD=Q(),Ea=ka(),vd=wa(),dv=ve(),Gx=Vx(),JD=Fx(),Bx=(e,t)=>new RegExp(e,t);Bx.code="new RegExp";var BD=["removeAdditional","useDefaults","coerceTypes"],YD=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),XD={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."},QD={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Wx=200;function eq(e){var t,r,o,n,i,s,a,c,u,l,d,h,m,p,f,v,y,w,k,E,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:Bx,Vd=(n=e.uriResolver)!==null&&n!==void 0?n:JD.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:Wx,loopEnum:(v=e.loopEnum)!==null&&v!==void 0?v:Wx,meta:(y=e.meta)!==null&&y!==void 0?y:!0,messages:(w=e.messages)!==null&&w!==void 0?w:!0,inlineRefs:(k=e.inlineRefs)!==null&&k!==void 0?k:!0,schemaId:(E=e.schemaId)!==null&&E!==void 0?E:"$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,...eq(t)};let{es5:r,lines:o}=this.opts.code;this.scope=new HD.ValueScope({scope:{},prefixes:YD,es5:r,lines:o}),this.logger=sq(t.logger);let n=t.validateFormats;t.validateFormats=!1,this.RULES=(0,KD.getRules)(),Kx.call(this,XD,t,"NOT SUPPORTED"),Kx.call(this,QD,t,"DEPRECATED","warn"),this._metaOpts=oq.call(this),t.formats&&rq.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&nq.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),tq.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,Ea.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=Hx.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=Hx.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,Ea.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(cq.call(this,o,r),!r)return(0,dv.eachItem)(o,i=>lv.call(this,i)),this;lq.call(this,r);let n={...r,type:(0,vd.getJSONTypes)(r.type),schemaType:(0,vd.getJSONTypes)(r.schemaType)};return(0,dv.eachItem)(o,n.type.length===0?i=>lv.call(this,i,n):i=>n.type.forEach(s=>lv.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,Ea.normalizeId)(s||o);let u=Ea.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}}};Ia.ValidationError=WD.default;Ia.MissingRefError=Jx.default;Ye.default=Ia;function Kx(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 Hx(e){return e=(0,Ea.normalizeId)(e),this.schemas[e]||this.refs[e]}function tq(){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 rq(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function nq(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 oq(){let e={...this.opts};for(let t of BD)delete e[t];return e}var iq={log(){},warn(){},error(){}};function sq(e){if(e===!1)return iq;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 aq=/^[a-z_$][a-z0-9_$:-]*$/i;function cq(e,t){let{RULES:r}=this;if((0,dv.eachItem)(e,o=>{if(r.keywords[o])throw new Error(`Keyword ${o} is already defined`);if(!aq.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 lv(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?uq.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 uq(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 lq(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=Yx(t)),e.validateSchema=this.compile(t,!0))}var dq={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Yx(e){return{anyOf:[e,dq]}}});var Qx=$(pv=>{"use strict";Object.defineProperty(pv,"__esModule",{value:!0});var pq={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};pv.default=pq});var n0=$(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.callRef=Fn.getValidate=void 0;var fq=Pa(),e0=Zt(),St=Q(),ni=Nr(),t0=gd(),_d=ve(),mq={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=t0.resolveRef.call(c,u,n,r);if(l===void 0)throw new fq.default(o.opts.uriResolver,n,r);if(l instanceof t0.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=r0(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}),v=t.name("valid"),y=e.subschema({schema:p,dataTypes:[],schemaPath:St.nil,topSchemaRef:f,errSchemaPath:r},v);e.mergeEvaluated(y),e.ok(v)}}};function r0(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=r0;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,e0.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,e0.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 v=(f=r?.validate)===null||f===void 0?void 0:f.evaluated;if(i.props!==!0)if(v&&!v.dynamicProps)v.props!==void 0&&(i.props=_d.mergeEvaluated.props(n,v.props,i.props));else{let y=n.var("props",(0,St._)`${p}.evaluated.props`);i.props=_d.mergeEvaluated.props(n,y,i.props,St.Name)}if(i.items!==!0)if(v&&!v.dynamicItems)v.items!==void 0&&(i.items=_d.mergeEvaluated.items(n,v.items,i.items));else{let y=n.var("items",(0,St._)`${p}.evaluated.items`);i.items=_d.mergeEvaluated.items(n,y,i.items,St.Name)}}}Fn.callRef=yd;Fn.default=mq});var o0=$(fv=>{"use strict";Object.defineProperty(fv,"__esModule",{value:!0});var hq=Qx(),gq=n0(),vq=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",hq.default,gq.default];fv.default=vq});var i0=$(mv=>{"use strict";Object.defineProperty(mv,"__esModule",{value:!0});var bd=Q(),un=bd.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}},_q={message:({keyword:e,schemaCode:t})=>(0,bd.str)`must be ${$d[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,bd._)`{comparison: ${$d[e].okStr}, limit: ${t}}`},yq={keyword:Object.keys($d),type:"number",schemaType:"number",$data:!0,error:_q,code(e){let{keyword:t,data:r,schemaCode:o}=e;e.fail$data((0,bd._)`${r} ${$d[t].fail} ${o} || isNaN(${r})`)}};mv.default=yq});var s0=$(hv=>{"use strict";Object.defineProperty(hv,"__esModule",{value:!0});var Oa=Q(),bq={message:({schemaCode:e})=>(0,Oa.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Oa._)`{multipleOf: ${e}}`},$q={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:bq,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}))`)}};hv.default=$q});var c0=$(gv=>{"use strict";Object.defineProperty(gv,"__esModule",{value:!0});function a0(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}gv.default=a0;a0.code='require("ajv/dist/runtime/ucs2length").default'});var u0=$(vv=>{"use strict";Object.defineProperty(vv,"__esModule",{value:!0});var Gn=Q(),wq=ve(),kq=c0(),xq={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Gn.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Gn._)`{limit: ${e}}`},Sq={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:xq,code(e){let{keyword:t,data:r,schemaCode:o,it:n}=e,i=t==="maxLength"?Gn.operators.GT:Gn.operators.LT,s=n.opts.unicode===!1?(0,Gn._)`${r}.length`:(0,Gn._)`${(0,wq.useFunc)(e.gen,kq.default)}(${r})`;e.fail$data((0,Gn._)`${s} ${i} ${o}`)}};vv.default=Sq});var l0=$(_v=>{"use strict";Object.defineProperty(_v,"__esModule",{value:!0});var Tq=Zt(),wd=Q(),Pq={message:({schemaCode:e})=>(0,wd.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,wd._)`{pattern: ${e}}`},zq={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Pq,code(e){let{data:t,$data:r,schema:o,schemaCode:n,it:i}=e,s=i.opts.unicodeRegExp?"u":"",a=r?(0,wd._)`(new RegExp(${n}, ${s}))`:(0,Tq.usePattern)(e,o);e.fail$data((0,wd._)`!${a}.test(${t})`)}};_v.default=zq});var d0=$(yv=>{"use strict";Object.defineProperty(yv,"__esModule",{value:!0});var ja=Q(),Eq={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}}`},Iq={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:Eq,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}`)}};yv.default=Iq});var p0=$(bv=>{"use strict";Object.defineProperty(bv,"__esModule",{value:!0});var Na=Zt(),Ra=Q(),Oq=ve(),jq={message:({params:{missingProperty:e}})=>(0,Ra.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Ra._)`{missingProperty: ${e}}`},Nq={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 v=s.schemaEnv.baseId+s.errSchemaPath,y=`required property "${f}" is not defined at "${v}" (strictRequired)`;(0,Oq.checkStrictMode)(s,y,s.opts.strictRequired)}}function u(){if(c||i)e.block$data(Ra.nil,d);else for(let m of r)(0,Na.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,Na.checkMissingProp)(e,r,m)),(0,Na.reportMissingProp)(e,m),t.else()}function d(){t.forOf("prop",o,m=>{e.setParams({missingProperty:m}),t.if((0,Na.noPropertyInData)(t,n,m,a.ownProperties),()=>e.error())})}function h(m,p){e.setParams({missingProperty:m}),t.forOf(m,o,()=>{t.assign(p,(0,Na.propertyInData)(t,n,m,a.ownProperties)),t.if((0,Ra.not)(p),()=>{e.error(),t.break()})},Ra.nil)}}};bv.default=Nq});var f0=$($v=>{"use strict";Object.defineProperty($v,"__esModule",{value:!0});var Ca=Q(),Rq={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}}`},Cq={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Rq,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}`)}};$v.default=Cq});var kd=$(wv=>{"use strict";Object.defineProperty(wv,"__esModule",{value:!0});var m0=Hs();m0.code='require("ajv/dist/runtime/equal").default';wv.default=m0});var h0=$(xv=>{"use strict";Object.defineProperty(xv,"__esModule",{value:!0});var kv=wa(),Xe=Q(),Aq=ve(),Dq=kd(),qq={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}}`},Mq={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:qq,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,kv.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 v=t.name("item"),y=(0,kv.checkDataTypes)(u,v,a.opts.strictNumbers,kv.DataType.Wrong),w=t.const("indices",(0,Xe._)`{}`);t.for((0,Xe._)`;${p}--;`,()=>{t.let(v,(0,Xe._)`${r}[${p}]`),t.if(y,(0,Xe._)`continue`),u.length>1&&t.if((0,Xe._)`typeof ${v} == "string"`,(0,Xe._)`${v} += "_"`),t.if((0,Xe._)`typeof ${w}[${v}] == "number"`,()=>{t.assign(f,(0,Xe._)`${w}[${v}]`),e.error(),t.assign(c,!1).break()}).code((0,Xe._)`${w}[${v}] = ${p}`)})}function m(p,f){let v=(0,Aq.useFunc)(t,Dq.default),y=t.name("outer");t.label(y).for((0,Xe._)`;${p}--;`,()=>t.for((0,Xe._)`${f} = ${p}; ${f}--;`,()=>t.if((0,Xe._)`${v}(${r}[${p}], ${r}[${f}])`,()=>{e.error(),t.assign(c,!1).break(y)})))}}};xv.default=Mq});var g0=$(Tv=>{"use strict";Object.defineProperty(Tv,"__esModule",{value:!0});var Sv=Q(),Uq=ve(),Zq=kd(),Vq={message:"must be equal to constant",params:({schemaCode:e})=>(0,Sv._)`{allowedValue: ${e}}`},Lq={keyword:"const",$data:!0,error:Vq,code(e){let{gen:t,data:r,$data:o,schemaCode:n,schema:i}=e;o||i&&typeof i=="object"?e.fail$data((0,Sv._)`!${(0,Uq.useFunc)(t,Zq.default)}(${r}, ${n})`):e.fail((0,Sv._)`${i} !== ${r}`)}};Tv.default=Lq});var v0=$(Pv=>{"use strict";Object.defineProperty(Pv,"__esModule",{value:!0});var Aa=Q(),Fq=ve(),Gq=kd(),Wq={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Aa._)`{allowedValues: ${e}}`},Kq={keyword:"enum",schemaType:"array",$data:!0,error:Wq,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,Fq.useFunc)(t,Gq.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,Aa.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,Aa._)`${u()}(${r}, ${m})`,()=>t.assign(l,!0).break()))}function h(m,p){let f=n[p];return typeof f=="object"&&f!==null?(0,Aa._)`${u()}(${r}, ${m}[${p}])`:(0,Aa._)`${r} === ${f}`}}};Pv.default=Kq});var _0=$(zv=>{"use strict";Object.defineProperty(zv,"__esModule",{value:!0});var Hq=i0(),Jq=s0(),Bq=u0(),Yq=l0(),Xq=d0(),Qq=p0(),eM=f0(),tM=h0(),rM=g0(),nM=v0(),oM=[Hq.default,Jq.default,Bq.default,Yq.default,Xq.default,Qq.default,eM.default,tM.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},rM.default,nM.default];zv.default=oM});var Iv=$(Da=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});Da.validateAdditionalItems=void 0;var Wn=Q(),Ev=ve(),iM={message:({params:{len:e}})=>(0,Wn.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Wn._)`{limit: ${e}}`},sM={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:iM,code(e){let{parentSchema:t,it:r}=e,{items:o}=t;if(!Array.isArray(o)){(0,Ev.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}y0(e,o)}};function y0(e,t){let{gen:r,schema:o,data:n,keyword:i,it:s}=e;s.items=!0;let a=r.const("len",(0,Wn._)`${n}.length`);if(o===!1)e.setParams({len:t.length}),e.pass((0,Wn._)`${a} <= ${t.length}`);else if(typeof o=="object"&&!(0,Ev.alwaysValidSchema)(s,o)){let u=r.var("valid",(0,Wn._)`${a} <= ${t.length}`);r.if((0,Wn.not)(u),()=>c(u)),e.ok(u)}function c(u){r.forRange("i",t.length,a,l=>{e.subschema({keyword:i,dataProp:l,dataPropType:Ev.Type.Num},u),s.allErrors||r.if((0,Wn.not)(u),()=>r.break())})}}Da.validateAdditionalItems=y0;Da.default=sM});var Ov=$(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});qa.validateTuple=void 0;var b0=Q(),xd=ve(),aM=Zt(),cM={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return $0(e,"additionalItems",t);r.items=!0,!(0,xd.alwaysValidSchema)(r,t)&&e.ok((0,aM.validateArray)(e))}};function $0(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,b0._)`${i}.length`);r.forEach((d,h)=>{(0,xd.alwaysValidSchema)(a,d)||(o.if((0,b0._)`${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 v=`"${s}" is ${p}-tuple, but minItems or maxItems/${t} are not specified or different at path "${m}"`;(0,xd.checkStrictMode)(a,v,h.strictTuples)}}}qa.validateTuple=$0;qa.default=cM});var w0=$(jv=>{"use strict";Object.defineProperty(jv,"__esModule",{value:!0});var uM=Ov(),lM={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,uM.validateTuple)(e,"items")};jv.default=lM});var x0=$(Nv=>{"use strict";Object.defineProperty(Nv,"__esModule",{value:!0});var k0=Q(),dM=ve(),pM=Zt(),fM=Iv(),mM={message:({params:{len:e}})=>(0,k0.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,k0._)`{limit: ${e}}`},hM={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:mM,code(e){let{schema:t,parentSchema:r,it:o}=e,{prefixItems:n}=r;o.items=!0,!(0,dM.alwaysValidSchema)(o,t)&&(n?(0,fM.validateAdditionalItems)(e,n):e.ok((0,pM.validateArray)(e)))}};Nv.default=hM});var S0=$(Rv=>{"use strict";Object.defineProperty(Rv,"__esModule",{value:!0});var Lt=Q(),Sd=ve(),gM={message:({params:{min:e,max:t}})=>t===void 0?(0,Lt.str)`must contain at least ${e} valid item(s)`:(0,Lt.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,Lt._)`{minContains: ${e}}`:(0,Lt._)`{minContains: ${e}, maxContains: ${t}}`},vM={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:gM,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,Lt._)`${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,Lt._)`${l} >= ${s}`;a!==void 0&&(f=(0,Lt._)`${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,Lt._)`${n}.length > 0`,h)):(t.let(d,!1),h()),e.result(d,()=>e.reset());function h(){let f=t.name("_valid"),v=t.let("count",0);m(f,()=>t.if(f,()=>p(v)))}function m(f,v){t.forRange("i",0,l,y=>{e.subschema({keyword:"contains",dataProp:y,dataPropType:Sd.Type.Num,compositeRule:!0},f),v()})}function p(f){t.code((0,Lt._)`${f}++`),a===void 0?t.if((0,Lt._)`${f} >= ${s}`,()=>t.assign(d,!0).break()):(t.if((0,Lt._)`${f} > ${a}`,()=>t.assign(d,!1).break()),s===1?t.assign(d,!0):t.if((0,Lt._)`${f} >= ${s}`,()=>t.assign(d,!0)))}}};Rv.default=vM});var z0=$(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.validateSchemaDeps=gr.validatePropertyDeps=gr.error=void 0;var Cv=Q(),_M=ve(),Ma=Zt();gr.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let o=t===1?"property":"properties";return(0,Cv.str)`must have ${o} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:o}})=>(0,Cv._)`{property: ${e},
|
|
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(),EA=he(),IA={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Yl._)`{passingSchemas: ${e.passing}}`},NA={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:IA,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,EA.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 E=l.$async?(0,Le._)`(${f}.async ? await ${y}(${o}) : ${y}(${o}))`:(0,Le._)`${y}(${o})`,P=(0,Le._)`(typeof ${y} == "function" ? ${E} : ${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(E());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 E(){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 Ik=w(mg=>{"use strict";Object.defineProperty(mg,"__esModule",{value:!0});var i1=C$(),s1=Q$(),a1=Sk(),c1=Pk(),Ek=zk(),u1=[i1.default,s1.default,(0,a1.default)(),c1.default,Ek.metadataVocabulary,Ek.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 E=0;E<s.length;E++){let P=s[E];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,E)}if(!_)throw new Error(`discriminator: "${a}" must be required`);return p;function y({required:E}){return Array.isArray(E)&&E.includes(a)}function $(E,P){if(E.const)k(E.const,P);else if(E.enum)for(let ze of E.enum)k(ze,P);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function k(E,P){if(typeof E!="string"||E in p)throw new Error(`discriminator: "${a}" values must be unique strings`);p[E]=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=Ik(),_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 E1=-(2**31),I1=2**31-1;function N1(e){return Number.isInteger(e)&&e<=I1&&e>=E1}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)}},Eg=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}},Ig=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 Eg(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 Ig(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 ED(e,t){let{gen:r,data:o,opts:n}=e,i=ID(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=ED;var px=new Set(["string","number","integer","boolean","null"]);function ID(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
|
|
11
|
+
|| (${s} == "string" && ${n} && ${n} == +${n})`).assign(a,(0,Q._)`+${n}`);return;case"integer":o.elseIf((0,Q._)`${s} === "boolean" || ${n} === null
|
|
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 E=this.opts.uriResolver.resolve;if(k=ei(_?E(_,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),EC(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 Ex(e,[],!1,t);let r=(0,Px.getSchemaTypes)(e.schema),o=(0,Px.coerceAndCheckDataType)(e,r);Ex(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 EC(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&&IC(e),t.return((0,Z._)`${H.default.errors} === 0`))}function IC({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 Ex(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)),Ix(e,h),t.length===1&&t[0]===h.type&&r&&(n.else(),(0,pd.reportTypeError)(e)),n.endIf()):Ix(e,h),a||n.if((0,Z._)`${H.default.errors} === ${o||0}`))}}function Ix(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(),Ea=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,E,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:(E=e.schemaId)!==null&&E!==void 0?E:"$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 Ia=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,Ea.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,Ea.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,Ea.normalizeId)(s||o);let u=Ea.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}}};Ia.ValidationError=HC.default;Ia.MissingRefError=Jx.default;Qe.default=Ia;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,Ea.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(),Eq={message:({schemaCode:e})=>(0,$d.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,$d._)`{pattern: ${e}}`},Iq={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Eq,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=Iq});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 I_=w(Ca=>{"use strict";Object.defineProperty(Ca,"__esModule",{value:!0});Ca.validateAdditionalItems=void 0;var Gn=X(),E_=_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,E_.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,E_.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:E_.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=I_(),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 ES=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},
|
|
14
14
|
missingProperty: ${o},
|
|
15
15
|
depsCount: ${t},
|
|
16
|
-
deps: ${r}}`};var yM={keyword:"dependencies",type:"object",schemaType:"object",error:gr.error,code(e){let[t,r]=bM(e);T0(e,t),P0(e,r)}};function bM({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 T0(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,Cv._)`${c} && (${(0,Ma.checkMissingProp)(e,a,i)})`),(0,Ma.reportMissingProp)(e,i),r.else())}}gr.validatePropertyDeps=T0;function P0(e,t=e.schema){let{gen:r,data:o,keyword:n,it:i}=e,s=r.name("valid");for(let a in t)(0,_M.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=P0;gr.default=yM});var I0=$(Av=>{"use strict";Object.defineProperty(Av,"__esModule",{value:!0});var E0=Q(),$M=ve(),wM={message:"property name must be valid",params:({params:e})=>(0,E0._)`{propertyName: ${e.propertyName}}`},kM={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:wM,code(e){let{gen:t,schema:r,data:o,it:n}=e;if((0,$M.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,E0.not)(i),()=>{e.error(!0),n.allErrors||t.break()})}),e.ok(i)}};Av.default=kM});var qv=$(Dv=>{"use strict";Object.defineProperty(Dv,"__esModule",{value:!0});var Td=Zt(),nr=Q(),xM=Nr(),Pd=ve(),SM={message:"must NOT have additional properties",params:({params:e})=>(0,nr._)`{additionalProperty: ${e.additionalProperty}}`},TM={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:SM,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} === ${xM.default.errors}`);function d(){t.forIn("key",n,v=>{!u.length&&!l.length?p(v):t.if(h(v),()=>p(v))})}function h(v){let y;if(u.length>8){let w=(0,Pd.schemaRefOrVal)(s,o.properties,"properties");y=(0,Td.isOwnProperty)(t,w,v)}else u.length?y=(0,nr.or)(...u.map(w=>(0,nr._)`${v} === ${w}`)):y=nr.nil;return l.length&&(y=(0,nr.or)(y,...l.map(w=>(0,nr._)`${(0,Td.usePattern)(e,w)}.test(${v})`))),(0,nr.not)(y)}function m(v){t.code((0,nr._)`delete ${n}[${v}]`)}function p(v){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(v);return}if(r===!1){e.setParams({additionalProperty:v}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,Pd.alwaysValidSchema)(s,r)){let y=t.name("valid");c.removeAdditional==="failing"?(f(v,y,!1),t.if((0,nr.not)(y),()=>{e.reset(),m(v)})):(f(v,y),a||t.if((0,nr.not)(y),()=>t.break()))}}function f(v,y,w){let k={keyword:"additionalProperties",dataProp:v,dataPropType:Pd.Type.Str};w===!1&&Object.assign(k,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(k,y)}}};Dv.default=TM});var N0=$(Uv=>{"use strict";Object.defineProperty(Uv,"__esModule",{value:!0});var PM=Ta(),O0=Zt(),Mv=ve(),j0=qv(),zM={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&&j0.default.code(new PM.KeywordCxt(i,j0.default,"additionalProperties"));let s=(0,O0.allSchemaProperties)(r);for(let d of s)i.definedProperties.add(d);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=Mv.mergeEvaluated.props(t,(0,Mv.toHash)(s),i.props));let a=s.filter(d=>!(0,Mv.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,O0.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)}}};Uv.default=zM});var D0=$(Zv=>{"use strict";Object.defineProperty(Zv,"__esModule",{value:!0});var R0=Zt(),zd=Q(),C0=ve(),A0=ve(),EM={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,R0.allSchemaProperties)(r),c=a.filter(f=>(0,C0.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,A0.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 v in u)new RegExp(f).test(v)&&(0,C0.checkStrictMode)(i,`property ${v} matches pattern ${f} (use allowMatchingProperties)`)}function p(f){t.forIn("key",o,v=>{t.if((0,zd._)`${(0,R0.usePattern)(e,f)}.test(${v})`,()=>{let y=c.includes(f);y||e.subschema({keyword:"patternProperties",schemaProp:f,dataProp:v,dataPropType:A0.Type.Str},l),i.opts.unevaluated&&d!==!0?t.assign((0,zd._)`${d}[${v}]`,!0):!y&&!i.allErrors&&t.if((0,zd.not)(l),()=>t.break())})})}}};Zv.default=EM});var q0=$(Vv=>{"use strict";Object.defineProperty(Vv,"__esModule",{value:!0});var IM=ve(),OM={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:o}=e;if((0,IM.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"}};Vv.default=OM});var M0=$(Lv=>{"use strict";Object.defineProperty(Lv,"__esModule",{value:!0});var jM=Zt(),NM={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:jM.validateUnion,error:{message:"must match a schema in anyOf"}};Lv.default=NM});var U0=$(Fv=>{"use strict";Object.defineProperty(Fv,"__esModule",{value:!0});var Ed=Q(),RM=ve(),CM={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Ed._)`{passingSchemas: ${e.passing}}`},AM={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,RM.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)})})}}};Fv.default=AM});var Z0=$(Gv=>{"use strict";Object.defineProperty(Gv,"__esModule",{value:!0});var DM=ve(),qM={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,DM.alwaysValidSchema)(o,i))return;let a=e.subschema({keyword:"allOf",schemaProp:s},n);e.ok(n),e.mergeEvaluated(a)})}};Gv.default=qM});var F0=$(Wv=>{"use strict";Object.defineProperty(Wv,"__esModule",{value:!0});var Id=Q(),L0=ve(),MM={message:({params:e})=>(0,Id.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Id._)`{failingKeyword: ${e.ifClause}}`},UM={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:MM,code(e){let{gen:t,parentSchema:r,it:o}=e;r.then===void 0&&r.else===void 0&&(0,L0.checkStrictMode)(o,'"if" without "then" and "else" is ignored');let n=V0(o,"then"),i=V0(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 V0(e,t){let r=e.schema[t];return r!==void 0&&!(0,L0.alwaysValidSchema)(e,r)}Wv.default=UM});var G0=$(Kv=>{"use strict";Object.defineProperty(Kv,"__esModule",{value:!0});var ZM=ve(),VM={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,ZM.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};Kv.default=VM});var W0=$(Hv=>{"use strict";Object.defineProperty(Hv,"__esModule",{value:!0});var LM=Iv(),FM=w0(),GM=Ov(),WM=x0(),KM=S0(),HM=z0(),JM=I0(),BM=qv(),YM=N0(),XM=D0(),QM=q0(),e4=M0(),t4=U0(),r4=Z0(),n4=F0(),o4=G0();function i4(e=!1){let t=[QM.default,e4.default,t4.default,r4.default,n4.default,o4.default,JM.default,BM.default,HM.default,YM.default,XM.default];return e?t.push(FM.default,WM.default):t.push(LM.default,GM.default),t.push(KM.default),t}Hv.default=i4});var K0=$(Jv=>{"use strict";Object.defineProperty(Jv,"__esModule",{value:!0});var Ve=Q(),s4={message:({schemaCode:e})=>(0,Ve.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Ve._)`{format: ${e}}`},a4={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:s4,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}]`),v=r.let("fType"),y=r.let("format");r.if((0,Ve._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>r.assign(v,(0,Ve._)`${f}.type || "string"`).assign(y,(0,Ve._)`${f}.validate`),()=>r.assign(v,(0,Ve._)`"string"`).assign(y,f)),e.fail$data((0,Ve.or)(w(),k()));function w(){return c.strictSchema===!1?Ve.nil:(0,Ve._)`${s} && !${y}`}function k(){let E=l.$async?(0,Ve._)`(${f}.async ? await ${y}(${o}) : ${y}(${o}))`:(0,Ve._)`${y}(${o})`,P=(0,Ve._)`(typeof ${y} == "function" ? ${E} : ${y}.test(${o}))`;return(0,Ve._)`${y} && ${y} !== true && ${v} === ${t} && !${P}`}}function m(){let p=d.formats[i];if(!p){w();return}if(p===!0)return;let[f,v,y]=k(p);f===t&&e.pass(E());function w(){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 E(){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 v=="function"?(0,Ve._)`${y}(${o})`:(0,Ve._)`${y}.test(${o})`}}}};Jv.default=a4});var H0=$(Bv=>{"use strict";Object.defineProperty(Bv,"__esModule",{value:!0});var c4=K0(),u4=[c4.default];Bv.default=u4});var J0=$(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 Y0=$(Yv=>{"use strict";Object.defineProperty(Yv,"__esModule",{value:!0});var l4=o0(),d4=_0(),p4=W0(),f4=H0(),B0=J0(),m4=[l4.default,d4.default,(0,p4.default)(),f4.default,B0.metadataVocabulary,B0.contentVocabulary];Yv.default=m4});var Q0=$(Od=>{"use strict";Object.defineProperty(Od,"__esModule",{value:!0});Od.DiscrError=void 0;var X0;(function(e){e.Tag="tag",e.Mapping="mapping"})(X0||(Od.DiscrError=X0={}))});var tS=$(Qv=>{"use strict";Object.defineProperty(Qv,"__esModule",{value:!0});var ii=Q(),Xv=Q0(),eS=gd(),h4=Pa(),g4=ve(),v4={message:({params:{discrError:e,tagName:t}})=>e===Xv.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}}`},_4={keyword:"discriminator",type:"object",schemaType:"object",error:v4,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:Xv.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:Xv.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),v=!0;for(let E=0;E<s.length;E++){let P=s[E];if(P?.$ref&&!(0,g4.schemaHasRulesButRef)(P,i.self.RULES)){let Me=P.$ref;if(P=eS.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,Me),P instanceof eS.SchemaEnv&&(P=P.schema),P===void 0)throw new h4.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}"`);v=v&&(f||y(P)),w(ze,E)}if(!v)throw new Error(`discriminator: "${a}" must be required`);return p;function y({required:E}){return Array.isArray(E)&&E.includes(a)}function w(E,P){if(E.const)k(E.const,P);else if(E.enum)for(let ze of E.enum)k(ze,P);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function k(E,P){if(typeof E!="string"||E in p)throw new Error(`discriminator: "${a}" values must be unique strings`);p[E]=P}}}};Qv.default=_4});var rS=$((j3,y4)=>{y4.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 oS=$((Ae,e_)=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.MissingRefError=Ae.ValidationError=Ae.CodeGen=Ae.Name=Ae.nil=Ae.stringify=Ae.str=Ae._=Ae.KeywordCxt=Ae.Ajv=void 0;var b4=Xx(),$4=Y0(),w4=tS(),nS=rS(),k4=["/properties"],jd="http://json-schema.org/draft-07/schema",si=class extends b4.default{_addVocabularies(){super._addVocabularies(),$4.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(w4.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(nS,k4):nS;this.addMetaSchema(t,jd,!1),this.refs["http://json-schema.org/schema"]=jd}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(jd)?jd:void 0)}};Ae.Ajv=si;e_.exports=Ae=si;e_.exports.Ajv=si;Object.defineProperty(Ae,"__esModule",{value:!0});Ae.default=si;var x4=Ta();Object.defineProperty(Ae,"KeywordCxt",{enumerable:!0,get:function(){return x4.KeywordCxt}});var ai=Q();Object.defineProperty(Ae,"_",{enumerable:!0,get:function(){return ai._}});Object.defineProperty(Ae,"str",{enumerable:!0,get:function(){return ai.str}});Object.defineProperty(Ae,"stringify",{enumerable:!0,get:function(){return ai.stringify}});Object.defineProperty(Ae,"nil",{enumerable:!0,get:function(){return ai.nil}});Object.defineProperty(Ae,"Name",{enumerable:!0,get:function(){return ai.Name}});Object.defineProperty(Ae,"CodeGen",{enumerable:!0,get:function(){return ai.CodeGen}});var S4=md();Object.defineProperty(Ae,"ValidationError",{enumerable:!0,get:function(){return S4.default}});var T4=Pa();Object.defineProperty(Ae,"MissingRefError",{enumerable:!0,get:function(){return T4.default}})});var iS=$(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.formatLimitDefinition=void 0;var P4=oS(),or=Q(),ln=or.operators,Nd={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}},z4={message:({keyword:e,schemaCode:t})=>(0,or.str)`should be ${Nd[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,or._)`{comparison: ${Nd[e].okStr}, limit: ${t}}`};ci.formatLimitDefinition={keyword:Object.keys(Nd),type:"string",schemaType:"string",$data:!0,error:z4,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 P4.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}) ${Nd[n].fail} 0`}},dependencies:["format"]};var E4=e=>(e.addKeyword(ci.formatLimitDefinition),e);ci.default=E4});var uS=$((Ua,cS)=>{"use strict";Object.defineProperty(Ua,"__esModule",{value:!0});var ui=Fk(),I4=iS(),t_=Q(),sS=new t_.Name("fullFormats"),O4=new t_.Name("fastFormats"),r_=(e,t={keywords:!0})=>{if(Array.isArray(t))return aS(e,t,ui.fullFormats,sS),e;let[r,o]=t.mode==="fast"?[ui.fastFormats,O4]:[ui.fullFormats,sS],n=t.formats||ui.formatNames;return aS(e,n,r,o),t.keywords&&(0,I4.default)(e),e};r_.get=(e,t="full")=>{let o=(t==="fast"?ui.fastFormats:ui.fullFormats)[e];if(!o)throw new Error(`Unknown format "${e}"`);return o};function aS(e,t,r,o){var n,i;(n=(i=e.opts.code).formats)!==null&&n!==void 0||(i.formats=(0,t_._)`require("ajv-formats/dist/formats").${o}`);for(let s of t)e.addFormat(s,r[s])}cS.exports=Ua=r_;Object.defineProperty(Ua,"__esModule",{value:!0});Ua.default=r_});var ct=$((XH,SS)=>{var l_=Object.defineProperty,oU=Object.getOwnPropertyDescriptor,iU=Object.getOwnPropertyNames,sU=Object.prototype.hasOwnProperty,aU=(e,t)=>{for(var r in t)l_(e,r,{get:t[r],enumerable:!0})},cU=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of iU(t))!sU.call(e,n)&&n!==r&&l_(e,n,{get:()=>t[n],enumerable:!(o=oU(t,n))||o.enumerable});return e},uU=e=>cU(l_({},"__esModule",{value:!0}),e),xS={};aU(xS,{APIV2Client:()=>hU,VantageAPIError:()=>Zd,pathEncode:()=>S});SS.exports=uU(xS);function S(e){return encodeURIComponent(e)}var lU={"/v2/exchange_rates/csv":{POST:!0},"/v2/business_metrics/{}/values.csv":{PUT:!0},"/v2/integrations/{}/costs.csv":{POST:!0}},Va={};function dU(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}for(let[e,t]of Object.entries(lU)){let r=e.split("{}").map(dU).join("(.+?)");for(let[o,n]of Object.entries(t))n&&(Va[o]||(Va[o]=[]),Va[o].push(new RegExp(`^${r}$`)))}function pU(e,t){if(Object.prototype.hasOwnProperty.call(Va,e))for(let r of Va[e]){let o=r.test(t);if(r.lastIndex=0,o)return!0}return!1}function fU(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 u_(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 mU=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 fU(o,r),u_(o,t,n,void 0,this.neverThrow);if(pU(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",u_(o,t,n,i,this.neverThrow)}return n["Content-Type"]="application/json",u_(o,t,n,JSON.stringify(r),this.neverThrow)}},hU=class extends mU{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 gU(this)),this._accessGrants}get anomalyAlerts(){return this._anomalyAlerts||(this._anomalyAlerts=new vU(this)),this._anomalyAlerts}get anomalyNotifications(){return this._anomalyNotifications||(this._anomalyNotifications=new _U(this)),this._anomalyNotifications}get auditLogs(){return this._auditLogs||(this._auditLogs=new yU(this)),this._auditLogs}get billingProfiles(){return this._billingProfiles||(this._billingProfiles=new bU(this)),this._billingProfiles}get billingRules(){return this._billingRules||(this._billingRules=new $U(this)),this._billingRules}get budgetAlerts(){return this._budgetAlerts||(this._budgetAlerts=new wU(this)),this._budgetAlerts}get budgets(){return this._budgets||(this._budgets=new kU(this)),this._budgets}get businessMetrics(){return this._businessMetrics||(this._businessMetrics=new xU(this)),this._businessMetrics}get costAlerts(){return this._costAlerts||(this._costAlerts=new SU(this)),this._costAlerts}get costProviderAccounts(){return this._costProviderAccounts||(this._costProviderAccounts=new TU(this)),this._costProviderAccounts}get costReports(){return this._costReports||(this._costReports=new PU(this)),this._costReports}get costs(){return this._costs||(this._costs=new zU(this)),this._costs}get dashboards(){return this._dashboards||(this._dashboards=new EU(this)),this._dashboards}get dataExports(){return this._dataExports||(this._dataExports=new IU(this)),this._dataExports}get exchangeRates(){return this._exchangeRates||(this._exchangeRates=new OU(this)),this._exchangeRates}get financialCommitmentReports(){return this._financialCommitmentReports||(this._financialCommitmentReports=new jU(this)),this._financialCommitmentReports}get financialCommitments(){return this._financialCommitments||(this._financialCommitments=new NU(this)),this._financialCommitments}get folders(){return this._folders||(this._folders=new RU(this)),this._folders}get integrations(){return this._integrations||(this._integrations=new CU(this)),this._integrations}get invoices(){return this._invoices||(this._invoices=new AU(this)),this._invoices}get kubernetesEfficiencyReports(){return this._kubernetesEfficiencyReports||(this._kubernetesEfficiencyReports=new DU(this)),this._kubernetesEfficiencyReports}get managedAccounts(){return this._managedAccounts||(this._managedAccounts=new qU(this)),this._managedAccounts}get me(){return this._me||(this._me=new MU(this)),this._me}get costProviders(){return this._costProviders||(this._costProviders=new UU(this)),this._costProviders}get costServices(){return this._costServices||(this._costServices=new ZU(this)),this._costServices}get userFeedback(){return this._userFeedback||(this._userFeedback=new VU(this)),this._userFeedback}get networkFlowReports(){return this._networkFlowReports||(this._networkFlowReports=new LU(this)),this._networkFlowReports}get products(){return this._products||(this._products=new FU(this)),this._products}get recommendations(){return this._recommendations||(this._recommendations=new GU(this)),this._recommendations}get recommendationViews(){return this._recommendationViews||(this._recommendationViews=new WU(this)),this._recommendationViews}get reportNotifications(){return this._reportNotifications||(this._reportNotifications=new KU(this)),this._reportNotifications}get resourceReports(){return this._resourceReports||(this._resourceReports=new HU(this)),this._resourceReports}get resources(){return this._resources||(this._resources=new JU(this)),this._resources}get savedFilters(){return this._savedFilters||(this._savedFilters=new BU(this)),this._savedFilters}get segments(){return this._segments||(this._segments=new YU(this)),this._segments}get tags(){return this._tags||(this._tags=new XU(this)),this._tags}get teams(){return this._teams||(this._teams=new QU(this)),this._teams}get unitCosts(){return this._unitCosts||(this._unitCosts=new eZ(this)),this._unitCosts}get users(){return this._users||(this._users=new tZ(this)),this._users}get virtualTagConfigs(){return this._virtualTagConfigs||(this._virtualTagConfigs=new rZ(this)),this._virtualTagConfigs}get workspaces(){return this._workspaces||(this._workspaces=new nZ(this)),this._workspaces}get ping(){return this._ping||(this._ping=new oZ(this)),this._ping}},gU=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",{})}},vU=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)}},_U=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",{})}},yU=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",{})}},bU=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",{})}},$U=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",{})}},wU=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",{})}},kU=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",{})}},xU=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)}},SU=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",{})}},TU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/cost_provider_accounts","GET",e)}},PU=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)}},zU=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)}},EU=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",{})}},IU=class{constructor(e){this.client=e}get(e){return this.client.request(`/v2/data_exports/${S(e)}`,"GET",{})}},OU=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",{})}},NU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/financial_commitments","GET",e)}},RU=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)}},AU=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",{})}},DU=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)}},qU=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)}},MU=class{constructor(e){this.client=e}get(){return this.client.request("/v2/me","GET",{})}},UU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/cost_providers","GET",e)}},ZU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/cost_services","GET",e)}},VU=class{constructor(e){this.client=e}create(e){return this.client.request("/v2/user_feedback","POST",e)}},LU=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",{})}},FU=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",{})}},GU=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)}},WU=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",{})}},KU=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",{})}},HU=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)}},JU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/resources","GET",e)}},BU=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",{})}},YU=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",{})}},XU=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)}},QU=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",{})}},eZ=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)}},tZ=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",{})}},rZ=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",{})}},nZ=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)}},oZ=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 p_;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(p_||(p_={}));var A=ce.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),vr=e=>{switch(typeof e){case"undefined":return A.undefined;case"string":return A.string;case"number":return Number.isNaN(e)?A.nan:A.number;case"boolean":return A.boolean;case"function":return A.function;case"bigint":return A.bigint;case"symbol":return A.symbol;case"object":return Array.isArray(e)?A.array:e===null?A.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?A.promise:typeof Map<"u"&&e instanceof Map?A.map:typeof Set<"u"&&e instanceof Set?A.set:typeof Date<"u"&&e instanceof Date?A.date:A.object;default:return A.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 KS=(e,t)=>{let r;switch(e.code){case T.invalid_type:e.received===A.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}},Cr=KS;var HS=Cr;function pi(){return HS}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 C(e,t){let r=pi(),o=Fa({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Cr?void 0:Cr].filter(n=>!!n)});e.common.issues.push(o)}var Qe=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",Gd=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 Ot=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}},f_=(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 J(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 vr(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:vr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Qe,ctx:{common:t.parent.common,data:t.data,parsedType:vr(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:vr(t)},n=this._parseSync({data:t,path:o.path,parent:o});return f_(o,n)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:vr(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:vr(t)},n=this._parse({data:t,path:o.path,parent:o}),i=await(fi(n)?n:Promise.resolve(n));return f_(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 Gt({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 Dr.create(this)}promise(){return gn.create(this,this._def)}or(t){return Xn.create([this,t],this._def)}and(t){return Qn.create(this,t,this._def)}transform(t){return new Gt({...J(this._def),schema:this,typeName:z.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new oo({...J(this._def),innerType:this,defaultValue:r,typeName:z.ZodDefault})}brand(){return new Ga({typeName:z.ZodBranded,type:this,...J(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new io({...J(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 Wa.create(this,t)}readonly(){return so.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},JS=/^c[^\s-]{8,}$/i,BS=/^[0-9a-z]+$/,YS=/^[0-9A-HJKMNP-TV-Z]{26}$/i,XS=/^[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,QS=/^[a-z0-9_-]{21}$/i,eT=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,tT=/^[-+]?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)?)??$/,rT=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,nT="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Wd,oT=/^(?:(?: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])$/,iT=/^(?:(?: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])$/,sT=/^(([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]))$/,aT=/^(([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])$/,cT=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,uT=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,m_="((\\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])))",lT=new RegExp(`^${m_}$`);function h_(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 dT(e){return new RegExp(`^${h_(e)}$`)}function pT(e){let t=`${m_}T${h_(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 fT(e,t){return!!((t==="v4"||!t)&&oT.test(e)||(t==="v6"||!t)&&sT.test(e))}function mT(e,t){if(!eT.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 hT(e,t){return!!((t==="v4"||!t)&&iT.test(e)||(t==="v6"||!t)&&aT.test(e))}var Jn=class e extends ee{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==A.string){let i=this._getOrReturnCtx(t);return C(i,{code:T.invalid_type,expected:A.string,received:i.parsedType}),F}let o=new Qe,n;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(n=this._getOrReturnCtx(t,n),C(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),C(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?C(n,{code:T.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&C(n,{code:T.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),o.dirty())}else if(i.kind==="email")rT.test(t.data)||(n=this._getOrReturnCtx(t,n),C(n,{validation:"email",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="emoji")Wd||(Wd=new RegExp(nT,"u")),Wd.test(t.data)||(n=this._getOrReturnCtx(t,n),C(n,{validation:"emoji",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="uuid")XS.test(t.data)||(n=this._getOrReturnCtx(t,n),C(n,{validation:"uuid",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="nanoid")QS.test(t.data)||(n=this._getOrReturnCtx(t,n),C(n,{validation:"nanoid",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid")JS.test(t.data)||(n=this._getOrReturnCtx(t,n),C(n,{validation:"cuid",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid2")BS.test(t.data)||(n=this._getOrReturnCtx(t,n),C(n,{validation:"cuid2",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="ulid")YS.test(t.data)||(n=this._getOrReturnCtx(t,n),C(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),C(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),C(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),C(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),C(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),C(n,{code:T.invalid_string,validation:{endsWith:i.value},message:i.message}),o.dirty()):i.kind==="datetime"?pT(i).test(t.data)||(n=this._getOrReturnCtx(t,n),C(n,{code:T.invalid_string,validation:"datetime",message:i.message}),o.dirty()):i.kind==="date"?lT.test(t.data)||(n=this._getOrReturnCtx(t,n),C(n,{code:T.invalid_string,validation:"date",message:i.message}),o.dirty()):i.kind==="time"?dT(i).test(t.data)||(n=this._getOrReturnCtx(t,n),C(n,{code:T.invalid_string,validation:"time",message:i.message}),o.dirty()):i.kind==="duration"?tT.test(t.data)||(n=this._getOrReturnCtx(t,n),C(n,{validation:"duration",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="ip"?fT(t.data,i.version)||(n=this._getOrReturnCtx(t,n),C(n,{validation:"ip",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="jwt"?mT(t.data,i.alg)||(n=this._getOrReturnCtx(t,n),C(n,{validation:"jwt",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="cidr"?hT(t.data,i.version)||(n=this._getOrReturnCtx(t,n),C(n,{validation:"cidr",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="base64"?cT.test(t.data)||(n=this._getOrReturnCtx(t,n),C(n,{validation:"base64",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="base64url"?uT.test(t.data)||(n=this._getOrReturnCtx(t,n),C(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}};Jn.create=e=>new Jn({checks:[],typeName:z.ZodString,coerce:e?.coerce??!1,...J(e)});function gT(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)!==A.number){let i=this._getOrReturnCtx(t);return C(i,{code:T.invalid_type,expected:A.number,received:i.parsedType}),F}let o,n=new Qe;for(let i of this._def.checks)i.kind==="int"?ce.isInteger(t.data)||(o=this._getOrReturnCtx(t,o),C(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),C(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),C(o,{code:T.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?gT(t.data,i.value)!==0&&(o=this._getOrReturnCtx(t,o),C(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),C(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,...J(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)!==A.bigint)return this._getInvalidInput(t);let o,n=new Qe;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),C(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),C(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),C(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 C(r,{code:T.invalid_type,expected:A.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,...J(e)});var gi=class extends ee{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==A.boolean){let o=this._getOrReturnCtx(t);return C(o,{code:T.invalid_type,expected:A.boolean,received:o.parsedType}),F}return ut(t.data)}};gi.create=e=>new gi({typeName:z.ZodBoolean,coerce:e?.coerce||!1,...J(e)});var vi=class e extends ee{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==A.date){let i=this._getOrReturnCtx(t);return C(i,{code:T.invalid_type,expected:A.date,received:i.parsedType}),F}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return C(i,{code:T.invalid_date}),F}let o=new Qe,n;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(n=this._getOrReturnCtx(t,n),C(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),C(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}};vi.create=e=>new vi({checks:[],coerce:e?.coerce||!1,typeName:z.ZodDate,...J(e)});var _i=class extends ee{_parse(t){if(this._getType(t)!==A.symbol){let o=this._getOrReturnCtx(t);return C(o,{code:T.invalid_type,expected:A.symbol,received:o.parsedType}),F}return ut(t.data)}};_i.create=e=>new _i({typeName:z.ZodSymbol,...J(e)});var Bn=class extends ee{_parse(t){if(this._getType(t)!==A.undefined){let o=this._getOrReturnCtx(t);return C(o,{code:T.invalid_type,expected:A.undefined,received:o.parsedType}),F}return ut(t.data)}};Bn.create=e=>new Bn({typeName:z.ZodUndefined,...J(e)});var Yn=class extends ee{_parse(t){if(this._getType(t)!==A.null){let o=this._getOrReturnCtx(t);return C(o,{code:T.invalid_type,expected:A.null,received:o.parsedType}),F}return ut(t.data)}};Yn.create=e=>new Yn({typeName:z.ZodNull,...J(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,...J(e)});var Ar=class extends ee{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ut(t.data)}};Ar.create=e=>new Ar({typeName:z.ZodUnknown,...J(e)});var sr=class extends ee{_parse(t){let r=this._getOrReturnCtx(t);return C(r,{code:T.invalid_type,expected:A.never,received:r.parsedType}),F}};sr.create=e=>new sr({typeName:z.ZodNever,...J(e)});var bi=class extends ee{_parse(t){if(this._getType(t)!==A.undefined){let o=this._getOrReturnCtx(t);return C(o,{code:T.invalid_type,expected:A.void,received:o.parsedType}),F}return ut(t.data)}};bi.create=e=>new bi({typeName:z.ZodVoid,...J(e)});var Dr=class e extends ee{_parse(t){let{ctx:r,status:o}=this._processInputParams(t),n=this._def;if(r.parsedType!==A.array)return C(r,{code:T.invalid_type,expected:A.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)&&(C(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&&(C(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&&(C(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 Ot(r,s,r.path,a)))).then(s=>Qe.mergeArray(o,s));let i=[...r.data].map((s,a)=>n.type._parseSync(new Ot(r,s,r.path,a)));return Qe.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:z.ZodArray,...J(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 Dr?new Dr({...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)!==A.object){let u=this._getOrReturnCtx(t);return C(u,{code:T.invalid_type,expected:A.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 Ot(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&&(C(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 Ot(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=>Qe.mergeObjectSync(o,u)):Qe.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 g_(ce.objectKeys(this.shape))}};zt.create=(e,t)=>new zt({shape:()=>e,unknownKeys:"strip",catchall:sr.create(),typeName:z.ZodObject,...J(t)});zt.strictCreate=(e,t)=>new zt({shape:()=>e,unknownKeys:"strict",catchall:sr.create(),typeName:z.ZodObject,...J(t)});zt.lazycreate=(e,t)=>new zt({shape:e,unknownKeys:"strip",catchall:sr.create(),typeName:z.ZodObject,...J(t)});var Xn=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 C(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 C(r,{code:T.invalid_union,unionErrors:a}),F}}get options(){return this._def.options}};Xn.create=(e,t)=>new Xn({options:e,typeName:z.ZodUnion,...J(t)});var _r=e=>e instanceof eo?_r(e.schema):e instanceof Gt?_r(e.innerType()):e instanceof to?[e.value]:e instanceof ro?e.options:e instanceof no?ce.objectValues(e.enum):e instanceof oo?_r(e._def.innerType):e instanceof Bn?[void 0]:e instanceof Yn?[null]:e instanceof Pt?[void 0,..._r(e.unwrap())]:e instanceof br?[null,..._r(e.unwrap())]:e instanceof Ga||e instanceof so?_r(e.unwrap()):e instanceof io?_r(e._def.innerType):[],Kd=class e extends ee{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==A.object)return C(r,{code:T.invalid_type,expected:A.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}):(C(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=_r(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,...J(o)})}};function Hd(e,t){let r=vr(e),o=vr(t);if(e===t)return{valid:!0,data:e};if(r===A.object&&o===A.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===A.array&&o===A.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===A.date&&o===A.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Qn=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?((Gd(i)||Gd(s))&&r.dirty(),{status:r.value,value:a.data}):(C(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}))}};Qn.create=(e,t,r)=>new Qn({left:e,right:t,typeName:z.ZodIntersection,...J(r)});var yr=class e extends ee{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==A.array)return C(o,{code:T.invalid_type,expected:A.array,received:o.parsedType}),F;if(o.data.length<this._def.items.length)return C(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&&(C(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 Ot(o,s,o.path,a)):null}).filter(s=>!!s);return o.common.async?Promise.all(i).then(s=>Qe.mergeArray(r,s)):Qe.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,...J(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!==A.object)return C(o,{code:T.invalid_type,expected:A.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 Ot(o,a,o.path,a)),value:s._parse(new Ot(o,o.data[a],o.path,a)),alwaysSet:a in o.data});return o.common.async?Qe.mergeObjectAsync(r,n):Qe.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,...J(o)}):new e({keyType:Jn.create(),valueType:t,typeName:z.ZodRecord,...J(r)})}},$i=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!==A.map)return C(o,{code:T.invalid_type,expected:A.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 Ot(o,a,o.path,[u,"key"])),value:i._parse(new Ot(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}}}};$i.create=(e,t,r)=>new $i({valueType:t,keyType:e,typeName:z.ZodMap,...J(r)});var wi=class e extends ee{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==A.set)return C(o,{code:T.invalid_type,expected:A.set,received:o.parsedType}),F;let n=this._def;n.minSize!==null&&o.data.size<n.minSize.value&&(C(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&&(C(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 Ot(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)}};wi.create=(e,t)=>new wi({valueType:e,minSize:null,maxSize:null,typeName:z.ZodSet,...J(t)});var Bd=class e extends ee{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==A.function)return C(r,{code:T.invalid_type,expected:A.function,received:r.parsedType}),F;function o(a,c){return Fa({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,pi(),Cr].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(),Cr].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(Ar.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(Ar.create()),returns:r||Ar.create(),typeName:z.ZodFunction,...J(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,...J(t)});var to=class extends ee{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return C(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,...J(t)});function g_(e,t){return new ro({values:e,typeName:z.ZodEnum,...J(t)})}var ro=class e extends ee{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),o=this._def.values;return C(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 C(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=g_;var no=class extends ee{_parse(t){let r=ce.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(t);if(o.parsedType!==A.string&&o.parsedType!==A.number){let n=ce.objectValues(r);return C(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 C(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,...J(t)});var gn=class extends ee{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==A.promise&&r.common.async===!1)return C(r,{code:T.invalid_type,expected:A.promise,received:r.parsedType}),F;let o=r.parsedType===A.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,...J(t)});var Gt=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=>{C(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)}};Gt.create=(e,t,r)=>new Gt({schema:e,typeName:z.ZodEffects,effect:t,...J(r)});Gt.createWithPreprocess=(e,t,r)=>new Gt({schema:t,effect:{type:"preprocess",transform:e},typeName:z.ZodEffects,...J(r)});var Pt=class extends ee{_parse(t){return this._getType(t)===A.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,...J(t)});var br=class extends ee{_parse(t){return this._getType(t)===A.null?ut(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};br.create=(e,t)=>new br({innerType:e,typeName:z.ZodNullable,...J(t)});var oo=class extends ee{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return r.parsedType===A.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,...J(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,...J(t)});var ki=class extends ee{_parse(t){if(this._getType(t)!==A.nan){let o=this._getOrReturnCtx(t);return C(o,{code:T.invalid_type,expected:A.nan,received:o.parsedType}),F}return{status:"valid",value:t.data}}};ki.create=e=>new ki({typeName:z.ZodNaN,...J(e)});var Z2=Symbol("zod_brand"),Ga=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}},Wa=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,...J(t)});var V2={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 L2=Jn.create,F2=mi.create,G2=ki.create,W2=hi.create,K2=gi.create,H2=vi.create,J2=_i.create,B2=Bn.create,Y2=Yn.create,X2=yi.create,Q2=Ar.create,e6=sr.create,t6=bi.create,r6=Dr.create,v_=zt.create,n6=zt.strictCreate,o6=Xn.create,i6=Kd.create,s6=Qn.create,a6=yr.create,c6=Jd.create,u6=$i.create,l6=wi.create,d6=Bd.create,p6=eo.create,f6=to.create,m6=ro.create,h6=no.create,g6=gn.create,v6=Gt.create,_6=Pt.create,y6=br.create,b6=Gt.createWithPreprocess,$6=Wa.create;var Kt={};mn(Kt,{$ZodAny:()=>jc,$ZodArray:()=>ho,$ZodAsyncError:()=>ar,$ZodBase64:()=>wc,$ZodBase64URL:()=>kc,$ZodBigInt:()=>Ci,$ZodBigIntFormat:()=>zc,$ZodBoolean:()=>mo,$ZodCIDRv4:()=>bc,$ZodCIDRv6:()=>$c,$ZodCUID:()=>fc,$ZodCUID2:()=>mc,$ZodCatch:()=>Bc,$ZodCheck:()=>De,$ZodCheckBigIntFormat:()=>Mp,$ZodCheckEndsWith:()=>Yp,$ZodCheckGreaterThan:()=>oc,$ZodCheckIncludes:()=>Jp,$ZodCheckLengthEquals:()=>Gp,$ZodCheckLessThan:()=>nc,$ZodCheckLowerCase:()=>Kp,$ZodCheckMaxLength:()=>Lp,$ZodCheckMaxSize:()=>Up,$ZodCheckMimeType:()=>Qp,$ZodCheckMinLength:()=>Fp,$ZodCheckMinSize:()=>Zp,$ZodCheckMultipleOf:()=>Dp,$ZodCheckNumberFormat:()=>qp,$ZodCheckOverwrite:()=>ef,$ZodCheckProperty:()=>Xp,$ZodCheckRegex:()=>Wp,$ZodCheckSizeEquals:()=>Vp,$ZodCheckStartsWith:()=>Bp,$ZodCheckStringFormat:()=>fo,$ZodCheckUpperCase:()=>Hp,$ZodCustom:()=>ru,$ZodCustomStringFormat:()=>Tc,$ZodDate:()=>Cc,$ZodDefault:()=>Wc,$ZodDiscriminatedUnion:()=>Ac,$ZodE164:()=>xc,$ZodEmail:()=>uc,$ZodEmoji:()=>dc,$ZodEnum:()=>Zc,$ZodError:()=>ji,$ZodFile:()=>Lc,$ZodFunction:()=>Ou,$ZodGUID:()=>ac,$ZodIPv4:()=>_c,$ZodIPv6:()=>yc,$ZodISODate:()=>of,$ZodISODateTime:()=>nf,$ZodISODuration:()=>af,$ZodISOTime:()=>sf,$ZodIntersection:()=>Dc,$ZodJWT:()=>Sc,$ZodKSUID:()=>vc,$ZodLazy:()=>tu,$ZodLiteral:()=>Vc,$ZodMap:()=>Mc,$ZodNaN:()=>Yc,$ZodNanoID:()=>pc,$ZodNever:()=>Nc,$ZodNonOptional:()=>Hc,$ZodNull:()=>Oc,$ZodNullable:()=>Gc,$ZodNumber:()=>Ri,$ZodNumberFormat:()=>Pc,$ZodObject:()=>Ai,$ZodOptional:()=>Fc,$ZodPipe:()=>vo,$ZodPrefault:()=>Kc,$ZodPromise:()=>eu,$ZodReadonly:()=>Xc,$ZodRealError:()=>uo,$ZodRecord:()=>qc,$ZodRegistry:()=>yo,$ZodSet:()=>Uc,$ZodString:()=>Vr,$ZodStringFormat:()=>ke,$ZodSuccess:()=>Jc,$ZodSymbol:()=>Ec,$ZodTemplateLiteral:()=>Qc,$ZodTransform:()=>go,$ZodTuple:()=>Lr,$ZodType:()=>W,$ZodULID:()=>hc,$ZodURL:()=>lc,$ZodUUID:()=>cc,$ZodUndefined:()=>Ic,$ZodUnion:()=>Di,$ZodUnknown:()=>wn,$ZodVoid:()=>Rc,$ZodXID:()=>gc,$brand:()=>Ha,$constructor:()=>_,$input:()=>iu,$output:()=>ou,Doc:()=>Ni,JSONSchema:()=>Ty,JSONSchemaGenerator:()=>ys,NEVER:()=>Ka,TimePrecision:()=>au,_any:()=>$u,_array:()=>_s,_base64:()=>rs,_base64url:()=>ns,_bigint:()=>hu,_boolean:()=>mu,_catch:()=>HP,_cidrv4:()=>es,_cidrv6:()=>ts,_coercedBigint:()=>gf,_coercedBoolean:()=>hf,_coercedDate:()=>vf,_coercedNumber:()=>mf,_coercedString:()=>uf,_cuid:()=>Ki,_cuid2:()=>Hi,_custom:()=>Pu,_date:()=>xu,_default:()=>GP,_discriminatedUnion:()=>RP,_e164:()=>os,_email:()=>Mi,_emoji:()=>Gi,_endsWith:()=>ps,_enum:()=>MP,_file:()=>Tu,_float32:()=>lu,_float64:()=>du,_gt:()=>kr,_gte:()=>vt,_guid:()=>bo,_includes:()=>ls,_int:()=>uu,_int32:()=>pu,_int64:()=>gu,_intersection:()=>CP,_ipv4:()=>Xi,_ipv6:()=>Qi,_isoDate:()=>df,_isoDateTime:()=>lf,_isoDuration:()=>ff,_isoTime:()=>pf,_jwt:()=>is,_ksuid:()=>Yi,_lazy:()=>XP,_length:()=>ko,_literal:()=>ZP,_lowercase:()=>cs,_lt:()=>wr,_lte:()=>jt,_map:()=>DP,_max:()=>jt,_maxLength:()=>wo,_maxSize:()=>$o,_mime:()=>fs,_min:()=>vt,_minLength:()=>Fr,_minSize:()=>Sn,_multipleOf:()=>xn,_nan:()=>Su,_nanoid:()=>Wi,_nativeEnum:()=>UP,_negative:()=>yf,_never:()=>wu,_nonnegative:()=>$f,_nonoptional:()=>WP,_nonpositive:()=>bf,_normalize:()=>ms,_null:()=>bu,_nullable:()=>FP,_number:()=>cu,_optional:()=>LP,_overwrite:()=>xr,_parse:()=>Xa,_parseAsync:()=>Qa,_pipe:()=>JP,_positive:()=>_f,_promise:()=>QP,_property:()=>wf,_readonly:()=>BP,_record:()=>AP,_refine:()=>zu,_regex:()=>as,_safeParse:()=>ec,_safeParseAsync:()=>tc,_set:()=>qP,_size:()=>ss,_startsWith:()=>ds,_string:()=>su,_stringFormat:()=>Iu,_stringbool:()=>Eu,_success:()=>KP,_symbol:()=>_u,_templateLiteral:()=>YP,_toLowerCase:()=>gs,_toUpperCase:()=>vs,_transform:()=>VP,_trim:()=>hs,_tuple:()=>kf,_uint32:()=>fu,_uint64:()=>vu,_ulid:()=>Ji,_undefined:()=>yu,_union:()=>NP,_unknown:()=>kn,_uppercase:()=>us,_url:()=>Fi,_uuid:()=>Ui,_uuidv4:()=>Zi,_uuidv6:()=>Vi,_uuidv7:()=>Li,_void:()=>ku,_xid:()=>Bi,clone:()=>et,config:()=>Ue,flattenError:()=>lo,formatError:()=>po,function:()=>ju,globalConfig:()=>xi,globalRegistry:()=>Wt,isValidBase64:()=>cf,isValidBase64URL:()=>D_,isValidJWT:()=>q_,locales:()=>_o,parse:()=>yn,parseAsync:()=>bn,prettifyError:()=>Ya,regexes:()=>Zr,registry:()=>qi,safeParse:()=>Mr,safeParseAsync:()=>Ur,toDotPath:()=>y_,toJSONSchema:()=>xo,treeifyError:()=>Ba,util:()=>N,version:()=>tf});var Ka=Object.freeze({status:"aborted"});function _(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 N={};mn(N,{BIGINT_FORMAT_RANGES:()=>sp,Class:()=>Xd,NUMBER_FORMAT_RANGES:()=>ip,aborted:()=>_n,allowsEval:()=>rp,assert:()=>$T,assertEqual:()=>vT,assertIs:()=>yT,assertNever:()=>bT,assertNotEqual:()=>_T,assignProp:()=>tp,cached:()=>Pi,captureStackTrace:()=>Ja,cleanEnum:()=>RT,cleanRegex:()=>zi,clone:()=>et,createTransparentProxy:()=>PT,defineLazy:()=>_e,esc:()=>vn,escapeRegex:()=>$r,extend:()=>IT,finalizeIssue:()=>Et,floatSafeRemainder:()=>ep,getElementAtPath:()=>wT,getEnumValues:()=>Ti,getLengthableOrigin:()=>Oi,getParsedType:()=>TT,getSizableOrigin:()=>Ii,isObject:()=>ao,isPlainObject:()=>co,issue:()=>ap,joinValues:()=>x,jsonStringifyReplacer:()=>Qd,merge:()=>OT,normalizeParams:()=>O,nullish:()=>qr,numKeys:()=>ST,omit:()=>ET,optionalKeys:()=>op,partial:()=>jT,pick:()=>zT,prefixIssues:()=>gt,primitiveTypes:()=>np,promiseAllObject:()=>kT,propertyKeyTypes:()=>Ei,randomString:()=>xT,required:()=>NT,stringifyPrimitive:()=>R,unwrapMessage:()=>Si});function vT(e){return e}function _T(e){return e}function yT(e){}function bT(e){throw new Error}function $T(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=>R(r)).join(t)}function Qd(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 _e(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 wT(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function kT(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 xT(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function vn(e){return JSON.stringify(e)}var Ja=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 ST(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var TT=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}`)}},Ei=new Set(["string","number","symbol"]),np=new Set(["string","number","bigint","boolean","symbol","undefined"]);function $r(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 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 PT(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 R(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 zT(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 ET(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 IT(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 OT(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 NT(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 _n(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 Et(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 Ii(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Oi(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 RT(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}var Xd=class{constructor(...t){}};var __=(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,Qd,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ji=_("$ZodError",__),uo=_("$ZodError",__,{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 Ba(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 y_(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 Ya(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 ${y_(o.path)}`);return t.join(`
|
|
17
|
-
`)}var Xa=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,Ue())));throw Ja(a,n?.callee),a}return s.value},yn=Xa(uo),Qa=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,Ue())));throw Ja(a,n?.callee),a}return s.value},bn=Qa(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??ji)(i.issues.map(s=>Et(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=>Et(s,n,Ue())))}:{success:!0,data:i.value}},Ur=tc(uo);var Zr={};mn(Zr,{_emoji:()=>b_,base64:()=>wp,base64url:()=>rc,bigint:()=>Ep,boolean:()=>jp,browserEmail:()=>LT,cidrv4:()=>bp,cidrv6:()=>$p,cuid:()=>cp,cuid2:()=>up,date:()=>Sp,datetime:()=>Pp,domain:()=>FT,duration:()=>mp,e164:()=>xp,email:()=>gp,emoji:()=>vp,extendedDuration:()=>AT,guid:()=>hp,hostname:()=>kp,html5Email:()=>UT,integer:()=>Ip,ipv4:()=>_p,ipv6:()=>yp,ksuid:()=>pp,lowercase:()=>Cp,nanoid:()=>fp,null:()=>Np,number:()=>Op,rfc5322Email:()=>ZT,string:()=>zp,time:()=>Tp,ulid:()=>lp,undefined:()=>Rp,unicodeEmail:()=>VT,uppercase:()=>Ap,uuid:()=>$n,uuid4:()=>DT,uuid6:()=>qT,uuid7:()=>MT,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)?)?)$/,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)?)??$/,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})$/,$n=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)$/,DT=$n(4),qT=$n(6),MT=$n(7),gp=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,UT=/^[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])?)*$/,ZT=/^(([^<>()\[\]\\.,;:\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,}))$/,VT=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,LT=/^[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])?)*$/,b_="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function vp(){return new RegExp(b_,"u")}var _p=/^(?:(?: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])$/,$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])$/,wp=/^$|^(?:[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-]+$/,FT=/^([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]$/,$_="(?:(?:\\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(`^${$_}$`);function w_(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(`^${w_(e)}$`)}function Pp(e){let t=w_({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(`^${$_}T(?:${o})$`)}var zp=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Ep=/^\d+n?$/,Ip=/^\d+$/,Op=/^-?\d+(?:\.\d+)?/i,jp=/true|false/i,Np=/null/i;var Rp=/undefined/i;var Cp=/^[^A-Z]*$/,Ap=/^[^a-z]*$/;var De=_("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),x_={number:"number",bigint:"bigint",object:"date"},nc=_("$ZodCheckLessThan",(e,t)=>{De.init(e,t);let r=x_[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=_("$ZodCheckGreaterThan",(e,t)=>{De.init(e,t);let r=x_[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})}}),Dp=_("$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):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=_("$ZodCheckNumberFormat",(e,t)=>{De.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=Ip)}),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=_("$ZodCheckBigIntFormat",(e,t)=>{De.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=_("$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:Ii(n),code:"too_big",maximum:t.maximum,input:n,inst:e,continue:!t.abort})}}),Zp=_("$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:Ii(n),code:"too_small",minimum:t.minimum,input:n,inst:e,continue:!t.abort})}}),Vp=_("$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:Ii(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})}}),Lp=_("$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=Oi(n);o.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Fp=_("$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=Oi(n);o.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Gp=_("$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=Oi(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=_("$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=()=>{})}),Wp=_("$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=_("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Cp),fo.init(e,t)}),Hp=_("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Ap),fo.init(e,t)}),Jp=_("$ZodCheckIncludes",(e,t)=>{De.init(e,t);let r=$r(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})}}),Bp=_("$ZodCheckStartsWith",(e,t)=>{De.init(e,t);let r=new RegExp(`^${$r(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=_("$ZodCheckEndsWith",(e,t)=>{De.init(e,t);let r=new RegExp(`.*${$r(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 k_(e,t,r){e.issues.length&&t.issues.push(...gt(r,e.issues))}var Xp=_("$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=>k_(n,r,t.property));k_(o,r,t.property)}}),Qp=_("$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})}}),ef=_("$ZodCheckOverwrite",(e,t)=>{De.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var Ni=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 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 IS=X(),kM=_e(),xM={message:"property name must be valid",params:({params:e})=>(0,IS._)`{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,IS.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 EM=Ta(),OS=Lt(),M_=_e(),RS=q_(),IM={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 EM.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=IM});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 Ed=X(),DM=_e(),CM={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Ed._)`{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,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)})})}}};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 Id=X(),FS=_e(),LM={message:({params:e})=>(0,Id.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Id._)`{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,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 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=I_(),GM=kS(),KM=N_(),HM=SS(),BM=TS(),JM=ES(),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 E=l.$async?(0,Ze._)`(${f}.async ? await ${y}(${o}) : ${y}(${o}))`:(0,Ze._)`${y}(${o})`,P=(0,Ze._)`(typeof ${y} == "function" ? ${E} : ${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(E());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 E(){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 E=0;E<s.length;E++){let P=s[E];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,E)}if(!_)throw new Error(`discriminator: "${a}" must be required`);return p;function y({required:E}){return Array.isArray(E)&&E.includes(a)}function $(E,P){if(E.const)k(E.const,P);else if(E.enum)for(let ze of E.enum)k(ze,P);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function k(E,P){if(typeof E!="string"||E in p)throw new Error(`discriminator: "${a}" values must be unique strings`);p[E]=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 E4=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}},I4={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:I4,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 E4.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 EU(this)),this._costReports}get costs(){return this._costs||(this._costs=new IU(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)}},EU=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)}},IU=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:()=>Ec,$ZodTemplateLiteral:()=>Xc,$ZodTransform:()=>go,$ZodTuple:()=>Vr,$ZodType:()=>G,$ZodULID:()=>hc,$ZodURL:()=>lc,$ZodUUID:()=>cc,$ZodUndefined:()=>Ic,$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:()=>Iu,_stringbool:()=>Eu,_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:()=>ET,defineLazy:()=>ve,esc:()=>_n,escapeRegex:()=>wr,extend:()=>OT,finalizeIssue:()=>Et,floatSafeRemainder:()=>ep,getElementAtPath:()=>xT,getEnumValues:()=>Ti,getLengthableOrigin:()=>Ni,getParsedType:()=>zT,getSizableOrigin:()=>Ii,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:()=>IT,prefixIssues:()=>gt,primitiveTypes:()=>np,promiseAllObject:()=>ST,propertyKeyTypes:()=>Ei,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}`)}},Ei=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 ET(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 IT(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 Et(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 Ii(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=>Et(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=>Et(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=>Et(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=>Et(s,n,Ue())))}:{success:!0,data:i.value}},Ur=tc(uo);var Lr={};mn(Lr,{_emoji:()=>wv,base64:()=>$p,base64url:()=>rc,bigint:()=>Ep,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:()=>Ip,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}$`)},Ep=/^\d+n?$/,Ip=/^\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=Ip)}),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:Ii(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:Ii(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:Ii(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(`
|
|
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
|
|
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=Ep,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)}),Ec=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}}),Ic=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 E=_n($);h.write(`
|
|
20
20
|
if (${k}.issues.length) {
|
|
21
21
|
if (input[${E}] === undefined) {
|
|
22
22
|
if (${E} in input) {
|
|
@@ -35,24 +35,337 @@
|
|
|
35
35
|
} else {
|
|
36
36
|
newResult[${E}] = ${k}.value;
|
|
37
37
|
}
|
|
38
|
-
`)}else{let k=f[
|
|
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
|
-
path: iss.path ? [${
|
|
42
|
-
})));`),h.write(`newResult[${vn(w)}] = ${k}.value`)}h.write("payload.value = newResult;"),h.write("return payload;");let y=h.compile();return(w,k)=>y(d,w,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 E of l.keys){let P=k[E],ze=P._zod.run({value:m[E],issues:[]},h),Me=P._zod.optin==="optional"&&P._zod.optout==="optional";ze instanceof Promise?p.push(ze.then(ir=>Me?P_(ir,d,E,m):ic(ir,d,E))):Me?P_(ze,d,E,m):ic(ze,d,E)}}if(!u)return p.length?Promise.all(p).then(()=>d):d;let f=[],v=l.keySet,y=u._zod,w=y.def.type;for(let k of Object.keys(m)){if(v.has(k))continue;if(w==="never"){f.push(k);continue}let E=y.run({value:m[k],issues:[]},h);E instanceof Promise?p.push(E.then(P=>ic(P,d,k))):ic(E,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 z_(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,Ue())))}),t}var Di=_("$ZodUnion",(e,t)=>{W.init(e,t),_e(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),_e(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),_e(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),_e(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=>z_(s,r,e,o)):z_(i,r,e,o)}}),Ac=_("$ZodDiscriminatedUnion",(e,t)=>{Di.init(e,t);let r=e._zod.parse;_e(e._zod,"propValues",()=>{let n={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[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)}}),Dc=_("$ZodIntersection",(e,t)=>{W.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])=>E_(r,c,u)):E_(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 E_(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),_n(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 Lr=_("$ZodTuple",(e,t)=>{W.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=_("$ZodRecord",(e,t)=>{W.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,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=_("$ZodMap",(e,t)=>{W.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])=>{I_(l,d,r,s,n,e,o)})):I_(c,u,r,s,n,e,o)}return i.length?Promise.all(i).then(()=>r):r}});function I_(e,t,r,o,n,i,s){e.issues.length&&(Ei.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,Ue()))})),t.issues.length&&(Ei.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,Ue()))})),r.value.set(e.value,t.value)}var Uc=_("$ZodSet",(e,t)=>{W.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=>O_(c,r))):O_(a,r)}return i.length?Promise.all(i).then(()=>r):r}});function O_(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var Zc=_("$ZodEnum",(e,t)=>{W.init(e,t);let r=Ti(t.entries);e._zod.values=new Set(r),e._zod.pattern=new RegExp(`^(${r.filter(o=>Ei.has(typeof o)).map(o=>typeof o=="string"?$r(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}}),Vc=_("$ZodLiteral",(e,t)=>{W.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?$r(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}}),Lc=_("$ZodFile",(e,t)=>{W.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=_("$ZodTransform",(e,t)=>{W.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=_("$ZodOptional",(e,t)=>{W.init(e,t),e._zod.optin="optional",e._zod.optout="optional",_e(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),_e(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${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)}),Gc=_("$ZodNullable",(e,t)=>{W.init(e,t),_e(e._zod,"optin",()=>t.innerType._zod.optin),_e(e._zod,"optout",()=>t.innerType._zod.optout),_e(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${zi(r.source)}|null)$`):void 0}),_e(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:t.innerType._zod.run(r,o)}),Wc=_("$ZodDefault",(e,t)=>{W.init(e,t),e._zod.optin="optional",_e(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=>j_(i,t)):j_(n,t)}});function j_(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Kc=_("$ZodPrefault",(e,t)=>{W.init(e,t),e._zod.optin="optional",_e(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=_("$ZodNonOptional",(e,t)=>{W.init(e,t),_e(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>N_(i,e)):N_(n,e)}});function N_(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 Jc=_("$ZodSuccess",(e,t)=>{W.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)}}),Bc=_("$ZodCatch",(e,t)=>{W.init(e,t),e._zod.optin="optional",_e(e._zod,"optout",()=>t.innerType._zod.optout),_e(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{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,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=>Et(i,o,Ue()))},input:r.value}),r.issues=[]),r)}}),Yc=_("$ZodNaN",(e,t)=>{W.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)}),vo=_("$ZodPipe",(e,t)=>{W.init(e,t),_e(e._zod,"values",()=>t.in._zod.values),_e(e._zod,"optin",()=>t.in._zod.optin),_e(e._zod,"optout",()=>t.out._zod.optout),e._zod.parse=(r,o)=>{let n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>R_(i,t,o)):R_(n,t,o)}});function R_(e,t,r){return _n(e)?e:t.out._zod.run({value:e.value,issues:e.issues},r)}var Xc=_("$ZodReadonly",(e,t)=>{W.init(e,t),_e(e._zod,"propValues",()=>t.innerType._zod.propValues),_e(e._zod,"values",()=>t.innerType._zod.values),_e(e._zod,"optin",()=>t.innerType._zod.optin),_e(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(C_):C_(n)}});function C_(e){return e.value=Object.freeze(e.value),e}var Qc=_("$ZodTemplateLiteral",(e,t)=>{W.init(e,t);let r=[];for(let o of t.parts)if(o instanceof W){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($r(`${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=_("$ZodPromise",(e,t)=>{W.init(e,t),e._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},o))}),tu=_("$ZodLazy",(e,t)=>{W.init(e,t),_e(e._zod,"innerType",()=>t.getter()),_e(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),_e(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),_e(e._zod,"optin",()=>e._zod.innerType._zod.optin),_e(e._zod,"optout",()=>e._zod.innerType._zod.optout),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o)}),ru=_("$ZodCustom",(e,t)=>{De.init(e,t),W.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=>A_(i,r,o,e));A_(n,r,o,e)}});function A_(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 _o={};mn(_o,{ar:()=>U_,az:()=>Z_,be:()=>L_,ca:()=>F_,cs:()=>G_,de:()=>W_,en:()=>nu,eo:()=>K_,es:()=>H_,fa:()=>J_,fi:()=>B_,fr:()=>Y_,frCA:()=>X_,he:()=>Q_,hu:()=>ey,id:()=>ty,it:()=>ry,ja:()=>ny,kh:()=>oy,ko:()=>iy,mk:()=>sy,ms:()=>ay,nl:()=>cy,no:()=>uy,ota:()=>ly,pl:()=>py,ps:()=>dy,pt:()=>fy,ru:()=>hy,sl:()=>gy,sv:()=>vy,ta:()=>_y,th:()=>yy,tr:()=>by,ua:()=>$y,ur:()=>wy,vi:()=>ky,zhCN:()=>xy,zhTW:()=>Sy});var GT=()=>{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 ${R(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 U_(){return{localeError:GT()}}var WT=()=>{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 ${R(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 Z_(){return{localeError:WT()}}function V_(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 KT=()=>{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 ${R(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=V_(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=V_(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 L_(){return{localeError:KT()}}var HT=()=>{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 ${R(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 F_(){return{localeError:HT()}}var JT=()=>{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 ${R(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 G_(){return{localeError:JT()}}var BT=()=>{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 ${R(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 W_(){return{localeError:BT()}}var YT=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},XT=()=>{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 ${YT(o.input)}`;case"invalid_value":return o.values.length===1?`Invalid input: expected ${R(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:XT()}}var QT=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},eP=()=>{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 ${QT(o.input)}`;case"invalid_value":return o.values.length===1?`Nevalida enigo: atendi\u011Dis ${R(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 K_(){return{localeError:eP()}}var tP=()=>{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 ${R(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 H_(){return{localeError:tP()}}var rP=()=>{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 ${R(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 J_(){return{localeError:rP()}}var nP=()=>{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 ${R(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 B_(){return{localeError:nP()}}var oP=()=>{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 : ${R(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 Y_(){return{localeError:oP()}}var iP=()=>{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 ${R(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 X_(){return{localeError:iP()}}var sP=()=>{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 ${R(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 Q_(){return{localeError:sP()}}var aP=()=>{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 ${R(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 ey(){return{localeError:aP()}}var cP=()=>{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 ${R(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 ty(){return{localeError:cP()}}var uP=()=>{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 ${R(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 ry(){return{localeError:uP()}}var lP=()=>{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: ${R(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 ny(){return{localeError:lP()}}var dP=()=>{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 ${R(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 oy(){return{localeError:dP()}}var pP=()=>{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 ${R(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 iy(){return{localeError:pP()}}var fP=()=>{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 ${R(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 sy(){return{localeError:fP()}}var mP=()=>{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 ${R(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 ay(){return{localeError:mP()}}var hP=()=>{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 ${R(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 cy(){return{localeError:hP()}}var gP=()=>{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 ${R(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 uy(){return{localeError:gP()}}var vP=()=>{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 ${R(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 ly(){return{localeError:vP()}}var _P=()=>{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 ${R(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 dy(){return{localeError:_P()}}var yP=()=>{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 ${R(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 py(){return{localeError:yP()}}var bP=()=>{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 ${R(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 fy(){return{localeError:bP()}}function my(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 $P=()=>{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 ${R(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=my(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=my(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 hy(){return{localeError:$P()}}var wP=()=>{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 ${R(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 gy(){return{localeError:wP()}}var kP=()=>{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 ${R(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:kP()}}var xP=()=>{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 ${R(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 _y(){return{localeError:xP()}}var SP=()=>{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 ${R(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 yy(){return{localeError:SP()}}var TP=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},PP=()=>{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 ${TP(o.input)}`;case"invalid_value":return o.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${R(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 by(){return{localeError:PP()}}var zP=()=>{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 ${R(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:zP()}}var EP=()=>{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: ${R(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 wy(){return{localeError:EP()}}var IP=()=>{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 ${R(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 ky(){return{localeError:IP()}}var OP=()=>{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 ${R(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 xy(){return{localeError:OP()}}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 ${R(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 Sy(){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 Wt=qi();function su(e,t){return new e({type:"string",...O(t)})}function uf(e,t){return new e({type:"string",coerce:!0,...O(t)})}function Mi(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 Ui(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...O(t)})}function Zi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...O(t)})}function Vi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...O(t)})}function Li(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...O(t)})}function Fi(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...O(t)})}function Gi(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...O(t)})}function Wi(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...O(t)})}function Ki(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...O(t)})}function Hi(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...O(t)})}function Ji(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...O(t)})}function Bi(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...O(t)})}function Yi(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...O(t)})}function Xi(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...O(t)})}function Qi(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...O(t)})}function es(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...O(t)})}function ts(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...O(t)})}function rs(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...O(t)})}function ns(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...O(t)})}function os(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...O(t)})}function is(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...O(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,...O(t)})}function df(e,t){return new e({type:"string",format:"date",check:"string_format",...O(t)})}function pf(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...O(t)})}function ff(e,t){return new e({type:"string",format:"duration",check:"string_format",...O(t)})}function cu(e,t){return new e({type:"number",checks:[],...O(t)})}function mf(e,t){return new e({type:"number",coerce:!0,checks:[],...O(t)})}function uu(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...O(t)})}function lu(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...O(t)})}function du(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...O(t)})}function pu(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...O(t)})}function fu(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...O(t)})}function mu(e,t){return new e({type:"boolean",...O(t)})}function hf(e,t){return new e({type:"boolean",coerce:!0,...O(t)})}function hu(e,t){return new e({type:"bigint",...O(t)})}function gf(e,t){return new e({type:"bigint",coerce:!0,...O(t)})}function gu(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...O(t)})}function vu(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...O(t)})}function _u(e,t){return new e({type:"symbol",...O(t)})}function yu(e,t){return new e({type:"undefined",...O(t)})}function bu(e,t){return new e({type:"null",...O(t)})}function $u(e){return new e({type:"any"})}function kn(e){return new e({type:"unknown"})}function wu(e,t){return new e({type:"never",...O(t)})}function ku(e,t){return new e({type:"void",...O(t)})}function xu(e,t){return new e({type:"date",...O(t)})}function vf(e,t){return new e({type:"date",coerce:!0,...O(t)})}function Su(e,t){return new e({type:"nan",...O(t)})}function wr(e,t){return new nc({check:"less_than",...O(t),value:e,inclusive:!1})}function jt(e,t){return new nc({check:"less_than",...O(t),value:e,inclusive:!0})}function kr(e,t){return new oc({check:"greater_than",...O(t),value:e,inclusive:!1})}function vt(e,t){return new oc({check:"greater_than",...O(t),value:e,inclusive:!0})}function _f(e){return kr(0,e)}function yf(e){return wr(0,e)}function bf(e){return jt(0,e)}function $f(e){return vt(0,e)}function xn(e,t){return new Dp({check:"multiple_of",...O(t),value:e})}function $o(e,t){return new Up({check:"max_size",...O(t),maximum:e})}function Sn(e,t){return new Zp({check:"min_size",...O(t),minimum:e})}function ss(e,t){return new Vp({check:"size_equals",...O(t),size:e})}function wo(e,t){return new Lp({check:"max_length",...O(t),maximum:e})}function Fr(e,t){return new Fp({check:"min_length",...O(t),minimum:e})}function ko(e,t){return new Gp({check:"length_equals",...O(t),length:e})}function as(e,t){return new Wp({check:"string_format",format:"regex",...O(t),pattern:e})}function cs(e){return new Kp({check:"string_format",format:"lowercase",...O(e)})}function us(e){return new Hp({check:"string_format",format:"uppercase",...O(e)})}function ls(e,t){return new Jp({check:"string_format",format:"includes",...O(t),includes:e})}function ds(e,t){return new Bp({check:"string_format",format:"starts_with",...O(t),prefix:e})}function ps(e,t){return new Yp({check:"string_format",format:"ends_with",...O(t),suffix:e})}function wf(e,t,r){return new Xp({check:"property",property:e,schema:t,...O(r)})}function fs(e,t){return new Qp({check:"mime_type",mime:e,...O(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 vs(){return xr(e=>e.toUpperCase())}function _s(e,t,r){return new e({type:"array",element:t,...O(r)})}function NP(e,t,r){return new e({type:"union",options:t,...O(r)})}function RP(e,t,r,o){return new e({type:"union",options:r,discriminator:t,...O(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 W,i=n?o:r,s=n?r:null;return new e({type:"tuple",items:t,rest:s,...O(i)})}function AP(e,t,r,o){return new e({type:"record",keyType:t,valueType:r,...O(o)})}function DP(e,t,r,o){return new e({type:"map",keyType:t,valueType:r,...O(o)})}function qP(e,t,r){return new e({type:"set",valueType:t,...O(r)})}function MP(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 UP(e,t,r){return new e({type:"enum",entries:t,...O(r)})}function ZP(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...O(r)})}function Tu(e,t){return new e({type:"file",...O(t)})}function VP(e,t){return new e({type:"transform",transform:t})}function LP(e,t){return new e({type:"optional",innerType:t})}function FP(e,t){return new e({type:"nullable",innerType:t})}function GP(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():r}})}function WP(e,t,r){return new e({type:"nonoptional",innerType:t,...O(r)})}function KP(e,t){return new e({type:"success",innerType:t})}function HP(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function JP(e,t,r){return new e({type:"pipe",in:t,out:r})}function BP(e,t){return new e({type:"readonly",innerType:t})}function YP(e,t,r){return new e({type:"template_literal",parts:t,...O(r)})}function XP(e,t){return new e({type:"lazy",getter:t})}function QP(e,t){return new e({type:"promise",innerType:t})}function Pu(e,t,r){let o=O(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,...O(r)})}function Eu(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??vo,c=e.Boolean??mo,u=e.String??Vr,l=e.Transform??go,d=new l({type:"transform",transform:(p,f)=>{let v=p;return r.case!=="sensitive"&&(v=v.toLowerCase()),i.has(v)?!0:s.has(v)?!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 Iu(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 Ou=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 Lr({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 Ou({type:"function",input:Array.isArray(e?.input)?kf(Lr,e?.input):e?.input??_s(ho,kn(wn)),output:e?.output??kn(wn)})}var ys=class{constructor(t){this.counter=0,this.metadataRegistry=t?.metadata??Wt,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:v,format:y,patterns:w,contentEncoding:k}=t._zod.bag;if(typeof f=="number"&&(p.minLength=f),typeof v=="number"&&(p.maxLength=v),y&&(p.format=i[y]??y,p.format===""&&delete p.format),k&&(p.contentEncoding=k),w&&w.size>0){let E=[...w];E.length===1?p.pattern=E[0].source:E.length>1&&(a.schema.allOf=[...E.map(P=>({...this.target==="draft-7"?{type:"string"}:{},pattern:P.source}))])}break}case"number":{let p=m,{minimum:f,maximum:v,format:y,multipleOf:w,exclusiveMaximum:k,exclusiveMinimum:E}=t._zod.bag;typeof y=="string"&&y.includes("int")?p.type="integer":p.type="number",typeof E=="number"&&(p.exclusiveMinimum=E),typeof f=="number"&&(p.minimum=f,typeof E=="number"&&(E>=f?delete p.minimum:delete p.exclusiveMinimum)),typeof k=="number"&&(p.exclusiveMaximum=k),typeof v=="number"&&(p.maximum=v,typeof k=="number"&&(k<=v?delete p.maximum:delete p.exclusiveMaximum)),typeof w=="number"&&(p.multipleOf=w);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:v}=t._zod.bag;typeof f=="number"&&(p.minItems=f),typeof v=="number"&&(p.maxItems=v),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 w in f)p.properties[w]=this.process(f[w],{...d,path:[...d.path,"properties",w]});let v=new Set(Object.keys(f)),y=new Set([...v].filter(w=>{let k=n.shape[w]._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,v)=>this.process(f,{...d,path:[...d.path,"anyOf",v]}));break}case"intersection":{let p=m,f=this.process(n.left,{...d,path:[...d.path,"allOf",0]}),v=this.process(n.right,{...d,path:[...d.path,"allOf",1]}),y=k=>"allOf"in k&&Object.keys(k).length===1,w=[...y(f)?f.allOf:[f],...y(v)?v.allOf:[v]];p.allOf=w;break}case"tuple":{let p=m;p.type="array";let f=n.items.map((w,k)=>this.process(w,{...d,path:[...d.path,"prefixItems",k]}));if(this.target==="draft-2020-12"?p.prefixItems=f:p.items=f,n.rest){let w=this.process(n.rest,{...d,path:[...d.path,"items"]});this.target==="draft-2020-12"?p.items=w:p.additionalItems=w}n.rest&&(p.items=this.process(n.rest,{...d,path:[...d.path,"items"]}));let{minimum:v,maximum:y}=t._zod.bag;typeof v=="number"&&(p.minItems=v),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(v=>typeof v=="number")&&(p.type="number"),f.every(v=>typeof v=="string")&&(p.type="string"),p.enum=f;break}case"literal":{let p=m,f=[];for(let v of n.values)if(v===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof v=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");f.push(Number(v))}else f.push(v);if(f.length!==0)if(f.length===1){let v=f[0];p.type=v===null?"null":typeof v,p.const=v}else f.every(v=>typeof v=="number")&&(p.type="number"),f.every(v=>typeof v=="string")&&(p.type="string"),f.every(v=>typeof v=="boolean")&&(p.type="string"),f.every(v=>v===null)&&(p.type="null"),p.enum=f;break}case"file":{let p=m,f={type:"string",format:"binary",contentEncoding:"binary"},{minimum:v,maximum:y,mime:w}=t._zod.bag;v!==void 0&&(f.minLength=v),y!==void 0&&(f.maxLength=y),w?w.length===1?(f.contentMediaType=w[0],Object.assign(p,f)):p.anyOf=w.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,v=o.external.uri??(w=>w);if(f)return{ref:v(f)};let y=l[1].defId??l[1].schema.id??`schema${this.counter++}`;return l[1].defId=y,{defId:y,ref:`${v("__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>
|
|
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 E of l.keys){let P=k[E],ze=P._zod.run({value:m[E],issues:[]},h),Me=P._zod.optin==="optional"&&P._zod.optout==="optional";ze instanceof Promise?p.push(ze.then(ir=>Me?zv(ir,d,E,m):ic(ir,d,E))):Me?zv(ze,d,E,m):ic(ze,d,E)}}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 E=y.run({value:m[k],issues:[]},h);E instanceof Promise?p.push(E.then(P=>ic(P,d,k))):ic(E,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 Ev(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,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=>Ev(s,r,e,o)):Ev(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])=>Iv(r,c,u)):Iv(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 Iv(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=>Et(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&&(Ei.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,Ue()))})),t.issues.length&&(Ei.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,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=>Ei.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=>Et(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=>Et(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},EP=()=>{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:EP()}}var IP=()=>{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:IP()}}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 Eu(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 Iu(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 E=[...$];E.length===1?p.pattern=E[0].source:E.length>1&&(a.schema.allOf=[...E.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:E}=t._zod.bag;typeof y=="string"&&y.includes("int")?p.type="integer":p.type="number",typeof E=="number"&&(p.exclusiveMinimum=E),typeof f=="number"&&(p.minimum=f,typeof E=="number"&&(E>=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>
|
|
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 v=this.seen.get(f).schema;v.$ref&&d.target==="draft-7"?(m.allOf=m.allOf??[],m.allOf.push(v)):(Object.assign(m,v),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 Ty={};var tz=_("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");W.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 rz=_("ZodMiniObject",(e,t)=>{Ai.init(e,t),tz.init(e,t),N.defineLazy(e,"shape",()=>t.shape)});function xf(e,t){let r={type:"object",get shape(){return N.assignProp(this,"shape",{...e}),this.shape},...N.normalizeParams(t)};return new rz(r)}function Nt(e){return!!e._zod}function Tn(e){let t=Object.values(e);if(t.length===0)return xf({});let r=t.every(Nt),o=t.every(n=>!Nt(n));if(r)return xf(e);if(o)return v_(e);throw new Error("Mixed Zod versions detected in object shape.")}function Gr(e,t){return Nt(e)?Mr(e,t):e.safeParse(t)}async function Nu(e,t){return Nt(e)?await Ur(e,t):await e.safeParseAsync(t)}function Wr(e){if(!e)return;let t;if(Nt(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(Nt(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 Ru(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 Py(e){return e.description}function zy(e){if(Nt(e))return e._zod?.def?.type==="optional";let t=e;return typeof e.isOptional=="function"?e.isOptional():t._def?.typeName==="ZodOptional"}function Cu(e){if(Nt(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:()=>Cy,ZodArray:()=>My,ZodBase64:()=>Hf,ZodBase64URL:()=>Jf,ZodBigInt:()=>xs,ZodBigIntFormat:()=>Xf,ZodBoolean:()=>ks,ZodCIDRv4:()=>Wf,ZodCIDRv6:()=>Kf,ZodCUID:()=>Mf,ZodCUID2:()=>Uf,ZodCatch:()=>eb,ZodCustom:()=>Ku,ZodCustomStringFormat:()=>Oy,ZodDate:()=>Fu,ZodDefault:()=>Hy,ZodDiscriminatedUnion:()=>Uy,ZodE164:()=>Bf,ZodEmail:()=>Cf,ZodEmoji:()=>Df,ZodEnum:()=>bs,ZodError:()=>iz,ZodFile:()=>Wy,ZodGUID:()=>Uu,ZodIPv4:()=>Ff,ZodIPv6:()=>Gf,ZodISODate:()=>Du,ZodISODateTime:()=>Au,ZodISODuration:()=>Mu,ZodISOTime:()=>qu,ZodIntersection:()=>Zy,ZodIssueCode:()=>oE,ZodJWT:()=>Yf,ZodKSUID:()=>Lf,ZodLazy:()=>sb,ZodLiteral:()=>Gy,ZodMap:()=>Ly,ZodNaN:()=>rb,ZodNanoID:()=>qf,ZodNever:()=>Dy,ZodNonOptional:()=>om,ZodNull:()=>Ry,ZodNullable:()=>Ky,ZodNumber:()=>ws,ZodNumberFormat:()=>zo,ZodObject:()=>Gu,ZodOptional:()=>nm,ZodPipe:()=>im,ZodPrefault:()=>By,ZodPromise:()=>cb,ZodReadonly:()=>nb,ZodRealError:()=>Po,ZodRecord:()=>em,ZodSet:()=>Fy,ZodString:()=>$s,ZodStringFormat:()=>Ee,ZodSuccess:()=>Qy,ZodSymbol:()=>jy,ZodTemplateLiteral:()=>ib,ZodTransform:()=>tm,ZodTuple:()=>Vy,ZodType:()=>te,ZodULID:()=>Zf,ZodURL:()=>Af,ZodUUID:()=>Sr,ZodUndefined:()=>Ny,ZodUnion:()=>Qf,ZodUnknown:()=>Ay,ZodVoid:()=>qy,ZodXID:()=>Vf,_ZodString:()=>Rf,_default:()=>Jy,any:()=>Mz,array:()=>ae,base64:()=>Sz,base64url:()=>Tz,bigint:()=>Rz,boolean:()=>Le,catch:()=>tb,check:()=>ub,cidrv4:()=>kz,cidrv6:()=>xz,clone:()=>et,coerce:()=>am,config:()=>Ue,core:()=>Kt,cuid:()=>gz,cuid2:()=>vz,custom:()=>sm,date:()=>Zz,discriminatedUnion:()=>Wu,e164:()=>Pz,email:()=>az,emoji:()=>mz,endsWith:()=>ps,enum:()=>lt,file:()=>Jz,flattenError:()=>lo,float32:()=>Iz,float64:()=>Oz,formatError:()=>po,function:()=>ju,getErrorMap:()=>sE,globalRegistry:()=>Wt,gt:()=>kr,gte:()=>vt,guid:()=>cz,includes:()=>ls,instanceof:()=>tE,int:()=>Nf,int32:()=>jz,int64:()=>Cz,intersection:()=>Ts,ipv4:()=>$z,ipv6:()=>wz,iso:()=>To,json:()=>nE,jwt:()=>zz,keyof:()=>Vz,ksuid:()=>bz,lazy:()=>ab,length:()=>ko,literal:()=>M,locales:()=>_o,looseObject:()=>tt,lowercase:()=>cs,lt:()=>wr,lte:()=>jt,map:()=>Wz,maxLength:()=>wo,maxSize:()=>$o,mime:()=>fs,minLength:()=>Fr,minSize:()=>Sn,multipleOf:()=>xn,nan:()=>Xz,nanoid:()=>hz,nativeEnum:()=>Hz,negative:()=>yf,never:()=>Lu,nonnegative:()=>$f,nonoptional:()=>Xy,nonpositive:()=>bf,normalize:()=>ms,null:()=>Ss,nullable:()=>Zu,nullish:()=>Bz,number:()=>ye,object:()=>D,optional:()=>je,overwrite:()=>xr,parse:()=>Ef,parseAsync:()=>If,partialRecord:()=>Gz,pipe:()=>Vu,positive:()=>_f,prefault:()=>Yy,preprocess:()=>Hu,prettifyError:()=>Ya,promise:()=>eE,property:()=>wf,readonly:()=>ob,record:()=>Ie,refine:()=>lb,regex:()=>as,regexes:()=>Zr,registry:()=>qi,safeParse:()=>Of,safeParseAsync:()=>jf,set:()=>Kz,setErrorMap:()=>iE,size:()=>ss,startsWith:()=>ds,strictObject:()=>Lz,string:()=>b,stringFormat:()=>Ez,stringbool:()=>rE,success:()=>Yz,superRefine:()=>db,symbol:()=>Dz,templateLiteral:()=>Qz,toJSONSchema:()=>xo,toLowerCase:()=>gs,toUpperCase:()=>vs,transform:()=>rm,treeifyError:()=>Ba,trim:()=>hs,tuple:()=>Fz,uint32:()=>Nz,uint64:()=>Az,ulid:()=>_z,undefined:()=>qz,union:()=>be,unknown:()=>Oe,uppercase:()=>us,url:()=>fz,uuid:()=>uz,uuidv4:()=>lz,uuidv6:()=>dz,uuidv7:()=>pz,void:()=>Uz,xid:()=>yz});var To={};mn(To,{ZodISODate:()=>Du,ZodISODateTime:()=>Au,ZodISODuration:()=>Mu,ZodISOTime:()=>qu,date:()=>Tf,datetime:()=>Sf,duration:()=>zf,time:()=>Pf});var Au=_("ZodISODateTime",(e,t)=>{nf.init(e,t),Ee.init(e,t)});function Sf(e){return lf(Au,e)}var Du=_("ZodISODate",(e,t)=>{of.init(e,t),Ee.init(e,t)});function Tf(e){return df(Du,e)}var qu=_("ZodISOTime",(e,t)=>{sf.init(e,t),Ee.init(e,t)});function Pf(e){return pf(qu,e)}var Mu=_("ZodISODuration",(e,t)=>{af.init(e,t),Ee.init(e,t)});function zf(e){return ff(Mu,e)}var Iy=(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}}})},iz=_("ZodError",Iy),Po=_("ZodError",Iy,{Parent:Error});var Ef=Xa(Po),If=Qa(Po),Of=ec(Po),jf=tc(Po);var te=_("ZodType",(e,t)=>(W.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)=>Ef(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>Of(e,r,o),e.parseAsync=async(r,o)=>If(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>jf(e,r,o),e.spa=e.safeParseAsync,e.refine=(r,o)=>e.check(lb(r,o)),e.superRefine=r=>e.check(db(r)),e.overwrite=r=>e.check(xr(r)),e.optional=()=>je(e),e.nullable=()=>Zu(e),e.nullish=()=>je(Zu(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=>Vu(e,rm(r)),e.default=r=>Jy(e,r),e.prefault=r=>Yy(e,r),e.catch=r=>tb(e,r),e.pipe=r=>Vu(e,r),e.readonly=()=>ob(e),e.describe=r=>{let o=e.clone();return Wt.add(o,{description:r}),o},Object.defineProperty(e,"description",{get(){return Wt.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Wt.get(e);let o=e.clone();return Wt.add(o,r[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Rf=_("_ZodString",(e,t)=>{Vr.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(wo(...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(vs())}),$s=_("ZodString",(e,t)=>{Vr.init(e,t),Rf.init(e,t),e.email=r=>e.check(Mi(Cf,r)),e.url=r=>e.check(Fi(Af,r)),e.jwt=r=>e.check(is(Yf,r)),e.emoji=r=>e.check(Gi(Df,r)),e.guid=r=>e.check(bo(Uu,r)),e.uuid=r=>e.check(Ui(Sr,r)),e.uuidv4=r=>e.check(Zi(Sr,r)),e.uuidv6=r=>e.check(Vi(Sr,r)),e.uuidv7=r=>e.check(Li(Sr,r)),e.nanoid=r=>e.check(Wi(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(Ji(Zf,r)),e.base64=r=>e.check(rs(Hf,r)),e.base64url=r=>e.check(ns(Jf,r)),e.xid=r=>e.check(Bi(Vf,r)),e.ksuid=r=>e.check(Yi(Lf,r)),e.ipv4=r=>e.check(Xi(Ff,r)),e.ipv6=r=>e.check(Qi(Gf,r)),e.cidrv4=r=>e.check(es(Wf,r)),e.cidrv6=r=>e.check(ts(Kf,r)),e.e164=r=>e.check(os(Bf,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($s,e)}var Ee=_("ZodStringFormat",(e,t)=>{ke.init(e,t),Rf.init(e,t)}),Cf=_("ZodEmail",(e,t)=>{uc.init(e,t),Ee.init(e,t)});function az(e){return Mi(Cf,e)}var Uu=_("ZodGUID",(e,t)=>{ac.init(e,t),Ee.init(e,t)});function cz(e){return bo(Uu,e)}var Sr=_("ZodUUID",(e,t)=>{cc.init(e,t),Ee.init(e,t)});function uz(e){return Ui(Sr,e)}function lz(e){return Zi(Sr,e)}function dz(e){return Vi(Sr,e)}function pz(e){return Li(Sr,e)}var Af=_("ZodURL",(e,t)=>{lc.init(e,t),Ee.init(e,t)});function fz(e){return Fi(Af,e)}var Df=_("ZodEmoji",(e,t)=>{dc.init(e,t),Ee.init(e,t)});function mz(e){return Gi(Df,e)}var qf=_("ZodNanoID",(e,t)=>{pc.init(e,t),Ee.init(e,t)});function hz(e){return Wi(qf,e)}var Mf=_("ZodCUID",(e,t)=>{fc.init(e,t),Ee.init(e,t)});function gz(e){return Ki(Mf,e)}var Uf=_("ZodCUID2",(e,t)=>{mc.init(e,t),Ee.init(e,t)});function vz(e){return Hi(Uf,e)}var Zf=_("ZodULID",(e,t)=>{hc.init(e,t),Ee.init(e,t)});function _z(e){return Ji(Zf,e)}var Vf=_("ZodXID",(e,t)=>{gc.init(e,t),Ee.init(e,t)});function yz(e){return Bi(Vf,e)}var Lf=_("ZodKSUID",(e,t)=>{vc.init(e,t),Ee.init(e,t)});function bz(e){return Yi(Lf,e)}var Ff=_("ZodIPv4",(e,t)=>{_c.init(e,t),Ee.init(e,t)});function $z(e){return Xi(Ff,e)}var Gf=_("ZodIPv6",(e,t)=>{yc.init(e,t),Ee.init(e,t)});function wz(e){return Qi(Gf,e)}var Wf=_("ZodCIDRv4",(e,t)=>{bc.init(e,t),Ee.init(e,t)});function kz(e){return es(Wf,e)}var Kf=_("ZodCIDRv6",(e,t)=>{$c.init(e,t),Ee.init(e,t)});function xz(e){return ts(Kf,e)}var Hf=_("ZodBase64",(e,t)=>{wc.init(e,t),Ee.init(e,t)});function Sz(e){return rs(Hf,e)}var Jf=_("ZodBase64URL",(e,t)=>{kc.init(e,t),Ee.init(e,t)});function Tz(e){return ns(Jf,e)}var Bf=_("ZodE164",(e,t)=>{xc.init(e,t),Ee.init(e,t)});function Pz(e){return os(Bf,e)}var Yf=_("ZodJWT",(e,t)=>{Sc.init(e,t),Ee.init(e,t)});function zz(e){return is(Yf,e)}var Oy=_("ZodCustomStringFormat",(e,t)=>{Tc.init(e,t),Ee.init(e,t)});function Ez(e,t,r={}){return Iu(Oy,e,t,r)}var ws=_("ZodNumber",(e,t)=>{Ri.init(e,t),te.init(e,t),e.gt=(o,n)=>e.check(kr(o,n)),e.gte=(o,n)=>e.check(vt(o,n)),e.min=(o,n)=>e.check(vt(o,n)),e.lt=(o,n)=>e.check(wr(o,n)),e.lte=(o,n)=>e.check(jt(o,n)),e.max=(o,n)=>e.check(jt(o,n)),e.int=o=>e.check(Nf(o)),e.safe=o=>e.check(Nf(o)),e.positive=o=>e.check(kr(0,o)),e.nonnegative=o=>e.check(vt(0,o)),e.negative=o=>e.check(wr(0,o)),e.nonpositive=o=>e.check(jt(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(ws,e)}var zo=_("ZodNumberFormat",(e,t)=>{Pc.init(e,t),ws.init(e,t)});function Nf(e){return uu(zo,e)}function Iz(e){return lu(zo,e)}function Oz(e){return du(zo,e)}function jz(e){return pu(zo,e)}function Nz(e){return fu(zo,e)}var ks=_("ZodBoolean",(e,t)=>{mo.init(e,t),te.init(e,t)});function Le(e){return mu(ks,e)}var xs=_("ZodBigInt",(e,t)=>{Ci.init(e,t),te.init(e,t),e.gte=(o,n)=>e.check(vt(o,n)),e.min=(o,n)=>e.check(vt(o,n)),e.gt=(o,n)=>e.check(kr(o,n)),e.gte=(o,n)=>e.check(vt(o,n)),e.min=(o,n)=>e.check(vt(o,n)),e.lt=(o,n)=>e.check(wr(o,n)),e.lte=(o,n)=>e.check(jt(o,n)),e.max=(o,n)=>e.check(jt(o,n)),e.positive=o=>e.check(kr(BigInt(0),o)),e.negative=o=>e.check(wr(BigInt(0),o)),e.nonpositive=o=>e.check(jt(BigInt(0),o)),e.nonnegative=o=>e.check(vt(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 Rz(e){return hu(xs,e)}var Xf=_("ZodBigIntFormat",(e,t)=>{zc.init(e,t),xs.init(e,t)});function Cz(e){return gu(Xf,e)}function Az(e){return vu(Xf,e)}var jy=_("ZodSymbol",(e,t)=>{Ec.init(e,t),te.init(e,t)});function Dz(e){return _u(jy,e)}var Ny=_("ZodUndefined",(e,t)=>{Ic.init(e,t),te.init(e,t)});function qz(e){return yu(Ny,e)}var Ry=_("ZodNull",(e,t)=>{Oc.init(e,t),te.init(e,t)});function Ss(e){return bu(Ry,e)}var Cy=_("ZodAny",(e,t)=>{jc.init(e,t),te.init(e,t)});function Mz(){return $u(Cy)}var Ay=_("ZodUnknown",(e,t)=>{wn.init(e,t),te.init(e,t)});function Oe(){return kn(Ay)}var Dy=_("ZodNever",(e,t)=>{Nc.init(e,t),te.init(e,t)});function Lu(e){return wu(Dy,e)}var qy=_("ZodVoid",(e,t)=>{Rc.init(e,t),te.init(e,t)});function Uz(e){return ku(qy,e)}var Fu=_("ZodDate",(e,t)=>{Cc.init(e,t),te.init(e,t),e.min=(o,n)=>e.check(vt(o,n)),e.max=(o,n)=>e.check(jt(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 Zz(e){return xu(Fu,e)}var My=_("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(wo(r,o)),e.length=(r,o)=>e.check(ko(r,o)),e.unwrap=()=>e.element});function ae(e,t){return _s(My,e,t)}function Vz(e){let t=e._zod.def.shape;return M(Object.keys(t))}var Gu=_("ZodObject",(e,t)=>{Ai.init(e,t),te.init(e,t),N.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:Oe()}),e.loose=()=>e.clone({...e._zod.def,catchall:Oe()}),e.strict=()=>e.clone({...e._zod.def,catchall:Lu()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>N.extend(e,r),e.merge=r=>N.merge(e,r),e.pick=r=>N.pick(e,r),e.omit=r=>N.omit(e,r),e.partial=(...r)=>N.partial(nm,e,r[0]),e.required=(...r)=>N.required(om,e,r[0])});function D(e,t){let r={type:"object",get shape(){return N.assignProp(this,"shape",{...e}),this.shape},...N.normalizeParams(t)};return new Gu(r)}function Lz(e,t){return new Gu({type:"object",get shape(){return N.assignProp(this,"shape",{...e}),this.shape},catchall:Lu(),...N.normalizeParams(t)})}function tt(e,t){return new Gu({type:"object",get shape(){return N.assignProp(this,"shape",{...e}),this.shape},catchall:Oe(),...N.normalizeParams(t)})}var Qf=_("ZodUnion",(e,t)=>{Di.init(e,t),te.init(e,t),e.options=t.options});function be(e,t){return new Qf({type:"union",options:e,...N.normalizeParams(t)})}var Uy=_("ZodDiscriminatedUnion",(e,t)=>{Qf.init(e,t),Ac.init(e,t)});function Wu(e,t,r){return new Uy({type:"union",options:t,discriminator:e,...N.normalizeParams(r)})}var Zy=_("ZodIntersection",(e,t)=>{Dc.init(e,t),te.init(e,t)});function Ts(e,t){return new Zy({type:"intersection",left:e,right:t})}var Vy=_("ZodTuple",(e,t)=>{Lr.init(e,t),te.init(e,t),e.rest=r=>e.clone({...e._zod.def,rest:r})});function Fz(e,t,r){let o=t instanceof W,n=o?r:t,i=o?t:null;return new Vy({type:"tuple",items:e,rest:i,...N.normalizeParams(n)})}var em=_("ZodRecord",(e,t)=>{qc.init(e,t),te.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Ie(e,t,r){return new em({type:"record",keyType:e,valueType:t,...N.normalizeParams(r)})}function Gz(e,t,r){return new em({type:"record",keyType:be([e,Lu()]),valueType:t,...N.normalizeParams(r)})}var Ly=_("ZodMap",(e,t)=>{Mc.init(e,t),te.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Wz(e,t,r){return new Ly({type:"map",keyType:e,valueType:t,...N.normalizeParams(r)})}var Fy=_("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($o(...r)),e.size=(...r)=>e.check(ss(...r))});function Kz(e,t){return new Fy({type:"set",valueType:e,...N.normalizeParams(t)})}var bs=_("ZodEnum",(e,t)=>{Zc.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:[],...N.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:[],...N.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,...N.normalizeParams(t)})}function Hz(e,t){return new bs({type:"enum",entries:e,...N.normalizeParams(t)})}var Gy=_("ZodLiteral",(e,t)=>{Vc.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],...N.normalizeParams(t)})}var Wy=_("ZodFile",(e,t)=>{Lc.init(e,t),te.init(e,t),e.min=(r,o)=>e.check(Sn(r,o)),e.max=(r,o)=>e.check($o(r,o)),e.mime=(r,o)=>e.check(fs(Array.isArray(r)?r:[r],o))});function Jz(e){return Tu(Wy,e)}var tm=_("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(N.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(N.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=_("ZodOptional",(e,t)=>{Fc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function je(e){return new nm({type:"optional",innerType:e})}var Ky=_("ZodNullable",(e,t)=>{Gc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Zu(e){return new Ky({type:"nullable",innerType:e})}function Bz(e){return je(Zu(e))}var Hy=_("ZodDefault",(e,t)=>{Wc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Jy(e,t){return new Hy({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}var By=_("ZodPrefault",(e,t)=>{Kc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Yy(e,t){return new By({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}var om=_("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,...N.normalizeParams(t)})}var Qy=_("ZodSuccess",(e,t)=>{Jc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Yz(e){return new Qy({type:"success",innerType:e})}var eb=_("ZodCatch",(e,t)=>{Bc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function tb(e,t){return new eb({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var rb=_("ZodNaN",(e,t)=>{Yc.init(e,t),te.init(e,t)});function Xz(e){return Su(rb,e)}var im=_("ZodPipe",(e,t)=>{vo.init(e,t),te.init(e,t),e.in=t.in,e.out=t.out});function Vu(e,t){return new im({type:"pipe",in:e,out:t})}var nb=_("ZodReadonly",(e,t)=>{Xc.init(e,t),te.init(e,t)});function ob(e){return new nb({type:"readonly",innerType:e})}var ib=_("ZodTemplateLiteral",(e,t)=>{Qc.init(e,t),te.init(e,t)});function Qz(e,t){return new ib({type:"template_literal",parts:e,...N.normalizeParams(t)})}var sb=_("ZodLazy",(e,t)=>{tu.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.getter()});function ab(e){return new sb({type:"lazy",getter:e})}var cb=_("ZodPromise",(e,t)=>{eu.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function eE(e){return new cb({type:"promise",innerType:e})}var Ku=_("ZodCustom",(e,t)=>{ru.init(e,t),te.init(e,t)});function ub(e){let t=new De({check:"custom"});return t._zod.check=e,t}function sm(e,t){return Pu(Ku,e??(()=>!0),t)}function lb(e,t={}){return zu(Ku,e,t)}function db(e){let t=ub(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(N.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(N.issue(n))}},e(r.value,r)));return t}function tE(e,t={error:`Input not instance of ${e.name}`}){let r=new Ku({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...N.normalizeParams(t)});return r._zod.bag.Class=e,r}var rE=(...e)=>Eu({Pipe:im,Boolean:ks,String:$s,Transform:tm},...e);function nE(e){let t=ab(()=>be([b(e),ye(),Le(),Ss(),ae(t),Ie(b(),t)]));return t}function Hu(e,t){return Vu(rm(e),t)}var oE={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 iE(e){Ue({customError:e})}function sE(){return Ue().customError}var am={};mn(am,{bigint:()=>lE,boolean:()=>uE,date:()=>dE,number:()=>cE,string:()=>aE});function aE(e){return uf($s,e)}function cE(e){return mf(ws,e)}function uE(e){return hf(ks,e)}function lE(e){return gf(xs,e)}function dE(e){return vf(Fu,e)}Ue(nu());var pb=cm;var g=pb;var lm="2025-11-25";var fb=[lm,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Kr="io.modelcontextprotocol/related-task",Bu="2.0",We=sm(e=>e!==null&&(typeof e=="object"||typeof e=="function")),mb=be([b(),ye().int()]),hb=b(),XL=tt({ttl:be([ye(),Ss()]).optional(),pollInterval:ye().optional()}),fE=D({ttl:ye().optional()}),mE=D({taskId:b()}),dm=tt({progressToken:mb.optional(),[Kr]:mE.optional()}),It=D({_meta:dm.optional()}),Ps=It.extend({task:fE.optional()}),gb=e=>Ps.safeParse(e).success,Ke=D({method:b(),params:It.loose().optional()}),Rt=D({_meta:dm.optional()}),Ct=D({method:b(),params:Rt.loose().optional()}),He=tt({_meta:dm.optional()}),Yu=be([b(),ye().int()]),vb=D({jsonrpc:M(Bu),id:Yu,...Ke.shape}).strict(),pm=e=>vb.safeParse(e).success,_b=D({jsonrpc:M(Bu),...Ct.shape}).strict(),yb=e=>_b.safeParse(e).success,fm=D({jsonrpc:M(Bu),id:Yu,result:He}).strict(),zs=e=>fm.safeParse(e).success;var L;(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"})(L||(L={}));var mm=D({jsonrpc:M(Bu),id:Yu.optional(),error:D({code:ye().int(),message:b(),data:Oe().optional()})}).strict();var bb=e=>mm.safeParse(e).success;var $b=be([vb,_b,fm,mm]),QL=be([fm,mm]),Xu=He.strict(),hE=Rt.extend({requestId:Yu.optional(),reason:b().optional()}),Qu=Ct.extend({method:M("notifications/cancelled"),params:hE}),gE=D({src:b(),mimeType:b().optional(),sizes:ae(b()).optional(),theme:lt(["light","dark"]).optional()}),Es=D({icons:ae(gE).optional()}),Eo=D({name:b(),title:b().optional()}),wb=Eo.extend({...Eo.shape,...Es.shape,version:b(),websiteUrl:b().optional(),description:b().optional()}),vE=Ts(D({applyDefaults:Le().optional()}),Ie(b(),Oe())),_E=Hu(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Ts(D({form:vE.optional(),url:We.optional()}),Ie(b(),Oe()).optional())),yE=tt({list:We.optional(),cancel:We.optional(),requests:tt({sampling:tt({createMessage:We.optional()}).optional(),elicitation:tt({create:We.optional()}).optional()}).optional()}),bE=tt({list:We.optional(),cancel:We.optional(),requests:tt({tools:tt({call:We.optional()}).optional()}).optional()}),$E=D({experimental:Ie(b(),We).optional(),sampling:D({context:We.optional(),tools:We.optional()}).optional(),elicitation:_E.optional(),roots:D({listChanged:Le().optional()}).optional(),tasks:yE.optional()}),wE=It.extend({protocolVersion:b(),capabilities:$E,clientInfo:wb}),hm=Ke.extend({method:M("initialize"),params:wE});var kE=D({experimental:Ie(b(),We).optional(),logging:We.optional(),completions:We.optional(),prompts:D({listChanged:Le().optional()}).optional(),resources:D({subscribe:Le().optional(),listChanged:Le().optional()}).optional(),tools:D({listChanged:Le().optional()}).optional(),tasks:bE.optional()}),xE=He.extend({protocolVersion:b(),capabilities:kE,serverInfo:wb,instructions:b().optional()}),gm=Ct.extend({method:M("notifications/initialized"),params:Rt.optional()});var el=Ke.extend({method:M("ping"),params:It.optional()}),SE=D({progress:ye(),total:je(ye()),message:je(b())}),TE=D({...Rt.shape,...SE.shape,progressToken:mb}),tl=Ct.extend({method:M("notifications/progress"),params:TE}),PE=It.extend({cursor:hb.optional()}),Is=Ke.extend({params:PE.optional()}),Os=He.extend({nextCursor:hb.optional()}),zE=lt(["working","input_required","completed","failed","cancelled"]),js=D({taskId:b(),status:zE,ttl:be([ye(),Ss()]),createdAt:b(),lastUpdatedAt:b(),pollInterval:je(ye()),statusMessage:je(b())}),Io=He.extend({task:js}),EE=Rt.merge(js),Ns=Ct.extend({method:M("notifications/tasks/status"),params:EE}),rl=Ke.extend({method:M("tasks/get"),params:It.extend({taskId:b()})}),nl=He.merge(js),ol=Ke.extend({method:M("tasks/result"),params:It.extend({taskId:b()})}),e9=He.loose(),il=Is.extend({method:M("tasks/list")}),sl=Os.extend({tasks:ae(js)}),al=Ke.extend({method:M("tasks/cancel"),params:It.extend({taskId:b()})}),kb=He.merge(js),xb=D({uri:b(),mimeType:je(b()),_meta:Ie(b(),Oe()).optional()}),Sb=xb.extend({text:b()}),vm=b().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),Tb=xb.extend({blob:vm}),Rs=lt(["user","assistant"]),Oo=D({audience:ae(Rs).optional(),priority:ye().min(0).max(1).optional(),lastModified:To.datetime({offset:!0}).optional()}),Pb=D({...Eo.shape,...Es.shape,uri:b(),description:je(b()),mimeType:je(b()),annotations:Oo.optional(),_meta:je(tt({}))}),IE=D({...Eo.shape,...Es.shape,uriTemplate:b(),description:je(b()),mimeType:je(b()),annotations:Oo.optional(),_meta:je(tt({}))}),cl=Is.extend({method:M("resources/list")}),OE=Os.extend({resources:ae(Pb)}),ul=Is.extend({method:M("resources/templates/list")}),jE=Os.extend({resourceTemplates:ae(IE)}),_m=It.extend({uri:b()}),NE=_m,ll=Ke.extend({method:M("resources/read"),params:NE}),RE=He.extend({contents:ae(be([Sb,Tb]))}),CE=Ct.extend({method:M("notifications/resources/list_changed"),params:Rt.optional()}),AE=_m,DE=Ke.extend({method:M("resources/subscribe"),params:AE}),qE=_m,ME=Ke.extend({method:M("resources/unsubscribe"),params:qE}),UE=Rt.extend({uri:b()}),ZE=Ct.extend({method:M("notifications/resources/updated"),params:UE}),VE=D({name:b(),description:je(b()),required:je(Le())}),LE=D({...Eo.shape,...Es.shape,description:je(b()),arguments:je(ae(VE)),_meta:je(tt({}))}),dl=Is.extend({method:M("prompts/list")}),FE=Os.extend({prompts:ae(LE)}),GE=It.extend({name:b(),arguments:Ie(b(),b()).optional()}),pl=Ke.extend({method:M("prompts/get"),params:GE}),ym=D({type:M("text"),text:b(),annotations:Oo.optional(),_meta:Ie(b(),Oe()).optional()}),bm=D({type:M("image"),data:vm,mimeType:b(),annotations:Oo.optional(),_meta:Ie(b(),Oe()).optional()}),$m=D({type:M("audio"),data:vm,mimeType:b(),annotations:Oo.optional(),_meta:Ie(b(),Oe()).optional()}),WE=D({type:M("tool_use"),name:b(),id:b(),input:Ie(b(),Oe()),_meta:Ie(b(),Oe()).optional()}),KE=D({type:M("resource"),resource:be([Sb,Tb]),annotations:Oo.optional(),_meta:Ie(b(),Oe()).optional()}),HE=Pb.extend({type:M("resource_link")}),wm=be([ym,bm,$m,HE,KE]),JE=D({role:Rs,content:wm}),BE=He.extend({description:b().optional(),messages:ae(JE)}),YE=Ct.extend({method:M("notifications/prompts/list_changed"),params:Rt.optional()}),XE=D({title:b().optional(),readOnlyHint:Le().optional(),destructiveHint:Le().optional(),idempotentHint:Le().optional(),openWorldHint:Le().optional()}),QE=D({taskSupport:lt(["required","optional","forbidden"]).optional()}),zb=D({...Eo.shape,...Es.shape,description:b().optional(),inputSchema:D({type:M("object"),properties:Ie(b(),We).optional(),required:ae(b()).optional()}).catchall(Oe()),outputSchema:D({type:M("object"),properties:Ie(b(),We).optional(),required:ae(b()).optional()}).catchall(Oe()).optional(),annotations:XE.optional(),execution:QE.optional(),_meta:Ie(b(),Oe()).optional()}),fl=Is.extend({method:M("tools/list")}),eI=Os.extend({tools:ae(zb)}),ml=He.extend({content:ae(wm).default([]),structuredContent:Ie(b(),Oe()).optional(),isError:Le().optional()}),t9=ml.or(He.extend({toolResult:Oe()})),tI=Ps.extend({name:b(),arguments:Ie(b(),Oe()).optional()}),jo=Ke.extend({method:M("tools/call"),params:tI}),rI=Ct.extend({method:M("notifications/tools/list_changed"),params:Rt.optional()}),r9=D({autoRefresh:Le().default(!0),debounceMs:ye().int().nonnegative().default(300)}),Cs=lt(["debug","info","notice","warning","error","critical","alert","emergency"]),nI=It.extend({level:Cs}),km=Ke.extend({method:M("logging/setLevel"),params:nI}),oI=Rt.extend({level:Cs,logger:b().optional(),data:Oe()}),iI=Ct.extend({method:M("notifications/message"),params:oI}),sI=D({name:b().optional()}),aI=D({hints:ae(sI).optional(),costPriority:ye().min(0).max(1).optional(),speedPriority:ye().min(0).max(1).optional(),intelligencePriority:ye().min(0).max(1).optional()}),cI=D({mode:lt(["auto","required","none"]).optional()}),uI=D({type:M("tool_result"),toolUseId:b().describe("The unique identifier for the corresponding tool call."),content:ae(wm).default([]),structuredContent:D({}).loose().optional(),isError:Le().optional(),_meta:Ie(b(),Oe()).optional()}),lI=Wu("type",[ym,bm,$m]),Ju=Wu("type",[ym,bm,$m,WE,uI]),dI=D({role:Rs,content:be([Ju,ae(Ju)]),_meta:Ie(b(),Oe()).optional()}),pI=Ps.extend({messages:ae(dI),modelPreferences:aI.optional(),systemPrompt:b().optional(),includeContext:lt(["none","thisServer","allServers"]).optional(),temperature:ye().optional(),maxTokens:ye().int(),stopSequences:ae(b()).optional(),metadata:We.optional(),tools:ae(zb).optional(),toolChoice:cI.optional()}),fI=Ke.extend({method:M("sampling/createMessage"),params:pI}),As=He.extend({model:b(),stopReason:je(lt(["endTurn","stopSequence","maxTokens"]).or(b())),role:Rs,content:lI}),xm=He.extend({model:b(),stopReason:je(lt(["endTurn","stopSequence","maxTokens","toolUse"]).or(b())),role:Rs,content:be([Ju,ae(Ju)])}),mI=D({type:M("boolean"),title:b().optional(),description:b().optional(),default:Le().optional()}),hI=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()}),gI=D({type:lt(["number","integer"]),title:b().optional(),description:b().optional(),minimum:ye().optional(),maximum:ye().optional(),default:ye().optional()}),vI=D({type:M("string"),title:b().optional(),description:b().optional(),enum:ae(b()),default:b().optional()}),_I=D({type:M("string"),title:b().optional(),description:b().optional(),oneOf:ae(D({const:b(),title:b()})),default:b().optional()}),yI=D({type:M("string"),title:b().optional(),description:b().optional(),enum:ae(b()),enumNames:ae(b()).optional(),default:b().optional()}),bI=be([vI,_I]),$I=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()}),wI=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()}),kI=be([$I,wI]),xI=be([yI,bI,kI]),SI=be([xI,mI,hI,gI]),TI=Ps.extend({mode:M("form").optional(),message:b(),requestedSchema:D({type:M("object"),properties:Ie(b(),SI),required:ae(b()).optional()})}),PI=Ps.extend({mode:M("url"),message:b(),elicitationId:b(),url:b().url()}),zI=be([TI,PI]),EI=Ke.extend({method:M("elicitation/create"),params:zI}),II=Rt.extend({elicitationId:b()}),OI=Ct.extend({method:M("notifications/elicitation/complete"),params:II}),No=He.extend({action:lt(["accept","decline","cancel"]),content:Hu(e=>e===null?void 0:e,Ie(b(),be([b(),ye(),Le(),ae(b())])).optional())}),jI=D({type:M("ref/resource"),uri:b()});var NI=D({type:M("ref/prompt"),name:b()}),RI=It.extend({ref:be([NI,jI]),argument:D({name:b(),value:b()}),context:D({arguments:Ie(b(),b()).optional()}).optional()}),hl=Ke.extend({method:M("completion/complete"),params:RI});function Eb(e){if(e.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function Ib(e){if(e.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}var CI=He.extend({completion:tt({values:ae(b()).max(100),total:je(ye().int()),hasMore:je(Le())})}),AI=D({uri:b().startsWith("file://"),name:b().optional(),_meta:Ie(b(),Oe()).optional()}),DI=Ke.extend({method:M("roots/list"),params:It.optional()}),Sm=He.extend({roots:ae(AI)}),qI=Ct.extend({method:M("notifications/roots/list_changed"),params:Rt.optional()}),n9=be([el,hm,hl,km,pl,dl,cl,ul,ll,DE,ME,jo,fl,rl,ol,il,al]),o9=be([Qu,tl,gm,qI,Ns]),i9=be([Xu,As,xm,No,Sm,nl,sl,Io]),s9=be([el,fI,EI,DI,rl,ol,il,al]),a9=be([Qu,tl,iI,ZE,CE,rI,YE,Ns,OI]),c9=be([Xu,xE,CI,BE,FE,OE,jE,RE,ml,eI,nl,sl,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===L.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(L.UrlElicitationRequired,r,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}};function Hr(e){return e==="completed"||e==="failed"||e==="cancelled"}var jb=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"},Nb=e=>typeof e=="string"?{...Ob,name:e}:{...Ob,...e};var Rb=e=>{let t=Nb(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 Cb(e,t){let r={type:"array"};return e.type?._def&&e.type?._def?.typeName!==z.ZodAny&&(r.items=G(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 Ab(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 Db(){return{type:"boolean"}}function vl(e,t){return G(e.type._def,t)}var qb=(e,t)=>G(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 MI(e,t)}}var MI=(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 Mb(e,t){return{...G(e.innerType._def,t),default:e.defaultValue()}}function Ub(e,t){return t.effectStrategy==="input"?G(e.schema._def,t):qe(t)}function Zb(e){return{type:"string",enum:Array.from(e.values)}}var UI=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function Vb(e,t){let r=[G(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),G(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(UI(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 Lb(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 _l(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":Jt(r,"email",o.message,t);break;case"format:idn-email":Jt(r,"idn-email",o.message,t);break;case"pattern:zod":dt(r,Ht.email,o.message,t);break}break;case"url":Jt(r,"uri",o.message,t);break;case"uuid":Jt(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(`^${Em(o.value,t)}`),o.message,t);break;case"endsWith":dt(r,RegExp(`${Em(o.value,t)}$`),o.message,t);break;case"datetime":Jt(r,"date-time",o.message,t);break;case"date":Jt(r,"date",o.message,t);break;case"time":Jt(r,"time",o.message,t);break;case"duration":Jt(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(Em(o.value,t)),o.message,t);break}case"ip":{o.version!=="v6"&&Jt(r,"ipv4",o.message,t),o.version!=="v4"&&Jt(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":{Jt(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 Em(e,t){return t.patternStrategy==="escape"?VI(e):e}var ZI=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function VI(e){let t="";for(let r=0;r<e.length;r++)ZI.has(e[r])||(t+="\\"),t+=e[r];return t}function Jt(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:Fb(t,o),...r&&o.errorMessages&&{errorMessage:{pattern:r}}})):ue(e,"pattern",Fb(t,o),r,o)}function Fb(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 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 Ey(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:()=>sE,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:()=>Ee,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:()=>Ez,email:()=>uz,emoji:()=>gz,endsWith:()=>ps,enum:()=>lt,file:()=>Qz,flattenError:()=>lo,float32:()=>Oz,float64:()=>Rz,formatError:()=>po,function:()=>Ou,getErrorMap:()=>cE,globalRegistry:()=>Gt,gt:()=>kr,gte:()=>_t,guid:()=>lz,includes:()=>ls,instanceof:()=>nE,int:()=>Rf,int32:()=>jz,int64:()=>Cz,intersection:()=>Ts,ipv4:()=>kz,ipv6:()=>xz,iso:()=>To,json:()=>iE,jwt:()=>Iz,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:()=>eE,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:()=>Ef,parseAsync:()=>If,partialRecord:()=>Kz,pipe:()=>Zu,positive:()=>vf,prefault:()=>Yy,preprocess:()=>Hu,prettifyError:()=>Qa,promise:()=>rE,property:()=>$f,readonly:()=>ib,record:()=>Ie,refine:()=>db,regex:()=>as,regexes:()=>Lr,registry:()=>qi,safeParse:()=>Nf,safeParseAsync:()=>Of,set:()=>Bz,setErrorMap:()=>aE,size:()=>ss,startsWith:()=>ds,strictObject:()=>Wz,string:()=>b,stringFormat:()=>Nz,stringbool:()=>oE,success:()=>Xz,superRefine:()=>pb,symbol:()=>Mz,templateLiteral:()=>tE,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),Ee.init(e,t)});function Sf(e){return lf(Du,e)}var Cu=v("ZodISODate",(e,t)=>{of.init(e,t),Ee.init(e,t)});function Tf(e){return df(Cu,e)}var qu=v("ZodISOTime",(e,t)=>{sf.init(e,t),Ee.init(e,t)});function Pf(e){return pf(qu,e)}var Mu=v("ZodISODuration",(e,t)=>{af.init(e,t),Ee.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 Ef=Ya(Po),If=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)=>Ef(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>Nf(e,r,o),e.parseAsync=async(r,o)=>If(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 Ee=v("ZodStringFormat",(e,t)=>{ke.init(e,t),jf.init(e,t)}),Af=v("ZodEmail",(e,t)=>{uc.init(e,t),Ee.init(e,t)});function uz(e){return Mi(Af,e)}var Uu=v("ZodGUID",(e,t)=>{ac.init(e,t),Ee.init(e,t)});function lz(e){return bo(Uu,e)}var Sr=v("ZodUUID",(e,t)=>{cc.init(e,t),Ee.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),Ee.init(e,t)});function hz(e){return Fi(Df,e)}var Cf=v("ZodEmoji",(e,t)=>{dc.init(e,t),Ee.init(e,t)});function gz(e){return Wi(Cf,e)}var qf=v("ZodNanoID",(e,t)=>{pc.init(e,t),Ee.init(e,t)});function _z(e){return Gi(qf,e)}var Mf=v("ZodCUID",(e,t)=>{fc.init(e,t),Ee.init(e,t)});function vz(e){return Ki(Mf,e)}var Uf=v("ZodCUID2",(e,t)=>{mc.init(e,t),Ee.init(e,t)});function yz(e){return Hi(Uf,e)}var Lf=v("ZodULID",(e,t)=>{hc.init(e,t),Ee.init(e,t)});function bz(e){return Bi(Lf,e)}var Zf=v("ZodXID",(e,t)=>{gc.init(e,t),Ee.init(e,t)});function wz(e){return Ji(Zf,e)}var Vf=v("ZodKSUID",(e,t)=>{_c.init(e,t),Ee.init(e,t)});function $z(e){return Qi(Vf,e)}var Ff=v("ZodIPv4",(e,t)=>{vc.init(e,t),Ee.init(e,t)});function kz(e){return Yi(Ff,e)}var Wf=v("ZodIPv6",(e,t)=>{yc.init(e,t),Ee.init(e,t)});function xz(e){return Xi(Wf,e)}var Gf=v("ZodCIDRv4",(e,t)=>{bc.init(e,t),Ee.init(e,t)});function Sz(e){return es(Gf,e)}var Kf=v("ZodCIDRv6",(e,t)=>{wc.init(e,t),Ee.init(e,t)});function Tz(e){return ts(Kf,e)}var Hf=v("ZodBase64",(e,t)=>{$c.init(e,t),Ee.init(e,t)});function Pz(e){return rs(Hf,e)}var Bf=v("ZodBase64URL",(e,t)=>{kc.init(e,t),Ee.init(e,t)});function zz(e){return ns(Bf,e)}var Jf=v("ZodE164",(e,t)=>{xc.init(e,t),Ee.init(e,t)});function Ez(e){return os(Jf,e)}var Qf=v("ZodJWT",(e,t)=>{Sc.init(e,t),Ee.init(e,t)});function Iz(e){return is(Qf,e)}var Oy=v("ZodCustomStringFormat",(e,t)=>{Tc.init(e,t),Ee.init(e,t)});function Nz(e,t,r={}){return Iu(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)=>{Ec.init(e,t),te.init(e,t)});function Mz(e){return vu(Ry,e)}var jy=v("ZodUndefined",(e,t)=>{Ic.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 Ie(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 eE(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 tE(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 rE(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 nE(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 oE=(...e)=>Eu({Pipe:im,Boolean:ks,String:ws,Transform:tm},...e);function iE(e){let t=cb(()=>be([b(e),ye(),Ve(),Ss(),ae(t),Ie(b(),t)]));return t}function Hu(e,t){return Zu(rm(e),t)}var sE={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 aE(e){Ue({customError:e})}function cE(){return Ue().customError}var am={};mn(am,{bigint:()=>pE,boolean:()=>dE,date:()=>fE,number:()=>lE,string:()=>uE});function uE(e){return uf(ws,e)}function lE(e){return mf($s,e)}function dE(e){return hf(ks,e)}function pE(e){return gf(xs,e)}function fE(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()}),hE=C({ttl:ye().optional()}),gE=C({taskId:b()}),dm=tt({progressToken:hb.optional(),[Kr]:gE.optional()}),It=C({_meta:dm.optional()}),Ps=It.extend({task:hE.optional()}),_b=e=>Ps.safeParse(e).success,Ke=C({method:b(),params:It.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(),_E=jt.extend({requestId:Qu.optional(),reason:b().optional()}),Xu=At.extend({method:M("notifications/cancelled"),params:_E}),vE=C({src:b(),mimeType:b().optional(),sizes:ae(b()).optional(),theme:lt(["light","dark"]).optional()}),Es=C({icons:ae(vE).optional()}),Eo=C({name:b(),title:b().optional()}),kb=Eo.extend({...Eo.shape,...Es.shape,version:b(),websiteUrl:b().optional(),description:b().optional()}),yE=Ts(C({applyDefaults:Ve().optional()}),Ie(b(),Ne())),bE=Hu(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Ts(C({form:yE.optional(),url:Ge.optional()}),Ie(b(),Ne()).optional())),wE=tt({list:Ge.optional(),cancel:Ge.optional(),requests:tt({sampling:tt({createMessage:Ge.optional()}).optional(),elicitation:tt({create:Ge.optional()}).optional()}).optional()}),$E=tt({list:Ge.optional(),cancel:Ge.optional(),requests:tt({tools:tt({call:Ge.optional()}).optional()}).optional()}),kE=C({experimental:Ie(b(),Ge).optional(),sampling:C({context:Ge.optional(),tools:Ge.optional()}).optional(),elicitation:bE.optional(),roots:C({listChanged:Ve().optional()}).optional(),tasks:wE.optional()}),xE=It.extend({protocolVersion:b(),capabilities:kE,clientInfo:kb}),hm=Ke.extend({method:M("initialize"),params:xE});var SE=C({experimental:Ie(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:$E.optional()}),TE=He.extend({protocolVersion:b(),capabilities:SE,serverInfo:kb,instructions:b().optional()}),gm=At.extend({method:M("notifications/initialized"),params:jt.optional()});var el=Ke.extend({method:M("ping"),params:It.optional()}),PE=C({progress:ye(),total:Oe(ye()),message:Oe(b())}),zE=C({...jt.shape,...PE.shape,progressToken:hb}),tl=At.extend({method:M("notifications/progress"),params:zE}),EE=It.extend({cursor:gb.optional()}),Is=Ke.extend({params:EE.optional()}),Ns=He.extend({nextCursor:gb.optional()}),IE=lt(["working","input_required","completed","failed","cancelled"]),Os=C({taskId:b(),status:IE,ttl:be([ye(),Ss()]),createdAt:b(),lastUpdatedAt:b(),pollInterval:Oe(ye()),statusMessage:Oe(b())}),Io=He.extend({task:Os}),NE=jt.merge(Os),Rs=At.extend({method:M("notifications/tasks/status"),params:NE}),rl=Ke.extend({method:M("tasks/get"),params:It.extend({taskId:b()})}),nl=He.merge(Os),ol=Ke.extend({method:M("tasks/result"),params:It.extend({taskId:b()})}),rF=He.loose(),il=Is.extend({method:M("tasks/list")}),sl=Ns.extend({tasks:ae(Os)}),al=Ke.extend({method:M("tasks/cancel"),params:It.extend({taskId:b()})}),xb=He.merge(Os),Sb=C({uri:b(),mimeType:Oe(b()),_meta:Ie(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({...Eo.shape,...Es.shape,uri:b(),description:Oe(b()),mimeType:Oe(b()),annotations:No.optional(),_meta:Oe(tt({}))}),OE=C({...Eo.shape,...Es.shape,uriTemplate:b(),description:Oe(b()),mimeType:Oe(b()),annotations:No.optional(),_meta:Oe(tt({}))}),cl=Is.extend({method:M("resources/list")}),RE=Ns.extend({resources:ae(zb)}),ul=Is.extend({method:M("resources/templates/list")}),jE=Ns.extend({resourceTemplates:ae(OE)}),vm=It.extend({uri:b()}),AE=vm,ll=Ke.extend({method:M("resources/read"),params:AE}),DE=He.extend({contents:ae(be([Tb,Pb]))}),CE=At.extend({method:M("notifications/resources/list_changed"),params:jt.optional()}),qE=vm,ME=Ke.extend({method:M("resources/subscribe"),params:qE}),UE=vm,LE=Ke.extend({method:M("resources/unsubscribe"),params:UE}),ZE=jt.extend({uri:b()}),VE=At.extend({method:M("notifications/resources/updated"),params:ZE}),FE=C({name:b(),description:Oe(b()),required:Oe(Ve())}),WE=C({...Eo.shape,...Es.shape,description:Oe(b()),arguments:Oe(ae(FE)),_meta:Oe(tt({}))}),dl=Is.extend({method:M("prompts/list")}),GE=Ns.extend({prompts:ae(WE)}),KE=It.extend({name:b(),arguments:Ie(b(),b()).optional()}),pl=Ke.extend({method:M("prompts/get"),params:KE}),ym=C({type:M("text"),text:b(),annotations:No.optional(),_meta:Ie(b(),Ne()).optional()}),bm=C({type:M("image"),data:_m,mimeType:b(),annotations:No.optional(),_meta:Ie(b(),Ne()).optional()}),wm=C({type:M("audio"),data:_m,mimeType:b(),annotations:No.optional(),_meta:Ie(b(),Ne()).optional()}),HE=C({type:M("tool_use"),name:b(),id:b(),input:Ie(b(),Ne()),_meta:Ie(b(),Ne()).optional()}),BE=C({type:M("resource"),resource:be([Tb,Pb]),annotations:No.optional(),_meta:Ie(b(),Ne()).optional()}),JE=zb.extend({type:M("resource_link")}),$m=be([ym,bm,wm,JE,BE]),QE=C({role:js,content:$m}),YE=He.extend({description:b().optional(),messages:ae(QE)}),XE=At.extend({method:M("notifications/prompts/list_changed"),params:jt.optional()}),eI=C({title:b().optional(),readOnlyHint:Ve().optional(),destructiveHint:Ve().optional(),idempotentHint:Ve().optional(),openWorldHint:Ve().optional()}),tI=C({taskSupport:lt(["required","optional","forbidden"]).optional()}),Eb=C({...Eo.shape,...Es.shape,description:b().optional(),inputSchema:C({type:M("object"),properties:Ie(b(),Ge).optional(),required:ae(b()).optional()}).catchall(Ne()),outputSchema:C({type:M("object"),properties:Ie(b(),Ge).optional(),required:ae(b()).optional()}).catchall(Ne()).optional(),annotations:eI.optional(),execution:tI.optional(),_meta:Ie(b(),Ne()).optional()}),fl=Is.extend({method:M("tools/list")}),rI=Ns.extend({tools:ae(Eb)}),ml=He.extend({content:ae($m).default([]),structuredContent:Ie(b(),Ne()).optional(),isError:Ve().optional()}),nF=ml.or(He.extend({toolResult:Ne()})),nI=Ps.extend({name:b(),arguments:Ie(b(),Ne()).optional()}),Oo=Ke.extend({method:M("tools/call"),params:nI}),oI=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"]),iI=It.extend({level:As}),km=Ke.extend({method:M("logging/setLevel"),params:iI}),sI=jt.extend({level:As,logger:b().optional(),data:Ne()}),aI=At.extend({method:M("notifications/message"),params:sI}),cI=C({name:b().optional()}),uI=C({hints:ae(cI).optional(),costPriority:ye().min(0).max(1).optional(),speedPriority:ye().min(0).max(1).optional(),intelligencePriority:ye().min(0).max(1).optional()}),lI=C({mode:lt(["auto","required","none"]).optional()}),dI=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:Ie(b(),Ne()).optional()}),pI=Gu("type",[ym,bm,wm]),Bu=Gu("type",[ym,bm,wm,HE,dI]),fI=C({role:js,content:be([Bu,ae(Bu)]),_meta:Ie(b(),Ne()).optional()}),mI=Ps.extend({messages:ae(fI),modelPreferences:uI.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(Eb).optional(),toolChoice:lI.optional()}),hI=Ke.extend({method:M("sampling/createMessage"),params:mI}),Ds=He.extend({model:b(),stopReason:Oe(lt(["endTurn","stopSequence","maxTokens"]).or(b())),role:js,content:pI}),xm=He.extend({model:b(),stopReason:Oe(lt(["endTurn","stopSequence","maxTokens","toolUse"]).or(b())),role:js,content:be([Bu,ae(Bu)])}),gI=C({type:M("boolean"),title:b().optional(),description:b().optional(),default:Ve().optional()}),_I=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()}),vI=C({type:lt(["number","integer"]),title:b().optional(),description:b().optional(),minimum:ye().optional(),maximum:ye().optional(),default:ye().optional()}),yI=C({type:M("string"),title:b().optional(),description:b().optional(),enum:ae(b()),default:b().optional()}),bI=C({type:M("string"),title:b().optional(),description:b().optional(),oneOf:ae(C({const:b(),title:b()})),default:b().optional()}),wI=C({type:M("string"),title:b().optional(),description:b().optional(),enum:ae(b()),enumNames:ae(b()).optional(),default:b().optional()}),$I=be([yI,bI]),kI=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()}),xI=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()}),SI=be([kI,xI]),TI=be([wI,$I,SI]),PI=be([TI,gI,_I,vI]),zI=Ps.extend({mode:M("form").optional(),message:b(),requestedSchema:C({type:M("object"),properties:Ie(b(),PI),required:ae(b()).optional()})}),EI=Ps.extend({mode:M("url"),message:b(),elicitationId:b(),url:b().url()}),II=be([zI,EI]),NI=Ke.extend({method:M("elicitation/create"),params:II}),OI=jt.extend({elicitationId:b()}),RI=At.extend({method:M("notifications/elicitation/complete"),params:OI}),Ro=He.extend({action:lt(["accept","decline","cancel"]),content:Hu(e=>e===null?void 0:e,Ie(b(),be([b(),ye(),Ve(),ae(b())])).optional())}),jI=C({type:M("ref/resource"),uri:b()});var AI=C({type:M("ref/prompt"),name:b()}),DI=It.extend({ref:be([AI,jI]),argument:C({name:b(),value:b()}),context:C({arguments:Ie(b(),b()).optional()}).optional()}),hl=Ke.extend({method:M("completion/complete"),params:DI});function Ib(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 CI=He.extend({completion:tt({values:ae(b()).max(100),total:Oe(ye().int()),hasMore:Oe(Ve())})}),qI=C({uri:b().startsWith("file://"),name:b().optional(),_meta:Ie(b(),Ne()).optional()}),MI=Ke.extend({method:M("roots/list"),params:It.optional()}),Sm=He.extend({roots:ae(qI)}),UI=At.extend({method:M("notifications/roots/list_changed"),params:jt.optional()}),iF=be([el,hm,hl,km,pl,dl,cl,ul,ll,ME,LE,Oo,fl,rl,ol,il,al]),sF=be([Xu,tl,gm,UI,Rs]),aF=be([Yu,Ds,xm,Ro,Sm,nl,sl,Io]),cF=be([el,hI,NI,MI,rl,ol,il,al]),uF=be([Xu,tl,aI,VE,CE,oI,XE,Rs,RI]),lF=be([Yu,TE,CI,YE,GE,RE,jE,DE,ml,rI,nl,sl,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 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 LI(e,t)}}var LI=(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 ZI=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(ZI(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(`^${Em(o.value,t)}`),o.message,t);break;case"endsWith":dt(r,RegExp(`${Em(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(Em(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 Em(e,t){return t.patternStrategy==="escape"?FI(e):e}var VI=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function FI(e){let t="";for(let r=0;r<e.length;r++)VI.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
|
|
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]:G(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",n]})??qe(t)}),{}),additionalProperties:t.rejectedAdditionalProperties};let r={type:"object",additionalProperties:G(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}=_l(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}=vl(e.keyType._def,t);return{...r,propertyNames:n}}}return r}function Gb(e,t){if(t.mapStrategy==="record")return yl(e,t);let r=G(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||qe(t),o=G(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 Wb(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 Kb(e){return e.target==="openAi"?void 0:{not:qe({...e,currentPath:[...e.currentPath,"not"]})}}function Hb(e){return e.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var Ds={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function Bb(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 Ds&&(!o._def.checks||!o._def.checks.length))){let o=r.reduce((n,i)=>{let s=Ds[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)=>G(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:Ds[e.innerType._def.typeName],nullable:!0}:{type:[Ds[e.innerType._def.typeName],"null"]};if(t.target==="openApi3"){let o=G(e.innerType._def,{...t,currentPath:[...t.currentPath]});return o&&"$ref"in o?{allOf:[o],nullable:!0}:o&&{...o,nullable:!0}}let r=G(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 Qb(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=FI(c);u&&r&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),u=!1);let l=G(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=LI(e,t);return s!==void 0&&(o.additionalProperties=s),o}function LI(e,t){if(e.catchall._def.typeName!=="ZodNever")return G(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 FI(e){try{return e.isOptional()}catch{return!0}}var e$=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return G(e.innerType._def,t);let r=G(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:qe(t)},r]}:qe(t)};var t$=(e,t)=>{if(t.pipeStrategy==="input")return G(e.in._def,t);if(t.pipeStrategy==="output")return G(e.out._def,t);let r=G(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),o=G(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,o].filter(n=>n!==void 0)}};function r$(e,t){return G(e.type._def,t)}function n$(e,t){let o={type:"array",uniqueItems:!0,items:G(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 o$(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,o)=>G(r._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]})).reduce((r,o)=>o===void 0?r:[...r,o],[]),additionalItems:G(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,o)=>G(r._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]})).reduce((r,o)=>o===void 0?r:[...r,o],[])}}function i$(e){return{not:qe(e)}}function s$(e){return qe(e)}var a$=(e,t)=>G(e.innerType._def,t);var c$=(e,t,r)=>{switch(t){case z.ZodString:return _l(e,r);case z.ZodNumber:return Xb(e,r);case z.ZodObject:return Qb(e,r);case z.ZodBigInt:return Ab(e,r);case z.ZodBoolean:return Db();case z.ZodDate:return Pm(e,r);case z.ZodUndefined:return i$(r);case z.ZodNull:return Hb(r);case z.ZodArray:return Cb(e,r);case z.ZodUnion:case z.ZodDiscriminatedUnion:return Bb(e,r);case z.ZodIntersection:return Vb(e,r);case z.ZodTuple:return o$(e,r);case z.ZodRecord:return yl(e,r);case z.ZodLiteral:return Lb(e,r);case z.ZodEnum:return Zb(e);case z.ZodNativeEnum:return Wb(e);case z.ZodNullable:return Yb(e,r);case z.ZodOptional:return e$(e,r);case z.ZodMap:return Gb(e,r);case z.ZodSet:return n$(e,r);case z.ZodLazy:return()=>e.getter()._def;case z.ZodPromise:return r$(e,r);case z.ZodNaN:case z.ZodNever:return Kb(r);case z.ZodEffects:return Ub(e,r);case z.ZodAny:return qe(r);case z.ZodUnknown:return s$(r);case z.ZodDefault:return Mb(e,r);case z.ZodBranded:return vl(e,r);case z.ZodReadonly:return a$(e,r);case z.ZodCatch:return qb(e,r);case z.ZodPipeline:return t$(e,r);case z.ZodFunction:case z.ZodVoid:case z.ZodSymbol:return;default:return(o=>{})(t)}};function G(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=GI(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=c$(e,e.typeName,t),s=typeof i=="function"?G(i(),t):i;if(s&&WI(e,t,s),t.postProcess){let a=t.postProcess(s,e,t);return n.jsonSchema=s,a}return n.jsonSchema=s,s}var GI=(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}},WI=(e,t,r)=>(e.description&&(r.description=e.description,t.markdownDescription&&(r.markdownDescription=e.description)),r);var Im=(e,t)=>{let r=Rb(t),o=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[u,l])=>({...c,[u]:G(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=G(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 KI(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 Nt(e)?xo(e,{target:KI(t?.target),io:t?.pipeStrategy??"input"}):Im(e,{strictUnions:t?.strictUnions??!0,pipeStrategy:t?.pipeStrategy??"input"})}function jm(e){let r=Wr(e)?.method;if(!r)throw new Error("Schema is missing a method literal");let o=Cu(r);if(typeof o!="string")throw new Error("Schema method literal must be a string");return o}function Nm(e,t){let r=Gr(e,t);if(!r.success)throw r.error;return r.data}var HI=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(Qu,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(L.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(L.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(L.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(L.InvalidParams,`Task not found: ${r.params.taskId}`);if(Hr(n.status))throw new U(L.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(L.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...i}}catch(n){throw n instanceof U?n:new U(L.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(L.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)||bb(i)?this._onresponse(i):pm(i)?this._onrequest(i,s):yb(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(L.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:L.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=gb(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(L.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:L.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(L.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(L.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(L.InternalError,`Task ${i} failed`)}:a.status==="cancelled"&&(yield{type:"error",error:new U(L.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(L.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=w=>{l(w)};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(w){d(w);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=w=>{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(w)}},{relatedRequestId:n,resumptionToken:i,onresumptiontoken:s}).catch(E=>this._onerror(new Error(`Failed to send cancellation: ${E}`)));let k=w instanceof U?w:new U(L.RequestTimeout,String(w));l(k)};this._responseHandlers.set(h,w=>{if(!o?.signal?.aborted){if(w instanceof Error)return l(w);try{let k=Gr(r,w.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??HI,v=()=>p(U.fromError(L.RequestTimeout,"Request timed out",{timeout:f}));this._setupTimeout(h,f,o?.maxTotalTimeout,v,o?.resetTimeoutOnProgress??!1);let y=c?.taskId;if(y){let w=k=>{let E=this._responseHandlers.get(h);E?E(k):this._onerror(new Error(`Response handler missing for side-channeled request ${h}`))};this._requestResolvers.set(h,w),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(w=>{this._cleanupTimeout(h),l(w)})})}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},kb,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=jm(t);this.assertRequestHandlerCapability(o),this._requestHandlers.set(o,(n,i)=>{let s=Nm(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=jm(t);this._notificationHandlers.set(o,n=>{let i=Nm(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(L.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(L.InvalidRequest,"Request cancelled"));return}let s=setTimeout(n,o);r.addEventListener("abort",()=>{clearTimeout(s),i(new U(L.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(L.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=Ns.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(L.InvalidParams,`Task "${n}" not found - it may have been cleaned up`);if(Hr(a.status))throw new U(L.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=Ns.parse({method:"notifications/tasks/status",params:c});await this.notification(u),Hr(c.status)&&this._cleanupTaskProgressHandler(n)}},listTasks:n=>o.listTasks(n,r)}}};function u$(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function l$(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];u$(s)&&u$(i)?r[n]={...s,...i}:r[n]=i}return r}var lS=Ge(Ak(),1),dS=Ge(uS(),1);function j4(){let e=new lS.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,dS.default)(e),e}var Rd=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 Cd=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},As,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},No,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 pS(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 fS(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 Ad=class extends bl{constructor(t,r){super(r),this._serverInfo=t,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(Cs.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 Rd,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=Cs.safeParse(s);return a.success&&this._loggingLevels.set(i,a.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new Cd(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=l$(this._capabilities,t)}setRequestHandler(t,r){let n=Wr(t)?.method;if(!n)throw new Error("Schema is missing a method literal");let i;if(Nt(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=Gr(jo,c);if(!l.success){let p=l.error instanceof Error?l.error.message:String(l.error);throw new U(L.InvalidParams,`Invalid tools/call request: ${p}`)}let{params:d}=l.data,h=await Promise.resolve(r(c,u));if(d.task){let p=Gr(Io,h);if(!p.success){let f=p.error instanceof Error?p.error.message:String(p.error);throw new U(L.InvalidParams,`Invalid task creation result: ${f}`)}return p.data}let m=Gr(ml,h);if(!m.success){let p=m.error instanceof Error?m.error.message:String(m.error);throw new U(L.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){fS(this._clientCapabilities?.tasks?.requests,t,"Client")}assertTaskHandlerCapability(t){this._capabilities&&pS(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:fb.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"},Xu)}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},As,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},No,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},No,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(L.InvalidParams,`Elicitation response content does not match requested schema: ${a.errorMessage}`)}catch(s){throw s instanceof U?s:new U(L.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 hS=Symbol.for("mcp.completable");function n_(e){return!!e&&typeof e=="object"&&hS in e}function gS(e){return e[hS]?.complete}var mS;(function(e){e.Completable="McpCompletable"})(mS||(mS={}));var N4=/^[A-Za-z0-9._-]{1,128}$/;function R4(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"),!N4.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 o_(e){let t=R4(e);return C4(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 Ad(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(fl)),this.server.assertCanSetRequestHandler(dn(jo)),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?Om(n,{strictUnions:!0,pipeStrategy:"input"}):A4})(),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(jo,async(t,r)=>{try{let o=this._registeredTools[t.params.name];if(!o)throw new U(L.InvalidParams,`Tool ${t.params.name} not found`);if(!o.enabled)throw new U(L.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(L.InternalError,`Tool ${t.params.name} has taskSupport '${i}' but was not registered with registerToolTask`);if(i==="required"&&!n)throw new U(L.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===L.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 Nu(i,r);if(!s.success){let a="error"in s?s.error:"Unknown error",c=Ru(a);throw new U(L.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(L.InvalidParams,`Output validation error: Tool ${o} has an output schema but no structured content was provided`);let n=So(t.outputSchema),i=await Nu(n,r.structuredContent);if(!i.success){let s="error"in i?i.error:"Unknown error",a=Ru(s);throw new U(L.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(L.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 Ib(t),this.handleResourceCompletion(t,t.params.ref);default:throw new U(L.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(L.InvalidParams,`Prompt ${r.name} not found`);if(!o.enabled)throw new U(L.InvalidParams,`Prompt ${r.name} disabled`);if(!o.argsSchema)return Za;let i=Wr(o.argsSchema)?.[t.params.argument.name];if(!n_(i))return Za;let s=gS(i);if(!s)return Za;let a=await s(t.params.argument.value,t.params.context);return _S(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 Za;throw new U(L.InvalidParams,`Resource template ${t.params.ref.uri} not found`)}let n=o.resourceTemplate.completeCallback(t.params.argument.name);if(!n)return Za;let i=await n(t.params.argument.value,t.params.context);return _S(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(L.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(L.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?q4(r.argsSchema):void 0}))})),this.server.setRequestHandler(pl,async(t,r)=>{let o=this._registeredPrompts[t.params.name];if(!o)throw new U(L.InvalidParams,`Prompt ${t.params.name} not found`);if(!o.enabled)throw new U(L.InvalidParams,`Prompt ${t.params.name} disabled`);if(o.argsSchema){let n=So(o.argsSchema),i=await Nu(n,t.params.arguments);if(!i.success){let c="error"in i?i.error:"Unknown error",u=Ru(c);throw new U(L.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 n_(u)})&&this.setCompletionRequestHandler(),s}_createRegisteredTool(t,r,o,n,i,s,a,c,u){o_(t);let l={title:r,description:o,inputSchema:vS(n),outputSchema:vS(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"&&o_(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];i_(c)?(n=r.shift(),r.length>1&&typeof r[0]=="object"&&r[0]!==null&&!i_(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 A4={type:"object",properties:{}};function yS(e){return e!==null&&typeof e=="object"&&"parse"in e&&typeof e.parse=="function"&&"safeParse"in e&&typeof e.safeParse=="function"}function D4(e){return"_def"in e||"_zod"in e||yS(e)}function i_(e){return typeof e!="object"||e===null||D4(e)?!1:Object.keys(e).length===0?!0:Object.values(e).some(yS)}function vS(e){if(e)return i_(e)?Tn(e):e}function q4(e){let t=Wr(e);return t?Object.entries(t).map(([r,o])=>{let n=Py(o),i=zy(o);return{name:r,description:n,required:!i}}):[]}function dn(e){let r=Wr(e)?.method;if(!r)throw new Error("Schema is missing a method literal");let o=Cu(r);if(typeof o=="string")return o;throw new Error("Schema method literal must be a string")}function _S(e){return{completion:{values:e.slice(0,100),total:e.length,hasMore:e.length>100}}}var Za={completion:{values:[],hasMore:!1}};var s_=Ge(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),
|
|
50
|
-
`}var Ud=class{constructor(t=s_.default.stdin,r=s_.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=bS(t);this._stdout.write(o)?r():this._stdout.once("drain",r)})}};var $S="2.6.1";var a_={name:"Vantage Cloud Costs Helper",version:$S};async function wS(e,t,r,o,n){t["User-Agent"]=`vantage-mcp-server/${a_.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 I=class{constructor(t){this.exception=t}};var c_=new Map;function j(e){let t=(r,o)=>{r.tool(e.name,e.description,e.args,{readOnlyHint:e.annotations.readOnly,openWorldHint:e.annotations.openWorld,destructiveHint:e.annotations.destructive},async n=>{try{let i=await e.execute(n,o());return{content:[{type:"text",text:JSON.stringify(i,null,2)}],isError:!1}}catch(i){if(i instanceof I)return{content:[{type:"text",text:JSON.stringify(i.exception,null,2)}],isError:!0};throw i}})};if(c_.has(e.name))throw new Error(`Tool ${e.name} is already registered`);return c_.set(e.name,t),e}function kS(e,t){for(let r of c_.values())r(e,t)}var U4="Invalid date input, must be YYYY-MM-DD format and a reasonable date.";function Z4(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 $e(e){return g.string().refine(Z4,{error:U4}).describe(e)}var V4=`
|
|
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=GI(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=WI(e,t);return s!==void 0&&(o.additionalProperties=s),o}function WI(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 GI(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=KI(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&&HI(e,t,s),t.postProcess){let a=t.postProcess(s,e,t);return n.jsonSchema=s,a}return n.jsonSchema=s,s}var KI=(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}},HI=(e,t,r)=>(e.description&&(r.description=e.description,t.markdownDescription&&(r.markdownDescription=e.description)),r);var Im=(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 BI(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:BI(t?.target),io:t?.pipeStrategy??"input"}):Im(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 JI=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,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},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(E=>this._onerror(new Error(`Failed to send cancellation: ${E}`)));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??JI,_=()=>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 E=this._responseHandlers.get(h);E?E(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(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(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 Ib(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=Ey(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\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
|
+
# VQL (Vantage Query Language) Overview
|
|
52
|
+
|
|
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.
|
|
54
|
+
|
|
55
|
+
> **Tip:** On Cost, Resource, Kubernetes Efficiency, Financial Commitment, and Network Flow Reports, you can create a filter and click **View as VQL** to see the filter represented in VQL.
|
|
56
|
+
>
|
|
57
|
+
> 
|
|
58
|
+
|
|
59
|
+
The below examples show how to use VQL. This example creates a saved filter in your Vantage account using VQL.
|
|
60
|
+
|
|
61
|
+
## Example
|
|
62
|
+
|
|
63
|
+
\`\`\`json
|
|
64
|
+
{
|
|
65
|
+
"filter": "(costs.provider = 'aws' AND costs.service = 'Amazon Relational Database Service') OR (costs.provider = 'gcp' AND costs.service = 'Cloud SQL')",
|
|
66
|
+
"title": "RDS and Cloud SQL",
|
|
67
|
+
"workspace_token": "wrkspc_abcde12345"
|
|
68
|
+
}
|
|
69
|
+
\`\`\`
|
|
70
|
+
|
|
71
|
+
VQL is based on the following key concepts, further described in subsequent sections.
|
|
72
|
+
|
|
73
|
+
### Schema
|
|
74
|
+
|
|
75
|
+
VQL uses a schema that organizes filters into namespaces. These namespaces comprise various fields that you can leverage to filter and retrieve specific cost-related data.
|
|
76
|
+
|
|
77
|
+
### Keywords
|
|
78
|
+
|
|
79
|
+
VQL includes keywords, like \`AND\`, \`OR\`, \`IN\`, \`LIKE\`, and \`NOT\`, to create complex and precise filter conditions. These keywords vary per report type/scope.
|
|
80
|
+
|
|
81
|
+
### Syntax
|
|
82
|
+
|
|
83
|
+
VQL syntax closely resembles the \`WHERE\` clause of a SQL query. You can construct filter operations to extract desired cost insights.
|
|
84
|
+
|
|
85
|
+
## Scopes
|
|
86
|
+
|
|
87
|
+
VQL has a separate scope for each type of report\u2014meaning that you cannot use VQL statements for Cost Reports when querying Resource Reports. See the following pages below to learn more about each VQL scope.
|
|
88
|
+
|
|
89
|
+
- [VQL for Cost Reports](file://vantage/vql/cost_report.md)
|
|
90
|
+
- [VQL for Resource Reports](file://vantage/vql/resource_report.md)
|
|
91
|
+
- [VQL for Kubernetes Efficiency Reports](file://vantage/vql/kubernetes_efficiency_report.md)
|
|
92
|
+
- [VQL for Financial Commitment Reports](file://vantage/vql/financial_commitment_report.md)
|
|
93
|
+
- [VQL for Network Flow Reports](file://vantage/vql/network_flow_report.md)
|
|
94
|
+
`,description:"Learn Vantage Query Language (VQL), a SQL-like language for filtering cloud cost data across providers.",title:"VQL (Vantage Query Language) Overview"}],["vql/kubernetes_efficiency_report.md",{content:"\n> **Tip:** If you need help constructing a VQL query, navigate to the **Kubernetes Efficiency 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## Kubernetes Efficiency Reports VQL Schema\n\nVQL for Kubernetes Efficiency Reports comprises one namespace, `kubernetes`, which represents the available filters on Kubernetes Efficiency Reports in the Vantage console. To reference a filter, use the following syntax: `namespace.field` (e.g., `kubernetes.category`). The following fields are available within the `kubernetes` namespace.\n\n| Namespace | Field | VQL Example |\n| --- | --- | --- |\n| `kubernetes` | `namespace` | [Namespace example](#multiple-namespaces) |\n| `kubernetes` | `cluster_id` | [Cluster ID example](#results-from-a-list-of-clusters) |\n| `kubernetes` | `category` | [Category example](#costs-by-category) |\n| `kubernetes` | `labels` | [Labels example](#filter-by-label) |\n| `kubernetes` | `pod` | [Pod example](#filter-by-pod) |\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 | `(kubernetes.namespace = 'kube-system') AND (kubernetes.labels->>'app' = 'vantage-agent')` | This example filters for a specific namespace and label, where both conditions must be true. |\n| `OR` | Logical OR operator | `(kubernetes.namespace = 'gpu-operator') OR (kubernetes.namespace = 'vantage-dev')` | This example looks for results in two different namespaces. At least one condition must be true. |\n| `!=` | Is not | `(kubernetes.cluster_id != 'dev-eks-gpu-0')` | This example looks for results that are in any cluster except for `dev-eks-gpu-0`. |\n| `IN` and `NOT IN` | Used to compare against an array/list | `(kubernetes.labels->>'app.kubernetes.io/component' IN ('csi-driver','gpu-operator','metrics'))` | This example searches for results with the `app.kubernetes.io/component` key and multiple values. This same query also works for `NOT IN` where the results are anything matching the label key except for those particular values: `(kubernetes.labels->>'app.kubernetes.io/component' NOT IN ('csi-driver','gpu-operator','metrics'))`. |\n| `LIKE` and `NOT LIKE` | Performs string comparisons | `(kubernetes.labels->>'app' LIKE '%test%')` | This example selects data where the `app` label value contains `test`, such as `test-app`. This same query also works for `NOT LIKE` where data does not contain a particular string: `(kubernetes.labels->>'app' NOT LIKE '%test%')`. |\n| `->>` | This operator is used only when constructing queries related to labels | `(kubernetes.labels->>'container' = 'kube-prometheus-stack-48.4.0')` | This example looks for results with the label name of `container` and value of `kube-prometheus-stack-48.4.0`. |\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### Multiple Namespaces\n\nFilter for one or the other namespace.\n\n```sql\n(kubernetes.namespace = 'kube-system') OR (kubernetes.namespace = 'default')\n```\n\n### Results from a List of Clusters\n\nFilter for a list of different clusters.\n\n```sql\n(kubernetes.cluster_id IN ('dev-eks-gpu-0','dev-eks-UVmPe9YN'))\n```\n\n### Costs by Category\n\nCosts for a specific category, like `cpu`.\n\n```sql\n(kubernetes.category = 'cpu')\n```\n\n### Filter by Label\n\nFilter based on a specific Kubernetes label, such as `app`, with the value `rollouts-demo`.\n\n```sql\n(kubernetes.labels->>'app' = 'rollouts-demo')\n```\n\n### Filter by Pod\n\nFilter for a specific pod.\n\n```sql\n(kubernetes.pod = 'my-pod-name')\n```\n\n### Multiple Filters\n\nComplex filter that shows combining two different statements using `OR` with multiple criteria.\n\n```sql\n((kubernetes.cluster_id IN ('dev-eks-gpu-0','dev-eks-UVmPe9YN')) AND (kubernetes.category = 'cpu')) OR ((kubernetes.cluster_id IN ('dev-eks-gpu-0','dev-eks-UVmPe9YN')) AND (kubernetes.category = 'gpu'))\n```\n",description:"Learn how to use VQL when querying Kubernetes Efficiency Reports in Vantage.",title:"VQL for Kubernetes Efficiency Reports"}],["vql/network_flow_report.md",{content:"\n> **Tip:** If you need help constructing a VQL query, navigate to the **Network Flow Reports** page in the Vantage console and click **New Network Flow 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## Network Flow Reports VQL Schema\n\nVQL for Network Flow Reports comprises one namespace, `network_flow_logs`, which represents the available filters on Network Flow Reports in the Vantage console. To reference a filter, use the following syntax: `namespace.field` (e.g., `network_flow_logs.account_id`). The following fields are available within the `network_flow_logs` namespace.\n\n| Namespace | Field | VQL Example |\n| --- | --- | --- |\n| `network_flow_logs` | `account_id` | [Account ID example](#network-flows-by-account-id) |\n| `network_flow_logs` | `az_id` | [Availability Zone ID example](#network-flows-by-availability-zone-id) |\n| `network_flow_logs` | `dstaddr` | [Destination Address example](#network-flows-by-destination-address) |\n| `network_flow_logs` | `dsthostname` | [Destination Hostname example](#network-flows-by-destination-hostname) |\n| `network_flow_logs` | `interface_id` | [Interface ID example](#network-flows-by-interface-id) |\n| `network_flow_logs` | `instance_id` | [Instance ID example](#network-flows-by-instance-id) |\n| `network_flow_logs` | `peer_resource_uuid` | [Peer Resource UUID example](#network-flows-by-peer-resource-uuid) |\n| `network_flow_logs` | `peer_account_id` | [Peer Account ID example](#network-flows-by-peer-account-id) |\n| `network_flow_logs` | `peer_vpc_id` | [Peer VPC ID example](#network-flows-by-peer-vpc-id) |\n| `network_flow_logs` | `peer_regions` | [Peer Regions example](#network-flows-by-peer-regions) |\n| `network_flow_logs` | `peer_az_id` | [Peer AZ ID example](#network-flows-by-peer-az-id) |\n| `network_flow_logs` | `peer_subnet_id` | [Peer Subnet ID example](#network-flows-by-peer-subnet-id) |\n| `network_flow_logs` | `peer_interface_id` | [Peer Interface ID example](#network-flows-by-peer-interface-id) |\n| `network_flow_logs` | `peer_instance_id` | [Peer Instance ID example](#network-flows-by-peer-instance-id) |\n| `network_flow_logs` | `region` | [Region example](#network-flows-by-region) |\n| `network_flow_logs` | `resource_uuid` | [Resource UUID example](#network-flows-by-resource-uuid) |\n| `network_flow_logs` | `srcaddr` | [Source Address example](#network-flows-by-source-address) |\n| `network_flow_logs` | `srchostname` | [Source Hostname example](#network-flows-by-source-hostname) |\n| `network_flow_logs` | `subnet_id` | [Subnet ID example](#network-flows-by-subnet-id) |\n| `network_flow_logs` | `traffic_category` | [Traffic Category example](#network-flows-by-traffic-category) |\n| `network_flow_logs` | `traffic_path` | [Traffic Path example](#network-flows-by-traffic-path) |\n| `network_flow_logs` | `vpc_id` | [VPC ID example](#network-flows-by-vpc-id) |\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 | `(network_flow_logs.account_id = '123456789012') AND (network_flow_logs.dsthostname = 'datadoghq.com')` | This example filters for a specific account and destination hostname, where both conditions must be true. |\n| `OR` | Logical OR operator | `((network_flow_logs.account_id = '123456789012') AND (network_flow_logs.dsthostname = 'datadoghq.com')) OR ((network_flow_logs.account_id = '09876543212') AND (network_flow_logs.dsthostname = 'github.com'))` | This example looks for results associated with two accounts and destination hostnames. At least one condition must be true. |\n| `!=` | Is not | `(network_flow_logs.dsthostname != 'github.com')` | This example looks for results that are any destination hostname type except for `github.com`. |\n| `IN` and `NOT IN` | Used to compare against an array/list | `(network_flow_logs.peer_regions IN ('us-east-1','us-west-2'))` | This example searches for results within a set of regions. This same query also works for `NOT IN` where the results are anything matching everything except for these regions: `(network_flow_logs.peer_regions NOT IN ('us-east-1','us-west-2'))`. |\n| `LIKE` and `NOT LIKE` | Performs string comparisons | `(network_flow_logs.az_id LIKE '%use1%')` | This example selects data where the Availability Zone contains `use1`, such as `use1-az1`. This same query also works for `NOT LIKE` where data does not contain a particular string: `(network_flow_logs.az_id NOT LIKE '%use1%')`. |\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### Network Flows by Account ID\n\nNetwork flows from a set of account IDs.\n\n```sql\n(network_flow_logs.account_id IN ('123456789012','098765432109'))\n```\n\n### Network Flows by Availability Zone ID\n\nFilter for a substring based on Availability Zone.\n\n```sql\n(network_flow_logs.az_id LIKE '%use1%')\n```\n\n### Network Flows by Destination Address\n\nAll network flows that do not match a particular destination address.\n\n```sql\n(network_flow_logs.dstaddr != '1.123.456.7')\n```\n\n### Network Flows by Destination Hostname\n\nNetwork flows from a set of destination hostnames.\n\n```sql\n(network_flow_logs.dsthostname IN ('datadoghq.com','github.com','sentry.io'))\n```\n\n### Network Flows by Interface ID\n\nNetwork flows for a particular interface ID.\n\n```sql\n(network_flow_logs.interface_id = 'eni-000012345a6789123')\n```\n\n### Network Flows by Instance ID\n\nNetwork flows for a particular instance ID.\n\n```sql\n(network_flow_logs.instance_id = 'i-0001a23b456c780c1')\n```\n\n### Network Flows by Peer Resource UUID\n\nNetwork flows for peer resource UUIDs matching a substring.\n\n```sql\n(network_flow_logs.peer_resource_uuid LIKE '%arn:aws:ec2%')\n```\n\n### Network Flows by Peer Account ID\n\nNetwork flows for anything that's not a particular peer account ID.\n\n```sql\n(network_flow_logs.peer_account_id != '123456789012')\n```\n\n### Network Flows by Peer VPC ID\n\nNetwork flows for two different peer VPC IDs.\n\n```sql\n(network_flow_logs.peer_vpc_id IN ('vpc-12345678','vpc-0987654'))\n```\n\n### Network Flows by Peer Regions\n\nNetwork flows for anything outside a set of peer regions.\n\n```sql\n(network_flow_logs.peer_regions NOT IN ('us-east-1','us-west-2'))\n```\n\n### Network Flows by Peer AZ ID\n\nNetwork flows for a specific peer AZ.\n\n```sql\n(network_flow_logs.peer_az_id = 'use1-az1')\n```\n\n### Network Flows by Peer Subnet ID\n\nNetwork flows for any peer subnet IDs that do not contain a substring.\n\n```sql\n(network_flow_logs.peer_subnet_id NOT LIKE '%subnet-022%')\n```\n\n### Network Flows by Peer Interface ID\n\nNetwork flows based on a peer interface ID substring.\n\n```sql\n(network_flow_logs.peer_interface_id LIKE 'eni-0a1b2c3d%')\n```\n\n### Network Flows by Peer Instance ID\n\nNetwork flows excluding a particular peer instance ID.\n\n```sql\n(network_flow_logs.peer_instance_id != 'i-0a1b2c3d4e5f67890')\n```\n\n### Network Flows by Region\n\nNetwork flows in multiple regions.\n\n```sql\n(network_flow_logs.region IN ('us-east-1', 'us-west-2', 'eu-central-1'))\n```\n\n### Network Flows by Resource UUID\n\nNetwork flows for resources not matching a specific UUID substring.\n\n```sql\n(network_flow_logs.resource_uuid NOT LIKE '123e4567%')\n```\n\n### Network Flows by Source Address\n\nNetwork flows from a set of source addresses.\n\n```sql\n(network_flow_logs.srcaddr IN ('192.168.1.1', '10.0.0.5', '172.16.0.10'))\n```\n\n### Network Flows by Source Hostname\n\nNetwork flows excluding specific source hostnames.\n\n```sql\n(network_flow_logs.srchostname NOT IN ('example.com', 'internal.service.local'))\n```\n\n### Network Flows by Subnet ID\n\nNetwork flows for subnets with a specific prefix.\n\n```sql\n(network_flow_logs.subnet_id LIKE 'subnet-0a1b%')\n```\n\n### Network Flows by Traffic Category\n\nOnly cross-region traffic.\n\n```sql\n(network_flow_logs.traffic_category = 'cross-region')\n```\n\n### Network Flows by Traffic Path\n\nNetwork flows for Inter-Region VPC Peering. Traffic paths have a specific key, as described below.\n\n| Key | Traffic Path |\n| --- | --- |\n| 1 | In VPC |\n| 2 | Internet Gateway or Gateway VPC Endpoint |\n| 3 | Virtual Private Gateway |\n| 4 | Intra-Region VPC Peering |\n| 5 | Inter-Region VPC Peering |\n| 6 | Local Gateway |\n| 7 | Gateway VPC Endpoint (Nitro-based instances) |\n| 8 | Internet Gateway (Nitro-based instances) |\n\n```sql\n(network_flow_logs.traffic_path = '5')\n```\n\n### Network Flows by VPC ID\n\nEverything except for a specific VPC.\n\n```sql\n(network_flow_logs.vpc_id != 'vpc-12c12345a12345678')\n```\n\n### Multiple Filters\n\nComplex filter that shows combining two different statements using `OR` with multiple criteria.\n\n```sql\n((network_flow_logs.dsthostname = 'datadoghq.com') AND (network_flow_logs.account_id = '1234354678901')) OR ((network_flow_logs.dsthostname = 'github.com') AND (network_flow_logs.account_id = '90876543211'))\n```\n",description:"Learn how to use VQL when querying Network Flow Reports in Vantage.",title:"VQL for Network Flow Reports"}],["vql/resource_report.md",{content:`
|
|
95
|
+
> **Tip:** If you need help constructing a VQL query, navigate to the **Resource Reports** page in the Vantage console and click **New Resource 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.
|
|
96
|
+
|
|
97
|
+
## Resource Reports VQL Schema
|
|
98
|
+
|
|
99
|
+
VQL for Resources Reports comprises two namespaces: \`resources\` and \`tags\`, which represent the available filters on Resource Reports in the Vantage console. To reference a filter, use the following syntax: \`namespace.field\` (e.g., \`resources.region\` or \`tags.name\`). The following fields are available within these namespaces.
|
|
100
|
+
|
|
101
|
+
| Namespace | Field | VQL Example |
|
|
102
|
+
| --- | --- | --- |
|
|
103
|
+
| \`resources\` | \`provider\` | [Providers example](#combining-providers) |
|
|
104
|
+
| \`resources\` | \`region\` | [Region example](#resources-from-a-list-of-regions) |
|
|
105
|
+
| \`resources\` | \`account_id\` | [Account example](#resources-by-account-id) |
|
|
106
|
+
| \`resources\` | \`provider_account_id\` | [Billing Account example](#resources-by-billing-account) |
|
|
107
|
+
| \`resources\` | \`type\` | [Resource Type example](#resources-by-resource-type) |
|
|
108
|
+
| \`resources\` | \`label\` | [Label example](#resources-by-label) |
|
|
109
|
+
| \`resources\` | \`uuid\` | [UUID (AWS ARN) example](#resources-for-specific-arn) |
|
|
110
|
+
| \`resources\` | \`metadata\` | [Metadata example](#resources-by-metadata) |
|
|
111
|
+
| \`tags\` | \`name\` | [Tags name/value example](#filter-by-tag) |
|
|
112
|
+
| \`tags\` | \`value\` | [Untagged example](#filter-for-untagged-resources) |
|
|
113
|
+
|
|
114
|
+
> **Note:** Availability of the fields listed above varies among different cloud providers.
|
|
115
|
+
|
|
116
|
+
### Keywords
|
|
117
|
+
|
|
118
|
+
VQL includes a set of keywords to create complex filter conditions. These keywords function similar to their SQL equivalents.
|
|
119
|
+
|
|
120
|
+
| Keyword | Description | VQL Sample | Explanation |
|
|
121
|
+
| --- | --- | --- | --- |
|
|
122
|
+
| \`AND\` | Logical AND operator | \`resources.provider = 'aws' AND resources.label = '123456'\` | This example filters AWS resources, with a specific associated label, where both conditions must be true. |
|
|
123
|
+
| \`OR\` | Logical OR operator | \`(resources.provider = 'aws') OR (resources.provider = 'gcp')\` | This example retrieves resources from either AWS or GCP. At least one condition must be true. |
|
|
124
|
+
| \`LIKE\` and \`NOT LIKE\` | Performs string comparisons | \`resources.provider = 'aws' AND resources.uuid LIKE '%arn:aws:s3:::my-bucket%'\` | This example selects data where the resource ARN contains \`arn:aws:s3:::my-bucket\`, such as \`arn:aws:s3:::my-bucket-123\`. <br /><br /> This same query also works for \`NOT LIKE\` where data does not contain a particular string: \`resources.provider = 'aws' AND resources.uuid NOT LIKE '%arn:aws:s3:::my-bucket%'\`. |
|
|
125
|
+
| \`IN\`/\`NOT IN\` | Used to compare against an array list | \`(resources.provider = 'aws' AND (resources.region IN ('ap-northeast-1','ap-northeast-3')))\` | This example filters based on a list of regions, returning data for the specified regions <br /><br /> You can also use \`NOT IN\` to find results that are anything but the items within the list: \`(resources.provider = 'aws' AND (resources.region NOT IN ('ap-northeast-1','ap-northeast-3')))\` |
|
|
126
|
+
| \`!=\` | Represents negation, "is not" | \`resources.provider = 'azure' AND (resources.type != 'azurerm_public_ip' AND resources.type != 'azurerm_kubernetes_cluster')\` | This example filters out data from two specified resource types, providing all Azure resources that are *not* these types. |
|
|
127
|
+
| \`<\`, \`>\`, \`<=\`, \`>=\` | Mathematical operators for numerical queries | \`resources.provider = 'azure' AND (resources.type = 'azurerm_virtual_machine' AND resources.metadata->>'virtual_machine_size' > '7')\` | This example looks for Virtual Machines that have a size greater than 7. |
|
|
128
|
+
| \`->>\` | This operator is used only when constructing queries related to metadata | \`resources.provider = 'aws' AND (resources.type = 'aws_instance' AND resources.metadata->>'architecture' = 'x86_64')\` | This example looks for EC2 instances with an architecture of \`x86_64\`. |
|
|
129
|
+
|
|
130
|
+
With these operators and keywords, you can construct complex filter conditions in VQL.
|
|
131
|
+
|
|
132
|
+
## VQL Examples
|
|
133
|
+
|
|
134
|
+
The following examples cover common use cases for VQL.
|
|
135
|
+
|
|
136
|
+
### Combining Providers
|
|
137
|
+
|
|
138
|
+
Filter for provider resources associated with either AWS or GCP.
|
|
139
|
+
|
|
140
|
+
\`\`\`sql
|
|
141
|
+
(resources.provider = 'aws') OR (resources.provider = 'gcp')
|
|
142
|
+
\`\`\`
|
|
143
|
+
|
|
144
|
+
### Resources from a List of Regions
|
|
145
|
+
|
|
146
|
+
Filter for AWS resources in two regions. Note that you will need to use the region code, such as \`us-east-1\`.
|
|
147
|
+
|
|
148
|
+
\`\`\`sql
|
|
149
|
+
resources.provider = 'aws' AND (resources.region = 'us-east-1' OR resources.region = 'us-west-1')
|
|
150
|
+
\`\`\`
|
|
151
|
+
|
|
152
|
+
### Resources by Account ID
|
|
153
|
+
|
|
154
|
+
Resources for a specific set of resource types and account ID.
|
|
155
|
+
|
|
156
|
+
\`\`\`sql
|
|
157
|
+
resources.provider = 'gcp' AND (resources.account_id = 'user-proj-1234') AND (resources.type = 'google_compute_disk' OR resources.type = 'google_compute_instance')
|
|
158
|
+
\`\`\`
|
|
159
|
+
|
|
160
|
+
### Resources by Billing Account
|
|
161
|
+
|
|
162
|
+
Resources for a specific billing account.
|
|
163
|
+
|
|
164
|
+
\`\`\`sql
|
|
165
|
+
resources.provider = 'aws' AND (resources.provider_account_id = '11111111111')
|
|
166
|
+
\`\`\`
|
|
167
|
+
|
|
168
|
+
### Resources by Resource Type
|
|
169
|
+
|
|
170
|
+
Filter resources to see a specific resource type. In the example below, the query is looking for any AWS resource that is *not* an AWS CloudFront Distribution. Resource types are represented like \`aws_cloudfront_distribution\`.
|
|
171
|
+
|
|
172
|
+
\`\`\`sql
|
|
173
|
+
resources.provider = 'aws' AND (resources.type != 'aws_cloudfront_distribution')
|
|
174
|
+
\`\`\`
|
|
175
|
+
|
|
176
|
+
#### Available Resource Type VQL Representations
|
|
177
|
+
| Provider | VQL Representation | Friendly Name |
|
|
178
|
+
| --- | --- | --- |
|
|
179
|
+
| AWS | aws_app_stream_fleet | App Stream Fleet |
|
|
180
|
+
| AWS | aws_app_stream_image_builder | App Stream Image Builder |
|
|
181
|
+
| AWS | aws_auto_scaling_group | Auto Scaling Group |
|
|
182
|
+
| AWS | aws_backup_vault_recovery_point | Backup Vault Recovery Vault |
|
|
183
|
+
| AWS | aws_batch_job_definition | Batch Job Definition |
|
|
184
|
+
| AWS | aws_carrier_gateway | Carrier Gateway |
|
|
185
|
+
| AWS | aws_cloudfront_distribution | CloudFront Distribution |
|
|
186
|
+
| AWS | aws_cloudtrail | CloudTrail |
|
|
187
|
+
| AWS | aws_cloudwatch_log_group | CloudWatch Log Group |
|
|
188
|
+
| AWS | aws_codebuild_project | CodeBuild Project |
|
|
189
|
+
| AWS | aws_codepipeline | CodePipeline |
|
|
190
|
+
| AWS | aws_config_config_rule | Config Rule |
|
|
191
|
+
| AWS | aws_db_instance | RDS Instance |
|
|
192
|
+
| AWS | aws_db_snapshot | RDS Snapshot |
|
|
193
|
+
| AWS | aws_docdb_cluster_instance | DocumentDB Cluster Instance |
|
|
194
|
+
| AWS | aws_dynamodb_table | DynamoDB Table |
|
|
195
|
+
| AWS | aws_ebs_volume | EBS Volume |
|
|
196
|
+
| AWS | aws_ec2_instance | EC2 Instance |
|
|
197
|
+
| AWS | aws_ec2_managed_prefix_list | EC2 Managed Prefix List |
|
|
198
|
+
| AWS | aws_ec2_reserved_instance | EC2 Reserved Instance |
|
|
199
|
+
| AWS | aws_ec2_transit_gateway | EC2 Transit Gateway |
|
|
200
|
+
| AWS | aws_ecr_repository | ECR Repository |
|
|
201
|
+
| AWS | aws_ecs_service | ECS Service |
|
|
202
|
+
| AWS | aws_ecs_task_definition | ECS Task Definition |
|
|
203
|
+
| AWS | aws_efs_file_system | EFS File System |
|
|
204
|
+
| AWS | aws_egress_only_internet_gateway | Egress-Only Internet Gateway |
|
|
205
|
+
| AWS | aws_eip | Elastic IP |
|
|
206
|
+
| AWS | aws_elasticache_cluster | ElastiCache Cluster |
|
|
207
|
+
| AWS | aws_elasticsearch_domain | Elasticsearch Domain |
|
|
208
|
+
| AWS | aws_flow_log | Flow Log |
|
|
209
|
+
| AWS | aws_fsx_volume | FsX Volume |
|
|
210
|
+
| AWS | aws_fsx_file_system | FsX File System |
|
|
211
|
+
| AWS | aws_glacier_vault | Glacier Vault |
|
|
212
|
+
| AWS | aws_globalaccelerator_accelerator | Global Accelerator |
|
|
213
|
+
| AWS | aws_glue_job | Glue Job |
|
|
214
|
+
| AWS | aws_instance_snapshot | EC2 Instance Snapshot |
|
|
215
|
+
| AWS | aws_internet_gateway | Internet Gateway |
|
|
216
|
+
| AWS | aws_kms_key | KMS Key |
|
|
217
|
+
| AWS | aws_lambda_function | Lambda Function |
|
|
218
|
+
| AWS | aws_lb | Load Balancer |
|
|
219
|
+
| AWS | aws_mediaconnect_flow | MediaConnect Flow |
|
|
220
|
+
| AWS | aws_mediaconvert_job | MediaConvert Job |
|
|
221
|
+
| AWS | aws_medialive_channel | MediaLive Channel |
|
|
222
|
+
| AWS | aws_media_package_channel | MediaPackage Channel |
|
|
223
|
+
| AWS | aws_media_package_vod_asset | MediaPackage VOD Asset |
|
|
224
|
+
| AWS | aws_media_store_container | MediaStore Container |
|
|
225
|
+
| AWS | aws_media_tailor_channel | MediaTailor Channel |
|
|
226
|
+
| AWS | aws_media_tailor_playback_configuration | MediaTailor Playback Configuration |
|
|
227
|
+
| AWS | aws_mq_broker | MQ Broker |
|
|
228
|
+
| AWS | aws_msk_cluster | MSK Cluster |
|
|
229
|
+
| AWS | aws_nat_gateway | NAT Gateway |
|
|
230
|
+
| AWS | aws_network_interface | Network Interface |
|
|
231
|
+
| AWS | aws_outposts_outpost | Outposts Outpost |
|
|
232
|
+
| AWS | aws_rds_reserved_instance | RDS Reserved Instance |
|
|
233
|
+
| AWS | aws_redshift_cluster | Redshift Cluster |
|
|
234
|
+
| AWS | aws_report_definition | Report Definition |
|
|
235
|
+
| AWS | aws_route53_resolver_query_log_config | Route 53 Resolver Query Log Config |
|
|
236
|
+
| AWS | aws_route53_zone | Route 53 Zone |
|
|
237
|
+
| AWS | aws_route_table | Route Table |
|
|
238
|
+
| AWS | aws_s3_bucket | S3 Bucket |
|
|
239
|
+
| AWS | aws_sagemaker_model | SageMaker Model |
|
|
240
|
+
| AWS | aws_savings_plan | Savings Plan |
|
|
241
|
+
| AWS | aws_secretsmanager_secret | Secrets Manager Secret |
|
|
242
|
+
| AWS | aws_sns_topic | SNS Topic |
|
|
243
|
+
| AWS | aws_sqs_queue | SQS Queue |
|
|
244
|
+
| AWS | aws_subnet | Subnet |
|
|
245
|
+
| AWS | aws_transfer_server | Transfer Server |
|
|
246
|
+
| AWS | aws_vpc | VPC |
|
|
247
|
+
| AWS | aws_vpc_endpoint | VPC Endpoint |
|
|
248
|
+
| AWS | aws_vpc_peering_connection | VPC Peering Connection |
|
|
249
|
+
| AWS | aws_vpn_gateway | VPN Gateway |
|
|
250
|
+
| AWS | aws_wafv2_web_acl | WAFv2 Web ACL |
|
|
251
|
+
| AWS | aws_workspaces_workspace | WorkSpaces Workspace |
|
|
252
|
+
| Anthropic | anthropic_api_key | API Keys |
|
|
253
|
+
| Azure | azurerm_application_gateway | Application Gateway |
|
|
254
|
+
| Azure | azurerm_application_insights | Application Insights |
|
|
255
|
+
| Azure | azurerm_app_service_plan | App Service Plan |
|
|
256
|
+
| Azure | azurerm_firewall | Firewall |
|
|
257
|
+
| Azure | azurerm_snapshot | Snapshot |
|
|
258
|
+
| Azure | azurerm_container_registry | Container Registry |
|
|
259
|
+
| Azure | azurerm_cosmosdb_account | CosmosDB Account |
|
|
260
|
+
| Azure | azurerm_databricks_workspace | Databricks Workspace |
|
|
261
|
+
| Azure | azurerm_managed_disk | Managed Disk |
|
|
262
|
+
| Azure | azurerm_dns_zone | DNS Zone |
|
|
263
|
+
| Azure | azurerm_sql_elasticpool | SQL Elastic Pool |
|
|
264
|
+
| Azure | azurerm_express_route_circuit | ExpressRoute Circuit |
|
|
265
|
+
| Azure | azurerm_lb | Load Balancer |
|
|
266
|
+
| Azure | azurerm_log_analytics_workspace | Log Analytics Workspace |
|
|
267
|
+
| Azure | azurerm_logic_app_workflow | Logic App Workflow |
|
|
268
|
+
| Azure | azurerm_kubernetes_cluster | Kubernetes Cluster |
|
|
269
|
+
| Azure | azurerm_nat_gateway | NAT Gateway |
|
|
270
|
+
| Azure | azurerm_postgresql_flexible_server | PostgreSQL Flexible Server |
|
|
271
|
+
| Azure | azurerm_postgresql_server | PostgreSQL Server |
|
|
272
|
+
| Azure | azurerm_powerbi_dedicated_capacity | Power BI Dedicated Capacity |
|
|
273
|
+
| Azure | azurerm_private_endpoint | Private Endpoint |
|
|
274
|
+
| Azure | azurerm_public_ip | Public IP |
|
|
275
|
+
| Azure | azurerm_recovery_services_vault | Recovery Services Vault |
|
|
276
|
+
| Azure | azurerm_redis_cache | Redis Cache |
|
|
277
|
+
| Azure | azurerm_security_center_pricing | Security Center Pricing |
|
|
278
|
+
| Azure | azurerm_sql_database | SQL Database |
|
|
279
|
+
| Azure | azurerm_sql_managed_instance | SQL Managed Instance |
|
|
280
|
+
| Azure | azurerm_storage_account | Storage Account |
|
|
281
|
+
| Azure | azurerm_synapse_workspace | Synapse Workspace |
|
|
282
|
+
| Azure | azurerm_virtual_machine | Virtual Machine |
|
|
283
|
+
| Azure | azurerm_virtual_machine_scale_set | Virtual Machine Scale Set |
|
|
284
|
+
| Azure | azurerm_virtual_network_gateway | Virtual Network Gateway |
|
|
285
|
+
| ClickHouse Cloud | clickhouse_service | Services |
|
|
286
|
+
| Confluent | confluent_kafka_cluster | Kafka Cluster |
|
|
287
|
+
| Datadog | datadog_custom_metric | Custom Metric |
|
|
288
|
+
| Google | google_alloydb_backup | AlloyDB Backup |
|
|
289
|
+
| Google | google_alloydb_cluster | AlloyDB Cluster |
|
|
290
|
+
| Google | google_alloydb_instance | AlloyDB Instance |
|
|
291
|
+
| Google | google_app_engine_service | App Engine Service |
|
|
292
|
+
| Google | google_bigquery_dataset | BigQuery Dataset |
|
|
293
|
+
| Google | google_bigtable_instance | Bigtable Instance |
|
|
294
|
+
| Google | google_compute_disk | Compute Disk |
|
|
295
|
+
| Google | google_compute_instance | Compute Instance |
|
|
296
|
+
| Google | google_container_cluster | Container Cluster |
|
|
297
|
+
| Google | google_dataflow_job | Dataflow Job |
|
|
298
|
+
| Google | google_firestore_database | Firestore Database |
|
|
299
|
+
| Google | google_cloudfunctions_function | Cloud Functions Function |
|
|
300
|
+
| Google | google_logging_project_bucket_config | Logging Project Bucket Config |
|
|
301
|
+
| Google | google_redis_instance | Redis Instance |
|
|
302
|
+
| Google | google_cloud_run_service | Cloud Run Service |
|
|
303
|
+
| Google | google_secret_manager_secret | Secret Manager Secret |
|
|
304
|
+
| Google | google_spanner_instance | Spanner Instance |
|
|
305
|
+
| Google | google_sql_database_instance | SQL Database Instance |
|
|
306
|
+
| Google | google_storage_bucket | Storage Bucket |
|
|
307
|
+
| Kubernetes | kubernetes_workload | Kubernetes Workload |
|
|
308
|
+
| Linode | linode_instance | Instances |
|
|
309
|
+
| Linode | linode_node_balancer | Node Balancer |
|
|
310
|
+
| Linode | linode_node_balancer_type | Node Balancer Type |
|
|
311
|
+
| Linode | linode_volume | Volume |
|
|
312
|
+
| Linode | linode_volume_type | Volume Type |
|
|
313
|
+
| Linode | linode_object_storage | Object Storage |
|
|
314
|
+
| Linode | linode_linode_type | Linode Type |
|
|
315
|
+
| Linode | linode_object_storage_type | Object Storage Type |
|
|
316
|
+
| Linode | linode_kubernetes_cluster | Kubernetes Clusters |
|
|
317
|
+
| Linode | linode_kubernetes_type | Kubernetes Type |
|
|
318
|
+
| Linode | linode_image | Images |
|
|
319
|
+
| MongoDB | mongodbatlas_cluster | Atlas Cluster |
|
|
320
|
+
| PlanetScale | planetscale_database | Database |
|
|
321
|
+
| Snowflake | snowflake_query | Queries |
|
|
322
|
+
| Temporal | temporal_namespace | Namespaces |
|
|
323
|
+
|
|
324
|
+
### Resources by Label
|
|
325
|
+
|
|
326
|
+
Resources by specific label.
|
|
327
|
+
|
|
328
|
+
\`\`\`sql
|
|
329
|
+
resources.provider = 'aws' AND resources.label = '123456'
|
|
330
|
+
\`\`\`
|
|
331
|
+
|
|
332
|
+
### Resources for Specific ARN
|
|
333
|
+
|
|
334
|
+
The UUID is the unique identifier for the resource. In the case of AWS resources, this is the ARN. The below example shows a query for resources that contain specific text within the ARN.
|
|
335
|
+
|
|
336
|
+
\`\`\`sql
|
|
337
|
+
resources.provider = 'aws' AND resources.uuid LIKE '%arn:aws:s3:::my-bucket%'
|
|
338
|
+
\`\`\`
|
|
339
|
+
|
|
340
|
+
### Resources by Metadata
|
|
341
|
+
|
|
342
|
+
Resource metadata queries require both \`provider\` and \`type\` as well as \`metadata\`. Metadata uses a specific syntax (e.g., \`resources.metadata->>'domain' = 'vantage.sh'\`).
|
|
343
|
+
|
|
344
|
+
\`\`\`sql
|
|
345
|
+
resources.provider = 'aws' AND (resources.type = 'aws_cloudfront_distribution' AND resources.metadata->>'domain' = 'vantage.sh')
|
|
346
|
+
\`\`\`
|
|
347
|
+
|
|
348
|
+
### Filter by Tag
|
|
349
|
+
|
|
350
|
+
Filter resources based on a specific tag, such as \`terraform\`, with the value \`true\`, in AWS.
|
|
351
|
+
|
|
352
|
+
\`\`\`sql
|
|
353
|
+
resources.provider = 'aws' AND (tags.name = 'terraform' AND tags.value = 'true')
|
|
354
|
+
\`\`\`
|
|
355
|
+
|
|
356
|
+
### Filter for Untagged Resources
|
|
357
|
+
|
|
358
|
+
On providers that have a **Not Tagged** 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.
|
|
359
|
+
|
|
360
|
+
\`\`\`sql
|
|
361
|
+
(resources.provider = 'gcp' AND tags.name = NULL) OR (resources.provider = 'aws' AND tags.name = NULL)
|
|
362
|
+
\`\`\`
|
|
363
|
+
`,description:"Learn how to use VQL when querying Resource Reports in Vantage.",title:"VQL for Resource Reports"}]]));var k0="2.6.2";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 I=class{constructor(t){this.exception=t}};var uv=new Map;function O(e){let t=(r,o)=>{r.tool(e.name,e.description,e.args,{readOnlyHint:e.annotations.readOnly,openWorldHint:e.annotations.openWorld,destructiveHint:e.annotations.destructive},async n=>{try{let i=await e.execute(n,o());return{content:[{type:"text",text:JSON.stringify(i,null,2)}],isError:!1}}catch(i){if(i instanceof I)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=`
|
|
51
364
|
Creates a budget based on the parameters specified. This is useful if you have been tasked with managing budgets
|
|
52
365
|
or you are building a cost report with budgets in mind.
|
|
53
|
-
`.trim(),
|
|
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 I({errors:r.errors});return r.data}});var G4=`
|
|
54
367
|
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.
|
|
55
|
-
`.trim(),
|
|
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 I({errors:r.errors});return r.data}});var K4=`
|
|
56
369
|
Create a new Cost Report in Vantage.
|
|
57
370
|
|
|
58
371
|
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.
|
|
@@ -77,7 +390,7 @@ Tag Filtering:
|
|
|
77
390
|
- Multiple tag values: (costs.provider = 'aws' AND tags.name = 'environment' AND (tags.value = 'dev' OR tags.value = 'staging'))
|
|
78
391
|
|
|
79
392
|
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.
|
|
80
|
-
`.trim(),
|
|
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 I({errors:r.errors});return r.data}});var X4=`
|
|
81
394
|
Create a new Dashboard in Vantage.
|
|
82
395
|
|
|
83
396
|
Dashboards are collections of widgets that visualize cost data. You can optionally attach widgets (by
|
|
@@ -97,10 +410,10 @@ The list of supported widgets is:
|
|
|
97
410
|
|
|
98
411
|
The token returned in the response can be used to link to the Dashboard in the Vantage Web UI:
|
|
99
412
|
https://console.vantage.sh/go/<token>
|
|
100
|
-
`.trim(),
|
|
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 I({errors:r.errors});return r.data}});var rU=`
|
|
101
414
|
Create a Folder for organizing Cost Reports. Folders can be nested by specifying a parent_folder_token.
|
|
102
415
|
SavedFilters can be applied to the Folder so that any Cost Report within it inherits those filters.
|
|
103
|
-
`.trim(),
|
|
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 I({errors:r.errors});return r.data}});var nU=`
|
|
104
417
|
Create a Virtual Tag Config in Vantage.
|
|
105
418
|
|
|
106
419
|
Virtual Tag Configs define a derived (virtual) tag key and a set of values determined by VQL filters.
|
|
@@ -111,33 +424,33 @@ You can optionally:
|
|
|
111
424
|
- backfill_until: backfill the virtual tag values to an earliest month
|
|
112
425
|
- collapsed_tag_keys: collapse values for specific underlying tag keys (optionally scoped by provider)
|
|
113
426
|
- values: define named values via VQL filters, optionally linked to Business Metrics and/or cost metrics
|
|
114
|
-
`.trim(),
|
|
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 I({errors:r.errors});return r.data}});var z0=We(ct());var a2=`
|
|
115
428
|
Deletes a cost report by its token. This action is irreversible.
|
|
116
|
-
`.trim(),
|
|
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 I({errors:r.errors});return{token:e.cost_report_token}}});var E0=We(ct());var u2=`
|
|
117
430
|
Deletes a Folder. Cost Reports within the Folder will not be deleted.
|
|
118
|
-
`.trim(),
|
|
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,E0.pathEncode)(e.folder_token)}`,{},"DELETE");if(!r.ok)throw new I({errors:r.errors});return{token:e.folder_token}}});var I0=We(ct());var l2=`
|
|
119
432
|
Gets a specific anomaly alert by its token.
|
|
120
|
-
`.trim(),
|
|
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,I0.pathEncode)(e.anomaly_alert_token)}`,{},"GET");if(!r.ok)throw new I({errors:r.errors});return r.data}});var N0=We(ct());var p2=`
|
|
121
434
|
Gets a specific cost alert by its token.
|
|
122
|
-
`.trim(),
|
|
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 I({errors:r.errors});return r.data}});var m2=`
|
|
123
436
|
Get the list of Cost Provider Accounts that the current user has access to in their workspace and their names.
|
|
124
437
|
This is useful for mapping IDs you have gotten from other endpoints to human-readable names, or if you need to get the
|
|
125
438
|
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.
|
|
126
|
-
`.trim(),
|
|
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 I({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=`
|
|
127
440
|
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.
|
|
128
441
|
If the user does not set a date, best to pick the next month as the default.
|
|
129
442
|
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>
|
|
130
|
-
`.trim(),
|
|
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 I({errors:o.errors});return{forecasted_costs:o.data.forecasted_costs,pagination:Y(o.data)}}});var j0=We(ct());var v2=`
|
|
131
444
|
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>
|
|
132
445
|
The same token can be used with the get-cost-report-forecast tool to retrieve forecasted future costs for the report.
|
|
133
|
-
`.trim(),
|
|
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 I({errors:r.errors});return r.data}});var A0=We(ct());var b2=`
|
|
134
447
|
Gets a specific Folder by its token.
|
|
135
|
-
`.trim(),
|
|
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 I({errors:r.errors});return r.data}});var w2=`
|
|
136
449
|
Get data that is available to the current auth token.
|
|
137
450
|
This includes the list of Workspaces they have access to.
|
|
138
451
|
|
|
139
452
|
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.
|
|
140
|
-
`.trim()
|
|
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 I({errors:r.errors});return r.data}});var D0=We(ct());var k2=`
|
|
141
454
|
Get detailed information about a specific provider resource using its token or UUID.
|
|
142
455
|
|
|
143
456
|
This returns comprehensive details about the resource including:
|
|
@@ -149,7 +462,7 @@ This returns comprehensive details about the resource including:
|
|
|
149
462
|
|
|
150
463
|
The resource_token can be either a Vantage token (starting with prvdr_rsrc) or the resource's UUID/ARN from the cloud provider.
|
|
151
464
|
Set include_cost to true to get cost information broken down by category.
|
|
152
|
-
`.trim(),
|
|
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 I({errors:r.errors});return r.data}});var C0=We(ct());var x2=`
|
|
153
466
|
Get comprehensive details about a specific cost optimization recommendation using its unique token.
|
|
154
467
|
|
|
155
468
|
This tool provides in-depth information about a single recommendation including:
|
|
@@ -166,7 +479,7 @@ This tool provides in-depth information about a single recommendation including:
|
|
|
166
479
|
Use this tool after getting a recommendation token from list-recommendations to understand exactly what optimization is being suggested and the potential impact.
|
|
167
480
|
|
|
168
481
|
The recommendation token can also be used with get-recommendation-resources to see the specific infrastructure resources involved.
|
|
169
|
-
`.trim(),
|
|
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 I({errors:r.errors});return r.data}});var pv=We(ct());var T2=`
|
|
170
483
|
Get comprehensive details about a specific infrastructure resource within a cost optimization recommendation, including the exact actions recommended for that resource.
|
|
171
484
|
|
|
172
485
|
This tool provides the deepest level of detail about a single resource that's part of a recommendation. The response includes:
|
|
@@ -188,7 +501,7 @@ Use this tool when you need to understand exactly what should be done with a spe
|
|
|
188
501
|
This is the most granular level of recommendation data available and is essential for making informed decisions about implementing specific optimizations.
|
|
189
502
|
|
|
190
503
|
You must have both the recommendation token (from list-recommendations) and the resource token (from get-recommendation-resources) to use this tool.
|
|
191
|
-
`.trim(),
|
|
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 I({errors:r.errors});return r.data}});var q0=We(ct());var z2=`
|
|
192
505
|
Get a paginated list of all infrastructure resources affected by a specific cost optimization recommendation.
|
|
193
506
|
|
|
194
507
|
This tool returns the actual cloud resources (instances, volumes, load balancers, etc.) that are involved in a recommendation. Each resource entry includes:
|
|
@@ -207,16 +520,16 @@ Use this tool after getting recommendation details to see exactly which resource
|
|
|
207
520
|
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.
|
|
208
521
|
|
|
209
522
|
Use pagination (page parameter) to navigate through large numbers of affected resources.
|
|
210
|
-
`.trim(),
|
|
523
|
+
`.trim(),E2={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:E2,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 I({errors:o.errors});return{resources:o.data.resources,pagination:Y(o.data)}}});var M0=We(ct());var I2=`
|
|
211
524
|
Gets a specific team with its token.
|
|
212
|
-
`.trim(),
|
|
525
|
+
`.trim(),N2={token:g.string().describe("The team token to retrieve")},hJ=O({name:"get-team",description:I2,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 I({errors:r.errors});return r.data}});var O2=`
|
|
213
526
|
Return all Teams that the user has access to.
|
|
214
|
-
`.trim(),
|
|
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 I({errors:o.errors});return{teams:o.data.teams,pagination:Y(o.data)}}});var j2=`
|
|
215
528
|
Return all Users that the user can see in the workspace.
|
|
216
|
-
`.trim(),
|
|
529
|
+
`.trim(),A2={page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},EJ=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 I({errors:o.errors});return{users:o.data.users,pagination:Y(o.data)}}});var D2=`
|
|
217
530
|
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.
|
|
218
531
|
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>
|
|
219
|
-
`.trim(),
|
|
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 I({errors:o.errors});return{anomaly_alerts:o.data.anomaly_alerts,pagination:Y(o.data)}}});var q2=`
|
|
220
533
|
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.
|
|
221
534
|
|
|
222
535
|
Audit logs track various types of actions including:
|
|
@@ -253,34 +566,34 @@ Common use cases for audit logs include:
|
|
|
253
566
|
- Change management (reviewing modifications to reports or configurations)
|
|
254
567
|
- Activity monitoring (understanding workspace usage patterns)
|
|
255
568
|
- Distinguishing between human actions and autonomous agent actions (via scoutAction field and finops_agent source filter)
|
|
256
|
-
`.trim(),
|
|
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 I({errors:o.errors});return{audit_logs:o.data.audit_logs,pagination:Y(o.data)}}});var U2=`
|
|
257
570
|
List all budgets available in the Vantage account. Budgets help track spending against predefined limits.
|
|
258
571
|
Use the page value of 1 to start.
|
|
259
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.
|
|
260
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.
|
|
261
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>
|
|
262
|
-
`.trim(),
|
|
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 I({errors:o.errors});return{budgets:o.data.budgets,pagination:Y(o.data)}}});var Z2=`
|
|
263
576
|
List all cost alerts available in the Vantage account. Cost alerts notify you when spending exceeds a specified threshold for a given cost report.
|
|
264
577
|
Use the page value of 1 to start.
|
|
265
|
-
`.trim(),
|
|
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 I({errors:o.errors});return{cost_alerts:o.data.cost_alerts,pagination:Y(o.data)}}});var F2=`
|
|
266
579
|
List all cost provider integrations available to provide costs data from and their associated accounts.
|
|
267
580
|
Integrations are the cost providers that Vantage is configured to connect to and pull cost data from.
|
|
268
581
|
If a user wants to see their providers in the Vantage Web UI, they can visit https://console.vantage.sh/settings/integrations
|
|
269
582
|
|
|
270
583
|
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":
|
|
271
584
|
(costs.provider = 'custom_provider:accss_crdntl_07171984')
|
|
272
|
-
`.trim(),
|
|
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 I({errors:o.errors});return{integrations:o.data.integrations,pagination:Y(o.data)}}});var G2=`
|
|
273
586
|
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.
|
|
274
|
-
`.trim(),
|
|
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 I({errors:r.errors});return{providers:r.data.cost_providers,pagination:Y(r.data)}}});var H2=`
|
|
275
588
|
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.
|
|
276
589
|
When you first call this function, use the "Page" parameter of 1.
|
|
277
590
|
The 'Title' of a report is a good way to know what the report is about.
|
|
278
591
|
The 'filter' of a report also gives clues to the data it provides.
|
|
279
592
|
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>
|
|
280
593
|
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.
|
|
281
|
-
`.trim(),
|
|
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 I({errors:o.errors});return{cost_reports:o.data.cost_reports,pagination:Y(o.data)}}});var J2=`
|
|
282
595
|
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.
|
|
283
|
-
`.trim(),
|
|
596
|
+
`.trim(),Q2={workspace_token:g.string().describe("Workspace token to list cost services for")},EQ=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 I({errors:r.errors});return{cost_services:r.data.cost_services}}});var Y2=`
|
|
284
597
|
List the cost items inside a report. The Token of a Report must be provided. Use the page value of 1 to start.
|
|
285
598
|
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>
|
|
286
599
|
|
|
@@ -289,17 +602,17 @@ When DateBin=day you get a record for each service spend on that day. For DateBi
|
|
|
289
602
|
with the accrued_at field set to the first day of the week, but the spend item represents spend for a full week.
|
|
290
603
|
Same with DateBin=month, each record returned covers a month of data. This lets you get answers with processing fewer
|
|
291
604
|
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.
|
|
292
|
-
`.trim(),
|
|
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 I({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=`
|
|
293
606
|
List all dashboards available in the Vantage account. Dashboards provide visualizations of cost data.
|
|
294
607
|
Use the page value of 1 to start.
|
|
295
608
|
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>
|
|
296
|
-
`.trim(),
|
|
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 I({errors:o.errors});return{dashboards:o.data.dashboards,pagination:Y(o.data)}}});var rL=`
|
|
297
610
|
List all Folders for organizing Cost Reports. Folders can be nested within other Folders via the parent_folder_token field.
|
|
298
611
|
When you first call this function, use the "page" parameter of 1.
|
|
299
612
|
The 'title' of a Folder describes its purpose.
|
|
300
613
|
The 'saved_filter_tokens' field contains tokens of SavedFilters applied to Cost Reports within the Folder.
|
|
301
614
|
The 'token' of a Folder can be used to generate a link in the Vantage Web UI: https://console.vantage.sh/go/<token>
|
|
302
|
-
`.trim(),
|
|
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 I({errors:o.errors});return{folders:o.data.folders,pagination:Y(o.data)}}});var oL=`
|
|
303
616
|
List infrastructure provider resources (instances, volumes, load balancers, etc.) from your cloud accounts.
|
|
304
617
|
Resources can be fetched either from a specific Resource Report or by using VQL filters.
|
|
305
618
|
|
|
@@ -376,7 +689,7 @@ Use the page parameter starting with 1 for pagination.
|
|
|
376
689
|
|
|
377
690
|
Resources include metadata specific to their type (EC2 instances show instance type, EBS volumes show size, etc.).
|
|
378
691
|
Each resource has a unique token that can be used to get more details or link to the Vantage Web UI.
|
|
379
|
-
`.trim(),
|
|
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 I({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=`
|
|
380
693
|
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.
|
|
381
694
|
|
|
382
695
|
Use the page value of 1 to start pagination.
|
|
@@ -400,15 +713,15 @@ Recommendations can be filtered by status (open shows active recommendations, re
|
|
|
400
713
|
The token of each recommendation can be used with other recommendation tools to get detailed information and see specific resources affected.
|
|
401
714
|
|
|
402
715
|
For users to view and manage recommendations in the Vantage Web UI, they can visit https://console.vantage.sh/recommendations
|
|
403
|
-
`.trim(),
|
|
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 I({errors:o.errors});return{recommendations:o.data.recommendations,pagination:Y(o.data)}}});var U0=We(ct());var pL=`
|
|
404
717
|
Tags can have many values. Use this tool to find the values and service providers that are associated with a tag.
|
|
405
|
-
`.trim(),
|
|
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 I({errors:o.errors});return{tag_values:o.data.tag_values,pagination:Y(o.data)}}});var mL=`
|
|
406
719
|
List tags that can be used to filter costs and cost reports.
|
|
407
720
|
Tags are associated with one or more Cost Providers.
|
|
408
721
|
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>
|
|
409
|
-
`.trim(),
|
|
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 I({errors:o.errors});return{tags:o.data.tags,pagination:Y(o.data)}}});var gL=`
|
|
410
723
|
Retrieve the unit costs for a given CostReport, with optional paging, date filters, and ordering.
|
|
411
|
-
`.trim(),
|
|
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")},I7=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 I({errors:o.errors});return{unit_costs:o.data.unit_costs,pagination:Y(o.data)}}});var vL=`
|
|
412
725
|
Query for costs in a Vantage Account. These are independent of a cost reports.
|
|
413
726
|
Use Vantage VQL to structure a query.
|
|
414
727
|
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.
|
|
@@ -442,12 +755,12 @@ When DateBin=day you get a record for each service spend on that day. For DateBi
|
|
|
442
755
|
with the accrued_at field set to the first day of the week, but the spend item represents spend for a full week.
|
|
443
756
|
Same with DateBin=month, each record returned covers a month of data. This lets you get answers with processing fewer
|
|
444
757
|
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.
|
|
445
|
-
`.trim(),
|
|
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 I({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=`
|
|
446
759
|
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.
|
|
447
760
|
Stop suggesting if they say they're not interested in providing feedback.
|
|
448
|
-
`.trim(),
|
|
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 I({errors:r.errors});return r.data}});var L0=We(ct());var $L=`
|
|
449
762
|
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.
|
|
450
|
-
`.trim(),
|
|
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 I({errors:n.errors});return n.data}});var Z0=We(ct());var kL=`
|
|
451
764
|
Updates a Folder for organizing Cost Reports. You can update its title, move it to a different parent Folder, or change its SavedFilter tokens.
|
|
452
|
-
`.trim(),
|
|
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 I({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)});
|
|
453
766
|
//# sourceMappingURL=index.js.map
|