bestjsonformatter 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +149 -25
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +429 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/lib/json-check.d.ts +32 -0
- package/dist/lib/json-check.js +132 -0
- package/dist/lib/json-schema.d.ts +19 -0
- package/dist/lib/json-schema.js +195 -0
- package/dist/lib/json-tools.d.ts +41 -0
- package/dist/lib/json-tools.js +543 -0
- package/dist/lib/lossless-json.d.ts +83 -0
- package/dist/lib/lossless-json.js +508 -0
- package/package.json +48 -12
- package/dist/cli.mjs +0 -248
package/dist/cli.mjs
DELETED
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
var cP=Object.create;var Cp=Object.defineProperty;var uP=Object.getOwnPropertyDescriptor;var lP=Object.getOwnPropertyNames;var dP=Object.getPrototypeOf,fP=Object.prototype.hasOwnProperty;var xc=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var Se=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(i){throw r=[i],i}};var $=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},Ut=(t,e)=>{for(var r in e)Cp(t,r,{get:e[r],enumerable:!0})},pP=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of lP(e))!fP.call(t,n)&&n!==r&&Cp(t,n,{get:()=>e[n],enumerable:!(i=uP(e,n))||i.enumerable});return t};var Vo=(t,e,r)=>(r=t!=null?cP(dP(t)):{},pP(e||!t||!t.__esModule?Cp(r,"default",{value:t,enumerable:!0}):r,t));function _t(t,e={}){return new Rp(t,e).parse()}function Dp(t){return t===0?"":t==="tab"?" ":" ".repeat(t??2)}function b$(t,e){return _t(t,{indent:Dp(e)})}function In(t,e=2,r=!1,i=!1){let n=Dp(e),o=(s,a)=>{if(s.kind==="number"&&i)return Jo(s.raw);if(s.kind==="string"||s.kind==="number"||s.kind==="boolean"||s.kind==="null")return s.raw;let c=a+1,u=n?`
|
|
3
|
-
${n.repeat(c)}`:"",l=n?`
|
|
4
|
-
${n.repeat(a)}`:"";if(s.kind==="array")return s.items.length?`[${u}${s.items.map(h=>o(h,c)).join(`,${u}`)}${l}]`:"[]";if(!s.entries.length)return"{}";let d=r?s.entries.map((h,f)=>({entry:h,index:f})).sort((h,f)=>h.entry.key<f.entry.key?-1:h.entry.key>f.entry.key?1:h.index-f.index):s.entries.map((h,f)=>({entry:h,index:f})),m=n?": ":":";return`{${u}${d.map(({entry:h})=>`${h.keyRaw}${m}${o(h.value,c)}`).join(`,${u}`)}${l}}`};return o(t,0)}function Jo(t){let e=t.startsWith("-"),r=e?t.slice(1):t,[i,n="0"]=r.toLowerCase().split("e"),o=i.indexOf("."),s=i.replace(".","").replace(/^0+/,""),a=Number(n)-(o===-1?0:i.length-o-1);if(!s)return"0";for(;s.endsWith("0");)s=s.slice(0,-1),a+=1;return`${e?"-":""}${s}e${a}`}function wr(t,e=!1){switch(t.kind){case"null":return null;case"boolean":return t.value;case"string":return t.value;case"number":{if(!e)return Number(t.raw);if(!t.raw.includes(".")&&!/[eE]/.test(t.raw)){let r=BigInt(t.raw);if(r<=BigInt(Number.MAX_SAFE_INTEGER)&&r>=BigInt(Number.MIN_SAFE_INTEGER))return Number(t.raw)}return new xn(t.raw)}case"array":return t.items.map(r=>wr(r,e));case"object":{let r={};for(let i of t.entries)r[i.key]=wr(i.value,e);return r}}}function Ic(t,e=2){let r=Dp(e),i=new Set,n=(o,s)=>{if(o instanceof xn)return o.raw;if(o===null||typeof o=="boolean"||typeof o=="number"||typeof o=="string")return JSON.stringify(o);if(typeof o=="bigint")return o.toString();if(o===void 0)return"null";if(typeof o!="object")return JSON.stringify(String(o));if(i.has(o))throw new TypeError("Cannot serialize a circular JSONPath result.");i.add(o);let a=s+1,c=r?`
|
|
5
|
-
${r.repeat(a)}`:"",u=r?`
|
|
6
|
-
${r.repeat(s)}`:"",l;if(Array.isArray(o))l=o.length?`[${c}${o.map(d=>n(d,a)).join(`,${c}`)}${u}]`:"[]";else{let d=Object.entries(o);l=d.length?`{${c}${d.map(([m,h])=>`${JSON.stringify(m)}${r?": ":":"}${n(h,a)}`).join(`,${c}`)}${u}}`:"{}"}return i.delete(o),l};return n(t,0)}var ii,v$,Rp,xn,Mp=Se(()=>{"use strict";ii=class extends Error{constructor(e,r,i){super(e),this.name="JsonSyntaxError",this.offset=Math.max(0,Math.min(i,r.length));let n=r.slice(0,this.offset);this.line=1,this.column=1;for(let o=0;o<n.length;o+=1)n.charCodeAt(o)===10?(this.line+=1,this.column=1):this.column+=1}},v$=4096,Rp=class{constructor(e,r){this.position=0;this.depth=0;this.duplicateKeys=0;this.unsafeNumbers=0;this.values=0;this.treeTruncated=!1;this.rootType="null";this.input=e,this.buildTree=r.buildTree===!0,this.maxTreeValues=r.maxTreeValues??Number.POSITIVE_INFINITY,this.indent=r.indent,this.output=r.indent===void 0?null:[]}parse(){this.skipWhitespace(),this.position===this.input.length&&this.fail("Paste or upload JSON to begin.");let e=this.input[this.position];this.rootType=e==="{"?"object":e==="["?"array":e==='"'?"string":e==="t"||e==="f"?"boolean":e==="n"?"null":"number";let r=this.parseValue();return this.skipWhitespace(),this.position!==this.input.length&&this.fail("Unexpected content after the JSON value."),r&&(this.rootType=r.kind),{root:r,formatted:this.output?.join(""),metadata:{type:this.rootType,duplicateKeys:this.duplicateKeys,unsafeNumbers:this.unsafeNumbers,values:this.values,treeTruncated:this.treeTruncated}}}fail(e,r=this.position){throw new ii(e,this.input,r)}write(e){this.output?.push(e)}writeLine(e=this.depth){this.indent&&this.write(`
|
|
7
|
-
${this.indent.repeat(e)}`)}skipWhitespace(){for(;this.position<this.input.length;){let e=this.input.charCodeAt(this.position);if(e!==32&&e!==9&&e!==10&&e!==13)break;this.position+=1}}parseValue(){this.depth>v$&&this.fail(`JSON nesting exceeds the supported depth of ${v$}.`),this.values+=1,this.buildTree&&this.values>this.maxTreeValues&&(this.buildTree=!1,this.treeTruncated=!0);let e=this.input[this.position],r;return e==="{"?r=this.parseObject():e==="["?r=this.parseArray():e==='"'?r=this.parseString():e==="t"?r=this.parseLiteral("true",!0):e==="f"?r=this.parseLiteral("false",!1):e==="n"?r=this.parseNull():e==="-"||e>="0"&&e<="9"?r=this.parseNumber():e===void 0?this.fail("Expected a JSON value."):this.fail(`Unexpected ${JSON.stringify(e)}; expected a JSON value.`),r}parseObject(){let e=this.position,r=[],i=new Set;if(this.position+=1,this.write("{"),this.skipWhitespace(),this.input[this.position]==="}")return this.position+=1,this.write("}"),this.buildTree?{kind:"object",start:e,end:this.position,entries:r}:void 0;this.depth+=1;let n=!0;for(;this.position<this.input.length;){n||(this.input[this.position]!==","&&this.fail("Expected ',' or '}' after an object property."),this.position+=1,this.write(","),this.skipWhitespace(),this.input[this.position]==="}"&&this.fail("Trailing commas are not valid JSON.")),this.writeLine(),this.input[this.position]!=='"'&&this.fail("Expected a property name enclosed in double quotes.");let o=this.position,s=this.parseString(),a=this.position,c=s?.kind==="string"?s.value:this.decodeString(this.input.slice(o,a),o),u=i.has(c);u?this.duplicateKeys+=1:i.add(c),this.skipWhitespace(),this.input[this.position]!==":"&&this.fail("Expected ':' after the property name."),this.position+=1,this.write(this.indent?": ":":"),this.skipWhitespace();let l=this.parseValue();if(this.buildTree&&l&&r.push({key:c,keyRaw:this.input.slice(o,a),keyStart:o,keyEnd:a,duplicate:u,value:l}),this.skipWhitespace(),n=!1,this.input[this.position]==="}")break}return this.depth-=1,this.input[this.position]!=="}"&&this.fail("Expected '}' to close the object."),n||this.writeLine(),this.position+=1,this.write("}"),this.buildTree?{kind:"object",start:e,end:this.position,entries:r}:void 0}parseArray(){let e=this.position,r=[];if(this.position+=1,this.write("["),this.skipWhitespace(),this.input[this.position]==="]")return this.position+=1,this.write("]"),this.buildTree?{kind:"array",start:e,end:this.position,items:r}:void 0;this.depth+=1;let i=!0;for(;this.position<this.input.length;){i||(this.input[this.position]!==","&&this.fail("Expected ',' or ']' after an array item."),this.position+=1,this.write(","),this.skipWhitespace(),this.input[this.position]==="]"&&this.fail("Trailing commas are not valid JSON.")),this.writeLine();let n=this.parseValue();if(this.buildTree&&n&&r.push(n),this.skipWhitespace(),i=!1,this.input[this.position]==="]")break}return this.depth-=1,this.input[this.position]!=="]"&&this.fail("Expected ']' to close the array."),i||this.writeLine(),this.position+=1,this.write("]"),this.buildTree?{kind:"array",start:e,end:this.position,items:r}:void 0}parseString(){let e=this.position;for(this.position+=1;this.position<this.input.length;){let r=this.input.charCodeAt(this.position);if(r===34){this.position+=1;let i=this.input.slice(e,this.position);return this.write(i),this.buildTree?{kind:"string",start:e,end:this.position,raw:i,value:this.decodeString(i,e)}:void 0}if(r<32&&this.fail("Unescaped control character in string."),r===92){this.position+=1;let i=this.input[this.position];if(i==="u"){let n=this.input.slice(this.position+1,this.position+5);/^[0-9a-fA-F]{4}$/.test(n)||this.fail("Invalid Unicode escape sequence."),this.position+=5;continue}(!i||!'"\\/bfnrt'.includes(i))&&this.fail("Invalid escape sequence.")}this.position+=1}this.fail("Unterminated string.",e)}decodeString(e,r){try{return JSON.parse(e)}catch{this.fail("Invalid string escape sequence.",r)}}parseNumber(){let e=this.position;if(this.input[this.position]==="-"&&(this.position+=1),this.input[this.position]==="0")this.position+=1,this.isDigit(this.input[this.position])&&this.fail("Leading zeroes are not valid JSON numbers.");else for(this.isDigitOneToNine(this.input[this.position])||this.fail("Expected a digit after '-'.");this.isDigit(this.input[this.position]);)this.position+=1;if(this.input[this.position]===".")for(this.position+=1,this.isDigit(this.input[this.position])||this.fail("Expected a digit after the decimal point.");this.isDigit(this.input[this.position]);)this.position+=1;if(this.input[this.position]==="e"||this.input[this.position]==="E")for(this.position+=1,(this.input[this.position]==="+"||this.input[this.position]==="-")&&(this.position+=1),this.isDigit(this.input[this.position])||this.fail("Expected an exponent digit.");this.isDigit(this.input[this.position]);)this.position+=1;let r=this.input.slice(e,this.position);if(!r.includes(".")&&!/[eE]/.test(r))try{let i=BigInt(r);(i>BigInt(Number.MAX_SAFE_INTEGER)||i<BigInt(Number.MIN_SAFE_INTEGER))&&(this.unsafeNumbers+=1)}catch{this.fail("Invalid JSON number.",e)}return this.write(r),this.buildTree?{kind:"number",start:e,end:this.position,raw:r}:void 0}parseLiteral(e,r){let i=this.position;return this.input.slice(i,i+e.length)!==e&&this.fail(`Expected '${e}'.`),this.position+=e.length,this.write(e),this.buildTree?{kind:"boolean",start:i,end:this.position,raw:e,value:r}:void 0}parseNull(){let e=this.position;return this.input.slice(e,e+4)!=="null"&&this.fail("Expected 'null'."),this.position+=4,this.write("null"),this.buildTree?{kind:"null",start:e,end:this.position,raw:"null"}:void 0}isDigit(e){return e!==void 0&&e>="0"&&e<="9"}isDigitOneToNine(e){return e!==void 0&&e>="1"&&e<="9"}};xn=class{constructor(e){this.raw=e}valueOf(){return Number(this.raw)}toString(){return this.raw}}});var Lt,Up=Se(()=>{Lt=class extends Error{constructor(e,r){super(`${e} at position ${r}`),this.position=r}}});function _$(t){return/^[0-9A-Fa-f]$/.test(t)}function Sr(t){return t>="0"&&t<="9"}function $$(t){return t>=" "}function si(t){return`,:[]/{}()
|
|
8
|
-
+`.includes(t)}function Lp(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"||t==="_"||t==="$"}function Ec(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"||t==="_"||t==="$"||t>="0"&&t<="9"}function Fp(t){return`,[]/{}
|
|
9
|
-
+`.includes(t)}function Vp(t){return ai(t)||mP.test(t)}function Jp(t){return t===`
|
|
10
|
-
`||t==="\r"||t===" "||t==="\b"||t==="\f"}function kr(t,e){let r=t.charCodeAt(e);return r===32||r===10||r===9||r===13}function w$(t,e){let r=t.charCodeAt(e);return r===32||r===9||r===13}function k$(t,e){let r=t.charCodeAt(e);return r===160||r===6158||r>=8192&&r<=8203||r===8239||r===8287||r===12288||r===65279}function ai(t){return Bp(t)||Oc(t)}function Bp(t){return t==='"'||t==="\u201C"||t==="\u201D"}function Kp(t){return t==='"'}function Oc(t){return t==="'"||t==="\u2018"||t==="\u2019"||t==="`"||t==="\xB4"}function Hp(t){return t==="'"}function ci(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=t.lastIndexOf(e);return i!==-1?t.substring(0,i)+(r?"":t.substring(i+1)):t}function Et(t,e){let r=t.length;if(!kr(t,r-1))return t+e;for(;kr(t,r-1);)r--;return t.substring(0,r)+e+t.substring(r)}function S$(t,e,r){return t.substring(0,e)+t.substring(e+r)}function x$(t){return/[,\n][ \t\r]*$/.test(t)}function Gp(t){if(t.charAt(0)!=="&")return null;let e=t.indexOf(";");if(e===-1)return null;let r=t.substring(0,e+1),i=hP[r];if(i!==void 0)return{char:i,length:r.length};if(t.charAt(1)==="#"){let n=t.substring(2,e),o=n.charAt(0)==="x"||n.charAt(0)==="X",s=o?n.substring(1):n;if(s.length>0){let a=Number.parseInt(s,o?16:10);if(!Number.isNaN(a)&&a>=0&&a<=1114111)return{char:String.fromCodePoint(a),length:r.length}}}return null}function I$(t){return t!==null&&t.char==='"'}function E$(t){return t!==null&&t.char==="'"}function oi(t,e){let r=0;for(let i=0;i<t.length;i++)t.charAt(i)===e&&r++;return r}function O$(t,e){switch(e){case")":return oi(t,"(")>oi(t,")");case"]":return oi(t,"[")>oi(t,"]");case"}":return oi(t,"{")>oi(t,"}");default:return!1}}var qp,Zp,mP,hP,Wp,N$=Se(()=>{qp=/^(http|https|ftp|mailto|file|data|irc):\/\/$/,Zp=/^[A-Za-z0-9-._~:/?#@!$&'()*+;=]$/;mP=/^[[{\w-]$/;hP={""":'"',"&":"&","<":"<",">":">","'":"'"},Wp=12});function P$(t){let e=0,r="";u(["```","[```","{```"]),o()||jp(),u(["```","```]","```}"]);let n=d(",");for(n&&s(),Vp(t[e])&&x$(r)?(n||(r=Et(r,",")),v()):n&&(r=ci(r,","));t[e]==="}"||t[e]==="]";)e++,s();if(e>=t.length)return r;br();function o(){s();let Z=p()||g()||y()||w()||x()||q(!1)||P();return s(),Z}function s(){let Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,F=e,pe=a(Z);do pe=c(),pe&&(pe=a(Z));while(pe);return e>F}function a(Z){let F=Z?kr:w$,pe="";for(;;)if(F(t,e))pe+=t[e],e++;else if(k$(t,e))pe+=" ",e++;else break;return pe.length>0?(r+=pe,!0):!1}function c(){if(t[e]==="/"&&t[e+1]==="*"){for(;e<t.length&&!yP(t,e);)e++;return e+=2,!0}if(t[e]==="/"&&t[e+1]==="/"){for(;e<t.length&&t[e]!==`
|
|
11
|
-
`;)e++;return!0}return!1}function u(Z){if(l(Z)){if(Lp(t[e]))for(;e<t.length&&Ec(t[e]);)e++;return s(),!0}return!1}function l(Z){a(!0);for(let F of Z){let pe=e+F.length;if(t.slice(e,pe)===F)return e=pe,!0}return!1}function d(Z){return t[e]===Z?(r+=t[e],e++,!0):!1}function m(Z){return t[e]===Z?(e++,!0):!1}function h(){return m("\\")}function f(){return s(),t[e]==="."&&t[e+1]==="."&&t[e+2]==="."?(e+=3,s(),m(","),!0):!1}function p(){if(t[e]==="{"){r+="{",e++,s(),m(",")&&s();let Z=!0;for(;e<t.length&&t[e]!=="}";){let F;if(Z?F=!0:(F=d(","),F||(r=Et(r,",")),s()),f(),!(y()||q(!0))){t[e]==="}"||t[e]==="{"||t[e]==="]"||t[e]==="["||t[e]===void 0?Z||(r=ci(r,",")):sP();break}s();let _r=d(":"),ni=e>=t.length;_r||(Vp(t[e])||ni?r=Et(r,":"):h$()),o()||(_r||ni?r+="null":h$()),Z=!1}return t[e]==="}"?(r+="}",e++):r=Et(r,"}"),!0}return!1}function g(){if(t[e]==="["){r+="[",e++,s(),m(",")&&s();let Z=!0;for(;e<t.length&&t[e]!=="]";){if(Z||d(",")||(r=Et(r,",")),f(),!o()){Z||(r=ci(r,","));break}Z=!1}return t[e]==="]"?(r+="]",e++):r=Et(r,"]"),!0}return!1}function v(){let Z=!0,F=!0;for(;F;)Z?Z=!1:d(",")||(r=Et(r,",")),F=o();F||(r=ci(r,",")),r=`[
|
|
12
|
-
${r}
|
|
13
|
-
]`}function y(){let Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:-1,pe=t[e]==="\\";pe&&(e++,ai(t[e])||br());let _r=t[e]==="&"?Gp(t.slice(e,e+Wp)):null,ni=I$(_r)||E$(_r);if(ai(t[e])||ni){let g$=Kp(t[e])?Kp:Hp(t[e])?Hp:Oc(t[e])?Oc:Bp,kc=e,Sc=r.length,_e='"';for(e+=ni&&_r?_r.length:1;;){if(e>=t.length){let je=ue(e-1);return!Z&&si(t.charAt(je))?(e=kc,r=r.substring(0,Sc),y(!0)):(_e=Et(_e,'"'),r+=_e,!0)}if(e===F)return _e=Et(_e,'"'),r+=_e,!0;let $r=ni&&t[e]==="&"?Gp(t.slice(e,e+Wp)):null;if($r&&_r?$r.char===_r.char:g$(t[e])){let je=e,Ap=_e.length;if(_e+='"',e+=$r?$r.length:1,r+=_e,s(!1),Z||e>=t.length||si(t[e])&&!O$(_e,t[e])||ai(t[e])&&!Ue(e)||Sr(t[e]))return b(),!0;t[e]==="\\"&&br();let Dr=ue(je-1),y$=t.charAt(Dr);if(y$===",")return e=kc,r=r.substring(0,Sc),y(!1,Dr);if(si(y$))return e=kc,r=r.substring(0,Sc),y(!0);r=r.substring(0,Sc),e=je+($r?$r.length:1),_e=`${_e.substring(0,Ap)}\\${_e.substring(Ap)}`}else if(Z&&Fp(t[e])){if(t[e-1]===":"&&qp.test(t.substring(kc+1,e+2)))for(;e<t.length&&Zp.test(t[e]);)_e+=t[e],e++;return _e=Et(_e,'"'),r+=_e,b(),!0}else if($r){let je=$r.char;je==='"'?_e+='\\"':Jp(je)?_e+=z$[je]:_e+=je,e+=$r.length}else if(t[e]==="\\"){let je=t.charAt(e+1);if(gP[je]!==void 0)_e+=t.slice(e,e+2),e+=2;else if(je==="u"){let Dr=2;for(;Dr<6&&_$(t[e+Dr]);)Dr++;Dr===6?(_e+=t.slice(e,e+6),e+=6):e+Dr>=t.length?e=t.length:aP()}else je===`
|
|
14
|
-
`?(_e+="\\n",e+=2):(_e+=je,e+=2)}else{let je=t.charAt(e);je==='"'&&t[e-1]!=="\\"?(_e+=`\\${je}`,e++):Jp(je)?(_e+=z$[je],e++):($$(je)||Pe(je),_e+=je,e++)}pe&&h()}}return!1}function b(){let Z=!1;for(s();t[e]==="+";){Z=!0,e++,s(),r=ci(r,'"',!0);let F=r.length;y()?r=S$(r,F,1):r=Et(r,'"')}return Z}function w(){let Z=e,F="",pe=!1;for(t[e]==="-"&&(F+=t[e],e++,!Sr(t[e])&&We()&&(F+="0")),t[e]==="0"&&Sr(t[e+1])&&(pe=!0);Sr(t[e]);)F+=t[e],e++;if(t[e]===".")for((F===""||F==="-")&&(F+="0"),F+=t[e],e++,Sr(t[e])||(F+="0");Sr(t[e]);)F+=t[e],e++;if(e>Z){if(t[e]==="e"||t[e]==="E")for(F==="-"&&(pe=!0),F+=t[e],e++,(t[e]==="-"||t[e]==="+")&&(F+=t[e],e++),Sr(t[e])||(F+="0");Sr(t[e]);)F+=t[e],e++;return We()?(r+=pe?`"${t.substring(Z,e)}"`:F,!0):(e=Z,!1)}return!1}function x(){return T("true","true")||T("false","false")||T("null","null")||T("True","true")||T("False","false")||T("None","null")}function T(Z,F){return t.slice(e,e+Z.length)===Z&&!Ec(t[e+Z.length])?(r+=F,e+=Z.length,!0):!1}function q(Z){let F=e;if(Lp(t[e])){for(;e<t.length&&Ec(t[e]);)e++;let pe=e;for(;kr(t,pe);)pe++;if(t[pe]==="(")return e=pe+1,o(),t[e]===")"&&(e++,t[e]===";"&&e++),!0}for(;e<t.length&&!Fp(t[e])&&!ai(t[e])&&(!Z||t[e]!==":");)e++;if(t[e-1]===":"&&qp.test(t.substring(F,e+2)))for(;e<t.length&&Zp.test(t[e]);)e++;if(e>F){for(;kr(t,e-1)&&e>0;)e--;let pe=t.slice(F,e);return r+=pe==="undefined"?"null":JSON.stringify(pe),t[e]==='"'&&e++,!0}}function P(){if(t[e]==="/"){let Z=e;for(e++;e<t.length&&(t[e]!=="/"||t[e-1]==="\\");)e++;return e++,r+=JSON.stringify(t.substring(Z,e)),!0}}function ue(Z){let F=Z;for(;F>0&&kr(t,F);)F--;return F}function Ue(Z){let F=Z+1;for(;F<t.length&&kr(t,F);)F++;return F>=t.length||si(t[F])}function We(){return e>=t.length||si(t[e])||kr(t,e)}function Pe(Z){throw new Lt(`Invalid character ${JSON.stringify(Z)}`,e)}function br(){throw new Lt(`Unexpected character ${JSON.stringify(t[e])}`,e)}function jp(){throw new Lt("Unexpected end of json string",t.length)}function sP(){throw new Lt("Object key expected",e)}function h$(){throw new Lt("Colon expected",e)}function aP(){let Z=t.slice(e,e+6);throw new Lt(`Invalid unicode character "${Z}"`,e)}}function yP(t,e){return t[e]==="*"&&t[e+1]==="/"}var z$,gP,T$=Se(()=>{Up();N$();z$={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},gP={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
15
|
-
`,r:"\r",t:" "}});var j$={};Ut(j$,{JSONRepairError:()=>Lt,jsonrepair:()=>P$});var A$=Se(()=>{T$();Up()});var Re,xr=Se(()=>{Re=class{diff(e,r,i={}){let n;typeof i=="function"?(n=i,i={}):"callback"in i&&(n=i.callback);let o=this.castInput(e,i),s=this.castInput(r,i),a=this.removeEmpty(this.tokenize(o,i)),c=this.removeEmpty(this.tokenize(s,i));return this.diffWithOptionsObj(a,c,i,n)}diffWithOptionsObj(e,r,i,n){var o;let s=y=>{if(y=this.postProcess(y,i),n){setTimeout(function(){n(y)},0);return}else return y},a=r.length,c=e.length,u=1,l=a+c;i.maxEditLength!=null&&(l=Math.min(l,i.maxEditLength));let d=(o=i.timeout)!==null&&o!==void 0?o:1/0,m=Date.now()+d,h=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(h[0],r,e,0,i);if(h[0].oldPos+1>=c&&f+1>=a)return s(this.buildValues(h[0].lastComponent,r,e));let p=-1/0,g=1/0,v=()=>{for(let y=Math.max(p,-u);y<=Math.min(g,u);y+=2){let b,w=h[y-1],x=h[y+1];w&&(h[y-1]=void 0);let T=!1;if(x){let P=x.oldPos-y;T=x&&0<=P&&P<a}let q=w&&w.oldPos+1<c;if(!T&&!q){h[y]=void 0;continue}if(!q||T&&w.oldPos<x.oldPos?b=this.addToPath(x,!0,!1,0,i):b=this.addToPath(w,!1,!0,1,i),f=this.extractCommon(b,r,e,y,i),b.oldPos+1>=c&&f+1>=a)return s(this.buildValues(b.lastComponent,r,e))||!0;h[y]=b,b.oldPos+1>=c&&(g=Math.min(g,y-1)),f+1>=a&&(p=Math.max(p,y+1))}u++};if(n)(function y(){setTimeout(function(){if(u>l||Date.now()>m)return n(void 0);v()||y()},0)})();else for(;u<=l&&Date.now()<=m;){let y=v();if(y)return y}}addToPath(e,r,i,n,o){let s=e.lastComponent;return s&&!o.oneChangePerToken&&s.added===r&&s.removed===i?{oldPos:e.oldPos+n,lastComponent:{count:s.count+1,added:r,removed:i,previousComponent:s.previousComponent}}:{oldPos:e.oldPos+n,lastComponent:{count:1,added:r,removed:i,previousComponent:s}}}extractCommon(e,r,i,n,o){let s=r.length,a=i.length,c=e.oldPos,u=c-n,l=0;for(;u+1<s&&c+1<a&&this.equals(i[c+1],r[u+1],o);)u++,c++,l++,o.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!o.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=c,u}equals(e,r,i){return i.comparator?i.comparator(e,r):e===r||!!i.ignoreCase&&e.toLowerCase()===r.toLowerCase()}removeEmpty(e){let r=[];for(let i=0;i<e.length;i++)e[i]&&r.push(e[i]);return r}castInput(e,r){return e}tokenize(e,r){return Array.from(e)}join(e){return e.join("")}postProcess(e,r){return e}get useLongestToken(){return!1}buildValues(e,r,i){let n=[],o;for(;e;)n.push(e),o=e.previousComponent,delete e.previousComponent,e=o;n.reverse();let s=n.length,a=0,c=0,u=0;for(;a<s;a++){let l=n[a];if(l.removed)l.value=this.join(i.slice(u,u+l.count)),u+=l.count;else{if(!l.added&&this.useLongestToken){let d=r.slice(c,c+l.count);d=d.map(function(m,h){let f=i[u+h];return f.length>m.length?f:m}),l.value=this.join(d)}else l.value=this.join(r.slice(c,c+l.count));c+=l.count,l.added||(u+=l.count)}}return n}}});function C$(t,e,r){return Xp.diff(t,e,r)}var Yp,Xp,R$=Se(()=>{xr();Yp=class extends Re{},Xp=new Yp});function Qp(t,e){let r;for(r=0;r<t.length&&r<e.length;r++)if(t[r]!=e[r])return t.slice(0,r);return t.slice(0,r)}function em(t,e){let r;if(!t||!e||t[t.length-1]!=e[e.length-1])return"";for(r=0;r<t.length&&r<e.length;r++)if(t[t.length-(r+1)]!=e[e.length-(r+1)])return t.slice(-r);return t.slice(-r)}function Nc(t,e,r){if(t.slice(0,e.length)!=e)throw Error(`string ${JSON.stringify(t)} doesn't start with prefix ${JSON.stringify(e)}; this is a bug`);return r+t.slice(e.length)}function zc(t,e,r){if(!e)return t+r;if(t.slice(-e.length)!=e)throw Error(`string ${JSON.stringify(t)} doesn't end with suffix ${JSON.stringify(e)}; this is a bug`);return t.slice(0,-e.length)+r}function ui(t,e){return Nc(t,e,"")}function Bo(t,e){return zc(t,e,"")}function tm(t,e){return e.slice(0,vP(t,e))}function vP(t,e){let r=0;t.length>e.length&&(r=t.length-e.length);let i=e.length;t.length<e.length&&(i=t.length);let n=Array(i),o=0;n[0]=0;for(let s=1;s<i;s++){for(e[s]==e[o]?n[s]=n[o]:n[s]=o;o>0&&e[s]!=e[o];)o=n[o];e[s]==e[o]&&o++}o=0;for(let s=r;s<t.length;s++){for(;o>0&&t[s]!=e[o];)o=n[o];t[s]==e[o]&&o++}return o}function D$(t){return t.includes(`\r
|
|
16
|
-
`)&&!t.startsWith(`
|
|
17
|
-
`)&&!t.match(/[^\r]\n/)}function M$(t){return!t.includes(`\r
|
|
18
|
-
`)&&t.includes(`
|
|
19
|
-
`)}function rm(t,e){let r=[];for(let i of Array.from(e.segment(t))){let n=i.segment;r.length&&/\s/.test(r[r.length-1])&&/\s/.test(n)?r[r.length-1]+=n:r.push(n)}return r}function Pc(t,e){if(e)return li(t,e)[1];let r;for(r=t.length-1;r>=0&&t[r].match(/\s/);r--);return t.substring(r+1)}function En(t,e){if(e)return li(t,e)[0];let r=t.match(/^\s*/);return r?r[0]:""}function li(t,e){if(!e)return[En(t),Pc(t)];if(e.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');let r=rm(t,e),i=r[0],n=r[r.length-1],o=/\s/.test(i)?i:"",s=/\s/.test(n)?n:"";return[o,s]}var nm=Se(()=>{});function L$(t,e,r){return r?.ignoreWhitespace!=null&&!r.ignoreWhitespace?cm(t,e,r):sm.diff(t,e,r)}function U$(t,e,r,i,n){if(e&&r){let[o,s]=li(e.value,n),[a,c]=li(r.value,n);if(t){let u=Qp(o,a);t.value=zc(t.value,a,u),e.value=ui(e.value,u),r.value=ui(r.value,u)}if(i){let u=em(s,c);i.value=Nc(i.value,c,u),e.value=Bo(e.value,u),r.value=Bo(r.value,u)}}else if(r){if(t){let o=En(r.value,n);r.value=r.value.substring(o.length)}if(i){let o=En(i.value,n);i.value=i.value.substring(o.length)}}else if(t&&i){let o=En(i.value,n),[s,a]=li(e.value,n),c=Qp(o,s);e.value=ui(e.value,c);let u=em(ui(o,c),a);e.value=Bo(e.value,u),i.value=Nc(i.value,o,u),t.value=zc(t.value,o,o.slice(0,o.length-u.length))}else if(i){let o=En(i.value,n),s=Pc(e.value,n),a=tm(s,o);e.value=Bo(e.value,a)}else if(t){let o=Pc(t.value,n),s=En(e.value,n),a=tm(o,s);e.value=ui(e.value,a)}}function cm(t,e,r){return am.diff(t,e,r)}var Tc,bP,im,sm,om,am,q$=Se(()=>{xr();nm();Tc="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",bP=new RegExp(`[${Tc}]+|\\s+|[^${Tc}]`,"ug"),im=class extends Re{equals(e,r,i){return i.ignoreCase&&(e=e.toLowerCase(),r=r.toLowerCase()),e.trim()===r.trim()}tokenize(e,r={}){let i;if(r.intlSegmenter){let s=r.intlSegmenter;if(s.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');i=rm(e,s)}else i=e.match(bP)||[];let n=[],o=null;return i.forEach(s=>{/\s/.test(s)?o==null?n.push(s):n.push(n.pop()+s):o!=null&&/\s/.test(o)?n[n.length-1]==o?n.push(n.pop()+s):n.push(o+s):n.push(s),o=s}),n}join(e){return e.map((r,i)=>i==0?r:r.replace(/^\s+/,"")).join("")}postProcess(e,r){if(!e||r.oneChangePerToken)return e;let i=null,n=null,o=null;return e.forEach(s=>{s.added?n=s:s.removed?o=s:((n||o)&&U$(i,o,n,s,r.intlSegmenter),i=s,n=null,o=null)}),(n||o)&&U$(i,o,n,null,r.intlSegmenter),e}},sm=new im;om=class extends Re{tokenize(e){let r=new RegExp(`(\\r?\\n)|[${Tc}]+|[^\\S\\n\\r]+|[^${Tc}]`,"ug");return e.match(r)||[]}},am=new om});function Z$(t,e){if(typeof t=="function")e.callback=t;else if(t)for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}var F$=Se(()=>{});function Ko(t,e,r){return jc.diff(t,e,r)}function V$(t,e,r){return r=Z$(r,{ignoreWhitespace:!0}),jc.diff(t,e,r)}function lm(t,e){e.stripTrailingCr&&(t=t.replace(/\r\n/g,`
|
|
20
|
-
`));let r=[],i=t.split(/(\n|\r\n)/);i[i.length-1]||i.pop();for(let n=0;n<i.length;n++){let o=i[n];n%2&&!e.newlineIsToken?r[r.length-1]+=o:r.push(o)}return r}var um,jc,Ac=Se(()=>{xr();F$();um=class extends Re{constructor(){super(...arguments),this.tokenize=lm}equals(e,r,i){return i.ignoreWhitespace?((!i.newlineIsToken||!e.includes(`
|
|
21
|
-
`))&&(e=e.trim()),(!i.newlineIsToken||!r.includes(`
|
|
22
|
-
`))&&(r=r.trim())):i.ignoreNewlineAtEof&&!i.newlineIsToken&&(e.endsWith(`
|
|
23
|
-
`)&&(e=e.slice(0,-1)),r.endsWith(`
|
|
24
|
-
`)&&(r=r.slice(0,-1))),super.equals(e,r,i)}},jc=new um});function _P(t){return t=="."||t=="!"||t=="?"}function J$(t,e,r){return fm.diff(t,e,r)}var dm,fm,B$=Se(()=>{xr();dm=class extends Re{tokenize(e){var r;let i=[],n=0;for(let o=0;o<e.length;o++){if(o==e.length-1){i.push(e.slice(n));break}if(_P(e[o])&&e[o+1].match(/\s/)){for(i.push(e.slice(n,o+1)),o=n=o+1;!((r=e[o+1])===null||r===void 0)&&r.match(/\s/);)o++;i.push(e.slice(n,o+1)),n=o+1}}return i}},fm=new dm});function K$(t,e,r){return mm.diff(t,e,r)}var pm,mm,H$=Se(()=>{xr();pm=class extends Re{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},mm=new pm});function W$(t,e,r){return gm.diff(t,e,r)}function Ho(t,e,r,i,n){e=e||[],r=r||[],i&&(t=i(n===void 0?"":n,t));let o;for(o=0;o<e.length;o+=1)if(e[o]===t)return r[o];let s;if(Object.prototype.toString.call(t)==="[object Array]"){for(e.push(t),s=new Array(t.length),r.push(s),o=0;o<t.length;o+=1)s[o]=Ho(t[o],e,r,i,String(o));return e.pop(),r.pop(),s}if(t&&t.toJSON&&(t=t.toJSON()),typeof t=="object"&&t!==null){e.push(t),s={},r.push(s);let a=[],c;for(c in t)Object.prototype.hasOwnProperty.call(t,c)&&a.push(c);for(a.sort(),o=0;o<a.length;o+=1)c=a[o],s[c]=Ho(t[c],e,r,i,c);e.pop(),r.pop()}else s=t;return s}var hm,gm,G$=Se(()=>{xr();Ac();hm=class extends Re{constructor(){super(...arguments),this.tokenize=lm}get useLongestToken(){return!0}castInput(e,r){let{undefinedReplacement:i,stringifyReplacer:n=(o,s)=>typeof s>"u"?i:s}=r;return typeof e=="string"?e:JSON.stringify(Ho(e,null,null,n),null," ")}equals(e,r,i){return super.equals(e.replace(/,([\r\n])/g,"$1"),r.replace(/,([\r\n])/g,"$1"),i)}},gm=new hm});function Y$(t,e,r){return vm.diff(t,e,r)}var ym,vm,X$=Se(()=>{xr();ym=class extends Re{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}},vm=new ym});function bm(t){return Array.isArray(t)?t.map(e=>bm(e)):Object.assign(Object.assign({},t),{hunks:t.hunks.map(e=>Object.assign(Object.assign({},e),{lines:e.lines.map((r,i)=>{var n;return r.startsWith("\\")||r.endsWith("\r")||!((n=e.lines[i+1])===null||n===void 0)&&n.startsWith("\\")?r:r+"\r"})}))})}function _m(t){return Array.isArray(t)?t.map(e=>_m(e)):Object.assign(Object.assign({},t),{hunks:t.hunks.map(e=>Object.assign(Object.assign({},e),{lines:e.lines.map(r=>r.endsWith("\r")?r.substring(0,r.length-1):r)}))})}function Q$(t){return Array.isArray(t)||(t=[t]),!t.some(e=>e.hunks.some(r=>r.lines.some(i=>!i.startsWith("\\")&&i.endsWith("\r"))))}function ew(t){return Array.isArray(t)||(t=[t]),t.some(e=>e.hunks.some(r=>r.lines.some(i=>i.endsWith("\r"))))&&t.every(e=>e.hunks.every(r=>r.lines.every((i,n)=>{var o;return i.startsWith("\\")||i.endsWith("\r")||((o=r.lines[n+1])===null||o===void 0?void 0:o.startsWith("\\"))})))}var tw=Se(()=>{});function Wo(t){let e=t.split(/\n/),r=[],i=0;function n(f){return/^diff --git /.test(f)}function o(f){return n(f)||/^Index:\s/.test(f)||/^diff(?: -r \w+)+\s/.test(f)}function s(f){return/^(---|\+\+\+)\s/.test(f)}function a(f){return/^@@\s/.test(f)}function c(){var f;let p={};p.hunks=[],r.push(p);let g=!1;for(;i<e.length;){let v=e[i];if(s(v)||a(v))break;if(n(v)){if(g)return;g=!0,p.isGit=!0;let y=u(v);for(y&&(p.oldFileName=y.oldFileName,p.newFileName=y.newFileName),i++;i<e.length;){let b=e[i];if(s(b)||a(b)||o(b))break;let w=/^rename from (.*)/.exec(b);w&&(p.oldFileName="a/"+l(w[1]),p.isRename=!0);let x=/^rename to (.*)/.exec(b);x&&(p.newFileName="b/"+l(x[1]),p.isRename=!0);let T=/^copy from (.*)/.exec(b);T&&(p.oldFileName="a/"+l(T[1]),p.isCopy=!0);let q=/^copy to (.*)/.exec(b);q&&(p.newFileName="b/"+l(q[1]),p.isCopy=!0);let P=/^new file mode (\d+)/.exec(b);P&&(p.isCreate=!0,p.newMode=P[1]);let ue=/^deleted file mode (\d+)/.exec(b);ue&&(p.isDelete=!0,p.oldMode=ue[1]);let Ue=/^old mode (\d+)/.exec(b);Ue&&(p.oldMode=Ue[1]);let We=/^new mode (\d+)/.exec(b);We&&(p.newMode=We[1]),/^Binary files /.test(b)&&(p.isBinary=!0),i++}continue}else if(o(v)){if(g)return;g=!0;let y=/^(?:Index:|diff(?: -r \w+)+)\s+/.exec(v);y&&(p.index=v.substring(y[0].length).trim())}i++}if(m(p),m(p),p.oldFileName===void 0!=(p.newFileName===void 0))throw new Error("Missing "+(p.oldFileName!==void 0?'"+++ ..."':'"--- ..."')+" file header for "+((f=p.oldFileName)!==null&&f!==void 0?f:p.newFileName));for(;i<e.length;){let v=e[i];if(o(v)||s(v)||/^===================================================================/.test(v))break;a(v)?p.hunks.push(h()):i++}}function u(f){let p=f.substring(11);if(p.startsWith('"')){let v=d(p);if(v===null)return null;let y=p.substring(v.rawLength+1),b;if(y.startsWith('"')){let w=d(y);if(w===null)return null;b=w.fileName}else b=y;return{oldFileName:v.fileName,newFileName:b}}let g=p.indexOf('"');if(g>0){let v=p.substring(0,g-1),y=d(p.substring(g));return y===null?null:{oldFileName:v,newFileName:y.fileName}}if(p.startsWith("a/")){let v=[],y=0;for(;y=p.indexOf(" b/",y+1),y!==-1;)v.push(y);if(v.length>0){let b=v[Math.floor(v.length/2)];return{oldFileName:p.substring(0,b),newFileName:p.substring(b+1)}}}return null}function l(f){if(f.startsWith('"')){let p=d(f);if(p)return p.fileName}return f}function d(f){if(!f.startsWith('"'))return null;let p="",g=1;for(;g<f.length;){if(f[g]==='"')return{fileName:p,rawLength:g+1};if(f[g]==="\\"&&g+1<f.length)switch(g++,f[g]){case"a":p+="\x07";break;case"b":p+="\b";break;case"f":p+="\f";break;case"n":p+=`
|
|
25
|
-
`;break;case"r":p+="\r";break;case"t":p+=" ";break;case"v":p+="\v";break;case"\\":p+="\\";break;case'"':p+='"';break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":{if(g+2>=f.length||f[g+1]<"0"||f[g+1]>"7"||f[g+2]<"0"||f[g+2]>"7")return null;let v=[parseInt(f.substring(g,g+3),8)];for(g+=3;f[g]==="\\"&&f[g+1]>="0"&&f[g+1]<="7";){if(g+3>=f.length||f[g+2]<"0"||f[g+2]>"7"||f[g+3]<"0"||f[g+3]>"7")return null;v.push(parseInt(f.substring(g+1,g+4),8)),g+=4}p+=new TextDecoder("utf-8").decode(new Uint8Array(v));continue}default:return null}else p+=f[g];g++}return null}function m(f){let p=/^(---|\+\+\+)\s+/.exec(e[i]);if(p){let g=p[1],v=e[i].substring(3).trim().split(" ",2),y=(v[1]||"").trim(),b=v[0];b.startsWith('"')?b=l(b):b=b.replace(/\\\\/g,"\\"),g==="---"?(f.oldFileName=b,f.oldHeader=y):(f.newFileName=b,f.newHeader=y),i++}}function h(){var f;let p=i,g=e[i++],v=g.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),y={oldStart:+v[1],oldLines:typeof v[2]>"u"?1:+v[2],newStart:+v[3],newLines:typeof v[4]>"u"?1:+v[4],lines:[]};y.oldLines===0&&(y.oldStart+=1),y.newLines===0&&(y.newStart+=1);let b=0,w=0;for(;i<e.length&&(w<y.oldLines||b<y.newLines||!((f=e[i])===null||f===void 0)&&f.startsWith("\\"));i++){let x=e[i].length==0&&i!=e.length-1?" ":e[i][0];if(x==="+"||x==="-"||x===" "||x==="\\")y.lines.push(e[i]),x==="+"?b++:x==="-"?w++:x===" "&&(b++,w++);else throw new Error(`Hunk at line ${p+1} contained invalid line ${e[i]}`)}if(!b&&y.newLines===1&&(y.newLines=0),!w&&y.oldLines===1&&(y.oldLines=0),b!==y.newLines)throw new Error("Added line count did not match for hunk at line "+(p+1));if(w!==y.oldLines)throw new Error("Removed line count did not match for hunk at line "+(p+1));if(i<e.length&&e[i]&&/^[+ -]/.test(e[i])&&!s(e[i]))throw new Error("Hunk at line "+(p+1)+" has more lines than expected (expected "+y.oldLines+" old lines and "+y.newLines+" new lines)");return y}for(;i<e.length;)c();return r}var $m=Se(()=>{});function rw(t,e,r){let i=!0,n=!1,o=!1,s=1;return function a(){if(i&&!o){if(n?s++:i=!1,t+s<=r)return t+s;o=!0}if(!n)return o||(i=!0),e<=t-s?t-s++:(n=!0,a())}}var nw=Se(()=>{});function wm(t,e,r={}){let i;if(typeof e=="string"?i=Wo(e):Array.isArray(e)?i=e:i=[e],i.length>1)throw new Error("applyPatch only works with a single input.");return $P(t,i[0],r)}function $P(t,e,r={}){(r.autoConvertLineEndings||r.autoConvertLineEndings==null)&&(D$(t)&&Q$(e)?e=bm(e):M$(t)&&ew(e)&&(e=_m(e)));let i=t.split(`
|
|
26
|
-
`),n=e.hunks,o=r.compareLine||((f,p,g,v)=>p===v),s=r.fuzzFactor||0,a=0;if(s<0||!Number.isInteger(s))throw new Error("fuzzFactor must be a non-negative integer");if(!n.length)return t;let c="",u=!1,l=!1;for(let f=0;f<n[n.length-1].lines.length;f++){let p=n[n.length-1].lines[f];p[0]=="\\"&&(c[0]=="+"?u=!0:c[0]=="-"&&(l=!0)),c=p}if(u){if(l){if(!s&&i[i.length-1]=="")return!1}else if(i[i.length-1]=="")i.pop();else if(!s)return!1}else if(l){if(i[i.length-1]!="")i.push("");else if(!s)return!1}function d(f,p,g,v=0,y=!0,b=[],w=0){let x=0,T=!1;for(;v<f.length;v++){let q=f[v],P=q.length>0?q[0]:" ",ue=q.length>0?q.substr(1):q;if(P==="-")if(o(p+1,i[p],P,ue))p++,x=0;else return!g||i[p]==null?null:(b[w]=i[p],d(f,p+1,g-1,v,!1,b,w+1));if(P==="+"){if(!y)return null;b[w]=ue,w++,x=0,T=!0}if(P===" ")if(x++,b[w]=i[p],o(p+1,i[p],P,ue))w++,y=!0,T=!1,p++;else return T||!g?null:i[p]&&(d(f,p+1,g-1,v+1,!1,b,w+1)||d(f,p+1,g-1,v,!1,b,w+1))||d(f,p,g-1,v+1,!1,b,w)}return w-=x,p-=x,b.length=w,{patchedLines:b,oldLineLastI:p-1}}let m=[],h=0;for(let f=0;f<n.length;f++){let p=n[f],g,v=i.length-p.oldLines+s,y;for(let b=0;b<=s;b++){y=p.oldStart+h-1;let w=rw(y,a,v);for(;y!==void 0&&(g=d(p.lines,y,b),!g);y=w());if(g)break}if(!g)return!1;for(let b=a;b<y;b++)m.push(i[b]);for(let b=0;b<g.patchedLines.length;b++){let w=g.patchedLines[b];m.push(w)}a=g.oldLineLastI+1,h=y+1-p.oldStart}for(let f=a;f<i.length;f++)m.push(i[f]);return m.join(`
|
|
27
|
-
`)}function iw(t,e){let r=typeof t=="string"?Wo(t):t,i=0;function n(){let o=r[i++];if(!o)return e.complete();e.loadFile(o,function(s,a){if(s)return e.complete(s);let c=wm(a,o,e);e.patched(o,c,function(u){if(u)return e.complete(u);n()})})}n()}var ow=Se(()=>{nm();tw();$m();nw()});function sw(t){return t===void 0||t==="/dev/null"?t:t.startsWith("a/")?"b/"+t.slice(2):t.startsWith("b/")?"a/"+t.slice(2):t}function km(t){if(Array.isArray(t))return t.map(r=>km(r)).reverse();let e=Object.assign(Object.assign({},t),{oldFileName:t.isGit?sw(t.newFileName):t.newFileName,oldHeader:t.newHeader,newFileName:t.isGit?sw(t.oldFileName):t.oldFileName,newHeader:t.oldHeader,oldMode:t.newMode,newMode:t.oldMode,isCreate:t.isDelete,isDelete:t.isCreate,hunks:t.hunks.map(r=>({oldLines:r.newLines,oldStart:r.newStart,newLines:r.oldLines,newStart:r.oldStart,lines:r.lines.map(i=>i.startsWith("-")?`+${i.slice(1)}`:i.startsWith("+")?`-${i.slice(1)}`:i)}))});return t.isCopy&&(e.newFileName="/dev/null",e.newHeader=void 0,e.isDelete=!0,delete e.isCreate,delete e.isCopy,delete e.isRename,e.hunks=[]),e}var aw=Se(()=>{});function wP(t){for(let e=0;e<t.length;e++)if(t[e]<" "||t[e]>"~"||t[e]==='"'||t[e]==="\\")return!0;return!1}function Mr(t){if(!wP(t))return t;let e='"',r=new TextEncoder().encode(t),i=0;for(;i<r.length;){let n=r[i];n===7?e+="\\a":n===8?e+="\\b":n===9?e+="\\t":n===10?e+="\\n":n===11?e+="\\v":n===12?e+="\\f":n===13?e+="\\r":n===34?e+='\\"':n===92?e+="\\\\":n>=32&&n<=126?e+=String.fromCharCode(n):e+="\\"+n.toString(8).padStart(3,"0"),i++}return e+='"',e}function Rc(t,e,r,i,n,o,s){let a;s?typeof s=="function"?a={callback:s}:a=s:a={},typeof a.context>"u"&&(a.context=4);let c=a.context;if(a.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(a.callback){let{callback:l}=a;Ko(r,i,Object.assign(Object.assign({},a),{callback:d=>{let m=u(d);l(m)}}))}else return u(Ko(r,i,a));function u(l){if(!l)return;l.push({value:"",lines:[]});function d(y){return y.map(function(b){return" "+b})}let m=[],h=0,f=0,p=[],g=1,v=1;for(let y=0;y<l.length;y++){let b=l[y],w=b.lines||kP(b.value);if(b.lines=w,b.added||b.removed){if(!h){let x=l[y-1];h=g,f=v,x&&(p=c>0?d(x.lines.slice(-c)):[],h-=p.length,f-=p.length)}for(let x of w)p.push((b.added?"+":"-")+x);b.added?v+=w.length:g+=w.length}else{if(h)if(w.length<=c*2&&y<l.length-2)for(let x of d(w))p.push(x);else{let x=Math.min(w.length,c);for(let q of d(w.slice(0,x)))p.push(q);let T={oldStart:h,oldLines:g-h+x,newStart:f,newLines:v-f+x,lines:p};m.push(T),h=0,f=0,p=[]}g+=w.length,v+=w.length}}for(let y of m)for(let b=0;b<y.lines.length;b++)y.lines[b].endsWith(`
|
|
28
|
-
`)?y.lines[b]=y.lines[b].slice(0,-1):(y.lines.splice(b+1,0,"\"),b++);return{oldFileName:t,newFileName:e,oldHeader:n,newHeader:o,hunks:m}}}function Go(t,e){var r,i,n,o,s,a;if(e||(e=Cc),Array.isArray(t)){if(t.length>1&&!e.includeFileHeaders&&!t.every(l=>l.isGit))throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");return t.map(l=>Go(l,e)).join(`
|
|
29
|
-
`)}let c=[];if(t.isGit){if(e=Cc,!t.oldFileName)throw new Error("oldFileName must be specified for Git patches");if(!t.newFileName)throw new Error("newFileName must be specified for Git patches");let l=t.oldFileName,d=t.newFileName;t.isCreate&&l==="/dev/null"?l=d.replace(/^b\//,"a/"):t.isDelete&&d==="/dev/null"&&(d=l.replace(/^a\//,"b/")),c.push("diff --git "+Mr(l)+" "+Mr(d)),t.isDelete&&c.push("deleted file mode "+((r=t.oldMode)!==null&&r!==void 0?r:"100644")),t.isCreate&&c.push("new file mode "+((i=t.newMode)!==null&&i!==void 0?i:"100644")),t.oldMode&&t.newMode&&!t.isDelete&&!t.isCreate&&(c.push("old mode "+t.oldMode),c.push("new mode "+t.newMode)),t.isRename&&(c.push("rename from "+Mr(((n=t.oldFileName)!==null&&n!==void 0?n:"").replace(/^a\//,""))),c.push("rename to "+Mr(((o=t.newFileName)!==null&&o!==void 0?o:"").replace(/^b\//,"")))),t.isCopy&&(c.push("copy from "+Mr(((s=t.oldFileName)!==null&&s!==void 0?s:"").replace(/^a\//,""))),c.push("copy to "+Mr(((a=t.newFileName)!==null&&a!==void 0?a:"").replace(/^b\//,""))))}else e.includeIndex&&t.oldFileName==t.newFileName&&t.oldFileName!==void 0&&c.push("Index: "+t.oldFileName),e.includeUnderline&&c.push("===================================================================");let u=t.hunks.length>0;e.includeFileHeaders&&t.oldFileName!==void 0&&t.newFileName!==void 0&&(!t.isGit||u)&&(c.push("--- "+Mr(t.oldFileName)+(t.oldHeader?" "+t.oldHeader:"")),c.push("+++ "+Mr(t.newFileName)+(t.newHeader?" "+t.newHeader:"")));for(let l=0;l<t.hunks.length;l++){let d=t.hunks[l],m=d.oldLines===0?d.oldStart-1:d.oldStart,h=d.newLines===0?d.newStart-1:d.newStart;c.push("@@ -"+m+","+d.oldLines+" +"+h+","+d.newLines+" @@");for(let f of d.lines)c.push(f)}return c.join(`
|
|
30
|
-
`)+`
|
|
31
|
-
`}function Sm(t,e,r,i,n,o,s){if(typeof s=="function"&&(s={callback:s}),s?.callback){let{callback:a}=s;Rc(t,e,r,i,n,o,Object.assign(Object.assign({},s),{callback:c=>{a(c?Go(c,s.headerOptions):void 0)}}))}else{let a=Rc(t,e,r,i,n,o,s);return a?Go(a,s?.headerOptions):void 0}}function lw(t,e,r,i,n,o){return Sm(t,t,e,r,i,n,o)}function kP(t){let e=t.endsWith(`
|
|
32
|
-
`),r=t.split(`
|
|
33
|
-
`).map(i=>i+`
|
|
34
|
-
`);return e?r.pop():r.push(r.pop().slice(0,-1)),r}var Cc,cw,uw,dw=Se(()=>{Ac();Cc={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0},cw={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!0},uw={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!1}});function fw(t){let e=[],r,i;for(let n=0;n<t.length;n++)r=t[n],r.added?i=1:r.removed?i=-1:i=0,e.push([i,r.value]);return e}var pw=Se(()=>{});function mw(t){let e=[];for(let r=0;r<t.length;r++){let i=t[r];i.added?e.push("<ins>"):i.removed&&e.push("<del>"),e.push(SP(i.value)),i.added?e.push("</ins>"):i.removed&&e.push("</del>")}return e.join("")}function SP(t){let e=t;return e=e.replace(/&/g,"&"),e=e.replace(/</g,"<"),e=e.replace(/>/g,">"),e=e.replace(/"/g,"""),e}var hw=Se(()=>{});var gw={};Ut(gw,{Diff:()=>Re,FILE_HEADERS_ONLY:()=>cw,INCLUDE_HEADERS:()=>Cc,OMIT_HEADERS:()=>uw,applyPatch:()=>wm,applyPatches:()=>iw,arrayDiff:()=>vm,canonicalize:()=>Ho,characterDiff:()=>Xp,convertChangesToDMP:()=>fw,convertChangesToXML:()=>mw,createPatch:()=>lw,createTwoFilesPatch:()=>Sm,cssDiff:()=>mm,diffArrays:()=>Y$,diffChars:()=>C$,diffCss:()=>K$,diffJson:()=>W$,diffLines:()=>Ko,diffSentences:()=>J$,diffTrimmedLines:()=>V$,diffWords:()=>L$,diffWordsWithSpace:()=>cm,formatPatch:()=>Go,jsonDiff:()=>gm,lineDiff:()=>jc,parsePatch:()=>Wo,reversePatch:()=>km,sentenceDiff:()=>fm,structuredPatch:()=>Rc,wordDiff:()=>sm,wordsWithSpaceDiff:()=>am});var yw=Se(()=>{xr();R$();q$();Ac();B$();H$();G$();X$();ow();$m();aw();dw();pw();hw()});var Qo=$(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.regexpCode=le.getEsmExportName=le.getProperty=le.safeStringify=le.stringify=le.strConcat=le.addCodeArg=le.str=le._=le.nil=le._Code=le.Name=le.IDENTIFIER=le._CodeOrName=void 0;var Yo=class{};le._CodeOrName=Yo;le.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var On=class extends Yo{constructor(e){if(super(),!le.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};le.Name=On;var Ot=class extends Yo{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,i)=>`${r}${i}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,i)=>(i instanceof On&&(r[i.str]=(r[i.str]||0)+1),r),{})}};le._Code=Ot;le.nil=new Ot("");function vw(t,...e){let r=[t[0]],i=0;for(;i<e.length;)Im(r,e[i]),r.push(t[++i]);return new Ot(r)}le._=vw;var xm=new Ot("+");function bw(t,...e){let r=[Xo(t[0])],i=0;for(;i<e.length;)r.push(xm),Im(r,e[i]),r.push(xm,Xo(t[++i]));return xP(r),new Ot(r)}le.str=bw;function Im(t,e){e instanceof Ot?t.push(...e._items):e instanceof On?t.push(e):t.push(OP(e))}le.addCodeArg=Im;function xP(t){let e=1;for(;e<t.length-1;){if(t[e]===xm){let r=IP(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function IP(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof On||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof On))return`"${t}${e.slice(1)}`}function EP(t,e){return e.emptyStr()?t:t.emptyStr()?e:bw`${t}${e}`}le.strConcat=EP;function OP(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Xo(Array.isArray(t)?t.join(","):t)}function NP(t){return new Ot(Xo(t))}le.stringify=NP;function Xo(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}le.safeStringify=Xo;function zP(t){return typeof t=="string"&&le.IDENTIFIER.test(t)?new Ot(`.${t}`):vw`[${t}]`}le.getProperty=zP;function PP(t){if(typeof t=="string"&&le.IDENTIFIER.test(t))return new Ot(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}le.getEsmExportName=PP;function TP(t){return new Ot(t.toString())}le.regexpCode=TP});var Nm=$(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.ValueScope=ct.ValueScopeName=ct.Scope=ct.varKinds=ct.UsedValueState=void 0;var at=Qo(),Em=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Dc;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(Dc||(ct.UsedValueState=Dc={}));ct.varKinds={const:new at.Name("const"),let:new at.Name("let"),var:new at.Name("var")};var Mc=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof at.Name?e:this.name(e)}name(e){return new at.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,i;if(!((i=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||i===void 0)&&i.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};ct.Scope=Mc;var Uc=class extends at.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:i}){this.value=e,this.scopePath=(0,at._)`.${new at.Name(r)}[${i}]`}};ct.ValueScopeName=Uc;var jP=(0,at._)`\n`,Om=class extends Mc{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?jP:at.nil}}get(){return this._scope}name(e){return new Uc(e,this._newName(e))}value(e,r){var i;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(e),{prefix:o}=n,s=(i=r.key)!==null&&i!==void 0?i:r.ref,a=this._values[o];if(a){let l=a.get(s);if(l)return l}else a=this._values[o]=new Map;a.set(s,n);let c=this._scope[o]||(this._scope[o]=[]),u=c.length;return c[u]=r.ref,n.setValue(r,{property:o,itemIndex:u}),n}getValue(e,r){let i=this._values[e];if(i)return i.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,i=>{if(i.scopePath===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return(0,at._)`${e}${i.scopePath}`})}scopeCode(e=this._values,r,i){return this._reduceValues(e,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},r,i)}_reduceValues(e,r,i={},n){let o=at.nil;for(let s in e){let a=e[s];if(!a)continue;let c=i[s]=i[s]||new Map;a.forEach(u=>{if(c.has(u))return;c.set(u,Dc.Started);let l=r(u);if(l){let d=this.opts.es5?ct.varKinds.var:ct.varKinds.const;o=(0,at._)`${o}${d} ${u} = ${l};${this.opts._n}`}else if(l=n?.(u))o=(0,at._)`${o}${l}${this.opts._n}`;else throw new Em(u);c.set(u,Dc.Completed)})}return o}};ct.ValueScope=Om});var H=$(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.or=X.and=X.not=X.CodeGen=X.operators=X.varKinds=X.ValueScopeName=X.ValueScope=X.Scope=X.Name=X.regexpCode=X.stringify=X.getProperty=X.nil=X.strConcat=X.str=X._=void 0;var oe=Qo(),qt=Nm(),Ur=Qo();Object.defineProperty(X,"_",{enumerable:!0,get:function(){return Ur._}});Object.defineProperty(X,"str",{enumerable:!0,get:function(){return Ur.str}});Object.defineProperty(X,"strConcat",{enumerable:!0,get:function(){return Ur.strConcat}});Object.defineProperty(X,"nil",{enumerable:!0,get:function(){return Ur.nil}});Object.defineProperty(X,"getProperty",{enumerable:!0,get:function(){return Ur.getProperty}});Object.defineProperty(X,"stringify",{enumerable:!0,get:function(){return Ur.stringify}});Object.defineProperty(X,"regexpCode",{enumerable:!0,get:function(){return Ur.regexpCode}});Object.defineProperty(X,"Name",{enumerable:!0,get:function(){return Ur.Name}});var Fc=Nm();Object.defineProperty(X,"Scope",{enumerable:!0,get:function(){return Fc.Scope}});Object.defineProperty(X,"ValueScope",{enumerable:!0,get:function(){return Fc.ValueScope}});Object.defineProperty(X,"ValueScopeName",{enumerable:!0,get:function(){return Fc.ValueScopeName}});Object.defineProperty(X,"varKinds",{enumerable:!0,get:function(){return Fc.varKinds}});X.operators={GT:new oe._Code(">"),GTE:new oe._Code(">="),LT:new oe._Code("<"),LTE:new oe._Code("<="),EQ:new oe._Code("==="),NEQ:new oe._Code("!=="),NOT:new oe._Code("!"),OR:new oe._Code("||"),AND:new oe._Code("&&"),ADD:new oe._Code("+")};var Ir=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},zm=class extends Ir{constructor(e,r,i){super(),this.varKind=e,this.name=r,this.rhs=i}render({es5:e,_n:r}){let i=e?qt.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${i} ${this.name}${n};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=fi(this.rhs,e,r)),this}get names(){return this.rhs instanceof oe._CodeOrName?this.rhs.names:{}}},Lc=class extends Ir{constructor(e,r,i){super(),this.lhs=e,this.rhs=r,this.sideEffects=i}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof oe.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=fi(this.rhs,e,r),this}get names(){let e=this.lhs instanceof oe.Name?{}:{...this.lhs.names};return Zc(e,this.rhs)}},Pm=class extends Lc{constructor(e,r,i,n){super(e,i,n),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Tm=class extends Ir{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},jm=class extends Ir{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},Am=class extends Ir{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Cm=class extends Ir{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=fi(this.code,e,r),this}get names(){return this.code instanceof oe._CodeOrName?this.code.names:{}}},es=class extends Ir{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,i)=>r+i.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let i=e[r].optimizeNodes();Array.isArray(i)?e.splice(r,1,...i):i?e[r]=i:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:i}=this,n=i.length;for(;n--;){let o=i[n];o.optimizeNames(e,r)||(AP(e,o.names),i.splice(n,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>Pn(e,r.names),{})}},Er=class extends es{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},Rm=class extends es{},di=class extends Er{};di.kind="else";var Nn=class t extends Er{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let i=r.optimizeNodes();r=this.else=Array.isArray(i)?new di(i):i}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(_w(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var i;if(this.else=(i=this.else)===null||i===void 0?void 0:i.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=fi(this.condition,e,r),this}get names(){let e=super.names;return Zc(e,this.condition),this.else&&Pn(e,this.else.names),e}};Nn.kind="if";var zn=class extends Er{};zn.kind="for";var Dm=class extends zn{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=fi(this.iteration,e,r),this}get names(){return Pn(super.names,this.iteration.names)}},Mm=class extends zn{constructor(e,r,i,n){super(),this.varKind=e,this.name=r,this.from=i,this.to=n}render(e){let r=e.es5?qt.varKinds.var:this.varKind,{name:i,from:n,to:o}=this;return`for(${r} ${i}=${n}; ${i}<${o}; ${i}++)`+super.render(e)}get names(){let e=Zc(super.names,this.from);return Zc(e,this.to)}},qc=class extends zn{constructor(e,r,i,n){super(),this.loop=e,this.varKind=r,this.name=i,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=fi(this.iterable,e,r),this}get names(){return Pn(super.names,this.iterable.names)}},ts=class extends Er{constructor(e,r,i){super(),this.name=e,this.args=r,this.async=i}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};ts.kind="func";var rs=class extends es{render(e){return"return "+super.render(e)}};rs.kind="return";var Um=class extends Er{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var i,n;return super.optimizeNames(e,r),(i=this.catch)===null||i===void 0||i.optimizeNames(e,r),(n=this.finally)===null||n===void 0||n.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&Pn(e,this.catch.names),this.finally&&Pn(e,this.finally.names),e}},ns=class extends Er{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};ns.kind="catch";var is=class extends Er{render(e){return"finally"+super.render(e)}};is.kind="finally";var Lm=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
35
|
-
`:""},this._extScope=e,this._scope=new qt.Scope({parent:e}),this._nodes=[new Rm]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let i=this._extScope.value(e,r);return(this._values[i.prefix]||(this._values[i.prefix]=new Set)).add(i),i}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,i,n){let o=this._scope.toName(r);return i!==void 0&&n&&(this._constants[o.str]=i),this._leafNode(new zm(e,o,i)),o}const(e,r,i){return this._def(qt.varKinds.const,e,r,i)}let(e,r,i){return this._def(qt.varKinds.let,e,r,i)}var(e,r,i){return this._def(qt.varKinds.var,e,r,i)}assign(e,r,i){return this._leafNode(new Lc(e,r,i))}add(e,r){return this._leafNode(new Pm(e,X.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==oe.nil&&this._leafNode(new Cm(e)),this}object(...e){let r=["{"];for(let[i,n]of e)r.length>1&&r.push(","),r.push(i),(i!==n||this.opts.es5)&&(r.push(":"),(0,oe.addCodeArg)(r,n));return r.push("}"),new oe._Code(r)}if(e,r,i){if(this._blockNode(new Nn(e)),r&&i)this.code(r).else().code(i).endIf();else if(r)this.code(r).endIf();else if(i)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Nn(e))}else(){return this._elseNode(new di)}endIf(){return this._endBlockNode(Nn,di)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new Dm(e),r)}forRange(e,r,i,n,o=this.opts.es5?qt.varKinds.var:qt.varKinds.let){let s=this._scope.toName(e);return this._for(new Mm(o,s,r,i),()=>n(s))}forOf(e,r,i,n=qt.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let s=r instanceof oe.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,oe._)`${s}.length`,a=>{this.var(o,(0,oe._)`${s}[${a}]`),i(o)})}return this._for(new qc("of",n,o,r),()=>i(o))}forIn(e,r,i,n=this.opts.es5?qt.varKinds.var:qt.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,oe._)`Object.keys(${r})`,i);let o=this._scope.toName(e);return this._for(new qc("in",n,o,r),()=>i(o))}endFor(){return this._endBlockNode(zn)}label(e){return this._leafNode(new Tm(e))}break(e){return this._leafNode(new jm(e))}return(e){let r=new rs;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(rs)}try(e,r,i){if(!r&&!i)throw new Error('CodeGen: "try" without "catch" and "finally"');let n=new Um;if(this._blockNode(n),this.code(e),r){let o=this.name("e");this._currNode=n.catch=new ns(o),r(o)}return i&&(this._currNode=n.finally=new is,this.code(i)),this._endBlockNode(ns,is)}throw(e){return this._leafNode(new Am(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let i=this._nodes.length-r;if(i<0||e!==void 0&&i!==e)throw new Error(`CodeGen: wrong number of nodes: ${i} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=oe.nil,i,n){return this._blockNode(new ts(e,r,i)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(ts)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let i=this._currNode;if(i instanceof e||r&&i instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof Nn))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};X.CodeGen=Lm;function Pn(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function Zc(t,e){return e instanceof oe._CodeOrName?Pn(t,e.names):t}function fi(t,e,r){if(t instanceof oe.Name)return i(t);if(!n(t))return t;return new oe._Code(t._items.reduce((o,s)=>(s instanceof oe.Name&&(s=i(s)),s instanceof oe._Code?o.push(...s._items):o.push(s),o),[]));function i(o){let s=r[o.str];return s===void 0||e[o.str]!==1?o:(delete e[o.str],s)}function n(o){return o instanceof oe._Code&&o._items.some(s=>s instanceof oe.Name&&e[s.str]===1&&r[s.str]!==void 0)}}function AP(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function _w(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,oe._)`!${qm(t)}`}X.not=_w;var CP=$w(X.operators.AND);function RP(...t){return t.reduce(CP)}X.and=RP;var DP=$w(X.operators.OR);function MP(...t){return t.reduce(DP)}X.or=MP;function $w(t){return(e,r)=>e===oe.nil?r:r===oe.nil?e:(0,oe._)`${qm(e)} ${t} ${qm(r)}`}function qm(t){return t instanceof oe.Name?t:(0,oe._)`(${t})`}});var te=$(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.checkStrictMode=ee.getErrorPath=ee.Type=ee.useFunc=ee.setEvaluated=ee.evaluatedPropsToName=ee.mergeEvaluated=ee.eachItem=ee.unescapeJsonPointer=ee.escapeJsonPointer=ee.escapeFragment=ee.unescapeFragment=ee.schemaRefOrVal=ee.schemaHasRulesButRef=ee.schemaHasRules=ee.checkUnknownRules=ee.alwaysValidSchema=ee.toHash=void 0;var $e=H(),UP=Qo();function LP(t){let e={};for(let r of t)e[r]=!0;return e}ee.toHash=LP;function qP(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Sw(t,e),!xw(e,t.self.RULES.all))}ee.alwaysValidSchema=qP;function Sw(t,e=t.schema){let{opts:r,self:i}=t;if(!r.strictSchema||typeof e=="boolean")return;let n=i.RULES.keywords;for(let o in e)n[o]||Ow(t,`unknown keyword: "${o}"`)}ee.checkUnknownRules=Sw;function xw(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}ee.schemaHasRules=xw;function ZP(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}ee.schemaHasRulesButRef=ZP;function FP({topSchemaRef:t,schemaPath:e},r,i,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,$e._)`${r}`}return(0,$e._)`${t}${e}${(0,$e.getProperty)(i)}`}ee.schemaRefOrVal=FP;function VP(t){return Iw(decodeURIComponent(t))}ee.unescapeFragment=VP;function JP(t){return encodeURIComponent(Fm(t))}ee.escapeFragment=JP;function Fm(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}ee.escapeJsonPointer=Fm;function Iw(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}ee.unescapeJsonPointer=Iw;function BP(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}ee.eachItem=BP;function ww({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:i}){return(n,o,s,a)=>{let c=s===void 0?o:s instanceof $e.Name?(o instanceof $e.Name?t(n,o,s):e(n,o,s),s):o instanceof $e.Name?(e(n,s,o),o):r(o,s);return a===$e.Name&&!(c instanceof $e.Name)?i(n,c):c}}ee.mergeEvaluated={props:ww({mergeNames:(t,e,r)=>t.if((0,$e._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,$e._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,$e._)`${r} || {}`).code((0,$e._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,$e._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,$e._)`${r} || {}`),Vm(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:Ew}),items:ww({mergeNames:(t,e,r)=>t.if((0,$e._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,$e._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,$e._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,$e._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function Ew(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,$e._)`{}`);return e!==void 0&&Vm(t,r,e),r}ee.evaluatedPropsToName=Ew;function Vm(t,e,r){Object.keys(r).forEach(i=>t.assign((0,$e._)`${e}${(0,$e.getProperty)(i)}`,!0))}ee.setEvaluated=Vm;var kw={};function KP(t,e){return t.scopeValue("func",{ref:e,code:kw[e.code]||(kw[e.code]=new UP._Code(e.code))})}ee.useFunc=KP;var Zm;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(Zm||(ee.Type=Zm={}));function HP(t,e,r){if(t instanceof $e.Name){let i=e===Zm.Num;return r?i?(0,$e._)`"[" + ${t} + "]"`:(0,$e._)`"['" + ${t} + "']"`:i?(0,$e._)`"/" + ${t}`:(0,$e._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,$e.getProperty)(t).toString():"/"+Fm(t)}ee.getErrorPath=HP;function Ow(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}ee.checkStrictMode=Ow});var Nt=$(Jm=>{"use strict";Object.defineProperty(Jm,"__esModule",{value:!0});var Ge=H(),WP={data:new Ge.Name("data"),valCxt:new Ge.Name("valCxt"),instancePath:new Ge.Name("instancePath"),parentData:new Ge.Name("parentData"),parentDataProperty:new Ge.Name("parentDataProperty"),rootData:new Ge.Name("rootData"),dynamicAnchors:new Ge.Name("dynamicAnchors"),vErrors:new Ge.Name("vErrors"),errors:new Ge.Name("errors"),this:new Ge.Name("this"),self:new Ge.Name("self"),scope:new Ge.Name("scope"),json:new Ge.Name("json"),jsonPos:new Ge.Name("jsonPos"),jsonLen:new Ge.Name("jsonLen"),jsonPart:new Ge.Name("jsonPart")};Jm.default=WP});var os=$(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.extendErrors=Ye.resetErrorsCount=Ye.reportExtraError=Ye.reportError=Ye.keyword$DataError=Ye.keywordError=void 0;var ae=H(),Vc=te(),nt=Nt();Ye.keywordError={message:({keyword:t})=>(0,ae.str)`must pass "${t}" keyword validation`};Ye.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,ae.str)`"${t}" keyword must be ${e} ($data)`:(0,ae.str)`"${t}" keyword is invalid ($data)`};function GP(t,e=Ye.keywordError,r,i){let{it:n}=t,{gen:o,compositeRule:s,allErrors:a}=n,c=Pw(t,e,r);i??(s||a)?Nw(o,c):zw(n,(0,ae._)`[${c}]`)}Ye.reportError=GP;function YP(t,e=Ye.keywordError,r){let{it:i}=t,{gen:n,compositeRule:o,allErrors:s}=i,a=Pw(t,e,r);Nw(n,a),o||s||zw(i,nt.default.vErrors)}Ye.reportExtraError=YP;function XP(t,e){t.assign(nt.default.errors,e),t.if((0,ae._)`${nt.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,ae._)`${nt.default.vErrors}.length`,e),()=>t.assign(nt.default.vErrors,null)))}Ye.resetErrorsCount=XP;function QP({gen:t,keyword:e,schemaValue:r,data:i,errsCount:n,it:o}){if(n===void 0)throw new Error("ajv implementation error");let s=t.name("err");t.forRange("i",n,nt.default.errors,a=>{t.const(s,(0,ae._)`${nt.default.vErrors}[${a}]`),t.if((0,ae._)`${s}.instancePath === undefined`,()=>t.assign((0,ae._)`${s}.instancePath`,(0,ae.strConcat)(nt.default.instancePath,o.errorPath))),t.assign((0,ae._)`${s}.schemaPath`,(0,ae.str)`${o.errSchemaPath}/${e}`),o.opts.verbose&&(t.assign((0,ae._)`${s}.schema`,r),t.assign((0,ae._)`${s}.data`,i))})}Ye.extendErrors=QP;function Nw(t,e){let r=t.const("err",e);t.if((0,ae._)`${nt.default.vErrors} === null`,()=>t.assign(nt.default.vErrors,(0,ae._)`[${r}]`),(0,ae._)`${nt.default.vErrors}.push(${r})`),t.code((0,ae._)`${nt.default.errors}++`)}function zw(t,e){let{gen:r,validateName:i,schemaEnv:n}=t;n.$async?r.throw((0,ae._)`new ${t.ValidationError}(${e})`):(r.assign((0,ae._)`${i}.errors`,e),r.return(!1))}var Tn={keyword:new ae.Name("keyword"),schemaPath:new ae.Name("schemaPath"),params:new ae.Name("params"),propertyName:new ae.Name("propertyName"),message:new ae.Name("message"),schema:new ae.Name("schema"),parentSchema:new ae.Name("parentSchema")};function Pw(t,e,r){let{createErrors:i}=t.it;return i===!1?(0,ae._)`{}`:eT(t,e,r)}function eT(t,e,r={}){let{gen:i,it:n}=t,o=[tT(n,r),rT(t,r)];return nT(t,e,o),i.object(...o)}function tT({errorPath:t},{instancePath:e}){let r=e?(0,ae.str)`${t}${(0,Vc.getErrorPath)(e,Vc.Type.Str)}`:t;return[nt.default.instancePath,(0,ae.strConcat)(nt.default.instancePath,r)]}function rT({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:i}){let n=i?e:(0,ae.str)`${e}/${t}`;return r&&(n=(0,ae.str)`${n}${(0,Vc.getErrorPath)(r,Vc.Type.Str)}`),[Tn.schemaPath,n]}function nT(t,{params:e,message:r},i){let{keyword:n,data:o,schemaValue:s,it:a}=t,{opts:c,propertyName:u,topSchemaRef:l,schemaPath:d}=a;i.push([Tn.keyword,n],[Tn.params,typeof e=="function"?e(t):e||(0,ae._)`{}`]),c.messages&&i.push([Tn.message,typeof r=="function"?r(t):r]),c.verbose&&i.push([Tn.schema,s],[Tn.parentSchema,(0,ae._)`${l}${d}`],[nt.default.data,o]),u&&i.push([Tn.propertyName,u])}});var jw=$(pi=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});pi.boolOrEmptySchema=pi.topBoolOrEmptySchema=void 0;var iT=os(),oT=H(),sT=Nt(),aT={message:"boolean schema is false"};function cT(t){let{gen:e,schema:r,validateName:i}=t;r===!1?Tw(t,!1):typeof r=="object"&&r.$async===!0?e.return(sT.default.data):(e.assign((0,oT._)`${i}.errors`,null),e.return(!0))}pi.topBoolOrEmptySchema=cT;function uT(t,e){let{gen:r,schema:i}=t;i===!1?(r.var(e,!1),Tw(t)):r.var(e,!0)}pi.boolOrEmptySchema=uT;function Tw(t,e){let{gen:r,data:i}=t,n={gen:r,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,iT.reportError)(n,aT,void 0,e)}});var Bm=$(mi=>{"use strict";Object.defineProperty(mi,"__esModule",{value:!0});mi.getRules=mi.isJSONType=void 0;var lT=["string","number","integer","boolean","null","object","array"],dT=new Set(lT);function fT(t){return typeof t=="string"&&dT.has(t)}mi.isJSONType=fT;function pT(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}mi.getRules=pT});var Km=$(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.shouldUseRule=Lr.shouldUseGroup=Lr.schemaHasRulesForType=void 0;function mT({schema:t,self:e},r){let i=e.RULES.types[r];return i&&i!==!0&&Aw(t,i)}Lr.schemaHasRulesForType=mT;function Aw(t,e){return e.rules.some(r=>Cw(t,r))}Lr.shouldUseGroup=Aw;function Cw(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(i=>t[i]!==void 0))}Lr.shouldUseRule=Cw});var ss=$(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.reportTypeError=Xe.checkDataTypes=Xe.checkDataType=Xe.coerceAndCheckDataType=Xe.getJSONTypes=Xe.getSchemaTypes=Xe.DataType=void 0;var hT=Bm(),gT=Km(),yT=os(),G=H(),Rw=te(),hi;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(hi||(Xe.DataType=hi={}));function vT(t){let e=Dw(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}Xe.getSchemaTypes=vT;function Dw(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(hT.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Xe.getJSONTypes=Dw;function bT(t,e){let{gen:r,data:i,opts:n}=t,o=_T(e,n.coerceTypes),s=e.length>0&&!(o.length===0&&e.length===1&&(0,gT.schemaHasRulesForType)(t,e[0]));if(s){let a=Wm(e,i,n.strictNumbers,hi.Wrong);r.if(a,()=>{o.length?$T(t,e,o):Gm(t)})}return s}Xe.coerceAndCheckDataType=bT;var Mw=new Set(["string","number","integer","boolean","null"]);function _T(t,e){return e?t.filter(r=>Mw.has(r)||e==="array"&&r==="array"):[]}function $T(t,e,r){let{gen:i,data:n,opts:o}=t,s=i.let("dataType",(0,G._)`typeof ${n}`),a=i.let("coerced",(0,G._)`undefined`);o.coerceTypes==="array"&&i.if((0,G._)`${s} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>i.assign(n,(0,G._)`${n}[0]`).assign(s,(0,G._)`typeof ${n}`).if(Wm(e,n,o.strictNumbers),()=>i.assign(a,n))),i.if((0,G._)`${a} !== undefined`);for(let u of r)(Mw.has(u)||u==="array"&&o.coerceTypes==="array")&&c(u);i.else(),Gm(t),i.endIf(),i.if((0,G._)`${a} !== undefined`,()=>{i.assign(n,a),wT(t,a)});function c(u){switch(u){case"string":i.elseIf((0,G._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,G._)`"" + ${n}`).elseIf((0,G._)`${n} === null`).assign(a,(0,G._)`""`);return;case"number":i.elseIf((0,G._)`${s} == "boolean" || ${n} === null
|
|
36
|
-
|| (${s} == "string" && ${n} && ${n} == +${n})`).assign(a,(0,G._)`+${n}`);return;case"integer":i.elseIf((0,G._)`${s} === "boolean" || ${n} === null
|
|
37
|
-
|| (${s} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(a,(0,G._)`+${n}`);return;case"boolean":i.elseIf((0,G._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(a,!1).elseIf((0,G._)`${n} === "true" || ${n} === 1`).assign(a,!0);return;case"null":i.elseIf((0,G._)`${n} === "" || ${n} === 0 || ${n} === false`),i.assign(a,null);return;case"array":i.elseIf((0,G._)`${s} === "string" || ${s} === "number"
|
|
38
|
-
|| ${s} === "boolean" || ${n} === null`).assign(a,(0,G._)`[${n}]`)}}}function wT({gen:t,parentData:e,parentDataProperty:r},i){t.if((0,G._)`${e} !== undefined`,()=>t.assign((0,G._)`${e}[${r}]`,i))}function Hm(t,e,r,i=hi.Correct){let n=i===hi.Correct?G.operators.EQ:G.operators.NEQ,o;switch(t){case"null":return(0,G._)`${e} ${n} null`;case"array":o=(0,G._)`Array.isArray(${e})`;break;case"object":o=(0,G._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":o=s((0,G._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":o=s();break;default:return(0,G._)`typeof ${e} ${n} ${t}`}return i===hi.Correct?o:(0,G.not)(o);function s(a=G.nil){return(0,G.and)((0,G._)`typeof ${e} == "number"`,a,r?(0,G._)`isFinite(${e})`:G.nil)}}Xe.checkDataType=Hm;function Wm(t,e,r,i){if(t.length===1)return Hm(t[0],e,r,i);let n,o=(0,Rw.toHash)(t);if(o.array&&o.object){let s=(0,G._)`typeof ${e} != "object"`;n=o.null?s:(0,G._)`!${e} || ${s}`,delete o.null,delete o.array,delete o.object}else n=G.nil;o.number&&delete o.integer;for(let s in o)n=(0,G.and)(n,Hm(s,e,r,i));return n}Xe.checkDataTypes=Wm;var kT={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,G._)`{type: ${t}}`:(0,G._)`{type: ${e}}`};function Gm(t){let e=ST(t);(0,yT.reportError)(e,kT)}Xe.reportTypeError=Gm;function ST(t){let{gen:e,data:r,schema:i}=t,n=(0,Rw.schemaRefOrVal)(t,i,"type");return{gen:e,keyword:"type",data:r,schema:i.type,schemaCode:n,schemaValue:n,parentSchema:i,params:{},it:t}}});var Lw=$(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});Jc.assignDefaults=void 0;var gi=H(),xT=te();function IT(t,e){let{properties:r,items:i}=t.schema;if(e==="object"&&r)for(let n in r)Uw(t,n,r[n].default);else e==="array"&&Array.isArray(i)&&i.forEach((n,o)=>Uw(t,o,n.default))}Jc.assignDefaults=IT;function Uw(t,e,r){let{gen:i,compositeRule:n,data:o,opts:s}=t;if(r===void 0)return;let a=(0,gi._)`${o}${(0,gi.getProperty)(e)}`;if(n){(0,xT.checkStrictMode)(t,`default is ignored for: ${a}`);return}let c=(0,gi._)`${a} === undefined`;s.useDefaults==="empty"&&(c=(0,gi._)`${c} || ${a} === null || ${a} === ""`),i.if(c,(0,gi._)`${a} = ${(0,gi.stringify)(r)}`)}});var zt=$(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.validateUnion=ge.validateArray=ge.usePattern=ge.callValidateCode=ge.schemaProperties=ge.allSchemaProperties=ge.noPropertyInData=ge.propertyInData=ge.isOwnProperty=ge.hasPropFunc=ge.reportMissingProp=ge.checkMissingProp=ge.checkReportMissingProp=void 0;var Oe=H(),Ym=te(),qr=Nt(),ET=te();function OT(t,e){let{gen:r,data:i,it:n}=t;r.if(Qm(r,i,e,n.opts.ownProperties),()=>{t.setParams({missingProperty:(0,Oe._)`${e}`},!0),t.error()})}ge.checkReportMissingProp=OT;function NT({gen:t,data:e,it:{opts:r}},i,n){return(0,Oe.or)(...i.map(o=>(0,Oe.and)(Qm(t,e,o,r.ownProperties),(0,Oe._)`${n} = ${o}`)))}ge.checkMissingProp=NT;function zT(t,e){t.setParams({missingProperty:e},!0),t.error()}ge.reportMissingProp=zT;function qw(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Oe._)`Object.prototype.hasOwnProperty`})}ge.hasPropFunc=qw;function Xm(t,e,r){return(0,Oe._)`${qw(t)}.call(${e}, ${r})`}ge.isOwnProperty=Xm;function PT(t,e,r,i){let n=(0,Oe._)`${e}${(0,Oe.getProperty)(r)} !== undefined`;return i?(0,Oe._)`${n} && ${Xm(t,e,r)}`:n}ge.propertyInData=PT;function Qm(t,e,r,i){let n=(0,Oe._)`${e}${(0,Oe.getProperty)(r)} === undefined`;return i?(0,Oe.or)(n,(0,Oe.not)(Xm(t,e,r))):n}ge.noPropertyInData=Qm;function Zw(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}ge.allSchemaProperties=Zw;function TT(t,e){return Zw(e).filter(r=>!(0,Ym.alwaysValidSchema)(t,e[r]))}ge.schemaProperties=TT;function jT({schemaCode:t,data:e,it:{gen:r,topSchemaRef:i,schemaPath:n,errorPath:o},it:s},a,c,u){let l=u?(0,Oe._)`${t}, ${e}, ${i}${n}`:e,d=[[qr.default.instancePath,(0,Oe.strConcat)(qr.default.instancePath,o)],[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 m=(0,Oe._)`${l}, ${r.object(...d)}`;return c!==Oe.nil?(0,Oe._)`${a}.call(${c}, ${m})`:(0,Oe._)`${a}(${m})`}ge.callValidateCode=jT;var AT=(0,Oe._)`new RegExp`;function CT({gen:t,it:{opts:e}},r){let i=e.unicodeRegExp?"u":"",{regExp:n}=e.code,o=n(r,i);return t.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,Oe._)`${n.code==="new RegExp"?AT:(0,ET.useFunc)(t,n)}(${r}, ${i})`})}ge.usePattern=CT;function RT(t){let{gen:e,data:r,keyword:i,it:n}=t,o=e.name("valid");if(n.allErrors){let a=e.let("valid",!0);return s(()=>e.assign(a,!1)),a}return e.var(o,!0),s(()=>e.break()),o;function s(a){let c=e.const("len",(0,Oe._)`${r}.length`);e.forRange("i",0,c,u=>{t.subschema({keyword:i,dataProp:u,dataPropType:Ym.Type.Num},o),e.if((0,Oe.not)(o),a)})}}ge.validateArray=RT;function DT(t){let{gen:e,schema:r,keyword:i,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,Ym.alwaysValidSchema)(n,c))&&!n.opts.unevaluated)return;let s=e.let("valid",!1),a=e.name("_valid");e.block(()=>r.forEach((c,u)=>{let l=t.subschema({keyword:i,schemaProp:u,compositeRule:!0},a);e.assign(s,(0,Oe._)`${s} || ${a}`),t.mergeValidEvaluated(l,a)||e.if((0,Oe.not)(s))})),t.result(s,()=>t.reset(),()=>t.error(!0))}ge.validateUnion=DT});var Jw=$(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.validateKeywordUsage=rr.validSchemaType=rr.funcKeywordCode=rr.macroKeywordCode=void 0;var it=H(),jn=Nt(),MT=zt(),UT=os();function LT(t,e){let{gen:r,keyword:i,schema:n,parentSchema:o,it:s}=t,a=e.macro.call(s.self,n,o,s),c=Vw(r,i,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let u=r.name("valid");t.subschema({schema:a,schemaPath:it.nil,errSchemaPath:`${s.errSchemaPath}/${i}`,topSchemaRef:c,compositeRule:!0},u),t.pass(u,()=>t.error(!0))}rr.macroKeywordCode=LT;function qT(t,e){var r;let{gen:i,keyword:n,schema:o,parentSchema:s,$data:a,it:c}=t;FT(c,e);let u=!a&&e.compile?e.compile.call(c.self,o,s,c):e.validate,l=Vw(i,n,u),d=i.let("valid");t.block$data(d,m),t.ok((r=e.valid)!==null&&r!==void 0?r:d);function m(){if(e.errors===!1)p(),e.modifying&&Fw(t),g(()=>t.error());else{let v=e.async?h():f();e.modifying&&Fw(t),g(()=>ZT(t,v))}}function h(){let v=i.let("ruleErrs",null);return i.try(()=>p((0,it._)`await `),y=>i.assign(d,!1).if((0,it._)`${y} instanceof ${c.ValidationError}`,()=>i.assign(v,(0,it._)`${y}.errors`),()=>i.throw(y))),v}function f(){let v=(0,it._)`${l}.errors`;return i.assign(v,null),p(it.nil),v}function p(v=e.async?(0,it._)`await `:it.nil){let y=c.opts.passContext?jn.default.this:jn.default.self,b=!("compile"in e&&!a||e.schema===!1);i.assign(d,(0,it._)`${v}${(0,MT.callValidateCode)(t,l,y,b)}`,e.modifying)}function g(v){var y;i.if((0,it.not)((y=e.valid)!==null&&y!==void 0?y:d),v)}}rr.funcKeywordCode=qT;function Fw(t){let{gen:e,data:r,it:i}=t;e.if(i.parentData,()=>e.assign(r,(0,it._)`${i.parentData}[${i.parentDataProperty}]`))}function ZT(t,e){let{gen:r}=t;r.if((0,it._)`Array.isArray(${e})`,()=>{r.assign(jn.default.vErrors,(0,it._)`${jn.default.vErrors} === null ? ${e} : ${jn.default.vErrors}.concat(${e})`).assign(jn.default.errors,(0,it._)`${jn.default.vErrors}.length`),(0,UT.extendErrors)(t)},()=>t.error())}function FT({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function Vw(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,it.stringify)(r)})}function VT(t,e,r=!1){return!e.length||e.some(i=>i==="array"?Array.isArray(t):i==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==i||r&&typeof t>"u")}rr.validSchemaType=VT;function JT({schema:t,opts:e,self:r,errSchemaPath:i},n,o){if(Array.isArray(n.keyword)?!n.keyword.includes(o):n.keyword!==o)throw new Error("ajv implementation error");let s=n.dependencies;if(s?.some(a=>!Object.prototype.hasOwnProperty.call(t,a)))throw new Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(n.validateSchema&&!n.validateSchema(t[o])){let c=`keyword "${o}" value is invalid at path "${i}": `+r.errorsText(n.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}rr.validateKeywordUsage=JT});var Kw=$(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.extendSubschemaMode=Zr.extendSubschemaData=Zr.getSubschema=void 0;var nr=H(),Bw=te();function BT(t,{keyword:e,schemaProp:r,schema:i,schemaPath:n,errSchemaPath:o,topSchemaRef:s}){if(e!==void 0&&i!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let a=t.schema[e];return r===void 0?{schema:a,schemaPath:(0,nr._)`${t.schemaPath}${(0,nr.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[r],schemaPath:(0,nr._)`${t.schemaPath}${(0,nr.getProperty)(e)}${(0,nr.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,Bw.escapeFragment)(r)}`}}if(i!==void 0){if(n===void 0||o===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:n,topSchemaRef:s,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}Zr.getSubschema=BT;function KT(t,e,{dataProp:r,dataPropType:i,data:n,dataTypes:o,propertyName:s}){if(n!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=e;if(r!==void 0){let{errorPath:u,dataPathArr:l,opts:d}=e,m=a.let("data",(0,nr._)`${e.data}${(0,nr.getProperty)(r)}`,!0);c(m),t.errorPath=(0,nr.str)`${u}${(0,Bw.getErrorPath)(r,i,d.jsPropertySyntax)}`,t.parentDataProperty=(0,nr._)`${r}`,t.dataPathArr=[...l,t.parentDataProperty]}if(n!==void 0){let u=n instanceof nr.Name?n:a.let("data",n,!0);c(u),s!==void 0&&(t.propertyName=s)}o&&(t.dataTypes=o);function c(u){t.data=u,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,u]}}Zr.extendSubschemaData=KT;function HT(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:i,createErrors:n,allErrors:o}){i!==void 0&&(t.compositeRule=i),n!==void 0&&(t.createErrors=n),o!==void 0&&(t.allErrors=o),t.jtdDiscriminator=e,t.jtdMetadata=r}Zr.extendSubschemaMode=HT});var eh=$((uB,Hw)=>{"use strict";Hw.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var i,n,o;if(Array.isArray(e)){if(i=e.length,i!=r.length)return!1;for(n=i;n--!==0;)if(!t(e[n],r[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),i=o.length,i!==Object.keys(r).length)return!1;for(n=i;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[n]))return!1;for(n=i;n--!==0;){var s=o[n];if(!t(e[s],r[s]))return!1}return!0}return e!==e&&r!==r}});var Gw=$((lB,Ww)=>{"use strict";var Fr=Ww.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var i=typeof r=="function"?r:r.pre||function(){},n=r.post||function(){};Bc(e,i,n,t,"",t)};Fr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Fr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Fr.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Fr.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 Bc(t,e,r,i,n,o,s,a,c,u){if(i&&typeof i=="object"&&!Array.isArray(i)){e(i,n,o,s,a,c,u);for(var l in i){var d=i[l];if(Array.isArray(d)){if(l in Fr.arrayKeywords)for(var m=0;m<d.length;m++)Bc(t,e,r,d[m],n+"/"+l+"/"+m,o,n,l,i,m)}else if(l in Fr.propsKeywords){if(d&&typeof d=="object")for(var h in d)Bc(t,e,r,d[h],n+"/"+l+"/"+WT(h),o,n,l,i,h)}else(l in Fr.keywords||t.allKeys&&!(l in Fr.skipKeywords))&&Bc(t,e,r,d,n+"/"+l,o,n,l,i)}r(i,n,o,s,a,c,u)}}function WT(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var as=$(ut=>{"use strict";Object.defineProperty(ut,"__esModule",{value:!0});ut.getSchemaRefs=ut.resolveUrl=ut.normalizeId=ut._getFullPath=ut.getFullPath=ut.inlineRef=void 0;var GT=te(),YT=eh(),XT=Gw(),QT=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function e1(t,e=!0){return typeof t=="boolean"?!0:e===!0?!th(t):e?Yw(t)<=e:!1}ut.inlineRef=e1;var t1=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function th(t){for(let e in t){if(t1.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(th)||typeof r=="object"&&th(r))return!0}return!1}function Yw(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!QT.has(r)&&(typeof t[r]=="object"&&(0,GT.eachItem)(t[r],i=>e+=Yw(i)),e===1/0))return 1/0}return e}function Xw(t,e="",r){r!==!1&&(e=yi(e));let i=t.parse(e);return Qw(t,i)}ut.getFullPath=Xw;function Qw(t,e){return t.serialize(e).split("#")[0]+"#"}ut._getFullPath=Qw;var r1=/#\/?$/;function yi(t){return t?t.replace(r1,""):""}ut.normalizeId=yi;function n1(t,e,r){return r=yi(r),t.resolve(e,r)}ut.resolveUrl=n1;var i1=/^[a-z_][-a-z0-9._]*$/i;function o1(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:i}=this.opts,n=yi(t[r]||e),o={"":n},s=Xw(i,n,!1),a={},c=new Set;return XT(t,{allKeys:!0},(d,m,h,f)=>{if(f===void 0)return;let p=s+m,g=o[f];typeof d[r]=="string"&&(g=v.call(this,d[r])),y.call(this,d.$anchor),y.call(this,d.$dynamicAnchor),o[m]=g;function v(b){let w=this.opts.uriResolver.resolve;if(b=yi(g?w(g,b):b),c.has(b))throw l(b);c.add(b);let x=this.refs[b];return typeof x=="string"&&(x=this.refs[x]),typeof x=="object"?u(d,x.schema,b):b!==yi(p)&&(b[0]==="#"?(u(d,a[b],b),a[b]=d):this.refs[b]=p),b}function y(b){if(typeof b=="string"){if(!i1.test(b))throw new Error(`invalid anchor "${b}"`);v.call(this,`#${b}`)}}}),a;function u(d,m,h){if(m!==void 0&&!YT(d,m))throw l(h)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}ut.getSchemaRefs=o1});var vi=$(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.getData=Vr.KeywordCxt=Vr.validateFunctionCode=void 0;var ik=jw(),ek=ss(),nh=Km(),Kc=ss(),s1=Lw(),us=Jw(),rh=Kw(),U=H(),K=Nt(),a1=as(),Or=te(),cs=os();function c1(t){if(ak(t)&&(ck(t),sk(t))){d1(t);return}ok(t,()=>(0,ik.topBoolOrEmptySchema)(t))}Vr.validateFunctionCode=c1;function ok({gen:t,validateName:e,schema:r,schemaEnv:i,opts:n},o){n.code.es5?t.func(e,(0,U._)`${K.default.data}, ${K.default.valCxt}`,i.$async,()=>{t.code((0,U._)`"use strict"; ${tk(r,n)}`),l1(t,n),t.code(o)}):t.func(e,(0,U._)`${K.default.data}, ${u1(n)}`,i.$async,()=>t.code(tk(r,n)).code(o))}function u1(t){return(0,U._)`{${K.default.instancePath}="", ${K.default.parentData}, ${K.default.parentDataProperty}, ${K.default.rootData}=${K.default.data}${t.dynamicRef?(0,U._)`, ${K.default.dynamicAnchors}={}`:U.nil}}={}`}function l1(t,e){t.if(K.default.valCxt,()=>{t.var(K.default.instancePath,(0,U._)`${K.default.valCxt}.${K.default.instancePath}`),t.var(K.default.parentData,(0,U._)`${K.default.valCxt}.${K.default.parentData}`),t.var(K.default.parentDataProperty,(0,U._)`${K.default.valCxt}.${K.default.parentDataProperty}`),t.var(K.default.rootData,(0,U._)`${K.default.valCxt}.${K.default.rootData}`),e.dynamicRef&&t.var(K.default.dynamicAnchors,(0,U._)`${K.default.valCxt}.${K.default.dynamicAnchors}`)},()=>{t.var(K.default.instancePath,(0,U._)`""`),t.var(K.default.parentData,(0,U._)`undefined`),t.var(K.default.parentDataProperty,(0,U._)`undefined`),t.var(K.default.rootData,K.default.data),e.dynamicRef&&t.var(K.default.dynamicAnchors,(0,U._)`{}`)})}function d1(t){let{schema:e,opts:r,gen:i}=t;ok(t,()=>{r.$comment&&e.$comment&&lk(t),g1(t),i.let(K.default.vErrors,null),i.let(K.default.errors,0),r.unevaluated&&f1(t),uk(t),b1(t)})}function f1(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,U._)`${r}.evaluated`),e.if((0,U._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,U._)`${t.evaluated}.props`,(0,U._)`undefined`)),e.if((0,U._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,U._)`${t.evaluated}.items`,(0,U._)`undefined`))}function tk(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,U._)`/*# sourceURL=${r} */`:U.nil}function p1(t,e){if(ak(t)&&(ck(t),sk(t))){m1(t,e);return}(0,ik.boolOrEmptySchema)(t,e)}function sk({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function ak(t){return typeof t.schema!="boolean"}function m1(t,e){let{schema:r,gen:i,opts:n}=t;n.$comment&&r.$comment&&lk(t),y1(t),v1(t);let o=i.const("_errs",K.default.errors);uk(t,o),i.var(e,(0,U._)`${o} === ${K.default.errors}`)}function ck(t){(0,Or.checkUnknownRules)(t),h1(t)}function uk(t,e){if(t.opts.jtd)return rk(t,[],!1,e);let r=(0,ek.getSchemaTypes)(t.schema),i=(0,ek.coerceAndCheckDataType)(t,r);rk(t,r,!i,e)}function h1(t){let{schema:e,errSchemaPath:r,opts:i,self:n}=t;e.$ref&&i.ignoreKeywordsWithRef&&(0,Or.schemaHasRulesButRef)(e,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function g1(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Or.checkStrictMode)(t,"default is ignored in the schema root")}function y1(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,a1.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function v1(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function lk({gen:t,schemaEnv:e,schema:r,errSchemaPath:i,opts:n}){let o=r.$comment;if(n.$comment===!0)t.code((0,U._)`${K.default.self}.logger.log(${o})`);else if(typeof n.$comment=="function"){let s=(0,U.str)`${i}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,U._)`${K.default.self}.opts.$comment(${o}, ${s}, ${a}.schema)`)}}function b1(t){let{gen:e,schemaEnv:r,validateName:i,ValidationError:n,opts:o}=t;r.$async?e.if((0,U._)`${K.default.errors} === 0`,()=>e.return(K.default.data),()=>e.throw((0,U._)`new ${n}(${K.default.vErrors})`)):(e.assign((0,U._)`${i}.errors`,K.default.vErrors),o.unevaluated&&_1(t),e.return((0,U._)`${K.default.errors} === 0`))}function _1({gen:t,evaluated:e,props:r,items:i}){r instanceof U.Name&&t.assign((0,U._)`${e}.props`,r),i instanceof U.Name&&t.assign((0,U._)`${e}.items`,i)}function rk(t,e,r,i){let{gen:n,schema:o,data:s,allErrors:a,opts:c,self:u}=t,{RULES:l}=u;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,Or.schemaHasRulesButRef)(o,l))){n.block(()=>fk(t,"$ref",l.all.$ref.definition));return}c.jtd||$1(t,e),n.block(()=>{for(let m of l.rules)d(m);d(l.post)});function d(m){(0,nh.shouldUseGroup)(o,m)&&(m.type?(n.if((0,Kc.checkDataType)(m.type,s,c.strictNumbers)),nk(t,m),e.length===1&&e[0]===m.type&&r&&(n.else(),(0,Kc.reportTypeError)(t)),n.endIf()):nk(t,m),a||n.if((0,U._)`${K.default.errors} === ${i||0}`))}}function nk(t,e){let{gen:r,schema:i,opts:{useDefaults:n}}=t;n&&(0,s1.assignDefaults)(t,e.type),r.block(()=>{for(let o of e.rules)(0,nh.shouldUseRule)(i,o)&&fk(t,o.keyword,o.definition,e.type)})}function $1(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(w1(t,e),t.opts.allowUnionTypes||k1(t,e),S1(t,t.dataTypes))}function w1(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{dk(t.dataTypes,r)||ih(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),I1(t,e)}}function k1(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&ih(t,"use allowUnionTypes to allow union type keyword")}function S1(t,e){let r=t.self.RULES.all;for(let i in r){let n=r[i];if(typeof n=="object"&&(0,nh.shouldUseRule)(t.schema,n)){let{type:o}=n.definition;o.length&&!o.some(s=>x1(e,s))&&ih(t,`missing type "${o.join(",")}" for keyword "${i}"`)}}}function x1(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function dk(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function I1(t,e){let r=[];for(let i of t.dataTypes)dk(e,i)?r.push(i):e.includes("integer")&&i==="number"&&r.push("integer");t.dataTypes=r}function ih(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Or.checkStrictMode)(t,e,t.opts.strictTypes)}var Hc=class{constructor(e,r,i){if((0,us.validateKeywordUsage)(e,r,i),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=i,this.data=e.data,this.schema=e.schema[i],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Or.schemaRefOrVal)(e,this.schema,i,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",pk(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,us.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${i} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",K.default.errors))}result(e,r,i){this.failResult((0,U.not)(e),r,i)}failResult(e,r,i){this.gen.if(e),i?i():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,U.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:r}=this;this.fail((0,U._)`${r} !== undefined && (${(0,U.or)(this.invalid$data(),e)})`)}error(e,r,i){if(r){this.setParams(r),this._error(e,i),this.setParams({});return}this._error(e,i)}_error(e,r){(e?cs.reportExtraError:cs.reportError)(this,this.def.error,r)}$dataError(){(0,cs.reportError)(this,this.def.$dataError||cs.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,cs.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,i=U.nil){this.gen.block(()=>{this.check$data(e,i),r()})}check$data(e=U.nil,r=U.nil){if(!this.$data)return;let{gen:i,schemaCode:n,schemaType:o,def:s}=this;i.if((0,U.or)((0,U._)`${n} === undefined`,r)),e!==U.nil&&i.assign(e,!0),(o.length||s.validateSchema)&&(i.elseIf(this.invalid$data()),this.$dataError(),e!==U.nil&&i.assign(e,!1)),i.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:i,def:n,it:o}=this;return(0,U.or)(s(),a());function s(){if(i.length){if(!(r instanceof U.Name))throw new Error("ajv implementation error");let c=Array.isArray(i)?i:[i];return(0,U._)`${(0,Kc.checkDataTypes)(c,r,o.opts.strictNumbers,Kc.DataType.Wrong)}`}return U.nil}function a(){if(n.validateSchema){let c=e.scopeValue("validate$data",{ref:n.validateSchema});return(0,U._)`!${c}(${r})`}return U.nil}}subschema(e,r){let i=(0,rh.getSubschema)(this.it,e);(0,rh.extendSubschemaData)(i,this.it,e),(0,rh.extendSubschemaMode)(i,e);let n={...this.it,...i,items:void 0,props:void 0};return p1(n,r),n}mergeEvaluated(e,r){let{it:i,gen:n}=this;i.opts.unevaluated&&(i.props!==!0&&e.props!==void 0&&(i.props=Or.mergeEvaluated.props(n,e.props,i.props,r)),i.items!==!0&&e.items!==void 0&&(i.items=Or.mergeEvaluated.items(n,e.items,i.items,r)))}mergeValidEvaluated(e,r){let{it:i,gen:n}=this;if(i.opts.unevaluated&&(i.props!==!0||i.items!==!0))return n.if(r,()=>this.mergeEvaluated(e,U.Name)),!0}};Vr.KeywordCxt=Hc;function fk(t,e,r,i){let n=new Hc(t,r,e);"code"in r?r.code(n,i):n.$data&&r.validate?(0,us.funcKeywordCode)(n,r):"macro"in r?(0,us.macroKeywordCode)(n,r):(r.compile||r.validate)&&(0,us.funcKeywordCode)(n,r)}var E1=/^\/(?:[^~]|~0|~1)*$/,O1=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function pk(t,{dataLevel:e,dataNames:r,dataPathArr:i}){let n,o;if(t==="")return K.default.rootData;if(t[0]==="/"){if(!E1.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);n=t,o=K.default.rootData}else{let u=O1.exec(t);if(!u)throw new Error(`Invalid JSON-pointer: ${t}`);let l=+u[1];if(n=u[2],n==="#"){if(l>=e)throw new Error(c("property/index",l));return i[e-l]}if(l>e)throw new Error(c("data",l));if(o=r[e-l],!n)return o}let s=o,a=n.split("/");for(let u of a)u&&(o=(0,U._)`${o}${(0,U.getProperty)((0,Or.unescapeJsonPointer)(u))}`,s=(0,U._)`${s} && ${o}`);return s;function c(u,l){return`Cannot access ${u} ${l} levels up, current level is ${e}`}}Vr.getData=pk});var ls=$(sh=>{"use strict";Object.defineProperty(sh,"__esModule",{value:!0});var oh=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};sh.default=oh});var bi=$(uh=>{"use strict";Object.defineProperty(uh,"__esModule",{value:!0});var ah=as(),ch=class extends Error{constructor(e,r,i,n){super(n||`can't resolve reference ${i} from id ${r}`),this.missingRef=(0,ah.resolveUrl)(e,r,i),this.missingSchema=(0,ah.normalizeId)((0,ah.getFullPath)(e,this.missingRef))}};uh.default=ch});var ds=$(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.resolveSchema=Pt.getCompilingSchema=Pt.resolveRef=Pt.compileSchema=Pt.SchemaEnv=void 0;var Zt=H(),N1=ls(),An=Nt(),Ft=as(),mk=te(),z1=vi(),_i=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let i;typeof e.schema=="object"&&(i=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,Ft.normalizeId)(i?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=i?.$async,this.refs={}}};Pt.SchemaEnv=_i;function dh(t){let e=hk.call(this,t);if(e)return e;let r=(0,Ft.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:i,lines:n}=this.opts.code,{ownProperties:o}=this.opts,s=new Zt.CodeGen(this.scope,{es5:i,lines:n,ownProperties:o}),a;t.$async&&(a=s.scopeValue("Error",{ref:N1.default,code:(0,Zt._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");t.validateName=c;let u={gen:s,allErrors:this.opts.allErrors,data:An.default.data,parentData:An.default.parentData,parentDataProperty:An.default.parentDataProperty,dataNames:[An.default.data],dataPathArr:[Zt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,Zt.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:Zt.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Zt._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(t),(0,z1.validateFunctionCode)(u),s.optimize(this.opts.code.optimize);let d=s.toString();l=`${s.scopeRefs(An.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,t));let h=new Function(`${An.default.self}`,`${An.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:h}),h.errors=null,h.schema=t.schema,h.schemaEnv=t,t.$async&&(h.$async=!0),this.opts.code.source===!0&&(h.source={validateName:c,validateCode:d,scopeValues:s._values}),this.opts.unevaluated){let{props:f,items:p}=u;h.evaluated={props:f instanceof Zt.Name?void 0:f,items:p instanceof Zt.Name?void 0:p,dynamicProps:f instanceof Zt.Name,dynamicItems:p instanceof Zt.Name},h.source&&(h.source.evaluated=(0,Zt.stringify)(h.evaluated))}return t.validate=h,t}catch(d){throw delete t.validate,delete t.validateName,l&&this.logger.error("Error compiling schema, function code:",l),d}finally{this._compilations.delete(t)}}Pt.compileSchema=dh;function P1(t,e,r){var i;r=(0,Ft.resolveUrl)(this.opts.uriResolver,e,r);let n=t.refs[r];if(n)return n;let o=A1.call(this,t,r);if(o===void 0){let s=(i=t.localRefs)===null||i===void 0?void 0:i[r],{schemaId:a}=this.opts;s&&(o=new _i({schema:s,schemaId:a,root:t,baseId:e}))}if(o!==void 0)return t.refs[r]=T1.call(this,o)}Pt.resolveRef=P1;function T1(t){return(0,Ft.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:dh.call(this,t)}function hk(t){for(let e of this._compilations)if(j1(e,t))return e}Pt.getCompilingSchema=hk;function j1(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function A1(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||Wc.call(this,t,e)}function Wc(t,e){let r=this.opts.uriResolver.parse(e),i=(0,Ft._getFullPath)(this.opts.uriResolver,r),n=(0,Ft.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&i===n)return lh.call(this,r,t);let o=(0,Ft.normalizeId)(i),s=this.refs[o]||this.schemas[o];if(typeof s=="string"){let a=Wc.call(this,t,s);return typeof a?.schema!="object"?void 0:lh.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||dh.call(this,s),o===(0,Ft.normalizeId)(e)){let{schema:a}=s,{schemaId:c}=this.opts,u=a[c];return u&&(n=(0,Ft.resolveUrl)(this.opts.uriResolver,n,u)),new _i({schema:a,schemaId:c,root:t,baseId:n})}return lh.call(this,r,s)}}Pt.resolveSchema=Wc;var C1=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function lh(t,{baseId:e,schema:r,root:i}){var n;if(((n=t.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(let a of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,mk.unescapeFragment)(a)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!C1.has(a)&&u&&(e=(0,Ft.resolveUrl)(this.opts.uriResolver,e,u))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,mk.schemaHasRulesButRef)(r,this.RULES)){let a=(0,Ft.resolveUrl)(this.opts.uriResolver,e,r.$ref);o=Wc.call(this,i,a)}let{schemaId:s}=this.opts;if(o=o||new _i({schema:r,schemaId:s,root:i,baseId:e}),o.schema!==o.root.schema)return o}});var gk=$((gB,R1)=>{R1.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 mh=$((yB,wk)=>{"use strict";var D1=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),vk=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),fh=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),bk=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),M1=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function ph(t){let e="",r=0,i=0;for(i=0;i<t.length;i++)if(r=t[i].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[i];break}for(i+=1;i<t.length;i++){if(r=t[i].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[i]}return e}var U1=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function yk(t){return t.length=0,!0}function L1(t,e,r){if(t.length){let i=ph(t);if(i!=="")e.push(i);else return r.error=!0,!1;t.length=0}return!0}function q1(t){let e=0,r={error:!1,address:"",zone:""},i=[],n=[],o=!1,s=!1,a=L1;for(let c=0;c<t.length;c++){let u=t[c];if(!(u==="["||u==="]"))if(u===":"){if(o===!0&&(s=!0),!a(n,i,r))break;if(++e>7){r.error=!0;break}c>0&&t[c-1]===":"&&(o=!0),i.push(":");continue}else if(u==="%"){if(!a(n,i,r))break;a=yk}else{n.push(u);continue}}return n.length&&(a===yk?r.zone=n.join(""):s?i.push(n.join("")):i.push(ph(n))),r.address=i.join(""),r}function _k(t){if(Z1(t,":")<2)return{host:t,isIPV6:!1};let e=q1(t);if(e.error)return{host:t,isIPV6:!1};{let r=e.address,i=e.address;return e.zone&&(r+="%"+e.zone,i+="%25"+e.zone),{host:r,isIPV6:!0,escapedHost:i}}}function Z1(t,e){let r=0;for(let i=0;i<t.length;i++)t[i]===e&&r++;return r}function F1(t){let e=t,r=[],i=-1,n=0;for(;n=e.length;){if(n===1){if(e===".")break;if(e==="/"){r.push("/");break}else{r.push(e);break}}else if(n===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){r.push("/");break}}else if(n===3&&e==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(e[0]==="."){if(e[1]==="."){if(e[2]==="/"){e=e.slice(3);continue}}else if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){if(e[2]==="/"){e=e.slice(2);continue}else if(e[2]==="."&&e[3]==="/"){e=e.slice(3),r.length!==0&&r.pop();continue}}if((i=e.indexOf("/",1))===-1){r.push(e);break}else r.push(e.slice(0,i)),e=e.slice(i)}return r.join("")}var V1={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},J1=/[@/?#:]/g,B1=/[@/?#]/g;function $k(t,e){let r=e?B1:J1;return r.lastIndex=0,t.replace(r,i=>V1[i])}function K1(t,e=!1){if(t.indexOf("%")===-1)return t;let r="";for(let i=0;i<t.length;i++){if(t[i]==="%"&&i+2<t.length){let n=t.slice(i+1,i+3);if(fh(n)){let o=n.toUpperCase(),s=String.fromCharCode(parseInt(o,16));e&&bk(s)?r+=s:r+="%"+o,i+=2;continue}}r+=t[i]}return r}function H1(t){let e="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let i=t.slice(r+1,r+3);if(fh(i)){let n=i.toUpperCase(),o=String.fromCharCode(parseInt(n,16));o!=="."&&bk(o)?e+=o:e+="%"+n,r+=2;continue}}M1(t[r])?e+=t[r]:e+=escape(t[r])}return e}function W1(t){let e="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let i=t.slice(r+1,r+3);if(fh(i)){e+="%"+i.toUpperCase(),r+=2;continue}}e+=escape(t[r])}return e}function G1(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!vk(r)){let i=_k(r);i.isIPV6===!0?r=`[${i.escapedHost}]`:r=$k(r,!1)}e.push(r)}return(typeof t.port=="number"||typeof t.port=="string")&&(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0}wk.exports={nonSimpleDomain:U1,recomposeAuthority:G1,reescapeHostDelimiters:$k,normalizePercentEncoding:K1,normalizePathEncoding:H1,escapePreservingEscapes:W1,removeDotSegments:F1,isIPv4:vk,isUUID:D1,normalizeIPv6:_k,stringArrayToHexStripped:ph}});var Ek=$((vB,Ik)=>{"use strict";var{isUUID:Y1}=mh(),X1=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,Q1=["http","https","ws","wss","urn","urn:uuid"];function ej(t){return Q1.indexOf(t)!==-1}function hh(t){return t.secure===!0?!0:t.secure===!1?!1:t.scheme?t.scheme.length===3&&(t.scheme[0]==="w"||t.scheme[0]==="W")&&(t.scheme[1]==="s"||t.scheme[1]==="S")&&(t.scheme[2]==="s"||t.scheme[2]==="S"):!1}function kk(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function Sk(t){let e=String(t.scheme).toLowerCase()==="https";return(t.port===(e?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}function tj(t){return t.secure=hh(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function rj(t){if((t.port===(hh(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let[e,r]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=r,t.resourceName=void 0}return t.fragment=void 0,t}function nj(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(X1);if(r){let i=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let n=`${i}:${e.nid||t.nid}`,o=gh(n);t.path=void 0,o&&(t=o.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function ij(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=e.scheme||t.scheme||"urn",i=t.nid.toLowerCase(),n=`${r}:${e.nid||i}`,o=gh(n);o&&(t=o.serialize(t,e));let s=t,a=t.nss;return s.path=`${i||e.nid}:${a}`,e.skipEscape=!0,s}function oj(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!Y1(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function sj(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var xk={scheme:"http",domainHost:!0,parse:kk,serialize:Sk},aj={scheme:"https",domainHost:xk.domainHost,parse:kk,serialize:Sk},Gc={scheme:"ws",domainHost:!0,parse:tj,serialize:rj},cj={scheme:"wss",domainHost:Gc.domainHost,parse:Gc.parse,serialize:Gc.serialize},uj={scheme:"urn",parse:nj,serialize:ij,skipNormalize:!0},lj={scheme:"urn:uuid",parse:oj,serialize:sj,skipNormalize:!0},Yc={http:xk,https:aj,ws:Gc,wss:cj,urn:uj,"urn:uuid":lj};Object.setPrototypeOf(Yc,null);function gh(t){return t&&(Yc[t]||Yc[t.toLowerCase()])||void 0}Ik.exports={wsIsSecure:hh,SCHEMES:Yc,isValidSchemeName:ej,getSchemeHandler:gh}});var jk=$((bB,Xc)=>{"use strict";var{normalizeIPv6:dj,removeDotSegments:fs,recomposeAuthority:fj,normalizePercentEncoding:pj,normalizePathEncoding:mj,escapePreservingEscapes:hj,reescapeHostDelimiters:gj,isIPv4:yj,nonSimpleDomain:vj}=mh(),{SCHEMES:bj,getSchemeHandler:Nk}=Ek();function _j(t,e){return typeof t=="string"?t=Ij(t,e):typeof t=="object"&&(t=$i(Cn(t,e),e)),t}function $j(t,e,r){let i=r?Object.assign({scheme:"null"},r):{scheme:"null"},n=zk($i(t,i),$i(e,i),i,!0);return i.skipEscape=!0,Cn(n,i)}function zk(t,e,r,i){let n={};return i||(t=$i(Cn(t,r),r),e=$i(Cn(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(n.scheme=e.scheme,n.userinfo=e.userinfo,n.host=e.host,n.port=e.port,n.path=fs(e.path||""),n.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(n.userinfo=e.userinfo,n.host=e.host,n.port=e.port,n.path=fs(e.path||""),n.query=e.query):(e.path?(e.path[0]==="/"?n.path=fs(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?n.path="/"+e.path:t.path?n.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:n.path=e.path,n.path=fs(n.path)),n.query=e.query):(n.path=t.path,e.query!==void 0?n.query=e.query:n.query=t.query),n.userinfo=t.userinfo,n.host=t.host,n.port=t.port),n.scheme=t.scheme),n.fragment=e.fragment,n}function wj(t,e,r){let i=Ok(t,r),n=Ok(e,r);return i!==void 0&&n!==void 0&&i.toLowerCase()===n.toLowerCase()}function Cn(t,e){let r={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},i=Object.assign({},e),n=[],o=Nk(i.scheme||r.scheme);o&&o.serialize&&o.serialize(r,i),r.path!==void 0&&(i.skipEscape?r.path=pj(r.path):(r.path=hj(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),i.reference!=="suffix"&&r.scheme&&n.push(r.scheme,":");let s=fj(r);if(s!==void 0&&(i.reference!=="suffix"&&n.push("//"),n.push(s),r.path&&r.path[0]!=="/"&&n.push("/")),r.path!==void 0){let a=r.path;!i.absolutePath&&(!o||!o.absolutePath)&&(a=fs(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 kj=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,Sj=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/;function xj(t,e){if(e[2]!==void 0&&t.path&&t.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof t.port=="number"&&(t.port<0||t.port>65535))return"URI port is malformed."}function Pk(t,e){let r=Object.assign({},e),i={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},n=!1,o=!1;r.reference==="suffix"&&(r.scheme?t=r.scheme+":"+t:t="//"+t);let s=t.match(Sj);s!==null&&s[1].indexOf("\\")!==-1&&(i.error="URI authority must not contain a literal backslash.",n=!0);let a=t.match(kj);if(a){i.scheme=a[1],i.userinfo=a[3],i.host=a[4],i.port=parseInt(a[5],10),i.path=a[6]||"",i.query=a[7],i.fragment=a[8],isNaN(i.port)&&(i.port=a[5]);let c=xj(i,a);if(c!==void 0&&(i.error=i.error||c,n=!0),i.host)if(yj(i.host)===!1){let d=dj(i.host);i.host=d.host.toLowerCase(),o=d.isIPV6}else o=!0;i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path?i.reference="same-document":i.scheme===void 0?i.reference="relative":i.fragment===void 0?i.reference="absolute":i.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==i.reference&&(i.error=i.error||"URI is not a "+r.reference+" reference.");let u=Nk(r.scheme||i.scheme);if(!r.unicodeSupport&&(!u||!u.unicodeSupport)&&i.host&&(r.domainHost||u&&u.domainHost)&&o===!1&&vj(i.host))try{i.host=new URL("http://"+i.host).hostname}catch(l){i.error=i.error||"Host's domain name can not be converted to ASCII: "+l}if((!u||u&&!u.skipNormalize)&&(t.indexOf("%")!==-1&&(i.scheme!==void 0&&(i.scheme=unescape(i.scheme)),i.host!==void 0&&(i.host=gj(unescape(i.host),o))),i.path&&(i.path=mj(i.path)),i.fragment))try{i.fragment=encodeURI(decodeURIComponent(i.fragment))}catch{i.error=i.error||"URI malformed"}u&&u.parse&&u.parse(i,r)}else i.error=i.error||"URI can not be parsed.";return{parsed:i,malformedAuthorityOrPort:n}}function $i(t,e){return Pk(t,e).parsed}function Ij(t,e){return Tk(t,e).normalized}function Tk(t,e){let{parsed:r,malformedAuthorityOrPort:i}=Pk(t,e);return{normalized:i?t:Cn(r,e),malformedAuthorityOrPort:i}}function Ok(t,e){if(typeof t=="string"){let{normalized:r,malformedAuthorityOrPort:i}=Tk(t,e);return i?void 0:r}if(typeof t=="object")return Cn(t,e)}var yh={SCHEMES:bj,normalize:_j,resolve:$j,resolveComponent:zk,equal:wj,serialize:Cn,parse:$i};Xc.exports=yh;Xc.exports.default=yh;Xc.exports.fastUri=yh});var Ck=$(vh=>{"use strict";Object.defineProperty(vh,"__esModule",{value:!0});var Ak=jk();Ak.code='require("ajv/dist/runtime/uri").default';vh.default=Ak});var $h=$(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.CodeGen=Ve.Name=Ve.nil=Ve.stringify=Ve.str=Ve._=Ve.KeywordCxt=void 0;var Ej=vi();Object.defineProperty(Ve,"KeywordCxt",{enumerable:!0,get:function(){return Ej.KeywordCxt}});var wi=H();Object.defineProperty(Ve,"_",{enumerable:!0,get:function(){return wi._}});Object.defineProperty(Ve,"str",{enumerable:!0,get:function(){return wi.str}});Object.defineProperty(Ve,"stringify",{enumerable:!0,get:function(){return wi.stringify}});Object.defineProperty(Ve,"nil",{enumerable:!0,get:function(){return wi.nil}});Object.defineProperty(Ve,"Name",{enumerable:!0,get:function(){return wi.Name}});Object.defineProperty(Ve,"CodeGen",{enumerable:!0,get:function(){return wi.CodeGen}});var Oj=ls(),Lk=bi(),Nj=Bm(),ps=ds(),zj=H(),ms=as(),Qc=ss(),_h=te(),Rk=gk(),Pj=Ck(),qk=(t,e)=>new RegExp(t,e);qk.code="new RegExp";var Tj=["removeAdditional","useDefaults","coerceTypes"],jj=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Aj={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."},Cj={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Dk=200;function Rj(t){var e,r,i,n,o,s,a,c,u,l,d,m,h,f,p,g,v,y,b,w,x,T,q,P,ue;let Ue=t.strict,We=(e=t.code)===null||e===void 0?void 0:e.optimize,Pe=We===!0||We===void 0?1:We||0,br=(i=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&i!==void 0?i:qk,jp=(n=t.uriResolver)!==null&&n!==void 0?n:Pj.default;return{strictSchema:(s=(o=t.strictSchema)!==null&&o!==void 0?o:Ue)!==null&&s!==void 0?s:!0,strictNumbers:(c=(a=t.strictNumbers)!==null&&a!==void 0?a:Ue)!==null&&c!==void 0?c:!0,strictTypes:(l=(u=t.strictTypes)!==null&&u!==void 0?u:Ue)!==null&&l!==void 0?l:"log",strictTuples:(m=(d=t.strictTuples)!==null&&d!==void 0?d:Ue)!==null&&m!==void 0?m:"log",strictRequired:(f=(h=t.strictRequired)!==null&&h!==void 0?h:Ue)!==null&&f!==void 0?f:!1,code:t.code?{...t.code,optimize:Pe,regExp:br}:{optimize:Pe,regExp:br},loopRequired:(p=t.loopRequired)!==null&&p!==void 0?p:Dk,loopEnum:(g=t.loopEnum)!==null&&g!==void 0?g:Dk,meta:(v=t.meta)!==null&&v!==void 0?v:!0,messages:(y=t.messages)!==null&&y!==void 0?y:!0,inlineRefs:(b=t.inlineRefs)!==null&&b!==void 0?b:!0,schemaId:(w=t.schemaId)!==null&&w!==void 0?w:"$id",addUsedSchema:(x=t.addUsedSchema)!==null&&x!==void 0?x:!0,validateSchema:(T=t.validateSchema)!==null&&T!==void 0?T:!0,validateFormats:(q=t.validateFormats)!==null&&q!==void 0?q:!0,unicodeRegExp:(P=t.unicodeRegExp)!==null&&P!==void 0?P:!0,int32range:(ue=t.int32range)!==null&&ue!==void 0?ue:!0,uriResolver:jp}}var hs=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...Rj(e)};let{es5:r,lines:i}=this.opts.code;this.scope=new zj.ValueScope({scope:{},prefixes:jj,es5:r,lines:i}),this.logger=Zj(e.logger);let n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,Nj.getRules)(),Mk.call(this,Aj,e,"NOT SUPPORTED"),Mk.call(this,Cj,e,"DEPRECATED","warn"),this._metaOpts=Lj.call(this),e.formats&&Mj.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&Uj.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),Dj.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:i}=this.opts,n=Rk;i==="id"&&(n={...Rk},n.id=n.$id,delete n.$id),r&&e&&this.addMetaSchema(n,n[i],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let i;if(typeof e=="string"){if(i=this.getSchema(e),!i)throw new Error(`no schema with key or ref "${e}"`)}else i=this.compile(e);let n=i(r);return"$async"in i||(this.errors=i.errors),n}compile(e,r){let i=this._addSchema(e,r);return i.validate||this._compileSchemaEnv(i)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:i}=this.opts;return n.call(this,e,r);async function n(l,d){await o.call(this,l.$schema);let m=this._addSchema(l,d);return m.validate||s.call(this,m)}async function o(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 Lk.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 o.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]=i(l))}finally{delete this._loading[l]}}}addSchema(e,r,i,n=this.opts.validateSchema){if(Array.isArray(e)){for(let s of e)this.addSchema(s,void 0,i,n);return this}let o;if(typeof e=="object"){let{schemaId:s}=this.opts;if(o=e[s],o!==void 0&&typeof o!="string")throw new Error(`schema ${s} must be string`)}return r=(0,ms.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(e,i,r,n,!0),this}addMetaSchema(e,r,i=this.opts.validateSchema){return this.addSchema(e,r,!0,i),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let i;if(i=e.$schema,i!==void 0&&typeof i!="string")throw new Error("$schema must be a string");if(i=i||this.opts.defaultMeta||this.defaultMeta(),!i)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let n=this.validate(i,e);if(!n&&r){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return n}getSchema(e){let r;for(;typeof(r=Uk.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:i}=this.opts,n=new ps.SchemaEnv({schema:{},schemaId:i});if(r=ps.resolveSchema.call(this,n,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=Uk.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let i=e[this.opts.schemaId];return i&&(i=(0,ms.normalizeId)(i),delete this.schemas[i],delete this.refs[i]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let i;if(typeof e=="string")i=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=i);else if(typeof e=="object"&&r===void 0){if(r=e,i=r.keyword,Array.isArray(i)&&!i.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Vj.call(this,i,r),!r)return(0,_h.eachItem)(i,o=>bh.call(this,o)),this;Bj.call(this,r);let n={...r,type:(0,Qc.getJSONTypes)(r.type),schemaType:(0,Qc.getJSONTypes)(r.schemaType)};return(0,_h.eachItem)(i,n.type.length===0?o=>bh.call(this,o,n):o=>n.type.forEach(s=>bh.call(this,o,n,s))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let i of r.rules){let n=i.rules.findIndex(o=>o.keyword===e);n>=0&&i.rules.splice(n,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:i="data"}={}){return!e||e.length===0?"No errors":e.map(n=>`${i}${n.instancePath} ${n.message}`).reduce((n,o)=>n+r+o)}$dataMetaSchema(e,r){let i=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let n of r){let o=n.split("/").slice(1),s=e;for(let a of o)s=s[a];for(let a in i){let c=i[a];if(typeof c!="object")continue;let{$data:u}=c.definition,l=s[a];u&&l&&(s[a]=Zk(l))}}return e}_removeAllSchemas(e,r){for(let i in e){let n=e[i];(!r||r.test(i))&&(typeof n=="string"?delete e[i]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[i]))}}_addSchema(e,r,i,n=this.opts.validateSchema,o=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof e=="object")s=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(e);if(c!==void 0)return c;i=(0,ms.normalizeId)(s||i);let u=ms.getSchemaRefs.call(this,e,i);return c=new ps.SchemaEnv({schema:e,schemaId:a,meta:r,baseId:i,localRefs:u}),this._cache.set(c.schema,c),o&&!i.startsWith("#")&&(i&&this._checkUnique(i),this.refs[i]=c),n&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):ps.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{ps.compileSchema.call(this,e)}finally{this.opts=r}}};hs.ValidationError=Oj.default;hs.MissingRefError=Lk.default;Ve.default=hs;function Mk(t,e,r,i="error"){for(let n in t){let o=n;o in e&&this.logger[i](`${r}: option ${n}. ${t[o]}`)}}function Uk(t){return t=(0,ms.normalizeId)(t),this.schemas[t]||this.refs[t]}function Dj(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e)}function Mj(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function Uj(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function Lj(){let t={...this.opts};for(let e of Tj)delete t[e];return t}var qj={log(){},warn(){},error(){}};function Zj(t){if(t===!1)return qj;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}var Fj=/^[a-z_$][a-z0-9_$:-]*$/i;function Vj(t,e){let{RULES:r}=this;if((0,_h.eachItem)(t,i=>{if(r.keywords[i])throw new Error(`Keyword ${i} is already defined`);if(!Fj.test(i))throw new Error(`Keyword ${i} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function bh(t,e,r){var i;let n=e?.post;if(r&&n)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,s=n?o.post:o.rules.find(({type:c})=>c===r);if(s||(s={type:r,rules:[]},o.rules.push(s)),o.keywords[t]=!0,!e)return;let a={keyword:t,definition:{...e,type:(0,Qc.getJSONTypes)(e.type),schemaType:(0,Qc.getJSONTypes)(e.schemaType)}};e.before?Jj.call(this,s,a,e.before):s.rules.push(a),o.all[t]=a,(i=e.implements)===null||i===void 0||i.forEach(c=>this.addKeyword(c))}function Jj(t,e,r){let i=t.rules.findIndex(n=>n.keyword===r);i>=0?t.rules.splice(i,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function Bj(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=Zk(e)),t.validateSchema=this.compile(e,!0))}var Kj={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Zk(t){return{anyOf:[t,Kj]}}});var Fk=$(wh=>{"use strict";Object.defineProperty(wh,"__esModule",{value:!0});var Hj={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};wh.default=Hj});var ru=$(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.callRef=Rn.getValidate=void 0;var Wj=bi(),Vk=zt(),lt=H(),ki=Nt(),Jk=ds(),eu=te(),Gj={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:i}=t,{baseId:n,schemaEnv:o,validateName:s,opts:a,self:c}=i,{root:u}=o;if((r==="#"||r==="#/")&&n===u.baseId)return d();let l=Jk.resolveRef.call(c,u,n,r);if(l===void 0)throw new Wj.default(i.opts.uriResolver,n,r);if(l instanceof Jk.SchemaEnv)return m(l);return h(l);function d(){if(o===u)return tu(t,s,o,o.$async);let f=e.scopeValue("root",{ref:u});return tu(t,(0,lt._)`${f}.validate`,u,u.$async)}function m(f){let p=Bk(t,f);tu(t,p,f,f.$async)}function h(f){let p=e.scopeValue("schema",a.code.source===!0?{ref:f,code:(0,lt.stringify)(f)}:{ref:f}),g=e.name("valid"),v=t.subschema({schema:f,dataTypes:[],schemaPath:lt.nil,topSchemaRef:p,errSchemaPath:r},g);t.mergeEvaluated(v),t.ok(g)}}};function Bk(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,lt._)`${r.scopeValue("wrapper",{ref:e})}.validate`}Rn.getValidate=Bk;function tu(t,e,r,i){let{gen:n,it:o}=t,{allErrors:s,schemaEnv:a,opts:c}=o,u=c.passContext?ki.default.this:lt.nil;i?l():d();function l(){if(!a.$async)throw new Error("async schema referenced by sync schema");let f=n.let("valid");n.try(()=>{n.code((0,lt._)`await ${(0,Vk.callValidateCode)(t,e,u)}`),h(e),s||n.assign(f,!0)},p=>{n.if((0,lt._)`!(${p} instanceof ${o.ValidationError})`,()=>n.throw(p)),m(p),s||n.assign(f,!1)}),t.ok(f)}function d(){t.result((0,Vk.callValidateCode)(t,e,u),()=>h(e),()=>m(e))}function m(f){let p=(0,lt._)`${f}.errors`;n.assign(ki.default.vErrors,(0,lt._)`${ki.default.vErrors} === null ? ${p} : ${ki.default.vErrors}.concat(${p})`),n.assign(ki.default.errors,(0,lt._)`${ki.default.vErrors}.length`)}function h(f){var p;if(!o.opts.unevaluated)return;let g=(p=r?.validate)===null||p===void 0?void 0:p.evaluated;if(o.props!==!0)if(g&&!g.dynamicProps)g.props!==void 0&&(o.props=eu.mergeEvaluated.props(n,g.props,o.props));else{let v=n.var("props",(0,lt._)`${f}.evaluated.props`);o.props=eu.mergeEvaluated.props(n,v,o.props,lt.Name)}if(o.items!==!0)if(g&&!g.dynamicItems)g.items!==void 0&&(o.items=eu.mergeEvaluated.items(n,g.items,o.items));else{let v=n.var("items",(0,lt._)`${f}.evaluated.items`);o.items=eu.mergeEvaluated.items(n,v,o.items,lt.Name)}}}Rn.callRef=tu;Rn.default=Gj});var Sh=$(kh=>{"use strict";Object.defineProperty(kh,"__esModule",{value:!0});var Yj=Fk(),Xj=ru(),Qj=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Yj.default,Xj.default];kh.default=Qj});var Kk=$(xh=>{"use strict";Object.defineProperty(xh,"__esModule",{value:!0});var nu=H(),Jr=nu.operators,iu={maximum:{okStr:"<=",ok:Jr.LTE,fail:Jr.GT},minimum:{okStr:">=",ok:Jr.GTE,fail:Jr.LT},exclusiveMaximum:{okStr:"<",ok:Jr.LT,fail:Jr.GTE},exclusiveMinimum:{okStr:">",ok:Jr.GT,fail:Jr.LTE}},eA={message:({keyword:t,schemaCode:e})=>(0,nu.str)`must be ${iu[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,nu._)`{comparison: ${iu[t].okStr}, limit: ${e}}`},tA={keyword:Object.keys(iu),type:"number",schemaType:"number",$data:!0,error:eA,code(t){let{keyword:e,data:r,schemaCode:i}=t;t.fail$data((0,nu._)`${r} ${iu[e].fail} ${i} || isNaN(${r})`)}};xh.default=tA});var Hk=$(Ih=>{"use strict";Object.defineProperty(Ih,"__esModule",{value:!0});var gs=H(),rA={message:({schemaCode:t})=>(0,gs.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,gs._)`{multipleOf: ${t}}`},nA={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:rA,code(t){let{gen:e,data:r,schemaCode:i,it:n}=t,o=n.opts.multipleOfPrecision,s=e.let("res"),a=o?(0,gs._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,gs._)`${s} !== parseInt(${s})`;t.fail$data((0,gs._)`(${i} === 0 || (${s} = ${r}/${i}, ${a}))`)}};Ih.default=nA});var Gk=$(Eh=>{"use strict";Object.defineProperty(Eh,"__esModule",{value:!0});function Wk(t){let e=t.length,r=0,i=0,n;for(;i<e;)r++,n=t.charCodeAt(i++),n>=55296&&n<=56319&&i<e&&(n=t.charCodeAt(i),(n&64512)===56320&&i++);return r}Eh.default=Wk;Wk.code='require("ajv/dist/runtime/ucs2length").default'});var Yk=$(Oh=>{"use strict";Object.defineProperty(Oh,"__esModule",{value:!0});var Dn=H(),iA=te(),oA=Gk(),sA={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,Dn.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,Dn._)`{limit: ${t}}`},aA={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:sA,code(t){let{keyword:e,data:r,schemaCode:i,it:n}=t,o=e==="maxLength"?Dn.operators.GT:Dn.operators.LT,s=n.opts.unicode===!1?(0,Dn._)`${r}.length`:(0,Dn._)`${(0,iA.useFunc)(t.gen,oA.default)}(${r})`;t.fail$data((0,Dn._)`${s} ${o} ${i}`)}};Oh.default=aA});var Xk=$(Nh=>{"use strict";Object.defineProperty(Nh,"__esModule",{value:!0});var cA=zt(),uA=te(),Si=H(),lA={message:({schemaCode:t})=>(0,Si.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,Si._)`{pattern: ${t}}`},dA={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:lA,code(t){let{gen:e,data:r,$data:i,schema:n,schemaCode:o,it:s}=t,a=s.opts.unicodeRegExp?"u":"";if(i){let{regExp:c}=s.opts.code,u=c.code==="new RegExp"?(0,Si._)`new RegExp`:(0,uA.useFunc)(e,c),l=e.let("valid");e.try(()=>e.assign(l,(0,Si._)`${u}(${o}, ${a}).test(${r})`),()=>e.assign(l,!1)),t.fail$data((0,Si._)`!${l}`)}else{let c=(0,cA.usePattern)(t,n);t.fail$data((0,Si._)`!${c}.test(${r})`)}}};Nh.default=dA});var Qk=$(zh=>{"use strict";Object.defineProperty(zh,"__esModule",{value:!0});var ys=H(),fA={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,ys.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,ys._)`{limit: ${t}}`},pA={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:fA,code(t){let{keyword:e,data:r,schemaCode:i}=t,n=e==="maxProperties"?ys.operators.GT:ys.operators.LT;t.fail$data((0,ys._)`Object.keys(${r}).length ${n} ${i}`)}};zh.default=pA});var eS=$(Ph=>{"use strict";Object.defineProperty(Ph,"__esModule",{value:!0});var vs=zt(),bs=H(),mA=te(),hA={message:({params:{missingProperty:t}})=>(0,bs.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,bs._)`{missingProperty: ${t}}`},gA={keyword:"required",type:"object",schemaType:"array",$data:!0,error:hA,code(t){let{gen:e,schema:r,schemaCode:i,data:n,$data:o,it:s}=t,{opts:a}=s;if(!o&&r.length===0)return;let c=r.length>=a.loopRequired;if(s.allErrors?u():l(),a.strictRequired){let h=t.parentSchema.properties,{definedProperties:f}=t.it;for(let p of r)if(h?.[p]===void 0&&!f.has(p)){let g=s.schemaEnv.baseId+s.errSchemaPath,v=`required property "${p}" is not defined at "${g}" (strictRequired)`;(0,mA.checkStrictMode)(s,v,s.opts.strictRequired)}}function u(){if(c||o)t.block$data(bs.nil,d);else for(let h of r)(0,vs.checkReportMissingProp)(t,h)}function l(){let h=e.let("missing");if(c||o){let f=e.let("valid",!0);t.block$data(f,()=>m(h,f)),t.ok(f)}else e.if((0,vs.checkMissingProp)(t,r,h)),(0,vs.reportMissingProp)(t,h),e.else()}function d(){e.forOf("prop",i,h=>{t.setParams({missingProperty:h}),e.if((0,vs.noPropertyInData)(e,n,h,a.ownProperties),()=>t.error())})}function m(h,f){t.setParams({missingProperty:h}),e.forOf(h,i,()=>{e.assign(f,(0,vs.propertyInData)(e,n,h,a.ownProperties)),e.if((0,bs.not)(f),()=>{t.error(),e.break()})},bs.nil)}}};Ph.default=gA});var tS=$(Th=>{"use strict";Object.defineProperty(Th,"__esModule",{value:!0});var _s=H(),yA={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,_s.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,_s._)`{limit: ${t}}`},vA={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:yA,code(t){let{keyword:e,data:r,schemaCode:i}=t,n=e==="maxItems"?_s.operators.GT:_s.operators.LT;t.fail$data((0,_s._)`${r}.length ${n} ${i}`)}};Th.default=vA});var ou=$(jh=>{"use strict";Object.defineProperty(jh,"__esModule",{value:!0});var rS=eh();rS.code='require("ajv/dist/runtime/equal").default';jh.default=rS});var nS=$(Ch=>{"use strict";Object.defineProperty(Ch,"__esModule",{value:!0});var Ah=ss(),Je=H(),bA=te(),_A=ou(),$A={message:({params:{i:t,j:e}})=>(0,Je.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Je._)`{i: ${t}, j: ${e}}`},wA={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:$A,code(t){let{gen:e,data:r,$data:i,schema:n,parentSchema:o,schemaCode:s,it:a}=t;if(!i&&!n)return;let c=e.let("valid"),u=o.items?(0,Ah.getSchemaTypes)(o.items):[];t.block$data(c,l,(0,Je._)`${s} === false`),t.ok(c);function l(){let f=e.let("i",(0,Je._)`${r}.length`),p=e.let("j");t.setParams({i:f,j:p}),e.assign(c,!0),e.if((0,Je._)`${f} > 1`,()=>(d()?m:h)(f,p))}function d(){return u.length>0&&!u.some(f=>f==="object"||f==="array")}function m(f,p){let g=e.name("item"),v=(0,Ah.checkDataTypes)(u,g,a.opts.strictNumbers,Ah.DataType.Wrong),y=e.const("indices",(0,Je._)`{}`);e.for((0,Je._)`;${f}--;`,()=>{e.let(g,(0,Je._)`${r}[${f}]`),e.if(v,(0,Je._)`continue`),u.length>1&&e.if((0,Je._)`typeof ${g} == "string"`,(0,Je._)`${g} += "_"`),e.if((0,Je._)`typeof ${y}[${g}] == "number"`,()=>{e.assign(p,(0,Je._)`${y}[${g}]`),t.error(),e.assign(c,!1).break()}).code((0,Je._)`${y}[${g}] = ${f}`)})}function h(f,p){let g=(0,bA.useFunc)(e,_A.default),v=e.name("outer");e.label(v).for((0,Je._)`;${f}--;`,()=>e.for((0,Je._)`${p} = ${f}; ${p}--;`,()=>e.if((0,Je._)`${g}(${r}[${f}], ${r}[${p}])`,()=>{t.error(),e.assign(c,!1).break(v)})))}}};Ch.default=wA});var iS=$(Dh=>{"use strict";Object.defineProperty(Dh,"__esModule",{value:!0});var Rh=H(),kA=te(),SA=ou(),xA={message:"must be equal to constant",params:({schemaCode:t})=>(0,Rh._)`{allowedValue: ${t}}`},IA={keyword:"const",$data:!0,error:xA,code(t){let{gen:e,data:r,$data:i,schemaCode:n,schema:o}=t;i||o&&typeof o=="object"?t.fail$data((0,Rh._)`!${(0,kA.useFunc)(e,SA.default)}(${r}, ${n})`):t.fail((0,Rh._)`${o} !== ${r}`)}};Dh.default=IA});var oS=$(Mh=>{"use strict";Object.defineProperty(Mh,"__esModule",{value:!0});var $s=H(),EA=te(),OA=ou(),NA={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,$s._)`{allowedValues: ${t}}`},zA={keyword:"enum",schemaType:"array",$data:!0,error:NA,code(t){let{gen:e,data:r,$data:i,schema:n,schemaCode:o,it:s}=t;if(!i&&n.length===0)throw new Error("enum must have non-empty array");let a=n.length>=s.opts.loopEnum,c,u=()=>c??(c=(0,EA.useFunc)(e,OA.default)),l;if(a||i)l=e.let("valid"),t.block$data(l,d);else{if(!Array.isArray(n))throw new Error("ajv implementation error");let h=e.const("vSchema",o);l=(0,$s.or)(...n.map((f,p)=>m(h,p)))}t.pass(l);function d(){e.assign(l,!1),e.forOf("v",o,h=>e.if((0,$s._)`${u()}(${r}, ${h})`,()=>e.assign(l,!0).break()))}function m(h,f){let p=n[f];return typeof p=="object"&&p!==null?(0,$s._)`${u()}(${r}, ${h}[${f}])`:(0,$s._)`${r} === ${p}`}}};Mh.default=zA});var Lh=$(Uh=>{"use strict";Object.defineProperty(Uh,"__esModule",{value:!0});var PA=Kk(),TA=Hk(),jA=Yk(),AA=Xk(),CA=Qk(),RA=eS(),DA=tS(),MA=nS(),UA=iS(),LA=oS(),qA=[PA.default,TA.default,jA.default,AA.default,CA.default,RA.default,DA.default,MA.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},UA.default,LA.default];Uh.default=qA});var Zh=$(ws=>{"use strict";Object.defineProperty(ws,"__esModule",{value:!0});ws.validateAdditionalItems=void 0;var Mn=H(),qh=te(),ZA={message:({params:{len:t}})=>(0,Mn.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Mn._)`{limit: ${t}}`},FA={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:ZA,code(t){let{parentSchema:e,it:r}=t,{items:i}=e;if(!Array.isArray(i)){(0,qh.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}sS(t,i)}};function sS(t,e){let{gen:r,schema:i,data:n,keyword:o,it:s}=t;s.items=!0;let a=r.const("len",(0,Mn._)`${n}.length`);if(i===!1)t.setParams({len:e.length}),t.pass((0,Mn._)`${a} <= ${e.length}`);else if(typeof i=="object"&&!(0,qh.alwaysValidSchema)(s,i)){let u=r.var("valid",(0,Mn._)`${a} <= ${e.length}`);r.if((0,Mn.not)(u),()=>c(u)),t.ok(u)}function c(u){r.forRange("i",e.length,a,l=>{t.subschema({keyword:o,dataProp:l,dataPropType:qh.Type.Num},u),s.allErrors||r.if((0,Mn.not)(u),()=>r.break())})}}ws.validateAdditionalItems=sS;ws.default=FA});var Fh=$(ks=>{"use strict";Object.defineProperty(ks,"__esModule",{value:!0});ks.validateTuple=void 0;var aS=H(),su=te(),VA=zt(),JA={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return cS(t,"additionalItems",e);r.items=!0,!(0,su.alwaysValidSchema)(r,e)&&t.ok((0,VA.validateArray)(t))}};function cS(t,e,r=t.schema){let{gen:i,parentSchema:n,data:o,keyword:s,it:a}=t;l(n),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=su.mergeEvaluated.items(i,r.length,a.items));let c=i.name("valid"),u=i.const("len",(0,aS._)`${o}.length`);r.forEach((d,m)=>{(0,su.alwaysValidSchema)(a,d)||(i.if((0,aS._)`${u} > ${m}`,()=>t.subschema({keyword:s,schemaProp:m,dataProp:m},c)),t.ok(c))});function l(d){let{opts:m,errSchemaPath:h}=a,f=r.length,p=f===d.minItems&&(f===d.maxItems||d[e]===!1);if(m.strictTuples&&!p){let g=`"${s}" is ${f}-tuple, but minItems or maxItems/${e} are not specified or different at path "${h}"`;(0,su.checkStrictMode)(a,g,m.strictTuples)}}}ks.validateTuple=cS;ks.default=JA});var uS=$(Vh=>{"use strict";Object.defineProperty(Vh,"__esModule",{value:!0});var BA=Fh(),KA={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,BA.validateTuple)(t,"items")};Vh.default=KA});var dS=$(Jh=>{"use strict";Object.defineProperty(Jh,"__esModule",{value:!0});var lS=H(),HA=te(),WA=zt(),GA=Zh(),YA={message:({params:{len:t}})=>(0,lS.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,lS._)`{limit: ${t}}`},XA={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:YA,code(t){let{schema:e,parentSchema:r,it:i}=t,{prefixItems:n}=r;i.items=!0,!(0,HA.alwaysValidSchema)(i,e)&&(n?(0,GA.validateAdditionalItems)(t,n):t.ok((0,WA.validateArray)(t)))}};Jh.default=XA});var fS=$(Bh=>{"use strict";Object.defineProperty(Bh,"__esModule",{value:!0});var Tt=H(),au=te(),QA={message:({params:{min:t,max:e}})=>e===void 0?(0,Tt.str)`must contain at least ${t} valid item(s)`:(0,Tt.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,Tt._)`{minContains: ${t}}`:(0,Tt._)`{minContains: ${t}, maxContains: ${e}}`},eC={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:QA,code(t){let{gen:e,schema:r,parentSchema:i,data:n,it:o}=t,s,a,{minContains:c,maxContains:u}=i;o.opts.next?(s=c===void 0?1:c,a=u):s=1;let l=e.const("len",(0,Tt._)`${n}.length`);if(t.setParams({min:s,max:a}),a===void 0&&s===0){(0,au.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,au.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,au.alwaysValidSchema)(o,r)){let p=(0,Tt._)`${l} >= ${s}`;a!==void 0&&(p=(0,Tt._)`${p} && ${l} <= ${a}`),t.pass(p);return}o.items=!0;let d=e.name("valid");a===void 0&&s===1?h(d,()=>e.if(d,()=>e.break())):s===0?(e.let(d,!0),a!==void 0&&e.if((0,Tt._)`${n}.length > 0`,m)):(e.let(d,!1),m()),t.result(d,()=>t.reset());function m(){let p=e.name("_valid"),g=e.let("count",0);h(p,()=>e.if(p,()=>f(g)))}function h(p,g){e.forRange("i",0,l,v=>{t.subschema({keyword:"contains",dataProp:v,dataPropType:au.Type.Num,compositeRule:!0},p),g()})}function f(p){e.code((0,Tt._)`${p}++`),a===void 0?e.if((0,Tt._)`${p} >= ${s}`,()=>e.assign(d,!0).break()):(e.if((0,Tt._)`${p} > ${a}`,()=>e.assign(d,!1).break()),s===1?e.assign(d,!0):e.if((0,Tt._)`${p} >= ${s}`,()=>e.assign(d,!0)))}}};Bh.default=eC});var cu=$(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.validateSchemaDeps=ir.validatePropertyDeps=ir.error=void 0;var Kh=H(),tC=te(),Ss=zt();ir.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let i=e===1?"property":"properties";return(0,Kh.str)`must have ${i} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:i}})=>(0,Kh._)`{property: ${t},
|
|
39
|
-
missingProperty: ${i},
|
|
40
|
-
depsCount: ${e},
|
|
41
|
-
deps: ${r}}`};var rC={keyword:"dependencies",type:"object",schemaType:"object",error:ir.error,code(t){let[e,r]=nC(t);pS(t,e),mS(t,r)}};function nC({schema:t}){let e={},r={};for(let i in t){if(i==="__proto__")continue;let n=Array.isArray(t[i])?e:r;n[i]=t[i]}return[e,r]}function pS(t,e=t.schema){let{gen:r,data:i,it:n}=t;if(Object.keys(e).length===0)return;let o=r.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let c=(0,Ss.propertyInData)(r,i,s,n.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),n.allErrors?r.if(c,()=>{for(let u of a)(0,Ss.checkReportMissingProp)(t,u)}):(r.if((0,Kh._)`${c} && (${(0,Ss.checkMissingProp)(t,a,o)})`),(0,Ss.reportMissingProp)(t,o),r.else())}}ir.validatePropertyDeps=pS;function mS(t,e=t.schema){let{gen:r,data:i,keyword:n,it:o}=t,s=r.name("valid");for(let a in e)(0,tC.alwaysValidSchema)(o,e[a])||(r.if((0,Ss.propertyInData)(r,i,a,o.opts.ownProperties),()=>{let c=t.subschema({keyword:n,schemaProp:a},s);t.mergeValidEvaluated(c,s)},()=>r.var(s,!0)),t.ok(s))}ir.validateSchemaDeps=mS;ir.default=rC});var gS=$(Hh=>{"use strict";Object.defineProperty(Hh,"__esModule",{value:!0});var hS=H(),iC=te(),oC={message:"property name must be valid",params:({params:t})=>(0,hS._)`{propertyName: ${t.propertyName}}`},sC={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:oC,code(t){let{gen:e,schema:r,data:i,it:n}=t;if((0,iC.alwaysValidSchema)(n,r))return;let o=e.name("valid");e.forIn("key",i,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},o),e.if((0,hS.not)(o),()=>{t.error(!0),n.allErrors||e.break()})}),t.ok(o)}};Hh.default=sC});var Gh=$(Wh=>{"use strict";Object.defineProperty(Wh,"__esModule",{value:!0});var uu=zt(),Vt=H(),aC=Nt(),lu=te(),cC={message:"must NOT have additional properties",params:({params:t})=>(0,Vt._)`{additionalProperty: ${t.additionalProperty}}`},uC={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:cC,code(t){let{gen:e,schema:r,parentSchema:i,data:n,errsCount:o,it:s}=t;if(!o)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=s;if(s.props=!0,c.removeAdditional!=="all"&&(0,lu.alwaysValidSchema)(s,r))return;let u=(0,uu.allSchemaProperties)(i.properties),l=(0,uu.allSchemaProperties)(i.patternProperties);d(),t.ok((0,Vt._)`${o} === ${aC.default.errors}`);function d(){e.forIn("key",n,g=>{!u.length&&!l.length?f(g):e.if(m(g),()=>f(g))})}function m(g){let v;if(u.length>8){let y=(0,lu.schemaRefOrVal)(s,i.properties,"properties");v=(0,uu.isOwnProperty)(e,y,g)}else u.length?v=(0,Vt.or)(...u.map(y=>(0,Vt._)`${g} === ${y}`)):v=Vt.nil;return l.length&&(v=(0,Vt.or)(v,...l.map(y=>(0,Vt._)`${(0,uu.usePattern)(t,y)}.test(${g})`))),(0,Vt.not)(v)}function h(g){e.code((0,Vt._)`delete ${n}[${g}]`)}function f(g){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){h(g);return}if(r===!1){t.setParams({additionalProperty:g}),t.error(),a||e.break();return}if(typeof r=="object"&&!(0,lu.alwaysValidSchema)(s,r)){let v=e.name("valid");c.removeAdditional==="failing"?(p(g,v,!1),e.if((0,Vt.not)(v),()=>{t.reset(),h(g)})):(p(g,v),a||e.if((0,Vt.not)(v),()=>e.break()))}}function p(g,v,y){let b={keyword:"additionalProperties",dataProp:g,dataPropType:lu.Type.Str};y===!1&&Object.assign(b,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(b,v)}}};Wh.default=uC});var bS=$(Xh=>{"use strict";Object.defineProperty(Xh,"__esModule",{value:!0});var lC=vi(),yS=zt(),Yh=te(),vS=Gh(),dC={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:i,data:n,it:o}=t;o.opts.removeAdditional==="all"&&i.additionalProperties===void 0&&vS.default.code(new lC.KeywordCxt(o,vS.default,"additionalProperties"));let s=(0,yS.allSchemaProperties)(r);for(let d of s)o.definedProperties.add(d);o.opts.unevaluated&&s.length&&o.props!==!0&&(o.props=Yh.mergeEvaluated.props(e,(0,Yh.toHash)(s),o.props));let a=s.filter(d=>!(0,Yh.alwaysValidSchema)(o,r[d]));if(a.length===0)return;let c=e.name("valid");for(let d of a)u(d)?l(d):(e.if((0,yS.propertyInData)(e,n,d,o.opts.ownProperties)),l(d),o.allErrors||e.else().var(c,!0),e.endIf()),t.it.definedProperties.add(d),t.ok(c);function u(d){return o.opts.useDefaults&&!o.compositeRule&&r[d].default!==void 0}function l(d){t.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};Xh.default=dC});var kS=$(Qh=>{"use strict";Object.defineProperty(Qh,"__esModule",{value:!0});var _S=zt(),du=H(),$S=te(),wS=te(),fC={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:i,parentSchema:n,it:o}=t,{opts:s}=o,a=(0,_S.allSchemaProperties)(r),c=a.filter(p=>(0,$S.alwaysValidSchema)(o,r[p]));if(a.length===0||c.length===a.length&&(!o.opts.unevaluated||o.props===!0))return;let u=s.strictSchema&&!s.allowMatchingProperties&&n.properties,l=e.name("valid");o.props!==!0&&!(o.props instanceof du.Name)&&(o.props=(0,wS.evaluatedPropsToName)(e,o.props));let{props:d}=o;m();function m(){for(let p of a)u&&h(p),o.allErrors?f(p):(e.var(l,!0),f(p),e.if(l))}function h(p){for(let g in u)new RegExp(p).test(g)&&(0,$S.checkStrictMode)(o,`property ${g} matches pattern ${p} (use allowMatchingProperties)`)}function f(p){e.forIn("key",i,g=>{e.if((0,du._)`${(0,_S.usePattern)(t,p)}.test(${g})`,()=>{let v=c.includes(p);v||t.subschema({keyword:"patternProperties",schemaProp:p,dataProp:g,dataPropType:wS.Type.Str},l),o.opts.unevaluated&&d!==!0?e.assign((0,du._)`${d}[${g}]`,!0):!v&&!o.allErrors&&e.if((0,du.not)(l),()=>e.break())})})}}};Qh.default=fC});var SS=$(eg=>{"use strict";Object.defineProperty(eg,"__esModule",{value:!0});var pC=te(),mC={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:i}=t;if((0,pC.alwaysValidSchema)(i,r)){t.fail();return}let n=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),t.failResult(n,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};eg.default=mC});var xS=$(tg=>{"use strict";Object.defineProperty(tg,"__esModule",{value:!0});var hC=zt(),gC={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:hC.validateUnion,error:{message:"must match a schema in anyOf"}};tg.default=gC});var IS=$(rg=>{"use strict";Object.defineProperty(rg,"__esModule",{value:!0});var fu=H(),yC=te(),vC={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,fu._)`{passingSchemas: ${t.passing}}`},bC={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:vC,code(t){let{gen:e,schema:r,parentSchema:i,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&i.discriminator)return;let o=r,s=e.let("valid",!1),a=e.let("passing",null),c=e.name("_valid");t.setParams({passing:a}),e.block(u),t.result(s,()=>t.reset(),()=>t.error(!0));function u(){o.forEach((l,d)=>{let m;(0,yC.alwaysValidSchema)(n,l)?e.var(c,!0):m=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&e.if((0,fu._)`${c} && ${s}`).assign(s,!1).assign(a,(0,fu._)`[${a}, ${d}]`).else(),e.if(c,()=>{e.assign(s,!0),e.assign(a,d),m&&t.mergeEvaluated(m,fu.Name)})})}}};rg.default=bC});var ES=$(ng=>{"use strict";Object.defineProperty(ng,"__esModule",{value:!0});var _C=te(),$C={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let n=e.name("valid");r.forEach((o,s)=>{if((0,_C.alwaysValidSchema)(i,o))return;let a=t.subschema({keyword:"allOf",schemaProp:s},n);t.ok(n),t.mergeEvaluated(a)})}};ng.default=$C});var zS=$(ig=>{"use strict";Object.defineProperty(ig,"__esModule",{value:!0});var pu=H(),NS=te(),wC={message:({params:t})=>(0,pu.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,pu._)`{failingKeyword: ${t.ifClause}}`},kC={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:wC,code(t){let{gen:e,parentSchema:r,it:i}=t;r.then===void 0&&r.else===void 0&&(0,NS.checkStrictMode)(i,'"if" without "then" and "else" is ignored');let n=OS(i,"then"),o=OS(i,"else");if(!n&&!o)return;let s=e.let("valid",!0),a=e.name("_valid");if(c(),t.reset(),n&&o){let l=e.let("ifClause");t.setParams({ifClause:l}),e.if(a,u("then",l),u("else",l))}else n?e.if(a,u("then")):e.if((0,pu.not)(a),u("else"));t.pass(s,()=>t.error(!0));function c(){let l=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);t.mergeEvaluated(l)}function u(l,d){return()=>{let m=t.subschema({keyword:l},a);e.assign(s,a),t.mergeValidEvaluated(m,s),d?e.assign(d,(0,pu._)`${l}`):t.setParams({ifClause:l})}}}};function OS(t,e){let r=t.schema[e];return r!==void 0&&!(0,NS.alwaysValidSchema)(t,r)}ig.default=kC});var PS=$(og=>{"use strict";Object.defineProperty(og,"__esModule",{value:!0});var SC=te(),xC={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,SC.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};og.default=xC});var ag=$(sg=>{"use strict";Object.defineProperty(sg,"__esModule",{value:!0});var IC=Zh(),EC=uS(),OC=Fh(),NC=dS(),zC=fS(),PC=cu(),TC=gS(),jC=Gh(),AC=bS(),CC=kS(),RC=SS(),DC=xS(),MC=IS(),UC=ES(),LC=zS(),qC=PS();function ZC(t=!1){let e=[RC.default,DC.default,MC.default,UC.default,LC.default,qC.default,TC.default,jC.default,PC.default,AC.default,CC.default];return t?e.push(EC.default,NC.default):e.push(IC.default,OC.default),e.push(zC.default),e}sg.default=ZC});var ug=$(xs=>{"use strict";Object.defineProperty(xs,"__esModule",{value:!0});xs.dynamicAnchor=void 0;var cg=H(),FC=Nt(),TS=ds(),VC=ru(),JC={keyword:"$dynamicAnchor",schemaType:"string",code:t=>jS(t,t.schema)};function jS(t,e){let{gen:r,it:i}=t;i.schemaEnv.root.dynamicAnchors[e]=!0;let n=(0,cg._)`${FC.default.dynamicAnchors}${(0,cg.getProperty)(e)}`,o=i.errSchemaPath==="#"?i.validateName:BC(t);r.if((0,cg._)`!${n}`,()=>r.assign(n,o))}xs.dynamicAnchor=jS;function BC(t){let{schemaEnv:e,schema:r,self:i}=t.it,{root:n,baseId:o,localRefs:s,meta:a}=e.root,{schemaId:c}=i.opts,u=new TS.SchemaEnv({schema:r,schemaId:c,root:n,baseId:o,localRefs:s,meta:a});return TS.compileSchema.call(i,u),(0,VC.getValidate)(t,u)}xs.default=JC});var lg=$(Is=>{"use strict";Object.defineProperty(Is,"__esModule",{value:!0});Is.dynamicRef=void 0;var AS=H(),KC=Nt(),CS=ru(),HC={keyword:"$dynamicRef",schemaType:"string",code:t=>RS(t,t.schema)};function RS(t,e){let{gen:r,keyword:i,it:n}=t;if(e[0]!=="#")throw new Error(`"${i}" only supports hash fragment reference`);let o=e.slice(1);if(n.allErrors)s();else{let c=r.let("valid",!1);s(c),t.ok(c)}function s(c){if(n.schemaEnv.root.dynamicAnchors[o]){let u=r.let("_v",(0,AS._)`${KC.default.dynamicAnchors}${(0,AS.getProperty)(o)}`);r.if(u,a(u,c),a(n.validateName,c))}else a(n.validateName,c)()}function a(c,u){return u?()=>r.block(()=>{(0,CS.callRef)(t,c),r.let(u,!0)}):()=>(0,CS.callRef)(t,c)}}Is.dynamicRef=RS;Is.default=HC});var DS=$(dg=>{"use strict";Object.defineProperty(dg,"__esModule",{value:!0});var WC=ug(),GC=te(),YC={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){t.schema?(0,WC.dynamicAnchor)(t,""):(0,GC.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};dg.default=YC});var MS=$(fg=>{"use strict";Object.defineProperty(fg,"__esModule",{value:!0});var XC=lg(),QC={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,XC.dynamicRef)(t,t.schema)};fg.default=QC});var US=$(pg=>{"use strict";Object.defineProperty(pg,"__esModule",{value:!0});var eR=ug(),tR=lg(),rR=DS(),nR=MS(),iR=[eR.default,tR.default,rR.default,nR.default];pg.default=iR});var qS=$(mg=>{"use strict";Object.defineProperty(mg,"__esModule",{value:!0});var LS=cu(),oR={keyword:"dependentRequired",type:"object",schemaType:"object",error:LS.error,code:t=>(0,LS.validatePropertyDeps)(t)};mg.default=oR});var ZS=$(hg=>{"use strict";Object.defineProperty(hg,"__esModule",{value:!0});var sR=cu(),aR={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,sR.validateSchemaDeps)(t)};hg.default=aR});var FS=$(gg=>{"use strict";Object.defineProperty(gg,"__esModule",{value:!0});var cR=te(),uR={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:e,it:r}){e.contains===void 0&&(0,cR.checkStrictMode)(r,`"${t}" without "contains" is ignored`)}};gg.default=uR});var VS=$(yg=>{"use strict";Object.defineProperty(yg,"__esModule",{value:!0});var lR=qS(),dR=ZS(),fR=FS(),pR=[lR.default,dR.default,fR.default];yg.default=pR});var BS=$(vg=>{"use strict";Object.defineProperty(vg,"__esModule",{value:!0});var Br=H(),JS=te(),mR=Nt(),hR={message:"must NOT have unevaluated properties",params:({params:t})=>(0,Br._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`},gR={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:hR,code(t){let{gen:e,schema:r,data:i,errsCount:n,it:o}=t;if(!n)throw new Error("ajv implementation error");let{allErrors:s,props:a}=o;a instanceof Br.Name?e.if((0,Br._)`${a} !== true`,()=>e.forIn("key",i,d=>e.if(u(a,d),()=>c(d)))):a!==!0&&e.forIn("key",i,d=>a===void 0?c(d):e.if(l(a,d),()=>c(d))),o.props=!0,t.ok((0,Br._)`${n} === ${mR.default.errors}`);function c(d){if(r===!1){t.setParams({unevaluatedProperty:d}),t.error(),s||e.break();return}if(!(0,JS.alwaysValidSchema)(o,r)){let m=e.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:d,dataPropType:JS.Type.Str},m),s||e.if((0,Br.not)(m),()=>e.break())}}function u(d,m){return(0,Br._)`!${d} || !${d}[${m}]`}function l(d,m){let h=[];for(let f in d)d[f]===!0&&h.push((0,Br._)`${m} !== ${f}`);return(0,Br.and)(...h)}}};vg.default=gR});var HS=$(bg=>{"use strict";Object.defineProperty(bg,"__esModule",{value:!0});var Un=H(),KS=te(),yR={message:({params:{len:t}})=>(0,Un.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Un._)`{limit: ${t}}`},vR={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:yR,code(t){let{gen:e,schema:r,data:i,it:n}=t,o=n.items||0;if(o===!0)return;let s=e.const("len",(0,Un._)`${i}.length`);if(r===!1)t.setParams({len:o}),t.fail((0,Un._)`${s} > ${o}`);else if(typeof r=="object"&&!(0,KS.alwaysValidSchema)(n,r)){let c=e.var("valid",(0,Un._)`${s} <= ${o}`);e.if((0,Un.not)(c),()=>a(c,o)),t.ok(c)}n.items=!0;function a(c,u){e.forRange("i",u,s,l=>{t.subschema({keyword:"unevaluatedItems",dataProp:l,dataPropType:KS.Type.Num},c),n.allErrors||e.if((0,Un.not)(c),()=>e.break())})}}};bg.default=vR});var WS=$(_g=>{"use strict";Object.defineProperty(_g,"__esModule",{value:!0});var bR=BS(),_R=HS(),$R=[bR.default,_R.default];_g.default=$R});var GS=$($g=>{"use strict";Object.defineProperty($g,"__esModule",{value:!0});var Ce=H(),wR={message:({schemaCode:t})=>(0,Ce.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,Ce._)`{format: ${t}}`},kR={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:wR,code(t,e){let{gen:r,data:i,$data:n,schema:o,schemaCode:s,it:a}=t,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=a;if(!c.validateFormats)return;n?m():h();function m(){let f=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),p=r.const("fDef",(0,Ce._)`${f}[${s}]`),g=r.let("fType"),v=r.let("format");r.if((0,Ce._)`typeof ${p} == "object" && !(${p} instanceof RegExp)`,()=>r.assign(g,(0,Ce._)`${p}.type || "string"`).assign(v,(0,Ce._)`${p}.validate`),()=>r.assign(g,(0,Ce._)`"string"`).assign(v,p)),t.fail$data((0,Ce.or)(y(),b()));function y(){return c.strictSchema===!1?Ce.nil:(0,Ce._)`${s} && !${v}`}function b(){let w=l.$async?(0,Ce._)`(${p}.async ? await ${v}(${i}) : ${v}(${i}))`:(0,Ce._)`${v}(${i})`,x=(0,Ce._)`(typeof ${v} == "function" ? ${w} : ${v}.test(${i}))`;return(0,Ce._)`${v} && ${v} !== true && ${g} === ${e} && !${x}`}}function h(){let f=d.formats[o];if(!f){y();return}if(f===!0)return;let[p,g,v]=b(f);p===e&&t.pass(w());function y(){if(c.strictSchema===!1){d.logger.warn(x());return}throw new Error(x());function x(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function b(x){let T=x instanceof RegExp?(0,Ce.regexpCode)(x):c.code.formats?(0,Ce._)`${c.code.formats}${(0,Ce.getProperty)(o)}`:void 0,q=r.scopeValue("formats",{key:o,ref:x,code:T});return typeof x=="object"&&!(x instanceof RegExp)?[x.type||"string",x.validate,(0,Ce._)`${q}.validate`]:["string",x,q]}function w(){if(typeof f=="object"&&!(f instanceof RegExp)&&f.async){if(!l.$async)throw new Error("async format in sync schema");return(0,Ce._)`await ${v}(${i})`}return typeof g=="function"?(0,Ce._)`${v}(${i})`:(0,Ce._)`${v}.test(${i})`}}}};$g.default=kR});var kg=$(wg=>{"use strict";Object.defineProperty(wg,"__esModule",{value:!0});var SR=GS(),xR=[SR.default];wg.default=xR});var Sg=$(xi=>{"use strict";Object.defineProperty(xi,"__esModule",{value:!0});xi.contentVocabulary=xi.metadataVocabulary=void 0;xi.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];xi.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var XS=$(xg=>{"use strict";Object.defineProperty(xg,"__esModule",{value:!0});var IR=Sh(),ER=Lh(),OR=ag(),NR=US(),zR=VS(),PR=WS(),TR=kg(),YS=Sg(),jR=[NR.default,IR.default,ER.default,(0,OR.default)(!0),TR.default,YS.metadataVocabulary,YS.contentVocabulary,zR.default,PR.default];xg.default=jR});var ex=$(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.DiscrError=void 0;var QS;(function(t){t.Tag="tag",t.Mapping="mapping"})(QS||(mu.DiscrError=QS={}))});var Og=$(Eg=>{"use strict";Object.defineProperty(Eg,"__esModule",{value:!0});var Ii=H(),Ig=ex(),tx=ds(),AR=bi(),CR=te(),RR={message:({params:{discrError:t,tagName:e}})=>t===Ig.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,Ii._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},DR={keyword:"discriminator",type:"object",schemaType:"object",error:RR,code(t){let{gen:e,data:r,schema:i,parentSchema:n,it:o}=t,{oneOf:s}=n;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=i.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(i.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let c=e.let("valid",!1),u=e.const("tag",(0,Ii._)`${r}${(0,Ii.getProperty)(a)}`);e.if((0,Ii._)`typeof ${u} == "string"`,()=>l(),()=>t.error(!1,{discrError:Ig.DiscrError.Tag,tag:u,tagName:a})),t.ok(c);function l(){let h=m();e.if(!1);for(let f in h)e.elseIf((0,Ii._)`${u} === ${f}`),e.assign(c,d(h[f]));e.else(),t.error(!1,{discrError:Ig.DiscrError.Mapping,tag:u,tagName:a}),e.endIf()}function d(h){let f=e.name("valid"),p=t.subschema({keyword:"oneOf",schemaProp:h},f);return t.mergeEvaluated(p,Ii.Name),f}function m(){var h;let f={},p=v(n),g=!0;for(let w=0;w<s.length;w++){let x=s[w];if(x?.$ref&&!(0,CR.schemaHasRulesButRef)(x,o.self.RULES)){let q=x.$ref;if(x=tx.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,q),x instanceof tx.SchemaEnv&&(x=x.schema),x===void 0)throw new AR.default(o.opts.uriResolver,o.baseId,q)}let T=(h=x?.properties)===null||h===void 0?void 0:h[a];if(typeof T!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);g=g&&(p||v(x)),y(T,w)}if(!g)throw new Error(`discriminator: "${a}" must be required`);return f;function v({required:w}){return Array.isArray(w)&&w.includes(a)}function y(w,x){if(w.const)b(w.const,x);else if(w.enum)for(let T of w.enum)b(T,x);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function b(w,x){if(typeof w!="string"||w in f)throw new Error(`discriminator: "${a}" values must be unique strings`);f[w]=x}}}};Eg.default=DR});var rx=$((bK,MR)=>{MR.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}});var nx=$((_K,UR)=>{UR.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}});var ix=$(($K,LR)=>{LR.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}});var ox=$((wK,qR)=>{qR.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}});var sx=$((kK,ZR)=>{ZR.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}});var ax=$((SK,FR)=>{FR.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}});var cx=$((xK,VR)=>{VR.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}});var ux=$((IK,JR)=>{JR.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}});var lx=$(Ng=>{"use strict";Object.defineProperty(Ng,"__esModule",{value:!0});var BR=rx(),KR=nx(),HR=ix(),WR=ox(),GR=sx(),YR=ax(),XR=cx(),QR=ux(),eD=["/properties"];function tD(t){return[BR,KR,HR,WR,GR,e(this,YR),XR,e(this,QR)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function e(r,i){return t?r.$dataMetaSchema(i,eD):i}}Ng.default=tD});var dx=$((Ne,Pg)=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.MissingRefError=Ne.ValidationError=Ne.CodeGen=Ne.Name=Ne.nil=Ne.stringify=Ne.str=Ne._=Ne.KeywordCxt=Ne.Ajv2020=void 0;var rD=$h(),nD=XS(),iD=Og(),oD=lx(),zg="https://json-schema.org/draft/2020-12/schema",Ei=class extends rD.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),nD.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(iD.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:r}=this.opts;r&&(oD.default.call(this,e),this.refs["http://json-schema.org/schema"]=zg)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(zg)?zg:void 0)}};Ne.Ajv2020=Ei;Pg.exports=Ne=Ei;Pg.exports.Ajv2020=Ei;Object.defineProperty(Ne,"__esModule",{value:!0});Ne.default=Ei;var sD=vi();Object.defineProperty(Ne,"KeywordCxt",{enumerable:!0,get:function(){return sD.KeywordCxt}});var Oi=H();Object.defineProperty(Ne,"_",{enumerable:!0,get:function(){return Oi._}});Object.defineProperty(Ne,"str",{enumerable:!0,get:function(){return Oi.str}});Object.defineProperty(Ne,"stringify",{enumerable:!0,get:function(){return Oi.stringify}});Object.defineProperty(Ne,"nil",{enumerable:!0,get:function(){return Oi.nil}});Object.defineProperty(Ne,"Name",{enumerable:!0,get:function(){return Oi.Name}});Object.defineProperty(Ne,"CodeGen",{enumerable:!0,get:function(){return Oi.CodeGen}});var aD=ls();Object.defineProperty(Ne,"ValidationError",{enumerable:!0,get:function(){return aD.default}});var cD=bi();Object.defineProperty(Ne,"MissingRefError",{enumerable:!0,get:function(){return cD.default}})});var bx=$(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.formatNames=sr.fastFormats=sr.fullFormats=void 0;function or(t,e){return{validate:t,compare:e}}sr.fullFormats={date:or(hx,Cg),time:or(jg(!0),Rg),"date-time":or(fx(!0),yx),"iso-time":or(jg(),gx),"iso-date-time":or(fx(),vx),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:mD,"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:$D,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:hD,int32:{type:"number",validate:vD},int64:{type:"number",validate:bD},float:{type:"number",validate:mx},double:{type:"number",validate:mx},password:!0,binary:!0};sr.fastFormats={...sr.fullFormats,date:or(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Cg),time:or(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Rg),"date-time":or(/^\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,yx),"iso-time":or(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,gx),"iso-date-time":or(/^\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,vx),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};sr.formatNames=Object.keys(sr.fullFormats);function uD(t){return t%4===0&&(t%100!==0||t%400===0)}var lD=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,dD=[0,31,28,31,30,31,30,31,31,30,31,30,31];function hx(t){let e=lD.exec(t);if(!e)return!1;let r=+e[1],i=+e[2],n=+e[3];return i>=1&&i<=12&&n>=1&&n<=(i===2&&uD(r)?29:dD[i])}function Cg(t,e){if(t&&e)return t>e?1:t<e?-1:0}var Tg=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function jg(t){return function(r){let i=Tg.exec(r);if(!i)return!1;let n=+i[1],o=+i[2],s=+i[3],a=i[4],c=i[5]==="-"?-1:1,u=+(i[6]||0),l=+(i[7]||0);if(u>23||l>59||t&&!a)return!1;if(n<=23&&o<=59&&s<60)return!0;let d=o-l*c,m=n-u*c-(d<0?1:0);return(m===23||m===-1)&&(d===59||d===-1)&&s<61}}function Rg(t,e){if(!(t&&e))return;let r=new Date("2020-01-01T"+t).valueOf(),i=new Date("2020-01-01T"+e).valueOf();if(r&&i)return r-i}function gx(t,e){if(!(t&&e))return;let r=Tg.exec(t),i=Tg.exec(e);if(r&&i)return t=r[1]+r[2]+r[3],e=i[1]+i[2]+i[3],t>e?1:t<e?-1:0}var Ag=/t|\s/i;function fx(t){let e=jg(t);return function(i){let n=i.split(Ag);return n.length===2&&hx(n[0])&&e(n[1])}}function yx(t,e){if(!(t&&e))return;let r=new Date(t).valueOf(),i=new Date(e).valueOf();if(r&&i)return r-i}function vx(t,e){if(!(t&&e))return;let[r,i]=t.split(Ag),[n,o]=e.split(Ag),s=Cg(r,n);if(s!==void 0)return s||Rg(i,o)}var fD=/\/|:/,pD=/^(?:[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 mD(t){return fD.test(t)&&pD.test(t)}var px=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function hD(t){return px.lastIndex=0,px.test(t)}var gD=-(2**31),yD=2**31-1;function vD(t){return Number.isInteger(t)&&t<=yD&&t>=gD}function bD(t){return Number.isInteger(t)}function mx(){return!0}var _D=/[^\\]\\Z/;function $D(t){if(_D.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var $x=$(Dg=>{"use strict";Object.defineProperty(Dg,"__esModule",{value:!0});var wD=Sh(),kD=Lh(),SD=ag(),xD=kg(),_x=Sg(),ID=[wD.default,kD.default,(0,SD.default)(),xD.default,_x.metadataVocabulary,_x.contentVocabulary];Dg.default=ID});var wx=$((zK,ED)=>{ED.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 Ug=$((ze,Mg)=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.MissingRefError=ze.ValidationError=ze.CodeGen=ze.Name=ze.nil=ze.stringify=ze.str=ze._=ze.KeywordCxt=ze.Ajv=void 0;var OD=$h(),ND=$x(),zD=Og(),kx=wx(),PD=["/properties"],hu="http://json-schema.org/draft-07/schema",Ni=class extends OD.default{_addVocabularies(){super._addVocabularies(),ND.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(zD.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(kx,PD):kx;this.addMetaSchema(e,hu,!1),this.refs["http://json-schema.org/schema"]=hu}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(hu)?hu:void 0)}};ze.Ajv=Ni;Mg.exports=ze=Ni;Mg.exports.Ajv=Ni;Object.defineProperty(ze,"__esModule",{value:!0});ze.default=Ni;var TD=vi();Object.defineProperty(ze,"KeywordCxt",{enumerable:!0,get:function(){return TD.KeywordCxt}});var zi=H();Object.defineProperty(ze,"_",{enumerable:!0,get:function(){return zi._}});Object.defineProperty(ze,"str",{enumerable:!0,get:function(){return zi.str}});Object.defineProperty(ze,"stringify",{enumerable:!0,get:function(){return zi.stringify}});Object.defineProperty(ze,"nil",{enumerable:!0,get:function(){return zi.nil}});Object.defineProperty(ze,"Name",{enumerable:!0,get:function(){return zi.Name}});Object.defineProperty(ze,"CodeGen",{enumerable:!0,get:function(){return zi.CodeGen}});var jD=ls();Object.defineProperty(ze,"ValidationError",{enumerable:!0,get:function(){return jD.default}});var AD=bi();Object.defineProperty(ze,"MissingRefError",{enumerable:!0,get:function(){return AD.default}})});var Sx=$(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.formatLimitDefinition=void 0;var CD=Ug(),Jt=H(),Kr=Jt.operators,gu={formatMaximum:{okStr:"<=",ok:Kr.LTE,fail:Kr.GT},formatMinimum:{okStr:">=",ok:Kr.GTE,fail:Kr.LT},formatExclusiveMaximum:{okStr:"<",ok:Kr.LT,fail:Kr.GTE},formatExclusiveMinimum:{okStr:">",ok:Kr.GT,fail:Kr.LTE}},RD={message:({keyword:t,schemaCode:e})=>(0,Jt.str)`should be ${gu[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Jt._)`{comparison: ${gu[t].okStr}, limit: ${e}}`};Pi.formatLimitDefinition={keyword:Object.keys(gu),type:"string",schemaType:"string",$data:!0,error:RD,code(t){let{gen:e,data:r,schemaCode:i,keyword:n,it:o}=t,{opts:s,self:a}=o;if(!s.validateFormats)return;let c=new CD.KeywordCxt(o,a.RULES.all.format.definition,"format");c.$data?u():l();function u(){let m=e.scopeValue("formats",{ref:a.formats,code:s.code.formats}),h=e.const("fmt",(0,Jt._)`${m}[${c.schemaCode}]`);t.fail$data((0,Jt.or)((0,Jt._)`typeof ${h} != "object"`,(0,Jt._)`${h} instanceof RegExp`,(0,Jt._)`typeof ${h}.compare != "function"`,d(h)))}function l(){let m=c.schema,h=a.formats[m];if(!h||h===!0)return;if(typeof h!="object"||h instanceof RegExp||typeof h.compare!="function")throw new Error(`"${n}": format "${m}" does not define "compare" function`);let f=e.scopeValue("formats",{key:m,ref:h,code:s.code.formats?(0,Jt._)`${s.code.formats}${(0,Jt.getProperty)(m)}`:void 0});t.fail$data(d(f))}function d(m){return(0,Jt._)`${m}.compare(${r}, ${i}) ${gu[n].fail} 0`}},dependencies:["format"]};var DD=t=>(t.addKeyword(Pi.formatLimitDefinition),t);Pi.default=DD});var Zg=$((Es,Ex)=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});var Ti=bx(),MD=Sx(),Lg=H(),xx=new Lg.Name("fullFormats"),UD=new Lg.Name("fastFormats"),qg=(t,e={keywords:!0})=>{if(Array.isArray(e))return Ix(t,e,Ti.fullFormats,xx),t;let[r,i]=e.mode==="fast"?[Ti.fastFormats,UD]:[Ti.fullFormats,xx],n=e.formats||Ti.formatNames;return Ix(t,n,r,i),e.keywords&&(0,MD.default)(t),t};qg.get=(t,e="full")=>{let i=(e==="fast"?Ti.fastFormats:Ti.fullFormats)[t];if(!i)throw new Error(`Unknown format "${t}"`);return i};function Ix(t,e,r,i){var n,o;(n=(o=t.opts.code).formats)!==null&&n!==void 0||(o.formats=(0,Lg._)`require("ajv-formats/dist/formats").${i}`);for(let s of e)t.addFormat(s,r[s])}Ex.exports=Es=qg;Object.defineProperty(Es,"__esModule",{value:!0});Es.default=qg});var Ox={};Ut(Ox,{generateJsonSample:()=>JD,inferJsonSchema:()=>qD,validateJsonSchema:()=>FD});function LD(t){let e=r=>Array.isArray(r)?r.map(e):r&&typeof r=="object"?Object.fromEntries(Object.entries(r).sort(([i],[n])=>i.localeCompare(n)).map(([i,n])=>[i,e(n)])):r;return JSON.stringify(e(t))}function Fg(t){switch(t.kind){case"null":return{type:"null"};case"boolean":return{type:"boolean"};case"string":return{type:"string"};case"number":return{type:t.raw.includes(".")||/[eE]/.test(t.raw)?"number":"integer"};case"object":{let e={},r=[];for(let i of t.entries)i.key in e||r.push(i.key),e[i.key]=Fg(i.value);return{type:"object",properties:e,required:r}}case"array":{if(!t.items.length)return{type:"array"};let e=new Map;for(let i of t.items){let n=Fg(i);e.set(LD(n),n)}let r=[...e.values()];return{type:"array",items:r.length===1?r[0]:{anyOf:r}}}}}function qD(t){let e=_t(t,{buildTree:!0});return{schema:{$schema:"https://json-schema.org/draft/2020-12/schema",...Fg(e.root)},metadata:e.metadata}}function ZD(t){let e=t.instancePath||"/",r=t.message??"does not satisfy the schema";return`${e} ${r}`}async function FD(t,e){let r=_t(t,{buildTree:!0}),i=_t(e,{buildTree:!0});if(i.root?.kind!=="object")throw new TypeError("The JSON Schema must be an object.");let[{default:n},o]=await Promise.all([Promise.resolve().then(()=>Vo(dx())),Promise.resolve().then(()=>Vo(Zg()))]),s=new n({allErrors:!0,strict:!1,validateFormats:!0}),a=o.default;a(s);let c=s.compile(wr(i.root,!1)),u=c(wr(r.root,!1)),l=u?[]:(c.errors??[]).map(ZD);return{valid:!!u,errors:l,metadata:{duplicateKeys:r.metadata.duplicateKeys+i.metadata.duplicateKeys,unsafeNumbers:r.metadata.unsafeNumbers,schemaErrors:l.length}}}function VD(t,e){if(e.startsWith("#/"))return e.slice(2).split("/").reduce((r,i)=>{if(!r||typeof r!="object")return;let n=i.replaceAll("~1","/").replaceAll("~0","~");return r[n]},t)}function ji(t,e,r,i=0){if(!t||typeof t!="object"||i>50)return null;let n=t;if("const"in n)return n.const;if("default"in n)return n.default;if(Array.isArray(n.examples)&&n.examples.length)return n.examples[0];if(Array.isArray(n.enum)&&n.enum.length)return n.enum[0];if(typeof n.$ref=="string"){if(r.has(n.$ref))return null;let s=VD(e,n.$ref);if(s!==void 0){let a=new Set(r);return a.add(n.$ref),ji(s,e,a,i+1)}}for(let s of["oneOf","anyOf"]){let a=n[s];if(Array.isArray(a)&&a.length)return ji(a[0],e,r,i+1)}if(Array.isArray(n.allOf)){let s=Object.assign({},...n.allOf.map(a=>ji(a,e,r,i+1)).filter(a=>a&&typeof a=="object"&&!Array.isArray(a)));if(Object.keys(s).length)return s}let o=Array.isArray(n.type)?n.type.find(s=>s!=="null")??n.type[0]:n.type;if(o==="object"||n.properties){let s=n.properties&&typeof n.properties=="object"?n.properties:{};return Object.fromEntries(Object.entries(s).map(([a,c])=>[a,ji(c,e,r,i+1)]))}if(o==="array"||n.items)return n.items?[ji(n.items,e,r,i+1)]:[];if(o==="integer"){let s=Number(n.minimum??n.exclusiveMinimum??0);return Number.isFinite(s)?Math.ceil(s):0}if(o==="number"){let s=Number(n.minimum??n.exclusiveMinimum??0);return Number.isFinite(s)?s:0}if(o==="boolean")return!0;if(o==="null")return null;if(o==="string"||n.format||n.minLength){let s={date:"2026-01-01","date-time":"2026-01-01T00:00:00Z",email:"user@example.com",hostname:"example.com",ipv4:"192.0.2.1",uri:"https://example.com/",uuid:"00000000-0000-4000-8000-000000000000"};return typeof n.format=="string"&&s[n.format]?s[n.format]:"x".repeat(Math.min(100,Math.max(0,Number(n.minLength??0))))}return null}function JD(t){let e=_t(t,{buildTree:!0});if(e.root?.kind!=="object")throw new TypeError("The JSON Schema must be an object.");let r=wr(e.root,!0),i=ji(r,r,new Set);return{value:Ic(i,2),metadata:e.metadata}}var Nx=Se(()=>{"use strict";Mp()});var ce=$(Be=>{"use strict";var Vg=Symbol.for("yaml.alias"),zx=Symbol.for("yaml.document"),yu=Symbol.for("yaml.map"),Px=Symbol.for("yaml.pair"),Jg=Symbol.for("yaml.scalar"),vu=Symbol.for("yaml.seq"),Nr=Symbol.for("yaml.node.type"),BD=t=>!!t&&typeof t=="object"&&t[Nr]===Vg,KD=t=>!!t&&typeof t=="object"&&t[Nr]===zx,HD=t=>!!t&&typeof t=="object"&&t[Nr]===yu,WD=t=>!!t&&typeof t=="object"&&t[Nr]===Px,Tx=t=>!!t&&typeof t=="object"&&t[Nr]===Jg,GD=t=>!!t&&typeof t=="object"&&t[Nr]===vu;function jx(t){if(t&&typeof t=="object")switch(t[Nr]){case yu:case vu:return!0}return!1}function YD(t){if(t&&typeof t=="object")switch(t[Nr]){case Vg:case yu:case Jg:case vu:return!0}return!1}var XD=t=>(Tx(t)||jx(t))&&!!t.anchor;Be.ALIAS=Vg;Be.DOC=zx;Be.MAP=yu;Be.NODE_TYPE=Nr;Be.PAIR=Px;Be.SCALAR=Jg;Be.SEQ=vu;Be.hasAnchor=XD;Be.isAlias=BD;Be.isCollection=jx;Be.isDocument=KD;Be.isMap=HD;Be.isNode=YD;Be.isPair=WD;Be.isScalar=Tx;Be.isSeq=GD});var Os=$(Bg=>{"use strict";var Le=ce(),dt=Symbol("break visit"),Ax=Symbol("skip children"),ar=Symbol("remove node");function bu(t,e){let r=Cx(e);Le.isDocument(t)?Ai(null,t.contents,r,Object.freeze([t]))===ar&&(t.contents=null):Ai(null,t,r,Object.freeze([]))}bu.BREAK=dt;bu.SKIP=Ax;bu.REMOVE=ar;function Ai(t,e,r,i){let n=Rx(t,e,r,i);if(Le.isNode(n)||Le.isPair(n))return Dx(t,i,n),Ai(t,n,r,i);if(typeof n!="symbol"){if(Le.isCollection(e)){i=Object.freeze(i.concat(e));for(let o=0;o<e.items.length;++o){let s=Ai(o,e.items[o],r,i);if(typeof s=="number")o=s-1;else{if(s===dt)return dt;s===ar&&(e.items.splice(o,1),o-=1)}}}else if(Le.isPair(e)){i=Object.freeze(i.concat(e));let o=Ai("key",e.key,r,i);if(o===dt)return dt;o===ar&&(e.key=null);let s=Ai("value",e.value,r,i);if(s===dt)return dt;s===ar&&(e.value=null)}}return n}async function _u(t,e){let r=Cx(e);Le.isDocument(t)?await Ci(null,t.contents,r,Object.freeze([t]))===ar&&(t.contents=null):await Ci(null,t,r,Object.freeze([]))}_u.BREAK=dt;_u.SKIP=Ax;_u.REMOVE=ar;async function Ci(t,e,r,i){let n=await Rx(t,e,r,i);if(Le.isNode(n)||Le.isPair(n))return Dx(t,i,n),Ci(t,n,r,i);if(typeof n!="symbol"){if(Le.isCollection(e)){i=Object.freeze(i.concat(e));for(let o=0;o<e.items.length;++o){let s=await Ci(o,e.items[o],r,i);if(typeof s=="number")o=s-1;else{if(s===dt)return dt;s===ar&&(e.items.splice(o,1),o-=1)}}}else if(Le.isPair(e)){i=Object.freeze(i.concat(e));let o=await Ci("key",e.key,r,i);if(o===dt)return dt;o===ar&&(e.key=null);let s=await Ci("value",e.value,r,i);if(s===dt)return dt;s===ar&&(e.value=null)}}return n}function Cx(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function Rx(t,e,r,i){if(typeof r=="function")return r(t,e,i);if(Le.isMap(e))return r.Map?.(t,e,i);if(Le.isSeq(e))return r.Seq?.(t,e,i);if(Le.isPair(e))return r.Pair?.(t,e,i);if(Le.isScalar(e))return r.Scalar?.(t,e,i);if(Le.isAlias(e))return r.Alias?.(t,e,i)}function Dx(t,e,r){let i=e[e.length-1];if(Le.isCollection(i))i.items[t]=r;else if(Le.isPair(i))t==="key"?i.key=r:i.value=r;else if(Le.isDocument(i))i.contents=r;else{let n=Le.isAlias(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${n} parent`)}}Bg.visit=bu;Bg.visitAsync=_u});var Kg=$(Ux=>{"use strict";var Mx=ce(),QD=Os(),e4={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},t4=t=>t.replace(/[!,[\]{}]/g,e=>e4[e]),Ns=class t{constructor(e,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},t.defaultYaml,e),this.tags=Object.assign({},t.defaultTags,r)}clone(){let e=new t(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:t.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},t.defaultTags);break}return e}add(e,r){this.atNextDocument&&(this.yaml={explicit:t.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},t.defaultTags),this.atNextDocument=!1);let i=e.trim().split(/[ \t]+/),n=i.shift();switch(n){case"%TAG":{if(i.length!==2&&(r(0,"%TAG directive should contain exactly two parts"),i.length<2))return!1;let[o,s]=i;return this.tags[o]=s,!0}case"%YAML":{if(this.yaml.explicit=!0,i.length!==1)return r(0,"%YAML directive should contain exactly one part"),!1;let[o]=i;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{let s=/^\d+\.\d+$/.test(o);return r(6,`Unsupported YAML version ${o}`,s),!1}}default:return r(0,`Unknown directive ${n}`,!0),!1}}tagName(e,r){if(e==="!")return"!";if(e[0]!=="!")return r(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let s=e.slice(2,-1);return s==="!"||s==="!!"?(r(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&r("Verbatim tags must end with a >"),s)}let[,i,n]=e.match(/^(.*!)([^!]*)$/s);n||r(`The ${e} tag has no suffix`);let o=this.tags[i];if(o)try{return o+decodeURIComponent(n)}catch(s){return r(String(s)),null}return i==="!"?e:(r(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[r,i]of Object.entries(this.tags))if(e.startsWith(i))return r+t4(e.substring(i.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags),n;if(e&&i.length>0&&Mx.isNode(e.contents)){let o={};QD.visit(e.contents,(s,a)=>{Mx.isNode(a)&&a.tag&&(o[a.tag]=!0)}),n=Object.keys(o)}else n=[];for(let[o,s]of i)o==="!!"&&s==="tag:yaml.org,2002:"||(!e||n.some(a=>a.startsWith(s)))&&r.push(`%TAG ${o} ${s}`);return r.join(`
|
|
42
|
-
`)}};Ns.defaultYaml={explicit:!1,version:"1.2"};Ns.defaultTags={"!!":"tag:yaml.org,2002:"};Ux.Directives=Ns});var $u=$(zs=>{"use strict";var Lx=ce(),r4=Os();function n4(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(r)}return!0}function qx(t){let e=new Set;return r4.visit(t,{Value(r,i){i.anchor&&e.add(i.anchor)}}),e}function Zx(t,e){for(let r=1;;++r){let i=`${t}${r}`;if(!e.has(i))return i}}function i4(t,e){let r=[],i=new Map,n=null;return{onAnchor:o=>{r.push(o),n??(n=qx(t));let s=Zx(e,n);return n.add(s),s},setAnchors:()=>{for(let o of r){let s=i.get(o);if(typeof s=="object"&&s.anchor&&(Lx.isScalar(s.node)||Lx.isCollection(s.node)))s.node.anchor=s.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=o,a}}},sourceObjects:i}}zs.anchorIsValid=n4;zs.anchorNames=qx;zs.createNodeAnchors=i4;zs.findNewAnchor=Zx});var Hg=$(Fx=>{"use strict";function Ps(t,e,r,i){if(i&&typeof i=="object")if(Array.isArray(i))for(let n=0,o=i.length;n<o;++n){let s=i[n],a=Ps(t,i,String(n),s);a===void 0?delete i[n]:a!==s&&(i[n]=a)}else if(i instanceof Map)for(let n of Array.from(i.keys())){let o=i.get(n),s=Ps(t,i,n,o);s===void 0?i.delete(n):s!==o&&i.set(n,s)}else if(i instanceof Set)for(let n of Array.from(i)){let o=Ps(t,i,n,n);o===void 0?i.delete(n):o!==n&&(i.delete(n),i.add(o))}else for(let[n,o]of Object.entries(i)){let s=Ps(t,i,n,o);s===void 0?delete i[n]:s!==o&&(i[n]=s)}return t.call(e,r,i)}Fx.applyReviver=Ps});var Hr=$(Jx=>{"use strict";var o4=ce();function Vx(t,e,r){if(Array.isArray(t))return t.map((i,n)=>Vx(i,String(n),r));if(t&&typeof t.toJSON=="function"){if(!r||!o4.hasAnchor(t))return t.toJSON(e,r);let i={aliasCount:0,count:1,res:void 0};r.anchors.set(t,i),r.onCreate=o=>{i.res=o,delete r.onCreate};let n=t.toJSON(e,r);return r.onCreate&&r.onCreate(n),n}return typeof t=="bigint"&&!r?.keep?Number(t):t}Jx.toJS=Vx});var wu=$(Kx=>{"use strict";var s4=Hg(),Bx=ce(),a4=Hr(),Wg=class{constructor(e){Object.defineProperty(this,Bx.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:r,maxAliasCount:i,onAnchor:n,reviver:o}={}){if(!Bx.isDocument(e))throw new TypeError("A document argument is required");let s={anchors:new Map,doc:e,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},a=a4.toJS(this,"",s);if(typeof n=="function")for(let{count:c,res:u}of s.anchors.values())n(u,c);return typeof o=="function"?s4.applyReviver(o,{"":a},"",a):a}};Kx.NodeBase=Wg});var Ts=$(Hx=>{"use strict";var c4=$u(),u4=Os(),Ri=ce(),l4=wu(),d4=Hr(),Gg=class extends l4.NodeBase{constructor(e){super(Ri.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,r){if(r?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let i;r?.aliasResolveCache?i=r.aliasResolveCache:(i=[],u4.visit(e,{Node:(o,s)=>{(Ri.isAlias(s)||Ri.hasAnchor(s))&&i.push(s)}}),r&&(r.aliasResolveCache=i));let n;for(let o of i){if(o===this)break;o.anchor===this.source&&(n=o)}return n}toJSON(e,r){if(!r)return{source:this.source};let{anchors:i,doc:n,maxAliasCount:o}=r,s=this.resolve(n,r);if(!s){let c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let a=i.get(s);if(a||(d4.toJS(s,null,r),a=i.get(s)),a?.res===void 0){let c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(o>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=ku(n,s,i)),a.count*a.aliasCount>o)){let c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return a.res}toString(e,r,i){let n=`*${this.source}`;if(e){if(c4.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(e.implicitKey)return`${n} `}return n}};function ku(t,e,r){if(Ri.isAlias(e)){let i=e.resolve(t),n=r&&i&&r.get(i);return n?n.count*n.aliasCount:0}else if(Ri.isCollection(e)){let i=0;for(let n of e.items){let o=ku(t,n,r);o>i&&(i=o)}return i}else if(Ri.isPair(e)){let i=ku(t,e.key,r),n=ku(t,e.value,r);return Math.max(i,n)}return 1}Hx.Alias=Gg});var De=$(Yg=>{"use strict";var f4=ce(),p4=wu(),m4=Hr(),h4=t=>!t||typeof t!="function"&&typeof t!="object",Wr=class extends p4.NodeBase{constructor(e){super(f4.SCALAR),this.value=e}toJSON(e,r){return r?.keep?this.value:m4.toJS(this.value,e,r)}toString(){return String(this.value)}};Wr.BLOCK_FOLDED="BLOCK_FOLDED";Wr.BLOCK_LITERAL="BLOCK_LITERAL";Wr.PLAIN="PLAIN";Wr.QUOTE_DOUBLE="QUOTE_DOUBLE";Wr.QUOTE_SINGLE="QUOTE_SINGLE";Yg.Scalar=Wr;Yg.isScalarValue=h4});var js=$(Gx=>{"use strict";var g4=Ts(),Ln=ce(),Wx=De(),y4="tag:yaml.org,2002:";function v4(t,e,r){if(e){let i=r.filter(o=>o.tag===e),n=i.find(o=>!o.format)??i[0];if(!n)throw new Error(`Tag ${e} not found`);return n}return r.find(i=>i.identify?.(t)&&!i.format)}function b4(t,e,r){if(Ln.isDocument(t)&&(t=t.contents),Ln.isNode(t))return t;if(Ln.isPair(t)){let d=r.schema[Ln.MAP].createNode?.(r.schema,null,r);return d.items.push(t),d}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());let{aliasDuplicateObjects:i,onAnchor:n,onTagObj:o,schema:s,sourceObjects:a}=r,c;if(i&&t&&typeof t=="object"){if(c=a.get(t),c)return c.anchor??(c.anchor=n(t)),new g4.Alias(c.anchor);c={anchor:null,node:null},a.set(t,c)}e?.startsWith("!!")&&(e=y4+e.slice(2));let u=v4(t,e,s.tags);if(!u){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){let d=new Wx.Scalar(t);return c&&(c.node=d),d}u=t instanceof Map?s[Ln.MAP]:Symbol.iterator in Object(t)?s[Ln.SEQ]:s[Ln.MAP]}o&&(o(u),delete r.onTagObj);let l=u?.createNode?u.createNode(r.schema,t,r):typeof u?.nodeClass?.from=="function"?u.nodeClass.from(r.schema,t,r):new Wx.Scalar(t);return e?l.tag=e:u.default||(l.tag=u.tag),c&&(c.node=l),l}Gx.createNode=b4});var xu=$(Su=>{"use strict";var _4=js(),cr=ce(),$4=wu();function Xg(t,e,r){let i=r;for(let n=e.length-1;n>=0;--n){let o=e[n];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){let s=[];s[o]=i,i=s}else i=new Map([[o,i]])}return _4.createNode(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}var Yx=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done,Qg=class extends $4.NodeBase{constructor(e,r){super(e),Object.defineProperty(this,"schema",{value:r,configurable:!0,enumerable:!1,writable:!0})}clone(e){let r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(r.schema=e),r.items=r.items.map(i=>cr.isNode(i)||cr.isPair(i)?i.clone(e):i),this.range&&(r.range=this.range.slice()),r}addIn(e,r){if(Yx(e))this.add(r);else{let[i,...n]=e,o=this.get(i,!0);if(cr.isCollection(o))o.addIn(n,r);else if(o===void 0&&this.schema)this.set(i,Xg(this.schema,n,r));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}deleteIn(e){let[r,...i]=e;if(i.length===0)return this.delete(r);let n=this.get(r,!0);if(cr.isCollection(n))return n.deleteIn(i);throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}getIn(e,r){let[i,...n]=e,o=this.get(i,!0);return n.length===0?!r&&cr.isScalar(o)?o.value:o:cr.isCollection(o)?o.getIn(n,r):void 0}hasAllNullValues(e){return this.items.every(r=>{if(!cr.isPair(r))return!1;let i=r.value;return i==null||e&&cr.isScalar(i)&&i.value==null&&!i.commentBefore&&!i.comment&&!i.tag})}hasIn(e){let[r,...i]=e;if(i.length===0)return this.has(r);let n=this.get(r,!0);return cr.isCollection(n)?n.hasIn(i):!1}setIn(e,r){let[i,...n]=e;if(n.length===0)this.set(i,r);else{let o=this.get(i,!0);if(cr.isCollection(o))o.setIn(n,r);else if(o===void 0&&this.schema)this.set(i,Xg(this.schema,n,r));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}};Su.Collection=Qg;Su.collectionFromPath=Xg;Su.isEmptyPath=Yx});var As=$(Iu=>{"use strict";var w4=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function ey(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}var k4=(t,e,r)=>t.endsWith(`
|
|
43
|
-
`)?ey(r,e):r.includes(`
|
|
44
|
-
`)?`
|
|
45
|
-
`+ey(r,e):(t.endsWith(" ")?"":" ")+r;Iu.indentComment=ey;Iu.lineComment=k4;Iu.stringifyComment=w4});var Qx=$(Cs=>{"use strict";var S4="flow",ty="block",Eu="quoted";function x4(t,e,r="flow",{indentAtStart:i,lineWidth:n=80,minContentWidth:o=20,onFold:s,onOverflow:a}={}){if(!n||n<0)return t;n<o&&(o=0);let c=Math.max(1+o,1+n-e.length);if(t.length<=c)return t;let u=[],l={},d=n-e.length;typeof i=="number"&&(i>n-Math.max(2,o)?u.push(0):d=n-i);let m,h,f=!1,p=-1,g=-1,v=-1;r===ty&&(p=Xx(t,p,e.length),p!==-1&&(d=p+c));for(let b;b=t[p+=1];){if(r===Eu&&b==="\\"){switch(g=p,t[p+1]){case"x":p+=3;break;case"u":p+=5;break;case"U":p+=9;break;default:p+=1}v=p}if(b===`
|
|
46
|
-
`)r===ty&&(p=Xx(t,p,e.length)),d=p+e.length+c,m=void 0;else{if(b===" "&&h&&h!==" "&&h!==`
|
|
47
|
-
`&&h!==" "){let w=t[p+1];w&&w!==" "&&w!==`
|
|
48
|
-
`&&w!==" "&&(m=p)}if(p>=d)if(m)u.push(m),d=m+c,m=void 0;else if(r===Eu){for(;h===" "||h===" ";)h=b,b=t[p+=1],f=!0;let w=p>v+1?p-2:g-1;if(l[w])return t;u.push(w),l[w]=!0,d=w+c,m=void 0}else f=!0}h=b}if(f&&a&&a(),u.length===0)return t;s&&s();let y=t.slice(0,u[0]);for(let b=0;b<u.length;++b){let w=u[b],x=u[b+1]||t.length;w===0?y=`
|
|
49
|
-
${e}${t.slice(0,x)}`:(r===Eu&&l[w]&&(y+=`${t[w]}\\`),y+=`
|
|
50
|
-
${e}${t.slice(w+1,x)}`)}return y}function Xx(t,e,r){let i=e,n=e+1,o=t[n];for(;o===" "||o===" ";)if(e<n+r)o=t[++e];else{do o=t[++e];while(o&&o!==`
|
|
51
|
-
`);i=e,n=e+1,o=t[n]}return i}Cs.FOLD_BLOCK=ty;Cs.FOLD_FLOW=S4;Cs.FOLD_QUOTED=Eu;Cs.foldFlowLines=x4});var Ds=$(e0=>{"use strict";var Bt=De(),Gr=Qx(),Nu=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),zu=t=>/^(%|---|\.\.\.)/m.test(t);function I4(t,e,r){if(!e||e<0)return!1;let i=e-r,n=t.length;if(n<=i)return!1;for(let o=0,s=0;o<n;++o)if(t[o]===`
|
|
52
|
-
`){if(o-s>i)return!0;if(s=o+1,n-s<=i)return!1}return!0}function Rs(t,e){let r=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return r;let{implicitKey:i}=e,n=e.options.doubleQuotedMinMultiLineLength,o=e.indent||(zu(t)?" ":""),s="",a=0;for(let c=0,u=r[c];u;u=r[++c])if(u===" "&&r[c+1]==="\\"&&r[c+2]==="n"&&(s+=r.slice(a,c)+"\\ ",c+=1,a=c,u="\\"),u==="\\")switch(r[c+1]){case"u":{s+=r.slice(a,c);let l=r.substr(c+2,4);switch(l){case"0000":s+="\\0";break;case"0007":s+="\\a";break;case"000b":s+="\\v";break;case"001b":s+="\\e";break;case"0085":s+="\\N";break;case"00a0":s+="\\_";break;case"2028":s+="\\L";break;case"2029":s+="\\P";break;default:l.substr(0,2)==="00"?s+="\\x"+l.substr(2):s+=r.substr(c,6)}c+=5,a=c+1}break;case"n":if(i||r[c+2]==='"'||r.length<n)c+=1;else{for(s+=r.slice(a,c)+`
|
|
53
|
-
|
|
54
|
-
`;r[c+2]==="\\"&&r[c+3]==="n"&&r[c+4]!=='"';)s+=`
|
|
55
|
-
`,c+=2;s+=o,r[c+2]===" "&&(s+="\\"),c+=1,a=c+1}break;default:c+=1}return s=a?s+r.slice(a):r,i?s:Gr.foldFlowLines(s,o,Gr.FOLD_QUOTED,Nu(e,!1))}function ry(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
|
|
56
|
-
`)||/[ \t]\n|\n[ \t]/.test(t))return Rs(t,e);let r=e.indent||(zu(t)?" ":""),i="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
57
|
-
${r}`)+"'";return e.implicitKey?i:Gr.foldFlowLines(i,r,Gr.FOLD_FLOW,Nu(e,!1))}function Di(t,e){let{singleQuote:r}=e.options,i;if(r===!1)i=Rs;else{let n=t.includes('"'),o=t.includes("'");n&&!o?i=ry:o&&!n?i=Rs:i=r?ry:Rs}return i(t,e)}var ny;try{ny=new RegExp(`(^|(?<!
|
|
58
|
-
))
|
|
59
|
-
+(?!
|
|
60
|
-
|$)`,"g")}catch{ny=/\n+(?!\n|$)/g}function Ou({comment:t,type:e,value:r},i,n,o){let{blockQuote:s,commentString:a,lineWidth:c}=i.options;if(!s||/\n[\t ]+$/.test(r))return Di(r,i);let u=i.indent||(i.forceBlockIndent||zu(r)?" ":""),l=s==="literal"?!0:s==="folded"||e===Bt.Scalar.BLOCK_FOLDED?!1:e===Bt.Scalar.BLOCK_LITERAL?!0:!I4(r,c,u.length);if(!r)return l?`|
|
|
61
|
-
`:`>
|
|
62
|
-
`;let d,m;for(m=r.length;m>0;--m){let x=r[m-1];if(x!==`
|
|
63
|
-
`&&x!==" "&&x!==" ")break}let h=r.substring(m),f=h.indexOf(`
|
|
64
|
-
`);f===-1?d="-":r===h||f!==h.length-1?(d="+",o&&o()):d="",h&&(r=r.slice(0,-h.length),h[h.length-1]===`
|
|
65
|
-
`&&(h=h.slice(0,-1)),h=h.replace(ny,`$&${u}`));let p=!1,g,v=-1;for(g=0;g<r.length;++g){let x=r[g];if(x===" ")p=!0;else if(x===`
|
|
66
|
-
`)v=g;else break}let y=r.substring(0,v<g?v+1:g);y&&(r=r.substring(y.length),y=y.replace(/\n+/g,`$&${u}`));let w=(p?u?"2":"1":"")+d;if(t&&(w+=" "+a(t.replace(/ ?[\r\n]+/g," ")),n&&n()),!l){let x=r.replace(/\n+/g,`
|
|
67
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${u}`),T=!1,q=Nu(i,!0);s!=="folded"&&e!==Bt.Scalar.BLOCK_FOLDED&&(q.onOverflow=()=>{T=!0});let P=Gr.foldFlowLines(`${y}${x}${h}`,u,Gr.FOLD_BLOCK,q);if(!T)return`>${w}
|
|
68
|
-
${u}${P}`}return r=r.replace(/\n+/g,`$&${u}`),`|${w}
|
|
69
|
-
${u}${y}${r}${h}`}function E4(t,e,r,i){let{type:n,value:o}=t,{actualString:s,implicitKey:a,indent:c,indentStep:u,inFlow:l}=e;if(a&&o.includes(`
|
|
70
|
-
`)||l&&/[[\]{},]/.test(o))return Di(o,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return a||l||!o.includes(`
|
|
71
|
-
`)?Di(o,e):Ou(t,e,r,i);if(!a&&!l&&n!==Bt.Scalar.PLAIN&&o.includes(`
|
|
72
|
-
`))return Ou(t,e,r,i);if(zu(o)){if(c==="")return e.forceBlockIndent=!0,Ou(t,e,r,i);if(a&&c===u)return Di(o,e)}let d=o.replace(/\n+/g,`$&
|
|
73
|
-
${c}`);if(s){let m=p=>p.default&&p.tag!=="tag:yaml.org,2002:str"&&p.test?.test(d),{compat:h,tags:f}=e.doc.schema;if(f.some(m)||h?.some(m))return Di(o,e)}return a?d:Gr.foldFlowLines(d,c,Gr.FOLD_FLOW,Nu(e,!1))}function O4(t,e,r,i){let{implicitKey:n,inFlow:o}=e,s=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)}),{type:a}=t;a!==Bt.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(a=Bt.Scalar.QUOTE_DOUBLE);let c=l=>{switch(l){case Bt.Scalar.BLOCK_FOLDED:case Bt.Scalar.BLOCK_LITERAL:return n||o?Di(s.value,e):Ou(s,e,r,i);case Bt.Scalar.QUOTE_DOUBLE:return Rs(s.value,e);case Bt.Scalar.QUOTE_SINGLE:return ry(s.value,e);case Bt.Scalar.PLAIN:return E4(s,e,r,i);default:return null}},u=c(a);if(u===null){let{defaultKeyType:l,defaultStringType:d}=e.options,m=n&&l||d;if(u=c(m),u===null)throw new Error(`Unsupported default string type ${m}`)}return u}e0.stringifyString=O4});var Ms=$(iy=>{"use strict";var N4=$u(),Yr=ce(),z4=As(),P4=Ds();function T4(t,e){let r=Object.assign({blockQuote:!0,commentString:z4.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e),i;switch(r.collectionStyle){case"block":i=!1;break;case"flow":i=!0;break;default:i=null}return{anchors:new Set,doc:t,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:i,options:r}}function j4(t,e){if(e.tag){let n=t.filter(o=>o.tag===e.tag);if(n.length>0)return n.find(o=>o.format===e.format)??n[0]}let r,i;if(Yr.isScalar(e)){i=e.value;let n=t.filter(o=>o.identify?.(i));if(n.length>1){let o=n.filter(s=>s.test);o.length>0&&(n=o)}r=n.find(o=>o.format===e.format)??n.find(o=>!o.format)}else i=e,r=t.find(n=>n.nodeClass&&i instanceof n.nodeClass);if(!r){let n=i?.constructor?.name??(i===null?"null":typeof i);throw new Error(`Tag not resolved for ${n} value`)}return r}function A4(t,e,{anchors:r,doc:i}){if(!i.directives)return"";let n=[],o=(Yr.isScalar(t)||Yr.isCollection(t))&&t.anchor;o&&N4.anchorIsValid(o)&&(r.add(o),n.push(`&${o}`));let s=t.tag??(e.default?null:e.tag);return s&&n.push(i.directives.tagString(s)),n.join(" ")}function C4(t,e,r,i){if(Yr.isPair(t))return t.toString(e,r,i);if(Yr.isAlias(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let n,o=Yr.isNode(t)?t:e.doc.createNode(t,{onTagObj:c=>n=c});n??(n=j4(e.doc.schema.tags,o));let s=A4(o,n,e);s.length>0&&(e.indentAtStart=(e.indentAtStart??0)+s.length+1);let a=typeof n.stringify=="function"?n.stringify(o,e,r,i):Yr.isScalar(o)?P4.stringifyString(o,e,r,i):o.toString(e,r,i);return s?Yr.isScalar(o)||a[0]==="{"||a[0]==="["?`${s} ${a}`:`${s}
|
|
74
|
-
${e.indent}${a}`:a}iy.createStringifyContext=T4;iy.stringify=C4});var i0=$(n0=>{"use strict";var zr=ce(),t0=De(),r0=Ms(),Us=As();function R4({key:t,value:e},r,i,n){let{allNullValues:o,doc:s,indent:a,indentStep:c,options:{commentString:u,indentSeq:l,simpleKeys:d}}=r,m=zr.isNode(t)&&t.comment||null;if(d){if(m)throw new Error("With simple keys, key nodes cannot have comments");if(zr.isCollection(t)||!zr.isNode(t)&&typeof t=="object"){let q="With simple keys, collection cannot be used as a key value";throw new Error(q)}}let h=!d&&(!t||m&&e==null&&!r.inFlow||zr.isCollection(t)||(zr.isScalar(t)?t.type===t0.Scalar.BLOCK_FOLDED||t.type===t0.Scalar.BLOCK_LITERAL:typeof t=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!h&&(d||!o),indent:a+c});let f=!1,p=!1,g=r0.stringify(t,r,()=>f=!0,()=>p=!0);if(!h&&!r.inFlow&&g.length>1024){if(d)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");h=!0}if(r.inFlow){if(o||e==null)return f&&i&&i(),g===""?"?":h?`? ${g}`:g}else if(o&&!d||e==null&&h)return g=`? ${g}`,m&&!f?g+=Us.lineComment(g,r.indent,u(m)):p&&n&&n(),g;f&&(m=null),h?(m&&(g+=Us.lineComment(g,r.indent,u(m))),g=`? ${g}
|
|
75
|
-
${a}:`):(g=`${g}:`,m&&(g+=Us.lineComment(g,r.indent,u(m))));let v,y,b;zr.isNode(e)?(v=!!e.spaceBefore,y=e.commentBefore,b=e.comment):(v=!1,y=null,b=null,e&&typeof e=="object"&&(e=s.createNode(e))),r.implicitKey=!1,!h&&!m&&zr.isScalar(e)&&(r.indentAtStart=g.length+1),p=!1,!l&&c.length>=2&&!r.inFlow&&!h&&zr.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(r.indent=r.indent.substring(2));let w=!1,x=r0.stringify(e,r,()=>w=!0,()=>p=!0),T=" ";if(m||v||y){if(T=v?`
|
|
76
|
-
`:"",y){let q=u(y);T+=`
|
|
77
|
-
${Us.indentComment(q,r.indent)}`}x===""&&!r.inFlow?T===`
|
|
78
|
-
`&&b&&(T=`
|
|
79
|
-
|
|
80
|
-
`):T+=`
|
|
81
|
-
${r.indent}`}else if(!h&&zr.isCollection(e)){let q=x[0],P=x.indexOf(`
|
|
82
|
-
`),ue=P!==-1,Ue=r.inFlow??e.flow??e.items.length===0;if(ue||!Ue){let We=!1;if(ue&&(q==="&"||q==="!")){let Pe=x.indexOf(" ");q==="&"&&Pe!==-1&&Pe<P&&x[Pe+1]==="!"&&(Pe=x.indexOf(" ",Pe+1)),(Pe===-1||P<Pe)&&(We=!0)}We||(T=`
|
|
83
|
-
${r.indent}`)}}else(x===""||x[0]===`
|
|
84
|
-
`)&&(T="");return g+=T+x,r.inFlow?w&&i&&i():b&&!w?g+=Us.lineComment(g,r.indent,u(b)):p&&n&&n(),g}n0.stringifyPair=R4});var sy=$(oy=>{"use strict";var o0=xc("process");function D4(t,...e){t==="debug"&&console.log(...e)}function M4(t,e){(t==="debug"||t==="warn")&&(typeof o0.emitWarning=="function"?o0.emitWarning(e):console.warn(e))}oy.debug=D4;oy.warn=M4});var Cu=$(Au=>{"use strict";var ju=ce(),s0=De(),Pu="<<",Tu={identify:t=>t===Pu||typeof t=="symbol"&&t.description===Pu,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new s0.Scalar(Symbol(Pu)),{addToJSMap:a0}),stringify:()=>Pu},U4=(t,e)=>(Tu.identify(e)||ju.isScalar(e)&&(!e.type||e.type===s0.Scalar.PLAIN)&&Tu.identify(e.value))&&t?.doc.schema.tags.some(r=>r.tag===Tu.tag&&r.default);function a0(t,e,r){let i=c0(t,r);if(ju.isSeq(i))for(let n of i.items)ay(t,e,n);else if(Array.isArray(i))for(let n of i)ay(t,e,n);else ay(t,e,i)}function ay(t,e,r){let i=c0(t,r);if(!ju.isMap(i))throw new Error("Merge sources must be maps or map aliases");let n=i.toJSON(null,t,Map);for(let[o,s]of n)e instanceof Map?e.has(o)||e.set(o,s):e instanceof Set?e.add(o):Object.prototype.hasOwnProperty.call(e,o)||Object.defineProperty(e,o,{value:s,writable:!0,enumerable:!0,configurable:!0});return e}function c0(t,e){return t&&ju.isAlias(e)?e.resolve(t.doc,t):e}Au.addMergeToJSMap=a0;Au.isMergeKey=U4;Au.merge=Tu});var uy=$(d0=>{"use strict";var L4=sy(),u0=Cu(),q4=Ms(),l0=ce(),cy=Hr();function Z4(t,e,{key:r,value:i}){if(l0.isNode(r)&&r.addToJSMap)r.addToJSMap(t,e,i);else if(u0.isMergeKey(t,r))u0.addMergeToJSMap(t,e,i);else{let n=cy.toJS(r,"",t);if(e instanceof Map)e.set(n,cy.toJS(i,n,t));else if(e instanceof Set)e.add(n);else{let o=F4(r,n,t),s=cy.toJS(i,o,t);o in e?Object.defineProperty(e,o,{value:s,writable:!0,enumerable:!0,configurable:!0}):e[o]=s}}return e}function F4(t,e,r){if(e===null)return"";if(typeof e!="object")return String(e);if(l0.isNode(t)&&r?.doc){let i=q4.createStringifyContext(r.doc,{});i.anchors=new Set;for(let o of r.anchors.keys())i.anchors.add(o.anchor);i.inFlow=!0,i.inStringifyKey=!0;let n=t.toString(i);if(!r.mapKeyWarned){let o=JSON.stringify(n);o.length>40&&(o=o.substring(0,36)+'..."'),L4.warn(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return n}return JSON.stringify(e)}d0.addPairToJSMap=Z4});var Xr=$(ly=>{"use strict";var f0=js(),V4=i0(),J4=uy(),Ru=ce();function B4(t,e,r){let i=f0.createNode(t,void 0,r),n=f0.createNode(e,void 0,r);return new Du(i,n)}var Du=class t{constructor(e,r=null){Object.defineProperty(this,Ru.NODE_TYPE,{value:Ru.PAIR}),this.key=e,this.value=r}clone(e){let{key:r,value:i}=this;return Ru.isNode(r)&&(r=r.clone(e)),Ru.isNode(i)&&(i=i.clone(e)),new t(r,i)}toJSON(e,r){let i=r?.mapAsMap?new Map:{};return J4.addPairToJSMap(r,i,this)}toString(e,r,i){return e?.doc?V4.stringifyPair(this,e,r,i):JSON.stringify(this)}};ly.Pair=Du;ly.createPair=B4});var dy=$(m0=>{"use strict";var qn=ce(),p0=Ms(),Mu=As();function K4(t,e,r){return(e.inFlow??t.flow?W4:H4)(t,e,r)}function H4({comment:t,items:e},r,{blockItemPrefix:i,flowChars:n,itemIndent:o,onChompKeep:s,onComment:a}){let{indent:c,options:{commentString:u}}=r,l=Object.assign({},r,{indent:o,type:null}),d=!1,m=[];for(let f=0;f<e.length;++f){let p=e[f],g=null;if(qn.isNode(p))!d&&p.spaceBefore&&m.push(""),Uu(r,m,p.commentBefore,d),p.comment&&(g=p.comment);else if(qn.isPair(p)){let y=qn.isNode(p.key)?p.key:null;y&&(!d&&y.spaceBefore&&m.push(""),Uu(r,m,y.commentBefore,d))}d=!1;let v=p0.stringify(p,l,()=>g=null,()=>d=!0);g&&(v+=Mu.lineComment(v,o,u(g))),d&&g&&(d=!1),m.push(i+v)}let h;if(m.length===0)h=n.start+n.end;else{h=m[0];for(let f=1;f<m.length;++f){let p=m[f];h+=p?`
|
|
85
|
-
${c}${p}`:`
|
|
86
|
-
`}}return t?(h+=`
|
|
87
|
-
`+Mu.indentComment(u(t),c),a&&a()):d&&s&&s(),h}function W4({items:t},e,{flowChars:r,itemIndent:i}){let{indent:n,indentStep:o,flowCollectionPadding:s,options:{commentString:a}}=e;i+=o;let c=Object.assign({},e,{indent:i,inFlow:!0,type:null}),u=!1,l=0,d=[];for(let f=0;f<t.length;++f){let p=t[f],g=null;if(qn.isNode(p))p.spaceBefore&&d.push(""),Uu(e,d,p.commentBefore,!1),p.comment&&(g=p.comment);else if(qn.isPair(p)){let y=qn.isNode(p.key)?p.key:null;y&&(y.spaceBefore&&d.push(""),Uu(e,d,y.commentBefore,!1),y.comment&&(u=!0));let b=qn.isNode(p.value)?p.value:null;b?(b.comment&&(g=b.comment),b.commentBefore&&(u=!0)):p.value==null&&y?.comment&&(g=y.comment)}g&&(u=!0);let v=p0.stringify(p,c,()=>g=null);u||(u=d.length>l||v.includes(`
|
|
88
|
-
`)),f<t.length-1?v+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(u||(u=d.reduce((y,b)=>y+b.length+2,2)+(v.length+2)>e.options.lineWidth)),u&&(v+=",")),g&&(v+=Mu.lineComment(v,i,a(g))),d.push(v),l=d.length}let{start:m,end:h}=r;if(d.length===0)return m+h;if(!u){let f=d.reduce((p,g)=>p+g.length+2,2);u=e.options.lineWidth>0&&f>e.options.lineWidth}if(u){let f=m;for(let p of d)f+=p?`
|
|
89
|
-
${o}${n}${p}`:`
|
|
90
|
-
`;return`${f}
|
|
91
|
-
${n}${h}`}else return`${m}${s}${d.join(" ")}${s}${h}`}function Uu({indent:t,options:{commentString:e}},r,i,n){if(i&&n&&(i=i.replace(/^\n+/,"")),i){let o=Mu.indentComment(e(i),t);r.push(o.trimStart())}}m0.stringifyCollection=K4});var en=$(py=>{"use strict";var G4=dy(),Y4=uy(),X4=xu(),Qr=ce(),Lu=Xr(),Q4=De();function Ls(t,e){let r=Qr.isScalar(e)?e.value:e;for(let i of t)if(Qr.isPair(i)&&(i.key===e||i.key===r||Qr.isScalar(i.key)&&i.key.value===r))return i}var fy=class extends X4.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Qr.MAP,e),this.items=[]}static from(e,r,i){let{keepUndefined:n,replacer:o}=i,s=new this(e),a=(c,u)=>{if(typeof o=="function")u=o.call(r,c,u);else if(Array.isArray(o)&&!o.includes(c))return;(u!==void 0||n)&&s.items.push(Lu.createPair(c,u,i))};if(r instanceof Map)for(let[c,u]of r)a(c,u);else if(r&&typeof r=="object")for(let c of Object.keys(r))a(c,r[c]);return typeof e.sortMapEntries=="function"&&s.items.sort(e.sortMapEntries),s}add(e,r){let i;Qr.isPair(e)?i=e:!e||typeof e!="object"||!("key"in e)?i=new Lu.Pair(e,e?.value):i=new Lu.Pair(e.key,e.value);let n=Ls(this.items,i.key),o=this.schema?.sortMapEntries;if(n){if(!r)throw new Error(`Key ${i.key} already set`);Qr.isScalar(n.value)&&Q4.isScalarValue(i.value)?n.value.value=i.value:n.value=i.value}else if(o){let s=this.items.findIndex(a=>o(i,a)<0);s===-1?this.items.push(i):this.items.splice(s,0,i)}else this.items.push(i)}delete(e){let r=Ls(this.items,e);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(e,r){let n=Ls(this.items,e)?.value;return(!r&&Qr.isScalar(n)?n.value:n)??void 0}has(e){return!!Ls(this.items,e)}set(e,r){this.add(new Lu.Pair(e,r),!0)}toJSON(e,r,i){let n=i?new i:r?.mapAsMap?new Map:{};r?.onCreate&&r.onCreate(n);for(let o of this.items)Y4.addPairToJSMap(r,n,o);return n}toString(e,r,i){if(!e)return JSON.stringify(this);for(let n of this.items)if(!Qr.isPair(n))throw new Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),G4.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:i,onComment:r})}};py.YAMLMap=fy;py.findPair=Ls});var Mi=$(g0=>{"use strict";var eM=ce(),h0=en(),tM={collection:"map",default:!0,nodeClass:h0.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(t,e){return eM.isMap(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,r)=>h0.YAMLMap.from(t,e,r)};g0.map=tM});var tn=$(y0=>{"use strict";var rM=js(),nM=dy(),iM=xu(),Zu=ce(),oM=De(),sM=Hr(),my=class extends iM.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Zu.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let r=qu(e);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(e,r){let i=qu(e);if(typeof i!="number")return;let n=this.items[i];return!r&&Zu.isScalar(n)?n.value:n}has(e){let r=qu(e);return typeof r=="number"&&r<this.items.length}set(e,r){let i=qu(e);if(typeof i!="number")throw new Error(`Expected a valid index, not ${e}.`);let n=this.items[i];Zu.isScalar(n)&&oM.isScalarValue(r)?n.value=r:this.items[i]=r}toJSON(e,r){let i=[];r?.onCreate&&r.onCreate(i);let n=0;for(let o of this.items)i.push(sM.toJS(o,String(n++),r));return i}toString(e,r,i){return e?nM.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:i,onComment:r}):JSON.stringify(this)}static from(e,r,i){let{replacer:n}=i,o=new this(e);if(r&&Symbol.iterator in Object(r)){let s=0;for(let a of r){if(typeof n=="function"){let c=r instanceof Set?a:String(s++);a=n.call(r,c,a)}o.items.push(rM.createNode(a,void 0,i))}}return o}};function qu(t){let e=Zu.isScalar(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}y0.YAMLSeq=my});var Ui=$(b0=>{"use strict";var aM=ce(),v0=tn(),cM={collection:"seq",default:!0,nodeClass:v0.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(t,e){return aM.isSeq(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,r)=>v0.YAMLSeq.from(t,e,r)};b0.seq=cM});var qs=$(_0=>{"use strict";var uM=Ds(),lM={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,r,i){return e=Object.assign({actualString:!0},e),uM.stringifyString(t,e,r,i)}};_0.string=lM});var Fu=$(k0=>{"use strict";var $0=De(),w0={identify:t=>t==null,createNode:()=>new $0.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new $0.Scalar(null),stringify:({source:t},e)=>typeof t=="string"&&w0.test.test(t)?t:e.options.nullStr};k0.nullTag=w0});var hy=$(x0=>{"use strict";var dM=De(),S0={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new dM.Scalar(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},r){if(t&&S0.test.test(t)){let i=t[0]==="t"||t[0]==="T";if(e===i)return t}return e?r.options.trueStr:r.options.falseStr}};x0.boolTag=S0});var Li=$(I0=>{"use strict";function fM({format:t,minFractionDigits:e,tag:r,value:i}){if(typeof i=="bigint")return String(i);let n=typeof i=="number"?i:Number(i);if(!isFinite(n))return isNaN(n)?".nan":n<0?"-.inf":".inf";let o=Object.is(i,-0)?"-0":JSON.stringify(i);if(!t&&e&&(!r||r==="tag:yaml.org,2002:float")&&/^-?\d/.test(o)&&!o.includes("e")){let s=o.indexOf(".");s<0&&(s=o.length,o+=".");let a=e-(o.length-s-1);for(;a-- >0;)o+="0"}return o}I0.stringifyNumber=fM});var yy=$(Vu=>{"use strict";var pM=De(),gy=Li(),mM={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:gy.stringifyNumber},hM={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():gy.stringifyNumber(t)}},gM={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){let e=new pM.Scalar(parseFloat(t)),r=t.indexOf(".");return r!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-r-1),e},stringify:gy.stringifyNumber};Vu.float=gM;Vu.floatExp=hM;Vu.floatNaN=mM});var by=$(Bu=>{"use strict";var E0=Li(),Ju=t=>typeof t=="bigint"||Number.isInteger(t),vy=(t,e,r,{intAsBigInt:i})=>i?BigInt(t):parseInt(t.substring(e),r);function O0(t,e,r){let{value:i}=t;return Ju(i)&&i>=0?r+i.toString(e):E0.stringifyNumber(t)}var yM={identify:t=>Ju(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,r)=>vy(t,2,8,r),stringify:t=>O0(t,8,"0o")},vM={identify:Ju,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,r)=>vy(t,0,10,r),stringify:E0.stringifyNumber},bM={identify:t=>Ju(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,r)=>vy(t,2,16,r),stringify:t=>O0(t,16,"0x")};Bu.int=vM;Bu.intHex=bM;Bu.intOct=yM});var z0=$(N0=>{"use strict";var _M=Mi(),$M=Fu(),wM=Ui(),kM=qs(),SM=hy(),_y=yy(),$y=by(),xM=[_M.map,wM.seq,kM.string,$M.nullTag,SM.boolTag,$y.intOct,$y.int,$y.intHex,_y.floatNaN,_y.floatExp,_y.float];N0.schema=xM});var j0=$(T0=>{"use strict";var IM=De(),EM=Mi(),OM=Ui();function P0(t){return typeof t=="bigint"||Number.isInteger(t)}var Ku=({value:t})=>JSON.stringify(t),NM=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:Ku},{identify:t=>t==null,createNode:()=>new IM.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Ku},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:Ku},{identify:P0,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:r})=>r?BigInt(t):parseInt(t,10),stringify:({value:t})=>P0(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:Ku}],zM={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},PM=[EM.map,OM.seq].concat(NM,zM);T0.schema=PM});var ky=$(A0=>{"use strict";var Zs=xc("buffer"),wy=De(),TM=Ds(),jM={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof Zs.Buffer=="function")return Zs.Buffer.from(t,"base64");if(typeof atob=="function"){let r=atob(t.replace(/[\n\r]/g,"")),i=new Uint8Array(r.length);for(let n=0;n<r.length;++n)i[n]=r.charCodeAt(n);return i}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:r},i,n,o){if(!r)return"";let s=r,a;if(typeof Zs.Buffer=="function")a=s instanceof Zs.Buffer?s.toString("base64"):Zs.Buffer.from(s.buffer).toString("base64");else if(typeof btoa=="function"){let c="";for(let u=0;u<s.length;++u)c+=String.fromCharCode(s[u]);a=btoa(c)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=wy.Scalar.BLOCK_LITERAL),e!==wy.Scalar.QUOTE_DOUBLE){let c=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),u=Math.ceil(a.length/c),l=new Array(u);for(let d=0,m=0;d<u;++d,m+=c)l[d]=a.substr(m,c);a=l.join(e===wy.Scalar.BLOCK_LITERAL?`
|
|
92
|
-
`:" ")}return TM.stringifyString({comment:t,type:e,value:a},i,n,o)}};A0.binary=jM});var Gu=$(Wu=>{"use strict";var Hu=ce(),Sy=Xr(),AM=De(),CM=tn();function C0(t,e){if(Hu.isSeq(t))for(let r=0;r<t.items.length;++r){let i=t.items[r];if(!Hu.isPair(i)){if(Hu.isMap(i)){i.items.length>1&&e("Each pair must have its own sequence indicator");let n=i.items[0]||new Sy.Pair(new AM.Scalar(null));if(i.commentBefore&&(n.key.commentBefore=n.key.commentBefore?`${i.commentBefore}
|
|
93
|
-
${n.key.commentBefore}`:i.commentBefore),i.comment){let o=n.value??n.key;o.comment=o.comment?`${i.comment}
|
|
94
|
-
${o.comment}`:i.comment}i=n}t.items[r]=Hu.isPair(i)?i:new Sy.Pair(i)}}else e("Expected a sequence for this tag");return t}function R0(t,e,r){let{replacer:i}=r,n=new CM.YAMLSeq(t);n.tag="tag:yaml.org,2002:pairs";let o=0;if(e&&Symbol.iterator in Object(e))for(let s of e){typeof i=="function"&&(s=i.call(e,String(o++),s));let a,c;if(Array.isArray(s))if(s.length===2)a=s[0],c=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){let u=Object.keys(s);if(u.length===1)a=u[0],c=s[a];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else a=s;n.items.push(Sy.createPair(a,c,r))}return n}var RM={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:C0,createNode:R0};Wu.createPairs=R0;Wu.pairs=RM;Wu.resolvePairs=C0});var Ey=$(Iy=>{"use strict";var D0=ce(),xy=Hr(),Fs=en(),DM=tn(),M0=Gu(),Zn=class t extends DM.YAMLSeq{constructor(){super(),this.add=Fs.YAMLMap.prototype.add.bind(this),this.delete=Fs.YAMLMap.prototype.delete.bind(this),this.get=Fs.YAMLMap.prototype.get.bind(this),this.has=Fs.YAMLMap.prototype.has.bind(this),this.set=Fs.YAMLMap.prototype.set.bind(this),this.tag=t.tag}toJSON(e,r){if(!r)return super.toJSON(e);let i=new Map;r?.onCreate&&r.onCreate(i);for(let n of this.items){let o,s;if(D0.isPair(n)?(o=xy.toJS(n.key,"",r),s=xy.toJS(n.value,o,r)):o=xy.toJS(n,"",r),i.has(o))throw new Error("Ordered maps must not include duplicate keys");i.set(o,s)}return i}static from(e,r,i){let n=M0.createPairs(e,r,i),o=new this;return o.items=n.items,o}};Zn.tag="tag:yaml.org,2002:omap";var MM={collection:"seq",identify:t=>t instanceof Map,nodeClass:Zn,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){let r=M0.resolvePairs(t,e),i=[];for(let{key:n}of r.items)D0.isScalar(n)&&(i.includes(n.value)?e(`Ordered maps must not include duplicate keys: ${n.value}`):i.push(n.value));return Object.assign(new Zn,r)},createNode:(t,e,r)=>Zn.from(t,e,r)};Iy.YAMLOMap=Zn;Iy.omap=MM});var F0=$(Oy=>{"use strict";var U0=De();function L0({value:t,source:e},r){return e&&(t?q0:Z0).test.test(e)?e:t?r.options.trueStr:r.options.falseStr}var q0={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new U0.Scalar(!0),stringify:L0},Z0={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new U0.Scalar(!1),stringify:L0};Oy.falseTag=Z0;Oy.trueTag=q0});var V0=$(Yu=>{"use strict";var UM=De(),Ny=Li(),LM={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Ny.stringifyNumber},qM={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():Ny.stringifyNumber(t)}},ZM={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let e=new UM.Scalar(parseFloat(t.replace(/_/g,""))),r=t.indexOf(".");if(r!==-1){let i=t.substring(r+1).replace(/_/g,"");i[i.length-1]==="0"&&(e.minFractionDigits=i.length)}return e},stringify:Ny.stringifyNumber};Yu.float=ZM;Yu.floatExp=qM;Yu.floatNaN=LM});var B0=$(Js=>{"use strict";var J0=Li(),Vs=t=>typeof t=="bigint"||Number.isInteger(t);function Xu(t,e,r,{intAsBigInt:i}){let n=t[0];if((n==="-"||n==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),i){switch(r){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}let s=BigInt(t);return n==="-"?BigInt(-1)*s:s}let o=parseInt(t,r);return n==="-"?-1*o:o}function zy(t,e,r){let{value:i}=t;if(Vs(i)){let n=i.toString(e);return i<0?"-"+r+n.substr(1):r+n}return J0.stringifyNumber(t)}var FM={identify:Vs,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,r)=>Xu(t,2,2,r),stringify:t=>zy(t,2,"0b")},VM={identify:Vs,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,r)=>Xu(t,1,8,r),stringify:t=>zy(t,8,"0")},JM={identify:Vs,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,r)=>Xu(t,0,10,r),stringify:J0.stringifyNumber},BM={identify:Vs,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,r)=>Xu(t,2,16,r),stringify:t=>zy(t,16,"0x")};Js.int=JM;Js.intBin=FM;Js.intHex=BM;Js.intOct=VM});var Ty=$(Py=>{"use strict";var tl=ce(),Qu=Xr(),el=en(),Fn=class t extends el.YAMLMap{constructor(e){super(e),this.tag=t.tag}add(e){let r;tl.isPair(e)?r=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?r=new Qu.Pair(e.key,null):r=new Qu.Pair(e,null),el.findPair(this.items,r.key)||this.items.push(r)}get(e,r){let i=el.findPair(this.items,e);return!r&&tl.isPair(i)?tl.isScalar(i.key)?i.key.value:i.key:i}set(e,r){if(typeof r!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);let i=el.findPair(this.items,e);i&&!r?this.items.splice(this.items.indexOf(i),1):!i&&r&&this.items.push(new Qu.Pair(e))}toJSON(e,r){return super.toJSON(e,r,Set)}toString(e,r,i){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),r,i);throw new Error("Set items must all have null values")}static from(e,r,i){let{replacer:n}=i,o=new this(e);if(r&&Symbol.iterator in Object(r))for(let s of r)typeof n=="function"&&(s=n.call(r,s,s)),o.items.push(Qu.createPair(s,null,i));return o}};Fn.tag="tag:yaml.org,2002:set";var KM={collection:"map",identify:t=>t instanceof Set,nodeClass:Fn,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,r)=>Fn.from(t,e,r),resolve(t,e){if(tl.isMap(t)){if(t.hasAllNullValues(!0))return Object.assign(new Fn,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};Py.YAMLSet=Fn;Py.set=KM});var Ay=$(rl=>{"use strict";var HM=Li();function jy(t,e){let r=t[0],i=r==="-"||r==="+"?t.substring(1):t,n=s=>e?BigInt(s):Number(s),o=i.replace(/_/g,"").split(":").reduce((s,a)=>s*n(60)+n(a),n(0));return r==="-"?n(-1)*o:o}function K0(t){let{value:e}=t,r=s=>s;if(typeof e=="bigint")r=s=>BigInt(s);else if(isNaN(e)||!isFinite(e))return HM.stringifyNumber(t);let i="";e<0&&(i="-",e*=r(-1));let n=r(60),o=[e%n];return e<60?o.unshift(0):(e=(e-o[0])/n,o.unshift(e%n),e>=60&&(e=(e-o[0])/n,o.unshift(e))),i+o.map(s=>String(s).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var WM={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:r})=>jy(t,r),stringify:K0},GM={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>jy(t,!1),stringify:K0},H0={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){let e=t.match(H0.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,r,i,n,o,s,a]=e.map(Number),c=e[7]?Number((e[7]+"00").substr(1,3)):0,u=Date.UTC(r,i-1,n,o||0,s||0,a||0,c),l=e[8];if(l&&l!=="Z"){let d=jy(l,!1);Math.abs(d)<30&&(d*=60),u-=6e4*d}return new Date(u)},stringify:({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};rl.floatTime=GM;rl.intTime=WM;rl.timestamp=H0});var Y0=$(G0=>{"use strict";var YM=Mi(),XM=Fu(),QM=Ui(),eU=qs(),tU=ky(),W0=F0(),Cy=V0(),nl=B0(),rU=Cu(),nU=Ey(),iU=Gu(),oU=Ty(),Ry=Ay(),sU=[YM.map,QM.seq,eU.string,XM.nullTag,W0.trueTag,W0.falseTag,nl.intBin,nl.intOct,nl.int,nl.intHex,Cy.floatNaN,Cy.floatExp,Cy.float,tU.binary,rU.merge,nU.omap,iU.pairs,oU.set,Ry.intTime,Ry.floatTime,Ry.timestamp];G0.schema=sU});var aI=$(Uy=>{"use strict";var tI=Mi(),aU=Fu(),rI=Ui(),cU=qs(),uU=hy(),Dy=yy(),My=by(),lU=z0(),dU=j0(),nI=ky(),Bs=Cu(),iI=Ey(),oI=Gu(),X0=Y0(),sI=Ty(),il=Ay(),Q0=new Map([["core",lU.schema],["failsafe",[tI.map,rI.seq,cU.string]],["json",dU.schema],["yaml11",X0.schema],["yaml-1.1",X0.schema]]),eI={binary:nI.binary,bool:uU.boolTag,float:Dy.float,floatExp:Dy.floatExp,floatNaN:Dy.floatNaN,floatTime:il.floatTime,int:My.int,intHex:My.intHex,intOct:My.intOct,intTime:il.intTime,map:tI.map,merge:Bs.merge,null:aU.nullTag,omap:iI.omap,pairs:oI.pairs,seq:rI.seq,set:sI.set,timestamp:il.timestamp},fU={"tag:yaml.org,2002:binary":nI.binary,"tag:yaml.org,2002:merge":Bs.merge,"tag:yaml.org,2002:omap":iI.omap,"tag:yaml.org,2002:pairs":oI.pairs,"tag:yaml.org,2002:set":sI.set,"tag:yaml.org,2002:timestamp":il.timestamp};function pU(t,e,r){let i=Q0.get(e);if(i&&!t)return r&&!i.includes(Bs.merge)?i.concat(Bs.merge):i.slice();let n=i;if(!n)if(Array.isArray(t))n=[];else{let o=Array.from(Q0.keys()).filter(s=>s!=="yaml11").map(s=>JSON.stringify(s)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${o} or define customTags array`)}if(Array.isArray(t))for(let o of t)n=n.concat(o);else typeof t=="function"&&(n=t(n.slice()));return r&&(n=n.concat(Bs.merge)),n.reduce((o,s)=>{let a=typeof s=="string"?eI[s]:s;if(!a){let c=JSON.stringify(s),u=Object.keys(eI).map(l=>JSON.stringify(l)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${u}`)}return o.includes(a)||o.push(a),o},[])}Uy.coreKnownTags=fU;Uy.getTags=pU});var Zy=$(cI=>{"use strict";var Ly=ce(),mU=Mi(),hU=Ui(),gU=qs(),ol=aI(),yU=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0,qy=class t{constructor({compat:e,customTags:r,merge:i,resolveKnownTags:n,schema:o,sortMapEntries:s,toStringDefaults:a}){this.compat=Array.isArray(e)?ol.getTags(e,"compat"):e?ol.getTags(null,e):null,this.name=typeof o=="string"&&o||"core",this.knownTags=n?ol.coreKnownTags:{},this.tags=ol.getTags(r,this.name,i),this.toStringOptions=a??null,Object.defineProperty(this,Ly.MAP,{value:mU.map}),Object.defineProperty(this,Ly.SCALAR,{value:gU.string}),Object.defineProperty(this,Ly.SEQ,{value:hU.seq}),this.sortMapEntries=typeof s=="function"?s:s===!0?yU:null}clone(){let e=Object.create(t.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};cI.Schema=qy});var lI=$(uI=>{"use strict";var vU=ce(),Fy=Ms(),Ks=As();function bU(t,e){let r=[],i=e.directives===!0;if(e.directives!==!1&&t.directives){let c=t.directives.toString(t);c?(r.push(c),i=!0):t.directives.docStart&&(i=!0)}i&&r.push("---");let n=Fy.createStringifyContext(t,e),{commentString:o}=n.options;if(t.commentBefore){r.length!==1&&r.unshift("");let c=o(t.commentBefore);r.unshift(Ks.indentComment(c,""))}let s=!1,a=null;if(t.contents){if(vU.isNode(t.contents)){if(t.contents.spaceBefore&&i&&r.push(""),t.contents.commentBefore){let l=o(t.contents.commentBefore);r.push(Ks.indentComment(l,""))}n.forceBlockIndent=!!t.comment,a=t.contents.comment}let c=a?void 0:()=>s=!0,u=Fy.stringify(t.contents,n,()=>a=null,c);a&&(u+=Ks.lineComment(u,"",o(a))),(u[0]==="|"||u[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${u}`:r.push(u)}else r.push(Fy.stringify(t.contents,n));if(t.directives?.docEnd)if(t.comment){let c=o(t.comment);c.includes(`
|
|
95
|
-
`)?(r.push("..."),r.push(Ks.indentComment(c,""))):r.push(`... ${c}`)}else r.push("...");else{let c=t.comment;c&&s&&(c=c.replace(/^\n+/,"")),c&&((!s||a)&&r[r.length-1]!==""&&r.push(""),r.push(Ks.indentComment(o(c),"")))}return r.join(`
|
|
96
|
-
`)+`
|
|
97
|
-
`}uI.stringifyDocument=bU});var Hs=$(dI=>{"use strict";var _U=Ts(),qi=xu(),jt=ce(),$U=Xr(),wU=Hr(),kU=Zy(),SU=lI(),Vy=$u(),xU=Hg(),IU=js(),Jy=Kg(),By=class t{constructor(e,r,i){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,jt.NODE_TYPE,{value:jt.DOC});let n=null;typeof r=="function"||Array.isArray(r)?n=r:i===void 0&&r&&(i=r,r=void 0);let o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},i);this.options=o;let{version:s}=o;i?._directives?(this.directives=i._directives.atDocument(),this.directives.yaml.explicit&&(s=this.directives.yaml.version)):this.directives=new Jy.Directives({version:s}),this.setSchema(s,i),this.contents=e===void 0?null:this.createNode(e,n,i)}clone(){let e=Object.create(t.prototype,{[jt.NODE_TYPE]:{value:jt.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=jt.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){Zi(this.contents)&&this.contents.add(e)}addIn(e,r){Zi(this.contents)&&this.contents.addIn(e,r)}createAlias(e,r){if(!e.anchor){let i=Vy.anchorNames(this);e.anchor=!r||i.has(r)?Vy.findNewAnchor(r||"a",i):r}return new _U.Alias(e.anchor)}createNode(e,r,i){let n;if(typeof r=="function")e=r.call({"":e},"",e),n=r;else if(Array.isArray(r)){let g=y=>typeof y=="number"||y instanceof String||y instanceof Number,v=r.filter(g).map(String);v.length>0&&(r=r.concat(v)),n=r}else i===void 0&&r&&(i=r,r=void 0);let{aliasDuplicateObjects:o,anchorPrefix:s,flow:a,keepUndefined:c,onTagObj:u,tag:l}=i??{},{onAnchor:d,setAnchors:m,sourceObjects:h}=Vy.createNodeAnchors(this,s||"a"),f={aliasDuplicateObjects:o??!0,keepUndefined:c??!1,onAnchor:d,onTagObj:u,replacer:n,schema:this.schema,sourceObjects:h},p=IU.createNode(e,l,f);return a&&jt.isCollection(p)&&(p.flow=!0),m(),p}createPair(e,r,i={}){let n=this.createNode(e,null,i),o=this.createNode(r,null,i);return new $U.Pair(n,o)}delete(e){return Zi(this.contents)?this.contents.delete(e):!1}deleteIn(e){return qi.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):Zi(this.contents)?this.contents.deleteIn(e):!1}get(e,r){return jt.isCollection(this.contents)?this.contents.get(e,r):void 0}getIn(e,r){return qi.isEmptyPath(e)?!r&&jt.isScalar(this.contents)?this.contents.value:this.contents:jt.isCollection(this.contents)?this.contents.getIn(e,r):void 0}has(e){return jt.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return qi.isEmptyPath(e)?this.contents!==void 0:jt.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,r){this.contents==null?this.contents=qi.collectionFromPath(this.schema,[e],r):Zi(this.contents)&&this.contents.set(e,r)}setIn(e,r){qi.isEmptyPath(e)?this.contents=r:this.contents==null?this.contents=qi.collectionFromPath(this.schema,Array.from(e),r):Zi(this.contents)&&this.contents.setIn(e,r)}setSchema(e,r={}){typeof e=="number"&&(e=String(e));let i;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Jy.Directives({version:"1.1"}),i={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Jy.Directives({version:e}),i={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,i=null;break;default:{let n=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${n}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(i)this.schema=new kU.Schema(Object.assign(i,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:r,mapAsMap:i,maxAliasCount:n,onAnchor:o,reviver:s}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},c=wU.toJS(this.contents,r??"",a);if(typeof o=="function")for(let{count:u,res:l}of a.anchors.values())o(l,u);return typeof s=="function"?xU.applyReviver(s,{"":c},"",c):c}toJSON(e,r){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:r})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let r=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return SU.stringifyDocument(this,e)}};function Zi(t){if(jt.isCollection(t))return!0;throw new Error("Expected a YAML collection as document contents")}dI.Document=By});var Ys=$(Gs=>{"use strict";var Ws=class extends Error{constructor(e,r,i,n){super(),this.name=e,this.code=i,this.message=n,this.pos=r}},Ky=class extends Ws{constructor(e,r,i){super("YAMLParseError",e,r,i)}},Hy=class extends Ws{constructor(e,r,i){super("YAMLWarning",e,r,i)}},EU=(t,e)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(a=>e.linePos(a));let{line:i,col:n}=r.linePos[0];r.message+=` at line ${i}, column ${n}`;let o=n-1,s=t.substring(e.lineStarts[i-1],e.lineStarts[i]).replace(/[\n\r]+$/,"");if(o>=60&&s.length>80){let a=Math.min(o-39,s.length-79);s="\u2026"+s.substring(a),o-=a-1}if(s.length>80&&(s=s.substring(0,79)+"\u2026"),i>1&&/^ *$/.test(s.substring(0,o))){let a=t.substring(e.lineStarts[i-2],e.lineStarts[i-1]);a.length>80&&(a=a.substring(0,79)+`\u2026
|
|
98
|
-
`),s=a+s}if(/[^ ]/.test(s)){let a=1,c=r.linePos[1];c?.line===i&&c.col>n&&(a=Math.max(1,Math.min(c.col-n,80-o)));let u=" ".repeat(o)+"^".repeat(a);r.message+=`:
|
|
99
|
-
|
|
100
|
-
${s}
|
|
101
|
-
${u}
|
|
102
|
-
`}};Gs.YAMLError=Ws;Gs.YAMLParseError=Ky;Gs.YAMLWarning=Hy;Gs.prettifyError=EU});var Xs=$(fI=>{"use strict";function OU(t,{flow:e,indicator:r,next:i,offset:n,onError:o,parentIndent:s,startOnNewline:a}){let c=!1,u=a,l=a,d="",m="",h=!1,f=!1,p=null,g=null,v=null,y=null,b=null,w=null,x=null;for(let P of t)switch(f&&(P.type!=="space"&&P.type!=="newline"&&P.type!=="comma"&&o(P.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),f=!1),p&&(u&&P.type!=="comment"&&P.type!=="newline"&&o(p,"TAB_AS_INDENT","Tabs are not allowed as indentation"),p=null),P.type){case"space":!e&&(r!=="doc-start"||i?.type!=="flow-collection")&&P.source.includes(" ")&&(p=P),l=!0;break;case"comment":{l||o(P,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let ue=P.source.substring(1)||" ";d?d+=m+ue:d=ue,m="",u=!1;break}case"newline":u?d?d+=P.source:(!w||r!=="seq-item-ind")&&(c=!0):m+=P.source,u=!0,h=!0,(g||v)&&(y=P),l=!0;break;case"anchor":g&&o(P,"MULTIPLE_ANCHORS","A node can have at most one anchor"),P.source.endsWith(":")&&o(P.offset+P.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=P,x??(x=P.offset),u=!1,l=!1,f=!0;break;case"tag":{v&&o(P,"MULTIPLE_TAGS","A node can have at most one tag"),v=P,x??(x=P.offset),u=!1,l=!1,f=!0;break}case r:(g||v)&&o(P,"BAD_PROP_ORDER",`Anchors and tags must be after the ${P.source} indicator`),w&&o(P,"UNEXPECTED_TOKEN",`Unexpected ${P.source} in ${e??"collection"}`),w=P,u=r==="seq-item-ind"||r==="explicit-key-ind",l=!1;break;case"comma":if(e){b&&o(P,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),b=P,u=!1,l=!1;break}default:o(P,"UNEXPECTED_TOKEN",`Unexpected ${P.type} token`),u=!1,l=!1}let T=t[t.length-1],q=T?T.offset+T.source.length:n;return f&&i&&i.type!=="space"&&i.type!=="newline"&&i.type!=="comma"&&(i.type!=="scalar"||i.source!=="")&&o(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),p&&(u&&p.indent<=s||i?.type==="block-map"||i?.type==="block-seq")&&o(p,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:b,found:w,spaceBefore:c,comment:d,hasNewline:h,anchor:g,tag:v,newlineAfterProp:y,end:q,start:x??q}}fI.resolveProps=OU});var sl=$(pI=>{"use strict";function Wy(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
|
|
103
|
-
`))return!0;if(t.end){for(let e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of t.items){for(let r of e.start)if(r.type==="newline")return!0;if(e.sep){for(let r of e.sep)if(r.type==="newline")return!0}if(Wy(e.key)||Wy(e.value))return!0}return!1;default:return!0}}pI.containsNewline=Wy});var Gy=$(mI=>{"use strict";var NU=sl();function zU(t,e,r){if(e?.type==="flow-collection"){let i=e.end[0];i.indent===t&&(i.source==="]"||i.source==="}")&&NU.containsNewline(e)&&r(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}mI.flowIndentCheck=zU});var Yy=$(gI=>{"use strict";var hI=ce();function PU(t,e,r){let{uniqueKeys:i}=t.options;if(i===!1)return!1;let n=typeof i=="function"?i:(o,s)=>o===s||hI.isScalar(o)&&hI.isScalar(s)&&o.value===s.value;return e.some(o=>n(o.key,r))}gI.mapIncludes=PU});var wI=$($I=>{"use strict";var yI=Xr(),TU=en(),vI=Xs(),jU=sl(),bI=Gy(),AU=Yy(),_I="All mapping items must start at the same column";function CU({composeNode:t,composeEmptyNode:e},r,i,n,o){let s=o?.nodeClass??TU.YAMLMap,a=new s(r.schema);r.atRoot&&(r.atRoot=!1);let c=i.offset,u=null;for(let l of i.items){let{start:d,key:m,sep:h,value:f}=l,p=vI.resolveProps(d,{indicator:"explicit-key-ind",next:m??h?.[0],offset:c,onError:n,parentIndent:i.indent,startOnNewline:!0}),g=!p.found;if(g){if(m&&(m.type==="block-seq"?n(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in m&&m.indent!==i.indent&&n(c,"BAD_INDENT",_I)),!p.anchor&&!p.tag&&!h){u=p.end,p.comment&&(a.comment?a.comment+=`
|
|
104
|
-
`+p.comment:a.comment=p.comment);continue}(p.newlineAfterProp||jU.containsNewline(m))&&n(m??d[d.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else p.found?.indent!==i.indent&&n(c,"BAD_INDENT",_I);r.atKey=!0;let v=p.end,y=m?t(r,m,p,n):e(r,v,d,null,p,n);r.schema.compat&&bI.flowIndentCheck(i.indent,m,n),r.atKey=!1,AU.mapIncludes(r,a.items,y)&&n(v,"DUPLICATE_KEY","Map keys must be unique");let b=vI.resolveProps(h??[],{indicator:"map-value-ind",next:f,offset:y.range[2],onError:n,parentIndent:i.indent,startOnNewline:!m||m.type==="block-scalar"});if(c=b.end,b.found){g&&(f?.type==="block-map"&&!b.hasNewline&&n(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&p.start<b.found.offset-1024&&n(y.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let w=f?t(r,f,b,n):e(r,c,h,null,b,n);r.schema.compat&&bI.flowIndentCheck(i.indent,f,n),c=w.range[2];let x=new yI.Pair(y,w);r.options.keepSourceTokens&&(x.srcToken=l),a.items.push(x)}else{g&&n(y.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),b.comment&&(y.comment?y.comment+=`
|
|
105
|
-
`+b.comment:y.comment=b.comment);let w=new yI.Pair(y);r.options.keepSourceTokens&&(w.srcToken=l),a.items.push(w)}}return u&&u<c&&n(u,"IMPOSSIBLE","Map comment with trailing content"),a.range=[i.offset,c,u??c],a}$I.resolveBlockMap=CU});var SI=$(kI=>{"use strict";var RU=tn(),DU=Xs(),MU=Gy();function UU({composeNode:t,composeEmptyNode:e},r,i,n,o){let s=o?.nodeClass??RU.YAMLSeq,a=new s(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let c=i.offset,u=null;for(let{start:l,value:d}of i.items){let m=DU.resolveProps(l,{indicator:"seq-item-ind",next:d,offset:c,onError:n,parentIndent:i.indent,startOnNewline:!0});if(!m.found)if(m.anchor||m.tag||d)d?.type==="block-seq"?n(m.end,"BAD_INDENT","All sequence items must start at the same column"):n(c,"MISSING_CHAR","Sequence item without - indicator");else{u=m.end,m.comment&&(a.comment=m.comment);continue}let h=d?t(r,d,m,n):e(r,m.end,l,null,m,n);r.schema.compat&&MU.flowIndentCheck(i.indent,d,n),c=h.range[2],a.items.push(h)}return a.range=[i.offset,c,u??c],a}kI.resolveBlockSeq=UU});var Fi=$(xI=>{"use strict";function LU(t,e,r,i){let n="";if(t){let o=!1,s="";for(let a of t){let{source:c,type:u}=a;switch(u){case"space":o=!0;break;case"comment":{r&&!o&&i(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let l=c.substring(1)||" ";n?n+=s+l:n=l,s="";break}case"newline":n&&(s+=c),o=!0;break;default:i(a,"UNEXPECTED_TOKEN",`Unexpected ${u} at node end`)}e+=c.length}}return{comment:n,offset:e}}xI.resolveEnd=LU});var NI=$(OI=>{"use strict";var qU=ce(),ZU=Xr(),II=en(),FU=tn(),VU=Fi(),EI=Xs(),JU=sl(),BU=Yy(),Xy="Block collections are not allowed within flow collections",Qy=t=>t&&(t.type==="block-map"||t.type==="block-seq");function KU({composeNode:t,composeEmptyNode:e},r,i,n,o){let s=i.start.source==="{",a=s?"flow map":"flow sequence",c=o?.nodeClass??(s?II.YAMLMap:FU.YAMLSeq),u=new c(r.schema);u.flow=!0;let l=r.atRoot;l&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let d=i.offset+i.start.source.length;for(let g=0;g<i.items.length;++g){let v=i.items[g],{start:y,key:b,sep:w,value:x}=v,T=EI.resolveProps(y,{flow:a,indicator:"explicit-key-ind",next:b??w?.[0],offset:d,onError:n,parentIndent:i.indent,startOnNewline:!1});if(!T.found){if(!T.anchor&&!T.tag&&!w&&!x){g===0&&T.comma?n(T.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):g<i.items.length-1&&n(T.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),T.comment&&(u.comment?u.comment+=`
|
|
106
|
-
`+T.comment:u.comment=T.comment),d=T.end;continue}!s&&r.options.strict&&JU.containsNewline(b)&&n(b,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(g===0)T.comma&&n(T.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(T.comma||n(T.start,"MISSING_CHAR",`Missing , between ${a} items`),T.comment){let q="";e:for(let P of y)switch(P.type){case"comma":case"space":break;case"comment":q=P.source.substring(1);break e;default:break e}if(q){let P=u.items[u.items.length-1];qU.isPair(P)&&(P=P.value??P.key),P.comment?P.comment+=`
|
|
107
|
-
`+q:P.comment=q,T.comment=T.comment.substring(q.length+1)}}if(!s&&!w&&!T.found){let q=x?t(r,x,T,n):e(r,T.end,w,null,T,n);u.items.push(q),d=q.range[2],Qy(x)&&n(q.range,"BLOCK_IN_FLOW",Xy)}else{r.atKey=!0;let q=T.end,P=b?t(r,b,T,n):e(r,q,y,null,T,n);Qy(b)&&n(P.range,"BLOCK_IN_FLOW",Xy),r.atKey=!1;let ue=EI.resolveProps(w??[],{flow:a,indicator:"map-value-ind",next:x,offset:P.range[2],onError:n,parentIndent:i.indent,startOnNewline:!1});if(ue.found){if(!s&&!T.found&&r.options.strict){if(w)for(let Pe of w){if(Pe===ue.found)break;if(Pe.type==="newline"){n(Pe,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}T.start<ue.found.offset-1024&&n(ue.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else x&&("source"in x&&x.source?.[0]===":"?n(x,"MISSING_CHAR",`Missing space after : in ${a}`):n(ue.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let Ue=x?t(r,x,ue,n):ue.found?e(r,ue.end,w,null,ue,n):null;Ue?Qy(x)&&n(Ue.range,"BLOCK_IN_FLOW",Xy):ue.comment&&(P.comment?P.comment+=`
|
|
108
|
-
`+ue.comment:P.comment=ue.comment);let We=new ZU.Pair(P,Ue);if(r.options.keepSourceTokens&&(We.srcToken=v),s){let Pe=u;BU.mapIncludes(r,Pe.items,P)&&n(q,"DUPLICATE_KEY","Map keys must be unique"),Pe.items.push(We)}else{let Pe=new II.YAMLMap(r.schema);Pe.flow=!0,Pe.items.push(We);let br=(Ue??P).range;Pe.range=[P.range[0],br[1],br[2]],u.items.push(Pe)}d=Ue?Ue.range[2]:ue.end}}let m=s?"}":"]",[h,...f]=i.end,p=d;if(h?.source===m)p=h.offset+h.source.length;else{let g=a[0].toUpperCase()+a.substring(1),v=l?`${g} must end with a ${m}`:`${g} in block collection must be sufficiently indented and end with a ${m}`;n(d,l?"MISSING_CHAR":"BAD_INDENT",v),h&&h.source.length!==1&&f.unshift(h)}if(f.length>0){let g=VU.resolveEnd(f,p,r.options.strict,n);g.comment&&(u.comment?u.comment+=`
|
|
109
|
-
`+g.comment:u.comment=g.comment),u.range=[i.offset,p,g.offset]}else u.range=[i.offset,p,p];return u}OI.resolveFlowCollection=KU});var PI=$(zI=>{"use strict";var HU=ce(),WU=De(),GU=en(),YU=tn(),XU=wI(),QU=SI(),e2=NI();function ev(t,e,r,i,n,o){let s=r.type==="block-map"?XU.resolveBlockMap(t,e,r,i,o):r.type==="block-seq"?QU.resolveBlockSeq(t,e,r,i,o):e2.resolveFlowCollection(t,e,r,i,o),a=s.constructor;return n==="!"||n===a.tagName?(s.tag=a.tagName,s):(n&&(s.tag=n),s)}function t2(t,e,r,i,n){let o=i.tag,s=o?e.directives.tagName(o.source,m=>n(o,"TAG_RESOLVE_FAILED",m)):null;if(r.type==="block-seq"){let{anchor:m,newlineAfterProp:h}=i,f=m&&o?m.offset>o.offset?m:o:m??o;f&&(!h||h.offset<f.offset)&&n(f,"MISSING_CHAR","Missing newline after block sequence props")}let a=r.type==="block-map"?"map":r.type==="block-seq"?"seq":r.start.source==="{"?"map":"seq";if(!o||!s||s==="!"||s===GU.YAMLMap.tagName&&a==="map"||s===YU.YAMLSeq.tagName&&a==="seq")return ev(t,e,r,n,s);let c=e.schema.tags.find(m=>m.tag===s&&m.collection===a);if(!c){let m=e.schema.knownTags[s];if(m?.collection===a)e.schema.tags.push(Object.assign({},m,{default:!1})),c=m;else return m?n(o,"BAD_COLLECTION_TYPE",`${m.tag} used for ${a} collection, but expects ${m.collection??"scalar"}`,!0):n(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0),ev(t,e,r,n,s)}let u=ev(t,e,r,n,s,c),l=c.resolve?.(u,m=>n(o,"TAG_RESOLVE_FAILED",m),e.options)??u,d=HU.isNode(l)?l:new WU.Scalar(l);return d.range=u.range,d.tag=s,c?.format&&(d.format=c.format),d}zI.composeCollection=t2});var rv=$(TI=>{"use strict";var tv=De();function r2(t,e,r){let i=e.offset,n=n2(e,t.options.strict,r);if(!n)return{value:"",type:null,comment:"",range:[i,i,i]};let o=n.mode===">"?tv.Scalar.BLOCK_FOLDED:tv.Scalar.BLOCK_LITERAL,s=e.source?i2(e.source):[],a=s.length;for(let p=s.length-1;p>=0;--p){let g=s[p][1];if(g===""||g==="\r")a=p;else break}if(a===0){let p=n.chomp==="+"&&s.length>0?`
|
|
110
|
-
`.repeat(Math.max(1,s.length-1)):"",g=i+n.length;return e.source&&(g+=e.source.length),{value:p,type:o,comment:n.comment,range:[i,g,g]}}let c=e.indent+n.indent,u=e.offset+n.length,l=0;for(let p=0;p<a;++p){let[g,v]=s[p];if(v===""||v==="\r")n.indent===0&&g.length>c&&(c=g.length);else{g.length<c&&r(u+g.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),n.indent===0&&(c=g.length),l=p,c===0&&!t.atRoot&&r(u,"BAD_INDENT","Block scalar values in collections must be indented");break}u+=g.length+v.length+1}for(let p=s.length-1;p>=a;--p)s[p][0].length>c&&(a=p+1);let d="",m="",h=!1;for(let p=0;p<l;++p)d+=s[p][0].slice(c)+`
|
|
111
|
-
`;for(let p=l;p<a;++p){let[g,v]=s[p];u+=g.length+v.length+1;let y=v[v.length-1]==="\r";if(y&&(v=v.slice(0,-1)),v&&g.length<c){let w=`Block scalar lines must not be less indented than their ${n.indent?"explicit indentation indicator":"first line"}`;r(u-v.length-(y?2:1),"BAD_INDENT",w),g=""}o===tv.Scalar.BLOCK_LITERAL?(d+=m+g.slice(c)+v,m=`
|
|
112
|
-
`):g.length>c||v[0]===" "?(m===" "?m=`
|
|
113
|
-
`:!h&&m===`
|
|
114
|
-
`&&(m=`
|
|
115
|
-
|
|
116
|
-
`),d+=m+g.slice(c)+v,m=`
|
|
117
|
-
`,h=!0):v===""?m===`
|
|
118
|
-
`?d+=`
|
|
119
|
-
`:m=`
|
|
120
|
-
`:(d+=m+v,m=" ",h=!1)}switch(n.chomp){case"-":break;case"+":for(let p=a;p<s.length;++p)d+=`
|
|
121
|
-
`+s[p][0].slice(c);d[d.length-1]!==`
|
|
122
|
-
`&&(d+=`
|
|
123
|
-
`);break;default:d+=`
|
|
124
|
-
`}let f=i+n.length+e.source.length;return{value:d,type:o,comment:n.comment,range:[i,f,f]}}function n2({offset:t,props:e},r,i){if(e[0].type!=="block-scalar-header")return i(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:n}=e[0],o=n[0],s=0,a="",c=-1;for(let m=1;m<n.length;++m){let h=n[m];if(!a&&(h==="-"||h==="+"))a=h;else{let f=Number(h);!s&&f?s=f:c===-1&&(c=t+m)}}c!==-1&&i(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${n}`);let u=!1,l="",d=n.length;for(let m=1;m<e.length;++m){let h=e[m];switch(h.type){case"space":u=!0;case"newline":d+=h.source.length;break;case"comment":r&&!u&&i(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),d+=h.source.length,l=h.source.substring(1);break;case"error":i(h,"UNEXPECTED_TOKEN",h.message),d+=h.source.length;break;default:{let f=`Unexpected token in block scalar header: ${h.type}`;i(h,"UNEXPECTED_TOKEN",f);let p=h.source;p&&typeof p=="string"&&(d+=p.length)}}}return{mode:o,indent:s,chomp:a,comment:l,length:d}}function i2(t){let e=t.split(/\n( *)/),r=e[0],i=r.match(/^( *)/),o=[i?.[1]?[i[1],r.slice(i[1].length)]:["",r]];for(let s=1;s<e.length;s+=2)o.push([e[s],e[s+1]]);return o}TI.resolveBlockScalar=r2});var iv=$(AI=>{"use strict";var nv=De(),o2=Fi();function s2(t,e,r){let{offset:i,type:n,source:o,end:s}=t,a,c,u=(m,h,f)=>r(i+m,h,f);switch(n){case"scalar":a=nv.Scalar.PLAIN,c=a2(o,u);break;case"single-quoted-scalar":a=nv.Scalar.QUOTE_SINGLE,c=c2(o,u);break;case"double-quoted-scalar":a=nv.Scalar.QUOTE_DOUBLE,c=u2(o,u);break;default:return r(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${n}`),{value:"",type:null,comment:"",range:[i,i+o.length,i+o.length]}}let l=i+o.length,d=o2.resolveEnd(s,l,e,r);return{value:c,type:a,comment:d.comment,range:[i,l,d.offset]}}function a2(t,e){let r="";switch(t[0]){case" ":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${t[0]}`;break}case"@":case"`":{r=`reserved character ${t[0]}`;break}}return r&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),jI(t)}function c2(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),jI(t.slice(1,-1)).replace(/''/g,"'")}function jI(t){let e,r;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
125
|
-
`,"sy"),r=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
126
|
-
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,r=/[ \t]*(.*?)[ \t]*\r?\n/sy}let i=e.exec(t);if(!i)return t;let n=i[1],o=" ",s=e.lastIndex;for(r.lastIndex=s;i=r.exec(t);)i[1]===""?o===`
|
|
127
|
-
`?n+=o:o=`
|
|
128
|
-
`:(n+=o+i[1],o=" "),s=r.lastIndex;let a=/[ \t]*(.*)/sy;return a.lastIndex=s,i=a.exec(t),n+o+(i?.[1]??"")}function u2(t,e){let r="";for(let i=1;i<t.length-1;++i){let n=t[i];if(!(n==="\r"&&t[i+1]===`
|
|
129
|
-
`))if(n===`
|
|
130
|
-
`){let{fold:o,offset:s}=l2(t,i);r+=o,i=s}else if(n==="\\"){let o=t[++i],s=d2[o];if(s)r+=s;else if(o===`
|
|
131
|
-
`)for(o=t[i+1];o===" "||o===" ";)o=t[++i+1];else if(o==="\r"&&t[i+1]===`
|
|
132
|
-
`)for(o=t[++i+1];o===" "||o===" ";)o=t[++i+1];else if(o==="x"||o==="u"||o==="U"){let a=o==="x"?2:o==="u"?4:8;r+=f2(t,i+1,a,e),i+=a}else{let a=t.substr(i-1,2);e(i-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),r+=a}}else if(n===" "||n===" "){let o=i,s=t[i+1];for(;s===" "||s===" ";)s=t[++i+1];s!==`
|
|
133
|
-
`&&!(s==="\r"&&t[i+2]===`
|
|
134
|
-
`)&&(r+=i>o?t.slice(o,i+1):n)}else r+=n}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),r}function l2(t,e){let r="",i=t[e+1];for(;(i===" "||i===" "||i===`
|
|
135
|
-
`||i==="\r")&&!(i==="\r"&&t[e+2]!==`
|
|
136
|
-
`);)i===`
|
|
137
|
-
`&&(r+=`
|
|
138
|
-
`),e+=1,i=t[e+1];return r||(r=" "),{fold:r,offset:e}}var d2={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
139
|
-
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function f2(t,e,r,i){let n=t.substr(e,r),s=n.length===r&&/^[0-9a-fA-F]+$/.test(n)?parseInt(n,16):NaN;try{return String.fromCodePoint(s)}catch{let a=t.substr(e-2,r+2);return i(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}AI.resolveFlowScalar=s2});var DI=$(RI=>{"use strict";var Vn=ce(),CI=De(),p2=rv(),m2=iv();function h2(t,e,r,i){let{value:n,type:o,comment:s,range:a}=e.type==="block-scalar"?p2.resolveBlockScalar(t,e,i):m2.resolveFlowScalar(e,t.options.strict,i),c=r?t.directives.tagName(r.source,d=>i(r,"TAG_RESOLVE_FAILED",d)):null,u;t.options.stringKeys&&t.atKey?u=t.schema[Vn.SCALAR]:c?u=g2(t.schema,n,c,r,i):e.type==="scalar"?u=y2(t,n,e,i):u=t.schema[Vn.SCALAR];let l;try{let d=u.resolve(n,m=>i(r??e,"TAG_RESOLVE_FAILED",m),t.options);l=Vn.isScalar(d)?d:new CI.Scalar(d)}catch(d){let m=d instanceof Error?d.message:String(d);i(r??e,"TAG_RESOLVE_FAILED",m),l=new CI.Scalar(n)}return l.range=a,l.source=n,o&&(l.type=o),c&&(l.tag=c),u.format&&(l.format=u.format),s&&(l.comment=s),l}function g2(t,e,r,i,n){if(r==="!")return t[Vn.SCALAR];let o=[];for(let a of t.tags)if(!a.collection&&a.tag===r)if(a.default&&a.test)o.push(a);else return a;for(let a of o)if(a.test?.test(e))return a;let s=t.knownTags[r];return s&&!s.collection?(t.tags.push(Object.assign({},s,{default:!1,test:void 0})),s):(n(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),t[Vn.SCALAR])}function y2({atKey:t,directives:e,schema:r},i,n,o){let s=r.tags.find(a=>(a.default===!0||t&&a.default==="key")&&a.test?.test(i))||r[Vn.SCALAR];if(r.compat){let a=r.compat.find(c=>c.default&&c.test?.test(i))??r[Vn.SCALAR];if(s.tag!==a.tag){let c=e.tagString(s.tag),u=e.tagString(a.tag),l=`Value may be parsed as either ${c} or ${u}`;o(n,"TAG_RESOLVE_FAILED",l,!0)}}return s}RI.composeScalar=h2});var UI=$(MI=>{"use strict";function v2(t,e,r){if(e){r??(r=e.length);for(let i=r-1;i>=0;--i){let n=e[i];switch(n.type){case"space":case"comment":case"newline":t-=n.source.length;continue}for(n=e[++i];n?.type==="space";)t+=n.source.length,n=e[++i];break}}return t}MI.emptyScalarPosition=v2});var ZI=$(sv=>{"use strict";var b2=Ts(),_2=ce(),$2=PI(),LI=DI(),w2=Fi(),k2=UI(),S2={composeNode:qI,composeEmptyNode:ov};function qI(t,e,r,i){let n=t.atKey,{spaceBefore:o,comment:s,anchor:a,tag:c}=r,u,l=!0;switch(e.type){case"alias":u=x2(t,e,i),(a||c)&&i(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":u=LI.composeScalar(t,e,c,i),a&&(u.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{u=$2.composeCollection(S2,t,e,r,i),a&&(u.anchor=a.source.substring(1))}catch(d){let m=d instanceof Error?d.message:String(d);i(e,"RESOURCE_EXHAUSTION",m)}break;default:{let d=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;i(e,"UNEXPECTED_TOKEN",d),l=!1}}return u??(u=ov(t,e.offset,void 0,null,r,i)),a&&u.anchor===""&&i(a,"BAD_ALIAS","Anchor cannot be an empty string"),n&&t.options.stringKeys&&(!_2.isScalar(u)||typeof u.value!="string"||u.tag&&u.tag!=="tag:yaml.org,2002:str")&&i(c??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(u.spaceBefore=!0),s&&(e.type==="scalar"&&e.source===""?u.comment=s:u.commentBefore=s),t.options.keepSourceTokens&&l&&(u.srcToken=e),u}function ov(t,e,r,i,{spaceBefore:n,comment:o,anchor:s,tag:a,end:c},u){let l={type:"scalar",offset:k2.emptyScalarPosition(e,r,i),indent:-1,source:""},d=LI.composeScalar(t,l,a,u);return s&&(d.anchor=s.source.substring(1),d.anchor===""&&u(s,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(d.spaceBefore=!0),o&&(d.comment=o,d.range[2]=c),d}function x2({options:t},{offset:e,source:r,end:i},n){let o=new b2.Alias(r.substring(1));o.source===""&&n(e,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&n(e+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let s=e+r.length,a=w2.resolveEnd(i,s,t.strict,n);return o.range=[e,s,a.offset],a.comment&&(o.comment=a.comment),o}sv.composeEmptyNode=ov;sv.composeNode=qI});var JI=$(VI=>{"use strict";var I2=Hs(),FI=ZI(),E2=Fi(),O2=Xs();function N2(t,e,{offset:r,start:i,value:n,end:o},s){let a=Object.assign({_directives:e},t),c=new I2.Document(void 0,a),u={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},l=O2.resolveProps(i,{indicator:"doc-start",next:n??o?.[0],offset:r,onError:s,parentIndent:0,startOnNewline:!0});l.found&&(c.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!l.hasNewline&&s(l.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=n?FI.composeNode(u,n,l,s):FI.composeEmptyNode(u,l.end,i,null,l,s);let d=c.contents.range[2],m=E2.resolveEnd(o,d,!1,s);return m.comment&&(c.comment=m.comment),c.range=[r,d,m.offset],c}VI.composeDoc=N2});var cv=$(HI=>{"use strict";var z2=xc("process"),P2=Kg(),T2=Hs(),Qs=Ys(),BI=ce(),j2=JI(),A2=Fi();function ea(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];let{offset:e,source:r}=t;return[e,e+(typeof r=="string"?r.length:1)]}function KI(t){let e="",r=!1,i=!1;for(let n=0;n<t.length;++n){let o=t[n];switch(o[0]){case"#":e+=(e===""?"":i?`
|
|
140
|
-
|
|
141
|
-
`:`
|
|
142
|
-
`)+(o.substring(1)||" "),r=!0,i=!1;break;case"%":t[n+1]?.[0]!=="#"&&(n+=1),r=!1;break;default:r||(i=!0),r=!1}}return{comment:e,afterEmptyLine:i}}var av=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(r,i,n,o)=>{let s=ea(r);o?this.warnings.push(new Qs.YAMLWarning(s,i,n)):this.errors.push(new Qs.YAMLParseError(s,i,n))},this.directives=new P2.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,r){let{comment:i,afterEmptyLine:n}=KI(this.prelude);if(i){let o=e.contents;if(r)e.comment=e.comment?`${e.comment}
|
|
143
|
-
${i}`:i;else if(n||e.directives.docStart||!o)e.commentBefore=i;else if(BI.isCollection(o)&&!o.flow&&o.items.length>0){let s=o.items[0];BI.isPair(s)&&(s=s.key);let a=s.commentBefore;s.commentBefore=a?`${i}
|
|
144
|
-
${a}`:i}else{let s=o.commentBefore;o.commentBefore=s?`${i}
|
|
145
|
-
${s}`:i}}if(r){for(let o=0;o<this.errors.length;++o)e.errors.push(this.errors[o]);for(let o=0;o<this.warnings.length;++o)e.warnings.push(this.warnings[o])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:KI(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,r=!1,i=-1){for(let n of e)yield*this.next(n);yield*this.end(r,i)}*next(e){switch(z2.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(r,i,n)=>{let o=ea(e);o[0]+=r,this.onError(o,"BAD_DIRECTIVE",i,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let r=j2.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(r,!1),this.doc&&(yield this.doc),this.doc=r,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let r=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,i=new Qs.YAMLParseError(ea(e),"UNEXPECTED_TOKEN",r);this.atDirectives||!this.doc?this.errors.push(i):this.doc.errors.push(i);break}case"doc-end":{if(!this.doc){let i="Unexpected doc-end without preceding document";this.errors.push(new Qs.YAMLParseError(ea(e),"UNEXPECTED_TOKEN",i));break}this.doc.directives.docEnd=!0;let r=A2.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),r.comment){let i=this.doc.comment;this.doc.comment=i?`${i}
|
|
146
|
-
${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new Qs.YAMLParseError(ea(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let i=Object.assign({_directives:this.directives},this.options),n=new T2.Document(void 0,i);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,r,r],this.decorate(n,!1),yield n}}};HI.Composer=av});var YI=$(al=>{"use strict";var C2=rv(),R2=iv(),D2=Ys(),WI=Ds();function M2(t,e=!0,r){if(t){let i=(n,o,s)=>{let a=typeof n=="number"?n:Array.isArray(n)?n[0]:n.offset;if(r)r(a,o,s);else throw new D2.YAMLParseError([a,a+1],o,s)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return R2.resolveFlowScalar(t,e,i);case"block-scalar":return C2.resolveBlockScalar({options:{strict:e}},t,i)}}return null}function U2(t,e){let{implicitKey:r=!1,indent:i,inFlow:n=!1,offset:o=-1,type:s="PLAIN"}=e,a=WI.stringifyString({type:s,value:t},{implicitKey:r,indent:i>0?" ".repeat(i):"",inFlow:n,options:{blockQuote:!0,lineWidth:-1}}),c=e.end??[{type:"newline",offset:-1,indent:i,source:`
|
|
147
|
-
`}];switch(a[0]){case"|":case">":{let u=a.indexOf(`
|
|
148
|
-
`),l=a.substring(0,u),d=a.substring(u+1)+`
|
|
149
|
-
`,m=[{type:"block-scalar-header",offset:o,indent:i,source:l}];return GI(m,c)||m.push({type:"newline",offset:-1,indent:i,source:`
|
|
150
|
-
`}),{type:"block-scalar",offset:o,indent:i,props:m,source:d}}case'"':return{type:"double-quoted-scalar",offset:o,indent:i,source:a,end:c};case"'":return{type:"single-quoted-scalar",offset:o,indent:i,source:a,end:c};default:return{type:"scalar",offset:o,indent:i,source:a,end:c}}}function L2(t,e,r={}){let{afterKey:i=!1,implicitKey:n=!1,inFlow:o=!1,type:s}=r,a="indent"in t?t.indent:null;if(i&&typeof a=="number"&&(a+=2),!s)switch(t.type){case"single-quoted-scalar":s="QUOTE_SINGLE";break;case"double-quoted-scalar":s="QUOTE_DOUBLE";break;case"block-scalar":{let u=t.props[0];if(u.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s=u.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:s="PLAIN"}let c=WI.stringifyString({type:s,value:e},{implicitKey:n||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":q2(t,c);break;case'"':uv(t,c,"double-quoted-scalar");break;case"'":uv(t,c,"single-quoted-scalar");break;default:uv(t,c,"scalar")}}function q2(t,e){let r=e.indexOf(`
|
|
151
|
-
`),i=e.substring(0,r),n=e.substring(r+1)+`
|
|
152
|
-
`;if(t.type==="block-scalar"){let o=t.props[0];if(o.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o.source=i,t.source=n}else{let{offset:o}=t,s="indent"in t?t.indent:-1,a=[{type:"block-scalar-header",offset:o,indent:s,source:i}];GI(a,"end"in t?t.end:void 0)||a.push({type:"newline",offset:-1,indent:s,source:`
|
|
153
|
-
`});for(let c of Object.keys(t))c!=="type"&&c!=="offset"&&delete t[c];Object.assign(t,{type:"block-scalar",indent:s,props:a,source:n})}}function GI(t,e){if(e)for(let r of e)switch(r.type){case"space":case"comment":t.push(r);break;case"newline":return t.push(r),!0}return!1}function uv(t,e,r){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=r,t.source=e;break;case"block-scalar":{let i=t.props.slice(1),n=e.length;t.props[0].type==="block-scalar-header"&&(n-=t.props[0].source.length);for(let o of i)o.offset+=n;delete t.props,Object.assign(t,{type:r,source:e,end:i});break}case"block-map":case"block-seq":{let n={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
|
|
154
|
-
`};delete t.items,Object.assign(t,{type:r,source:e,end:[n]});break}default:{let i="indent"in t?t.indent:-1,n="end"in t&&Array.isArray(t.end)?t.end.filter(o=>o.type==="space"||o.type==="comment"||o.type==="newline"):[];for(let o of Object.keys(t))o!=="type"&&o!=="offset"&&delete t[o];Object.assign(t,{type:r,indent:i,source:e,end:n})}}}al.createScalarToken=U2;al.resolveAsScalar=M2;al.setScalarValue=L2});var QI=$(XI=>{"use strict";var Z2=t=>"type"in t?ul(t):cl(t);function ul(t){switch(t.type){case"block-scalar":{let e="";for(let r of t.props)e+=ul(r);return e+t.source}case"block-map":case"block-seq":{let e="";for(let r of t.items)e+=cl(r);return e}case"flow-collection":{let e=t.start.source;for(let r of t.items)e+=cl(r);for(let r of t.end)e+=r.source;return e}case"document":{let e=cl(t);if(t.end)for(let r of t.end)e+=r.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(let r of t.end)e+=r.source;return e}}}function cl({start:t,key:e,sep:r,value:i}){let n="";for(let o of t)n+=o.source;if(e&&(n+=ul(e)),r)for(let o of r)n+=o.source;return i&&(n+=ul(i)),n}XI.stringify=Z2});var nE=$(rE=>{"use strict";var lv=Symbol("break visit"),F2=Symbol("skip children"),eE=Symbol("remove item");function Jn(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),tE(Object.freeze([]),t,e)}Jn.BREAK=lv;Jn.SKIP=F2;Jn.REMOVE=eE;Jn.itemAtPath=(t,e)=>{let r=t;for(let[i,n]of e){let o=r?.[i];if(o&&"items"in o)r=o.items[n];else return}return r};Jn.parentCollection=(t,e)=>{let r=Jn.itemAtPath(t,e.slice(0,-1)),i=e[e.length-1][0],n=r?.[i];if(n&&"items"in n)return n;throw new Error("Parent collection not found")};function tE(t,e,r){let i=r(e,t);if(typeof i=="symbol")return i;for(let n of["key","value"]){let o=e[n];if(o&&"items"in o){for(let s=0;s<o.items.length;++s){let a=tE(Object.freeze(t.concat([[n,s]])),o.items[s],r);if(typeof a=="number")s=a-1;else{if(a===lv)return lv;a===eE&&(o.items.splice(s,1),s-=1)}}typeof i=="function"&&n==="key"&&(i=i(e,t))}}return typeof i=="function"?i(e,t):i}rE.visit=Jn});var ll=$(ft=>{"use strict";var dv=YI(),V2=QI(),J2=nE(),fv="\uFEFF",pv="",mv="",hv="",B2=t=>!!t&&"items"in t,K2=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function H2(t){switch(t){case fv:return"<BOM>";case pv:return"<DOC>";case mv:return"<FLOW_END>";case hv:return"<SCALAR>";default:return JSON.stringify(t)}}function W2(t){switch(t){case fv:return"byte-order-mark";case pv:return"doc-mode";case mv:return"flow-error-end";case hv:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
155
|
-
`:case`\r
|
|
156
|
-
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}ft.createScalarToken=dv.createScalarToken;ft.resolveAsScalar=dv.resolveAsScalar;ft.setScalarValue=dv.setScalarValue;ft.stringify=V2.stringify;ft.visit=J2.visit;ft.BOM=fv;ft.DOCUMENT=pv;ft.FLOW_END=mv;ft.SCALAR=hv;ft.isCollection=B2;ft.isScalar=K2;ft.prettyToken=H2;ft.tokenType=W2});var vv=$(oE=>{"use strict";var ta=ll();function Kt(t){switch(t){case void 0:case" ":case`
|
|
157
|
-
`:case"\r":case" ":return!0;default:return!1}}var iE=new Set("0123456789ABCDEFabcdef"),G2=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),dl=new Set(",[]{}"),Y2=new Set(` ,[]{}
|
|
158
|
-
\r `),gv=t=>!t||Y2.has(t),yv=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,r=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!r;let i=this.next??"stream";for(;i&&(r||this.hasChars(1));)i=yield*this.parseNext(i)}atLineEnd(){let e=this.pos,r=this.buffer[e];for(;r===" "||r===" ";)r=this.buffer[++e];return!r||r==="#"||r===`
|
|
159
|
-
`?!0:r==="\r"?this.buffer[e+1]===`
|
|
160
|
-
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let r=this.buffer[e];if(this.indentNext>0){let i=0;for(;r===" ";)r=this.buffer[++i+e];if(r==="\r"){let n=this.buffer[i+e+1];if(n===`
|
|
161
|
-
`||!n&&!this.atEnd)return e+i+1}return r===`
|
|
162
|
-
`||i>=this.indentNext||!r&&!this.atEnd?e+i:-1}if(r==="-"||r==="."){let i=this.buffer.substr(e,3);if((i==="---"||i==="...")&&Kt(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
|
163
|
-
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===ta.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let r=e.length,i=e.indexOf("#");for(;i!==-1;){let o=e[i-1];if(o===" "||o===" "){r=i-1;break}else i=e.indexOf("#",i+1)}for(;;){let o=e[r-1];if(o===" "||o===" ")r-=1;else break}let n=(yield*this.pushCount(r))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){let r=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-r),yield*this.pushNewline(),"stream"}return yield ta.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let r=this.peek(3);if((r==="---"||r==="...")&&Kt(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,r==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Kt(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,r]=this.peek(2);if(!r&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&Kt(r)){let i=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=i,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let r=yield*this.pushIndicators();switch(e[r]){case"#":yield*this.pushCount(e.length-r);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(gv),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return r+=yield*this.parseBlockScalarHeader(),r+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-r),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,r,i=-1;do e=yield*this.pushNewline(),e>0?(r=yield*this.pushSpaces(!1),this.indentValue=i=r):r=0,r+=yield*this.pushSpaces(!0);while(e+r>0);let n=this.getLine();if(n===null)return this.setNext("flow");if((i!==-1&&i<this.indentNext&&n[0]!=="#"||i===0&&(n.startsWith("---")||n.startsWith("..."))&&Kt(n[3]))&&!(i===this.indentNext-1&&this.flowLevel===1&&(n[0]==="]"||n[0]==="}")))return this.flowLevel=0,yield ta.FLOW_END,yield*this.parseLineStart();let o=0;for(;n[o]===",";)o+=yield*this.pushCount(1),o+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(o+=yield*this.pushIndicators(),n[o]){case void 0:return"flow";case"#":return yield*this.pushCount(n.length-o),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(gv),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let s=this.charAt(1);if(this.flowKey||Kt(s)||s===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),r=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;r!==-1&&this.buffer[r+1]==="'";)r=this.buffer.indexOf("'",r+2);else for(;r!==-1;){let o=0;for(;this.buffer[r-1-o]==="\\";)o+=1;if(o%2===0)break;r=this.buffer.indexOf('"',r+1)}let i=this.buffer.substring(0,r),n=i.indexOf(`
|
|
164
|
-
`,this.pos);if(n!==-1){for(;n!==-1;){let o=this.continueScalar(n+1);if(o===-1)break;n=i.indexOf(`
|
|
165
|
-
`,o)}n!==-1&&(r=n-(i[n-1]==="\r"?2:1))}if(r===-1){if(!this.atEnd)return this.setNext("quoted-scalar");r=this.buffer.length}return yield*this.pushToIndex(r+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let r=this.buffer[++e];if(r==="+")this.blockScalarKeep=!0;else if(r>"0"&&r<="9")this.blockScalarIndent=Number(r)-1;else if(r!=="-")break}return yield*this.pushUntil(r=>Kt(r)||r==="#")}*parseBlockScalar(){let e=this.pos-1,r=0,i;e:for(let o=this.pos;i=this.buffer[o];++o)switch(i){case" ":r+=1;break;case`
|
|
166
|
-
`:e=o,r=0;break;case"\r":{let s=this.buffer[o+1];if(!s&&!this.atEnd)return this.setNext("block-scalar");if(s===`
|
|
167
|
-
`)break}default:break e}if(!i&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=r:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let o=this.continueScalar(e+1);if(o===-1)break;e=this.buffer.indexOf(`
|
|
168
|
-
`,o)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let n=e+1;for(i=this.buffer[n];i===" ";)i=this.buffer[++n];if(i===" "){for(;i===" "||i===" "||i==="\r"||i===`
|
|
169
|
-
`;)i=this.buffer[++n];e=n-1}else if(!this.blockScalarKeep)do{let o=e-1,s=this.buffer[o];s==="\r"&&(s=this.buffer[--o]);let a=o;for(;s===" ";)s=this.buffer[--o];if(s===`
|
|
170
|
-
`&&o>=this.pos&&o+1+r>a)e=o;else break}while(!0);return yield ta.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,r=this.pos-1,i=this.pos-1,n;for(;n=this.buffer[++i];)if(n===":"){let o=this.buffer[i+1];if(Kt(o)||e&&dl.has(o))break;r=i}else if(Kt(n)){let o=this.buffer[i+1];if(n==="\r"&&(o===`
|
|
171
|
-
`?(i+=1,n=`
|
|
172
|
-
`,o=this.buffer[i+1]):r=i),o==="#"||e&&dl.has(o))break;if(n===`
|
|
173
|
-
`){let s=this.continueScalar(i+1);if(s===-1)break;i=Math.max(i,s-2)}}else{if(e&&dl.has(n))break;r=i}return!n&&!this.atEnd?this.setNext("plain-scalar"):(yield ta.SCALAR,yield*this.pushToIndex(r+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,r){let i=this.buffer.slice(this.pos,e);return i?(yield i,this.pos+=i.length,i.length):(r&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(gv),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let r=this.flowLevel>0,i=this.charAt(1);if(Kt(i)||r&&dl.has(i)){r?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,r=this.buffer[e];for(;!Kt(r)&&r!==">";)r=this.buffer[++e];return yield*this.pushToIndex(r===">"?e+1:e,!1)}else{let e=this.pos+1,r=this.buffer[e];for(;r;)if(G2.has(r))r=this.buffer[++e];else if(r==="%"&&iE.has(this.buffer[e+1])&&iE.has(this.buffer[e+2]))r=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
|
|
174
|
-
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
|
175
|
-
`?yield*this.pushCount(2):0}*pushSpaces(e){let r=this.pos-1,i;do i=this.buffer[++r];while(i===" "||e&&i===" ");let n=r-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=r),n}*pushUntil(e){let r=this.pos,i=this.buffer[r];for(;!e(i);)i=this.buffer[++r];return yield*this.pushToIndex(r,!1)}};oE.Lexer=yv});var _v=$(sE=>{"use strict";var bv=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let r=0,i=this.lineStarts.length;for(;r<i;){let o=r+i>>1;this.lineStarts[o]<e?r=o+1:i=o}if(this.lineStarts[r]===e)return{line:r+1,col:1};if(r===0)return{line:0,col:e};let n=this.lineStarts[r-1];return{line:r,col:e-n+1}}}};sE.LineCounter=bv});var wv=$(dE=>{"use strict";var X2=xc("process"),aE=ll(),Q2=vv();function rn(t,e){for(let r=0;r<t.length;++r)if(t[r].type===e)return!0;return!1}function cE(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function lE(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function fl(t){switch(t.type){case"document":return t.start;case"block-map":{let e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function Vi(t){if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}function pl(t,e){if(e.length<1e5)Array.prototype.push.apply(t,e);else for(let r=0;r<e.length;++r)t.push(e[r])}function uE(t){if(t.start.type==="flow-seq-start")for(let e of t.items)e.sep&&!e.value&&!rn(e.start,"explicit-key-ind")&&!rn(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,lE(e.value)?e.value.end?pl(e.value.end,e.sep):e.value.end=e.sep:pl(e.start,e.sep),delete e.sep)}var $v=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Q2.Lexer,this.onNewLine=e}*parse(e,r=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let i of this.lexer.lex(e,r))yield*this.next(i);r||(yield*this.end())}*next(e){if(this.source=e,X2.env.LOG_TOKENS&&console.log("|",aE.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let r=aE.tokenType(e);if(r)if(r==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let i=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:i,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let r=e??this.stack.pop();if(!r)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield r;else{let i=this.peek(1);switch(r.type==="block-scalar"?r.indent="indent"in i?i.indent:0:r.type==="flow-collection"&&i.type==="document"&&(r.indent=0),r.type==="flow-collection"&&uE(r),i.type){case"document":i.value=r;break;case"block-scalar":i.props.push(r);break;case"block-map":{let n=i.items[i.items.length-1];if(n.value){i.items.push({start:[],key:r,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=r;else{Object.assign(n,{key:r,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{let n=i.items[i.items.length-1];n.value?i.items.push({start:[],value:r}):n.value=r;break}case"flow-collection":{let n=i.items[i.items.length-1];!n||n.value?i.items.push({start:[],key:r,sep:[]}):n.sep?n.value=r:Object.assign(n,{key:r,sep:[]});return}default:yield*this.pop(),yield*this.pop(r)}if((i.type==="document"||i.type==="block-map"||i.type==="block-seq")&&(r.type==="block-map"||r.type==="block-seq")){let n=r.items[r.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&cE(n.start)===-1&&(r.indent===0||n.start.every(o=>o.type!=="comment"||o.indent<r.indent))&&(i.type==="document"?i.end=n.start:i.items.push({start:n.start}),r.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{cE(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let r=this.startBlockValue(e);r?this.stack.push(r):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let r=fl(this.peek(2)),i=Vi(r),n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];let o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let r=this.source.indexOf(`
|
|
176
|
-
`)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
|
|
177
|
-
`,r)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let r=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,r.value){let i="end"in r.value?r.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else if(r.sep)r.sep.push(this.sourceToken);else{if(this.atIndentedComment(r.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){pl(n,r.start),n.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let i=!this.onKeyLine&&this.indent===e.indent,n=i&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind",o=[];if(n&&r.sep&&!r.value){let s=[];for(let a=0;a<r.sep.length;++a){let c=r.sep[a];switch(c.type){case"newline":s.push(a);break;case"space":break;case"comment":c.indent>e.indent&&(s.length=0);break;default:s.length=0}}s.length>=2&&(o=r.sep.splice(s[1]))}switch(this.type){case"anchor":case"tag":n||r.value?(o.push(this.sourceToken),e.items.push({start:o}),this.onKeyLine=!0):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"explicit-key-ind":!r.sep&&!r.explicitKey?(r.start.push(this.sourceToken),r.explicitKey=!0):n||r.value?(o.push(this.sourceToken),e.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(r.explicitKey)if(r.sep)if(r.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(rn(r.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(lE(r.key)&&!rn(r.sep,"newline")){let s=Vi(r.start),a=r.key,c=r.sep;c.push(this.sourceToken),delete r.key,delete r.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:a,sep:c}]})}else o.length>0?r.sep=r.sep.concat(o,this.sourceToken):r.sep.push(this.sourceToken);else if(rn(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{let s=Vi(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||n?e.items.push({start:o,key:null,sep:[this.sourceToken]}):rn(r.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let s=this.flowScalar(this.type);n||r.value?(e.items.push({start:o,key:s,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(s):(Object.assign(r,{key:s,sep:[]}),this.onKeyLine=!0);return}default:{let s=this.startBlockValue(e);if(s){if(s.type==="block-seq"){if(!r.explicitKey&&r.sep&&!rn(r.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else i&&e.items.push({start:o});this.stack.push(s);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let r=e.items[e.items.length-1];switch(this.type){case"newline":if(r.value){let i="end"in r.value?r.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){pl(n,r.start),n.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=e.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;r.value||rn(r.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>e.indent){let i=this.startBlockValue(e);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let r=e.items[e.items.length-1];if(this.type==="flow-error-end"){let i;do yield*this.pop(),i=this.peek(1);while(i?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!r||r.value?e.items.push({start:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let n=this.flowScalar(this.type);!r||r.value?e.items.push({start:[],key:n,sep:[]}):r.sep?this.stack.push(n):Object.assign(r,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let i=this.startBlockValue(e);i?this.stack.push(i):(yield*this.pop(),yield*this.step())}else{let i=this.peek(2);if(i.type==="block-map"&&(this.type==="map-value-ind"&&i.indent===e.indent||this.type==="newline"&&!i.items[i.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&i.type!=="flow-collection"){let n=fl(i),o=Vi(n);uE(e);let s=e.end.splice(1,e.end.length);s.push(this.sourceToken);let a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:o,key:e,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let r=this.source.indexOf(`
|
|
178
|
-
`)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
|
|
179
|
-
`,r)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let r=fl(e),i=Vi(r);return i.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let r=fl(e),i=Vi(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,r){return this.type!=="comment"||this.indent<=r?!1:e.every(i=>i.type==="newline"||i.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};dE.Parser=$v});var gE=$(na=>{"use strict";var fE=cv(),eL=Hs(),ra=Ys(),tL=sy(),rL=ce(),nL=_v(),pE=wv();function mE(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new nL.LineCounter||null,prettyErrors:e}}function iL(t,e={}){let{lineCounter:r,prettyErrors:i}=mE(e),n=new pE.Parser(r?.addNewLine),o=new fE.Composer(e),s=Array.from(o.compose(n.parse(t)));if(i&&r)for(let a of s)a.errors.forEach(ra.prettifyError(t,r)),a.warnings.forEach(ra.prettifyError(t,r));return s.length>0?s:Object.assign([],{empty:!0},o.streamInfo())}function hE(t,e={}){let{lineCounter:r,prettyErrors:i}=mE(e),n=new pE.Parser(r?.addNewLine),o=new fE.Composer(e),s=null;for(let a of o.compose(n.parse(t),!0,t.length))if(!s)s=a;else if(s.options.logLevel!=="silent"){s.errors.push(new ra.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&r&&(s.errors.forEach(ra.prettifyError(t,r)),s.warnings.forEach(ra.prettifyError(t,r))),s}function oL(t,e,r){let i;typeof e=="function"?i=e:r===void 0&&e&&typeof e=="object"&&(r=e);let n=hE(t,r);if(!n)return null;if(n.warnings.forEach(o=>tL.warn(n.options.logLevel,o)),n.errors.length>0){if(n.options.logLevel!=="silent")throw n.errors[0];n.errors=[]}return n.toJS(Object.assign({reviver:i},r))}function sL(t,e,r){let i=null;if(typeof e=="function"||Array.isArray(e)?i=e:r===void 0&&e&&(r=e),typeof r=="string"&&(r=r.length),typeof r=="number"){let n=Math.round(r);r=n<1?void 0:n>8?{indent:8}:{indent:n}}if(t===void 0){let{keepUndefined:n}=r??e??{};if(!n)return}return rL.isDocument(t)&&!i?t.toString(r):new eL.Document(t,i,r).toString(r)}na.parse=oL;na.parseAllDocuments=iL;na.parseDocument=hE;na.stringify=sL});var vE=$(me=>{"use strict";var aL=cv(),cL=Hs(),uL=Zy(),kv=Ys(),lL=Ts(),nn=ce(),dL=Xr(),fL=De(),pL=en(),mL=tn(),hL=ll(),gL=vv(),yL=_v(),vL=wv(),ml=gE(),yE=Os();me.Composer=aL.Composer;me.Document=cL.Document;me.Schema=uL.Schema;me.YAMLError=kv.YAMLError;me.YAMLParseError=kv.YAMLParseError;me.YAMLWarning=kv.YAMLWarning;me.Alias=lL.Alias;me.isAlias=nn.isAlias;me.isCollection=nn.isCollection;me.isDocument=nn.isDocument;me.isMap=nn.isMap;me.isNode=nn.isNode;me.isPair=nn.isPair;me.isScalar=nn.isScalar;me.isSeq=nn.isSeq;me.Pair=dL.Pair;me.Scalar=fL.Scalar;me.YAMLMap=pL.YAMLMap;me.YAMLSeq=mL.YAMLSeq;me.CST=hL;me.Lexer=gL.Lexer;me.LineCounter=yL.LineCounter;me.Parser=vL.Parser;me.parse=ml.parse;me.parseAllDocuments=ml.parseAllDocuments;me.parseDocument=ml.parseDocument;me.stringify=ml.stringify;me.visit=yE.visit;me.visitAsync=yE.visitAsync});var _E={};Ut(_E,{JSONPath:()=>de});import bL from"vm";function on(t,e){return t=t.slice(),t.push(e),t}function Ov(t,e){return e=e.slice(),e.unshift(t),e}function de(t,e,r,i,n){if(!(this instanceof de))try{return new de(t,e,r,i,n)}catch(s){if(!s.avoidNew)throw s;return s.value}typeof t=="string"&&(n=i,i=r,r=e,e=t,t=null);let o=t&&typeof t=="object";if(t=t||{},this.json=t.json||r,this.path=t.path||e,this.resultType=t.resultType||"value",this.flatten=t.flatten||!1,this.wrap=Object.hasOwn(t,"wrap")?t.wrap:!0,this.sandbox=t.sandbox||{},this.eval=t.eval===void 0?"safe":t.eval,this.ignoreEvalErrors=typeof t.ignoreEvalErrors>"u"?!1:t.ignoreEvalErrors,this.parent=t.parent||null,this.parentProperty=t.parentProperty||null,this.callback=t.callback||i||null,this.otherTypeCallback=t.otherTypeCallback||n||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},t.autostart!==!1){let s={path:o?t.path:e};o?"json"in t&&(s.json=t.json):s.json=r;let a=this.evaluate(s);if(!a||typeof a!="object")throw new Nv(a);return a}}var xv,Iv,pt,_L,ur,$L,wL,kL,bE,SL,xL,Sv,IL,Ji,EL,he,Ev,Nv,$E=Se(()=>{xv=class{add(e,r,i){if(typeof arguments[0]!="string")for(let n in arguments[0])this.add(n,arguments[0][n],arguments[1]);else(Array.isArray(e)?e:[e]).forEach(function(n){this[n]=this[n]||[],r&&this[n][i?"unshift":"push"](r)},this)}run(e,r){this[e]=this[e]||[],this[e].forEach(function(i){i.call(r&&r.context?r.context:r,r)})}},Iv=class{constructor(e){this.jsep=e,this.registered={}}register(...e){e.forEach(r=>{if(typeof r!="object"||!r.name||!r.init)throw new Error("Invalid JSEP plugin format");this.registered[r.name]||(r.init(this.jsep),this.registered[r.name]=r)})}},pt=class t{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+t.version}static addUnaryOp(e){return t.max_unop_len=Math.max(e.length,t.max_unop_len),t.unary_ops[e]=1,t}static addBinaryOp(e,r,i){return t.max_binop_len=Math.max(e.length,t.max_binop_len),t.binary_ops[e]=r,i?t.right_associative.add(e):t.right_associative.delete(e),t}static addIdentifierChar(e){return t.additional_identifier_chars.add(e),t}static addLiteral(e,r){return t.literals[e]=r,t}static removeUnaryOp(e){return delete t.unary_ops[e],e.length===t.max_unop_len&&(t.max_unop_len=t.getMaxKeyLen(t.unary_ops)),t}static removeAllUnaryOps(){return t.unary_ops={},t.max_unop_len=0,t}static removeIdentifierChar(e){return t.additional_identifier_chars.delete(e),t}static removeBinaryOp(e){return delete t.binary_ops[e],e.length===t.max_binop_len&&(t.max_binop_len=t.getMaxKeyLen(t.binary_ops)),t.right_associative.delete(e),t}static removeAllBinaryOps(){return t.binary_ops={},t.max_binop_len=0,t}static removeLiteral(e){return delete t.literals[e],t}static removeAllLiterals(){return t.literals={},t}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(e){this.expr=e,this.index=0}static parse(e){return new t(e).parse()}static getMaxKeyLen(e){return Math.max(0,...Object.keys(e).map(r=>r.length))}static isDecimalDigit(e){return e>=48&&e<=57}static binaryPrecedence(e){return t.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!t.binary_ops[String.fromCharCode(e)]||t.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return t.isIdentifierStart(e)||t.isDecimalDigit(e)}throwError(e){let r=new Error(e+" at character "+this.index);throw r.index=this.index,r.description=e,r}runHook(e,r){if(t.hooks[e]){let i={context:this,node:r};return t.hooks.run(e,i),i.node}return r}searchHook(e){if(t.hooks[e]){let r={context:this};return t.hooks[e].find(function(i){return i.call(r.context,r),r.node}),r.node}}gobbleSpaces(){let e=this.code;for(;e===t.SPACE_CODE||e===t.TAB_CODE||e===t.LF_CODE||e===t.CR_CODE;)e=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let e=this.gobbleExpressions(),r=e.length===1?e[0]:{type:t.COMPOUND,body:e};return this.runHook("after-all",r)}gobbleExpressions(e){let r=[],i,n;for(;this.index<this.expr.length;)if(i=this.code,i===t.SEMCOL_CODE||i===t.COMMA_CODE)this.index++;else if(n=this.gobbleExpression())r.push(n);else if(this.index<this.expr.length){if(i===e)break;this.throwError('Unexpected "'+this.char+'"')}return r}gobbleExpression(){let e=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",e)}gobbleBinaryOp(){this.gobbleSpaces();let e=this.expr.substr(this.index,t.max_binop_len),r=e.length;for(;r>0;){if(t.binary_ops.hasOwnProperty(e)&&(!t.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!t.isIdentifierPart(this.expr.charCodeAt(this.index+e.length))))return this.index+=r,e;e=e.substr(0,--r)}return!1}gobbleBinaryExpression(){let e,r,i,n,o,s,a,c,u;if(s=this.gobbleToken(),!s||(r=this.gobbleBinaryOp(),!r))return s;for(o={value:r,prec:t.binaryPrecedence(r),right_a:t.right_associative.has(r)},a=this.gobbleToken(),a||this.throwError("Expected expression after "+r),n=[s,o,a];r=this.gobbleBinaryOp();){if(i=t.binaryPrecedence(r),i===0){this.index-=r.length;break}o={value:r,prec:i,right_a:t.right_associative.has(r)},u=r;let l=d=>o.right_a&&d.right_a?i>d.prec:i<=d.prec;for(;n.length>2&&l(n[n.length-2]);)a=n.pop(),r=n.pop().value,s=n.pop(),e={type:t.BINARY_EXP,operator:r,left:s,right:a},n.push(e);e=this.gobbleToken(),e||this.throwError("Expected expression after "+u),n.push(o,e)}for(c=n.length-1,e=n[c];c>1;)e={type:t.BINARY_EXP,operator:n[c-1].value,left:n[c-2],right:e},c-=2;return e}gobbleToken(){let e,r,i,n;if(this.gobbleSpaces(),n=this.searchHook("gobble-token"),n)return this.runHook("after-token",n);if(e=this.code,t.isDecimalDigit(e)||e===t.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===t.SQUOTE_CODE||e===t.DQUOTE_CODE)n=this.gobbleStringLiteral();else if(e===t.OBRACK_CODE)n=this.gobbleArray();else{for(r=this.expr.substr(this.index,t.max_unop_len),i=r.length;i>0;){if(t.unary_ops.hasOwnProperty(r)&&(!t.isIdentifierStart(this.code)||this.index+r.length<this.expr.length&&!t.isIdentifierPart(this.expr.charCodeAt(this.index+r.length)))){this.index+=i;let o=this.gobbleToken();return o||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:t.UNARY_EXP,operator:r,argument:o,prefix:!0})}r=r.substr(0,--i)}t.isIdentifierStart(e)?(n=this.gobbleIdentifier(),t.literals.hasOwnProperty(n.name)?n={type:t.LITERAL,value:t.literals[n.name],raw:n.name}:n.name===t.this_str&&(n={type:t.THIS_EXP})):e===t.OPAREN_CODE&&(n=this.gobbleGroup())}return n?(n=this.gobbleTokenProperty(n),this.runHook("after-token",n)):this.runHook("after-token",!1)}gobbleTokenProperty(e){this.gobbleSpaces();let r=this.code;for(;r===t.PERIOD_CODE||r===t.OBRACK_CODE||r===t.OPAREN_CODE||r===t.QUMARK_CODE;){let i;if(r===t.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==t.PERIOD_CODE)break;i=!0,this.index+=2,this.gobbleSpaces(),r=this.code}this.index++,r===t.OBRACK_CODE?(e={type:t.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()},e.property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),r=this.code,r!==t.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):r===t.OPAREN_CODE?e={type:t.CALL_EXP,arguments:this.gobbleArguments(t.CPAREN_CODE),callee:e}:(r===t.PERIOD_CODE||i)&&(i&&this.index--,this.gobbleSpaces(),e={type:t.MEMBER_EXP,computed:!1,object:e,property:this.gobbleIdentifier()}),i&&(e.optional=!0),this.gobbleSpaces(),r=this.code}return e}gobbleNumericLiteral(){let e="",r,i;for(;t.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===t.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);t.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(r=this.char,r==="e"||r==="E"){for(e+=this.expr.charAt(this.index++),r=this.char,(r==="+"||r==="-")&&(e+=this.expr.charAt(this.index++));t.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);t.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return i=this.code,t.isIdentifierStart(i)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(i===t.PERIOD_CODE||e.length===1&&e.charCodeAt(0)===t.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:t.LITERAL,value:parseFloat(e),raw:e}}gobbleStringLiteral(){let e="",r=this.index,i=this.expr.charAt(this.index++),n=!1;for(;this.index<this.expr.length;){let o=this.expr.charAt(this.index++);if(o===i){n=!0;break}else if(o==="\\")switch(o=this.expr.charAt(this.index++),o){case"n":e+=`
|
|
180
|
-
`;break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=o}else e+=o}return n||this.throwError('Unclosed quote after "'+e+'"'),{type:t.LITERAL,value:e,raw:this.expr.substring(r,this.index)}}gobbleIdentifier(){let e=this.code,r=this.index;for(t.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(e=this.code,t.isIdentifierPart(e));)this.index++;return{type:t.IDENTIFIER,name:this.expr.slice(r,this.index)}}gobbleArguments(e){let r=[],i=!1,n=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let o=this.code;if(o===e){i=!0,this.index++,e===t.CPAREN_CODE&&n&&n>=r.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}else if(o===t.COMMA_CODE){if(this.index++,n++,n!==r.length){if(e===t.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===t.CBRACK_CODE)for(let s=r.length;s<n;s++)r.push(null)}}else if(r.length!==n&&n!==0)this.throwError("Expected comma");else{let s=this.gobbleExpression();(!s||s.type===t.COMPOUND)&&this.throwError("Expected comma"),r.push(s)}}return i||this.throwError("Expected "+String.fromCharCode(e)),r}gobbleGroup(){this.index++;let e=this.gobbleExpressions(t.CPAREN_CODE);if(this.code===t.CPAREN_CODE)return this.index++,e.length===1?e[0]:e.length?{type:t.SEQUENCE_EXP,expressions:e}:!1;this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:t.ARRAY_EXP,elements:this.gobbleArguments(t.CBRACK_CODE)}}},_L=new xv;Object.assign(pt,{hooks:_L,plugins:new Iv(pt),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"});pt.max_unop_len=pt.getMaxKeyLen(pt.unary_ops);pt.max_binop_len=pt.getMaxKeyLen(pt.binary_ops);ur=t=>new pt(t).parse(),$L=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(pt).filter(t=>!$L.includes(t)&&ur[t]===void 0).forEach(t=>{ur[t]=pt[t]});ur.Jsep=pt;wL="ConditionalExpression",kL={name:"ternary",init(t){t.hooks.add("after-expression",function(r){if(r.node&&this.code===t.QUMARK_CODE){this.index++;let i=r.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===t.COLON_CODE){this.index++;let o=this.gobbleExpression();if(o||this.throwError("Expected expression"),r.node={type:wL,test:i,consequent:n,alternate:o},i.operator&&t.binary_ops[i.operator]<=.9){let s=i;for(;s.right.operator&&t.binary_ops[s.right.operator]<=.9;)s=s.right;r.node.test=s.right,s.right=r.node,r.node=i}}else this.throwError("Expected :")}})}};ur.plugins.register(kL);bE=47,SL=92,xL={name:"regex",init(t){t.hooks.add("gobble-token",function(r){if(this.code===bE){let i=++this.index,n=!1;for(;this.index<this.expr.length;){if(this.code===bE&&!n){let o=this.expr.slice(i,this.index),s="";for(;++this.index<this.expr.length;){let c=this.code;if(c>=97&&c<=122||c>=65&&c<=90||c>=48&&c<=57)s+=this.char;else break}let a;try{a=new RegExp(o,s)}catch(c){this.throwError(c.message)}return r.node={type:t.LITERAL,value:a,raw:this.expr.slice(i-1,this.index)},r.node=this.gobbleTokenProperty(r.node),r.node}this.code===t.OBRACK_CODE?n=!0:n&&this.code===t.CBRACK_CODE&&(n=!1),this.index+=this.code===SL?2:1}this.throwError("Unclosed Regex")}})}},Sv=43,IL=45,Ji={name:"assignment",assignmentOperators:new Set(["=","*=","**=","/=","%=","+=","-=","<<=",">>=",">>>=","&=","^=","|=","||=","&&=","??="]),updateOperators:[Sv,IL],assignmentPrecedence:.9,init(t){let e=[t.IDENTIFIER,t.MEMBER_EXP];Ji.assignmentOperators.forEach(i=>t.addBinaryOp(i,Ji.assignmentPrecedence,!0)),t.hooks.add("gobble-token",function(n){let o=this.code;Ji.updateOperators.some(s=>s===o&&s===this.expr.charCodeAt(this.index+1))&&(this.index+=2,n.node={type:"UpdateExpression",operator:o===Sv?"++":"--",argument:this.gobbleTokenProperty(this.gobbleIdentifier()),prefix:!0},(!n.node.argument||!e.includes(n.node.argument.type))&&this.throwError(`Unexpected ${n.node.operator}`))}),t.hooks.add("after-token",function(n){if(n.node){let o=this.code;Ji.updateOperators.some(s=>s===o&&s===this.expr.charCodeAt(this.index+1))&&(e.includes(n.node.type)||this.throwError(`Unexpected ${n.node.operator}`),this.index+=2,n.node={type:"UpdateExpression",operator:o===Sv?"++":"--",argument:n.node,prefix:!1})}}),t.hooks.add("after-expression",function(n){n.node&&r(n.node)});function r(i){Ji.assignmentOperators.has(i.operator)?(i.type="AssignmentExpression",r(i.left),r(i.right)):i.operator||Object.values(i).forEach(n=>{n&&typeof n=="object"&&r(n)})}}};ur.plugins.register(xL,Ji);ur.addUnaryOp("typeof");ur.addUnaryOp("void");ur.addLiteral("null",null);ur.addLiteral("undefined",void 0);EL=new Set(["constructor","__proto__","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"]),he={evalAst(t,e){switch(t.type){case"BinaryExpression":case"LogicalExpression":return he.evalBinaryExpression(t,e);case"Compound":return he.evalCompound(t,e);case"ConditionalExpression":return he.evalConditionalExpression(t,e);case"Identifier":return he.evalIdentifier(t,e);case"Literal":return he.evalLiteral(t,e);case"MemberExpression":return he.evalMemberExpression(t,e);case"UnaryExpression":return he.evalUnaryExpression(t,e);case"ArrayExpression":return he.evalArrayExpression(t,e);case"CallExpression":return he.evalCallExpression(t,e);case"AssignmentExpression":return he.evalAssignmentExpression(t,e);default:throw SyntaxError("Unexpected expression",t)}},evalBinaryExpression(t,e){return{"||":(i,n)=>i||n(),"&&":(i,n)=>i&&n(),"|":(i,n)=>i|n(),"^":(i,n)=>i^n(),"&":(i,n)=>i&n(),"==":(i,n)=>i==n(),"!=":(i,n)=>i!=n(),"===":(i,n)=>i===n(),"!==":(i,n)=>i!==n(),"<":(i,n)=>i<n(),">":(i,n)=>i>n(),"<=":(i,n)=>i<=n(),">=":(i,n)=>i>=n(),"<<":(i,n)=>i<<n(),">>":(i,n)=>i>>n(),">>>":(i,n)=>i>>>n(),"+":(i,n)=>i+n(),"-":(i,n)=>i-n(),"*":(i,n)=>i*n(),"/":(i,n)=>i/n(),"%":(i,n)=>i%n()}[t.operator](he.evalAst(t.left,e),()=>he.evalAst(t.right,e))},evalCompound(t,e){let r;for(let i=0;i<t.body.length;i++){t.body[i].type==="Identifier"&&["var","let","const"].includes(t.body[i].name)&&t.body[i+1]&&t.body[i+1].type==="AssignmentExpression"&&(i+=1);let n=t.body[i];r=he.evalAst(n,e)}return r},evalConditionalExpression(t,e){return he.evalAst(t.test,e)?he.evalAst(t.consequent,e):he.evalAst(t.alternate,e)},evalIdentifier(t,e){if(Object.hasOwn(e,t.name))return e[t.name];throw ReferenceError(`${t.name} is not defined`)},evalLiteral(t){return t.value},evalMemberExpression(t,e){let r=String(t.computed?he.evalAst(t.property):t.property.name),i=he.evalAst(t.object,e);if(i==null)throw TypeError(`Cannot read properties of ${i} (reading '${r}')`);if(!Object.hasOwn(i,r)&&EL.has(r))throw TypeError(`Cannot read properties of ${i} (reading '${r}')`);let n=i[r];return typeof n=="function"?n.bind(i):n},evalUnaryExpression(t,e){return{"-":i=>-he.evalAst(i,e),"!":i=>!he.evalAst(i,e),"~":i=>~he.evalAst(i,e),"+":i=>+he.evalAst(i,e),typeof:i=>typeof he.evalAst(i,e),void:i=>{he.evalAst(i,e)}}[t.operator](t.argument)},evalArrayExpression(t,e){return t.elements.map(r=>he.evalAst(r,e))},evalCallExpression(t,e){let r=t.arguments.map(n=>he.evalAst(n,e)),i=he.evalAst(t.callee,e);if(i===Function)throw new Error("Function constructor is disabled");return i(...r)},evalAssignmentExpression(t,e){if(t.left.type!=="Identifier")throw SyntaxError("Invalid left-hand side in assignment");let r=t.left.name,i=he.evalAst(t.right,e);return e[r]=i,e[r]}},Ev=class{constructor(e){this.code=e,this.ast=ur(this.code)}runInNewContext(e){let r=Object.assign(Object.create(null),e);return he.evalAst(this.ast,r)}};Nv=class extends Error{constructor(e){super('JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'),this.avoidNew=!0,this.value=e,this.name="NewError"}};de.prototype.evaluate=function(t,e,r,i){let n=this.parent,o=this.parentProperty,{flatten:s,wrap:a}=this;if(this.currResultType=this.resultType,this.currEval=this.eval,this.currSandbox=this.sandbox,r=r||this.callback,this.currOtherTypeCallback=i||this.otherTypeCallback,e=e||this.json,t=t||this.path,t&&typeof t=="object"&&!Array.isArray(t)){if(!t.path&&t.path!=="")throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!Object.hasOwn(t,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');({json:e}=t),s=Object.hasOwn(t,"flatten")?t.flatten:s,this.currResultType=Object.hasOwn(t,"resultType")?t.resultType:this.currResultType,this.currSandbox=Object.hasOwn(t,"sandbox")?t.sandbox:this.currSandbox,a=Object.hasOwn(t,"wrap")?t.wrap:a,this.currEval=Object.hasOwn(t,"eval")?t.eval:this.currEval,r=Object.hasOwn(t,"callback")?t.callback:r,this.currOtherTypeCallback=Object.hasOwn(t,"otherTypeCallback")?t.otherTypeCallback:this.currOtherTypeCallback,n=Object.hasOwn(t,"parent")?t.parent:n,o=Object.hasOwn(t,"parentProperty")?t.parentProperty:o,t=t.path}if(n=n||null,o=o||null,Array.isArray(t)&&(t=de.toPathString(t)),!t&&t!==""||!e)return;let c=de.toPathArray(t);c[0]==="$"&&c.length>1&&c.shift(),this._hasParentSelector=null;let u=this._trace(c,e,["$"],n,o,r).filter(function(l){return l&&!l.isParentSelector});return u.length?!a&&u.length===1&&!u[0].hasArrExpr?this._getPreferredOutput(u[0]):u.reduce((l,d)=>{let m=this._getPreferredOutput(d);return s&&Array.isArray(m)?l=l.concat(m):l.push(m),l},[]):a?[]:void 0};de.prototype._getPreferredOutput=function(t){let e=this.currResultType;switch(e){case"all":{let r=Array.isArray(t.path)?t.path:de.toPathArray(t.path);return t.pointer=de.toPointer(r),t.path=typeof t.path=="string"?t.path:de.toPathString(t.path),t}case"value":case"parent":case"parentProperty":return t[e];case"path":return de.toPathString(t[e]);case"pointer":return de.toPointer(t.path);default:throw new TypeError("Unknown result type")}};de.prototype._handleCallback=function(t,e,r){if(e){let i=this._getPreferredOutput(t);t.path=typeof t.path=="string"?t.path:de.toPathString(t.path),e(i,r,t)}};de.prototype._trace=function(t,e,r,i,n,o,s,a){let c;if(!t.length)return c={path:r,value:e,parent:i,parentProperty:n,hasArrExpr:s},this._handleCallback(c,o,"value"),c;let u=t[0],l=t.slice(1),d=[];function m(h){Array.isArray(h)?h.forEach(f=>{d.push(f)}):d.push(h)}if((typeof u!="string"||a)&&e&&Object.hasOwn(e,u))m(this._trace(l,e[u],on(r,u),e,u,o,s));else if(u==="*")this._walk(e,h=>{m(this._trace(l,e[h],on(r,h),e,h,o,!0,!0))});else if(u==="..")m(this._trace(l,e,r,i,n,o,s)),this._walk(e,h=>{typeof e[h]=="object"&&m(this._trace(t.slice(),e[h],on(r,h),e,h,o,!0))});else{if(u==="^")return this._hasParentSelector=!0,{path:r.slice(0,-1),expr:l,isParentSelector:!0};if(u==="~")return c={path:on(r,u),value:n,parent:i,parentProperty:null},this._handleCallback(c,o,"property"),c;if(u==="$")m(this._trace(l,e,r,null,null,o,s));else if(/^(-?\d*):(-?\d*):?(\d*)$/u.test(u))m(this._slice(u,l,e,r,i,n,o));else if(u.indexOf("?(")===0){if(this.currEval===!1)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");let h=u.replace(/^\?\((.*?)\)$/u,"$1"),f=/@.?([^?]*)[['](\??\(.*?\))(?!.\)\])[\]']/gu.exec(h);f?this._walk(e,p=>{let g=[f[2]],v=f[1]?e[p][f[1]]:e[p];this._trace(g,v,r,i,n,o,!0).length>0&&m(this._trace(l,e[p],on(r,p),e,p,o,!0))}):this._walk(e,p=>{this._eval(h,e[p],p,r,i,n)&&m(this._trace(l,e[p],on(r,p),e,p,o,!0))})}else if(u[0]==="("){if(this.currEval===!1)throw new Error("Eval [(expr)] prevented in JSONPath expression.");m(this._trace(Ov(this._eval(u,e,r.at(-1),r.slice(0,-1),i,n),l),e,r,i,n,o,s))}else if(u[0]==="@"){let h=!1,f=u.slice(1,-2);switch(f){case"scalar":(!e||!["object","function"].includes(typeof e))&&(h=!0);break;case"boolean":case"string":case"undefined":case"function":typeof e===f&&(h=!0);break;case"integer":Number.isFinite(e)&&!(e%1)&&(h=!0);break;case"number":Number.isFinite(e)&&(h=!0);break;case"nonFinite":typeof e=="number"&&!Number.isFinite(e)&&(h=!0);break;case"object":e&&typeof e===f&&(h=!0);break;case"array":Array.isArray(e)&&(h=!0);break;case"other":h=this.currOtherTypeCallback(e,r,i,n);break;case"null":e===null&&(h=!0);break;default:throw new TypeError("Unknown value type "+f)}if(h)return c={path:r,value:e,parent:i,parentProperty:n},this._handleCallback(c,o,"value"),c}else if(u[0]==="`"&&e&&Object.hasOwn(e,u.slice(1))){let h=u.slice(1);m(this._trace(l,e[h],on(r,h),e,h,o,s,!0))}else if(u.includes(",")){let h=u.split(",");for(let f of h)m(this._trace(Ov(f,l),e,r,i,n,o,!0))}else!a&&e&&Object.hasOwn(e,u)&&m(this._trace(l,e[u],on(r,u),e,u,o,s,!0))}if(this._hasParentSelector)for(let h=0;h<d.length;h++){let f=d[h];if(f&&f.isParentSelector){let p=this._trace(f.expr,e,f.path,i,n,o,s);if(Array.isArray(p)){d[h]=p[0];let g=p.length;for(let v=1;v<g;v++)h++,d.splice(h,0,p[v])}else d[h]=p}}return d};de.prototype._walk=function(t,e){if(Array.isArray(t)){let r=t.length;for(let i=0;i<r;i++)e(i)}else t&&typeof t=="object"&&Object.keys(t).forEach(r=>{e(r)})};de.prototype._slice=function(t,e,r,i,n,o,s){if(!Array.isArray(r))return;let a=r.length,c=t.split(":"),u=c[2]&&Number.parseInt(c[2])||1,l=c[0]&&Number.parseInt(c[0])||0,d=c[1]&&Number.parseInt(c[1])||a;l=l<0?Math.max(0,l+a):Math.min(a,l),d=d<0?Math.max(0,d+a):Math.min(a,d);let m=[];for(let h=l;h<d;h+=u)this._trace(Ov(h,e),r,i,n,o,s,!0).forEach(p=>{m.push(p)});return m};de.prototype._eval=function(t,e,r,i,n,o){this.currSandbox._$_parentProperty=o,this.currSandbox._$_parent=n,this.currSandbox._$_property=r,this.currSandbox._$_root=this.json,this.currSandbox._$_v=e;let s=t.includes("@path");s&&(this.currSandbox._$_path=de.toPathString(i.concat([r])));let a=this.currEval+"Script:"+t;if(!de.cache[a]){let c=t.replaceAll("@parentProperty","_$_parentProperty").replaceAll("@parent","_$_parent").replaceAll("@property","_$_property").replaceAll("@root","_$_root").replaceAll(/@([.\s)[])/gu,"_$_v$1");if(s&&(c=c.replaceAll("@path","_$_path")),this.currEval==="safe"||this.currEval===!0||this.currEval===void 0)de.cache[a]=new this.safeVm.Script(c);else if(this.currEval==="native")de.cache[a]=new this.vm.Script(c);else if(typeof this.currEval=="function"&&this.currEval.prototype&&Object.hasOwn(this.currEval.prototype,"runInNewContext")){let u=this.currEval;de.cache[a]=new u(c)}else if(typeof this.currEval=="function")de.cache[a]={runInNewContext:u=>this.currEval(c,u)};else throw new TypeError(`Unknown "eval" property "${this.currEval}"`)}try{return de.cache[a].runInNewContext(this.currSandbox)}catch(c){if(this.ignoreEvalErrors)return!1;throw new Error("jsonPath: "+c.message+": "+t)}};de.cache={};de.toPathString=function(t){let e=t,r=e.length,i="$";for(let n=1;n<r;n++)/^(~|\^|@.*?\(\))$/u.test(e[n])||(i+=/^[0-9*]+$/u.test(e[n])?"["+e[n]+"]":"['"+e[n]+"']");return i};de.toPointer=function(t){let e=t,r=e.length,i="";for(let n=1;n<r;n++)/^(~|\^|@.*?\(\))$/u.test(e[n])||(i+="/"+e[n].toString().replaceAll("~","~0").replaceAll("/","~1"));return i};de.toPathArray=function(t){let{cache:e}=de;if(e[t])return e[t].concat();let r=[],n=t.replaceAll(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/gu,";$&;").replaceAll(/[['](\??\(.*?\))[\]'](?!.\])/gu,function(o,s){return"[#"+(r.push(s)-1)+"]"}).replaceAll(/\[['"]([^'\]]*)['"]\]/gu,function(o,s){return"['"+s.replaceAll(".","%@%").replaceAll("~","%%@@%%")+"']"}).replaceAll("~",";~;").replaceAll(/['"]?\.['"]?(?![^[]*\])|\[['"]?/gu,";").replaceAll("%@%",".").replaceAll("%%@@%%","~").replaceAll(/(?:;)?(\^+)(?:;)?/gu,function(o,s){return";"+s.split("").join(";")+";"}).replaceAll(/;;;|;;/gu,";..;").replaceAll(/;$|'?\]|'$/gu,"").split(";").map(function(o){let s=o.match(/#(\d+)/u);return!s||!s[1]?o:r[s[1]]});return e[t]=n,e[t].concat()};de.prototype.safeVm={Script:Ev};de.prototype.vm=bL});import{readFile as UV}from"node:fs/promises";Mp();var zv=new TextEncoder;function Tv(t,e){let i=t.slice(0,e).split(`
|
|
181
|
-
`);return{line:i.length,column:(i.at(-1)?.length??0)+1}}function xE(t){return t.reduce((e,r)=>typeof r=="number"?`${e}[${r}]`:/^[A-Za-z_$][\w$]*$/.test(r)?`${e}.${r}`:`${e}[${JSON.stringify(r)}]`,"$")}function OL(t,e){let r=[],i=(n,o)=>{if(n.kind==="array"){n.items.forEach((a,c)=>i(a,[...o,c]));return}if(n.kind!=="object")return;let s=new Map;for(let a of n.entries){let c=s.get(a.key);c?c.push(a):s.set(a.key,[a]),i(a.value,[...o,a.key])}for(let[a,c]of s)c.length<2||r.push({path:xE([...o,a]),locations:c.map(u=>Tv(t,u.keyStart))})};return i(e,[]),r.length?{value:[`${r.length} duplicate ${r.length===1?"property group":"property groups"} found.`,"Most object parsers keep only the last occurrence, so earlier values can disappear without warning.","",...r.flatMap((n,o)=>[`${o+1}. ${n.path}`,` ${n.locations.length} occurrences \xB7 ${n.locations.map(({line:s,column:a})=>`line ${s}, column ${a}`).join(" \xB7 ")}`])].join(`
|
|
182
|
-
`),findings:r.length}:{value:"No duplicate property names found. Every object key is unique.",findings:0}}function NL(t,e){let r=[],i=(n,o)=>{if(n.kind==="array"){n.items.forEach((c,u)=>i(c,[...o,u]));return}if(n.kind==="object"){n.entries.forEach(c=>i(c.value,[...o,c.key]));return}if(n.kind!=="number")return;let s=Number(n.raw),a="";if(!Number.isFinite(s))a="overflows JavaScript Number and becomes Infinity";else if(s===0&&Jo(n.raw)!=="0")a="underflows JavaScript Number and becomes zero";else{let c=String(s);Jo(n.raw)!==Jo(c)?a=`rounds to ${c} as a JavaScript Number`:c!==n.raw&&(a=`keeps its value but normalizes its spelling to ${c}`)}a&&r.push({path:xE(o),raw:n.raw,...Tv(t,n.start),issue:a})};return i(e,[]),r.length?{value:[`${r.length} numeric ${r.length===1?"risk":"risks"} found.`,"Best JSON Formatter preserves every original number token. The notes below describe what ordinary JavaScript Number conversion would do.","",...r.flatMap((n,o)=>[`${o+1}. ${n.path} \xB7 line ${n.line}, column ${n.column}`,` ${n.raw} \u2014 ${n.issue}.`])].join(`
|
|
183
|
-
`),findings:r.length}:{value:"No JavaScript number precision or notation risks found.",findings:0}}function ia(t,e){if(e instanceof ii)return{ok:!1,message:e.message,line:e.line,column:e.column,offset:e.offset,suggestion:"Use Repair to preview a safe correction."};let r=e instanceof Error?e.message:"Invalid JSON",i=r.replace(/^JSON\.parse:\s*/i,"").replace(/\s+at position\s+\d+(?:\s+\(line\s+\d+\s+column\s+\d+\))?$/i,"").replace(/\s+at line\s+\d+\s+column\s+\d+.*$/i,""),n=r.match(/position\s+(\d+)/i),o=r.match(/line\s+(\d+)\s+column\s+(\d+)/i),s=n?Number(n[1]):void 0,a=s!==void 0?Tv(t,s):o?{line:Number(o[1]),column:Number(o[2])}:{};return{ok:!1,message:i,offset:s,...a,suggestion:"Use Repair to preview a safe correction."}}function wE(t){return t?t.endsWith(`
|
|
184
|
-
`)?t.slice(0,-1).split(`
|
|
185
|
-
`).length:t.split(`
|
|
186
|
-
`).length:0}function zL(t,e){return(t.endsWith(`
|
|
187
|
-
`)?t.slice(0,-1):t).split(`
|
|
188
|
-
`).map(i=>`${e}${i}`)}function kE(t){return t.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function PL(t){return/^[A-Za-z_][\w.-]*$/.test(t)?t:"item"}function Pv(t,e="root",r=0){let i=PL(e),n=i===e?"":` key="${kE(e)}"`,o=" ".repeat(r);if(t.kind==="null")return`${o}<${i}${n} null="true" />`;if(t.kind==="array"){if(!t.items.length)return`${o}<${i}${n} />`;let a=t.items.map(c=>Pv(c,"item",r+1)).join(`
|
|
189
|
-
`);return`${o}<${i}${n}>
|
|
190
|
-
${a}
|
|
191
|
-
${o}</${i}>`}if(t.kind==="object"){if(!t.entries.length)return`${o}<${i}${n} />`;let a=t.entries.map(c=>Pv(c.value,c.key,r+1)).join(`
|
|
192
|
-
`);return`${o}<${i}${n}>
|
|
193
|
-
${a}
|
|
194
|
-
${o}</${i}>`}let s=t.kind==="string"?t.value:t.raw;return`${o}<${i}${n}>${kE(s)}</${i}>`}function SE(t){if(!t||t.kind==="null")return"";let e=t.kind==="string"?t.value:t.kind==="number"||t.kind==="boolean"?t.raw:In(t,0);return/[",\r\n]/.test(e)?`"${e.replaceAll('"','""')}"`:e}function TL(t){if(t.kind!=="array"||t.items.some(o=>o.kind!=="object"))throw new TypeError("CSV conversion requires an array of objects.");let e=t.items,r=[],i=new Set;for(let o of e)for(let s of o.entries)i.has(s.key)||(i.add(s.key),r.push(s.key));let n=[r.map(o=>SE({kind:"string",value:o,raw:JSON.stringify(o),start:0,end:0})).join(",")];for(let o of e){let s=new Map(o.entries.map(a=>[a.key,a.value]));n.push(r.map(a=>SE(s.get(a))).join(","))}return n.join(`\r
|
|
195
|
-
`)}function jL(t,e){let r=[],i=0,n=0;for(;i<t.length||n<e.length;){let o=t[i],s=e[n];if(o==='"'){let u=i;for(i+=1;i<t.length;)if(t[i]==="\\")i+=2;else if(t[i++]==='"')break;let l=i-u;if(e.slice(n,n+l)!==t.slice(u,i))return;n+=l;continue}let a=i,c=n;for(;i<t.length&&/[\t\n\r ]/.test(t[i]);)i+=1;for(;n<e.length&&/[\t\n\r ]/.test(e[n]);)n+=1;if(i!==a||n!==c){let u=t.slice(a,i),l=e.slice(c,n);if(u!==l&&(r.push({from:a,to:i,insert:l}),r.length>2e4))return;continue}if(o!==s)return;i+=1,n+=1}return r}async function AL(t){if(t.operation==="repair")try{let{jsonrepair:e}=await Promise.resolve().then(()=>(A$(),j$)),r=e(t.input),i=_t(r);return{ok:!0,value:r,metadata:{changed:r!==t.input,duplicateKeys:i.metadata.duplicateKeys,unsafeNumbers:i.metadata.unsafeNumbers}}}catch(e){return ia(t.input,e)}if(t.operation==="compare"){let e,r;try{e=_t(t.input,{buildTree:!0})}catch(f){return ia(t.input,f)}try{r=_t(t.secondaryInput??"",{buildTree:!0})}catch(f){let p=ia(t.secondaryInput??"",f);return{...p,message:`Second document: ${p.message}`}}let{diffLines:i}=await Promise.resolve().then(()=>(yw(),gw)),n=In(e.root,2,!0),o=In(r.root,2,!0),s=In(e.root,0,!0,!0)===In(r.root,0,!0,!0),a=i(n,o),c=a.filter(f=>f.added).reduce((f,p)=>f+wE(p.value),0),u=a.filter(f=>f.removed).reduce((f,p)=>f+wE(p.value),0),l=s,d=l?0:c,m=l?0:u;return{ok:!0,value:l?"No structural differences. The JSON documents are equivalent.":["--- Original","+++ Changed",...a.flatMap(f=>zL(f.value,f.added?"+ ":f.removed?"- ":" "))].join(`
|
|
196
|
-
`),metadata:{additions:d,removals:m,identical:l,duplicateKeys:e.metadata.duplicateKeys+r.metadata.duplicateKeys,unsafeNumbers:e.metadata.unsafeNumbers+r.metadata.unsafeNumbers}}}if(t.operation==="schema"||t.operation==="schema_validate"||t.operation==="schema_sample")try{let e=await Promise.resolve().then(()=>(Nx(),Ox));if(t.operation==="schema"){let i=e.inferJsonSchema(t.input);return{ok:!0,value:JSON.stringify(i.schema,null,2),metadata:{duplicateKeys:i.metadata.duplicateKeys,unsafeNumbers:i.metadata.unsafeNumbers}}}if(t.operation==="schema_sample"){let i=e.generateJsonSample(t.input);return{ok:!0,value:i.value,metadata:{duplicateKeys:i.metadata.duplicateKeys,unsafeNumbers:i.metadata.unsafeNumbers}}}let r=await e.validateJsonSchema(t.input,t.secondaryInput??"");return{ok:!0,value:r.valid?"Valid against this JSON Schema.":r.errors.map((i,n)=>`${n+1}. ${i}`).join(`
|
|
197
|
-
`),metadata:{...r.metadata,schemaValid:r.valid,results:r.errors.length}}}catch(e){return ia(t.operation==="schema_validate"&&!t.secondaryInput?.trim()?t.secondaryInput??"":t.input,e)}try{if(t.operation==="duplicates"||t.operation==="precision"){let n=_t(t.input,{buildTree:!0}),o=t.operation==="duplicates"?OL(t.input,n.root):NL(t.input,n.root);return{ok:!0,value:o.value,metadata:{type:n.metadata.type,duplicateKeys:n.metadata.duplicateKeys,unsafeNumbers:n.metadata.unsafeNumbers,values:n.metadata.values,results:o.findings}}}if(t.operation==="format"||t.operation==="minify"||t.operation==="validate"){let n=t.operation==="validate"?_t(t.input):b$(t.input,t.operation==="minify"?0:t.indent);return{ok:!0,value:t.operation==="validate"?t.input:n.formatted,edits:t.operation==="validate"?void 0:jL(t.input,n.formatted),metadata:{type:n.metadata.type,duplicateKeys:n.metadata.duplicateKeys,unsafeNumbers:n.metadata.unsafeNumbers,values:n.metadata.values,...t.operation==="validate"?{bytes:zv.encode(t.input).length}:{}}}}let e=_t(t.input,{buildTree:!0}),r=e.root,i={duplicateKeys:e.metadata.duplicateKeys,unsafeNumbers:e.metadata.unsafeNumbers};switch(t.operation){case"sort":return{ok:!0,value:In(r,t.indent,!0),metadata:i};case"yaml":{let n={identify:o=>o instanceof xn,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/,resolve:o=>new xn(o),stringify:o=>o.value.raw};return{ok:!0,value:(await Promise.resolve().then(()=>Vo(vE()))).stringify(wr(r,!0),{customTags:[n]}),metadata:i}}case"csv":return{ok:!0,value:TL(r),metadata:i};case"xml":return{ok:!0,value:`<?xml version="1.0" encoding="UTF-8"?>
|
|
198
|
-
${Pv(r)}`,metadata:i};case"jsonpath":{let n=t.query?.trim();if(!n)return{ok:!1,message:"Enter a JSONPath query, such as $.store.book[*].title."};let{JSONPath:o}=await Promise.resolve().then(()=>($E(),_E)),s=o({path:n,json:wr(r,!0)});return{ok:!0,value:Ic(s,t.indent),metadata:{...i,results:Array.isArray(s)?s.length:1}}}}}catch(e){return e instanceof ii?ia(t.input,e):{ok:!1,message:e instanceof Error?e.message:"The operation could not be completed."}}}async function mt(t){let e=await AL(t);return{...e,metadata:{inputBytes:zv.encode(t.input).byteLength,...e.ok?{outputBytes:zv.encode(e.value).byteLength}:{},...e.metadata}}}var ie;(function(t){t.assertEqual=n=>{};function e(n){}t.assertIs=e;function r(n){throw new Error}t.assertNever=r,t.arrayToEnum=n=>{let o={};for(let s of n)o[s]=s;return o},t.getValidEnumValues=n=>{let o=t.objectKeys(n).filter(a=>typeof n[n[a]]!="number"),s={};for(let a of o)s[a]=n[a];return t.objectValues(s)},t.objectValues=n=>t.objectKeys(n).map(function(o){return n[o]}),t.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let o=[];for(let s in n)Object.prototype.hasOwnProperty.call(n,s)&&o.push(s);return o},t.find=(n,o)=>{for(let s of n)if(o(s))return s},t.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function i(n,o=" | "){return n.map(s=>typeof s=="string"?`'${s}'`:s).join(o)}t.joinValues=i,t.jsonStringifyReplacer=(n,o)=>typeof o=="bigint"?o.toString():o})(ie||(ie={}));var IE;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(IE||(IE={}));var A=ie.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Pr=t=>{switch(typeof t){case"undefined":return A.undefined;case"string":return A.string;case"number":return Number.isNaN(t)?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(t)?A.array:t===null?A.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?A.promise:typeof Map<"u"&&t instanceof Map?A.map:typeof Set<"u"&&t instanceof Set?A.set:typeof Date<"u"&&t instanceof Date?A.date:A.object;default:return A.unknown}};var I=ie.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 $t=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(o){return o.message},i={_errors:[]},n=o=>{for(let s of o.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)i._errors.push(r(s));else{let a=i,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),i}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ie.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r=Object.create(null),i=[];for(let n of this.issues)if(n.path.length>0){let o=n.path[0];r[o]=r[o]||[],r[o].push(e(n))}else i.push(e(n));return{formErrors:i,fieldErrors:r}}get formErrors(){return this.flatten()}};$t.create=t=>new $t(t);var CL=(t,e)=>{let r;switch(t.code){case I.invalid_type:t.received===A.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case I.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,ie.jsonStringifyReplacer)}`;break;case I.unrecognized_keys:r=`Unrecognized key(s) in object: ${ie.joinValues(t.keys,", ")}`;break;case I.invalid_union:r="Invalid input";break;case I.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ie.joinValues(t.options)}`;break;case I.invalid_enum_value:r=`Invalid enum value. Expected ${ie.joinValues(t.options)}, received '${t.received}'`;break;case I.invalid_arguments:r="Invalid function arguments";break;case I.invalid_return_type:r="Invalid function return type";break;case I.invalid_date:r="Invalid date";break;case I.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:ie.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case I.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case I.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case I.custom:r="Invalid input";break;case I.invalid_intersection_types:r="Intersection results could not be merged";break;case I.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case I.not_finite:r="Number must be finite";break;default:r=e.defaultError,ie.assertNever(t)}return{message:r}},sn=CL;var RL=sn;function oa(){return RL}var hl=t=>{let{data:e,path:r,errorMaps:i,issueData:n}=t,o=[...r,...n.path||[]],s={...n,path:o};if(n.message!==void 0)return{...n,path:o,message:n.message};let a="",c=i.filter(u=>!!u).slice().reverse();for(let u of c)a=u(s,{data:e,defaultError:a}).message;return{...n,path:o,message:a}};function j(t,e){let r=oa(),i=hl({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===sn?void 0:sn].filter(n=>!!n)});t.common.issues.push(i)}var Qe=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let i=[];for(let n of r){if(n.status==="aborted")return V;n.status==="dirty"&&e.dirty(),i.push(n.value)}return{status:e.value,value:i}}static async mergeObjectAsync(e,r){let i=[];for(let n of r){let o=await n.key,s=await n.value;i.push({key:o,value:s})}return t.mergeObjectSync(e,i)}static mergeObjectSync(e,r){let i={};for(let n of r){let{key:o,value:s}=n;if(o.status==="aborted"||s.status==="aborted")return V;o.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof s.value<"u"||n.alwaysSet)&&(i[o.value]=s.value)}return{status:e.value,value:i}}},V=Object.freeze({status:"aborted"}),Bi=t=>({status:"dirty",value:t}),ot=t=>({status:"valid",value:t}),jv=t=>t.status==="aborted",Av=t=>t.status==="dirty",Bn=t=>t.status==="valid",sa=t=>typeof Promise<"u"&&t instanceof Promise;var R;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(R||(R={}));var At=class{constructor(e,r,i,n){this._cachedPath=[],this.parent=e,this.data=r,this._path=i,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}},EE=(t,e)=>{if(Bn(e))return{success:!0,data:e.value};if(!t.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 $t(t.common.issues);return this._error=r,this._error}}};function W(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:i,description:n}=t;if(e&&(r||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(s,a)=>{let{message:c}=t;return s.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??i??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:n}}var Q=class{get description(){return this._def.description}_getType(e){return Pr(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Pr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Qe,ctx:{common:e.parent.common,data:e.data,parsedType:Pr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(sa(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let i=this.safeParse(e,r);if(i.success)return i.data;throw i.error}safeParse(e,r){let i={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Pr(e)},n=this._parseSync({data:e,path:i.path,parent:i});return EE(i,n)}"~validate"(e){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Pr(e)};if(!this["~standard"].async)try{let i=this._parseSync({data:e,path:[],parent:r});return Bn(i)?{value:i.value}:{issues:r.common.issues}}catch(i){i?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(i=>Bn(i)?{value:i.value}:{issues:r.common.issues})}async parseAsync(e,r){let i=await this.safeParseAsync(e,r);if(i.success)return i.data;throw i.error}async safeParseAsync(e,r){let i={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Pr(e)},n=this._parse({data:e,path:i.path,parent:i}),o=await(sa(n)?n:Promise.resolve(n));return EE(i,o)}refine(e,r){let i=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,o)=>{let s=e(n),a=()=>o.addIssue({code:I.custom,...i(n)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(e,r){return this._refinement((i,n)=>e(i)?!0:(n.addIssue(typeof r=="function"?r(i,n):r),!1))}_refinement(e){return new Wt({schema:this,typeName:E.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,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 Ht.create(this,this._def)}nullable(){return Ar.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return cn.create(this)}promise(){return Kn.create(this,this._def)}or(e){return Yi.create([this,e],this._def)}and(e){return Xi.create(this,e,this._def)}transform(e){return new Wt({...W(this._def),schema:this,typeName:E.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new no({...W(this._def),innerType:this,defaultValue:r,typeName:E.ZodDefault})}brand(){return new gl({typeName:E.ZodBranded,type:this,...W(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new io({...W(this._def),innerType:this,catchValue:r,typeName:E.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return yl.create(this,e)}readonly(){return oo.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},DL=/^c[^\s-]{8,}$/i,ML=/^[0-9a-z]+$/,UL=/^[0-9A-HJKMNP-TV-Z]{26}$/i,LL=/^[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,qL=/^[a-z0-9_-]{21}$/i,ZL=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,FL=/^[-+]?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)?)??$/,VL=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,JL="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Cv,BL=/^(?:(?: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])$/,KL=/^(?:(?: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])$/,HL=/^(([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]))$/,WL=/^(([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])$/,GL=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,YL=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,OE="((\\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])))",XL=new RegExp(`^${OE}$`);function NE(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function QL(t){return new RegExp(`^${NE(t)}$`)}function eq(t){let e=`${OE}T${NE(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function tq(t,e){return!!((e==="v4"||!e)&&BL.test(t)||(e==="v6"||!e)&&HL.test(t))}function rq(t,e){if(!ZL.test(t))return!1;try{let[r]=t.split(".");if(!r)return!1;let i=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(i));return!(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function nq(t,e){return!!((e==="v4"||!e)&&KL.test(t)||(e==="v6"||!e)&&WL.test(t))}var Hi=class t extends Q{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==A.string){let o=this._getOrReturnCtx(e);return j(o,{code:I.invalid_type,expected:A.string,received:o.parsedType}),V}let i=new Qe,n;for(let o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(n=this._getOrReturnCtx(e,n),j(n,{code:I.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),i.dirty());else if(o.kind==="max")e.data.length>o.value&&(n=this._getOrReturnCtx(e,n),j(n,{code:I.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),i.dirty());else if(o.kind==="length"){let s=e.data.length>o.value,a=e.data.length<o.value;(s||a)&&(n=this._getOrReturnCtx(e,n),s?j(n,{code:I.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&j(n,{code:I.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),i.dirty())}else if(o.kind==="email")VL.test(e.data)||(n=this._getOrReturnCtx(e,n),j(n,{validation:"email",code:I.invalid_string,message:o.message}),i.dirty());else if(o.kind==="emoji")Cv||(Cv=new RegExp(JL,"u")),Cv.test(e.data)||(n=this._getOrReturnCtx(e,n),j(n,{validation:"emoji",code:I.invalid_string,message:o.message}),i.dirty());else if(o.kind==="uuid")LL.test(e.data)||(n=this._getOrReturnCtx(e,n),j(n,{validation:"uuid",code:I.invalid_string,message:o.message}),i.dirty());else if(o.kind==="nanoid")qL.test(e.data)||(n=this._getOrReturnCtx(e,n),j(n,{validation:"nanoid",code:I.invalid_string,message:o.message}),i.dirty());else if(o.kind==="cuid")DL.test(e.data)||(n=this._getOrReturnCtx(e,n),j(n,{validation:"cuid",code:I.invalid_string,message:o.message}),i.dirty());else if(o.kind==="cuid2")ML.test(e.data)||(n=this._getOrReturnCtx(e,n),j(n,{validation:"cuid2",code:I.invalid_string,message:o.message}),i.dirty());else if(o.kind==="ulid")UL.test(e.data)||(n=this._getOrReturnCtx(e,n),j(n,{validation:"ulid",code:I.invalid_string,message:o.message}),i.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),j(n,{validation:"url",code:I.invalid_string,message:o.message}),i.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),j(n,{validation:"regex",code:I.invalid_string,message:o.message}),i.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(n=this._getOrReturnCtx(e,n),j(n,{code:I.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),i.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(n=this._getOrReturnCtx(e,n),j(n,{code:I.invalid_string,validation:{startsWith:o.value},message:o.message}),i.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(n=this._getOrReturnCtx(e,n),j(n,{code:I.invalid_string,validation:{endsWith:o.value},message:o.message}),i.dirty()):o.kind==="datetime"?eq(o).test(e.data)||(n=this._getOrReturnCtx(e,n),j(n,{code:I.invalid_string,validation:"datetime",message:o.message}),i.dirty()):o.kind==="date"?XL.test(e.data)||(n=this._getOrReturnCtx(e,n),j(n,{code:I.invalid_string,validation:"date",message:o.message}),i.dirty()):o.kind==="time"?QL(o).test(e.data)||(n=this._getOrReturnCtx(e,n),j(n,{code:I.invalid_string,validation:"time",message:o.message}),i.dirty()):o.kind==="duration"?FL.test(e.data)||(n=this._getOrReturnCtx(e,n),j(n,{validation:"duration",code:I.invalid_string,message:o.message}),i.dirty()):o.kind==="ip"?tq(e.data,o.version)||(n=this._getOrReturnCtx(e,n),j(n,{validation:"ip",code:I.invalid_string,message:o.message}),i.dirty()):o.kind==="jwt"?rq(e.data,o.alg)||(n=this._getOrReturnCtx(e,n),j(n,{validation:"jwt",code:I.invalid_string,message:o.message}),i.dirty()):o.kind==="cidr"?nq(e.data,o.version)||(n=this._getOrReturnCtx(e,n),j(n,{validation:"cidr",code:I.invalid_string,message:o.message}),i.dirty()):o.kind==="base64"?GL.test(e.data)||(n=this._getOrReturnCtx(e,n),j(n,{validation:"base64",code:I.invalid_string,message:o.message}),i.dirty()):o.kind==="base64url"?YL.test(e.data)||(n=this._getOrReturnCtx(e,n),j(n,{validation:"base64url",code:I.invalid_string,message:o.message}),i.dirty()):ie.assertNever(o);return{status:i.value,value:e.data}}_regex(e,r,i){return this.refinement(n=>e.test(n),{validation:r,code:I.invalid_string,...R.errToObj(i)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...R.errToObj(e)})}url(e){return this._addCheck({kind:"url",...R.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...R.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...R.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...R.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...R.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...R.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...R.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...R.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...R.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...R.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...R.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...R.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...R.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...R.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...R.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...R.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...R.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...R.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...R.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...R.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...R.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...R.errToObj(r)})}nonempty(e){return this.min(1,R.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};Hi.create=t=>new Hi({checks:[],typeName:E.ZodString,coerce:t?.coerce??!1,...W(t)});function iq(t,e){let r=(t.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,n=r>i?r:i,o=Number.parseInt(t.toFixed(n).replace(".","")),s=Number.parseInt(e.toFixed(n).replace(".",""));return o%s/10**n}var aa=class t extends Q{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==A.number){let o=this._getOrReturnCtx(e);return j(o,{code:I.invalid_type,expected:A.number,received:o.parsedType}),V}let i,n=new Qe;for(let o of this._def.checks)o.kind==="int"?ie.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),j(i,{code:I.invalid_type,expected:"integer",received:"float",message:o.message}),n.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(i=this._getOrReturnCtx(e,i),j(i,{code:I.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),n.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(i=this._getOrReturnCtx(e,i),j(i,{code:I.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),n.dirty()):o.kind==="multipleOf"?iq(e.data,o.value)!==0&&(i=this._getOrReturnCtx(e,i),j(i,{code:I.not_multiple_of,multipleOf:o.value,message:o.message}),n.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(i=this._getOrReturnCtx(e,i),j(i,{code:I.not_finite,message:o.message}),n.dirty()):ie.assertNever(o);return{status:n.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,R.toString(r))}gt(e,r){return this.setLimit("min",e,!1,R.toString(r))}lte(e,r){return this.setLimit("max",e,!0,R.toString(r))}lt(e,r){return this.setLimit("max",e,!1,R.toString(r))}setLimit(e,r,i,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:i,message:R.toString(n)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:R.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:R.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:R.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:R.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:R.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:R.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:R.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:R.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:R.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&ie.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(r===null||i.value>r)&&(r=i.value):i.kind==="max"&&(e===null||i.value<e)&&(e=i.value)}return Number.isFinite(r)&&Number.isFinite(e)}};aa.create=t=>new aa({checks:[],typeName:E.ZodNumber,coerce:t?.coerce||!1,...W(t)});var ca=class t extends Q{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==A.bigint)return this._getInvalidInput(e);let i,n=new Qe;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(i=this._getOrReturnCtx(e,i),j(i,{code:I.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),n.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(i=this._getOrReturnCtx(e,i),j(i,{code:I.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),n.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(i=this._getOrReturnCtx(e,i),j(i,{code:I.not_multiple_of,multipleOf:o.value,message:o.message}),n.dirty()):ie.assertNever(o);return{status:n.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return j(r,{code:I.invalid_type,expected:A.bigint,received:r.parsedType}),V}gte(e,r){return this.setLimit("min",e,!0,R.toString(r))}gt(e,r){return this.setLimit("min",e,!1,R.toString(r))}lte(e,r){return this.setLimit("max",e,!0,R.toString(r))}lt(e,r){return this.setLimit("max",e,!1,R.toString(r))}setLimit(e,r,i,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:i,message:R.toString(n)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:R.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:R.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:R.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:R.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:R.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};ca.create=t=>new ca({checks:[],typeName:E.ZodBigInt,coerce:t?.coerce??!1,...W(t)});var ua=class extends Q{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==A.boolean){let i=this._getOrReturnCtx(e);return j(i,{code:I.invalid_type,expected:A.boolean,received:i.parsedType}),V}return ot(e.data)}};ua.create=t=>new ua({typeName:E.ZodBoolean,coerce:t?.coerce||!1,...W(t)});var la=class t extends Q{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==A.date){let o=this._getOrReturnCtx(e);return j(o,{code:I.invalid_type,expected:A.date,received:o.parsedType}),V}if(Number.isNaN(e.data.getTime())){let o=this._getOrReturnCtx(e);return j(o,{code:I.invalid_date}),V}let i=new Qe,n;for(let o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(n=this._getOrReturnCtx(e,n),j(n,{code:I.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),i.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(n=this._getOrReturnCtx(e,n),j(n,{code:I.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),i.dirty()):ie.assertNever(o);return{status:i.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:R.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:R.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};la.create=t=>new la({checks:[],coerce:t?.coerce||!1,typeName:E.ZodDate,...W(t)});var da=class extends Q{_parse(e){if(this._getType(e)!==A.symbol){let i=this._getOrReturnCtx(e);return j(i,{code:I.invalid_type,expected:A.symbol,received:i.parsedType}),V}return ot(e.data)}};da.create=t=>new da({typeName:E.ZodSymbol,...W(t)});var Wi=class extends Q{_parse(e){if(this._getType(e)!==A.undefined){let i=this._getOrReturnCtx(e);return j(i,{code:I.invalid_type,expected:A.undefined,received:i.parsedType}),V}return ot(e.data)}};Wi.create=t=>new Wi({typeName:E.ZodUndefined,...W(t)});var Gi=class extends Q{_parse(e){if(this._getType(e)!==A.null){let i=this._getOrReturnCtx(e);return j(i,{code:I.invalid_type,expected:A.null,received:i.parsedType}),V}return ot(e.data)}};Gi.create=t=>new Gi({typeName:E.ZodNull,...W(t)});var fa=class extends Q{constructor(){super(...arguments),this._any=!0}_parse(e){return ot(e.data)}};fa.create=t=>new fa({typeName:E.ZodAny,...W(t)});var an=class extends Q{constructor(){super(...arguments),this._unknown=!0}_parse(e){return ot(e.data)}};an.create=t=>new an({typeName:E.ZodUnknown,...W(t)});var lr=class extends Q{_parse(e){let r=this._getOrReturnCtx(e);return j(r,{code:I.invalid_type,expected:A.never,received:r.parsedType}),V}};lr.create=t=>new lr({typeName:E.ZodNever,...W(t)});var pa=class extends Q{_parse(e){if(this._getType(e)!==A.undefined){let i=this._getOrReturnCtx(e);return j(i,{code:I.invalid_type,expected:A.void,received:i.parsedType}),V}return ot(e.data)}};pa.create=t=>new pa({typeName:E.ZodVoid,...W(t)});var cn=class t extends Q{_parse(e){let{ctx:r,status:i}=this._processInputParams(e),n=this._def;if(r.parsedType!==A.array)return j(r,{code:I.invalid_type,expected:A.array,received:r.parsedType}),V;if(n.exactLength!==null){let s=r.data.length>n.exactLength.value,a=r.data.length<n.exactLength.value;(s||a)&&(j(r,{code:s?I.too_big:I.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}),i.dirty())}if(n.minLength!==null&&r.data.length<n.minLength.value&&(j(r,{code:I.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),i.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(j(r,{code:I.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),i.dirty()),r.common.async)return Promise.all([...r.data].map((s,a)=>n.type._parseAsync(new At(r,s,r.path,a)))).then(s=>Qe.mergeArray(i,s));let o=[...r.data].map((s,a)=>n.type._parseSync(new At(r,s,r.path,a)));return Qe.mergeArray(i,o)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:R.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:R.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:R.toString(r)}})}nonempty(e){return this.min(1,e)}};cn.create=(t,e)=>new cn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:E.ZodArray,...W(e)});function Ki(t){if(t instanceof wt){let e={};for(let r in t.shape){let i=t.shape[r];e[r]=Ht.create(Ki(i))}return new wt({...t._def,shape:()=>e})}else return t instanceof cn?new cn({...t._def,type:Ki(t.element)}):t instanceof Ht?Ht.create(Ki(t.unwrap())):t instanceof Ar?Ar.create(Ki(t.unwrap())):t instanceof jr?jr.create(t.items.map(e=>Ki(e))):t}var wt=class t extends Q{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=ie.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==A.object){let u=this._getOrReturnCtx(e);return j(u,{code:I.invalid_type,expected:A.object,received:u.parsedType}),V}let{status:i,ctx:n}=this._processInputParams(e),{shape:o,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof lr&&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=o[u],d=n.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new At(n,d,n.path,u)),alwaysSet:u in n.data})}if(this._def.catchall instanceof lr){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&&(j(n,{code:I.unrecognized_keys,keys:a}),i.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let l of a){let d=n.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new At(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,m=await l.value;u.push({key:d,value:m,alwaysSet:l.alwaysSet})}return u}).then(u=>Qe.mergeObjectSync(i,u)):Qe.mergeObjectSync(i,c)}get shape(){return this._def.shape()}strict(e){return R.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,i)=>{let n=this._def.errorMap?.(r,i).message??i.defaultError;return r.code==="unrecognized_keys"?{message:R.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:E.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let i of ie.objectKeys(e))e[i]&&this.shape[i]&&(r[i]=this.shape[i]);return new t({...this._def,shape:()=>r})}omit(e){let r={};for(let i of ie.objectKeys(this.shape))e[i]||(r[i]=this.shape[i]);return new t({...this._def,shape:()=>r})}deepPartial(){return Ki(this)}partial(e){let r={};for(let i of ie.objectKeys(this.shape)){let n=this.shape[i];e&&!e[i]?r[i]=n:r[i]=n.optional()}return new t({...this._def,shape:()=>r})}required(e){let r={};for(let i of ie.objectKeys(this.shape))if(e&&!e[i])r[i]=this.shape[i];else{let o=this.shape[i];for(;o instanceof Ht;)o=o._def.innerType;r[i]=o}return new t({...this._def,shape:()=>r})}keyof(){return zE(ie.objectKeys(this.shape))}};wt.create=(t,e)=>new wt({shape:()=>t,unknownKeys:"strip",catchall:lr.create(),typeName:E.ZodObject,...W(e)});wt.strictCreate=(t,e)=>new wt({shape:()=>t,unknownKeys:"strict",catchall:lr.create(),typeName:E.ZodObject,...W(e)});wt.lazycreate=(t,e)=>new wt({shape:t,unknownKeys:"strip",catchall:lr.create(),typeName:E.ZodObject,...W(e)});var Yi=class extends Q{_parse(e){let{ctx:r}=this._processInputParams(e),i=this._def.options;function n(o){for(let a of o)if(a.result.status==="valid")return a.result;for(let a of o)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let s=o.map(a=>new $t(a.ctx.common.issues));return j(r,{code:I.invalid_union,unionErrors:s}),V}if(r.common.async)return Promise.all(i.map(async o=>{let s={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(n);{let o,s=[];for(let c of i){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"&&!o&&(o={result:l,ctx:u}),u.common.issues.length&&s.push(u.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let a=s.map(c=>new $t(c));return j(r,{code:I.invalid_union,unionErrors:a}),V}}get options(){return this._def.options}};Yi.create=(t,e)=>new Yi({options:t,typeName:E.ZodUnion,...W(e)});var Tr=t=>t instanceof Qi?Tr(t.schema):t instanceof Wt?Tr(t.innerType()):t instanceof eo?[t.value]:t instanceof to?t.options:t instanceof ro?ie.objectValues(t.enum):t instanceof no?Tr(t._def.innerType):t instanceof Wi?[void 0]:t instanceof Gi?[null]:t instanceof Ht?[void 0,...Tr(t.unwrap())]:t instanceof Ar?[null,...Tr(t.unwrap())]:t instanceof gl||t instanceof oo?Tr(t.unwrap()):t instanceof io?Tr(t._def.innerType):[],Rv=class t extends Q{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==A.object)return j(r,{code:I.invalid_type,expected:A.object,received:r.parsedType}),V;let i=this.discriminator,n=r.data[i],o=this.optionsMap.get(n);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(j(r,{code:I.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),V)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,i){let n=new Map;for(let o of r){let s=Tr(o.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of s){if(n.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);n.set(a,o)}}return new t({typeName:E.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:n,...W(i)})}};function Dv(t,e){let r=Pr(t),i=Pr(e);if(t===e)return{valid:!0,data:t};if(r===A.object&&i===A.object){let n=ie.objectKeys(e),o=ie.objectKeys(t).filter(a=>n.indexOf(a)!==-1),s={...t,...e};for(let a of o){let c=Dv(t[a],e[a]);if(!c.valid)return{valid:!1};s[a]=c.data}return{valid:!0,data:s}}else if(r===A.array&&i===A.array){if(t.length!==e.length)return{valid:!1};let n=[];for(let o=0;o<t.length;o++){let s=t[o],a=e[o],c=Dv(s,a);if(!c.valid)return{valid:!1};n.push(c.data)}return{valid:!0,data:n}}else return r===A.date&&i===A.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var Xi=class extends Q{_parse(e){let{status:r,ctx:i}=this._processInputParams(e),n=(o,s)=>{if(jv(o)||jv(s))return V;let a=Dv(o.value,s.value);return a.valid?((Av(o)||Av(s))&&r.dirty(),{status:r.value,value:a.data}):(j(i,{code:I.invalid_intersection_types}),V)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([o,s])=>n(o,s)):n(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}};Xi.create=(t,e,r)=>new Xi({left:t,right:e,typeName:E.ZodIntersection,...W(r)});var jr=class t extends Q{_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==A.array)return j(i,{code:I.invalid_type,expected:A.array,received:i.parsedType}),V;if(i.data.length<this._def.items.length)return j(i,{code:I.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),V;!this._def.rest&&i.data.length>this._def.items.length&&(j(i,{code:I.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let o=[...i.data].map((s,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new At(i,s,i.path,a)):null}).filter(s=>!!s);return i.common.async?Promise.all(o).then(s=>Qe.mergeArray(r,s)):Qe.mergeArray(r,o)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};jr.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new jr({items:t,typeName:E.ZodTuple,rest:null,...W(e)})};var Mv=class t extends Q{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==A.object)return j(i,{code:I.invalid_type,expected:A.object,received:i.parsedType}),V;let n=[],o=this._def.keyType,s=this._def.valueType;for(let a in i.data)n.push({key:o._parse(new At(i,a,i.path,a)),value:s._parse(new At(i,i.data[a],i.path,a)),alwaysSet:a in i.data});return i.common.async?Qe.mergeObjectAsync(r,n):Qe.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(e,r,i){return r instanceof Q?new t({keyType:e,valueType:r,typeName:E.ZodRecord,...W(i)}):new t({keyType:Hi.create(),valueType:e,typeName:E.ZodRecord,...W(r)})}},ma=class extends Q{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==A.map)return j(i,{code:I.invalid_type,expected:A.map,received:i.parsedType}),V;let n=this._def.keyType,o=this._def.valueType,s=[...i.data.entries()].map(([a,c],u)=>({key:n._parse(new At(i,a,i.path,[u,"key"])),value:o._parse(new At(i,c,i.path,[u,"value"]))}));if(i.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 V;(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 V;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}}}};ma.create=(t,e,r)=>new ma({valueType:e,keyType:t,typeName:E.ZodMap,...W(r)});var ha=class t extends Q{_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==A.set)return j(i,{code:I.invalid_type,expected:A.set,received:i.parsedType}),V;let n=this._def;n.minSize!==null&&i.data.size<n.minSize.value&&(j(i,{code:I.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&i.data.size>n.maxSize.value&&(j(i,{code:I.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());let o=this._def.valueType;function s(c){let u=new Set;for(let l of c){if(l.status==="aborted")return V;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let a=[...i.data.values()].map((c,u)=>o._parse(new At(i,c,i.path,u)));return i.common.async?Promise.all(a).then(c=>s(c)):s(a)}min(e,r){return new t({...this._def,minSize:{value:e,message:R.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:R.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};ha.create=(t,e)=>new ha({valueType:t,minSize:null,maxSize:null,typeName:E.ZodSet,...W(e)});var Uv=class t extends Q{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==A.function)return j(r,{code:I.invalid_type,expected:A.function,received:r.parsedType}),V;function i(a,c){return hl({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,oa(),sn].filter(u=>!!u),issueData:{code:I.invalid_arguments,argumentsError:c}})}function n(a,c){return hl({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,oa(),sn].filter(u=>!!u),issueData:{code:I.invalid_return_type,returnTypeError:c}})}let o={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof Kn){let a=this;return ot(async function(...c){let u=new $t([]),l=await a._def.args.parseAsync(c,o).catch(h=>{throw u.addIssue(i(c,h)),u}),d=await Reflect.apply(s,this,l);return await a._def.returns._def.type.parseAsync(d,o).catch(h=>{throw u.addIssue(n(d,h)),u})})}else{let a=this;return ot(function(...c){let u=a._def.args.safeParse(c,o);if(!u.success)throw new $t([i(c,u.error)]);let l=Reflect.apply(s,this,u.data),d=a._def.returns.safeParse(l,o);if(!d.success)throw new $t([n(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:jr.create(e).rest(an.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,i){return new t({args:e||jr.create([]).rest(an.create()),returns:r||an.create(),typeName:E.ZodFunction,...W(i)})}},Qi=class extends Q{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Qi.create=(t,e)=>new Qi({getter:t,typeName:E.ZodLazy,...W(e)});var eo=class extends Q{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return j(r,{received:r.data,code:I.invalid_literal,expected:this._def.value}),V}return{status:"valid",value:e.data}}get value(){return this._def.value}};eo.create=(t,e)=>new eo({value:t,typeName:E.ZodLiteral,...W(e)});function zE(t,e){return new to({values:t,typeName:E.ZodEnum,...W(e)})}var to=class t extends Q{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),i=this._def.values;return j(r,{expected:ie.joinValues(i),received:r.parsedType,code:I.invalid_type}),V}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),i=this._def.values;return j(r,{received:r.data,code:I.invalid_enum_value,options:i}),V}return ot(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(i=>!e.includes(i)),{...this._def,...r})}};to.create=zE;var ro=class extends Q{_parse(e){let r=ie.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==A.string&&i.parsedType!==A.number){let n=ie.objectValues(r);return j(i,{expected:ie.joinValues(n),received:i.parsedType,code:I.invalid_type}),V}if(this._cache||(this._cache=new Set(ie.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let n=ie.objectValues(r);return j(i,{received:i.data,code:I.invalid_enum_value,options:n}),V}return ot(e.data)}get enum(){return this._def.values}};ro.create=(t,e)=>new ro({values:t,typeName:E.ZodNativeEnum,...W(e)});var Kn=class extends Q{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==A.promise&&r.common.async===!1)return j(r,{code:I.invalid_type,expected:A.promise,received:r.parsedType}),V;let i=r.parsedType===A.promise?r.data:Promise.resolve(r.data);return ot(i.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Kn.create=(t,e)=>new Kn({type:t,typeName:E.ZodPromise,...W(e)});var Wt=class extends Q{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===E.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:i}=this._processInputParams(e),n=this._def.effect||null,o={addIssue:s=>{j(i,s),s.fatal?r.abort():r.dirty()},get path(){return i.path}};if(o.addIssue=o.addIssue.bind(o),n.type==="preprocess"){let s=n.transform(i.data,o);if(i.common.async)return Promise.resolve(s).then(async a=>{if(r.value==="aborted")return V;let c=await this._def.schema._parseAsync({data:a,path:i.path,parent:i});return c.status==="aborted"?V:c.status==="dirty"?Bi(c.value):r.value==="dirty"?Bi(c.value):c});{if(r.value==="aborted")return V;let a=this._def.schema._parseSync({data:s,path:i.path,parent:i});return a.status==="aborted"?V:a.status==="dirty"?Bi(a.value):r.value==="dirty"?Bi(a.value):a}}if(n.type==="refinement"){let s=a=>{let c=n.refinement(a,o);if(i.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(i.common.async===!1){let a=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return a.status==="aborted"?V:(a.status==="dirty"&&r.dirty(),s(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(a=>a.status==="aborted"?V:(a.status==="dirty"&&r.dirty(),s(a.value).then(()=>({status:r.value,value:a.value}))))}if(n.type==="transform")if(i.common.async===!1){let s=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!Bn(s))return V;let a=n.transform(s.value,o);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:i.data,path:i.path,parent:i}).then(s=>Bn(s)?Promise.resolve(n.transform(s.value,o)).then(a=>({status:r.value,value:a})):V);ie.assertNever(n)}};Wt.create=(t,e,r)=>new Wt({schema:t,typeName:E.ZodEffects,effect:e,...W(r)});Wt.createWithPreprocess=(t,e,r)=>new Wt({schema:e,effect:{type:"preprocess",transform:t},typeName:E.ZodEffects,...W(r)});var Ht=class extends Q{_parse(e){return this._getType(e)===A.undefined?ot(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Ht.create=(t,e)=>new Ht({innerType:t,typeName:E.ZodOptional,...W(e)});var Ar=class extends Q{_parse(e){return this._getType(e)===A.null?ot(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Ar.create=(t,e)=>new Ar({innerType:t,typeName:E.ZodNullable,...W(e)});var no=class extends Q{_parse(e){let{ctx:r}=this._processInputParams(e),i=r.data;return r.parsedType===A.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};no.create=(t,e)=>new no({innerType:t,typeName:E.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...W(e)});var io=class extends Q{_parse(e){let{ctx:r}=this._processInputParams(e),i={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return sa(n)?n.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new $t(i.common.issues)},input:i.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new $t(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}};io.create=(t,e)=>new io({innerType:t,typeName:E.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...W(e)});var ga=class extends Q{_parse(e){if(this._getType(e)!==A.nan){let i=this._getOrReturnCtx(e);return j(i,{code:I.invalid_type,expected:A.nan,received:i.parsedType}),V}return{status:"valid",value:e.data}}};ga.create=t=>new ga({typeName:E.ZodNaN,...W(t)});var gl=class extends Q{_parse(e){let{ctx:r}=this._processInputParams(e),i=r.data;return this._def.type._parse({data:i,path:r.path,parent:r})}unwrap(){return this._def.type}},yl=class t extends Q{_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.common.async)return(async()=>{let o=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return o.status==="aborted"?V:o.status==="dirty"?(r.dirty(),Bi(o.value)):this._def.out._parseAsync({data:o.value,path:i.path,parent:i})})();{let n=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return n.status==="aborted"?V:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:i.path,parent:i})}}static create(e,r){return new t({in:e,out:r,typeName:E.ZodPipeline})}},oo=class extends Q{_parse(e){let r=this._def.innerType._parse(e),i=n=>(Bn(n)&&(n.value=Object.freeze(n.value)),n);return sa(r)?r.then(n=>i(n)):i(r)}unwrap(){return this._def.innerType}};oo.create=(t,e)=>new oo({innerType:t,typeName:E.ZodReadonly,...W(e)});var vW={object:wt.lazycreate},E;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(E||(E={}));var bW=Hi.create,_W=aa.create,$W=ga.create,wW=ca.create,kW=ua.create,SW=la.create,xW=da.create,IW=Wi.create,EW=Gi.create,OW=fa.create,NW=an.create,zW=lr.create,PW=pa.create,TW=cn.create,PE=wt.create,jW=wt.strictCreate,AW=Yi.create,CW=Rv.create,RW=Xi.create,DW=jr.create,MW=Mv.create,UW=ma.create,LW=ha.create,qW=Uv.create,ZW=Qi.create,FW=eo.create,VW=to.create,JW=ro.create,BW=Kn.create,KW=Wt.create,HW=Ht.create,WW=Ar.create,GW=Wt.createWithPreprocess,YW=yl.create;var xt={};Ut(xt,{$ZodAny:()=>md,$ZodArray:()=>bd,$ZodAsyncError:()=>Gt,$ZodBase64:()=>id,$ZodBase64URL:()=>od,$ZodBigInt:()=>za,$ZodBigIntFormat:()=>ld,$ZodBoolean:()=>yo,$ZodCIDRv4:()=>rd,$ZodCIDRv6:()=>nd,$ZodCUID:()=>Jl,$ZodCUID2:()=>Bl,$ZodCatch:()=>Rd,$ZodCheck:()=>xe,$ZodCheckBigIntFormat:()=>Ib,$ZodCheckEndsWith:()=>Mb,$ZodCheckGreaterThan:()=>jl,$ZodCheckIncludes:()=>Rb,$ZodCheckLengthEquals:()=>Tb,$ZodCheckLessThan:()=>Tl,$ZodCheckLowerCase:()=>Ab,$ZodCheckMaxLength:()=>zb,$ZodCheckMaxSize:()=>Eb,$ZodCheckMimeType:()=>Lb,$ZodCheckMinLength:()=>Pb,$ZodCheckMinSize:()=>Ob,$ZodCheckMultipleOf:()=>Sb,$ZodCheckNumberFormat:()=>xb,$ZodCheckOverwrite:()=>qb,$ZodCheckProperty:()=>Ub,$ZodCheckRegex:()=>jb,$ZodCheckSizeEquals:()=>Nb,$ZodCheckStartsWith:()=>Db,$ZodCheckStringFormat:()=>go,$ZodCheckUpperCase:()=>Cb,$ZodCodec:()=>vo,$ZodCustom:()=>Vd,$ZodCustomStringFormat:()=>cd,$ZodDate:()=>vd,$ZodDefault:()=>Td,$ZodDiscriminatedUnion:()=>$d,$ZodE164:()=>sd,$ZodEmail:()=>ql,$ZodEmoji:()=>Fl,$ZodEncodeError:()=>un,$ZodEnum:()=>Id,$ZodError:()=>xa,$ZodFile:()=>Od,$ZodFunction:()=>qd,$ZodGUID:()=>Ul,$ZodIPv4:()=>ed,$ZodIPv6:()=>td,$ZodISODate:()=>Yl,$ZodISODateTime:()=>Gl,$ZodISODuration:()=>Ql,$ZodISOTime:()=>Xl,$ZodIntersection:()=>wd,$ZodJWT:()=>ad,$ZodKSUID:()=>Wl,$ZodLazy:()=>Fd,$ZodLiteral:()=>Ed,$ZodMap:()=>Sd,$ZodNaN:()=>Dd,$ZodNanoID:()=>Vl,$ZodNever:()=>gd,$ZodNonOptional:()=>Ad,$ZodNull:()=>pd,$ZodNullable:()=>Pd,$ZodNumber:()=>Na,$ZodNumberFormat:()=>ud,$ZodObject:()=>_d,$ZodObjectJIT:()=>Jb,$ZodOptional:()=>zd,$ZodPipe:()=>Md,$ZodPrefault:()=>jd,$ZodPromise:()=>Zd,$ZodReadonly:()=>Ud,$ZodRealError:()=>ht,$ZodRecord:()=>kd,$ZodRegistry:()=>_o,$ZodSet:()=>xd,$ZodString:()=>yn,$ZodStringFormat:()=>ye,$ZodSuccess:()=>Cd,$ZodSymbol:()=>dd,$ZodTemplateLiteral:()=>Ld,$ZodTransform:()=>Nd,$ZodTuple:()=>Ta,$ZodType:()=>B,$ZodULID:()=>Kl,$ZodURL:()=>Zl,$ZodUUID:()=>Ll,$ZodUndefined:()=>fd,$ZodUnion:()=>Pa,$ZodUnknown:()=>hd,$ZodVoid:()=>yd,$ZodXID:()=>Hl,$brand:()=>va,$constructor:()=>_,$input:()=>Wd,$output:()=>Hd,Doc:()=>Oa,JSONSchema:()=>oN,JSONSchemaGenerator:()=>rc,NEVER:()=>vl,TimePrecision:()=>Xd,_any:()=>_f,_array:()=>Bb,_base64:()=>Xa,_base64url:()=>Qa,_bigint:()=>pf,_boolean:()=>df,_catch:()=>_6,_check:()=>iN,_cidrv4:()=>Ga,_cidrv6:()=>Ya,_coercedBigint:()=>mf,_coercedBoolean:()=>ff,_coercedDate:()=>xf,_coercedNumber:()=>of,_coercedString:()=>Yd,_cuid:()=>Fa,_cuid2:()=>Va,_custom:()=>jf,_date:()=>Sf,_decode:()=>Sl,_decodeAsync:()=>Il,_default:()=>y6,_discriminatedUnion:()=>o6,_e164:()=>ec,_email:()=>Ra,_emoji:()=>qa,_encode:()=>kl,_encodeAsync:()=>xl,_endsWith:()=>No,_enum:()=>d6,_file:()=>Tf,_float32:()=>af,_float64:()=>cf,_gt:()=>pr,_gte:()=>et,_guid:()=>$o,_includes:()=>Eo,_int:()=>sf,_int32:()=>uf,_int64:()=>hf,_intersection:()=>s6,_ipv4:()=>Ha,_ipv6:()=>Wa,_isoDate:()=>ef,_isoDateTime:()=>Qd,_isoDuration:()=>rf,_isoTime:()=>tf,_jwt:()=>tc,_ksuid:()=>Ka,_lazy:()=>S6,_length:()=>ei,_literal:()=>p6,_lowercase:()=>xo,_lt:()=>fr,_lte:()=>yt,_map:()=>u6,_max:()=>yt,_maxLength:()=>Qn,_maxSize:()=>Xn,_mime:()=>zo,_min:()=>et,_minLength:()=>Cr,_minSize:()=>bn,_multipleOf:()=>vn,_nan:()=>If,_nanoid:()=>Za,_nativeEnum:()=>f6,_negative:()=>Of,_never:()=>wf,_nonnegative:()=>zf,_nonoptional:()=>v6,_nonpositive:()=>Nf,_normalize:()=>Po,_null:()=>bf,_nullable:()=>g6,_number:()=>nf,_optional:()=>h6,_overwrite:()=>mr,_parse:()=>fo,_parseAsync:()=>po,_pipe:()=>$6,_positive:()=>Ef,_promise:()=>x6,_property:()=>Pf,_readonly:()=>w6,_record:()=>c6,_refine:()=>Af,_regex:()=>So,_safeDecode:()=>Ol,_safeDecodeAsync:()=>zl,_safeEncode:()=>El,_safeEncodeAsync:()=>Nl,_safeParse:()=>mo,_safeParseAsync:()=>ho,_set:()=>l6,_size:()=>ko,_startsWith:()=>Oo,_string:()=>Gd,_stringFormat:()=>ti,_stringbool:()=>Rf,_success:()=>b6,_superRefine:()=>Cf,_symbol:()=>yf,_templateLiteral:()=>k6,_toLowerCase:()=>jo,_toUpperCase:()=>Ao,_transform:()=>m6,_trim:()=>To,_tuple:()=>a6,_uint32:()=>lf,_uint64:()=>gf,_ulid:()=>Ja,_undefined:()=>vf,_union:()=>i6,_unknown:()=>$f,_uppercase:()=>Io,_url:()=>wo,_uuid:()=>Da,_uuidv4:()=>Ma,_uuidv6:()=>Ua,_uuidv7:()=>La,_void:()=>kf,_xid:()=>Ba,clone:()=>Fe,config:()=>Ae,decode:()=>ME,decodeAsync:()=>LE,encode:()=>DE,encodeAsync:()=>UE,flattenError:()=>uo,formatError:()=>lo,globalConfig:()=>ya,globalRegistry:()=>Yt,isValidBase64:()=>Vb,isValidBase64URL:()=>aO,isValidJWT:()=>cO,locales:()=>bo,parse:()=>Wn,parseAsync:()=>Gn,prettifyError:()=>wl,regexes:()=>gt,registry:()=>Ca,safeDecode:()=>ZE,safeDecodeAsync:()=>VE,safeEncode:()=>qE,safeEncodeAsync:()=>FE,safeParse:()=>hn,safeParseAsync:()=>gn,toDotPath:()=>RE,toJSONSchema:()=>Co,treeifyError:()=>$l,util:()=>O,version:()=>Zb});var vl=Object.freeze({status:"aborted"});function _(t,e,r){function i(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(t),e(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 o extends n{}Object.defineProperty(o,"name",{value:t});function s(a){var c;let u=r?.Parent?new o:this;i(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(t)}),Object.defineProperty(s,"name",{value:t}),s}var va=Symbol("zod_brand"),Gt=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},un=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}},ya={};function Ae(t){return t&&Object.assign(ya,t),ya}var O={};Ut(O,{BIGINT_FORMAT_RANGES:()=>Hv,Class:()=>qv,NUMBER_FORMAT_RANGES:()=>Kv,aborted:()=>mn,allowsEval:()=>Fv,assert:()=>dq,assertEqual:()=>aq,assertIs:()=>uq,assertNever:()=>lq,assertNotEqual:()=>cq,assignProp:()=>dn,base64ToUint8Array:()=>jE,base64urlToUint8Array:()=>Oq,cached:()=>ao,captureStackTrace:()=>_l,cleanEnum:()=>Eq,cleanRegex:()=>$a,clone:()=>Fe,cloneDef:()=>pq,createTransparentProxy:()=>bq,defineLazy:()=>ne,esc:()=>bl,escapeRegex:()=>dr,extend:()=>wq,finalizeIssue:()=>St,floatSafeRemainder:()=>Zv,getElementAtPath:()=>mq,getEnumValues:()=>_a,getLengthableOrigin:()=>Sa,getParsedType:()=>vq,getSizableOrigin:()=>ka,hexToUint8Array:()=>zq,isObject:()=>Hn,isPlainObject:()=>pn,issue:()=>co,joinValues:()=>S,jsonStringifyReplacer:()=>so,merge:()=>Sq,mergeDefs:()=>fn,normalizeParams:()=>z,nullish:()=>ln,numKeys:()=>yq,objectClone:()=>fq,omit:()=>$q,optionalKeys:()=>Bv,partial:()=>xq,pick:()=>_q,prefixIssues:()=>kt,primitiveTypes:()=>Jv,promiseAllObject:()=>hq,propertyKeyTypes:()=>wa,randomString:()=>gq,required:()=>Iq,safeExtend:()=>kq,shallowClone:()=>Vv,stringifyPrimitive:()=>N,uint8ArrayToBase64:()=>AE,uint8ArrayToBase64url:()=>Nq,uint8ArrayToHex:()=>Pq,unwrapMessage:()=>ba});function aq(t){return t}function cq(t){return t}function uq(t){}function lq(t){throw new Error}function dq(t){}function _a(t){let e=Object.values(t).filter(i=>typeof i=="number");return Object.entries(t).filter(([i,n])=>e.indexOf(+i)===-1).map(([i,n])=>n)}function S(t,e="|"){return t.map(r=>N(r)).join(e)}function so(t,e){return typeof e=="bigint"?e.toString():e}function ao(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function ln(t){return t==null}function $a(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function Zv(t,e){let r=(t.toString().split(".")[1]||"").length,i=e.toString(),n=(i.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(i)){let c=i.match(/\d?e-(\d?)/);c?.[1]&&(n=Number.parseInt(c[1]))}let o=r>n?r:n,s=Number.parseInt(t.toFixed(o).replace(".","")),a=Number.parseInt(e.toFixed(o).replace(".",""));return s%a/10**o}var TE=Symbol("evaluating");function ne(t,e,r){let i;Object.defineProperty(t,e,{get(){if(i!==TE)return i===void 0&&(i=TE,i=r()),i},set(n){Object.defineProperty(t,e,{value:n})},configurable:!0})}function fq(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function dn(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function fn(...t){let e={};for(let r of t){let i=Object.getOwnPropertyDescriptors(r);Object.assign(e,i)}return Object.defineProperties({},e)}function pq(t){return fn(t._zod.def)}function mq(t,e){return e?e.reduce((r,i)=>r?.[i],t):t}function hq(t){let e=Object.keys(t),r=e.map(i=>t[i]);return Promise.all(r).then(i=>{let n={};for(let o=0;o<e.length;o++)n[e[o]]=i[o];return n})}function gq(t=10){let e="abcdefghijklmnopqrstuvwxyz",r="";for(let i=0;i<t;i++)r+=e[Math.floor(Math.random()*e.length)];return r}function bl(t){return JSON.stringify(t)}var _l="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function Hn(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var Fv=ao(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function pn(t){if(Hn(t)===!1)return!1;let e=t.constructor;if(e===void 0)return!0;let r=e.prototype;return!(Hn(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Vv(t){return pn(t)?{...t}:Array.isArray(t)?[...t]:t}function yq(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}var vq=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},wa=new Set(["string","number","symbol"]),Jv=new Set(["string","number","bigint","boolean","symbol","undefined"]);function dr(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Fe(t,e,r){let i=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(i._zod.parent=t),i}function z(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function bq(t){let e;return new Proxy({},{get(r,i,n){return e??(e=t()),Reflect.get(e,i,n)},set(r,i,n,o){return e??(e=t()),Reflect.set(e,i,n,o)},has(r,i){return e??(e=t()),Reflect.has(e,i)},deleteProperty(r,i){return e??(e=t()),Reflect.deleteProperty(e,i)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,i){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,i)},defineProperty(r,i,n){return e??(e=t()),Reflect.defineProperty(e,i,n)}})}function N(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function Bv(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}var Kv={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]},Hv={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function _q(t,e){let r=t._zod.def,i=fn(t._zod.def,{get shape(){let n={};for(let o in e){if(!(o in r.shape))throw new Error(`Unrecognized key: "${o}"`);e[o]&&(n[o]=r.shape[o])}return dn(this,"shape",n),n},checks:[]});return Fe(t,i)}function $q(t,e){let r=t._zod.def,i=fn(t._zod.def,{get shape(){let n={...t._zod.def.shape};for(let o in e){if(!(o in r.shape))throw new Error(`Unrecognized key: "${o}"`);e[o]&&delete n[o]}return dn(this,"shape",n),n},checks:[]});return Fe(t,i)}function wq(t,e){if(!pn(e))throw new Error("Invalid input to extend: expected a plain object");let r=t._zod.def.checks;if(r&&r.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");let n=fn(t._zod.def,{get shape(){let o={...t._zod.def.shape,...e};return dn(this,"shape",o),o},checks:[]});return Fe(t,n)}function kq(t,e){if(!pn(e))throw new Error("Invalid input to safeExtend: expected a plain object");let r={...t._zod.def,get shape(){let i={...t._zod.def.shape,...e};return dn(this,"shape",i),i},checks:t._zod.def.checks};return Fe(t,r)}function Sq(t,e){let r=fn(t._zod.def,{get shape(){let i={...t._zod.def.shape,...e._zod.def.shape};return dn(this,"shape",i),i},get catchall(){return e._zod.def.catchall},checks:[]});return Fe(t,r)}function xq(t,e,r){let i=fn(e._zod.def,{get shape(){let n=e._zod.def.shape,o={...n};if(r)for(let s in r){if(!(s in n))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(o[s]=t?new t({type:"optional",innerType:n[s]}):n[s])}else for(let s in n)o[s]=t?new t({type:"optional",innerType:n[s]}):n[s];return dn(this,"shape",o),o},checks:[]});return Fe(e,i)}function Iq(t,e,r){let i=fn(e._zod.def,{get shape(){let n=e._zod.def.shape,o={...n};if(r)for(let s in r){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(o[s]=new t({type:"nonoptional",innerType:n[s]}))}else for(let s in n)o[s]=new t({type:"nonoptional",innerType:n[s]});return dn(this,"shape",o),o},checks:[]});return Fe(e,i)}function mn(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function kt(t,e){return e.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(t),r})}function ba(t){return typeof t=="string"?t:t?.message}function St(t,e,r){let i={...t,path:t.path??[]};if(!t.message){let n=ba(t.inst?._zod.def?.error?.(t))??ba(e?.error?.(t))??ba(r.customError?.(t))??ba(r.localeError?.(t))??"Invalid input";i.message=n}return delete i.inst,delete i.continue,e?.reportInput||delete i.input,i}function ka(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function Sa(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function co(...t){let[e,r,i]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:i}:{...e}}function Eq(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function jE(t){let e=atob(t),r=new Uint8Array(e.length);for(let i=0;i<e.length;i++)r[i]=e.charCodeAt(i);return r}function AE(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function Oq(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-e.length%4)%4);return jE(e+r)}function Nq(t){return AE(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function zq(t){let e=t.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(e.length/2);for(let i=0;i<e.length;i+=2)r[i/2]=Number.parseInt(e.slice(i,i+2),16);return r}function Pq(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var qv=class{constructor(...e){}};var CE=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,so,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},xa=_("$ZodError",CE),ht=_("$ZodError",CE,{Parent:Error});function uo(t,e=r=>r.message){let r={},i=[];for(let n of t.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(e(n))):i.push(e(n));return{formErrors:i,fieldErrors:r}}function lo(t,e=r=>r.message){let r={_errors:[]},i=n=>{for(let o of n.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(s=>i({issues:s}));else if(o.code==="invalid_key")i({issues:o.issues});else if(o.code==="invalid_element")i({issues:o.issues});else if(o.path.length===0)r._errors.push(e(o));else{let s=r,a=0;for(;a<o.path.length;){let c=o.path[a];a===o.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(e(o))):s[c]=s[c]||{_errors:[]},s=s[c],a++}}};return i(t),r}function $l(t,e=r=>r.message){let r={errors:[]},i=(n,o=[])=>{var s,a;for(let c of n.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>i({issues:u},c.path));else if(c.code==="invalid_key")i({issues:c.issues},c.path);else if(c.code==="invalid_element")i({issues:c.issues},c.path);else{let u=[...o,...c.path];if(u.length===0){r.errors.push(e(c));continue}let l=r,d=0;for(;d<u.length;){let m=u[d],h=d===u.length-1;typeof m=="string"?(l.properties??(l.properties={}),(s=l.properties)[m]??(s[m]={errors:[]}),l=l.properties[m]):(l.items??(l.items=[]),(a=l.items)[m]??(a[m]={errors:[]}),l=l.items[m]),h&&l.errors.push(e(c)),d++}}};return i(t),r}function RE(t){let e=[],r=t.map(i=>typeof i=="object"?i.key:i);for(let i of r)typeof i=="number"?e.push(`[${i}]`):typeof i=="symbol"?e.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?e.push(`[${JSON.stringify(i)}]`):(e.length&&e.push("."),e.push(i));return e.join("")}function wl(t){let e=[],r=[...t.issues].sort((i,n)=>(i.path??[]).length-(n.path??[]).length);for(let i of r)e.push(`\u2716 ${i.message}`),i.path?.length&&e.push(` \u2192 at ${RE(i.path)}`);return e.join(`
|
|
199
|
-
`)}var fo=t=>(e,r,i,n)=>{let o=i?Object.assign(i,{async:!1}):{async:!1},s=e._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Gt;if(s.issues.length){let a=new(n?.Err??t)(s.issues.map(c=>St(c,o,Ae())));throw _l(a,n?.callee),a}return s.value},Wn=fo(ht),po=t=>async(e,r,i,n)=>{let o=i?Object.assign(i,{async:!0}):{async:!0},s=e._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(n?.Err??t)(s.issues.map(c=>St(c,o,Ae())));throw _l(a,n?.callee),a}return s.value},Gn=po(ht),mo=t=>(e,r,i)=>{let n=i?{...i,async:!1}:{async:!1},o=e._zod.run({value:r,issues:[]},n);if(o instanceof Promise)throw new Gt;return o.issues.length?{success:!1,error:new(t??xa)(o.issues.map(s=>St(s,n,Ae())))}:{success:!0,data:o.value}},hn=mo(ht),ho=t=>async(e,r,i)=>{let n=i?Object.assign(i,{async:!0}):{async:!0},o=e._zod.run({value:r,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new t(o.issues.map(s=>St(s,n,Ae())))}:{success:!0,data:o.value}},gn=ho(ht),kl=t=>(e,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return fo(t)(e,r,n)},DE=kl(ht),Sl=t=>(e,r,i)=>fo(t)(e,r,i),ME=Sl(ht),xl=t=>async(e,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return po(t)(e,r,n)},UE=xl(ht),Il=t=>async(e,r,i)=>po(t)(e,r,i),LE=Il(ht),El=t=>(e,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return mo(t)(e,r,n)},qE=El(ht),Ol=t=>(e,r,i)=>mo(t)(e,r,i),ZE=Ol(ht),Nl=t=>async(e,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return ho(t)(e,r,n)},FE=Nl(ht),zl=t=>async(e,r,i)=>ho(t)(e,r,i),VE=zl(ht);var gt={};Ut(gt,{base64:()=>ub,base64url:()=>Pl,bigint:()=>gb,boolean:()=>bb,browserEmail:()=>Lq,cidrv4:()=>ab,cidrv6:()=>cb,cuid:()=>Wv,cuid2:()=>Gv,date:()=>fb,datetime:()=>mb,domain:()=>Zq,duration:()=>tb,e164:()=>db,email:()=>nb,emoji:()=>ib,extendedDuration:()=>jq,guid:()=>rb,hex:()=>Fq,hostname:()=>lb,html5Email:()=>Dq,idnEmail:()=>Uq,integer:()=>yb,ipv4:()=>ob,ipv6:()=>sb,ksuid:()=>Qv,lowercase:()=>wb,md5_base64:()=>Jq,md5_base64url:()=>Bq,md5_hex:()=>Vq,nanoid:()=>eb,null:()=>_b,number:()=>vb,rfc5322Email:()=>Mq,sha1_base64:()=>Hq,sha1_base64url:()=>Wq,sha1_hex:()=>Kq,sha256_base64:()=>Yq,sha256_base64url:()=>Xq,sha256_hex:()=>Gq,sha384_base64:()=>eZ,sha384_base64url:()=>tZ,sha384_hex:()=>Qq,sha512_base64:()=>nZ,sha512_base64url:()=>iZ,sha512_hex:()=>rZ,string:()=>hb,time:()=>pb,ulid:()=>Yv,undefined:()=>$b,unicodeEmail:()=>JE,uppercase:()=>kb,uuid:()=>Yn,uuid4:()=>Aq,uuid6:()=>Cq,uuid7:()=>Rq,xid:()=>Xv});var Wv=/^[cC][^\s-]{8,}$/,Gv=/^[0-9a-z]+$/,Yv=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Xv=/^[0-9a-vA-V]{20}$/,Qv=/^[A-Za-z0-9]{27}$/,eb=/^[a-zA-Z0-9_-]{21}$/,tb=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,jq=/^[-+]?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)?)??$/,rb=/^([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})$/,Yn=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Aq=Yn(4),Cq=Yn(6),Rq=Yn(7),nb=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Dq=/^[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])?)*$/,Mq=/^(([^<>()\[\]\\.,;:\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,}))$/,JE=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Uq=JE,Lq=/^[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])?)*$/,qq="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function ib(){return new RegExp(qq,"u")}var ob=/^(?:(?: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])$/,sb=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,ab=/^((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])$/,cb=/^(([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])$/,ub=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Pl=/^[A-Za-z0-9_-]*$/,lb=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Zq=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,db=/^\+(?:[0-9]){6,14}[0-9]$/,BE="(?:(?:\\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])))",fb=new RegExp(`^${BE}$`);function KE(t){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function pb(t){return new RegExp(`^${KE(t)}$`)}function mb(t){let e=KE({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${e}(?:${r.join("|")})`;return new RegExp(`^${BE}T(?:${i})$`)}var hb=t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},gb=/^-?\d+n?$/,yb=/^-?\d+$/,vb=/^-?\d+(?:\.\d+)?/,bb=/^(?:true|false)$/i,_b=/^null$/i;var $b=/^undefined$/i;var wb=/^[^A-Z]*$/,kb=/^[^a-z]*$/,Fq=/^[0-9a-fA-F]*$/;function Ia(t,e){return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`)}function Ea(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}var Vq=/^[0-9a-fA-F]{32}$/,Jq=Ia(22,"=="),Bq=Ea(22),Kq=/^[0-9a-fA-F]{40}$/,Hq=Ia(27,"="),Wq=Ea(27),Gq=/^[0-9a-fA-F]{64}$/,Yq=Ia(43,"="),Xq=Ea(43),Qq=/^[0-9a-fA-F]{96}$/,eZ=Ia(64,""),tZ=Ea(64),rZ=/^[0-9a-fA-F]{128}$/,nZ=Ia(86,"=="),iZ=Ea(86);var xe=_("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),WE={number:"number",bigint:"bigint",object:"date"},Tl=_("$ZodCheckLessThan",(t,e)=>{xe.init(t,e);let r=WE[typeof e.value];t._zod.onattach.push(i=>{let n=i._zod.bag,o=(e.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<o&&(e.inclusive?n.maximum=e.value:n.exclusiveMaximum=e.value)}),t._zod.check=i=>{(e.inclusive?i.value<=e.value:i.value<e.value)||i.issues.push({origin:r,code:"too_big",maximum:e.value,input:i.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),jl=_("$ZodCheckGreaterThan",(t,e)=>{xe.init(t,e);let r=WE[typeof e.value];t._zod.onattach.push(i=>{let n=i._zod.bag,o=(e.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>o&&(e.inclusive?n.minimum=e.value:n.exclusiveMinimum=e.value)}),t._zod.check=i=>{(e.inclusive?i.value>=e.value:i.value>e.value)||i.issues.push({origin:r,code:"too_small",minimum:e.value,input:i.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Sb=_("$ZodCheckMultipleOf",(t,e)=>{xe.init(t,e),t._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=e.value)}),t._zod.check=r=>{if(typeof r.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%e.value===BigInt(0):Zv(r.value,e.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:e.value,input:r.value,inst:t,continue:!e.abort})}}),xb=_("$ZodCheckNumberFormat",(t,e)=>{xe.init(t,e),e.format=e.format||"float64";let r=e.format?.includes("int"),i=r?"int":"number",[n,o]=Kv[e.format];t._zod.onattach.push(s=>{let a=s._zod.bag;a.format=e.format,a.minimum=n,a.maximum=o,r&&(a.pattern=yb)}),t._zod.check=s=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:i,format:e.format,code:"invalid_type",continue:!1,input:a,inst:t});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:t,origin:i,continue:!e.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:i,continue:!e.abort});return}}a<n&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:n,inclusive:!0,inst:t,continue:!e.abort}),a>o&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inst:t})}}),Ib=_("$ZodCheckBigIntFormat",(t,e)=>{xe.init(t,e);let[r,i]=Hv[e.format];t._zod.onattach.push(n=>{let o=n._zod.bag;o.format=e.format,o.minimum=r,o.maximum=i}),t._zod.check=n=>{let o=n.value;o<r&&n.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),o>i&&n.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inst:t})}}),Eb=_("$ZodCheckMaxSize",(t,e)=>{var r;xe.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!ln(n)&&n.size!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<n&&(i._zod.bag.maximum=e.maximum)}),t._zod.check=i=>{let n=i.value;n.size<=e.maximum||i.issues.push({origin:ka(n),code:"too_big",maximum:e.maximum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),Ob=_("$ZodCheckMinSize",(t,e)=>{var r;xe.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!ln(n)&&n.size!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(i._zod.bag.minimum=e.minimum)}),t._zod.check=i=>{let n=i.value;n.size>=e.minimum||i.issues.push({origin:ka(n),code:"too_small",minimum:e.minimum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),Nb=_("$ZodCheckSizeEquals",(t,e)=>{var r;xe.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!ln(n)&&n.size!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag;n.minimum=e.size,n.maximum=e.size,n.size=e.size}),t._zod.check=i=>{let n=i.value,o=n.size;if(o===e.size)return;let s=o>e.size;i.issues.push({origin:ka(n),...s?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:i.value,inst:t,continue:!e.abort})}}),zb=_("$ZodCheckMaxLength",(t,e)=>{var r;xe.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!ln(n)&&n.length!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<n&&(i._zod.bag.maximum=e.maximum)}),t._zod.check=i=>{let n=i.value;if(n.length<=e.maximum)return;let s=Sa(n);i.issues.push({origin:s,code:"too_big",maximum:e.maximum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),Pb=_("$ZodCheckMinLength",(t,e)=>{var r;xe.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!ln(n)&&n.length!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(i._zod.bag.minimum=e.minimum)}),t._zod.check=i=>{let n=i.value;if(n.length>=e.minimum)return;let s=Sa(n);i.issues.push({origin:s,code:"too_small",minimum:e.minimum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),Tb=_("$ZodCheckLengthEquals",(t,e)=>{var r;xe.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!ln(n)&&n.length!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag;n.minimum=e.length,n.maximum=e.length,n.length=e.length}),t._zod.check=i=>{let n=i.value,o=n.length;if(o===e.length)return;let s=Sa(n),a=o>e.length;i.issues.push({origin:s,...a?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:i.value,inst:t,continue:!e.abort})}}),go=_("$ZodCheckStringFormat",(t,e)=>{var r,i;xe.init(t,e),t._zod.onattach.push(n=>{let o=n._zod.bag;o.format=e.format,e.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:e.format,input:n.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(i=t._zod).check??(i.check=()=>{})}),jb=_("$ZodCheckRegex",(t,e)=>{go.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),Ab=_("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=wb),go.init(t,e)}),Cb=_("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=kb),go.init(t,e)}),Rb=_("$ZodCheckIncludes",(t,e)=>{xe.init(t,e);let r=dr(e.includes),i=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=i,t._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),t._zod.check=n=>{n.value.includes(e.includes,e.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:n.value,inst:t,continue:!e.abort})}}),Db=_("$ZodCheckStartsWith",(t,e)=>{xe.init(t,e);let r=new RegExp(`^${dr(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(i=>{let n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),t._zod.check=i=>{i.value.startsWith(e.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:i.value,inst:t,continue:!e.abort})}}),Mb=_("$ZodCheckEndsWith",(t,e)=>{xe.init(t,e);let r=new RegExp(`.*${dr(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(i=>{let n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),t._zod.check=i=>{i.value.endsWith(e.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:i.value,inst:t,continue:!e.abort})}});function HE(t,e,r){t.issues.length&&e.issues.push(...kt(r,t.issues))}var Ub=_("$ZodCheckProperty",(t,e)=>{xe.init(t,e),t._zod.check=r=>{let i=e.schema._zod.run({value:r.value[e.property],issues:[]},{});if(i instanceof Promise)return i.then(n=>HE(n,r,e.property));HE(i,r,e.property)}}),Lb=_("$ZodCheckMimeType",(t,e)=>{xe.init(t,e);let r=new Set(e.mime);t._zod.onattach.push(i=>{i._zod.bag.mime=e.mime}),t._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:e.mime,input:i.value.type,inst:t,continue:!e.abort})}}),qb=_("$ZodCheckOverwrite",(t,e)=>{xe.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}});var Oa=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let i=e.split(`
|
|
200
|
-
`).filter(s=>s),n=Math.min(...i.map(s=>s.length-s.trimStart().length)),o=i.map(s=>s.slice(n)).map(s=>" ".repeat(this.indent*2)+s);for(let s of o)this.content.push(s)}compile(){let e=Function,r=this?.args,n=[...(this?.content??[""]).map(o=>` ${o}`)];return new e(...r,n.join(`
|
|
201
|
-
`))}};var Zb={major:4,minor:1,patch:12};var B=_("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=Zb;let i=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&i.unshift(t);for(let n of i)for(let o of n._zod.onattach)o(t);if(i.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let n=(s,a,c)=>{let u=mn(s),l;for(let d of a){if(d._zod.def.when){if(!d._zod.def.when(s))continue}else if(u)continue;let m=s.issues.length,h=d._zod.check(s);if(h instanceof Promise&&c?.async===!1)throw new Gt;if(l||h instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await h,s.issues.length!==m&&(u||(u=mn(s,m)))});else{if(s.issues.length===m)continue;u||(u=mn(s,m))}}return l?l.then(()=>s):s},o=(s,a,c)=>{if(mn(s))return s.aborted=!0,s;let u=n(a,i,c);if(u instanceof Promise){if(c.async===!1)throw new Gt;return u.then(l=>t._zod.parse(l,c))}return t._zod.parse(u,c)};t._zod.run=(s,a)=>{if(a.skipChecks)return t._zod.parse(s,a);if(a.direction==="backward"){let u=t._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return u instanceof Promise?u.then(l=>o(l,s,a)):o(u,s,a)}let c=t._zod.parse(s,a);if(c instanceof Promise){if(a.async===!1)throw new Gt;return c.then(u=>n(u,i,a))}return n(c,i,a)}}t["~standard"]={validate:n=>{try{let o=hn(t,n);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return gn(t,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}}),yn=_("$ZodString",(t,e)=>{B.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??hb(t._zod.bag),t._zod.parse=(r,i)=>{if(e.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:t}),r}}),ye=_("$ZodStringFormat",(t,e)=>{go.init(t,e),yn.init(t,e)}),Ul=_("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=rb),ye.init(t,e)}),Ll=_("$ZodUUID",(t,e)=>{if(e.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(i===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=Yn(i))}else e.pattern??(e.pattern=Yn());ye.init(t,e)}),ql=_("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=nb),ye.init(t,e)}),Zl=_("$ZodURL",(t,e)=>{ye.init(t,e),t._zod.check=r=>{try{let i=r.value.trim(),n=new URL(i);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:lb.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),e.normalize?r.value=n.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),Fl=_("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=ib()),ye.init(t,e)}),Vl=_("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=eb),ye.init(t,e)}),Jl=_("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=Wv),ye.init(t,e)}),Bl=_("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=Gv),ye.init(t,e)}),Kl=_("$ZodULID",(t,e)=>{e.pattern??(e.pattern=Yv),ye.init(t,e)}),Hl=_("$ZodXID",(t,e)=>{e.pattern??(e.pattern=Xv),ye.init(t,e)}),Wl=_("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=Qv),ye.init(t,e)}),Gl=_("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=mb(e)),ye.init(t,e)}),Yl=_("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=fb),ye.init(t,e)}),Xl=_("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=pb(e)),ye.init(t,e)}),Ql=_("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=tb),ye.init(t,e)}),ed=_("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=ob),ye.init(t,e),t._zod.onattach.push(r=>{let i=r._zod.bag;i.format="ipv4"})}),td=_("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=sb),ye.init(t,e),t._zod.onattach.push(r=>{let i=r._zod.bag;i.format="ipv6"}),t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),rd=_("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=ab),ye.init(t,e)}),nd=_("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=cb),ye.init(t,e),t._zod.check=r=>{let i=r.value.split("/");try{if(i.length!==2)throw new Error;let[n,o]=i;if(!o)throw new Error;let s=Number(o);if(`${s}`!==o)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});function Vb(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var id=_("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=ub),ye.init(t,e),t._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),t._zod.check=r=>{Vb(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});function aO(t){if(!Pl.test(t))return!1;let e=t.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return Vb(r)}var od=_("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=Pl),ye.init(t,e),t._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),t._zod.check=r=>{aO(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),sd=_("$ZodE164",(t,e)=>{e.pattern??(e.pattern=db),ye.init(t,e)});function cO(t,e=null){try{let r=t.split(".");if(r.length!==3)return!1;let[i]=r;if(!i)return!1;let n=JSON.parse(atob(i));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||e&&(!("alg"in n)||n.alg!==e))}catch{return!1}}var ad=_("$ZodJWT",(t,e)=>{ye.init(t,e),t._zod.check=r=>{cO(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}}),cd=_("$ZodCustomStringFormat",(t,e)=>{ye.init(t,e),t._zod.check=r=>{e.fn(r.value)||r.issues.push({code:"invalid_format",format:e.format,input:r.value,inst:t,continue:!e.abort})}}),Na=_("$ZodNumber",(t,e)=>{B.init(t,e),t._zod.pattern=t._zod.bag.pattern??vb,t._zod.parse=(r,i)=>{if(e.coerce)try{r.value=Number(r.value)}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let o=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:t,...o?{received:o}:{}}),r}}),ud=_("$ZodNumber",(t,e)=>{xb.init(t,e),Na.init(t,e)}),yo=_("$ZodBoolean",(t,e)=>{B.init(t,e),t._zod.pattern=bb,t._zod.parse=(r,i)=>{if(e.coerce)try{r.value=!!r.value}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:t}),r}}),za=_("$ZodBigInt",(t,e)=>{B.init(t,e),t._zod.pattern=gb,t._zod.parse=(r,i)=>{if(e.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:t}),r}}),ld=_("$ZodBigInt",(t,e)=>{Ib.init(t,e),za.init(t,e)}),dd=_("$ZodSymbol",(t,e)=>{B.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:t}),r}}),fd=_("$ZodUndefined",(t,e)=>{B.init(t,e),t._zod.pattern=$b,t._zod.values=new Set([void 0]),t._zod.optin="optional",t._zod.optout="optional",t._zod.parse=(r,i)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:t}),r}}),pd=_("$ZodNull",(t,e)=>{B.init(t,e),t._zod.pattern=_b,t._zod.values=new Set([null]),t._zod.parse=(r,i)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:t}),r}}),md=_("$ZodAny",(t,e)=>{B.init(t,e),t._zod.parse=r=>r}),hd=_("$ZodUnknown",(t,e)=>{B.init(t,e),t._zod.parse=r=>r}),gd=_("$ZodNever",(t,e)=>{B.init(t,e),t._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)}),yd=_("$ZodVoid",(t,e)=>{B.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:t}),r}}),vd=_("$ZodDate",(t,e)=>{B.init(t,e),t._zod.parse=(r,i)=>{if(e.coerce)try{r.value=new Date(r.value)}catch{}let n=r.value,o=n instanceof Date;return o&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...o?{received:"Invalid Date"}:{},inst:t}),r}});function YE(t,e,r){t.issues.length&&e.issues.push(...kt(r,t.issues)),e.value[r]=t.value}var bd=_("$ZodArray",(t,e)=>{B.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:t}),r;r.value=Array(n.length);let o=[];for(let s=0;s<n.length;s++){let a=n[s],c=e.element._zod.run({value:a,issues:[]},i);c instanceof Promise?o.push(c.then(u=>YE(u,r,s))):YE(c,r,s)}return o.length?Promise.all(o).then(()=>r):r}});function Ml(t,e,r,i){t.issues.length&&e.issues.push(...kt(r,t.issues)),t.value===void 0?r in i&&(e.value[r]=void 0):e.value[r]=t.value}function uO(t){let e=Object.keys(t.shape);for(let i of e)if(!t.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let r=Bv(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(r)}}function lO(t,e,r,i,n,o){let s=[],a=n.keySet,c=n.catchall._zod,u=c.def.type;for(let l of Object.keys(e)){if(a.has(l))continue;if(u==="never"){s.push(l);continue}let d=c.run({value:e[l],issues:[]},i);d instanceof Promise?t.push(d.then(m=>Ml(m,r,l,e))):Ml(d,r,l,e)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:e,inst:o}),t.length?Promise.all(t).then(()=>r):r}var _d=_("$ZodObject",(t,e)=>{if(B.init(t,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){let a=e.shape;Object.defineProperty(e,"shape",{get:()=>{let c={...a};return Object.defineProperty(e,"shape",{value:c}),c}})}let i=ao(()=>uO(e));ne(t._zod,"propValues",()=>{let a=e.shape,c={};for(let u in a){let l=a[u]._zod;if(l.values){c[u]??(c[u]=new Set);for(let d of l.values)c[u].add(d)}}return c});let n=Hn,o=e.catchall,s;t._zod.parse=(a,c)=>{s??(s=i.value);let u=a.value;if(!n(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:t}),a;a.value={};let l=[],d=s.shape;for(let m of s.keys){let f=d[m]._zod.run({value:u[m],issues:[]},c);f instanceof Promise?l.push(f.then(p=>Ml(p,a,m,u))):Ml(f,a,m,u)}return o?lO(l,u,a,c,i.value,t):l.length?Promise.all(l).then(()=>a):a}}),Jb=_("$ZodObjectJIT",(t,e)=>{_d.init(t,e);let r=t._zod.parse,i=ao(()=>uO(e)),n=m=>{let h=new Oa(["shape","payload","ctx"]),f=i.value,p=b=>{let w=bl(b);return`shape[${w}]._zod.run({ value: input[${w}], issues: [] }, ctx)`};h.write("const input = payload.value;");let g=Object.create(null),v=0;for(let b of f.keys)g[b]=`key_${v++}`;h.write("const newResult = {};");for(let b of f.keys){let w=g[b],x=bl(b);h.write(`const ${w} = ${p(b)};`),h.write(`
|
|
202
|
-
if (${w}.issues.length) {
|
|
203
|
-
payload.issues = payload.issues.concat(${w}.issues.map(iss => ({
|
|
204
|
-
...iss,
|
|
205
|
-
path: iss.path ? [${x}, ...iss.path] : [${x}]
|
|
206
|
-
})));
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
if (${w}.value === undefined) {
|
|
211
|
-
if (${x} in input) {
|
|
212
|
-
newResult[${x}] = undefined;
|
|
213
|
-
}
|
|
214
|
-
} else {
|
|
215
|
-
newResult[${x}] = ${w}.value;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
`)}h.write("payload.value = newResult;"),h.write("return payload;");let y=h.compile();return(b,w)=>y(m,b,w)},o,s=Hn,a=!ya.jitless,u=a&&Fv.value,l=e.catchall,d;t._zod.parse=(m,h)=>{d??(d=i.value);let f=m.value;return s(f)?a&&u&&h?.async===!1&&h.jitless!==!0?(o||(o=n(e.shape)),m=o(m,h),l?lO([],f,m,h,d,t):m):r(m,h):(m.issues.push({expected:"object",code:"invalid_type",input:f,inst:t}),m)}});function XE(t,e,r,i){for(let o of t)if(o.issues.length===0)return e.value=o.value,e;let n=t.filter(o=>!mn(o));return n.length===1?(e.value=n[0].value,n[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(o=>o.issues.map(s=>St(s,i,Ae())))}),e)}var Pa=_("$ZodUnion",(t,e)=>{B.init(t,e),ne(t._zod,"optin",()=>e.options.some(n=>n._zod.optin==="optional")?"optional":void 0),ne(t._zod,"optout",()=>e.options.some(n=>n._zod.optout==="optional")?"optional":void 0),ne(t._zod,"values",()=>{if(e.options.every(n=>n._zod.values))return new Set(e.options.flatMap(n=>Array.from(n._zod.values)))}),ne(t._zod,"pattern",()=>{if(e.options.every(n=>n._zod.pattern)){let n=e.options.map(o=>o._zod.pattern);return new RegExp(`^(${n.map(o=>$a(o.source)).join("|")})$`)}});let r=e.options.length===1,i=e.options[0]._zod.run;t._zod.parse=(n,o)=>{if(r)return i(n,o);let s=!1,a=[];for(let c of e.options){let u=c._zod.run({value:n.value,issues:[]},o);if(u instanceof Promise)a.push(u),s=!0;else{if(u.issues.length===0)return u;a.push(u)}}return s?Promise.all(a).then(c=>XE(c,n,t,o)):XE(a,n,t,o)}}),$d=_("$ZodDiscriminatedUnion",(t,e)=>{Pa.init(t,e);let r=t._zod.parse;ne(t._zod,"propValues",()=>{let n={};for(let o of e.options){let s=o._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(o)}"`);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 i=ao(()=>{let n=e.options,o=new Map;for(let s of n){let a=s._zod.propValues?.[e.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);for(let c of a){if(o.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);o.set(c,s)}}return o});t._zod.parse=(n,o)=>{let s=n.value;if(!Hn(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:t}),n;let a=i.value.get(s?.[e.discriminator]);return a?a._zod.run(n,o):e.unionFallback?r(n,o):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,input:s,path:[e.discriminator],inst:t}),n)}}),wd=_("$ZodIntersection",(t,e)=>{B.init(t,e),t._zod.parse=(r,i)=>{let n=r.value,o=e.left._zod.run({value:n,issues:[]},i),s=e.right._zod.run({value:n,issues:[]},i);return o instanceof Promise||s instanceof Promise?Promise.all([o,s]).then(([c,u])=>QE(r,c,u)):QE(r,o,s)}});function Fb(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(pn(t)&&pn(e)){let r=Object.keys(e),i=Object.keys(t).filter(o=>r.indexOf(o)!==-1),n={...t,...e};for(let o of i){let s=Fb(t[o],e[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};n[o]=s.data}return{valid:!0,data:n}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let i=0;i<t.length;i++){let n=t[i],o=e[i],s=Fb(n,o);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function QE(t,e,r){if(e.issues.length&&t.issues.push(...e.issues),r.issues.length&&t.issues.push(...r.issues),mn(t))return t;let i=Fb(e.value,r.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return t.value=i.data,t}var Ta=_("$ZodTuple",(t,e)=>{B.init(t,e);let r=e.items,i=r.length-[...r].reverse().findIndex(n=>n._zod.optin!=="optional");t._zod.parse=(n,o)=>{let s=n.value;if(!Array.isArray(s))return n.issues.push({input:s,inst:t,expected:"tuple",code:"invalid_type"}),n;n.value=[];let a=[];if(!e.rest){let u=s.length>r.length,l=s.length<i-1;if(u||l)return n.issues.push({...u?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},input:s,inst:t,origin:"array"}),n}let c=-1;for(let u of r){if(c++,c>=s.length&&c>=i)continue;let l=u._zod.run({value:s[c],issues:[]},o);l instanceof Promise?a.push(l.then(d=>Al(d,n,c))):Al(l,n,c)}if(e.rest){let u=s.slice(r.length);for(let l of u){c++;let d=e.rest._zod.run({value:l,issues:[]},o);d instanceof Promise?a.push(d.then(m=>Al(m,n,c))):Al(d,n,c)}}return a.length?Promise.all(a).then(()=>n):n}});function Al(t,e,r){t.issues.length&&e.issues.push(...kt(r,t.issues)),e.value[r]=t.value}var kd=_("$ZodRecord",(t,e)=>{B.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;if(!pn(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:t}),r;let o=[];if(e.keyType._zod.values){let s=e.keyType._zod.values;r.value={};for(let c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let u=e.valueType._zod.run({value:n[c],issues:[]},i);u instanceof Promise?o.push(u.then(l=>{l.issues.length&&r.issues.push(...kt(c,l.issues)),r.value[c]=l.value})):(u.issues.length&&r.issues.push(...kt(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:t,keys:a})}else{r.value={};for(let s of Reflect.ownKeys(n)){if(s==="__proto__")continue;let a=e.keyType._zod.run({value:s,issues:[]},i);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(u=>St(u,i,Ae())),input:s,path:[s],inst:t}),r.value[a.value]=a.value;continue}let c=e.valueType._zod.run({value:n[s],issues:[]},i);c instanceof Promise?o.push(c.then(u=>{u.issues.length&&r.issues.push(...kt(s,u.issues)),r.value[a.value]=u.value})):(c.issues.length&&r.issues.push(...kt(s,c.issues)),r.value[a.value]=c.value)}}return o.length?Promise.all(o).then(()=>r):r}}),Sd=_("$ZodMap",(t,e)=>{B.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:t}),r;let o=[];r.value=new Map;for(let[s,a]of n){let c=e.keyType._zod.run({value:s,issues:[]},i),u=e.valueType._zod.run({value:a,issues:[]},i);c instanceof Promise||u instanceof Promise?o.push(Promise.all([c,u]).then(([l,d])=>{eO(l,d,r,s,n,t,i)})):eO(c,u,r,s,n,t,i)}return o.length?Promise.all(o).then(()=>r):r}});function eO(t,e,r,i,n,o,s){t.issues.length&&(wa.has(typeof i)?r.issues.push(...kt(i,t.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:o,issues:t.issues.map(a=>St(a,s,Ae()))})),e.issues.length&&(wa.has(typeof i)?r.issues.push(...kt(i,e.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:e.issues.map(a=>St(a,s,Ae()))})),r.value.set(t.value,e.value)}var xd=_("$ZodSet",(t,e)=>{B.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:t,expected:"set",code:"invalid_type"}),r;let o=[];r.value=new Set;for(let s of n){let a=e.valueType._zod.run({value:s,issues:[]},i);a instanceof Promise?o.push(a.then(c=>tO(c,r))):tO(a,r)}return o.length?Promise.all(o).then(()=>r):r}});function tO(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}var Id=_("$ZodEnum",(t,e)=>{B.init(t,e);let r=_a(e.entries),i=new Set(r);t._zod.values=i,t._zod.pattern=new RegExp(`^(${r.filter(n=>wa.has(typeof n)).map(n=>typeof n=="string"?dr(n):n.toString()).join("|")})$`),t._zod.parse=(n,o)=>{let s=n.value;return i.has(s)||n.issues.push({code:"invalid_value",values:r,input:s,inst:t}),n}}),Ed=_("$ZodLiteral",(t,e)=>{if(B.init(t,e),e.values.length===0)throw new Error("Cannot create literal schema with no valid values");t._zod.values=new Set(e.values),t._zod.pattern=new RegExp(`^(${e.values.map(r=>typeof r=="string"?dr(r):r?dr(r.toString()):String(r)).join("|")})$`),t._zod.parse=(r,i)=>{let n=r.value;return t._zod.values.has(n)||r.issues.push({code:"invalid_value",values:e.values,input:n,inst:t}),r}}),Od=_("$ZodFile",(t,e)=>{B.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:t}),r}}),Nd=_("$ZodTransform",(t,e)=>{B.init(t,e),t._zod.parse=(r,i)=>{if(i.direction==="backward")throw new un(t.constructor.name);let n=e.transform(r.value,r);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then(s=>(r.value=s,r));if(n instanceof Promise)throw new Gt;return r.value=n,r}});function rO(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}var zd=_("$ZodOptional",(t,e)=>{B.init(t,e),t._zod.optin="optional",t._zod.optout="optional",ne(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),ne(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${$a(r.source)})?$`):void 0}),t._zod.parse=(r,i)=>{if(e.innerType._zod.optin==="optional"){let n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>rO(o,r.value)):rO(n,r.value)}return r.value===void 0?r:e.innerType._zod.run(r,i)}}),Pd=_("$ZodNullable",(t,e)=>{B.init(t,e),ne(t._zod,"optin",()=>e.innerType._zod.optin),ne(t._zod,"optout",()=>e.innerType._zod.optout),ne(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${$a(r.source)}|null)$`):void 0}),ne(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,i)=>r.value===null?r:e.innerType._zod.run(r,i)}),Td=_("$ZodDefault",(t,e)=>{B.init(t,e),t._zod.optin="optional",ne(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,i)=>{if(i.direction==="backward")return e.innerType._zod.run(r,i);if(r.value===void 0)return r.value=e.defaultValue,r;let n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>nO(o,e)):nO(n,e)}});function nO(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}var jd=_("$ZodPrefault",(t,e)=>{B.init(t,e),t._zod.optin="optional",ne(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=e.defaultValue),e.innerType._zod.run(r,i))}),Ad=_("$ZodNonOptional",(t,e)=>{B.init(t,e),ne(t._zod,"values",()=>{let r=e.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),t._zod.parse=(r,i)=>{let n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>iO(o,t)):iO(n,t)}});function iO(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}var Cd=_("$ZodSuccess",(t,e)=>{B.init(t,e),t._zod.parse=(r,i)=>{if(i.direction==="backward")throw new un("ZodSuccess");let n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),Rd=_("$ZodCatch",(t,e)=>{B.init(t,e),ne(t._zod,"optin",()=>e.innerType._zod.optin),ne(t._zod,"optout",()=>e.innerType._zod.optout),ne(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,i)=>{if(i.direction==="backward")return e.innerType._zod.run(r,i);let n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.value,o.issues.length&&(r.value=e.catchValue({...r,error:{issues:o.issues.map(s=>St(s,i,Ae()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=e.catchValue({...r,error:{issues:n.issues.map(o=>St(o,i,Ae()))},input:r.value}),r.issues=[]),r)}}),Dd=_("$ZodNaN",(t,e)=>{B.init(t,e),t._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:t,expected:"nan",code:"invalid_type"}),r)}),Md=_("$ZodPipe",(t,e)=>{B.init(t,e),ne(t._zod,"values",()=>e.in._zod.values),ne(t._zod,"optin",()=>e.in._zod.optin),ne(t._zod,"optout",()=>e.out._zod.optout),ne(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,i)=>{if(i.direction==="backward"){let o=e.out._zod.run(r,i);return o instanceof Promise?o.then(s=>Cl(s,e.in,i)):Cl(o,e.in,i)}let n=e.in._zod.run(r,i);return n instanceof Promise?n.then(o=>Cl(o,e.out,i)):Cl(n,e.out,i)}});function Cl(t,e,r){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},r)}var vo=_("$ZodCodec",(t,e)=>{B.init(t,e),ne(t._zod,"values",()=>e.in._zod.values),ne(t._zod,"optin",()=>e.in._zod.optin),ne(t._zod,"optout",()=>e.out._zod.optout),ne(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,i)=>{if((i.direction||"forward")==="forward"){let o=e.in._zod.run(r,i);return o instanceof Promise?o.then(s=>Rl(s,e,i)):Rl(o,e,i)}else{let o=e.out._zod.run(r,i);return o instanceof Promise?o.then(s=>Rl(s,e,i)):Rl(o,e,i)}}});function Rl(t,e,r){if(t.issues.length)return t.aborted=!0,t;if((r.direction||"forward")==="forward"){let n=e.transform(t.value,t);return n instanceof Promise?n.then(o=>Dl(t,o,e.out,r)):Dl(t,n,e.out,r)}else{let n=e.reverseTransform(t.value,t);return n instanceof Promise?n.then(o=>Dl(t,o,e.in,r)):Dl(t,n,e.in,r)}}function Dl(t,e,r,i){return t.issues.length?(t.aborted=!0,t):r._zod.run({value:e,issues:t.issues},i)}var Ud=_("$ZodReadonly",(t,e)=>{B.init(t,e),ne(t._zod,"propValues",()=>e.innerType._zod.propValues),ne(t._zod,"values",()=>e.innerType._zod.values),ne(t._zod,"optin",()=>e.innerType._zod.optin),ne(t._zod,"optout",()=>e.innerType._zod.optout),t._zod.parse=(r,i)=>{if(i.direction==="backward")return e.innerType._zod.run(r,i);let n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(oO):oO(n)}});function oO(t){return t.value=Object.freeze(t.value),t}var Ld=_("$ZodTemplateLiteral",(t,e)=>{B.init(t,e);let r=[];for(let i of e.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let n=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${i._zod.traits}`);let o=n.startsWith("^")?1:0,s=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(o,s))}else if(i===null||Jv.has(typeof i))r.push(dr(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);t._zod.pattern=new RegExp(`^${r.join("")}$`),t._zod.parse=(i,n)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:t,expected:"template_literal",code:"invalid_type"}),i):(t._zod.pattern.lastIndex=0,t._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:t,code:"invalid_format",format:e.format??"template_literal",pattern:t._zod.pattern.source}),i)}),qd=_("$ZodFunction",(t,e)=>(B.init(t,e),t._def=e,t._zod.def=e,t.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...i){let n=t._def.input?Wn(t._def.input,i):i,o=Reflect.apply(r,this,n);return t._def.output?Wn(t._def.output,o):o}},t.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let n=t._def.input?await Gn(t._def.input,i):i,o=await Reflect.apply(r,this,n);return t._def.output?await Gn(t._def.output,o):o}},t._zod.parse=(r,i)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:t}),r):(t._def.output&&t._def.output._zod.def.type==="promise"?r.value=t.implementAsync(r.value):r.value=t.implement(r.value),r),t.input=(...r)=>{let i=t.constructor;return Array.isArray(r[0])?new i({type:"function",input:new Ta({type:"tuple",items:r[0],rest:r[1]}),output:t._def.output}):new i({type:"function",input:r[0],output:t._def.output})},t.output=r=>{let i=t.constructor;return new i({type:"function",input:t._def.input,output:r})},t)),Zd=_("$ZodPromise",(t,e)=>{B.init(t,e),t._zod.parse=(r,i)=>Promise.resolve(r.value).then(n=>e.innerType._zod.run({value:n,issues:[]},i))}),Fd=_("$ZodLazy",(t,e)=>{B.init(t,e),ne(t._zod,"innerType",()=>e.getter()),ne(t._zod,"pattern",()=>t._zod.innerType._zod.pattern),ne(t._zod,"propValues",()=>t._zod.innerType._zod.propValues),ne(t._zod,"optin",()=>t._zod.innerType._zod.optin??void 0),ne(t._zod,"optout",()=>t._zod.innerType._zod.optout??void 0),t._zod.parse=(r,i)=>t._zod.innerType._zod.run(r,i)}),Vd=_("$ZodCustom",(t,e)=>{xe.init(t,e),B.init(t,e),t._zod.parse=(r,i)=>r,t._zod.check=r=>{let i=r.value,n=e.fn(i);if(n instanceof Promise)return n.then(o=>sO(o,r,i,t));sO(n,r,i,t)}});function sO(t,e,r,i){if(!t){let n={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(n.params=i._zod.def.params),e.issues.push(co(n))}}var bo={};Ut(bo,{ar:()=>dO,az:()=>fO,be:()=>mO,bg:()=>hO,ca:()=>gO,cs:()=>yO,da:()=>vO,de:()=>bO,en:()=>Jd,eo:()=>_O,es:()=>$O,fa:()=>wO,fi:()=>kO,fr:()=>SO,frCA:()=>xO,he:()=>IO,hu:()=>EO,id:()=>OO,is:()=>NO,it:()=>zO,ja:()=>PO,ka:()=>TO,kh:()=>jO,km:()=>Bd,ko:()=>AO,lt:()=>RO,mk:()=>DO,ms:()=>MO,nl:()=>UO,no:()=>LO,ota:()=>qO,pl:()=>FO,ps:()=>ZO,pt:()=>VO,ru:()=>BO,sl:()=>KO,sv:()=>HO,ta:()=>WO,th:()=>GO,tr:()=>YO,ua:()=>XO,uk:()=>Kd,ur:()=>QO,vi:()=>eN,yo:()=>nN,zhCN:()=>tN,zhTW:()=>rN});var sZ=()=>{let t={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(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: ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${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"} ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${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 ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${i[o.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":""}: ${S(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 dO(){return{localeError:sZ()}}var aZ=()=>{let t={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${o}${n.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${i[o.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":""}: ${S(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 fO(){return{localeError:aZ()}}function pO(t,e,r,i){let n=Math.abs(t),o=n%10,s=n%100;return s>=11&&s<=19?i:o===1?e:o>=2&&o<=4?r:i}var cZ=()=>{let t={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(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 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);if(s){let a=Number(n.maximum),c=pO(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} ${o}${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 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);if(s){let a=Number(n.minimum),c=pO(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} ${o}${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 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${i[o.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"}: ${S(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 mO(){return{localeError:cZ()}}var uZ=t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(t))return"\u043C\u0430\u0441\u0438\u0432";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},lZ=()=>{let t={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function e(i){return t[i]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"};return i=>{switch(i.code){case"invalid_type":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${uZ(i.input)}`;case"invalid_value":return i.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${N(i.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${S(i.values,"|")}`;case"too_big":{let n=i.inclusive?"<=":"<",o=e(i.origin);return o?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${n}${i.maximum.toString()} ${o.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${n}${i.maximum.toString()}`}case"too_small":{let n=i.inclusive?">=":">",o=e(i.origin);return o?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${n}${i.minimum.toString()} ${o.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${n}${i.minimum.toString()}`}case"invalid_format":{let n=i;if(n.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${n.prefix}"`;if(n.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${n.suffix}"`;if(n.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${n.includes}"`;if(n.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${n.pattern}`;let o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return n.format==="emoji"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="datetime"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="date"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),n.format==="time"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="duration"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${o} ${r[n.format]??i.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${i.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${i.keys.length>1?"\u043E\u0432\u0435":""}: ${S(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${i.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${i.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function hO(){return{localeError:lZ()}}var dZ=()=>{let t={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${S(n.values," o ")}`;case"too_big":{let o=n.inclusive?"com a m\xE0xim":"menys de",s=e(n.origin);return s?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${o} ${n.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"com a m\xEDnim":"m\xE9s de",s=e(n.origin);return s?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${o} ${n.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${i[o.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":""}: ${S(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 gO(){return{localeError:dZ()}}var fZ=()=>{let t={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${o}${n.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${o}${n.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${i[o.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: ${S(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 yO(){return{localeError:fZ()}}var pZ=()=>{let t={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},e={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};function r(s){return t[s]??null}function i(s){return e[s]??s}let n=s=>{let a=typeof s;switch(a){case"number":return Number.isNaN(s)?"NaN":"tal";case"object":return Array.isArray(s)?"liste":s===null?"null":Object.getPrototypeOf(s)!==Object.prototype&&s.constructor?s.constructor.name:"objekt"}return a},o={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return s=>{switch(s.code){case"invalid_type":return`Ugyldigt input: forventede ${i(s.expected)}, fik ${i(n(s.input))}`;case"invalid_value":return s.values.length===1?`Ugyldig v\xE6rdi: forventede ${N(s.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${S(s.values,"|")}`;case"too_big":{let a=s.inclusive?"<=":"<",c=r(s.origin),u=i(s.origin);return c?`For stor: forventede ${u??"value"} ${c.verb} ${a} ${s.maximum.toString()} ${c.unit??"elementer"}`:`For stor: forventede ${u??"value"} havde ${a} ${s.maximum.toString()}`}case"too_small":{let a=s.inclusive?">=":">",c=r(s.origin),u=i(s.origin);return c?`For lille: forventede ${u} ${c.verb} ${a} ${s.minimum.toString()} ${c.unit}`:`For lille: forventede ${u} havde ${a} ${s.minimum.toString()}`}case"invalid_format":{let a=s;return a.format==="starts_with"?`Ugyldig streng: skal starte med "${a.prefix}"`:a.format==="ends_with"?`Ugyldig streng: skal ende med "${a.suffix}"`:a.format==="includes"?`Ugyldig streng: skal indeholde "${a.includes}"`:a.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${a.pattern}`:`Ugyldig ${o[a.format]??s.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${s.divisor}`;case"unrecognized_keys":return`${s.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${S(s.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${s.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${s.origin}`;default:return"Ugyldigt input"}}};function vO(){return{localeError:pZ()}}var mZ=()=>{let t={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ist`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ist`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${i[o.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"}: ${S(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 bO(){return{localeError:mZ()}}var hZ=t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},gZ=()=>{let t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function e(i){return t[i]??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 i=>{switch(i.code){case"invalid_type":return`Invalid input: expected ${i.expected}, received ${hZ(i.input)}`;case"invalid_value":return i.values.length===1?`Invalid input: expected ${N(i.values[0])}`:`Invalid option: expected one of ${S(i.values,"|")}`;case"too_big":{let n=i.inclusive?"<=":"<",o=e(i.origin);return o?`Too big: expected ${i.origin??"value"} to have ${n}${i.maximum.toString()} ${o.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${n}${i.maximum.toString()}`}case"too_small":{let n=i.inclusive?">=":">",o=e(i.origin);return o?`Too small: expected ${i.origin} to have ${n}${i.minimum.toString()} ${o.unit}`:`Too small: expected ${i.origin} to be ${n}${i.minimum.toString()}`}case"invalid_format":{let n=i;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]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${S(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function Jd(){return{localeError:gZ()}}var yZ=t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"nombro";case"object":{if(Array.isArray(t))return"tabelo";if(t===null)return"senvalora";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},vZ=()=>{let t={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function e(i){return t[i]??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 i=>{switch(i.code){case"invalid_type":return`Nevalida enigo: atendi\u011Dis ${i.expected}, ricevi\u011Dis ${yZ(i.input)}`;case"invalid_value":return i.values.length===1?`Nevalida enigo: atendi\u011Dis ${N(i.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${S(i.values,"|")}`;case"too_big":{let n=i.inclusive?"<=":"<",o=e(i.origin);return o?`Tro granda: atendi\u011Dis ke ${i.origin??"valoro"} havu ${n}${i.maximum.toString()} ${o.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${i.origin??"valoro"} havu ${n}${i.maximum.toString()}`}case"too_small":{let n=i.inclusive?">=":">",o=e(i.origin);return o?`Tro malgranda: atendi\u011Dis ke ${i.origin} havu ${n}${i.minimum.toString()} ${o.unit}`:`Tro malgranda: atendi\u011Dis ke ${i.origin} estu ${n}${i.minimum.toString()}`}case"invalid_format":{let n=i;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]??i.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${i.divisor}`;case"unrecognized_keys":return`Nekonata${i.keys.length>1?"j":""} \u015Dlosilo${i.keys.length>1?"j":""}: ${S(i.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${i.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${i.origin}`;default:return"Nevalida enigo"}}};function _O(){return{localeError:vZ()}}var bZ=()=>{let t={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},e={string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};function r(s){return t[s]??null}function i(s){return e[s]??s}let n=s=>{let a=typeof s;switch(a){case"number":return Number.isNaN(s)?"NaN":"number";case"object":return Array.isArray(s)?"array":s===null?"null":Object.getPrototypeOf(s)!==Object.prototype?s.constructor.name:"object"}return a},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 s=>{switch(s.code){case"invalid_type":return`Entrada inv\xE1lida: se esperaba ${i(s.expected)}, recibido ${i(n(s.input))}`;case"invalid_value":return s.values.length===1?`Entrada inv\xE1lida: se esperaba ${N(s.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${S(s.values,"|")}`;case"too_big":{let a=s.inclusive?"<=":"<",c=r(s.origin),u=i(s.origin);return c?`Demasiado grande: se esperaba que ${u??"valor"} tuviera ${a}${s.maximum.toString()} ${c.unit??"elementos"}`:`Demasiado grande: se esperaba que ${u??"valor"} fuera ${a}${s.maximum.toString()}`}case"too_small":{let a=s.inclusive?">=":">",c=r(s.origin),u=i(s.origin);return c?`Demasiado peque\xF1o: se esperaba que ${u} tuviera ${a}${s.minimum.toString()} ${c.unit}`:`Demasiado peque\xF1o: se esperaba que ${u} fuera ${a}${s.minimum.toString()}`}case"invalid_format":{let a=s;return a.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${a.prefix}"`:a.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${a.suffix}"`:a.format==="includes"?`Cadena inv\xE1lida: debe incluir "${a.includes}"`:a.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${a.pattern}`:`Inv\xE1lido ${o[a.format]??s.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${s.divisor}`;case"unrecognized_keys":return`Llave${s.keys.length>1?"s":""} desconocida${s.keys.length>1?"s":""}: ${S(s.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i(s.origin)}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i(s.origin)}`;default:return"Entrada inv\xE1lida"}}};function $O(){return{localeError:bZ()}}var _Z=()=>{let t={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(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 ${S(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${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 ${o}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${i[o.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: ${S(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 wO(){return{localeError:_Z()}}var $Z=()=>{let t={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${o}${n.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${o}${n.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${i[o.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"}: ${S(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 kO(){return{localeError:$Z()}}var wZ=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 : ${N(n.values[0])} attendu`:`Option invalide : une valeur parmi ${S(n.values,"|")} attendue`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Trop grand : ${n.origin??"valeur"} doit ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n.origin??"valeur"} doit \xEAtre ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Trop petit : ${n.origin} doit ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Trop petit : ${n.origin} doit \xEAtre ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${i[o.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":""} : ${S(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 SO(){return{localeError:wZ()}}var kZ=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"\u2264":"<",s=e(n.origin);return s?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${o}${n.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"\u2265":">",s=e(n.origin);return s?`Trop petit : attendu que ${n.origin} ait ${o}${n.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${n.origin} soit ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${i[o.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":""} : ${S(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 xO(){return{localeError:kZ()}}var SZ=()=>{let t={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 e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(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 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${n.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${o}${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 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${n.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${o}${n.minimum.toString()} ${s.unit}`:`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${n.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.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"${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`${i[o.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"}: ${S(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 IO(){return{localeError:SZ()}}var xZ=()=>{let t={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${n.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${o}${n.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${i[o.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":""}: ${S(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 EO(){return{localeError:xZ()}}var IZ=()=>{let t={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${o}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Terlalu kecil: diharapkan ${n.origin} memiliki ${o}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${i[o.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":""}: ${S(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 OO(){return{localeError:IZ()}}var EZ=t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"n\xFAmer";case"object":{if(Array.isArray(t))return"fylki";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},OZ=()=>{let t={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function e(i){return t[i]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"};return i=>{switch(i.code){case"invalid_type":return`Rangt gildi: \xDE\xFA sl\xF3st inn ${EZ(i.input)} \xFEar sem \xE1 a\xF0 vera ${i.expected}`;case"invalid_value":return i.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${N(i.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${S(i.values,"|")}`;case"too_big":{let n=i.inclusive?"<=":"<",o=e(i.origin);return o?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin??"gildi"} hafi ${n}${i.maximum.toString()} ${o.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin??"gildi"} s\xE9 ${n}${i.maximum.toString()}`}case"too_small":{let n=i.inclusive?">=":">",o=e(i.origin);return o?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin} hafi ${n}${i.minimum.toString()} ${o.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin} s\xE9 ${n}${i.minimum.toString()}`}case"invalid_format":{let n=i;return n.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${n.prefix}"`:n.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${n.suffix}"`:n.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${n.includes}"`:n.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${n.pattern}`:`Rangt ${r[n.format]??i.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${i.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${i.keys.length>1?"ir lyklar":"ur lykill"}: ${S(i.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${i.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${i.origin}`;default:return"Rangt gildi"}}};function NO(){return{localeError:OZ()}}var NZ=()=>{let t={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(n.values[0])}`:`Opzione non valida: atteso uno tra ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Troppo grande: ${n.origin??"valore"} deve avere ${o}${n.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Troppo piccolo: ${n.origin} deve avere ${o}${n.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${n.origin} deve essere ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Invalid ${i[o.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"}: ${S(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 zO(){return{localeError:NZ()}}var zZ=()=>{let t={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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: ${N(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${S(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=e(n.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${s.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=e(n.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${s.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${i[o.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":""}: ${S(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 PO(){return{localeError:zZ()}}var PZ=t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8";case"object":{if(Array.isArray(t))return"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return{string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0"}[e]??e},TZ=()=>{let t={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function e(i){return t[i]??null}let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"};return i=>{switch(i.code){case"invalid_type":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${PZ(i.input)}`;case"invalid_value":return i.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${N(i.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${S(i.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let n=i.inclusive?"<=":"<",o=e(i.origin);return o?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${o.verb} ${n}${i.maximum.toString()} ${o.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${n}${i.maximum.toString()}`}case"too_small":{let n=i.inclusive?">=":">",o=e(i.origin);return o?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin} ${o.verb} ${n}${i.minimum.toString()} ${o.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin} \u10D8\u10E7\u10DD\u10E1 ${n}${i.minimum.toString()}`}case"invalid_format":{let n=i;return n.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${n.prefix}"-\u10D8\u10D7`:n.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${n.suffix}"-\u10D8\u10D7`:n.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${n.includes}"-\u10E1`:n.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${n.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[n.format]??i.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${i.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${i.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${S(i.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${i.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${i.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function TO(){return{localeError:TZ()}}var jZ=()=>{let t={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(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 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${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"} ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${o} ${n.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${i[o.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 ${S(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 Bd(){return{localeError:jZ()}}function jO(){return Bd()}var AZ=()=>{let t={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${S(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=e(n.origin),c=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${c} ${o}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${o}${s}`}case"too_small":{let o=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=e(n.origin),c=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${c} ${o}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${o}${s}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${i[o.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: ${S(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 AO(){return{localeError:AZ()}}var CZ=t=>Aa(typeof t,t),Aa=(t,e=void 0)=>{switch(t){case"number":return Number.isNaN(e)?"NaN":"skai\u010Dius";case"bigint":return"sveikasis skai\u010Dius";case"string":return"eilut\u0117";case"boolean":return"login\u0117 reik\u0161m\u0117";case"undefined":case"void":return"neapibr\u0117\u017Eta reik\u0161m\u0117";case"function":return"funkcija";case"symbol":return"simbolis";case"object":return e===void 0?"ne\u017Einomas objektas":e===null?"nulin\u0117 reik\u0161m\u0117":Array.isArray(e)?"masyvas":Object.getPrototypeOf(e)!==Object.prototype&&e.constructor?e.constructor.name:"objektas";case"null":return"nulin\u0117 reik\u0161m\u0117"}return t},ja=t=>t.charAt(0).toUpperCase()+t.slice(1);function CO(t){let e=Math.abs(t),r=e%10,i=e%100;return i>=11&&i<=19||r===0?"many":r===1?"one":"few"}var RZ=()=>{let t={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function e(i,n,o,s){let a=t[i]??null;return a===null?a:{unit:a.unit[n],verb:a.verb[s][o?"inclusive":"notInclusive"]}}let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"};return i=>{switch(i.code){case"invalid_type":return`Gautas tipas ${CZ(i.input)}, o tik\u0117tasi - ${Aa(i.expected)}`;case"invalid_value":return i.values.length===1?`Privalo b\u016Bti ${N(i.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${S(i.values,"|")} pasirinkim\u0173`;case"too_big":{let n=Aa(i.origin),o=e(i.origin,CO(Number(i.maximum)),i.inclusive??!1,"smaller");if(o?.verb)return`${ja(n??i.origin??"reik\u0161m\u0117")} ${o.verb} ${i.maximum.toString()} ${o.unit??"element\u0173"}`;let s=i.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${ja(n??i.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${i.maximum.toString()} ${o?.unit}`}case"too_small":{let n=Aa(i.origin),o=e(i.origin,CO(Number(i.minimum)),i.inclusive??!1,"bigger");if(o?.verb)return`${ja(n??i.origin??"reik\u0161m\u0117")} ${o.verb} ${i.minimum.toString()} ${o.unit??"element\u0173"}`;let s=i.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${ja(n??i.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${i.minimum.toString()} ${o?.unit}`}case"invalid_format":{let n=i;return n.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${n.prefix}"`:n.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${n.suffix}"`:n.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${n.includes}"`:n.format==="regex"?`Eilut\u0117 privalo atitikti ${n.pattern}`:`Neteisingas ${r[n.format]??i.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${i.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${i.keys.length>1?"i":"as"} rakt${i.keys.length>1?"ai":"as"}: ${S(i.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let n=Aa(i.origin);return`${ja(n??i.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function RO(){return{localeError:RZ()}}var DZ=()=>{let t={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(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 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${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 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${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 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${i[o.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"}: ${S(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 DO(){return{localeError:DZ()}}var MZ=()=>{let t={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Terlalu besar: dijangka ${n.origin??"nilai"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Terlalu kecil: dijangka ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${i[o.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${S(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 MO(){return{localeError:MZ()}}var UZ=()=>{let t={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Te lang: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} ${s.unit??"elementen"} bevat`:`Te lang: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} is`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Te kort: verwacht dat ${n.origin} ${o}${n.minimum.toString()} ${s.unit} bevat`:`Te kort: verwacht dat ${n.origin} ${o}${n.minimum.toString()} is`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${i[o.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":""}: ${S(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 UO(){return{localeError:UZ()}}var LZ=()=>{let t={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(n.values[0])}`:`Ugyldig valg: forventet en av ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`For lite(n): forventet ${n.origin} til \xE5 ha ${o}${n.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${i[o.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"}: ${S(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 LO(){return{localeError:LZ()}}var qZ=()=>{let t={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${o}${n.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${o}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${o}${n.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${o}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=n;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${i[o.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":""}: ${S(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 qO(){return{localeError:qZ()}}var ZZ=()=>{let t={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${S(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${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 ${o}${n.maximum.toString()} \u0648\u064A`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${i[o.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"}: ${S(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 ZO(){return{localeError:ZZ()}}var FZ=()=>{let t={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${n.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${n.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${i[o.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":""}: ${S(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 FO(){return{localeError:FZ()}}var VZ=()=>{let t={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${o}${n.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Muito pequeno: esperado que ${n.origin} tivesse ${o}${n.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${i[o.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":""}: ${S(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 VO(){return{localeError:VZ()}}function JO(t,e,r,i){let n=Math.abs(t),o=n%10,s=n%100;return s>=11&&s<=19?i:o===1?e:o>=2&&o<=4?r:i}var JZ=()=>{let t={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(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 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);if(s){let a=Number(n.maximum),c=JO(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 ${o}${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 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);if(s){let a=Number(n.minimum),c=JO(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 ${o}${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 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${i[o.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":""}: ${S(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 BO(){return{localeError:JZ()}}var BZ=()=>{let t={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${o}${n.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${o}${n.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${i[o.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"}: ${S(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 KO(){return{localeError:BZ()}}var KZ=()=>{let t={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${i[o.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"}: ${S(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 HO(){return{localeError:KZ()}}var HZ=()=>{let t={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(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 ${S(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${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"} ${o}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${o}${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} ${o}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${i[o.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":""}: ${S(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 WO(){return{localeError:HZ()}}var WZ=()=>{let t={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(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 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=e(n.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${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${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=e(n.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${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${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${i[o.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: ${S(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 GO(){return{localeError:WZ()}}var GZ=t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},YZ=()=>{let t={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function e(i){return t[i]??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 i=>{switch(i.code){case"invalid_type":return`Ge\xE7ersiz de\u011Fer: beklenen ${i.expected}, al\u0131nan ${GZ(i.input)}`;case"invalid_value":return i.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${N(i.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${S(i.values,"|")}`;case"too_big":{let n=i.inclusive?"<=":"<",o=e(i.origin);return o?`\xC7ok b\xFCy\xFCk: beklenen ${i.origin??"de\u011Fer"} ${n}${i.maximum.toString()} ${o.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${i.origin??"de\u011Fer"} ${n}${i.maximum.toString()}`}case"too_small":{let n=i.inclusive?">=":">",o=e(i.origin);return o?`\xC7ok k\xFC\xE7\xFCk: beklenen ${i.origin} ${n}${i.minimum.toString()} ${o.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${i.origin} ${n}${i.minimum.toString()}`}case"invalid_format":{let n=i;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]??i.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${i.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${i.keys.length>1?"lar":""}: ${S(i.keys,", ")}`;case"invalid_key":return`${i.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${i.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function YO(){return{localeError:YZ()}}var XZ=()=>{let t={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(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 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${o}${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 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} ${s.verb} ${o}${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 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${i[o.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":""}: ${S(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 Kd(){return{localeError:XZ()}}function XO(){return Kd()}var QZ=()=>{let t={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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: ${N(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${S(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${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 ${o}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${o}${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 ${o}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${i[o.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":""}: ${S(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 QO(){return{localeError:QZ()}}var e6=()=>{let t={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(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 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${i[o.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: ${S(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 eN(){return{localeError:e6()}}var t6=()=>{let t={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${o}${n.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${i[o.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): ${S(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 tN(){return{localeError:t6()}}var r6=()=>{let t={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){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 o},i={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 ${N(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${o}${n.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${o}${n.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${i[o.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${S(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 rN(){return{localeError:r6()}}var n6=()=>{let t={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function e(n){return t[n]??null}let r=n=>{let o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"n\u1ECD\u0301mb\xE0";case"object":{if(Array.isArray(n))return"akop\u1ECD";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"};return n=>{switch(n.code){case"invalid_type":return`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${n.expected}, \xE0m\u1ECD\u0300 a r\xED ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${N(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${s.verb} ${o}${n.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${n.maximum}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${s.verb} ${o}${n.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${n.minimum}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${i[o.format]??n.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${n.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${S(n.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function nN(){return{localeError:n6()}}var Hd=Symbol("ZodOutput"),Wd=Symbol("ZodInput"),_o=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...r){let i=r[0];if(this._map.set(e,i),i&&typeof i=="object"&&"id"in i){if(this._idmap.has(i.id))throw new Error(`ID ${i.id} already exists in the registry`);this._idmap.set(i.id,e)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let r=this._map.get(e);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(e),this}get(e){let r=e._zod.parent;if(r){let i={...this.get(r)??{}};delete i.id;let n={...i,...this._map.get(e)};return Object.keys(n).length?n:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Ca(){return new _o}var Yt=Ca();function Gd(t,e){return new t({type:"string",...z(e)})}function Yd(t,e){return new t({type:"string",coerce:!0,...z(e)})}function Ra(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...z(e)})}function $o(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...z(e)})}function Da(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...z(e)})}function Ma(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...z(e)})}function Ua(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...z(e)})}function La(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...z(e)})}function wo(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...z(e)})}function qa(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...z(e)})}function Za(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...z(e)})}function Fa(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...z(e)})}function Va(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...z(e)})}function Ja(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...z(e)})}function Ba(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...z(e)})}function Ka(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...z(e)})}function Ha(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...z(e)})}function Wa(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...z(e)})}function Ga(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...z(e)})}function Ya(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...z(e)})}function Xa(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...z(e)})}function Qa(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...z(e)})}function ec(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...z(e)})}function tc(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...z(e)})}var Xd={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Qd(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...z(e)})}function ef(t,e){return new t({type:"string",format:"date",check:"string_format",...z(e)})}function tf(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...z(e)})}function rf(t,e){return new t({type:"string",format:"duration",check:"string_format",...z(e)})}function nf(t,e){return new t({type:"number",checks:[],...z(e)})}function of(t,e){return new t({type:"number",coerce:!0,checks:[],...z(e)})}function sf(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...z(e)})}function af(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...z(e)})}function cf(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...z(e)})}function uf(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...z(e)})}function lf(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...z(e)})}function df(t,e){return new t({type:"boolean",...z(e)})}function ff(t,e){return new t({type:"boolean",coerce:!0,...z(e)})}function pf(t,e){return new t({type:"bigint",...z(e)})}function mf(t,e){return new t({type:"bigint",coerce:!0,...z(e)})}function hf(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...z(e)})}function gf(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...z(e)})}function yf(t,e){return new t({type:"symbol",...z(e)})}function vf(t,e){return new t({type:"undefined",...z(e)})}function bf(t,e){return new t({type:"null",...z(e)})}function _f(t){return new t({type:"any"})}function $f(t){return new t({type:"unknown"})}function wf(t,e){return new t({type:"never",...z(e)})}function kf(t,e){return new t({type:"void",...z(e)})}function Sf(t,e){return new t({type:"date",...z(e)})}function xf(t,e){return new t({type:"date",coerce:!0,...z(e)})}function If(t,e){return new t({type:"nan",...z(e)})}function fr(t,e){return new Tl({check:"less_than",...z(e),value:t,inclusive:!1})}function yt(t,e){return new Tl({check:"less_than",...z(e),value:t,inclusive:!0})}function pr(t,e){return new jl({check:"greater_than",...z(e),value:t,inclusive:!1})}function et(t,e){return new jl({check:"greater_than",...z(e),value:t,inclusive:!0})}function Ef(t){return pr(0,t)}function Of(t){return fr(0,t)}function Nf(t){return yt(0,t)}function zf(t){return et(0,t)}function vn(t,e){return new Sb({check:"multiple_of",...z(e),value:t})}function Xn(t,e){return new Eb({check:"max_size",...z(e),maximum:t})}function bn(t,e){return new Ob({check:"min_size",...z(e),minimum:t})}function ko(t,e){return new Nb({check:"size_equals",...z(e),size:t})}function Qn(t,e){return new zb({check:"max_length",...z(e),maximum:t})}function Cr(t,e){return new Pb({check:"min_length",...z(e),minimum:t})}function ei(t,e){return new Tb({check:"length_equals",...z(e),length:t})}function So(t,e){return new jb({check:"string_format",format:"regex",...z(e),pattern:t})}function xo(t){return new Ab({check:"string_format",format:"lowercase",...z(t)})}function Io(t){return new Cb({check:"string_format",format:"uppercase",...z(t)})}function Eo(t,e){return new Rb({check:"string_format",format:"includes",...z(e),includes:t})}function Oo(t,e){return new Db({check:"string_format",format:"starts_with",...z(e),prefix:t})}function No(t,e){return new Mb({check:"string_format",format:"ends_with",...z(e),suffix:t})}function Pf(t,e,r){return new Ub({check:"property",property:t,schema:e,...z(r)})}function zo(t,e){return new Lb({check:"mime_type",mime:t,...z(e)})}function mr(t){return new qb({check:"overwrite",tx:t})}function Po(t){return mr(e=>e.normalize(t))}function To(){return mr(t=>t.trim())}function jo(){return mr(t=>t.toLowerCase())}function Ao(){return mr(t=>t.toUpperCase())}function Bb(t,e,r){return new t({type:"array",element:e,...z(r)})}function i6(t,e,r){return new t({type:"union",options:e,...z(r)})}function o6(t,e,r,i){return new t({type:"union",options:r,discriminator:e,...z(i)})}function s6(t,e,r){return new t({type:"intersection",left:e,right:r})}function a6(t,e,r,i){let n=r instanceof B,o=n?i:r,s=n?r:null;return new t({type:"tuple",items:e,rest:s,...z(o)})}function c6(t,e,r,i){return new t({type:"record",keyType:e,valueType:r,...z(i)})}function u6(t,e,r,i){return new t({type:"map",keyType:e,valueType:r,...z(i)})}function l6(t,e,r){return new t({type:"set",valueType:e,...z(r)})}function d6(t,e,r){let i=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new t({type:"enum",entries:i,...z(r)})}function f6(t,e,r){return new t({type:"enum",entries:e,...z(r)})}function p6(t,e,r){return new t({type:"literal",values:Array.isArray(e)?e:[e],...z(r)})}function Tf(t,e){return new t({type:"file",...z(e)})}function m6(t,e){return new t({type:"transform",transform:e})}function h6(t,e){return new t({type:"optional",innerType:e})}function g6(t,e){return new t({type:"nullable",innerType:e})}function y6(t,e,r){return new t({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():Vv(r)}})}function v6(t,e,r){return new t({type:"nonoptional",innerType:e,...z(r)})}function b6(t,e){return new t({type:"success",innerType:e})}function _6(t,e,r){return new t({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}function $6(t,e,r){return new t({type:"pipe",in:e,out:r})}function w6(t,e){return new t({type:"readonly",innerType:e})}function k6(t,e,r){return new t({type:"template_literal",parts:e,...z(r)})}function S6(t,e){return new t({type:"lazy",getter:e})}function x6(t,e){return new t({type:"promise",innerType:e})}function jf(t,e,r){let i=z(r);return i.abort??(i.abort=!0),new t({type:"custom",check:"custom",fn:e,...i})}function Af(t,e,r){return new t({type:"custom",check:"custom",fn:e,...z(r)})}function Cf(t){let e=iN(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(co(i,r.value,e._zod.def));else{let n=i;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=e),n.continue??(n.continue=!e._zod.def.abort),r.issues.push(co(n))}},t(r.value,r)));return e}function iN(t,e){let r=new xe({check:"custom",...z(e)});return r._zod.check=t,r}function Rf(t,e){let r=z(e),i=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(i=i.map(h=>typeof h=="string"?h.toLowerCase():h),n=n.map(h=>typeof h=="string"?h.toLowerCase():h));let o=new Set(i),s=new Set(n),a=t.Codec??vo,c=t.Boolean??yo,u=t.String??yn,l=new u({type:"string",error:r.error}),d=new c({type:"boolean",error:r.error}),m=new a({type:"pipe",in:l,out:d,transform:((h,f)=>{let p=h;return r.case!=="sensitive"&&(p=p.toLowerCase()),o.has(p)?!0:s.has(p)?!1:(f.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:f.value,inst:m,continue:!1}),{})}),reverseTransform:((h,f)=>h===!0?i[0]||"true":n[0]||"false"),error:r.error});return m}function ti(t,e,r,i={}){let n=z(i),o={...z(i),check:"string_format",type:"string",format:e,fn:typeof r=="function"?r:a=>r.test(a),...n};return r instanceof RegExp&&(o.pattern=r),new t(o)}var rc=class{constructor(e){this.counter=0,this.metadataRegistry=e?.metadata??Yt,this.target=e?.target??"draft-2020-12",this.unrepresentable=e?.unrepresentable??"throw",this.override=e?.override??(()=>{}),this.io=e?.io??"output",this.seen=new Map}process(e,r={path:[],schemaPath:[]}){var i;let n=e._zod.def,o={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},s=this.seen.get(e);if(s)return s.count++,r.schemaPath.includes(e)&&(s.cycle=r.path),s.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(e,a);let c=e._zod.toJSONSchema?.();if(c)a.schema=c;else{let d={...r,schemaPath:[...r.schemaPath,e],path:r.path},m=e._zod.parent;if(m)a.ref=m,this.process(m,d),this.seen.get(m).isParent=!0;else{let h=a.schema;switch(n.type){case"string":{let f=h;f.type="string";let{minimum:p,maximum:g,format:v,patterns:y,contentEncoding:b}=e._zod.bag;if(typeof p=="number"&&(f.minLength=p),typeof g=="number"&&(f.maxLength=g),v&&(f.format=o[v]??v,f.format===""&&delete f.format),b&&(f.contentEncoding=b),y&&y.size>0){let w=[...y];w.length===1?f.pattern=w[0].source:w.length>1&&(a.schema.allOf=[...w.map(x=>({...this.target==="draft-7"||this.target==="draft-4"||this.target==="openapi-3.0"?{type:"string"}:{},pattern:x.source}))])}break}case"number":{let f=h,{minimum:p,maximum:g,format:v,multipleOf:y,exclusiveMaximum:b,exclusiveMinimum:w}=e._zod.bag;typeof v=="string"&&v.includes("int")?f.type="integer":f.type="number",typeof w=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(f.minimum=w,f.exclusiveMinimum=!0):f.exclusiveMinimum=w),typeof p=="number"&&(f.minimum=p,typeof w=="number"&&this.target!=="draft-4"&&(w>=p?delete f.minimum:delete f.exclusiveMinimum)),typeof b=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(f.maximum=b,f.exclusiveMaximum=!0):f.exclusiveMaximum=b),typeof g=="number"&&(f.maximum=g,typeof b=="number"&&this.target!=="draft-4"&&(b<=g?delete f.maximum:delete f.exclusiveMaximum)),typeof y=="number"&&(f.multipleOf=y);break}case"boolean":{let f=h;f.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":{this.target==="openapi-3.0"?(h.type="string",h.nullable=!0,h.enum=[null]):h.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":{h.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{let f=h,{minimum:p,maximum:g}=e._zod.bag;typeof p=="number"&&(f.minItems=p),typeof g=="number"&&(f.maxItems=g),f.type="array",f.items=this.process(n.element,{...d,path:[...d.path,"items"]});break}case"object":{let f=h;f.type="object",f.properties={};let p=n.shape;for(let y in p)f.properties[y]=this.process(p[y],{...d,path:[...d.path,"properties",y]});let g=new Set(Object.keys(p)),v=new Set([...g].filter(y=>{let b=n.shape[y]._zod;return this.io==="input"?b.optin===void 0:b.optout===void 0}));v.size>0&&(f.required=Array.from(v)),n.catchall?._zod.def.type==="never"?f.additionalProperties=!1:n.catchall?n.catchall&&(f.additionalProperties=this.process(n.catchall,{...d,path:[...d.path,"additionalProperties"]})):this.io==="output"&&(f.additionalProperties=!1);break}case"union":{let f=h,p=n.options.map((g,v)=>this.process(g,{...d,path:[...d.path,"anyOf",v]}));f.anyOf=p;break}case"intersection":{let f=h,p=this.process(n.left,{...d,path:[...d.path,"allOf",0]}),g=this.process(n.right,{...d,path:[...d.path,"allOf",1]}),v=b=>"allOf"in b&&Object.keys(b).length===1,y=[...v(p)?p.allOf:[p],...v(g)?g.allOf:[g]];f.allOf=y;break}case"tuple":{let f=h;f.type="array";let p=this.target==="draft-2020-12"?"prefixItems":"items",g=this.target==="draft-2020-12"||this.target==="openapi-3.0"?"items":"additionalItems",v=n.items.map((x,T)=>this.process(x,{...d,path:[...d.path,p,T]})),y=n.rest?this.process(n.rest,{...d,path:[...d.path,g,...this.target==="openapi-3.0"?[n.items.length]:[]]}):null;this.target==="draft-2020-12"?(f.prefixItems=v,y&&(f.items=y)):this.target==="openapi-3.0"?(f.items={anyOf:v},y&&f.items.anyOf.push(y),f.minItems=v.length,y||(f.maxItems=v.length)):(f.items=v,y&&(f.additionalItems=y));let{minimum:b,maximum:w}=e._zod.bag;typeof b=="number"&&(f.minItems=b),typeof w=="number"&&(f.maxItems=w);break}case"record":{let f=h;f.type="object",(this.target==="draft-7"||this.target==="draft-2020-12")&&(f.propertyNames=this.process(n.keyType,{...d,path:[...d.path,"propertyNames"]})),f.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 f=h,p=_a(n.entries);p.every(g=>typeof g=="number")&&(f.type="number"),p.every(g=>typeof g=="string")&&(f.type="string"),f.enum=p;break}case"literal":{let f=h,p=[];for(let g of n.values)if(g===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof g=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");p.push(Number(g))}else p.push(g);if(p.length!==0)if(p.length===1){let g=p[0];f.type=g===null?"null":typeof g,this.target==="draft-4"||this.target==="openapi-3.0"?f.enum=[g]:f.const=g}else p.every(g=>typeof g=="number")&&(f.type="number"),p.every(g=>typeof g=="string")&&(f.type="string"),p.every(g=>typeof g=="boolean")&&(f.type="string"),p.every(g=>g===null)&&(f.type="null"),f.enum=p;break}case"file":{let f=h,p={type:"string",format:"binary",contentEncoding:"binary"},{minimum:g,maximum:v,mime:y}=e._zod.bag;g!==void 0&&(p.minLength=g),v!==void 0&&(p.maxLength=v),y?y.length===1?(p.contentMediaType=y[0],Object.assign(f,p)):f.anyOf=y.map(b=>({...p,contentMediaType:b})):Object.assign(f,p);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let f=this.process(n.innerType,d);this.target==="openapi-3.0"?(a.ref=n.innerType,h.nullable=!0):h.anyOf=[f,{type:"null"}];break}case"nonoptional":{this.process(n.innerType,d),a.ref=n.innerType;break}case"success":{let f=h;f.type="boolean";break}case"default":{this.process(n.innerType,d),a.ref=n.innerType,h.default=JSON.parse(JSON.stringify(n.defaultValue));break}case"prefault":{this.process(n.innerType,d),a.ref=n.innerType,this.io==="input"&&(h._prefault=JSON.parse(JSON.stringify(n.defaultValue)));break}case"catch":{this.process(n.innerType,d),a.ref=n.innerType;let f;try{f=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}h.default=f;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let f=h,p=e._zod.pattern;if(!p)throw new Error("Pattern not found in template literal");f.type="string",f.pattern=p.source;break}case"pipe":{let f=this.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;this.process(f,d),a.ref=f;break}case"readonly":{this.process(n.innerType,d),a.ref=n.innerType,h.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 f=e._zod.innerType;this.process(f,d),a.ref=f;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}case"function":{if(this.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema");break}default:}}}let u=this.metadataRegistry.get(e);return u&&Object.assign(a.schema,u),this.io==="input"&&qe(e)&&(delete a.schema.examples,delete a.schema.default),this.io==="input"&&a.schema._prefault&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,this.seen.get(e).schema}emit(e,r){let i={cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0},n=this.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=l=>{let d=this.target==="draft-2020-12"?"$defs":"definitions";if(i.external){let p=i.external.registry.get(l[0])?.id,g=i.external.uri??(y=>y);if(p)return{ref:g(p)};let v=l[1].defId??l[1].schema.id??`schema${this.counter++}`;return l[1].defId=v,{defId:v,ref:`${g("__shared")}#/${d}/${v}`}}if(l[1]===n)return{ref:"#"};let h=`#/${d}/`,f=l[1].schema.id??`__schema${this.counter++}`;return{defId:f,ref:h+f}},s=l=>{if(l[1].schema.$ref)return;let d=l[1],{ref:m,defId:h}=o(l);d.def={...d.schema},h&&(d.defId=h);let f=d.schema;for(let p in f)delete f[p];f.$ref=m};if(i.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>
|
|
219
|
-
|
|
220
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let l of this.seen.entries()){let d=l[1];if(e===l[0]){s(l);continue}if(i.external){let h=i.external.registry.get(l[0])?.id;if(e!==l[0]&&h){s(l);continue}}if(this.metadataRegistry.get(l[0])?.id){s(l);continue}if(d.cycle){s(l);continue}if(d.count>1&&i.reused==="ref"){s(l);continue}}let a=(l,d)=>{let m=this.seen.get(l),h=m.def??m.schema,f={...h};if(m.ref===null)return;let p=m.ref;if(m.ref=null,p){a(p,d);let g=this.seen.get(p).schema;g.$ref&&(d.target==="draft-7"||d.target==="draft-4"||d.target==="openapi-3.0")?(h.allOf=h.allOf??[],h.allOf.push(g)):(Object.assign(h,g),Object.assign(h,f))}m.isParent||this.override({zodSchema:l,jsonSchema:h,path:m.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#":this.target==="draft-4"?c.$schema="http://json-schema.org/draft-04/schema#":this.target==="openapi-3.0"||console.warn(`Invalid target: ${this.target}`),i.external?.uri){let l=i.external.registry.get(e)?.id;if(!l)throw new Error("Schema is missing an `id` property");c.$id=i.external.uri(l)}Object.assign(c,n.def);let u=i.external?.defs??{};for(let l of this.seen.entries()){let d=l[1];d.def&&d.defId&&(u[d.defId]=d.def)}i.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 Co(t,e){if(t instanceof _o){let i=new rc(e),n={};for(let a of t._idmap.entries()){let[c,u]=a;i.process(u)}let o={},s={registry:t,uri:e?.uri,defs:n};for(let a of t._idmap.entries()){let[c,u]=a;o[c]=i.emit(u,{...e,external:s})}if(Object.keys(n).length>0){let a=i.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[a]:n}}return{schemas:o}}let r=new rc(e);return r.process(t),r.emit(t,e)}function qe(t,e){let r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let n=t._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 qe(n.element,r);case"object":{for(let o in n.shape)if(qe(n.shape[o],r))return!0;return!1}case"union":{for(let o of n.options)if(qe(o,r))return!0;return!1}case"intersection":return qe(n.left,r)||qe(n.right,r);case"tuple":{for(let o of n.items)if(qe(o,r))return!0;return!!(n.rest&&qe(n.rest,r))}case"record":return qe(n.keyType,r)||qe(n.valueType,r);case"map":return qe(n.keyType,r)||qe(n.valueType,r);case"set":return qe(n.valueType,r);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return qe(n.innerType,r);case"lazy":return qe(n.getter(),r);case"default":return qe(n.innerType,r);case"prefault":return qe(n.innerType,r);case"custom":return!1;case"transform":return!0;case"pipe":return qe(n.in,r)||qe(n.out,r);case"success":return!1;case"catch":return!1;case"function":return!1;default:}throw new Error(`Unknown schema type: ${n.type}`)}var oN={};var E6=_("ZodMiniType",(t,e)=>{if(!t._zod)throw new Error("Uninitialized schema in ZodMiniType.");B.init(t,e),t.def=e,t.type=e.type,t.parse=(r,i)=>Wn(t,r,i,{callee:t.parse}),t.safeParse=(r,i)=>hn(t,r,i),t.parseAsync=async(r,i)=>Gn(t,r,i,{callee:t.parseAsync}),t.safeParseAsync=async(r,i)=>gn(t,r,i),t.check=(...r)=>t.clone({...e,checks:[...e.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),t.clone=(r,i)=>Fe(t,r,i),t.brand=()=>t,t.register=((r,i)=>(r.add(t,i),t))});var O6=_("ZodMiniObject",(t,e)=>{_d.init(t,e),E6.init(t,e),O.defineLazy(t,"shape",()=>e.shape)});function Kb(t,e){let r={type:"object",shape:t??{},...O.normalizeParams(e)};return new O6(r)}function Ct(t){return!!t._zod}function ri(t){let e=Object.values(t);if(e.length===0)return Kb({});let r=e.every(Ct),i=e.every(n=>!Ct(n));if(r)return Kb(t);if(i)return PE(t);throw new Error("Mixed Zod versions detected in object shape.")}function _n(t,e){return Ct(t)?hn(t,e):t.safeParse(e)}async function Df(t,e){return Ct(t)?await gn(t,e):await t.safeParseAsync(e)}function $n(t){if(!t)return;let e;if(Ct(t)?e=t._zod?.def?.shape:e=t.shape,!!e){if(typeof e=="function")try{return e()}catch{return}return e}}function Ro(t){if(t){if(typeof t=="object"){let e=t,r=t;if(!e._def&&!r._zod){let i=Object.values(t);if(i.length>0&&i.every(n=>typeof n=="object"&&n!==null&&(n._def!==void 0||n._zod!==void 0||typeof n.parse=="function")))return ri(t)}}if(Ct(t)){let r=t._zod?.def;if(r&&(r.type==="object"||r.shape!==void 0))return t}else if(t.shape!==void 0)return t}}function Mf(t){if(t&&typeof t=="object"){if("message"in t&&typeof t.message=="string")return t.message;if("issues"in t&&Array.isArray(t.issues)&&t.issues.length>0){let e=t.issues[0];if(e&&typeof e=="object"&&"message"in e)return String(e.message)}try{return JSON.stringify(t)}catch{return String(t)}}return String(t)}function cN(t){return t.description}function uN(t){if(Ct(t))return t._zod?.def?.type==="optional";let e=t;return typeof t.isOptional=="function"?t.isOptional():e._def?.typeName==="ZodOptional"}function Uf(t){if(Ct(t)){let o=t._zod?.def;if(o){if(o.value!==void 0)return o.value;if(Array.isArray(o.values)&&o.values.length>0)return o.values[0]}}let r=t._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 i=t.value;if(i!==void 0)return i}var be={};Ut(be,{$brand:()=>va,$input:()=>Wd,$output:()=>Hd,NEVER:()=>vl,TimePrecision:()=>Xd,ZodAny:()=>hN,ZodArray:()=>bN,ZodBase64:()=>S_,ZodBase64URL:()=>x_,ZodBigInt:()=>cc,ZodBigIntFormat:()=>O_,ZodBoolean:()=>ac,ZodCIDRv4:()=>w_,ZodCIDRv6:()=>k_,ZodCUID:()=>h_,ZodCUID2:()=>g_,ZodCatch:()=>RN,ZodCodec:()=>C_,ZodCustom:()=>Xf,ZodCustomStringFormat:()=>oc,ZodDate:()=>Wf,ZodDefault:()=>zN,ZodDiscriminatedUnion:()=>_N,ZodE164:()=>I_,ZodEmail:()=>f_,ZodEmoji:()=>p_,ZodEnum:()=>nc,ZodError:()=>j6,ZodFile:()=>EN,ZodFirstPartyTypeKind:()=>D_,ZodFunction:()=>JN,ZodGUID:()=>Vf,ZodIPv4:()=>__,ZodIPv6:()=>$_,ZodISODate:()=>qf,ZodISODateTime:()=>Lf,ZodISODuration:()=>Ff,ZodISOTime:()=>Zf,ZodIntersection:()=>$N,ZodIssueCode:()=>M9,ZodJWT:()=>E_,ZodKSUID:()=>b_,ZodLazy:()=>ZN,ZodLiteral:()=>IN,ZodMap:()=>SN,ZodNaN:()=>MN,ZodNanoID:()=>m_,ZodNever:()=>yN,ZodNonOptional:()=>j_,ZodNull:()=>mN,ZodNullable:()=>NN,ZodNumber:()=>sc,ZodNumberFormat:()=>Mo,ZodObject:()=>Gf,ZodOptional:()=>lc,ZodPipe:()=>A_,ZodPrefault:()=>TN,ZodPromise:()=>VN,ZodReadonly:()=>UN,ZodRealError:()=>vt,ZodRecord:()=>P_,ZodSet:()=>xN,ZodString:()=>ic,ZodStringFormat:()=>Ie,ZodSuccess:()=>CN,ZodSymbol:()=>fN,ZodTemplateLiteral:()=>qN,ZodTransform:()=>ON,ZodTuple:()=>wN,ZodType:()=>Y,ZodULID:()=>y_,ZodURL:()=>Kf,ZodUUID:()=>Rr,ZodUndefined:()=>pN,ZodUnion:()=>z_,ZodUnknown:()=>gN,ZodVoid:()=>vN,ZodXID:()=>v_,_ZodString:()=>d_,_default:()=>PN,_function:()=>j9,any:()=>y9,array:()=>re,base64:()=>e9,base64url:()=>t9,bigint:()=>f9,boolean:()=>Me,catch:()=>DN,check:()=>A9,cidrv4:()=>X6,cidrv6:()=>Q6,clone:()=>Fe,codec:()=>z9,coerce:()=>M_,config:()=>Ae,core:()=>xt,cuid:()=>J6,cuid2:()=>B6,custom:()=>R_,date:()=>b9,decode:()=>n_,decodeAsync:()=>o_,discriminatedUnion:()=>Yf,e164:()=>r9,email:()=>C6,emoji:()=>F6,encode:()=>r_,encodeAsync:()=>i_,endsWith:()=>No,enum:()=>rt,file:()=>I9,flattenError:()=>uo,float32:()=>c9,float64:()=>u9,formatError:()=>lo,function:()=>j9,getErrorMap:()=>L9,globalRegistry:()=>Yt,gt:()=>pr,gte:()=>et,guid:()=>R6,hash:()=>a9,hex:()=>s9,hostname:()=>o9,httpUrl:()=>Z6,includes:()=>Eo,instanceof:()=>C9,int:()=>l_,int32:()=>l9,int64:()=>p9,intersection:()=>uc,ipv4:()=>G6,ipv6:()=>Y6,iso:()=>Do,json:()=>D9,jwt:()=>n9,keyof:()=>_9,ksuid:()=>W6,lazy:()=>FN,length:()=>ei,literal:()=>M,locales:()=>bo,looseObject:()=>tt,lowercase:()=>xo,lt:()=>fr,lte:()=>yt,map:()=>k9,maxLength:()=>Qn,maxSize:()=>Xn,mime:()=>zo,minLength:()=>Cr,minSize:()=>bn,multipleOf:()=>vn,nan:()=>N9,nanoid:()=>V6,nativeEnum:()=>x9,negative:()=>Of,never:()=>N_,nonnegative:()=>zf,nonoptional:()=>AN,nonpositive:()=>Nf,normalize:()=>Po,null:()=>Hf,nullable:()=>Jf,nullish:()=>E9,number:()=>fe,object:()=>C,optional:()=>Ee,overwrite:()=>mr,parse:()=>Xb,parseAsync:()=>Qb,partialRecord:()=>w9,pipe:()=>Bf,positive:()=>Ef,prefault:()=>jN,preprocess:()=>Qf,prettifyError:()=>wl,promise:()=>T9,property:()=>Pf,readonly:()=>LN,record:()=>ve,refine:()=>BN,regex:()=>So,regexes:()=>gt,registry:()=>Ca,safeDecode:()=>a_,safeDecodeAsync:()=>u_,safeEncode:()=>s_,safeEncodeAsync:()=>c_,safeParse:()=>e_,safeParseAsync:()=>t_,set:()=>S9,setErrorMap:()=>U9,size:()=>ko,startsWith:()=>Oo,strictObject:()=>$9,string:()=>k,stringFormat:()=>i9,stringbool:()=>R9,success:()=>O9,superRefine:()=>KN,symbol:()=>h9,templateLiteral:()=>P9,toJSONSchema:()=>Co,toLowerCase:()=>jo,toUpperCase:()=>Ao,transform:()=>T_,treeifyError:()=>$l,trim:()=>To,tuple:()=>kN,uint32:()=>d9,uint64:()=>m9,ulid:()=>K6,undefined:()=>g9,union:()=>ke,unknown:()=>we,uppercase:()=>Io,url:()=>q6,util:()=>O,uuid:()=>D6,uuidv4:()=>M6,uuidv6:()=>U6,uuidv7:()=>L6,void:()=>v9,xid:()=>H6});var Do={};Ut(Do,{ZodISODate:()=>qf,ZodISODateTime:()=>Lf,ZodISODuration:()=>Ff,ZodISOTime:()=>Zf,date:()=>Wb,datetime:()=>Hb,duration:()=>Yb,time:()=>Gb});var Lf=_("ZodISODateTime",(t,e)=>{Gl.init(t,e),Ie.init(t,e)});function Hb(t){return Qd(Lf,t)}var qf=_("ZodISODate",(t,e)=>{Yl.init(t,e),Ie.init(t,e)});function Wb(t){return ef(qf,t)}var Zf=_("ZodISOTime",(t,e)=>{Xl.init(t,e),Ie.init(t,e)});function Gb(t){return tf(Zf,t)}var Ff=_("ZodISODuration",(t,e)=>{Ql.init(t,e),Ie.init(t,e)});function Yb(t){return rf(Ff,t)}var dN=(t,e)=>{xa.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>lo(t,r)},flatten:{value:r=>uo(t,r)},addIssue:{value:r=>{t.issues.push(r),t.message=JSON.stringify(t.issues,so,2)}},addIssues:{value:r=>{t.issues.push(...r),t.message=JSON.stringify(t.issues,so,2)}},isEmpty:{get(){return t.issues.length===0}}})},j6=_("ZodError",dN),vt=_("ZodError",dN,{Parent:Error});var Xb=fo(vt),Qb=po(vt),e_=mo(vt),t_=ho(vt),r_=kl(vt),n_=Sl(vt),i_=xl(vt),o_=Il(vt),s_=El(vt),a_=Ol(vt),c_=Nl(vt),u_=zl(vt);var Y=_("ZodType",(t,e)=>(B.init(t,e),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.check=(...r)=>t.clone(O.mergeDefs(e,{checks:[...e.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]})),t.clone=(r,i)=>Fe(t,r,i),t.brand=()=>t,t.register=((r,i)=>(r.add(t,i),t)),t.parse=(r,i)=>Xb(t,r,i,{callee:t.parse}),t.safeParse=(r,i)=>e_(t,r,i),t.parseAsync=async(r,i)=>Qb(t,r,i,{callee:t.parseAsync}),t.safeParseAsync=async(r,i)=>t_(t,r,i),t.spa=t.safeParseAsync,t.encode=(r,i)=>r_(t,r,i),t.decode=(r,i)=>n_(t,r,i),t.encodeAsync=async(r,i)=>i_(t,r,i),t.decodeAsync=async(r,i)=>o_(t,r,i),t.safeEncode=(r,i)=>s_(t,r,i),t.safeDecode=(r,i)=>a_(t,r,i),t.safeEncodeAsync=async(r,i)=>c_(t,r,i),t.safeDecodeAsync=async(r,i)=>u_(t,r,i),t.refine=(r,i)=>t.check(BN(r,i)),t.superRefine=r=>t.check(KN(r)),t.overwrite=r=>t.check(mr(r)),t.optional=()=>Ee(t),t.nullable=()=>Jf(t),t.nullish=()=>Ee(Jf(t)),t.nonoptional=r=>AN(t,r),t.array=()=>re(t),t.or=r=>ke([t,r]),t.and=r=>uc(t,r),t.transform=r=>Bf(t,T_(r)),t.default=r=>PN(t,r),t.prefault=r=>jN(t,r),t.catch=r=>DN(t,r),t.pipe=r=>Bf(t,r),t.readonly=()=>LN(t),t.describe=r=>{let i=t.clone();return Yt.add(i,{description:r}),i},Object.defineProperty(t,"description",{get(){return Yt.get(t)?.description},configurable:!0}),t.meta=(...r)=>{if(r.length===0)return Yt.get(t);let i=t.clone();return Yt.add(i,r[0]),i},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t)),d_=_("_ZodString",(t,e)=>{yn.init(t,e),Y.init(t,e);let r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,t.regex=(...i)=>t.check(So(...i)),t.includes=(...i)=>t.check(Eo(...i)),t.startsWith=(...i)=>t.check(Oo(...i)),t.endsWith=(...i)=>t.check(No(...i)),t.min=(...i)=>t.check(Cr(...i)),t.max=(...i)=>t.check(Qn(...i)),t.length=(...i)=>t.check(ei(...i)),t.nonempty=(...i)=>t.check(Cr(1,...i)),t.lowercase=i=>t.check(xo(i)),t.uppercase=i=>t.check(Io(i)),t.trim=()=>t.check(To()),t.normalize=(...i)=>t.check(Po(...i)),t.toLowerCase=()=>t.check(jo()),t.toUpperCase=()=>t.check(Ao())}),ic=_("ZodString",(t,e)=>{yn.init(t,e),d_.init(t,e),t.email=r=>t.check(Ra(f_,r)),t.url=r=>t.check(wo(Kf,r)),t.jwt=r=>t.check(tc(E_,r)),t.emoji=r=>t.check(qa(p_,r)),t.guid=r=>t.check($o(Vf,r)),t.uuid=r=>t.check(Da(Rr,r)),t.uuidv4=r=>t.check(Ma(Rr,r)),t.uuidv6=r=>t.check(Ua(Rr,r)),t.uuidv7=r=>t.check(La(Rr,r)),t.nanoid=r=>t.check(Za(m_,r)),t.guid=r=>t.check($o(Vf,r)),t.cuid=r=>t.check(Fa(h_,r)),t.cuid2=r=>t.check(Va(g_,r)),t.ulid=r=>t.check(Ja(y_,r)),t.base64=r=>t.check(Xa(S_,r)),t.base64url=r=>t.check(Qa(x_,r)),t.xid=r=>t.check(Ba(v_,r)),t.ksuid=r=>t.check(Ka(b_,r)),t.ipv4=r=>t.check(Ha(__,r)),t.ipv6=r=>t.check(Wa($_,r)),t.cidrv4=r=>t.check(Ga(w_,r)),t.cidrv6=r=>t.check(Ya(k_,r)),t.e164=r=>t.check(ec(I_,r)),t.datetime=r=>t.check(Hb(r)),t.date=r=>t.check(Wb(r)),t.time=r=>t.check(Gb(r)),t.duration=r=>t.check(Yb(r))});function k(t){return Gd(ic,t)}var Ie=_("ZodStringFormat",(t,e)=>{ye.init(t,e),d_.init(t,e)}),f_=_("ZodEmail",(t,e)=>{ql.init(t,e),Ie.init(t,e)});function C6(t){return Ra(f_,t)}var Vf=_("ZodGUID",(t,e)=>{Ul.init(t,e),Ie.init(t,e)});function R6(t){return $o(Vf,t)}var Rr=_("ZodUUID",(t,e)=>{Ll.init(t,e),Ie.init(t,e)});function D6(t){return Da(Rr,t)}function M6(t){return Ma(Rr,t)}function U6(t){return Ua(Rr,t)}function L6(t){return La(Rr,t)}var Kf=_("ZodURL",(t,e)=>{Zl.init(t,e),Ie.init(t,e)});function q6(t){return wo(Kf,t)}function Z6(t){return wo(Kf,{protocol:/^https?$/,hostname:gt.domain,...O.normalizeParams(t)})}var p_=_("ZodEmoji",(t,e)=>{Fl.init(t,e),Ie.init(t,e)});function F6(t){return qa(p_,t)}var m_=_("ZodNanoID",(t,e)=>{Vl.init(t,e),Ie.init(t,e)});function V6(t){return Za(m_,t)}var h_=_("ZodCUID",(t,e)=>{Jl.init(t,e),Ie.init(t,e)});function J6(t){return Fa(h_,t)}var g_=_("ZodCUID2",(t,e)=>{Bl.init(t,e),Ie.init(t,e)});function B6(t){return Va(g_,t)}var y_=_("ZodULID",(t,e)=>{Kl.init(t,e),Ie.init(t,e)});function K6(t){return Ja(y_,t)}var v_=_("ZodXID",(t,e)=>{Hl.init(t,e),Ie.init(t,e)});function H6(t){return Ba(v_,t)}var b_=_("ZodKSUID",(t,e)=>{Wl.init(t,e),Ie.init(t,e)});function W6(t){return Ka(b_,t)}var __=_("ZodIPv4",(t,e)=>{ed.init(t,e),Ie.init(t,e)});function G6(t){return Ha(__,t)}var $_=_("ZodIPv6",(t,e)=>{td.init(t,e),Ie.init(t,e)});function Y6(t){return Wa($_,t)}var w_=_("ZodCIDRv4",(t,e)=>{rd.init(t,e),Ie.init(t,e)});function X6(t){return Ga(w_,t)}var k_=_("ZodCIDRv6",(t,e)=>{nd.init(t,e),Ie.init(t,e)});function Q6(t){return Ya(k_,t)}var S_=_("ZodBase64",(t,e)=>{id.init(t,e),Ie.init(t,e)});function e9(t){return Xa(S_,t)}var x_=_("ZodBase64URL",(t,e)=>{od.init(t,e),Ie.init(t,e)});function t9(t){return Qa(x_,t)}var I_=_("ZodE164",(t,e)=>{sd.init(t,e),Ie.init(t,e)});function r9(t){return ec(I_,t)}var E_=_("ZodJWT",(t,e)=>{ad.init(t,e),Ie.init(t,e)});function n9(t){return tc(E_,t)}var oc=_("ZodCustomStringFormat",(t,e)=>{cd.init(t,e),Ie.init(t,e)});function i9(t,e,r={}){return ti(oc,t,e,r)}function o9(t){return ti(oc,"hostname",gt.hostname,t)}function s9(t){return ti(oc,"hex",gt.hex,t)}function a9(t,e){let r=e?.enc??"hex",i=`${t}_${r}`,n=gt[i];if(!n)throw new Error(`Unrecognized hash format: ${i}`);return ti(oc,i,n,e)}var sc=_("ZodNumber",(t,e)=>{Na.init(t,e),Y.init(t,e),t.gt=(i,n)=>t.check(pr(i,n)),t.gte=(i,n)=>t.check(et(i,n)),t.min=(i,n)=>t.check(et(i,n)),t.lt=(i,n)=>t.check(fr(i,n)),t.lte=(i,n)=>t.check(yt(i,n)),t.max=(i,n)=>t.check(yt(i,n)),t.int=i=>t.check(l_(i)),t.safe=i=>t.check(l_(i)),t.positive=i=>t.check(pr(0,i)),t.nonnegative=i=>t.check(et(0,i)),t.negative=i=>t.check(fr(0,i)),t.nonpositive=i=>t.check(yt(0,i)),t.multipleOf=(i,n)=>t.check(vn(i,n)),t.step=(i,n)=>t.check(vn(i,n)),t.finite=()=>t;let r=t._zod.bag;t.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),t.isFinite=!0,t.format=r.format??null});function fe(t){return nf(sc,t)}var Mo=_("ZodNumberFormat",(t,e)=>{ud.init(t,e),sc.init(t,e)});function l_(t){return sf(Mo,t)}function c9(t){return af(Mo,t)}function u9(t){return cf(Mo,t)}function l9(t){return uf(Mo,t)}function d9(t){return lf(Mo,t)}var ac=_("ZodBoolean",(t,e)=>{yo.init(t,e),Y.init(t,e)});function Me(t){return df(ac,t)}var cc=_("ZodBigInt",(t,e)=>{za.init(t,e),Y.init(t,e),t.gte=(i,n)=>t.check(et(i,n)),t.min=(i,n)=>t.check(et(i,n)),t.gt=(i,n)=>t.check(pr(i,n)),t.gte=(i,n)=>t.check(et(i,n)),t.min=(i,n)=>t.check(et(i,n)),t.lt=(i,n)=>t.check(fr(i,n)),t.lte=(i,n)=>t.check(yt(i,n)),t.max=(i,n)=>t.check(yt(i,n)),t.positive=i=>t.check(pr(BigInt(0),i)),t.negative=i=>t.check(fr(BigInt(0),i)),t.nonpositive=i=>t.check(yt(BigInt(0),i)),t.nonnegative=i=>t.check(et(BigInt(0),i)),t.multipleOf=(i,n)=>t.check(vn(i,n));let r=t._zod.bag;t.minValue=r.minimum??null,t.maxValue=r.maximum??null,t.format=r.format??null});function f9(t){return pf(cc,t)}var O_=_("ZodBigIntFormat",(t,e)=>{ld.init(t,e),cc.init(t,e)});function p9(t){return hf(O_,t)}function m9(t){return gf(O_,t)}var fN=_("ZodSymbol",(t,e)=>{dd.init(t,e),Y.init(t,e)});function h9(t){return yf(fN,t)}var pN=_("ZodUndefined",(t,e)=>{fd.init(t,e),Y.init(t,e)});function g9(t){return vf(pN,t)}var mN=_("ZodNull",(t,e)=>{pd.init(t,e),Y.init(t,e)});function Hf(t){return bf(mN,t)}var hN=_("ZodAny",(t,e)=>{md.init(t,e),Y.init(t,e)});function y9(){return _f(hN)}var gN=_("ZodUnknown",(t,e)=>{hd.init(t,e),Y.init(t,e)});function we(){return $f(gN)}var yN=_("ZodNever",(t,e)=>{gd.init(t,e),Y.init(t,e)});function N_(t){return wf(yN,t)}var vN=_("ZodVoid",(t,e)=>{yd.init(t,e),Y.init(t,e)});function v9(t){return kf(vN,t)}var Wf=_("ZodDate",(t,e)=>{vd.init(t,e),Y.init(t,e),t.min=(i,n)=>t.check(et(i,n)),t.max=(i,n)=>t.check(yt(i,n));let r=t._zod.bag;t.minDate=r.minimum?new Date(r.minimum):null,t.maxDate=r.maximum?new Date(r.maximum):null});function b9(t){return Sf(Wf,t)}var bN=_("ZodArray",(t,e)=>{bd.init(t,e),Y.init(t,e),t.element=e.element,t.min=(r,i)=>t.check(Cr(r,i)),t.nonempty=r=>t.check(Cr(1,r)),t.max=(r,i)=>t.check(Qn(r,i)),t.length=(r,i)=>t.check(ei(r,i)),t.unwrap=()=>t.element});function re(t,e){return Bb(bN,t,e)}function _9(t){let e=t._zod.def.shape;return rt(Object.keys(e))}var Gf=_("ZodObject",(t,e)=>{Jb.init(t,e),Y.init(t,e),O.defineLazy(t,"shape",()=>e.shape),t.keyof=()=>rt(Object.keys(t._zod.def.shape)),t.catchall=r=>t.clone({...t._zod.def,catchall:r}),t.passthrough=()=>t.clone({...t._zod.def,catchall:we()}),t.loose=()=>t.clone({...t._zod.def,catchall:we()}),t.strict=()=>t.clone({...t._zod.def,catchall:N_()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=r=>O.extend(t,r),t.safeExtend=r=>O.safeExtend(t,r),t.merge=r=>O.merge(t,r),t.pick=r=>O.pick(t,r),t.omit=r=>O.omit(t,r),t.partial=(...r)=>O.partial(lc,t,r[0]),t.required=(...r)=>O.required(j_,t,r[0])});function C(t,e){let r={type:"object",shape:t??{},...O.normalizeParams(e)};return new Gf(r)}function $9(t,e){return new Gf({type:"object",shape:t,catchall:N_(),...O.normalizeParams(e)})}function tt(t,e){return new Gf({type:"object",shape:t,catchall:we(),...O.normalizeParams(e)})}var z_=_("ZodUnion",(t,e)=>{Pa.init(t,e),Y.init(t,e),t.options=e.options});function ke(t,e){return new z_({type:"union",options:t,...O.normalizeParams(e)})}var _N=_("ZodDiscriminatedUnion",(t,e)=>{z_.init(t,e),$d.init(t,e)});function Yf(t,e,r){return new _N({type:"union",options:e,discriminator:t,...O.normalizeParams(r)})}var $N=_("ZodIntersection",(t,e)=>{wd.init(t,e),Y.init(t,e)});function uc(t,e){return new $N({type:"intersection",left:t,right:e})}var wN=_("ZodTuple",(t,e)=>{Ta.init(t,e),Y.init(t,e),t.rest=r=>t.clone({...t._zod.def,rest:r})});function kN(t,e,r){let i=e instanceof B,n=i?r:e,o=i?e:null;return new wN({type:"tuple",items:t,rest:o,...O.normalizeParams(n)})}var P_=_("ZodRecord",(t,e)=>{kd.init(t,e),Y.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});function ve(t,e,r){return new P_({type:"record",keyType:t,valueType:e,...O.normalizeParams(r)})}function w9(t,e,r){let i=Fe(t);return i._zod.values=void 0,new P_({type:"record",keyType:i,valueType:e,...O.normalizeParams(r)})}var SN=_("ZodMap",(t,e)=>{Sd.init(t,e),Y.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});function k9(t,e,r){return new SN({type:"map",keyType:t,valueType:e,...O.normalizeParams(r)})}var xN=_("ZodSet",(t,e)=>{xd.init(t,e),Y.init(t,e),t.min=(...r)=>t.check(bn(...r)),t.nonempty=r=>t.check(bn(1,r)),t.max=(...r)=>t.check(Xn(...r)),t.size=(...r)=>t.check(ko(...r))});function S9(t,e){return new xN({type:"set",valueType:t,...O.normalizeParams(e)})}var nc=_("ZodEnum",(t,e)=>{Id.init(t,e),Y.init(t,e),t.enum=e.entries,t.options=Object.values(e.entries);let r=new Set(Object.keys(e.entries));t.extract=(i,n)=>{let o={};for(let s of i)if(r.has(s))o[s]=e.entries[s];else throw new Error(`Key ${s} not found in enum`);return new nc({...e,checks:[],...O.normalizeParams(n),entries:o})},t.exclude=(i,n)=>{let o={...e.entries};for(let s of i)if(r.has(s))delete o[s];else throw new Error(`Key ${s} not found in enum`);return new nc({...e,checks:[],...O.normalizeParams(n),entries:o})}});function rt(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(i=>[i,i])):t;return new nc({type:"enum",entries:r,...O.normalizeParams(e)})}function x9(t,e){return new nc({type:"enum",entries:t,...O.normalizeParams(e)})}var IN=_("ZodLiteral",(t,e)=>{Ed.init(t,e),Y.init(t,e),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function M(t,e){return new IN({type:"literal",values:Array.isArray(t)?t:[t],...O.normalizeParams(e)})}var EN=_("ZodFile",(t,e)=>{Od.init(t,e),Y.init(t,e),t.min=(r,i)=>t.check(bn(r,i)),t.max=(r,i)=>t.check(Xn(r,i)),t.mime=(r,i)=>t.check(zo(Array.isArray(r)?r:[r],i))});function I9(t){return Tf(EN,t)}var ON=_("ZodTransform",(t,e)=>{Nd.init(t,e),Y.init(t,e),t._zod.parse=(r,i)=>{if(i.direction==="backward")throw new un(t.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(O.issue(o,r.value,e));else{let s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=t),r.issues.push(O.issue(s))}};let n=e.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r)):(r.value=n,r)}});function T_(t){return new ON({type:"transform",transform:t})}var lc=_("ZodOptional",(t,e)=>{zd.init(t,e),Y.init(t,e),t.unwrap=()=>t._zod.def.innerType});function Ee(t){return new lc({type:"optional",innerType:t})}var NN=_("ZodNullable",(t,e)=>{Pd.init(t,e),Y.init(t,e),t.unwrap=()=>t._zod.def.innerType});function Jf(t){return new NN({type:"nullable",innerType:t})}function E9(t){return Ee(Jf(t))}var zN=_("ZodDefault",(t,e)=>{Td.init(t,e),Y.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function PN(t,e){return new zN({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():O.shallowClone(e)}})}var TN=_("ZodPrefault",(t,e)=>{jd.init(t,e),Y.init(t,e),t.unwrap=()=>t._zod.def.innerType});function jN(t,e){return new TN({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():O.shallowClone(e)}})}var j_=_("ZodNonOptional",(t,e)=>{Ad.init(t,e),Y.init(t,e),t.unwrap=()=>t._zod.def.innerType});function AN(t,e){return new j_({type:"nonoptional",innerType:t,...O.normalizeParams(e)})}var CN=_("ZodSuccess",(t,e)=>{Cd.init(t,e),Y.init(t,e),t.unwrap=()=>t._zod.def.innerType});function O9(t){return new CN({type:"success",innerType:t})}var RN=_("ZodCatch",(t,e)=>{Rd.init(t,e),Y.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function DN(t,e){return new RN({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}var MN=_("ZodNaN",(t,e)=>{Dd.init(t,e),Y.init(t,e)});function N9(t){return If(MN,t)}var A_=_("ZodPipe",(t,e)=>{Md.init(t,e),Y.init(t,e),t.in=e.in,t.out=e.out});function Bf(t,e){return new A_({type:"pipe",in:t,out:e})}var C_=_("ZodCodec",(t,e)=>{A_.init(t,e),vo.init(t,e)});function z9(t,e,r){return new C_({type:"pipe",in:t,out:e,transform:r.decode,reverseTransform:r.encode})}var UN=_("ZodReadonly",(t,e)=>{Ud.init(t,e),Y.init(t,e),t.unwrap=()=>t._zod.def.innerType});function LN(t){return new UN({type:"readonly",innerType:t})}var qN=_("ZodTemplateLiteral",(t,e)=>{Ld.init(t,e),Y.init(t,e)});function P9(t,e){return new qN({type:"template_literal",parts:t,...O.normalizeParams(e)})}var ZN=_("ZodLazy",(t,e)=>{Fd.init(t,e),Y.init(t,e),t.unwrap=()=>t._zod.def.getter()});function FN(t){return new ZN({type:"lazy",getter:t})}var VN=_("ZodPromise",(t,e)=>{Zd.init(t,e),Y.init(t,e),t.unwrap=()=>t._zod.def.innerType});function T9(t){return new VN({type:"promise",innerType:t})}var JN=_("ZodFunction",(t,e)=>{qd.init(t,e),Y.init(t,e)});function j9(t){return new JN({type:"function",input:Array.isArray(t?.input)?kN(t?.input):t?.input??re(we()),output:t?.output??we()})}var Xf=_("ZodCustom",(t,e)=>{Vd.init(t,e),Y.init(t,e)});function A9(t){let e=new xe({check:"custom"});return e._zod.check=t,e}function R_(t,e){return jf(Xf,t??(()=>!0),e)}function BN(t,e={}){return Af(Xf,t,e)}function KN(t){return Cf(t)}function C9(t,e={error:`Input not instance of ${t.name}`}){let r=new Xf({type:"custom",check:"custom",fn:i=>i instanceof t,abort:!0,...O.normalizeParams(e)});return r._zod.bag.Class=t,r}var R9=(...t)=>Rf({Codec:C_,Boolean:ac,String:ic},...t);function D9(t){let e=FN(()=>ke([k(t),fe(),Me(),Hf(),re(e),ve(k(),e)]));return e}function Qf(t,e){return Bf(T_(t),e)}var M9={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 U9(t){Ae({customError:t})}function L9(){return Ae().customError}var D_;D_||(D_={});var M_={};Ut(M_,{bigint:()=>V9,boolean:()=>F9,date:()=>J9,number:()=>Z9,string:()=>q9});function q9(t){return Yd(ic,t)}function Z9(t){return of(sc,t)}function F9(t){return ff(ac,t)}function V9(t){return mf(cc,t)}function J9(t){return xf(Wf,t)}Ae(Jd());var L_="2025-11-25";var HN=[L_,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],wn="io.modelcontextprotocol/related-task",tp="2.0",Ze=R_(t=>t!==null&&(typeof t=="object"||typeof t=="function")),WN=ke([k(),fe().int()]),GN=k(),aY=tt({ttl:fe().optional(),pollInterval:fe().optional()}),K9=C({ttl:fe().optional()}),H9=C({taskId:k()}),q_=tt({progressToken:WN.optional(),[wn]:H9.optional()}),It=C({_meta:q_.optional()}),dc=It.extend({task:K9.optional()}),YN=t=>dc.safeParse(t).success,Ke=C({method:k(),params:It.loose().optional()}),Rt=C({_meta:q_.optional()}),Dt=C({method:k(),params:Rt.loose().optional()}),He=tt({_meta:q_.optional()}),rp=ke([k(),fe().int()]),XN=C({jsonrpc:M(tp),id:rp,...Ke.shape}).strict(),Z_=t=>XN.safeParse(t).success,QN=C({jsonrpc:M(tp),...Dt.shape}).strict(),ez=t=>QN.safeParse(t).success,F_=C({jsonrpc:M(tp),id:rp,result:He}).strict(),fc=t=>F_.safeParse(t).success;var L;(function(t){t[t.ConnectionClosed=-32e3]="ConnectionClosed",t[t.RequestTimeout=-32001]="RequestTimeout",t[t.ParseError=-32700]="ParseError",t[t.InvalidRequest=-32600]="InvalidRequest",t[t.MethodNotFound=-32601]="MethodNotFound",t[t.InvalidParams=-32602]="InvalidParams",t[t.InternalError=-32603]="InternalError",t[t.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(L||(L={}));var V_=C({jsonrpc:M(tp),id:rp.optional(),error:C({code:fe().int(),message:k(),data:we().optional()})}).strict();var tz=t=>V_.safeParse(t).success;var rz=ke([XN,QN,F_,V_]),cY=ke([F_,V_]),np=He.strict(),W9=Rt.extend({requestId:rp.optional(),reason:k().optional()}),ip=Dt.extend({method:M("notifications/cancelled"),params:W9}),G9=C({src:k(),mimeType:k().optional(),sizes:re(k()).optional(),theme:rt(["light","dark"]).optional()}),pc=C({icons:re(G9).optional()}),Uo=C({name:k(),title:k().optional()}),nz=Uo.extend({...Uo.shape,...pc.shape,version:k(),websiteUrl:k().optional(),description:k().optional()}),Y9=uc(C({applyDefaults:Me().optional()}),ve(k(),we())),X9=Qf(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,uc(C({form:Y9.optional(),url:Ze.optional()}),ve(k(),we()).optional())),Q9=tt({list:Ze.optional(),cancel:Ze.optional(),requests:tt({sampling:tt({createMessage:Ze.optional()}).optional(),elicitation:tt({create:Ze.optional()}).optional()}).optional()}),eF=tt({list:Ze.optional(),cancel:Ze.optional(),requests:tt({tools:tt({call:Ze.optional()}).optional()}).optional()}),tF=C({experimental:ve(k(),Ze).optional(),sampling:C({context:Ze.optional(),tools:Ze.optional()}).optional(),elicitation:X9.optional(),roots:C({listChanged:Me().optional()}).optional(),tasks:Q9.optional(),extensions:ve(k(),Ze).optional()}),rF=It.extend({protocolVersion:k(),capabilities:tF,clientInfo:nz}),J_=Ke.extend({method:M("initialize"),params:rF});var nF=C({experimental:ve(k(),Ze).optional(),logging:Ze.optional(),completions:Ze.optional(),prompts:C({listChanged:Me().optional()}).optional(),resources:C({subscribe:Me().optional(),listChanged:Me().optional()}).optional(),tools:C({listChanged:Me().optional()}).optional(),tasks:eF.optional(),extensions:ve(k(),Ze).optional()}),iF=He.extend({protocolVersion:k(),capabilities:nF,serverInfo:nz,instructions:k().optional()}),B_=Dt.extend({method:M("notifications/initialized"),params:Rt.optional()});var op=Ke.extend({method:M("ping"),params:It.optional()}),oF=C({progress:fe(),total:Ee(fe()),message:Ee(k())}),sF=C({...Rt.shape,...oF.shape,progressToken:WN}),sp=Dt.extend({method:M("notifications/progress"),params:sF}),aF=It.extend({cursor:GN.optional()}),mc=Ke.extend({params:aF.optional()}),hc=He.extend({nextCursor:GN.optional()}),cF=rt(["working","input_required","completed","failed","cancelled"]),gc=C({taskId:k(),status:cF,ttl:ke([fe(),Hf()]),createdAt:k(),lastUpdatedAt:k(),pollInterval:Ee(fe()),statusMessage:Ee(k())}),Lo=He.extend({task:gc}),uF=Rt.merge(gc),yc=Dt.extend({method:M("notifications/tasks/status"),params:uF}),ap=Ke.extend({method:M("tasks/get"),params:It.extend({taskId:k()})}),cp=He.merge(gc),up=Ke.extend({method:M("tasks/result"),params:It.extend({taskId:k()})}),uY=He.loose(),lp=mc.extend({method:M("tasks/list")}),dp=hc.extend({tasks:re(gc)}),fp=Ke.extend({method:M("tasks/cancel"),params:It.extend({taskId:k()})}),iz=He.merge(gc),oz=C({uri:k(),mimeType:Ee(k()),_meta:ve(k(),we()).optional()}),sz=oz.extend({text:k()}),K_=k().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),az=oz.extend({blob:K_}),vc=rt(["user","assistant"]),qo=C({audience:re(vc).optional(),priority:fe().min(0).max(1).optional(),lastModified:Do.datetime({offset:!0}).optional()}),cz=C({...Uo.shape,...pc.shape,uri:k(),description:Ee(k()),mimeType:Ee(k()),size:Ee(fe()),annotations:qo.optional(),_meta:Ee(tt({}))}),lF=C({...Uo.shape,...pc.shape,uriTemplate:k(),description:Ee(k()),mimeType:Ee(k()),annotations:qo.optional(),_meta:Ee(tt({}))}),pp=mc.extend({method:M("resources/list")}),dF=hc.extend({resources:re(cz)}),mp=mc.extend({method:M("resources/templates/list")}),fF=hc.extend({resourceTemplates:re(lF)}),H_=It.extend({uri:k()}),pF=H_,hp=Ke.extend({method:M("resources/read"),params:pF}),mF=He.extend({contents:re(ke([sz,az]))}),hF=Dt.extend({method:M("notifications/resources/list_changed"),params:Rt.optional()}),gF=H_,yF=Ke.extend({method:M("resources/subscribe"),params:gF}),vF=H_,bF=Ke.extend({method:M("resources/unsubscribe"),params:vF}),_F=Rt.extend({uri:k()}),$F=Dt.extend({method:M("notifications/resources/updated"),params:_F}),wF=C({name:k(),description:Ee(k()),required:Ee(Me())}),kF=C({...Uo.shape,...pc.shape,description:Ee(k()),arguments:Ee(re(wF)),_meta:Ee(tt({}))}),gp=mc.extend({method:M("prompts/list")}),SF=hc.extend({prompts:re(kF)}),xF=It.extend({name:k(),arguments:ve(k(),k()).optional()}),yp=Ke.extend({method:M("prompts/get"),params:xF}),W_=C({type:M("text"),text:k(),annotations:qo.optional(),_meta:ve(k(),we()).optional()}),G_=C({type:M("image"),data:K_,mimeType:k(),annotations:qo.optional(),_meta:ve(k(),we()).optional()}),Y_=C({type:M("audio"),data:K_,mimeType:k(),annotations:qo.optional(),_meta:ve(k(),we()).optional()}),IF=C({type:M("tool_use"),name:k(),id:k(),input:ve(k(),we()),_meta:ve(k(),we()).optional()}),EF=C({type:M("resource"),resource:ke([sz,az]),annotations:qo.optional(),_meta:ve(k(),we()).optional()}),OF=cz.extend({type:M("resource_link")}),X_=ke([W_,G_,Y_,OF,EF]),NF=C({role:vc,content:X_}),zF=He.extend({description:k().optional(),messages:re(NF)}),PF=Dt.extend({method:M("notifications/prompts/list_changed"),params:Rt.optional()}),TF=C({title:k().optional(),readOnlyHint:Me().optional(),destructiveHint:Me().optional(),idempotentHint:Me().optional(),openWorldHint:Me().optional()}),jF=C({taskSupport:rt(["required","optional","forbidden"]).optional()}),uz=C({...Uo.shape,...pc.shape,description:k().optional(),inputSchema:C({type:M("object"),properties:ve(k(),Ze).optional(),required:re(k()).optional()}).catchall(we()),outputSchema:C({type:M("object"),properties:ve(k(),Ze).optional(),required:re(k()).optional()}).catchall(we()).optional(),annotations:TF.optional(),execution:jF.optional(),_meta:ve(k(),we()).optional()}),vp=mc.extend({method:M("tools/list")}),AF=hc.extend({tools:re(uz)}),bp=He.extend({content:re(X_).default([]),structuredContent:ve(k(),we()).optional(),isError:Me().optional()}),lY=bp.or(He.extend({toolResult:we()})),CF=dc.extend({name:k(),arguments:ve(k(),we()).optional()}),Zo=Ke.extend({method:M("tools/call"),params:CF}),RF=Dt.extend({method:M("notifications/tools/list_changed"),params:Rt.optional()}),dY=C({autoRefresh:Me().default(!0),debounceMs:fe().int().nonnegative().default(300)}),bc=rt(["debug","info","notice","warning","error","critical","alert","emergency"]),DF=It.extend({level:bc}),Q_=Ke.extend({method:M("logging/setLevel"),params:DF}),MF=Rt.extend({level:bc,logger:k().optional(),data:we()}),UF=Dt.extend({method:M("notifications/message"),params:MF}),LF=C({name:k().optional()}),qF=C({hints:re(LF).optional(),costPriority:fe().min(0).max(1).optional(),speedPriority:fe().min(0).max(1).optional(),intelligencePriority:fe().min(0).max(1).optional()}),ZF=C({mode:rt(["auto","required","none"]).optional()}),FF=C({type:M("tool_result"),toolUseId:k().describe("The unique identifier for the corresponding tool call."),content:re(X_).default([]),structuredContent:C({}).loose().optional(),isError:Me().optional(),_meta:ve(k(),we()).optional()}),VF=Yf("type",[W_,G_,Y_]),ep=Yf("type",[W_,G_,Y_,IF,FF]),JF=C({role:vc,content:ke([ep,re(ep)]),_meta:ve(k(),we()).optional()}),BF=dc.extend({messages:re(JF),modelPreferences:qF.optional(),systemPrompt:k().optional(),includeContext:rt(["none","thisServer","allServers"]).optional(),temperature:fe().optional(),maxTokens:fe().int(),stopSequences:re(k()).optional(),metadata:Ze.optional(),tools:re(uz).optional(),toolChoice:ZF.optional()}),KF=Ke.extend({method:M("sampling/createMessage"),params:BF}),_c=He.extend({model:k(),stopReason:Ee(rt(["endTurn","stopSequence","maxTokens"]).or(k())),role:vc,content:VF}),e$=He.extend({model:k(),stopReason:Ee(rt(["endTurn","stopSequence","maxTokens","toolUse"]).or(k())),role:vc,content:ke([ep,re(ep)])}),HF=C({type:M("boolean"),title:k().optional(),description:k().optional(),default:Me().optional()}),WF=C({type:M("string"),title:k().optional(),description:k().optional(),minLength:fe().optional(),maxLength:fe().optional(),format:rt(["email","uri","date","date-time"]).optional(),default:k().optional()}),GF=C({type:rt(["number","integer"]),title:k().optional(),description:k().optional(),minimum:fe().optional(),maximum:fe().optional(),default:fe().optional()}),YF=C({type:M("string"),title:k().optional(),description:k().optional(),enum:re(k()),default:k().optional()}),XF=C({type:M("string"),title:k().optional(),description:k().optional(),oneOf:re(C({const:k(),title:k()})),default:k().optional()}),QF=C({type:M("string"),title:k().optional(),description:k().optional(),enum:re(k()),enumNames:re(k()).optional(),default:k().optional()}),eV=ke([YF,XF]),tV=C({type:M("array"),title:k().optional(),description:k().optional(),minItems:fe().optional(),maxItems:fe().optional(),items:C({type:M("string"),enum:re(k())}),default:re(k()).optional()}),rV=C({type:M("array"),title:k().optional(),description:k().optional(),minItems:fe().optional(),maxItems:fe().optional(),items:C({anyOf:re(C({const:k(),title:k()}))}),default:re(k()).optional()}),nV=ke([tV,rV]),iV=ke([QF,eV,nV]),oV=ke([iV,HF,WF,GF]),sV=dc.extend({mode:M("form").optional(),message:k(),requestedSchema:C({type:M("object"),properties:ve(k(),oV),required:re(k()).optional()})}),aV=dc.extend({mode:M("url"),message:k(),elicitationId:k(),url:k().url()}),cV=ke([sV,aV]),uV=Ke.extend({method:M("elicitation/create"),params:cV}),lV=Rt.extend({elicitationId:k()}),dV=Dt.extend({method:M("notifications/elicitation/complete"),params:lV}),Fo=He.extend({action:rt(["accept","decline","cancel"]),content:Qf(t=>t===null?void 0:t,ve(k(),ke([k(),fe(),Me(),re(k())])).optional())}),fV=C({type:M("ref/resource"),uri:k()});var pV=C({type:M("ref/prompt"),name:k()}),mV=It.extend({ref:ke([pV,fV]),argument:C({name:k(),value:k()}),context:C({arguments:ve(k(),k()).optional()}).optional()}),_p=Ke.extend({method:M("completion/complete"),params:mV});function lz(t){if(t.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${t.params.ref.type}`)}function dz(t){if(t.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${t.params.ref.type}`)}var hV=He.extend({completion:tt({values:re(k()).max(100),total:Ee(fe().int()),hasMore:Ee(Me())})}),gV=C({uri:k().startsWith("file://"),name:k().optional(),_meta:ve(k(),we()).optional()}),yV=Ke.extend({method:M("roots/list"),params:It.optional()}),t$=He.extend({roots:re(gV)}),vV=Dt.extend({method:M("notifications/roots/list_changed"),params:Rt.optional()}),fY=ke([op,J_,_p,Q_,yp,gp,pp,mp,hp,yF,bF,Zo,vp,ap,up,lp,fp]),pY=ke([ip,sp,B_,vV,yc]),mY=ke([np,_c,e$,Fo,t$,cp,dp,Lo]),hY=ke([op,KF,uV,yV,ap,up,lp,fp]),gY=ke([ip,sp,UF,$F,hF,RF,PF,yc,dV]),yY=ke([np,iF,hV,zF,SF,dF,fF,mF,bp,AF,cp,dp,Lo]),D=class t extends Error{constructor(e,r,i){super(`MCP error ${e}: ${r}`),this.code=e,this.data=i,this.name="McpError"}static fromError(e,r,i){if(e===L.UrlElicitationRequired&&i){let n=i;if(n.elicitations)return new U_(n.elicitations,r)}return new t(e,r,i)}},U_=class extends D{constructor(e,r=`URL elicitation${e.length>1?"s":""} required`){super(L.UrlElicitationRequired,r,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};function kn(t){return t==="completed"||t==="failed"||t==="cancelled"}var pz=Symbol("Let zodToJsonSchema decide on which parser to use");var fz={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"},mz=t=>typeof t=="string"?{...fz,name:t}:{...fz,...t};var hz=t=>{let e=mz(t),r=e.name!==void 0?[...e.basePath,e.definitionPath,e.name]:e.basePath;return{...e,flags:{hasReferencedOpenAiAnyType:!1},currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(e.definitions).map(([i,n])=>[n._def,{def:n._def,path:[...e.basePath,e.definitionPath,i],jsonSchema:void 0}]))}};function r$(t,e,r,i){i?.errorMessages&&r&&(t.errorMessage={...t.errorMessage,[e]:r})}function se(t,e,r,i,n){t[e]=r,r$(t,e,i,n)}var $p=(t,e)=>{let r=0;for(;r<t.length&&r<e.length&&t[r]===e[r];r++);return[(t.length-r).toString(),...e.slice(r)].join("/")};function Te(t){if(t.target!=="openAi")return{};let e=[...t.basePath,t.definitionPath,t.openAiAnyTypeName];return t.flags.hasReferencedOpenAiAnyType=!0,{$ref:t.$refStrategy==="relative"?$p(e,t.currentPath):e.join("/")}}function gz(t,e){let r={type:"array"};return t.type?._def&&t.type?._def?.typeName!==E.ZodAny&&(r.items=J(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&se(r,"minItems",t.minLength.value,t.minLength.message,e),t.maxLength&&se(r,"maxItems",t.maxLength.value,t.maxLength.message,e),t.exactLength&&(se(r,"minItems",t.exactLength.value,t.exactLength.message,e),se(r,"maxItems",t.exactLength.value,t.exactLength.message,e)),r}function yz(t,e){let r={type:"integer",format:"int64"};if(!t.checks)return r;for(let i of t.checks)switch(i.kind){case"min":e.target==="jsonSchema7"?i.inclusive?se(r,"minimum",i.value,i.message,e):se(r,"exclusiveMinimum",i.value,i.message,e):(i.inclusive||(r.exclusiveMinimum=!0),se(r,"minimum",i.value,i.message,e));break;case"max":e.target==="jsonSchema7"?i.inclusive?se(r,"maximum",i.value,i.message,e):se(r,"exclusiveMaximum",i.value,i.message,e):(i.inclusive||(r.exclusiveMaximum=!0),se(r,"maximum",i.value,i.message,e));break;case"multipleOf":se(r,"multipleOf",i.value,i.message,e);break}return r}function vz(){return{type:"boolean"}}function wp(t,e){return J(t.type._def,e)}var bz=(t,e)=>J(t.innerType._def,e);function n$(t,e,r){let i=r??e.dateStrategy;if(Array.isArray(i))return{anyOf:i.map((n,o)=>n$(t,e,n))};switch(i){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return bV(t,e)}}var bV=(t,e)=>{let r={type:"integer",format:"unix-time"};if(e.target==="openApi3")return r;for(let i of t.checks)switch(i.kind){case"min":se(r,"minimum",i.value,i.message,e);break;case"max":se(r,"maximum",i.value,i.message,e);break}return r};function _z(t,e){return{...J(t.innerType._def,e),default:t.defaultValue()}}function $z(t,e){return e.effectStrategy==="input"?J(t.schema._def,e):Te(e)}function wz(t){return{type:"string",enum:Array.from(t.values)}}var _V=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function kz(t,e){let r=[J(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),J(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(o=>!!o),i=e.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,n=[];return r.forEach(o=>{if(_V(o))n.push(...o.allOf),o.unevaluatedProperties===void 0&&(i=void 0);else{let s=o;if("additionalProperties"in o&&o.additionalProperties===!1){let{additionalProperties:a,...c}=o;s=c}else i=void 0;n.push(s)}}),n.length?{allOf:n,...i}:void 0}function Sz(t,e){let r=typeof t.value;return r!=="bigint"&&r!=="number"&&r!=="boolean"&&r!=="string"?{type:Array.isArray(t.value)?"array":"object"}:e.target==="openApi3"?{type:r==="bigint"?"integer":r,enum:[t.value]}:{type:r==="bigint"?"integer":r,const:t.value}}var i$,Xt={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:()=>(i$===void 0&&(i$=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),i$),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 kp(t,e){let r={type:"string"};if(t.checks)for(let i of t.checks)switch(i.kind){case"min":se(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,i.value):i.value,i.message,e);break;case"max":se(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,i.value):i.value,i.message,e);break;case"email":switch(e.emailStrategy){case"format:email":Qt(r,"email",i.message,e);break;case"format:idn-email":Qt(r,"idn-email",i.message,e);break;case"pattern:zod":st(r,Xt.email,i.message,e);break}break;case"url":Qt(r,"uri",i.message,e);break;case"uuid":Qt(r,"uuid",i.message,e);break;case"regex":st(r,i.regex,i.message,e);break;case"cuid":st(r,Xt.cuid,i.message,e);break;case"cuid2":st(r,Xt.cuid2,i.message,e);break;case"startsWith":st(r,RegExp(`^${o$(i.value,e)}`),i.message,e);break;case"endsWith":st(r,RegExp(`${o$(i.value,e)}$`),i.message,e);break;case"datetime":Qt(r,"date-time",i.message,e);break;case"date":Qt(r,"date",i.message,e);break;case"time":Qt(r,"time",i.message,e);break;case"duration":Qt(r,"duration",i.message,e);break;case"length":se(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,i.value):i.value,i.message,e),se(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,i.value):i.value,i.message,e);break;case"includes":{st(r,RegExp(o$(i.value,e)),i.message,e);break}case"ip":{i.version!=="v6"&&Qt(r,"ipv4",i.message,e),i.version!=="v4"&&Qt(r,"ipv6",i.message,e);break}case"base64url":st(r,Xt.base64url,i.message,e);break;case"jwt":st(r,Xt.jwt,i.message,e);break;case"cidr":{i.version!=="v6"&&st(r,Xt.ipv4Cidr,i.message,e),i.version!=="v4"&&st(r,Xt.ipv6Cidr,i.message,e);break}case"emoji":st(r,Xt.emoji(),i.message,e);break;case"ulid":{st(r,Xt.ulid,i.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{Qt(r,"binary",i.message,e);break}case"contentEncoding:base64":{se(r,"contentEncoding","base64",i.message,e);break}case"pattern:zod":{st(r,Xt.base64,i.message,e);break}}break}case"nanoid":st(r,Xt.nanoid,i.message,e);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return r}function o$(t,e){return e.patternStrategy==="escape"?wV(t):t}var $V=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function wV(t){let e="";for(let r=0;r<t.length;r++)$V.has(t[r])||(e+="\\"),e+=t[r];return e}function Qt(t,e,r,i){t.format||t.anyOf?.some(n=>n.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format,...t.errorMessage&&i.errorMessages&&{errorMessage:{format:t.errorMessage.format}}}),delete t.format,t.errorMessage&&(delete t.errorMessage.format,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.anyOf.push({format:e,...r&&i.errorMessages&&{errorMessage:{format:r}}})):se(t,"format",e,r,i)}function st(t,e,r,i){t.pattern||t.allOf?.some(n=>n.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern,...t.errorMessage&&i.errorMessages&&{errorMessage:{pattern:t.errorMessage.pattern}}}),delete t.pattern,t.errorMessage&&(delete t.errorMessage.pattern,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.allOf.push({pattern:xz(e,i),...r&&i.errorMessages&&{errorMessage:{pattern:r}}})):se(t,"pattern",xz(e,i),r,i)}function xz(t,e){if(!e.applyRegexFlags||!t.flags)return t.source;let r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},i=r.i?t.source.toLowerCase():t.source,n="",o=!1,s=!1,a=!1;for(let c=0;c<i.length;c++){if(o){n+=i[c],o=!1;continue}if(r.i){if(s){if(i[c].match(/[a-z]/)){a?(n+=i[c],n+=`${i[c-2]}-${i[c]}`.toUpperCase(),a=!1):i[c+1]==="-"&&i[c+2]?.match(/[a-z]/)?(n+=i[c],a=!0):n+=`${i[c]}${i[c].toUpperCase()}`;continue}}else if(i[c].match(/[a-z]/)){n+=`[${i[c]}${i[c].toUpperCase()}]`;continue}}if(r.m){if(i[c]==="^"){n+=`(^|(?<=[\r
|
|
221
|
-
]))`;continue}else if(i[c]==="$"){n+=`($|(?=[\r
|
|
222
|
-
]))`;continue}}if(r.s&&i[c]==="."){n+=s?`${i[c]}\r
|
|
223
|
-
`:`[${i[c]}\r
|
|
224
|
-
]`;continue}n+=i[c],i[c]==="\\"?o=!0:s&&i[c]==="]"?s=!1:!s&&i[c]==="["&&(s=!0)}try{new RegExp(n)}catch{return console.warn(`Could not convert regex pattern at ${e.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),t.source}return n}function Sp(t,e){if(e.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),e.target==="openApi3"&&t.keyType?._def.typeName===E.ZodEnum)return{type:"object",required:t.keyType._def.values,properties:t.keyType._def.values.reduce((i,n)=>({...i,[n]:J(t.valueType._def,{...e,currentPath:[...e.currentPath,"properties",n]})??Te(e)}),{}),additionalProperties:e.rejectedAdditionalProperties};let r={type:"object",additionalProperties:J(t.valueType._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]})??e.allowedAdditionalProperties};if(e.target==="openApi3")return r;if(t.keyType?._def.typeName===E.ZodString&&t.keyType._def.checks?.length){let{type:i,...n}=kp(t.keyType._def,e);return{...r,propertyNames:n}}else{if(t.keyType?._def.typeName===E.ZodEnum)return{...r,propertyNames:{enum:t.keyType._def.values}};if(t.keyType?._def.typeName===E.ZodBranded&&t.keyType._def.type._def.typeName===E.ZodString&&t.keyType._def.type._def.checks?.length){let{type:i,...n}=wp(t.keyType._def,e);return{...r,propertyNames:n}}}return r}function Iz(t,e){if(e.mapStrategy==="record")return Sp(t,e);let r=J(t.keyType._def,{...e,currentPath:[...e.currentPath,"items","items","0"]})||Te(e),i=J(t.valueType._def,{...e,currentPath:[...e.currentPath,"items","items","1"]})||Te(e);return{type:"array",maxItems:125,items:{type:"array",items:[r,i],minItems:2,maxItems:2}}}function Ez(t){let e=t.values,i=Object.keys(t.values).filter(o=>typeof e[e[o]]!="number").map(o=>e[o]),n=Array.from(new Set(i.map(o=>typeof o)));return{type:n.length===1?n[0]==="string"?"string":"number":["string","number"],enum:i}}function Oz(t){return t.target==="openAi"?void 0:{not:Te({...t,currentPath:[...t.currentPath,"not"]})}}function Nz(t){return t.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var $c={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function Pz(t,e){if(e.target==="openApi3")return zz(t,e);let r=t.options instanceof Map?Array.from(t.options.values()):t.options;if(r.every(i=>i._def.typeName in $c&&(!i._def.checks||!i._def.checks.length))){let i=r.reduce((n,o)=>{let s=$c[o._def.typeName];return s&&!n.includes(s)?[...n,s]:n},[]);return{type:i.length>1?i:i[0]}}else if(r.every(i=>i._def.typeName==="ZodLiteral"&&!i.description)){let i=r.reduce((n,o)=>{let s=typeof o._def.value;switch(s){case"string":case"number":case"boolean":return[...n,s];case"bigint":return[...n,"integer"];case"object":if(o._def.value===null)return[...n,"null"];default:return n}},[]);if(i.length===r.length){let n=i.filter((o,s,a)=>a.indexOf(o)===s);return{type:n.length>1?n:n[0],enum:r.reduce((o,s)=>o.includes(s._def.value)?o:[...o,s._def.value],[])}}}else if(r.every(i=>i._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((i,n)=>[...i,...n._def.values.filter(o=>!i.includes(o))],[])};return zz(t,e)}var zz=(t,e)=>{let r=(t.options instanceof Map?Array.from(t.options.values()):t.options).map((i,n)=>J(i._def,{...e,currentPath:[...e.currentPath,"anyOf",`${n}`]})).filter(i=>!!i&&(!e.strictUnions||typeof i=="object"&&Object.keys(i).length>0));return r.length?{anyOf:r}:void 0};function Tz(t,e){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(t.innerType._def.typeName)&&(!t.innerType._def.checks||!t.innerType._def.checks.length))return e.target==="openApi3"?{type:$c[t.innerType._def.typeName],nullable:!0}:{type:[$c[t.innerType._def.typeName],"null"]};if(e.target==="openApi3"){let i=J(t.innerType._def,{...e,currentPath:[...e.currentPath]});return i&&"$ref"in i?{allOf:[i],nullable:!0}:i&&{...i,nullable:!0}}let r=J(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function jz(t,e){let r={type:"number"};if(!t.checks)return r;for(let i of t.checks)switch(i.kind){case"int":r.type="integer",r$(r,"type",i.message,e);break;case"min":e.target==="jsonSchema7"?i.inclusive?se(r,"minimum",i.value,i.message,e):se(r,"exclusiveMinimum",i.value,i.message,e):(i.inclusive||(r.exclusiveMinimum=!0),se(r,"minimum",i.value,i.message,e));break;case"max":e.target==="jsonSchema7"?i.inclusive?se(r,"maximum",i.value,i.message,e):se(r,"exclusiveMaximum",i.value,i.message,e):(i.inclusive||(r.exclusiveMaximum=!0),se(r,"maximum",i.value,i.message,e));break;case"multipleOf":se(r,"multipleOf",i.value,i.message,e);break}return r}function Az(t,e){let r=e.target==="openAi",i={type:"object",properties:{}},n=[],o=t.shape();for(let a in o){let c=o[a];if(c===void 0||c._def===void 0)continue;let u=SV(c);u&&r&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),u=!1);let l=J(c._def,{...e,currentPath:[...e.currentPath,"properties",a],propertyPath:[...e.currentPath,"properties",a]});l!==void 0&&(i.properties[a]=l,u||n.push(a))}n.length&&(i.required=n);let s=kV(t,e);return s!==void 0&&(i.additionalProperties=s),i}function kV(t,e){if(t.catchall._def.typeName!=="ZodNever")return J(t.catchall._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]});switch(t.unknownKeys){case"passthrough":return e.allowedAdditionalProperties;case"strict":return e.rejectedAdditionalProperties;case"strip":return e.removeAdditionalStrategy==="strict"?e.allowedAdditionalProperties:e.rejectedAdditionalProperties}}function SV(t){try{return t.isOptional()}catch{return!0}}var Cz=(t,e)=>{if(e.currentPath.toString()===e.propertyPath?.toString())return J(t.innerType._def,e);let r=J(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","1"]});return r?{anyOf:[{not:Te(e)},r]}:Te(e)};var Rz=(t,e)=>{if(e.pipeStrategy==="input")return J(t.in._def,e);if(e.pipeStrategy==="output")return J(t.out._def,e);let r=J(t.in._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),i=J(t.out._def,{...e,currentPath:[...e.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,i].filter(n=>n!==void 0)}};function Dz(t,e){return J(t.type._def,e)}function Mz(t,e){let i={type:"array",uniqueItems:!0,items:J(t.valueType._def,{...e,currentPath:[...e.currentPath,"items"]})};return t.minSize&&se(i,"minItems",t.minSize.value,t.minSize.message,e),t.maxSize&&se(i,"maxItems",t.maxSize.value,t.maxSize.message,e),i}function Uz(t,e){return t.rest?{type:"array",minItems:t.items.length,items:t.items.map((r,i)=>J(r._def,{...e,currentPath:[...e.currentPath,"items",`${i}`]})).reduce((r,i)=>i===void 0?r:[...r,i],[]),additionalItems:J(t.rest._def,{...e,currentPath:[...e.currentPath,"additionalItems"]})}:{type:"array",minItems:t.items.length,maxItems:t.items.length,items:t.items.map((r,i)=>J(r._def,{...e,currentPath:[...e.currentPath,"items",`${i}`]})).reduce((r,i)=>i===void 0?r:[...r,i],[])}}function Lz(t){return{not:Te(t)}}function qz(t){return Te(t)}var Zz=(t,e)=>J(t.innerType._def,e);var Fz=(t,e,r)=>{switch(e){case E.ZodString:return kp(t,r);case E.ZodNumber:return jz(t,r);case E.ZodObject:return Az(t,r);case E.ZodBigInt:return yz(t,r);case E.ZodBoolean:return vz();case E.ZodDate:return n$(t,r);case E.ZodUndefined:return Lz(r);case E.ZodNull:return Nz(r);case E.ZodArray:return gz(t,r);case E.ZodUnion:case E.ZodDiscriminatedUnion:return Pz(t,r);case E.ZodIntersection:return kz(t,r);case E.ZodTuple:return Uz(t,r);case E.ZodRecord:return Sp(t,r);case E.ZodLiteral:return Sz(t,r);case E.ZodEnum:return wz(t);case E.ZodNativeEnum:return Ez(t);case E.ZodNullable:return Tz(t,r);case E.ZodOptional:return Cz(t,r);case E.ZodMap:return Iz(t,r);case E.ZodSet:return Mz(t,r);case E.ZodLazy:return()=>t.getter()._def;case E.ZodPromise:return Dz(t,r);case E.ZodNaN:case E.ZodNever:return Oz(r);case E.ZodEffects:return $z(t,r);case E.ZodAny:return Te(r);case E.ZodUnknown:return qz(r);case E.ZodDefault:return _z(t,r);case E.ZodBranded:return wp(t,r);case E.ZodReadonly:return Zz(t,r);case E.ZodCatch:return bz(t,r);case E.ZodPipeline:return Rz(t,r);case E.ZodFunction:case E.ZodVoid:case E.ZodSymbol:return;default:return(i=>{})(e)}};function J(t,e,r=!1){let i=e.seen.get(t);if(e.override){let a=e.override?.(t,e,i,r);if(a!==pz)return a}if(i&&!r){let a=xV(i,e);if(a!==void 0)return a}let n={def:t,path:e.currentPath,jsonSchema:void 0};e.seen.set(t,n);let o=Fz(t,t.typeName,e),s=typeof o=="function"?J(o(),e):o;if(s&&IV(t,e,s),e.postProcess){let a=e.postProcess(s,t,e);return n.jsonSchema=s,a}return n.jsonSchema=s,s}var xV=(t,e)=>{switch(e.$refStrategy){case"root":return{$ref:t.path.join("/")};case"relative":return{$ref:$p(e.currentPath,t.path)};case"none":case"seen":return t.path.length<e.currentPath.length&&t.path.every((r,i)=>e.currentPath[i]===r)?(console.warn(`Recursive reference detected at ${e.currentPath.join("/")}! Defaulting to any`),Te(e)):e.$refStrategy==="seen"?Te(e):void 0}},IV=(t,e,r)=>(t.description&&(r.description=t.description,e.markdownDescription&&(r.markdownDescription=t.description)),r);var s$=(t,e)=>{let r=hz(e),i=typeof e=="object"&&e.definitions?Object.entries(e.definitions).reduce((c,[u,l])=>({...c,[u]:J(l._def,{...r,currentPath:[...r.basePath,r.definitionPath,u]},!0)??Te(r)}),{}):void 0,n=typeof e=="string"?e:e?.nameStrategy==="title"?void 0:e?.name,o=J(t._def,n===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,n]},!1)??Te(r),s=typeof e=="object"&&e.name!==void 0&&e.nameStrategy==="title"?e.name:void 0;s!==void 0&&(o.title=s),r.flags.hasReferencedOpenAiAnyType&&(i||(i={}),i[r.openAiAnyTypeName]||(i[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?i?{...o,[r.definitionPath]:i}:o:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,n].join("/"),[r.definitionPath]:{...i,[n]:o}};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 EV(t){return!t||t==="jsonSchema7"||t==="draft-7"?"draft-7":t==="jsonSchema2019-09"||t==="draft-2020-12"?"draft-2020-12":"draft-7"}function a$(t,e){return Ct(t)?Co(t,{target:EV(e?.target),io:e?.pipeStrategy??"input"}):s$(t,{strictUnions:e?.strictUnions??!0,pipeStrategy:e?.pipeStrategy??"input"})}function c$(t){let r=$n(t)?.method;if(!r)throw new Error("Schema is missing a method literal");let i=Uf(r);if(typeof i!="string")throw new Error("Schema method literal must be a string");return i}function u$(t,e){let r=_n(t,e);if(!r.success)throw r.error;return r.data}var OV=6e4,xp=class{constructor(e){this._options=e,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(ip,r=>{this._oncancel(r)}),this.setNotificationHandler(sp,r=>{this._onprogress(r)}),this.setRequestHandler(op,r=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(ap,async(r,i)=>{let n=await this._taskStore.getTask(r.params.taskId,i.sessionId);if(!n)throw new D(L.InvalidParams,"Failed to retrieve task: Task not found");return{...n}}),this.setRequestHandler(up,async(r,i)=>{let n=async()=>{let o=r.params.taskId;if(this._taskMessageQueue){let a;for(;a=await this._taskMessageQueue.dequeue(o,i.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,m=new D(d.error.code,d.error.message,d.error.data);l(m)}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:i.requestId})}}let s=await this._taskStore.getTask(o,i.sessionId);if(!s)throw new D(L.InvalidParams,`Task not found: ${o}`);if(!kn(s.status))return await this._waitForTaskUpdate(o,i.signal),await n();if(kn(s.status)){let a=await this._taskStore.getTaskResult(o,i.sessionId);return this._clearTaskQueue(o),{...a,_meta:{...a._meta,[wn]:{taskId:o}}}}return await n()};return await n()}),this.setRequestHandler(lp,async(r,i)=>{try{let{tasks:n,nextCursor:o}=await this._taskStore.listTasks(r.params?.cursor,i.sessionId);return{tasks:n,nextCursor:o,_meta:{}}}catch(n){throw new D(L.InvalidParams,`Failed to list tasks: ${n instanceof Error?n.message:String(n)}`)}}),this.setRequestHandler(fp,async(r,i)=>{try{let n=await this._taskStore.getTask(r.params.taskId,i.sessionId);if(!n)throw new D(L.InvalidParams,`Task not found: ${r.params.taskId}`);if(kn(n.status))throw new D(L.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(r.params.taskId,"cancelled","Client cancelled task execution.",i.sessionId),this._clearTaskQueue(r.params.taskId);let o=await this._taskStore.getTask(r.params.taskId,i.sessionId);if(!o)throw new D(L.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...o}}catch(n){throw n instanceof D?n:new D(L.InvalidRequest,`Failed to cancel task: ${n instanceof Error?n.message:String(n)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,r,i,n,o=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(n,r),startTime:Date.now(),timeout:r,maxTotalTimeout:i,resetTimeoutOnProgress:o,onTimeout:n})}_resetTimeout(e){let r=this._timeoutInfo.get(e);if(!r)return!1;let i=Date.now()-r.startTime;if(r.maxTotalTimeout&&i>=r.maxTotalTimeout)throw this._timeoutInfo.delete(e),D.fromError(L.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:i});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(e){let r=this._timeoutInfo.get(e);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(e))}async connect(e){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=e;let r=this.transport?.onclose;this._transport.onclose=()=>{r?.(),this._onclose()};let i=this.transport?.onerror;this._transport.onerror=o=>{i?.(o),this._onerror(o)};let n=this._transport?.onmessage;this._transport.onmessage=(o,s)=>{n?.(o,s),fc(o)||tz(o)?this._onresponse(o):Z_(o)?this._onrequest(o,s):ez(o)?this._onnotification(o):this._onerror(new Error(`Unknown message type: ${JSON.stringify(o)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let i of this._timeoutInfo.values())clearTimeout(i.timeoutId);this._timeoutInfo.clear();for(let i of this._requestHandlerAbortControllers.values())i.abort();this._requestHandlerAbortControllers.clear();let r=D.fromError(L.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let i of e.values())i(r)}_onerror(e){this.onerror?.(e)}_onnotification(e){let r=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(e)).catch(i=>this._onerror(new Error(`Uncaught error in notification handler: ${i}`)))}_onrequest(e,r){let i=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,n=this._transport,o=e.params?._meta?.[wn]?.taskId;if(i===void 0){let l={jsonrpc:"2.0",id:e.id,error:{code:L.MethodNotFound,message:"Method not found"}};o&&this._taskMessageQueue?this._enqueueTaskMessage(o,{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(e.id,s);let a=YN(e.params)?e.params.task:void 0,c=this._taskStore?this.requestTaskStore(e,n?.sessionId):void 0,u={signal:s.signal,sessionId:n?.sessionId,_meta:e.params?._meta,sendNotification:async l=>{if(s.signal.aborted)return;let d={relatedRequestId:e.id};o&&(d.relatedTask={taskId:o}),await this.notification(l,d)},sendRequest:async(l,d,m)=>{if(s.signal.aborted)throw new D(L.ConnectionClosed,"Request was cancelled");let h={...m,relatedRequestId:e.id};o&&!h.relatedTask&&(h.relatedTask={taskId:o});let f=h.relatedTask?.taskId??o;return f&&c&&await c.updateTaskStatus(f,"input_required"),await this.request(l,d,h)},authInfo:r?.authInfo,requestId:e.id,requestInfo:r?.requestInfo,taskId:o,taskStore:c,taskRequestedTtl:a?.ttl,closeSSEStream:r?.closeSSEStream,closeStandaloneSSEStream:r?.closeStandaloneSSEStream};Promise.resolve().then(()=>{a&&this.assertTaskHandlerCapability(e.method)}).then(()=>i(e,u)).then(async l=>{if(s.signal.aborted)return;let d={result:l,jsonrpc:"2.0",id:e.id};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{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:e.id,error:{code:Number.isSafeInteger(l.code)?l.code:L.InternalError,message:l.message??"Internal error",...l.data!==void 0&&{data:l.data}}};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{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.get(e.id)===s&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:r,...i}=e.params,n=Number(r),o=this._progressHandlers.get(n);if(!o){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));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}o(i)}_onresponse(e){let r=Number(e.id),i=this._requestResolvers.get(r);if(i){if(this._requestResolvers.delete(r),fc(e))i(e);else{let s=new D(e.error.code,e.error.message,e.error.data);i(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(e)}`));return}this._responseHandlers.delete(r),this._cleanupTimeout(r);let o=!1;if(fc(e)&&e.result&&typeof e.result=="object"){let s=e.result;if(s.task&&typeof s.task=="object"){let a=s.task;typeof a.taskId=="string"&&(o=!0,this._taskProgressTokens.set(a.taskId,r))}}if(o||this._progressHandlers.delete(r),fc(e))n(e);else{let s=D.fromError(e.error.code,e.error.message,e.error.data);n(s)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,r,i){let{task:n}=i??{};if(!n){try{yield{type:"result",result:await this.request(e,r,i)}}catch(s){yield{type:"error",error:s instanceof D?s:new D(L.InternalError,String(s))}}return}let o;try{let s=await this.request(e,Lo,i);if(s.task)o=s.task.taskId,yield{type:"taskCreated",task:s.task};else throw new D(L.InternalError,"Task creation did not return a task");for(;;){let a=await this.getTask({taskId:o},i);if(yield{type:"taskStatus",task:a},kn(a.status)){a.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:o},r,i)}:a.status==="failed"?yield{type:"error",error:new D(L.InternalError,`Task ${o} failed`)}:a.status==="cancelled"&&(yield{type:"error",error:new D(L.InternalError,`Task ${o} was cancelled`)});return}if(a.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:o},r,i)};return}let c=a.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(u=>setTimeout(u,c)),i?.signal?.throwIfAborted()}}catch(s){yield{type:"error",error:s instanceof D?s:new D(L.InternalError,String(s))}}}request(e,r,i){let{relatedRequestId:n,resumptionToken:o,onresumptiontoken:s,task:a,relatedTask:c}=i??{};return new Promise((u,l)=>{let d=y=>{l(y)};if(!this._transport){d(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),a&&this.assertTaskCapability(e.method)}catch(y){d(y);return}i?.signal?.throwIfAborted();let m=this._requestMessageId++,h={...e,jsonrpc:"2.0",id:m};i?.onprogress&&(this._progressHandlers.set(m,i.onprogress),h.params={...e.params,_meta:{...e.params?._meta||{},progressToken:m}}),a&&(h.params={...h.params,task:a}),c&&(h.params={...h.params,_meta:{...h.params?._meta||{},[wn]:c}});let f=y=>{this._responseHandlers.delete(m),this._progressHandlers.delete(m),this._cleanupTimeout(m),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:m,reason:String(y)}},{relatedRequestId:n,resumptionToken:o,onresumptiontoken:s}).catch(w=>this._onerror(new Error(`Failed to send cancellation: ${w}`)));let b=y instanceof D?y:new D(L.RequestTimeout,String(y));l(b)};this._responseHandlers.set(m,y=>{if(!i?.signal?.aborted){if(y instanceof Error)return l(y);try{let b=_n(r,y.result);b.success?u(b.data):l(b.error)}catch(b){l(b)}}}),i?.signal?.addEventListener("abort",()=>{f(i?.signal?.reason)});let p=i?.timeout??OV,g=()=>f(D.fromError(L.RequestTimeout,"Request timed out",{timeout:p}));this._setupTimeout(m,p,i?.maxTotalTimeout,g,i?.resetTimeoutOnProgress??!1);let v=c?.taskId;if(v){let y=b=>{let w=this._responseHandlers.get(m);w?w(b):this._onerror(new Error(`Response handler missing for side-channeled request ${m}`))};this._requestResolvers.set(m,y),this._enqueueTaskMessage(v,{type:"request",message:h,timestamp:Date.now()}).catch(b=>{this._cleanupTimeout(m),l(b)})}else this._transport.send(h,{relatedRequestId:n,resumptionToken:o,onresumptiontoken:s}).catch(y=>{this._cleanupTimeout(m),l(y)})})}async getTask(e,r){return this.request({method:"tasks/get",params:e},cp,r)}async getTaskResult(e,r,i){return this.request({method:"tasks/result",params:e},r,i)}async listTasks(e,r){return this.request({method:"tasks/list",params:e},dp,r)}async cancelTask(e,r){return this.request({method:"tasks/cancel",params:e},iz,r)}async notification(e,r){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);let i=r?.relatedTask?.taskId;if(i){let a={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...e.params?._meta||{},[wn]:r.relatedTask}}};await this._enqueueTaskMessage(i,{type:"notification",message:a,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!r?.relatedRequestId&&!r?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let a={...e,jsonrpc:"2.0"};r?.relatedTask&&(a={...a,params:{...a.params,_meta:{...a.params?._meta||{},[wn]:r.relatedTask}}}),this._transport?.send(a,r).catch(c=>this._onerror(c))});return}let s={...e,jsonrpc:"2.0"};r?.relatedTask&&(s={...s,params:{...s.params,_meta:{...s.params?._meta||{},[wn]:r.relatedTask}}}),await this._transport.send(s,r)}setRequestHandler(e,r){let i=c$(e);this.assertRequestHandlerCapability(i),this._requestHandlers.set(i,(n,o)=>{let s=u$(e,n);return Promise.resolve(r(s,o))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,r){let i=c$(e);this._notificationHandlers.set(i,n=>{let o=u$(e,n);return Promise.resolve(r(o))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let r=this._taskProgressTokens.get(e);r!==void 0&&(this._progressHandlers.delete(r),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,r,i){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(e,r,i,n)}async _clearTaskQueue(e,r){if(this._taskMessageQueue){let i=await this._taskMessageQueue.dequeueAll(e,r);for(let n of i)if(n.type==="request"&&Z_(n.message)){let o=n.message.id,s=this._requestResolvers.get(o);s?(s(new D(L.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(o)):this._onerror(new Error(`Resolver missing for request ${o} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,r){let i=this._options?.defaultTaskPollInterval??1e3;try{let n=await this._taskStore?.getTask(e);n?.pollInterval&&(i=n.pollInterval)}catch{}return new Promise((n,o)=>{if(r.aborted){o(new D(L.InvalidRequest,"Request cancelled"));return}let s=setTimeout(n,i);r.addEventListener("abort",()=>{clearTimeout(s),o(new D(L.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,r){let i=this._taskStore;if(!i)throw new Error("No task store configured");return{createTask:async n=>{if(!e)throw new Error("No request provided");return await i.createTask(n,e.id,{method:e.method,params:e.params},r)},getTask:async n=>{let o=await i.getTask(n,r);if(!o)throw new D(L.InvalidParams,"Failed to retrieve task: Task not found");return o},storeTaskResult:async(n,o,s)=>{await i.storeTaskResult(n,o,s,r);let a=await i.getTask(n,r);if(a){let c=yc.parse({method:"notifications/tasks/status",params:a});await this.notification(c),kn(a.status)&&this._cleanupTaskProgressHandler(n)}},getTaskResult:n=>i.getTaskResult(n,r),updateTaskStatus:async(n,o,s)=>{let a=await i.getTask(n,r);if(!a)throw new D(L.InvalidParams,`Task "${n}" not found - it may have been cleaned up`);if(kn(a.status))throw new D(L.InvalidParams,`Cannot update task "${n}" from terminal status "${a.status}" to "${o}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await i.updateTaskStatus(n,o,s,r);let c=await i.getTask(n,r);if(c){let u=yc.parse({method:"notifications/tasks/status",params:c});await this.notification(u),kn(c.status)&&this._cleanupTaskProgressHandler(n)}},listTasks:n=>i.listTasks(n,r)}}};function Vz(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function Jz(t,e){let r={...t};for(let i in e){let n=i,o=e[n];if(o===void 0)continue;let s=r[n];Vz(s)&&Vz(o)?r[n]={...s,...o}:r[n]=o}return r}var Bz=Vo(Ug(),1),Kz=Vo(Zg(),1);function NV(){let t=new Bz.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,Kz.default)(t),t}var Ip=class{constructor(e){this._ajv=e??NV()}getValidator(e){let r="$id"in e&&typeof e.$id=="string"?this._ajv.getSchema(e.$id)??this._ajv.compile(e):this._ajv.compile(e);return i=>r(i)?{valid:!0,data:i,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(r.errors)}}};var Ep=class{constructor(e){this._server=e}requestStream(e,r,i){return this._server.requestStream(e,r,i)}createMessageStream(e,r){let i=this._server.getClientCapabilities();if((e.tools||e.toolChoice)&&!i?.sampling?.tools)throw new Error("Client does not support sampling tools capability.");if(e.messages.length>0){let n=e.messages[e.messages.length-1],o=Array.isArray(n.content)?n.content:[n.content],s=o.some(l=>l.type==="tool_result"),a=e.messages.length>1?e.messages[e.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(o.some(l=>l.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!u)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(u){let l=new Set(c.filter(m=>m.type==="tool_use").map(m=>m.id)),d=new Set(o.filter(m=>m.type==="tool_result").map(m=>m.toolUseId));if(l.size!==d.size||![...l].every(m=>d.has(m)))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:e},_c,r)}elicitInputStream(e,r){let i=this._server.getClientCapabilities(),n=e.mode??"form";switch(n){case"url":{if(!i?.elicitation?.url)throw new Error("Client does not support url elicitation.");break}case"form":{if(!i?.elicitation?.form)throw new Error("Client does not support form elicitation.");break}}let o=n==="form"&&e.mode===void 0?{...e,mode:"form"}:e;return this.requestStream({method:"elicitation/create",params:o},Fo,r)}async getTask(e,r){return this._server.getTask({taskId:e},r)}async getTaskResult(e,r,i){return this._server.getTaskResult({taskId:e},r,i)}async listTasks(e,r){return this._server.listTasks(e?{cursor:e}:void 0,r)}async cancelTask(e,r){return this._server.cancelTask({taskId:e},r)}};function Hz(t,e,r){if(!t)throw new Error(`${r} does not support task creation (required for ${e})`);switch(e){case"tools/call":if(!t.tools?.call)throw new Error(`${r} does not support task creation for tools/call (required for ${e})`);break;default:break}}function Wz(t,e,r){if(!t)throw new Error(`${r} does not support task creation (required for ${e})`);switch(e){case"sampling/createMessage":if(!t.sampling?.createMessage)throw new Error(`${r} does not support task creation for sampling/createMessage (required for ${e})`);break;case"elicitation/create":if(!t.elicitation?.create)throw new Error(`${r} does not support task creation for elicitation/create (required for ${e})`);break;default:break}}var Op=class extends xp{constructor(e,r){super(r),this._serverInfo=e,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(bc.options.map((i,n)=>[i,n])),this.isMessageIgnored=(i,n)=>{let o=this._loggingLevels.get(n);return o?this.LOG_LEVEL_SEVERITY.get(i)<this.LOG_LEVEL_SEVERITY.get(o):!1},this._capabilities=r?.capabilities??{},this._instructions=r?.instructions,this._jsonSchemaValidator=r?.jsonSchemaValidator??new Ip,this.setRequestHandler(J_,i=>this._oninitialize(i)),this.setNotificationHandler(B_,()=>this.oninitialized?.()),this._capabilities.logging&&this.setRequestHandler(Q_,async(i,n)=>{let o=n.sessionId||n.requestInfo?.headers["mcp-session-id"]||void 0,{level:s}=i.params,a=bc.safeParse(s);return a.success&&this._loggingLevels.set(o,a.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new Ep(this)}),this._experimental}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=Jz(this._capabilities,e)}setRequestHandler(e,r){let n=$n(e)?.method;if(!n)throw new Error("Schema is missing a method literal");let o;if(Ct(n)){let a=n;o=a._zod?.def?.value??a.value}else{let a=n;o=a._def?.value??a.value}if(typeof o!="string")throw new Error("Schema method literal must be a string");if(o==="tools/call"){let a=async(c,u)=>{let l=_n(Zo,c);if(!l.success){let f=l.error instanceof Error?l.error.message:String(l.error);throw new D(L.InvalidParams,`Invalid tools/call request: ${f}`)}let{params:d}=l.data,m=await Promise.resolve(r(c,u));if(d.task){let f=_n(Lo,m);if(!f.success){let p=f.error instanceof Error?f.error.message:String(f.error);throw new D(L.InvalidParams,`Invalid task creation result: ${p}`)}return f.data}let h=_n(bp,m);if(!h.success){let f=h.error instanceof Error?h.error.message:String(h.error);throw new D(L.InvalidParams,`Invalid tools/call result: ${f}`)}return h.data};return super.setRequestHandler(e,a)}return super.setRequestHandler(e,r)}assertCapabilityForMethod(e){switch(e){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new Error(`Client does not support sampling (required for ${e})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new Error(`Client does not support elicitation (required for ${e})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new Error(`Client does not support listing roots (required for ${e})`);break;case"ping":break}}assertNotificationCapability(e){switch(e){case"notifications/message":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${e})`);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 ${e})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new Error(`Server does not support notifying of tool list changes (required for ${e})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new Error(`Server does not support notifying of prompt list changes (required for ${e})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new Error(`Client does not support URL elicitation (required for ${e})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(e){if(this._capabilities)switch(e){case"completion/complete":if(!this._capabilities.completions)throw new Error(`Server does not support completions (required for ${e})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new Error(`Server does not support prompts (required for ${e})`);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 ${e})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new Error(`Server does not support tools (required for ${e})`);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 ${e})`);break;case"ping":case"initialize":break}}assertTaskCapability(e){Wz(this._clientCapabilities?.tasks?.requests,e,"Client")}assertTaskHandlerCapability(e){this._capabilities&&Hz(this._capabilities.tasks?.requests,e,"Server")}async _oninitialize(e){let r=e.params.protocolVersion;return this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo,{protocolVersion:HN.includes(r)?r:L_,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"},np)}async createMessage(e,r){if((e.tools||e.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new Error("Client does not support sampling tools capability.");if(e.messages.length>0){let i=e.messages[e.messages.length-1],n=Array.isArray(i.content)?i.content:[i.content],o=n.some(u=>u.type==="tool_result"),s=e.messages.length>1?e.messages[e.messages.length-2]:void 0,a=s?Array.isArray(s.content)?s.content:[s.content]:[],c=a.some(u=>u.type==="tool_use");if(o){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 e.tools?this.request({method:"sampling/createMessage",params:e},e$,r):this.request({method:"sampling/createMessage",params:e},_c,r)}async elicitInput(e,r){switch(e.mode??"form"){case"url":{if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support url elicitation.");let n=e;return this.request({method:"elicitation/create",params:n},Fo,r)}case"form":{if(!this._clientCapabilities?.elicitation?.form)throw new Error("Client does not support form elicitation.");let n=e.mode==="form"?e:{...e,mode:"form"},o=await this.request({method:"elicitation/create",params:n},Fo,r);if(o.action==="accept"&&o.content&&n.requestedSchema)try{let a=this._jsonSchemaValidator.getValidator(n.requestedSchema)(o.content);if(!a.valid)throw new D(L.InvalidParams,`Elicitation response content does not match requested schema: ${a.errorMessage}`)}catch(s){throw s instanceof D?s:new D(L.InternalError,`Error validating elicitation response: ${s instanceof Error?s.message:String(s)}`)}return o}}}createElicitationCompletionNotifier(e,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:e}},r)}async listRoots(e,r){return this.request({method:"roots/list",params:e},t$,r)}async sendLoggingMessage(e,r){if(this._capabilities.logging&&!this.isMessageIgnored(e.level,r))return this.notification({method:"notifications/message",params:e})}async sendResourceUpdated(e){return this.notification({method:"notifications/resources/updated",params:e})}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 Yz=Symbol.for("mcp.completable");function l$(t){return!!t&&typeof t=="object"&&Yz in t}function Xz(t){return t[Yz]?.complete}var Gz;(function(t){t.Completable="McpCompletable"})(Gz||(Gz={}));var zV=/^[A-Za-z0-9._-]{1,128}$/;function PV(t){let e=[];if(t.length===0)return{isValid:!1,warnings:["Tool name cannot be empty"]};if(t.length>128)return{isValid:!1,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${t.length})`]};if(t.includes(" ")&&e.push("Tool name contains spaces, which may cause parsing issues"),t.includes(",")&&e.push("Tool name contains commas, which may cause parsing issues"),(t.startsWith("-")||t.endsWith("-"))&&e.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts"),(t.startsWith(".")||t.endsWith("."))&&e.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts"),!zV.test(t)){let r=t.split("").filter(i=>!/[A-Za-z0-9._-]/.test(i)).filter((i,n,o)=>o.indexOf(i)===n);return e.push(`Tool name contains invalid characters: ${r.map(i=>`"${i}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:e}}return{isValid:!0,warnings:e}}function TV(t,e){if(e.length>0){console.warn(`Tool name validation warning for "${t}":`);for(let r of e)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 d$(t){let e=PV(t);return TV(t,e.warnings),e.isValid}var Np=class{constructor(e){this._mcpServer=e}registerToolTask(e,r,i){let n={taskSupport:"required",...r.execution};if(n.taskSupport==="forbidden")throw new Error(`Cannot register task-based tool '${e}' with taskSupport 'forbidden'. Use registerTool() instead.`);return this._mcpServer._createRegisteredTool(e,r.title,r.description,r.inputSchema,r.outputSchema,r.annotations,n,r._meta,i)}};var zp=class{constructor(e,r){this._registeredResources={},this._registeredResourceTemplates={},this._registeredTools={},this._registeredPrompts={},this._toolHandlersInitialized=!1,this._completionHandlerInitialized=!1,this._resourceHandlersInitialized=!1,this._promptHandlersInitialized=!1,this.server=new Op(e,r)}get experimental(){return this._experimental||(this._experimental={tasks:new Np(this)}),this._experimental}async connect(e){return await this.server.connect(e)}async close(){await this.server.close()}setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler(Sn(vp)),this.server.assertCanSetRequestHandler(Sn(Zo)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(vp,()=>({tools:Object.entries(this._registeredTools).filter(([,e])=>e.enabled).map(([e,r])=>{let i={name:e,title:r.title,description:r.description,inputSchema:(()=>{let n=Ro(r.inputSchema);return n?a$(n,{strictUnions:!0,pipeStrategy:"input"}):jV})(),annotations:r.annotations,execution:r.execution,_meta:r._meta};if(r.outputSchema){let n=Ro(r.outputSchema);n&&(i.outputSchema=a$(n,{strictUnions:!0,pipeStrategy:"output"}))}return i})})),this.server.setRequestHandler(Zo,async(e,r)=>{try{let i=this._registeredTools[e.params.name];if(!i)throw new D(L.InvalidParams,`Tool ${e.params.name} not found`);if(!i.enabled)throw new D(L.InvalidParams,`Tool ${e.params.name} disabled`);let n=!!e.params.task,o=i.execution?.taskSupport,s="createTask"in i.handler;if((o==="required"||o==="optional")&&!s)throw new D(L.InternalError,`Tool ${e.params.name} has taskSupport '${o}' but was not registered with registerToolTask`);if(o==="required"&&!n)throw new D(L.MethodNotFound,`Tool ${e.params.name} requires task augmentation (taskSupport: 'required')`);if(o==="optional"&&!n&&s)return await this.handleAutomaticTaskPolling(i,e,r);let a=await this.validateToolInput(i,e.params.arguments,e.params.name),c=await this.executeToolHandler(i,a,r);return n||await this.validateToolOutput(i,c,e.params.name),c}catch(i){if(i instanceof D&&i.code===L.UrlElicitationRequired)throw i;return this.createToolError(i instanceof Error?i.message:String(i))}}),this._toolHandlersInitialized=!0)}createToolError(e){return{content:[{type:"text",text:e}],isError:!0}}async validateToolInput(e,r,i){if(!e.inputSchema)return;let o=Ro(e.inputSchema)??e.inputSchema,s=await Df(o,r);if(!s.success){let a="error"in s?s.error:"Unknown error",c=Mf(a);throw new D(L.InvalidParams,`Input validation error: Invalid arguments for tool ${i}: ${c}`)}return s.data}async validateToolOutput(e,r,i){if(!e.outputSchema||!("content"in r)||r.isError)return;if(!r.structuredContent)throw new D(L.InvalidParams,`Output validation error: Tool ${i} has an output schema but no structured content was provided`);let n=Ro(e.outputSchema),o=await Df(n,r.structuredContent);if(!o.success){let s="error"in o?o.error:"Unknown error",a=Mf(s);throw new D(L.InvalidParams,`Output validation error: Invalid structured content for tool ${i}: ${a}`)}}async executeToolHandler(e,r,i){let n=e.handler;if("createTask"in n){if(!i.taskStore)throw new Error("No task store provided.");let s={...i,taskStore:i.taskStore};if(e.inputSchema){let a=n;return await Promise.resolve(a.createTask(r,s))}else{let a=n;return await Promise.resolve(a.createTask(s))}}if(e.inputSchema){let s=n;return await Promise.resolve(s(r,i))}else{let s=n;return await Promise.resolve(s(i))}}async handleAutomaticTaskPolling(e,r,i){if(!i.taskStore)throw new Error("No task store provided for task-capable tool.");let n=await this.validateToolInput(e,r.params.arguments,r.params.name),o=e.handler,s={...i,taskStore:i.taskStore},a=n?await Promise.resolve(o.createTask(n,s)):await Promise.resolve(o.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(m=>setTimeout(m,l));let d=await i.taskStore.getTask(c);if(!d)throw new D(L.InternalError,`Task ${c} not found during polling`);u=d}return await i.taskStore.getTaskResult(c)}setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler(Sn(_p)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(_p,async e=>{switch(e.params.ref.type){case"ref/prompt":return lz(e),this.handlePromptCompletion(e,e.params.ref);case"ref/resource":return dz(e),this.handleResourceCompletion(e,e.params.ref);default:throw new D(L.InvalidParams,`Invalid completion reference: ${e.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(e,r){let i=this._registeredPrompts[r.name];if(!i)throw new D(L.InvalidParams,`Prompt ${r.name} not found`);if(!i.enabled)throw new D(L.InvalidParams,`Prompt ${r.name} disabled`);if(!i.argsSchema)return wc;let o=$n(i.argsSchema)?.[e.params.argument.name];if(!l$(o))return wc;let s=Xz(o);if(!s)return wc;let a=await s(e.params.argument.value,e.params.context);return eP(a)}async handleResourceCompletion(e,r){let i=Object.values(this._registeredResourceTemplates).find(s=>s.resourceTemplate.uriTemplate.toString()===r.uri);if(!i){if(this._registeredResources[r.uri])return wc;throw new D(L.InvalidParams,`Resource template ${e.params.ref.uri} not found`)}let n=i.resourceTemplate.completeCallback(e.params.argument.name);if(!n)return wc;let o=await n(e.params.argument.value,e.params.context);return eP(o)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(Sn(pp)),this.server.assertCanSetRequestHandler(Sn(mp)),this.server.assertCanSetRequestHandler(Sn(hp)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(pp,async(e,r)=>{let i=Object.entries(this._registeredResources).filter(([o,s])=>s.enabled).map(([o,s])=>({uri:o,name:s.name,...s.metadata})),n=[];for(let o of Object.values(this._registeredResourceTemplates)){if(!o.resourceTemplate.listCallback)continue;let s=await o.resourceTemplate.listCallback(r);for(let a of s.resources)n.push({...o.metadata,...a})}return{resources:[...i,...n]}}),this.server.setRequestHandler(mp,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([r,i])=>({name:r,uriTemplate:i.resourceTemplate.uriTemplate.toString(),...i.metadata}))})),this.server.setRequestHandler(hp,async(e,r)=>{let i=new URL(e.params.uri),n=this._registeredResources[i.toString()];if(n){if(!n.enabled)throw new D(L.InvalidParams,`Resource ${i} disabled`);return n.readCallback(i,r)}for(let o of Object.values(this._registeredResourceTemplates)){let s=o.resourceTemplate.uriTemplate.match(i.toString());if(s)return o.readCallback(i,s,r)}throw new D(L.InvalidParams,`Resource ${i} not found`)}),this._resourceHandlersInitialized=!0)}setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler(Sn(gp)),this.server.assertCanSetRequestHandler(Sn(yp)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(gp,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,e])=>e.enabled).map(([e,r])=>({name:e,title:r.title,description:r.description,arguments:r.argsSchema?AV(r.argsSchema):void 0}))})),this.server.setRequestHandler(yp,async(e,r)=>{let i=this._registeredPrompts[e.params.name];if(!i)throw new D(L.InvalidParams,`Prompt ${e.params.name} not found`);if(!i.enabled)throw new D(L.InvalidParams,`Prompt ${e.params.name} disabled`);if(i.argsSchema){let n=Ro(i.argsSchema),o=await Df(n,e.params.arguments);if(!o.success){let c="error"in o?o.error:"Unknown error",u=Mf(c);throw new D(L.InvalidParams,`Invalid arguments for prompt ${e.params.name}: ${u}`)}let s=o.data,a=i.callback;return await Promise.resolve(a(s,r))}else{let n=i.callback;return await Promise.resolve(n(r))}}),this._promptHandlersInitialized=!0)}resource(e,r,...i){let n;typeof i[0]=="object"&&(n=i.shift());let o=i[0];if(typeof r=="string"){if(this._registeredResources[r])throw new Error(`Resource ${r} is already registered`);let s=this._createRegisteredResource(e,void 0,r,n,o);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}else{if(this._registeredResourceTemplates[e])throw new Error(`Resource template ${e} is already registered`);let s=this._createRegisteredResourceTemplate(e,void 0,r,n,o);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}}registerResource(e,r,i,n){if(typeof r=="string"){if(this._registeredResources[r])throw new Error(`Resource ${r} is already registered`);let o=this._createRegisteredResource(e,i.title,r,i,n);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),o}else{if(this._registeredResourceTemplates[e])throw new Error(`Resource template ${e} is already registered`);let o=this._createRegisteredResourceTemplate(e,i.title,r,i,n);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),o}}_createRegisteredResource(e,r,i,n,o){let s={name:e,title:r,metadata:n,readCallback:o,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!==i&&(delete this._registeredResources[i],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[i]=s,s}_createRegisteredResourceTemplate(e,r,i,n,o){let s={resourceTemplate:i,title:r,metadata:n,readCallback:o,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!==e&&(delete this._registeredResourceTemplates[e],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[e]=s;let a=i.uriTemplate.variableNames;return Array.isArray(a)&&a.some(u=>!!i.completeCallback(u))&&this.setCompletionRequestHandler(),s}_createRegisteredPrompt(e,r,i,n,o){let s={title:r,description:i,argsSchema:n===void 0?void 0:ri(n),callback:o,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!==e&&(delete this._registeredPrompts[e],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=ri(a.argsSchema)),typeof a.callback<"u"&&(s.callback=a.callback),typeof a.enabled<"u"&&(s.enabled=a.enabled),this.sendPromptListChanged()}};return this._registeredPrompts[e]=s,n&&Object.values(n).some(c=>{let u=c instanceof lc?c._def?.innerType:c;return l$(u)})&&this.setCompletionRequestHandler(),s}_createRegisteredTool(e,r,i,n,o,s,a,c,u){d$(e);let l={title:r,description:i,inputSchema:Qz(n),outputSchema:Qz(o),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!==e&&(typeof d.name=="string"&&d$(d.name),delete this._registeredTools[e],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=ri(d.paramsSchema)),typeof d.outputSchema<"u"&&(l.outputSchema=ri(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[e]=l,this.setToolRequestHandlers(),this.sendToolListChanged(),l}tool(e,...r){if(this._registeredTools[e])throw new Error(`Tool ${e} is already registered`);let i,n,o,s;if(typeof r[0]=="string"&&(i=r.shift()),r.length>1){let c=r[0];if(f$(c))n=r.shift(),r.length>1&&typeof r[0]=="object"&&r[0]!==null&&!f$(r[0])&&(s=r.shift());else if(typeof c=="object"&&c!==null){if(Object.values(c).some(u=>typeof u=="object"&&u!==null))throw new Error(`Tool ${e} expected a Zod schema or ToolAnnotations, but received an unrecognized object`);s=r.shift()}}let a=r[0];return this._createRegisteredTool(e,void 0,i,n,o,s,{taskSupport:"forbidden"},void 0,a)}registerTool(e,r,i){if(this._registeredTools[e])throw new Error(`Tool ${e} is already registered`);let{title:n,description:o,inputSchema:s,outputSchema:a,annotations:c,_meta:u}=r;return this._createRegisteredTool(e,n,o,s,a,c,{taskSupport:"forbidden"},u,i)}prompt(e,...r){if(this._registeredPrompts[e])throw new Error(`Prompt ${e} is already registered`);let i;typeof r[0]=="string"&&(i=r.shift());let n;r.length>1&&(n=r.shift());let o=r[0],s=this._createRegisteredPrompt(e,void 0,i,n,o);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),s}registerPrompt(e,r,i){if(this._registeredPrompts[e])throw new Error(`Prompt ${e} is already registered`);let{title:n,description:o,argsSchema:s}=r,a=this._createRegisteredPrompt(e,n,o,s,i);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),a}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(e,r){return this.server.sendLoggingMessage(e,r)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}};var jV={type:"object",properties:{}};function tP(t){return t!==null&&typeof t=="object"&&"parse"in t&&typeof t.parse=="function"&&"safeParse"in t&&typeof t.safeParse=="function"}function rP(t){return"_def"in t||"_zod"in t||tP(t)}function f$(t){return typeof t!="object"||t===null||rP(t)?!1:Object.keys(t).length===0?!0:Object.values(t).some(tP)}function Qz(t){if(t){if(f$(t))return ri(t);if(!rP(t))throw new Error("inputSchema must be a Zod schema or raw shape, received an unrecognized object");return t}}function AV(t){let e=$n(t);return e?Object.entries(e).map(([r,i])=>{let n=cN(i),o=uN(i);return{name:r,description:n,required:!o}}):[]}function Sn(t){let r=$n(t)?.method;if(!r)throw new Error("Schema is missing a method literal");let i=Uf(r);if(typeof i=="string")return i;throw new Error("Schema method literal must be a string")}function eP(t){return{completion:{values:t.slice(0,100),total:t.length,hasMore:t.length>100}}}var wc={completion:{values:[],hasMore:!1}};import iP from"node:process";var Pp=class{append(e){this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){if(!this._buffer)return null;let e=this._buffer.indexOf(`
|
|
225
|
-
`);if(e===-1)return null;let r=this._buffer.toString("utf8",0,e).replace(/\r$/,"");return this._buffer=this._buffer.subarray(e+1),CV(r)}clear(){this._buffer=void 0}};function CV(t){return rz.parse(JSON.parse(t))}function nP(t){return JSON.stringify(t)+`
|
|
226
|
-
`}var Tp=class{constructor(e=iP.stdin,r=iP.stdout){this._stdin=e,this._stdout=r,this._readBuffer=new Pp,this._started=!1,this._ondata=i=>{this._readBuffer.append(i),this.processReadBuffer()},this._onerror=i=>{this.onerror?.(i)}}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 e=this._readBuffer.readMessage();if(e===null)break;this.onmessage?.(e)}catch(e){this.onerror?.(e)}}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(e){return new Promise(r=>{let i=nP(e);this._stdout.write(i)?r():this._stdout.once("drain",r)})}};function bt(t,e){let r=t[e];if(typeof r!="string")throw new TypeError(`${e} must be a string.`);return r}function p$(t){let e=t.indent;return e==="minified"?0:e==="tab"?"tab":e===2||e===3||e===4?e:2}function er(t,e,r=!0){if(t.ok)return{ok:!0,message:e,...r?{output:t.value}:{},...t.metadata?{metadata:t.metadata}:{}};let i={...t.line===void 0?{}:{line:t.line},...t.column===void 0?{}:{column:t.column},...t.offset===void 0?{}:{offset:t.offset},...t.suggestion===void 0?{}:{suggestion:t.suggestion}};return{ok:!1,message:t.message,...t.metadata?{metadata:t.metadata}:{},...Object.keys(i).length?{diagnostic:i}:{}}}async function RV(t){let e=bt(t,"json"),r=Array.isArray(t.checks)?t.checks.filter(s=>typeof s=="string"):["duplicate_keys","number_precision"],i=r.length?new Set(r):new Set(["duplicate_keys","number_precision"]),n={};i.has("duplicate_keys")&&(n.duplicate_keys=er(await mt({operation:"duplicates",input:e}),"Duplicate-key analysis completed.")),i.has("number_precision")&&(n.number_precision=er(await mt({operation:"precision",input:e}),"Number-precision analysis completed."));let o=Object.values(n).find(s=>!s.ok);return o?{...o,reports:n}:{ok:!0,message:"JSON correctness analysis completed.",reports:n}}async function tr(t,e){switch(t){case"format_json":{let r=bt(e,"json"),i=e.sort_keys===!0;return er(await mt({operation:i?"sort":"format",input:r,indent:p$(e)}),i?"JSON formatted with recursively sorted object keys.":"JSON formatted.")}case"validate_json":return er(await mt({operation:"validate",input:bt(e,"json")}),"Valid JSON.",!1);case"repair_json":return er(await mt({operation:"repair",input:bt(e,"json")}),"JSON repair completed. Review the proposed output before replacing the source.");case"analyze_json":return RV(e);case"compare_json":return er(await mt({operation:"compare",input:bt(e,"original"),secondaryInput:bt(e,"changed")}),"JSON comparison completed.");case"query_json":return er(await mt({operation:"jsonpath",input:bt(e,"json"),query:bt(e,"path"),indent:p$(e)}),"JSONPath query completed.");case"convert_json":{let r=bt(e,"to");if(r!=="yaml"&&r!=="csv"&&r!=="xml")throw new TypeError("to must be yaml, csv, or xml.");return er(await mt({operation:r,input:bt(e,"json"),indent:p$(e)}),`JSON converted to ${r.toUpperCase()}.`)}case"infer_json_schema":return er(await mt({operation:"schema",input:bt(e,"json")}),"Draft 2020-12 JSON Schema inferred. Review and tighten the generated constraints.");case"validate_json_schema":return er(await mt({operation:"schema_validate",input:bt(e,"json"),secondaryInput:bt(e,"schema")}),"JSON Schema validation completed.");case"generate_json_sample":return er(await mt({operation:"schema_sample",input:bt(e,"schema")}),"JSON sample generated from the schema.")}}var Mt=be.string().describe("The complete JSON document as text. It is processed locally and is not sent over the network."),m$=be.enum(["minified","2","3","4","tab"]).default("2").transform(t=>t==="2"||t==="3"||t==="4"?Number(t):t).describe("Output indentation. Defaults to 2 spaces."),DV=be.record(be.string(),be.union([be.string(),be.number(),be.boolean()])),hr={ok:be.boolean(),message:be.string(),output:be.string().optional(),metadata:DV.optional(),diagnostic:be.object({line:be.number().optional(),column:be.number().optional(),offset:be.number().optional(),suggestion:be.string().optional()}).optional(),reports:be.record(be.string(),be.unknown()).optional()},gr={readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1};function yr(t){let e=t;return{content:[{type:"text",text:JSON.stringify(t)}],structuredContent:e,isError:!t.ok}}function MV(){let t=new zp({name:"bestjsonformatter",version:"0.1.0"},{instructions:"Use these local, deterministic tools for JSON formatting, validation, repair, correctness analysis, comparison, querying, conversion, and JSON Schema work. No tool makes a network request."});return t.registerTool("format_json",{title:"Format JSON",description:"Format or minify JSON without changing duplicate properties, large integers, number notation, or string escape spelling. Can sort object keys recursively.",inputSchema:{json:Mt,indent:m$.optional(),sort_keys:be.boolean().default(!1).describe("Sort object keys recursively while preserving arrays.")},outputSchema:hr,annotations:gr},async e=>yr(await tr("format_json",e))),t.registerTool("validate_json",{title:"Validate JSON",description:"Validate strict JSON syntax and return deterministic line, column, and offset diagnostics without echoing a valid input document.",inputSchema:{json:Mt},outputSchema:hr,annotations:gr},async e=>yr(await tr("validate_json",e))),t.registerTool("repair_json",{title:"Repair JSON",description:"Propose a repair for malformed JSON such as trailing commas, single quotes, comments, or unquoted keys. The source is never modified.",inputSchema:{json:Mt},outputSchema:hr,annotations:gr},async e=>yr(await tr("repair_json",e))),t.registerTool("analyze_json",{title:"Analyze JSON correctness",description:"Find duplicate object keys and number values that JavaScript may round, overflow, underflow, or rewrite.",inputSchema:{json:Mt,checks:be.array(be.enum(["duplicate_keys","number_precision"])).min(1).default(["duplicate_keys","number_precision"]).describe("Correctness checks to run. Defaults to both.")},outputSchema:hr,annotations:gr},async e=>yr(await tr("analyze_json",e))),t.registerTool("compare_json",{title:"Compare JSON",description:"Compare two JSON documents structurally while ignoring whitespace and object-key order.",inputSchema:{original:Mt.describe("The original JSON document as text."),changed:Mt.describe("The changed JSON document as text.")},outputSchema:hr,annotations:gr},async e=>yr(await tr("compare_json",e))),t.registerTool("query_json",{title:"Query JSON",description:"Run a JSONPath expression against a JSON document and return every matching value.",inputSchema:{json:Mt,path:be.string().min(1).describe("A JSONPath expression beginning at $, such as $.items[*].id."),indent:m$.optional()},outputSchema:hr,annotations:gr},async e=>yr(await tr("query_json",e))),t.registerTool("convert_json",{title:"Convert JSON",description:"Convert valid JSON to YAML, CSV, or XML while retaining exact number values where the target format permits.",inputSchema:{json:Mt,to:be.enum(["yaml","csv","xml"]).describe("Target document format."),indent:m$.optional()},outputSchema:hr,annotations:gr},async e=>yr(await tr("convert_json",e))),t.registerTool("infer_json_schema",{title:"Infer JSON Schema",description:"Infer a Draft 2020-12 JSON Schema from an example JSON document.",inputSchema:{json:Mt},outputSchema:hr,annotations:gr},async e=>yr(await tr("infer_json_schema",e))),t.registerTool("validate_json_schema",{title:"Validate JSON Schema",description:"Validate a JSON document against a Draft 2020-12 JSON Schema and return all validation errors.",inputSchema:{json:Mt,schema:Mt.describe("The Draft 2020-12 JSON Schema as JSON text.")},outputSchema:hr,annotations:gr},async e=>yr(await tr("validate_json_schema",e))),t.registerTool("generate_json_sample",{title:"Generate JSON sample",description:"Generate a representative JSON document from a Draft 2020-12 JSON Schema.",inputSchema:{schema:Mt.describe("The Draft 2020-12 JSON Schema as JSON text.")},outputSchema:hr,annotations:gr},async e=>yr(await tr("generate_json_sample",e))),t}async function oP(){await MV().connect(new Tp)}var LV=`Best JSON Formatter agent tools
|
|
227
|
-
|
|
228
|
-
Usage:
|
|
229
|
-
bestjsonformatter mcp
|
|
230
|
-
bestjsonformatter format [file|-] [--indent minified|2|3|4|tab] [--sort]
|
|
231
|
-
bestjsonformatter validate [file|-]
|
|
232
|
-
bestjsonformatter repair [file|-]
|
|
233
|
-
bestjsonformatter duplicates [file|-]
|
|
234
|
-
bestjsonformatter precision [file|-]
|
|
235
|
-
bestjsonformatter compare <original-file> <changed-file>
|
|
236
|
-
bestjsonformatter query <jsonpath> [file|-]
|
|
237
|
-
bestjsonformatter to-yaml|to-csv|to-xml [file|-]
|
|
238
|
-
bestjsonformatter schema-infer [file|-]
|
|
239
|
-
bestjsonformatter schema-validate <json-file> <schema-file>
|
|
240
|
-
bestjsonformatter schema-sample [schema-file|-]
|
|
241
|
-
|
|
242
|
-
Use "-" or pipe stdin for document input. MCP mode communicates over stdio and
|
|
243
|
-
never sends JSON over the network.`;function qV(t,e){let r=t.indexOf(e);return r===-1?void 0:t[r+1]}function ZV(t){let e=[];for(let r=0;r<t.length;r+=1){if(t[r].startsWith("--")){t[r]!=="--sort"&&(r+=1);continue}e.push(t[r])}return e}async function FV(){let t=[];for await(let e of process.stdin)t.push(Buffer.isBuffer(e)?e:Buffer.from(e));return Buffer.concat(t).toString("utf8")}async function vr(t){if(t&&t!=="-")return UV(t,"utf8");if(process.stdin.isTTY)throw new TypeError("Provide a file path or pipe JSON through stdin.");return FV()}function VV(t){let e=qV(t,"--indent")??"2";if(e==="minified")return 0;if(e==="tab")return"tab";if(e==="2"||e==="3"||e==="4")return Number(e);throw new TypeError("--indent must be minified, 2, 3, 4, or tab.")}async function JV(t){let[e,...r]=t;if(!e||e==="--help"||e==="-h"||e==="help"){process.stdout.write(`${LV}
|
|
244
|
-
`);return}if(e==="mcp"){await oP();return}let i=ZV(r),n,o,s,a;switch(e){case"format":n=r.includes("--sort")?"sort":"format",o=await vr(i[0]);break;case"validate":case"repair":case"duplicates":case"precision":n=e,o=await vr(i[0]);break;case"compare":if(i.length!==2)throw new TypeError("compare requires an original file and a changed file.");n="compare",o=await vr(i[0]),s=await vr(i[1]);break;case"query":if(!i[0])throw new TypeError("query requires a JSONPath expression.");n="jsonpath",a=i[0],o=await vr(i[1]);break;case"to-yaml":case"to-csv":case"to-xml":n=e.slice(3),o=await vr(i[0]);break;case"schema-infer":n="schema",o=await vr(i[0]);break;case"schema-validate":if(i.length!==2)throw new TypeError("schema-validate requires a JSON file and a schema file.");n="schema_validate",o=await vr(i[0]),s=await vr(i[1]);break;case"schema-sample":n="schema_sample",o=await vr(i[0]);break;default:throw new TypeError(`Unknown command: ${e}`)}let c=await mt({operation:n,input:o,secondaryInput:s,query:a,indent:VV(r)});if(!c.ok){process.stderr.write(`${JSON.stringify(c)}
|
|
245
|
-
`),process.exitCode=1;return}process.stdout.write(`${c.value}${c.value.endsWith(`
|
|
246
|
-
`)?"":`
|
|
247
|
-
`}`)}JV(process.argv.slice(2)).catch(t=>{let e=t instanceof Error?t.message:"The command failed.";process.stderr.write(`${e}
|
|
248
|
-
`),process.exitCode=1});
|